numori-ui 0.4.0 → 0.6.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 +120 -0
- package/README.md +27 -20
- package/dist/components/AppShell.js +234 -0
- package/dist/components/AppShell.js.map +1 -0
- package/dist/components/Avatar.js +71 -19
- package/dist/components/Avatar.js.map +1 -1
- package/dist/components/Checkbox.js +11 -2
- package/dist/components/Checkbox.js.map +1 -1
- package/dist/components/CopyField.js +195 -0
- package/dist/components/CopyField.js.map +1 -0
- package/dist/components/DescriptionList.js +116 -0
- package/dist/components/DescriptionList.js.map +1 -0
- package/dist/components/Dropdown.js +3 -1
- package/dist/components/Dropdown.js.map +1 -1
- package/dist/components/EmptyState.js +123 -0
- package/dist/components/EmptyState.js.map +1 -0
- package/dist/components/FormField.js +43 -13
- package/dist/components/FormField.js.map +1 -1
- package/dist/components/Input.js +15 -1
- package/dist/components/Input.js.map +1 -1
- package/dist/components/Modal.js +61 -4
- package/dist/components/Modal.js.map +1 -1
- package/dist/components/PageHeader.js +106 -0
- package/dist/components/PageHeader.js.map +1 -0
- package/dist/components/Pagination.js +236 -0
- package/dist/components/Pagination.js.map +1 -0
- package/dist/components/Prompt.js +11 -6
- package/dist/components/Prompt.js.map +1 -1
- package/dist/components/Segmented.js +10 -2
- package/dist/components/Segmented.js.map +1 -1
- package/dist/components/Select.js +11 -2
- package/dist/components/Select.js.map +1 -1
- package/dist/components/Sidebar.js +69 -0
- package/dist/components/Sidebar.js.map +1 -0
- package/dist/components/SidebarGroup.js +50 -0
- package/dist/components/SidebarGroup.js.map +1 -0
- package/dist/components/SidebarItem.js +167 -0
- package/dist/components/SidebarItem.js.map +1 -0
- package/dist/components/Skeleton.js +122 -0
- package/dist/components/Skeleton.js.map +1 -0
- package/dist/components/SplitPane.js +264 -0
- package/dist/components/SplitPane.js.map +1 -0
- package/dist/components/StatCard.js +185 -0
- package/dist/components/StatCard.js.map +1 -0
- package/dist/components/Table.js +182 -50
- package/dist/components/Table.js.map +1 -1
- package/dist/components/Tabs.js +216 -0
- package/dist/components/Tabs.js.map +1 -0
- package/dist/components/Toggle.js +11 -2
- package/dist/components/Toggle.js.map +1 -1
- package/dist/components/Tree.js +417 -0
- package/dist/components/Tree.js.map +1 -0
- package/dist/components/VirtualList.js +292 -0
- package/dist/components/VirtualList.js.map +1 -0
- package/dist/components/index.js +105 -81
- package/dist/components/index.js.map +1 -1
- package/dist/icons/mdi.js +12 -0
- package/dist/icons/mdi.js.map +1 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +54 -39
- package/dist/index.js.map +1 -1
- package/dist/internal/focusTrap.js +163 -0
- package/dist/internal/focusTrap.js.map +1 -0
- package/dist/internal/formField.js +26 -0
- package/dist/internal/formField.js.map +1 -0
- package/dist/manifest.js +16 -1
- package/dist/manifest.js.map +1 -1
- package/package.json +1 -1
- package/src/components/AppShell.vue +231 -0
- package/src/components/Avatar.vue +69 -18
- package/src/components/Checkbox.vue +5 -0
- package/src/components/CopyField.vue +178 -0
- package/src/components/DescriptionList.vue +114 -0
- package/src/components/Dropdown.vue +4 -1
- package/src/components/EmptyState.vue +107 -0
- package/src/components/FormField.vue +37 -4
- package/src/components/Input.vue +9 -0
- package/src/components/Modal.vue +51 -3
- package/src/components/PageHeader.vue +102 -0
- package/src/components/Pagination.vue +199 -0
- package/src/components/Prompt.vue +14 -3
- package/src/components/Segmented.vue +5 -0
- package/src/components/Select.vue +6 -1
- package/src/components/Sidebar.vue +61 -0
- package/src/components/SidebarGroup.vue +43 -0
- package/src/components/SidebarItem.vue +159 -0
- package/src/components/Skeleton.vue +91 -0
- package/src/components/SplitPane.vue +264 -0
- package/src/components/StatCard.vue +165 -0
- package/src/components/Table.vue +148 -18
- package/src/components/Tabs.vue +217 -0
- package/src/components/Toggle.vue +5 -0
- package/src/components/Tree.vue +428 -0
- package/src/components/VirtualList.vue +250 -0
- package/src/components/index.js +45 -6
- package/src/icons/mdi.js +12 -0
- package/src/internal/focusTrap.js +185 -0
- package/src/internal/formField.js +23 -0
- package/src/manifest.js +15 -0
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-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"}
|
|
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 'arrow-down': \"M11 4h2v12l5.5-5.5l1.42 1.42L12 19.84l-7.92-7.92L5.5 10.5L11 16z\",\n 'arrow-up': \"M13 20h-2V8l-5.5 5.5l-1.42-1.42L12 4.16l7.92 7.92l-1.42 1.42L13 8z\",\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 'file-document-outline': \"M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm0 2h7v5h5v11H6zm2 8v2h8v-2zm0 4v2h5v-2z\",\n 'folder-outline': \"M20 18H4V8h16m0-2h-8l-2-2H4c-1.11 0-2 .89-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2\",\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 'inbox': \"M19 15h-4a3 3 0 0 1-3 3a3 3 0 0 1-3-3H5V5h14m0-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2\",\n 'inbox-outline': \"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2M5 19v-2h3.13a4.13 4.13 0 0 0 1.27 2m9.6 0h-4.4a4.13 4.13 0 0 0 1.27-2H19m0-2h-5v1a2 2 0 0 1-4 0v-1H5V5h14Z\",\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 'lan-connect': \"M4 1c-1.11 0-2 .89-2 2v4c0 1.11.89 2 2 2H1v2h12V9h-3c1.11 0 2-.89 2-2V3c0-1.11-.89-2-2-2zm0 2h6v4H4zM3 13v7h7v-2H5v-5zm11 0c-1.11 0-2 .89-2 2v4c0 1.11.89 2 2 2h-3v2h12v-2h-3c1.11 0 2-.89 2-2v-4c0-1.11-.89-2-2-2zm0 2h6v4h-6z\",\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 'menu': \"M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z\",\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 'trending-down': \"m16 18l2.29-2.29l-4.88-4.88l-4 4L2 7.41L3.41 6l6 6l4-4l6.3 6.29L22 12v6z\",\n 'trending-neutral': \"m22 12l-4-4v3H3v2h15v3z\",\n 'trending-up': \"m16 6l2.29 2.29l-4.88 4.88l-4-4L2 16.59L3.41 18l6-6l4 4l6.3-6.29L22 12V6z\",\n 'unfold-more-horizontal': \"M12 18.17L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15M12 5.83L15.17 9l1.41-1.41L12 3L7.41 7.59L8.83 9z\",\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,cAAc;CACd,YAAY;CACZ,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,yBAAyB;CACzB,kBAAkB;CAClB,eAAe;CACf,iBAAiB;CACjB,eAAe;CACf,SAAS;CACT,iBAAiB;CACjB,eAAe;CACf,eAAe;CACf,WAAW;CACX,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,SAAS;CACT,wBAAwB;CACxB,qBAAqB;CACrB,OAAO;CACP,UAAU;CACV,QAAQ;CACR,SAAS;CACT,uBAAuB;CACvB,QAAQ;CACR,aAAa;CACb,aAAa;CACb,qBAAqB;CACrB,iBAAiB;CACjB,oBAAoB;CACpB,eAAe;CACf,0BAA0B;CAC1B,aAAa;CACb,aAAa;CACb,iBAAiB;CACjB,iBAAiB;CACjB,YAAY;CACZ,QAAQ;AACV;;;;;;;;;;AAWA,IAAa,eAA6B,qBAAO,KAAK,QAAQ"}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type { Component, Plugin } from 'vue'
|
|
|
8
8
|
type UiComponent = Component
|
|
9
9
|
|
|
10
10
|
export declare const UiAlert: UiComponent
|
|
11
|
+
export declare const UiAppShell: UiComponent
|
|
11
12
|
export declare const UiAvatar: UiComponent
|
|
12
13
|
export declare const UiBadge: UiComponent
|
|
13
14
|
export declare const UiBanner: UiComponent
|
|
@@ -16,11 +17,14 @@ export declare const UiButton: UiComponent
|
|
|
16
17
|
export declare const UiCard: UiComponent
|
|
17
18
|
export declare const UiCheckbox: UiComponent
|
|
18
19
|
export declare const UiCodeBlock: UiComponent
|
|
20
|
+
export declare const UiCopyField: UiComponent
|
|
21
|
+
export declare const UiDescriptionList: UiComponent
|
|
19
22
|
export declare const UiDivider: UiComponent
|
|
20
23
|
export declare const UiDropdown: UiComponent
|
|
21
24
|
export declare const UiDropdownItem: UiComponent
|
|
22
25
|
export declare const UiDropdownRow: UiComponent
|
|
23
26
|
export declare const UiDropdownSubmenu: UiComponent
|
|
27
|
+
export declare const UiEmptyState: UiComponent
|
|
24
28
|
export declare const UiFileInput: UiComponent
|
|
25
29
|
export declare const UiFormField: UiComponent
|
|
26
30
|
export declare const UiIconTile: UiComponent
|
|
@@ -30,6 +34,8 @@ export declare const UiListMenu: UiComponent
|
|
|
30
34
|
export declare const UiListMenuItem: UiComponent
|
|
31
35
|
export declare const UiModal: UiComponent
|
|
32
36
|
export declare const UiNumpad: UiComponent
|
|
37
|
+
export declare const UiPageHeader: UiComponent
|
|
38
|
+
export declare const UiPagination: UiComponent
|
|
33
39
|
export declare const UiPopup: UiComponent
|
|
34
40
|
export declare const UiProgressBar: UiComponent
|
|
35
41
|
export declare const UiPrompt: UiComponent
|
|
@@ -37,14 +43,23 @@ export declare const UiRadio: UiComponent
|
|
|
37
43
|
export declare const UiSectionHeading: UiComponent
|
|
38
44
|
export declare const UiSegmented: UiComponent
|
|
39
45
|
export declare const UiSelect: UiComponent
|
|
46
|
+
export declare const UiSidebar: UiComponent
|
|
47
|
+
export declare const UiSidebarGroup: UiComponent
|
|
48
|
+
export declare const UiSidebarItem: UiComponent
|
|
49
|
+
export declare const UiSkeleton: UiComponent
|
|
40
50
|
export declare const UiSlider: UiComponent
|
|
41
51
|
export declare const UiSpinner: UiComponent
|
|
52
|
+
export declare const UiSplitPane: UiComponent
|
|
53
|
+
export declare const UiStatCard: UiComponent
|
|
42
54
|
export declare const UiStepper: UiComponent
|
|
43
55
|
export declare const UiTable: UiComponent
|
|
56
|
+
export declare const UiTabs: UiComponent
|
|
44
57
|
export declare const UiThemeToggle: UiComponent
|
|
45
58
|
export declare const UiToast: UiComponent
|
|
46
59
|
export declare const UiToggle: UiComponent
|
|
47
60
|
export declare const UiTooltip: UiComponent
|
|
61
|
+
export declare const UiTree: UiComponent
|
|
62
|
+
export declare const UiVirtualList: UiComponent
|
|
48
63
|
export declare const UiIcon: UiComponent
|
|
49
64
|
|
|
50
65
|
export declare const components: Record<string, UiComponent>
|
|
@@ -72,7 +87,7 @@ export default NumoriUI
|
|
|
72
87
|
* are tree-shaken. Keys become the registered tag names verbatim.
|
|
73
88
|
*
|
|
74
89
|
* Prefer this over `NumoriUI` when bundle size matters: `app.use(NumoriUI)`
|
|
75
|
-
* references
|
|
90
|
+
* references every component and so bundles all of them.
|
|
76
91
|
*/
|
|
77
92
|
export declare function createNumoriUI(
|
|
78
93
|
components: Record<string, Component>,
|
package/dist/index.js
CHANGED
|
@@ -1,48 +1,63 @@
|
|
|
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$20 from "./icons/Icon.js";
|
|
5
5
|
import _sfc_main from "./components/Alert.js";
|
|
6
|
-
import _sfc_main$1 from "./components/
|
|
7
|
-
import _sfc_main$2 from "./components/
|
|
8
|
-
import _sfc_main$3 from "./components/
|
|
9
|
-
import _sfc_main$4 from "./components/
|
|
10
|
-
import _sfc_main$5 from "./components/
|
|
11
|
-
import _sfc_main$6 from "./components/
|
|
12
|
-
import _sfc_main$7 from "./components/
|
|
13
|
-
import _sfc_main$8 from "./components/
|
|
14
|
-
import _sfc_main$9 from "./components/
|
|
6
|
+
import _sfc_main$1 from "./components/AppShell.js";
|
|
7
|
+
import _sfc_main$2 from "./components/Avatar.js";
|
|
8
|
+
import _sfc_main$3 from "./components/Badge.js";
|
|
9
|
+
import _sfc_main$4 from "./components/Banner.js";
|
|
10
|
+
import _sfc_main$5 from "./components/Breadcrumb.js";
|
|
11
|
+
import _sfc_main$6 from "./components/Button.js";
|
|
12
|
+
import _sfc_main$7 from "./components/Card.js";
|
|
13
|
+
import _sfc_main$8 from "./components/Checkbox.js";
|
|
14
|
+
import _sfc_main$9 from "./components/CodeBlock.js";
|
|
15
|
+
import _sfc_main$10 from "./components/CopyField.js";
|
|
16
|
+
import _sfc_main$11 from "./components/DescriptionList.js";
|
|
17
|
+
import _sfc_main$12 from "./components/Divider.js";
|
|
15
18
|
import { useEventListener } from "./composables/useEventListener.js";
|
|
16
19
|
import { onClickOutside } from "./composables/onClickOutside.js";
|
|
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$
|
|
27
|
-
import _sfc_main$
|
|
20
|
+
import _sfc_main$13 from "./components/Dropdown.js";
|
|
21
|
+
import _sfc_main$14 from "./components/DropdownItem.js";
|
|
22
|
+
import _sfc_main$15 from "./components/DropdownRow.js";
|
|
23
|
+
import _sfc_main$16 from "./components/DropdownSubmenu.js";
|
|
24
|
+
import _sfc_main$17 from "./components/EmptyState.js";
|
|
25
|
+
import _sfc_main$18 from "./components/FileInput.js";
|
|
26
|
+
import _sfc_main$19 from "./components/FormField.js";
|
|
27
|
+
import _sfc_main$21 from "./components/IconTile.js";
|
|
28
|
+
import _sfc_main$22 from "./components/Input.js";
|
|
29
|
+
import _sfc_main$23 from "./components/Kbd.js";
|
|
30
|
+
import _sfc_main$24 from "./components/ListMenu.js";
|
|
31
|
+
import _sfc_main$25 from "./components/ListMenuItem.js";
|
|
28
32
|
import { useBackButton } from "./composables/useBackButton.js";
|
|
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$
|
|
41
|
-
import _sfc_main$
|
|
42
|
-
import _sfc_main$
|
|
43
|
-
import _sfc_main$
|
|
44
|
-
import _sfc_main$
|
|
45
|
-
import _sfc_main$
|
|
33
|
+
import _sfc_main$26 from "./components/Modal.js";
|
|
34
|
+
import _sfc_main$27 from "./components/Numpad.js";
|
|
35
|
+
import _sfc_main$28 from "./components/PageHeader.js";
|
|
36
|
+
import _sfc_main$29 from "./components/Pagination.js";
|
|
37
|
+
import _sfc_main$30 from "./components/Popup.js";
|
|
38
|
+
import _sfc_main$31 from "./components/ProgressBar.js";
|
|
39
|
+
import _sfc_main$32 from "./components/Prompt.js";
|
|
40
|
+
import _sfc_main$33 from "./components/Radio.js";
|
|
41
|
+
import _sfc_main$34 from "./components/SectionHeading.js";
|
|
42
|
+
import _sfc_main$35 from "./components/Segmented.js";
|
|
43
|
+
import _sfc_main$36 from "./components/Select.js";
|
|
44
|
+
import _sfc_main$37 from "./components/Sidebar.js";
|
|
45
|
+
import _sfc_main$38 from "./components/SidebarGroup.js";
|
|
46
|
+
import _sfc_main$39 from "./components/SidebarItem.js";
|
|
47
|
+
import _sfc_main$40 from "./components/Skeleton.js";
|
|
48
|
+
import _sfc_main$41 from "./components/Slider.js";
|
|
49
|
+
import _sfc_main$42 from "./components/Spinner.js";
|
|
50
|
+
import _sfc_main$43 from "./components/SplitPane.js";
|
|
51
|
+
import _sfc_main$44 from "./components/StatCard.js";
|
|
52
|
+
import _sfc_main$45 from "./components/Stepper.js";
|
|
53
|
+
import _sfc_main$46 from "./components/Table.js";
|
|
54
|
+
import _sfc_main$47 from "./components/Tabs.js";
|
|
55
|
+
import _sfc_main$48 from "./components/ThemeToggle.js";
|
|
56
|
+
import _sfc_main$49 from "./components/Toast.js";
|
|
57
|
+
import _sfc_main$50 from "./components/Toggle.js";
|
|
58
|
+
import _sfc_main$51 from "./components/Tooltip.js";
|
|
59
|
+
import _sfc_main$52 from "./components/Tree.js";
|
|
60
|
+
import _sfc_main$53 from "./components/VirtualList.js";
|
|
46
61
|
import { components } from "./components/index.js";
|
|
47
62
|
import { COMPONENT_NAMES, DEFAULT_PREFIX, componentEntries, prefixed } from "./manifest.js";
|
|
48
63
|
//#region src/index.js
|
|
@@ -162,6 +177,6 @@ function createNumoriUI(components = {}, options = {}) {
|
|
|
162
177
|
} };
|
|
163
178
|
}
|
|
164
179
|
//#endregion
|
|
165
|
-
export { COMPONENT_NAMES, DEFAULT_PREFIX, ICON_COMPONENT_KEY, MDI_VIEW_BOX, NumoriUI, NumoriUI as default, _sfc_main as UiAlert, _sfc_main$1 as
|
|
180
|
+
export { COMPONENT_NAMES, DEFAULT_PREFIX, ICON_COMPONENT_KEY, MDI_VIEW_BOX, NumoriUI, NumoriUI as default, _sfc_main as UiAlert, _sfc_main$1 as UiAppShell, _sfc_main$2 as UiAvatar, _sfc_main$3 as UiBadge, _sfc_main$4 as UiBanner, _sfc_main$5 as UiBreadcrumb, _sfc_main$6 as UiButton, _sfc_main$7 as UiCard, _sfc_main$8 as UiCheckbox, _sfc_main$9 as UiCodeBlock, _sfc_main$10 as UiCopyField, _sfc_main$11 as UiDescriptionList, _sfc_main$12 as UiDivider, _sfc_main$13 as UiDropdown, _sfc_main$14 as UiDropdownItem, _sfc_main$15 as UiDropdownRow, _sfc_main$16 as UiDropdownSubmenu, _sfc_main$17 as UiEmptyState, _sfc_main$18 as UiFileInput, _sfc_main$19 as UiFormField, _sfc_main$20 as UiIcon, _sfc_main$21 as UiIconTile, _sfc_main$22 as UiInput, _sfc_main$23 as UiKbd, _sfc_main$24 as UiListMenu, _sfc_main$25 as UiListMenuItem, _sfc_main$26 as UiModal, _sfc_main$27 as UiNumpad, _sfc_main$28 as UiPageHeader, _sfc_main$29 as UiPagination, _sfc_main$30 as UiPopup, _sfc_main$31 as UiProgressBar, _sfc_main$32 as UiPrompt, _sfc_main$33 as UiRadio, _sfc_main$34 as UiSectionHeading, _sfc_main$35 as UiSegmented, _sfc_main$36 as UiSelect, _sfc_main$37 as UiSidebar, _sfc_main$38 as UiSidebarGroup, _sfc_main$39 as UiSidebarItem, _sfc_main$40 as UiSkeleton, _sfc_main$41 as UiSlider, _sfc_main$42 as UiSpinner, _sfc_main$43 as UiSplitPane, _sfc_main$44 as UiStatCard, _sfc_main$45 as UiStepper, _sfc_main$46 as UiTable, _sfc_main$47 as UiTabs, _sfc_main$48 as UiThemeToggle, _sfc_main$49 as UiToast, _sfc_main$50 as UiToggle, _sfc_main$51 as UiTooltip, _sfc_main$52 as UiTree, _sfc_main$53 as UiVirtualList, componentEntries, components, createNumoriUI, iconRegistry, mdiIconNames, mdiPaths, onClickOutside, prefixed, provideIconComponent, registerIcons, resolveIconPath, useBackButton, useEventListener, useIconComponent };
|
|
166
181
|
|
|
167
182
|
//# 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,163 @@
|
|
|
1
|
+
import { nextTick, onBeforeUnmount, watch } from "vue";
|
|
2
|
+
//#region src/internal/focusTrap.js
|
|
3
|
+
/**
|
|
4
|
+
* Focus management for modal surfaces (`UiModal`, and anything built on it).
|
|
5
|
+
*
|
|
6
|
+
* A modal dialog has three keyboard obligations under the WAI-ARIA dialog
|
|
7
|
+
* pattern, and all three are easy to get subtly wrong:
|
|
8
|
+
*
|
|
9
|
+
* 1. **Move focus in** when it opens — otherwise a keyboard user is left on
|
|
10
|
+
* the button behind the backdrop, and a screen reader never announces the
|
|
11
|
+
* dialog.
|
|
12
|
+
* 2. **Keep focus in** while it is open — Tab from the last control wraps to
|
|
13
|
+
* the first, Shift+Tab from the first wraps to the last.
|
|
14
|
+
* 3. **Put focus back** when it closes, on whatever opened it.
|
|
15
|
+
*
|
|
16
|
+
* Escape also closes the dialog, unless the caller says otherwise.
|
|
17
|
+
*
|
|
18
|
+
* Dialogs can stack (a confirmation over a settings modal), and only the top
|
|
19
|
+
* one may react to Tab or Escape — so every trap registers on a module-level
|
|
20
|
+
* stack and a single listener dispatches to whichever is on top.
|
|
21
|
+
*
|
|
22
|
+
* That listener is on `window`, not `document`, deliberately: `window` is the
|
|
23
|
+
* last stop of a bubbling keydown, so a control inside the dialog that closes
|
|
24
|
+
* itself on Escape (an open `UiDropdown`, `UiSelect`'s search field) runs first
|
|
25
|
+
* and calls `preventDefault()`, and the dialog then leaves the key alone. One
|
|
26
|
+
* Escape closes one thing.
|
|
27
|
+
*
|
|
28
|
+
* Initial focus is only moved if nothing inside the container already has it.
|
|
29
|
+
* That lets a wrapper such as `UiPrompt` focus its confirm button without the
|
|
30
|
+
* trap then stealing focus back to the first control.
|
|
31
|
+
*
|
|
32
|
+
* SSR-safe: nothing touches `document` until the trap activates, which only
|
|
33
|
+
* happens in the browser.
|
|
34
|
+
*/
|
|
35
|
+
var FOCUSABLE = [
|
|
36
|
+
"a[href]",
|
|
37
|
+
"area[href]",
|
|
38
|
+
"button:not([disabled])",
|
|
39
|
+
"input:not([disabled]):not([type=\"hidden\"])",
|
|
40
|
+
"select:not([disabled])",
|
|
41
|
+
"textarea:not([disabled])",
|
|
42
|
+
"iframe",
|
|
43
|
+
"audio[controls]",
|
|
44
|
+
"video[controls]",
|
|
45
|
+
"[contenteditable]:not([contenteditable=\"false\"])",
|
|
46
|
+
"[tabindex]:not([tabindex=\"-1\"])"
|
|
47
|
+
].join(",");
|
|
48
|
+
/**
|
|
49
|
+
* Tabbable descendants of `container`, in DOM order, skipping anything hidden.
|
|
50
|
+
*
|
|
51
|
+
* @param {HTMLElement} container
|
|
52
|
+
* @returns {HTMLElement[]}
|
|
53
|
+
*/
|
|
54
|
+
function tabbableIn(container) {
|
|
55
|
+
if (!container) return [];
|
|
56
|
+
return [...container.querySelectorAll(FOCUSABLE)].filter((el) => !el.closest("[inert]") && el.getClientRects().length > 0);
|
|
57
|
+
}
|
|
58
|
+
/** @type {Array<{ container: () => HTMLElement | null, onEscape: (() => void) | null }>} */
|
|
59
|
+
var stack = [];
|
|
60
|
+
var listening = false;
|
|
61
|
+
function onWindowKeydown(event) {
|
|
62
|
+
const top = stack[stack.length - 1];
|
|
63
|
+
if (!top) return;
|
|
64
|
+
const container = top.container();
|
|
65
|
+
if (!container) return;
|
|
66
|
+
if (event.key === "Escape") {
|
|
67
|
+
if (event.defaultPrevented || !top.onEscape) return;
|
|
68
|
+
event.preventDefault();
|
|
69
|
+
top.onEscape();
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (event.key !== "Tab") return;
|
|
73
|
+
const items = tabbableIn(container);
|
|
74
|
+
if (items.length === 0) {
|
|
75
|
+
event.preventDefault();
|
|
76
|
+
container.focus();
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const first = items[0];
|
|
80
|
+
const last = items[items.length - 1];
|
|
81
|
+
const active = document.activeElement;
|
|
82
|
+
const inside = container.contains(active);
|
|
83
|
+
if (event.shiftKey && (active === first || !inside)) {
|
|
84
|
+
event.preventDefault();
|
|
85
|
+
last.focus();
|
|
86
|
+
} else if (!event.shiftKey && (active === last || !inside)) {
|
|
87
|
+
event.preventDefault();
|
|
88
|
+
first.focus();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function push(entry) {
|
|
92
|
+
stack.push(entry);
|
|
93
|
+
if (!listening) {
|
|
94
|
+
window.addEventListener("keydown", onWindowKeydown);
|
|
95
|
+
listening = true;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function remove(entry) {
|
|
99
|
+
const index = stack.indexOf(entry);
|
|
100
|
+
if (index !== -1) stack.splice(index, 1);
|
|
101
|
+
if (stack.length === 0 && listening) {
|
|
102
|
+
window.removeEventListener("keydown", onWindowKeydown);
|
|
103
|
+
listening = false;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Trap focus inside an element while `active()` is true.
|
|
108
|
+
*
|
|
109
|
+
* @param {() => HTMLElement | null | undefined} container Getter for the
|
|
110
|
+
* element focus is confined to. It must itself be focusable
|
|
111
|
+
* (`tabindex="-1"`) so there is somewhere to land when it has no controls.
|
|
112
|
+
* @param {object} options
|
|
113
|
+
* @param {() => boolean} options.active Whether the trap is engaged.
|
|
114
|
+
* @param {(() => boolean) | boolean} [options.escape] Whether Escape closes.
|
|
115
|
+
* @param {() => void} [options.onEscape] Called when Escape should close.
|
|
116
|
+
*/
|
|
117
|
+
function useFocusTrap(container, { active, escape = true, onEscape }) {
|
|
118
|
+
const entry = {
|
|
119
|
+
container: () => container() ?? null,
|
|
120
|
+
onEscape: null
|
|
121
|
+
};
|
|
122
|
+
let returnTo = null;
|
|
123
|
+
let engaged = false;
|
|
124
|
+
let lastEl = null;
|
|
125
|
+
const engage = () => {
|
|
126
|
+
if (engaged || typeof document === "undefined") return;
|
|
127
|
+
engaged = true;
|
|
128
|
+
returnTo = document.activeElement;
|
|
129
|
+
entry.onEscape = () => {
|
|
130
|
+
if (typeof escape === "function" ? escape() : escape) onEscape?.();
|
|
131
|
+
};
|
|
132
|
+
push(entry);
|
|
133
|
+
nextTick(() => {
|
|
134
|
+
const el = entry.container();
|
|
135
|
+
if (el) lastEl = el;
|
|
136
|
+
if (!el || el.contains(document.activeElement)) return;
|
|
137
|
+
const [first] = tabbableIn(el);
|
|
138
|
+
(first ?? el).focus({ preventScroll: true });
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
const release = () => {
|
|
142
|
+
if (!engaged) return;
|
|
143
|
+
engaged = false;
|
|
144
|
+
remove(entry);
|
|
145
|
+
const target = returnTo;
|
|
146
|
+
const closing = entry.container() ?? lastEl;
|
|
147
|
+
returnTo = null;
|
|
148
|
+
lastEl = null;
|
|
149
|
+
if (target && typeof target.focus === "function" && document.contains(target)) {
|
|
150
|
+
const current = document.activeElement;
|
|
151
|
+
if (!current || current === document.body || closing?.contains(current)) target.focus({ preventScroll: true });
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
watch(active, (on) => on ? engage() : release(), {
|
|
155
|
+
immediate: true,
|
|
156
|
+
flush: "post"
|
|
157
|
+
});
|
|
158
|
+
onBeforeUnmount(release);
|
|
159
|
+
}
|
|
160
|
+
//#endregion
|
|
161
|
+
export { tabbableIn, useFocusTrap };
|
|
162
|
+
|
|
163
|
+
//# sourceMappingURL=focusTrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focusTrap.js","names":[],"sources":["../../src/internal/focusTrap.js"],"sourcesContent":["/**\n * Focus management for modal surfaces (`UiModal`, and anything built on it).\n *\n * A modal dialog has three keyboard obligations under the WAI-ARIA dialog\n * pattern, and all three are easy to get subtly wrong:\n *\n * 1. **Move focus in** when it opens — otherwise a keyboard user is left on\n * the button behind the backdrop, and a screen reader never announces the\n * dialog.\n * 2. **Keep focus in** while it is open — Tab from the last control wraps to\n * the first, Shift+Tab from the first wraps to the last.\n * 3. **Put focus back** when it closes, on whatever opened it.\n *\n * Escape also closes the dialog, unless the caller says otherwise.\n *\n * Dialogs can stack (a confirmation over a settings modal), and only the top\n * one may react to Tab or Escape — so every trap registers on a module-level\n * stack and a single listener dispatches to whichever is on top.\n *\n * That listener is on `window`, not `document`, deliberately: `window` is the\n * last stop of a bubbling keydown, so a control inside the dialog that closes\n * itself on Escape (an open `UiDropdown`, `UiSelect`'s search field) runs first\n * and calls `preventDefault()`, and the dialog then leaves the key alone. One\n * Escape closes one thing.\n *\n * Initial focus is only moved if nothing inside the container already has it.\n * That lets a wrapper such as `UiPrompt` focus its confirm button without the\n * trap then stealing focus back to the first control.\n *\n * SSR-safe: nothing touches `document` until the trap activates, which only\n * happens in the browser.\n */\nimport { nextTick, onBeforeUnmount, watch } from 'vue'\n\n// ── Focusable elements ───────────────────────────────────────────────\n\nconst FOCUSABLE = [\n 'a[href]',\n 'area[href]',\n 'button:not([disabled])',\n 'input:not([disabled]):not([type=\"hidden\"])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'iframe',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]:not([contenteditable=\"false\"])',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',')\n\n/**\n * Tabbable descendants of `container`, in DOM order, skipping anything hidden.\n *\n * @param {HTMLElement} container\n * @returns {HTMLElement[]}\n */\nexport function tabbableIn(container) {\n if (!container) return []\n return [...container.querySelectorAll(FOCUSABLE)].filter(\n (el) => !el.closest('[inert]') && el.getClientRects().length > 0,\n )\n}\n\n// ── The stack of active traps ────────────────────────────────────────\n\n/** @type {Array<{ container: () => HTMLElement | null, onEscape: (() => void) | null }>} */\nconst stack = []\nlet listening = false\n\nfunction onWindowKeydown(event) {\n const top = stack[stack.length - 1]\n if (!top) return\n const container = top.container()\n if (!container) return\n\n if (event.key === 'Escape') {\n // A control inside the dialog (an open select, a search field) may have\n // handled Escape already; respect that rather than closing over it.\n if (event.defaultPrevented || !top.onEscape) return\n event.preventDefault()\n top.onEscape()\n return\n }\n\n if (event.key !== 'Tab') return\n const items = tabbableIn(container)\n if (items.length === 0) {\n event.preventDefault()\n container.focus()\n return\n }\n const first = items[0]\n const last = items[items.length - 1]\n const active = document.activeElement\n const inside = container.contains(active)\n if (event.shiftKey && (active === first || !inside)) {\n event.preventDefault()\n last.focus()\n } else if (!event.shiftKey && (active === last || !inside)) {\n event.preventDefault()\n first.focus()\n }\n}\n\nfunction push(entry) {\n stack.push(entry)\n if (!listening) {\n window.addEventListener('keydown', onWindowKeydown)\n listening = true\n }\n}\n\nfunction remove(entry) {\n const index = stack.indexOf(entry)\n if (index !== -1) stack.splice(index, 1)\n if (stack.length === 0 && listening) {\n window.removeEventListener('keydown', onWindowKeydown)\n listening = false\n }\n}\n\n// ── Composable ───────────────────────────────────────────────────────\n\n/**\n * Trap focus inside an element while `active()` is true.\n *\n * @param {() => HTMLElement | null | undefined} container Getter for the\n * element focus is confined to. It must itself be focusable\n * (`tabindex=\"-1\"`) so there is somewhere to land when it has no controls.\n * @param {object} options\n * @param {() => boolean} options.active Whether the trap is engaged.\n * @param {(() => boolean) | boolean} [options.escape] Whether Escape closes.\n * @param {() => void} [options.onEscape] Called when Escape should close.\n */\nexport function useFocusTrap(container, { active, escape = true, onEscape }) {\n const entry = {\n container: () => container() ?? null,\n onEscape: null,\n }\n let returnTo = null\n let engaged = false\n // The element as it was while open. A template ref is cleared the moment its\n // owner starts leaving, but a Transition keeps the element (and the focus\n // inside it) on screen for the length of the leave animation.\n let lastEl = null\n\n const engage = () => {\n if (engaged || typeof document === 'undefined') return\n engaged = true\n returnTo = document.activeElement\n entry.onEscape = () => {\n const allowed = typeof escape === 'function' ? escape() : escape\n if (allowed) onEscape?.()\n }\n push(entry)\n nextTick(() => {\n const el = entry.container()\n if (el) lastEl = el\n if (!el || el.contains(document.activeElement)) return\n const [first] = tabbableIn(el)\n ;(first ?? el).focus({ preventScroll: true })\n })\n }\n\n const release = () => {\n if (!engaged) return\n engaged = false\n remove(entry)\n const target = returnTo\n const closing = entry.container() ?? lastEl\n returnTo = null\n lastEl = null\n // Only restore if focus is still lost inside the closing surface or on the\n // body — never yank it away from somewhere the user has since moved to.\n if (target && typeof target.focus === 'function' && document.contains(target)) {\n const current = document.activeElement\n if (!current || current === document.body || closing?.contains(current)) {\n target.focus({ preventScroll: true })\n }\n }\n }\n\n watch(active, (on) => (on ? engage() : release()), { immediate: true, flush: 'post' })\n onBeforeUnmount(release)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,IAAM,YAAY;CAChB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;;;;;;;AAQV,SAAgB,WAAW,WAAW;CACpC,IAAI,CAAC,WAAW,OAAO,CAAC;CACxB,OAAO,CAAC,GAAG,UAAU,iBAAiB,SAAS,CAAC,CAAC,CAAC,QAC/C,OAAO,CAAC,GAAG,QAAQ,SAAS,KAAK,GAAG,eAAe,CAAC,CAAC,SAAS,CACjE;AACF;;AAKA,IAAM,QAAQ,CAAC;AACf,IAAI,YAAY;AAEhB,SAAS,gBAAgB,OAAO;CAC9B,MAAM,MAAM,MAAM,MAAM,SAAS;CACjC,IAAI,CAAC,KAAK;CACV,MAAM,YAAY,IAAI,UAAU;CAChC,IAAI,CAAC,WAAW;CAEhB,IAAI,MAAM,QAAQ,UAAU;EAG1B,IAAI,MAAM,oBAAoB,CAAC,IAAI,UAAU;EAC7C,MAAM,eAAe;EACrB,IAAI,SAAS;EACb;CACF;CAEA,IAAI,MAAM,QAAQ,OAAO;CACzB,MAAM,QAAQ,WAAW,SAAS;CAClC,IAAI,MAAM,WAAW,GAAG;EACtB,MAAM,eAAe;EACrB,UAAU,MAAM;EAChB;CACF;CACA,MAAM,QAAQ,MAAM;CACpB,MAAM,OAAO,MAAM,MAAM,SAAS;CAClC,MAAM,SAAS,SAAS;CACxB,MAAM,SAAS,UAAU,SAAS,MAAM;CACxC,IAAI,MAAM,aAAa,WAAW,SAAS,CAAC,SAAS;EACnD,MAAM,eAAe;EACrB,KAAK,MAAM;CACb,OAAO,IAAI,CAAC,MAAM,aAAa,WAAW,QAAQ,CAAC,SAAS;EAC1D,MAAM,eAAe;EACrB,MAAM,MAAM;CACd;AACF;AAEA,SAAS,KAAK,OAAO;CACnB,MAAM,KAAK,KAAK;CAChB,IAAI,CAAC,WAAW;EACd,OAAO,iBAAiB,WAAW,eAAe;EAClD,YAAY;CACd;AACF;AAEA,SAAS,OAAO,OAAO;CACrB,MAAM,QAAQ,MAAM,QAAQ,KAAK;CACjC,IAAI,UAAU,IAAI,MAAM,OAAO,OAAO,CAAC;CACvC,IAAI,MAAM,WAAW,KAAK,WAAW;EACnC,OAAO,oBAAoB,WAAW,eAAe;EACrD,YAAY;CACd;AACF;;;;;;;;;;;;AAeA,SAAgB,aAAa,WAAW,EAAE,QAAQ,SAAS,MAAM,YAAY;CAC3E,MAAM,QAAQ;EACZ,iBAAiB,UAAU,KAAK;EAChC,UAAU;CACZ;CACA,IAAI,WAAW;CACf,IAAI,UAAU;CAId,IAAI,SAAS;CAEb,MAAM,eAAe;EACnB,IAAI,WAAW,OAAO,aAAa,aAAa;EAChD,UAAU;EACV,WAAW,SAAS;EACpB,MAAM,iBAAiB;GAErB,IADgB,OAAO,WAAW,aAAa,OAAO,IAAI,QAC7C,WAAW;EAC1B;EACA,KAAK,KAAK;EACV,eAAe;GACb,MAAM,KAAK,MAAM,UAAU;GAC3B,IAAI,IAAI,SAAS;GACjB,IAAI,CAAC,MAAM,GAAG,SAAS,SAAS,aAAa,GAAG;GAChD,MAAM,CAAC,SAAS,WAAW,EAAE;GAC5B,CAAC,SAAS,GAAA,CAAI,MAAM,EAAE,eAAe,KAAK,CAAC;EAC9C,CAAC;CACH;CAEA,MAAM,gBAAgB;EACpB,IAAI,CAAC,SAAS;EACd,UAAU;EACV,OAAO,KAAK;EACZ,MAAM,SAAS;EACf,MAAM,UAAU,MAAM,UAAU,KAAK;EACrC,WAAW;EACX,SAAS;EAGT,IAAI,UAAU,OAAO,OAAO,UAAU,cAAc,SAAS,SAAS,MAAM,GAAG;GAC7E,MAAM,UAAU,SAAS;GACzB,IAAI,CAAC,WAAW,YAAY,SAAS,QAAQ,SAAS,SAAS,OAAO,GACpE,OAAO,MAAM,EAAE,eAAe,KAAK,CAAC;EAExC;CACF;CAEA,MAAM,SAAS,OAAQ,KAAK,OAAO,IAAI,QAAQ,GAAI;EAAE,WAAW;EAAM,OAAO;CAAO,CAAC;CACrF,gBAAgB,OAAO;AACzB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { inject } from "vue";
|
|
2
|
+
//#region src/internal/formField.js
|
|
3
|
+
/**
|
|
4
|
+
* Link between UiFormField and the control inside it.
|
|
5
|
+
*
|
|
6
|
+
* UiFormField provides the id its `<label for>` points at, plus the ids of its
|
|
7
|
+
* hint and error text; each form control injects them and sets `id`,
|
|
8
|
+
* `aria-describedby` and `aria-invalid` on its real control element. That is
|
|
9
|
+
* what makes the label, hint and error reach assistive technology.
|
|
10
|
+
*/
|
|
11
|
+
var FORM_FIELD_KEY = "numori-ui:form-field";
|
|
12
|
+
/**
|
|
13
|
+
* @returns {null | {
|
|
14
|
+
* controlId: import('vue').ComputedRef<string>,
|
|
15
|
+
* labelId: string,
|
|
16
|
+
* describedBy: import('vue').ComputedRef<string | undefined>,
|
|
17
|
+
* invalid: import('vue').ComputedRef<boolean>,
|
|
18
|
+
* }}
|
|
19
|
+
*/
|
|
20
|
+
function useFormField() {
|
|
21
|
+
return inject(FORM_FIELD_KEY, null);
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { FORM_FIELD_KEY, useFormField };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=formField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formField.js","names":[],"sources":["../../src/internal/formField.js"],"sourcesContent":["import { inject } from 'vue'\n\n/**\n * Link between UiFormField and the control inside it.\n *\n * UiFormField provides the id its `<label for>` points at, plus the ids of its\n * hint and error text; each form control injects them and sets `id`,\n * `aria-describedby` and `aria-invalid` on its real control element. That is\n * what makes the label, hint and error reach assistive technology.\n */\nexport const FORM_FIELD_KEY = 'numori-ui:form-field'\n\n/**\n * @returns {null | {\n * controlId: import('vue').ComputedRef<string>,\n * labelId: string,\n * describedBy: import('vue').ComputedRef<string | undefined>,\n * invalid: import('vue').ComputedRef<boolean>,\n * }}\n */\nexport function useFormField() {\n return inject(FORM_FIELD_KEY, null)\n}\n"],"mappings":";;;;;;;;;;AAUA,IAAa,iBAAiB;;;;;;;;;AAU9B,SAAgB,eAAe;CAC7B,OAAO,OAAO,gBAAgB,IAAI;AACpC"}
|
package/dist/manifest.js
CHANGED
|
@@ -20,6 +20,7 @@ var DEFAULT_PREFIX = "Ui";
|
|
|
20
20
|
*/
|
|
21
21
|
var COMPONENT_NAMES = [
|
|
22
22
|
"Alert",
|
|
23
|
+
"AppShell",
|
|
23
24
|
"Avatar",
|
|
24
25
|
"Badge",
|
|
25
26
|
"Banner",
|
|
@@ -28,11 +29,14 @@ var COMPONENT_NAMES = [
|
|
|
28
29
|
"Card",
|
|
29
30
|
"Checkbox",
|
|
30
31
|
"CodeBlock",
|
|
32
|
+
"CopyField",
|
|
33
|
+
"DescriptionList",
|
|
31
34
|
"Divider",
|
|
32
35
|
"Dropdown",
|
|
33
36
|
"DropdownItem",
|
|
34
37
|
"DropdownRow",
|
|
35
38
|
"DropdownSubmenu",
|
|
39
|
+
"EmptyState",
|
|
36
40
|
"FileInput",
|
|
37
41
|
"FormField",
|
|
38
42
|
"IconTile",
|
|
@@ -42,6 +46,8 @@ var COMPONENT_NAMES = [
|
|
|
42
46
|
"ListMenuItem",
|
|
43
47
|
"Modal",
|
|
44
48
|
"Numpad",
|
|
49
|
+
"PageHeader",
|
|
50
|
+
"Pagination",
|
|
45
51
|
"Popup",
|
|
46
52
|
"ProgressBar",
|
|
47
53
|
"Prompt",
|
|
@@ -49,14 +55,23 @@ var COMPONENT_NAMES = [
|
|
|
49
55
|
"SectionHeading",
|
|
50
56
|
"Segmented",
|
|
51
57
|
"Select",
|
|
58
|
+
"Sidebar",
|
|
59
|
+
"SidebarGroup",
|
|
60
|
+
"SidebarItem",
|
|
61
|
+
"Skeleton",
|
|
52
62
|
"Slider",
|
|
53
63
|
"Spinner",
|
|
64
|
+
"SplitPane",
|
|
65
|
+
"StatCard",
|
|
54
66
|
"Stepper",
|
|
55
67
|
"Table",
|
|
68
|
+
"Tabs",
|
|
56
69
|
"ThemeToggle",
|
|
57
70
|
"Toast",
|
|
58
71
|
"Toggle",
|
|
59
|
-
"Tooltip"
|
|
72
|
+
"Tooltip",
|
|
73
|
+
"Tree",
|
|
74
|
+
"VirtualList"
|
|
60
75
|
];
|
|
61
76
|
/**
|
|
62
77
|
* The icon component is listed separately: it lives outside `components/`
|
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 '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"}
|
|
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 'AppShell',\n 'Avatar',\n 'Badge',\n 'Banner',\n 'Breadcrumb',\n 'Button',\n 'Card',\n 'Checkbox',\n 'CodeBlock',\n 'CopyField',\n 'DescriptionList',\n 'Divider',\n 'Dropdown',\n 'DropdownItem',\n 'DropdownRow',\n 'DropdownSubmenu',\n 'EmptyState',\n 'FileInput',\n 'FormField',\n 'IconTile',\n 'Input',\n 'Kbd',\n 'ListMenu',\n 'ListMenuItem',\n 'Modal',\n 'Numpad',\n 'PageHeader',\n 'Pagination',\n 'Popup',\n 'ProgressBar',\n 'Prompt',\n 'Radio',\n 'SectionHeading',\n 'Segmented',\n 'Select',\n 'Sidebar',\n 'SidebarGroup',\n 'SidebarItem',\n 'Skeleton',\n 'Slider',\n 'Spinner',\n 'SplitPane',\n 'StatCard',\n 'Stepper',\n 'Table',\n 'Tabs',\n 'ThemeToggle',\n 'Toast',\n 'Toggle',\n 'Tooltip',\n 'Tree',\n 'VirtualList',\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;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