diff --git a/docs/vue.md b/docs/vue.md index d1eba0c..0a3e838 100644 --- a/docs/vue.md +++ b/docs/vue.md @@ -108,7 +108,7 @@ npm run build:example:vue ``` -The example uses a Vite alias for `vue` because `gnexus-ui-kit` is linked as a local file dependency. Published package consumers do not need that alias if `vue` is installed in the host project. +The example uses a Vite alias for `vue` because `gnexus-ui-kit` is linked as a local file dependency. Published package consumers do not need that alias if `vue` is installed in the host project. The example build clears `node_modules/.vite` before `vite build` so Vite does not reuse stale linked-package cache after `dist/vue` changes. `kit.css` currently references fonts through absolute `/assets/...` URLs. Vite may warn that those URLs are left for runtime resolution; host apps must serve `dist/assets` at `/assets` or adjust their asset pipeline accordingly. diff --git a/docs/vue/ai-usage-guide.md b/docs/vue/ai-usage-guide.md index 32e515e..c048775 100644 --- a/docs/vue/ai-usage-guide.md +++ b/docs/vue/ai-usage-guide.md @@ -44,6 +44,10 @@ - multiline field: `GnTextarea` - select field: `GnSelect` - boolean control: `GnCheckbox` or `GnSwitch` +- radio choice: `GnRadio` or `GnRadioGroup` +- range slider: `GnRange` +- file upload: `GnFileUpload` +- searchable option input: `GnCombobox` - view switcher: `GnTabs` - disclosure group: `GnAccordion` - dialog: `GnModal` @@ -75,6 +79,8 @@ - Do not call `GNexusUIKit.Modals.create()` from Vue components. - Do not call `GNexusUIKit.Overlays.init()` or `GNexusUIKit.NavigationShell.init()` in Vue projects. - Do not run `Accordion.init()` or `Tabs.init()` inside Vue components. +- Do not use the legacy `advancedSelect()` helper in Vue; use `GnCombobox`. +- Do not use `InputPatterns.init()` for Vue file upload previews; use `GnFileUpload`. - Do not invent new variant names. - Do not duplicate GNexus CSS in Vue component scoped styles. - Do not bundle Vue into the UI-kit adapter. @@ -104,3 +110,5 @@ ``` Warnings about `/assets/fonts/...` in Vite builds are expected with the current CSS contract. They mean the host app must serve GNexus UI Kit assets at `/assets`. + +The local example clears `examples/vue/node_modules/.vite` before build because `gnexus-ui-kit` is linked from the repository root and Vite can otherwise reuse stale optimized metadata after `dist/vue` changes. diff --git a/docs/vue/component-map.md b/docs/vue/component-map.md index 5a7440f..792a267 100644 --- a/docs/vue/component-map.md +++ b/docs/vue/component-map.md @@ -15,6 +15,11 @@ | `GnSelect` | `.select-wrap`, `.input.select` | `v-model`, options prop or option slot. | | `GnCheckbox` | `.checkbox` | `v-model` boolean. | | `GnSwitch` | `.checkbox` | Alias for current switch-like checkbox styling. | +| `GnRadio` | `.radio` | Single radio option. | +| `GnRadioGroup` | `.radio` | Controlled radio group. | +| `GnRange` | `.range` | Controlled range slider. | +| `GnFileUpload` | `.file-upload-panel` | Vue-native file picker with preview. | +| `GnCombobox` | `.advanced-select` | Vue-native advanced select/combobox. | | `GnTabs` | `.tabs`, `.tabs-list`, `.tab-panel` | Vue-native state through `v-model`. | | `GnAccordion` | `.accordion` | Vue-native open state. | | `GnModal` | `.modal` | Vue-native `v-model:open`; teleports to body. | diff --git a/examples/vue/package.json b/examples/vue/package.json index 63b241a..1a3ff23 100644 --- a/examples/vue/package.json +++ b/examples/vue/package.json @@ -4,7 +4,7 @@ "type": "module", "scripts": { "dev": "vite --host 0.0.0.0", - "build": "vite build" + "build": "node -e \"require('fs').rmSync('node_modules/.vite',{recursive:true,force:true})\" && vite build" }, "dependencies": { "@vitejs/plugin-vue": "^5.2.0", diff --git a/examples/vue/src/main.js b/examples/vue/src/main.js index 0b26c64..707883d 100644 --- a/examples/vue/src/main.js +++ b/examples/vue/src/main.js @@ -8,14 +8,18 @@ GnBadge, GnChip, GnChipGroup, + GnCombobox, GnDescriptionList, GnDropdown, GnEmptyState, + GnFileUpload, GnInput, GnModal, GnPopover, GnPageHeader, GnProgress, + GnRadioGroup, + GnRange, GnSearchField, GnTabs, GnTooltip, @@ -32,14 +36,18 @@ GnBadge, GnChip, GnChipGroup, + GnCombobox, GnDescriptionList, GnDropdown, GnEmptyState, + GnFileUpload, GnInput, GnModal, GnPopover, GnPageHeader, GnProgress, + GnRadioGroup, + GnRange, GnSearchField, GnTabs, GnTooltip, @@ -49,6 +57,10 @@ const modalOpen = ref(false); const name = ref("Launch Plan"); const query = ref(""); + const mode = ref("auto"); + const rollout = ref(72); + const assignee = ref(""); + const files = ref([]); const toast = useToast(); const tabs = [ @@ -69,6 +81,17 @@ { label: "Duplicate", icon: "ph-copy" }, { label: "Delete", icon: "ph-trash", danger: true } ]; + const modes = [ + { label: "Auto", value: "auto" }, + { label: "Manual", value: "manual" }, + { label: "Locked", value: "locked", disabled: true } + ]; + const people = [ + { label: "Joe", value: "joe" }, + { label: "James", value: "james" }, + { label: "Eliza", value: "eliza" }, + { label: "Emily", value: "emily" } + ]; const save = () => { toast.success({ title: "Saved", text: `${name.value} updated` }); @@ -79,10 +102,16 @@ activeTab, activity, details, + files, + mode, menuItems, modalOpen, name, + assignee, + people, query, + rollout, + modes, tabs, save }; @@ -120,7 +149,7 @@