numori-ui 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/CHANGELOG.md +148 -0
  2. package/README.md +36 -34
  3. package/dist/components/AppShell.js +234 -0
  4. package/dist/components/AppShell.js.map +1 -0
  5. package/dist/components/Banner.js +29 -32
  6. package/dist/components/Banner.js.map +1 -1
  7. package/dist/components/Button.js +10 -19
  8. package/dist/components/Button.js.map +1 -1
  9. package/dist/components/Card.js +15 -9
  10. package/dist/components/Card.js.map +1 -1
  11. package/dist/components/Checkbox.js +13 -9
  12. package/dist/components/Checkbox.js.map +1 -1
  13. package/dist/components/CopyField.js +195 -0
  14. package/dist/components/CopyField.js.map +1 -0
  15. package/dist/components/DescriptionList.js +116 -0
  16. package/dist/components/DescriptionList.js.map +1 -0
  17. package/dist/components/Dropdown.js +10 -3
  18. package/dist/components/Dropdown.js.map +1 -1
  19. package/dist/components/DropdownSubmenu.js +5 -3
  20. package/dist/components/DropdownSubmenu.js.map +1 -1
  21. package/dist/components/EmptyState.js +123 -0
  22. package/dist/components/EmptyState.js.map +1 -0
  23. package/dist/components/FileInput.js +12 -4
  24. package/dist/components/FileInput.js.map +1 -1
  25. package/dist/components/FormField.js +43 -13
  26. package/dist/components/FormField.js.map +1 -1
  27. package/dist/components/IconTile.js +5 -9
  28. package/dist/components/IconTile.js.map +1 -1
  29. package/dist/components/Input.js +21 -7
  30. package/dist/components/Input.js.map +1 -1
  31. package/dist/components/ListMenuItem.js +38 -31
  32. package/dist/components/ListMenuItem.js.map +1 -1
  33. package/dist/components/Numpad.js +4 -4
  34. package/dist/components/Numpad.js.map +1 -1
  35. package/dist/components/PageHeader.js +106 -0
  36. package/dist/components/PageHeader.js.map +1 -0
  37. package/dist/components/Pagination.js +236 -0
  38. package/dist/components/Pagination.js.map +1 -0
  39. package/dist/components/Popup.js +9 -3
  40. package/dist/components/Popup.js.map +1 -1
  41. package/dist/components/Radio.js +2 -7
  42. package/dist/components/Radio.js.map +1 -1
  43. package/dist/components/Segmented.js +109 -27
  44. package/dist/components/Segmented.js.map +1 -1
  45. package/dist/components/Select.js +16 -5
  46. package/dist/components/Select.js.map +1 -1
  47. package/dist/components/Sidebar.js +69 -0
  48. package/dist/components/Sidebar.js.map +1 -0
  49. package/dist/components/SidebarGroup.js +50 -0
  50. package/dist/components/SidebarGroup.js.map +1 -0
  51. package/dist/components/SidebarItem.js +167 -0
  52. package/dist/components/SidebarItem.js.map +1 -0
  53. package/dist/components/StatCard.js +185 -0
  54. package/dist/components/StatCard.js.map +1 -0
  55. package/dist/components/Table.js +306 -0
  56. package/dist/components/Table.js.map +1 -0
  57. package/dist/components/Tabs.js +216 -0
  58. package/dist/components/Tabs.js.map +1 -0
  59. package/dist/components/Toggle.js +11 -2
  60. package/dist/components/Toggle.js.map +1 -1
  61. package/dist/components/index.js +91 -76
  62. package/dist/components/index.js.map +1 -1
  63. package/dist/composables/useMergedClasses.js +52 -0
  64. package/dist/composables/useMergedClasses.js.map +1 -0
  65. package/dist/icons/mdi.js +11 -0
  66. package/dist/icons/mdi.js.map +1 -1
  67. package/dist/index.d.ts +13 -3
  68. package/dist/index.js +47 -37
  69. package/dist/index.js.map +1 -1
  70. package/dist/internal/controlSizes.js +21 -0
  71. package/dist/internal/controlSizes.js.map +1 -0
  72. package/dist/internal/formField.js +26 -0
  73. package/dist/internal/formField.js.map +1 -0
  74. package/dist/internal/menu.js +20 -0
  75. package/dist/internal/menu.js.map +1 -0
  76. package/dist/manifest.js +12 -2
  77. package/dist/manifest.js.map +1 -1
  78. package/package.json +2 -1
  79. package/src/components/AppShell.vue +231 -0
  80. package/src/components/Banner.vue +20 -9
  81. package/src/components/Button.vue +12 -19
  82. package/src/components/Card.vue +11 -12
  83. package/src/components/Checkbox.vue +7 -10
  84. package/src/components/CopyField.vue +178 -0
  85. package/src/components/DescriptionList.vue +114 -0
  86. package/src/components/Dropdown.vue +14 -2
  87. package/src/components/DropdownSubmenu.vue +4 -2
  88. package/src/components/EmptyState.vue +107 -0
  89. package/src/components/FileInput.vue +19 -4
  90. package/src/components/FormField.vue +37 -4
  91. package/src/components/IconTile.vue +4 -9
  92. package/src/components/Input.vue +15 -6
  93. package/src/components/ListMenuItem.vue +21 -5
  94. package/src/components/Numpad.vue +7 -4
  95. package/src/components/PageHeader.vue +102 -0
  96. package/src/components/Pagination.vue +199 -0
  97. package/src/components/Popup.vue +6 -2
  98. package/src/components/Radio.vue +2 -10
  99. package/src/components/Segmented.vue +113 -38
  100. package/src/components/Select.vue +16 -2
  101. package/src/components/Sidebar.vue +61 -0
  102. package/src/components/SidebarGroup.vue +43 -0
  103. package/src/components/SidebarItem.vue +159 -0
  104. package/src/components/StatCard.vue +165 -0
  105. package/src/components/Table.vue +323 -0
  106. package/src/components/Tabs.vue +217 -0
  107. package/src/components/Toggle.vue +5 -0
  108. package/src/components/index.js +36 -11
  109. package/src/composables/useMergedClasses.js +49 -0
  110. package/src/icons/mdi.js +11 -0
  111. package/src/internal/controlSizes.js +17 -0
  112. package/src/internal/formField.js +23 -0
  113. package/src/internal/menu.js +16 -0
  114. package/src/manifest.js +12 -2
  115. package/dist/components/ButtonsGroup.js +0 -153
  116. package/dist/components/ButtonsGroup.js.map +0 -1
  117. package/dist/components/ComparisonTable.js +0 -152
  118. package/dist/components/ComparisonTable.js.map +0 -1
  119. package/src/components/ButtonsGroup.vue +0 -140
  120. package/src/components/ComparisonTable.vue +0 -141
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.js","names":[],"sources":["../../src/components/Banner.vue"],"sourcesContent":["<template>\n <Transition\n enter-active-class=\"transition-all duration-300 ease-out\"\n enter-from-class=\"max-h-0 opacity-0\"\n enter-to-class=\"max-h-24 opacity-100\"\n leave-active-class=\"transition-all duration-200 ease-in\"\n leave-from-class=\"max-h-24 opacity-100\"\n leave-to-class=\"max-h-0 opacity-0\"\n >\n <component\n :is=\"clickable ? 'button' : 'div'\"\n v-if=\"show\"\n class=\"w-full shrink-0 overflow-hidden text-xs font-medium\"\n :class=\"[colorClass, clickable && 'cursor-pointer text-left']\"\n :style=\"safeArea ? { paddingTop: 'env(safe-area-inset-top, 0px)' } : undefined\"\n :type=\"clickable ? 'button' : undefined\"\n role=\"status\"\n @click=\"clickable && emit('click')\"\n >\n <div class=\"relative flex items-center justify-center gap-2 px-4 py-1.5\">\n <UiIcon v-if=\"icon\" :name=\"icon\" class=\"w-3.5 h-3.5 shrink-0\" />\n <span\n ><slot>{{ message }}</slot></span\n >\n\n <button\n v-if=\"dismissible\"\n type=\"button\"\n class=\"absolute right-3 inline-flex items-center opacity-80 hover:opacity-100\"\n :aria-label=\"dismissLabel\"\n @click.stop=\"emit('dismiss')\"\n >\n <UiIcon name=\"mdi:close\" class=\"w-3.5 h-3.5\" />\n </button>\n </div>\n </component>\n </Transition>\n</template>\n\n<script setup>\n/**\n * UiBanner — a full-width status strip that slides in above the content.\n *\n * The shape shared by \"you're offline\", \"your email isn't verified\" and \"a new\n * version is available\": a thin, edge-to-edge bar that expands into view, states\n * one thing with an optional icon, and collapses away when the condition clears.\n * Mount it permanently and drive `show` from the condition; the height/opacity\n * transition does the appearing and disappearing.\n *\n * It sits at the top of the layout, so it honours the top safe-area inset by\n * default — on a notched phone the padding keeps the text out from under the\n * status bar. Turn `safeArea` off for a banner that is not at the very top.\n *\n * Two optional affordances: `clickable` turns the whole bar into a button (for\n * \"tap here to verify\"), and `dismissible` adds a close control. They emit\n * `click` and `dismiss` respectively — the parent decides what those mean.\n *\n * Colour is a small semantic set rather than free-form, so banners stay\n * consistent across apps; pass `bg-*`/`text-*` classes to step outside it.\n *\n * @example Offline notice\n * <UiBanner :show=\"offline\" color=\"warning\" icon=\"mdi:wifi-off\"\n * message=\"You're offline — changes will sync when you reconnect\" />\n *\n * @example Tappable call to action\n * <UiBanner :show=\"!verified\" color=\"info\" icon=\"mdi:email-alert-outline\"\n * clickable message=\"Your email is not verified — tap here to verify\"\n * @click=\"openVerify\" />\n */\nimport { computed } from 'vue'\nimport UiIcon from '../icons/Icon.vue'\n\nconst props = defineProps({\n /**\n * Whether the banner is shown. Drive this from the condition it reports;\n * toggling it runs the slide-in / collapse-out transition.\n * @type {boolean}\n * @default false\n */\n show: { type: Boolean, default: false },\n\n /**\n * Colour of the bar.\n * @type {string}\n * @default 'info'\n * @values 'info' | 'success' | 'warning' | 'error' | 'neutral'\n */\n color: { type: String, default: 'info' },\n\n /**\n * Optional MDI icon shown before the message.\n * @type {string}\n * @default ''\n */\n icon: { type: String, default: '' },\n\n /**\n * Message text. Ignored when the default slot is used.\n * @type {string}\n * @default ''\n */\n message: { type: String, default: '' },\n\n /**\n * Makes the whole bar a button that emits `click`.\n * @type {boolean}\n * @default false\n */\n clickable: { type: Boolean, default: false },\n\n /**\n * Adds a close control that emits `dismiss`.\n * @type {boolean}\n * @default false\n */\n dismissible: { type: Boolean, default: false },\n\n /**\n * Accessible label for the dismiss control.\n * @type {string}\n * @default 'Dismiss'\n */\n dismissLabel: { type: String, default: 'Dismiss' },\n\n /**\n * Pads for the top safe-area inset, for a banner pinned to the top of the\n * screen. Turn off when the banner sits lower in the layout.\n * @type {boolean}\n * @default true\n */\n safeArea: { type: Boolean, default: true },\n})\n\nconst emit = defineEmits(['click', 'dismiss'])\n\n/**\n * Banner colours come from the design tokens so a rebrand carries through.\n * `info` uses the primary ramp; `neutral` is the surface grey.\n */\nconst COLORS = {\n info: 'bg-primary-600 dark:bg-primary-700 text-white',\n success: 'bg-success-600 dark:bg-success-700 text-white',\n warning: 'bg-warning-500 dark:bg-warning-600 text-white',\n error: 'bg-error-600 dark:bg-error-700 text-white',\n neutral: 'bg-gray-800 dark:bg-gray-700 text-white',\n}\n\nconst colorClass = computed(() => COLORS[props.color] || COLORS.info)\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ourcesContent":["<template>\n <Transition\n enter-active-class=\"transition-all duration-300 ease-out\"\n enter-from-class=\"max-h-0 opacity-0\"\n enter-to-class=\"max-h-24 opacity-100\"\n leave-active-class=\"transition-all duration-200 ease-in\"\n leave-from-class=\"max-h-24 opacity-100\"\n leave-to-class=\"max-h-0 opacity-0\"\n >\n <div\n v-if=\"show\"\n class=\"relative w-full shrink-0 overflow-hidden text-xs font-medium\"\n :class=\"colorClass\"\n :style=\"safeArea ? { paddingTop: 'env(safe-area-inset-top, 0px)' } : undefined\"\n role=\"status\"\n >\n <!-- Whole-banner click target as a full-cover button that is a *sibling*\n of the dismiss button, never its ancestor. Nesting a <button> inside\n a <button> is invalid HTML: the browser restructures it, so the\n hydrated DOM would no longer match the server markup. -->\n <button\n v-if=\"clickable\"\n type=\"button\"\n class=\"absolute inset-0 z-0 cursor-pointer\"\n :aria-label=\"message || undefined\"\n @click=\"emit('click')\"\n />\n <div\n class=\"relative z-10 flex items-center justify-center gap-2 px-4 py-1.5\"\n :class=\"clickable ? 'pointer-events-none' : ''\"\n >\n <UiIcon v-if=\"icon\" :name=\"icon\" class=\"w-3.5 h-3.5 shrink-0\" />\n <span\n ><slot>{{ message }}</slot></span\n >\n\n <button\n v-if=\"dismissible\"\n type=\"button\"\n class=\"pointer-events-auto absolute right-3 inline-flex items-center opacity-80 hover:opacity-100\"\n :aria-label=\"dismissLabel\"\n @click.stop=\"emit('dismiss')\"\n >\n <UiIcon name=\"mdi:close\" class=\"w-3.5 h-3.5\" />\n </button>\n </div>\n </div>\n </Transition>\n</template>\n\n<script setup>\n/**\n * UiBanner — a full-width status strip that slides in above the content.\n *\n * The shape shared by \"you're offline\", \"your email isn't verified\" and \"a new\n * version is available\": a thin, edge-to-edge bar that expands into view, states\n * one thing with an optional icon, and collapses away when the condition clears.\n * Mount it permanently and drive `show` from the condition; the height/opacity\n * transition does the appearing and disappearing.\n *\n * It sits at the top of the layout, so it honours the top safe-area inset by\n * default — on a notched phone the padding keeps the text out from under the\n * status bar. Turn `safeArea` off for a banner that is not at the very top.\n *\n * Two optional affordances: `clickable` turns the whole bar into a button (for\n * \"tap here to verify\"), and `dismissible` adds a close control. They emit\n * `click` and `dismiss` respectively — the parent decides what those mean.\n *\n * Colour is a small semantic set rather than free-form, so banners stay\n * consistent across apps; pass `bg-*`/`text-*` classes to step outside it.\n *\n * @example Offline notice\n * <UiBanner :show=\"offline\" color=\"warning\" icon=\"mdi:wifi-off\"\n * message=\"You're offline — changes will sync when you reconnect\" />\n *\n * @example Tappable call to action\n * <UiBanner :show=\"!verified\" color=\"info\" icon=\"mdi:email-alert-outline\"\n * clickable message=\"Your email is not verified — tap here to verify\"\n * @click=\"openVerify\" />\n */\nimport { computed } from 'vue'\nimport UiIcon from '../icons/Icon.vue'\n\nconst props = defineProps({\n /**\n * Whether the banner is shown. Drive this from the condition it reports;\n * toggling it runs the slide-in / collapse-out transition.\n * @type {boolean}\n * @default false\n */\n show: { type: Boolean, default: false },\n\n /**\n * Colour of the bar.\n * @type {string}\n * @default 'info'\n * @values 'info' | 'success' | 'warning' | 'error' | 'neutral'\n */\n color: { type: String, default: 'info' },\n\n /**\n * Optional MDI icon shown before the message.\n * @type {string}\n * @default ''\n */\n icon: { type: String, default: '' },\n\n /**\n * Message text. Ignored when the default slot is used.\n * @type {string}\n * @default ''\n */\n message: { type: String, default: '' },\n\n /**\n * Makes the whole bar a button that emits `click`.\n * @type {boolean}\n * @default false\n */\n clickable: { type: Boolean, default: false },\n\n /**\n * Adds a close control that emits `dismiss`.\n * @type {boolean}\n * @default false\n */\n dismissible: { type: Boolean, default: false },\n\n /**\n * Accessible label for the dismiss control.\n * @type {string}\n * @default 'Dismiss'\n */\n dismissLabel: { type: String, default: 'Dismiss' },\n\n /**\n * Pads for the top safe-area inset, for a banner pinned to the top of the\n * screen. Turn off when the banner sits lower in the layout.\n * @type {boolean}\n * @default true\n */\n safeArea: { type: Boolean, default: true },\n})\n\nconst emit = defineEmits(['click', 'dismiss'])\n\n/**\n * Banner colours come from the design tokens so a rebrand carries through.\n * `info` uses the primary ramp; `neutral` is the surface grey.\n */\nconst COLORS = {\n info: 'bg-primary-600 dark:bg-primary-700 text-white',\n success: 'bg-success-600 dark:bg-success-700 text-white',\n warning: 'bg-warning-500 dark:bg-warning-600 text-white',\n error: 'bg-error-600 dark:bg-error-700 text-white',\n neutral: 'bg-gray-800 dark:bg-gray-700 text-white',\n}\n\nconst colorClass = computed(() => COLORS[props.color] || COLORS.info)\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmFA,MAAM,QAAQ;EA6Dd,MAAM,OAAO;;;;;EAMb,MAAM,SAAS;GACb,MAAM;GACN,SAAS;GACT,SAAS;GACT,OAAO;GACP,SAAS;EACX;EAEA,MAAM,aAAa,eAAe,OAAO,MAAM,UAAU,OAAO,IAAI;;GA7JlE,OAAA,UAAA,GAAA,YA8Ca,YAAA;IA7CX,sBAAmB;IACnB,oBAAiB;IACjB,kBAAe;IACf,sBAAmB;IACnB,oBAAiB;IACjB,kBAAe;;IAEf,SAAA,cAqCM,CApCE,QAAA,QADR,UAAA,GAAA,mBAqCM,OAAA;;KAnCJ,OAAK,eAAA,CAAC,gEACE,WAAA,KAAU,CAAA;KACjB,OAAK,eAAE,QAAA,WAAQ,EAAA,YAAA,gCAAA,IAAqD,KAAA,CAAS;KAC9E,MAAK;IAOG,GAAA,CAAA,QAAA,aADR,UAAA,GAAA,mBAME,UAAA;;KAJA,MAAK;KACL,OAAM;KACL,cAAY,QAAA,WAAW,KAAA;KACvB,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,OAAA;IAEd,GAAA,MAAA,GAAA,UAAA,KAAA,mBAAA,IAAA,IAAA,GAAA,mBAkBM,OAAA,EAjBJ,OAAK,eAAA,CAAC,oEACE,QAAA,YAAS,wBAAA,EAAA,CAAA,EAAA,GAAA;KAEH,QAAA,QAAd,UAAA,GAAA,YAAgE,aAAA;;MAA3C,MAAM,QAAA;MAAM,OAAM;;KACvC,mBAEC,QAAA,MAAA,CADE,WAA0B,KAAA,QAAA,WAAA,CAAA,SAAA,CAAjB,gBAAA,gBAAA,QAAA,OAAO,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;KAIX,QAAA,eADR,UAAA,GAAA,mBAQS,UAAA;;MANP,MAAK;MACL,OAAM;MACL,cAAY,QAAA;MACZ,SAAK,OAAA,OAAA,OAAA,KAAA,eAAA,WAAO,KAAI,SAAA,GAAA,CAAA,MAAA,CAAA;KAEjB,GAAA,CAAA,YAA+C,aAAA;MAAvC,MAAK;MAAY,OAAM"}
@@ -1,6 +1,6 @@
1
1
  import _sfc_main$1 from "../icons/Icon.js";
2
- import { computed, createBlock, mergeProps, normalizeClass, openBlock, renderSlot, resolveDynamicComponent, useAttrs, withCtx } from "vue";
3
- import { twMerge } from "tailwind-merge";
2
+ import { useMergedClasses } from "../composables/useMergedClasses.js";
3
+ import { computed, createBlock, mergeProps, normalizeClass, openBlock, renderSlot, resolveDynamicComponent, unref, withCtx } from "vue";
4
4
  //#region src/components/Button.vue
5
5
  var _sfc_main = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
6
6
  __name: "Button",
@@ -63,10 +63,11 @@ var _sfc_main = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
63
63
  default: "md"
64
64
  },
65
65
  /**
66
- * Border-radius shape of the button.
66
+ * Border-radius shape of the button, matching `UiSegmented`'s `shape`.
67
+ * For a circular icon button, combine `shape="pill"` with `icon-only`.
67
68
  * @type {string}
68
69
  * @default 'round'
69
- * @values 'round' (rounded-lg) | 'pill' (rounded-full) | 'square' (rounded-none) | 'circle' (rounded-full) | 'none'
70
+ * @values 'round' (rounded-lg) | 'pill' (rounded-full) | 'square' (rounded-none)
70
71
  */
71
72
  shape: {
72
73
  type: String,
@@ -253,13 +254,11 @@ var _sfc_main = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
253
254
  return map[props.size] || map.md;
254
255
  });
255
256
  const shapeClasses = computed(() => {
256
- if (isInlineVariant.value) return "";
257
+ if (isInlineVariant.value) return "rounded-lg";
257
258
  const map = {
258
259
  round: "rounded-lg",
259
260
  pill: "rounded-full",
260
- square: "rounded-none",
261
- circle: "rounded-full",
262
- none: ""
261
+ square: "rounded-none"
263
262
  };
264
263
  return map[props.shape] || map.round;
265
264
  });
@@ -360,15 +359,7 @@ var _sfc_main = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
360
359
  if (props.disabled || props.loading) return "opacity-50 cursor-not-allowed pointer-events-none";
361
360
  return "cursor-pointer";
362
361
  });
363
- const attrs = useAttrs();
364
- const restAttrs = computed(() => {
365
- const { class: _, ...rest } = attrs;
366
- return rest;
367
- });
368
- const mergedClasses = computed(() => {
369
- const externalClass = attrs.class || "";
370
- return twMerge(internalClasses.value, externalClass);
371
- });
362
+ const { mergedClasses, restAttrs } = useMergedClasses(() => internalClasses.value);
372
363
  const internalClasses = computed(() => {
373
364
  const base = "inline-flex items-center transition-colors select-none";
374
365
  const justify = isInlineVariant.value ? "" : "justify-center";
@@ -395,13 +386,13 @@ var _sfc_main = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
395
386
  type: isButton.value ? __props.nativeType : void 0,
396
387
  disabled: isButton.value ? __props.disabled || __props.loading : void 0,
397
388
  href: __props.tag === "a" ? __props.href : void 0,
398
- class: mergedClasses.value,
389
+ class: unref(mergedClasses),
399
390
  title: __props.title,
400
391
  "aria-label": __props.ariaLabel,
401
392
  "aria-checked": __props.ariaChecked,
402
393
  role: __props.role,
403
394
  tabindex: __props.tabindex
404
- }, restAttrs.value), {
395
+ }, unref(restAttrs)), {
405
396
  default: withCtx(() => [__props.loading && __props.loadingStyle === "spinner" ? (openBlock(), createBlock(_sfc_main$1, {
406
397
  key: 0,
407
398
  name: spinnerIcon.value,
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","names":[],"sources":["../../src/components/Button.vue"],"sourcesContent":["<template>\n <!-- Dynamic root element — renders as button, anchor, or any tag via :is -->\n <component\n :is=\"tag\"\n :type=\"isButton ? nativeType : undefined\"\n :disabled=\"isButton ? disabled || loading : undefined\"\n :href=\"tag === 'a' ? href : undefined\"\n :class=\"mergedClasses\"\n :title=\"title\"\n :aria-label=\"ariaLabel\"\n :aria-checked=\"ariaChecked\"\n :role=\"role\"\n :tabindex=\"tabindex\"\n v-bind=\"restAttrs\"\n >\n <!-- Loading state: spinner replaces slot content (default) -->\n <template v-if=\"loading && loadingStyle === 'spinner'\">\n <UiIcon :name=\"spinnerIcon\" class=\"animate-spin\" :class=\"spinnerSizeClass\" />\n </template>\n <!-- Default slot: button label, icons, or any child content -->\n <slot v-else :spinning=\"loading && loadingStyle === 'icon'\" />\n </component>\n</template>\n\n<script setup>\n/**\n * UiButton — Versatile button component with multiple variants, colors, sizes, and shapes.\n *\n * Supports rendering as any HTML element (button, anchor, div), eight visual variants\n * (solid, outline, ghost, dashed, text, link, menu-item, list-item), six color themes,\n * five sizes, and five shape options. Includes loading state with a configurable spinner,\n * icon-only mode, block/full-width layout, and full accessibility attribute support.\n * External Tailwind classes are merged via `tailwind-merge` so they can override internals.\n *\n * @example Basic solid button\n * <UiButton @click=\"save\">Save</UiButton>\n *\n * @example Ghost icon button\n * <UiButton variant=\"ghost\" color=\"gray\" icon-only>\n * <UiIcon name=\"mdi:close\" class=\"w-5 h-5\" />\n * </UiButton>\n *\n * @example Outline danger button with loading\n * <UiButton variant=\"outline\" color=\"red\" :loading=\"isSaving\">Delete</UiButton>\n *\n * @example Menu item in a dropdown\n * <UiButton variant=\"menu-item\" color=\"red\">\n * <UiIcon name=\"mdi:trash-can-outline\" class=\"w-4 h-4\" /> Delete\n * </UiButton>\n *\n * @example Anchor link\n * <UiButton tag=\"a\" variant=\"link\" href=\"/docs\">Read docs</UiButton>\n *\n * @slot default — Button content (label text, icons, or any child elements)\n */\nimport { computed, useAttrs } from 'vue'\nimport UiIcon from '../icons/Icon.vue'\nimport { twMerge } from 'tailwind-merge'\nconst props = defineProps({\n /**\n * HTML element tag to render.\n * @type {string}\n * @default 'button'\n * @values 'button' | 'a' | 'div' | any valid HTML tag\n */\n tag: { type: String, default: 'button' },\n\n /**\n * Native button `type` attribute (only applied when tag is 'button').\n * @type {string}\n * @default 'button'\n * @values 'button' | 'submit' | 'reset'\n */\n nativeType: { type: String, default: 'button' },\n\n /**\n * Visual variant controlling background, border, and hover styles.\n * - 'solid' — filled background with shadow\n * - 'outline' — transparent with colored border\n * - 'ghost' — transparent, colored on hover\n * - 'dashed' — dashed border, transparent background\n * - 'text' — plain text, underline on hover\n * - 'link' — inline link style, no padding\n * - 'menu-item' — full-width row for dropdown menus\n * - 'list-item' — full-width row for settings lists\n * @type {string}\n * @default 'solid'\n */\n variant: { type: String, default: 'solid' },\n\n /**\n * Color theme key mapped to Tailwind color scales.\n * @type {string}\n * @default 'primary'\n * @values 'primary' | 'gray' | 'red' | 'green' | 'amber' | 'white'\n */\n color: { type: String, default: 'primary' },\n\n /**\n * Button size controlling padding, font size, and gap.\n * @type {string}\n * @default 'md'\n * @values 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n */\n size: { type: String, default: 'md' },\n\n /**\n * Border-radius shape of the button.\n * @type {string}\n * @default 'round'\n * @values 'round' (rounded-lg) | 'pill' (rounded-full) | 'square' (rounded-none) | 'circle' (rounded-full) | 'none'\n */\n shape: { type: String, default: 'round' },\n\n /**\n * Disabled state — visually dims the button and prevents interaction.\n * @type {boolean}\n * @default false\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Loading state — replaces slot content with a spinner and disables the button.\n * @type {boolean}\n * @default false\n */\n loading: { type: Boolean, default: false },\n\n /**\n * Loading visual style.\n * - 'spinner': replaces slot content with a spinner icon (default)\n * - 'icon': keeps slot content visible, exposes `spinning` slot prop for the icon\n * @type {string}\n * @default 'spinner'\n */\n loadingStyle: { type: String, default: 'spinner' },\n\n /**\n * MDI icon name for the loading spinner.\n * @type {string}\n * @default 'mdi:loading'\n */\n spinner: { type: String, default: 'mdi:loading' },\n\n /**\n * Block mode — makes the button full-width (w-full).\n * @type {boolean}\n * @default false\n */\n block: { type: Boolean, default: false },\n\n /**\n * Icon-only mode — uses equal padding on all sides for a square/circle button.\n * @type {boolean}\n * @default false\n */\n iconOnly: { type: Boolean, default: false },\n\n /**\n * URL for anchor tags (only applied when tag is 'a').\n * @type {string}\n * @default undefined\n */\n href: { type: String, default: undefined },\n\n /**\n * Native `title` attribute for hover tooltip.\n * @type {string}\n * @default undefined\n */\n title: { type: String, default: undefined },\n\n /**\n * Accessible label for screen readers.\n * @type {string}\n * @default undefined\n */\n ariaLabel: { type: String, default: undefined },\n\n /**\n * ARIA checked state for toggle-style buttons.\n * @type {string | boolean}\n * @default undefined\n */\n ariaChecked: { type: [String, Boolean], default: undefined },\n\n /**\n * ARIA role override (e.g. 'switch', 'tab').\n * @type {string}\n * @default undefined\n */\n role: { type: String, default: undefined },\n\n /**\n * Tab index for keyboard navigation order.\n * @type {string | number}\n * @default undefined\n */\n tabindex: { type: [String, Number], default: undefined },\n})\n\ndefineOptions({ inheritAttrs: false })\n\n// Determine element type and variant category for conditional attribute binding\nconst isButton = computed(() => props.tag === 'button')\nconst isMenuItem = computed(() => props.variant === 'menu-item')\nconst isListItem = computed(() => props.variant === 'list-item')\n// Menu-item and list-item variants share full-width, left-aligned layout behavior\nconst isInlineVariant = computed(() => isMenuItem.value || isListItem.value)\n\nconst spinnerIcon = computed(() => props.spinner)\n\nconst spinnerSizeClass = computed(() => {\n const map = { xs: 'w-3 h-3', sm: 'w-3.5 h-3.5', md: 'w-4 h-4', lg: 'w-5 h-5', xl: 'w-6 h-6' }\n return map[props.size] || map.md\n})\n\n// ── Size classes ──────────────────────────────────────────\nconst sizeClasses = computed(() => {\n if (isMenuItem.value) return 'px-3 py-1.5 text-sm gap-2'\n if (isListItem.value) return 'px-3.5 py-2.5 text-sm gap-3'\n if (props.iconOnly) {\n const map = { xs: 'p-1', sm: 'p-1.5', md: 'p-2', lg: 'p-2.5', xl: 'p-3' }\n return map[props.size] || map.md\n }\n const map = {\n xs: 'px-2 py-1 text-xs gap-1',\n sm: 'px-2.5 py-1.5 text-xs gap-1.5',\n md: 'px-4 py-2 text-sm gap-2',\n lg: 'px-5 py-2.5 text-sm gap-2',\n xl: 'px-6 py-3 text-base gap-2.5',\n }\n return map[props.size] || map.md\n})\n\n// ── Shape classes ─────────────────────────────────────────\nconst shapeClasses = computed(() => {\n if (isInlineVariant.value) return ''\n const map = {\n round: 'rounded-lg',\n pill: 'rounded-full',\n square: 'rounded-none',\n circle: 'rounded-full',\n none: '',\n }\n return map[props.shape] || map.round\n})\n\n// ── Colour × Variant matrix ──────────────────────────────\n// Each variant defines its own color map. Menu-item and list-item default\n// to gray when color is 'primary' since they sit inside neutral containers.\nconst colorVariantClasses = computed(() => {\n const v = props.variant\n const c = props.color\n\n // Menu item — no bg, no rounding, consistent hover. Defaults to gray text.\n if (v === 'menu-item') {\n const effectiveColor = c === 'primary' ? 'gray' : c\n const map = {\n gray: 'text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700',\n red: 'text-red-600 dark:text-red-400 hover:bg-red-100 dark:hover:bg-red-900/30',\n green: 'text-success-600 dark:text-success-400 hover:bg-gray-100 dark:hover:bg-gray-700',\n amber: 'text-amber-600 dark:text-amber-400 hover:bg-gray-100 dark:hover:bg-gray-700',\n white: 'text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700',\n }\n return map[effectiveColor] || map.gray\n }\n\n // List item — settings list rows. Defaults to gray text.\n if (v === 'list-item') {\n const effectiveColor = c === 'primary' ? 'gray' : c\n const map = {\n gray: 'text-gray-700 dark:text-gray-300 hover:bg-gray-200/70 dark:hover:bg-gray-700/50',\n red: 'text-red-600 dark:text-red-400 hover:bg-red-200/50 dark:hover:bg-red-800/30',\n green:\n 'text-success-600 dark:text-success-400 hover:bg-gray-200/70 dark:hover:bg-gray-700/50',\n amber: 'text-amber-600 dark:text-amber-400 hover:bg-gray-200/70 dark:hover:bg-gray-700/50',\n white: 'text-gray-700 dark:text-gray-300 hover:bg-gray-200/70 dark:hover:bg-gray-700/50',\n }\n return map[effectiveColor] || map.gray\n }\n\n // Solid\n if (v === 'solid') {\n const map = {\n primary: 'bg-primary-600 hover:bg-primary-700 text-white shadow-sm hover:shadow-md',\n gray: 'bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300',\n red: 'bg-red-600 hover:bg-red-700 text-white shadow-sm hover:shadow-md',\n green: 'bg-success-600 hover:bg-success-700 text-white shadow-sm hover:shadow-md',\n amber: 'bg-amber-600 hover:bg-amber-700 text-white shadow-sm hover:shadow-md',\n white:\n 'bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 text-gray-900 dark:text-gray-200 shadow-sm',\n }\n return map[c] || map.primary\n }\n\n // Outline\n if (v === 'outline') {\n const map = {\n primary:\n 'border border-primary-500 text-primary-600 dark:text-primary-400 bg-transparent hover:bg-primary-50 dark:hover:bg-primary-900/20',\n gray: 'border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800',\n red: 'border border-red-300 dark:border-red-700 text-red-600 dark:text-red-400 bg-transparent hover:bg-red-50 dark:hover:bg-red-900/20',\n green:\n 'border border-success-300 dark:border-success-700 text-success-600 dark:text-success-400 bg-transparent hover:bg-success-50 dark:hover:bg-success-900/20',\n amber:\n 'border border-amber-300 dark:border-amber-700 text-amber-600 dark:text-amber-400 bg-transparent hover:bg-amber-50 dark:hover:bg-amber-900/20',\n white:\n 'border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700',\n }\n return map[c] || map.primary\n }\n\n // Dashed\n if (v === 'dashed') {\n const map = {\n primary:\n 'border border-dashed border-primary-400 dark:border-primary-600 text-primary-600 dark:text-primary-400 bg-transparent hover:bg-primary-50 dark:hover:bg-primary-900/20',\n gray: 'border border-dashed border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-400 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800',\n red: 'border border-dashed border-red-300 dark:border-red-700 text-red-600 dark:text-red-400 bg-transparent hover:bg-red-50 dark:hover:bg-red-900/20',\n green:\n 'border border-dashed border-success-300 dark:border-success-700 text-success-600 dark:text-success-400 bg-transparent hover:bg-success-50 dark:hover:bg-success-900/20',\n amber:\n 'border border-dashed border-amber-300 dark:border-amber-700 text-amber-600 dark:text-amber-400 bg-transparent hover:bg-amber-50 dark:hover:bg-amber-900/20',\n white:\n 'border border-dashed border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 bg-transparent hover:bg-gray-50 dark:hover:bg-gray-700',\n }\n return map[c] || map.primary\n }\n\n // Ghost\n if (v === 'ghost') {\n const map = {\n primary:\n 'text-primary-600 dark:text-primary-400 bg-transparent hover:bg-primary-50 dark:hover:bg-primary-900/20',\n gray: 'text-gray-700 dark:text-gray-300 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800',\n red: 'text-red-600 dark:text-red-400 bg-transparent hover:bg-red-50 dark:hover:bg-red-900/20',\n green:\n 'text-success-600 dark:text-success-400 bg-transparent hover:bg-success-50 dark:hover:bg-success-900/20',\n amber:\n 'text-amber-600 dark:text-amber-400 bg-transparent hover:bg-amber-50 dark:hover:bg-amber-900/20',\n white:\n 'text-gray-700 dark:text-gray-300 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-700',\n }\n return map[c] || map.primary\n }\n\n // Text\n if (v === 'text') {\n const map = {\n primary: 'text-primary-600 dark:text-primary-400 bg-transparent hover:underline',\n gray: 'text-gray-600 dark:text-gray-400 bg-transparent hover:underline',\n red: 'text-red-600 dark:text-red-400 bg-transparent hover:underline',\n green: 'text-success-600 dark:text-success-400 bg-transparent hover:underline',\n amber: 'text-amber-600 dark:text-amber-400 bg-transparent hover:underline',\n white: 'text-gray-700 dark:text-gray-300 bg-transparent hover:underline',\n }\n return map[c] || map.primary\n }\n\n // Link\n if (v === 'link') {\n const map = {\n primary: 'text-primary-600 dark:text-primary-400 hover:underline p-0',\n gray: 'text-gray-500 dark:text-gray-400 hover:underline p-0',\n red: 'text-red-600 dark:text-red-400 hover:underline p-0',\n green: 'text-success-600 dark:text-success-400 hover:underline p-0',\n amber: 'text-amber-600 dark:text-amber-400 hover:underline p-0',\n white: 'text-gray-700 dark:text-gray-300 hover:underline p-0',\n }\n return map[c] || map.primary\n }\n\n return ''\n})\n\n// ── Disabled / loading classes ────────────────────────────\nconst stateClasses = computed(() => {\n if (props.disabled || props.loading) {\n return 'opacity-50 cursor-not-allowed pointer-events-none'\n }\n return 'cursor-pointer'\n})\n\n// ── Merge with external classes (external wins via twMerge) ──\nconst attrs = useAttrs()\n\nconst restAttrs = computed(() => {\n const { class: _, ...rest } = attrs\n return rest\n})\n\nconst mergedClasses = computed(() => {\n const externalClass = attrs.class || ''\n return twMerge(internalClasses.value, externalClass)\n})\n\n// ── Assembled internal classes ────────────────────────────\nconst internalClasses = computed(() => {\n const base = 'inline-flex items-center transition-colors select-none'\n const justify = isInlineVariant.value ? '' : 'justify-center'\n const blockClass = props.block || isInlineVariant.value ? 'w-full' : ''\n const weight = ['ghost', 'text', 'link', 'menu-item', 'list-item'].includes(props.variant)\n ? ''\n : 'font-medium'\n return [\n base,\n justify,\n weight,\n sizeClasses.value,\n shapeClasses.value,\n colorVariantClasses.value,\n stateClasses.value,\n blockClass,\n ]\n .filter(Boolean)\n .join(' ')\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAA,CAAA"}
1
+ {"version":3,"file":"Button.js","names":[],"sources":["../../src/components/Button.vue"],"sourcesContent":["<template>\n <!-- Dynamic root element — renders as button, anchor, or any tag via :is -->\n <component\n :is=\"tag\"\n :type=\"isButton ? nativeType : undefined\"\n :disabled=\"isButton ? disabled || loading : undefined\"\n :href=\"tag === 'a' ? href : undefined\"\n :class=\"mergedClasses\"\n :title=\"title\"\n :aria-label=\"ariaLabel\"\n :aria-checked=\"ariaChecked\"\n :role=\"role\"\n :tabindex=\"tabindex\"\n v-bind=\"restAttrs\"\n >\n <!-- Loading state: spinner replaces slot content (default) -->\n <template v-if=\"loading && loadingStyle === 'spinner'\">\n <UiIcon :name=\"spinnerIcon\" class=\"animate-spin\" :class=\"spinnerSizeClass\" />\n </template>\n <!-- Default slot: button label, icons, or any child content -->\n <slot v-else :spinning=\"loading && loadingStyle === 'icon'\" />\n </component>\n</template>\n\n<script setup>\n/**\n * UiButton — Versatile button component with multiple variants, colors, sizes, and shapes.\n *\n * Supports rendering as any HTML element (button, anchor, div), eight visual variants\n * (solid, outline, ghost, dashed, text, link, menu-item, list-item), six color themes,\n * five sizes, and five shape options. Includes loading state with a configurable spinner,\n * icon-only mode, block/full-width layout, and full accessibility attribute support.\n * External Tailwind classes are merged via `tailwind-merge` so they can override internals.\n *\n * @example Basic solid button\n * <UiButton @click=\"save\">Save</UiButton>\n *\n * @example Ghost icon button\n * <UiButton variant=\"ghost\" color=\"gray\" icon-only>\n * <UiIcon name=\"mdi:close\" class=\"w-5 h-5\" />\n * </UiButton>\n *\n * @example Outline danger button with loading\n * <UiButton variant=\"outline\" color=\"red\" :loading=\"isSaving\">Delete</UiButton>\n *\n * @example Menu item in a dropdown\n * <UiButton variant=\"menu-item\" color=\"red\">\n * <UiIcon name=\"mdi:trash-can-outline\" class=\"w-4 h-4\" /> Delete\n * </UiButton>\n *\n * @example Anchor link\n * <UiButton tag=\"a\" variant=\"link\" href=\"/docs\">Read docs</UiButton>\n *\n * @slot default — Button content (label text, icons, or any child elements)\n */\nimport { computed } from 'vue'\nimport UiIcon from '../icons/Icon.vue'\nimport { useMergedClasses } from '../composables/useMergedClasses.js'\nconst props = defineProps({\n /**\n * HTML element tag to render.\n * @type {string}\n * @default 'button'\n * @values 'button' | 'a' | 'div' | any valid HTML tag\n */\n tag: { type: String, default: 'button' },\n\n /**\n * Native button `type` attribute (only applied when tag is 'button').\n * @type {string}\n * @default 'button'\n * @values 'button' | 'submit' | 'reset'\n */\n nativeType: { type: String, default: 'button' },\n\n /**\n * Visual variant controlling background, border, and hover styles.\n * - 'solid' — filled background with shadow\n * - 'outline' — transparent with colored border\n * - 'ghost' — transparent, colored on hover\n * - 'dashed' — dashed border, transparent background\n * - 'text' — plain text, underline on hover\n * - 'link' — inline link style, no padding\n * - 'menu-item' — full-width row for dropdown menus\n * - 'list-item' — full-width row for settings lists\n * @type {string}\n * @default 'solid'\n */\n variant: { type: String, default: 'solid' },\n\n /**\n * Color theme key mapped to Tailwind color scales.\n * @type {string}\n * @default 'primary'\n * @values 'primary' | 'gray' | 'red' | 'green' | 'amber' | 'white'\n */\n color: { type: String, default: 'primary' },\n\n /**\n * Button size controlling padding, font size, and gap.\n * @type {string}\n * @default 'md'\n * @values 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n */\n size: { type: String, default: 'md' },\n\n /**\n * Border-radius shape of the button, matching `UiSegmented`'s `shape`.\n * For a circular icon button, combine `shape=\"pill\"` with `icon-only`.\n * @type {string}\n * @default 'round'\n * @values 'round' (rounded-lg) | 'pill' (rounded-full) | 'square' (rounded-none)\n */\n shape: { type: String, default: 'round' },\n\n /**\n * Disabled state — visually dims the button and prevents interaction.\n * @type {boolean}\n * @default false\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Loading state — replaces slot content with a spinner and disables the button.\n * @type {boolean}\n * @default false\n */\n loading: { type: Boolean, default: false },\n\n /**\n * Loading visual style.\n * - 'spinner': replaces slot content with a spinner icon (default)\n * - 'icon': keeps slot content visible, exposes `spinning` slot prop for the icon\n * @type {string}\n * @default 'spinner'\n */\n loadingStyle: { type: String, default: 'spinner' },\n\n /**\n * MDI icon name for the loading spinner.\n * @type {string}\n * @default 'mdi:loading'\n */\n spinner: { type: String, default: 'mdi:loading' },\n\n /**\n * Block mode — makes the button full-width (w-full).\n * @type {boolean}\n * @default false\n */\n block: { type: Boolean, default: false },\n\n /**\n * Icon-only mode — uses equal padding on all sides for a square/circle button.\n * @type {boolean}\n * @default false\n */\n iconOnly: { type: Boolean, default: false },\n\n /**\n * URL for anchor tags (only applied when tag is 'a').\n * @type {string}\n * @default undefined\n */\n href: { type: String, default: undefined },\n\n /**\n * Native `title` attribute for hover tooltip.\n * @type {string}\n * @default undefined\n */\n title: { type: String, default: undefined },\n\n /**\n * Accessible label for screen readers.\n * @type {string}\n * @default undefined\n */\n ariaLabel: { type: String, default: undefined },\n\n /**\n * ARIA checked state for toggle-style buttons.\n * @type {string | boolean}\n * @default undefined\n */\n ariaChecked: { type: [String, Boolean], default: undefined },\n\n /**\n * ARIA role override (e.g. 'switch', 'tab').\n * @type {string}\n * @default undefined\n */\n role: { type: String, default: undefined },\n\n /**\n * Tab index for keyboard navigation order.\n * @type {string | number}\n * @default undefined\n */\n tabindex: { type: [String, Number], default: undefined },\n})\n\ndefineOptions({ inheritAttrs: false })\n\n// Determine element type and variant category for conditional attribute binding\nconst isButton = computed(() => props.tag === 'button')\nconst isMenuItem = computed(() => props.variant === 'menu-item')\nconst isListItem = computed(() => props.variant === 'list-item')\n// Menu-item and list-item variants share full-width, left-aligned layout behavior\nconst isInlineVariant = computed(() => isMenuItem.value || isListItem.value)\n\nconst spinnerIcon = computed(() => props.spinner)\n\nconst spinnerSizeClass = computed(() => {\n const map = { xs: 'w-3 h-3', sm: 'w-3.5 h-3.5', md: 'w-4 h-4', lg: 'w-5 h-5', xl: 'w-6 h-6' }\n return map[props.size] || map.md\n})\n\n// ── Size classes ──────────────────────────────────────────\nconst sizeClasses = computed(() => {\n if (isMenuItem.value) return 'px-3 py-1.5 text-sm gap-2'\n if (isListItem.value) return 'px-3.5 py-2.5 text-sm gap-3'\n if (props.iconOnly) {\n const map = { xs: 'p-1', sm: 'p-1.5', md: 'p-2', lg: 'p-2.5', xl: 'p-3' }\n return map[props.size] || map.md\n }\n const map = {\n xs: 'px-2 py-1 text-xs gap-1',\n sm: 'px-2.5 py-1.5 text-xs gap-1.5',\n md: 'px-4 py-2 text-sm gap-2',\n lg: 'px-5 py-2.5 text-sm gap-2',\n xl: 'px-6 py-3 text-base gap-2.5',\n }\n return map[props.size] || map.md\n})\n\n// ── Shape classes ─────────────────────────────────────────\nconst shapeClasses = computed(() => {\n // Menu/list rows are full-width, but still round their corners so the hover\n // highlight is a rounded chip rather than a square that pokes past the\n // rounded menu panel around them.\n if (isInlineVariant.value) return 'rounded-lg'\n const map = {\n round: 'rounded-lg',\n pill: 'rounded-full',\n square: 'rounded-none',\n }\n return map[props.shape] || map.round\n})\n\n// ── Colour × Variant matrix ──────────────────────────────\n// Each variant defines its own color map. Menu-item and list-item default\n// to gray when color is 'primary' since they sit inside neutral containers.\nconst colorVariantClasses = computed(() => {\n const v = props.variant\n const c = props.color\n\n // Menu item — no bg, no rounding, consistent hover. Defaults to gray text.\n if (v === 'menu-item') {\n const effectiveColor = c === 'primary' ? 'gray' : c\n const map = {\n gray: 'text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700',\n red: 'text-red-600 dark:text-red-400 hover:bg-red-100 dark:hover:bg-red-900/30',\n green: 'text-success-600 dark:text-success-400 hover:bg-gray-100 dark:hover:bg-gray-700',\n amber: 'text-amber-600 dark:text-amber-400 hover:bg-gray-100 dark:hover:bg-gray-700',\n white: 'text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700',\n }\n return map[effectiveColor] || map.gray\n }\n\n // List item — settings list rows. Defaults to gray text.\n if (v === 'list-item') {\n const effectiveColor = c === 'primary' ? 'gray' : c\n const map = {\n gray: 'text-gray-700 dark:text-gray-300 hover:bg-gray-200/70 dark:hover:bg-gray-700/50',\n red: 'text-red-600 dark:text-red-400 hover:bg-red-200/50 dark:hover:bg-red-800/30',\n green:\n 'text-success-600 dark:text-success-400 hover:bg-gray-200/70 dark:hover:bg-gray-700/50',\n amber: 'text-amber-600 dark:text-amber-400 hover:bg-gray-200/70 dark:hover:bg-gray-700/50',\n white: 'text-gray-700 dark:text-gray-300 hover:bg-gray-200/70 dark:hover:bg-gray-700/50',\n }\n return map[effectiveColor] || map.gray\n }\n\n // Solid\n if (v === 'solid') {\n const map = {\n primary: 'bg-primary-600 hover:bg-primary-700 text-white shadow-sm hover:shadow-md',\n gray: 'bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300',\n red: 'bg-red-600 hover:bg-red-700 text-white shadow-sm hover:shadow-md',\n green: 'bg-success-600 hover:bg-success-700 text-white shadow-sm hover:shadow-md',\n amber: 'bg-amber-600 hover:bg-amber-700 text-white shadow-sm hover:shadow-md',\n white:\n 'bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 text-gray-900 dark:text-gray-200 shadow-sm',\n }\n return map[c] || map.primary\n }\n\n // Outline\n if (v === 'outline') {\n const map = {\n primary:\n 'border border-primary-500 text-primary-600 dark:text-primary-400 bg-transparent hover:bg-primary-50 dark:hover:bg-primary-900/20',\n gray: 'border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800',\n red: 'border border-red-300 dark:border-red-700 text-red-600 dark:text-red-400 bg-transparent hover:bg-red-50 dark:hover:bg-red-900/20',\n green:\n 'border border-success-300 dark:border-success-700 text-success-600 dark:text-success-400 bg-transparent hover:bg-success-50 dark:hover:bg-success-900/20',\n amber:\n 'border border-amber-300 dark:border-amber-700 text-amber-600 dark:text-amber-400 bg-transparent hover:bg-amber-50 dark:hover:bg-amber-900/20',\n white:\n 'border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700',\n }\n return map[c] || map.primary\n }\n\n // Dashed\n if (v === 'dashed') {\n const map = {\n primary:\n 'border border-dashed border-primary-400 dark:border-primary-600 text-primary-600 dark:text-primary-400 bg-transparent hover:bg-primary-50 dark:hover:bg-primary-900/20',\n gray: 'border border-dashed border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-400 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800',\n red: 'border border-dashed border-red-300 dark:border-red-700 text-red-600 dark:text-red-400 bg-transparent hover:bg-red-50 dark:hover:bg-red-900/20',\n green:\n 'border border-dashed border-success-300 dark:border-success-700 text-success-600 dark:text-success-400 bg-transparent hover:bg-success-50 dark:hover:bg-success-900/20',\n amber:\n 'border border-dashed border-amber-300 dark:border-amber-700 text-amber-600 dark:text-amber-400 bg-transparent hover:bg-amber-50 dark:hover:bg-amber-900/20',\n white:\n 'border border-dashed border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 bg-transparent hover:bg-gray-50 dark:hover:bg-gray-700',\n }\n return map[c] || map.primary\n }\n\n // Ghost\n if (v === 'ghost') {\n const map = {\n primary:\n 'text-primary-600 dark:text-primary-400 bg-transparent hover:bg-primary-50 dark:hover:bg-primary-900/20',\n gray: 'text-gray-700 dark:text-gray-300 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800',\n red: 'text-red-600 dark:text-red-400 bg-transparent hover:bg-red-50 dark:hover:bg-red-900/20',\n green:\n 'text-success-600 dark:text-success-400 bg-transparent hover:bg-success-50 dark:hover:bg-success-900/20',\n amber:\n 'text-amber-600 dark:text-amber-400 bg-transparent hover:bg-amber-50 dark:hover:bg-amber-900/20',\n white:\n 'text-gray-700 dark:text-gray-300 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-700',\n }\n return map[c] || map.primary\n }\n\n // Text\n if (v === 'text') {\n const map = {\n primary: 'text-primary-600 dark:text-primary-400 bg-transparent hover:underline',\n gray: 'text-gray-600 dark:text-gray-400 bg-transparent hover:underline',\n red: 'text-red-600 dark:text-red-400 bg-transparent hover:underline',\n green: 'text-success-600 dark:text-success-400 bg-transparent hover:underline',\n amber: 'text-amber-600 dark:text-amber-400 bg-transparent hover:underline',\n white: 'text-gray-700 dark:text-gray-300 bg-transparent hover:underline',\n }\n return map[c] || map.primary\n }\n\n // Link\n if (v === 'link') {\n const map = {\n primary: 'text-primary-600 dark:text-primary-400 hover:underline p-0',\n gray: 'text-gray-500 dark:text-gray-400 hover:underline p-0',\n red: 'text-red-600 dark:text-red-400 hover:underline p-0',\n green: 'text-success-600 dark:text-success-400 hover:underline p-0',\n amber: 'text-amber-600 dark:text-amber-400 hover:underline p-0',\n white: 'text-gray-700 dark:text-gray-300 hover:underline p-0',\n }\n return map[c] || map.primary\n }\n\n return ''\n})\n\n// ── Disabled / loading classes ────────────────────────────\nconst stateClasses = computed(() => {\n if (props.disabled || props.loading) {\n return 'opacity-50 cursor-not-allowed pointer-events-none'\n }\n return 'cursor-pointer'\n})\n\n// ── Merge external classes over internals (external wins via twMerge) ──\n// A getter defers reading `internalClasses` until after its declaration below.\nconst { mergedClasses, restAttrs } = useMergedClasses(() => internalClasses.value)\n\n// ── Assembled internal classes ────────────────────────────\nconst internalClasses = computed(() => {\n const base = 'inline-flex items-center transition-colors select-none'\n const justify = isInlineVariant.value ? '' : 'justify-center'\n const blockClass = props.block || isInlineVariant.value ? 'w-full' : ''\n const weight = ['ghost', 'text', 'link', 'menu-item', 'list-item'].includes(props.variant)\n ? ''\n : 'font-medium'\n return [\n base,\n justify,\n weight,\n sizeClasses.value,\n shapeClasses.value,\n colorVariantClasses.value,\n stateClasses.value,\n blockClass,\n ]\n .filter(Boolean)\n .join(' ')\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AO;EACT,CAAC;EAID,MAAM,EAAE,eAAe,cAAc,uBAAuB,gBAAgB,KAAK;EAGjF,MAAM,kBAAkB,eAAe;GACrC,MAAM,OAAO;GACb,MAAM,UAAU,gBAAgB,QAAQ,KAAK;GAC7C,MAAM,aAAa,MAAM,SAAS,gBAAgB,QAAQ,WAAW;GAIrE,OAAO;IACL;IACA;IALa;KAAC;KAAS;KAAQ;KAAQ;KAAa;IAAW,CAAC,CAAC,SAAS,MAAM,OAAO,IACrF,KACA;IAKF,YAAY;IACZ,aAAa;IACb,oBAAoB;IACpB,aAAa;IACb;GACF,CAAA,CACG,OAAO,OAAO,CAAA,CACd,KAAK,GAAG;EACb,CAAC;;GAxZC,OAAA,UAAA,GAAA,YAmBY,wBAlBL,QAAA,GAAG,GADV,WAmBY;IAjBT,MAAM,SAAA,QAAW,QAAA,aAAa,KAAA;IAC9B,UAAU,SAAA,QAAW,QAAA,YAAY,QAAA,UAAU,KAAA;IAC3C,MAAM,QAAA,QAAG,MAAW,QAAA,OAAO,KAAA;IAC3B,OAAO,MAAA,aAAA;IACP,OAAO,QAAA;IACP,cAAY,QAAA;IACZ,gBAAc,QAAA;IACd,MAAM,QAAA;IACN,UAAU,QAAA;GACH,GAAA,MAAA,SAAA,CAAS,GAAA;IAGjB,SAAA,cAEW,CAFK,QAAA,WAAW,QAAA,iBAAY,aACrC,UAAA,GAAA,YAA6E,aAAA;;KAApE,MAAM,YAAA;KAAa,OAAK,eAAA,CAAC,gBAAuB,iBAAA,KAAgB,CAAA;IAG3E,GAAA,MAAA,GAAA,CAAA,QAAA,OAAA,CAAA,KAAA,WAA8D,KAAA,QAAA,WAAA,EAAhD,UAAU,QAAA,WAAW,QAAA,iBAAY,OAAA,GAAA,KAAA,GAAA,KAAA,GAAA,CAAA,CAAA,CAAA"}
@@ -1,5 +1,5 @@
1
- import { computed, createBlock, createCommentVNode, createElementBlock, mergeProps, openBlock, renderSlot, resolveDynamicComponent, useAttrs, withCtx } from "vue";
2
- import { twMerge } from "tailwind-merge";
1
+ import { useMergedClasses } from "../composables/useMergedClasses.js";
2
+ import { computed, createBlock, createCommentVNode, createElementBlock, mergeProps, openBlock, renderSlot, resolveDynamicComponent, unref, withCtx } from "vue";
3
3
  //#region src/components/Card.vue
4
4
  var _hoisted_1 = {
5
5
  key: 0,
@@ -133,11 +133,6 @@ var _sfc_main = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
133
133
  * @slot footer — Optional footer, drawn below the body with a divider.
134
134
  */
135
135
  const props = __props;
136
- const attrs = useAttrs();
137
- const restAttrs = computed(() => {
138
- const { class: _class, ...rest } = attrs;
139
- return rest;
140
- });
141
136
  const paddingClass = computed(() => ({
142
137
  none: "",
143
138
  xs: "p-3",
@@ -155,9 +150,20 @@ var _sfc_main = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
155
150
  card: "shadow-card",
156
151
  "card-hover": "shadow-card-hover"
157
152
  })[props.shadow] ?? "shadow-card");
158
- const mergedClasses = computed(() => twMerge("bg-white dark:bg-gray-900", props.focusRing ? "relative" : "", radiusClass.value, props.bordered ? "border border-gray-200 dark:border-gray-700" : "", shadowClass.value, props.interactive ? "transition-[transform,box-shadow,border-color] duration-300 ease-out hover:-translate-y-1 hover:shadow-card-hover motion-reduce:transition-none motion-reduce:hover:translate-y-0" : "", props.highlighted ? "border-primary-400 shadow-card-hover ring-1 ring-primary-400/20 dark:border-primary-400/60 dark:ring-primary-400/25" : "", props.focusRing ? "focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-primary-500 dark:focus-within:outline-primary-400" : "", paddingClass.value, attrs.class));
153
+ const internalClasses = computed(() => [
154
+ "bg-white dark:bg-gray-900",
155
+ props.focusRing ? "relative" : "",
156
+ radiusClass.value,
157
+ props.bordered ? "border border-gray-200 dark:border-gray-700" : "",
158
+ shadowClass.value,
159
+ props.interactive ? "transition-[transform,box-shadow,border-color] duration-300 ease-out hover:-translate-y-1 hover:shadow-card-hover motion-reduce:transition-none motion-reduce:hover:translate-y-0" : "",
160
+ props.highlighted ? "border-primary-400 shadow-card-hover ring-1 ring-primary-400/20 dark:border-primary-400/60 dark:ring-primary-400/25" : "",
161
+ props.focusRing ? "focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-primary-500 dark:focus-within:outline-primary-400" : "",
162
+ paddingClass.value
163
+ ].filter(Boolean).join(" "));
164
+ const { mergedClasses, restAttrs } = useMergedClasses(internalClasses);
159
165
  return (_ctx, _cache) => {
160
- return openBlock(), createBlock(resolveDynamicComponent(__props.tag), mergeProps({ class: mergedClasses.value }, restAttrs.value), {
166
+ return openBlock(), createBlock(resolveDynamicComponent(__props.tag), mergeProps({ class: unref(mergedClasses) }, unref(restAttrs)), {
161
167
  default: withCtx(() => [
162
168
  _ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "header")])) : createCommentVNode("", true),
163
169
  renderSlot(_ctx.$slots, "default"),
@@ -1 +1 @@
1
- {"version":3,"file":"Card.js","names":["$slots"],"sources":["../../src/components/Card.vue"],"sourcesContent":["<template>\n <!-- Dynamic root element — renders as div, article, section, or a link via :is -->\n <component :is=\"tag\" :class=\"mergedClasses\" v-bind=\"restAttrs\">\n <!-- Optional header region, separated from the body by a hairline rule -->\n <div v-if=\"$slots.header\" class=\"mb-4 border-b border-gray-100 pb-4 dark:border-gray-800\">\n <slot name=\"header\" />\n </div>\n\n <slot />\n\n <!-- Optional footer region, pushed to the bottom in a flex-column card -->\n <div v-if=\"$slots.footer\" class=\"mt-auto border-t border-gray-100 pt-4 dark:border-gray-800\">\n <slot name=\"footer\" />\n </div>\n </component>\n</template>\n\n<script setup>\n/**\n * UiCard — the surface primitive: a bordered, rounded container with the\n * design system's card elevation, dark-mode surface, and optional interactive\n * and highlighted states.\n *\n * It is the shell only. Card lays out header / default / footer slots but takes\n * no view over their contents, so product cards, blog cards, pricing tiers and\n * link tiles can all share one surface while keeping their own internals.\n *\n * Renders as any element via `tag`, so a whole card can be a single link\n * (`tag=\"a\"`) or an article. External Tailwind classes are merged with\n * `tailwind-merge`, so a caller's `hover:border-primary-300` wins over the\n * neutral hover border added by `interactive` rather than doubling up.\n *\n * @example Basic card\n * <UiCard>\n * <h3 class=\"font-semibold\">Title</h3>\n * <p class=\"text-sm text-gray-600 dark:text-gray-400\">Body copy.</p>\n * </UiCard>\n *\n * @example Interactive card that is one big link (stretched-link pattern)\n * <UiCard tag=\"article\" interactive focus-ring>\n * <h3><a href=\"/x\" class=\"after:absolute after:inset-0\">Title</a></h3>\n * </UiCard>\n *\n * @example Highlighted pricing tier with a footer action\n * <UiCard highlighted padding=\"lg\" class=\"flex h-full flex-col\">\n * …\n * <template #footer><UiButton block>Choose</UiButton></template>\n * </UiCard>\n *\n * @slot default — Card body.\n * @slot header — Optional header, drawn above the body with a divider.\n * @slot footer — Optional footer, drawn below the body with a divider.\n */\nimport { computed, useAttrs } from 'vue'\nimport { twMerge } from 'tailwind-merge'\n\nconst props = defineProps({\n /**\n * HTML element (or globally registered component name) to render as.\n * @type {string}\n * @default 'div'\n * @values 'div' | 'article' | 'section' | 'a' | 'li' | any valid tag\n */\n tag: { type: String, default: 'div' },\n\n /**\n * Inner padding.\n * @type {string}\n * @default 'md'\n * @values 'none' | 'xs' | 'sm' | 'md' | 'lg'\n */\n padding: { type: String, default: 'md' },\n\n /**\n * Corner radius.\n * @type {string}\n * @default '2xl'\n * @values 'lg' | 'xl' | '2xl'\n */\n radius: { type: String, default: '2xl' },\n\n /**\n * Base drop shadow. `interactive` raises this to `card-hover` on hover.\n * @type {string}\n * @default 'card'\n * @values 'none' | 'card' | 'card-hover'\n */\n shadow: { type: String, default: 'card' },\n\n /**\n * Draw the surface border. On by default; turn off for cards that sit on a\n * tinted panel and provide their own separation.\n * @type {boolean}\n * @default true\n */\n bordered: { type: Boolean, default: true },\n\n /**\n * Hover affordance: a small lift and a stronger shadow, with the transition\n * disabled under `prefers-reduced-motion`. Border-color is included in the\n * transition but left untinted, so add a `hover:border-*` (or `group-hover:\n * border-*`) class to colour the border on hover.\n * @type {boolean}\n * @default false\n */\n interactive: { type: Boolean, default: false },\n\n /**\n * Recommended / featured state: accent border and a raised shadow, for the\n * one card in a group that should draw the eye.\n * @type {boolean}\n * @default false\n */\n highlighted: { type: Boolean, default: false },\n\n /**\n * Lift the focus ring to the card when a single descendant link is stretched\n * over the whole surface (the `after:absolute after:inset-0` pattern). The\n * card becomes the positioning context and shows the ring on focus-within.\n * @type {boolean}\n * @default false\n */\n focusRing: { type: Boolean, default: false },\n})\n\ndefineOptions({ inheritAttrs: false })\n\nconst attrs = useAttrs()\nconst restAttrs = computed(() => {\n const { class: _class, ...rest } = attrs\n return rest\n})\n\nconst paddingClass = computed(\n () => ({ none: '', xs: 'p-3', sm: 'p-4', md: 'p-5', lg: 'p-6' })[props.padding] ?? 'p-5',\n)\n\nconst radiusClass = computed(\n () =>\n ({ lg: 'rounded-lg', xl: 'rounded-xl', '2xl': 'rounded-2xl' })[props.radius] ?? 'rounded-2xl',\n)\n\nconst shadowClass = computed(\n () =>\n ({ none: '', card: 'shadow-card', 'card-hover': 'shadow-card-hover' })[props.shadow] ??\n 'shadow-card',\n)\n\nconst mergedClasses = computed(() =>\n twMerge(\n 'bg-white dark:bg-gray-900',\n props.focusRing ? 'relative' : '',\n radiusClass.value,\n props.bordered ? 'border border-gray-200 dark:border-gray-700' : '',\n shadowClass.value,\n props.interactive\n ? 'transition-[transform,box-shadow,border-color] duration-300 ease-out hover:-translate-y-1 hover:shadow-card-hover motion-reduce:transition-none motion-reduce:hover:translate-y-0'\n : '',\n props.highlighted\n ? 'border-primary-400 shadow-card-hover ring-1 ring-primary-400/20 dark:border-primary-400/60 dark:ring-primary-400/25'\n : '',\n props.focusRing\n ? 'focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-primary-500 dark:focus-within:outline-primary-400'\n : '',\n paddingClass.value,\n attrs.class,\n ),\n)\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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sources":["../../src/components/Card.vue"],"sourcesContent":["<template>\n <!-- Dynamic root element — renders as div, article, section, or a link via :is -->\n <component :is=\"tag\" :class=\"mergedClasses\" v-bind=\"restAttrs\">\n <!-- Optional header region, separated from the body by a hairline rule -->\n <div v-if=\"$slots.header\" class=\"mb-4 border-b border-gray-100 pb-4 dark:border-gray-800\">\n <slot name=\"header\" />\n </div>\n\n <slot />\n\n <!-- Optional footer region, pushed to the bottom in a flex-column card -->\n <div v-if=\"$slots.footer\" class=\"mt-auto border-t border-gray-100 pt-4 dark:border-gray-800\">\n <slot name=\"footer\" />\n </div>\n </component>\n</template>\n\n<script setup>\n/**\n * UiCard — the surface primitive: a bordered, rounded container with the\n * design system's card elevation, dark-mode surface, and optional interactive\n * and highlighted states.\n *\n * It is the shell only. Card lays out header / default / footer slots but takes\n * no view over their contents, so product cards, blog cards, pricing tiers and\n * link tiles can all share one surface while keeping their own internals.\n *\n * Renders as any element via `tag`, so a whole card can be a single link\n * (`tag=\"a\"`) or an article. External Tailwind classes are merged with\n * `tailwind-merge`, so a caller's `hover:border-primary-300` wins over the\n * neutral hover border added by `interactive` rather than doubling up.\n *\n * @example Basic card\n * <UiCard>\n * <h3 class=\"font-semibold\">Title</h3>\n * <p class=\"text-sm text-gray-600 dark:text-gray-400\">Body copy.</p>\n * </UiCard>\n *\n * @example Interactive card that is one big link (stretched-link pattern)\n * <UiCard tag=\"article\" interactive focus-ring>\n * <h3><a href=\"/x\" class=\"after:absolute after:inset-0\">Title</a></h3>\n * </UiCard>\n *\n * @example Highlighted pricing tier with a footer action\n * <UiCard highlighted padding=\"lg\" class=\"flex h-full flex-col\">\n * …\n * <template #footer><UiButton block>Choose</UiButton></template>\n * </UiCard>\n *\n * @slot default — Card body.\n * @slot header — Optional header, drawn above the body with a divider.\n * @slot footer — Optional footer, drawn below the body with a divider.\n */\nimport { computed } from 'vue'\nimport { useMergedClasses } from '../composables/useMergedClasses.js'\n\nconst props = defineProps({\n /**\n * HTML element (or globally registered component name) to render as.\n * @type {string}\n * @default 'div'\n * @values 'div' | 'article' | 'section' | 'a' | 'li' | any valid tag\n */\n tag: { type: String, default: 'div' },\n\n /**\n * Inner padding.\n * @type {string}\n * @default 'md'\n * @values 'none' | 'xs' | 'sm' | 'md' | 'lg'\n */\n padding: { type: String, default: 'md' },\n\n /**\n * Corner radius.\n * @type {string}\n * @default '2xl'\n * @values 'lg' | 'xl' | '2xl'\n */\n radius: { type: String, default: '2xl' },\n\n /**\n * Base drop shadow. `interactive` raises this to `card-hover` on hover.\n * @type {string}\n * @default 'card'\n * @values 'none' | 'card' | 'card-hover'\n */\n shadow: { type: String, default: 'card' },\n\n /**\n * Draw the surface border. On by default; turn off for cards that sit on a\n * tinted panel and provide their own separation.\n * @type {boolean}\n * @default true\n */\n bordered: { type: Boolean, default: true },\n\n /**\n * Hover affordance: a small lift and a stronger shadow, with the transition\n * disabled under `prefers-reduced-motion`. Border-color is included in the\n * transition but left untinted, so add a `hover:border-*` (or `group-hover:\n * border-*`) class to colour the border on hover.\n * @type {boolean}\n * @default false\n */\n interactive: { type: Boolean, default: false },\n\n /**\n * Recommended / featured state: accent border and a raised shadow, for the\n * one card in a group that should draw the eye.\n * @type {boolean}\n * @default false\n */\n highlighted: { type: Boolean, default: false },\n\n /**\n * Lift the focus ring to the card when a single descendant link is stretched\n * over the whole surface (the `after:absolute after:inset-0` pattern). The\n * card becomes the positioning context and shows the ring on focus-within.\n * @type {boolean}\n * @default false\n */\n focusRing: { type: Boolean, default: false },\n})\n\ndefineOptions({ inheritAttrs: false })\n\nconst paddingClass = computed(\n () => ({ none: '', xs: 'p-3', sm: 'p-4', md: 'p-5', lg: 'p-6' })[props.padding] ?? 'p-5',\n)\n\nconst radiusClass = computed(\n () =>\n ({ lg: 'rounded-lg', xl: 'rounded-xl', '2xl': 'rounded-2xl' })[props.radius] ?? 'rounded-2xl',\n)\n\nconst shadowClass = computed(\n () =>\n ({ none: '', card: 'shadow-card', 'card-hover': 'shadow-card-hover' })[props.shadow] ??\n 'shadow-card',\n)\n\n// External classes merge last so a caller's `hover:border-primary-300` wins\n// over the neutral hover border rather than doubling up.\nconst internalClasses = computed(() =>\n [\n 'bg-white dark:bg-gray-900',\n props.focusRing ? 'relative' : '',\n radiusClass.value,\n props.bordered ? 'border border-gray-200 dark:border-gray-700' : '',\n shadowClass.value,\n props.interactive\n ? 'transition-[transform,box-shadow,border-color] duration-300 ease-out hover:-translate-y-1 hover:shadow-card-hover motion-reduce:transition-none motion-reduce:hover:translate-y-0'\n : '',\n props.highlighted\n ? 'border-primary-400 shadow-card-hover ring-1 ring-primary-400/20 dark:border-primary-400/60 dark:ring-primary-400/25'\n : '',\n props.focusRing\n ? 'focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-primary-500 dark:focus-within:outline-primary-400'\n : '',\n paddingClass.value,\n ]\n .filter(Boolean)\n .join(' '),\n)\n\nconst { mergedClasses, restAttrs } = useMergedClasses(internalClasses)\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDA,MAAM,QAAQ;EAuEd,MAAM,eAAe,gBACZ;GAAE,MAAM;GAAI,IAAI;GAAO,IAAI;GAAO,IAAI;GAAO,IAAI;EAAM,EAAA,CAAG,MAAM,YAAY,KACrF;EAEA,MAAM,cAAc,gBAEf;GAAE,IAAI;GAAc,IAAI;GAAc,OAAO;EAAc,EAAA,CAAG,MAAM,WAAW,aACpF;EAEA,MAAM,cAAc,gBAEf;GAAE,MAAM;GAAI,MAAM;GAAe,cAAc;EAAoB,EAAA,CAAG,MAAM,WAC7E,aACJ;EAIA,MAAM,kBAAkB,eACtB;GACE;GACA,MAAM,YAAY,aAAa;GAC/B,YAAY;GACZ,MAAM,WAAW,gDAAgD;GACjE,YAAY;GACZ,MAAM,cACF,sLACA;GACJ,MAAM,cACF,wHACA;GACJ,MAAM,YACF,gIACA;GACJ,aAAa;EACf,CAAA,CACG,OAAO,OAAO,CAAA,CACd,KAAK,GAAG,CACb;EAEA,MAAM,EAAE,eAAe,cAAc,iBAAiB,eAAe;;GApKnE,OAAA,UAAA,GAAA,YAYY,wBAZI,QAAA,GAAG,GAAnB,WAYY,EAZU,OAAO,MAAA,aAAA,EAAa,GAAU,MAAA,SAAA,CAAS,GAAA;IAE3D,SAAA,cAEM;KAFKA,KAAAA,OAAO,UAAlB,UAAA,GAAA,mBAEM,OAFN,YAEM,CADJ,WAAsB,KAAA,QAAA,QAAA,CAAA,CAAA,KAAA,mBAAA,IAAA,IAAA;KAGxB,WAAQ,KAAA,QAAA,SAAA;KAGGA,KAAAA,OAAO,UAAlB,UAAA,GAAA,mBAEM,OAFN,YAEM,CADJ,WAAsB,KAAA,QAAA,QAAA,CAAA,CAAA,KAAA,mBAAA,IAAA,IAAA"}
@@ -1,6 +1,13 @@
1
- import { computed, createElementBlock, normalizeClass, openBlock } from "vue";
1
+ import { checkableSizeClass } from "../internal/controlSizes.js";
2
+ import { useFormField } from "../internal/formField.js";
3
+ import { computed, createElementBlock, normalizeClass, openBlock, unref } from "vue";
2
4
  //#region src/components/Checkbox.vue
3
- var _hoisted_1 = ["checked", "disabled"];
5
+ var _hoisted_1 = [
6
+ "id",
7
+ "aria-describedby",
8
+ "checked",
9
+ "disabled"
10
+ ];
4
11
  var _sfc_main = {
5
12
  __name: "Checkbox",
6
13
  props: {
@@ -65,20 +72,17 @@ var _sfc_main = {
65
72
  */
66
73
  const props = __props;
67
74
  const emit = __emit;
68
- const sizeClass = computed(() => {
69
- switch (props.size) {
70
- case "sm": return "w-3.5 h-3.5";
71
- case "lg": return "w-5 h-5";
72
- default: return "w-4 h-4";
73
- }
74
- });
75
+ const field = useFormField();
76
+ const sizeClass = computed(() => checkableSizeClass(props.size));
75
77
  function onChange(e) {
76
78
  emit("update:modelValue", e.target.checked);
77
79
  emit("change", e);
78
80
  }
79
81
  return (_ctx, _cache) => {
80
82
  return openBlock(), createElementBlock("input", {
83
+ id: unref(field)?.controlId.value,
81
84
  type: "checkbox",
85
+ "aria-describedby": unref(field)?.describedBy.value,
82
86
  checked: __props.modelValue ?? __props.checked,
83
87
  disabled: __props.disabled,
84
88
  class: normalizeClass(["rounded border-gray-300 dark:border-gray-600 text-primary-600 focus:ring-primary-500", sizeClass.value]),
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","names":[],"sources":["../../src/components/Checkbox.vue"],"sourcesContent":["<template>\n <input\n type=\"checkbox\"\n :checked=\"modelValue ?? checked\"\n :disabled=\"disabled\"\n class=\"rounded border-gray-300 dark:border-gray-600 text-primary-600 focus:ring-primary-500\"\n :class=\"sizeClass\"\n @change=\"onChange\"\n />\n</template>\n\n<script setup>\n/**\n * UiCheckbox — Simple styled checkbox input with configurable size.\n *\n * Wraps a native `<input type=\"checkbox\">` with consistent Tailwind styling,\n * primary color accent, and focus ring. Supports both v-model (`modelValue`)\n * and uncontrolled (`checked`) usage patterns.\n *\n * @example Basic v-model checkbox\n * <UiCheckbox v-model=\"agreed\" />\n *\n * @example Small disabled checkbox\n * <UiCheckbox v-model=\"locked\" size=\"sm\" disabled />\n *\n * @example Uncontrolled with checked prop\n * <UiCheckbox :checked=\"true\" @change=\"handleChange\" />\n *\n * @emits {boolean} update:modelValue — Emitted when the checked state changes (v-model)\n * @emits {Event} change — Emitted with the native change event\n */\nimport { computed } from 'vue'\nconst props = defineProps({\n /**\n * Controlled checked state (v-model). Takes priority over `checked` when defined.\n * @type {boolean}\n * @default undefined\n */\n modelValue: { type: Boolean, default: undefined },\n\n /**\n * Uncontrolled initial checked state (used when modelValue is undefined).\n * @type {boolean}\n * @default false\n */\n checked: { type: Boolean, default: false },\n\n /**\n * Disabled state — dims the checkbox and prevents interaction.\n * @type {boolean}\n * @default false\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Checkbox size controlling width and height.\n * @type {string}\n * @default 'md'\n * @values 'sm' (3.5×3.5) | 'md' (4×4) | 'lg' (5×5)\n */\n size: { type: String, default: 'md' },\n})\n\nconst emit = defineEmits(['update:modelValue', 'change'])\n\nconst sizeClass = computed(() => {\n switch (props.size) {\n case 'sm':\n return 'w-3.5 h-3.5'\n case 'lg':\n return 'w-5 h-5'\n default:\n return 'w-4 h-4'\n }\n})\n\nfunction onChange(e) {\n emit('update:modelValue', e.target.checked)\n emit('change', e)\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCA,MAAM,QAAQ;EA+Bd,MAAM,OAAO;EAEb,MAAM,YAAY,eAAe;GAC/B,QAAQ,MAAM,MAAd;IACE,KAAK,MACH,OAAO;IACT,KAAK,MACH,OAAO;IACT,SACE,OAAO;GACX;EACF,CAAC;EAED,SAAS,SAAS,GAAG;GACnB,KAAK,qBAAqB,EAAE,OAAO,OAAO;GAC1C,KAAK,UAAU,CAAC;EAClB;;GA9EE,OAAA,UAAA,GAAA,mBAOE,SAAA;IANA,MAAK;IACJ,SAAS,QAAA,cAAc,QAAA;IACvB,UAAU,QAAA;IACX,OAAK,eAAA,CAAC,wFACE,UAAA,KAAS,CAAA;IACR"}
1
+ {"version":3,"file":"Checkbox.js","names":[],"sources":["../../src/components/Checkbox.vue"],"sourcesContent":["<template>\n <input\n :id=\"field?.controlId.value\"\n type=\"checkbox\"\n :aria-describedby=\"field?.describedBy.value\"\n :checked=\"modelValue ?? checked\"\n :disabled=\"disabled\"\n class=\"rounded border-gray-300 dark:border-gray-600 text-primary-600 focus:ring-primary-500\"\n :class=\"sizeClass\"\n @change=\"onChange\"\n />\n</template>\n\n<script setup>\n/**\n * UiCheckbox — Simple styled checkbox input with configurable size.\n *\n * Wraps a native `<input type=\"checkbox\">` with consistent Tailwind styling,\n * primary color accent, and focus ring. Supports both v-model (`modelValue`)\n * and uncontrolled (`checked`) usage patterns.\n *\n * @example Basic v-model checkbox\n * <UiCheckbox v-model=\"agreed\" />\n *\n * @example Small disabled checkbox\n * <UiCheckbox v-model=\"locked\" size=\"sm\" disabled />\n *\n * @example Uncontrolled with checked prop\n * <UiCheckbox :checked=\"true\" @change=\"handleChange\" />\n *\n * @emits {boolean} update:modelValue — Emitted when the checked state changes (v-model)\n * @emits {Event} change — Emitted with the native change event\n */\nimport { computed } from 'vue'\nimport { checkableSizeClass } from '../internal/controlSizes.js'\nimport { useFormField } from '../internal/formField.js'\nconst props = defineProps({\n /**\n * Controlled checked state (v-model). Takes priority over `checked` when defined.\n * @type {boolean}\n * @default undefined\n */\n modelValue: { type: Boolean, default: undefined },\n\n /**\n * Uncontrolled initial checked state (used when modelValue is undefined).\n * @type {boolean}\n * @default false\n */\n checked: { type: Boolean, default: false },\n\n /**\n * Disabled state — dims the checkbox and prevents interaction.\n * @type {boolean}\n * @default false\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Checkbox size controlling width and height.\n * @type {string}\n * @default 'md'\n * @values 'sm' (3.5×3.5) | 'md' (4×4) | 'lg' (5×5)\n */\n size: { type: String, default: 'md' },\n})\n\nconst emit = defineEmits(['update:modelValue', 'change'])\n\nconst field = useFormField()\n\nconst sizeClass = computed(() => checkableSizeClass(props.size))\n\nfunction onChange(e) {\n emit('update:modelValue', e.target.checked)\n emit('change', e)\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCA,MAAM,QAAQ;EA+Bd,MAAM,OAAO;EAEb,MAAM,QAAQ,aAAa;EAE3B,MAAM,YAAY,eAAe,mBAAmB,MAAM,IAAI,CAAC;EAE/D,SAAS,SAAS,GAAG;GACnB,KAAK,qBAAqB,EAAE,OAAO,OAAO;GAC1C,KAAK,UAAU,CAAC;EAClB;;GA3EE,OAAA,UAAA,GAAA,mBASE,SAAA;IARC,IAAI,MAAA,KAAA,CAAK,EAAE,UAAU;IACtB,MAAK;IACJ,oBAAkB,MAAA,KAAA,CAAK,EAAE,YAAY;IACrC,SAAS,QAAA,cAAc,QAAA;IACvB,UAAU,QAAA;IACX,OAAK,eAAA,CAAC,wFACE,UAAA,KAAS,CAAA;IACR"}
@@ -0,0 +1,195 @@
1
+ import _sfc_main$1 from "../icons/Icon.js";
2
+ import { useMergedClasses } from "../composables/useMergedClasses.js";
3
+ import { computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, mergeProps, normalizeClass, openBlock, ref, toDisplayString, unref, watch } from "vue";
4
+ //#region src/components/CopyField.vue
5
+ var _hoisted_1 = ["aria-label"];
6
+ var _hoisted_2 = ["aria-label", "aria-pressed"];
7
+ var _hoisted_3 = ["aria-label"];
8
+ var _hoisted_4 = {
9
+ key: 0,
10
+ class: "hidden sm:inline"
11
+ };
12
+ var buttonClass = "inline-flex shrink-0 items-center gap-1.5 border-l border-gray-200 px-3 text-xs font-medium text-gray-600 transition-colors hover:bg-white hover:text-gray-900 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-primary-500 dark:border-gray-700 dark:text-gray-300 dark:hover:bg-gray-800 dark:hover:text-gray-100";
13
+ var _sfc_main = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
14
+ __name: "CopyField",
15
+ props: {
16
+ /**
17
+ * The text to show and copy.
18
+ * @type {string}
19
+ */
20
+ value: {
21
+ type: String,
22
+ required: true
23
+ },
24
+ /**
25
+ * Mask the value until revealed.
26
+ * @type {boolean}
27
+ * @default false
28
+ */
29
+ secret: {
30
+ type: Boolean,
31
+ default: false
32
+ },
33
+ /**
34
+ * Revealed state of a secret, for `v-model:revealed`.
35
+ * @type {boolean}
36
+ * @default false
37
+ */
38
+ revealed: {
39
+ type: Boolean,
40
+ default: false
41
+ },
42
+ /**
43
+ * Monospace text.
44
+ * @type {boolean}
45
+ * @default true
46
+ */
47
+ mono: {
48
+ type: Boolean,
49
+ default: true
50
+ },
51
+ /**
52
+ * Wrap long values onto several lines instead of truncating.
53
+ * @type {boolean}
54
+ * @default false
55
+ */
56
+ wrap: {
57
+ type: Boolean,
58
+ default: false
59
+ },
60
+ /**
61
+ * Control size.
62
+ * @type {string}
63
+ * @default 'md'
64
+ * @values 'sm' | 'md'
65
+ */
66
+ size: {
67
+ type: String,
68
+ default: "md"
69
+ },
70
+ /**
71
+ * Show the copy label beside the icon (from `sm` up).
72
+ * @type {boolean}
73
+ * @default false
74
+ */
75
+ showCopyText: {
76
+ type: Boolean,
77
+ default: false
78
+ },
79
+ /** @type {string} @default 'Copy' */
80
+ copyLabel: {
81
+ type: String,
82
+ default: "Copy"
83
+ },
84
+ /** @type {string} @default 'Copied' */
85
+ copiedLabel: {
86
+ type: String,
87
+ default: "Copied"
88
+ },
89
+ /** @type {string} @default 'Reveal' */
90
+ revealLabel: {
91
+ type: String,
92
+ default: "Reveal"
93
+ },
94
+ /** @type {string} @default 'Hide' */
95
+ hideLabel: {
96
+ type: String,
97
+ default: "Hide"
98
+ },
99
+ /** Accessible text read in place of a masked value. @type {string} @default 'Hidden value' */
100
+ hiddenLabel: {
101
+ type: String,
102
+ default: "Hidden value"
103
+ }
104
+ },
105
+ emits: ["copy", "update:revealed"],
106
+ setup(__props, { emit: __emit }) {
107
+ /**
108
+ * UiCopyField — a read-only value with a copy button, and optional masking for
109
+ * secrets.
110
+ *
111
+ * For connect URLs, ids, API keys and generated secrets. With `secret`, the
112
+ * value is masked until revealed and the real text is not in the DOM while it
113
+ * is masked, so a screen share or a screenshot does not leak it. Copying works
114
+ * either way.
115
+ *
116
+ * Copy uses the async Clipboard API and fails silently when unavailable (an
117
+ * insecure context or denied permission). Every label is a prop, so nothing
118
+ * is baked into one language.
119
+ *
120
+ * @example
121
+ * <UiFormField label="Connect URL">
122
+ * <UiCopyField value="wss://crdt.numori.app/notes" />
123
+ * </UiFormField>
124
+ *
125
+ * @example A secret shown once
126
+ * <UiCopyField :value="signingKey" secret @copy="markCopied" />
127
+ *
128
+ * @emits {string} copy — The value was copied.
129
+ * @emits {boolean} update:revealed — The secret was revealed or hidden.
130
+ */
131
+ const props = __props;
132
+ const emit = __emit;
133
+ const isRevealed = ref(props.revealed);
134
+ watch(() => props.revealed, (value) => {
135
+ isRevealed.value = value;
136
+ });
137
+ const masked = computed(() => props.secret && !isRevealed.value);
138
+ const mask = computed(() => "•".repeat(Math.min(Math.max(props.value.length, 8), 24)));
139
+ function toggleReveal() {
140
+ isRevealed.value = !isRevealed.value;
141
+ emit("update:revealed", isRevealed.value);
142
+ }
143
+ const copied = ref(false);
144
+ let timer = null;
145
+ async function copy() {
146
+ try {
147
+ await navigator.clipboard.writeText(props.value);
148
+ copied.value = true;
149
+ emit("copy", props.value);
150
+ clearTimeout(timer);
151
+ timer = setTimeout(() => {
152
+ copied.value = false;
153
+ }, 1600);
154
+ } catch {}
155
+ }
156
+ const { mergedClasses, restAttrs } = useMergedClasses("flex w-full min-w-0 items-stretch overflow-hidden rounded-lg border border-gray-200 bg-gray-50 dark:border-gray-700 dark:bg-gray-800/60");
157
+ return (_ctx, _cache) => {
158
+ return openBlock(), createElementBlock("div", mergeProps({ class: unref(mergedClasses) }, unref(restAttrs)), [
159
+ createElementVNode("span", {
160
+ class: normalizeClass(["min-w-0 flex-1 px-3 text-gray-800 select-all dark:text-gray-200", [
161
+ __props.size === "sm" ? "py-1.5 text-xs" : "py-2 text-sm",
162
+ __props.mono ? "font-mono" : "",
163
+ __props.wrap ? "break-all whitespace-pre-wrap" : "truncate",
164
+ masked.value ? "tracking-widest text-gray-500 select-none dark:text-gray-400" : ""
165
+ ]]),
166
+ "aria-label": masked.value ? __props.hiddenLabel : void 0
167
+ }, toDisplayString(masked.value ? mask.value : __props.value), 11, _hoisted_1),
168
+ __props.secret ? (openBlock(), createElementBlock("button", {
169
+ key: 0,
170
+ type: "button",
171
+ class: normalizeClass(buttonClass),
172
+ "aria-label": masked.value ? __props.revealLabel : __props.hideLabel,
173
+ "aria-pressed": masked.value ? "false" : "true",
174
+ onClick: toggleReveal
175
+ }, [createVNode(_sfc_main$1, {
176
+ name: masked.value ? "mdi:eye-outline" : "mdi:eye-off-outline",
177
+ class: "size-4"
178
+ }, null, 8, ["name"])], 8, _hoisted_2)) : createCommentVNode("", true),
179
+ createElementVNode("button", {
180
+ type: "button",
181
+ class: normalizeClass(buttonClass),
182
+ "aria-label": copied.value ? __props.copiedLabel : __props.copyLabel,
183
+ onClick: copy
184
+ }, [createVNode(_sfc_main$1, {
185
+ name: copied.value ? "mdi:check" : "mdi:content-copy",
186
+ class: normalizeClass(["size-4", copied.value ? "text-success-600 dark:text-success-400" : ""])
187
+ }, null, 8, ["name", "class"]), __props.showCopyText ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(copied.value ? __props.copiedLabel : __props.copyLabel), 1)) : createCommentVNode("", true)], 8, _hoisted_3)
188
+ ], 16);
189
+ };
190
+ }
191
+ });
192
+ //#endregion
193
+ export { _sfc_main as default };
194
+
195
+ //# sourceMappingURL=CopyField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopyField.js","names":[],"sources":["../../src/components/CopyField.vue"],"sourcesContent":["<template>\n <div :class=\"mergedClasses\" v-bind=\"restAttrs\">\n <span\n class=\"min-w-0 flex-1 px-3 text-gray-800 select-all dark:text-gray-200\"\n :class=\"[\n size === 'sm' ? 'py-1.5 text-xs' : 'py-2 text-sm',\n mono ? 'font-mono' : '',\n wrap ? 'break-all whitespace-pre-wrap' : 'truncate',\n masked ? 'tracking-widest text-gray-500 select-none dark:text-gray-400' : '',\n ]\"\n :aria-label=\"masked ? hiddenLabel : undefined\"\n >{{ masked ? mask : value }}</span\n >\n\n <button\n v-if=\"secret\"\n type=\"button\"\n :class=\"buttonClass\"\n :aria-label=\"masked ? revealLabel : hideLabel\"\n :aria-pressed=\"masked ? 'false' : 'true'\"\n @click=\"toggleReveal\"\n >\n <UiIcon :name=\"masked ? 'mdi:eye-outline' : 'mdi:eye-off-outline'\" class=\"size-4\" />\n </button>\n\n <button\n type=\"button\"\n :class=\"buttonClass\"\n :aria-label=\"copied ? copiedLabel : copyLabel\"\n @click=\"copy\"\n >\n <UiIcon\n :name=\"copied ? 'mdi:check' : 'mdi:content-copy'\"\n class=\"size-4\"\n :class=\"copied ? 'text-success-600 dark:text-success-400' : ''\"\n />\n <span v-if=\"showCopyText\" class=\"hidden sm:inline\">{{\n copied ? copiedLabel : copyLabel\n }}</span>\n </button>\n </div>\n</template>\n\n<script setup>\n/**\n * UiCopyField — a read-only value with a copy button, and optional masking for\n * secrets.\n *\n * For connect URLs, ids, API keys and generated secrets. With `secret`, the\n * value is masked until revealed and the real text is not in the DOM while it\n * is masked, so a screen share or a screenshot does not leak it. Copying works\n * either way.\n *\n * Copy uses the async Clipboard API and fails silently when unavailable (an\n * insecure context or denied permission). Every label is a prop, so nothing\n * is baked into one language.\n *\n * @example\n * <UiFormField label=\"Connect URL\">\n * <UiCopyField value=\"wss://crdt.numori.app/notes\" />\n * </UiFormField>\n *\n * @example A secret shown once\n * <UiCopyField :value=\"signingKey\" secret @copy=\"markCopied\" />\n *\n * @emits {string} copy — The value was copied.\n * @emits {boolean} update:revealed — The secret was revealed or hidden.\n */\nimport { computed, ref, watch } from 'vue'\nimport UiIcon from '../icons/Icon.vue'\nimport { useMergedClasses } from '../composables/useMergedClasses.js'\n\nconst props = defineProps({\n /**\n * The text to show and copy.\n * @type {string}\n */\n value: { type: String, required: true },\n\n /**\n * Mask the value until revealed.\n * @type {boolean}\n * @default false\n */\n secret: { type: Boolean, default: false },\n\n /**\n * Revealed state of a secret, for `v-model:revealed`.\n * @type {boolean}\n * @default false\n */\n revealed: { type: Boolean, default: false },\n\n /**\n * Monospace text.\n * @type {boolean}\n * @default true\n */\n mono: { type: Boolean, default: true },\n\n /**\n * Wrap long values onto several lines instead of truncating.\n * @type {boolean}\n * @default false\n */\n wrap: { type: Boolean, default: false },\n\n /**\n * Control size.\n * @type {string}\n * @default 'md'\n * @values 'sm' | 'md'\n */\n size: { type: String, default: 'md' },\n\n /**\n * Show the copy label beside the icon (from `sm` up).\n * @type {boolean}\n * @default false\n */\n showCopyText: { type: Boolean, default: false },\n\n /** @type {string} @default 'Copy' */\n copyLabel: { type: String, default: 'Copy' },\n /** @type {string} @default 'Copied' */\n copiedLabel: { type: String, default: 'Copied' },\n /** @type {string} @default 'Reveal' */\n revealLabel: { type: String, default: 'Reveal' },\n /** @type {string} @default 'Hide' */\n hideLabel: { type: String, default: 'Hide' },\n /** Accessible text read in place of a masked value. @type {string} @default 'Hidden value' */\n hiddenLabel: { type: String, default: 'Hidden value' },\n})\n\nconst emit = defineEmits(['copy', 'update:revealed'])\n\ndefineOptions({ inheritAttrs: false })\n\nconst isRevealed = ref(props.revealed)\nwatch(\n () => props.revealed,\n (value) => {\n isRevealed.value = value\n },\n)\n\nconst masked = computed(() => props.secret && !isRevealed.value)\nconst mask = computed(() => '•'.repeat(Math.min(Math.max(props.value.length, 8), 24)))\n\nfunction toggleReveal() {\n isRevealed.value = !isRevealed.value\n emit('update:revealed', isRevealed.value)\n}\n\nconst copied = ref(false)\nlet timer = null\n\nasync function copy() {\n try {\n await navigator.clipboard.writeText(props.value)\n copied.value = true\n emit('copy', props.value)\n clearTimeout(timer)\n timer = setTimeout(() => {\n copied.value = false\n }, 1600)\n } catch {\n // Clipboard unavailable; the value is still selectable by hand.\n }\n}\n\nconst buttonClass =\n 'inline-flex shrink-0 items-center gap-1.5 border-l border-gray-200 px-3 text-xs font-medium text-gray-600 transition-colors hover:bg-white hover:text-gray-900 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-primary-500 dark:border-gray-700 dark:text-gray-300 dark:hover:bg-gray-800 dark:hover:text-gray-100'\n\nconst { mergedClasses, restAttrs } = useMergedClasses(\n 'flex w-full min-w-0 items-stretch overflow-hidden rounded-lg border border-gray-200 bg-gray-50 dark:border-gray-700 dark:bg-gray-800/60',\n)\n</script>\n"],"mappings":";;;;;;;;;;;AA2KA,IAAM,cACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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