numori-ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +651 -0
- package/README.md +466 -0
- package/dist/components/Alert.js +137 -0
- package/dist/components/Alert.js.map +1 -0
- package/dist/components/Avatar.js +133 -0
- package/dist/components/Avatar.js.map +1 -0
- package/dist/components/Badge.js +93 -0
- package/dist/components/Badge.js.map +1 -0
- package/dist/components/Button.js +428 -0
- package/dist/components/Button.js.map +1 -0
- package/dist/components/ButtonsGroup.js +153 -0
- package/dist/components/ButtonsGroup.js.map +1 -0
- package/dist/components/Checkbox.js +93 -0
- package/dist/components/Checkbox.js.map +1 -0
- package/dist/components/Divider.js +79 -0
- package/dist/components/Divider.js.map +1 -0
- package/dist/components/Dropdown.js +166 -0
- package/dist/components/Dropdown.js.map +1 -0
- package/dist/components/DropdownItem.js +106 -0
- package/dist/components/DropdownItem.js.map +1 -0
- package/dist/components/DropdownRow.js +41 -0
- package/dist/components/DropdownRow.js.map +1 -0
- package/dist/components/DropdownSubmenu.js +142 -0
- package/dist/components/DropdownSubmenu.js.map +1 -0
- package/dist/components/FileInput.js +122 -0
- package/dist/components/FileInput.js.map +1 -0
- package/dist/components/FormField.js +112 -0
- package/dist/components/FormField.js.map +1 -0
- package/dist/components/Input.js +603 -0
- package/dist/components/Input.js.map +1 -0
- package/dist/components/Kbd.js +35 -0
- package/dist/components/Kbd.js.map +1 -0
- package/dist/components/ListMenu.js +143 -0
- package/dist/components/ListMenu.js.map +1 -0
- package/dist/components/ListMenuItem.js +189 -0
- package/dist/components/ListMenuItem.js.map +1 -0
- package/dist/components/Modal.js +206 -0
- package/dist/components/Modal.js.map +1 -0
- package/dist/components/Numpad.js +123 -0
- package/dist/components/Numpad.js.map +1 -0
- package/dist/components/Popup.js +170 -0
- package/dist/components/Popup.js.map +1 -0
- package/dist/components/ProgressBar.js +118 -0
- package/dist/components/ProgressBar.js.map +1 -0
- package/dist/components/Prompt.js +201 -0
- package/dist/components/Prompt.js.map +1 -0
- package/dist/components/Radio.js +81 -0
- package/dist/components/Radio.js.map +1 -0
- package/dist/components/Select.js +441 -0
- package/dist/components/Select.js.map +1 -0
- package/dist/components/Slider.js +116 -0
- package/dist/components/Slider.js.map +1 -0
- package/dist/components/Stepper.js +65 -0
- package/dist/components/Stepper.js.map +1 -0
- package/dist/components/Toggle.js +133 -0
- package/dist/components/Toggle.js.map +1 -0
- package/dist/components/Tooltip.js +120 -0
- package/dist/components/Tooltip.js.map +1 -0
- package/dist/components/index.js +81 -0
- package/dist/components/index.js.map +1 -0
- package/dist/composables/onClickOutside.js +51 -0
- package/dist/composables/onClickOutside.js.map +1 -0
- package/dist/composables/useBackButton.js +98 -0
- package/dist/composables/useBackButton.js.map +1 -0
- package/dist/composables/useEventListener.js +63 -0
- package/dist/composables/useEventListener.js.map +1 -0
- package/dist/icons/Icon.js +120 -0
- package/dist/icons/Icon.js.map +1 -0
- package/dist/icons/mdi.js +69 -0
- package/dist/icons/mdi.js.map +1 -0
- package/dist/icons/registry.js +63 -0
- package/dist/icons/registry.js.map +1 -0
- package/dist/icons/resolver.js +49 -0
- package/dist/icons/resolver.js.map +1 -0
- package/dist/index.d.ts +108 -0
- package/dist/index.js +157 -0
- package/dist/index.js.map +1 -0
- package/dist/manifest.js +89 -0
- package/dist/manifest.js.map +1 -0
- package/dist/numori-ui.css +184 -0
- package/dist/nuxt.d.ts +35 -0
- package/dist/nuxt.mjs +243 -0
- package/dist/nuxt.mjs.map +1 -0
- package/dist/vite.d.ts +29 -0
- package/dist/vite.mjs +187 -0
- package/dist/vite.mjs.map +1 -0
- package/package.json +138 -0
- package/src/components/Alert.vue +127 -0
- package/src/components/Avatar.vue +100 -0
- package/src/components/Badge.vue +77 -0
- package/src/components/Button.vue +419 -0
- package/src/components/ButtonsGroup.vue +140 -0
- package/src/components/Checkbox.vue +81 -0
- package/src/components/Divider.vue +64 -0
- package/src/components/Dropdown.vue +150 -0
- package/src/components/DropdownItem.vue +78 -0
- package/src/components/DropdownRow.vue +37 -0
- package/src/components/DropdownSubmenu.vue +127 -0
- package/src/components/FileInput.vue +107 -0
- package/src/components/FormField.vue +86 -0
- package/src/components/Input.vue +619 -0
- package/src/components/Kbd.vue +30 -0
- package/src/components/ListMenu.vue +127 -0
- package/src/components/ListMenuItem.vue +171 -0
- package/src/components/Modal.vue +209 -0
- package/src/components/Numpad.vue +118 -0
- package/src/components/Popup.vue +156 -0
- package/src/components/ProgressBar.vue +107 -0
- package/src/components/Prompt.vue +161 -0
- package/src/components/Radio.vue +50 -0
- package/src/components/Select.vue +470 -0
- package/src/components/Slider.vue +93 -0
- package/src/components/Stepper.vue +53 -0
- package/src/components/Toggle.vue +125 -0
- package/src/components/Tooltip.vue +113 -0
- package/src/components/index.js +109 -0
- package/src/composables/onClickOutside.js +61 -0
- package/src/composables/useBackButton.js +98 -0
- package/src/composables/useEventListener.js +65 -0
- package/src/icons/Icon.vue +139 -0
- package/src/icons/mdi.js +67 -0
- package/src/icons/registry.js +64 -0
- package/src/icons/resolver.js +48 -0
- package/src/index.js +167 -0
- package/src/manifest.js +86 -0
- package/src/nuxt.js +315 -0
- package/src/style.css +20 -0
- package/src/tailwind.css +18 -0
- package/src/theme.css +172 -0
- package/src/vite.js +235 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { MDI_VIEW_BOX, mdiIconNames, mdiPaths } from "./icons/mdi.js";
|
|
2
|
+
import { iconRegistry, registerIcons, resolveIconPath } from "./icons/registry.js";
|
|
3
|
+
import { ICON_COMPONENT_KEY, provideIconComponent, useIconComponent } from "./icons/resolver.js";
|
|
4
|
+
import _sfc_main$13 from "./icons/Icon.js";
|
|
5
|
+
import _sfc_main from "./components/Alert.js";
|
|
6
|
+
import _sfc_main$1 from "./components/Avatar.js";
|
|
7
|
+
import _sfc_main$2 from "./components/Badge.js";
|
|
8
|
+
import _sfc_main$3 from "./components/Button.js";
|
|
9
|
+
import _sfc_main$4 from "./components/ButtonsGroup.js";
|
|
10
|
+
import _sfc_main$5 from "./components/Checkbox.js";
|
|
11
|
+
import _sfc_main$6 from "./components/Divider.js";
|
|
12
|
+
import { useEventListener } from "./composables/useEventListener.js";
|
|
13
|
+
import { onClickOutside } from "./composables/onClickOutside.js";
|
|
14
|
+
import _sfc_main$7 from "./components/Dropdown.js";
|
|
15
|
+
import _sfc_main$8 from "./components/DropdownItem.js";
|
|
16
|
+
import _sfc_main$9 from "./components/DropdownRow.js";
|
|
17
|
+
import _sfc_main$10 from "./components/DropdownSubmenu.js";
|
|
18
|
+
import _sfc_main$11 from "./components/FileInput.js";
|
|
19
|
+
import _sfc_main$12 from "./components/FormField.js";
|
|
20
|
+
import _sfc_main$14 from "./components/Input.js";
|
|
21
|
+
import _sfc_main$15 from "./components/Kbd.js";
|
|
22
|
+
import _sfc_main$16 from "./components/ListMenu.js";
|
|
23
|
+
import _sfc_main$17 from "./components/ListMenuItem.js";
|
|
24
|
+
import { useBackButton } from "./composables/useBackButton.js";
|
|
25
|
+
import _sfc_main$18 from "./components/Modal.js";
|
|
26
|
+
import _sfc_main$19 from "./components/Numpad.js";
|
|
27
|
+
import _sfc_main$20 from "./components/Popup.js";
|
|
28
|
+
import _sfc_main$21 from "./components/ProgressBar.js";
|
|
29
|
+
import _sfc_main$22 from "./components/Prompt.js";
|
|
30
|
+
import _sfc_main$23 from "./components/Radio.js";
|
|
31
|
+
import _sfc_main$24 from "./components/Select.js";
|
|
32
|
+
import _sfc_main$25 from "./components/Slider.js";
|
|
33
|
+
import _sfc_main$26 from "./components/Stepper.js";
|
|
34
|
+
import _sfc_main$27 from "./components/Toggle.js";
|
|
35
|
+
import _sfc_main$28 from "./components/Tooltip.js";
|
|
36
|
+
import { components } from "./components/index.js";
|
|
37
|
+
import { COMPONENT_NAMES, DEFAULT_PREFIX, componentEntries, prefixed } from "./manifest.js";
|
|
38
|
+
//#region src/index.js
|
|
39
|
+
/**
|
|
40
|
+
* Numori UI — the Numori design system as a standalone Vue 3 component library.
|
|
41
|
+
*
|
|
42
|
+
* This is the framework-agnostic entry point. It works in any Vue 3 app with
|
|
43
|
+
* no build-tool integration at all:
|
|
44
|
+
*
|
|
45
|
+
* import { createApp } from 'vue'
|
|
46
|
+
* import NumoriUI from 'numori-ui'
|
|
47
|
+
* import './app.css' // @import "tailwindcss"; @import "numori-ui/css";
|
|
48
|
+
*
|
|
49
|
+
* createApp(App).use(NumoriUI).mount('#app')
|
|
50
|
+
*
|
|
51
|
+
* For a nicer developer experience there are two build-tool integrations that
|
|
52
|
+
* register the components for you, so templates need no imports:
|
|
53
|
+
*
|
|
54
|
+
* - `numori-ui/nuxt` — a Nuxt module
|
|
55
|
+
* - `numori-ui/vite` — a Vite plugin
|
|
56
|
+
*
|
|
57
|
+
* Styling is Tailwind CSS v4 and is deliberately NOT bundled as compiled CSS.
|
|
58
|
+
* The components are plain utility classes, so they inherit the host app's
|
|
59
|
+
* Tailwind build: one pass, one stylesheet, no duplication, and every token is
|
|
60
|
+
* overridable. All the host has to do is import `numori-ui/css`, which supplies
|
|
61
|
+
* the design tokens and tells Tailwind to scan this package for classes.
|
|
62
|
+
*/
|
|
63
|
+
/**
|
|
64
|
+
* Vue plugin that globally registers every Numori UI component.
|
|
65
|
+
*
|
|
66
|
+
* @type {import('vue').Plugin}
|
|
67
|
+
*
|
|
68
|
+
* @param {import('vue').App} app
|
|
69
|
+
* @param {object} [options]
|
|
70
|
+
* @param {string} [options.prefix='Ui']
|
|
71
|
+
* Prefix for registered tags. `'Ui'` gives `<UiButton>`. Must be non-empty —
|
|
72
|
+
* see the note in `install` for why.
|
|
73
|
+
* @param {string[]} [options.include]
|
|
74
|
+
* Register only these base names (e.g. `['Button', 'Modal']`). Note this
|
|
75
|
+
* affects *global registration* only — it is not tree-shaking. To actually
|
|
76
|
+
* drop unused components from the bundle, skip the plugin and import the
|
|
77
|
+
* components you use directly.
|
|
78
|
+
* @param {string[]} [options.exclude]
|
|
79
|
+
* Skip these base names. Useful when the host has its own `<UiButton>`.
|
|
80
|
+
* @param {object} [options.icons]
|
|
81
|
+
* @param {import('vue').Component|string} [options.icons.component]
|
|
82
|
+
* Render all icons with this component instead of the bundled inline SVGs.
|
|
83
|
+
* Receives a `name` prop and must forward `class` to its root element.
|
|
84
|
+
* @param {Record<string,string>} [options.icons.extra]
|
|
85
|
+
* Extra icon path data to add to the bundled set, keyed by name.
|
|
86
|
+
*
|
|
87
|
+
* @example Default registration
|
|
88
|
+
* app.use(NumoriUI)
|
|
89
|
+
*
|
|
90
|
+
* @example Custom prefix
|
|
91
|
+
* app.use(NumoriUI, { prefix: 'N' }) // <NButton>
|
|
92
|
+
*
|
|
93
|
+
* @example Delegate icons to an existing icon component
|
|
94
|
+
* app.use(NumoriUI, { icons: { component: MyIcon } })
|
|
95
|
+
*/
|
|
96
|
+
var NumoriUI = { install(app, options = {}) {
|
|
97
|
+
const { prefix = "Ui", include, exclude = [], icons = {} } = options;
|
|
98
|
+
if (typeof prefix !== "string" || prefix.length === 0) throw new Error("[numori-ui] `prefix` must be a non-empty string. Registering components under their bare names would make <Button> resolve its own native `button` root element, recursing infinitely. Use a prefix such as \"Ui\" or \"N\".");
|
|
99
|
+
if (icons.extra) registerIcons(icons.extra);
|
|
100
|
+
if (icons.component) app.provide(ICON_COMPONENT_KEY, icons.component);
|
|
101
|
+
for (const [name, component] of Object.entries(components)) {
|
|
102
|
+
if (include && !include.includes(name)) continue;
|
|
103
|
+
if (exclude.includes(name)) continue;
|
|
104
|
+
app.component(prefixed(name, prefix), component);
|
|
105
|
+
}
|
|
106
|
+
} };
|
|
107
|
+
/**
|
|
108
|
+
* Build a Vue plugin that globally registers only the components you hand it.
|
|
109
|
+
*
|
|
110
|
+
* `NumoriUI` is convenient but it is not tree-shakeable: to register everything
|
|
111
|
+
* it has to reference everything, so `app.use(NumoriUI)` puts all 29 components
|
|
112
|
+
* in your bundle (~82 kB) whether you render them or not. The `include` option
|
|
113
|
+
* does not change that — it controls registration, not bundling.
|
|
114
|
+
*
|
|
115
|
+
* This factory is the way to get both. You import the components you want, so
|
|
116
|
+
* the bundler sees exactly that set and drops the rest, and you still get global
|
|
117
|
+
* tags instead of importing them into every file.
|
|
118
|
+
*
|
|
119
|
+
* Keys become the registered tag names verbatim, so no prefix option is needed
|
|
120
|
+
* and there is no naming magic — rename in the object literal if you want a
|
|
121
|
+
* different tag.
|
|
122
|
+
*
|
|
123
|
+
* @param {Record<string, import('vue').Component>} components
|
|
124
|
+
* Map of tag name to component, e.g. `{ UiButton, UiModal }`.
|
|
125
|
+
* @param {object} [options]
|
|
126
|
+
* @param {object} [options.icons] Same shape as the `NumoriUI` plugin's option.
|
|
127
|
+
* @returns {import('vue').Plugin}
|
|
128
|
+
*
|
|
129
|
+
* @example Global tags, but only two components bundled
|
|
130
|
+
* import { createNumoriUI, UiButton, UiModal } from 'numori-ui'
|
|
131
|
+
*
|
|
132
|
+
* app.use(createNumoriUI({ UiButton, UiModal }))
|
|
133
|
+
*
|
|
134
|
+
* @example Registering under different tag names
|
|
135
|
+
* app.use(createNumoriUI({ NButton: UiButton, NModal: UiModal }))
|
|
136
|
+
*/
|
|
137
|
+
function createNumoriUI(components = {}, options = {}) {
|
|
138
|
+
const { icons = {} } = options;
|
|
139
|
+
const DYNAMIC_TAGS = [
|
|
140
|
+
"button",
|
|
141
|
+
"a",
|
|
142
|
+
"div",
|
|
143
|
+
"span",
|
|
144
|
+
"label",
|
|
145
|
+
"li"
|
|
146
|
+
];
|
|
147
|
+
for (const name of Object.keys(components)) if (DYNAMIC_TAGS.includes(name.toLowerCase())) throw new Error(`[numori-ui] Cannot register a component as "${name}": it collides with the native <${name.toLowerCase()}> element that UiButton can render as its root, which would recurse infinitely. Use a prefixed name such as "Ui${name}".`);
|
|
148
|
+
return { install(app) {
|
|
149
|
+
if (icons.extra) registerIcons(icons.extra);
|
|
150
|
+
if (icons.component) app.provide(ICON_COMPONENT_KEY, icons.component);
|
|
151
|
+
for (const [name, component] of Object.entries(components)) app.component(name, component);
|
|
152
|
+
} };
|
|
153
|
+
}
|
|
154
|
+
//#endregion
|
|
155
|
+
export { COMPONENT_NAMES, DEFAULT_PREFIX, ICON_COMPONENT_KEY, MDI_VIEW_BOX, NumoriUI, NumoriUI as default, _sfc_main as UiAlert, _sfc_main$1 as UiAvatar, _sfc_main$2 as UiBadge, _sfc_main$3 as UiButton, _sfc_main$4 as UiButtonsGroup, _sfc_main$5 as UiCheckbox, _sfc_main$6 as UiDivider, _sfc_main$7 as UiDropdown, _sfc_main$8 as UiDropdownItem, _sfc_main$9 as UiDropdownRow, _sfc_main$10 as UiDropdownSubmenu, _sfc_main$11 as UiFileInput, _sfc_main$12 as UiFormField, _sfc_main$13 as UiIcon, _sfc_main$14 as UiInput, _sfc_main$15 as UiKbd, _sfc_main$16 as UiListMenu, _sfc_main$17 as UiListMenuItem, _sfc_main$18 as UiModal, _sfc_main$19 as UiNumpad, _sfc_main$20 as UiPopup, _sfc_main$21 as UiProgressBar, _sfc_main$22 as UiPrompt, _sfc_main$23 as UiRadio, _sfc_main$24 as UiSelect, _sfc_main$25 as UiSlider, _sfc_main$26 as UiStepper, _sfc_main$27 as UiToggle, _sfc_main$28 as UiTooltip, componentEntries, components, createNumoriUI, iconRegistry, mdiIconNames, mdiPaths, onClickOutside, prefixed, provideIconComponent, registerIcons, resolveIconPath, useBackButton, useEventListener, useIconComponent };
|
|
156
|
+
|
|
157
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.js"],"sourcesContent":["/**\n * Numori UI — the Numori design system as a standalone Vue 3 component library.\n *\n * This is the framework-agnostic entry point. It works in any Vue 3 app with\n * no build-tool integration at all:\n *\n * import { createApp } from 'vue'\n * import NumoriUI from 'numori-ui'\n * import './app.css' // @import \"tailwindcss\"; @import \"numori-ui/css\";\n *\n * createApp(App).use(NumoriUI).mount('#app')\n *\n * For a nicer developer experience there are two build-tool integrations that\n * register the components for you, so templates need no imports:\n *\n * - `numori-ui/nuxt` — a Nuxt module\n * - `numori-ui/vite` — a Vite plugin\n *\n * Styling is Tailwind CSS v4 and is deliberately NOT bundled as compiled CSS.\n * The components are plain utility classes, so they inherit the host app's\n * Tailwind build: one pass, one stylesheet, no duplication, and every token is\n * overridable. All the host has to do is import `numori-ui/css`, which supplies\n * the design tokens and tells Tailwind to scan this package for classes.\n */\n\nimport { components } from './components/index.js'\nimport { DEFAULT_PREFIX, prefixed } from './manifest.js'\nimport { ICON_COMPONENT_KEY } from './icons/resolver.js'\nimport { registerIcons } from './icons/registry.js'\n\nexport * from './components/index.js'\n\nexport { DEFAULT_PREFIX, COMPONENT_NAMES, componentEntries, prefixed } from './manifest.js'\nexport { registerIcons, iconRegistry, resolveIconPath } from './icons/registry.js'\nexport { provideIconComponent, useIconComponent, ICON_COMPONENT_KEY } from './icons/resolver.js'\nexport { MDI_VIEW_BOX, mdiPaths, mdiIconNames } from './icons/mdi.js'\nexport { useBackButton } from './composables/useBackButton.js'\nexport { onClickOutside } from './composables/onClickOutside.js'\nexport { useEventListener } from './composables/useEventListener.js'\n\n/**\n * Vue plugin that globally registers every Numori UI component.\n *\n * @type {import('vue').Plugin}\n *\n * @param {import('vue').App} app\n * @param {object} [options]\n * @param {string} [options.prefix='Ui']\n * Prefix for registered tags. `'Ui'` gives `<UiButton>`. Must be non-empty —\n * see the note in `install` for why.\n * @param {string[]} [options.include]\n * Register only these base names (e.g. `['Button', 'Modal']`). Note this\n * affects *global registration* only — it is not tree-shaking. To actually\n * drop unused components from the bundle, skip the plugin and import the\n * components you use directly.\n * @param {string[]} [options.exclude]\n * Skip these base names. Useful when the host has its own `<UiButton>`.\n * @param {object} [options.icons]\n * @param {import('vue').Component|string} [options.icons.component]\n * Render all icons with this component instead of the bundled inline SVGs.\n * Receives a `name` prop and must forward `class` to its root element.\n * @param {Record<string,string>} [options.icons.extra]\n * Extra icon path data to add to the bundled set, keyed by name.\n *\n * @example Default registration\n * app.use(NumoriUI)\n *\n * @example Custom prefix\n * app.use(NumoriUI, { prefix: 'N' }) // <NButton>\n *\n * @example Delegate icons to an existing icon component\n * app.use(NumoriUI, { icons: { component: MyIcon } })\n */\nexport const NumoriUI = {\n install(app, options = {}) {\n const { prefix = DEFAULT_PREFIX, include, exclude = [], icons = {} } = options\n\n // An empty prefix is rejected rather than merely discouraged. `Button`\n // renders its root as `<component :is=\"tag\">` with `tag` defaulting to\n // `'button'`, and Vue's dynamic-component lookup capitalises before\n // matching — so a globally registered `Button` would resolve `'button'`\n // back to itself and recurse until the stack blows. The failure is a bare\n // \"Maximum call stack size exceeded\" with no hint of the cause, so it is\n // much kinder to refuse up front.\n if (typeof prefix !== 'string' || prefix.length === 0) {\n throw new Error(\n '[numori-ui] `prefix` must be a non-empty string. Registering components under their ' +\n 'bare names would make <Button> resolve its own native `button` root element, ' +\n 'recursing infinitely. Use a prefix such as \"Ui\" or \"N\".',\n )\n }\n\n if (icons.extra) registerIcons(icons.extra)\n // app-level provide, so it reaches every component including those\n // teleported out of the tree (modals, select panels).\n if (icons.component) app.provide(ICON_COMPONENT_KEY, icons.component)\n\n for (const [name, component] of Object.entries(components)) {\n if (include && !include.includes(name)) continue\n if (exclude.includes(name)) continue\n app.component(prefixed(name, prefix), component)\n }\n },\n}\n\nexport default NumoriUI\n\n/**\n * Build a Vue plugin that globally registers only the components you hand it.\n *\n * `NumoriUI` is convenient but it is not tree-shakeable: to register everything\n * it has to reference everything, so `app.use(NumoriUI)` puts all 29 components\n * in your bundle (~82 kB) whether you render them or not. The `include` option\n * does not change that — it controls registration, not bundling.\n *\n * This factory is the way to get both. You import the components you want, so\n * the bundler sees exactly that set and drops the rest, and you still get global\n * tags instead of importing them into every file.\n *\n * Keys become the registered tag names verbatim, so no prefix option is needed\n * and there is no naming magic — rename in the object literal if you want a\n * different tag.\n *\n * @param {Record<string, import('vue').Component>} components\n * Map of tag name to component, e.g. `{ UiButton, UiModal }`.\n * @param {object} [options]\n * @param {object} [options.icons] Same shape as the `NumoriUI` plugin's option.\n * @returns {import('vue').Plugin}\n *\n * @example Global tags, but only two components bundled\n * import { createNumoriUI, UiButton, UiModal } from 'numori-ui'\n *\n * app.use(createNumoriUI({ UiButton, UiModal }))\n *\n * @example Registering under different tag names\n * app.use(createNumoriUI({ NButton: UiButton, NModal: UiModal }))\n */\nexport function createNumoriUI(components = {}, options = {}) {\n const { icons = {} } = options\n\n // `UiButton` renders its root as `<component :is=\"tag\">`, and Vue capitalises\n // when resolving a dynamic component. Registering it under a name that\n // case-insensitively matches one of those tags would make it resolve itself\n // and recurse until the stack overflows, reported only as \"Maximum call stack\n // size exceeded\". Cheap to catch here, miserable to debug later.\n const DYNAMIC_TAGS = ['button', 'a', 'div', 'span', 'label', 'li']\n for (const name of Object.keys(components)) {\n if (DYNAMIC_TAGS.includes(name.toLowerCase())) {\n throw new Error(\n `[numori-ui] Cannot register a component as \"${name}\": it collides with the native <${name.toLowerCase()}> ` +\n 'element that UiButton can render as its root, which would recurse infinitely. ' +\n `Use a prefixed name such as \"Ui${name}\".`,\n )\n }\n }\n\n return {\n install(app) {\n if (icons.extra) registerIcons(icons.extra)\n if (icons.component) app.provide(ICON_COMPONENT_KEY, icons.component)\n\n for (const [name, component] of Object.entries(components)) {\n app.component(name, component)\n }\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEA,IAAa,WAAW,EACtB,QAAQ,KAAK,UAAU,CAAC,GAAG;CACzB,MAAM,EAAE,SAAA,MAAyB,SAAS,UAAU,CAAC,GAAG,QAAQ,CAAC,MAAM;CASvE,IAAI,OAAO,WAAW,YAAY,OAAO,WAAW,GAClD,MAAM,IAAI,MACR,8NAGF;CAGF,IAAI,MAAM,OAAO,cAAc,MAAM,KAAK;CAG1C,IAAI,MAAM,WAAW,IAAI,QAAQ,oBAAoB,MAAM,SAAS;CAEpE,KAAK,MAAM,CAAC,MAAM,cAAc,OAAO,QAAQ,UAAU,GAAG;EAC1D,IAAI,WAAW,CAAC,QAAQ,SAAS,IAAI,GAAG;EACxC,IAAI,QAAQ,SAAS,IAAI,GAAG;EAC5B,IAAI,UAAU,SAAS,MAAM,MAAM,GAAG,SAAS;CACjD;AACF,EACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,SAAgB,eAAe,aAAa,CAAC,GAAG,UAAU,CAAC,GAAG;CAC5D,MAAM,EAAE,QAAQ,CAAC,MAAM;CAOvB,MAAM,eAAe;EAAC;EAAU;EAAK;EAAO;EAAQ;EAAS;CAAI;CACjE,KAAK,MAAM,QAAQ,OAAO,KAAK,UAAU,GACvC,IAAI,aAAa,SAAS,KAAK,YAAY,CAAC,GAC1C,MAAM,IAAI,MACR,+CAA+C,KAAK,kCAAkC,KAAK,YAAY,EAAE,iHAErE,KAAK,GAC3C;CAIJ,OAAO,EACL,QAAQ,KAAK;EACX,IAAI,MAAM,OAAO,cAAc,MAAM,KAAK;EAC1C,IAAI,MAAM,WAAW,IAAI,QAAQ,oBAAoB,MAAM,SAAS;EAEpE,KAAK,MAAM,CAAC,MAAM,cAAc,OAAO,QAAQ,UAAU,GACvD,IAAI,UAAU,MAAM,SAAS;CAEjC,EACF;AACF"}
|
package/dist/manifest.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
//#region src/manifest.js
|
|
2
|
+
/**
|
|
3
|
+
* Component manifest — the single list of what Numori UI ships.
|
|
4
|
+
*
|
|
5
|
+
* Kept as plain data (no imports) so it can be consumed by things that must
|
|
6
|
+
* not pull Vue or any `.vue` file into their graph: the Nuxt module and the
|
|
7
|
+
* Vite plugin both run in Node at config time and only need names and paths.
|
|
8
|
+
*
|
|
9
|
+
* `src/components/index.js` holds the matching real imports for bundling. The
|
|
10
|
+
* two are cross-checked by `scripts/verify.mjs`, so a component added in one
|
|
11
|
+
* place and forgotten in the other fails the build rather than shipping
|
|
12
|
+
* half-registered.
|
|
13
|
+
*/
|
|
14
|
+
/** Default prefix for registered component names, e.g. `Ui` -> `<UiButton>`. */
|
|
15
|
+
var DEFAULT_PREFIX = "Ui";
|
|
16
|
+
/**
|
|
17
|
+
* Base names of every shipped component, without prefix or extension.
|
|
18
|
+
* Order is alphabetical, matching the files on disk.
|
|
19
|
+
* @type {string[]}
|
|
20
|
+
*/
|
|
21
|
+
var COMPONENT_NAMES = [
|
|
22
|
+
"Alert",
|
|
23
|
+
"Avatar",
|
|
24
|
+
"Badge",
|
|
25
|
+
"Button",
|
|
26
|
+
"ButtonsGroup",
|
|
27
|
+
"Checkbox",
|
|
28
|
+
"Divider",
|
|
29
|
+
"Dropdown",
|
|
30
|
+
"DropdownItem",
|
|
31
|
+
"DropdownRow",
|
|
32
|
+
"DropdownSubmenu",
|
|
33
|
+
"FileInput",
|
|
34
|
+
"FormField",
|
|
35
|
+
"Input",
|
|
36
|
+
"Kbd",
|
|
37
|
+
"ListMenu",
|
|
38
|
+
"ListMenuItem",
|
|
39
|
+
"Modal",
|
|
40
|
+
"Numpad",
|
|
41
|
+
"Popup",
|
|
42
|
+
"ProgressBar",
|
|
43
|
+
"Prompt",
|
|
44
|
+
"Radio",
|
|
45
|
+
"Select",
|
|
46
|
+
"Slider",
|
|
47
|
+
"Stepper",
|
|
48
|
+
"Toggle",
|
|
49
|
+
"Tooltip"
|
|
50
|
+
];
|
|
51
|
+
/**
|
|
52
|
+
* The icon component is listed separately: it lives outside `components/`
|
|
53
|
+
* because it is the framework seam rather than a UI primitive, and the other
|
|
54
|
+
* components import it directly by path.
|
|
55
|
+
*/
|
|
56
|
+
var ICON_COMPONENT = {
|
|
57
|
+
name: "Icon",
|
|
58
|
+
file: "icons/Icon.vue"
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Every registerable component as `{ name, file }`, where `file` is relative
|
|
62
|
+
* to `src/`. Includes the icon component.
|
|
63
|
+
* @returns {Array<{ name: string, file: string }>}
|
|
64
|
+
*/
|
|
65
|
+
function componentEntries() {
|
|
66
|
+
return [...COMPONENT_NAMES.map((name) => ({
|
|
67
|
+
name,
|
|
68
|
+
file: `components/${name}.vue`
|
|
69
|
+
})), ICON_COMPONENT];
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Apply a prefix to a base component name.
|
|
73
|
+
*
|
|
74
|
+
* The prefix must be non-empty; the entry points validate this. Registering
|
|
75
|
+
* bare names breaks `Button`, whose root is `<component :is="tag">` with `tag`
|
|
76
|
+
* defaulting to `'button'` — Vue capitalises when resolving dynamic components,
|
|
77
|
+
* so a registered `Button` would match its own root element and recurse.
|
|
78
|
+
*
|
|
79
|
+
* @param {string} name Base name, e.g. 'Button'.
|
|
80
|
+
* @param {string} [prefix=DEFAULT_PREFIX] Prefix to apply, e.g. 'Ui' or 'N'.
|
|
81
|
+
* @returns {string} e.g. 'UiButton'
|
|
82
|
+
*/
|
|
83
|
+
function prefixed(name, prefix = "Ui") {
|
|
84
|
+
return `${prefix || ""}${name}`;
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
export { COMPONENT_NAMES, DEFAULT_PREFIX, ICON_COMPONENT, componentEntries, prefixed };
|
|
88
|
+
|
|
89
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","names":[],"sources":["../src/manifest.js"],"sourcesContent":["/**\n * Component manifest — the single list of what Numori UI ships.\n *\n * Kept as plain data (no imports) so it can be consumed by things that must\n * not pull Vue or any `.vue` file into their graph: the Nuxt module and the\n * Vite plugin both run in Node at config time and only need names and paths.\n *\n * `src/components/index.js` holds the matching real imports for bundling. The\n * two are cross-checked by `scripts/verify.mjs`, so a component added in one\n * place and forgotten in the other fails the build rather than shipping\n * half-registered.\n */\n\n/** Default prefix for registered component names, e.g. `Ui` -> `<UiButton>`. */\nexport const DEFAULT_PREFIX = 'Ui'\n\n/**\n * Base names of every shipped component, without prefix or extension.\n * Order is alphabetical, matching the files on disk.\n * @type {string[]}\n */\nexport const COMPONENT_NAMES = [\n 'Alert',\n 'Avatar',\n 'Badge',\n 'Button',\n 'ButtonsGroup',\n 'Checkbox',\n 'Divider',\n 'Dropdown',\n 'DropdownItem',\n 'DropdownRow',\n 'DropdownSubmenu',\n 'FileInput',\n 'FormField',\n 'Input',\n 'Kbd',\n 'ListMenu',\n 'ListMenuItem',\n 'Modal',\n 'Numpad',\n 'Popup',\n 'ProgressBar',\n 'Prompt',\n 'Radio',\n 'Select',\n 'Slider',\n 'Stepper',\n 'Toggle',\n 'Tooltip',\n]\n\n/**\n * The icon component is listed separately: it lives outside `components/`\n * because it is the framework seam rather than a UI primitive, and the other\n * components import it directly by path.\n */\nexport const ICON_COMPONENT = { name: 'Icon', file: 'icons/Icon.vue' }\n\n/**\n * Every registerable component as `{ name, file }`, where `file` is relative\n * to `src/`. Includes the icon component.\n * @returns {Array<{ name: string, file: string }>}\n */\nexport function componentEntries() {\n return [\n ...COMPONENT_NAMES.map((name) => ({ name, file: `components/${name}.vue` })),\n ICON_COMPONENT,\n ]\n}\n\n/**\n * Apply a prefix to a base component name.\n *\n * The prefix must be non-empty; the entry points validate this. Registering\n * bare names breaks `Button`, whose root is `<component :is=\"tag\">` with `tag`\n * defaulting to `'button'` — Vue capitalises when resolving dynamic components,\n * so a registered `Button` would match its own root element and recurse.\n *\n * @param {string} name Base name, e.g. 'Button'.\n * @param {string} [prefix=DEFAULT_PREFIX] Prefix to apply, e.g. 'Ui' or 'N'.\n * @returns {string} e.g. 'UiButton'\n */\nexport function prefixed(name, prefix = DEFAULT_PREFIX) {\n return `${prefix || ''}${name}`\n}\n"],"mappings":";;;;;;;;;;;;;;AAcA,IAAa,iBAAiB;;;;;;AAO9B,IAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;AAOA,IAAa,iBAAiB;CAAE,MAAM;CAAQ,MAAM;AAAiB;;;;;;AAOrE,SAAgB,mBAAmB;CACjC,OAAO,CACL,GAAG,gBAAgB,KAAK,UAAU;EAAE;EAAM,MAAM,cAAc,KAAK;CAAM,EAAE,GAC3E,cACF;AACF;;;;;;;;;;;;;AAcA,SAAgB,SAAS,MAAM,SAAA,MAAyB;CACtD,OAAO,GAAG,UAAU,KAAK;AAC3B"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Numori UI — theme tokens (Tailwind CSS v4, CSS-first configuration)
|
|
3
|
+
*
|
|
4
|
+
* This is the design system's single source of truth. It replaces the
|
|
5
|
+
* `theme.extend` block of a Tailwind v3 `tailwind.config.js`: every custom
|
|
6
|
+
* value here is registered by Tailwind v4 as a real theme token, so it both
|
|
7
|
+
* generates utilities (`bg-primary-600`, `shadow-modal`) and is available as a
|
|
8
|
+
* plain CSS variable (`var(--color-primary-600)`).
|
|
9
|
+
*
|
|
10
|
+
* Import it AFTER `@import "tailwindcss"` in your app stylesheet — or just
|
|
11
|
+
* import `numori-ui/css`, which pulls this in and also registers the package's
|
|
12
|
+
* own template sources for class detection.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/* ------------------------------------------------------------------ *
|
|
16
|
+
* Dark mode
|
|
17
|
+
* ------------------------------------------------------------------ *
|
|
18
|
+
* Tailwind v4 dropped the `darkMode: 'class'` config key; the class-based
|
|
19
|
+
* strategy is now declared as a custom variant. Numori UI is built around a
|
|
20
|
+
* toggleable `.dark` class on <html> (what @nuxtjs/color-mode writes when
|
|
21
|
+
* `classSuffix: ''`), NOT the `prefers-color-scheme` default, so every
|
|
22
|
+
* `dark:` utility in the components resolves against that class.
|
|
23
|
+
*/
|
|
24
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
25
|
+
|
|
26
|
+
@theme {
|
|
27
|
+
/* ---------------------------------------------------------------- *
|
|
28
|
+
* Neutrals
|
|
29
|
+
* ---------------------------------------------------------------- *
|
|
30
|
+
* A warm neutral scale derived from the Numori dark palette. Dark mode
|
|
31
|
+
* uses the lower end of the scale, light mode the upper end. The 850 and
|
|
32
|
+
* 925 steps are non-standard additions: 925 is the primary dark surface
|
|
33
|
+
* and 850 sits between the background and its first dimmed step.
|
|
34
|
+
*
|
|
35
|
+
* Tailwind v4 ships its own `gray`; these declarations replace those
|
|
36
|
+
* tokens outright so `bg-gray-800` means the Numori neutral, not Tailwind's.
|
|
37
|
+
*/
|
|
38
|
+
--color-gray-50: #fcfcfa; /* foreground */
|
|
39
|
+
--color-gray-100: #f5f4f2;
|
|
40
|
+
--color-gray-200: #e8e6e3;
|
|
41
|
+
--color-gray-300: #c1c0c0; /* dimmed 1 */
|
|
42
|
+
--color-gray-400: #939293; /* dimmed 2 */
|
|
43
|
+
--color-gray-500: #727072; /* dimmed 3 */
|
|
44
|
+
--color-gray-600: #5b595c; /* dimmed 4 */
|
|
45
|
+
--color-gray-700: #403e41; /* dimmed 5 */
|
|
46
|
+
--color-gray-800: #2d2a2e; /* background (elevated surface in dark) */
|
|
47
|
+
--color-gray-850: #272428; /* between bg and bg-dimmed-1 */
|
|
48
|
+
--color-gray-900: #221f22; /* bg dimmed 1 */
|
|
49
|
+
--color-gray-925: #2d2a2e; /* main dark bg — the primary surface */
|
|
50
|
+
--color-gray-950: #19181a; /* bg dimmed 2 (deepest) */
|
|
51
|
+
|
|
52
|
+
/* ---------------------------------------------------------------- *
|
|
53
|
+
* Primary accent
|
|
54
|
+
* ---------------------------------------------------------------- *
|
|
55
|
+
* The pink/rose keyword colour from the Numori syntax palette (400),
|
|
56
|
+
* extended into a full interactive scale.
|
|
57
|
+
*/
|
|
58
|
+
--color-primary-50: #fff0f3;
|
|
59
|
+
--color-primary-100: #ffd9e1;
|
|
60
|
+
--color-primary-200: #ffb3c4;
|
|
61
|
+
--color-primary-300: #ff8da8;
|
|
62
|
+
--color-primary-400: #ff6188; /* keyword colour — the hero accent */
|
|
63
|
+
--color-primary-500: #e8456e;
|
|
64
|
+
--color-primary-600: #cc2d56;
|
|
65
|
+
--color-primary-700: #a61e42;
|
|
66
|
+
--color-primary-800: #801530;
|
|
67
|
+
--color-primary-900: #5c0e22;
|
|
68
|
+
--color-primary-950: #3a0715;
|
|
69
|
+
|
|
70
|
+
/* Success — built out from the palette's function colour (300). */
|
|
71
|
+
--color-success-50: #f0fdf4;
|
|
72
|
+
--color-success-100: #dcfce7;
|
|
73
|
+
--color-success-200: #bbf7d0;
|
|
74
|
+
--color-success-300: #a9dc76; /* function colour */
|
|
75
|
+
--color-success-400: #86c95a;
|
|
76
|
+
--color-success-500: #6bb33e;
|
|
77
|
+
--color-success-600: #539a2a;
|
|
78
|
+
--color-success-700: #3d7a1c;
|
|
79
|
+
--color-success-800: #2d5e14;
|
|
80
|
+
--color-success-900: #1f420e;
|
|
81
|
+
--color-success-950: #122808;
|
|
82
|
+
|
|
83
|
+
/* Warning — built out from the palette's string colour (300). */
|
|
84
|
+
--color-warning-50: #fffbeb;
|
|
85
|
+
--color-warning-100: #fff3c4;
|
|
86
|
+
--color-warning-200: #ffe68a;
|
|
87
|
+
--color-warning-300: #ffd866; /* string colour */
|
|
88
|
+
--color-warning-400: #fcc73e;
|
|
89
|
+
--color-warning-500: #f0b429;
|
|
90
|
+
--color-warning-600: #d99a06;
|
|
91
|
+
--color-warning-700: #b47d04;
|
|
92
|
+
--color-warning-800: #8c6103;
|
|
93
|
+
--color-warning-900: #664702;
|
|
94
|
+
--color-warning-950: #402d01;
|
|
95
|
+
|
|
96
|
+
/* Error — kept on Tailwind's red ramp for familiarity. */
|
|
97
|
+
--color-error-50: #fef2f2;
|
|
98
|
+
--color-error-100: #fee2e2;
|
|
99
|
+
--color-error-200: #fecaca;
|
|
100
|
+
--color-error-300: #fca5a5;
|
|
101
|
+
--color-error-400: #f87171;
|
|
102
|
+
--color-error-500: #ef4444;
|
|
103
|
+
--color-error-600: #dc2626;
|
|
104
|
+
--color-error-700: #b91c1c;
|
|
105
|
+
--color-error-800: #991b1b;
|
|
106
|
+
--color-error-900: #7f1d1d;
|
|
107
|
+
--color-error-950: #450a0a;
|
|
108
|
+
|
|
109
|
+
/* ---------------------------------------------------------------- *
|
|
110
|
+
* Typography
|
|
111
|
+
* ---------------------------------------------------------------- */
|
|
112
|
+
--font-sans: Inter, system-ui, sans-serif;
|
|
113
|
+
|
|
114
|
+
/* ---------------------------------------------------------------- *
|
|
115
|
+
* Spacing additions
|
|
116
|
+
* ---------------------------------------------------------------- *
|
|
117
|
+
* v4 derives spacing from --spacing, so only the non-multiples of the
|
|
118
|
+
* base step need declaring explicitly.
|
|
119
|
+
*/
|
|
120
|
+
--spacing-18: 4.5rem;
|
|
121
|
+
--spacing-88: 22rem;
|
|
122
|
+
|
|
123
|
+
/* ---------------------------------------------------------------- *
|
|
124
|
+
* Radii — larger than Tailwind's defaults for these two steps.
|
|
125
|
+
* ---------------------------------------------------------------- */
|
|
126
|
+
--radius-xl: 1rem;
|
|
127
|
+
--radius-2xl: 1.5rem;
|
|
128
|
+
|
|
129
|
+
/* ---------------------------------------------------------------- *
|
|
130
|
+
* Elevation
|
|
131
|
+
* ---------------------------------------------------------------- */
|
|
132
|
+
--shadow-card: 0 1px 3px rgb(0 0 0 / 0.06), 0 1px 2px rgb(0 0 0 / 0.04);
|
|
133
|
+
--shadow-card-hover: 0 4px 12px rgb(0 0 0 / 0.08);
|
|
134
|
+
--shadow-modal: 0 20px 60px rgb(0 0 0 / 0.25), 0 0 0 1px rgb(0 0 0 / 0.05);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* ------------------------------------------------------------------ *
|
|
138
|
+
* Component CSS
|
|
139
|
+
* ------------------------------------------------------------------ *
|
|
140
|
+
* Everything else in Numori UI is expressed as utility classes, but these
|
|
141
|
+
* rules cannot be: `env(safe-area-inset-*)` has no utility equivalent, and the
|
|
142
|
+
* modal override needs `!important` to beat the panel's own max-height on
|
|
143
|
+
* small viewports.
|
|
144
|
+
*
|
|
145
|
+
* They live here rather than in a `<style scoped>` block inside Modal.vue on
|
|
146
|
+
* purpose. Numori UI is consumed both as source (Nuxt module, Vite plugin —
|
|
147
|
+
* the host compiles the SFCs) and as a prebuilt bundle. A scoped block would
|
|
148
|
+
* be compiled into the components on one path and emitted as a *second*
|
|
149
|
+
* stylesheet on the other, so consumers would have one CSS import to make in
|
|
150
|
+
* some setups and two in others. Keeping these rules in the single shipped
|
|
151
|
+
* stylesheet means `@import "numori-ui/css"` is always the whole story.
|
|
152
|
+
*
|
|
153
|
+
* Scoping is unnecessary anyway: both class names are applied by Modal.vue and
|
|
154
|
+
* namespaced to it.
|
|
155
|
+
*/
|
|
156
|
+
@media (max-width: 767px) {
|
|
157
|
+
/* Fullscreen-on-mobile panels fill the viewport regardless of any
|
|
158
|
+
* max-height a caller set for larger screens. */
|
|
159
|
+
.modal-panel {
|
|
160
|
+
max-height: 100% !important;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/* Keeps content clear of notches, home indicators and rounded corners when
|
|
164
|
+
* the panel is edge-to-edge. Applied by Modal.vue only in its
|
|
165
|
+
* fullscreen-mobile layout. */
|
|
166
|
+
.modal-panel--safe-area {
|
|
167
|
+
padding-top: env(safe-area-inset-top);
|
|
168
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
169
|
+
padding-left: env(safe-area-inset-left);
|
|
170
|
+
padding-right: env(safe-area-inset-right);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* ------------------------------------------------------------------ *
|
|
175
|
+
* Template sources
|
|
176
|
+
* ------------------------------------------------------------------ *
|
|
177
|
+
* Tailwind skips node_modules during automatic content detection, so a
|
|
178
|
+
* package has to declare its own templates or none of the utilities its
|
|
179
|
+
* components rely on would be generated in the consuming app's build.
|
|
180
|
+
* Paths are relative to this file (dist/) and point at the shipped src/.
|
|
181
|
+
* Only .vue files can contain classes, so the globs stay narrow.
|
|
182
|
+
*/
|
|
183
|
+
@source "../src/components/**/*.vue";
|
|
184
|
+
@source "../src/icons/**/*.vue";
|
package/dist/nuxt.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { NuxtModule } from '@nuxt/schema'
|
|
2
|
+
|
|
3
|
+
export interface NumoriUINuxtOptions {
|
|
4
|
+
/** Prefix for auto-registered component names. Default `'Ui'`. */
|
|
5
|
+
prefix?: string
|
|
6
|
+
/** Register only these base names. `null` registers all. */
|
|
7
|
+
include?: string[] | null
|
|
8
|
+
/** Skip these base names. */
|
|
9
|
+
exclude?: string[]
|
|
10
|
+
/** Auto-import the library's composables. Default `true`. */
|
|
11
|
+
composables?: boolean
|
|
12
|
+
/** Register @tailwindcss/vite and a themed base stylesheet. Default `false`. */
|
|
13
|
+
tailwind?: boolean
|
|
14
|
+
icons?: {
|
|
15
|
+
/** Name of a globally registered component to render icons with. */
|
|
16
|
+
component?: string | null
|
|
17
|
+
/** Extra icon path data, keyed by name. */
|
|
18
|
+
extra?: Record<string, string> | null
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare const module: NuxtModule<NumoriUINuxtOptions>
|
|
23
|
+
export default module
|
|
24
|
+
|
|
25
|
+
declare module '@nuxt/schema' {
|
|
26
|
+
interface NuxtConfig {
|
|
27
|
+
numoriUi?: NumoriUINuxtOptions
|
|
28
|
+
}
|
|
29
|
+
interface NuxtOptions {
|
|
30
|
+
numoriUi?: NumoriUINuxtOptions
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export declare const COMPONENT_NAMES: string[]
|
|
35
|
+
export declare const DEFAULT_PREFIX: string
|