@treeui/vue 0.18.0 → 0.19.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 (43) hide show
  1. package/dist/components/TAppShell.cjs.map +1 -1
  2. package/dist/components/TAppShell.js.map +1 -1
  3. package/dist/components/TAppShell.vue.d.ts +24 -2
  4. package/dist/components/TAppShell.vue.d.ts.map +1 -1
  5. package/dist/components/TAppShell.vue_vue_type_script_setup_true_lang.cjs +1 -1
  6. package/dist/components/TAppShell.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  7. package/dist/components/TAppShell.vue_vue_type_script_setup_true_lang.js +96 -121
  8. package/dist/components/TAppShell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  9. package/dist/components/TButton.cjs.map +1 -1
  10. package/dist/components/TButton.js.map +1 -1
  11. package/dist/components/TButton.vue.d.ts +21 -0
  12. package/dist/components/TButton.vue.d.ts.map +1 -1
  13. package/dist/components/TButton.vue_vue_type_script_setup_true_lang.cjs +1 -1
  14. package/dist/components/TButton.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  15. package/dist/components/TButton.vue_vue_type_script_setup_true_lang.js +47 -31
  16. package/dist/components/TButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  17. package/dist/components/TLanguageSelect.vue.d.ts +1 -1
  18. package/dist/components/TLanguageSelect.vue.d.ts.map +1 -1
  19. package/dist/components/TTable.cjs.map +1 -1
  20. package/dist/components/TTable.js.map +1 -1
  21. package/dist/components/TTable.vue.d.ts +8 -2
  22. package/dist/components/TTable.vue.d.ts.map +1 -1
  23. package/dist/components/TTable.vue_vue_type_script_setup_true_lang.cjs +1 -1
  24. package/dist/components/TTable.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  25. package/dist/components/TTable.vue_vue_type_script_setup_true_lang.js +71 -80
  26. package/dist/components/TTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  27. package/dist/components/TTag.cjs.map +1 -1
  28. package/dist/components/TTag.js.map +1 -1
  29. package/dist/components/TTag.vue.d.ts.map +1 -1
  30. package/dist/components/TTag.vue_vue_type_script_setup_true_lang.cjs +1 -1
  31. package/dist/components/TTag.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  32. package/dist/components/TTag.vue_vue_type_script_setup_true_lang.js +22 -29
  33. package/dist/components/TTag.vue_vue_type_script_setup_true_lang.js.map +1 -1
  34. package/dist/components/TText.cjs.map +1 -1
  35. package/dist/components/TText.js.map +1 -1
  36. package/dist/components/TText.vue.d.ts +7 -0
  37. package/dist/components/TText.vue.d.ts.map +1 -1
  38. package/dist/components/TText.vue_vue_type_script_setup_true_lang.cjs +1 -1
  39. package/dist/components/TText.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  40. package/dist/components/TText.vue_vue_type_script_setup_true_lang.js +8 -1
  41. package/dist/components/TText.vue_vue_type_script_setup_true_lang.js.map +1 -1
  42. package/dist/style.css +1 -1
  43. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"TTable.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/components/TTable.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref } from 'vue';\nimport type { TSize } from '../types/contracts';\n\nexport type TTableColumn = {\n key: string;\n label: string;\n sortable?: boolean;\n align?: 'left' | 'center' | 'right';\n width?: string;\n};\n\nexport type TTableSortDirection = 'asc' | 'desc' | 'none';\n\nexport type TTableSortState = {\n key: string;\n direction: TTableSortDirection;\n};\n\nconst props = withDefaults(\n defineProps<{\n columns: TTableColumn[];\n rows: Record<string, unknown>[];\n size?: TSize;\n sortBy?: TTableSortState;\n }>(),\n {\n size: 'md',\n sortBy: undefined,\n },\n);\n\nconst emit = defineEmits<{\n (e: 'sort', state: TTableSortState): void;\n}>();\n\ndefineSlots<{\n [key: `cell-${string}`]: (props: { row: Record<string, unknown>; value: unknown }) => void;\n [key: `header-${string}`]: (props: { column: TTableColumn }) => void;\n empty: () => void;\n}>();\n\nconst internalSort = ref<TTableSortState | undefined>(undefined);\n\nconst currentSort = computed(() => props.sortBy ?? internalSort.value);\n\nconst classes = computed(() => [\n 't-table',\n `t-table--${props.size}`,\n]);\n\nconst sortedRows = computed(() => {\n const sort = currentSort.value;\n if (!sort || sort.direction === 'none') return props.rows;\n\n return [...props.rows].sort((a, b) => {\n const aVal = a[sort.key];\n const bVal = b[sort.key];\n\n if (aVal == null && bVal == null) return 0;\n if (aVal == null) return 1;\n if (bVal == null) return -1;\n\n const cmp =\n typeof aVal === 'number' && typeof bVal === 'number'\n ? aVal - bVal\n : String(aVal).localeCompare(String(bVal));\n\n return sort.direction === 'desc' ? -cmp : cmp;\n });\n});\n\nfunction handleSort(column: TTableColumn) {\n if (!column.sortable) return;\n\n const cur = currentSort.value;\n let direction: TTableSortDirection = 'asc';\n\n if (cur?.key === column.key) {\n if (cur.direction === 'asc') direction = 'desc';\n else if (cur.direction === 'desc') direction = 'none';\n else direction = 'asc';\n }\n\n const state: TTableSortState = { key: column.key, direction };\n internalSort.value = state;\n emit('sort', state);\n}\n\nfunction sortAriaSort(column: TTableColumn): 'none' | 'ascending' | 'descending' | undefined {\n if (!column.sortable) return undefined;\n const cur = currentSort.value;\n if (cur?.key !== column.key || cur.direction === 'none') return 'none';\n return cur.direction === 'asc' ? 'ascending' : 'descending';\n}\n\nfunction handleHeaderKeydown(event: KeyboardEvent, column: TTableColumn) {\n if (column.sortable && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault();\n handleSort(column);\n }\n}\n</script>\n\n<template>\n <div class=\"t-table-wrapper\">\n <table\n :class=\"classes\"\n role=\"grid\"\n >\n <thead class=\"t-table__head\">\n <tr class=\"t-table__row\">\n <th\n v-for=\"column in columns\"\n :key=\"column.key\"\n class=\"t-table__header\"\n :class=\"[\n column.sortable ? 't-table__header--sortable' : '',\n column.align ? `t-table__header--${column.align}` : '',\n ]\"\n :style=\"column.width ? { width: column.width } : undefined\"\n :aria-sort=\"sortAriaSort(column)\"\n :tabindex=\"column.sortable ? 0 : undefined\"\n scope=\"col\"\n @click=\"handleSort(column)\"\n @keydown=\"handleHeaderKeydown($event, column)\"\n >\n <slot\n :name=\"`header-${column.key}`\"\n :column=\"column\"\n >\n <span class=\"t-table__header-content\">\n {{ column.label }}\n <span\n v-if=\"column.sortable\"\n class=\"t-table__sort-icon\"\n aria-hidden=\"true\"\n >\n <svg\n v-if=\"currentSort?.key === column.key && currentSort.direction === 'asc'\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"m18 15-6-6-6 6\" />\n </svg>\n <svg\n v-else-if=\"currentSort?.key === column.key && currentSort.direction === 'desc'\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n <svg\n v-else\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n style=\"opacity: 0.4\"\n >\n <path d=\"m7 15 5 5 5-5\" />\n <path d=\"m7 9 5-5 5 5\" />\n </svg>\n </span>\n </span>\n </slot>\n </th>\n </tr>\n </thead>\n <tbody class=\"t-table__body\">\n <tr\n v-if=\"sortedRows.length === 0\"\n class=\"t-table__row t-table__row--empty\"\n >\n <td\n :colspan=\"columns.length\"\n class=\"t-table__cell t-table__cell--empty\"\n >\n <slot name=\"empty\">\n No data available.\n </slot>\n </td>\n </tr>\n <tr\n v-for=\"(row, index) in sortedRows\"\n :key=\"index\"\n class=\"t-table__row\"\n >\n <td\n v-for=\"column in columns\"\n :key=\"column.key\"\n class=\"t-table__cell\"\n :class=\"column.align ? `t-table__cell--${column.align}` : ''\"\n >\n <slot\n :name=\"`cell-${column.key}`\"\n :row=\"row\"\n :value=\"row[column.key]\"\n >\n {{ row[column.key] ?? '' }}\n </slot>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBA,IAAM,IAAQ,GAaR,IAAO,GAUP,IAAe,EAAiC,KAAA,CAAS,GAEzD,IAAc,QAAe,EAAM,UAAU,EAAa,KAAK,GAE/D,IAAU,QAAe,CAC7B,WACA,YAAY,EAAM,MACpB,CAAC,GAEK,IAAa,QAAe;GAChC,IAAM,IAAO,EAAY;GAGzB,OAFI,CAAC,KAAQ,EAAK,cAAc,SAAe,EAAM,OAE9C,CAAC,GAAG,EAAM,IAAI,CAAC,CAAC,MAAM,GAAG,MAAM;IACpC,IAAM,IAAO,EAAE,EAAK,MACd,IAAO,EAAE,EAAK;IAEpB,IAAI,KAAQ,QAAQ,KAAQ,MAAM,OAAO;IACzC,IAAI,KAAQ,MAAM,OAAO;IACzB,IAAI,KAAQ,MAAM,OAAO;IAEzB,IAAM,IACJ,OAAO,KAAS,YAAY,OAAO,KAAS,WACxC,IAAO,IACP,OAAO,CAAI,CAAC,CAAC,cAAc,OAAO,CAAI,CAAC;IAE7C,OAAO,EAAK,cAAc,SAAS,CAAC,IAAM;GAC5C,CAAC;EACH,CAAC;EAED,SAAS,EAAW,GAAsB;GACxC,IAAI,CAAC,EAAO,UAAU;GAEtB,IAAM,IAAM,EAAY,OACpB,IAAiC;GAErC,AAAI,GAAK,QAAQ,EAAO,QACtB,AAEK,IAFD,EAAI,cAAc,QAAmB,SAChC,EAAI,cAAc,SAAoB,SAC9B;GAGnB,IAAM,IAAyB;IAAE,KAAK,EAAO;IAAK;GAAU;GAE5D,AADA,EA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I,EAAO,QAAG,EAAA,GAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"TTable.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/components/TTable.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue';\nimport type { TIconName } from '@treeui/icons';\nimport type { TSize } from '../types/contracts';\nimport TIcon from './TIcon.vue';\n\n// The scroll container is the root element, but the accessible name and any\n// aria-*/id belong on the <table> itself, so attrs are split rather than\n// inherited onto the wrapper.\ndefineOptions({\n inheritAttrs: false,\n});\n\nexport type TTableColumn = {\n key: string;\n label: string;\n sortable?: boolean;\n align?: 'left' | 'center' | 'right';\n width?: string;\n};\n\nexport type TTableSortDirection = 'asc' | 'desc' | 'none';\n\nexport type TTableSortState = {\n key: string;\n direction: TTableSortDirection;\n};\n\nconst props = withDefaults(\n defineProps<{\n columns: TTableColumn[];\n rows: Record<string, unknown>[];\n size?: TSize;\n sortBy?: TTableSortState;\n /**\n * Visible `<caption>` naming the table. For a name without visible text,\n * pass `aria-label` / `aria-labelledby` instead — both land on the `<table>`.\n */\n caption?: string;\n }>(),\n {\n size: 'md',\n sortBy: undefined,\n caption: undefined,\n },\n);\n\nconst emit = defineEmits<{\n (e: 'sort', state: TTableSortState): void;\n}>();\n\ndefineSlots<{\n [key: `cell-${string}`]: (props: { row: Record<string, unknown>; value: unknown }) => void;\n [key: `header-${string}`]: (props: { column: TTableColumn }) => void;\n empty: () => void;\n}>();\n\nconst internalSort = ref<TTableSortState | undefined>(undefined);\n\nconst currentSort = computed(() => props.sortBy ?? internalSort.value);\n\nconst classes = computed(() => [\n 't-table',\n `t-table--${props.size}`,\n]);\n\nconst sortedRows = computed(() => {\n const sort = currentSort.value;\n if (!sort || sort.direction === 'none') return props.rows;\n\n return [...props.rows].sort((a, b) => {\n const aVal = a[sort.key];\n const bVal = b[sort.key];\n\n if (aVal == null && bVal == null) return 0;\n if (aVal == null) return 1;\n if (bVal == null) return -1;\n\n const cmp =\n typeof aVal === 'number' && typeof bVal === 'number'\n ? aVal - bVal\n : String(aVal).localeCompare(String(bVal));\n\n return sort.direction === 'desc' ? -cmp : cmp;\n });\n});\n\nfunction handleSort(column: TTableColumn) {\n if (!column.sortable) return;\n\n const cur = currentSort.value;\n let direction: TTableSortDirection = 'asc';\n\n if (cur?.key === column.key) {\n if (cur.direction === 'asc') direction = 'desc';\n else if (cur.direction === 'desc') direction = 'none';\n else direction = 'asc';\n }\n\n const state: TTableSortState = { key: column.key, direction };\n internalSort.value = state;\n emit('sort', state);\n}\n\nfunction sortAriaSort(column: TTableColumn): 'none' | 'ascending' | 'descending' | undefined {\n if (!column.sortable) return undefined;\n const cur = currentSort.value;\n if (cur?.key !== column.key || cur.direction === 'none') return 'none';\n return cur.direction === 'asc' ? 'ascending' : 'descending';\n}\n\nfunction handleHeaderKeydown(event: KeyboardEvent, column: TTableColumn) {\n if (column.sortable && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault();\n handleSort(column);\n }\n}\n\nfunction isSortedBy(column: TTableColumn): boolean {\n const cur = currentSort.value;\n return cur?.key === column.key && cur.direction !== 'none';\n}\n\nfunction sortIconName(column: TTableColumn): TIconName {\n const cur = currentSort.value;\n if (!isSortedBy(column)) return 'chevrons-up-down';\n return cur?.direction === 'asc' ? 'chevron-up' : 'chevron-down';\n}\n\nconst attrs = useAttrs();\n\n// class/style stay on the scroll wrapper (the root); everything else —\n// aria-label, aria-labelledby, id, data-* — is forwarded to the <table>.\nconst tableAttrs = computed(() => {\n const { class: _class, style: _style, ...rest } = attrs;\n return rest;\n});\n</script>\n\n<template>\n <div\n class=\"t-table-wrapper\"\n :class=\"attrs.class\"\n :style=\"attrs.style\"\n >\n <table\n v-bind=\"tableAttrs\"\n :class=\"classes\"\n >\n <caption\n v-if=\"caption\"\n class=\"t-table__caption\"\n >\n {{ caption }}\n </caption>\n <thead class=\"t-table__head\">\n <tr class=\"t-table__row\">\n <th\n v-for=\"column in columns\"\n :key=\"column.key\"\n class=\"t-table__header\"\n :class=\"[\n column.sortable ? 't-table__header--sortable' : '',\n column.align ? `t-table__header--${column.align}` : '',\n ]\"\n :style=\"column.width ? { width: column.width } : undefined\"\n :aria-sort=\"sortAriaSort(column)\"\n :tabindex=\"column.sortable ? 0 : undefined\"\n scope=\"col\"\n @click=\"handleSort(column)\"\n @keydown=\"handleHeaderKeydown($event, column)\"\n >\n <slot\n :name=\"`header-${column.key}`\"\n :column=\"column\"\n >\n <span class=\"t-table__header-content\">\n {{ column.label }}\n <span\n v-if=\"column.sortable\"\n class=\"t-table__sort-icon\"\n :class=\"{ 'is-inactive': !isSortedBy(column) }\"\n aria-hidden=\"true\"\n >\n <TIcon\n :name=\"sortIconName(column)\"\n :size=\"14\"\n />\n </span>\n </span>\n </slot>\n </th>\n </tr>\n </thead>\n <tbody class=\"t-table__body\">\n <tr\n v-if=\"sortedRows.length === 0\"\n class=\"t-table__row t-table__row--empty\"\n >\n <td\n :colspan=\"columns.length\"\n class=\"t-table__cell t-table__cell--empty\"\n >\n <slot name=\"empty\">\n No data available.\n </slot>\n </td>\n </tr>\n <tr\n v-for=\"(row, index) in sortedRows\"\n :key=\"index\"\n class=\"t-table__row\"\n >\n <td\n v-for=\"column in columns\"\n :key=\"column.key\"\n class=\"t-table__cell\"\n :class=\"column.align ? `t-table__cell--${column.align}` : ''\"\n >\n <slot\n :name=\"`cell-${column.key}`\"\n :row=\"row\"\n :value=\"row[column.key]\"\n >\n {{ row[column.key] ?? '' }}\n </slot>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;EA4BA,IAAM,IAAQ,GAmBR,IAAO,GAUP,IAAe,EAAiC,KAAA,CAAS,GAEzD,IAAc,QAAe,EAAM,UAAU,EAAa,KAAK,GAE/D,IAAU,QAAe,CAC7B,WACA,YAAY,EAAM,MACpB,CAAC,GAEK,IAAa,QAAe;GAChC,IAAM,IAAO,EAA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AA;IAC3C,eAAY;OAEZ,EAGE,GAAA;IAFC,MAAM,EAAa,CAAM;IACzB,MAAM;;GAQrB,EAkCQ,SAlCR,GAkCQ,CAhCE,EAAA,MAAW,WAAM,KAAA,EAAA,GADzB,EAYK,MAZL,GAYK,CARH,EAOK,MAAA;IANF,SAAS,EAAA,QAAQ;IAClB,OAAM;OAEN,EAEO,EAAA,QAAA,SAAA,CAAA,SAAA,CAAA,AAAA,EAAA,OAAA,EAFY,wBAEnB,EAAA,CAAA,CAAA,CAAA,GAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA,IAAA,EAAA,EAAA,GAGJ,EAmBK,GAAA,MAAA,EAlBoB,EAAA,QAAf,GAAK,YADf,EAmBK,MAAA;IAjBF,KAAK;IACN,OAAM;eAEN,EAaK,GAAA,MAAA,EAZc,EAAA,UAAV,YADT,EAaK,MAAA;IAXF,KAAK,EAAO;IACb,OAAK,EAAA,CAAC,iBACE,EAAO,QAAK,kBAAqB,EAAO,UAAK,EAAA,CAAA;OAErD,EAMO,EAAA,QAAA,QALU,EAAO,OAAG;IACnB;IACL,OAAO,EAAI,EAAO;YAGd,CAAA,EAAA,EADF,EAAI,EAAO,QAAG,EAAA,GAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"TTag.cjs","names":[],"sources":["../../src/components/TTag.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { TSize } from '../types/contracts';\n\nexport type TTagVariant = 'solid' | 'outline' | 'soft';\n\nconst props = withDefaults(\n defineProps<{\n variant?: TTagVariant;\n size?: TSize;\n removable?: boolean;\n disabled?: boolean;\n }>(),\n {\n variant: 'soft',\n size: 'md',\n removable: false,\n disabled: false,\n },\n);\n\nconst emit = defineEmits<{\n (e: 'remove'): void;\n}>();\n\nconst classes = computed(() => [\n 't-tag',\n `t-tag--${props.variant}`,\n `t-tag--${props.size}`,\n props.disabled ? 'is-disabled' : '',\n]);\n\nfunction handleRemove() {\n if (props.disabled) return;\n emit('remove');\n}\n</script>\n\n<template>\n <span :class=\"classes\">\n <span\n v-if=\"$slots.icon\"\n class=\"t-tag__icon\"\n aria-hidden=\"true\"\n >\n <slot name=\"icon\" />\n </span>\n <span class=\"t-tag__label\">\n <slot />\n </span>\n <button\n v-if=\"removable\"\n type=\"button\"\n class=\"t-tag__remove\"\n :disabled=\"disabled\"\n aria-label=\"Remove\"\n @click=\"handleRemove\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n </span>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"TTag.cjs","names":[],"sources":["../../src/components/TTag.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { TSize } from '../types/contracts';\nimport TIcon from './TIcon.vue';\n\nexport type TTagVariant = 'solid' | 'outline' | 'soft';\n\nconst props = withDefaults(\n defineProps<{\n variant?: TTagVariant;\n size?: TSize;\n removable?: boolean;\n disabled?: boolean;\n }>(),\n {\n variant: 'soft',\n size: 'md',\n removable: false,\n disabled: false,\n },\n);\n\nconst emit = defineEmits<{\n (e: 'remove'): void;\n}>();\n\nconst classes = computed(() => [\n 't-tag',\n `t-tag--${props.variant}`,\n `t-tag--${props.size}`,\n props.disabled ? 'is-disabled' : '',\n]);\n\nfunction handleRemove() {\n if (props.disabled) return;\n emit('remove');\n}\n</script>\n\n<template>\n <span :class=\"classes\">\n <span\n v-if=\"$slots.icon\"\n class=\"t-tag__icon\"\n aria-hidden=\"true\"\n >\n <slot name=\"icon\" />\n </span>\n <span class=\"t-tag__label\">\n <slot />\n </span>\n <button\n v-if=\"removable\"\n type=\"button\"\n class=\"t-tag__remove\"\n :disabled=\"disabled\"\n aria-label=\"Remove\"\n @click=\"handleRemove\"\n >\n <TIcon\n name=\"x\"\n :size=\"14\"\n />\n </button>\n </span>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"TTag.js","names":[],"sources":["../../src/components/TTag.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { TSize } from '../types/contracts';\n\nexport type TTagVariant = 'solid' | 'outline' | 'soft';\n\nconst props = withDefaults(\n defineProps<{\n variant?: TTagVariant;\n size?: TSize;\n removable?: boolean;\n disabled?: boolean;\n }>(),\n {\n variant: 'soft',\n size: 'md',\n removable: false,\n disabled: false,\n },\n);\n\nconst emit = defineEmits<{\n (e: 'remove'): void;\n}>();\n\nconst classes = computed(() => [\n 't-tag',\n `t-tag--${props.variant}`,\n `t-tag--${props.size}`,\n props.disabled ? 'is-disabled' : '',\n]);\n\nfunction handleRemove() {\n if (props.disabled) return;\n emit('remove');\n}\n</script>\n\n<template>\n <span :class=\"classes\">\n <span\n v-if=\"$slots.icon\"\n class=\"t-tag__icon\"\n aria-hidden=\"true\"\n >\n <slot name=\"icon\" />\n </span>\n <span class=\"t-tag__label\">\n <slot />\n </span>\n <button\n v-if=\"removable\"\n type=\"button\"\n class=\"t-tag__remove\"\n :disabled=\"disabled\"\n aria-label=\"Remove\"\n @click=\"handleRemove\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n </span>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"TTag.js","names":[],"sources":["../../src/components/TTag.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { TSize } from '../types/contracts';\nimport TIcon from './TIcon.vue';\n\nexport type TTagVariant = 'solid' | 'outline' | 'soft';\n\nconst props = withDefaults(\n defineProps<{\n variant?: TTagVariant;\n size?: TSize;\n removable?: boolean;\n disabled?: boolean;\n }>(),\n {\n variant: 'soft',\n size: 'md',\n removable: false,\n disabled: false,\n },\n);\n\nconst emit = defineEmits<{\n (e: 'remove'): void;\n}>();\n\nconst classes = computed(() => [\n 't-tag',\n `t-tag--${props.variant}`,\n `t-tag--${props.size}`,\n props.disabled ? 'is-disabled' : '',\n]);\n\nfunction handleRemove() {\n if (props.disabled) return;\n emit('remove');\n}\n</script>\n\n<template>\n <span :class=\"classes\">\n <span\n v-if=\"$slots.icon\"\n class=\"t-tag__icon\"\n aria-hidden=\"true\"\n >\n <slot name=\"icon\" />\n </span>\n <span class=\"t-tag__label\">\n <slot />\n </span>\n <button\n v-if=\"removable\"\n type=\"button\"\n class=\"t-tag__remove\"\n :disabled=\"disabled\"\n aria-label=\"Remove\"\n @click=\"handleRemove\"\n >\n <TIcon\n name=\"x\"\n :size=\"14\"\n />\n </button>\n </span>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"TTag.vue.d.ts","sourceRoot":"","sources":["../../src/components/TTag.vue"],"names":[],"mappings":"AA+EA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEvD,KAAK,WAAW,GAAG;IACf,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAoCJ,iBAAS,cAAc;WA+DT,OAAO,IAA6B;;sBAXxB,GAAG;yBACA,GAAG;;;;EAe/B;AAYD,KAAK,oBAAoB,GA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ag__icon`,"aria-hidden":`true`},n={class:`t-tag__label`},r=[`disabled`],i=(0,e.defineComponent)({__name:`TTag`,props:{variant:{default:`soft`},size:{default:`md`},removable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:[`remove`],setup(i,{emit:a}){let o=i,s=a,c=(0,e.computed)(()=>[`t-tag`,`t-tag--${o.variant}`,`t-tag--${o.size}`,o.disabled?`is-disabled`:``]);function l(){o.disabled||s(`remove`)}return(a,o)=>((0,e.openBlock)(),(0,e.createElementBlock)(`span`,{class:(0,e.normalizeClass)(c.value)},[a.$slots.icon?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,t,[(0,e.renderSlot)(a.$slots,`icon`)])):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`span`,n,[(0,e.renderSlot)(a.$slots,`default`)]),i.removable?((0,e.openBlock)(),(0,e.createElementBlock)(`button`,{key:1,type:`button`,class:`t-tag__remove`,disabled:i.disabled,"aria-label":`Remove`,onClick:l},[...o[0]||=[(0,e.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[(0,e.createElementVNode)(`path`,{d:`M18 6 6 18`}),(0,e.createElementVNode)(`path`,{d:`m6 6 12 12`})],-1)]],8,r)):(0,e.createCommentVNode)(``,!0)],2))}});exports.default=i;
1
+ const e=require("./TIcon.cjs");let t=require("vue");var n={key:0,class:`t-tag__icon`,"aria-hidden":`true`},r={class:`t-tag__label`},i=[`disabled`],a=(0,t.defineComponent)({__name:`TTag`,props:{variant:{default:`soft`},size:{default:`md`},removable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:[`remove`],setup(a,{emit:o}){let s=a,c=o,l=(0,t.computed)(()=>[`t-tag`,`t-tag--${s.variant}`,`t-tag--${s.size}`,s.disabled?`is-disabled`:``]);function u(){s.disabled||c(`remove`)}return(o,s)=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{class:(0,t.normalizeClass)(l.value)},[o.$slots.icon?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,n,[(0,t.renderSlot)(o.$slots,`icon`)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,r,[(0,t.renderSlot)(o.$slots,`default`)]),a.removable?((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:1,type:`button`,class:`t-tag__remove`,disabled:a.disabled,"aria-label":`Remove`,onClick:u},[(0,t.createVNode)(e.default,{name:`x`,size:14})],8,i)):(0,t.createCommentVNode)(``,!0)],2))}});exports.default=a;
2
2
  //# sourceMappingURL=TTag.vue_vue_type_script_setup_true_lang.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"TTag.vue_vue_type_script_setup_true_lang.cjs","names":["$slots"],"sources":["../../src/components/TTag.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { TSize } from '../types/contracts';\n\nexport type TTagVariant = 'solid' | 'outline' | 'soft';\n\nconst props = withDefaults(\n defineProps<{\n variant?: TTagVariant;\n size?: TSize;\n removable?: boolean;\n disabled?: boolean;\n }>(),\n {\n variant: 'soft',\n size: 'md',\n removable: false,\n disabled: false,\n },\n);\n\nconst emit = defineEmits<{\n (e: 'remove'): void;\n}>();\n\nconst classes = computed(() => [\n 't-tag',\n `t-tag--${props.variant}`,\n `t-tag--${props.size}`,\n props.disabled ? 'is-disabled' : '',\n]);\n\nfunction handleRemove() {\n if (props.disabled) return;\n emit('remove');\n}\n</script>\n\n<template>\n <span :class=\"classes\">\n <span\n v-if=\"$slots.icon\"\n class=\"t-tag__icon\"\n aria-hidden=\"true\"\n >\n <slot name=\"icon\" />\n </span>\n <span class=\"t-tag__label\">\n <slot />\n </span>\n <button\n v-if=\"removable\"\n type=\"button\"\n class=\"t-tag__remove\"\n :disabled=\"disabled\"\n aria-label=\"Remove\"\n @click=\"handleRemove\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n </span>\n</template>\n"],"mappings":"0TAMA,IAAM,EAAQ,EAeR,EAAO,EAIP,GAAA,EAAA,EAAA,SAAA,KAAyB,CAC7B,QACA,UAAU,EAAM,UAChB,UAAU,EAAM,OAChB,EAAM,SAAW,cAAgB,EACnC,CAAC,EAED,SAAS,GAAe,CAClB,EAAM,UACV,EAAK,QAAQ,CACf,0DAuCS,OAAA,CAnCA,OAAA,EAAA,EAAA,eAAA,CAAO,EAAA,KAAO,CAAA,EAAA,CAEXA,EAAAA,OAAO,OAAA,EAAA,EAAA,UAAA,CAAA,GAAA,EAAA,EAAA,mBAAA,CAKR,OANP,EAMO,EAAA,EAAA,EAAA,WAAA,CADe,EAAA,OAAA,MAAA,CAAA,CAAA,IAAA,EAAA,EAAA,mBAAA,CAAA,GAAA,EAAA,2BAIf,OAFP,EAEO,EAAA,EAAA,EAAA,WAAA,CADG,EAAA,OAAA,SAAA,CAAA,CAAA,EAGF,EAAA,YAAA,EAAA,EAAA,UAAA,CAAA,GAAA,EAAA,EAAA,mBAAA,CAsBC,SAAA,OArBP,KAAK,SACL,MAAM,gBACL,SAAU,EAAA,SACX,aAAW,SACV,QAAO,wCAgBF,MAAA,CAbJ,MAAM,6BACN,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OACL,OAAO,eACP,eAAa,IACb,iBAAe,QACf,kBAAgB,QAChB,cAAY,kCAEW,OAAA,CAAjB,EAAE,YAAY,CAAA,GAAA,EAAA,EAAA,mBAAA,CACG,OAAA,CAAjB,EAAE,YAAY,CAAA,CAAA,EAAA,EAAA,CAAA,CAAA,EAAA,EAAA,CAAA,IAAA,EAAA,EAAA,mBAAA,CAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"TTag.vue_vue_type_script_setup_true_lang.cjs","names":["$slots"],"sources":["../../src/components/TTag.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { TSize } from '../types/contracts';\nimport TIcon from './TIcon.vue';\n\nexport type TTagVariant = 'solid' | 'outline' | 'soft';\n\nconst props = withDefaults(\n defineProps<{\n variant?: TTagVariant;\n size?: TSize;\n removable?: boolean;\n disabled?: boolean;\n }>(),\n {\n variant: 'soft',\n size: 'md',\n removable: false,\n disabled: false,\n },\n);\n\nconst emit = defineEmits<{\n (e: 'remove'): void;\n}>();\n\nconst classes = computed(() => [\n 't-tag',\n `t-tag--${props.variant}`,\n `t-tag--${props.size}`,\n props.disabled ? 'is-disabled' : '',\n]);\n\nfunction handleRemove() {\n if (props.disabled) return;\n emit('remove');\n}\n</script>\n\n<template>\n <span :class=\"classes\">\n <span\n v-if=\"$slots.icon\"\n class=\"t-tag__icon\"\n aria-hidden=\"true\"\n >\n <slot name=\"icon\" />\n </span>\n <span class=\"t-tag__label\">\n <slot />\n </span>\n <button\n v-if=\"removable\"\n type=\"button\"\n class=\"t-tag__remove\"\n :disabled=\"disabled\"\n aria-label=\"Remove\"\n @click=\"handleRemove\"\n >\n <TIcon\n name=\"x\"\n :size=\"14\"\n />\n </button>\n </span>\n</template>\n"],"mappings":"yVAOA,IAAM,EAAQ,EAeR,EAAO,EAIP,GAAA,EAAA,EAAA,SAAA,KAAyB,CAC7B,QACA,UAAU,EAAM,UAChB,UAAU,EAAM,OAChB,EAAM,SAAW,cAAgB,EACnC,CAAC,EAED,SAAS,GAAe,CAClB,EAAM,UACV,EAAK,QAAQ,CACf,0DA4BS,OAAA,CAxBA,OAAA,EAAA,EAAA,eAAA,CAAO,EAAA,KAAO,CAAA,EAAA,CAEXA,EAAAA,OAAO,OAAA,EAAA,EAAA,UAAA,CAAA,GAAA,EAAA,EAAA,mBAAA,CAKR,OANP,EAMO,EAAA,EAAA,EAAA,WAAA,CADe,EAAA,OAAA,MAAA,CAAA,CAAA,IAAA,EAAA,EAAA,mBAAA,CAAA,GAAA,EAAA,2BAIf,OAFP,EAEO,EAAA,EAAA,EAAA,WAAA,CADG,EAAA,OAAA,SAAA,CAAA,CAAA,EAGF,EAAA,YAAA,EAAA,EAAA,UAAA,CAAA,GAAA,EAAA,EAAA,mBAAA,CAWC,SAAA,OAVP,KAAK,SACL,MAAM,gBACL,SAAU,EAAA,SACX,aAAW,SACV,QAAO,sBAKN,EAAA,QAAA,CAFA,KAAK,IACJ,KAAM"}
@@ -1,10 +1,11 @@
1
- import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeClass as a, openBlock as o, renderSlot as s } from "vue";
1
+ import e from "./TIcon.js";
2
+ import { computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, normalizeClass as s, openBlock as c, renderSlot as l } from "vue";
2
3
  //#region src/components/TTag.vue?vue&type=script&setup=true&lang.ts
3
- var c = {
4
+ var u = {
4
5
  key: 0,
5
6
  class: "t-tag__icon",
6
7
  "aria-hidden": "true"
7
- }, l = { class: "t-tag__label" }, u = ["disabled"], d = /*@__PURE__*/ i({
8
+ }, d = { class: "t-tag__label" }, f = ["disabled"], p = /*@__PURE__*/ o({
8
9
  __name: "TTag",
9
10
  props: {
10
11
  variant: { default: "soft" },
@@ -19,42 +20,34 @@ var c = {
19
20
  }
20
21
  },
21
22
  emits: ["remove"],
22
- setup(i, { emit: d }) {
23
- let f = i, p = d, m = e(() => [
23
+ setup(o, { emit: p }) {
24
+ let m = o, h = p, g = t(() => [
24
25
  "t-tag",
25
- `t-tag--${f.variant}`,
26
- `t-tag--${f.size}`,
27
- f.disabled ? "is-disabled" : ""
26
+ `t-tag--${m.variant}`,
27
+ `t-tag--${m.size}`,
28
+ m.disabled ? "is-disabled" : ""
28
29
  ]);
29
- function h() {
30
- f.disabled || p("remove");
30
+ function _() {
31
+ m.disabled || h("remove");
31
32
  }
32
- return (e, d) => (o(), n("span", { class: a(m.value) }, [
33
- e.$slots.icon ? (o(), n("span", c, [s(e.$slots, "icon")])) : t("", !0),
34
- r("span", l, [s(e.$slots, "default")]),
35
- i.removable ? (o(), n("button", {
33
+ return (t, p) => (c(), r("span", { class: s(g.value) }, [
34
+ t.$slots.icon ? (c(), r("span", u, [l(t.$slots, "icon")])) : n("", !0),
35
+ i("span", d, [l(t.$slots, "default")]),
36
+ o.removable ? (c(), r("button", {
36
37
  key: 1,
37
38
  type: "button",
38
39
  class: "t-tag__remove",
39
- disabled: i.disabled,
40
+ disabled: o.disabled,
40
41
  "aria-label": "Remove",
41
- onClick: h
42
- }, [...d[0] ||= [r("svg", {
43
- xmlns: "http://www.w3.org/2000/svg",
44
- width: "14",
45
- height: "14",
46
- viewBox: "0 0 24 24",
47
- fill: "none",
48
- stroke: "currentColor",
49
- "stroke-width": "2",
50
- "stroke-linecap": "round",
51
- "stroke-linejoin": "round",
52
- "aria-hidden": "true"
53
- }, [r("path", { d: "M18 6 6 18" }), r("path", { d: "m6 6 12 12" })], -1)]], 8, u)) : t("", !0)
42
+ onClick: _
43
+ }, [a(e, {
44
+ name: "x",
45
+ size: 14
46
+ })], 8, f)) : n("", !0)
54
47
  ], 2));
55
48
  }
56
49
  });
57
50
  //#endregion
58
- export { d as default };
51
+ export { p as default };
59
52
 
60
53
  //# sourceMappingURL=TTag.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TTag.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../src/components/TTag.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { TSize } from '../types/contracts';\n\nexport type TTagVariant = 'solid' | 'outline' | 'soft';\n\nconst props = withDefaults(\n defineProps<{\n variant?: TTagVariant;\n size?: TSize;\n removable?: boolean;\n disabled?: boolean;\n }>(),\n {\n variant: 'soft',\n size: 'md',\n removable: false,\n disabled: false,\n },\n);\n\nconst emit = defineEmits<{\n (e: 'remove'): void;\n}>();\n\nconst classes = computed(() => [\n 't-tag',\n `t-tag--${props.variant}`,\n `t-tag--${props.size}`,\n props.disabled ? 'is-disabled' : '',\n]);\n\nfunction handleRemove() {\n if (props.disabled) return;\n emit('remove');\n}\n</script>\n\n<template>\n <span :class=\"classes\">\n <span\n v-if=\"$slots.icon\"\n class=\"t-tag__icon\"\n aria-hidden=\"true\"\n >\n <slot name=\"icon\" />\n </span>\n <span class=\"t-tag__label\">\n <slot />\n </span>\n <button\n v-if=\"removable\"\n type=\"button\"\n class=\"t-tag__remove\"\n :disabled=\"disabled\"\n aria-label=\"Remove\"\n @click=\"handleRemove\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </button>\n </span>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;EAMA,IAAM,IAAQ,GAeR,IAAO,GAIP,IAAU,QAAe;GAC7B;GACA,UAAU,EAAM;GAChB,UAAU,EAAM;GAChB,EAAM,WAAW,gBAAgB;EACnC,CAAC;EAED,SAAS,IAAe;GAClB,EAAM,YACV,EAAK,QAAQ;EACf;yBAIE,EAmCO,QAAA,EAnCA,OAAK,EAAE,EAAA,KAAO,EAAA,GAAA;GAEXA,EAAAA,OAAO,QAAA,EAAA,GADf,EAMO,QANP,GAMO,CADL,EAAoB,EAAA,QAAA,MAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA;GAEtB,EAEO,QAFP,GAEO,CADL,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA;GAGF,EAAA,aAAA,EAAA,GADR,EAuBS,UAAA;;IArBP,MAAK;IACL,OAAM;IACL,UAAU,EAAA;IACX,cAAW;IACV,SAAO;oBAER,EAcM,OAAA;IAbJ,OAAM;IACN,OAAM;IACN,QAAO;IACP,SAAQ;IACR,MAAK;IACL,QAAO;IACP,gBAAa;IACb,kBAAe;IACf,mBAAgB;IAChB,eAAY;OAEZ,EAAuB,QAAA,EAAjB,GAAE,aAAY,CAAA,GACpB,EAAuB,QAAA,EAAjB,GAAE,aAAY,CAAA,CAAA,GAAA,EAAA,CAAA,CAAA,GAAA,GAAA,CAAA,KAAA,EAAA,IAAA,EAAA"}
1
+ {"version":3,"file":"TTag.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../src/components/TTag.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { TSize } from '../types/contracts';\nimport TIcon from './TIcon.vue';\n\nexport type TTagVariant = 'solid' | 'outline' | 'soft';\n\nconst props = withDefaults(\n defineProps<{\n variant?: TTagVariant;\n size?: TSize;\n removable?: boolean;\n disabled?: boolean;\n }>(),\n {\n variant: 'soft',\n size: 'md',\n removable: false,\n disabled: false,\n },\n);\n\nconst emit = defineEmits<{\n (e: 'remove'): void;\n}>();\n\nconst classes = computed(() => [\n 't-tag',\n `t-tag--${props.variant}`,\n `t-tag--${props.size}`,\n props.disabled ? 'is-disabled' : '',\n]);\n\nfunction handleRemove() {\n if (props.disabled) return;\n emit('remove');\n}\n</script>\n\n<template>\n <span :class=\"classes\">\n <span\n v-if=\"$slots.icon\"\n class=\"t-tag__icon\"\n aria-hidden=\"true\"\n >\n <slot name=\"icon\" />\n </span>\n <span class=\"t-tag__label\">\n <slot />\n </span>\n <button\n v-if=\"removable\"\n type=\"button\"\n class=\"t-tag__remove\"\n :disabled=\"disabled\"\n aria-label=\"Remove\"\n @click=\"handleRemove\"\n >\n <TIcon\n name=\"x\"\n :size=\"14\"\n />\n </button>\n </span>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAOA,IAAM,IAAQ,GAeR,IAAO,GAIP,IAAU,QAAe;GAC7B;GACA,UAAU,EAAM;GAChB,UAAU,EAAM;GAChB,EAAM,WAAW,gBAAgB;EACnC,CAAC;EAED,SAAS,IAAe;GAClB,EAAM,YACV,EAAK,QAAQ;EACf;yBAIE,EAwBO,QAAA,EAxBA,OAAK,EAAE,EAAA,KAAO,EAAA,GAAA;GAEXA,EAAAA,OAAO,QAAA,EAAA,GADf,EAMO,QANP,GAMO,CADL,EAAoB,EAAA,QAAA,MAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA;GAEtB,EAEO,QAFP,GAEO,CADL,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA;GAGF,EAAA,aAAA,EAAA,GADR,EAYS,UAAA;;IAVP,MAAK;IACL,OAAM;IACL,UAAU,EAAA;IACX,cAAW;IACV,SAAO;OAER,EAGE,GAAA;IAFA,MAAK;IACJ,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"TText.cjs","names":[],"sources":["../../src/components/TText.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\nconst _treeTextSizes = ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'] as const;\nconst _treeTextTones = ['default', 'muted', 'inverse', 'brand'] as const;\nconst _treeTextWeights = ['regular', 'medium', 'semibold', 'bold'] as const;\n\nexport type TTextSize = (typeof _treeTextSizes)[number];\nexport type TTextTone = (typeof _treeTextTones)[number];\nexport type TTextWeight = (typeof _treeTextWeights)[number];\n\nconst props = withDefaults(\n defineProps<{\n /** Element to render. Defaults to `span`; use `p`, `h1`–`h6`, `label`, … */\n as?: string;\n size?: TTextSize;\n tone?: TTextTone;\n weight?: TTextWeight;\n /** Truncate to a single line with an ellipsis. */\n truncate?: boolean;\n }>(),\n {\n as: 'span',\n size: undefined,\n tone: 'default',\n weight: undefined,\n truncate: false,\n },\n);\n\nconst classes = computed(() => [\n 't-text',\n props.size ? `t-text--size-${props.size}` : null,\n props.tone !== 'default' ? `t-text--${props.tone}` : null,\n props.weight ? `t-text--weight-${props.weight}` : null,\n { 'is-truncated': props.truncate },\n]);\n</script>\n\n<template>\n <component\n :is=\"as\"\n :class=\"classes\"\n >\n <slot />\n </component>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"TText.cjs","names":[],"sources":["../../src/components/TText.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\nconst _treeTextSizes = ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'] as const;\nconst _treeTextTones = ['default', 'muted', 'inverse', 'brand'] as const;\nconst _treeTextWeights = ['regular', 'medium', 'semibold', 'bold'] as const;\n\nexport type TTextSize = (typeof _treeTextSizes)[number];\nexport type TTextTone = (typeof _treeTextTones)[number];\nexport type TTextWeight = (typeof _treeTextWeights)[number];\n\nconst props = withDefaults(\n defineProps<{\n /** Element to render. Defaults to `span`; use `p`, `h1`–`h6`, `label`, … */\n as?: string;\n size?: TTextSize;\n tone?: TTextTone;\n weight?: TTextWeight;\n /** Truncate to a single line with an ellipsis. */\n truncate?: boolean;\n /**\n * Preserve authored line breaks and paragraph spacing (`white-space: pre-wrap`)\n * while still wrapping long lines. Use for plain-text output such as AI\n * responses. Ignored when `truncate` is set, since the two conflict.\n */\n preserveWhitespace?: boolean;\n }>(),\n {\n as: 'span',\n size: undefined,\n tone: 'default',\n weight: undefined,\n truncate: false,\n preserveWhitespace: false,\n },\n);\n\nconst classes = computed(() => [\n 't-text',\n props.size ? `t-text--size-${props.size}` : null,\n props.tone !== 'default' ? `t-text--${props.tone}` : null,\n props.weight ? `t-text--weight-${props.weight}` : null,\n {\n 'is-truncated': props.truncate,\n 'is-pre-wrap': props.preserveWhitespace && !props.truncate,\n },\n]);\n</script>\n\n<template>\n <component\n :is=\"as\"\n :class=\"classes\"\n >\n <slot />\n </component>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"TText.js","names":[],"sources":["../../src/components/TText.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\nconst _treeTextSizes = ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'] as const;\nconst _treeTextTones = ['default', 'muted', 'inverse', 'brand'] as const;\nconst _treeTextWeights = ['regular', 'medium', 'semibold', 'bold'] as const;\n\nexport type TTextSize = (typeof _treeTextSizes)[number];\nexport type TTextTone = (typeof _treeTextTones)[number];\nexport type TTextWeight = (typeof _treeTextWeights)[number];\n\nconst props = withDefaults(\n defineProps<{\n /** Element to render. Defaults to `span`; use `p`, `h1`–`h6`, `label`, … */\n as?: string;\n size?: TTextSize;\n tone?: TTextTone;\n weight?: TTextWeight;\n /** Truncate to a single line with an ellipsis. */\n truncate?: boolean;\n }>(),\n {\n as: 'span',\n size: undefined,\n tone: 'default',\n weight: undefined,\n truncate: false,\n },\n);\n\nconst classes = computed(() => [\n 't-text',\n props.size ? `t-text--size-${props.size}` : null,\n props.tone !== 'default' ? `t-text--${props.tone}` : null,\n props.weight ? `t-text--weight-${props.weight}` : null,\n { 'is-truncated': props.truncate },\n]);\n</script>\n\n<template>\n <component\n :is=\"as\"\n :class=\"classes\"\n >\n <slot />\n </component>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"TText.js","names":[],"sources":["../../src/components/TText.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\nconst _treeTextSizes = ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'] as const;\nconst _treeTextTones = ['default', 'muted', 'inverse', 'brand'] as const;\nconst _treeTextWeights = ['regular', 'medium', 'semibold', 'bold'] as const;\n\nexport type TTextSize = (typeof _treeTextSizes)[number];\nexport type TTextTone = (typeof _treeTextTones)[number];\nexport type TTextWeight = (typeof _treeTextWeights)[number];\n\nconst props = withDefaults(\n defineProps<{\n /** Element to render. Defaults to `span`; use `p`, `h1`–`h6`, `label`, … */\n as?: string;\n size?: TTextSize;\n tone?: TTextTone;\n weight?: TTextWeight;\n /** Truncate to a single line with an ellipsis. */\n truncate?: boolean;\n /**\n * Preserve authored line breaks and paragraph spacing (`white-space: pre-wrap`)\n * while still wrapping long lines. Use for plain-text output such as AI\n * responses. Ignored when `truncate` is set, since the two conflict.\n */\n preserveWhitespace?: boolean;\n }>(),\n {\n as: 'span',\n size: undefined,\n tone: 'default',\n weight: undefined,\n truncate: false,\n preserveWhitespace: false,\n },\n);\n\nconst classes = computed(() => [\n 't-text',\n props.size ? `t-text--size-${props.size}` : null,\n props.tone !== 'default' ? `t-text--${props.tone}` : null,\n props.weight ? `t-text--weight-${props.weight}` : null,\n {\n 'is-truncated': props.truncate,\n 'is-pre-wrap': props.preserveWhitespace && !props.truncate,\n },\n]);\n</script>\n\n<template>\n <component\n :is=\"as\"\n :class=\"classes\"\n >\n <slot />\n </component>\n</template>\n"],"mappings":""}
@@ -12,6 +12,12 @@ type __VLS_Props = {
12
12
  weight?: TTextWeight;
13
13
  /** Truncate to a single line with an ellipsis. */
14
14
  truncate?: boolean;
15
+ /**
16
+ * Preserve authored line breaks and paragraph spacing (`white-space: pre-wrap`)
17
+ * while still wrapping long lines. Use for plain-text output such as AI
18
+ * responses. Ignored when `truncate` is set, since the two conflict.
19
+ */
20
+ preserveWhitespace?: boolean;
15
21
  };
16
22
  declare function __VLS_template(): {
17
23
  attrs: Partial<{}>;
@@ -28,6 +34,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
28
34
  as: string;
29
35
  weight: TTextWeight;
30
36
  truncate: boolean;
37
+ preserveWhitespace: boolean;
31
38
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
32
39
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
33
40
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"TText.vue.d.ts","sourceRoot":"","sources":["../../src/components/TText.vue"],"names":[],"mappings":"AAmDA,QAAA,MAAM,cAAc,uDAAwD,CAAC;AAC7E,QAAA,MAAM,cAAc,mD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AAC,CAAC,MAAM,CAAC,CAAC;AACxD,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,KAAK,WAAW,GAAG;IACf,4EAA4E;IAC5E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAkCJ,iBAAS,cAAc;WA+BT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;UA5FV,SAAS;UACT,SAAS;QAFX,MAAM;YAGF,WAAW;cAET,OAAO;wBAMG,OAAO;6EA0F9B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,2 +1,2 @@
1
- let e=require("vue");var t=(0,e.defineComponent)({__name:`TText`,props:{as:{default:`span`},size:{default:void 0},tone:{default:`default`},weight:{default:void 0},truncate:{type:Boolean,default:!1}},setup(t){let n=t,r=(0,e.computed)(()=>[`t-text`,n.size?`t-text--size-${n.size}`:null,n.tone==="default"?null:`t-text--${n.tone}`,n.weight?`t-text--weight-${n.weight}`:null,{"is-truncated":n.truncate}]);return(n,i)=>((0,e.openBlock)(),(0,e.createBlock)((0,e.resolveDynamicComponent)(t.as),{class:(0,e.normalizeClass)(r.value)},{default:(0,e.withCtx)(()=>[(0,e.renderSlot)(n.$slots,`default`)]),_:3},8,[`class`]))}});exports.default=t;
1
+ let e=require("vue");var t=(0,e.defineComponent)({__name:`TText`,props:{as:{default:`span`},size:{default:void 0},tone:{default:`default`},weight:{default:void 0},truncate:{type:Boolean,default:!1},preserveWhitespace:{type:Boolean,default:!1}},setup(t){let n=t,r=(0,e.computed)(()=>[`t-text`,n.size?`t-text--size-${n.size}`:null,n.tone==="default"?null:`t-text--${n.tone}`,n.weight?`t-text--weight-${n.weight}`:null,{"is-truncated":n.truncate,"is-pre-wrap":n.preserveWhitespace&&!n.truncate}]);return(n,i)=>((0,e.openBlock)(),(0,e.createBlock)((0,e.resolveDynamicComponent)(t.as),{class:(0,e.normalizeClass)(r.value)},{default:(0,e.withCtx)(()=>[(0,e.renderSlot)(n.$slots,`default`)]),_:3},8,[`class`]))}});exports.default=t;
2
2
  //# sourceMappingURL=TText.vue_vue_type_script_setup_true_lang.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"TText.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/components/TText.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\nconst _treeTextSizes = ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'] as const;\nconst _treeTextTones = ['default', 'muted', 'inverse', 'brand'] as const;\nconst _treeTextWeights = ['regular', 'medium', 'semibold', 'bold'] as const;\n\nexport type TTextSize = (typeof _treeTextSizes)[number];\nexport type TTextTone = (typeof _treeTextTones)[number];\nexport type TTextWeight = (typeof _treeTextWeights)[number];\n\nconst props = withDefaults(\n defineProps<{\n /** Element to render. Defaults to `span`; use `p`, `h1`–`h6`, `label`, … */\n as?: string;\n size?: TTextSize;\n tone?: TTextTone;\n weight?: TTextWeight;\n /** Truncate to a single line with an ellipsis. */\n truncate?: boolean;\n }>(),\n {\n as: 'span',\n size: undefined,\n tone: 'default',\n weight: undefined,\n truncate: false,\n },\n);\n\nconst classes = computed(() => [\n 't-text',\n props.size ? `t-text--size-${props.size}` : null,\n props.tone !== 'default' ? `t-text--${props.tone}` : null,\n props.weight ? `t-text--weight-${props.weight}` : null,\n { 'is-truncated': props.truncate },\n]);\n</script>\n\n<template>\n <component\n :is=\"as\"\n :class=\"classes\"\n >\n <slot />\n </component>\n</template>\n"],"mappings":"gNAWA,IAAM,EAAQ,EAmBR,GAAA,EAAA,EAAA,SAAA,KAAyB,CAC7B,SACA,EAAM,KAAO,gBAAgB,EAAM,OAAS,KAC5C,EAAM,OAAS,UAAsC,KAA1B,WAAW,EAAM,OAC5C,EAAM,OAAS,kBAAkB,EAAM,SAAW,KAClD,CAAE,eAAgB,EAAM,QAAS,CACnC,CAAC,kFAKQ,EAAA,EAAE,EAAA,CACN,OAAA,EAAA,EAAA,eAAA,CAAO,EAAA,KAAO,CAAA,EAAA,2BAEP,EAAA,EAAA,EAAA,WAAA,CAAA,EAAA,OAAA,SAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"TText.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/components/TText.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\nconst _treeTextSizes = ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'] as const;\nconst _treeTextTones = ['default', 'muted', 'inverse', 'brand'] as const;\nconst _treeTextWeights = ['regular', 'medium', 'semibold', 'bold'] as const;\n\nexport type TTextSize = (typeof _treeTextSizes)[number];\nexport type TTextTone = (typeof _treeTextTones)[number];\nexport type TTextWeight = (typeof _treeTextWeights)[number];\n\nconst props = withDefaults(\n defineProps<{\n /** Element to render. Defaults to `span`; use `p`, `h1`–`h6`, `label`, … */\n as?: string;\n size?: TTextSize;\n tone?: TTextTone;\n weight?: TTextWeight;\n /** Truncate to a single line with an ellipsis. */\n truncate?: boolean;\n /**\n * Preserve authored line breaks and paragraph spacing (`white-space: pre-wrap`)\n * while still wrapping long lines. Use for plain-text output such as AI\n * responses. Ignored when `truncate` is set, since the two conflict.\n */\n preserveWhitespace?: boolean;\n }>(),\n {\n as: 'span',\n size: undefined,\n tone: 'default',\n weight: undefined,\n truncate: false,\n preserveWhitespace: false,\n },\n);\n\nconst classes = computed(() => [\n 't-text',\n props.size ? `t-text--size-${props.size}` : null,\n props.tone !== 'default' ? `t-text--${props.tone}` : null,\n props.weight ? `t-text--weight-${props.weight}` : null,\n {\n 'is-truncated': props.truncate,\n 'is-pre-wrap': props.preserveWhitespace && !props.truncate,\n },\n]);\n</script>\n\n<template>\n <component\n :is=\"as\"\n :class=\"classes\"\n >\n <slot />\n </component>\n</template>\n"],"mappings":"6PAWA,IAAM,EAAQ,EA0BR,GAAA,EAAA,EAAA,SAAA,KAAyB,CAC7B,SACA,EAAM,KAAO,gBAAgB,EAAM,OAAS,KAC5C,EAAM,OAAS,UAAsC,KAA1B,WAAW,EAAM,OAC5C,EAAM,OAAS,kBAAkB,EAAM,SAAW,KAClD,CACE,eAAgB,EAAM,SACtB,cAAe,EAAM,oBAAsB,CAAC,EAAM,QACpD,CACF,CAAC,kFAKQ,EAAA,EAAE,EAAA,CACN,OAAA,EAAA,EAAA,eAAA,CAAO,EAAA,KAAO,CAAA,EAAA,2BAEP,EAAA,EAAA,EAAA,WAAA,CAAA,EAAA,OAAA,SAAA,CAAA,CAAA"}
@@ -10,6 +10,10 @@ var c = /*@__PURE__*/ n({
10
10
  truncate: {
11
11
  type: Boolean,
12
12
  default: !1
13
+ },
14
+ preserveWhitespace: {
15
+ type: Boolean,
16
+ default: !1
13
17
  }
14
18
  },
15
19
  setup(n) {
@@ -18,7 +22,10 @@ var c = /*@__PURE__*/ n({
18
22
  c.size ? `t-text--size-${c.size}` : null,
19
23
  c.tone === "default" ? null : `t-text--${c.tone}`,
20
24
  c.weight ? `t-text--weight-${c.weight}` : null,
21
- { "is-truncated": c.truncate }
25
+ {
26
+ "is-truncated": c.truncate,
27
+ "is-pre-wrap": c.preserveWhitespace && !c.truncate
28
+ }
22
29
  ]);
23
30
  return (e, c) => (i(), t(o(n.as), { class: r(l.value) }, {
24
31
  default: s(() => [a(e.$slots, "default")]),
@@ -1 +1 @@
1
- {"version":3,"file":"TText.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/components/TText.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\nconst _treeTextSizes = ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'] as const;\nconst _treeTextTones = ['default', 'muted', 'inverse', 'brand'] as const;\nconst _treeTextWeights = ['regular', 'medium', 'semibold', 'bold'] as const;\n\nexport type TTextSize = (typeof _treeTextSizes)[number];\nexport type TTextTone = (typeof _treeTextTones)[number];\nexport type TTextWeight = (typeof _treeTextWeights)[number];\n\nconst props = withDefaults(\n defineProps<{\n /** Element to render. Defaults to `span`; use `p`, `h1`–`h6`, `label`, … */\n as?: string;\n size?: TTextSize;\n tone?: TTextTone;\n weight?: TTextWeight;\n /** Truncate to a single line with an ellipsis. */\n truncate?: boolean;\n }>(),\n {\n as: 'span',\n size: undefined,\n tone: 'default',\n weight: undefined,\n truncate: false,\n },\n);\n\nconst classes = computed(() => [\n 't-text',\n props.size ? `t-text--size-${props.size}` : null,\n props.tone !== 'default' ? `t-text--${props.tone}` : null,\n props.weight ? `t-text--weight-${props.weight}` : null,\n { 'is-truncated': props.truncate },\n]);\n</script>\n\n<template>\n <component\n :is=\"as\"\n :class=\"classes\"\n >\n <slot />\n </component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;EAWA,IAAM,IAAQ,GAmBR,IAAU,QAAe;GAC7B;GACA,EAAM,OAAO,gBAAgB,EAAM,SAAS;GAC5C,EAAM,SAAS,YAAsC,OAA1B,WAAW,EAAM;GAC5C,EAAM,SAAS,kBAAkB,EAAM,WAAW;GAClD,EAAE,gBAAgB,EAAM,SAAS;EACnC,CAAC;yBAIC,EAKY,EAJL,EAAA,EAAE,GAAA,EACN,OAAK,EAAE,EAAA,KAAO,EAAA,GAAA;oBAEP,CAAR,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"TText.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/components/TText.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\nconst _treeTextSizes = ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'] as const;\nconst _treeTextTones = ['default', 'muted', 'inverse', 'brand'] as const;\nconst _treeTextWeights = ['regular', 'medium', 'semibold', 'bold'] as const;\n\nexport type TTextSize = (typeof _treeTextSizes)[number];\nexport type TTextTone = (typeof _treeTextTones)[number];\nexport type TTextWeight = (typeof _treeTextWeights)[number];\n\nconst props = withDefaults(\n defineProps<{\n /** Element to render. Defaults to `span`; use `p`, `h1`–`h6`, `label`, … */\n as?: string;\n size?: TTextSize;\n tone?: TTextTone;\n weight?: TTextWeight;\n /** Truncate to a single line with an ellipsis. */\n truncate?: boolean;\n /**\n * Preserve authored line breaks and paragraph spacing (`white-space: pre-wrap`)\n * while still wrapping long lines. Use for plain-text output such as AI\n * responses. Ignored when `truncate` is set, since the two conflict.\n */\n preserveWhitespace?: boolean;\n }>(),\n {\n as: 'span',\n size: undefined,\n tone: 'default',\n weight: undefined,\n truncate: false,\n preserveWhitespace: false,\n },\n);\n\nconst classes = computed(() => [\n 't-text',\n props.size ? `t-text--size-${props.size}` : null,\n props.tone !== 'default' ? `t-text--${props.tone}` : null,\n props.weight ? `t-text--weight-${props.weight}` : null,\n {\n 'is-truncated': props.truncate,\n 'is-pre-wrap': props.preserveWhitespace && !props.truncate,\n },\n]);\n</script>\n\n<template>\n <component\n :is=\"as\"\n :class=\"classes\"\n >\n <slot />\n </component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAWA,IAAM,IAAQ,GA0BR,IAAU,QAAe;GAC7B;GACA,EAAM,OAAO,gBAAgB,EAAM,SAAS;GAC5C,EAAM,SAAS,YAAsC,OAA1B,WAAW,EAAM;GAC5C,EAAM,SAAS,kBAAkB,EAAM,WAAW;GAClD;IACE,gBAAgB,EAAM;IACtB,eAAe,EAAM,sBAAsB,CAAC,EAAM;GACpD;EACF,CAAC;yBAIC,EAKY,EAJL,EAAA,EAAE,GAAA,EACN,OAAK,EAAE,EAAA,KAAO,EAAA,GAAA;oBAEP,CAAR,EAAQ,EAAA,QAAA,SAAA,CAAA,CAAA"}