odj-svelte-ui 0.2.6 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/README.md +2 -0
  2. package/dist/_legacy/accordion/Accordion.svelte.d.ts +1 -1
  3. package/dist/_legacy/alert/Alert.svelte.d.ts +2 -2
  4. package/dist/_legacy/badge/Badge.svelte.d.ts +1 -1
  5. package/dist/_legacy/banner/Banner.svelte.d.ts +1 -1
  6. package/dist/_legacy/bottom-navigation/BottomNavHeaderItem.svelte.d.ts +1 -1
  7. package/dist/_legacy/bottom-navigation/BottomNavItem.svelte.d.ts +1 -1
  8. package/dist/_legacy/buttons/Button.svelte.d.ts +2 -2
  9. package/dist/_legacy/buttons/GradientButton.svelte.d.ts +1 -1
  10. package/dist/_legacy/cards/Card.svelte.d.ts +2 -2
  11. package/dist/_legacy/carousel/ControlButton.svelte.d.ts +1 -1
  12. package/dist/_legacy/dropdown/Dropdown.svelte.d.ts +1 -1
  13. package/dist/_legacy/dropdown/DropdownItem.svelte.d.ts +1 -1
  14. package/dist/_legacy/forms/Checkbox.svelte.d.ts +1 -1
  15. package/dist/_legacy/forms/Dropzone.svelte.d.ts +1 -1
  16. package/dist/_legacy/forms/Fileupload.svelte.d.ts +1 -1
  17. package/dist/_legacy/forms/FloatingLabelInput.svelte.d.ts +1 -1
  18. package/dist/_legacy/forms/Input.svelte.d.ts +2 -2
  19. package/dist/_legacy/forms/Label.svelte.d.ts +1 -1
  20. package/dist/_legacy/forms/MultiSelect.svelte.d.ts +1 -1
  21. package/dist/_legacy/forms/NumberInput.svelte.d.ts +2 -2
  22. package/dist/_legacy/forms/Radio.svelte.d.ts +1 -1
  23. package/dist/_legacy/forms/Range.svelte.d.ts +1 -1
  24. package/dist/_legacy/forms/Search.svelte.d.ts +1 -1
  25. package/dist/_legacy/forms/Select.svelte.d.ts +1 -1
  26. package/dist/_legacy/forms/Textarea.svelte.d.ts +2 -2
  27. package/dist/_legacy/forms/Toggle.svelte.d.ts +1 -1
  28. package/dist/_legacy/indicators/Indicator.svelte.d.ts +1 -1
  29. package/dist/_legacy/list-group/Listgroup.svelte.d.ts +1 -1
  30. package/dist/_legacy/list-group/ListgroupItem.svelte.d.ts +1 -1
  31. package/dist/_legacy/mega-menu/MegaMenu.svelte.d.ts +1 -1
  32. package/dist/_legacy/modal/Modal.svelte.d.ts +1 -1
  33. package/dist/_legacy/navbar/Menu.svelte.d.ts +1 -1
  34. package/dist/_legacy/navbar/NavHamburger.svelte.d.ts +1 -1
  35. package/dist/_legacy/navbar/NavLi.svelte.d.ts +1 -1
  36. package/dist/_legacy/navbar/NavUl.svelte.d.ts +1 -1
  37. package/dist/_legacy/navbar/Navbar.svelte.d.ts +1 -1
  38. package/dist/_legacy/pagination/Pagination.svelte.d.ts +1 -1
  39. package/dist/_legacy/pagination/PaginationItem.svelte.d.ts +1 -1
  40. package/dist/_legacy/popover/Popover.svelte.d.ts +1 -1
  41. package/dist/_legacy/rating/Heart.svelte.d.ts +1 -1
  42. package/dist/_legacy/rating/Star.svelte.d.ts +1 -1
  43. package/dist/_legacy/rating/Thumbup.svelte.d.ts +1 -1
  44. package/dist/_legacy/sidebar/SidebarDropdownItem.svelte.d.ts +1 -1
  45. package/dist/_legacy/sidebar/SidebarItem.svelte.d.ts +1 -1
  46. package/dist/_legacy/speed-dial/SpeedDialButton.svelte.d.ts +1 -1
  47. package/dist/_legacy/table/TableBodyCell.svelte.d.ts +1 -1
  48. package/dist/_legacy/table/TableBodyRow.svelte.d.ts +2 -2
  49. package/dist/_legacy/table/TableHeadCell.svelte.d.ts +1 -1
  50. package/dist/_legacy/tabs/TabItem.svelte.d.ts +2 -2
  51. package/dist/_legacy/toast/Toast.svelte.d.ts +1 -1
  52. package/dist/_legacy/toolbar/Toolbar.svelte.d.ts +1 -1
  53. package/dist/_legacy/toolbar/ToolbarButton.svelte.d.ts +1 -1
  54. package/dist/_legacy/tooltip/Tooltip.svelte.d.ts +1 -1
  55. package/dist/_legacy/typography/A.svelte.d.ts +1 -1
  56. package/dist/_legacy/utils/CloseButton.svelte.d.ts +1 -1
  57. package/dist/_legacy/utils/Frame.svelte.d.ts +2 -2
  58. package/dist/_legacy/utils/Popper.svelte.d.ts +1 -1
  59. package/dist/_legacy/utils/createEventDispatcher.d.ts +1 -1
  60. package/dist/accordion/Accordion.svelte +3 -3
  61. package/dist/accordion/AccordionItem.svelte +22 -26
  62. package/dist/accordion/theme.d.ts +146 -90
  63. package/dist/accordion/theme.js +29 -37
  64. package/dist/accordion/type.d.ts +2 -2
  65. package/dist/alert/theme.d.ts +2 -2
  66. package/dist/avatar/theme.d.ts +4 -4
  67. package/dist/badge/theme.d.ts +2 -2
  68. package/dist/banner/theme.d.ts +2 -2
  69. package/dist/bottom-navigation/theme.d.ts +8 -8
  70. package/dist/breadcrumb/theme.d.ts +2 -2
  71. package/dist/buttongroup/theme.d.ts +2 -2
  72. package/dist/buttons/theme.d.ts +4 -4
  73. package/dist/cards/theme.d.ts +2 -2
  74. package/dist/darkmode/theme.d.ts +1 -1
  75. package/dist/device-mockups/theme.d.ts +14 -14
  76. package/dist/drawer/theme.d.ts +4 -4
  77. package/dist/dropdown/theme.d.ts +8 -8
  78. package/dist/footer/theme.d.ts +10 -10
  79. package/dist/forms/checkbox/theme.d.ts +2 -2
  80. package/dist/forms/dropzone/theme.d.ts +1 -1
  81. package/dist/forms/fileupload/theme.d.ts +2 -2
  82. package/dist/forms/floating-label-input/theme.d.ts +2 -2
  83. package/dist/forms/helper/theme.d.ts +2 -2
  84. package/dist/forms/helper/theme.js +2 -2
  85. package/dist/forms/input/theme.d.ts +2 -2
  86. package/dist/forms/input-addon/InputAddon.svelte +7 -7
  87. package/dist/forms/label/theme.d.ts +2 -2
  88. package/dist/forms/radio/Radio.svelte.d.ts +10 -3
  89. package/dist/forms/radio/theme.d.ts +2 -2
  90. package/dist/forms/radio-button/RadioButton.svelte.d.ts +10 -3
  91. package/dist/forms/radio-button/theme.d.ts +2 -2
  92. package/dist/forms/range/theme.d.ts +2 -2
  93. package/dist/forms/search/Search.svelte.d.ts +10 -3
  94. package/dist/forms/search/theme.d.ts +2 -2
  95. package/dist/forms/select/MultiSelect.svelte +31 -0
  96. package/dist/forms/select/MultiSelect.svelte.d.ts +26 -0
  97. package/dist/forms/select/Select.svelte +2 -2
  98. package/dist/forms/select/Select.svelte.d.ts +10 -3
  99. package/dist/forms/select/index.d.ts +3 -2
  100. package/dist/forms/select/index.js +3 -2
  101. package/dist/forms/select/theme.d.ts +71 -2
  102. package/dist/forms/select/theme.js +9 -0
  103. package/dist/forms/select/type.d.ts +8 -9
  104. package/dist/forms/textarea/theme.d.ts +2 -2
  105. package/dist/forms/toggle/theme.d.ts +2 -2
  106. package/dist/gallery/theme.d.ts +2 -2
  107. package/dist/indicator/theme.d.ts +2 -2
  108. package/dist/kbd/theme.d.ts +1 -1
  109. package/dist/list-group/theme.d.ts +4 -4
  110. package/dist/mega-menu/theme.d.ts +2 -2
  111. package/dist/modal/theme.d.ts +2 -2
  112. package/dist/nav/theme.d.ts +12 -12
  113. package/dist/pagination/theme.d.ts +4 -4
  114. package/dist/popover/theme.d.ts +2 -2
  115. package/dist/progress/ProgressRadial.svelte +155 -0
  116. package/dist/progress/ProgressRadial.svelte.d.ts +35 -0
  117. package/dist/progress/index.d.ts +4 -3
  118. package/dist/progress/index.js +3 -2
  119. package/dist/progress/theme.d.ts +713 -2
  120. package/dist/progress/theme.js +111 -1
  121. package/dist/progress/type.d.ts +23 -2
  122. package/dist/rating/theme.d.ts +8 -8
  123. package/dist/sidebar/theme.d.ts +10 -10
  124. package/dist/skeleton/theme.d.ts +16 -16
  125. package/dist/spinner/theme.d.ts +2 -2
  126. package/dist/table/theme.d.ts +8 -8
  127. package/dist/tabs/theme.d.ts +4 -4
  128. package/dist/timeline/theme.d.ts +11 -11
  129. package/dist/toast/theme.d.ts +2 -2
  130. package/dist/toolbar/theme.d.ts +6 -6
  131. package/dist/tooltip/theme.d.ts +2 -2
  132. package/dist/typography/anchor/theme.d.ts +2 -2
  133. package/dist/typography/blockquote/theme.d.ts +2 -2
  134. package/dist/typography/descriptionlist/theme.d.ts +2 -2
  135. package/dist/typography/heading/theme.d.ts +2 -2
  136. package/dist/typography/hr/theme.d.ts +2 -2
  137. package/dist/typography/img/theme.d.ts +2 -2
  138. package/dist/typography/layout/theme.d.ts +1 -1
  139. package/dist/typography/list/theme.d.ts +2 -2
  140. package/dist/typography/mark/theme.d.ts +1 -1
  141. package/dist/typography/paragraph/theme.d.ts +2 -2
  142. package/dist/typography/secondary/theme.d.ts +1 -1
  143. package/dist/typography/span/theme.d.ts +2 -2
  144. package/dist/utils/index.d.ts +2 -2
  145. package/package.json +642 -641
@@ -36,7 +36,7 @@ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
36
36
  */
37
37
  declare const Frame: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<HTMLAnchorAttributes & {
38
38
  tag?: string;
39
- color?: "primary" | "red" | "orange" | "yellow" | "green" | "blue" | "indigo" | "purple" | "pink" | "dark" | "default" | "none" | "form" | "light" | "neutral" | "dropdown" | "navbar" | "navbarUl";
39
+ color?: "none" | "primary" | "red" | "orange" | "yellow" | "green" | "blue" | "indigo" | "purple" | "pink" | "dark" | "default" | "form" | "light" | "neutral" | "dropdown" | "navbar" | "navbarUl";
40
40
  rounded?: boolean;
41
41
  border?: boolean;
42
42
  shadow?: boolean;
@@ -50,7 +50,7 @@ declare const Frame: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWith
50
50
  }, {
51
51
  default: {};
52
52
  }>, {
53
- click: MouseEvent;
53
+ click: PointerEvent;
54
54
  mouseenter: MouseEvent;
55
55
  mouseleave: MouseEvent;
56
56
  focusin: FocusEvent;
@@ -33,7 +33,7 @@ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
33
33
  */
34
34
  declare const Popper: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<import("svelte/elements").HTMLAnchorAttributes & {
35
35
  tag?: string;
36
- color?: "primary" | "red" | "orange" | "yellow" | "green" | "blue" | "indigo" | "purple" | "pink" | "dark" | "default" | "none" | "form" | "light" | "neutral" | "dropdown" | "navbar" | "navbarUl";
36
+ color?: "none" | "primary" | "red" | "orange" | "yellow" | "green" | "blue" | "indigo" | "purple" | "pink" | "dark" | "default" | "form" | "light" | "neutral" | "dropdown" | "navbar" | "navbarUl";
37
37
  rounded?: boolean;
38
38
  border?: boolean;
39
39
  shadow?: boolean;
@@ -1 +1 @@
1
- export default function createEventDispatcher(): ((type: string, target: Element, detail: any) => void) | undefined;
1
+ export default function createEventDispatcher(): (type: string, target: Element, detail: any) => void;
@@ -2,10 +2,10 @@
2
2
  import { setContext } from "svelte";
3
3
  import { type AccordionProps as Props, accordion } from "./";
4
4
 
5
- let { children, flush, activeClass, inactiveClass, isSingle = true, class: className, ...restProps }: Props = $props();
5
+ let { children, accordionStyle = "none", activeClass, inactiveClass, isSingle = true, class: className, ...restProps }: Props = $props();
6
6
 
7
7
  const ctx = {
8
- flush,
8
+ accordionStyle,
9
9
  activeClass,
10
10
  inactiveClass,
11
11
  isSingle
@@ -13,7 +13,7 @@
13
13
 
14
14
  setContext("ctx", ctx);
15
15
 
16
- const base = $derived(accordion({ flush, className }));
16
+ const base = $derived(accordion({ accordionStyle, className }));
17
17
  </script>
18
18
 
19
19
  <div {...restProps} class={base}>
@@ -25,40 +25,36 @@
25
25
 
26
26
  const handleToggle = () => selected.set(open ? {} : self);
27
27
 
28
- const { base, button, content, active, inactive } = accordionitem({ flush: ctx.flush, open });
28
+ const { base, button, content, active, inactive } = accordionitem({ accordionStyle: ctx.accordionStyle, open });
29
29
 
30
- let buttonClass = $derived(twMerge(button(), open && !ctx.flush && (activeClass || ctx.activeClass || active()), !open && !ctx.flush && (inactiveClass || ctx.inactiveClass || inactive()), className));
30
+ let baseClass = $derived(twMerge(base(), open && (activeClass || ctx.activeClass || active()), !open && (inactiveClass || ctx.inactiveClass || inactive()), className));
31
31
  </script>
32
32
 
33
- <h2 class={base()}>
34
- <button onclick={handleToggle} class={buttonClass} aria-expanded={open}>
35
- {#if header}
36
- {@render header()}
37
- {#if open}
38
- {#if !arrowup}
39
- <svg class="h-3 w-3 text-gray-800 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
33
+ <div class={baseClass}>
34
+ <h3>
35
+ <button onclick={handleToggle} class={button()} aria-expanded={open}>
36
+ {#if header}
37
+ {@render header()}
38
+ {#if open && arrowup}
39
+ {@render arrowup()}
40
+ {:else if !open && arrowdown}
41
+ {@render arrowdown()}
42
+ {:else}
43
+ <svg class="text-light-surface-800 h-3 w-3 dark:text-white transition-all duration-400" class:rotate-180={!open} aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
40
44
  <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5 5 1 1 5" />
41
45
  </svg>
42
- {:else}
43
- {@render arrowup()}
44
46
  {/if}
45
- {:else if !arrowdown}
46
- <svg class="h-3 w-3 text-gray-800 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
47
- <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 4 4 4-4" />
48
- </svg>
49
- {:else}
50
- {@render arrowdown()}
51
47
  {/if}
52
- {/if}
53
- </button>
54
- </h2>
55
- {#if open}
56
- <div transition:transition={params as ParamsType}>
57
- <div class={content()}>
58
- {@render children()}
48
+ </button>
49
+ </h3>
50
+ {#if open}
51
+ <div transition:transition={params as ParamsType}>
52
+ <div class={content()}>
53
+ {@render children()}
54
+ </div>
59
55
  </div>
60
- </div>
61
- {/if}
56
+ {/if}
57
+ </div>
62
58
 
63
59
  <!--
64
60
  @component
@@ -1,105 +1,143 @@
1
1
  export declare const accordion: import("tailwind-variants").TVReturnType<{
2
- flush: {
3
- true: string;
4
- false: string;
5
- };
6
- }, undefined, "w-full text-gray-500 dark:text-gray-400", import("tailwind-variants/dist/config").TVConfig<{
7
- flush: {
8
- true: string;
9
- false: string;
2
+ accordionStyle: {
3
+ none: string;
4
+ outlined: string;
5
+ card: string;
6
+ flush: string;
7
+ };
8
+ }, undefined, "w-full text-light-surface-500 dark:text-dark-surface-400", import("tailwind-variants/dist/config.js").TVConfig<{
9
+ accordionStyle: {
10
+ none: string;
11
+ outlined: string;
12
+ card: string;
13
+ flush: string;
10
14
  };
11
15
  }, {
12
- flush: {
13
- true: string;
14
- false: string;
16
+ accordionStyle: {
17
+ none: string;
18
+ outlined: string;
19
+ card: string;
20
+ flush: string;
15
21
  };
16
22
  }>, {
17
- flush: {
18
- true: string;
19
- false: string;
23
+ accordionStyle: {
24
+ none: string;
25
+ outlined: string;
26
+ card: string;
27
+ flush: string;
20
28
  };
21
29
  }, undefined, import("tailwind-variants").TVReturnType<{
22
- flush: {
23
- true: string;
24
- false: string;
25
- };
26
- }, undefined, "w-full text-gray-500 dark:text-gray-400", import("tailwind-variants/dist/config").TVConfig<{
27
- flush: {
28
- true: string;
29
- false: string;
30
+ accordionStyle: {
31
+ none: string;
32
+ outlined: string;
33
+ card: string;
34
+ flush: string;
35
+ };
36
+ }, undefined, "w-full text-light-surface-500 dark:text-dark-surface-400", import("tailwind-variants/dist/config.js").TVConfig<{
37
+ accordionStyle: {
38
+ none: string;
39
+ outlined: string;
40
+ card: string;
41
+ flush: string;
30
42
  };
31
43
  }, {
32
- flush: {
33
- true: string;
34
- false: string;
44
+ accordionStyle: {
45
+ none: string;
46
+ outlined: string;
47
+ card: string;
48
+ flush: string;
35
49
  };
36
50
  }>, unknown, unknown, undefined>>;
37
51
  export declare const accordionitem: import("tailwind-variants").TVReturnType<{
38
- flush: {
39
- true: {
40
- button: string;
41
- content: string;
52
+ accordionStyle: {
53
+ none: {
54
+ base: string;
55
+ active: string;
56
+ inactive: string;
57
+ };
58
+ outlined: {
59
+ base: string;
42
60
  };
43
- false: {
61
+ card: {
62
+ base: string;
63
+ active: string;
64
+ inactive: string;
65
+ };
66
+ flush: {
67
+ base: string;
44
68
  button: string;
45
69
  content: string;
46
70
  };
47
71
  };
48
- open: {
49
- true: {};
50
- false: {};
51
- };
52
72
  }, {
53
73
  base: string;
54
74
  button: string;
55
75
  content: string;
56
76
  active: string;
57
77
  inactive: string;
58
- }, undefined, import("tailwind-variants/dist/config").TVConfig<{
59
- flush: {
60
- true: {
61
- button: string;
62
- content: string;
78
+ }, undefined, import("tailwind-variants/dist/config.js").TVConfig<{
79
+ accordionStyle: {
80
+ none: {
81
+ base: string;
82
+ active: string;
83
+ inactive: string;
84
+ };
85
+ outlined: {
86
+ base: string;
63
87
  };
64
- false: {
88
+ card: {
89
+ base: string;
90
+ active: string;
91
+ inactive: string;
92
+ };
93
+ flush: {
94
+ base: string;
65
95
  button: string;
66
96
  content: string;
67
97
  };
68
98
  };
69
- open: {
70
- true: {};
71
- false: {};
72
- };
73
99
  }, {
74
- flush: {
75
- true: {
76
- button: string;
77
- content: string;
100
+ accordionStyle: {
101
+ none: {
102
+ base: string;
103
+ active: string;
104
+ inactive: string;
105
+ };
106
+ outlined: {
107
+ base: string;
78
108
  };
79
- false: {
109
+ card: {
110
+ base: string;
111
+ active: string;
112
+ inactive: string;
113
+ };
114
+ flush: {
115
+ base: string;
80
116
  button: string;
81
117
  content: string;
82
118
  };
83
119
  };
84
- open: {
85
- true: {};
86
- false: {};
87
- };
88
120
  }>, {
89
- flush: {
90
- true: {
91
- button: string;
92
- content: string;
121
+ accordionStyle: {
122
+ none: {
123
+ base: string;
124
+ active: string;
125
+ inactive: string;
93
126
  };
94
- false: {
127
+ outlined: {
128
+ base: string;
129
+ };
130
+ card: {
131
+ base: string;
132
+ active: string;
133
+ inactive: string;
134
+ };
135
+ flush: {
136
+ base: string;
95
137
  button: string;
96
138
  content: string;
97
139
  };
98
140
  };
99
- open: {
100
- true: {};
101
- false: {};
102
- };
103
141
  }, {
104
142
  base: string;
105
143
  button: string;
@@ -107,54 +145,72 @@ export declare const accordionitem: import("tailwind-variants").TVReturnType<{
107
145
  active: string;
108
146
  inactive: string;
109
147
  }, import("tailwind-variants").TVReturnType<{
110
- flush: {
111
- true: {
112
- button: string;
113
- content: string;
148
+ accordionStyle: {
149
+ none: {
150
+ base: string;
151
+ active: string;
152
+ inactive: string;
114
153
  };
115
- false: {
154
+ outlined: {
155
+ base: string;
156
+ };
157
+ card: {
158
+ base: string;
159
+ active: string;
160
+ inactive: string;
161
+ };
162
+ flush: {
163
+ base: string;
116
164
  button: string;
117
165
  content: string;
118
166
  };
119
167
  };
120
- open: {
121
- true: {};
122
- false: {};
123
- };
124
168
  }, {
125
169
  base: string;
126
170
  button: string;
127
171
  content: string;
128
172
  active: string;
129
173
  inactive: string;
130
- }, undefined, import("tailwind-variants/dist/config").TVConfig<{
131
- flush: {
132
- true: {
133
- button: string;
134
- content: string;
174
+ }, undefined, import("tailwind-variants/dist/config.js").TVConfig<{
175
+ accordionStyle: {
176
+ none: {
177
+ base: string;
178
+ active: string;
179
+ inactive: string;
180
+ };
181
+ outlined: {
182
+ base: string;
183
+ };
184
+ card: {
185
+ base: string;
186
+ active: string;
187
+ inactive: string;
135
188
  };
136
- false: {
189
+ flush: {
190
+ base: string;
137
191
  button: string;
138
192
  content: string;
139
193
  };
140
194
  };
141
- open: {
142
- true: {};
143
- false: {};
144
- };
145
195
  }, {
146
- flush: {
147
- true: {
148
- button: string;
149
- content: string;
196
+ accordionStyle: {
197
+ none: {
198
+ base: string;
199
+ active: string;
200
+ inactive: string;
201
+ };
202
+ outlined: {
203
+ base: string;
150
204
  };
151
- false: {
205
+ card: {
206
+ base: string;
207
+ active: string;
208
+ inactive: string;
209
+ };
210
+ flush: {
211
+ base: string;
152
212
  button: string;
153
213
  content: string;
154
214
  };
155
215
  };
156
- open: {
157
- true: {};
158
- false: {};
159
- };
160
216
  }>, unknown, unknown, undefined>>;
@@ -1,55 +1,47 @@
1
1
  import { tv } from "tailwind-variants";
2
2
  export const accordion = tv({
3
- base: "w-full text-gray-500 dark:text-gray-400",
3
+ base: "w-full text-light-surface-500 dark:text-dark-surface-400",
4
4
  variants: {
5
- flush: {
6
- true: "",
7
- false: "border border-gray-200 dark:border-gray-700 rounded-t-xl"
5
+ accordionStyle: {
6
+ none: "space-y-2",
7
+ outlined: "space-y-2",
8
+ card: "space-y-2",
9
+ flush: "group"
8
10
  }
9
11
  }
10
12
  });
11
13
  export const accordionitem = tv({
12
14
  slots: {
13
- base: "group",
14
- button: "flex items-center justify-between w-full font-medium text-left group-first:rounded-t-xl border-gray-200 dark:border-gray-700 border-b",
15
- content: "border-b border-gray-200 dark:border-gray-700",
16
- active: "bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-800",
17
- inactive: "text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800"
15
+ base: "border-light-surface-300 dark:border-dark-surface-800",
16
+ button: "w-full flex items-center flex-row justify-between font-medium text-left px-4 py-3 outline-none rounded-lg focus-visible:ring-4 focus-visible:ring-dark-surface-400 focus-visible:dark:ring-dark-surface-600",
17
+ content: "text-light-surface-700 dark:text-dark-surface-300 px-4 pb-3",
18
+ active: "text-light-surface-900 dark:text-white",
19
+ inactive: "text-light-surface-800 dark:text-dark-surface-200"
18
20
  },
19
21
  variants: {
20
- flush: {
21
- true: {
22
- button: "py-5",
23
- content: "py-5"
22
+ accordionStyle: {
23
+ none: {
24
+ base: "rounded-lg border-1",
25
+ active: "bg-light-surface-100 dark:bg-dark-surface-800",
26
+ inactive: "hover:bg-light-surface-50 dark:hover:bg-dark-surface-800"
24
27
  },
25
- false: {
26
- button: "p-5 border-s border-e group-first:border-t",
27
- content: "p-5 border-s border-e"
28
+ outlined: {
29
+ base: "rounded-lg border-1"
30
+ },
31
+ card: {
32
+ base: "rounded-lg border-1 drop-shadow-sm",
33
+ active: "bg-light-surface-100 dark:bg-dark-surface-900",
34
+ inactive: "bg-light-surface-100 dark:bg-dark-surface-900"
35
+ },
36
+ flush: {
37
+ base: "first:border-0 border-t py-0",
38
+ button: "px-0",
39
+ content: "px-0"
28
40
  }
29
- },
30
- open: {
31
- true: {},
32
- false: {}
33
41
  }
34
42
  },
35
- compoundVariants: [
36
- {
37
- flush: true,
38
- open: true,
39
- class: {
40
- button: "text-gray-900 dark:text-white"
41
- }
42
- },
43
- {
44
- flush: true,
45
- open: false,
46
- class: {
47
- button: "text-gray-500 dark:text-gray-400"
48
- }
49
- }
50
- ],
51
43
  defaultVariants: {
52
- flush: false,
44
+ accordionStyle: "none",
53
45
  open: false
54
46
  }
55
47
  });
@@ -3,7 +3,7 @@ import type { Snippet } from "svelte";
3
3
  import type { ParamsType, TransitionFunc } from "../types";
4
4
  import type { HTMLAttributes } from "svelte/elements";
5
5
  interface AccordionCtxType {
6
- flush: boolean;
6
+ accordionStyle: 'none' | 'outlined' | 'card' | 'flush';
7
7
  activeClass: string | undefined | null;
8
8
  inactiveClass: string | undefined | null;
9
9
  selected?: Writable<object>;
@@ -13,7 +13,7 @@ interface AccordionCtxType {
13
13
  }
14
14
  interface AccordionProps extends HTMLAttributes<HTMLDivElement> {
15
15
  children: Snippet;
16
- flush?: boolean;
16
+ accordionStyle?: 'none' | 'outlined' | 'card' | 'flush';
17
17
  isSingle?: boolean;
18
18
  activeClass?: string;
19
19
  inactiveClass?: string;
@@ -33,7 +33,7 @@ declare const alert: import("tailwind-variants").TVReturnType<{
33
33
  dismissable: {
34
34
  true: string;
35
35
  };
36
- }, undefined, "p-4 gap-3 text-sm", import("tailwind-variants/dist/config").TVConfig<{
36
+ }, undefined, "p-4 gap-3 text-sm", import("tailwind-variants/dist/config.js").TVConfig<{
37
37
  color: {
38
38
  primary: string;
39
39
  secondary: string;
@@ -173,7 +173,7 @@ declare const alert: import("tailwind-variants").TVReturnType<{
173
173
  dismissable: {
174
174
  true: string;
175
175
  };
176
- }, undefined, "p-4 gap-3 text-sm", import("tailwind-variants/dist/config").TVConfig<{
176
+ }, undefined, "p-4 gap-3 text-sm", import("tailwind-variants/dist/config.js").TVConfig<{
177
177
  color: {
178
178
  primary: string;
179
179
  secondary: string;
@@ -18,7 +18,7 @@ declare const avatar: import("tailwind-variants").TVReturnType<{
18
18
  lg: string;
19
19
  xl: string;
20
20
  };
21
- }, undefined, "relative flex items-center justify-center box-content bg-light-surface-100 dark:bg-dark-surface-600 text-light-surface-600 dark:text-dark-surface-300", import("tailwind-variants/dist/config").TVConfig<{
21
+ }, undefined, "relative flex items-center justify-center box-content bg-light-surface-100 dark:bg-dark-surface-600 text-light-surface-600 dark:text-dark-surface-300", import("tailwind-variants/dist/config.js").TVConfig<{
22
22
  cornerStyle: {
23
23
  rounded: string;
24
24
  circular: string;
@@ -98,7 +98,7 @@ declare const avatar: import("tailwind-variants").TVReturnType<{
98
98
  lg: string;
99
99
  xl: string;
100
100
  };
101
- }, undefined, "relative flex items-center justify-center box-content bg-light-surface-100 dark:bg-dark-surface-600 text-light-surface-600 dark:text-dark-surface-300", import("tailwind-variants/dist/config").TVConfig<{
101
+ }, undefined, "relative flex items-center justify-center box-content bg-light-surface-100 dark:bg-dark-surface-600 text-light-surface-600 dark:text-dark-surface-300", import("tailwind-variants/dist/config.js").TVConfig<{
102
102
  cornerStyle: {
103
103
  rounded: string;
104
104
  circular: string;
@@ -159,7 +159,7 @@ declare const fallback: import("tailwind-variants").TVReturnType<{
159
159
  lg: string;
160
160
  xl: string;
161
161
  };
162
- }, undefined, "relative flex items-center justify-center box-content bg-light-surface-100 dark:bg-dark-surface-600 text-light-surface-600 dark:text-dark-surface-300 uppercase", import("tailwind-variants/dist/config").TVConfig<{
162
+ }, undefined, "relative flex items-center justify-center box-content bg-light-surface-100 dark:bg-dark-surface-600 text-light-surface-600 dark:text-dark-surface-300 uppercase", import("tailwind-variants/dist/config.js").TVConfig<{
163
163
  cornerStyle: {
164
164
  rounded: string;
165
165
  circular: string;
@@ -239,7 +239,7 @@ declare const fallback: import("tailwind-variants").TVReturnType<{
239
239
  lg: string;
240
240
  xl: string;
241
241
  };
242
- }, undefined, "relative flex items-center justify-center box-content bg-light-surface-100 dark:bg-dark-surface-600 text-light-surface-600 dark:text-dark-surface-300 uppercase", import("tailwind-variants/dist/config").TVConfig<{
242
+ }, undefined, "relative flex items-center justify-center box-content bg-light-surface-100 dark:bg-dark-surface-600 text-light-surface-600 dark:text-dark-surface-300 uppercase", import("tailwind-variants/dist/config.js").TVConfig<{
243
243
  cornerStyle: {
244
244
  rounded: string;
245
245
  circular: string;
@@ -75,7 +75,7 @@ declare const badge: import("tailwind-variants").TVReturnType<{
75
75
  }, {
76
76
  hrefClass: string;
77
77
  base: string;
78
- }, undefined, import("tailwind-variants/dist/config").TVConfig<{
78
+ }, undefined, import("tailwind-variants/dist/config.js").TVConfig<{
79
79
  color: {
80
80
  primary: {
81
81
  base: string;
@@ -377,7 +377,7 @@ declare const badge: import("tailwind-variants").TVReturnType<{
377
377
  }, {
378
378
  hrefClass: string;
379
379
  base: string;
380
- }, undefined, import("tailwind-variants/dist/config").TVConfig<{
380
+ }, undefined, import("tailwind-variants/dist/config.js").TVConfig<{
381
381
  color: {
382
382
  primary: {
383
383
  base: string;
@@ -103,7 +103,7 @@ declare const banner: import("tailwind-variants").TVReturnType<{
103
103
  }, {
104
104
  base: string;
105
105
  insideDiv: string;
106
- }, undefined, import("tailwind-variants/dist/config").TVConfig<{
106
+ }, undefined, import("tailwind-variants/dist/config.js").TVConfig<{
107
107
  position: {
108
108
  static: {
109
109
  base: string;
@@ -517,7 +517,7 @@ declare const banner: import("tailwind-variants").TVReturnType<{
517
517
  }, {
518
518
  base: string;
519
519
  insideDiv: string;
520
- }, undefined, import("tailwind-variants/dist/config").TVConfig<{
520
+ }, undefined, import("tailwind-variants/dist/config.js").TVConfig<{
521
521
  position: {
522
522
  static: {
523
523
  base: string;