numori-ui 0.3.0 → 0.5.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 +148 -0
- package/README.md +36 -34
- package/dist/components/AppShell.js +234 -0
- package/dist/components/AppShell.js.map +1 -0
- package/dist/components/Banner.js +29 -32
- package/dist/components/Banner.js.map +1 -1
- 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 +13 -9
- 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 +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/EmptyState.js +123 -0
- package/dist/components/EmptyState.js.map +1 -0
- package/dist/components/FileInput.js +12 -4
- package/dist/components/FileInput.js.map +1 -1
- package/dist/components/FormField.js +43 -13
- package/dist/components/FormField.js.map +1 -1
- package/dist/components/IconTile.js +5 -9
- package/dist/components/IconTile.js.map +1 -1
- package/dist/components/Input.js +21 -7
- 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/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/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 +109 -27
- package/dist/components/Segmented.js.map +1 -1
- package/dist/components/Select.js +16 -5
- 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/StatCard.js +185 -0
- package/dist/components/StatCard.js.map +1 -0
- package/dist/components/Table.js +306 -0
- package/dist/components/Table.js.map +1 -0
- 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/index.js +91 -76
- 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 +11 -0
- package/dist/icons/mdi.js.map +1 -1
- package/dist/index.d.ts +13 -3
- package/dist/index.js +47 -37
- 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/formField.js +26 -0
- package/dist/internal/formField.js.map +1 -0
- package/dist/internal/menu.js +20 -0
- package/dist/internal/menu.js.map +1 -0
- package/dist/manifest.js +12 -2
- package/dist/manifest.js.map +1 -1
- package/package.json +2 -1
- package/src/components/AppShell.vue +231 -0
- package/src/components/Banner.vue +20 -9
- package/src/components/Button.vue +12 -19
- package/src/components/Card.vue +11 -12
- package/src/components/Checkbox.vue +7 -10
- package/src/components/CopyField.vue +178 -0
- package/src/components/DescriptionList.vue +114 -0
- package/src/components/Dropdown.vue +14 -2
- package/src/components/DropdownSubmenu.vue +4 -2
- package/src/components/EmptyState.vue +107 -0
- package/src/components/FileInput.vue +19 -4
- package/src/components/FormField.vue +37 -4
- package/src/components/IconTile.vue +4 -9
- package/src/components/Input.vue +15 -6
- package/src/components/ListMenuItem.vue +21 -5
- package/src/components/Numpad.vue +7 -4
- package/src/components/PageHeader.vue +102 -0
- package/src/components/Pagination.vue +199 -0
- package/src/components/Popup.vue +6 -2
- package/src/components/Radio.vue +2 -10
- package/src/components/Segmented.vue +113 -38
- package/src/components/Select.vue +16 -2
- package/src/components/Sidebar.vue +61 -0
- package/src/components/SidebarGroup.vue +43 -0
- package/src/components/SidebarItem.vue +159 -0
- package/src/components/StatCard.vue +165 -0
- package/src/components/Table.vue +323 -0
- package/src/components/Tabs.vue +217 -0
- package/src/components/Toggle.vue +5 -0
- package/src/components/index.js +36 -11
- package/src/composables/useMergedClasses.js +49 -0
- package/src/icons/mdi.js +11 -0
- package/src/internal/controlSizes.js +17 -0
- package/src/internal/formField.js +23 -0
- package/src/internal/menu.js +16 -0
- package/src/manifest.js +12 -2
- package/dist/components/ButtonsGroup.js +0 -153
- package/dist/components/ButtonsGroup.js.map +0 -1
- package/dist/components/ComparisonTable.js +0 -152
- package/dist/components/ComparisonTable.js.map +0 -1
- package/src/components/ButtonsGroup.vue +0 -140
- package/src/components/ComparisonTable.vue +0 -141
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import _sfc_main$1 from "../icons/Icon.js";
|
|
2
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, nextTick, normalizeClass, openBlock, renderList, renderSlot, toDisplayString, useId } from "vue";
|
|
3
|
+
//#region src/components/Tabs.vue
|
|
4
|
+
var _hoisted_1 = ["aria-label"];
|
|
5
|
+
var _hoisted_2 = [
|
|
6
|
+
"id",
|
|
7
|
+
"aria-selected",
|
|
8
|
+
"aria-controls",
|
|
9
|
+
"tabindex",
|
|
10
|
+
"disabled",
|
|
11
|
+
"onClick"
|
|
12
|
+
];
|
|
13
|
+
var _hoisted_3 = ["aria-labelledby"];
|
|
14
|
+
var _sfc_main = {
|
|
15
|
+
__name: "Tabs",
|
|
16
|
+
props: {
|
|
17
|
+
/**
|
|
18
|
+
* Value of the active tab.
|
|
19
|
+
* @type {string}
|
|
20
|
+
* @default ''
|
|
21
|
+
*/
|
|
22
|
+
modelValue: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: ""
|
|
25
|
+
},
|
|
26
|
+
/**
|
|
27
|
+
* Tabs, left to right. Each is `{ value, label, icon?, badge?, disabled? }`.
|
|
28
|
+
* @type {Array<{ value: string, label: string, icon?: string, badge?: string | number, disabled?: boolean }>}
|
|
29
|
+
*/
|
|
30
|
+
tabs: {
|
|
31
|
+
type: Array,
|
|
32
|
+
required: true
|
|
33
|
+
},
|
|
34
|
+
/**
|
|
35
|
+
* Accessible name of the tab list.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @default ''
|
|
38
|
+
*/
|
|
39
|
+
ariaLabel: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: ""
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* Visual style.
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @default 'line'
|
|
47
|
+
* @values 'line' | 'pill'
|
|
48
|
+
*/
|
|
49
|
+
variant: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: "line"
|
|
52
|
+
},
|
|
53
|
+
/**
|
|
54
|
+
* Render a `tabpanel` holding the default slot. Turn off when the tabs only
|
|
55
|
+
* navigate and the content is rendered elsewhere.
|
|
56
|
+
* @type {boolean}
|
|
57
|
+
* @default true
|
|
58
|
+
*/
|
|
59
|
+
panel: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: true
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* Classes for the panel.
|
|
65
|
+
* @type {string}
|
|
66
|
+
* @default 'pt-6'
|
|
67
|
+
*/
|
|
68
|
+
panelClass: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: "pt-6"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
emits: ["update:modelValue"],
|
|
74
|
+
setup(__props, { emit: __emit }) {
|
|
75
|
+
/**
|
|
76
|
+
* UiTabs — an accessible tab list, with an optional panel for the active tab.
|
|
77
|
+
*
|
|
78
|
+
* Implements the WAI-ARIA tabs pattern: `role="tablist"` / `"tab"` /
|
|
79
|
+
* `"tabpanel"`, a single tab stop (roving `tabindex`), and arrow keys, Home and
|
|
80
|
+
* End to move between tabs. Moving with the keyboard selects the tab
|
|
81
|
+
* (automatic activation), skipping disabled tabs.
|
|
82
|
+
*
|
|
83
|
+
* Render the panel through the default slot, which receives the active value.
|
|
84
|
+
* When the content lives elsewhere — a routed `<RouterView>` below the tabs,
|
|
85
|
+
* say — set `:panel="false"` and use the tabs as navigation only.
|
|
86
|
+
*
|
|
87
|
+
* Two looks: `line` (an underline under the active tab, for page sections) and
|
|
88
|
+
* `pill` (a segmented track, for compact switches inside cards).
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* <UiTabs
|
|
92
|
+
* v-model="tab"
|
|
93
|
+
* aria-label="App sections"
|
|
94
|
+
* :tabs="[
|
|
95
|
+
* { value: 'overview', label: 'Overview', icon: 'mdi:view-grid' },
|
|
96
|
+
* { value: 'keys', label: 'Keys', badge: 2 },
|
|
97
|
+
* { value: 'danger', label: 'Danger zone' },
|
|
98
|
+
* ]"
|
|
99
|
+
* >
|
|
100
|
+
* <template #default="{ active }">
|
|
101
|
+
* <OverviewPanel v-if="active === 'overview'" />
|
|
102
|
+
* <KeysPanel v-else-if="active === 'keys'" />
|
|
103
|
+
* </template>
|
|
104
|
+
* </UiTabs>
|
|
105
|
+
*
|
|
106
|
+
* @emits {string} update:modelValue — The selected tab's value.
|
|
107
|
+
*
|
|
108
|
+
* @slot default — Panel content. Scope: `{ active }`.
|
|
109
|
+
*/
|
|
110
|
+
const props = __props;
|
|
111
|
+
const emit = __emit;
|
|
112
|
+
const baseId = useId();
|
|
113
|
+
const panelId = `${baseId}-panel`;
|
|
114
|
+
const tabId = (index) => `${baseId}-tab-${index}`;
|
|
115
|
+
/** Template refs, written by the function ref on each button. */
|
|
116
|
+
const tabEls = [];
|
|
117
|
+
const activeIndex = computed(() => props.tabs.findIndex((t) => t.value === props.modelValue));
|
|
118
|
+
/** The tab that holds the single tab stop: the active one, else the first enabled. */
|
|
119
|
+
const focusIndex = computed(() => {
|
|
120
|
+
if (activeIndex.value >= 0 && !props.tabs[activeIndex.value].disabled) return activeIndex.value;
|
|
121
|
+
return props.tabs.findIndex((t) => !t.disabled);
|
|
122
|
+
});
|
|
123
|
+
function select(index) {
|
|
124
|
+
const tab = props.tabs[index];
|
|
125
|
+
if (!tab || tab.disabled) return;
|
|
126
|
+
if (tab.value !== props.modelValue) emit("update:modelValue", tab.value);
|
|
127
|
+
}
|
|
128
|
+
function step(from, delta) {
|
|
129
|
+
const count = props.tabs.length;
|
|
130
|
+
for (let i = 1; i <= count; i++) {
|
|
131
|
+
const next = (from + delta * i + count * i) % count;
|
|
132
|
+
if (!props.tabs[next].disabled) return next;
|
|
133
|
+
}
|
|
134
|
+
return from;
|
|
135
|
+
}
|
|
136
|
+
function onKeydown(event) {
|
|
137
|
+
const current = tabEls.indexOf(event.target);
|
|
138
|
+
if (current < 0) return;
|
|
139
|
+
let next = null;
|
|
140
|
+
if (event.key === "ArrowRight" || event.key === "ArrowDown") next = step(current, 1);
|
|
141
|
+
else if (event.key === "ArrowLeft" || event.key === "ArrowUp") next = step(current, -1);
|
|
142
|
+
else if (event.key === "Home") next = props.tabs.findIndex((t) => !t.disabled);
|
|
143
|
+
else if (event.key === "End") {
|
|
144
|
+
for (let i = props.tabs.length - 1; i >= 0; i--) if (!props.tabs[i].disabled) {
|
|
145
|
+
next = i;
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
if (next === null || next < 0) return;
|
|
150
|
+
event.preventDefault();
|
|
151
|
+
select(next);
|
|
152
|
+
nextTick(() => tabEls[next]?.focus());
|
|
153
|
+
}
|
|
154
|
+
const listClass = computed(() => props.variant === "pill" ? "inline-flex max-w-full gap-1 overflow-x-auto rounded-xl bg-gray-100 p-1 dark:bg-gray-800" : "flex gap-6 overflow-x-auto border-b border-gray-200 dark:border-gray-800");
|
|
155
|
+
function tabClass(index, tab) {
|
|
156
|
+
const active = index === activeIndex.value;
|
|
157
|
+
const base = "inline-flex shrink-0 items-center gap-2 text-sm font-medium whitespace-nowrap transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 disabled:cursor-not-allowed disabled:opacity-40";
|
|
158
|
+
if (props.variant === "pill") return [
|
|
159
|
+
base,
|
|
160
|
+
"rounded-lg px-3 py-1.5",
|
|
161
|
+
active ? "bg-white text-gray-900 shadow-sm dark:bg-gray-900 dark:text-gray-100" : "text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100"
|
|
162
|
+
];
|
|
163
|
+
return [
|
|
164
|
+
base,
|
|
165
|
+
"-mb-px border-b-2 px-1 py-3",
|
|
166
|
+
active ? "border-primary-500 text-primary-600 dark:border-primary-400 dark:text-primary-300" : "border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-800 dark:text-gray-400 dark:hover:border-gray-600 dark:hover:text-gray-200",
|
|
167
|
+
tab.disabled ? "hover:border-transparent" : ""
|
|
168
|
+
];
|
|
169
|
+
}
|
|
170
|
+
return (_ctx, _cache) => {
|
|
171
|
+
return openBlock(), createElementBlock("div", null, [createElementVNode("div", {
|
|
172
|
+
role: "tablist",
|
|
173
|
+
"aria-label": __props.ariaLabel || void 0,
|
|
174
|
+
class: normalizeClass(listClass.value),
|
|
175
|
+
onKeydown
|
|
176
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.tabs, (tab, index) => {
|
|
177
|
+
return openBlock(), createElementBlock("button", {
|
|
178
|
+
id: tabId(index),
|
|
179
|
+
key: tab.value,
|
|
180
|
+
ref_for: true,
|
|
181
|
+
ref: (el) => tabEls[index] = el,
|
|
182
|
+
type: "button",
|
|
183
|
+
role: "tab",
|
|
184
|
+
"aria-selected": index === activeIndex.value ? "true" : "false",
|
|
185
|
+
"aria-controls": __props.panel ? panelId : void 0,
|
|
186
|
+
tabindex: index === focusIndex.value ? 0 : -1,
|
|
187
|
+
disabled: tab.disabled,
|
|
188
|
+
class: normalizeClass(tabClass(index, tab)),
|
|
189
|
+
onClick: ($event) => select(index)
|
|
190
|
+
}, [
|
|
191
|
+
tab.icon ? (openBlock(), createBlock(_sfc_main$1, {
|
|
192
|
+
key: 0,
|
|
193
|
+
name: tab.icon,
|
|
194
|
+
class: "size-4 shrink-0"
|
|
195
|
+
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
196
|
+
createElementVNode("span", null, toDisplayString(tab.label), 1),
|
|
197
|
+
tab.badge !== void 0 && tab.badge !== null && tab.badge !== "" ? (openBlock(), createElementBlock("span", {
|
|
198
|
+
key: 1,
|
|
199
|
+
class: normalizeClass(["inline-flex min-w-5 items-center justify-center rounded-full px-1.5 text-xs font-semibold tabular-nums", index === activeIndex.value ? "bg-primary-100 text-primary-700 dark:bg-primary-400/20 dark:text-primary-200" : "bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-300"])
|
|
200
|
+
}, toDisplayString(tab.badge), 3)) : createCommentVNode("", true)
|
|
201
|
+
], 10, _hoisted_2);
|
|
202
|
+
}), 128))], 42, _hoisted_1), __props.panel ? (openBlock(), createElementBlock("div", {
|
|
203
|
+
key: 0,
|
|
204
|
+
id: panelId,
|
|
205
|
+
role: "tabpanel",
|
|
206
|
+
"aria-labelledby": activeIndex.value >= 0 ? tabId(activeIndex.value) : void 0,
|
|
207
|
+
tabindex: "0",
|
|
208
|
+
class: normalizeClass(["focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-primary-500", __props.panelClass])
|
|
209
|
+
}, [renderSlot(_ctx.$slots, "default", { active: __props.modelValue })], 10, _hoisted_3)) : createCommentVNode("", true)]);
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
//#endregion
|
|
214
|
+
export { _sfc_main as default };
|
|
215
|
+
|
|
216
|
+
//# sourceMappingURL=Tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.js","names":[],"sources":["../../src/components/Tabs.vue"],"sourcesContent":["<template>\n <div>\n <div\n role=\"tablist\"\n :aria-label=\"ariaLabel || undefined\"\n :class=\"listClass\"\n @keydown=\"onKeydown\"\n >\n <button\n v-for=\"(tab, index) in tabs\"\n :id=\"tabId(index)\"\n :key=\"tab.value\"\n :ref=\"(el) => (tabEls[index] = el)\"\n type=\"button\"\n role=\"tab\"\n :aria-selected=\"index === activeIndex ? 'true' : 'false'\"\n :aria-controls=\"panel ? panelId : undefined\"\n :tabindex=\"index === focusIndex ? 0 : -1\"\n :disabled=\"tab.disabled\"\n :class=\"tabClass(index, tab)\"\n @click=\"select(index)\"\n >\n <UiIcon v-if=\"tab.icon\" :name=\"tab.icon\" class=\"size-4 shrink-0\" />\n <span>{{ tab.label }}</span>\n <span\n v-if=\"tab.badge !== undefined && tab.badge !== null && tab.badge !== ''\"\n class=\"inline-flex min-w-5 items-center justify-center rounded-full px-1.5 text-xs font-semibold tabular-nums\"\n :class=\"\n index === activeIndex\n ? 'bg-primary-100 text-primary-700 dark:bg-primary-400/20 dark:text-primary-200'\n : 'bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-300'\n \"\n >{{ tab.badge }}</span\n >\n </button>\n </div>\n\n <div\n v-if=\"panel\"\n :id=\"panelId\"\n role=\"tabpanel\"\n :aria-labelledby=\"activeIndex >= 0 ? tabId(activeIndex) : undefined\"\n tabindex=\"0\"\n class=\"focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-primary-500\"\n :class=\"panelClass\"\n >\n <slot :active=\"modelValue\" />\n </div>\n </div>\n</template>\n\n<script setup>\n/**\n * UiTabs — an accessible tab list, with an optional panel for the active tab.\n *\n * Implements the WAI-ARIA tabs pattern: `role=\"tablist\"` / `\"tab\"` /\n * `\"tabpanel\"`, a single tab stop (roving `tabindex`), and arrow keys, Home and\n * End to move between tabs. Moving with the keyboard selects the tab\n * (automatic activation), skipping disabled tabs.\n *\n * Render the panel through the default slot, which receives the active value.\n * When the content lives elsewhere — a routed `<RouterView>` below the tabs,\n * say — set `:panel=\"false\"` and use the tabs as navigation only.\n *\n * Two looks: `line` (an underline under the active tab, for page sections) and\n * `pill` (a segmented track, for compact switches inside cards).\n *\n * @example\n * <UiTabs\n * v-model=\"tab\"\n * aria-label=\"App sections\"\n * :tabs=\"[\n * { value: 'overview', label: 'Overview', icon: 'mdi:view-grid' },\n * { value: 'keys', label: 'Keys', badge: 2 },\n * { value: 'danger', label: 'Danger zone' },\n * ]\"\n * >\n * <template #default=\"{ active }\">\n * <OverviewPanel v-if=\"active === 'overview'\" />\n * <KeysPanel v-else-if=\"active === 'keys'\" />\n * </template>\n * </UiTabs>\n *\n * @emits {string} update:modelValue — The selected tab's value.\n *\n * @slot default — Panel content. Scope: `{ active }`.\n */\nimport { computed, nextTick, useId } from 'vue'\nimport UiIcon from '../icons/Icon.vue'\n\nconst props = defineProps({\n /**\n * Value of the active tab.\n * @type {string}\n * @default ''\n */\n modelValue: { type: String, default: '' },\n\n /**\n * Tabs, left to right. Each is `{ value, label, icon?, badge?, disabled? }`.\n * @type {Array<{ value: string, label: string, icon?: string, badge?: string | number, disabled?: boolean }>}\n */\n tabs: { type: Array, required: true },\n\n /**\n * Accessible name of the tab list.\n * @type {string}\n * @default ''\n */\n ariaLabel: { type: String, default: '' },\n\n /**\n * Visual style.\n * @type {string}\n * @default 'line'\n * @values 'line' | 'pill'\n */\n variant: { type: String, default: 'line' },\n\n /**\n * Render a `tabpanel` holding the default slot. Turn off when the tabs only\n * navigate and the content is rendered elsewhere.\n * @type {boolean}\n * @default true\n */\n panel: { type: Boolean, default: true },\n\n /**\n * Classes for the panel.\n * @type {string}\n * @default 'pt-6'\n */\n panelClass: { type: String, default: 'pt-6' },\n})\n\nconst emit = defineEmits(['update:modelValue'])\n\nconst baseId = useId()\nconst panelId = `${baseId}-panel`\nconst tabId = (index) => `${baseId}-tab-${index}`\n\n/** Template refs, written by the function ref on each button. */\nconst tabEls = []\n\nconst activeIndex = computed(() => props.tabs.findIndex((t) => t.value === props.modelValue))\n\n/** The tab that holds the single tab stop: the active one, else the first enabled. */\nconst focusIndex = computed(() => {\n if (activeIndex.value >= 0 && !props.tabs[activeIndex.value].disabled) return activeIndex.value\n return props.tabs.findIndex((t) => !t.disabled)\n})\n\nfunction select(index) {\n const tab = props.tabs[index]\n if (!tab || tab.disabled) return\n if (tab.value !== props.modelValue) emit('update:modelValue', tab.value)\n}\n\nfunction step(from, delta) {\n const count = props.tabs.length\n for (let i = 1; i <= count; i++) {\n const next = (from + delta * i + count * i) % count\n if (!props.tabs[next].disabled) return next\n }\n return from\n}\n\nfunction onKeydown(event) {\n const current = tabEls.indexOf(event.target)\n if (current < 0) return\n let next = null\n if (event.key === 'ArrowRight' || event.key === 'ArrowDown') next = step(current, 1)\n else if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') next = step(current, -1)\n else if (event.key === 'Home') next = props.tabs.findIndex((t) => !t.disabled)\n else if (event.key === 'End') {\n for (let i = props.tabs.length - 1; i >= 0; i--) {\n if (!props.tabs[i].disabled) {\n next = i\n break\n }\n }\n }\n if (next === null || next < 0) return\n event.preventDefault()\n select(next)\n nextTick(() => tabEls[next]?.focus())\n}\n\nconst listClass = computed(() =>\n props.variant === 'pill'\n ? 'inline-flex max-w-full gap-1 overflow-x-auto rounded-xl bg-gray-100 p-1 dark:bg-gray-800'\n : 'flex gap-6 overflow-x-auto border-b border-gray-200 dark:border-gray-800',\n)\n\nfunction tabClass(index, tab) {\n const active = index === activeIndex.value\n const base =\n 'inline-flex shrink-0 items-center gap-2 text-sm font-medium whitespace-nowrap transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 disabled:cursor-not-allowed disabled:opacity-40'\n if (props.variant === 'pill') {\n return [\n base,\n 'rounded-lg px-3 py-1.5',\n active\n ? 'bg-white text-gray-900 shadow-sm dark:bg-gray-900 dark:text-gray-100'\n : 'text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100',\n ]\n }\n return [\n base,\n '-mb-px border-b-2 px-1 py-3',\n active\n ? 'border-primary-500 text-primary-600 dark:border-primary-400 dark:text-primary-300'\n : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-800 dark:text-gray-400 dark:hover:border-gray-600 dark:hover:text-gray-200',\n tab.disabled ? 'hover:border-transparent' : '',\n ]\n}\n</script>\n"],"mappings":"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"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useFormField } from "../internal/formField.js";
|
|
2
|
+
import { computed, createElementBlock, createElementVNode, normalizeClass, openBlock, unref } from "vue";
|
|
2
3
|
//#region src/components/Toggle.vue
|
|
3
|
-
var _hoisted_1 = [
|
|
4
|
+
var _hoisted_1 = [
|
|
5
|
+
"id",
|
|
6
|
+
"disabled",
|
|
7
|
+
"aria-describedby",
|
|
8
|
+
"aria-checked"
|
|
9
|
+
];
|
|
4
10
|
var _sfc_main = {
|
|
5
11
|
__name: "Toggle",
|
|
6
12
|
props: {
|
|
@@ -75,6 +81,7 @@ var _sfc_main = {
|
|
|
75
81
|
*/
|
|
76
82
|
const props = __props;
|
|
77
83
|
const emit = __emit;
|
|
84
|
+
const field = useFormField();
|
|
78
85
|
const activeColor = computed(() => {
|
|
79
86
|
if (props.size === "sm") {
|
|
80
87
|
const map = {
|
|
@@ -113,8 +120,10 @@ var _sfc_main = {
|
|
|
113
120
|
};
|
|
114
121
|
return (_ctx, _cache) => {
|
|
115
122
|
return openBlock(), createElementBlock("button", {
|
|
123
|
+
id: unref(field)?.controlId.value,
|
|
116
124
|
type: "button",
|
|
117
125
|
disabled: __props.disabled,
|
|
126
|
+
"aria-describedby": unref(field)?.describedBy.value,
|
|
118
127
|
class: normalizeClass(["relative inline-flex items-center shrink-0 rounded-full transition-colors", [
|
|
119
128
|
sizeClasses.value.track,
|
|
120
129
|
__props.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toggle.js","names":[],"sources":["../../src/components/Toggle.vue"],"sourcesContent":["<template>\n <!-- Accessible toggle switch rendered as a button with role=\"switch\" -->\n <button\n type=\"button\"\n :disabled=\"disabled\"\n class=\"relative inline-flex items-center shrink-0 rounded-full transition-colors\"\n :class=\"[\n sizeClasses.track,\n disabled ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer',\n modelValue ? activeColor : inactiveColor,\n ]\"\n role=\"switch\"\n :aria-checked=\"modelValue\"\n @click=\"toggle\"\n >\n <span\n class=\"inline-block transform rounded-full bg-white transition-transform\"\n :class=\"[sizeClasses.dot, modelValue ? sizeClasses.translateOn : sizeClasses.translateOff]\"\n />\n </button>\n</template>\n\n<script setup>\n/**\n * UiToggle — Accessible toggle switch component with two sizes and multiple color themes.\n *\n * Renders as a `<button role=\"switch\">` with smooth sliding-dot animation.\n * Supports disabled and read-only states. The `sm` size matches ProfileModal styling\n * (600-shade active colors), while `md` matches SettingsModal styling (500-shade).\n *\n * @example Basic toggle\n * <UiToggle v-model=\"darkMode\" />\n *\n * @example Small green toggle\n * <UiToggle v-model=\"notifications\" size=\"sm\" color=\"green\" />\n *\n * @example Read-only toggle (parent controls state)\n * <UiToggle :model-value=\"isActive\" readonly @click=\"handleToggle\" />\n *\n * @emits {boolean} update:modelValue — Emitted when the toggle is switched (v-model)\n */\nimport { computed } from 'vue'\nconst props = defineProps({\n /**\n * Current on/off state (v-model).\n * @type {boolean}\n * @default false\n */\n modelValue: { type: Boolean, default: false },\n\n /**\n * Disabled state — dims the toggle and prevents interaction.\n * @type {boolean}\n * @default false\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Read-only mode — renders visually but ignores clicks (parent handles toggling).\n * @type {boolean}\n * @default false\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Toggle size. 'sm' uses a compact track (h-5 w-9) with 600-shade active colors;\n * 'md' uses a larger track (h-6 w-11) with 500-shade active colors.\n * @type {string}\n * @default 'md'\n * @values 'sm' | 'md'\n */\n size: { type: String, default: 'md' },\n\n /**\n * Active (on) track color theme.\n * @type {string}\n * @default 'primary'\n * @values 'primary' | 'green' | 'red'\n */\n color: { type: String, default: 'primary' },\n})\n\nconst emit = defineEmits(['update:modelValue'])\n\n// Active color uses different shade intensities per size for visual consistency\nconst activeColor = computed(() => {\n if (props.size === 'sm') {\n // ProfileModal style uses 600\n const map = { primary: 'bg-primary-600', green: 'bg-success-600', red: 'bg-red-600' }\n return map[props.color] ?? map.primary\n }\n // SettingsModal style uses 500\n const map = { primary: 'bg-primary-500', green: 'bg-success-500', red: 'bg-red-500' }\n return map[props.color] ?? map.primary\n})\n\nconst inactiveColor = computed(() => {\n // sm (ProfileModal): bg-gray-300 dark:bg-gray-600\n // md (SettingsModal): bg-gray-300 dark:bg-gray-700\n return props.size === 'sm' ? 'bg-gray-300 dark:bg-gray-600' : 'bg-gray-300 dark:bg-gray-700'\n})\n\nconst sizeClasses = computed(() => {\n if (props.size === 'sm') {\n return {\n track: 'h-5 w-9 border-2 border-transparent',\n dot: 'h-4 w-4 shadow',\n translateOn: 'translate-x-4',\n translateOff: 'translate-x-0',\n }\n }\n return {\n track: 'h-6 w-11',\n dot: 'h-4 w-4',\n translateOn: 'translate-x-6',\n translateOff: 'translate-x-1',\n }\n})\n\nconst toggle = () => {\n if (!props.disabled && !props.readonly) {\n emit('update:modelValue', !props.modelValue)\n }\n}\n</script>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Toggle.js","names":[],"sources":["../../src/components/Toggle.vue"],"sourcesContent":["<template>\n <!-- Accessible toggle switch rendered as a button with role=\"switch\" -->\n <button\n :id=\"field?.controlId.value\"\n type=\"button\"\n :disabled=\"disabled\"\n :aria-describedby=\"field?.describedBy.value\"\n class=\"relative inline-flex items-center shrink-0 rounded-full transition-colors\"\n :class=\"[\n sizeClasses.track,\n disabled ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer',\n modelValue ? activeColor : inactiveColor,\n ]\"\n role=\"switch\"\n :aria-checked=\"modelValue\"\n @click=\"toggle\"\n >\n <span\n class=\"inline-block transform rounded-full bg-white transition-transform\"\n :class=\"[sizeClasses.dot, modelValue ? sizeClasses.translateOn : sizeClasses.translateOff]\"\n />\n </button>\n</template>\n\n<script setup>\n/**\n * UiToggle — Accessible toggle switch component with two sizes and multiple color themes.\n *\n * Renders as a `<button role=\"switch\">` with smooth sliding-dot animation.\n * Supports disabled and read-only states. The `sm` size matches ProfileModal styling\n * (600-shade active colors), while `md` matches SettingsModal styling (500-shade).\n *\n * @example Basic toggle\n * <UiToggle v-model=\"darkMode\" />\n *\n * @example Small green toggle\n * <UiToggle v-model=\"notifications\" size=\"sm\" color=\"green\" />\n *\n * @example Read-only toggle (parent controls state)\n * <UiToggle :model-value=\"isActive\" readonly @click=\"handleToggle\" />\n *\n * @emits {boolean} update:modelValue — Emitted when the toggle is switched (v-model)\n */\nimport { computed } from 'vue'\nimport { useFormField } from '../internal/formField.js'\nconst props = defineProps({\n /**\n * Current on/off state (v-model).\n * @type {boolean}\n * @default false\n */\n modelValue: { type: Boolean, default: false },\n\n /**\n * Disabled state — dims the toggle and prevents interaction.\n * @type {boolean}\n * @default false\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Read-only mode — renders visually but ignores clicks (parent handles toggling).\n * @type {boolean}\n * @default false\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Toggle size. 'sm' uses a compact track (h-5 w-9) with 600-shade active colors;\n * 'md' uses a larger track (h-6 w-11) with 500-shade active colors.\n * @type {string}\n * @default 'md'\n * @values 'sm' | 'md'\n */\n size: { type: String, default: 'md' },\n\n /**\n * Active (on) track color theme.\n * @type {string}\n * @default 'primary'\n * @values 'primary' | 'green' | 'red'\n */\n color: { type: String, default: 'primary' },\n})\n\nconst emit = defineEmits(['update:modelValue'])\n\nconst field = useFormField()\n\n// Active color uses different shade intensities per size for visual consistency\nconst activeColor = computed(() => {\n if (props.size === 'sm') {\n // ProfileModal style uses 600\n const map = { primary: 'bg-primary-600', green: 'bg-success-600', red: 'bg-red-600' }\n return map[props.color] ?? map.primary\n }\n // SettingsModal style uses 500\n const map = { primary: 'bg-primary-500', green: 'bg-success-500', red: 'bg-red-500' }\n return map[props.color] ?? map.primary\n})\n\nconst inactiveColor = computed(() => {\n // sm (ProfileModal): bg-gray-300 dark:bg-gray-600\n // md (SettingsModal): bg-gray-300 dark:bg-gray-700\n return props.size === 'sm' ? 'bg-gray-300 dark:bg-gray-600' : 'bg-gray-300 dark:bg-gray-700'\n})\n\nconst sizeClasses = computed(() => {\n if (props.size === 'sm') {\n return {\n track: 'h-5 w-9 border-2 border-transparent',\n dot: 'h-4 w-4 shadow',\n translateOn: 'translate-x-4',\n translateOff: 'translate-x-0',\n }\n }\n return {\n track: 'h-6 w-11',\n dot: 'h-4 w-4',\n translateOn: 'translate-x-6',\n translateOff: 'translate-x-1',\n }\n})\n\nconst toggle = () => {\n if (!props.disabled && !props.readonly) {\n emit('update:modelValue', !props.modelValue)\n }\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CA,MAAM,QAAQ;EAwCd,MAAM,OAAO;EAEb,MAAM,QAAQ,aAAa;EAG3B,MAAM,cAAc,eAAe;GACjC,IAAI,MAAM,SAAS,MAAM;IAEvB,MAAM,MAAM;KAAE,SAAS;KAAkB,OAAO;KAAkB,KAAK;IAAa;IACpF,OAAO,IAAI,MAAM,UAAU,IAAI;GACjC;GAEA,MAAM,MAAM;IAAE,SAAS;IAAkB,OAAO;IAAkB,KAAK;GAAa;GACpF,OAAO,IAAI,MAAM,UAAU,IAAI;EACjC,CAAC;EAED,MAAM,gBAAgB,eAAe;GAGnC,OAAO,MAAM,SAAS,OAAO,iCAAiC;EAChE,CAAC;EAED,MAAM,cAAc,eAAe;GACjC,IAAI,MAAM,SAAS,MACjB,OAAO;IACL,OAAO;IACP,KAAK;IACL,aAAa;IACb,cAAc;GAChB;GAEF,OAAO;IACL,OAAO;IACP,KAAK;IACL,aAAa;IACb,cAAc;GAChB;EACF,CAAC;EAED,MAAM,eAAe;GACnB,IAAI,CAAC,MAAM,YAAY,CAAC,MAAM,UAC5B,KAAK,qBAAqB,CAAC,MAAM,UAAU;EAE/C;;GA9HE,OAAA,UAAA,GAAA,mBAmBS,UAAA;IAlBN,IAAI,MAAA,KAAA,CAAK,EAAE,UAAU;IACtB,MAAK;IACJ,UAAU,QAAA;IACV,oBAAkB,MAAA,KAAA,CAAK,EAAE,YAAY;IACtC,OAAK,eAAA,CAAC,6EAA2E;KACjE,YAAA,MAAY;KAAa,QAAA,WAAQ,kCAAA;KAA6D,QAAA,aAAa,YAAA,QAAc,cAAA;;IAKzI,MAAK;IACJ,gBAAc,QAAA;IACd,SAAO;GAER,GAAA,CAAA,mBAGE,QAAA,EAFA,OAAK,eAAA,CAAC,qEAAmE,CAChE,YAAA,MAAY,KAAK,QAAA,aAAa,YAAA,MAAY,cAAc,YAAA,MAAY,YAAY,CAAA,CAAA,EAAA,GAAA,MAAA,CAAA,CAAA,GAAA,IAAA,UAAA"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,43 +1,53 @@
|
|
|
1
1
|
import _sfc_main from "../icons/Icon.js";
|
|
2
2
|
import _sfc_main$1 from "./Alert.js";
|
|
3
|
-
import _sfc_main$2 from "./
|
|
4
|
-
import _sfc_main$3 from "./
|
|
5
|
-
import _sfc_main$4 from "./
|
|
6
|
-
import _sfc_main$5 from "./
|
|
7
|
-
import _sfc_main$6 from "./
|
|
8
|
-
import _sfc_main$7 from "./
|
|
3
|
+
import _sfc_main$2 from "./AppShell.js";
|
|
4
|
+
import _sfc_main$3 from "./Avatar.js";
|
|
5
|
+
import _sfc_main$4 from "./Badge.js";
|
|
6
|
+
import _sfc_main$5 from "./Banner.js";
|
|
7
|
+
import _sfc_main$6 from "./Breadcrumb.js";
|
|
8
|
+
import _sfc_main$7 from "./Button.js";
|
|
9
9
|
import _sfc_main$8 from "./Card.js";
|
|
10
10
|
import _sfc_main$9 from "./Checkbox.js";
|
|
11
11
|
import _sfc_main$10 from "./CodeBlock.js";
|
|
12
|
-
import _sfc_main$11 from "./
|
|
13
|
-
import _sfc_main$12 from "./
|
|
14
|
-
import _sfc_main$13 from "./
|
|
15
|
-
import _sfc_main$14 from "./
|
|
16
|
-
import _sfc_main$15 from "./
|
|
17
|
-
import _sfc_main$16 from "./
|
|
18
|
-
import _sfc_main$17 from "./
|
|
19
|
-
import _sfc_main$18 from "./
|
|
20
|
-
import _sfc_main$19 from "./
|
|
21
|
-
import _sfc_main$20 from "./
|
|
22
|
-
import _sfc_main$21 from "./
|
|
23
|
-
import _sfc_main$22 from "./
|
|
24
|
-
import _sfc_main$23 from "./
|
|
25
|
-
import _sfc_main$24 from "./
|
|
26
|
-
import _sfc_main$25 from "./
|
|
27
|
-
import _sfc_main$26 from "./
|
|
28
|
-
import _sfc_main$27 from "./
|
|
29
|
-
import _sfc_main$28 from "./
|
|
30
|
-
import _sfc_main$29 from "./
|
|
31
|
-
import _sfc_main$30 from "./
|
|
32
|
-
import _sfc_main$31 from "./
|
|
33
|
-
import _sfc_main$32 from "./
|
|
34
|
-
import _sfc_main$33 from "./
|
|
35
|
-
import _sfc_main$34 from "./
|
|
36
|
-
import _sfc_main$35 from "./
|
|
37
|
-
import _sfc_main$36 from "./
|
|
38
|
-
import _sfc_main$37 from "./
|
|
39
|
-
import _sfc_main$38 from "./
|
|
40
|
-
import _sfc_main$39 from "./
|
|
12
|
+
import _sfc_main$11 from "./CopyField.js";
|
|
13
|
+
import _sfc_main$12 from "./DescriptionList.js";
|
|
14
|
+
import _sfc_main$13 from "./Divider.js";
|
|
15
|
+
import _sfc_main$14 from "./Dropdown.js";
|
|
16
|
+
import _sfc_main$15 from "./DropdownItem.js";
|
|
17
|
+
import _sfc_main$16 from "./DropdownRow.js";
|
|
18
|
+
import _sfc_main$17 from "./DropdownSubmenu.js";
|
|
19
|
+
import _sfc_main$18 from "./EmptyState.js";
|
|
20
|
+
import _sfc_main$19 from "./FileInput.js";
|
|
21
|
+
import _sfc_main$20 from "./FormField.js";
|
|
22
|
+
import _sfc_main$21 from "./IconTile.js";
|
|
23
|
+
import _sfc_main$22 from "./Input.js";
|
|
24
|
+
import _sfc_main$23 from "./Kbd.js";
|
|
25
|
+
import _sfc_main$24 from "./ListMenu.js";
|
|
26
|
+
import _sfc_main$25 from "./ListMenuItem.js";
|
|
27
|
+
import _sfc_main$26 from "./Modal.js";
|
|
28
|
+
import _sfc_main$27 from "./Numpad.js";
|
|
29
|
+
import _sfc_main$28 from "./PageHeader.js";
|
|
30
|
+
import _sfc_main$29 from "./Pagination.js";
|
|
31
|
+
import _sfc_main$30 from "./Popup.js";
|
|
32
|
+
import _sfc_main$31 from "./ProgressBar.js";
|
|
33
|
+
import _sfc_main$32 from "./Prompt.js";
|
|
34
|
+
import _sfc_main$33 from "./Radio.js";
|
|
35
|
+
import _sfc_main$34 from "./SectionHeading.js";
|
|
36
|
+
import _sfc_main$35 from "./Segmented.js";
|
|
37
|
+
import _sfc_main$36 from "./Select.js";
|
|
38
|
+
import _sfc_main$37 from "./Sidebar.js";
|
|
39
|
+
import _sfc_main$38 from "./SidebarGroup.js";
|
|
40
|
+
import _sfc_main$39 from "./SidebarItem.js";
|
|
41
|
+
import _sfc_main$40 from "./Slider.js";
|
|
42
|
+
import _sfc_main$41 from "./Spinner.js";
|
|
43
|
+
import _sfc_main$42 from "./StatCard.js";
|
|
44
|
+
import _sfc_main$43 from "./Stepper.js";
|
|
45
|
+
import _sfc_main$44 from "./Table.js";
|
|
46
|
+
import _sfc_main$45 from "./Tabs.js";
|
|
47
|
+
import _sfc_main$46 from "./ThemeToggle.js";
|
|
48
|
+
import _sfc_main$47 from "./Toast.js";
|
|
49
|
+
import _sfc_main$48 from "./Toggle.js";
|
|
50
|
+
import _sfc_main$49 from "./Tooltip.js";
|
|
41
51
|
//#region src/components/index.js
|
|
42
52
|
/**
|
|
43
53
|
* Real component imports, re-exported under the default `Ui` prefix.
|
|
@@ -50,54 +60,59 @@ import _sfc_main$39 from "./Tooltip.js";
|
|
|
50
60
|
* `../manifest.js` carries the same list as plain data for build-time
|
|
51
61
|
* consumers; `scripts/verify.mjs` keeps the two in sync.
|
|
52
62
|
*/
|
|
53
|
-
/**
|
|
54
|
-
* Base-name -> component map, used by the Vue plugin to register everything
|
|
55
|
-
* under whatever prefix the host chose.
|
|
56
|
-
* @type {Record<string, import('vue').Component>}
|
|
57
|
-
*/
|
|
58
63
|
var components = {
|
|
59
64
|
Alert: _sfc_main$1,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
AppShell: _sfc_main$2,
|
|
66
|
+
Avatar: _sfc_main$3,
|
|
67
|
+
Badge: _sfc_main$4,
|
|
68
|
+
Banner: _sfc_main$5,
|
|
69
|
+
Breadcrumb: _sfc_main$6,
|
|
70
|
+
Button: _sfc_main$7,
|
|
66
71
|
Card: _sfc_main$8,
|
|
67
72
|
Checkbox: _sfc_main$9,
|
|
68
73
|
CodeBlock: _sfc_main$10,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
74
|
+
CopyField: _sfc_main$11,
|
|
75
|
+
DescriptionList: _sfc_main$12,
|
|
76
|
+
Divider: _sfc_main$13,
|
|
77
|
+
Dropdown: _sfc_main$14,
|
|
78
|
+
DropdownItem: _sfc_main$15,
|
|
79
|
+
DropdownRow: _sfc_main$16,
|
|
80
|
+
DropdownSubmenu: _sfc_main$17,
|
|
81
|
+
EmptyState: _sfc_main$18,
|
|
82
|
+
FileInput: _sfc_main$19,
|
|
83
|
+
FormField: _sfc_main$20,
|
|
84
|
+
IconTile: _sfc_main$21,
|
|
85
|
+
Input: _sfc_main$22,
|
|
86
|
+
Kbd: _sfc_main$23,
|
|
87
|
+
ListMenu: _sfc_main$24,
|
|
88
|
+
ListMenuItem: _sfc_main$25,
|
|
89
|
+
Modal: _sfc_main$26,
|
|
90
|
+
Numpad: _sfc_main$27,
|
|
91
|
+
PageHeader: _sfc_main$28,
|
|
92
|
+
Pagination: _sfc_main$29,
|
|
93
|
+
Popup: _sfc_main$30,
|
|
94
|
+
ProgressBar: _sfc_main$31,
|
|
95
|
+
Prompt: _sfc_main$32,
|
|
96
|
+
Radio: _sfc_main$33,
|
|
97
|
+
SectionHeading: _sfc_main$34,
|
|
98
|
+
Segmented: _sfc_main$35,
|
|
99
|
+
Select: _sfc_main$36,
|
|
100
|
+
Sidebar: _sfc_main$37,
|
|
101
|
+
SidebarGroup: _sfc_main$38,
|
|
102
|
+
SidebarItem: _sfc_main$39,
|
|
103
|
+
Slider: _sfc_main$40,
|
|
104
|
+
Spinner: _sfc_main$41,
|
|
105
|
+
StatCard: _sfc_main$42,
|
|
106
|
+
Stepper: _sfc_main$43,
|
|
107
|
+
Table: _sfc_main$44,
|
|
108
|
+
Tabs: _sfc_main$45,
|
|
109
|
+
ThemeToggle: _sfc_main$46,
|
|
110
|
+
Toast: _sfc_main$47,
|
|
111
|
+
Toggle: _sfc_main$48,
|
|
112
|
+
Tooltip: _sfc_main$49,
|
|
98
113
|
Icon: _sfc_main
|
|
99
114
|
};
|
|
100
115
|
//#endregion
|
|
101
|
-
export { _sfc_main$1 as UiAlert, _sfc_main$2 as
|
|
116
|
+
export { _sfc_main$1 as UiAlert, _sfc_main$2 as UiAppShell, _sfc_main$3 as UiAvatar, _sfc_main$4 as UiBadge, _sfc_main$5 as UiBanner, _sfc_main$6 as UiBreadcrumb, _sfc_main$7 as UiButton, _sfc_main$8 as UiCard, _sfc_main$9 as UiCheckbox, _sfc_main$10 as UiCodeBlock, _sfc_main$11 as UiCopyField, _sfc_main$12 as UiDescriptionList, _sfc_main$13 as UiDivider, _sfc_main$14 as UiDropdown, _sfc_main$15 as UiDropdownItem, _sfc_main$16 as UiDropdownRow, _sfc_main$17 as UiDropdownSubmenu, _sfc_main$18 as UiEmptyState, _sfc_main$19 as UiFileInput, _sfc_main$20 as UiFormField, _sfc_main 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 UiSlider, _sfc_main$41 as UiSpinner, _sfc_main$42 as UiStatCard, _sfc_main$43 as UiStepper, _sfc_main$44 as UiTable, _sfc_main$45 as UiTabs, _sfc_main$46 as UiThemeToggle, _sfc_main$47 as UiToast, _sfc_main$48 as UiToggle, _sfc_main$49 as UiTooltip, components };
|
|
102
117
|
|
|
103
118
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/components/index.js"],"sourcesContent":["/**\n * Real component imports, re-exported under the default `Ui` prefix.\n *\n * The prefix is baked into the export names so that `import { UiButton }`\n * reads the same as `<UiButton>` in a template. Consumers who register the\n * library with a different prefix still import these names — only the\n * globally registered tag changes.\n *\n * `../manifest.js` carries the same list as plain data for build-time\n * consumers; `scripts/verify.mjs` keeps the two in sync.\n */\nimport Alert from './Alert.vue'\nimport Avatar from './Avatar.vue'\nimport Badge from './Badge.vue'\nimport Banner from './Banner.vue'\nimport Breadcrumb from './Breadcrumb.vue'\nimport Button from './Button.vue'\nimport
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/components/index.js"],"sourcesContent":["/**\n * Real component imports, re-exported under the default `Ui` prefix.\n *\n * The prefix is baked into the export names so that `import { UiButton }`\n * reads the same as `<UiButton>` in a template. Consumers who register the\n * library with a different prefix still import these names — only the\n * globally registered tag changes.\n *\n * `../manifest.js` carries the same list as plain data for build-time\n * consumers; `scripts/verify.mjs` keeps the two in sync.\n */\nimport Alert from './Alert.vue'\nimport AppShell from './AppShell.vue'\nimport Avatar from './Avatar.vue'\nimport Badge from './Badge.vue'\nimport Banner from './Banner.vue'\nimport Breadcrumb from './Breadcrumb.vue'\nimport Button from './Button.vue'\nimport Card from './Card.vue'\nimport Checkbox from './Checkbox.vue'\nimport CodeBlock from './CodeBlock.vue'\nimport CopyField from './CopyField.vue'\nimport DescriptionList from './DescriptionList.vue'\nimport Divider from './Divider.vue'\nimport Dropdown from './Dropdown.vue'\nimport DropdownItem from './DropdownItem.vue'\nimport DropdownRow from './DropdownRow.vue'\nimport DropdownSubmenu from './DropdownSubmenu.vue'\nimport EmptyState from './EmptyState.vue'\nimport FileInput from './FileInput.vue'\nimport FormField from './FormField.vue'\nimport IconTile from './IconTile.vue'\nimport Input from './Input.vue'\nimport Kbd from './Kbd.vue'\nimport ListMenu from './ListMenu.vue'\nimport ListMenuItem from './ListMenuItem.vue'\nimport Modal from './Modal.vue'\nimport Numpad from './Numpad.vue'\nimport PageHeader from './PageHeader.vue'\nimport Pagination from './Pagination.vue'\nimport Popup from './Popup.vue'\nimport ProgressBar from './ProgressBar.vue'\nimport Prompt from './Prompt.vue'\nimport Radio from './Radio.vue'\nimport SectionHeading from './SectionHeading.vue'\nimport Segmented from './Segmented.vue'\nimport Select from './Select.vue'\nimport Sidebar from './Sidebar.vue'\nimport SidebarGroup from './SidebarGroup.vue'\nimport SidebarItem from './SidebarItem.vue'\nimport Slider from './Slider.vue'\nimport Spinner from './Spinner.vue'\nimport StatCard from './StatCard.vue'\nimport Stepper from './Stepper.vue'\nimport Table from './Table.vue'\nimport Tabs from './Tabs.vue'\nimport ThemeToggle from './ThemeToggle.vue'\nimport Toast from './Toast.vue'\nimport Toggle from './Toggle.vue'\nimport Tooltip from './Tooltip.vue'\nimport Icon from '../icons/Icon.vue'\n\nexport {\n Alert as UiAlert,\n AppShell as UiAppShell,\n Avatar as UiAvatar,\n Badge as UiBadge,\n Banner as UiBanner,\n Breadcrumb as UiBreadcrumb,\n Button as UiButton,\n Card as UiCard,\n Checkbox as UiCheckbox,\n CodeBlock as UiCodeBlock,\n CopyField as UiCopyField,\n DescriptionList as UiDescriptionList,\n Divider as UiDivider,\n Dropdown as UiDropdown,\n DropdownItem as UiDropdownItem,\n DropdownRow as UiDropdownRow,\n DropdownSubmenu as UiDropdownSubmenu,\n EmptyState as UiEmptyState,\n FileInput as UiFileInput,\n FormField as UiFormField,\n IconTile as UiIconTile,\n Input as UiInput,\n Kbd as UiKbd,\n ListMenu as UiListMenu,\n ListMenuItem as UiListMenuItem,\n Modal as UiModal,\n Numpad as UiNumpad,\n PageHeader as UiPageHeader,\n Pagination as UiPagination,\n Popup as UiPopup,\n ProgressBar as UiProgressBar,\n Prompt as UiPrompt,\n Radio as UiRadio,\n SectionHeading as UiSectionHeading,\n Segmented as UiSegmented,\n Select as UiSelect,\n Sidebar as UiSidebar,\n SidebarGroup as UiSidebarGroup,\n SidebarItem as UiSidebarItem,\n Slider as UiSlider,\n Spinner as UiSpinner,\n StatCard as UiStatCard,\n Stepper as UiStepper,\n Table as UiTable,\n Tabs as UiTabs,\n ThemeToggle as UiThemeToggle,\n Toast as UiToast,\n Toggle as UiToggle,\n Tooltip as UiTooltip,\n Icon as UiIcon,\n}\n\nexport const components = {\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 Slider,\n Spinner,\n StatCard,\n Stepper,\n Table,\n Tabs,\n ThemeToggle,\n Toast,\n Toggle,\n Tooltip,\n Icon,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmHA,IAAa,aAAa;CACxB,OAAA;CACA,UAAA;CACA,QAAA;CACA,OAAA;CACA,QAAA;CACA,YAAA;CACA,QAAA;CACA,MAAA;CACA,UAAA;CACA,WAAA;CACA,WAAA;CACA,iBAAA;CACA,SAAA;CACA,UAAA;CACA,cAAA;CACA,aAAA;CACA,iBAAA;CACA,YAAA;CACA,WAAA;CACA,WAAA;CACA,UAAA;CACA,OAAA;CACA,KAAA;CACA,UAAA;CACA,cAAA;CACA,OAAA;CACA,QAAA;CACA,YAAA;CACA,YAAA;CACA,OAAA;CACA,aAAA;CACA,QAAA;CACA,OAAA;CACA,gBAAA;CACA,WAAA;CACA,QAAA;CACA,SAAA;CACA,cAAA;CACA,aAAA;CACA,QAAA;CACA,SAAA;CACA,UAAA;CACA,SAAA;CACA,OAAA;CACA,MAAA;CACA,aAAA;CACA,OAAA;CACA,QAAA;CACA,SAAA;CACA,MAAA;AACF"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { computed, toValue, useAttrs } from "vue";
|
|
2
|
+
import { twMerge } from "tailwind-merge";
|
|
3
|
+
//#region src/composables/useMergedClasses.js
|
|
4
|
+
/**
|
|
5
|
+
* useMergedClasses — merge a component's internal Tailwind classes with the
|
|
6
|
+
* caller's `class`, letting the caller win, and split the remaining attributes
|
|
7
|
+
* off for forwarding.
|
|
8
|
+
*
|
|
9
|
+
* This is the shared half of the "external classes override internals" pattern
|
|
10
|
+
* that UiButton, UiCard and UiIconTile all implement identically: bind
|
|
11
|
+
* `mergedClasses` to the root element's `:class`, spread `restAttrs` onto it
|
|
12
|
+
* with `v-bind`, and declare `defineOptions({ inheritAttrs: false })` in the
|
|
13
|
+
* component so Vue does not also apply `class` a second time.
|
|
14
|
+
*
|
|
15
|
+
* `tailwind-merge` resolves conflicts by keeping the last occurrence, and the
|
|
16
|
+
* caller's `class` is always passed last — so `bg-gray-100` from the outside
|
|
17
|
+
* beats a built-in `bg-primary-600` rather than both landing on the element.
|
|
18
|
+
* Passing the internal classes as one space-joined string is equivalent to
|
|
19
|
+
* passing them as separate arguments; twMerge tokenises either the same way.
|
|
20
|
+
*
|
|
21
|
+
* `defineOptions` is a compiler macro and cannot live in a composable, so each
|
|
22
|
+
* consuming SFC still declares `inheritAttrs: false` itself. Everything else —
|
|
23
|
+
* `useAttrs`, the class/rest split, and the merge — lives here.
|
|
24
|
+
*
|
|
25
|
+
* @param {import('vue').MaybeRefOrGetter<string>} internal
|
|
26
|
+
* The component's own classes, as a ref, getter, or plain string. A getter is
|
|
27
|
+
* the safest form when the internal classes are a `computed` declared later
|
|
28
|
+
* in setup, since it defers evaluation past that declaration.
|
|
29
|
+
* @returns {{ mergedClasses: import('vue').ComputedRef<string>, restAttrs: import('vue').ComputedRef<Record<string, unknown>> }}
|
|
30
|
+
* `mergedClasses` for the root `:class`; `restAttrs` (everything except
|
|
31
|
+
* `class`) for `v-bind`.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* defineOptions({ inheritAttrs: false })
|
|
35
|
+
* const internal = computed(() => `inline-flex ${sizeClass.value} ${colorClass.value}`)
|
|
36
|
+
* const { mergedClasses, restAttrs } = useMergedClasses(internal)
|
|
37
|
+
*/
|
|
38
|
+
function useMergedClasses(internal) {
|
|
39
|
+
const attrs = useAttrs();
|
|
40
|
+
const restAttrs = computed(() => {
|
|
41
|
+
const { class: _class, ...rest } = attrs;
|
|
42
|
+
return rest;
|
|
43
|
+
});
|
|
44
|
+
return {
|
|
45
|
+
mergedClasses: computed(() => twMerge(toValue(internal), attrs.class)),
|
|
46
|
+
restAttrs
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { useMergedClasses };
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=useMergedClasses.js.map
|
|
@@ -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
|
@@ -20,10 +20,13 @@ var mdiPaths = {
|
|
|
20
20
|
"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",
|
|
21
21
|
"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",
|
|
22
22
|
"alert-outline": "M12 2L1 21h22M12 6l7.53 13H4.47M11 10v4h2v-4m-2 6v2h2v-2",
|
|
23
|
+
"arrow-down": "M11 4h2v12l5.5-5.5l1.42 1.42L12 19.84l-7.92-7.92L5.5 10.5L11 16z",
|
|
24
|
+
"arrow-up": "M13 20h-2V8l-5.5 5.5l-1.42-1.42L12 4.16l7.92 7.92l-1.42 1.42L13 8z",
|
|
23
25
|
"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",
|
|
24
26
|
"check": "M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z",
|
|
25
27
|
"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
28
|
"chevron-down": "M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z",
|
|
29
|
+
"chevron-left": "M15.41 16.58L10.83 12l4.58-4.59L14 6l-6 6l6 6z",
|
|
27
30
|
"chevron-right": "M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z",
|
|
28
31
|
"chevron-up": "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z",
|
|
29
32
|
"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",
|
|
@@ -36,13 +39,17 @@ var mdiPaths = {
|
|
|
36
39
|
"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",
|
|
37
40
|
"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",
|
|
38
41
|
"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
|
+
"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",
|
|
39
43
|
"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",
|
|
40
44
|
"format-italic": "M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z",
|
|
41
45
|
"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",
|
|
46
|
+
"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",
|
|
42
47
|
"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",
|
|
48
|
+
"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",
|
|
43
49
|
"loading": "M12 4V2A10 10 0 0 0 2 12h2a8 8 0 0 1 8-8",
|
|
44
50
|
"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",
|
|
45
51
|
"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",
|
|
52
|
+
"menu": "M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z",
|
|
46
53
|
"minus": "M19 13H5v-2h14z",
|
|
47
54
|
"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",
|
|
48
55
|
"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",
|
|
@@ -55,6 +62,10 @@ var mdiPaths = {
|
|
|
55
62
|
"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",
|
|
56
63
|
"trash-can": "M9 3v1H4v2h1v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6h1V4h-5V3zm0 5h2v9H9zm4 0h2v9h-2z",
|
|
57
64
|
"trash-can-outline": "M9 3v1H4v2h1v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6h1V4h-5V3zM7 6h10v13H7zm2 2v9h2V8zm4 0v9h2V8z",
|
|
65
|
+
"trending-down": "m16 18l2.29-2.29l-4.88-4.88l-4 4L2 7.41L3.41 6l6 6l4-4l6.3 6.29L22 12v6z",
|
|
66
|
+
"trending-neutral": "m22 12l-4-4v3H3v2h15v3z",
|
|
67
|
+
"trending-up": "m16 6l2.29 2.29l-4.88 4.88l-4-4L2 16.59L3.41 18l6-6l4 4l6.3-6.29L22 12V6z",
|
|
68
|
+
"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",
|
|
58
69
|
"view-grid": "M3 11h8V3H3m0 18h8v-8H3m10 8h8v-8h-8m0-10v8h8V3",
|
|
59
70
|
"view-list": "M9 5v4h12V5M9 19h12v-4H9m0-1h12v-4H9M4 9h4V5H4m0 14h4v-4H4m0-1h4v-4H4z",
|
|
60
71
|
"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",
|