@makolabs/ripple 0.0.1-dev.3 → 0.0.1-dev.5

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 (102) hide show
  1. package/README.md +229 -96
  2. package/dist/button/Button.svelte +46 -0
  3. package/dist/button/Button.svelte.d.ts +4 -0
  4. package/dist/button/button.d.ts +136 -0
  5. package/dist/button/button.js +167 -0
  6. package/dist/button/index.d.ts +1 -0
  7. package/dist/button/index.js +1 -0
  8. package/dist/drawer/Drawer.svelte +213 -0
  9. package/dist/drawer/Drawer.svelte.d.ts +4 -0
  10. package/dist/drawer/drawer.d.ts +177 -0
  11. package/dist/drawer/drawer.js +80 -0
  12. package/dist/drawer/index.d.ts +2 -0
  13. package/dist/drawer/index.js +1 -0
  14. package/dist/elements/badge/Badge.svelte +35 -0
  15. package/dist/elements/badge/Badge.svelte.d.ts +4 -0
  16. package/dist/elements/badge/badge.d.ts +193 -0
  17. package/dist/elements/badge/badge.js +65 -0
  18. package/dist/elements/badge/index.d.ts +2 -0
  19. package/dist/elements/badge/index.js +2 -0
  20. package/dist/elements/dropdown/Dropdown.svelte +272 -0
  21. package/dist/elements/dropdown/Dropdown.svelte.d.ts +4 -0
  22. package/dist/elements/dropdown/Select.svelte +230 -0
  23. package/dist/elements/dropdown/Select.svelte.d.ts +4 -0
  24. package/dist/elements/dropdown/dropdown.d.ts +274 -0
  25. package/dist/elements/dropdown/dropdown.js +89 -0
  26. package/dist/elements/dropdown/index.d.ts +3 -0
  27. package/dist/elements/dropdown/index.js +2 -0
  28. package/dist/elements/dropdown/select.d.ts +220 -0
  29. package/dist/elements/dropdown/select.js +74 -0
  30. package/dist/header/Breadcrumbs.svelte +72 -0
  31. package/dist/header/Breadcrumbs.svelte.d.ts +4 -0
  32. package/dist/header/PageHeader.svelte +30 -0
  33. package/dist/header/PageHeader.svelte.d.ts +4 -0
  34. package/dist/header/breadcrumbs.d.ts +220 -0
  35. package/dist/header/breadcrumbs.js +81 -0
  36. package/dist/header/index.d.ts +4 -0
  37. package/dist/header/index.js +2 -0
  38. package/dist/header/pageheaders.d.ts +10 -0
  39. package/dist/header/pageheaders.js +1 -0
  40. package/dist/helper/cls.d.ts +1 -0
  41. package/dist/helper/cls.js +4 -0
  42. package/dist/helper/nav.svelte.d.ts +6 -0
  43. package/dist/helper/nav.svelte.js +23 -0
  44. package/dist/index.d.ts +10 -1
  45. package/dist/index.js +18 -1
  46. package/dist/layout/card/Card.svelte +44 -0
  47. package/dist/layout/card/Card.svelte.d.ts +4 -0
  48. package/dist/layout/card/StatsCard.svelte +236 -0
  49. package/dist/layout/card/StatsCard.svelte.d.ts +4 -0
  50. package/dist/layout/card/card.d.ts +139 -0
  51. package/dist/layout/card/card.js +50 -0
  52. package/dist/layout/card/index.d.ts +4 -0
  53. package/dist/layout/card/index.js +2 -0
  54. package/dist/layout/card/stats-card.d.ts +208 -0
  55. package/dist/layout/card/stats-card.js +73 -0
  56. package/dist/layout/index.d.ts +5 -1
  57. package/dist/layout/index.js +5 -1
  58. package/dist/layout/navbar/Navbar.svelte +206 -0
  59. package/dist/layout/navbar/Navbar.svelte.d.ts +4 -0
  60. package/dist/layout/navbar/index.d.ts +2 -0
  61. package/dist/layout/navbar/index.js +2 -0
  62. package/dist/layout/navbar/navbar.d.ts +228 -0
  63. package/dist/layout/navbar/navbar.js +98 -0
  64. package/dist/layout/sidebar/NavGroup.svelte +101 -0
  65. package/dist/layout/sidebar/NavGroup.svelte.d.ts +4 -0
  66. package/dist/layout/sidebar/NavItem.svelte +29 -0
  67. package/dist/layout/sidebar/NavItem.svelte.d.ts +4 -0
  68. package/dist/layout/sidebar/Sidebar.svelte +145 -0
  69. package/dist/layout/sidebar/Sidebar.svelte.d.ts +4 -0
  70. package/dist/layout/sidebar/index.d.ts +2 -0
  71. package/dist/layout/sidebar/index.js +1 -0
  72. package/dist/layout/sidebar/sidebar.d.ts +46 -0
  73. package/dist/layout/sidebar/sidebar.js +1 -0
  74. package/dist/layout/table/Cells.svelte +111 -0
  75. package/dist/layout/table/Cells.svelte.d.ts +27 -0
  76. package/dist/layout/table/Table.svelte +413 -0
  77. package/dist/layout/table/Table.svelte.d.ts +4 -0
  78. package/dist/layout/table/index.d.ts +3 -0
  79. package/dist/layout/table/index.js +2 -0
  80. package/dist/layout/table/table.d.ts +303 -0
  81. package/dist/layout/table/table.js +149 -0
  82. package/dist/layout/tabs/Tab.svelte +57 -0
  83. package/dist/layout/tabs/Tab.svelte.d.ts +4 -0
  84. package/dist/layout/tabs/TabContent.svelte +31 -0
  85. package/dist/layout/tabs/TabContent.svelte.d.ts +4 -0
  86. package/dist/layout/tabs/TabGroup.svelte +57 -0
  87. package/dist/layout/tabs/TabGroup.svelte.d.ts +4 -0
  88. package/dist/layout/tabs/index.d.ts +3 -0
  89. package/dist/layout/tabs/index.js +3 -0
  90. package/dist/layout/tabs/tabs.d.ts +155 -0
  91. package/dist/layout/tabs/tabs.js +156 -0
  92. package/dist/modal/Modal.svelte +206 -0
  93. package/dist/modal/Modal.svelte.d.ts +4 -0
  94. package/dist/modal/index.d.ts +1 -0
  95. package/dist/modal/index.js +1 -0
  96. package/dist/modal/modal.d.ts +234 -0
  97. package/dist/modal/modal.js +81 -0
  98. package/dist/types/variants.d.ts +21 -0
  99. package/dist/types/variants.js +19 -0
  100. package/package.json +100 -102
  101. package/dist/layout/Card.svelte +0 -179
  102. package/dist/layout/Card.svelte.d.ts +0 -208
@@ -0,0 +1,230 @@
1
+ <script lang="ts">
2
+ import { tick } from 'svelte';
3
+ import { cn } from '../../helper/cls.js';
4
+ import { selectTV, type SelectItem, type SelectProps } from './select.js';
5
+
6
+ let {
7
+ items = [],
8
+ value = $bindable(''),
9
+ placeholder = 'Select an option',
10
+ searchable = false,
11
+ disabled = false,
12
+ size = 'sm',
13
+ class: className = '',
14
+ triggerClass = '',
15
+ containerClass = '',
16
+ listClass = '',
17
+ itemClass = '',
18
+ searchInputClass = '',
19
+ icon: Icon,
20
+ iconClass = '',
21
+ triggerContent,
22
+ onselect = () => {},
23
+ onopen = () => {},
24
+ onclose = () => {}
25
+ }: SelectProps = $props();
26
+
27
+ let open = $state(false);
28
+ let searchQuery = $state('');
29
+ let selectRef = $state<HTMLDivElement | null>(null);
30
+ let searchInputRef = $state<HTMLInputElement | null>(null);
31
+ let highlightedIndex = $state(-1);
32
+
33
+ const { base, trigger, triggerIcon, container, searchInput, list, item, emptyMessage } = $derived(
34
+ selectTV({
35
+ size,
36
+ disabled
37
+ })
38
+ );
39
+
40
+ const baseClass = $derived(cn(base(), className));
41
+ const triggerClass_ = $derived(cn(trigger(), triggerClass));
42
+ const triggerIconClass = $derived(cn(triggerIcon(), iconClass));
43
+ const containerClass_ = $derived(cn(container(), containerClass));
44
+ const searchInputClass_ = $derived(cn(searchInput(), searchInputClass));
45
+ const listClass_ = $derived(cn(list(), listClass));
46
+ const itemClass_ = $derived(cn(item(), itemClass));
47
+ const emptyMessageClass = $derived(cn(emptyMessage()));
48
+
49
+ const selectedItem = $derived(items.find((item) => item.value === value));
50
+
51
+ const filteredItems = $derived(
52
+ searchable && searchQuery
53
+ ? items.filter((item) => item.label.toLowerCase().includes(searchQuery.toLowerCase()))
54
+ : items
55
+ );
56
+
57
+ function handleToggle() {
58
+ if (disabled) return;
59
+ open = !open;
60
+
61
+ if (open) {
62
+ highlightedIndex = filteredItems.findIndex((item) => item.value === value);
63
+
64
+ onopen();
65
+
66
+ if (searchable) {
67
+ tick().then(() => {
68
+ searchInputRef?.focus();
69
+ });
70
+ }
71
+ } else {
72
+ onclose();
73
+ searchQuery = '';
74
+ }
75
+ }
76
+
77
+ function handleSelect(item: SelectItem) {
78
+ if (item.disabled) return;
79
+ value = item.value;
80
+ onselect({ value: item.value });
81
+ open = false;
82
+ }
83
+
84
+ function handleClickOutside(event: MouseEvent) {
85
+ if (selectRef && !selectRef.contains(event.target as Node) && open) {
86
+ open = false;
87
+ onclose();
88
+ }
89
+ }
90
+
91
+ function handleKeydown(event: KeyboardEvent) {
92
+ // check if the event is fired from the select
93
+ if (!selectRef || !selectRef.contains(event.target as Node)) return;
94
+
95
+ if (!open) {
96
+ if (event.key === 'Enter' || event.key === ' ' || event.key === 'ArrowDown') {
97
+ event.preventDefault();
98
+ open = true;
99
+ onopen();
100
+ return;
101
+ }
102
+ return;
103
+ }
104
+
105
+ if (event.key === 'Escape') {
106
+ event.preventDefault();
107
+ open = false;
108
+ onclose();
109
+ return;
110
+ }
111
+
112
+ const availableItems = filteredItems.filter((item) => !item.disabled);
113
+ if (!availableItems.length) return;
114
+
115
+ if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
116
+ event.preventDefault();
117
+
118
+ if (event.key === 'ArrowDown') {
119
+ highlightedIndex = (highlightedIndex + 1) % availableItems.length;
120
+ } else {
121
+ highlightedIndex = highlightedIndex <= 0 ? availableItems.length - 1 : highlightedIndex - 1;
122
+ }
123
+
124
+ tick().then(() => {
125
+ const highlightedElement = document.querySelector(
126
+ `[data-index="${highlightedIndex}"]`
127
+ ) as HTMLElement;
128
+ if (highlightedElement) {
129
+ highlightedElement.scrollIntoView({ block: 'center', behavior: 'instant' });
130
+ }
131
+ });
132
+ }
133
+
134
+ if (event.key === 'Enter' || event.key === ' ') {
135
+ event.preventDefault();
136
+ if (highlightedIndex >= 0 && highlightedIndex < availableItems.length) {
137
+ handleSelect(availableItems[highlightedIndex]);
138
+ }
139
+ }
140
+ }
141
+ </script>
142
+
143
+ <svelte:window onclick={handleClickOutside} onkeydown={handleKeydown} />
144
+
145
+ <div bind:this={selectRef} class={baseClass} data-state={open ? 'open' : 'closed'}>
146
+ <button
147
+ type="button"
148
+ onclick={handleToggle}
149
+ {disabled}
150
+ class={triggerClass_}
151
+ aria-haspopup="listbox"
152
+ aria-expanded={open}
153
+ aria-labelledby="select-label"
154
+ >
155
+ {#if triggerContent}
156
+ {@render triggerContent({ selectedItem, open })}
157
+ {:else}
158
+ <span id="select-label" class="flex-1 truncate text-left">
159
+ {selectedItem?.label || placeholder}
160
+ </span>
161
+
162
+ <span class="flex items-center gap-2">
163
+ {#if Icon}
164
+ <Icon class={triggerIconClass} />
165
+ {:else}
166
+ <svg
167
+ xmlns="http://www.w3.org/2000/svg"
168
+ viewBox="0 0 20 20"
169
+ fill="currentColor"
170
+ class={cn(triggerIconClass, open && 'rotate-180 transform')}
171
+ >
172
+ <path
173
+ fill-rule="evenodd"
174
+ d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
175
+ clip-rule="evenodd"
176
+ />
177
+ </svg>
178
+ {/if}
179
+ </span>
180
+ {/if}
181
+ </button>
182
+
183
+ <!-- Select Menu -->
184
+ {#if open}
185
+ <div class={containerClass_} role="listbox" aria-labelledby="select-label">
186
+ {#if searchable}
187
+ <input
188
+ bind:this={searchInputRef}
189
+ bind:value={searchQuery}
190
+ type="text"
191
+ placeholder="Search..."
192
+ class={searchInputClass_}
193
+ aria-label="Search select options"
194
+ />
195
+ {/if}
196
+
197
+ {#if filteredItems.length === 0}
198
+ <div class={emptyMessageClass}>No items found</div>
199
+ {:else}
200
+ <ul class={listClass_}>
201
+ {#each filteredItems as item, index (item.value)}
202
+ <li>
203
+ <button
204
+ type="button"
205
+ onclick={() => handleSelect(item)}
206
+ disabled={item.disabled}
207
+ class={itemClass_}
208
+ role="option"
209
+ aria-selected={value === item.value}
210
+ data-selected={value === item.value}
211
+ data-highlighted={index === highlightedIndex}
212
+ data-index={index}
213
+ >
214
+ {#if item.icon}
215
+ {@const Icon = item.icon}
216
+ <div class="flex items-center gap-2">
217
+ <Icon class="h-4 w-4 flex-shrink-0" />
218
+ <span>{item.label}</span>
219
+ </div>
220
+ {:else}
221
+ {item.label}
222
+ {/if}
223
+ </button>
224
+ </li>
225
+ {/each}
226
+ </ul>
227
+ {/if}
228
+ </div>
229
+ {/if}
230
+ </div>
@@ -0,0 +1,4 @@
1
+ import { type SelectProps } from './select.js';
2
+ declare const Select: import("svelte").Component<SelectProps, {}, "value">;
3
+ type Select = ReturnType<typeof Select>;
4
+ export default Select;
@@ -0,0 +1,274 @@
1
+ import type { Component, Snippet } from 'svelte';
2
+ import type { ClassValue } from 'tailwind-variants';
3
+ import { type VariantSizes } from '../../types/variants.js';
4
+ export declare const dropdownMenu: import("tailwind-variants").TVReturnType<{
5
+ position: {
6
+ 'top-left': {
7
+ container: string;
8
+ };
9
+ 'top-right': {
10
+ container: string;
11
+ };
12
+ 'bottom-left': {
13
+ container: string;
14
+ };
15
+ 'bottom-right': {
16
+ container: string;
17
+ };
18
+ };
19
+ size: {
20
+ xs: {
21
+ trigger: string;
22
+ item: string;
23
+ itemIcon: string;
24
+ header: string;
25
+ headerTitle: string;
26
+ headerSubtitle: string;
27
+ };
28
+ sm: {
29
+ trigger: string;
30
+ item: string;
31
+ itemIcon: string;
32
+ header: string;
33
+ headerTitle: string;
34
+ headerSubtitle: string;
35
+ };
36
+ base: {
37
+ trigger: string;
38
+ item: string;
39
+ itemIcon: string;
40
+ header: string;
41
+ headerTitle: string;
42
+ headerSubtitle: string;
43
+ };
44
+ lg: {
45
+ trigger: string;
46
+ item: string;
47
+ itemIcon: string;
48
+ header: string;
49
+ headerTitle: string;
50
+ headerSubtitle: string;
51
+ };
52
+ xl: {
53
+ trigger: string;
54
+ item: string;
55
+ itemIcon: string;
56
+ header: string;
57
+ headerTitle: string;
58
+ headerSubtitle: string;
59
+ };
60
+ "2xl": {
61
+ trigger: string;
62
+ item: string;
63
+ itemIcon: string;
64
+ header: string;
65
+ headerTitle: string;
66
+ headerSubtitle: string;
67
+ };
68
+ };
69
+ isOpen: {
70
+ true: {};
71
+ };
72
+ }, {
73
+ base: string;
74
+ trigger: string;
75
+ container: string;
76
+ section: string;
77
+ header: string;
78
+ headerTitle: string;
79
+ headerSubtitle: string;
80
+ item: string;
81
+ itemIcon: string;
82
+ }, undefined, {
83
+ position: {
84
+ 'top-left': {
85
+ container: string;
86
+ };
87
+ 'top-right': {
88
+ container: string;
89
+ };
90
+ 'bottom-left': {
91
+ container: string;
92
+ };
93
+ 'bottom-right': {
94
+ container: string;
95
+ };
96
+ };
97
+ size: {
98
+ xs: {
99
+ trigger: string;
100
+ item: string;
101
+ itemIcon: string;
102
+ header: string;
103
+ headerTitle: string;
104
+ headerSubtitle: string;
105
+ };
106
+ sm: {
107
+ trigger: string;
108
+ item: string;
109
+ itemIcon: string;
110
+ header: string;
111
+ headerTitle: string;
112
+ headerSubtitle: string;
113
+ };
114
+ base: {
115
+ trigger: string;
116
+ item: string;
117
+ itemIcon: string;
118
+ header: string;
119
+ headerTitle: string;
120
+ headerSubtitle: string;
121
+ };
122
+ lg: {
123
+ trigger: string;
124
+ item: string;
125
+ itemIcon: string;
126
+ header: string;
127
+ headerTitle: string;
128
+ headerSubtitle: string;
129
+ };
130
+ xl: {
131
+ trigger: string;
132
+ item: string;
133
+ itemIcon: string;
134
+ header: string;
135
+ headerTitle: string;
136
+ headerSubtitle: string;
137
+ };
138
+ "2xl": {
139
+ trigger: string;
140
+ item: string;
141
+ itemIcon: string;
142
+ header: string;
143
+ headerTitle: string;
144
+ headerSubtitle: string;
145
+ };
146
+ };
147
+ isOpen: {
148
+ true: {};
149
+ };
150
+ }, {
151
+ base: string;
152
+ trigger: string;
153
+ container: string;
154
+ section: string;
155
+ header: string;
156
+ headerTitle: string;
157
+ headerSubtitle: string;
158
+ item: string;
159
+ itemIcon: string;
160
+ }, import("tailwind-variants").TVReturnType<{
161
+ position: {
162
+ 'top-left': {
163
+ container: string;
164
+ };
165
+ 'top-right': {
166
+ container: string;
167
+ };
168
+ 'bottom-left': {
169
+ container: string;
170
+ };
171
+ 'bottom-right': {
172
+ container: string;
173
+ };
174
+ };
175
+ size: {
176
+ xs: {
177
+ trigger: string;
178
+ item: string;
179
+ itemIcon: string;
180
+ header: string;
181
+ headerTitle: string;
182
+ headerSubtitle: string;
183
+ };
184
+ sm: {
185
+ trigger: string;
186
+ item: string;
187
+ itemIcon: string;
188
+ header: string;
189
+ headerTitle: string;
190
+ headerSubtitle: string;
191
+ };
192
+ base: {
193
+ trigger: string;
194
+ item: string;
195
+ itemIcon: string;
196
+ header: string;
197
+ headerTitle: string;
198
+ headerSubtitle: string;
199
+ };
200
+ lg: {
201
+ trigger: string;
202
+ item: string;
203
+ itemIcon: string;
204
+ header: string;
205
+ headerTitle: string;
206
+ headerSubtitle: string;
207
+ };
208
+ xl: {
209
+ trigger: string;
210
+ item: string;
211
+ itemIcon: string;
212
+ header: string;
213
+ headerTitle: string;
214
+ headerSubtitle: string;
215
+ };
216
+ "2xl": {
217
+ trigger: string;
218
+ item: string;
219
+ itemIcon: string;
220
+ header: string;
221
+ headerTitle: string;
222
+ headerSubtitle: string;
223
+ };
224
+ };
225
+ isOpen: {
226
+ true: {};
227
+ };
228
+ }, {
229
+ base: string;
230
+ trigger: string;
231
+ container: string;
232
+ section: string;
233
+ header: string;
234
+ headerTitle: string;
235
+ headerSubtitle: string;
236
+ item: string;
237
+ itemIcon: string;
238
+ }, undefined, unknown, unknown, undefined>>;
239
+ export type DropdownItem = {
240
+ label: string;
241
+ href?: string;
242
+ icon?: Component;
243
+ onclick?: () => void;
244
+ active?: boolean;
245
+ disabled?: boolean;
246
+ };
247
+ export type DropSection = {
248
+ items: DropdownItem[];
249
+ };
250
+ export type DropHeaderConfig = {
251
+ title?: string;
252
+ subtitle?: string;
253
+ content?: Snippet<[]>;
254
+ class?: ClassValue;
255
+ titleClass?: ClassValue;
256
+ subtitleClass?: ClassValue;
257
+ onclick?: () => void;
258
+ };
259
+ export type DropdownMenuProps = {
260
+ open?: boolean;
261
+ sections: DropSection[];
262
+ label?: string;
263
+ icon?: Component;
264
+ triggerContent?: Snippet<[]>;
265
+ triggerClass?: ClassValue;
266
+ containerClass?: ClassValue;
267
+ itemClass?: ClassValue;
268
+ class?: ClassValue;
269
+ size?: VariantSizes;
270
+ disabled?: boolean;
271
+ position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
272
+ width?: string;
273
+ header?: DropHeaderConfig;
274
+ };
@@ -0,0 +1,89 @@
1
+ import { tv } from '../../helper/cls.js';
2
+ import { Size } from '../../types/variants.js';
3
+ export const dropdownMenu = tv({
4
+ slots: {
5
+ base: 'relative inline-block text-left',
6
+ trigger: 'inline-flex w-full justify-center items-center gap-x-1.5 rounded-md bg-white px-3 py-2 text-sm font-semibold text-default-900 shadow-xs ring-1 ring-inset ring-default-300 hover:bg-default-50',
7
+ container: 'absolute z-50 mt-2 origin-top-right divide-y divide-default-100 rounded-md bg-white ring-1 ring-black/5 shadow-lg focus:outline-none',
8
+ section: 'py-1',
9
+ header: 'flex flex-col px-4 py-2 w-full items-start',
10
+ headerTitle: 'text-sm font-medium text-default-900',
11
+ headerSubtitle: 'text-sm text-default-500',
12
+ item: 'w-full group flex items-center px-4 py-2 text-sm text-default-700 hover:bg-default-100 hover:text-default-900 data-[active=true]:bg-default-100 data-[active=true]:text-default-900',
13
+ itemIcon: 'mr-3 size-5 text-default-400 group-hover:text-default-500 group-data-[active=true]:text-default-500'
14
+ },
15
+ variants: {
16
+ position: {
17
+ 'top-left': {
18
+ container: 'origin-bottom-left bottom-full left-0 mb-2'
19
+ },
20
+ 'top-right': {
21
+ container: 'origin-bottom-right bottom-full right-0 mb-2'
22
+ },
23
+ 'bottom-left': {
24
+ container: 'origin-top-left top-full left-0 mt-2'
25
+ },
26
+ 'bottom-right': {
27
+ container: 'origin-top-right top-full right-0 mt-2'
28
+ }
29
+ },
30
+ size: {
31
+ [Size.XS]: {
32
+ trigger: 'px-2 py-1 text-xs',
33
+ item: 'px-2.5 py-1 text-xs',
34
+ itemIcon: 'mr-1.5 size-3.5',
35
+ header: 'px-2.5 py-1.5',
36
+ headerTitle: 'text-xs',
37
+ headerSubtitle: 'text-xs'
38
+ },
39
+ [Size.SM]: {
40
+ trigger: 'px-2.5 py-1.5 text-xs',
41
+ item: 'px-3 py-1.5 text-xs',
42
+ itemIcon: 'mr-2 size-4',
43
+ header: 'px-3 py-2',
44
+ headerTitle: 'text-xs',
45
+ headerSubtitle: 'text-xs'
46
+ },
47
+ [Size.BASE]: {
48
+ trigger: 'px-3 py-2 text-sm',
49
+ item: 'px-4 py-2 text-sm',
50
+ itemIcon: 'mr-3 size-5',
51
+ header: 'px-4 py-3',
52
+ headerTitle: 'text-sm',
53
+ headerSubtitle: 'text-sm'
54
+ },
55
+ [Size.LG]: {
56
+ trigger: 'px-4 py-2.5 text-base',
57
+ item: 'px-5 py-2.5 text-base',
58
+ itemIcon: 'mr-3 size-6',
59
+ header: 'px-5 py-3.5',
60
+ headerTitle: 'text-base',
61
+ headerSubtitle: 'text-sm'
62
+ },
63
+ [Size.XL]: {
64
+ trigger: 'px-5 py-3 text-lg',
65
+ item: 'px-6 py-3 text-lg',
66
+ itemIcon: 'mr-3.5 size-7',
67
+ header: 'px-6 py-4',
68
+ headerTitle: 'text-lg',
69
+ headerSubtitle: 'text-base'
70
+ },
71
+ [Size.XXL]: {
72
+ trigger: 'px-6 py-3.5 text-xl',
73
+ item: 'px-7 py-3.5 text-xl',
74
+ itemIcon: 'mr-4 size-8',
75
+ header: 'px-7 py-5',
76
+ headerTitle: 'text-xl',
77
+ headerSubtitle: 'text-lg'
78
+ }
79
+ },
80
+ isOpen: {
81
+ true: {}
82
+ }
83
+ },
84
+ defaultVariants: {
85
+ position: 'bottom-right',
86
+ size: Size.BASE,
87
+ isOpen: false
88
+ }
89
+ });
@@ -0,0 +1,3 @@
1
+ export { default as Select } from './Select.svelte';
2
+ export { default as Dropdown } from './Dropdown.svelte';
3
+ export type { SelectItem, SelectProps } from './select.js';
@@ -0,0 +1,2 @@
1
+ export { default as Select } from './Select.svelte';
2
+ export { default as Dropdown } from './Dropdown.svelte';