@indielayer/ui 1.8.4 → 1.9.1

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 (119) hide show
  1. package/docs/pages/component/select/usage.vue +17 -5
  2. package/docs/pages/component/table/index.vue +7 -0
  3. package/docs/pages/component/table/usage.vue +5 -1
  4. package/docs/pages/component/table/virtual.vue +53 -0
  5. package/docs/pages/typography.vue +14 -12
  6. package/lib/components/accordion/Accordion.vue.d.ts +4 -4
  7. package/lib/components/accordion/AccordionItem.vue.d.ts +6 -6
  8. package/lib/components/accordion/AccordionItem.vue.js +51 -51
  9. package/lib/components/alert/Alert.vue.d.ts +8 -8
  10. package/lib/components/alert/Alert.vue2.js +20 -20
  11. package/lib/components/avatar/Avatar.vue.d.ts +4 -4
  12. package/lib/components/badge/Badge.vue.d.ts +4 -4
  13. package/lib/components/breadcrumbs/Breadcrumbs.vue.d.ts +4 -4
  14. package/lib/components/button/Button.vue.d.ts +5 -5
  15. package/lib/components/button/ButtonGroup.vue.d.ts +4 -4
  16. package/lib/components/card/Card.vue.d.ts +4 -4
  17. package/lib/components/carousel/Carousel.vue.d.ts +7 -7
  18. package/lib/components/carousel/CarouselSlide.vue.d.ts +4 -4
  19. package/lib/components/checkbox/Checkbox.vue.d.ts +6 -6
  20. package/lib/components/checkbox/Checkbox.vue2.js +60 -60
  21. package/lib/components/container/Container.vue.d.ts +4 -4
  22. package/lib/components/datepicker/Datepicker.vue.d.ts +6 -6
  23. package/lib/components/datepicker/Datepicker.vue.js +3 -3
  24. package/lib/components/divider/Divider.vue.d.ts +4 -4
  25. package/lib/components/drawer/Drawer.vue.d.ts +6 -6
  26. package/lib/components/drawer/Drawer.vue.js +1 -1
  27. package/lib/components/form/Form.vue.d.ts +5 -5
  28. package/lib/components/formGroup/FormGroup.vue.d.ts +6 -6
  29. package/lib/components/formGroup/FormGroup.vue.js +7 -7
  30. package/lib/components/icon/Icon.vue.d.ts +4 -4
  31. package/lib/components/image/Image.vue.d.ts +3 -3
  32. package/lib/components/input/Input.vue.d.ts +6 -6
  33. package/lib/components/inputFooter/InputFooter.vue.d.ts +3 -3
  34. package/lib/components/label/Label.vue.d.ts +4 -4
  35. package/lib/components/link/Link.vue.d.ts +4 -4
  36. package/lib/components/loader/Loader.vue.d.ts +4 -4
  37. package/lib/components/menu/Menu.vue.d.ts +5 -5
  38. package/lib/components/menu/MenuItem.vue.d.ts +5 -5
  39. package/lib/components/menu/MenuItem.vue2.js +1 -1
  40. package/lib/components/modal/Modal.vue.d.ts +6 -6
  41. package/lib/components/modal/Modal.vue.js +1 -1
  42. package/lib/components/notifications/Notifications.vue.d.ts +5 -5
  43. package/lib/components/pagination/Pagination.vue.d.ts +5 -5
  44. package/lib/components/pagination/Pagination.vue.js +41 -41
  45. package/lib/components/pagination/PaginationItem.vue.d.ts +6 -6
  46. package/lib/components/popover/Popover.vue.d.ts +8 -8
  47. package/lib/components/popover/Popover.vue.js +1 -1
  48. package/lib/components/popover/PopoverContainer.vue.d.ts +4 -4
  49. package/lib/components/progress/Progress.vue.d.ts +4 -4
  50. package/lib/components/qrCode/QrCode.vue.d.ts +4 -4
  51. package/lib/components/radio/Radio.vue.d.ts +6 -6
  52. package/lib/components/radio/Radio.vue2.js +63 -63
  53. package/lib/components/scroll/Scroll.vue.d.ts +6 -6
  54. package/lib/components/scroll/Scroll.vue2.js +1 -1
  55. package/lib/components/select/Select.vue.d.ts +42 -6
  56. package/lib/components/select/Select.vue.js +224 -201
  57. package/lib/components/select/theme/Select.base.theme.js +1 -1
  58. package/lib/components/skeleton/Skeleton.vue.d.ts +4 -4
  59. package/lib/components/skeleton/Skeleton.vue.js +17 -17
  60. package/lib/components/slider/Slider.vue.d.ts +6 -6
  61. package/lib/components/spacer/Spacer.d.ts +1 -1
  62. package/lib/components/spinner/Spinner.vue.d.ts +4 -4
  63. package/lib/components/stepper/Stepper.vue.d.ts +5 -5
  64. package/lib/components/tab/Tab.vue.d.ts +5 -5
  65. package/lib/components/tab/Tab.vue.js +1 -1
  66. package/lib/components/tab/TabGroup.vue.d.ts +5 -5
  67. package/lib/components/tab/TabGroup.vue.js +2 -2
  68. package/lib/components/table/Table.vue.d.ts +119 -24
  69. package/lib/components/table/Table.vue.js +226 -188
  70. package/lib/components/table/TableBody.d.ts +1 -1
  71. package/lib/components/table/TableCell.vue.d.ts +4 -4
  72. package/lib/components/table/TableHead.vue.d.ts +10 -2
  73. package/lib/components/table/TableHead.vue.js +16 -13
  74. package/lib/components/table/TableHeader.vue.d.ts +4 -8
  75. package/lib/components/table/TableHeader.vue.js +40 -41
  76. package/lib/components/table/TableRow.vue.d.ts +8 -4
  77. package/lib/components/table/TableRow.vue.js +3 -2
  78. package/lib/components/table/theme/TableHead.base.theme.js +7 -4
  79. package/lib/components/table/theme/TableHead.carbon.theme.js +7 -4
  80. package/lib/components/table/theme/TableHeader.base.theme.js +3 -3
  81. package/lib/components/table/theme/TableHeader.carbon.theme.js +1 -1
  82. package/lib/components/table/theme/TableRow.base.theme.js +1 -1
  83. package/lib/components/tag/Tag.vue.d.ts +5 -5
  84. package/lib/components/textarea/Textarea.vue.d.ts +6 -6
  85. package/lib/components/textarea/Textarea.vue.js +6 -6
  86. package/lib/components/themeProvider/ThemeProvider.vue.d.ts +3 -3
  87. package/lib/components/toggle/Toggle.vue.d.ts +6 -6
  88. package/lib/components/tooltip/ToggleTip.vue.d.ts +3 -3
  89. package/lib/components/tooltip/Tooltip.vue.d.ts +4 -4
  90. package/lib/components/tooltip/Tooltip.vue.js +1 -1
  91. package/lib/composables/index.d.ts +1 -0
  92. package/lib/composables/useInputtable.d.ts +26 -6
  93. package/lib/composables/useVirtualList.d.ts +48 -0
  94. package/lib/composables/useVirtualList.js +123 -0
  95. package/lib/index.js +35 -33
  96. package/lib/index.umd.js +4 -4
  97. package/lib/node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/core/index.js +412 -0
  98. package/lib/version.d.ts +1 -1
  99. package/lib/version.js +1 -1
  100. package/package.json +3 -3
  101. package/src/components/select/Select.vue +56 -26
  102. package/src/components/select/theme/Select.base.theme.ts +1 -1
  103. package/src/components/table/Table.vue +158 -114
  104. package/src/components/table/TableHead.vue +6 -2
  105. package/src/components/table/TableHeader.vue +0 -1
  106. package/src/components/table/TableRow.vue +1 -0
  107. package/src/components/table/theme/TableHead.base.theme.ts +7 -1
  108. package/src/components/table/theme/TableHead.carbon.theme.ts +7 -1
  109. package/src/components/table/theme/TableHeader.base.theme.ts +0 -2
  110. package/src/components/table/theme/TableHeader.carbon.theme.ts +0 -2
  111. package/src/components/table/theme/TableRow.base.theme.ts +4 -0
  112. package/src/composables/index.ts +1 -0
  113. package/src/composables/useVirtualList.ts +286 -0
  114. package/src/version.ts +1 -1
  115. package/lib/node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.9_typescript@5.2.2_/node_modules/@vueuse/core/index.js +0 -379
  116. /package/lib/node_modules/.pnpm/{@vuepic_vue-datepicker@8.3.2_vue@3.3.9_typescript@5.2.2_ → @vuepic_vue-datepicker@8.3.2_vue@3.5.10_typescript@5.2.2_}/node_modules/@vuepic/vue-datepicker/dist/main.css.js +0 -0
  117. /package/lib/node_modules/.pnpm/{@vuepic_vue-datepicker@8.3.2_vue@3.3.9_typescript@5.2.2_ → @vuepic_vue-datepicker@8.3.2_vue@3.5.10_typescript@5.2.2_}/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +0 -0
  118. /package/lib/node_modules/.pnpm/{@vueuse_shared@10.2.0_vue@3.3.9_typescript@5.2.2_ → @vueuse_shared@10.2.0_vue@3.5.10_typescript@5.2.2_}/node_modules/@vueuse/shared/index.js +0 -0
  119. /package/lib/node_modules/.pnpm/{floating-vue@5.2.2_@nuxt_kit@3.10.1_rollup@3.29.4__vue@3.3.9_typescript@5.2.2_ → floating-vue@5.2.2_@nuxt_kit@3.10.1_rollup@3.29.4__vue@3.5.10_typescript@5.2.2_}/node_modules/floating-vue/dist/floating-vue.js +0 -0
@@ -2,15 +2,25 @@
2
2
  import { ref } from 'vue'
3
3
 
4
4
  const selected = ref<undefined | string>()
5
+ const selected2 = ref<undefined | string>()
5
6
  const selectedMultiple = ref<string[]>(['A', 'B'])
6
7
  const options = ref([
7
8
  { value: 'A', label: 'Option A', disabled: true },
8
9
  { value: 'B', label: 'Option B' },
9
10
  ])
10
11
 
11
- for (let i = 0; i < 20; i++) {
12
- options.value.push({ value: i.toString(), label: 'Option ' + i })
12
+ // function to generate
13
+ function genOptions(x: number) {
14
+ const options = []
15
+
16
+ for (let i = 0; i < x; i++) {
17
+ options.push({ value: i.toString(), label: 'Option ' + i })
18
+ }
19
+
20
+ return options
13
21
  }
22
+
23
+ const options2 = ref(genOptions(1000))
14
24
  </script>
15
25
 
16
26
  <template>
@@ -25,11 +35,13 @@ for (let i = 0; i < 20; i++) {
25
35
  native
26
36
  />
27
37
  <x-select
28
- v-model="selected"
29
- label="Dropdown select"
38
+ v-model="selected2"
39
+ label="Filterable - virtual list"
30
40
  placeholder="Placeholder"
31
41
  filterable
32
- :options="options"
42
+ virtual-list
43
+ :virtual-list-item-height="33"
44
+ :options="options2"
33
45
  />
34
46
  <x-select
35
47
  v-model="selectedMultiple"
@@ -2,6 +2,8 @@
2
2
  import { XTable, XTableBody, XTableCell, XTableHead, XTableHeader, XTableRow } from '@indielayer/ui'
3
3
  import UsageDemoCode from './usage.vue?raw'
4
4
  import UsageDemo from './usage.vue'
5
+ import VirtualDemoCode from './virtual.vue?raw'
6
+ import VirtualDemo from './virtual.vue'
5
7
  import StatesDemoCode from './states.vue?raw'
6
8
  import StatesDemo from './states.vue'
7
9
 
@@ -13,6 +15,11 @@ const demos = [{
13
15
  description: '',
14
16
  code: UsageDemoCode,
15
17
  component: UsageDemo,
18
+ }, {
19
+ name: 'Virtual List',
20
+ description: '',
21
+ code: VirtualDemoCode,
22
+ component: VirtualDemo,
16
23
  }, {
17
24
  name: 'States',
18
25
  description: '',
@@ -60,6 +60,8 @@ const itemsSorted = computed<Book[]>(() => {
60
60
  return 0
61
61
  })
62
62
  })
63
+
64
+ const selectedIndex = ref<number>(0)
63
65
  </script>
64
66
 
65
67
  <template>
@@ -87,11 +89,13 @@ const itemsSorted = computed<Book[]>(() => {
87
89
  <x-card>
88
90
  <x-table
89
91
  v-model:sort="sort"
92
+ v-model:selected="selectedIndex"
90
93
  dense
94
+ pointer
91
95
  striped
92
96
  :headers="headers"
93
97
  :items="itemsSorted"
94
- @click-row="notifications?.log('open')"
98
+ @click-row="(event, index) => { notifications?.log(event); selectedIndex = index }"
95
99
  >
96
100
  <template #item-published="{ item }">
97
101
  {{ formatDate(item.published) }}
@@ -0,0 +1,53 @@
1
+ <script setup lang="ts">
2
+ import { type TableHeader } from '@indielayer/ui'
3
+ import { computed, ref } from 'vue'
4
+
5
+ const headers: TableHeader[] = [
6
+ { text: '#', value: 'id', sortable: true, align: 'center' },
7
+ { text: 'Title', value: 'title' },
8
+ { text: 'Description', value: 'description' },
9
+ { text: 'Published', value: 'published' },
10
+ { text: 'Status', value: 'status' },
11
+ ]
12
+
13
+ const sort = ref([])
14
+ const itemsSorted = computed<any[]>(() => {
15
+ const ite = items.value.slice(0)
16
+
17
+ return ite.sort((a: any, b: any) => {
18
+ for (const s of sort.value) {
19
+ const [key, asc] = (s as string).split(',')
20
+
21
+ if (a[key] > b[key]) return asc === '-1' ? -1 : 1
22
+ if (a[key] < b[key]) return asc === '-1' ? 1 : -1
23
+ }
24
+
25
+ return 0
26
+ })
27
+ })
28
+
29
+ function generateItems(x: number) {
30
+ return Array.from({ length: x }, (_, i) => ({
31
+ id: i + 1,
32
+ title: `Book ${i + 1}`,
33
+ description: 'Lorem ipsum dolor sit, amet consectetur adipisicing elit. Saepe, velit.',
34
+ published: Date.now() - x * i,
35
+ status: 'Tag label',
36
+ }))
37
+ }
38
+
39
+ const items = ref(generateItems(1000))
40
+ </script>
41
+
42
+ <template>
43
+ <x-card>
44
+ <x-table
45
+ v-model:sort="sort"
46
+ class="!h-80"
47
+ :headers="headers"
48
+ :items="itemsSorted"
49
+ virtual-list
50
+ :virtual-list-item-height="54"
51
+ />
52
+ </x-card>
53
+ </template>
@@ -70,18 +70,20 @@ const textClasses = {
70
70
 
71
71
  <div class="mt-10">
72
72
  <table class="text-left w-full">
73
- <tr>
74
- <th class="py-2">Class</th>
75
- <th>Size</th>
76
- <th>Line Height</th>
77
- <th>Preview</th>
78
- </tr>
79
- <tr v-for="(c, key) in textClasses" :key="key" class="border-t">
80
- <td class="py-2">{{ key }}</td>
81
- <td class="text-secondary-500 font-light">{{ c.size }}</td>
82
- <td class="text-secondary-500 font-light">{{ c.line }}</td>
83
- <td :class="key" class="max-w-lg truncate">Preview text</td>
84
- </tr>
73
+ <tbody>
74
+ <tr>
75
+ <th class="py-2">Class</th>
76
+ <th>Size</th>
77
+ <th>Line Height</th>
78
+ <th>Preview</th>
79
+ </tr>
80
+ <tr v-for="(c, key) in textClasses" :key="key" class="border-t">
81
+ <td class="py-2">{{ key }}</td>
82
+ <td class="text-secondary-500 font-light">{{ c.size }}</td>
83
+ <td class="text-secondary-500 font-light">{{ c.line }}</td>
84
+ <td :class="key" class="max-w-lg truncate">Preview text</td>
85
+ </tr>
86
+ </tbody>
85
87
  </table>
86
88
  </div>
87
89
 
@@ -21,7 +21,7 @@ export type AccordionInjection = AccordionProps & {
21
21
  type InternalClasses = 'wrapper';
22
22
  export interface AccordionTheme extends ThemeComponent<AccordionProps, InternalClasses> {
23
23
  }
24
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
24
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
25
25
  tag: {
26
26
  type: StringConstructor;
27
27
  default: string;
@@ -34,7 +34,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
34
34
  };
35
35
  icon: StringConstructor;
36
36
  iconAlign: PropType<"left" | "right">;
37
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
37
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
38
38
  tag: {
39
39
  type: StringConstructor;
40
40
  default: string;
@@ -47,12 +47,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
47
47
  };
48
48
  icon: StringConstructor;
49
49
  iconAlign: PropType<"left" | "right">;
50
- }>>, {
50
+ }>> & Readonly<{}>, {
51
51
  disabled: boolean;
52
52
  tag: string;
53
53
  expanded: boolean;
54
54
  showIcon: boolean;
55
- }, {}>, {
55
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
56
56
  default?(_: {}): any;
57
57
  }>;
58
58
  export default _default;
@@ -27,7 +27,7 @@ type InternalData = {
27
27
  };
28
28
  export interface AccordionItemTheme extends ThemeComponent<AccordionItemProps, InternalClasses, InternalData> {
29
29
  }
30
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
30
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
31
31
  tag: {
32
32
  type: StringConstructor;
33
33
  default: string;
@@ -43,11 +43,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
43
43
  type: PropType<"left" | "right">;
44
44
  default: string;
45
45
  };
46
- }, {
46
+ }>, {
47
47
  toggle: () => void;
48
48
  open: (anim?: boolean) => void;
49
49
  close: (anim?: boolean) => void;
50
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "expand")[], "change" | "expand", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
50
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "expand")[], "change" | "expand", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
51
51
  tag: {
52
52
  type: StringConstructor;
53
53
  default: string;
@@ -63,16 +63,16 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
63
63
  type: PropType<"left" | "right">;
64
64
  default: string;
65
65
  };
66
- }>> & {
66
+ }>> & Readonly<{
67
67
  onChange?: ((...args: any[]) => any) | undefined;
68
68
  onExpand?: ((...args: any[]) => any) | undefined;
69
- }, {
69
+ }>, {
70
70
  disabled: boolean;
71
71
  tag: string;
72
72
  expanded: boolean;
73
73
  showIcon: boolean;
74
74
  iconAlign: "left" | "right";
75
- }, {}>, {
75
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
76
76
  default?(_: {
77
77
  expand: (anim?: boolean) => void;
78
78
  collapsed: boolean;
@@ -1,4 +1,4 @@
1
- import { defineComponent as j, inject as z, computed as D, reactive as H, ref as h, watch as g, openBlock as s, createBlock as y, resolveDynamicComponent as F, normalizeStyle as K, unref as a, normalizeClass as l, withCtx as A, createElementVNode as r, renderSlot as u, createElementBlock as x, createCommentVNode as _, createVNode as M, Transition as X, withDirectives as q, vShow as G } from "vue";
1
+ import { defineComponent as j, inject as z, computed as D, reactive as H, ref as h, watch as g, openBlock as s, createBlock as y, resolveDynamicComponent as F, normalizeStyle as K, unref as a, normalizeClass as l, withCtx as A, createElementVNode as r, renderSlot as u, createElementBlock as x, createCommentVNode as k, createVNode as M, Transition as X, withDirectives as q, vShow as G } from "vue";
2
2
  import { useTheme as J } from "../../composables/useTheme.js";
3
3
  import O from "../icon/Icon.vue.js";
4
4
  import { injectAccordionKey as Q } from "../../composables/keys.js";
@@ -9,9 +9,7 @@ const R = { class: "flex-1 overflow-hidden" }, U = {
9
9
  fill: "none",
10
10
  role: "presentation",
11
11
  class: "stroke-2 w-4 h-4"
12
- }, W = /* @__PURE__ */ r("path", { d: "M19 9l-7 7-7-7" }, null, -1), Y = [
13
- W
14
- ], Z = ["left", "right"], ee = {
12
+ }, W = ["left", "right"], Y = {
15
13
  tag: {
16
14
  type: String,
17
15
  default: "div"
@@ -27,69 +25,69 @@ const R = { class: "flex-1 overflow-hidden" }, U = {
27
25
  type: String,
28
26
  default: "right"
29
27
  }
30
- }, oe = {
28
+ }, Z = {
31
29
  name: "XAccordionItem",
32
30
  validators: {
33
- iconAlign: Z
31
+ iconAlign: W
34
32
  }
35
- }, se = /* @__PURE__ */ j({
36
- ...oe,
37
- props: ee,
33
+ }, ie = /* @__PURE__ */ j({
34
+ ...Z,
35
+ props: Y,
38
36
  emits: ["expand", "change"],
39
- setup(k, { expose: w, emit: I }) {
40
- const i = k, p = I, f = z(Q, {
37
+ setup(w, { expose: I, emit: B }) {
38
+ const i = w, p = B, f = z(Q, {
41
39
  isInsideAccordion: !1
42
- }), B = D(() => f.iconAlign || i.iconAlign), b = H({
43
- iconAlign: B
44
- }), o = h(!i.expanded), t = h(!0);
40
+ }), b = D(() => f.iconAlign || i.iconAlign), C = H({
41
+ iconAlign: b
42
+ }), n = h(!i.expanded), o = h(!0);
45
43
  g(() => i.expanded, () => {
46
- o.value = !i.expanded;
47
- }), g(o, (e, n) => {
44
+ n.value = !i.expanded;
45
+ }), g(n, (e, t) => {
48
46
  p("change", !e);
49
47
  });
50
- function C(e) {
51
- t.value && (e.style.height = "0px");
48
+ function E(e) {
49
+ o.value && (e.style.height = "0px");
52
50
  }
53
- function E(e, n) {
54
- t.value ? (e.addEventListener("transitionend", n), setTimeout(() => {
51
+ function $(e, t) {
52
+ o.value ? (e.addEventListener("transitionend", t), setTimeout(() => {
55
53
  e.style.height = `${e.scrollHeight}px`;
56
- }, 1)) : n();
57
- }
58
- function $(e) {
59
- t.value ? e.style.removeProperty("height") : t.value = !0;
54
+ }, 1)) : t();
60
55
  }
61
56
  function S(e) {
62
- t.value && (e.style.height = `${e.scrollHeight}px`);
57
+ o.value ? e.style.removeProperty("height") : o.value = !0;
58
+ }
59
+ function L(e) {
60
+ o.value && (e.style.height = `${e.scrollHeight}px`);
63
61
  }
64
- function L(e, n) {
65
- t.value ? (e.addEventListener("transitionend", n), setTimeout(() => {
62
+ function P(e, t) {
63
+ o.value ? (e.addEventListener("transitionend", t), setTimeout(() => {
66
64
  e.style.height = "0px";
67
- }, 1)) : n();
65
+ }, 1)) : t();
68
66
  }
69
- function P(e) {
70
- t.value ? e.style.removeProperty("height") : t.value = !0;
67
+ function _(e) {
68
+ o.value ? e.style.removeProperty("height") : o.value = !0;
71
69
  }
72
70
  function m(e = !0) {
73
- t.value = e, o.value = !1;
71
+ o.value = e, n.value = !1;
74
72
  }
75
73
  function N(e = !0) {
76
- t.value = e, o.value = !0;
74
+ o.value = e, n.value = !0;
77
75
  }
78
76
  function v() {
79
- i.disabled || (o.value = !o.value);
77
+ i.disabled || (n.value = !n.value);
80
78
  }
81
79
  function c(e = !0) {
82
80
  m(e), p("expand");
83
81
  }
84
82
  const { styles: T, classes: d, className: V } = J("AccordionItem", {}, {
85
83
  ...i,
86
- ...b
87
- }, { collapsed: o, isInsideAccordion: f.isInsideAccordion });
88
- return w({ toggle: v, open: m, close: N }), (e, n) => (s(), y(F(e.tag), {
84
+ ...C
85
+ }, { collapsed: n, isInsideAccordion: f.isInsideAccordion });
86
+ return I({ toggle: v, open: m, close: N }), (e, t) => (s(), y(F(e.tag), {
89
87
  style: K(a(T)),
90
88
  class: l(a(V)),
91
89
  "aria-disabled": e.disabled,
92
- "aria-expanded": o.value ? "false" : "true"
90
+ "aria-expanded": n.value ? "false" : "true"
93
91
  }, {
94
92
  default: A(() => [
95
93
  r("button", {
@@ -100,7 +98,7 @@ const R = { class: "flex-1 overflow-hidden" }, U = {
100
98
  r("div", R, [
101
99
  u(e.$slots, "default", {
102
100
  expand: c,
103
- collapsed: o.value
101
+ collapsed: n.value
104
102
  })
105
103
  ]),
106
104
  e.showIcon ? (s(), x("div", {
@@ -110,21 +108,23 @@ const R = { class: "flex-1 overflow-hidden" }, U = {
110
108
  e.icon ? (s(), y(O, {
111
109
  key: 0,
112
110
  icon: e.icon
113
- }, null, 8, ["icon"])) : (s(), x("svg", U, Y))
114
- ], 2)) : _("", !0)
111
+ }, null, 8, ["icon"])) : (s(), x("svg", U, t[0] || (t[0] = [
112
+ r("path", { d: "M19 9l-7 7-7-7" }, null, -1)
113
+ ])))
114
+ ], 2)) : k("", !0)
115
115
  ], 2),
116
116
  e.$slots.summary ? u(e.$slots, "summary", {
117
117
  key: 0,
118
118
  expand: c,
119
- collapsed: o.value
120
- }) : _("", !0),
119
+ collapsed: n.value
120
+ }) : k("", !0),
121
121
  M(X, {
122
- onBeforeEnter: C,
123
- onEnter: E,
124
- onAfterEnter: $,
125
- onBeforeLeave: S,
126
- onLeave: L,
127
- onAfterLeave: P
122
+ onBeforeEnter: E,
123
+ onEnter: $,
124
+ onAfterEnter: S,
125
+ onBeforeLeave: L,
126
+ onLeave: P,
127
+ onAfterLeave: _
128
128
  }, {
129
129
  default: A(() => [
130
130
  q(r("div", {
@@ -132,10 +132,10 @@ const R = { class: "flex-1 overflow-hidden" }, U = {
132
132
  }, [
133
133
  u(e.$slots, "content", {
134
134
  expand: c,
135
- collapsed: o.value
135
+ collapsed: n.value
136
136
  })
137
137
  ], 2), [
138
- [G, !o.value]
138
+ [G, !n.value]
139
139
  ])
140
140
  ]),
141
141
  _: 3
@@ -146,5 +146,5 @@ const R = { class: "flex-1 overflow-hidden" }, U = {
146
146
  }
147
147
  });
148
148
  export {
149
- se as default
149
+ ie as default
150
150
  };
@@ -2,7 +2,7 @@ import { type ExtractPublicPropTypes, type PropType } from 'vue';
2
2
  import { type ThemeComponent } from '../../composables/useTheme';
3
3
  declare const alertType: readonly ["info", "success", "error", "warning"];
4
4
  declare const alertProps: {
5
- type: PropType<"info" | "success" | "error" | "warning">;
5
+ type: PropType<"error" | "info" | "success" | "warning">;
6
6
  glow: BooleanConstructor;
7
7
  light: BooleanConstructor;
8
8
  outlined: BooleanConstructor;
@@ -18,8 +18,8 @@ export type AlertProps = ExtractPublicPropTypes<typeof alertProps>;
18
18
  type InternalClasses = 'wrapper';
19
19
  export interface AlertTheme extends ThemeComponent<AlertProps, InternalClasses> {
20
20
  }
21
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
22
- type: PropType<"info" | "success" | "error" | "warning">;
21
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
22
+ type: PropType<"error" | "info" | "success" | "warning">;
23
23
  glow: BooleanConstructor;
24
24
  light: BooleanConstructor;
25
25
  outlined: BooleanConstructor;
@@ -29,8 +29,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
29
29
  readonly type: StringConstructor;
30
30
  readonly default: string | undefined;
31
31
  };
32
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "remove"[], "remove", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
33
- type: PropType<"info" | "success" | "error" | "warning">;
32
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "remove"[], "remove", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
33
+ type: PropType<"error" | "info" | "success" | "warning">;
34
34
  glow: BooleanConstructor;
35
35
  light: BooleanConstructor;
36
36
  outlined: BooleanConstructor;
@@ -40,15 +40,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
40
40
  readonly type: StringConstructor;
41
41
  readonly default: string | undefined;
42
42
  };
43
- }>> & {
43
+ }>> & Readonly<{
44
44
  onRemove?: ((...args: any[]) => any) | undefined;
45
- }, {
45
+ }>, {
46
46
  glow: boolean;
47
47
  light: boolean;
48
48
  outlined: boolean;
49
49
  removable: boolean;
50
50
  color: string;
51
- }, {}>, {
51
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
52
52
  icon?(_: {}): any;
53
53
  default?(_: {}): any;
54
54
  removeIcon?(_: {}): any;
@@ -1,9 +1,9 @@
1
- import { defineComponent as v, computed as g, openBlock as l, createElementBlock as a, normalizeStyle as k, unref as r, normalizeClass as b, renderSlot as t, createBlock as w, createCommentVNode as i, createElementVNode as n, Fragment as B, createVNode as $ } from "vue";
1
+ import { defineComponent as v, computed as g, openBlock as t, createElementBlock as a, normalizeStyle as k, unref as l, normalizeClass as b, renderSlot as n, createBlock as w, createCommentVNode as i, createElementVNode as s, Fragment as B, createVNode as $ } from "vue";
2
2
  import { useColors as I } from "../../composables/useColors.js";
3
3
  import { useTheme as C } from "../../composables/useTheme.js";
4
- import { infoIcon as h, successIcon as N, errorIcon as S, warningIcon as V, closeIcon as z } from "../../common/icons.js";
4
+ import { infoIcon as N, successIcon as S, errorIcon as V, warningIcon as z, closeIcon as A } from "../../common/icons.js";
5
5
  import c from "../icon/Icon.vue.js";
6
- const A = /* @__PURE__ */ n("div", { class: "flex-grow" }, null, -1), E = ["aria-label"], L = ["info", "success", "error", "warning"], T = {
6
+ const E = ["aria-label"], L = ["info", "success", "error", "warning"], T = {
7
7
  ...I.props(),
8
8
  type: String,
9
9
  glow: Boolean,
@@ -11,46 +11,46 @@ const A = /* @__PURE__ */ n("div", { class: "flex-grow" }, null, -1), E = ["aria
11
11
  outlined: Boolean,
12
12
  removable: Boolean,
13
13
  closeLabel: String
14
- }, _ = {
14
+ }, h = {
15
15
  name: "XAlert",
16
16
  validators: {
17
17
  type: L
18
18
  }
19
19
  }, D = /* @__PURE__ */ v({
20
- ..._,
20
+ ...h,
21
21
  props: T,
22
22
  emits: ["remove"],
23
23
  setup(m) {
24
- const o = m, p = g(() => o.type === "info" ? h : o.type === "success" ? N : o.type === "error" ? S : o.type === "warning" ? V : ""), { styles: u, classes: f, className: d } = C("Alert", {}, o);
25
- return (e, s) => (l(), a("div", {
26
- style: k(r(u)),
24
+ const o = m, p = g(() => o.type === "info" ? N : o.type === "success" ? S : o.type === "error" ? V : o.type === "warning" ? z : ""), { styles: u, classes: f, className: d } = C("Alert", {}, o);
25
+ return (e, r) => (t(), a("div", {
26
+ style: k(l(u)),
27
27
  class: b([
28
- r(d),
28
+ l(d),
29
29
  e.$style.alert,
30
30
  e.glow ? e.$style["alert--glow"] : "",
31
- r(f).wrapper
31
+ l(f).wrapper
32
32
  ])
33
33
  }, [
34
- t(e.$slots, "icon", {}, () => [
35
- e.type ? (l(), w(c, {
34
+ n(e.$slots, "icon", {}, () => [
35
+ e.type ? (t(), w(c, {
36
36
  key: 0,
37
37
  icon: p.value,
38
38
  class: "text-[color:var(--x-alert-icon)] dark:text-[color:var(--x-alert-dark-icon)]"
39
39
  }, null, 8, ["icon"])) : i("", !0)
40
40
  ]),
41
- n("div", null, [
42
- t(e.$slots, "default")
41
+ s("div", null, [
42
+ n(e.$slots, "default")
43
43
  ]),
44
- e.removable ? (l(), a(B, { key: 0 }, [
45
- A,
46
- n("button", {
44
+ e.removable ? (t(), a(B, { key: 0 }, [
45
+ r[1] || (r[1] = s("div", { class: "flex-grow" }, null, -1)),
46
+ s("button", {
47
47
  type: "button",
48
48
  class: "shrink-0",
49
49
  "aria-label": e.closeLabel,
50
- onClick: s[0] || (s[0] = (y) => e.$emit("remove", y))
50
+ onClick: r[0] || (r[0] = (y) => e.$emit("remove", y))
51
51
  }, [
52
- t(e.$slots, "removeIcon", {}, () => [
53
- $(c, { icon: r(z) }, null, 8, ["icon"])
52
+ n(e.$slots, "removeIcon", {}, () => [
53
+ $(c, { icon: l(A) }, null, 8, ["icon"])
54
54
  ])
55
55
  ], 8, E)
56
56
  ], 64)) : i("", !0)
@@ -27,7 +27,7 @@ type InternalExtraData = {
27
27
  };
28
28
  export interface AvatarTheme extends ThemeComponent<AvatarProps, InternalClasses, InternalExtraData> {
29
29
  }
30
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
30
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
31
31
  tag: {
32
32
  type: StringConstructor;
33
33
  default: string;
@@ -46,7 +46,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
46
46
  readonly default: "md";
47
47
  readonly validator: (value: string) => boolean;
48
48
  };
49
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
49
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
50
50
  tag: {
51
51
  type: StringConstructor;
52
52
  default: string;
@@ -65,13 +65,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
65
65
  readonly default: "md";
66
66
  readonly validator: (value: string) => boolean;
67
67
  };
68
- }>>, {
68
+ }>> & Readonly<{}>, {
69
69
  tag: string;
70
70
  outlined: boolean;
71
71
  color: string;
72
72
  rounded: boolean;
73
73
  size: import("../../composables/useCommon").Size;
74
- }, {}>, {
74
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
75
75
  avatarIcon?(_: {}): any;
76
76
  }>;
77
77
  export default _default;
@@ -40,7 +40,7 @@ export type BadgeProps = ExtractPublicPropTypes<typeof badgeProps>;
40
40
  type InternalClasses = 'wrapper';
41
41
  export interface BadgeTheme extends ThemeComponent<BadgeProps, InternalClasses> {
42
42
  }
43
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
43
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
44
44
  tag: {
45
45
  type: StringConstructor;
46
46
  default: string;
@@ -71,7 +71,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
71
71
  readonly default: "md";
72
72
  readonly validator: (value: string) => boolean;
73
73
  };
74
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
74
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
75
75
  tag: {
76
76
  type: StringConstructor;
77
77
  default: string;
@@ -102,7 +102,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
102
102
  readonly default: "md";
103
103
  readonly validator: (value: string) => boolean;
104
104
  };
105
- }>>, {
105
+ }>> & Readonly<{}>, {
106
106
  tag: string;
107
107
  outlined: boolean;
108
108
  color: string;
@@ -111,7 +111,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
111
111
  align: "left" | "right";
112
112
  animated: boolean;
113
113
  show: boolean;
114
- }, {}>, {
114
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
115
115
  default?(_: {}): any;
116
116
  content?(_: {}): any;
117
117
  }>;