numori-ui 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/README.md +23 -20
  3. package/dist/components/Banner.js +29 -32
  4. package/dist/components/Banner.js.map +1 -1
  5. package/dist/components/Button.js +10 -19
  6. package/dist/components/Button.js.map +1 -1
  7. package/dist/components/Card.js +15 -9
  8. package/dist/components/Card.js.map +1 -1
  9. package/dist/components/Checkbox.js +2 -7
  10. package/dist/components/Checkbox.js.map +1 -1
  11. package/dist/components/Dropdown.js +10 -3
  12. package/dist/components/Dropdown.js.map +1 -1
  13. package/dist/components/DropdownSubmenu.js +5 -3
  14. package/dist/components/DropdownSubmenu.js.map +1 -1
  15. package/dist/components/FileInput.js +12 -4
  16. package/dist/components/FileInput.js.map +1 -1
  17. package/dist/components/IconTile.js +5 -9
  18. package/dist/components/IconTile.js.map +1 -1
  19. package/dist/components/Input.js +6 -6
  20. package/dist/components/Input.js.map +1 -1
  21. package/dist/components/ListMenuItem.js +38 -31
  22. package/dist/components/ListMenuItem.js.map +1 -1
  23. package/dist/components/Numpad.js +4 -4
  24. package/dist/components/Numpad.js.map +1 -1
  25. package/dist/components/Popup.js +9 -3
  26. package/dist/components/Popup.js.map +1 -1
  27. package/dist/components/Radio.js +2 -7
  28. package/dist/components/Radio.js.map +1 -1
  29. package/dist/components/Segmented.js +100 -26
  30. package/dist/components/Segmented.js.map +1 -1
  31. package/dist/components/Select.js +6 -4
  32. package/dist/components/Select.js.map +1 -1
  33. package/dist/components/Table.js +174 -0
  34. package/dist/components/Table.js.map +1 -0
  35. package/dist/components/index.js +65 -67
  36. package/dist/components/index.js.map +1 -1
  37. package/dist/composables/useMergedClasses.js +52 -0
  38. package/dist/composables/useMergedClasses.js.map +1 -0
  39. package/dist/icons/mdi.js +1 -0
  40. package/dist/icons/mdi.js.map +1 -1
  41. package/dist/index.d.ts +1 -2
  42. package/dist/index.js +34 -35
  43. package/dist/index.js.map +1 -1
  44. package/dist/internal/controlSizes.js +21 -0
  45. package/dist/internal/controlSizes.js.map +1 -0
  46. package/dist/internal/menu.js +20 -0
  47. package/dist/internal/menu.js.map +1 -0
  48. package/dist/manifest.js +1 -2
  49. package/dist/manifest.js.map +1 -1
  50. package/package.json +2 -1
  51. package/src/components/Banner.vue +20 -9
  52. package/src/components/Button.vue +12 -19
  53. package/src/components/Card.vue +11 -12
  54. package/src/components/Checkbox.vue +2 -10
  55. package/src/components/Dropdown.vue +14 -2
  56. package/src/components/DropdownSubmenu.vue +4 -2
  57. package/src/components/FileInput.vue +19 -4
  58. package/src/components/IconTile.vue +4 -9
  59. package/src/components/Input.vue +6 -6
  60. package/src/components/ListMenuItem.vue +21 -5
  61. package/src/components/Numpad.vue +7 -4
  62. package/src/components/Popup.vue +6 -2
  63. package/src/components/Radio.vue +2 -10
  64. package/src/components/Segmented.vue +108 -38
  65. package/src/components/Select.vue +11 -2
  66. package/src/components/Table.vue +193 -0
  67. package/src/components/index.js +3 -6
  68. package/src/composables/useMergedClasses.js +49 -0
  69. package/src/icons/mdi.js +1 -0
  70. package/src/internal/controlSizes.js +17 -0
  71. package/src/internal/menu.js +16 -0
  72. package/src/manifest.js +1 -2
  73. package/dist/components/ButtonsGroup.js +0 -153
  74. package/dist/components/ButtonsGroup.js.map +0 -1
  75. package/dist/components/ComparisonTable.js +0 -152
  76. package/dist/components/ComparisonTable.js.map +0 -1
  77. package/src/components/ButtonsGroup.vue +0 -140
  78. package/src/components/ComparisonTable.vue +0 -141
@@ -1,6 +1,7 @@
1
1
  import { useEventListener } from "../composables/useEventListener.js";
2
2
  import { onClickOutside } from "../composables/onClickOutside.js";
3
- import { Transition, computed, createElementBlock, createElementVNode, createVNode, normalizeClass, openBlock, ref, renderSlot, vShow, withCtx, withDirectives } from "vue";
3
+ import { MENU_PANEL_CLASS } from "../internal/menu.js";
4
+ import { Transition, computed, createElementBlock, createElementVNode, createVNode, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, vShow, withCtx, withDirectives } from "vue";
4
5
  //#region src/components/Dropdown.vue
5
6
  var _sfc_main = {
6
7
  __name: "Dropdown",
@@ -92,7 +93,10 @@ var _sfc_main = {
92
93
  if (props.panelClass) return props.panelClass;
93
94
  const align = props.align === "right" ? "right-0" : "left-0";
94
95
  const dropDir = props.drop === "up" ? "bottom-full mb-1" : "mt-1";
95
- return `absolute z-50 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg py-1 ${props.width} ${align} ${dropDir}`;
96
+ return `absolute z-50 ${MENU_PANEL_CLASS} p-1 ${props.width} ${align} ${dropDir}`;
97
+ });
98
+ const panelOrigin = computed(() => {
99
+ return `${props.drop === "up" ? "bottom" : "top"} ${props.align === "right" ? "right" : "left"}`;
96
100
  });
97
101
  const transitionClasses = computed(() => {
98
102
  if (props.drop === "up") return {
@@ -147,7 +151,10 @@ var _sfc_main = {
147
151
  "leave-from-class": transitionClasses.value.leaveFrom,
148
152
  "leave-to-class": transitionClasses.value.leaveTo
149
153
  }, {
150
- default: withCtx(() => [withDirectives(createElementVNode("div", { class: normalizeClass(panelClasses.value) }, [renderSlot(_ctx.$slots, "default", { close })], 2), [[vShow, isOpen.value]])]),
154
+ default: withCtx(() => [withDirectives(createElementVNode("div", {
155
+ class: normalizeClass(panelClasses.value),
156
+ style: normalizeStyle({ transformOrigin: panelOrigin.value })
157
+ }, [renderSlot(_ctx.$slots, "default", { close })], 6), [[vShow, isOpen.value]])]),
151
158
  _: 3
152
159
  }, 8, [
153
160
  "enter-active-class",
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.js","names":[],"sources":["../../src/components/Dropdown.vue"],"sourcesContent":["<template>\n <div ref=\"containerRef\" class=\"relative\">\n <!-- Trigger slot: receives { open, toggle } for controlling the dropdown -->\n <slot name=\"trigger\" :open=\"isOpen\" :toggle=\"toggle\" />\n\n <!-- Dropdown panel with animated enter/leave transitions -->\n <Transition\n :enter-active-class=\"transitionClasses.enterActive\"\n :enter-from-class=\"transitionClasses.enterFrom\"\n :enter-to-class=\"transitionClasses.enterTo\"\n :leave-active-class=\"transitionClasses.leaveActive\"\n :leave-from-class=\"transitionClasses.leaveFrom\"\n :leave-to-class=\"transitionClasses.leaveTo\"\n >\n <div v-show=\"isOpen\" :class=\"panelClasses\">\n <slot :close=\"close\" />\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup>\n/**\n * UiDropdown — Headless dropdown menu with configurable alignment, direction, and transitions.\n *\n * Uses a trigger slot that receives `open` state and `toggle` function, and a default\n * slot for menu content that receives a `close` function. Closes on outside click and\n * Escape key. Supports both downward and upward drop directions with matching transitions.\n * Exposes `isOpen`, `toggle()`, and `close()` for programmatic control.\n *\n * @example Basic dropdown with button trigger\n * <UiDropdown>\n * <template #trigger=\"{ toggle }\">\n * <UiButton @click=\"toggle\">Menu</UiButton>\n * </template>\n * <UiDropdownItem icon=\"mdi:pencil\" label=\"Edit\" @click=\"edit\" />\n * <UiDropdownItem icon=\"mdi:trash-can\" label=\"Delete\" color=\"red\" @click=\"del\" />\n * </UiDropdown>\n *\n * @example Right-aligned, drop-up\n * <UiDropdown align=\"right\" drop=\"up\" width=\"w-48\">\n * <template #trigger=\"{ toggle }\">\n * <UiButton variant=\"ghost\" icon-only @click=\"toggle\">\n * <UiIcon name=\"mdi:dots-vertical\" class=\"w-5 h-5\" />\n * </UiButton>\n * </template>\n * <slot />\n * </UiDropdown>\n *\n * @emits {void} open — Emitted when the dropdown opens\n * @emits {void} close — Emitted when the dropdown closes\n *\n * @slot trigger — Trigger element that opens the dropdown. Receives { open: boolean, toggle: Function }\n * @slot default — Dropdown menu content. Receives { close: Function }\n *\n * @see UiDropdownItem — Standard menu item for use inside this dropdown\n * @see UiDropdownSubmenu — Nested submenu for this dropdown\n */\nimport { ref, computed } from 'vue'\nimport { onClickOutside } from '../composables/onClickOutside.js'\nimport { useEventListener } from '../composables/useEventListener.js'\nconst props = defineProps({\n /**\n * Width class applied to the dropdown panel.\n * @type {string}\n * @default 'w-56'\n * @example 'w-48', 'w-64', 'w-72'\n */\n width: { type: String, default: 'w-56' },\n\n /**\n * Horizontal alignment of the panel relative to the trigger.\n * @type {string}\n * @default 'left'\n * @values 'left' | 'right'\n */\n align: { type: String, default: 'left' },\n\n /**\n * Drop direction — 'down' opens below the trigger, 'up' opens above.\n * @type {string}\n * @default 'down'\n * @values 'down' | 'up'\n */\n drop: { type: String, default: 'down' },\n\n /**\n * Override all default panel classes (bg, border, rounded, shadow).\n * When set, the built-in panel styling is completely replaced.\n * @type {string}\n * @default ''\n */\n panelClass: { type: String, default: '' },\n})\n\nconst emit = defineEmits(['open', 'close'])\n\nconst isOpen = ref(false)\nconst containerRef = ref(null)\n\n// Build panel positioning/styling classes, or use custom override\nconst panelClasses = computed(() => {\n if (props.panelClass) return props.panelClass\n const align = props.align === 'right' ? 'right-0' : 'left-0'\n const dropDir = props.drop === 'up' ? 'bottom-full mb-1' : 'mt-1'\n return `absolute z-50 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg py-1 ${props.width} ${align} ${dropDir}`\n})\n\n// Use slide-up transition for drop=\"up\", scale transition for drop=\"down\"\nconst transitionClasses = computed(() => {\n if (props.drop === 'up') {\n return {\n enterActive: 'transition ease-out duration-150',\n enterFrom: 'opacity-0 translate-y-1',\n enterTo: 'opacity-100 translate-y-0',\n leaveActive: 'transition ease-in duration-100',\n leaveFrom: 'opacity-100 translate-y-0',\n leaveTo: 'opacity-0 translate-y-1',\n }\n }\n return {\n enterActive: 'transition duration-100 ease-out',\n enterFrom: 'opacity-0 scale-95',\n enterTo: 'opacity-100 scale-100',\n leaveActive: 'transition duration-75 ease-in',\n leaveFrom: 'opacity-100 scale-100',\n leaveTo: 'opacity-0 scale-95',\n }\n})\n\nconst toggle = () => {\n isOpen.value = !isOpen.value\n emit(isOpen.value ? 'open' : 'close')\n}\n\nconst close = () => {\n if (isOpen.value) {\n isOpen.value = false\n emit('close')\n }\n}\n\nonClickOutside(containerRef, close)\n\nuseEventListener(globalThis.document, 'keydown', (e) => {\n if (e.key === 'Escape') close()\n})\n\ndefineExpose({ isOpen, toggle, close })\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6DA,MAAM,QAAQ;EAkCd,MAAM,OAAO;EAEb,MAAM,SAAS,IAAI,KAAK;EACxB,MAAM,eAAe,IAAI,IAAI;EAG7B,MAAM,eAAe,eAAe;GAClC,IAAI,MAAM,YAAY,OAAO,MAAM;GACnC,MAAM,QAAQ,MAAM,UAAU,UAAU,YAAY;GACpD,MAAM,UAAU,MAAM,SAAS,OAAO,qBAAqB;GAC3D,OAAO,iHAAiH,MAAM,MAAM,GAAG,MAAM,GAAG;EAClJ,CAAC;EAGD,MAAM,oBAAoB,eAAe;GACvC,IAAI,MAAM,SAAS,MACjB,OAAO;IACL,aAAa;IACb,WAAW;IACX,SAAS;IACT,aAAa;IACb,WAAW;IACX,SAAS;GACX;GAEF,OAAO;IACL,aAAa;IACb,WAAW;IACX,SAAS;IACT,aAAa;IACb,WAAW;IACX,SAAS;GACX;EACF,CAAC;EAED,MAAM,eAAe;GACnB,OAAO,QAAQ,CAAC,OAAO;GACvB,KAAK,OAAO,QAAQ,SAAS,OAAO;EACtC;EAEA,MAAM,cAAc;GAClB,IAAI,OAAO,OAAO;IAChB,OAAO,QAAQ;IACf,KAAK,OAAO;GACd;EACF;EAEA,eAAe,cAAc,KAAK;EAElC,iBAAiB,WAAW,UAAU,YAAY,MAAM;GACtD,IAAI,EAAE,QAAQ,UAAU,MAAM;EAChC,CAAC;EAED,SAAa;GAAE;GAAQ;GAAQ;EAAM,CAAC;;GAnJpC,OAAA,UAAA,GAAA,mBAiBM,OAAA;IAjBG,SAAA;IAAJ,KAAI;IAAe,OAAM;GAE5B,GAAA,CAAA,WAAuD,KAAA,QAAA,WAAA;IAAjC,MAAM,OAAA;IAAiB;GAG7C,CAAA,GAAA,YAWa,YAAA;IAVV,sBAAoB,kBAAA,MAAkB;IACtC,oBAAkB,kBAAA,MAAkB;IACpC,kBAAgB,kBAAA,MAAkB;IAClC,sBAAoB,kBAAA,MAAkB;IACtC,oBAAkB,kBAAA,MAAkB;IACpC,kBAAgB,kBAAA,MAAkB;;IAEnC,SAAA,cAEM,CAFN,eAAA,mBAEM,OAAA,EAFgB,OAAK,eAAE,aAAA,KAAY,EAAA,GAAA,CACvC,WAAuB,KAAA,QAAA,WAAA,EAAT,MAAK,CAAA,CAAA,GAAA,CAAA,GAAA,CADR,CAAA,OAAA,OAAA,KAAM,CAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"Dropdown.js","names":[],"sources":["../../src/components/Dropdown.vue"],"sourcesContent":["<template>\n <div ref=\"containerRef\" class=\"relative\">\n <!-- Trigger slot: receives { open, toggle } for controlling the dropdown -->\n <slot name=\"trigger\" :open=\"isOpen\" :toggle=\"toggle\" />\n\n <!-- Dropdown panel with animated enter/leave transitions -->\n <Transition\n :enter-active-class=\"transitionClasses.enterActive\"\n :enter-from-class=\"transitionClasses.enterFrom\"\n :enter-to-class=\"transitionClasses.enterTo\"\n :leave-active-class=\"transitionClasses.leaveActive\"\n :leave-from-class=\"transitionClasses.leaveFrom\"\n :leave-to-class=\"transitionClasses.leaveTo\"\n >\n <div v-show=\"isOpen\" :class=\"panelClasses\" :style=\"{ transformOrigin: panelOrigin }\">\n <slot :close=\"close\" />\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup>\n/**\n * UiDropdown — Headless dropdown menu with configurable alignment, direction, and transitions.\n *\n * Uses a trigger slot that receives `open` state and `toggle` function, and a default\n * slot for menu content that receives a `close` function. Closes on outside click and\n * Escape key. Supports both downward and upward drop directions with matching transitions.\n * Exposes `isOpen`, `toggle()`, and `close()` for programmatic control.\n *\n * @example Basic dropdown with button trigger\n * <UiDropdown>\n * <template #trigger=\"{ toggle }\">\n * <UiButton @click=\"toggle\">Menu</UiButton>\n * </template>\n * <UiDropdownItem icon=\"mdi:pencil\" label=\"Edit\" @click=\"edit\" />\n * <UiDropdownItem icon=\"mdi:trash-can\" label=\"Delete\" color=\"red\" @click=\"del\" />\n * </UiDropdown>\n *\n * @example Right-aligned, drop-up\n * <UiDropdown align=\"right\" drop=\"up\" width=\"w-48\">\n * <template #trigger=\"{ toggle }\">\n * <UiButton variant=\"ghost\" icon-only @click=\"toggle\">\n * <UiIcon name=\"mdi:dots-vertical\" class=\"w-5 h-5\" />\n * </UiButton>\n * </template>\n * <slot />\n * </UiDropdown>\n *\n * @emits {void} open — Emitted when the dropdown opens\n * @emits {void} close — Emitted when the dropdown closes\n *\n * @slot trigger — Trigger element that opens the dropdown. Receives { open: boolean, toggle: Function }\n * @slot default — Dropdown menu content. Receives { close: Function }\n *\n * @see UiDropdownItem — Standard menu item for use inside this dropdown\n * @see UiDropdownSubmenu — Nested submenu for this dropdown\n */\nimport { ref, computed } from 'vue'\nimport { onClickOutside } from '../composables/onClickOutside.js'\nimport { useEventListener } from '../composables/useEventListener.js'\nimport { MENU_PANEL_CLASS } from '../internal/menu.js'\nconst props = defineProps({\n /**\n * Width class applied to the dropdown panel.\n * @type {string}\n * @default 'w-56'\n * @example 'w-48', 'w-64', 'w-72'\n */\n width: { type: String, default: 'w-56' },\n\n /**\n * Horizontal alignment of the panel relative to the trigger.\n * @type {string}\n * @default 'left'\n * @values 'left' | 'right'\n */\n align: { type: String, default: 'left' },\n\n /**\n * Drop direction — 'down' opens below the trigger, 'up' opens above.\n * @type {string}\n * @default 'down'\n * @values 'down' | 'up'\n */\n drop: { type: String, default: 'down' },\n\n /**\n * Override all default panel classes (bg, border, rounded, shadow).\n * When set, the built-in panel styling is completely replaced.\n * @type {string}\n * @default ''\n */\n panelClass: { type: String, default: '' },\n})\n\nconst emit = defineEmits(['open', 'close'])\n\nconst isOpen = ref(false)\nconst containerRef = ref(null)\n\n// Build panel positioning/styling classes, or use custom override\nconst panelClasses = computed(() => {\n if (props.panelClass) return props.panelClass\n const align = props.align === 'right' ? 'right-0' : 'left-0'\n const dropDir = props.drop === 'up' ? 'bottom-full mb-1' : 'mt-1'\n // `p-1` (not just `py-1`) insets the rows so their rounded hover highlight\n // reads as a chip with breathing room from the panel edge.\n return `absolute z-50 ${MENU_PANEL_CLASS} p-1 ${props.width} ${align} ${dropDir}`\n})\n\n// Inline transform-origin (not a Tailwind class, so it needs no build step to\n// take effect): the panel scales in from the corner nearest the trigger rather\n// than drifting in from its centre.\nconst panelOrigin = computed(() => {\n const y = props.drop === 'up' ? 'bottom' : 'top'\n const x = props.align === 'right' ? 'right' : 'left'\n return `${y} ${x}`\n})\n\n// Use slide-up transition for drop=\"up\", scale transition for drop=\"down\"\nconst transitionClasses = computed(() => {\n if (props.drop === 'up') {\n return {\n enterActive: 'transition ease-out duration-150',\n enterFrom: 'opacity-0 translate-y-1',\n enterTo: 'opacity-100 translate-y-0',\n leaveActive: 'transition ease-in duration-100',\n leaveFrom: 'opacity-100 translate-y-0',\n leaveTo: 'opacity-0 translate-y-1',\n }\n }\n return {\n enterActive: 'transition duration-100 ease-out',\n enterFrom: 'opacity-0 scale-95',\n enterTo: 'opacity-100 scale-100',\n leaveActive: 'transition duration-75 ease-in',\n leaveFrom: 'opacity-100 scale-100',\n leaveTo: 'opacity-0 scale-95',\n }\n})\n\nconst toggle = () => {\n isOpen.value = !isOpen.value\n emit(isOpen.value ? 'open' : 'close')\n}\n\nconst close = () => {\n if (isOpen.value) {\n isOpen.value = false\n emit('close')\n }\n}\n\nonClickOutside(containerRef, close)\n\nuseEventListener(globalThis.document, 'keydown', (e) => {\n if (e.key === 'Escape') close()\n})\n\ndefineExpose({ isOpen, toggle, close })\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8DA,MAAM,Q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ACpC,kBAAgB,kBAAA,MAAkB;IAClC,sBAAoB,kBAAA,MAAkB;IACtC,oBAAkB,kBAAA,MAAkB;IACpC,kBAAgB,kBAAA,MAAkB;;IAEnC,SAAA,cAEM,CAFN,eAAA,mBAEM,OAAA;KAFgB,OAAK,eAAE,aAAA,KAAY;KAAG,OAAK,eAAA,EAAA,iBAAqB,YAAA,MAAW,CAAA;IAC/E,GAAA,CAAA,WAAuB,KAAA,QAAA,WAAA,EAAT,MAAK,CAAA,CAAA,GAAA,CAAA,GAAA,CADR,CAAA,OAAA,OAAA,KAAM,CAAA,CAAA,CAAA,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import _sfc_main$1 from "../icons/Icon.js";
2
2
  import _sfc_main$2 from "./Button.js";
3
- import { Transition, createCommentVNode, createElementBlock, createElementVNode, createVNode, normalizeClass, onMounted, onUnmounted, openBlock, ref, renderSlot, toDisplayString, withCtx } from "vue";
3
+ import { MENU_PANEL_CLASS } from "../internal/menu.js";
4
+ import { Transition, createCommentVNode, createElementBlock, createElementVNode, createVNode, normalizeClass, normalizeStyle, onMounted, onUnmounted, openBlock, ref, renderSlot, toDisplayString, unref, withCtx } from "vue";
4
5
  //#region src/components/DropdownSubmenu.vue
5
6
  var _hoisted_1 = { class: "flex-1 text-left" };
6
7
  var _hoisted_2 = {
@@ -128,8 +129,9 @@ var _sfc_main = {
128
129
  }, {
129
130
  default: withCtx(() => [showSub.value && !__props.disabled && !isMobile.value ? (openBlock(), createElementBlock("div", {
130
131
  key: 0,
131
- class: normalizeClass(["absolute top-0 w-52 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg py-1 z-50", __props.alignLeft ? "right-full mr-1" : "left-full ml-1"])
132
- }, [renderSlot(_ctx.$slots, "default")], 2)) : createCommentVNode("", true)]),
132
+ class: normalizeClass(["absolute top-0 w-52 py-1 z-50", [unref(MENU_PANEL_CLASS), __props.alignLeft ? "right-full mr-1" : "left-full ml-1"]]),
133
+ style: normalizeStyle({ transformOrigin: __props.alignLeft ? "top right" : "top left" })
134
+ }, [renderSlot(_ctx.$slots, "default")], 6)) : createCommentVNode("", true)]),
133
135
  _: 3
134
136
  })
135
137
  ], 32);
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownSubmenu.js","names":[],"sources":["../../src/components/DropdownSubmenu.vue"],"sourcesContent":["<template>\n <!-- Hover-triggered on desktop, click-triggered on mobile -->\n <div\n class=\"relative\"\n @mouseenter=\"!isMobile && (showSub = true)\"\n @mouseleave=\"!isMobile && (showSub = false)\"\n >\n <UiButton variant=\"menu-item\" :disabled=\"disabled\" @click=\"showSub = !showSub\">\n <UiIcon :name=\"icon\" class=\"w-4 h-4 block shrink-0\" />\n <span class=\"flex-1 text-left\">{{ label }}</span>\n <UiIcon\n :name=\"isMobile ? (showSub ? 'mdi:chevron-up' : 'mdi:chevron-down') : 'mdi:chevron-right'\"\n class=\"w-3.5 h-3.5 block shrink-0 text-gray-400\"\n />\n </UiButton>\n\n <!-- Mobile: inline accordion with left border accent -->\n <Transition\n enter-active-class=\"transition-all duration-100 ease-out\"\n enter-from-class=\"max-h-0 opacity-0\"\n enter-to-class=\"max-h-60 opacity-100\"\n leave-active-class=\"transition-all duration-75 ease-in\"\n leave-from-class=\"max-h-60 opacity-100\"\n leave-to-class=\"max-h-0 opacity-0\"\n >\n <div\n v-if=\"showSub && !disabled && isMobile\"\n class=\"overflow-hidden bg-gray-50 dark:bg-gray-850 border-l-2 border-primary-400 ml-5\"\n >\n <slot />\n </div>\n </Transition>\n\n <!-- Desktop: flyout panel positioned left or right -->\n <Transition\n enter-active-class=\"transition duration-100 ease-out\"\n enter-from-class=\"opacity-0 scale-95\"\n enter-to-class=\"opacity-100 scale-100\"\n leave-active-class=\"transition duration-75 ease-in\"\n leave-from-class=\"opacity-100 scale-100\"\n leave-to-class=\"opacity-0 scale-95\"\n >\n <div\n v-if=\"showSub && !disabled && !isMobile\"\n class=\"absolute top-0 w-52 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg py-1 z-50\"\n :class=\"alignLeft ? 'right-full mr-1' : 'left-full ml-1'\"\n >\n <slot />\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup>\n/**\n * UiDropdownSubmenu — Nested submenu for UiDropdown with responsive behavior.\n *\n * On desktop (≥640px), shows a flyout panel on hover to the left or right.\n * On mobile (<640px), expands inline as an accordion with a left border accent.\n * Automatically detects viewport width on mount and resize.\n *\n * @example Basic submenu\n * <UiDropdownSubmenu icon=\"mdi:format-text\" label=\"Text Style\">\n * <UiDropdownItem icon=\"mdi:format-bold\" label=\"Bold\" @click=\"bold\" />\n * <UiDropdownItem icon=\"mdi:format-italic\" label=\"Italic\" @click=\"italic\" />\n * </UiDropdownSubmenu>\n *\n * @example Left-aligned flyout\n * <UiDropdownSubmenu icon=\"mdi:share\" label=\"Share\" align-left>\n * <UiDropdownItem icon=\"mdi:email\" label=\"Email\" @click=\"shareEmail\" />\n * </UiDropdownSubmenu>\n *\n * @slot default — Submenu items (typically UiDropdownItem components)\n *\n * @see UiDropdown — Parent dropdown container\n * @see UiDropdownItem — Standard menu item for use inside this submenu\n */\nimport { ref, onMounted, onUnmounted } from 'vue'\nimport UiButton from './Button.vue'\nimport UiIcon from '../icons/Icon.vue'\ndefineProps({\n /**\n * MDI icon name displayed at the start of the trigger row.\n * @type {string}\n * @required\n */\n icon: { type: String, required: true },\n\n /**\n * Text label for the submenu trigger.\n * @type {string}\n * @required\n */\n label: { type: String, required: true },\n\n /**\n * Disabled state — prevents opening the submenu.\n * @type {boolean}\n * @default false\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Align the desktop flyout to the left (right-to-left) instead of the default right.\n * @type {boolean}\n * @default false\n */\n alignLeft: { type: Boolean, default: false },\n})\n\nconst showSub = ref(false)\n// Track viewport width to switch between mobile accordion and desktop flyout\nconst isMobile = ref(false)\n\nconst checkMobile = () => {\n isMobile.value = window.innerWidth < 640\n}\n\nonMounted(() => {\n checkMobile()\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,CAAA;;;IAKZ,YAea,YAAA;KAdX,sBAAmB;KACnB,oBAAiB;KACjB,kBAAe;KACf,sBAAmB;KACnB,oBAAiB;KACjB,kBAAe;;KAEf,SAAA,cAMM,CALE,QAAA,SAAO,CAAK,QAAA,YAAQ,CAAK,SAAA,SADjC,UAAA,GAAA,mBAMM,OAAA;;MAJJ,OAAK,eAAA,CAAC,4HACE,QAAA,YAAS,oBAAA,gBAAA,CAAA;KAEjB,GAAA,CAAA,WAAQ,KAAA,QAAA,SAAA,CAAA,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"DropdownSubmenu.js","names":[],"sources":["../../src/components/DropdownSubmenu.vue"],"sourcesContent":["<template>\n <!-- Hover-triggered on desktop, click-triggered on mobile -->\n <div\n class=\"relative\"\n @mouseenter=\"!isMobile && (showSub = true)\"\n @mouseleave=\"!isMobile && (showSub = false)\"\n >\n <UiButton variant=\"menu-item\" :disabled=\"disabled\" @click=\"showSub = !showSub\">\n <UiIcon :name=\"icon\" class=\"w-4 h-4 block shrink-0\" />\n <span class=\"flex-1 text-left\">{{ label }}</span>\n <UiIcon\n :name=\"isMobile ? (showSub ? 'mdi:chevron-up' : 'mdi:chevron-down') : 'mdi:chevron-right'\"\n class=\"w-3.5 h-3.5 block shrink-0 text-gray-400\"\n />\n </UiButton>\n\n <!-- Mobile: inline accordion with left border accent -->\n <Transition\n enter-active-class=\"transition-all duration-100 ease-out\"\n enter-from-class=\"max-h-0 opacity-0\"\n enter-to-class=\"max-h-60 opacity-100\"\n leave-active-class=\"transition-all duration-75 ease-in\"\n leave-from-class=\"max-h-60 opacity-100\"\n leave-to-class=\"max-h-0 opacity-0\"\n >\n <div\n v-if=\"showSub && !disabled && isMobile\"\n class=\"overflow-hidden bg-gray-50 dark:bg-gray-850 border-l-2 border-primary-400 ml-5\"\n >\n <slot />\n </div>\n </Transition>\n\n <!-- Desktop: flyout panel positioned left or right -->\n <Transition\n enter-active-class=\"transition duration-100 ease-out\"\n enter-from-class=\"opacity-0 scale-95\"\n enter-to-class=\"opacity-100 scale-100\"\n leave-active-class=\"transition duration-75 ease-in\"\n leave-from-class=\"opacity-100 scale-100\"\n leave-to-class=\"opacity-0 scale-95\"\n >\n <div\n v-if=\"showSub && !disabled && !isMobile\"\n class=\"absolute top-0 w-52 py-1 z-50\"\n :class=\"[MENU_PANEL_CLASS, alignLeft ? 'right-full mr-1' : 'left-full ml-1']\"\n :style=\"{ transformOrigin: alignLeft ? 'top right' : 'top left' }\"\n >\n <slot />\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup>\n/**\n * UiDropdownSubmenu — Nested submenu for UiDropdown with responsive behavior.\n *\n * On desktop (≥640px), shows a flyout panel on hover to the left or right.\n * On mobile (<640px), expands inline as an accordion with a left border accent.\n * Automatically detects viewport width on mount and resize.\n *\n * @example Basic submenu\n * <UiDropdownSubmenu icon=\"mdi:format-text\" label=\"Text Style\">\n * <UiDropdownItem icon=\"mdi:format-bold\" label=\"Bold\" @click=\"bold\" />\n * <UiDropdownItem icon=\"mdi:format-italic\" label=\"Italic\" @click=\"italic\" />\n * </UiDropdownSubmenu>\n *\n * @example Left-aligned flyout\n * <UiDropdownSubmenu icon=\"mdi:share\" label=\"Share\" align-left>\n * <UiDropdownItem icon=\"mdi:email\" label=\"Email\" @click=\"shareEmail\" />\n * </UiDropdownSubmenu>\n *\n * @slot default — Submenu items (typically UiDropdownItem components)\n *\n * @see UiDropdown — Parent dropdown container\n * @see UiDropdownItem — Standard menu item for use inside this submenu\n */\nimport { ref, onMounted, onUnmounted } from 'vue'\nimport UiButton from './Button.vue'\nimport UiIcon from '../icons/Icon.vue'\nimport { MENU_PANEL_CLASS } from '../internal/menu.js'\ndefineProps({\n /**\n * MDI icon name displayed at the start of the trigger row.\n * @type {string}\n * @required\n */\n icon: { type: String, required: true },\n\n /**\n * Text label for the submenu trigger.\n * @type {string}\n * @required\n */\n label: { type: String, required: true },\n\n /**\n * Disabled state — prevents opening the submenu.\n * @type {boolean}\n * @default false\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Align the desktop flyout to the left (right-to-left) instead of the default right.\n * @type {boolean}\n * @default false\n */\n alignLeft: { type: Boolean, default: false },\n})\n\nconst showSub = ref(false)\n// Track viewport width to switch between mobile accordion and desktop flyout\nconst isMobile = ref(false)\n\nconst checkMobile = () => {\n isMobile.value = window.innerWidth < 640\n}\n\nonMounted(() => {\n checkMobile()\n window.addEventListener('resize', checkMobile)\n})\n\nonUnmounted(() => {\n window.removeEventListener('resize', checkMobile)\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgHA,MAAM,UAAU,IAAI,KAAK;EAEzB,MAAM,WAAW,IAAI,KAAK;EAE1B,MAAM,oBAAoB;GACxB,SAAS,QAAQ,OAAO,aAAa;EACvC;EAEA,gBAAgB;GACd,YAAY;GACZ,OAAO,iBAAiB,UAAU,WAAW;EAC/C,CAAC;EAED,kBAAkB;GAChB,OAAO,oBAAoB,UAAU,WAAW;EAClD,CAAC;;GA7HC,OAAA,UAAA,GAAA,mBAiDM,OAAA;IAhDJ,OAAM;IACL,cAAU,OAAA,OAAA,OAAA,MAAA,WAAA,CAAG,SAAA,UAAa,QAAA,QAAO;IACjC,cAAU,OAAA,OAAA,OAAA,MAAA,WAAA,CAAG,SAAA,UAAa,QAAA,QAAO;;IAElC,YAOW,aAAA;KAPD,SAAQ;KAAa,UAAU,QAAA;KAAW,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,QAAA,QAAO,CAAI,QAAA;;KACpE,SAAA,cAAsD;MAAtD,YAAsD,aAAA;OAA7C,MAAM,QAAA;OAAM,OAAM;;MAC3B,mBAAiD,QAAjD,YAAiD,gBAAf,QAAA,KAAK,GAAA,CAAA;MACvC,YAGE,aAAA;OAFC,MAAM,SAAA,QAAY,QAAA,QAAO,mBAAA,qBAAA;OAC1B,OAAM;;;;;IAKV,YAca,YAAA;KAbX,sBAAmB;KACnB,oBAAiB;KACjB,kBAAe;KACf,sBAAmB;KACnB,oBAAiB;KACjB,kBAAe;;KAEf,SAAA,cAKM,CAJE,QAAA,SAAO,CAAK,QAAA,YAAY,SAAA,SADhC,UAAA,GAAA,mBAKM,OALN,YAKM,CADJ,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,CAAA;;;IAKZ,YAgBa,YAAA;KAfX,sBAAmB;KACnB,oBAAiB;KACjB,kBAAe;KACf,sBAAmB;KACnB,oBAAiB;KACjB,kBAAe;;KAEf,SAAA,cAOM,CANE,QAAA,SAAO,CAAK,QAAA,YAAQ,CAAK,SAAA,SADjC,UAAA,GAAA,mBAOM,OAAA;;MALJ,OAAK,eAAA,CAAC,iCAA+B,CAC5B,MAAA,gBAAA,GAAkB,QAAA,YAAS,oBAAA,gBAAA,CAAA,CAAA;MACnC,OAAK,eAAA,EAAA,iBAAqB,QAAA,YAAS,cAAA,WAAA,CAAA;KAEpC,GAAA,CAAA,WAAQ,KAAA,QAAA,SAAA,CAAA,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import { createElementBlock, createElementVNode, normalizeClass, openBlock, ref, renderSlot } from "vue";
1
+ import { createElementBlock, createElementVNode, normalizeClass, openBlock, ref, renderSlot, withModifiers } from "vue";
2
2
  //#region src/components/FileInput.vue
3
3
  var _hoisted_1 = [
4
4
  "accept",
@@ -98,12 +98,19 @@ var _sfc_main = {
98
98
  emit("select", props.multiple ? files : files[0]);
99
99
  e.target.value = "";
100
100
  }
101
+ const open = () => inputRef.value?.click();
102
+ const onTriggerClick = () => {
103
+ if (!props.disabled) open();
104
+ };
101
105
  __expose({
102
- open: () => inputRef.value?.click(),
106
+ open,
103
107
  el: inputRef
104
108
  });
105
109
  return (_ctx, _cache) => {
106
- return openBlock(), createElementBlock("label", { class: normalizeClass(["inline-flex items-center gap-2 cursor-pointer transition-colors", __props.disabled ? "opacity-50 pointer-events-none" : ""]) }, [renderSlot(_ctx.$slots, "default"), createElementVNode("input", {
110
+ return openBlock(), createElementBlock("span", {
111
+ class: normalizeClass(["inline-flex items-center gap-2 cursor-pointer transition-colors", __props.disabled ? "opacity-50 pointer-events-none" : ""]),
112
+ onClick: onTriggerClick
113
+ }, [renderSlot(_ctx.$slots, "default"), createElementVNode("input", {
107
114
  ref_key: "inputRef",
108
115
  ref: inputRef,
109
116
  type: "file",
@@ -111,7 +118,8 @@ var _sfc_main = {
111
118
  accept: __props.accept,
112
119
  multiple: __props.multiple,
113
120
  disabled: __props.disabled,
114
- onChange
121
+ onChange,
122
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
115
123
  }, null, 40, _hoisted_1)], 2);
116
124
  };
117
125
  }
@@ -1 +1 @@
1
- {"version":3,"file":"FileInput.js","names":[],"sources":["../../src/components/FileInput.vue"],"sourcesContent":["<template>\n <!-- Clickable label wrapping a hidden file input — slot content acts as the visible trigger -->\n <label\n class=\"inline-flex items-center gap-2 cursor-pointer transition-colors\"\n :class=\"disabled ? 'opacity-50 pointer-events-none' : ''\"\n >\n <slot />\n <input\n ref=\"inputRef\"\n type=\"file\"\n class=\"hidden\"\n :accept=\"accept\"\n :multiple=\"multiple\"\n :disabled=\"disabled\"\n @change=\"onChange\"\n />\n </label>\n</template>\n\n<script setup>\n/**\n * UiFileInput — Hidden file input wrapped in a clickable label for custom trigger UI.\n *\n * The default slot provides the visible trigger content (e.g. a button or icon).\n * Clicking anywhere in the label opens the native file picker. Supports file type\n * filtering via `accept`, multi-file selection, and max file size validation.\n * Exposes an `open()` method for programmatic triggering.\n *\n * @example Single image upload\n * <UiFileInput accept=\"image/*\" @select=\"onFile\">\n * <UiButton variant=\"outline\">Upload Image</UiButton>\n * </UiFileInput>\n *\n * @example Multiple files with size limit (5 MB)\n * <UiFileInput multiple :max-size=\"5 * 1024 * 1024\" @select=\"onFiles\" @error=\"onError\">\n * <span>Choose files</span>\n * </UiFileInput>\n *\n * @example Programmatic open via ref\n * <UiFileInput ref=\"fileInput\" @select=\"onFile\"><span>Pick</span></UiFileInput>\n * <!-- In script: fileInput.value.open() -->\n *\n * @emits {File | File[]} select — Emitted with the selected file(s) after validation passes\n * @emits {{ type: string, file: File, message: string }} error — Emitted when a file exceeds the maxSize limit\n *\n * @slot default — Trigger content (e.g. a button or icon) that opens the file picker\n */\nimport { ref } from 'vue'\nconst props = defineProps({\n /**\n * Accepted file types (MIME types or extensions), passed to the native `accept` attribute.\n * @type {string}\n * @default undefined\n * @example 'image/*', '.pdf,.doc', 'video/mp4'\n */\n accept: { type: String, default: undefined },\n\n /**\n * Allow selecting multiple files at once.\n * @type {boolean}\n * @default false\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Disabled state — dims the label and prevents file picker from opening.\n * @type {boolean}\n * @default false\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Maximum allowed file size in bytes. Set to 0 for no limit.\n * Emits an 'error' event with `{ type: 'maxSize', file, message }` when exceeded.\n * @type {number}\n * @default 0\n */\n maxSize: { type: Number, default: 0 },\n})\n\nconst emit = defineEmits(['select', 'error'])\n\nconst inputRef = ref(null)\n\nfunction onChange(e) {\n const files = Array.from(e.target.files || [])\n if (!files.length) return\n\n if (props.maxSize > 0) {\n const oversized = files.find((f) => f.size > props.maxSize)\n if (oversized) {\n const maxMB = (props.maxSize / 1024 / 1024).toFixed(1)\n emit('error', { type: 'maxSize', file: oversized, message: `File exceeds ${maxMB} MB limit` })\n e.target.value = ''\n return\n }\n }\n\n emit('select', props.multiple ? files : files[0])\n e.target.value = ''\n}\n\ndefineExpose({\n open: () => inputRef.value?.click(),\n el: inputRef,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDA,MAAM,QAAQ;EAgCd,MAAM,OAAO;EAEb,MAAM,WAAW,IAAI,IAAI;EAEzB,SAAS,SAAS,GAAG;GACnB,MAAM,QAAQ,MAAM,KAAK,EAAE,OAAO,SAAS,CAAC,CAAC;GAC7C,IAAI,CAAC,MAAM,QAAQ;GAEnB,IAAI,MAAM,UAAU,GAAG;IACrB,MAAM,YAAY,MAAM,MAAM,MAAM,EAAE,OAAO,MAAM,OAAO;IAC1D,IAAI,WAAW;KACb,MAAM,SAAS,MAAM,UAAU,OAAO,KAAA,CAAM,QAAQ,CAAC;KACrD,KAAK,SAAS;MAAE,MAAM;MAAW,MAAM;MAAW,SAAS,gBAAgB,MAAM;KAAW,CAAC;KAC7F,EAAE,OAAO,QAAQ;KACjB;IACF;GACF;GAEA,KAAK,UAAU,MAAM,WAAW,QAAQ,MAAM,EAAE;GAChD,EAAE,OAAO,QAAQ;EACnB;EAEA,SAAa;GACX,YAAY,SAAS,OAAO,MAAM;GAClC,IAAI;EACN,CAAC;;GAvGC,OAAA,UAAA,GAAA,mBAcQ,SAAA,EAbN,OAAK,eAAA,CAAC,mEACE,QAAA,WAAQ,mCAAA,EAAA,CAAA,EAAA,GAAA,CAEhB,WAAQ,KAAA,QAAA,SAAA,GACR,mBAQE,SAAA;IAPI,SAAA;IAAJ,KAAI;IACJ,MAAK;IACL,OAAM;IACL,QAAQ,QAAA;IACR,UAAU,QAAA;IACV,UAAU,QAAA;IACF"}
1
+ {"version":3,"file":"FileInput.js","names":[],"sources":["../../src/components/FileInput.vue"],"sourcesContent":["<template>\n <!-- Clickable wrapper around a hidden file input — slot content is the visible trigger.\n A plain <label> would not work when the slot is a <button> (or any interactive\n element): the browser skips label→control forwarding when the click lands on an\n interactive descendant, so the picker never opened. Handling the click ourselves\n makes any trigger content work. -->\n <span\n class=\"inline-flex items-center gap-2 cursor-pointer transition-colors\"\n :class=\"disabled ? 'opacity-50 pointer-events-none' : ''\"\n @click=\"onTriggerClick\"\n >\n <slot />\n <input\n ref=\"inputRef\"\n type=\"file\"\n class=\"hidden\"\n :accept=\"accept\"\n :multiple=\"multiple\"\n :disabled=\"disabled\"\n @change=\"onChange\"\n @click.stop\n />\n </span>\n</template>\n\n<script setup>\n/**\n * UiFileInput — Hidden file input wrapped in a clickable label for custom trigger UI.\n *\n * The default slot provides the visible trigger content (e.g. a button or icon).\n * Clicking anywhere in the label opens the native file picker. Supports file type\n * filtering via `accept`, multi-file selection, and max file size validation.\n * Exposes an `open()` method for programmatic triggering.\n *\n * @example Single image upload\n * <UiFileInput accept=\"image/*\" @select=\"onFile\">\n * <UiButton variant=\"outline\">Upload Image</UiButton>\n * </UiFileInput>\n *\n * @example Multiple files with size limit (5 MB)\n * <UiFileInput multiple :max-size=\"5 * 1024 * 1024\" @select=\"onFiles\" @error=\"onError\">\n * <span>Choose files</span>\n * </UiFileInput>\n *\n * @example Programmatic open via ref\n * <UiFileInput ref=\"fileInput\" @select=\"onFile\"><span>Pick</span></UiFileInput>\n * <!-- In script: fileInput.value.open() -->\n *\n * @emits {File | File[]} select — Emitted with the selected file(s) after validation passes\n * @emits {{ type: string, file: File, message: string }} error — Emitted when a file exceeds the maxSize limit\n *\n * @slot default — Trigger content (e.g. a button or icon) that opens the file picker\n */\nimport { ref } from 'vue'\nconst props = defineProps({\n /**\n * Accepted file types (MIME types or extensions), passed to the native `accept` attribute.\n * @type {string}\n * @default undefined\n * @example 'image/*', '.pdf,.doc', 'video/mp4'\n */\n accept: { type: String, default: undefined },\n\n /**\n * Allow selecting multiple files at once.\n * @type {boolean}\n * @default false\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * Disabled state — dims the label and prevents file picker from opening.\n * @type {boolean}\n * @default false\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Maximum allowed file size in bytes. Set to 0 for no limit.\n * Emits an 'error' event with `{ type: 'maxSize', file, message }` when exceeded.\n * @type {number}\n * @default 0\n */\n maxSize: { type: Number, default: 0 },\n})\n\nconst emit = defineEmits(['select', 'error'])\n\nconst inputRef = ref(null)\n\nfunction onChange(e) {\n const files = Array.from(e.target.files || [])\n if (!files.length) return\n\n if (props.maxSize > 0) {\n const oversized = files.find((f) => f.size > props.maxSize)\n if (oversized) {\n const maxMB = (props.maxSize / 1024 / 1024).toFixed(1)\n emit('error', { type: 'maxSize', file: oversized, message: `File exceeds ${maxMB} MB limit` })\n e.target.value = ''\n return\n }\n }\n\n emit('select', props.multiple ? files : files[0])\n e.target.value = ''\n}\n\nconst open = () => inputRef.value?.click()\n\n// A click anywhere in the wrapper opens the picker. The hidden input's own\n// (programmatic) click is stopped from bubbling via `@click.stop` in the\n// template, so this never re-enters itself.\nconst onTriggerClick = () => {\n if (!props.disabled) open()\n}\n\ndefineExpose({\n open,\n el: inputRef,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsDA,MAAM,QAAQ;EAgCd,MAAM,OAAO;EAEb,MAAM,WAAW,IAAI,IAAI;EAEzB,SAAS,SAAS,GAAG;GACnB,MAAM,QAAQ,MAAM,KAAK,EAAE,OAAO,SAAS,CAAC,CAAC;GAC7C,IAAI,CAAC,MAAM,QAAQ;GAEnB,IAAI,MAAM,UAAU,GAAG;IACrB,MAAM,YAAY,MAAM,MAAM,MAAM,EAAE,OAAO,MAAM,OAAO;IAC1D,IAAI,WAAW;KACb,MAAM,SAAS,MAAM,UAAU,OAAO,KAAA,CAAM,QAAQ,CAAC;KACrD,KAAK,SAAS;MAAE,MAAM;MAAW,MAAM;MAAW,SAAS,gBAAgB,MAAM;KAAW,CAAC;KAC7F,EAAE,OAAO,QAAQ;KACjB;IACF;GACF;GAEA,KAAK,UAAU,MAAM,WAAW,QAAQ,MAAM,EAAE;GAChD,EAAE,OAAO,QAAQ;EACnB;EAEA,MAAM,aAAa,SAAS,OAAO,MAAM;EAKzC,MAAM,uBAAuB;GAC3B,IAAI,CAAC,MAAM,UAAU,KAAK;EAC5B;EAEA,SAAa;GACX;GACA,IAAI;EACN,CAAC;;GAlHC,OAAA,UAAA,GAAA,mBAgBO,QAAA;IAfL,OAAK,eAAA,CAAC,mEACE,QAAA,WAAQ,mCAAA,EAAA,CAAA;IACf,SAAO;GAER,GAAA,CAAA,WAAQ,KAAA,QAAA,SAAA,GACR,mBASE,SAAA;IARI,SAAA;IAAJ,KAAI;IACJ,MAAK;IACL,OAAM;IACL,QAAQ,QAAA;IACR,UAAU,QAAA;IACV,UAAU,QAAA;IACF;IACR,SAAK,OAAA,OAAA,OAAA,KAAA,oBAAN,CAAA,GAAW,CAAA,MAAA,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import _sfc_main$1 from "../icons/Icon.js";
2
- import { computed, createElementBlock, createVNode, mergeProps, normalizeClass, openBlock, useAttrs } from "vue";
3
- import { twMerge } from "tailwind-merge";
2
+ import { useMergedClasses } from "../composables/useMergedClasses.js";
3
+ import { computed, createElementBlock, createVNode, mergeProps, normalizeClass, openBlock, unref } from "vue";
4
4
  //#region src/components/IconTile.vue
5
5
  var _sfc_main = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
6
6
  __name: "IconTile",
@@ -75,14 +75,10 @@ var _sfc_main = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
75
75
  error: "bg-error-100 text-error-700 dark:bg-error-400/15 dark:text-error-300",
76
76
  blue: "bg-blue-100 text-blue-700 dark:bg-blue-400/15 dark:text-blue-300"
77
77
  })[props.color] ?? "bg-primary-100 text-primary-700 dark:bg-primary-400/15 dark:text-primary-300");
78
- const attrs = useAttrs();
79
- const restAttrs = computed(() => {
80
- const { class: _class, ...rest } = attrs;
81
- return rest;
82
- });
83
- const mergedClasses = computed(() => twMerge(sizeClass.value, colorClass.value, attrs.class));
78
+ const internalClasses = computed(() => `${sizeClass.value} ${colorClass.value}`);
79
+ const { mergedClasses, restAttrs } = useMergedClasses(internalClasses);
84
80
  return (_ctx, _cache) => {
85
- return openBlock(), createElementBlock("span", mergeProps({ class: ["inline-flex items-center justify-center", mergedClasses.value] }, restAttrs.value), [createVNode(_sfc_main$1, {
81
+ return openBlock(), createElementBlock("span", mergeProps({ class: ["inline-flex items-center justify-center", unref(mergedClasses)] }, unref(restAttrs)), [createVNode(_sfc_main$1, {
86
82
  name: __props.icon,
87
83
  class: normalizeClass(iconSizeClass.value),
88
84
  "aria-hidden": "true"
@@ -1 +1 @@
1
- {"version":3,"file":"IconTile.js","names":[],"sources":["../../src/components/IconTile.vue"],"sourcesContent":["<template>\n <span class=\"inline-flex items-center justify-center\" :class=\"mergedClasses\" v-bind=\"restAttrs\">\n <UiIcon :name=\"icon\" :class=\"iconSizeClass\" aria-hidden=\"true\" />\n </span>\n</template>\n\n<script setup>\n/**\n * UiIconTile — a small rounded, tinted tile holding a single icon: the motif\n * that stands in for a product logo or marks a feature next to a heading.\n *\n * Decorative by default — the icon is `aria-hidden`, on the assumption that a\n * label sits next to it in text. The tint uses the design system's semantic\n * colours; for a colour outside that set (a Tailwind palette, say) pass the\n * `bg-*`/`text-*` classes directly and they override the built-in tint via\n * `tailwind-merge`.\n *\n * @example Primary feature tile\n * <UiIconTile icon=\"mdi:shield-lock-outline\" />\n *\n * @example Large product mark in a custom colour\n * <UiIconTile icon=\"mdi:note-text-outline\" size=\"lg\" class=\"bg-sky-100 text-sky-700\" />\n *\n * @example Success tile\n * <UiIconTile icon=\"mdi:check\" color=\"success\" size=\"sm\" />\n */\nimport { computed, useAttrs } from 'vue'\nimport { twMerge } from 'tailwind-merge'\nimport UiIcon from '../icons/Icon.vue'\n\nconst props = defineProps({\n /**\n * MDI icon name.\n * @type {string}\n */\n icon: { type: String, required: true },\n\n /**\n * Tint colour from the semantic palette.\n * @type {string}\n * @default 'primary'\n * @values 'primary' | 'gray' | 'success' | 'warning' | 'error' | 'blue'\n */\n color: { type: String, default: 'primary' },\n\n /**\n * Tile size (the radius scales with it).\n * @type {string}\n * @default 'md'\n * @values 'sm' | 'md' | 'lg' | 'xl'\n */\n size: { type: String, default: 'md' },\n})\n\nconst sizeClass = computed(\n () =>\n ({\n sm: 'size-9 rounded-lg',\n md: 'size-11 rounded-xl',\n lg: 'size-14 rounded-2xl',\n xl: 'size-16 rounded-2xl',\n })[props.size] ?? 'size-11 rounded-xl',\n)\n\nconst iconSizeClass = computed(\n () =>\n ({\n sm: 'size-5',\n md: 'size-6',\n lg: 'size-8',\n xl: 'size-9',\n })[props.size] ?? 'size-6',\n)\n\nconst colorClass = computed(\n () =>\n ({\n primary: 'bg-primary-100 text-primary-700 dark:bg-primary-400/15 dark:text-primary-300',\n gray: 'bg-gray-100 text-gray-700 dark:bg-gray-700/60 dark:text-gray-200',\n success: 'bg-success-100 text-success-700 dark:bg-success-400/15 dark:text-success-300',\n warning: 'bg-warning-100 text-warning-700 dark:bg-warning-400/15 dark:text-warning-300',\n error: 'bg-error-100 text-error-700 dark:bg-error-400/15 dark:text-error-300',\n blue: 'bg-blue-100 text-blue-700 dark:bg-blue-400/15 dark:text-blue-300',\n })[props.color] ??\n 'bg-primary-100 text-primary-700 dark:bg-primary-400/15 dark:text-primary-300',\n)\n\ndefineOptions({ inheritAttrs: false })\n\nconst attrs = useAttrs()\nconst restAttrs = computed(() => {\n const { class: _class, ...rest } = attrs\n return rest\n})\n\n// External classes merge last so a caller's `bg-*`/`text-*` (e.g. a Tailwind\n// palette outside the semantic set) overrides the built-in tint rather than\n// colliding with it.\nconst mergedClasses = computed(() => twMerge(sizeClass.value, colorClass.value, attrs.class))\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BA,MAAM,QAAQ;EAwBd,MAAM,YAAY,gBAEb;GACC,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;EACN,EAAA,CAAG,MAAM,SAAS,oBACtB;EAEA,MAAM,gBAAgB,gBAEjB;GACC,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;EACN,EAAA,CAAG,MAAM,SAAS,QACtB;EAEA,MAAM,aAAa,gBAEd;GACC,SAAS;GACT,MAAM;GACN,SAAS;GACT,SAAS;GACT,OAAO;GACP,MAAM;EACR,EAAA,CAAG,MAAM,UACT,8EACJ;EAIA,MAAM,QAAQ,SAAS;EACvB,MAAM,YAAY,eAAe;GAC/B,MAAM,EAAE,OAAO,QAAQ,GAAG,SAAS;GACnC,OAAO;EACT,CAAC;EAKD,MAAM,gBAAgB,eAAe,QAAQ,UAAU,OAAO,WAAW,OAAO,MAAM,KAAK,CAAC;;GAjG1F,OAAA,UAAA,GAAA,mBAEO,QAFP,WAEO,EAFD,OAAK,CAAC,2CAAkD,cAAA,KAAa,EAAU,GAAA,UAAA,KAAS,GAAA,CAC5F,YAAiE,aAAA;IAAxD,MAAM,QAAA;IAAO,OAAK,eAAE,cAAA,KAAa;IAAE,eAAY"}
1
+ {"version":3,"file":"IconTile.js","names":[],"sources":["../../src/components/IconTile.vue"],"sourcesContent":["<template>\n <span class=\"inline-flex items-center justify-center\" :class=\"mergedClasses\" v-bind=\"restAttrs\">\n <UiIcon :name=\"icon\" :class=\"iconSizeClass\" aria-hidden=\"true\" />\n </span>\n</template>\n\n<script setup>\n/**\n * UiIconTile — a small rounded, tinted tile holding a single icon: the motif\n * that stands in for a product logo or marks a feature next to a heading.\n *\n * Decorative by default — the icon is `aria-hidden`, on the assumption that a\n * label sits next to it in text. The tint uses the design system's semantic\n * colours; for a colour outside that set (a Tailwind palette, say) pass the\n * `bg-*`/`text-*` classes directly and they override the built-in tint via\n * `tailwind-merge`.\n *\n * @example Primary feature tile\n * <UiIconTile icon=\"mdi:shield-lock-outline\" />\n *\n * @example Large product mark in a custom colour\n * <UiIconTile icon=\"mdi:note-text-outline\" size=\"lg\" class=\"bg-sky-100 text-sky-700\" />\n *\n * @example Success tile\n * <UiIconTile icon=\"mdi:check\" color=\"success\" size=\"sm\" />\n */\nimport { computed } from 'vue'\nimport { useMergedClasses } from '../composables/useMergedClasses.js'\nimport UiIcon from '../icons/Icon.vue'\n\nconst props = defineProps({\n /**\n * MDI icon name.\n * @type {string}\n */\n icon: { type: String, required: true },\n\n /**\n * Tint colour from the semantic palette.\n * @type {string}\n * @default 'primary'\n * @values 'primary' | 'gray' | 'success' | 'warning' | 'error' | 'blue'\n */\n color: { type: String, default: 'primary' },\n\n /**\n * Tile size (the radius scales with it).\n * @type {string}\n * @default 'md'\n * @values 'sm' | 'md' | 'lg' | 'xl'\n */\n size: { type: String, default: 'md' },\n})\n\nconst sizeClass = computed(\n () =>\n ({\n sm: 'size-9 rounded-lg',\n md: 'size-11 rounded-xl',\n lg: 'size-14 rounded-2xl',\n xl: 'size-16 rounded-2xl',\n })[props.size] ?? 'size-11 rounded-xl',\n)\n\nconst iconSizeClass = computed(\n () =>\n ({\n sm: 'size-5',\n md: 'size-6',\n lg: 'size-8',\n xl: 'size-9',\n })[props.size] ?? 'size-6',\n)\n\nconst colorClass = computed(\n () =>\n ({\n primary: 'bg-primary-100 text-primary-700 dark:bg-primary-400/15 dark:text-primary-300',\n gray: 'bg-gray-100 text-gray-700 dark:bg-gray-700/60 dark:text-gray-200',\n success: 'bg-success-100 text-success-700 dark:bg-success-400/15 dark:text-success-300',\n warning: 'bg-warning-100 text-warning-700 dark:bg-warning-400/15 dark:text-warning-300',\n error: 'bg-error-100 text-error-700 dark:bg-error-400/15 dark:text-error-300',\n blue: 'bg-blue-100 text-blue-700 dark:bg-blue-400/15 dark:text-blue-300',\n })[props.color] ??\n 'bg-primary-100 text-primary-700 dark:bg-primary-400/15 dark:text-primary-300',\n)\n\ndefineOptions({ inheritAttrs: false })\n\n// External classes merge last so a caller's `bg-*`/`text-*` (e.g. a Tailwind\n// palette outside the semantic set) overrides the built-in tint rather than\n// colliding with it.\nconst internalClasses = computed(() => `${sizeClass.value} ${colorClass.value}`)\nconst { mergedClasses, restAttrs } = useMergedClasses(internalClasses)\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BA,MAAM,QAAQ;EAwBd,MAAM,YAAY,gBAEb;GACC,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;EACN,EAAA,CAAG,MAAM,SAAS,oBACtB;EAEA,MAAM,gBAAgB,gBAEjB;GACC,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;EACN,EAAA,CAAG,MAAM,SAAS,QACtB;EAEA,MAAM,aAAa,gBAEd;GACC,SAAS;GACT,MAAM;GACN,SAAS;GACT,SAAS;GACT,OAAO;GACP,MAAM;EACR,EAAA,CAAG,MAAM,UACT,8EACJ;EAOA,MAAM,kBAAkB,eAAe,GAAG,UAAU,MAAM,GAAG,WAAW,OAAO;EAC/E,MAAM,EAAE,eAAe,cAAc,iBAAiB,eAAe;;GA5FnE,OAAA,UAAA,GAAA,mBAEO,QAFP,WAEO,EAFD,OAAK,CAAC,2CAAkD,MAAA,aAAA,CAAa,EAAU,GAAA,MAAA,SAAA,CAAS,GAAA,CAC5F,YAAiE,aAAA;IAAxD,MAAM,QAAA;IAAO,OAAK,eAAE,cAAA,KAAa;IAAE,eAAY"}
@@ -467,11 +467,11 @@ var _sfc_main = {
467
467
  })], 2)) : createCommentVNode("", true),
468
468
  isNumber.value && __props.stepperLayout === "stacked-left" ? (openBlock(), createElementBlock("div", {
469
469
  key: 1,
470
- class: normalizeClass(["flex flex-col w-6 border border-r-0 border-gray-300 dark:border-gray-600 rounded-l-lg overflow-hidden", { "opacity-50 pointer-events-none": __props.disabled }])
470
+ class: normalizeClass(["flex flex-col w-7 border border-r-0 border-gray-300 dark:border-gray-600 rounded-l-lg overflow-hidden", { "opacity-50 pointer-events-none": __props.disabled }])
471
471
  }, [createElementVNode("button", {
472
472
  type: "button",
473
473
  tabindex: "-1",
474
- class: "grid place-items-center w-4 flex-1 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none border-b border-gray-300 dark:border-gray-600",
474
+ class: "grid place-items-center w-full flex-1 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none border-b border-gray-300 dark:border-gray-600",
475
475
  "aria-label": "Increase value",
476
476
  onClick: stepUp
477
477
  }, [createVNode(_sfc_main$1, {
@@ -480,7 +480,7 @@ var _sfc_main = {
480
480
  })]), createElementVNode("button", {
481
481
  type: "button",
482
482
  tabindex: "-1",
483
- class: "grid place-items-center w-4 flex-1 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none",
483
+ class: "grid place-items-center w-full flex-1 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none",
484
484
  "aria-label": "Decrease value",
485
485
  onClick: stepDown
486
486
  }, [createVNode(_sfc_main$1, {
@@ -562,11 +562,11 @@ var _sfc_main = {
562
562
  }, null, 8, ["name"])], 40, _hoisted_7)) : createCommentVNode("", true),
563
563
  isNumber.value && __props.stepperLayout === "stacked-right" ? (openBlock(), createElementBlock("div", {
564
564
  key: 8,
565
- class: normalizeClass(["flex flex-col w-6 border border-l-0 border-gray-300 dark:border-gray-600 rounded-r-lg overflow-hidden", { "opacity-50 pointer-events-none": __props.disabled }])
565
+ class: normalizeClass(["flex flex-col w-7 border border-l-0 border-gray-300 dark:border-gray-600 rounded-r-lg overflow-hidden", { "opacity-50 pointer-events-none": __props.disabled }])
566
566
  }, [createElementVNode("button", {
567
567
  type: "button",
568
568
  tabindex: "-1",
569
- class: "grid place-items-center w-4 flex-1 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none border-b border-gray-300 dark:border-gray-600",
569
+ class: "grid place-items-center w-full flex-1 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none border-b border-gray-300 dark:border-gray-600",
570
570
  "aria-label": "Increase value",
571
571
  onClick: stepUp
572
572
  }, [createVNode(_sfc_main$1, {
@@ -575,7 +575,7 @@ var _sfc_main = {
575
575
  })]), createElementVNode("button", {
576
576
  type: "button",
577
577
  tabindex: "-1",
578
- class: "grid place-items-center w-4 flex-1 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none",
578
+ class: "grid place-items-center w-full flex-1 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none",
579
579
  "aria-label": "Decrease value",
580
580
  onClick: stepDown
581
581
  }, [createVNode(_sfc_main$1, {
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","names":["$slots"],"sources":["../../src/components/Input.vue"],"sourcesContent":["<template>\n <div class=\"w-full\">\n <div class=\"relative flex\">\n <!-- Number stepper: minus button on left (both-sides layout) -->\n <button\n v-if=\"isNumber && stepperLayout === 'both-sides'\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"flex items-center justify-center w-9 rounded-l-lg border border-r-0 border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none\"\n :class=\"{ 'opacity-50 pointer-events-none': disabled }\"\n aria-label=\"Decrease value\"\n @click=\"stepDown\"\n >\n <UiIcon name=\"mdi:minus\" class=\"w-4 h-4\" />\n </button>\n\n <!-- Number stepper: stacked up/down buttons on left -->\n <div\n v-if=\"isNumber && stepperLayout === 'stacked-left'\"\n class=\"flex flex-col w-6 border border-r-0 border-gray-300 dark:border-gray-600 rounded-l-lg overflow-hidden\"\n :class=\"{ 'opacity-50 pointer-events-none': disabled }\"\n >\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"grid place-items-center w-4 flex-1 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none border-b border-gray-300 dark:border-gray-600\"\n aria-label=\"Increase value\"\n @click=\"stepUp\"\n >\n <UiIcon name=\"mdi:chevron-up\" class=\"block w-3 h-3\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"grid place-items-center w-4 flex-1 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none\"\n aria-label=\"Decrease value\"\n @click=\"stepDown\"\n >\n <UiIcon name=\"mdi:chevron-down\" class=\"block w-3 h-3\" />\n </button>\n </div>\n\n <!-- Textarea mode: multi-line text input with custom scrollbar styling -->\n <textarea\n v-if=\"isTextarea\"\n ref=\"inputRef\"\n :value=\"modelValue\"\n :placeholder=\"placeholder\"\n :required=\"required\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :rows=\"rows\"\n :maxlength=\"maxlength\"\n class=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-400 focus:ring-2 focus:ring-primary-500 focus:border-primary-500 outline-none text-sm transition-colors [scrollbar-width:thin] [scrollbar-color:var(--color-gray-300)_transparent] dark:[scrollbar-color:var(--color-gray-600)_transparent] [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-thumb]:bg-gray-600 hover:[&::-webkit-scrollbar-thumb]:bg-gray-400 dark:hover:[&::-webkit-scrollbar-thumb]:bg-gray-500\"\n :class=\"resizeClass\"\n :style=\"textareaStyle\"\n @input=\"onInput\"\n @blur=\"onBlur\"\n />\n\n <!-- The actual input element (text, number, password, email, phone) -->\n <!-- Left icon/image slot -->\n <span\n v-if=\"!isTextarea && ($slots.left || iconLeft)\"\n class=\"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none text-gray-400 dark:text-gray-500\"\n >\n <slot name=\"left\">\n <UiIcon v-if=\"iconLeft\" :name=\"iconLeft\" class=\"w-4 h-4\" />\n </slot>\n </span>\n\n <input\n v-if=\"!isTextarea\"\n ref=\"inputRef\"\n :type=\"computedType\"\n :value=\"modelValue\"\n :placeholder=\"placeholder\"\n :required=\"required\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :autocomplete=\"autocomplete\"\n :minlength=\"minlength\"\n :maxlength=\"maxlength\"\n :inputmode=\"computedInputMode\"\n :min=\"min\"\n :max=\"max\"\n :step=\"step\"\n :pattern=\"pattern\"\n class=\"w-full py-2 border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-400 focus:ring-2 focus:ring-primary-500 focus:border-primary-500 outline-none text-sm transition-colors\"\n :class=\"inputClasses\"\n @input=\"onInput\"\n @blur=\"onBlur\"\n @keydown=\"onKeydown\"\n />\n\n <!-- Right icon/image slot (hidden when clear button or password toggle is shown) -->\n <span\n v-if=\"\n !isTextarea &&\n ($slots.right || iconRight) &&\n !(clearable && modelValue) &&\n !(isPassword && showToggle)\n \"\n class=\"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-gray-400 dark:text-gray-500\"\n >\n <slot name=\"right\">\n <UiIcon v-if=\"iconRight\" :name=\"iconRight\" class=\"w-4 h-4\" />\n </slot>\n </span>\n\n <!-- Clear button -->\n <button\n v-if=\"clearable && modelValue\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"absolute inset-y-0 right-0 flex items-center pr-3 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors\"\n aria-label=\"Clear\"\n @mousedown.prevent\n @click=\"emit('update:modelValue', '')\"\n >\n <UiIcon name=\"mdi:close-circle\" class=\"w-4 h-4\" />\n </button>\n\n <!-- Password visibility toggle button -->\n <button\n v-if=\"isPassword && showToggle\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"absolute inset-y-0 right-0 flex items-center pr-3 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors\"\n :aria-label=\"passwordVisible ? 'Hide password' : 'Show password'\"\n @mousedown.prevent\n @click=\"passwordVisible = !passwordVisible\"\n >\n <UiIcon\n :name=\"passwordVisible ? 'mdi:eye-off-outline' : 'mdi:eye-outline'\"\n class=\"w-4 h-4\"\n />\n </button>\n\n <!-- Number stepper: stacked up/down buttons on right -->\n <div\n v-if=\"isNumber && stepperLayout === 'stacked-right'\"\n class=\"flex flex-col w-6 border border-l-0 border-gray-300 dark:border-gray-600 rounded-r-lg overflow-hidden\"\n :class=\"{ 'opacity-50 pointer-events-none': disabled }\"\n >\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"grid place-items-center w-4 flex-1 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none border-b border-gray-300 dark:border-gray-600\"\n aria-label=\"Increase value\"\n @click=\"stepUp\"\n >\n <UiIcon name=\"mdi:chevron-up\" class=\"block w-3 h-3\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"grid place-items-center w-4 flex-1 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none\"\n aria-label=\"Decrease value\"\n @click=\"stepDown\"\n >\n <UiIcon name=\"mdi:chevron-down\" class=\"block w-3 h-3\" />\n </button>\n </div>\n\n <!-- Number stepper: plus button on right (both-sides layout) -->\n <button\n v-if=\"isNumber && stepperLayout === 'both-sides'\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"flex items-center justify-center w-9 rounded-r-lg border border-l-0 border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none\"\n :class=\"{ 'opacity-50 pointer-events-none': disabled }\"\n aria-label=\"Increase value\"\n @click=\"stepUp\"\n >\n <UiIcon name=\"mdi:plus\" class=\"w-4 h-4\" />\n </button>\n </div>\n\n <!-- Validation error message (shown after first blur) -->\n <p v-if=\"showError && validationError\" class=\"text-xs text-red-600 dark:text-red-400 mt-1\">\n {{ validationError }}\n </p>\n </div>\n</template>\n\n<script setup>\n/**\n * UiInput — Multi-purpose input component supporting text, number, password, email,\n * phone, and textarea modes in a single unified interface.\n *\n * Features:\n * - Number mode with configurable stepper layouts (both-sides, stacked-left, stacked-right, none)\n * - Password mode with show/hide toggle\n * - Textarea mode with configurable resize, min/max dimensions\n * - Built-in validation for email, phone, and number patterns\n * - Custom regex validation with configurable error messages\n * - Exposes `focus()` method and `el` ref for parent control\n *\n * @example Basic text input\n * <UiInput v-model=\"name\" placeholder=\"Enter your name\" />\n *\n * @example Number input with min/max\n * <UiInput v-model=\"quantity\" type=\"number\" :min=\"0\" :max=\"100\" :step=\"1\" />\n *\n * @example Password with toggle\n * <UiInput v-model=\"password\" type=\"password\" />\n *\n * @example Textarea\n * <UiInput v-model=\"bio\" type=\"textarea\" :rows=\"5\" resize=\"vertical\" />\n *\n * @example Email with validation\n * <UiInput v-model=\"email\" type=\"email\" :validate=\"true\" />\n *\n * @emits {string | number} update:modelValue — Emitted when the input value changes (v-model)\n * @emits {{ valid: boolean, error: string | null }} validation — Emitted when the validation state changes\n */\nimport { ref, computed, watch, useSlots } from 'vue'\nimport UiIcon from '../icons/Icon.vue'\nconst props = defineProps({\n /**\n * Bound value (v-model).\n * @type {string | number}\n * @default ''\n */\n modelValue: { type: [String, Number], default: '' },\n\n /**\n * Input type determining the mode and behavior.\n * @type {string}\n * @default 'text'\n * @values 'text' | 'number' | 'password' | 'email' | 'phone' | 'textarea'\n */\n type: { type: String, default: 'text' },\n\n /**\n * Placeholder text shown when the input is empty.\n * @type {string}\n * @default ''\n */\n placeholder: { type: String, default: '' },\n\n /**\n * Whether the field is required for form validation.\n * @type {boolean}\n * @default false\n */\n required: { type: Boolean, default: false },\n\n /**\n * Disabled state — dims the input and prevents interaction.\n * @type {boolean}\n * @default false\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Read-only state — allows focus/selection but prevents editing.\n * @type {boolean}\n * @default false\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * HTML autocomplete attribute hint for the browser.\n * @type {string}\n * @default undefined\n */\n autocomplete: { type: String, default: undefined },\n\n /**\n * Minimum character length for text validation.\n * @type {number}\n * @default undefined\n */\n minlength: { type: Number, default: undefined },\n\n /**\n * Maximum character length for text validation.\n * @type {number}\n * @default undefined\n */\n maxlength: { type: Number, default: undefined },\n\n // ── Textarea-specific props ──\n\n /**\n * Number of visible text rows (textarea mode only).\n * @type {number}\n * @default 3\n */\n rows: { type: Number, default: 3 },\n\n /**\n * Resize behavior for textarea mode.\n * @type {string}\n * @default 'none'\n * @values 'none' | 'vertical' | 'horizontal' | 'both'\n */\n resize: { type: String, default: 'none' },\n\n /**\n * Minimum height CSS value for textarea (e.g. '80px', '5rem').\n * @type {string}\n * @default undefined\n */\n minHeight: { type: String, default: undefined },\n\n /**\n * Maximum height CSS value for textarea (e.g. '300px', '20rem').\n * @type {string}\n * @default undefined\n */\n maxHeight: { type: String, default: undefined },\n\n /**\n * Minimum width CSS value for textarea (e.g. '200px').\n * @type {string}\n * @default undefined\n */\n minWidth: { type: String, default: undefined },\n\n /**\n * Maximum width CSS value for textarea (e.g. '600px').\n * @type {string}\n * @default undefined\n */\n maxWidth: { type: String, default: undefined },\n\n /**\n * HTML pattern attribute for native form validation.\n * @type {string}\n * @default undefined\n */\n pattern: { type: String, default: undefined },\n\n // ── Password-specific props ──\n\n /**\n * Show the password visibility toggle button (password mode only).\n * @type {boolean}\n * @default true\n */\n showToggle: { type: Boolean, default: true },\n\n // ── Number-specific props ──\n\n /**\n * Minimum allowed numeric value.\n * @type {number}\n * @default undefined\n */\n min: { type: Number, default: undefined },\n\n /**\n * Maximum allowed numeric value.\n * @type {number}\n * @default undefined\n */\n max: { type: Number, default: undefined },\n\n /**\n * Step increment for number stepper buttons.\n * @type {number}\n * @default 1\n */\n step: { type: Number, default: 1 },\n\n /**\n * Layout of the +/- stepper buttons for number inputs.\n * @type {string}\n * @default 'both-sides'\n * @values 'stacked-left' | 'stacked-right' | 'both-sides' | 'none'\n */\n stepperLayout: { type: String, default: 'both-sides' },\n\n // ── Validation props ──\n\n /**\n * Show a clear button when the input has a value.\n * @type {boolean}\n * @default false\n */\n clearable: { type: Boolean, default: false },\n\n /**\n * Icon name to display on the left side of the input.\n * @type {string}\n * @default undefined\n */\n iconLeft: { type: String, default: undefined },\n\n /**\n * Icon name to display on the right side of the input.\n * @type {string}\n * @default undefined\n */\n iconRight: { type: String, default: undefined },\n\n /**\n * Enable built-in validation feedback shown below the input on blur.\n * @type {boolean}\n * @default true\n */\n validate: { type: Boolean, default: true },\n\n /**\n * Custom regex pattern string — overrides built-in type-based patterns.\n * @type {string}\n * @default undefined\n */\n validationPattern: { type: String, default: undefined },\n\n /**\n * Custom error message shown when validation fails.\n * @type {string}\n * @default undefined\n */\n validationMessage: { type: String, default: undefined },\n})\n\nconst emit = defineEmits(['update:modelValue', 'validation'])\n\nconst inputRef = ref(null)\nconst passwordVisible = ref(false)\nconst touched = ref(false)\n\n// --- Computed helpers ---\n\n// Detect input mode from the type prop\nconst isPassword = computed(() => props.type === 'password')\nconst isNumber = computed(() => props.type === 'number')\nconst isTextarea = computed(() => props.type === 'textarea')\n\n// Map resize prop to Tailwind resize utility class\nconst resizeClass = computed(() => {\n const map = { none: 'resize-none', vertical: 'resize-y', horizontal: 'resize-x', both: 'resize' }\n return map[props.resize] || 'resize-none'\n})\n\nconst textareaStyle = computed(() => {\n const s = {}\n if (props.minHeight) s.minHeight = props.minHeight\n if (props.maxHeight) s.maxHeight = props.maxHeight\n if (props.minWidth) s.minWidth = props.minWidth\n if (props.maxWidth) s.maxWidth = props.maxWidth\n return s\n})\n\n// For number type, render as text input so we can filter keystrokes ourselves\nconst computedType = computed(() => {\n if (isPassword.value) return passwordVisible.value ? 'text' : 'password'\n if (isNumber.value) return 'text' // we handle number filtering ourselves\n if (props.type === 'phone') return 'tel'\n return props.type\n})\n\n// Set appropriate mobile keyboard via inputmode attribute\nconst computedInputMode = computed(() => {\n if (isNumber.value) return 'decimal'\n if (props.type === 'phone') return 'tel'\n if (props.type === 'email') return 'email'\n return undefined\n})\n\nconst hasStepper = computed(() => isNumber.value && props.stepperLayout !== 'none')\n\nconst slots = useSlots()\n\nconst hasLeftIcon = computed(() => !!props.iconLeft || !!slots.left)\nconst hasRightIcon = computed(() => !!props.iconRight || !!slots.right)\n\nconst inputClasses = computed(() => {\n const classes = []\n\n // Horizontal padding — tighter when steppers are present\n if (hasStepper.value) {\n classes.push('px-1.5')\n } else {\n // Adjust padding for icons/slots\n classes.push(hasLeftIcon.value ? 'pl-9' : 'pl-3')\n classes.push(hasRightIcon.value ? 'pr-9' : 'pr-3')\n }\n\n // Rounding based on stepper layout\n if (hasStepper.value) {\n if (props.stepperLayout === 'both-sides') classes.push('rounded-none')\n else if (props.stepperLayout === 'stacked-left') classes.push('rounded-l-none', 'rounded-r-lg')\n else if (props.stepperLayout === 'stacked-right') classes.push('rounded-r-none', 'rounded-l-lg')\n } else {\n classes.push('rounded-lg')\n }\n\n // Extra right padding for password toggle\n if (isPassword.value && props.showToggle) classes.push('pr-10')\n\n // Extra right padding for clear button\n if (props.clearable) classes.push('pr-8')\n\n // Number text alignment\n if (isNumber.value && hasStepper.value) classes.push('text-center')\n\n return classes\n})\n\n// --- Validation ---\n\n// Built-in regex patterns for common input types\nconst PATTERNS = {\n email: /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/,\n phone: /^\\+?[\\d\\s\\-().]{7,}$/,\n number: /^-?\\d*\\.?\\d+$/,\n}\n\nconst MESSAGES = {\n email: 'Please enter a valid email address',\n phone: 'Please enter a valid phone number',\n number: 'Please enter a valid number',\n}\n\nconst validationError = computed(() => {\n const val = String(props.modelValue ?? '')\n if (!val) return null\n\n // Custom pattern takes priority\n if (props.validationPattern) {\n const re = new RegExp(props.validationPattern)\n if (!re.test(val)) return props.validationMessage || 'Invalid format'\n }\n\n // Built-in patterns\n const builtIn = PATTERNS[props.type]\n if (builtIn && !builtIn.test(val)) {\n return props.validationMessage || MESSAGES[props.type] || 'Invalid input'\n }\n\n return null\n})\n\nconst showError = computed(() => props.validate && touched.value)\n\nwatch(validationError, (err) => {\n emit('validation', { valid: !err, error: err })\n})\n\n// --- Event handlers ---\n\n// Regex for validating partial number input (allows intermediate states like \"-\" or \".\")\nconst NUMBER_ALLOWED = /^-?\\d*\\.?\\d*$/\n\nfunction onInput(e) {\n const val = e.target.value\n\n // For number type, reject non-numeric characters\n if (isNumber.value) {\n if (!NUMBER_ALLOWED.test(val)) {\n // Revert to previous valid value\n e.target.value = String(props.modelValue ?? '')\n return\n }\n }\n\n emit(\n 'update:modelValue',\n isNumber.value && val !== '' && val !== '-' && val !== '.' && val !== '-.' ? Number(val) : val,\n )\n}\n\nfunction onBlur() {\n touched.value = true\n}\n\nfunction onKeydown(e) {\n if (!isNumber.value) return\n\n // Allow: backspace, delete, tab, escape, enter, arrows, home, end, decimal point, minus\n const allowed = [\n 'Backspace',\n 'Delete',\n 'Tab',\n 'Escape',\n 'Enter',\n 'ArrowLeft',\n 'ArrowRight',\n 'Home',\n 'End',\n ]\n if (allowed.includes(e.key)) return\n if (e.key === '.' && !String(props.modelValue).includes('.')) return\n if (e.key === '-' && e.target.selectionStart === 0 && !String(props.modelValue).includes('-'))\n return\n if (e.ctrlKey || e.metaKey) return // allow copy/paste/select-all\n\n // Block non-digit keys\n if (!/^\\d$/.test(e.key)) {\n e.preventDefault()\n }\n}\n\nfunction stepUp() {\n const current = Number(props.modelValue) || 0\n let next = current + (props.step ?? 1)\n if (props.max !== undefined) next = Math.min(next, props.max)\n emit('update:modelValue', next)\n}\n\nfunction stepDown() {\n const current = Number(props.modelValue) || 0\n let next = current - (props.step ?? 1)\n if (props.min !== undefined) next = Math.max(next, props.min)\n emit('update:modelValue', next)\n}\n\n// Expose focus method\ndefineExpose({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,gBAAA,KAAe,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"Input.js","names":["$slots"],"sources":["../../src/components/Input.vue"],"sourcesContent":["<template>\n <div class=\"w-full\">\n <div class=\"relative flex\">\n <!-- Number stepper: minus button on left (both-sides layout) -->\n <button\n v-if=\"isNumber && stepperLayout === 'both-sides'\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"flex items-center justify-center w-9 rounded-l-lg border border-r-0 border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none\"\n :class=\"{ 'opacity-50 pointer-events-none': disabled }\"\n aria-label=\"Decrease value\"\n @click=\"stepDown\"\n >\n <UiIcon name=\"mdi:minus\" class=\"w-4 h-4\" />\n </button>\n\n <!-- Number stepper: stacked up/down buttons on left -->\n <div\n v-if=\"isNumber && stepperLayout === 'stacked-left'\"\n class=\"flex flex-col w-7 border border-r-0 border-gray-300 dark:border-gray-600 rounded-l-lg overflow-hidden\"\n :class=\"{ 'opacity-50 pointer-events-none': disabled }\"\n >\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"grid place-items-center w-full flex-1 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none border-b border-gray-300 dark:border-gray-600\"\n aria-label=\"Increase value\"\n @click=\"stepUp\"\n >\n <UiIcon name=\"mdi:chevron-up\" class=\"block w-3 h-3\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"grid place-items-center w-full flex-1 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none\"\n aria-label=\"Decrease value\"\n @click=\"stepDown\"\n >\n <UiIcon name=\"mdi:chevron-down\" class=\"block w-3 h-3\" />\n </button>\n </div>\n\n <!-- Textarea mode: multi-line text input with custom scrollbar styling -->\n <textarea\n v-if=\"isTextarea\"\n ref=\"inputRef\"\n :value=\"modelValue\"\n :placeholder=\"placeholder\"\n :required=\"required\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :rows=\"rows\"\n :maxlength=\"maxlength\"\n class=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-400 focus:ring-2 focus:ring-primary-500 focus:border-primary-500 outline-none text-sm transition-colors [scrollbar-width:thin] [scrollbar-color:var(--color-gray-300)_transparent] dark:[scrollbar-color:var(--color-gray-600)_transparent] [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-thumb]:bg-gray-600 hover:[&::-webkit-scrollbar-thumb]:bg-gray-400 dark:hover:[&::-webkit-scrollbar-thumb]:bg-gray-500\"\n :class=\"resizeClass\"\n :style=\"textareaStyle\"\n @input=\"onInput\"\n @blur=\"onBlur\"\n />\n\n <!-- The actual input element (text, number, password, email, phone) -->\n <!-- Left icon/image slot -->\n <span\n v-if=\"!isTextarea && ($slots.left || iconLeft)\"\n class=\"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none text-gray-400 dark:text-gray-500\"\n >\n <slot name=\"left\">\n <UiIcon v-if=\"iconLeft\" :name=\"iconLeft\" class=\"w-4 h-4\" />\n </slot>\n </span>\n\n <input\n v-if=\"!isTextarea\"\n ref=\"inputRef\"\n :type=\"computedType\"\n :value=\"modelValue\"\n :placeholder=\"placeholder\"\n :required=\"required\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :autocomplete=\"autocomplete\"\n :minlength=\"minlength\"\n :maxlength=\"maxlength\"\n :inputmode=\"computedInputMode\"\n :min=\"min\"\n :max=\"max\"\n :step=\"step\"\n :pattern=\"pattern\"\n class=\"w-full py-2 border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-400 focus:ring-2 focus:ring-primary-500 focus:border-primary-500 outline-none text-sm transition-colors\"\n :class=\"inputClasses\"\n @input=\"onInput\"\n @blur=\"onBlur\"\n @keydown=\"onKeydown\"\n />\n\n <!-- Right icon/image slot (hidden when clear button or password toggle is shown) -->\n <span\n v-if=\"\n !isTextarea &&\n ($slots.right || iconRight) &&\n !(clearable && modelValue) &&\n !(isPassword && showToggle)\n \"\n class=\"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-gray-400 dark:text-gray-500\"\n >\n <slot name=\"right\">\n <UiIcon v-if=\"iconRight\" :name=\"iconRight\" class=\"w-4 h-4\" />\n </slot>\n </span>\n\n <!-- Clear button -->\n <button\n v-if=\"clearable && modelValue\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"absolute inset-y-0 right-0 flex items-center pr-3 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors\"\n aria-label=\"Clear\"\n @mousedown.prevent\n @click=\"emit('update:modelValue', '')\"\n >\n <UiIcon name=\"mdi:close-circle\" class=\"w-4 h-4\" />\n </button>\n\n <!-- Password visibility toggle button -->\n <button\n v-if=\"isPassword && showToggle\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"absolute inset-y-0 right-0 flex items-center pr-3 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors\"\n :aria-label=\"passwordVisible ? 'Hide password' : 'Show password'\"\n @mousedown.prevent\n @click=\"passwordVisible = !passwordVisible\"\n >\n <UiIcon\n :name=\"passwordVisible ? 'mdi:eye-off-outline' : 'mdi:eye-outline'\"\n class=\"w-4 h-4\"\n />\n </button>\n\n <!-- Number stepper: stacked up/down buttons on right -->\n <div\n v-if=\"isNumber && stepperLayout === 'stacked-right'\"\n class=\"flex flex-col w-7 border border-l-0 border-gray-300 dark:border-gray-600 rounded-r-lg overflow-hidden\"\n :class=\"{ 'opacity-50 pointer-events-none': disabled }\"\n >\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"grid place-items-center w-full flex-1 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none border-b border-gray-300 dark:border-gray-600\"\n aria-label=\"Increase value\"\n @click=\"stepUp\"\n >\n <UiIcon name=\"mdi:chevron-up\" class=\"block w-3 h-3\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"grid place-items-center w-full flex-1 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none\"\n aria-label=\"Decrease value\"\n @click=\"stepDown\"\n >\n <UiIcon name=\"mdi:chevron-down\" class=\"block w-3 h-3\" />\n </button>\n </div>\n\n <!-- Number stepper: plus button on right (both-sides layout) -->\n <button\n v-if=\"isNumber && stepperLayout === 'both-sides'\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"flex items-center justify-center w-9 rounded-r-lg border border-l-0 border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors select-none\"\n :class=\"{ 'opacity-50 pointer-events-none': disabled }\"\n aria-label=\"Increase value\"\n @click=\"stepUp\"\n >\n <UiIcon name=\"mdi:plus\" class=\"w-4 h-4\" />\n </button>\n </div>\n\n <!-- Validation error message (shown after first blur) -->\n <p v-if=\"showError && validationError\" class=\"text-xs text-red-600 dark:text-red-400 mt-1\">\n {{ validationError }}\n </p>\n </div>\n</template>\n\n<script setup>\n/**\n * UiInput — Multi-purpose input component supporting text, number, password, email,\n * phone, and textarea modes in a single unified interface.\n *\n * Features:\n * - Number mode with configurable stepper layouts (both-sides, stacked-left, stacked-right, none)\n * - Password mode with show/hide toggle\n * - Textarea mode with configurable resize, min/max dimensions\n * - Built-in validation for email, phone, and number patterns\n * - Custom regex validation with configurable error messages\n * - Exposes `focus()` method and `el` ref for parent control\n *\n * @example Basic text input\n * <UiInput v-model=\"name\" placeholder=\"Enter your name\" />\n *\n * @example Number input with min/max\n * <UiInput v-model=\"quantity\" type=\"number\" :min=\"0\" :max=\"100\" :step=\"1\" />\n *\n * @example Password with toggle\n * <UiInput v-model=\"password\" type=\"password\" />\n *\n * @example Textarea\n * <UiInput v-model=\"bio\" type=\"textarea\" :rows=\"5\" resize=\"vertical\" />\n *\n * @example Email with validation\n * <UiInput v-model=\"email\" type=\"email\" :validate=\"true\" />\n *\n * @emits {string | number} update:modelValue — Emitted when the input value changes (v-model)\n * @emits {{ valid: boolean, error: string | null }} validation — Emitted when the validation state changes\n */\nimport { ref, computed, watch, useSlots } from 'vue'\nimport UiIcon from '../icons/Icon.vue'\nconst props = defineProps({\n /**\n * Bound value (v-model).\n * @type {string | number}\n * @default ''\n */\n modelValue: { type: [String, Number], default: '' },\n\n /**\n * Input type determining the mode and behavior.\n * @type {string}\n * @default 'text'\n * @values 'text' | 'number' | 'password' | 'email' | 'phone' | 'textarea'\n */\n type: { type: String, default: 'text' },\n\n /**\n * Placeholder text shown when the input is empty.\n * @type {string}\n * @default ''\n */\n placeholder: { type: String, default: '' },\n\n /**\n * Whether the field is required for form validation.\n * @type {boolean}\n * @default false\n */\n required: { type: Boolean, default: false },\n\n /**\n * Disabled state — dims the input and prevents interaction.\n * @type {boolean}\n * @default false\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Read-only state — allows focus/selection but prevents editing.\n * @type {boolean}\n * @default false\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * HTML autocomplete attribute hint for the browser.\n * @type {string}\n * @default undefined\n */\n autocomplete: { type: String, default: undefined },\n\n /**\n * Minimum character length for text validation.\n * @type {number}\n * @default undefined\n */\n minlength: { type: Number, default: undefined },\n\n /**\n * Maximum character length for text validation.\n * @type {number}\n * @default undefined\n */\n maxlength: { type: Number, default: undefined },\n\n // ── Textarea-specific props ──\n\n /**\n * Number of visible text rows (textarea mode only).\n * @type {number}\n * @default 3\n */\n rows: { type: Number, default: 3 },\n\n /**\n * Resize behavior for textarea mode.\n * @type {string}\n * @default 'none'\n * @values 'none' | 'vertical' | 'horizontal' | 'both'\n */\n resize: { type: String, default: 'none' },\n\n /**\n * Minimum height CSS value for textarea (e.g. '80px', '5rem').\n * @type {string}\n * @default undefined\n */\n minHeight: { type: String, default: undefined },\n\n /**\n * Maximum height CSS value for textarea (e.g. '300px', '20rem').\n * @type {string}\n * @default undefined\n */\n maxHeight: { type: String, default: undefined },\n\n /**\n * Minimum width CSS value for textarea (e.g. '200px').\n * @type {string}\n * @default undefined\n */\n minWidth: { type: String, default: undefined },\n\n /**\n * Maximum width CSS value for textarea (e.g. '600px').\n * @type {string}\n * @default undefined\n */\n maxWidth: { type: String, default: undefined },\n\n /**\n * HTML pattern attribute for native form validation.\n * @type {string}\n * @default undefined\n */\n pattern: { type: String, default: undefined },\n\n // ── Password-specific props ──\n\n /**\n * Show the password visibility toggle button (password mode only).\n * @type {boolean}\n * @default true\n */\n showToggle: { type: Boolean, default: true },\n\n // ── Number-specific props ──\n\n /**\n * Minimum allowed numeric value.\n * @type {number}\n * @default undefined\n */\n min: { type: Number, default: undefined },\n\n /**\n * Maximum allowed numeric value.\n * @type {number}\n * @default undefined\n */\n max: { type: Number, default: undefined },\n\n /**\n * Step increment for number stepper buttons.\n * @type {number}\n * @default 1\n */\n step: { type: Number, default: 1 },\n\n /**\n * Layout of the +/- stepper buttons for number inputs.\n * @type {string}\n * @default 'both-sides'\n * @values 'stacked-left' | 'stacked-right' | 'both-sides' | 'none'\n */\n stepperLayout: { type: String, default: 'both-sides' },\n\n // ── Validation props ──\n\n /**\n * Show a clear button when the input has a value.\n * @type {boolean}\n * @default false\n */\n clearable: { type: Boolean, default: false },\n\n /**\n * Icon name to display on the left side of the input.\n * @type {string}\n * @default undefined\n */\n iconLeft: { type: String, default: undefined },\n\n /**\n * Icon name to display on the right side of the input.\n * @type {string}\n * @default undefined\n */\n iconRight: { type: String, default: undefined },\n\n /**\n * Enable built-in validation feedback shown below the input on blur.\n * @type {boolean}\n * @default true\n */\n validate: { type: Boolean, default: true },\n\n /**\n * Custom regex pattern string — overrides built-in type-based patterns.\n * @type {string}\n * @default undefined\n */\n validationPattern: { type: String, default: undefined },\n\n /**\n * Custom error message shown when validation fails.\n * @type {string}\n * @default undefined\n */\n validationMessage: { type: String, default: undefined },\n})\n\nconst emit = defineEmits(['update:modelValue', 'validation'])\n\nconst inputRef = ref(null)\nconst passwordVisible = ref(false)\nconst touched = ref(false)\n\n// --- Computed helpers ---\n\n// Detect input mode from the type prop\nconst isPassword = computed(() => props.type === 'password')\nconst isNumber = computed(() => props.type === 'number')\nconst isTextarea = computed(() => props.type === 'textarea')\n\n// Map resize prop to Tailwind resize utility class\nconst resizeClass = computed(() => {\n const map = { none: 'resize-none', vertical: 'resize-y', horizontal: 'resize-x', both: 'resize' }\n return map[props.resize] || 'resize-none'\n})\n\nconst textareaStyle = computed(() => {\n const s = {}\n if (props.minHeight) s.minHeight = props.minHeight\n if (props.maxHeight) s.maxHeight = props.maxHeight\n if (props.minWidth) s.minWidth = props.minWidth\n if (props.maxWidth) s.maxWidth = props.maxWidth\n return s\n})\n\n// For number type, render as text input so we can filter keystrokes ourselves\nconst computedType = computed(() => {\n if (isPassword.value) return passwordVisible.value ? 'text' : 'password'\n if (isNumber.value) return 'text' // we handle number filtering ourselves\n if (props.type === 'phone') return 'tel'\n return props.type\n})\n\n// Set appropriate mobile keyboard via inputmode attribute\nconst computedInputMode = computed(() => {\n if (isNumber.value) return 'decimal'\n if (props.type === 'phone') return 'tel'\n if (props.type === 'email') return 'email'\n return undefined\n})\n\nconst hasStepper = computed(() => isNumber.value && props.stepperLayout !== 'none')\n\nconst slots = useSlots()\n\nconst hasLeftIcon = computed(() => !!props.iconLeft || !!slots.left)\nconst hasRightIcon = computed(() => !!props.iconRight || !!slots.right)\n\nconst inputClasses = computed(() => {\n const classes = []\n\n // Horizontal padding — tighter when steppers are present\n if (hasStepper.value) {\n classes.push('px-1.5')\n } else {\n // Adjust padding for icons/slots\n classes.push(hasLeftIcon.value ? 'pl-9' : 'pl-3')\n classes.push(hasRightIcon.value ? 'pr-9' : 'pr-3')\n }\n\n // Rounding based on stepper layout\n if (hasStepper.value) {\n if (props.stepperLayout === 'both-sides') classes.push('rounded-none')\n else if (props.stepperLayout === 'stacked-left') classes.push('rounded-l-none', 'rounded-r-lg')\n else if (props.stepperLayout === 'stacked-right') classes.push('rounded-r-none', 'rounded-l-lg')\n } else {\n classes.push('rounded-lg')\n }\n\n // Extra right padding for password toggle\n if (isPassword.value && props.showToggle) classes.push('pr-10')\n\n // Extra right padding for clear button\n if (props.clearable) classes.push('pr-8')\n\n // Number text alignment\n if (isNumber.value && hasStepper.value) classes.push('text-center')\n\n return classes\n})\n\n// --- Validation ---\n\n// Built-in regex patterns for common input types\nconst PATTERNS = {\n email: /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/,\n phone: /^\\+?[\\d\\s\\-().]{7,}$/,\n number: /^-?\\d*\\.?\\d+$/,\n}\n\nconst MESSAGES = {\n email: 'Please enter a valid email address',\n phone: 'Please enter a valid phone number',\n number: 'Please enter a valid number',\n}\n\nconst validationError = computed(() => {\n const val = String(props.modelValue ?? '')\n if (!val) return null\n\n // Custom pattern takes priority\n if (props.validationPattern) {\n const re = new RegExp(props.validationPattern)\n if (!re.test(val)) return props.validationMessage || 'Invalid format'\n }\n\n // Built-in patterns\n const builtIn = PATTERNS[props.type]\n if (builtIn && !builtIn.test(val)) {\n return props.validationMessage || MESSAGES[props.type] || 'Invalid input'\n }\n\n return null\n})\n\nconst showError = computed(() => props.validate && touched.value)\n\nwatch(validationError, (err) => {\n emit('validation', { valid: !err, error: err })\n})\n\n// --- Event handlers ---\n\n// Regex for validating partial number input (allows intermediate states like \"-\" or \".\")\nconst NUMBER_ALLOWED = /^-?\\d*\\.?\\d*$/\n\nfunction onInput(e) {\n const val = e.target.value\n\n // For number type, reject non-numeric characters\n if (isNumber.value) {\n if (!NUMBER_ALLOWED.test(val)) {\n // Revert to previous valid value\n e.target.value = String(props.modelValue ?? '')\n return\n }\n }\n\n emit(\n 'update:modelValue',\n isNumber.value && val !== '' && val !== '-' && val !== '.' && val !== '-.' ? Number(val) : val,\n )\n}\n\nfunction onBlur() {\n touched.value = true\n}\n\nfunction onKeydown(e) {\n if (!isNumber.value) return\n\n // Allow: backspace, delete, tab, escape, enter, arrows, home, end, decimal point, minus\n const allowed = [\n 'Backspace',\n 'Delete',\n 'Tab',\n 'Escape',\n 'Enter',\n 'ArrowLeft',\n 'ArrowRight',\n 'Home',\n 'End',\n ]\n if (allowed.includes(e.key)) return\n if (e.key === '.' && !String(props.modelValue).includes('.')) return\n if (e.key === '-' && e.target.selectionStart === 0 && !String(props.modelValue).includes('-'))\n return\n if (e.ctrlKey || e.metaKey) return // allow copy/paste/select-all\n\n // Block non-digit keys\n if (!/^\\d$/.test(e.key)) {\n e.preventDefault()\n }\n}\n\nfunction stepUp() {\n const current = Number(props.modelValue) || 0\n let next = current + (props.step ?? 1)\n if (props.max !== undefined) next = Math.min(next, props.max)\n emit('update:modelValue', next)\n}\n\nfunction stepDown() {\n const current = Number(props.modelValue) || 0\n let next = current - (props.step ?? 1)\n if (props.min !== undefined) next = Math.max(next, props.min)\n emit('update:modelValue', next)\n}\n\n// Expose focus method\ndefineExpose({\n focus: () => inputRef.value?.focus(),\n el: inputRef,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAAA,YAGE,aAAA;KAFC,MAAM,gBAAA,QAAe,wBAAA;KACtB,OAAM;;IAMF,SAAA,SAAY,QAAA,kBAAa,mBADjC,UAAA,GAAA,mBAuBM,OAAA;;KArBJ,OAAK,eAAA,CAAC,yGAAuG,EAAA,kCACjE,QAAA,SAAQ,CAAA,CAAA;IAEpD,GAAA,CAAA,mBAQS,UAAA;KAPP,MAAK;KACL,UAAS;KACT,OAAM;KACN,cAAW;KACV,SAAO;IAER,GAAA,CAAA,YAAsD,aAAA;KAA9C,MAAK;KAAiB,OAAM;IAEtC,CAAA,CAAA,CAAA,GAAA,mBAQS,UAAA;KAPP,MAAK;KACL,UAAS;KACT,OAAM;KACN,cAAW;KACV,SAAO;IAER,GAAA,CAAA,YAAwD,aAAA;KAAhD,MAAK;KAAmB,OAAM;;IAMlC,SAAA,SAAY,QAAA,kBAAa,gBADjC,UAAA,GAAA,mBAUS,UAAA;;KARP,MAAK;KACL,UAAS;KACT,OAAK,eAAA,CAAC,gPAA8O,EAAA,kCACxM,QAAA,SAAQ,CAAA,CAAA;KACpD,cAAW;KACV,SAAO;IAER,GAAA,CAAA,YAA0C,aAAA;KAAlC,MAAK;KAAW,OAAM;;GAKzB,CAAA,GAAA,UAAA,SAAa,gBAAA,SAAtB,UAAA,GAAA,mBAEI,KAFJ,YAEI,gBADC,gBAAA,KAAe,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,CAAA"}
@@ -1,9 +1,14 @@
1
1
  import _sfc_main$1 from "../icons/Icon.js";
2
- import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, normalizeClass, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, withCtx, withModifiers } from "vue";
2
+ import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, normalizeClass, openBlock, renderSlot, toDisplayString, withModifiers } from "vue";
3
3
  //#region src/components/ListMenuItem.vue
4
- var _hoisted_1 = { class: "flex-1 min-w-0" };
5
- var _hoisted_2 = { class: "block truncate" };
6
- var _hoisted_3 = {
4
+ var _hoisted_1 = [
5
+ "role",
6
+ "tabindex",
7
+ "aria-disabled"
8
+ ];
9
+ var _hoisted_2 = { class: "flex-1 min-w-0" };
10
+ var _hoisted_3 = { class: "block truncate" };
11
+ var _hoisted_4 = {
7
12
  key: 0,
8
13
  class: "block text-xs text-gray-400 dark:text-gray-500 truncate mt-0.5"
9
14
  };
@@ -115,6 +120,13 @@ var _sfc_main = {
115
120
  else if (isSelect.value) props.selectRef?.toggle?.();
116
121
  else if (props.clickable) emit("click");
117
122
  };
123
+ const onKeydown = (e) => {
124
+ if (!isInteractive.value || props.disabled) return;
125
+ if (e.key === "Enter" || e.key === " ") {
126
+ e.preventDefault();
127
+ handleClick();
128
+ }
129
+ };
118
130
  const handleSuffixClick = (e) => {
119
131
  if (isToggle.value && !props.disabled) {
120
132
  e.stopPropagation();
@@ -152,34 +164,29 @@ var _sfc_main = {
152
164
  return "text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700/40 active:bg-gray-100 dark:active:bg-gray-700/60 cursor-pointer";
153
165
  });
154
166
  return (_ctx, _cache) => {
155
- return openBlock(), createBlock(resolveDynamicComponent(isInteractive.value ? "button" : "div"), {
156
- type: isInteractive.value ? "button" : void 0,
167
+ return openBlock(), createElementBlock("div", {
157
168
  class: normalizeClass(["w-full flex items-center gap-3 text-sm text-left transition-colors", [sizeClass.value, colorClass.value]]),
158
- disabled: isInteractive.value ? __props.disabled : void 0,
159
- onClick: handleClick
160
- }, {
161
- default: withCtx(() => [
162
- __props.icon ? (openBlock(), createBlock(_sfc_main$1, {
163
- key: 0,
164
- name: __props.icon,
165
- class: normalizeClass(["shrink-0", [iconSizeClass.value, __props.iconClass || defaultIconColorClass.value]])
166
- }, null, 8, ["name", "class"])) : createCommentVNode("", true),
167
- createElementVNode("span", _hoisted_1, [createElementVNode("span", _hoisted_2, [renderSlot(_ctx.$slots, "default")]), __props.hint ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)]),
168
- createElementVNode("div", {
169
- class: "shrink-0 flex items-center",
170
- onClick: withModifiers(handleSuffixClick, ["stop"])
171
- }, [renderSlot(_ctx.$slots, "suffix", {}, () => [__props.clickable && __props.chevron ? (openBlock(), createBlock(_sfc_main$1, {
172
- key: 0,
173
- name: "mdi:chevron-right",
174
- class: normalizeClass(["w-4 h-4", __props.danger ? "text-red-300 dark:text-red-800" : "text-gray-300 dark:text-gray-600"])
175
- }, null, 8, ["class"])) : createCommentVNode("", true)])])
176
- ]),
177
- _: 3
178
- }, 8, [
179
- "type",
180
- "class",
181
- "disabled"
182
- ]);
169
+ role: isInteractive.value ? "button" : void 0,
170
+ tabindex: isInteractive.value && !__props.disabled ? 0 : void 0,
171
+ "aria-disabled": isInteractive.value && __props.disabled ? "true" : void 0,
172
+ onClick: handleClick,
173
+ onKeydown
174
+ }, [
175
+ __props.icon ? (openBlock(), createBlock(_sfc_main$1, {
176
+ key: 0,
177
+ name: __props.icon,
178
+ class: normalizeClass(["shrink-0", [iconSizeClass.value, __props.iconClass || defaultIconColorClass.value]])
179
+ }, null, 8, ["name", "class"])) : createCommentVNode("", true),
180
+ createElementVNode("span", _hoisted_2, [createElementVNode("span", _hoisted_3, [renderSlot(_ctx.$slots, "default")]), __props.hint ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)]),
181
+ createElementVNode("div", {
182
+ class: "shrink-0 flex items-center",
183
+ onClick: withModifiers(handleSuffixClick, ["stop"])
184
+ }, [renderSlot(_ctx.$slots, "suffix", {}, () => [__props.clickable && __props.chevron ? (openBlock(), createBlock(_sfc_main$1, {
185
+ key: 0,
186
+ name: "mdi:chevron-right",
187
+ class: normalizeClass(["w-4 h-4", __props.danger ? "text-red-300 dark:text-red-800" : "text-gray-300 dark:text-gray-600"])
188
+ }, null, 8, ["class"])) : createCommentVNode("", true)])])
189
+ ], 42, _hoisted_1);
183
190
  };
184
191
  }
185
192
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ListMenuItem.js","names":[],"sources":["../../src/components/ListMenuItem.vue"],"sourcesContent":["<template>\n <component\n :is=\"isInteractive ? 'button' : 'div'\"\n :type=\"isInteractive ? 'button' : undefined\"\n class=\"w-full flex items-center gap-3 text-sm text-left transition-colors\"\n :class=\"[sizeClass, colorClass]\"\n :disabled=\"isInteractive ? disabled : undefined\"\n @click=\"handleClick\"\n >\n <UiIcon\n v-if=\"icon\"\n :name=\"icon\"\n class=\"shrink-0\"\n :class=\"[iconSizeClass, iconClass || defaultIconColorClass]\"\n />\n <span class=\"flex-1 min-w-0\">\n <span class=\"block truncate\"><slot /></span>\n <span v-if=\"hint\" class=\"block text-xs text-gray-400 dark:text-gray-500 truncate mt-0.5\">{{\n hint\n }}</span>\n </span>\n <div class=\"shrink-0 flex items-center\" @click.stop=\"handleSuffixClick\">\n <slot name=\"suffix\">\n <UiIcon\n v-if=\"clickable && chevron\"\n name=\"mdi:chevron-right\"\n class=\"w-4 h-4\"\n :class=\"danger ? 'text-red-300 dark:text-red-800' : 'text-gray-300 dark:text-gray-600'\"\n />\n </slot>\n </div>\n </component>\n</template>\n\n<script setup>\n/**\n * UiListMenuItem — Single row item for use inside UiListMenu.\n *\n * A versatile row component that can serve as:\n * - A clickable action row (set `clickable`)\n * - A toggle row where tapping anywhere toggles (set `toggle`)\n * - A select row where tapping anywhere opens the select (set `selectRef`)\n * - A static row hosting suffix controls (default)\n *\n * @example Clickable action row\n * <UiListMenuItem icon=\"mdi:account\" clickable @click=\"goProfile\">Profile</UiListMenuItem>\n *\n * @example Toggle row (whole row is tappable)\n * <UiListMenuItem icon=\"mdi:wrap\" :toggle=\"wordWrap\" @update:toggle=\"wordWrap = $event\">\n * Word Wrap\n * <template #suffix><UiToggle :model-value=\"wordWrap\" readonly /></template>\n * </UiListMenuItem>\n *\n * @example Select row (whole row opens the select)\n * <UiListMenuItem icon=\"mdi:translate\" :select-ref=\"langRef\">\n * Language\n * <template #suffix><UiSelect ref=\"langRef\" ... /></template>\n * </UiListMenuItem>\n *\n * @emits {void} click — Emitted when a clickable item is clicked\n * @emits {boolean} update:toggle — Emitted with the new value when a toggle row is tapped\n *\n * @slot default — Label text\n * @slot suffix — Trailing content (toggle, select, badge, etc.)\n *\n * @see UiListMenu — Parent container for grouping list items\n */\nimport { computed } from 'vue'\nimport UiIcon from '../icons/Icon.vue'\nconst props = defineProps({\n /** MDI icon name displayed at the start of the row. */\n icon: { type: String, default: '' },\n\n /** Custom CSS class override for the icon element. */\n iconClass: { type: String, default: '' },\n\n /** Whether this item is a clickable action (renders as button with hover states + chevron). */\n clickable: { type: Boolean, default: false },\n\n /**\n * Toggle state. When set to a boolean, the row becomes a tappable toggle.\n * Clicking anywhere emits `update:toggle` with the inverted value.\n */\n toggle: { type: Boolean, default: undefined },\n\n /**\n * Reference to a UiSelect component instance. When provided, the row becomes\n * tappable and clicking anywhere opens the select dropdown.\n */\n selectRef: { type: Object, default: undefined },\n\n /** Show a chevron-right icon as the trailing suffix (only when clickable). */\n chevron: { type: Boolean, default: true },\n\n /** Danger/red styling for destructive actions. */\n danger: { type: Boolean, default: false },\n\n /** Disabled state — dims the item and prevents interaction. */\n disabled: { type: Boolean, default: false },\n\n /** Optional hint text displayed below the label. */\n hint: { type: String, default: '' },\n\n /**\n * Size preset for padding and icon dimensions.\n * @values 'md' | 'sm'\n */\n size: { type: String, default: 'md' },\n})\n\nconst emit = defineEmits(['click', 'update:toggle'])\n\nconst isToggle = computed(() => props.toggle !== undefined)\nconst isSelect = computed(() => props.selectRef !== undefined)\nconst isInteractive = computed(() => props.clickable || isToggle.value || isSelect.value)\n\nconst handleClick = () => {\n if (props.disabled) return\n if (isToggle.value) {\n emit('update:toggle', !props.toggle)\n } else if (isSelect.value) {\n props.selectRef?.toggle?.()\n } else if (props.clickable) {\n emit('click')\n }\n}\n\nconst handleSuffixClick = (e) => {\n // For toggle rows, clicking the suffix (the toggle itself) should also toggle\n if (isToggle.value && !props.disabled) {\n e.stopPropagation()\n emit('update:toggle', !props.toggle)\n return\n }\n // For select rows, let the select handle its own click (it calls toggleOpen)\n // but stop propagation so the row doesn't double-open\n if (isSelect.value) {\n e.stopPropagation()\n return\n }\n // For clickable rows, stop propagation so suffix controls work independently\n if (props.clickable) {\n e.stopPropagation()\n }\n}\n\nconst sizeClass = computed(() => {\n const map = { md: 'px-4 py-3', sm: 'px-3 py-2.5' }\n return map[props.size] ?? map.md\n})\n\nconst iconSizeClass = computed(() => {\n const map = { md: 'w-[18px] h-[18px]', sm: 'w-4 h-4' }\n return map[props.size] ?? map.md\n})\n\nconst defaultIconColorClass = computed(() => {\n if (props.danger) return 'text-red-500 dark:text-red-400'\n return 'text-gray-400 dark:text-gray-500'\n})\n\nconst colorClass = computed(() => {\n if (props.disabled) return 'opacity-40 cursor-not-allowed'\n if (!isInteractive.value) {\n return props.danger ? 'text-red-600 dark:text-red-400' : 'text-gray-700 dark:text-gray-300'\n }\n if (props.danger)\n return 'text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 active:bg-red-100 dark:active:bg-red-900/30 cursor-pointer'\n return 'text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700/40 active:bg-gray-100 dark:active:bg-gray-700/60 cursor-pointer'\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqEA,MAAM,QAAQ;EAyCd,MAAM,OAAO;EAEb,MAAM,WAAW,eAAe,MAAM,WAAW,KAAA,CAAS;EAC1D,MAAM,WAAW,eAAe,MAAM,cAAc,KAAA,CAAS;EAC7D,MAAM,gBAAgB,eAAe,MAAM,aAAa,SAAS,SAAS,SAAS,KAAK;EAExF,MAAM,oBAAoB;GACxB,IAAI,MAAM,UAAU;GACpB,IAAI,SAAS,OACX,KAAK,iBAAiB,CAAC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5D,mBAKO,QALP,YAKO,CAJL,mBAA4C,QAA5C,YAA4C,CAAf,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA,GACzB,QAAA,QAAZ,UAAA,GAAA,mBAES,QAFT,YAES,gBADP,QAAA,IAAI,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,CAAA;KAGR,mBASM,OAAA;MATD,OAAM;MAA8B,SAAK,cAAO,mBAAiB,CAAA,MAAA,CAAA;KACpE,GAAA,CAAA,WAOO,KAAA,QAAA,UAAA,CAAA,SAAA,CALG,QAAA,aAAa,QAAA,WADrB,UAAA,GAAA,YAKE,aAAA;;MAHA,MAAK;MACL,OAAK,eAAA,CAAC,WACE,QAAA,SAAM,mCAAA,kCAAA,CAAA"}
1
+ {"version":3,"file":"ListMenuItem.js","names":[],"sources":["../../src/components/ListMenuItem.vue"],"sourcesContent":["<template>\n <!-- A <div role=\"button\"> rather than a real <button> when interactive: the\n suffix slot commonly holds interactive controls (UiToggle, UiSelect —\n both <button>s), and nesting a <button> inside a <button> is invalid HTML\n the browser restructures, which breaks SSR hydration. A <div> can legally\n contain those controls. -->\n <div\n class=\"w-full flex items-center gap-3 text-sm text-left transition-colors\"\n :class=\"[sizeClass, colorClass]\"\n :role=\"isInteractive ? 'button' : undefined\"\n :tabindex=\"isInteractive && !disabled ? 0 : undefined\"\n :aria-disabled=\"isInteractive && disabled ? 'true' : undefined\"\n @click=\"handleClick\"\n @keydown=\"onKeydown\"\n >\n <UiIcon\n v-if=\"icon\"\n :name=\"icon\"\n class=\"shrink-0\"\n :class=\"[iconSizeClass, iconClass || defaultIconColorClass]\"\n />\n <span class=\"flex-1 min-w-0\">\n <span class=\"block truncate\"><slot /></span>\n <span v-if=\"hint\" class=\"block text-xs text-gray-400 dark:text-gray-500 truncate mt-0.5\">{{\n hint\n }}</span>\n </span>\n <div class=\"shrink-0 flex items-center\" @click.stop=\"handleSuffixClick\">\n <slot name=\"suffix\">\n <UiIcon\n v-if=\"clickable && chevron\"\n name=\"mdi:chevron-right\"\n class=\"w-4 h-4\"\n :class=\"danger ? 'text-red-300 dark:text-red-800' : 'text-gray-300 dark:text-gray-600'\"\n />\n </slot>\n </div>\n </div>\n</template>\n\n<script setup>\n/**\n * UiListMenuItem — Single row item for use inside UiListMenu.\n *\n * A versatile row component that can serve as:\n * - A clickable action row (set `clickable`)\n * - A toggle row where tapping anywhere toggles (set `toggle`)\n * - A select row where tapping anywhere opens the select (set `selectRef`)\n * - A static row hosting suffix controls (default)\n *\n * @example Clickable action row\n * <UiListMenuItem icon=\"mdi:account\" clickable @click=\"goProfile\">Profile</UiListMenuItem>\n *\n * @example Toggle row (whole row is tappable)\n * <UiListMenuItem icon=\"mdi:wrap\" :toggle=\"wordWrap\" @update:toggle=\"wordWrap = $event\">\n * Word Wrap\n * <template #suffix><UiToggle :model-value=\"wordWrap\" readonly /></template>\n * </UiListMenuItem>\n *\n * @example Select row (whole row opens the select)\n * <UiListMenuItem icon=\"mdi:translate\" :select-ref=\"langRef\">\n * Language\n * <template #suffix><UiSelect ref=\"langRef\" ... /></template>\n * </UiListMenuItem>\n *\n * @emits {void} click — Emitted when a clickable item is clicked\n * @emits {boolean} update:toggle — Emitted with the new value when a toggle row is tapped\n *\n * @slot default — Label text\n * @slot suffix — Trailing content (toggle, select, badge, etc.)\n *\n * @see UiListMenu — Parent container for grouping list items\n */\nimport { computed } from 'vue'\nimport UiIcon from '../icons/Icon.vue'\nconst props = defineProps({\n /** MDI icon name displayed at the start of the row. */\n icon: { type: String, default: '' },\n\n /** Custom CSS class override for the icon element. */\n iconClass: { type: String, default: '' },\n\n /** Whether this item is a clickable action (renders as button with hover states + chevron). */\n clickable: { type: Boolean, default: false },\n\n /**\n * Toggle state. When set to a boolean, the row becomes a tappable toggle.\n * Clicking anywhere emits `update:toggle` with the inverted value.\n */\n toggle: { type: Boolean, default: undefined },\n\n /**\n * Reference to a UiSelect component instance. When provided, the row becomes\n * tappable and clicking anywhere opens the select dropdown.\n */\n selectRef: { type: Object, default: undefined },\n\n /** Show a chevron-right icon as the trailing suffix (only when clickable). */\n chevron: { type: Boolean, default: true },\n\n /** Danger/red styling for destructive actions. */\n danger: { type: Boolean, default: false },\n\n /** Disabled state — dims the item and prevents interaction. */\n disabled: { type: Boolean, default: false },\n\n /** Optional hint text displayed below the label. */\n hint: { type: String, default: '' },\n\n /**\n * Size preset for padding and icon dimensions.\n * @values 'md' | 'sm'\n */\n size: { type: String, default: 'md' },\n})\n\nconst emit = defineEmits(['click', 'update:toggle'])\n\nconst isToggle = computed(() => props.toggle !== undefined)\nconst isSelect = computed(() => props.selectRef !== undefined)\nconst isInteractive = computed(() => props.clickable || isToggle.value || isSelect.value)\n\nconst handleClick = () => {\n if (props.disabled) return\n if (isToggle.value) {\n emit('update:toggle', !props.toggle)\n } else if (isSelect.value) {\n props.selectRef?.toggle?.()\n } else if (props.clickable) {\n emit('click')\n }\n}\n\n// Keep the row keyboard-operable now that it is a div[role=button] rather than\n// a native button.\nconst onKeydown = (e) => {\n if (!isInteractive.value || props.disabled) return\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault()\n handleClick()\n }\n}\n\nconst handleSuffixClick = (e) => {\n // For toggle rows, clicking the suffix (the toggle itself) should also toggle\n if (isToggle.value && !props.disabled) {\n e.stopPropagation()\n emit('update:toggle', !props.toggle)\n return\n }\n // For select rows, let the select handle its own click (it calls toggleOpen)\n // but stop propagation so the row doesn't double-open\n if (isSelect.value) {\n e.stopPropagation()\n return\n }\n // For clickable rows, stop propagation so suffix controls work independently\n if (props.clickable) {\n e.stopPropagation()\n }\n}\n\nconst sizeClass = computed(() => {\n const map = { md: 'px-4 py-3', sm: 'px-3 py-2.5' }\n return map[props.size] ?? map.md\n})\n\nconst iconSizeClass = computed(() => {\n const map = { md: 'w-[18px] h-[18px]', sm: 'w-4 h-4' }\n return map[props.size] ?? map.md\n})\n\nconst defaultIconColorClass = computed(() => {\n if (props.danger) return 'text-red-500 dark:text-red-400'\n return 'text-gray-400 dark:text-gray-500'\n})\n\nconst colorClass = computed(() => {\n if (props.disabled) return 'opacity-40 cursor-not-allowed'\n if (!isInteractive.value) {\n return props.danger ? 'text-red-600 dark:text-red-400' : 'text-gray-700 dark:text-gray-300'\n }\n if (props.danger)\n return 'text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 active:bg-red-100 dark:active:bg-red-900/30 cursor-pointer'\n return 'text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700/40 active:bg-gray-100 dark:active:bg-gray-700/60 cursor-pointer'\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2EA,MAAM,QAAQ;EAyCd,MAAM,OAAO;EAEb,MAAM,WAAW,eAAe,MAAM,WAAW,KAAA,CAAS;EAC1D,MAAM,WAAW,eAAe,MAAM,cAAc,KAAA,CAAS;EAC7D,MAAM,gBAAgB,eAAe,MAAM,aAAa,SAAS,SAAS,SAAS,KAAK;EAExF,MAAM,oBAAoB;GACxB,IAAI,MAAM,UAAU;GACpB,IAAI,SAAS,OACX,KAAK,iBAAiB,CAAC,MAAM,MAAM;QAC9B,IAAI,SAAS,OAClB,MAAM,WAAW,SAAS;QACrB,IAAI,MAAM,WACf,KAAK,OAAO;EAEhB;EAIA,MAAM,aAAa,MAAM;GACvB,IAAI,CAAC,cAAc,SAAS,MAAM,UAAU;GAC5C,IAAI,EAAE,QAAQ,WAAW,EAAE,QAAQ,KAAK;IACtC,EAAE,eAAe;IACjB,YAAY;GACd;EACF;EAEA,MAAM,qBAAqB,MAAM;GAE/B,IAAI,SAAS,SAAS,CAAC,MAAM,UAAU;IACrC,EAAE,gBAAgB;IAClB,KAAK,iBAAiB,CAAC,MAAM,MAAM;IACnC;GACF;GAGA,IAAI,SAAS,OAAO;IAClB,EAAE,gBAAgB;IAClB;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