@sewadah/selaras 0.2.0 → 0.3.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 (176) hide show
  1. package/README.md +36 -7
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +31 -15
  4. package/dist/runtime/components/Autocomplete.vue +3 -1
  5. package/dist/runtime/components/Badge.d.vue.ts +1 -1
  6. package/dist/runtime/components/Badge.vue.d.ts +1 -1
  7. package/dist/runtime/components/Calendar.d.vue.ts +69 -0
  8. package/dist/runtime/components/Calendar.vue +163 -0
  9. package/dist/runtime/components/Calendar.vue.d.ts +69 -0
  10. package/dist/runtime/components/Callout.vue +12 -1
  11. package/dist/runtime/components/CodeGroup.vue +13 -3
  12. package/dist/runtime/components/CodeTree.d.vue.ts +2 -0
  13. package/dist/runtime/components/CodeTree.vue +52 -1
  14. package/dist/runtime/components/CodeTree.vue.d.ts +2 -0
  15. package/dist/runtime/components/ColorPicker.d.vue.ts +8 -0
  16. package/dist/runtime/components/ColorPicker.vue +66 -45
  17. package/dist/runtime/components/ColorPicker.vue.d.ts +8 -0
  18. package/dist/runtime/components/Column.js +1 -1
  19. package/dist/runtime/components/CommandPalette.d.vue.ts +3 -1
  20. package/dist/runtime/components/CommandPalette.vue +5 -0
  21. package/dist/runtime/components/CommandPalette.vue.d.ts +3 -1
  22. package/dist/runtime/components/ContentNavigation.d.vue.ts +8 -1
  23. package/dist/runtime/components/ContentNavigation.vue +9 -2
  24. package/dist/runtime/components/ContentNavigation.vue.d.ts +8 -1
  25. package/dist/runtime/components/ContentToc.vue +14 -7
  26. package/dist/runtime/components/ContextMenu.d.vue.ts +8 -1
  27. package/dist/runtime/components/ContextMenu.vue +16 -4
  28. package/dist/runtime/components/ContextMenu.vue.d.ts +8 -1
  29. package/dist/runtime/components/DatePicker.d.vue.ts +10 -3
  30. package/dist/runtime/components/DatePicker.vue +24 -16
  31. package/dist/runtime/components/DatePicker.vue.d.ts +10 -3
  32. package/dist/runtime/components/Dropdown.d.vue.ts +33 -6
  33. package/dist/runtime/components/Dropdown.vue +143 -11
  34. package/dist/runtime/components/Dropdown.vue.d.ts +33 -6
  35. package/dist/runtime/components/FileTree.d.vue.ts +2 -0
  36. package/dist/runtime/components/FileTree.vue +8 -4
  37. package/dist/runtime/components/FileTree.vue.d.ts +2 -0
  38. package/dist/runtime/components/FileUpload.vue +1 -1
  39. package/dist/runtime/components/FormField.d.vue.ts +4 -0
  40. package/dist/runtime/components/FormField.vue +19 -4
  41. package/dist/runtime/components/FormField.vue.d.ts +4 -0
  42. package/dist/runtime/components/Input.vue +3 -2
  43. package/dist/runtime/components/Kbd.vue +12 -2
  44. package/dist/runtime/components/NavigationMenu.d.vue.ts +10 -10
  45. package/dist/runtime/components/NavigationMenu.vue +13 -7
  46. package/dist/runtime/components/NavigationMenu.vue.d.ts +10 -10
  47. package/dist/runtime/components/NavigationMenuAccordionItem.vue +5 -1
  48. package/dist/runtime/components/NavigationMenuFlyoutList.vue +7 -4
  49. package/dist/runtime/components/PinInput.vue +1 -1
  50. package/dist/runtime/components/Popover.d.vue.ts +8 -2
  51. package/dist/runtime/components/Popover.vue +9 -4
  52. package/dist/runtime/components/Popover.vue.d.ts +8 -2
  53. package/dist/runtime/components/ProsePre.d.vue.ts +6 -2
  54. package/dist/runtime/components/ProsePre.vue +11 -4
  55. package/dist/runtime/components/ProsePre.vue.d.ts +6 -2
  56. package/dist/runtime/components/Select.vue +3 -1
  57. package/dist/runtime/components/SplitterPanel.d.vue.ts +2 -2
  58. package/dist/runtime/components/SplitterPanel.vue.d.ts +2 -2
  59. package/dist/runtime/components/Table.vue +95 -26
  60. package/dist/runtime/components/Tabs.d.vue.ts +44 -4
  61. package/dist/runtime/components/Tabs.vue +171 -18
  62. package/dist/runtime/components/Tabs.vue.d.ts +44 -4
  63. package/dist/runtime/components/Textarea.vue +3 -2
  64. package/dist/runtime/components/Timeline.d.vue.ts +19 -0
  65. package/dist/runtime/components/Timeline.vue +99 -0
  66. package/dist/runtime/components/Timeline.vue.d.ts +19 -0
  67. package/dist/runtime/components/Toast.d.vue.ts +10 -1
  68. package/dist/runtime/components/Toast.vue +94 -8
  69. package/dist/runtime/components/Toast.vue.d.ts +10 -1
  70. package/dist/runtime/components/Tooltip.d.vue.ts +8 -2
  71. package/dist/runtime/components/Tooltip.vue +9 -4
  72. package/dist/runtime/components/Tooltip.vue.d.ts +8 -2
  73. package/dist/runtime/composables/use-form-field.d.ts +1 -0
  74. package/dist/runtime/composables/use-table.d.ts +3 -0
  75. package/dist/runtime/composables/use-table.js +10 -4
  76. package/dist/runtime/composables/use-toast.js +5 -1
  77. package/dist/runtime/default-colors.css +1 -1
  78. package/dist/runtime/directives/hotkey.d.ts +13 -0
  79. package/dist/runtime/directives/hotkey.js +107 -0
  80. package/dist/runtime/directives/index.d.ts +2 -0
  81. package/dist/runtime/directives/index.js +2 -0
  82. package/dist/runtime/directives/mask.d.ts +30 -0
  83. package/dist/runtime/directives/mask.js +165 -0
  84. package/dist/runtime/internal/ComboboxSelectBase.d.vue.ts +29 -25
  85. package/dist/runtime/internal/ComboboxSelectBase.vue +104 -20
  86. package/dist/runtime/internal/ComboboxSelectBase.vue.d.ts +29 -25
  87. package/dist/runtime/internal/ComboboxSelectBody.d.vue.ts +16 -11
  88. package/dist/runtime/internal/ComboboxSelectBody.vue +49 -10
  89. package/dist/runtime/internal/ComboboxSelectBody.vue.d.ts +16 -11
  90. package/dist/runtime/internal/DatePickerCalendarBody.vue +1 -1
  91. package/dist/runtime/internal/DatePickerRangeCalendarBody.vue +1 -1
  92. package/dist/runtime/internal/ShortcutHint.d.vue.ts +6 -0
  93. package/dist/runtime/internal/ShortcutHint.vue +13 -0
  94. package/dist/runtime/internal/ShortcutHint.vue.d.ts +6 -0
  95. package/dist/runtime/internal/ToastItemRenderer.d.vue.ts +9 -1
  96. package/dist/runtime/internal/ToastItemRenderer.vue +55 -8
  97. package/dist/runtime/internal/ToastItemRenderer.vue.d.ts +9 -1
  98. package/dist/runtime/internal/combobox-select.js +2 -1
  99. package/dist/runtime/internal/programmatic-services.d.ts +2 -0
  100. package/dist/runtime/internal/programmatic-services.js +8 -0
  101. package/dist/runtime/internal/toast-stack.d.ts +36 -0
  102. package/dist/runtime/internal/toast-stack.js +36 -0
  103. package/dist/runtime/structural.css +1 -1
  104. package/dist/runtime/table.d.ts +1 -1
  105. package/dist/runtime/theme/alert-dialog.js +1 -1
  106. package/dist/runtime/theme/avatar.js +7 -7
  107. package/dist/runtime/theme/badge.js +2 -2
  108. package/dist/runtime/theme/calendar.d.ts +86 -0
  109. package/dist/runtime/theme/calendar.js +19 -0
  110. package/dist/runtime/theme/callout.d.ts +0 -12
  111. package/dist/runtime/theme/callout.js +8 -8
  112. package/dist/runtime/theme/checkbox.js +1 -1
  113. package/dist/runtime/theme/code-tree.js +1 -1
  114. package/dist/runtime/theme/command-palette.js +1 -1
  115. package/dist/runtime/theme/content-navigation.d.ts +3 -0
  116. package/dist/runtime/theme/content-navigation.js +1 -0
  117. package/dist/runtime/theme/date-picker.js +1 -1
  118. package/dist/runtime/theme/drawer.js +1 -1
  119. package/dist/runtime/theme/dropdown.d.ts +21 -0
  120. package/dist/runtime/theme/dropdown.js +15 -2
  121. package/dist/runtime/theme/file-tree.js +1 -1
  122. package/dist/runtime/theme/file-upload.js +2 -2
  123. package/dist/runtime/theme/form-field.d.ts +18 -0
  124. package/dist/runtime/theme/form-field.js +6 -1
  125. package/dist/runtime/theme/icon.js +1 -1
  126. package/dist/runtime/theme/input-number.js +1 -1
  127. package/dist/runtime/theme/input.js +1 -1
  128. package/dist/runtime/theme/modal.js +1 -1
  129. package/dist/runtime/theme/pin-input.js +1 -1
  130. package/dist/runtime/theme/progress.js +2 -2
  131. package/dist/runtime/theme/prose.d.ts +6 -0
  132. package/dist/runtime/theme/prose.js +2 -0
  133. package/dist/runtime/theme/radio-group.js +4 -4
  134. package/dist/runtime/theme/rating.js +1 -1
  135. package/dist/runtime/theme/select.js +2 -2
  136. package/dist/runtime/theme/separator.js +1 -1
  137. package/dist/runtime/theme/slideover.js +1 -1
  138. package/dist/runtime/theme/slider.js +2 -2
  139. package/dist/runtime/theme/splitter-resize-handle.js +1 -1
  140. package/dist/runtime/theme/switch.js +1 -1
  141. package/dist/runtime/theme/table.d.ts +27 -0
  142. package/dist/runtime/theme/table.js +11 -2
  143. package/dist/runtime/theme/tabs.d.ts +87 -3
  144. package/dist/runtime/theme/tabs.js +46 -22
  145. package/dist/runtime/theme/textarea.js +1 -1
  146. package/dist/runtime/theme/timeline.d.ts +251 -0
  147. package/dist/runtime/theme/timeline.js +84 -0
  148. package/dist/runtime/theme/toast.d.ts +92 -0
  149. package/dist/runtime/theme/toast.js +29 -7
  150. package/dist/runtime/theme-config.d.ts +12 -1
  151. package/dist/runtime/types/index.d.ts +6 -1
  152. package/dist/runtime/utils/arrow.d.ts +21 -0
  153. package/dist/runtime/utils/arrow.js +10 -0
  154. package/dist/runtime/utils/color-registry.d.ts +3 -1
  155. package/dist/runtime/utils/color-registry.js +4 -0
  156. package/dist/runtime/utils/file-icons.d.ts +8 -0
  157. package/dist/runtime/utils/file-icons.js +133 -0
  158. package/dist/runtime/utils/functional-tokens.d.ts +1 -1
  159. package/dist/runtime/utils/functional-tokens.js +1 -1
  160. package/dist/runtime/utils/icons.d.ts +2 -0
  161. package/dist/runtime/utils/icons.js +2 -0
  162. package/dist/runtime/utils/messages.d.ts +6 -0
  163. package/dist/runtime/utils/messages.js +6 -0
  164. package/dist/runtime/utils/navigation-menu.d.ts +10 -0
  165. package/dist/runtime/utils/navigation-menu.js +3 -0
  166. package/dist/runtime/utils/overlay.d.ts +17 -0
  167. package/dist/runtime/utils/overlay.js +7 -0
  168. package/dist/runtime/utils/seed-colors.d.ts +2 -1
  169. package/dist/runtime/utils/seed-colors.js +24 -16
  170. package/dist/runtime/utils/select-contracts.d.ts +7 -1
  171. package/dist/runtime/utils/table-columns.js +1 -1
  172. package/dist/runtime/utils/table-contracts.d.ts +9 -1
  173. package/dist/runtime/utils/timeline-contracts.d.ts +42 -0
  174. package/dist/runtime/utils/timeline-contracts.js +0 -0
  175. package/dist/tokens/default-colors.tokens.json +100 -100
  176. package/package.json +21 -9
@@ -3,6 +3,9 @@ export interface ComboboxSelectBodyProps {
3
3
  listbox?: boolean;
4
4
  searchable?: boolean;
5
5
  creatable?: boolean;
6
+ multiple?: boolean;
7
+ forceSelection?: boolean;
8
+ selectedValues?: (string | number)[];
6
9
  searchText: string;
7
10
  displayValue: (value: unknown) => string;
8
11
  items: SelectItems;
@@ -30,15 +33,15 @@ export interface ComboboxSelectBodyEmits {
30
33
  'update:searchText': [value: string];
31
34
  }
32
35
  declare function focusSearch(): boolean;
33
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_21: {}, __VLS_29: {}, __VLS_37: {}, __VLS_57: {
36
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_21: {}, __VLS_29: {}, __VLS_31: {}, __VLS_39: {}, __VLS_61: {
34
37
  item: SelectOption<import("../utils/select-contracts.js").SelectValue>;
35
- }, __VLS_82: {
38
+ }, __VLS_92: {
36
39
  group: import("./combobox-select.js").SelectOptionGroup<import("../utils/select-contracts.js").SelectValue>;
37
- }, __VLS_90: {
40
+ }, __VLS_102: {
38
41
  item: SelectOption<import("../utils/select-contracts.js").SelectValue>;
39
- }, __VLS_109: {
42
+ }, __VLS_123: {
40
43
  item: SelectOption<import("../utils/select-contracts.js").SelectValue>;
41
- }, __VLS_122: {};
44
+ }, __VLS_136: {};
42
45
  type __VLS_Slots = {} & {
43
46
  header?: (props: typeof __VLS_1) => any;
44
47
  } & {
@@ -48,17 +51,19 @@ type __VLS_Slots = {} & {
48
51
  } & {
49
52
  'empty-filter'?: (props: typeof __VLS_29) => any;
50
53
  } & {
51
- 'empty-filter'?: (props: typeof __VLS_37) => any;
54
+ 'empty-filter'?: (props: typeof __VLS_31) => any;
52
55
  } & {
53
- item?: (props: typeof __VLS_57) => any;
56
+ 'empty-filter'?: (props: typeof __VLS_39) => any;
54
57
  } & {
55
- group?: (props: typeof __VLS_82) => any;
58
+ item?: (props: typeof __VLS_61) => any;
56
59
  } & {
57
- item?: (props: typeof __VLS_90) => any;
60
+ group?: (props: typeof __VLS_92) => any;
58
61
  } & {
59
- item?: (props: typeof __VLS_109) => any;
62
+ item?: (props: typeof __VLS_102) => any;
60
63
  } & {
61
- footer?: (props: typeof __VLS_122) => any;
64
+ item?: (props: typeof __VLS_123) => any;
65
+ } & {
66
+ footer?: (props: typeof __VLS_136) => any;
62
67
  };
63
68
  declare const __VLS_base: import("vue").DefineComponent<ComboboxSelectBodyProps, {
64
69
  focusSearch: typeof focusSearch;
@@ -27,6 +27,9 @@ const props = defineProps({
27
27
  listbox: { type: Boolean, required: false },
28
28
  searchable: { type: Boolean, required: false },
29
29
  creatable: { type: Boolean, required: false },
30
+ multiple: { type: Boolean, required: false },
31
+ forceSelection: { type: Boolean, required: false },
32
+ selectedValues: { type: Array, required: false },
30
33
  searchText: { type: String, required: true },
31
34
  displayValue: { type: Function, required: true },
32
35
  items: { type: null, required: true },
@@ -53,10 +56,29 @@ const searchInput = ref();
53
56
  const { contains } = useFilter({ sensitivity: "base" });
54
57
  const primitives = computed(() => props.listbox ? { input: ListboxFilter, viewport: ListboxContent, group: ListboxGroup, label: ListboxGroupLabel, item: ListboxItem, indicator: ListboxItemIndicator, virtualizer: ListboxVirtualizer } : { input: ComboboxInput, viewport: ComboboxViewport, group: ComboboxGroup, label: ComboboxLabel, item: ComboboxItem, indicator: ComboboxItemIndicator, virtualizer: ComboboxVirtualizer });
55
58
  function matches(option) {
56
- return !props.listbox || !props.searchable || contains(option.label, props.searchText);
59
+ return !(props.listbox || props.creatable && props.multiple) || !props.searchable || contains(option.label, props.searchText);
57
60
  }
58
61
  const visibleOptions = computed(() => props.flatOptions.filter(matches));
59
- const virtualOptions = computed(() => props.listbox ? visibleOptions.value : props.virtualizedOptions);
62
+ const createText = computed(() => {
63
+ if (!props.creatable || !props.multiple || props.forceSelection)
64
+ return "";
65
+ const text = props.searchText.trim();
66
+ const lower = text.toLowerCase();
67
+ if (!text || props.flatOptions.some((option) => String(option.value).toLowerCase() === lower || option.label.toLowerCase() === lower) || props.selectedValues?.some((value) => typeof value === "string" && value.toLowerCase() === lower)) {
68
+ return "";
69
+ }
70
+ return text;
71
+ });
72
+ const virtualOptions = computed(() => {
73
+ const options = props.listbox ? visibleOptions.value : props.virtualizedOptions;
74
+ return createText.value ? [{ value: createText.value, label: messages.value.createOption(createText.value), disabled: false, raw: void 0 }, ...options] : options;
75
+ });
76
+ function onItemSelect(event, value) {
77
+ if (!props.creatable || !props.multiple || !props.selectedValues?.includes(value))
78
+ return;
79
+ event.preventDefault();
80
+ emit("update:searchText", "");
81
+ }
60
82
  const filterInputProps = computed(() => mergeProps(
61
83
  props.listbox ? { "role": "combobox", "aria-autocomplete": "list", "aria-expanded": true, "aria-controls": listboxId, "aria-label": messages.value.search } : { displayValue: props.displayValue },
62
84
  props.searchInputProps ?? {}
@@ -90,18 +112,23 @@ defineExpose({ focusSearch });
90
112
  />
91
113
  </div>
92
114
 
93
- <div v-if="flatOptions.length === 0" v-bind="emptyProps">
115
+ <div v-if="flatOptions.length === 0 && !createText" v-bind="emptyProps">
94
116
  <slot name="empty">
95
117
  {{ messages.noOptions }}
96
118
  </slot>
97
119
  </div>
98
120
  <component :is="primitives.viewport" v-else :id="listbox ? listboxId : void 0" v-bind="viewportProps">
99
- <div v-if="listbox && visibleOptions.length === 0" v-bind="emptyProps">
121
+ <div v-if="listbox && visibleOptions.length === 0 && !createText" v-bind="emptyProps">
100
122
  <slot name="empty-filter">
101
123
  {{ messages.noResultsFound }}
102
124
  </slot>
103
125
  </div>
104
- <ComboboxEmpty v-else-if="!listbox" v-bind="emptyProps">
126
+ <div v-else-if="creatable && multiple && visibleOptions.length === 0 && !createText" v-bind="emptyProps">
127
+ <slot name="empty-filter">
128
+ {{ messages.noResultsFound }}
129
+ </slot>
130
+ </div>
131
+ <ComboboxEmpty v-else-if="!listbox && !(creatable && multiple)" v-bind="emptyProps">
105
132
  <slot name="empty-filter">
106
133
  {{ messages.noResultsFound }}
107
134
  </slot>
@@ -121,20 +148,30 @@ defineExpose({ focusSearch });
121
148
  :key="String(virtualItem.key)"
122
149
  :value="option.value"
123
150
  :disabled="option.disabled"
151
+ :data-selaras-create-option="!option.raw || void 0"
124
152
  :style="{ position: 'absolute', top: 0, left: 0, right: 0, transform: `translateY(${virtualItem.start}px)`, height: `${virtualItem.size}px` }"
125
153
  v-bind="itemProps"
154
+ @select="onItemSelect($event, option.value)"
126
155
  >
127
- <slot name="item" :item="option.raw">
156
+ <template v-if="!option.raw">
128
157
  {{ option.label }}
129
- </slot>
130
- <component :is="primitives.indicator" v-bind="itemIndicatorProps">
131
- <Icon :name="icons.check" class="size-4" />
132
- </component>
158
+ </template>
159
+ <template v-else>
160
+ <slot name="item" :item="option.raw">
161
+ {{ option.label }}
162
+ </slot>
163
+ <component :is="primitives.indicator" v-bind="itemIndicatorProps">
164
+ <Icon :name="icons.check" class="size-4" />
165
+ </component>
166
+ </template>
133
167
  </component>
134
168
  </component>
135
169
  </ClientOnly>
136
170
 
137
171
  <template v-else>
172
+ <component :is="primitives.item" v-if="createText" :value="createText" data-selaras-create-option v-bind="itemProps">
173
+ {{ messages.createOption(createText) }}
174
+ </component>
138
175
  <template v-for="(entry, index) in items" :key="index">
139
176
  <component :is="primitives.group" v-if="isOptionGroup(entry) && groupOptions(entry).some(matches)">
140
177
  <component :is="primitives.label" v-bind="groupProps">
@@ -149,6 +186,7 @@ defineExpose({ focusSearch });
149
186
  :value="option.value"
150
187
  :disabled="option.disabled"
151
188
  v-bind="itemProps"
189
+ @select="onItemSelect($event, option.value)"
152
190
  >
153
191
  <slot name="item" :item="option.raw">
154
192
  {{ option.label }}
@@ -164,6 +202,7 @@ defineExpose({ focusSearch });
164
202
  :value="toOption(entry).value"
165
203
  :disabled="toOption(entry).disabled"
166
204
  v-bind="itemProps"
205
+ @select="onItemSelect($event, toOption(entry).value)"
167
206
  >
168
207
  <slot name="item" :item="entry">
169
208
  {{ toOption(entry).label }}
@@ -3,6 +3,9 @@ export interface ComboboxSelectBodyProps {
3
3
  listbox?: boolean;
4
4
  searchable?: boolean;
5
5
  creatable?: boolean;
6
+ multiple?: boolean;
7
+ forceSelection?: boolean;
8
+ selectedValues?: (string | number)[];
6
9
  searchText: string;
7
10
  displayValue: (value: unknown) => string;
8
11
  items: SelectItems;
@@ -30,15 +33,15 @@ export interface ComboboxSelectBodyEmits {
30
33
  'update:searchText': [value: string];
31
34
  }
32
35
  declare function focusSearch(): boolean;
33
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_21: {}, __VLS_29: {}, __VLS_37: {}, __VLS_57: {
36
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_21: {}, __VLS_29: {}, __VLS_31: {}, __VLS_39: {}, __VLS_61: {
34
37
  item: SelectOption<import("../utils/select-contracts.js").SelectValue>;
35
- }, __VLS_82: {
38
+ }, __VLS_92: {
36
39
  group: import("./combobox-select.js").SelectOptionGroup<import("../utils/select-contracts.js").SelectValue>;
37
- }, __VLS_90: {
40
+ }, __VLS_102: {
38
41
  item: SelectOption<import("../utils/select-contracts.js").SelectValue>;
39
- }, __VLS_109: {
42
+ }, __VLS_123: {
40
43
  item: SelectOption<import("../utils/select-contracts.js").SelectValue>;
41
- }, __VLS_122: {};
44
+ }, __VLS_136: {};
42
45
  type __VLS_Slots = {} & {
43
46
  header?: (props: typeof __VLS_1) => any;
44
47
  } & {
@@ -48,17 +51,19 @@ type __VLS_Slots = {} & {
48
51
  } & {
49
52
  'empty-filter'?: (props: typeof __VLS_29) => any;
50
53
  } & {
51
- 'empty-filter'?: (props: typeof __VLS_37) => any;
54
+ 'empty-filter'?: (props: typeof __VLS_31) => any;
52
55
  } & {
53
- item?: (props: typeof __VLS_57) => any;
56
+ 'empty-filter'?: (props: typeof __VLS_39) => any;
54
57
  } & {
55
- group?: (props: typeof __VLS_82) => any;
58
+ item?: (props: typeof __VLS_61) => any;
56
59
  } & {
57
- item?: (props: typeof __VLS_90) => any;
60
+ group?: (props: typeof __VLS_92) => any;
58
61
  } & {
59
- item?: (props: typeof __VLS_109) => any;
62
+ item?: (props: typeof __VLS_102) => any;
60
63
  } & {
61
- footer?: (props: typeof __VLS_122) => any;
64
+ item?: (props: typeof __VLS_123) => any;
65
+ } & {
66
+ footer?: (props: typeof __VLS_136) => any;
62
67
  };
63
68
  declare const __VLS_base: import("vue").DefineComponent<ComboboxSelectBodyProps, {
64
69
  focusSearch: typeof focusSearch;
@@ -120,7 +120,7 @@ const cellTriggerUi = {
120
120
  <DatePickerGrid v-for="month in grid" :key="month.value.toString()" v-bind="gridProps">
121
121
  <DatePickerGridHead v-bind="gridHeadProps">
122
122
  <DatePickerGridRow>
123
- <DatePickerHeadCell v-for="day in weekDays" :key="day" v-bind="headCellProps">
123
+ <DatePickerHeadCell v-for="(day, index) in weekDays" :key="index" v-bind="headCellProps">
124
124
  {{ day }}
125
125
  </DatePickerHeadCell>
126
126
  </DatePickerGridRow>
@@ -51,7 +51,7 @@ const rangeCellTriggerUi = {
51
51
  <DateRangePickerGrid v-for="month in grid" :key="month.value.toString()" v-bind="gridProps">
52
52
  <DateRangePickerGridHead v-bind="gridHeadProps">
53
53
  <DateRangePickerGridRow>
54
- <DateRangePickerHeadCell v-for="day in weekDays" :key="day" v-bind="headCellProps">
54
+ <DateRangePickerHeadCell v-for="(day, index) in weekDays" :key="index" v-bind="headCellProps">
55
55
  {{ day }}
56
56
  </DateRangePickerHeadCell>
57
57
  </DateRangePickerGridRow>
@@ -0,0 +1,6 @@
1
+ type __VLS_Props = {
2
+ shortcut?: string;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -0,0 +1,13 @@
1
+ <script setup>
2
+ import Kbd from "../components/Kbd.vue";
3
+ import { applyClassPrefix } from "../utils/ui";
4
+ defineProps({
5
+ shortcut: { type: String, required: false }
6
+ });
7
+ </script>
8
+
9
+ <template>
10
+ <span v-if="shortcut" :class="applyClassPrefix('ms-auto inline-flex items-center gap-1')" aria-hidden="true">
11
+ <Kbd v-for="key in shortcut.split('+')" :key="key" :value="key.trim()" size="sm" />
12
+ </span>
13
+ </template>
@@ -0,0 +1,6 @@
1
+ type __VLS_Props = {
2
+ shortcut?: string;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -1,14 +1,22 @@
1
- import type { ToastThemeSlots } from '../theme/toast.js';
1
+ import type { ToastPosition, ToastThemeSlots } from '../theme/toast.js';
2
2
  import type { UiProp } from '../utils/ui.js';
3
3
  import type { ToastItem } from './programmatic-services.js';
4
+ import type { ToastStackItem } from './toast-stack.js';
4
5
  type __VLS_Props = {
5
6
  toast: ToastItem;
6
7
  ui?: UiProp<ToastThemeSlots>;
8
+ duration: number;
9
+ expand: boolean;
10
+ position: ToastPosition;
11
+ placement: ToastStackItem | undefined;
12
+ leaving: boolean;
7
13
  };
8
14
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
15
  remove: (id: number) => any;
16
+ resize: (height: number) => any;
10
17
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
18
  onRemove?: ((id: number) => any) | undefined;
19
+ onResize?: ((height: number) => any) | undefined;
12
20
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
21
  declare const _default: typeof __VLS_export;
14
22
  export default _default;
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
2
  import { ToastClose, ToastDescription, ToastRoot, ToastTitle } from "reka-ui";
3
- import { computed } from "vue";
3
+ import { computed, ref, watch } from "vue";
4
4
  import Button from "../components/Button.vue";
5
5
  import Icon from "../components/Icon.vue";
6
6
  import { useIcons } from "../composables/use-icons";
@@ -11,16 +11,62 @@ import { resolveRegisteredColorRole } from "../utils/registered-colors";
11
11
  import { resolveSlot, useComponentTheme, useThemeBindings } from "../utils/ui";
12
12
  const props = defineProps({
13
13
  toast: { type: Object, required: true },
14
- ui: { type: Object, required: false }
14
+ ui: { type: Object, required: false },
15
+ duration: { type: Number, required: true },
16
+ expand: { type: Boolean, required: true },
17
+ position: { type: null, required: true },
18
+ placement: { type: null, required: true },
19
+ leaving: { type: Boolean, required: true }
15
20
  });
16
- const emit = defineEmits(["remove"]);
21
+ const emit = defineEmits(["remove", "resize"]);
22
+ const rootElement = ref(null);
23
+ function setRootElement(instance) {
24
+ if (typeof HTMLElement === "undefined")
25
+ return;
26
+ const element = instance instanceof HTMLElement ? instance : instance?.$el;
27
+ if (element instanceof HTMLElement)
28
+ rootElement.value = element;
29
+ }
30
+ const placement = ref(props.placement);
31
+ watch(() => [props.placement, props.leaving], ([next, leaving]) => {
32
+ if (!leaving && next)
33
+ placement.value = next;
34
+ });
35
+ const clamped = computed(() => placement.value?.height !== void 0);
36
+ watch(rootElement, (element, _previous, onCleanup) => {
37
+ if (!element)
38
+ return;
39
+ const updateHeight = () => {
40
+ if (!clamped.value && !props.leaving)
41
+ emit("resize", element.offsetHeight);
42
+ };
43
+ updateHeight();
44
+ if (typeof ResizeObserver === "undefined")
45
+ return;
46
+ const observer = new ResizeObserver(updateHeight);
47
+ observer.observe(element);
48
+ onCleanup(() => observer.disconnect());
49
+ }, { flush: "post" });
17
50
  const icons = useIcons();
18
51
  const messages = useMessages();
19
52
  const theme = useComponentTheme("toast", toastTheme);
20
53
  const themeBindings = useThemeBindings();
21
54
  const effectiveColor = computed(() => props.toast.color ? resolveRegisteredColorRole(props.toast.color, "info") : void 0);
22
- const itemUi = computed(() => theme.value({ color: effectiveColor.value }));
55
+ const itemUi = computed(() => theme.value({
56
+ color: effectiveColor.value,
57
+ expand: props.expand,
58
+ position: props.position
59
+ }));
23
60
  const rootProps = computed(() => resolveSlot(itemUi.value.root, props.ui?.root));
61
+ const rootBindings = computed(() => ({
62
+ ...rootProps.value,
63
+ "data-stack": placement.value?.state,
64
+ "style": [
65
+ themeBindings.value.style,
66
+ placement.value && { transform: placement.value.transform, height: placement.value.height, zIndex: placement.value.zIndex },
67
+ rootProps.value.style
68
+ ]
69
+ }));
24
70
  const iconProps = computed(() => resolveSlot(itemUi.value.icon, props.ui?.icon));
25
71
  const titleProps = computed(() => resolveSlot(itemUi.value.title, props.ui?.title));
26
72
  const descriptionProps = computed(() => resolveSlot(itemUi.value.description, props.ui?.description));
@@ -30,12 +76,13 @@ const iconName = computed(() => props.toast.icon ?? (effectiveColor.value && isF
30
76
 
31
77
  <template>
32
78
  <ToastRoot
33
- :duration="toast.duration ?? 5e3"
79
+ :ref="setRootElement"
80
+ :duration="toast.duration ?? duration"
34
81
  :data-selaras-theme="themeBindings['data-selaras-theme']"
35
82
  :data-selaras-mode="themeBindings['data-selaras-mode']"
36
83
  :data-selaras-color="effectiveColor"
37
- :style="themeBindings.style"
38
- v-bind="rootProps"
84
+ :open="!leaving"
85
+ v-bind="rootBindings"
39
86
  @update:open="(open) => !open && emit('remove', toast.id)"
40
87
  >
41
88
  <Icon v-if="iconName" :name="iconName" v-bind="iconProps" />
@@ -48,7 +95,7 @@ const iconName = computed(() => props.toast.icon ?? (effectiveColor.value && isF
48
95
  </ToastDescription>
49
96
  </div>
50
97
  <ToastClose as-child>
51
- <Button size="sm" variant="ghost" color="neutral" :icon="icons.close" :aria-label="messages.close" v-bind="closeProps" />
98
+ <Button size="sm" variant="ghost" :color="effectiveColor ?? 'neutral'" :icon="icons.close" :aria-label="messages.close" v-bind="closeProps" />
52
99
  </ToastClose>
53
100
  </ToastRoot>
54
101
  </template>
@@ -1,14 +1,22 @@
1
- import type { ToastThemeSlots } from '../theme/toast.js';
1
+ import type { ToastPosition, ToastThemeSlots } from '../theme/toast.js';
2
2
  import type { UiProp } from '../utils/ui.js';
3
3
  import type { ToastItem } from './programmatic-services.js';
4
+ import type { ToastStackItem } from './toast-stack.js';
4
5
  type __VLS_Props = {
5
6
  toast: ToastItem;
6
7
  ui?: UiProp<ToastThemeSlots>;
8
+ duration: number;
9
+ expand: boolean;
10
+ position: ToastPosition;
11
+ placement: ToastStackItem | undefined;
12
+ leaving: boolean;
7
13
  };
8
14
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
15
  remove: (id: number) => any;
16
+ resize: (height: number) => any;
10
17
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
18
  onRemove?: ((id: number) => any) | undefined;
19
+ onResize?: ((height: number) => any) | undefined;
12
20
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
21
  declare const _default: typeof __VLS_export;
14
22
  export default _default;
@@ -67,7 +67,8 @@ export function useComboboxSelect(props, emit, { creatable = false } = {}) {
67
67
  }
68
68
  function commitCreatableText(rawText) {
69
69
  const text = rawText.trim();
70
- if (!creatable || !text || hasMatchingOption(text))
70
+ const lower = text.toLowerCase();
71
+ if (!creatable || !text || flatOptions.value.some((o) => String(o.value).toLowerCase() === lower || o.label.toLowerCase() === lower))
71
72
  return false;
72
73
  if (props.multiple) {
73
74
  if (selectedValues.value.some((v) => typeof v === "string" && v.toLowerCase() === text.toLowerCase()))
@@ -60,7 +60,9 @@ export interface ProgrammaticOverlayService<T extends ProgrammaticOverlayInstanc
60
60
  }
61
61
  export interface ToastService {
62
62
  toasts: Ref<ToastItem[]>;
63
+ max: Ref<number>;
63
64
  nextId: () => number;
65
+ setMax: (max: number) => void;
64
66
  remove: (id: number) => void;
65
67
  dispose: () => void;
66
68
  }
@@ -42,13 +42,20 @@ export const useDrawerService = createOverlayService();
42
42
  export const useSlideoverService = createOverlayService();
43
43
  const useToastState = createAppScopedState(() => ({
44
44
  toasts: ref([]),
45
+ max: ref(5),
45
46
  counter: 0
46
47
  }));
47
48
  export function useToastService() {
48
49
  const state = useToastState();
49
50
  return {
50
51
  toasts: state.toasts,
52
+ max: state.max,
51
53
  nextId: () => state.counter++,
54
+ setMax(max) {
55
+ const limit = Number.isFinite(max) ? Math.max(0, Math.floor(max)) : 5;
56
+ state.max.value = limit;
57
+ state.toasts.value = limit > 0 ? state.toasts.value.slice(-limit) : [];
58
+ },
52
59
  remove(id) {
53
60
  const index = state.toasts.value.findIndex((toast) => toast.id === id);
54
61
  if (index !== -1)
@@ -56,6 +63,7 @@ export function useToastService() {
56
63
  },
57
64
  dispose() {
58
65
  state.toasts.value = [];
66
+ state.max.value = 5;
59
67
  }
60
68
  };
61
69
  }
@@ -0,0 +1,36 @@
1
+ /** Space between toasts when the stack is expanded. */
2
+ export declare const TOAST_GAP = 12;
3
+ /** How far each stacked toast shows behind the one in front of it. */
4
+ export declare const TOAST_PEEK = 14;
5
+ /** How much smaller each step back in the collapsed stack is drawn. */
6
+ export declare const TOAST_SCALE_STEP = 0.05;
7
+ /** Toasts visible in the collapsed stack, including the front one. */
8
+ export declare const TOAST_VISIBLE_STACKED = 3;
9
+ /** How long a dismissed toast stays mounted so it can animate out. */
10
+ export declare const TOAST_EXIT_DURATION = 300;
11
+ /** Used until a toast has been measured. */
12
+ export declare const FALLBACK_TOAST_HEIGHT = 64;
13
+ export interface ToastStackLayout {
14
+ /** Distance of each toast from the anchored edge when expanded, front toast first. */
15
+ offsets: number[];
16
+ frontHeight: number;
17
+ /** Height the viewport needs to contain the stack. */
18
+ height: number;
19
+ }
20
+ /** Lays out a stack from each toast's natural height, front (newest) toast first. */
21
+ export declare function layoutToastStack(heights: number[], expanded: boolean): ToastStackLayout;
22
+ /** Where a toast sits in the stack: the newest card, a card peeking behind it, one tucked away, or fanned out. */
23
+ export type ToastStackState = 'front' | 'behind' | 'hidden' | 'expanded';
24
+ export interface ToastStackItem {
25
+ state: ToastStackState;
26
+ transform: string;
27
+ /** Cards behind the front one borrow its height so the stack reads as a neat pile. */
28
+ height: string | undefined;
29
+ zIndex: number;
30
+ }
31
+ /**
32
+ * Places one toast in the stack. `index` counts from the front (newest)
33
+ * toast; `lift` is -1 when the stack grows upward from the bottom edge and
34
+ * 1 when it grows downward from the top edge.
35
+ */
36
+ export declare function placeToast(index: number, layout: ToastStackLayout, expanded: boolean, lift: 1 | -1): ToastStackItem;
@@ -0,0 +1,36 @@
1
+ export const TOAST_GAP = 12;
2
+ export const TOAST_PEEK = 14;
3
+ export const TOAST_SCALE_STEP = 0.05;
4
+ export const TOAST_VISIBLE_STACKED = 3;
5
+ export const TOAST_EXIT_DURATION = 300;
6
+ export const FALLBACK_TOAST_HEIGHT = 64;
7
+ export function layoutToastStack(heights, expanded) {
8
+ const offsets = [];
9
+ let offset = 0;
10
+ for (const height2 of heights) {
11
+ offsets.push(offset);
12
+ offset += height2 + TOAST_GAP;
13
+ }
14
+ const frontHeight = heights[0] ?? 0;
15
+ const shown = Math.min(heights.length, TOAST_VISIBLE_STACKED);
16
+ const height = heights.length === 0 ? 0 : expanded ? offset - TOAST_GAP : frontHeight + (shown - 1) * TOAST_PEEK;
17
+ return { offsets, frontHeight, height };
18
+ }
19
+ export function placeToast(index, layout, expanded, lift) {
20
+ const zIndex = layout.offsets.length - index;
21
+ if (expanded) {
22
+ return {
23
+ state: "expanded",
24
+ transform: `translateY(${lift * (layout.offsets[index] ?? 0)}px) scale(1)`,
25
+ height: void 0,
26
+ zIndex
27
+ };
28
+ }
29
+ const depth = Math.min(index, TOAST_VISIBLE_STACKED - 1);
30
+ return {
31
+ state: index === 0 ? "front" : index < TOAST_VISIBLE_STACKED ? "behind" : "hidden",
32
+ transform: `translateY(${lift * depth * TOAST_PEEK}px) scale(${1 - depth * TOAST_SCALE_STEP})`,
33
+ height: index === 0 ? void 0 : `${layout.frontHeight}px`,
34
+ zIndex
35
+ };
36
+ }
@@ -1 +1 @@
1
- @import "tw-animate-css";@source "./components";@source "./internal";@source "./theme";@source "./utils";@custom-variant dark (&:where(.dark, .dark *));@layer base{a:focus-visible{outline-offset:0}}@keyframes selaras-ripple{to{opacity:0;transform:scale(1)}}@keyframes selaras-accordion-down{0%{height:0}to{height:var(--reka-accordion-content-height)}}@keyframes selaras-accordion-up{0%{height:var(--reka-accordion-content-height)}to{height:0}}@keyframes selaras-collapsible-down{0%{height:0}to{height:var(--reka-collapsible-content-height)}}@keyframes selaras-collapsible-up{0%{height:var(--reka-collapsible-content-height)}to{height:0}}@keyframes selaras-skeleton-shimmer{0%{background-position:150% 0}to{background-position:-50% 0}}@keyframes selaras-progress-indeterminate{0%{transform:translateX(-100%)}to{transform:translateX(300%)}}@media (prefers-reduced-motion:reduce){*,:after,:before{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}.selaras-nav-elbow{position:relative}.selaras-nav-elbow:before{inset-inline-start:-16px;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;width:16px}.selaras-nav-elbow:after,.selaras-nav-elbow:before{background-color:var(--selaras-resolved-border-default);content:"";position:absolute;top:0}.selaras-nav-elbow:after{inset-inline-start:-15px;width:1.5px}.selaras-nav-elbow--content-navigation:before{height:40px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 40'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-width='1.5' d='M1 14a6 6 0 0 0 6 6h7'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 40'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-width='1.5' d='M1 14a6 6 0 0 0 6 6h7'/%3E%3C/svg%3E")}.selaras-nav-elbow--content-navigation:after{bottom:-2px}.selaras-nav-elbow--content-navigation:last-child:after{bottom:auto;height:14px}.selaras-nav-elbow--navigation-menu:before{height:32px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 32'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-width='1.5' d='M1 10a6 6 0 0 0 6 6h7'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 32'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-width='1.5' d='M1 10a6 6 0 0 0 6 6h7'/%3E%3C/svg%3E")}.selaras-nav-elbow--navigation-menu:after{bottom:-4px}.selaras-nav-elbow--navigation-menu:last-child:after{bottom:auto;height:10px}.selaras-nav-elbow--file-tree:before{height:28px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 28'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-width='1.5' d='M1 8a6 6 0 0 0 6 6h7'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 28'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-width='1.5' d='M1 8a6 6 0 0 0 6 6h7'/%3E%3C/svg%3E")}.selaras-nav-elbow--file-tree:after{bottom:-2px}.selaras-nav-elbow--file-tree:last-child:after{bottom:auto;height:8px}@layer theme{:root,[data-selaras-theme]{--selaras-resolved-surface-default:var(--selaras-surface-default,var(--_selaras-default-surface-default));--selaras-resolved-surface-elevated:var(--selaras-surface-elevated,var(--_selaras-default-surface-elevated));--selaras-resolved-surface-inverted:var(--selaras-surface-inverted,var(--_selaras-default-surface-inverted));--selaras-resolved-text-default:var(--selaras-text-default,var(--_selaras-default-text-default));--selaras-resolved-text-muted:var(--selaras-text-muted,var(--_selaras-default-text-muted));--selaras-resolved-text-inverted:var(--selaras-text-inverted,var(--_selaras-default-text-inverted));--selaras-resolved-border-default:var(--selaras-border-default,var(--_selaras-default-border-default));--selaras-resolved-border-muted:var(--selaras-border-muted,var(--_selaras-default-border-muted));--selaras-resolved-border-hover:var(--selaras-border-hover,var(--_selaras-default-border-hover));--selaras-resolved-scrim:var(--selaras-scrim,rgba(0,0,0,.5));--selaras-resolved-radius-base:var(--selaras-radius-base,8px);--selaras-resolved-radius-sm:var(--selaras-radius-sm,calc(var(--selaras-resolved-radius-base)*0.75));--selaras-resolved-radius-md:var(--selaras-radius-md,var(--selaras-resolved-radius-base));--selaras-resolved-radius-lg:var(--selaras-radius-lg,calc(var(--selaras-resolved-radius-base)*2));--selaras-resolved-radius-full:var(--selaras-radius-full,9999px);--selaras-resolved-shadow-sm:var(--selaras-shadow-sm,0 1px 2px 0 rgba(0,0,0,.06));--selaras-resolved-shadow-md:var(--selaras-shadow-md,0 4px 16px -2px rgba(0,0,0,.12));--selaras-resolved-shadow-lg:var(--selaras-shadow-lg,0 12px 32px -4px rgba(0,0,0,.16));--selaras-resolved-z-modal-overlay:var(--selaras-z-modal-overlay,40);--selaras-resolved-z-modal:var(--selaras-z-modal,50);--selaras-resolved-z-dropdown:var(--selaras-z-dropdown,60);--selaras-resolved-z-tooltip:var(--selaras-z-tooltip,70);--selaras-resolved-z-toast:var(--selaras-z-toast,80)}:root.dark,:root.dark [data-selaras-theme]:where(:not([data-selaras-mode]),[data-selaras-mode=root]),[data-selaras-theme]:where([data-selaras-mode=dark]){--selaras-resolved-surface-default:var(--selaras-surface-default,var(--_selaras-default-surface-default));--selaras-resolved-surface-elevated:var(--selaras-surface-elevated,var(--_selaras-default-surface-elevated));--selaras-resolved-surface-inverted:var(--selaras-surface-inverted,var(--_selaras-default-surface-inverted));--selaras-resolved-text-default:var(--selaras-text-default,var(--_selaras-default-text-default));--selaras-resolved-text-muted:var(--selaras-text-muted,var(--_selaras-default-text-muted));--selaras-resolved-text-inverted:var(--selaras-text-inverted,var(--_selaras-default-text-inverted));--selaras-resolved-border-default:var(--selaras-border-default,var(--_selaras-default-border-default));--selaras-resolved-border-muted:var(--selaras-border-muted,var(--_selaras-default-border-muted));--selaras-resolved-border-hover:var(--selaras-border-hover,var(--_selaras-default-border-hover))}}
1
+ @import "tw-animate-css";@source "./components";@source "./internal";@source "./theme";@source "./utils";@custom-variant dark (&:where(.dark, .dark *));@layer base{a:focus-visible{outline-offset:0}}@keyframes selaras-ripple{to{opacity:0;transform:scale(1)}}@keyframes selaras-accordion-down{0%{height:0}to{height:var(--reka-accordion-content-height)}}@keyframes selaras-accordion-up{0%{height:var(--reka-accordion-content-height)}to{height:0}}@keyframes selaras-collapsible-down{0%{height:0}to{height:var(--reka-collapsible-content-height)}}@keyframes selaras-collapsible-up{0%{height:var(--reka-collapsible-content-height)}to{height:0}}@keyframes selaras-toast-in{0%{opacity:0;translate:0 calc(var(--_selaras-toast-lift, -1)*-100%)}}@keyframes selaras-toast-out{to{opacity:0;translate:0 calc(var(--_selaras-toast-lift, -1)*var(--_selaras-toast-exit, -100%))}}@keyframes selaras-skeleton-shimmer{0%{background-position:150% 0}to{background-position:-50% 0}}@keyframes selaras-progress-indeterminate{0%{transform:translateX(-100%)}to{transform:translateX(300%)}}@media (prefers-reduced-motion:reduce){*,:after,:before{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}.selaras-nav-elbow{position:relative}.selaras-nav-elbow:before{inset-inline-start:-16px;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;width:16px}.selaras-nav-elbow:after,.selaras-nav-elbow:before{background-color:var(--selaras-resolved-border-default);content:"";position:absolute;top:0}.selaras-nav-elbow:after{inset-inline-start:-15px;width:1.5px}.selaras-nav-elbow--content-navigation:before{height:40px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 40'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-width='1.5' d='M1 14a6 6 0 0 0 6 6h7'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 40'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-width='1.5' d='M1 14a6 6 0 0 0 6 6h7'/%3E%3C/svg%3E")}.selaras-nav-elbow--content-navigation:after{bottom:-2px}.selaras-nav-elbow--content-navigation:last-child:after{bottom:auto;height:14px}.selaras-nav-elbow--navigation-menu:before{height:32px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 32'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-width='1.5' d='M1 10a6 6 0 0 0 6 6h7'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 32'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-width='1.5' d='M1 10a6 6 0 0 0 6 6h7'/%3E%3C/svg%3E")}.selaras-nav-elbow--navigation-menu:after{bottom:-4px}.selaras-nav-elbow--navigation-menu:last-child:after{bottom:auto;height:10px}.selaras-nav-elbow--file-tree:before{height:28px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 28'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-width='1.5' d='M1 8a6 6 0 0 0 6 6h7'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 28'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-width='1.5' d='M1 8a6 6 0 0 0 6 6h7'/%3E%3C/svg%3E")}.selaras-nav-elbow--file-tree:after{bottom:-2px}.selaras-nav-elbow--file-tree:last-child:after{bottom:auto;height:8px}@layer theme{:root,[data-selaras-theme]{--selaras-resolved-surface-canvas:var(--selaras-surface-canvas,var(--_selaras-default-surface-canvas));--selaras-resolved-surface-default:var(--selaras-surface-default,var(--_selaras-default-surface-default));--selaras-resolved-surface-elevated:var(--selaras-surface-elevated,var(--_selaras-default-surface-elevated));--selaras-resolved-surface-inverted:var(--selaras-surface-inverted,var(--_selaras-default-surface-inverted));--selaras-resolved-text-default:var(--selaras-text-default,var(--_selaras-default-text-default));--selaras-resolved-text-muted:var(--selaras-text-muted,var(--_selaras-default-text-muted));--selaras-resolved-text-inverted:var(--selaras-text-inverted,var(--_selaras-default-text-inverted));--selaras-resolved-border-default:var(--selaras-border-default,var(--_selaras-default-border-default));--selaras-resolved-border-muted:var(--selaras-border-muted,var(--_selaras-default-border-muted));--selaras-resolved-border-hover:var(--selaras-border-hover,var(--_selaras-default-border-hover));--selaras-resolved-scrim:var(--selaras-scrim,rgba(0,0,0,.5));--selaras-resolved-radius-base:var(--selaras-radius-base,8px);--selaras-resolved-radius-sm:var(--selaras-radius-sm,calc(var(--selaras-resolved-radius-base)*0.75));--selaras-resolved-radius-md:var(--selaras-radius-md,var(--selaras-resolved-radius-base));--selaras-resolved-radius-lg:var(--selaras-radius-lg,calc(var(--selaras-resolved-radius-base)*2));--selaras-resolved-radius-full:var(--selaras-radius-full,9999px);--selaras-resolved-shadow-sm:var(--selaras-shadow-sm,0 1px 2px 0 rgba(0,0,0,.06));--selaras-resolved-shadow-md:var(--selaras-shadow-md,0 4px 16px -2px rgba(0,0,0,.12));--selaras-resolved-shadow-lg:var(--selaras-shadow-lg,0 12px 32px -4px rgba(0,0,0,.16));--selaras-resolved-z-modal-overlay:var(--selaras-z-modal-overlay,40);--selaras-resolved-z-modal:var(--selaras-z-modal,50);--selaras-resolved-z-dropdown:var(--selaras-z-dropdown,60);--selaras-resolved-z-tooltip:var(--selaras-z-tooltip,70);--selaras-resolved-z-toast:var(--selaras-z-toast,80)}:root.dark,:root.dark [data-selaras-theme]:where(:not([data-selaras-mode]),[data-selaras-mode=root]),[data-selaras-theme]:where([data-selaras-mode=dark]){--selaras-resolved-scrim:var(--selaras-scrim,hsla(0,0%,100%,.05));--selaras-resolved-surface-canvas:var(--selaras-surface-canvas,var(--_selaras-default-surface-canvas));--selaras-resolved-surface-default:var(--selaras-surface-default,var(--_selaras-default-surface-default));--selaras-resolved-surface-elevated:var(--selaras-surface-elevated,var(--_selaras-default-surface-elevated));--selaras-resolved-surface-inverted:var(--selaras-surface-inverted,var(--_selaras-default-surface-inverted));--selaras-resolved-text-default:var(--selaras-text-default,var(--_selaras-default-text-default));--selaras-resolved-text-muted:var(--selaras-text-muted,var(--_selaras-default-text-muted));--selaras-resolved-text-inverted:var(--selaras-text-inverted,var(--_selaras-default-text-inverted));--selaras-resolved-border-default:var(--selaras-border-default,var(--_selaras-default-border-default));--selaras-resolved-border-muted:var(--selaras-border-muted,var(--_selaras-default-border-muted));--selaras-resolved-border-hover:var(--selaras-border-hover,var(--_selaras-default-border-hover))}}.selaras-code-tree-code span{color:var(--shiki-light)}.selaras-code-tree-code:where([data-selaras-code-mode=dark]) span,:root.dark .selaras-code-tree-code:where([data-selaras-code-mode=root]) span{color:var(--shiki-dark)}
@@ -1,3 +1,3 @@
1
- export type { TableColumnDef, TableColumnVisibilityState, TableExpandedState, TableGetRowId, TableRowSelectionState, TableSortingState } from './composables/use-table.js';
1
+ export type { TableColumnDef, TableColumnVisibilityState, TableExpandedState, TableGetRowId, TableGetSubRows, TableRowSelectionState, TableSortingState } from './composables/use-table.js';
2
2
  export { createTableColumnHelper } from './composables/use-table.js';
3
3
  export type { TableEmits, TableProps, TableSlots } from './utils/table-contracts.js';
@@ -5,7 +5,7 @@ export const alertDialogTheme = tv({
5
5
  // same kind of centered, blocking surface, just a distinct semantic
6
6
  // (Reka's AlertDialogContent unconditionally blocks outside-click
7
7
  // dismissal itself, so there's no need for a second z-index tier).
8
- overlay: "fixed inset-0 z-[var(--selaras-resolved-z-modal-overlay)] bg-[var(--selaras-resolved-scrim)]",
8
+ overlay: "fixed inset-0 z-[var(--selaras-resolved-z-modal-overlay)] bg-[var(--selaras-resolved-scrim)] backdrop-blur-[2px]",
9
9
  content: "fixed left-1/2 top-1/2 z-[var(--selaras-resolved-z-modal)] flex max-h-[calc(100vh-2rem)] w-[calc(100%-2rem)] max-w-md -translate-x-1/2 -translate-y-1/2 flex-col gap-4 rounded-[var(--selaras-resolved-radius-lg)] bg-[var(--selaras-resolved-surface-default)] p-6 shadow-[var(--selaras-resolved-shadow-lg)] focus:outline-none",
10
10
  header: "flex flex-col gap-1",
11
11
  title: "text-base font-semibold text-[var(--selaras-resolved-text-default)]",
@@ -31,13 +31,13 @@ export const avatarTheme = tv({
31
31
  // (online, offline, ...) rarely match the avatar's own identity color, so
32
32
  // it gets its own variant rather than tracking the avatar's.
33
33
  statusColor: {
34
- primary: { status: "bg-[var(--selaras-resolved-color-primary-fill)]" },
35
- neutral: { status: "bg-[var(--selaras-resolved-text-muted)]" },
36
- secondary: { status: "bg-[var(--selaras-resolved-color-secondary-fill)]" },
37
- success: { status: "bg-[var(--selaras-resolved-color-success-fill)]" },
38
- danger: { status: "bg-[var(--selaras-resolved-color-danger-fill)]" },
39
- info: { status: "bg-[var(--selaras-resolved-color-info-fill)]" },
40
- warning: { status: "bg-[var(--selaras-resolved-color-warning-fill)]" }
34
+ primary: { status: "bg-[var(--selaras-resolved-color-primary-indicator)]" },
35
+ neutral: { status: "bg-[var(--selaras-resolved-color-neutral-indicator)]" },
36
+ secondary: { status: "bg-[var(--selaras-resolved-color-secondary-indicator)]" },
37
+ success: { status: "bg-[var(--selaras-resolved-color-success-indicator)]" },
38
+ danger: { status: "bg-[var(--selaras-resolved-color-danger-indicator)]" },
39
+ info: { status: "bg-[var(--selaras-resolved-color-info-indicator)]" },
40
+ warning: { status: "bg-[var(--selaras-resolved-color-warning-indicator)]" }
41
41
  },
42
42
  size: {
43
43
  sm: { base: "size-6", fallback: "text-[10px]", icon: "size-3", status: "size-1.5" },