numori-ui 0.2.0 → 0.4.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/CHANGELOG.md +122 -0
- package/README.md +26 -21
- package/dist/components/Banner.js +176 -0
- package/dist/components/Banner.js.map +1 -0
- package/dist/components/Button.js +10 -19
- package/dist/components/Button.js.map +1 -1
- package/dist/components/Card.js +15 -9
- package/dist/components/Card.js.map +1 -1
- package/dist/components/Checkbox.js +2 -7
- package/dist/components/Checkbox.js.map +1 -1
- package/dist/components/CodeBlock.js +101 -0
- package/dist/components/CodeBlock.js.map +1 -0
- package/dist/components/Dropdown.js +10 -3
- package/dist/components/Dropdown.js.map +1 -1
- package/dist/components/DropdownSubmenu.js +5 -3
- package/dist/components/DropdownSubmenu.js.map +1 -1
- package/dist/components/FileInput.js +12 -4
- package/dist/components/FileInput.js.map +1 -1
- package/dist/components/IconTile.js +5 -9
- package/dist/components/IconTile.js.map +1 -1
- package/dist/components/Input.js +6 -6
- package/dist/components/Input.js.map +1 -1
- package/dist/components/ListMenuItem.js +38 -31
- package/dist/components/ListMenuItem.js.map +1 -1
- package/dist/components/Numpad.js +4 -4
- package/dist/components/Numpad.js.map +1 -1
- package/dist/components/Popup.js +9 -3
- package/dist/components/Popup.js.map +1 -1
- package/dist/components/Radio.js +2 -7
- package/dist/components/Radio.js.map +1 -1
- package/dist/components/Segmented.js +100 -26
- package/dist/components/Segmented.js.map +1 -1
- package/dist/components/Select.js +6 -4
- package/dist/components/Select.js.map +1 -1
- package/dist/components/Spinner.js +87 -0
- package/dist/components/Spinner.js.map +1 -0
- package/dist/components/Table.js +174 -0
- package/dist/components/Table.js.map +1 -0
- package/dist/components/ThemeToggle.js +85 -0
- package/dist/components/ThemeToggle.js.map +1 -0
- package/dist/components/Toast.js +107 -0
- package/dist/components/Toast.js.map +1 -0
- package/dist/components/index.js +67 -57
- package/dist/components/index.js.map +1 -1
- package/dist/composables/useMergedClasses.js +52 -0
- package/dist/composables/useMergedClasses.js.map +1 -0
- package/dist/icons/mdi.js +10 -0
- package/dist/icons/mdi.js.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +35 -30
- package/dist/index.js.map +1 -1
- package/dist/internal/controlSizes.js +21 -0
- package/dist/internal/controlSizes.js.map +1 -0
- package/dist/internal/menu.js +20 -0
- package/dist/internal/menu.js.map +1 -0
- package/dist/manifest.js +6 -1
- package/dist/manifest.js.map +1 -1
- package/package.json +2 -1
- package/src/components/Banner.vue +160 -0
- package/src/components/Button.vue +12 -19
- package/src/components/Card.vue +11 -12
- package/src/components/Checkbox.vue +2 -10
- package/src/components/CodeBlock.vue +99 -0
- package/src/components/Dropdown.vue +14 -2
- package/src/components/DropdownSubmenu.vue +4 -2
- package/src/components/FileInput.vue +19 -4
- package/src/components/IconTile.vue +4 -9
- package/src/components/Input.vue +6 -6
- package/src/components/ListMenuItem.vue +21 -5
- package/src/components/Numpad.vue +7 -4
- package/src/components/Popup.vue +6 -2
- package/src/components/Radio.vue +2 -10
- package/src/components/Segmented.vue +108 -38
- package/src/components/Select.vue +11 -2
- package/src/components/Spinner.vue +70 -0
- package/src/components/Table.vue +193 -0
- package/src/components/ThemeToggle.vue +81 -0
- package/src/components/Toast.vue +106 -0
- package/src/components/index.js +18 -3
- package/src/composables/useMergedClasses.js +49 -0
- package/src/icons/mdi.js +10 -0
- package/src/internal/controlSizes.js +17 -0
- package/src/internal/menu.js +16 -0
- package/src/manifest.js +6 -1
- package/dist/components/ButtonsGroup.js +0 -153
- package/dist/components/ButtonsGroup.js.map +0 -1
- package/src/components/ButtonsGroup.vue +0 -140
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMergedClasses.js","names":[],"sources":["../../src/composables/useMergedClasses.js"],"sourcesContent":["import { computed, useAttrs, toValue } from 'vue'\nimport { twMerge } from 'tailwind-merge'\n\n/**\n * useMergedClasses — merge a component's internal Tailwind classes with the\n * caller's `class`, letting the caller win, and split the remaining attributes\n * off for forwarding.\n *\n * This is the shared half of the \"external classes override internals\" pattern\n * that UiButton, UiCard and UiIconTile all implement identically: bind\n * `mergedClasses` to the root element's `:class`, spread `restAttrs` onto it\n * with `v-bind`, and declare `defineOptions({ inheritAttrs: false })` in the\n * component so Vue does not also apply `class` a second time.\n *\n * `tailwind-merge` resolves conflicts by keeping the last occurrence, and the\n * caller's `class` is always passed last — so `bg-gray-100` from the outside\n * beats a built-in `bg-primary-600` rather than both landing on the element.\n * Passing the internal classes as one space-joined string is equivalent to\n * passing them as separate arguments; twMerge tokenises either the same way.\n *\n * `defineOptions` is a compiler macro and cannot live in a composable, so each\n * consuming SFC still declares `inheritAttrs: false` itself. Everything else —\n * `useAttrs`, the class/rest split, and the merge — lives here.\n *\n * @param {import('vue').MaybeRefOrGetter<string>} internal\n * The component's own classes, as a ref, getter, or plain string. A getter is\n * the safest form when the internal classes are a `computed` declared later\n * in setup, since it defers evaluation past that declaration.\n * @returns {{ mergedClasses: import('vue').ComputedRef<string>, restAttrs: import('vue').ComputedRef<Record<string, unknown>> }}\n * `mergedClasses` for the root `:class`; `restAttrs` (everything except\n * `class`) for `v-bind`.\n *\n * @example\n * defineOptions({ inheritAttrs: false })\n * const internal = computed(() => `inline-flex ${sizeClass.value} ${colorClass.value}`)\n * const { mergedClasses, restAttrs } = useMergedClasses(internal)\n */\nexport function useMergedClasses(internal) {\n const attrs = useAttrs()\n\n const restAttrs = computed(() => {\n const { class: _class, ...rest } = attrs\n return rest\n })\n\n const mergedClasses = computed(() => twMerge(toValue(internal), attrs.class))\n\n return { mergedClasses, restAttrs }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAgB,iBAAiB,UAAU;CACzC,MAAM,QAAQ,SAAS;CAEvB,MAAM,YAAY,eAAe;EAC/B,MAAM,EAAE,OAAO,QAAQ,GAAG,SAAS;EACnC,OAAO;CACT,CAAC;CAID,OAAO;EAAE,eAFa,eAAe,QAAQ,QAAQ,QAAQ,GAAG,MAAM,KAAK,CAEtD;EAAG;CAAU;AACpC"}
|
package/dist/icons/mdi.js
CHANGED
|
@@ -24,13 +24,16 @@ var mdiPaths = {
|
|
|
24
24
|
"check": "M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z",
|
|
25
25
|
"check-circle": "M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10s10-4.5 10-10S17.5 2 12 2m-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8z",
|
|
26
26
|
"chevron-down": "M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z",
|
|
27
|
+
"chevron-left": "M15.41 16.58L10.83 12l4.58-4.59L14 6l-6 6l6 6z",
|
|
27
28
|
"chevron-right": "M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z",
|
|
28
29
|
"chevron-up": "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z",
|
|
29
30
|
"close": "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z",
|
|
30
31
|
"close-circle": "M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12S6.47 2 12 2m3.59 5L12 10.59L8.41 7L7 8.41L10.59 12L7 15.59L8.41 17L12 13.41L15.59 17L17 15.59L13.41 12L17 8.41z",
|
|
32
|
+
"content-copy": "M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12z",
|
|
31
33
|
"delete": "M19 4h-3.5l-1-1h-5l-1 1H5v2h14M6 19a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7H6z",
|
|
32
34
|
"dots-vertical": "M12 16a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2",
|
|
33
35
|
"email": "m20 8l-8 5l-8-5V6l8 5l8-5m0-2H4c-1.11 0-2 .89-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2",
|
|
36
|
+
"email-alert-outline": "M24 7h-2v6h2zm0 8h-2v2h2zm-4-9c0-1.1-.9-2-2-2H2C.9 4 0 4.9 0 6v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2zm-2 0l-8 5l-8-5zm0 12H2V8l8 5l8-5z",
|
|
34
37
|
"eraser": "m16.24 3.56l4.95 4.94c.78.79.78 2.05 0 2.84L12 20.53a4.01 4.01 0 0 1-5.66 0L2.81 17c-.78-.79-.78-2.05 0-2.84l10.6-10.6c.79-.78 2.05-.78 2.83 0M4.22 15.58l3.54 3.53c.78.79 2.04.79 2.83 0l3.53-3.53l-4.95-4.95z",
|
|
35
38
|
"eye-off-outline": "M2 5.27L3.28 4L20 20.72L18.73 22l-3.08-3.08c-1.15.38-2.37.58-3.65.58c-5 0-9.27-3.11-11-7.5c.69-1.76 1.79-3.31 3.19-4.54zM12 9a3 3 0 0 1 3 3a3 3 0 0 1-.17 1L11 9.17A3 3 0 0 1 12 9m0-4.5c5 0 9.27 3.11 11 7.5a11.8 11.8 0 0 1-4 5.19l-1.42-1.43A9.86 9.86 0 0 0 20.82 12A9.82 9.82 0 0 0 12 6.5c-1.09 0-2.16.18-3.16.5L7.3 5.47c1.44-.62 3.03-.97 4.7-.97M3.18 12A9.82 9.82 0 0 0 12 17.5c.69 0 1.37-.07 2-.21L11.72 15A3.064 3.064 0 0 1 9 12.28L5.6 8.87c-.99.85-1.82 1.91-2.42 3.13",
|
|
36
39
|
"eye-outline": "M12 9a3 3 0 0 1 3 3a3 3 0 0 1-3 3a3 3 0 0 1-3-3a3 3 0 0 1 3-3m0-4.5c5 0 9.27 3.11 11 7.5c-1.73 4.39-6 7.5-11 7.5S2.73 16.39 1 12c1.73-4.39 6-7.5 11-7.5M3.18 12a9.821 9.821 0 0 0 17.64 0a9.821 9.821 0 0 0-17.64 0",
|
|
@@ -42,15 +45,22 @@ var mdiPaths = {
|
|
|
42
45
|
"lock": "M12 17a2 2 0 0 0 2-2a2 2 0 0 0-2-2a2 2 0 0 0-2 2a2 2 0 0 0 2 2m6-9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2h1V6a5 5 0 0 1 5-5a5 5 0 0 1 5 5v2zm-6-5a3 3 0 0 0-3 3v2h6V6a3 3 0 0 0-3-3",
|
|
43
46
|
"logout": "m17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5M4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z",
|
|
44
47
|
"minus": "M19 13H5v-2h14z",
|
|
48
|
+
"minus-circle-outline": "M12 20c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2M7 13h10v-2H7",
|
|
49
|
+
"note-text-outline": "M15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9zm4 16H5V5h9v5h5m-2 4H7v-2h10m-3 5H7v-2h7",
|
|
45
50
|
"pen": "M20.71 7.04c-.34.34-.67.67-.68 1c-.03.32.31.65.63.96c.48.5.95.95.93 1.44s-.53 1-1.04 1.5l-4.13 4.14L15 14.66l4.25-4.24l-.96-.96l-1.42 1.41l-3.75-3.75l3.84-3.83c.39-.39 1.04-.39 1.41 0l2.34 2.34c.39.37.39 1.02 0 1.41M3 17.25l9.56-9.57l3.75 3.75L6.75 21H3z",
|
|
46
51
|
"pencil": "M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83l3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75z",
|
|
47
52
|
"plus": "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z",
|
|
48
53
|
"share": "m21 12l-7-7v4C7 10 4 15 3 20c2.5-3.5 6-5.1 11-5.1V19z",
|
|
54
|
+
"shield-lock-outline": "M21 11c0 5.55-3.84 10.74-9 12c-5.16-1.26-9-6.45-9-12V5l9-4l9 4zm-9 10c3.75-1 7-5.46 7-9.78V6.3l-7-3.12L5 6.3v4.92C5 15.54 8.25 20 12 21m2.8-10V9.5C14.8 8.1 13.4 7 12 7S9.2 8.1 9.2 9.5V11c-.6 0-1.2.6-1.2 1.2v3.5c0 .7.6 1.3 1.2 1.3h5.5c.7 0 1.3-.6 1.3-1.2v-3.5c0-.7-.6-1.3-1.2-1.3m-1.3 0h-3V9.5c0-.8.7-1.3 1.5-1.3s1.5.5 1.5 1.3z",
|
|
55
|
+
"sync": "M12 18a6 6 0 0 1-6-6c0-1 .25-1.97.7-2.8L5.24 7.74A7.93 7.93 0 0 0 4 12a8 8 0 0 0 8 8v3l4-4l-4-4m0-11V1L8 5l4 4V6a6 6 0 0 1 6 6c0 1-.25 1.97-.7 2.8l1.46 1.46A7.93 7.93 0 0 0 20 12a8 8 0 0 0-8-8",
|
|
49
56
|
"translate": "m12.87 15.07l-2.54-2.51l.03-.03A17.5 17.5 0 0 0 14.07 6H17V4h-7V2H8v2H1v2h11.17C11.5 7.92 10.44 9.75 9 11.35C8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5l3.11 3.11zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2zm-2.62 7l1.62-4.33L19.12 17z",
|
|
50
57
|
"trash-can": "M9 3v1H4v2h1v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6h1V4h-5V3zm0 5h2v9H9zm4 0h2v9h-2z",
|
|
51
58
|
"trash-can-outline": "M9 3v1H4v2h1v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6h1V4h-5V3zM7 6h10v13H7zm2 2v9h2V8zm4 0v9h2V8z",
|
|
52
59
|
"view-grid": "M3 11h8V3H3m0 18h8v-8H3m10 8h8v-8h-8m0-10v8h8V3",
|
|
53
60
|
"view-list": "M9 5v4h12V5M9 19h12v-4H9m0-1h12v-4H9M4 9h4V5H4m0 14h4v-4H4m0-1h4v-4H4z",
|
|
61
|
+
"weather-night": "m17.75 4.09l-2.53 1.94l.91 3.06l-2.63-1.81l-2.63 1.81l.91-3.06l-2.53-1.94L12.44 4l1.06-3l1.06 3zm3.5 6.91l-1.64 1.25l.59 1.98l-1.7-1.17l-1.7 1.17l.59-1.98L15.75 11l2.06-.05L18.5 9l.69 1.95zm-2.28 4.95c.83-.08 1.72 1.1 1.19 1.85c-.32.45-.66.87-1.08 1.27C15.17 23 8.84 23 4.94 19.07c-3.91-3.9-3.91-10.24 0-14.14c.4-.4.82-.76 1.27-1.08c.75-.53 1.93.36 1.85 1.19c-.27 2.86.69 5.83 2.89 8.02a9.96 9.96 0 0 0 8.02 2.89m-1.64 2.02a12.08 12.08 0 0 1-7.8-3.47c-2.17-2.19-3.33-5-3.49-7.82c-2.81 3.14-2.7 7.96.31 10.98c3.02 3.01 7.84 3.12 10.98.31",
|
|
62
|
+
"weather-sunny": "M12 7a5 5 0 0 1 5 5a5 5 0 0 1-5 5a5 5 0 0 1-5-5a5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3a3 3 0 0 0 3 3a3 3 0 0 0 3-3a3 3 0 0 0-3-3m0-7l2.39 3.42C13.65 5.15 12.84 5 12 5s-1.65.15-2.39.42zM3.34 7l4.16-.35A7.2 7.2 0 0 0 5.94 8.5c-.44.74-.69 1.5-.83 2.29zm.02 10l1.76-3.77a7.13 7.13 0 0 0 2.38 4.14zM20.65 7l-1.77 3.79a7.02 7.02 0 0 0-2.38-4.15zm-.01 10l-4.14.36c.59-.51 1.12-1.14 1.54-1.86c.42-.73.69-1.5.83-2.29zM12 22l-2.41-3.44c.74.27 1.55.44 2.41.44c.82 0 1.63-.17 2.37-.44z",
|
|
63
|
+
"wifi-off": "M2.28 3L1 4.27l1.47 1.47c-.43.26-.86.55-1.27.86L3 9c.53-.4 1.08-.75 1.66-1.07l2.23 2.23c-.74.34-1.45.75-2.09 1.24l1.8 2.4c.78-.58 1.66-1.03 2.6-1.33L11.75 15c-1.25.07-2.41.5-3.35 1.2L12 21l2.46-3.27L17.74 21L19 19.72M12 3c-2.15 0-4.2.38-6.1 1.07l2.39 2.4C9.5 6.16 10.72 6 12 6c3.38 0 6.5 1.11 9 3l1.8-2.4C19.79 4.34 16.06 3 12 3m0 6c-.38 0-.75 0-1.12.05l3.19 3.2c1.22.28 2.36.82 3.33 1.55l1.8-2.4C17.2 9.89 14.7 9 12 9",
|
|
54
64
|
"wrap": "M21 5H3v2h18zM3 19h7v-2H3zm0-6h15c1 0 2 .43 2 2s-1 2-2 2h-2v-2l-4 3l4 3v-2h2c2.95 0 4-1.27 4-4c0-2.72-1-4-4-4H3z"
|
|
55
65
|
};
|
|
56
66
|
/**
|
package/dist/icons/mdi.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mdi.js","names":[],"sources":["../../src/icons/mdi.js"],"sourcesContent":["/**\n * GENERATED FILE — do not edit by hand.\n * Regenerate with: npm run icons\n *\n * Inline path data for the Material Design Icons used by Numori UI, keyed by\n * icon name without the `mdi:` prefix. All paths are drawn on a 24x24 grid\n * and filled with `currentColor`.\n *\n * Material Design Icons — https://pictogrammers.com/library/mdi/\n * Copyright (c) Austin Andrews and contributors, licensed under Apache-2.0:\n * https://github.com/Templarian/MaterialDesign/blob/master/LICENSE\n * Icon data sourced from @iconify-json/mdi.\n */\n\n/** Shared viewBox for every icon in this set. */\nexport const MDI_VIEW_BOX = '0 0 24 24'\n\n/** @type {Record<string, string>} */\nexport const mdiPaths = {\n 'account': \"M12 4a4 4 0 0 1 4 4a4 4 0 0 1-4 4a4 4 0 0 1-4-4a4 4 0 0 1 4-4m0 10c4.42 0 8 1.79 8 4v2H4v-2c0-2.21 3.58-4 8-4\",\n 'account-group': \"M12 5.5A3.5 3.5 0 0 1 15.5 9a3.5 3.5 0 0 1-3.5 3.5A3.5 3.5 0 0 1 8.5 9A3.5 3.5 0 0 1 12 5.5M5 8c.56 0 1.08.15 1.53.42c-.15 1.43.27 2.85 1.13 3.96C7.16 13.34 6.16 14 5 14a3 3 0 0 1-3-3a3 3 0 0 1 3-3m14 0a3 3 0 0 1 3 3a3 3 0 0 1-3 3c-1.16 0-2.16-.66-2.66-1.62a5.54 5.54 0 0 0 1.13-3.96c.45-.27.97-.42 1.53-.42M5.5 18.25c0-2.07 2.91-3.75 6.5-3.75s6.5 1.68 6.5 3.75V20h-13zM0 20v-1.5c0-1.39 1.89-2.56 4.45-2.9c-.59.68-.95 1.62-.95 2.65V20zm24 0h-3.5v-1.75c0-1.03-.36-1.97-.95-2.65c2.56.34 4.45 1.51 4.45 2.9z\",\n 'alert-circle': \"M13 13h-2V7h2m0 10h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2\",\n 'alert-outline': \"M12 2L1 21h22M12 6l7.53 13H4.47M11 10v4h2v-4m-2 6v2h2v-2\",\n 'backspace-outline': \"M19 15.59L17.59 17L14 13.41L10.41 17L9 15.59L12.59 12L9 8.41L10.41 7L14 10.59L17.59 7L19 8.41L15.41 12zM22 3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H7c-.69 0-1.23-.36-1.59-.89L0 12l5.41-8.12C5.77 3.35 6.31 3 7 3zm0 2H7l-4.72 7L7 19h15z\",\n 'check': \"M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z\",\n 'check-circle': \"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10s10-4.5 10-10S17.5 2 12 2m-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8z\",\n 'chevron-down': \"M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z\",\n 'chevron-right': \"M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z\",\n 'chevron-up': \"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z\",\n 'close': \"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z\",\n 'close-circle': \"M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12S6.47 2 12 2m3.59 5L12 10.59L8.41 7L7 8.41L10.59 12L7 15.59L8.41 17L12 13.41L15.59 17L17 15.59L13.41 12L17 8.41z\",\n 'delete': \"M19 4h-3.5l-1-1h-5l-1 1H5v2h14M6 19a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7H6z\",\n 'dots-vertical': \"M12 16a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2\",\n 'email': \"m20 8l-8 5l-8-5V6l8 5l8-5m0-2H4c-1.11 0-2 .89-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2\",\n 'eraser': \"m16.24 3.56l4.95 4.94c.78.79.78 2.05 0 2.84L12 20.53a4.01 4.01 0 0 1-5.66 0L2.81 17c-.78-.79-.78-2.05 0-2.84l10.6-10.6c.79-.78 2.05-.78 2.83 0M4.22 15.58l3.54 3.53c.78.79 2.04.79 2.83 0l3.53-3.53l-4.95-4.95z\",\n 'eye-off-outline': \"M2 5.27L3.28 4L20 20.72L18.73 22l-3.08-3.08c-1.15.38-2.37.58-3.65.58c-5 0-9.27-3.11-11-7.5c.69-1.76 1.79-3.31 3.19-4.54zM12 9a3 3 0 0 1 3 3a3 3 0 0 1-.17 1L11 9.17A3 3 0 0 1 12 9m0-4.5c5 0 9.27 3.11 11 7.5a11.8 11.8 0 0 1-4 5.19l-1.42-1.43A9.86 9.86 0 0 0 20.82 12A9.82 9.82 0 0 0 12 6.5c-1.09 0-2.16.18-3.16.5L7.3 5.47c1.44-.62 3.03-.97 4.7-.97M3.18 12A9.82 9.82 0 0 0 12 17.5c.69 0 1.37-.07 2-.21L11.72 15A3.064 3.064 0 0 1 9 12.28L5.6 8.87c-.99.85-1.82 1.91-2.42 3.13\",\n 'eye-outline': \"M12 9a3 3 0 0 1 3 3a3 3 0 0 1-3 3a3 3 0 0 1-3-3a3 3 0 0 1 3-3m0-4.5c5 0 9.27 3.11 11 7.5c-1.73 4.39-6 7.5-11 7.5S2.73 16.39 1 12c1.73-4.39 6-7.5 11-7.5M3.18 12a9.821 9.821 0 0 0 17.64 0a9.821 9.821 0 0 0-17.64 0\",\n 'format-bold': \"M13.5 15.5H10v-3h3.5A1.5 1.5 0 0 1 15 14a1.5 1.5 0 0 1-1.5 1.5m-3.5-9h3A1.5 1.5 0 0 1 14.5 8A1.5 1.5 0 0 1 13 9.5h-3m5.6 1.29c.97-.68 1.65-1.79 1.65-2.79c0-2.26-1.75-4-4-4H7v14h7.04c2.1 0 3.71-1.7 3.71-3.79c0-1.52-.86-2.82-2.15-3.42\",\n 'format-italic': \"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z\",\n 'format-text': \"m18.5 4l1.16 4.35l-.96.26c-.45-.87-.91-1.74-1.44-2.18C16.73 6 16.11 6 15.5 6H13v10.5c0 .5 0 1 .33 1.25c.34.25 1 .25 1.67.25v1H9v-1c.67 0 1.33 0 1.67-.25c.33-.25.33-.75.33-1.25V6H8.5c-.61 0-1.23 0-1.76.43c-.53.44-.99 1.31-1.44 2.18l-.96-.26L5.5 4z\",\n 'information': \"M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2\",\n 'loading': \"M12 4V2A10 10 0 0 0 2 12h2a8 8 0 0 1 8-8\",\n 'lock': \"M12 17a2 2 0 0 0 2-2a2 2 0 0 0-2-2a2 2 0 0 0-2 2a2 2 0 0 0 2 2m6-9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2h1V6a5 5 0 0 1 5-5a5 5 0 0 1 5 5v2zm-6-5a3 3 0 0 0-3 3v2h6V6a3 3 0 0 0-3-3\",\n 'logout': \"m17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5M4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z\",\n 'minus': \"M19 13H5v-2h14z\",\n 'pen': \"M20.71 7.04c-.34.34-.67.67-.68 1c-.03.32.31.65.63.96c.48.5.95.95.93 1.44s-.53 1-1.04 1.5l-4.13 4.14L15 14.66l4.25-4.24l-.96-.96l-1.42 1.41l-3.75-3.75l3.84-3.83c.39-.39 1.04-.39 1.41 0l2.34 2.34c.39.37.39 1.02 0 1.41M3 17.25l9.56-9.57l3.75 3.75L6.75 21H3z\",\n 'pencil': \"M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83l3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75z\",\n 'plus': \"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z\",\n 'share': \"m21 12l-7-7v4C7 10 4 15 3 20c2.5-3.5 6-5.1 11-5.1V19z\",\n 'translate': \"m12.87 15.07l-2.54-2.51l.03-.03A17.5 17.5 0 0 0 14.07 6H17V4h-7V2H8v2H1v2h11.17C11.5 7.92 10.44 9.75 9 11.35C8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5l3.11 3.11zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2zm-2.62 7l1.62-4.33L19.12 17z\",\n 'trash-can': \"M9 3v1H4v2h1v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6h1V4h-5V3zm0 5h2v9H9zm4 0h2v9h-2z\",\n 'trash-can-outline': \"M9 3v1H4v2h1v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6h1V4h-5V3zM7 6h10v13H7zm2 2v9h2V8zm4 0v9h2V8z\",\n 'view-grid': \"M3 11h8V3H3m0 18h8v-8H3m10 8h8v-8h-8m0-10v8h8V3\",\n 'view-list': \"M9 5v4h12V5M9 19h12v-4H9m0-1h12v-4H9M4 9h4V5H4m0 14h4v-4H4m0-1h4v-4H4z\",\n 'wrap': \"M21 5H3v2h18zM3 19h7v-2H3zm0-6h15c1 0 2 .43 2 2s-1 2-2 2h-2v-2l-4 3l4 3v-2h2c2.95 0 4-1.27 4-4c0-2.72-1-4-4-4H3z\",\n}\n\n/**\n * Icon names available in the bundled subset.\n *\n * Annotated pure so bundlers can drop it. Without the annotation this\n * top-level `Object.keys` call is treated as a possible side effect, which\n * keeps `mdiPaths` reachable and forces every icon into any bundle that\n * touches this package — even one importing only `UiKbd`, which draws no\n * icons.\n */\nexport const mdiIconNames = /*#__PURE__*/ Object.keys(mdiPaths)\n"],"mappings":";;;;;;;;;;;;;;;AAeA,IAAa,eAAe;;AAG5B,IAAa,WAAW;CACtB,WAAW;CACX,iBAAiB;CACjB,gBAAgB;CAChB,iBAAiB;CACjB,qBAAqB;CACrB,SAAS;CACT,gBAAgB;CAChB,gBAAgB;CAChB,iBAAiB;CACjB,cAAc;CACd,SAAS;CACT,gBAAgB;CAChB,UAAU;CACV,iBAAiB;CACjB,SAAS;CACT,UAAU;CACV,mBAAmB;CACnB,eAAe;CACf,eAAe;CACf,iBAAiB;CACjB,eAAe;CACf,eAAe;CACf,WAAW;CACX,QAAQ;CACR,UAAU;CACV,SAAS;CACT,OAAO;CACP,UAAU;CACV,QAAQ;CACR,SAAS;CACT,aAAa;CACb,aAAa;CACb,qBAAqB;CACrB,aAAa;CACb,aAAa;CACb,QAAQ;AACV;;;;;;;;;;AAWA,IAAa,eAA6B,qBAAO,KAAK,QAAQ"}
|
|
1
|
+
{"version":3,"file":"mdi.js","names":[],"sources":["../../src/icons/mdi.js"],"sourcesContent":["/**\n * GENERATED FILE — do not edit by hand.\n * Regenerate with: npm run icons\n *\n * Inline path data for the Material Design Icons used by Numori UI, keyed by\n * icon name without the `mdi:` prefix. All paths are drawn on a 24x24 grid\n * and filled with `currentColor`.\n *\n * Material Design Icons — https://pictogrammers.com/library/mdi/\n * Copyright (c) Austin Andrews and contributors, licensed under Apache-2.0:\n * https://github.com/Templarian/MaterialDesign/blob/master/LICENSE\n * Icon data sourced from @iconify-json/mdi.\n */\n\n/** Shared viewBox for every icon in this set. */\nexport const MDI_VIEW_BOX = '0 0 24 24'\n\n/** @type {Record<string, string>} */\nexport const mdiPaths = {\n 'account': \"M12 4a4 4 0 0 1 4 4a4 4 0 0 1-4 4a4 4 0 0 1-4-4a4 4 0 0 1 4-4m0 10c4.42 0 8 1.79 8 4v2H4v-2c0-2.21 3.58-4 8-4\",\n 'account-group': \"M12 5.5A3.5 3.5 0 0 1 15.5 9a3.5 3.5 0 0 1-3.5 3.5A3.5 3.5 0 0 1 8.5 9A3.5 3.5 0 0 1 12 5.5M5 8c.56 0 1.08.15 1.53.42c-.15 1.43.27 2.85 1.13 3.96C7.16 13.34 6.16 14 5 14a3 3 0 0 1-3-3a3 3 0 0 1 3-3m14 0a3 3 0 0 1 3 3a3 3 0 0 1-3 3c-1.16 0-2.16-.66-2.66-1.62a5.54 5.54 0 0 0 1.13-3.96c.45-.27.97-.42 1.53-.42M5.5 18.25c0-2.07 2.91-3.75 6.5-3.75s6.5 1.68 6.5 3.75V20h-13zM0 20v-1.5c0-1.39 1.89-2.56 4.45-2.9c-.59.68-.95 1.62-.95 2.65V20zm24 0h-3.5v-1.75c0-1.03-.36-1.97-.95-2.65c2.56.34 4.45 1.51 4.45 2.9z\",\n 'alert-circle': \"M13 13h-2V7h2m0 10h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2\",\n 'alert-outline': \"M12 2L1 21h22M12 6l7.53 13H4.47M11 10v4h2v-4m-2 6v2h2v-2\",\n 'backspace-outline': \"M19 15.59L17.59 17L14 13.41L10.41 17L9 15.59L12.59 12L9 8.41L10.41 7L14 10.59L17.59 7L19 8.41L15.41 12zM22 3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H7c-.69 0-1.23-.36-1.59-.89L0 12l5.41-8.12C5.77 3.35 6.31 3 7 3zm0 2H7l-4.72 7L7 19h15z\",\n 'check': \"M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z\",\n 'check-circle': \"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10s10-4.5 10-10S17.5 2 12 2m-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8z\",\n 'chevron-down': \"M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z\",\n 'chevron-left': \"M15.41 16.58L10.83 12l4.58-4.59L14 6l-6 6l6 6z\",\n 'chevron-right': \"M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z\",\n 'chevron-up': \"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z\",\n 'close': \"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z\",\n 'close-circle': \"M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12S6.47 2 12 2m3.59 5L12 10.59L8.41 7L7 8.41L10.59 12L7 15.59L8.41 17L12 13.41L15.59 17L17 15.59L13.41 12L17 8.41z\",\n 'content-copy': \"M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12z\",\n 'delete': \"M19 4h-3.5l-1-1h-5l-1 1H5v2h14M6 19a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7H6z\",\n 'dots-vertical': \"M12 16a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2\",\n 'email': \"m20 8l-8 5l-8-5V6l8 5l8-5m0-2H4c-1.11 0-2 .89-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2\",\n 'email-alert-outline': \"M24 7h-2v6h2zm0 8h-2v2h2zm-4-9c0-1.1-.9-2-2-2H2C.9 4 0 4.9 0 6v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2zm-2 0l-8 5l-8-5zm0 12H2V8l8 5l8-5z\",\n 'eraser': \"m16.24 3.56l4.95 4.94c.78.79.78 2.05 0 2.84L12 20.53a4.01 4.01 0 0 1-5.66 0L2.81 17c-.78-.79-.78-2.05 0-2.84l10.6-10.6c.79-.78 2.05-.78 2.83 0M4.22 15.58l3.54 3.53c.78.79 2.04.79 2.83 0l3.53-3.53l-4.95-4.95z\",\n 'eye-off-outline': \"M2 5.27L3.28 4L20 20.72L18.73 22l-3.08-3.08c-1.15.38-2.37.58-3.65.58c-5 0-9.27-3.11-11-7.5c.69-1.76 1.79-3.31 3.19-4.54zM12 9a3 3 0 0 1 3 3a3 3 0 0 1-.17 1L11 9.17A3 3 0 0 1 12 9m0-4.5c5 0 9.27 3.11 11 7.5a11.8 11.8 0 0 1-4 5.19l-1.42-1.43A9.86 9.86 0 0 0 20.82 12A9.82 9.82 0 0 0 12 6.5c-1.09 0-2.16.18-3.16.5L7.3 5.47c1.44-.62 3.03-.97 4.7-.97M3.18 12A9.82 9.82 0 0 0 12 17.5c.69 0 1.37-.07 2-.21L11.72 15A3.064 3.064 0 0 1 9 12.28L5.6 8.87c-.99.85-1.82 1.91-2.42 3.13\",\n 'eye-outline': \"M12 9a3 3 0 0 1 3 3a3 3 0 0 1-3 3a3 3 0 0 1-3-3a3 3 0 0 1 3-3m0-4.5c5 0 9.27 3.11 11 7.5c-1.73 4.39-6 7.5-11 7.5S2.73 16.39 1 12c1.73-4.39 6-7.5 11-7.5M3.18 12a9.821 9.821 0 0 0 17.64 0a9.821 9.821 0 0 0-17.64 0\",\n 'format-bold': \"M13.5 15.5H10v-3h3.5A1.5 1.5 0 0 1 15 14a1.5 1.5 0 0 1-1.5 1.5m-3.5-9h3A1.5 1.5 0 0 1 14.5 8A1.5 1.5 0 0 1 13 9.5h-3m5.6 1.29c.97-.68 1.65-1.79 1.65-2.79c0-2.26-1.75-4-4-4H7v14h7.04c2.1 0 3.71-1.7 3.71-3.79c0-1.52-.86-2.82-2.15-3.42\",\n 'format-italic': \"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z\",\n 'format-text': \"m18.5 4l1.16 4.35l-.96.26c-.45-.87-.91-1.74-1.44-2.18C16.73 6 16.11 6 15.5 6H13v10.5c0 .5 0 1 .33 1.25c.34.25 1 .25 1.67.25v1H9v-1c.67 0 1.33 0 1.67-.25c.33-.25.33-.75.33-1.25V6H8.5c-.61 0-1.23 0-1.76.43c-.53.44-.99 1.31-1.44 2.18l-.96-.26L5.5 4z\",\n 'information': \"M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2\",\n 'loading': \"M12 4V2A10 10 0 0 0 2 12h2a8 8 0 0 1 8-8\",\n 'lock': \"M12 17a2 2 0 0 0 2-2a2 2 0 0 0-2-2a2 2 0 0 0-2 2a2 2 0 0 0 2 2m6-9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2h1V6a5 5 0 0 1 5-5a5 5 0 0 1 5 5v2zm-6-5a3 3 0 0 0-3 3v2h6V6a3 3 0 0 0-3-3\",\n 'logout': \"m17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5M4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z\",\n 'minus': \"M19 13H5v-2h14z\",\n 'minus-circle-outline': \"M12 20c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2M7 13h10v-2H7\",\n 'note-text-outline': \"M15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9zm4 16H5V5h9v5h5m-2 4H7v-2h10m-3 5H7v-2h7\",\n 'pen': \"M20.71 7.04c-.34.34-.67.67-.68 1c-.03.32.31.65.63.96c.48.5.95.95.93 1.44s-.53 1-1.04 1.5l-4.13 4.14L15 14.66l4.25-4.24l-.96-.96l-1.42 1.41l-3.75-3.75l3.84-3.83c.39-.39 1.04-.39 1.41 0l2.34 2.34c.39.37.39 1.02 0 1.41M3 17.25l9.56-9.57l3.75 3.75L6.75 21H3z\",\n 'pencil': \"M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83l3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75z\",\n 'plus': \"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z\",\n 'share': \"m21 12l-7-7v4C7 10 4 15 3 20c2.5-3.5 6-5.1 11-5.1V19z\",\n 'shield-lock-outline': \"M21 11c0 5.55-3.84 10.74-9 12c-5.16-1.26-9-6.45-9-12V5l9-4l9 4zm-9 10c3.75-1 7-5.46 7-9.78V6.3l-7-3.12L5 6.3v4.92C5 15.54 8.25 20 12 21m2.8-10V9.5C14.8 8.1 13.4 7 12 7S9.2 8.1 9.2 9.5V11c-.6 0-1.2.6-1.2 1.2v3.5c0 .7.6 1.3 1.2 1.3h5.5c.7 0 1.3-.6 1.3-1.2v-3.5c0-.7-.6-1.3-1.2-1.3m-1.3 0h-3V9.5c0-.8.7-1.3 1.5-1.3s1.5.5 1.5 1.3z\",\n 'sync': \"M12 18a6 6 0 0 1-6-6c0-1 .25-1.97.7-2.8L5.24 7.74A7.93 7.93 0 0 0 4 12a8 8 0 0 0 8 8v3l4-4l-4-4m0-11V1L8 5l4 4V6a6 6 0 0 1 6 6c0 1-.25 1.97-.7 2.8l1.46 1.46A7.93 7.93 0 0 0 20 12a8 8 0 0 0-8-8\",\n 'translate': \"m12.87 15.07l-2.54-2.51l.03-.03A17.5 17.5 0 0 0 14.07 6H17V4h-7V2H8v2H1v2h11.17C11.5 7.92 10.44 9.75 9 11.35C8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5l3.11 3.11zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2zm-2.62 7l1.62-4.33L19.12 17z\",\n 'trash-can': \"M9 3v1H4v2h1v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6h1V4h-5V3zm0 5h2v9H9zm4 0h2v9h-2z\",\n 'trash-can-outline': \"M9 3v1H4v2h1v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6h1V4h-5V3zM7 6h10v13H7zm2 2v9h2V8zm4 0v9h2V8z\",\n 'view-grid': \"M3 11h8V3H3m0 18h8v-8H3m10 8h8v-8h-8m0-10v8h8V3\",\n 'view-list': \"M9 5v4h12V5M9 19h12v-4H9m0-1h12v-4H9M4 9h4V5H4m0 14h4v-4H4m0-1h4v-4H4z\",\n 'weather-night': \"m17.75 4.09l-2.53 1.94l.91 3.06l-2.63-1.81l-2.63 1.81l.91-3.06l-2.53-1.94L12.44 4l1.06-3l1.06 3zm3.5 6.91l-1.64 1.25l.59 1.98l-1.7-1.17l-1.7 1.17l.59-1.98L15.75 11l2.06-.05L18.5 9l.69 1.95zm-2.28 4.95c.83-.08 1.72 1.1 1.19 1.85c-.32.45-.66.87-1.08 1.27C15.17 23 8.84 23 4.94 19.07c-3.91-3.9-3.91-10.24 0-14.14c.4-.4.82-.76 1.27-1.08c.75-.53 1.93.36 1.85 1.19c-.27 2.86.69 5.83 2.89 8.02a9.96 9.96 0 0 0 8.02 2.89m-1.64 2.02a12.08 12.08 0 0 1-7.8-3.47c-2.17-2.19-3.33-5-3.49-7.82c-2.81 3.14-2.7 7.96.31 10.98c3.02 3.01 7.84 3.12 10.98.31\",\n 'weather-sunny': \"M12 7a5 5 0 0 1 5 5a5 5 0 0 1-5 5a5 5 0 0 1-5-5a5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3a3 3 0 0 0 3 3a3 3 0 0 0 3-3a3 3 0 0 0-3-3m0-7l2.39 3.42C13.65 5.15 12.84 5 12 5s-1.65.15-2.39.42zM3.34 7l4.16-.35A7.2 7.2 0 0 0 5.94 8.5c-.44.74-.69 1.5-.83 2.29zm.02 10l1.76-3.77a7.13 7.13 0 0 0 2.38 4.14zM20.65 7l-1.77 3.79a7.02 7.02 0 0 0-2.38-4.15zm-.01 10l-4.14.36c.59-.51 1.12-1.14 1.54-1.86c.42-.73.69-1.5.83-2.29zM12 22l-2.41-3.44c.74.27 1.55.44 2.41.44c.82 0 1.63-.17 2.37-.44z\",\n 'wifi-off': \"M2.28 3L1 4.27l1.47 1.47c-.43.26-.86.55-1.27.86L3 9c.53-.4 1.08-.75 1.66-1.07l2.23 2.23c-.74.34-1.45.75-2.09 1.24l1.8 2.4c.78-.58 1.66-1.03 2.6-1.33L11.75 15c-1.25.07-2.41.5-3.35 1.2L12 21l2.46-3.27L17.74 21L19 19.72M12 3c-2.15 0-4.2.38-6.1 1.07l2.39 2.4C9.5 6.16 10.72 6 12 6c3.38 0 6.5 1.11 9 3l1.8-2.4C19.79 4.34 16.06 3 12 3m0 6c-.38 0-.75 0-1.12.05l3.19 3.2c1.22.28 2.36.82 3.33 1.55l1.8-2.4C17.2 9.89 14.7 9 12 9\",\n 'wrap': \"M21 5H3v2h18zM3 19h7v-2H3zm0-6h15c1 0 2 .43 2 2s-1 2-2 2h-2v-2l-4 3l4 3v-2h2c2.95 0 4-1.27 4-4c0-2.72-1-4-4-4H3z\",\n}\n\n/**\n * Icon names available in the bundled subset.\n *\n * Annotated pure so bundlers can drop it. Without the annotation this\n * top-level `Object.keys` call is treated as a possible side effect, which\n * keeps `mdiPaths` reachable and forces every icon into any bundle that\n * touches this package — even one importing only `UiKbd`, which draws no\n * icons.\n */\nexport const mdiIconNames = /*#__PURE__*/ Object.keys(mdiPaths)\n"],"mappings":";;;;;;;;;;;;;;;AAeA,IAAa,eAAe;;AAG5B,IAAa,WAAW;CACtB,WAAW;CACX,iBAAiB;CACjB,gBAAgB;CAChB,iBAAiB;CACjB,qBAAqB;CACrB,SAAS;CACT,gBAAgB;CAChB,gBAAgB;CAChB,gBAAgB;CAChB,iBAAiB;CACjB,cAAc;CACd,SAAS;CACT,gBAAgB;CAChB,gBAAgB;CAChB,UAAU;CACV,iBAAiB;CACjB,SAAS;CACT,uBAAuB;CACvB,UAAU;CACV,mBAAmB;CACnB,eAAe;CACf,eAAe;CACf,iBAAiB;CACjB,eAAe;CACf,eAAe;CACf,WAAW;CACX,QAAQ;CACR,UAAU;CACV,SAAS;CACT,wBAAwB;CACxB,qBAAqB;CACrB,OAAO;CACP,UAAU;CACV,QAAQ;CACR,SAAS;CACT,uBAAuB;CACvB,QAAQ;CACR,aAAa;CACb,aAAa;CACb,qBAAqB;CACrB,aAAa;CACb,aAAa;CACb,iBAAiB;CACjB,iBAAiB;CACjB,YAAY;CACZ,QAAQ;AACV;;;;;;;;;;AAWA,IAAa,eAA6B,qBAAO,KAAK,QAAQ"}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,11 +10,12 @@ type UiComponent = Component
|
|
|
10
10
|
export declare const UiAlert: UiComponent
|
|
11
11
|
export declare const UiAvatar: UiComponent
|
|
12
12
|
export declare const UiBadge: UiComponent
|
|
13
|
+
export declare const UiBanner: UiComponent
|
|
13
14
|
export declare const UiBreadcrumb: UiComponent
|
|
14
15
|
export declare const UiButton: UiComponent
|
|
15
|
-
export declare const UiButtonsGroup: UiComponent
|
|
16
16
|
export declare const UiCard: UiComponent
|
|
17
17
|
export declare const UiCheckbox: UiComponent
|
|
18
|
+
export declare const UiCodeBlock: UiComponent
|
|
18
19
|
export declare const UiDivider: UiComponent
|
|
19
20
|
export declare const UiDropdown: UiComponent
|
|
20
21
|
export declare const UiDropdownItem: UiComponent
|
|
@@ -37,7 +38,11 @@ export declare const UiSectionHeading: UiComponent
|
|
|
37
38
|
export declare const UiSegmented: UiComponent
|
|
38
39
|
export declare const UiSelect: UiComponent
|
|
39
40
|
export declare const UiSlider: UiComponent
|
|
41
|
+
export declare const UiSpinner: UiComponent
|
|
40
42
|
export declare const UiStepper: UiComponent
|
|
43
|
+
export declare const UiTable: UiComponent
|
|
44
|
+
export declare const UiThemeToggle: UiComponent
|
|
45
|
+
export declare const UiToast: UiComponent
|
|
41
46
|
export declare const UiToggle: UiComponent
|
|
42
47
|
export declare const UiTooltip: UiComponent
|
|
43
48
|
export declare const UiIcon: UiComponent
|
package/dist/index.js
CHANGED
|
@@ -1,43 +1,48 @@
|
|
|
1
1
|
import { MDI_VIEW_BOX, mdiIconNames, mdiPaths } from "./icons/mdi.js";
|
|
2
2
|
import { iconRegistry, registerIcons, resolveIconPath } from "./icons/registry.js";
|
|
3
3
|
import { ICON_COMPONENT_KEY, provideIconComponent, useIconComponent } from "./icons/resolver.js";
|
|
4
|
-
import _sfc_main$
|
|
4
|
+
import _sfc_main$16 from "./icons/Icon.js";
|
|
5
5
|
import _sfc_main from "./components/Alert.js";
|
|
6
6
|
import _sfc_main$1 from "./components/Avatar.js";
|
|
7
7
|
import _sfc_main$2 from "./components/Badge.js";
|
|
8
|
-
import _sfc_main$3 from "./components/
|
|
9
|
-
import _sfc_main$4 from "./components/
|
|
10
|
-
import _sfc_main$5 from "./components/
|
|
8
|
+
import _sfc_main$3 from "./components/Banner.js";
|
|
9
|
+
import _sfc_main$4 from "./components/Breadcrumb.js";
|
|
10
|
+
import _sfc_main$5 from "./components/Button.js";
|
|
11
11
|
import _sfc_main$6 from "./components/Card.js";
|
|
12
12
|
import _sfc_main$7 from "./components/Checkbox.js";
|
|
13
|
-
import _sfc_main$8 from "./components/
|
|
13
|
+
import _sfc_main$8 from "./components/CodeBlock.js";
|
|
14
|
+
import _sfc_main$9 from "./components/Divider.js";
|
|
14
15
|
import { useEventListener } from "./composables/useEventListener.js";
|
|
15
16
|
import { onClickOutside } from "./composables/onClickOutside.js";
|
|
16
|
-
import _sfc_main$
|
|
17
|
-
import _sfc_main$
|
|
18
|
-
import _sfc_main$
|
|
19
|
-
import _sfc_main$
|
|
20
|
-
import _sfc_main$
|
|
21
|
-
import _sfc_main$
|
|
22
|
-
import _sfc_main$
|
|
23
|
-
import _sfc_main$
|
|
24
|
-
import _sfc_main$
|
|
25
|
-
import _sfc_main$
|
|
26
|
-
import _sfc_main$
|
|
17
|
+
import _sfc_main$10 from "./components/Dropdown.js";
|
|
18
|
+
import _sfc_main$11 from "./components/DropdownItem.js";
|
|
19
|
+
import _sfc_main$12 from "./components/DropdownRow.js";
|
|
20
|
+
import _sfc_main$13 from "./components/DropdownSubmenu.js";
|
|
21
|
+
import _sfc_main$14 from "./components/FileInput.js";
|
|
22
|
+
import _sfc_main$15 from "./components/FormField.js";
|
|
23
|
+
import _sfc_main$17 from "./components/IconTile.js";
|
|
24
|
+
import _sfc_main$18 from "./components/Input.js";
|
|
25
|
+
import _sfc_main$19 from "./components/Kbd.js";
|
|
26
|
+
import _sfc_main$20 from "./components/ListMenu.js";
|
|
27
|
+
import _sfc_main$21 from "./components/ListMenuItem.js";
|
|
27
28
|
import { useBackButton } from "./composables/useBackButton.js";
|
|
28
|
-
import _sfc_main$
|
|
29
|
-
import _sfc_main$
|
|
30
|
-
import _sfc_main$
|
|
31
|
-
import _sfc_main$
|
|
32
|
-
import _sfc_main$
|
|
33
|
-
import _sfc_main$
|
|
34
|
-
import _sfc_main$
|
|
35
|
-
import _sfc_main$
|
|
36
|
-
import _sfc_main$
|
|
37
|
-
import _sfc_main$
|
|
38
|
-
import _sfc_main$
|
|
39
|
-
import _sfc_main$
|
|
40
|
-
import _sfc_main$
|
|
29
|
+
import _sfc_main$22 from "./components/Modal.js";
|
|
30
|
+
import _sfc_main$23 from "./components/Numpad.js";
|
|
31
|
+
import _sfc_main$24 from "./components/Popup.js";
|
|
32
|
+
import _sfc_main$25 from "./components/ProgressBar.js";
|
|
33
|
+
import _sfc_main$26 from "./components/Prompt.js";
|
|
34
|
+
import _sfc_main$27 from "./components/Radio.js";
|
|
35
|
+
import _sfc_main$28 from "./components/SectionHeading.js";
|
|
36
|
+
import _sfc_main$29 from "./components/Segmented.js";
|
|
37
|
+
import _sfc_main$30 from "./components/Select.js";
|
|
38
|
+
import _sfc_main$31 from "./components/Slider.js";
|
|
39
|
+
import _sfc_main$32 from "./components/Spinner.js";
|
|
40
|
+
import _sfc_main$33 from "./components/Stepper.js";
|
|
41
|
+
import _sfc_main$34 from "./components/Table.js";
|
|
42
|
+
import _sfc_main$35 from "./components/ThemeToggle.js";
|
|
43
|
+
import _sfc_main$36 from "./components/Toast.js";
|
|
44
|
+
import _sfc_main$37 from "./components/Toggle.js";
|
|
45
|
+
import _sfc_main$38 from "./components/Tooltip.js";
|
|
41
46
|
import { components } from "./components/index.js";
|
|
42
47
|
import { COMPONENT_NAMES, DEFAULT_PREFIX, componentEntries, prefixed } from "./manifest.js";
|
|
43
48
|
//#region src/index.js
|
|
@@ -157,6 +162,6 @@ function createNumoriUI(components = {}, options = {}) {
|
|
|
157
162
|
} };
|
|
158
163
|
}
|
|
159
164
|
//#endregion
|
|
160
|
-
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
|
|
165
|
+
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 UiBanner, _sfc_main$4 as UiBreadcrumb, _sfc_main$5 as UiButton, _sfc_main$6 as UiCard, _sfc_main$7 as UiCheckbox, _sfc_main$8 as UiCodeBlock, _sfc_main$9 as UiDivider, _sfc_main$10 as UiDropdown, _sfc_main$11 as UiDropdownItem, _sfc_main$12 as UiDropdownRow, _sfc_main$13 as UiDropdownSubmenu, _sfc_main$14 as UiFileInput, _sfc_main$15 as UiFormField, _sfc_main$16 as UiIcon, _sfc_main$17 as UiIconTile, _sfc_main$18 as UiInput, _sfc_main$19 as UiKbd, _sfc_main$20 as UiListMenu, _sfc_main$21 as UiListMenuItem, _sfc_main$22 as UiModal, _sfc_main$23 as UiNumpad, _sfc_main$24 as UiPopup, _sfc_main$25 as UiProgressBar, _sfc_main$26 as UiPrompt, _sfc_main$27 as UiRadio, _sfc_main$28 as UiSectionHeading, _sfc_main$29 as UiSegmented, _sfc_main$30 as UiSelect, _sfc_main$31 as UiSlider, _sfc_main$32 as UiSpinner, _sfc_main$33 as UiStepper, _sfc_main$34 as UiTable, _sfc_main$35 as UiThemeToggle, _sfc_main$36 as UiToast, _sfc_main$37 as UiToggle, _sfc_main$38 as UiTooltip, componentEntries, components, createNumoriUI, iconRegistry, mdiIconNames, mdiPaths, onClickOutside, prefixed, provideIconComponent, registerIcons, resolveIconPath, useBackButton, useEventListener, useIconComponent };
|
|
161
166
|
|
|
162
167
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +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":"
|
|
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"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region src/internal/controlSizes.js
|
|
2
|
+
/**
|
|
3
|
+
* Size scale shared by the native checkable inputs (`UiCheckbox`, `UiRadio`).
|
|
4
|
+
*
|
|
5
|
+
* Both render a native `<input>` and size it with the same width/height classes;
|
|
6
|
+
* the map lived duplicated in each. A checkbox and a radio stay separate
|
|
7
|
+
* components because their HTML semantics differ, but their sizing does not.
|
|
8
|
+
*
|
|
9
|
+
* @param {string} size One of `sm` | `md` | `lg`. Anything else falls back to `md`.
|
|
10
|
+
* @returns {string} The width/height utility classes for that size.
|
|
11
|
+
*/
|
|
12
|
+
var CHECKABLE_SIZES = {
|
|
13
|
+
sm: "w-3.5 h-3.5",
|
|
14
|
+
md: "w-4 h-4",
|
|
15
|
+
lg: "w-5 h-5"
|
|
16
|
+
};
|
|
17
|
+
var checkableSizeClass = (size) => CHECKABLE_SIZES[size] ?? CHECKABLE_SIZES.md;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { CHECKABLE_SIZES, checkableSizeClass };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=controlSizes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controlSizes.js","names":[],"sources":["../../src/internal/controlSizes.js"],"sourcesContent":["/**\n * Size scale shared by the native checkable inputs (`UiCheckbox`, `UiRadio`).\n *\n * Both render a native `<input>` and size it with the same width/height classes;\n * the map lived duplicated in each. A checkbox and a radio stay separate\n * components because their HTML semantics differ, but their sizing does not.\n *\n * @param {string} size One of `sm` | `md` | `lg`. Anything else falls back to `md`.\n * @returns {string} The width/height utility classes for that size.\n */\nexport const CHECKABLE_SIZES = {\n sm: 'w-3.5 h-3.5',\n md: 'w-4 h-4',\n lg: 'w-5 h-5',\n}\n\nexport const checkableSizeClass = (size) => CHECKABLE_SIZES[size] ?? CHECKABLE_SIZES.md\n"],"mappings":";;;;;;;;;;;AAUA,IAAa,kBAAkB;CAC7B,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AAEA,IAAa,sBAAsB,SAAS,gBAAgB,SAAS,gBAAgB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/internal/menu.js
|
|
2
|
+
/**
|
|
3
|
+
* Shared chrome for floating menu surfaces.
|
|
4
|
+
*
|
|
5
|
+
* `UiDropdown`, `UiSelect`, `UiPopup` and `UiDropdownSubmenu` are four different
|
|
6
|
+
* takes on "a panel that floats over the page" — they differ in how they are
|
|
7
|
+
* positioned (absolute vs fixed vs teleported) and dismissed, which is why they
|
|
8
|
+
* remain separate components. What they share is the *look* of the panel: the
|
|
9
|
+
* surface colour, border, radius and shadow. That string lived copied verbatim
|
|
10
|
+
* in all four, so a tweak to the shared look meant editing four files and hoping
|
|
11
|
+
* none drifted. It now lives here.
|
|
12
|
+
*
|
|
13
|
+
* Positioning, z-index, padding and `overflow` stay at each call site, since
|
|
14
|
+
* those genuinely differ between the four.
|
|
15
|
+
*/
|
|
16
|
+
var MENU_PANEL_CLASS = "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg";
|
|
17
|
+
//#endregion
|
|
18
|
+
export { MENU_PANEL_CLASS };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.js","names":[],"sources":["../../src/internal/menu.js"],"sourcesContent":["/**\n * Shared chrome for floating menu surfaces.\n *\n * `UiDropdown`, `UiSelect`, `UiPopup` and `UiDropdownSubmenu` are four different\n * takes on \"a panel that floats over the page\" — they differ in how they are\n * positioned (absolute vs fixed vs teleported) and dismissed, which is why they\n * remain separate components. What they share is the *look* of the panel: the\n * surface colour, border, radius and shadow. That string lived copied verbatim\n * in all four, so a tweak to the shared look meant editing four files and hoping\n * none drifted. It now lives here.\n *\n * Positioning, z-index, padding and `overflow` stay at each call site, since\n * those genuinely differ between the four.\n */\nexport const MENU_PANEL_CLASS =\n 'bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg'\n"],"mappings":";;;;;;;;;;;;;;;AAcA,IAAa,mBACX"}
|
package/dist/manifest.js
CHANGED
|
@@ -22,11 +22,12 @@ var COMPONENT_NAMES = [
|
|
|
22
22
|
"Alert",
|
|
23
23
|
"Avatar",
|
|
24
24
|
"Badge",
|
|
25
|
+
"Banner",
|
|
25
26
|
"Breadcrumb",
|
|
26
27
|
"Button",
|
|
27
|
-
"ButtonsGroup",
|
|
28
28
|
"Card",
|
|
29
29
|
"Checkbox",
|
|
30
|
+
"CodeBlock",
|
|
30
31
|
"Divider",
|
|
31
32
|
"Dropdown",
|
|
32
33
|
"DropdownItem",
|
|
@@ -49,7 +50,11 @@ var COMPONENT_NAMES = [
|
|
|
49
50
|
"Segmented",
|
|
50
51
|
"Select",
|
|
51
52
|
"Slider",
|
|
53
|
+
"Spinner",
|
|
52
54
|
"Stepper",
|
|
55
|
+
"Table",
|
|
56
|
+
"ThemeToggle",
|
|
57
|
+
"Toast",
|
|
53
58
|
"Toggle",
|
|
54
59
|
"Tooltip"
|
|
55
60
|
];
|
package/dist/manifest.js.map
CHANGED
|
@@ -1 +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 '
|
|
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 'Banner',\n 'Breadcrumb',\n 'Button',\n 'Card',\n 'Checkbox',\n 'CodeBlock',\n 'Divider',\n 'Dropdown',\n 'DropdownItem',\n 'DropdownRow',\n 'DropdownSubmenu',\n 'FileInput',\n 'FormField',\n 'IconTile',\n 'Input',\n 'Kbd',\n 'ListMenu',\n 'ListMenuItem',\n 'Modal',\n 'Numpad',\n 'Popup',\n 'ProgressBar',\n 'Prompt',\n 'Radio',\n 'SectionHeading',\n 'Segmented',\n 'Select',\n 'Slider',\n 'Spinner',\n 'Stepper',\n 'Table',\n 'ThemeToggle',\n 'Toast',\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;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"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "numori-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"description": "The Numori design system — a Tailwind 4 Vue 3 component library, consumable as a Nuxt module or a Vite plugin.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Erik Bjerke",
|
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
"build": "node scripts/build.mjs",
|
|
86
86
|
"build:lib": "vite build",
|
|
87
87
|
"icons": "node scripts/extract-icons.mjs",
|
|
88
|
+
"playground:icons": "node scripts/playground-icons.mjs",
|
|
88
89
|
"sync": "node scripts/sync-from-notes.mjs",
|
|
89
90
|
"dev:nuxt": "npm --prefix playground/nuxt run dev",
|
|
90
91
|
"dev:vite": "npm --prefix playground/vite run dev",
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Transition
|
|
3
|
+
enter-active-class="transition-all duration-300 ease-out"
|
|
4
|
+
enter-from-class="max-h-0 opacity-0"
|
|
5
|
+
enter-to-class="max-h-24 opacity-100"
|
|
6
|
+
leave-active-class="transition-all duration-200 ease-in"
|
|
7
|
+
leave-from-class="max-h-24 opacity-100"
|
|
8
|
+
leave-to-class="max-h-0 opacity-0"
|
|
9
|
+
>
|
|
10
|
+
<div
|
|
11
|
+
v-if="show"
|
|
12
|
+
class="relative w-full shrink-0 overflow-hidden text-xs font-medium"
|
|
13
|
+
:class="colorClass"
|
|
14
|
+
:style="safeArea ? { paddingTop: 'env(safe-area-inset-top, 0px)' } : undefined"
|
|
15
|
+
role="status"
|
|
16
|
+
>
|
|
17
|
+
<!-- Whole-banner click target as a full-cover button that is a *sibling*
|
|
18
|
+
of the dismiss button, never its ancestor. Nesting a <button> inside
|
|
19
|
+
a <button> is invalid HTML: the browser restructures it, so the
|
|
20
|
+
hydrated DOM would no longer match the server markup. -->
|
|
21
|
+
<button
|
|
22
|
+
v-if="clickable"
|
|
23
|
+
type="button"
|
|
24
|
+
class="absolute inset-0 z-0 cursor-pointer"
|
|
25
|
+
:aria-label="message || undefined"
|
|
26
|
+
@click="emit('click')"
|
|
27
|
+
/>
|
|
28
|
+
<div
|
|
29
|
+
class="relative z-10 flex items-center justify-center gap-2 px-4 py-1.5"
|
|
30
|
+
:class="clickable ? 'pointer-events-none' : ''"
|
|
31
|
+
>
|
|
32
|
+
<UiIcon v-if="icon" :name="icon" class="w-3.5 h-3.5 shrink-0" />
|
|
33
|
+
<span
|
|
34
|
+
><slot>{{ message }}</slot></span
|
|
35
|
+
>
|
|
36
|
+
|
|
37
|
+
<button
|
|
38
|
+
v-if="dismissible"
|
|
39
|
+
type="button"
|
|
40
|
+
class="pointer-events-auto absolute right-3 inline-flex items-center opacity-80 hover:opacity-100"
|
|
41
|
+
:aria-label="dismissLabel"
|
|
42
|
+
@click.stop="emit('dismiss')"
|
|
43
|
+
>
|
|
44
|
+
<UiIcon name="mdi:close" class="w-3.5 h-3.5" />
|
|
45
|
+
</button>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</Transition>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script setup>
|
|
52
|
+
/**
|
|
53
|
+
* UiBanner — a full-width status strip that slides in above the content.
|
|
54
|
+
*
|
|
55
|
+
* The shape shared by "you're offline", "your email isn't verified" and "a new
|
|
56
|
+
* version is available": a thin, edge-to-edge bar that expands into view, states
|
|
57
|
+
* one thing with an optional icon, and collapses away when the condition clears.
|
|
58
|
+
* Mount it permanently and drive `show` from the condition; the height/opacity
|
|
59
|
+
* transition does the appearing and disappearing.
|
|
60
|
+
*
|
|
61
|
+
* It sits at the top of the layout, so it honours the top safe-area inset by
|
|
62
|
+
* default — on a notched phone the padding keeps the text out from under the
|
|
63
|
+
* status bar. Turn `safeArea` off for a banner that is not at the very top.
|
|
64
|
+
*
|
|
65
|
+
* Two optional affordances: `clickable` turns the whole bar into a button (for
|
|
66
|
+
* "tap here to verify"), and `dismissible` adds a close control. They emit
|
|
67
|
+
* `click` and `dismiss` respectively — the parent decides what those mean.
|
|
68
|
+
*
|
|
69
|
+
* Colour is a small semantic set rather than free-form, so banners stay
|
|
70
|
+
* consistent across apps; pass `bg-*`/`text-*` classes to step outside it.
|
|
71
|
+
*
|
|
72
|
+
* @example Offline notice
|
|
73
|
+
* <UiBanner :show="offline" color="warning" icon="mdi:wifi-off"
|
|
74
|
+
* message="You're offline — changes will sync when you reconnect" />
|
|
75
|
+
*
|
|
76
|
+
* @example Tappable call to action
|
|
77
|
+
* <UiBanner :show="!verified" color="info" icon="mdi:email-alert-outline"
|
|
78
|
+
* clickable message="Your email is not verified — tap here to verify"
|
|
79
|
+
* @click="openVerify" />
|
|
80
|
+
*/
|
|
81
|
+
import { computed } from 'vue'
|
|
82
|
+
import UiIcon from '../icons/Icon.vue'
|
|
83
|
+
|
|
84
|
+
const props = defineProps({
|
|
85
|
+
/**
|
|
86
|
+
* Whether the banner is shown. Drive this from the condition it reports;
|
|
87
|
+
* toggling it runs the slide-in / collapse-out transition.
|
|
88
|
+
* @type {boolean}
|
|
89
|
+
* @default false
|
|
90
|
+
*/
|
|
91
|
+
show: { type: Boolean, default: false },
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Colour of the bar.
|
|
95
|
+
* @type {string}
|
|
96
|
+
* @default 'info'
|
|
97
|
+
* @values 'info' | 'success' | 'warning' | 'error' | 'neutral'
|
|
98
|
+
*/
|
|
99
|
+
color: { type: String, default: 'info' },
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Optional MDI icon shown before the message.
|
|
103
|
+
* @type {string}
|
|
104
|
+
* @default ''
|
|
105
|
+
*/
|
|
106
|
+
icon: { type: String, default: '' },
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Message text. Ignored when the default slot is used.
|
|
110
|
+
* @type {string}
|
|
111
|
+
* @default ''
|
|
112
|
+
*/
|
|
113
|
+
message: { type: String, default: '' },
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Makes the whole bar a button that emits `click`.
|
|
117
|
+
* @type {boolean}
|
|
118
|
+
* @default false
|
|
119
|
+
*/
|
|
120
|
+
clickable: { type: Boolean, default: false },
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Adds a close control that emits `dismiss`.
|
|
124
|
+
* @type {boolean}
|
|
125
|
+
* @default false
|
|
126
|
+
*/
|
|
127
|
+
dismissible: { type: Boolean, default: false },
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Accessible label for the dismiss control.
|
|
131
|
+
* @type {string}
|
|
132
|
+
* @default 'Dismiss'
|
|
133
|
+
*/
|
|
134
|
+
dismissLabel: { type: String, default: 'Dismiss' },
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Pads for the top safe-area inset, for a banner pinned to the top of the
|
|
138
|
+
* screen. Turn off when the banner sits lower in the layout.
|
|
139
|
+
* @type {boolean}
|
|
140
|
+
* @default true
|
|
141
|
+
*/
|
|
142
|
+
safeArea: { type: Boolean, default: true },
|
|
143
|
+
})
|
|
144
|
+
|
|
145
|
+
const emit = defineEmits(['click', 'dismiss'])
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Banner colours come from the design tokens so a rebrand carries through.
|
|
149
|
+
* `info` uses the primary ramp; `neutral` is the surface grey.
|
|
150
|
+
*/
|
|
151
|
+
const COLORS = {
|
|
152
|
+
info: 'bg-primary-600 dark:bg-primary-700 text-white',
|
|
153
|
+
success: 'bg-success-600 dark:bg-success-700 text-white',
|
|
154
|
+
warning: 'bg-warning-500 dark:bg-warning-600 text-white',
|
|
155
|
+
error: 'bg-error-600 dark:bg-error-700 text-white',
|
|
156
|
+
neutral: 'bg-gray-800 dark:bg-gray-700 text-white',
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const colorClass = computed(() => COLORS[props.color] || COLORS.info)
|
|
160
|
+
</script>
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
*
|
|
54
54
|
* @slot default — Button content (label text, icons, or any child elements)
|
|
55
55
|
*/
|
|
56
|
-
import { computed
|
|
56
|
+
import { computed } from 'vue'
|
|
57
57
|
import UiIcon from '../icons/Icon.vue'
|
|
58
|
-
import {
|
|
58
|
+
import { useMergedClasses } from '../composables/useMergedClasses.js'
|
|
59
59
|
const props = defineProps({
|
|
60
60
|
/**
|
|
61
61
|
* HTML element tag to render.
|
|
@@ -105,10 +105,11 @@ const props = defineProps({
|
|
|
105
105
|
size: { type: String, default: 'md' },
|
|
106
106
|
|
|
107
107
|
/**
|
|
108
|
-
* Border-radius shape of the button
|
|
108
|
+
* Border-radius shape of the button, matching `UiSegmented`'s `shape`.
|
|
109
|
+
* For a circular icon button, combine `shape="pill"` with `icon-only`.
|
|
109
110
|
* @type {string}
|
|
110
111
|
* @default 'round'
|
|
111
|
-
* @values 'round' (rounded-lg) | 'pill' (rounded-full) | 'square' (rounded-none)
|
|
112
|
+
* @values 'round' (rounded-lg) | 'pill' (rounded-full) | 'square' (rounded-none)
|
|
112
113
|
*/
|
|
113
114
|
shape: { type: String, default: 'round' },
|
|
114
115
|
|
|
@@ -235,13 +236,14 @@ const sizeClasses = computed(() => {
|
|
|
235
236
|
|
|
236
237
|
// ── Shape classes ─────────────────────────────────────────
|
|
237
238
|
const shapeClasses = computed(() => {
|
|
238
|
-
|
|
239
|
+
// Menu/list rows are full-width, but still round their corners so the hover
|
|
240
|
+
// highlight is a rounded chip rather than a square that pokes past the
|
|
241
|
+
// rounded menu panel around them.
|
|
242
|
+
if (isInlineVariant.value) return 'rounded-lg'
|
|
239
243
|
const map = {
|
|
240
244
|
round: 'rounded-lg',
|
|
241
245
|
pill: 'rounded-full',
|
|
242
246
|
square: 'rounded-none',
|
|
243
|
-
circle: 'rounded-full',
|
|
244
|
-
none: '',
|
|
245
247
|
}
|
|
246
248
|
return map[props.shape] || map.round
|
|
247
249
|
})
|
|
@@ -382,18 +384,9 @@ const stateClasses = computed(() => {
|
|
|
382
384
|
return 'cursor-pointer'
|
|
383
385
|
})
|
|
384
386
|
|
|
385
|
-
// ── Merge
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
const restAttrs = computed(() => {
|
|
389
|
-
const { class: _, ...rest } = attrs
|
|
390
|
-
return rest
|
|
391
|
-
})
|
|
392
|
-
|
|
393
|
-
const mergedClasses = computed(() => {
|
|
394
|
-
const externalClass = attrs.class || ''
|
|
395
|
-
return twMerge(internalClasses.value, externalClass)
|
|
396
|
-
})
|
|
387
|
+
// ── Merge external classes over internals (external wins via twMerge) ──
|
|
388
|
+
// A getter defers reading `internalClasses` until after its declaration below.
|
|
389
|
+
const { mergedClasses, restAttrs } = useMergedClasses(() => internalClasses.value)
|
|
397
390
|
|
|
398
391
|
// ── Assembled internal classes ────────────────────────────
|
|
399
392
|
const internalClasses = computed(() => {
|