ui-svelte 0.2.11 → 0.2.12

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 (204) hide show
  1. package/dist/charts/ArcChart.svelte +9 -13
  2. package/dist/charts/ArcChart.svelte.d.ts +3 -3
  3. package/dist/charts/AreaChart.svelte +347 -118
  4. package/dist/charts/AreaChart.svelte.d.ts +33 -4
  5. package/dist/charts/BarChart.svelte +288 -66
  6. package/dist/charts/BarChart.svelte.d.ts +26 -1
  7. package/dist/charts/Candlestick.svelte +53 -50
  8. package/dist/charts/Candlestick.svelte.d.ts +8 -8
  9. package/dist/charts/LineChart.svelte +391 -91
  10. package/dist/charts/LineChart.svelte.d.ts +26 -3
  11. package/dist/charts/PieChart.svelte +333 -92
  12. package/dist/charts/PieChart.svelte.d.ts +33 -5
  13. package/dist/charts/css/arc-chart.css +3 -3
  14. package/dist/charts/css/area-chart.css +127 -29
  15. package/dist/charts/css/bar-chart.css +114 -8
  16. package/dist/charts/css/candlestick.css +2 -0
  17. package/dist/charts/css/line-chart.css +111 -13
  18. package/dist/charts/css/pie-chart.css +92 -20
  19. package/dist/control/Audio.svelte +86 -44
  20. package/dist/control/Audio.svelte.d.ts +4 -1
  21. package/dist/control/Button.svelte +18 -27
  22. package/dist/control/Button.svelte.d.ts +3 -2
  23. package/dist/control/IconButton.svelte +17 -27
  24. package/dist/control/IconButton.svelte.d.ts +3 -3
  25. package/dist/control/Image.svelte +123 -0
  26. package/dist/control/Image.svelte.d.ts +13 -0
  27. package/dist/control/Record.svelte +144 -98
  28. package/dist/control/Record.svelte.d.ts +2 -1
  29. package/dist/control/ToggleGroup.svelte +22 -8
  30. package/dist/control/ToggleGroup.svelte.d.ts +2 -1
  31. package/dist/control/ToggleTheme.svelte +13 -11
  32. package/dist/control/ToggleTheme.svelte.d.ts +3 -2
  33. package/dist/control/Video.svelte +55 -29
  34. package/dist/control/Video.svelte.d.ts +1 -0
  35. package/dist/control/css/btn.css +200 -152
  36. package/dist/control/css/image.css +56 -0
  37. package/dist/control/css/media.css +95 -30
  38. package/dist/control/css/toggle-group.css +269 -84
  39. package/dist/control/css/video.css +1 -14
  40. package/dist/css/animations.css +5 -9
  41. package/dist/css/base.css +13 -347
  42. package/dist/css/decorations.css +402 -0
  43. package/dist/css/rich-text.css +485 -0
  44. package/dist/css/transitions.css +158 -0
  45. package/dist/css/typography.css +291 -0
  46. package/dist/display/Accordion.svelte +28 -4
  47. package/dist/display/Accordion.svelte.d.ts +2 -1
  48. package/dist/display/Alert.svelte +32 -12
  49. package/dist/display/Alert.svelte.d.ts +2 -3
  50. package/dist/display/Avatar.svelte +23 -18
  51. package/dist/display/Avatar.svelte.d.ts +4 -1
  52. package/dist/display/AvatarGroup.svelte +20 -18
  53. package/dist/display/AvatarGroup.svelte.d.ts +6 -3
  54. package/dist/display/Badge.svelte +11 -4
  55. package/dist/display/Badge.svelte.d.ts +2 -1
  56. package/dist/display/Card.svelte +15 -14
  57. package/dist/display/Card.svelte.d.ts +2 -3
  58. package/dist/display/Carousel.svelte +130 -99
  59. package/dist/display/Carousel.svelte.d.ts +6 -4
  60. package/dist/display/ChatBox.svelte +245 -106
  61. package/dist/display/ChatBox.svelte.d.ts +32 -5
  62. package/dist/display/Chip.svelte +31 -17
  63. package/dist/display/Chip.svelte.d.ts +3 -2
  64. package/dist/display/Code.svelte +6 -3
  65. package/dist/display/Code.svelte.d.ts +1 -0
  66. package/dist/display/Collapsible.svelte +30 -4
  67. package/dist/display/Collapsible.svelte.d.ts +2 -1
  68. package/dist/display/Empty.svelte +37 -3
  69. package/dist/display/Empty.svelte.d.ts +3 -0
  70. package/dist/display/Item.svelte +30 -11
  71. package/dist/display/Item.svelte.d.ts +2 -2
  72. package/dist/display/Map.svelte +488 -0
  73. package/dist/display/Map.svelte.d.ts +44 -0
  74. package/dist/display/Section.svelte +14 -12
  75. package/dist/display/Section.svelte.d.ts +2 -3
  76. package/dist/display/Skeleton.svelte +32 -0
  77. package/dist/display/Skeleton.svelte.d.ts +10 -0
  78. package/dist/display/Table.svelte +94 -132
  79. package/dist/display/Table.svelte.d.ts +10 -1
  80. package/dist/display/css/accordion.css +349 -52
  81. package/dist/display/css/alert.css +18 -25
  82. package/dist/display/css/avatar-group.css +38 -75
  83. package/dist/display/css/avatar.css +139 -121
  84. package/dist/display/css/badge.css +50 -27
  85. package/dist/display/css/card.css +51 -71
  86. package/dist/display/css/carousel.css +25 -5
  87. package/dist/display/css/chat-box.css +158 -26
  88. package/dist/display/css/chip.css +142 -68
  89. package/dist/display/css/code.css +2 -6
  90. package/dist/display/css/collapsible.css +349 -45
  91. package/dist/display/css/divider.css +8 -6
  92. package/dist/display/css/empty.css +7 -0
  93. package/dist/display/css/item.css +311 -89
  94. package/dist/display/css/map.css +164 -0
  95. package/dist/display/css/section.css +78 -33
  96. package/dist/display/css/skeleton.css +58 -0
  97. package/dist/display/css/table.css +320 -189
  98. package/dist/form/Checkbox.svelte +11 -5
  99. package/dist/form/Checkbox.svelte.d.ts +2 -1
  100. package/dist/form/ColorField.svelte +543 -0
  101. package/dist/form/ColorField.svelte.d.ts +29 -0
  102. package/dist/form/ComboBox.svelte +24 -9
  103. package/dist/form/ComboBox.svelte.d.ts +2 -2
  104. package/dist/form/CsvField.svelte +62 -136
  105. package/dist/form/CsvField.svelte.d.ts +2 -2
  106. package/dist/form/DateField.svelte +33 -15
  107. package/dist/form/DateField.svelte.d.ts +2 -1
  108. package/dist/form/DateRange.svelte +436 -0
  109. package/dist/form/DateRange.svelte.d.ts +24 -0
  110. package/dist/form/DragDrop.svelte +348 -0
  111. package/dist/form/DragDrop.svelte.d.ts +32 -0
  112. package/dist/form/Dropzone.svelte +28 -8
  113. package/dist/form/Dropzone.svelte.d.ts +2 -2
  114. package/dist/form/Editor.svelte +626 -0
  115. package/dist/form/Editor.svelte.d.ts +50 -0
  116. package/dist/form/ImageCropper.svelte +291 -61
  117. package/dist/form/ImageCropper.svelte.d.ts +15 -1
  118. package/dist/form/{PasswordStrength.svelte → PasswordField.svelte} +58 -24
  119. package/dist/form/{PasswordStrength.svelte.d.ts → PasswordField.svelte.d.ts} +6 -5
  120. package/dist/form/PhoneField.svelte +26 -14
  121. package/dist/form/PhoneField.svelte.d.ts +4 -3
  122. package/dist/form/PinField.svelte +39 -31
  123. package/dist/form/PinField.svelte.d.ts +3 -3
  124. package/dist/form/RadioGroup.svelte +4 -4
  125. package/dist/form/RadioGroup.svelte.d.ts +1 -1
  126. package/dist/form/Select.svelte +20 -19
  127. package/dist/form/Select.svelte.d.ts +2 -2
  128. package/dist/form/Slider.svelte +4 -2
  129. package/dist/form/Slider.svelte.d.ts +1 -0
  130. package/dist/form/TextField.svelte +16 -7
  131. package/dist/form/TextField.svelte.d.ts +2 -2
  132. package/dist/form/Textarea.svelte +15 -6
  133. package/dist/form/Textarea.svelte.d.ts +2 -2
  134. package/dist/form/Toggle.svelte +1 -1
  135. package/dist/form/css/checkbox.css +18 -2
  136. package/dist/form/css/color-field.css +141 -0
  137. package/dist/form/css/control.css +193 -82
  138. package/dist/form/css/csv-field.css +226 -0
  139. package/dist/form/css/date-range.css +122 -0
  140. package/dist/form/css/date.css +24 -2
  141. package/dist/form/css/drag-drop.css +271 -0
  142. package/dist/form/css/dropzone.css +153 -34
  143. package/dist/form/css/editor.css +367 -0
  144. package/dist/form/css/field.css +4 -0
  145. package/dist/form/css/image-cropper.css +223 -22
  146. package/dist/form/css/radio-group.css +1 -1
  147. package/dist/form/css/select.css +2 -2
  148. package/dist/form/css/slider.css +1 -0
  149. package/dist/form/css/textarea.css +178 -75
  150. package/dist/form/css/toggle.css +3 -3
  151. package/dist/hooks/use-table.svelte.d.ts +1 -0
  152. package/dist/hooks/use-table.svelte.js +6 -0
  153. package/dist/icons/index.d.ts +30 -2
  154. package/dist/icons/index.js +32 -4
  155. package/dist/index.css +16 -1
  156. package/dist/index.d.ts +12 -4
  157. package/dist/index.js +11 -3
  158. package/dist/layout/AppBar.svelte +22 -14
  159. package/dist/layout/AppBar.svelte.d.ts +2 -1
  160. package/dist/layout/Footer.svelte +19 -11
  161. package/dist/layout/Footer.svelte.d.ts +2 -1
  162. package/dist/layout/Provider.svelte +27 -4
  163. package/dist/layout/Provider.svelte.d.ts +3 -1
  164. package/dist/layout/css/app-bar.css +63 -66
  165. package/dist/layout/css/footer.css +62 -65
  166. package/dist/navigation/BottomNav.svelte +41 -13
  167. package/dist/navigation/FooterGroup.svelte +1 -1
  168. package/dist/navigation/NavMenu.svelte +47 -23
  169. package/dist/navigation/NavMenu.svelte.d.ts +29 -0
  170. package/dist/navigation/Pagination.svelte +158 -0
  171. package/dist/navigation/Pagination.svelte.d.ts +18 -0
  172. package/dist/navigation/SideNav.svelte +30 -25
  173. package/dist/navigation/SideNav.svelte.d.ts +2 -3
  174. package/dist/navigation/Tabs.svelte +17 -7
  175. package/dist/navigation/Tabs.svelte.d.ts +2 -2
  176. package/dist/navigation/css/bottom-nav.css +279 -257
  177. package/dist/navigation/css/footer-group.css +1 -1
  178. package/dist/navigation/css/footer-nav.css +1 -1
  179. package/dist/navigation/css/nav-menu.css +332 -106
  180. package/dist/navigation/css/pagination.css +74 -0
  181. package/dist/navigation/css/side-nav.css +515 -75
  182. package/dist/navigation/css/tabs.css +246 -52
  183. package/dist/overlay/Command.svelte +340 -0
  184. package/dist/overlay/Command.svelte.d.ts +24 -25
  185. package/dist/overlay/Drawer.svelte +49 -21
  186. package/dist/overlay/Drawer.svelte.d.ts +2 -2
  187. package/dist/overlay/Dropdown.svelte +3 -3
  188. package/dist/overlay/Modal.svelte +51 -16
  189. package/dist/overlay/Modal.svelte.d.ts +3 -3
  190. package/dist/overlay/Toast.svelte +41 -17
  191. package/dist/overlay/Toast.svelte.d.ts +1 -1
  192. package/dist/overlay/Tooltip.svelte +40 -26
  193. package/dist/overlay/Tooltip.svelte.d.ts +2 -2
  194. package/dist/overlay/css/command.css +80 -0
  195. package/dist/overlay/css/drawer.css +63 -24
  196. package/dist/overlay/css/dropdown.css +1 -1
  197. package/dist/overlay/css/hovercard.css +1 -1
  198. package/dist/overlay/css/modal.css +27 -27
  199. package/dist/overlay/css/toast.css +17 -29
  200. package/dist/overlay/css/tooltip.css +83 -66
  201. package/dist/stores/theme.svelte.js +26 -1
  202. package/dist/stores/toast.svelte.d.ts +4 -4
  203. package/dist/stores/toast.svelte.js +2 -2
  204. package/package.json +1 -1
@@ -1,13 +1,13 @@
1
1
  <script lang="ts">
2
2
  import {
3
3
  MaximizeSquareMinimalisticLinearIcon,
4
- Pause24RegularIcon,
4
+ PauseFilledIcon,
5
5
  PictureInPicture24RegularIcon,
6
- Play24RegularIcon,
6
+ PlayFilledIcon,
7
7
  Speaker24RegularIcon,
8
8
  SpeakerMute24RegularIcon
9
9
  } from '../icons/index.js';
10
- import { Icon, Slider } from '../index.js';
10
+ import { Chip, Icon, IconButton, Slider } from '../index.js';
11
11
  import { cn } from '../utils/class-names.js';
12
12
  import Hls from 'hls.js';
13
13
 
@@ -17,15 +17,24 @@
17
17
  poster?: string;
18
18
  aspect?: 'horizontal' | 'vertical' | 'square';
19
19
  class?: string;
20
+ color?: 'primary' | 'secondary' | 'muted' | 'success' | 'info' | 'warning' | 'danger';
20
21
  };
21
22
 
22
- let { src, poster, autoplay, aspect = 'horizontal', class: className }: Props = $props();
23
+ let {
24
+ src,
25
+ poster,
26
+ autoplay,
27
+ aspect = 'horizontal',
28
+ class: className,
29
+ color = 'primary'
30
+ }: Props = $props();
23
31
 
24
32
  let videoElement: HTMLVideoElement | null = $state(null);
25
33
 
26
34
  let showControls = $state(false);
27
35
  let showVolume = $state(false);
28
36
  let videoParams = $state({
37
+ // svelte-ignore state_referenced_locally
29
38
  src,
30
39
  time: 0,
31
40
  duration: 0,
@@ -37,6 +46,16 @@
37
46
  volume: 1
38
47
  });
39
48
 
49
+ const colors = {
50
+ primary: 'is-primary',
51
+ secondary: 'is-secondary',
52
+ muted: 'is-muted',
53
+ success: 'is-success',
54
+ info: 'is-info',
55
+ warning: 'is-warning',
56
+ danger: 'is-danger'
57
+ };
58
+
40
59
  const setSource = () => {
41
60
  if (src.includes('.m3u8')) {
42
61
  if (Hls.isSupported() && videoElement) {
@@ -156,18 +175,17 @@
156
175
  <!-- svelte-ignore a11y_consider_explicit_label -->
157
176
  <div class={cn('video-control-actions', showControls ? 'visible' : 'invisible')}>
158
177
  <div class="video-actions-start">
159
- <button class="video-btn" onclick={togglePlay}>
160
- {#if videoParams.paused}
161
- <Icon icon={Play24RegularIcon} class="video-btn-icon" />
162
- {:else}
163
- <Icon icon={Pause24RegularIcon} class="video-btn-icon" />
164
- {/if}
165
- </button>
166
- <div class="video-btn">
167
- <span class="video-duration-info"
168
- >{videoParams.formattedTime} / {videoParams.formattedDuration}</span
169
- >
170
- </div>
178
+ <IconButton
179
+ onclick={togglePlay}
180
+ icon={videoParams.paused ? PlayFilledIcon : PauseFilledIcon}
181
+ {color}
182
+ variant="overlay"
183
+ size="sm"
184
+ />
185
+
186
+ <Chip variant="overlay" {color}>
187
+ {videoParams.formattedTime} / {videoParams.formattedDuration}
188
+ </Chip>
171
189
  </div>
172
190
  <div class="video-actions-end">
173
191
  <!-- svelte-ignore a11y_no_static_element_interactions -->
@@ -192,20 +210,28 @@
192
210
  />
193
211
  </div>
194
212
  {/if}
195
- <button class="video-btn" onclick={toggleMute}>
196
- {#if videoParams.muted}
197
- <Icon icon={Speaker24RegularIcon} class="video-btn-icon" />
198
- {:else}
199
- <Icon icon={SpeakerMute24RegularIcon} class="video-btn-icon" />
200
- {/if}
201
- </button>
213
+ <IconButton
214
+ onclick={toggleMute}
215
+ icon={videoParams.muted ? Speaker24RegularIcon : SpeakerMute24RegularIcon}
216
+ {color}
217
+ variant="overlay"
218
+ size="sm"
219
+ />
202
220
  </div>
203
- <button class="video-btn" onclick={handleTogglePip}>
204
- <Icon icon={PictureInPicture24RegularIcon} class="video-btn-icon" />
205
- </button>
206
- <button class="video-btn" onclick={handleToggleMaximize}>
207
- <Icon icon={MaximizeSquareMinimalisticLinearIcon} class="video-btn-icon" />
208
- </button>
221
+ <IconButton
222
+ onclick={handleTogglePip}
223
+ icon={PictureInPicture24RegularIcon}
224
+ {color}
225
+ variant="overlay"
226
+ size="sm"
227
+ />
228
+ <IconButton
229
+ onclick={handleToggleMaximize}
230
+ icon={MaximizeSquareMinimalisticLinearIcon}
231
+ {color}
232
+ variant="overlay"
233
+ size="sm"
234
+ />
209
235
  </div>
210
236
  </div>
211
237
  <div class={cn('video-control-progress', showControls ? 'visible' : 'invisible')}>
@@ -4,6 +4,7 @@ type Props = {
4
4
  poster?: string;
5
5
  aspect?: 'horizontal' | 'vertical' | 'square';
6
6
  class?: string;
7
+ color?: 'primary' | 'secondary' | 'muted' | 'success' | 'info' | 'warning' | 'danger';
7
8
  };
8
9
  declare const Video: import("svelte").Component<Props, {}, "">;
9
10
  type Video = ReturnType<typeof Video>;
@@ -1,202 +1,250 @@
1
1
  @layer components {
2
2
  .btn {
3
- @apply relative flex items-center justify-center w-fit flex-nowrap;
4
- @appls font-medium whitespace-nowrap;
3
+ @apply relative flex items-center justify-center flex-nowrap w-fit;
5
4
  @apply rounded-ui outline-none;
6
- @apply cursor-pointer select-none;
7
- @apply transition-all duration-200 active:scale-[0.98];
5
+ @apply cursor-pointer select-none font-medium;
6
+ @apply transition-all duration-300 active:scale-[0.94];
8
7
  @apply disabled:cursor-not-allowed disabled:opacity-50;
9
8
  @apply disabled:transition-none disabled:active:scale-100;
10
9
  }
11
10
 
11
+ .btn-label {
12
+ @apply w-full truncate;
13
+ }
14
+
12
15
  .btn-loading {
13
16
  @apply absolute inset-0 flex items-center justify-center;
14
17
  }
15
18
 
16
- .btn.is-xs:not(.is-icon) {
17
- @apply h-6 gap-2 px-2 text-xs;
18
-
19
- .icon {
20
- @apply h-4 w-auto;
19
+ .btn:not(.is-icon) {
20
+ &.is-xs {
21
+ @apply h-6 gap-1 px-3 text-xs;
22
+ & .icon {
23
+ @apply h-5 w-auto;
24
+ }
25
+ & .loading-icon {
26
+ @apply h-6 w-auto;
27
+ }
28
+ }
29
+
30
+ &.is-sm {
31
+ @apply h-8 gap-1 px-3 text-xs;
32
+ & .icon {
33
+ @apply h-6 w-auto;
34
+ }
35
+ & .loading-icon {
36
+ @apply h-8 w-auto;
37
+ }
38
+ }
39
+
40
+ &.is-md {
41
+ @apply h-10 gap-1 px-4 text-sm;
42
+ & .icon {
43
+ @apply h-8 w-auto;
44
+ }
45
+ & .loading-icon {
46
+ @apply h-10 w-auto;
47
+ }
48
+ }
49
+
50
+ &.is-lg {
51
+ @apply h-12 gap-2 px-5 text-lg;
52
+ & .icon {
53
+ @apply h-10 w-auto;
54
+ }
55
+ & .loading-icon {
56
+ @apply h-12 w-auto;
57
+ }
58
+ }
59
+
60
+ &.is-xl {
61
+ @apply h-14 gap-2 px-6 text-2xl;
62
+ & .icon {
63
+ @apply h-10 w-auto;
64
+ }
65
+ & .loading-icon {
66
+ @apply h-14 w-auto;
67
+ }
68
+ }
69
+ }
70
+
71
+ .btn.is-icon {
72
+ &.is-xs {
73
+ @apply h-6 w-6;
74
+ & .icon {
75
+ @apply h-4 w-4;
76
+ }
77
+ & .loading-icon {
78
+ @apply h-5 w-5;
79
+ }
21
80
  }
22
81
 
23
- .loading-icon {
24
- @apply h-6 w-auto;
82
+ &.is-sm {
83
+ @apply h-8 w-8;
84
+ & .icon {
85
+ @apply h-5 w-5;
86
+ }
87
+ & .loading-icon {
88
+ @apply h-6 w-6;
89
+ }
25
90
  }
26
- }
27
91
 
28
- .btn.is-sm:not(.is-icon) {
29
- @apply h-8 gap-2 px-2 text-xs;
92
+ &.is-md {
93
+ @apply h-10 w-10;
94
+ & .icon {
95
+ @apply h-6 w-6;
96
+ }
97
+ & .loading-icon {
98
+ @apply h-8 w-8;
99
+ }
100
+ }
30
101
 
31
- .icon {
32
- @apply h-4 w-auto;
102
+ &.is-lg {
103
+ @apply h-12 w-12;
104
+ & .icon {
105
+ @apply h-8 w-8;
106
+ }
107
+ & .loading-icon {
108
+ @apply h-10 w-10;
109
+ }
33
110
  }
34
111
 
35
- .loading-icon {
36
- @apply h-8 w-auto;
112
+ &.is-xl {
113
+ @apply h-14 w-14;
114
+ & .icon {
115
+ @apply h-10 w-10;
116
+ }
117
+ & .loading-icon {
118
+ @apply h-12 w-12;
119
+ }
37
120
  }
38
121
  }
39
122
 
40
- .btn.is-md:not(.is-icon) {
41
- @apply h-10 gap-3 px-3 text-sm;
123
+ .btn.is-wide {
124
+ @apply w-full;
125
+ }
42
126
 
43
- .icon {
44
- @apply h-5 w-auto;
127
+ .btn.is-soft {
128
+ &.is-primary {
129
+ @apply bg-on-primary text-primary hover:bg-on-primary/80;
45
130
  }
46
-
47
- .loading-icon {
48
- @apply h-10 w-auto;
131
+ &.is-secondary {
132
+ @apply bg-on-secondary text-secondary hover:bg-on-secondary/80;
49
133
  }
50
- }
51
-
52
- .btn.is-lg:not(.is-icon) {
53
- @apply h-12 gap-3 px-4 text-lg;
54
-
55
- .icon {
56
- @apply h-6 w-auto;
134
+ &.is-muted {
135
+ @apply bg-muted text-on-muted hover:bg-muted/80;
57
136
  }
58
-
59
- .loading-icon {
60
- @apply h-12 w-auto;
137
+ &.is-success {
138
+ @apply bg-on-success text-success hover:bg-on-success/80;
61
139
  }
62
- }
63
-
64
- .btn.is-icon.is-xs {
65
- @apply h-6 w-6;
66
-
67
- .icon {
68
- @apply h-4 w-4;
140
+ &.is-info {
141
+ @apply bg-on-info text-info hover:bg-on-info/80;
69
142
  }
70
-
71
- .loading-icon {
72
- @apply h-5 w-5;
143
+ &.is-warning {
144
+ @apply bg-on-warning text-warning hover:bg-on-warning/80;
145
+ }
146
+ &.is-danger {
147
+ @apply bg-on-danger text-danger hover:bg-on-danger/80;
73
148
  }
74
149
  }
75
150
 
76
- .btn.is-icon.is-sm {
77
- @apply h-8 w-8;
78
-
79
- .icon {
80
- @apply h-5 w-5;
151
+ .btn.is-solid {
152
+ &.is-primary {
153
+ @apply bg-primary text-on-primary hover:bg-primary/80;
81
154
  }
82
-
83
- .loading-icon {
84
- @apply h-6 w-6;
155
+ &.is-secondary {
156
+ @apply bg-secondary text-on-secondary hover:bg-secondary/80;
85
157
  }
86
- }
87
-
88
- .btn.is-icon.is-md {
89
- @apply h-10 w-10;
90
-
91
- .icon {
92
- @apply h-6 w-6;
158
+ &.is-muted {
159
+ @apply bg-on-muted text-muted hover:bg-on-muted/80;
93
160
  }
94
-
95
- .loading-icon {
96
- @apply h-8 w-8;
161
+ &.is-success {
162
+ @apply bg-success text-on-success hover:bg-success/80;
97
163
  }
98
- }
99
-
100
- .btn.is-icon.is-lg {
101
- @apply h-12 w-12;
102
-
103
- .icon {
104
- @apply h-8 w-8;
164
+ &.is-info {
165
+ @apply bg-info text-on-info hover:bg-info/80;
105
166
  }
106
-
107
- .loading-icon {
108
- @apply h-10 w-10;
167
+ &.is-warning {
168
+ @apply bg-warning text-on-warning hover:bg-warning/80;
169
+ }
170
+ &.is-danger {
171
+ @apply bg-danger text-on-danger hover:bg-danger/80;
109
172
  }
110
173
  }
111
174
 
112
- .btn.is-icon.is-xl {
113
- @apply h-14 w-14;
114
-
115
- .icon {
116
- @apply h-10 w-10;
175
+ .btn.is-outlined {
176
+ &.is-primary {
177
+ @apply inset-ring-2 inset-ring-primary text-primary hover:bg-primary hover:text-on-primary;
117
178
  }
118
-
119
- .loading-icon {
120
- @apply h-12 w-12;
179
+ &.is-secondary {
180
+ @apply inset-ring-2 inset-ring-secondary text-secondary hover:bg-secondary hover:text-on-secondary;
181
+ }
182
+ &.is-muted {
183
+ @apply inset-ring-2 inset-ring-on-muted text-on-muted hover:bg-on-muted hover:text-muted;
184
+ }
185
+ &.is-success {
186
+ @apply inset-ring-2 inset-ring-success text-success hover:bg-success hover:text-on-success;
187
+ }
188
+ &.is-info {
189
+ @apply inset-ring-2 inset-ring-info text-info hover:bg-info hover:text-on-info;
190
+ }
191
+ &.is-warning {
192
+ @apply inset-ring-2 inset-ring-warning text-warning hover:bg-warning hover:text-on-warning;
193
+ }
194
+ &.is-danger {
195
+ @apply inset-ring-2 inset-ring-danger text-danger hover:bg-danger hover:text-on-danger;
121
196
  }
122
197
  }
123
198
 
124
- .btn.is-wide {
125
- @apply w-full;
126
- }
127
-
128
- .btn:disabled {
129
- @apply opacity-50;
130
- }
131
-
132
- .btn.is-primary {
133
- @apply bg-on-primary text-primary hover:bg-on-primary/90;
134
- }
135
-
136
- .btn.is-solid.is-primary {
137
- @apply bg-primary text-on-primary hover:bg-primary/90;
138
- }
139
-
140
- .btn.is-secondary {
141
- @apply bg-on-secondary text-secondary hover:bg-on-secondary/90;
142
- }
143
-
144
- .btn.is-solid.is-secondary {
145
- @apply bg-secondary text-on-secondary hover:bg-secondary/90;
146
- }
147
-
148
- .btn.is-muted {
149
- @apply bg-muted text-on-muted hover:bg-muted/90;
150
- }
151
-
152
- .btn.is-solid.is-muted {
153
- @apply bg-on-muted text-muted hover:bg-on-muted/90;
154
- }
155
-
156
- .btn.is-success {
157
- @apply bg-on-success text-success hover:bg-on-success/90;
158
- }
159
-
160
- .btn.is-solid.is-success {
161
- @apply bg-success text-on-success hover:bg-success/90;
162
- }
163
-
164
- .btn.is-info {
165
- @apply bg-on-info text-info hover:bg-on-info/90;
166
- }
167
-
168
- .btn.is-solid.is-info {
169
- @apply bg-info text-on-info hover:bg-info/90;
170
- }
171
-
172
- .btn.is-warning {
173
- @apply bg-on-warning text-warning hover:bg-on-warning/90;
174
- }
175
-
176
- .btn.is-solid.is-warning {
177
- @apply bg-warning text-on-warning hover:bg-warning/90;
178
- }
179
-
180
- .btn.is-danger {
181
- @apply bg-on-danger text-danger hover:bg-on-danger/90;
182
- }
183
-
184
- .btn.is-solid.is-danger {
185
- @apply bg-danger text-on-danger hover:bg-danger/90;
186
- }
187
-
188
- .btn.is-outlined {
189
- @apply inset-ring inset-ring-muted text-on-muted hover:bg-muted;
199
+ .btn.is-ghost {
200
+ &.is-primary {
201
+ @apply text-primary hover:bg-primary hover:text-on-primary;
202
+ }
203
+ &.is-secondary {
204
+ @apply text-secondary hover:bg-secondary hover:text-on-secondary;
205
+ }
206
+ &.is-muted {
207
+ @apply text-on-muted hover:bg-on-muted hover:text-muted;
208
+ }
209
+ &.is-success {
210
+ @apply text-success hover:bg-success hover:text-on-success;
211
+ }
212
+ &.is-info {
213
+ @apply text-info hover:bg-info hover:text-on-info;
214
+ }
215
+ &.is-warning {
216
+ @apply text-warning hover:bg-warning hover:text-on-warning;
217
+ }
218
+ &.is-danger {
219
+ @apply text-danger hover:bg-danger hover:text-on-danger;
220
+ }
190
221
  }
191
222
 
192
- .btn.is-ghost {
193
- @apply text-on-muted hover:bg-muted;
223
+ .btn.is-overlay {
224
+ &.is-primary {
225
+ @apply bg-on-primary/60 text-primary hover:bg-on-primary/80;
226
+ }
227
+ &.is-secondary {
228
+ @apply bg-on-secondary/60 text-secondary hover:bg-on-secondary/80;
229
+ }
230
+ &.is-muted {
231
+ @apply bg-muted/60 text-on-muted hover:bg-muted/80;
232
+ }
233
+ &.is-success {
234
+ @apply bg-on-success/60 text-success hover:bg-on-success/80;
235
+ }
236
+ &.is-info {
237
+ @apply bg-on-info/60 text-info hover:bg-on-info/80;
238
+ }
239
+ &.is-warning {
240
+ @apply bg-on-warning/60 text-warning hover:bg-on-warning/80;
241
+ }
242
+ &.is-danger {
243
+ @apply bg-on-danger/60 text-danger hover:bg-on-danger/80;
244
+ }
194
245
  }
195
246
 
196
247
  .btn-close {
197
248
  @apply absolute right-2 top-2;
198
249
  }
199
- .btn-close-icon {
200
- @apply h-4 w-4 cursor-pointer;
201
- }
202
250
  }
@@ -0,0 +1,56 @@
1
+ @layer components {
2
+ .image {
3
+ @apply relative overflow-hidden rounded-box;
4
+ }
5
+
6
+ .image.horizontal {
7
+ @apply aspect-video;
8
+ }
9
+ .image.vertical {
10
+ @apply aspect-9/16;
11
+ }
12
+ .image.square {
13
+ @apply aspect-square;
14
+ }
15
+ .image.auto {
16
+ @apply aspect-auto;
17
+ }
18
+
19
+ .image.fit-cover .image-element {
20
+ @apply object-cover;
21
+ }
22
+ .image.fit-contain .image-element {
23
+ @apply object-contain;
24
+ }
25
+ .image.fit-fill .image-element {
26
+ @apply object-fill;
27
+ }
28
+ .image.fit-none .image-element {
29
+ @apply object-none;
30
+ }
31
+
32
+ .image-element {
33
+ @apply h-full w-full;
34
+ }
35
+
36
+ .image-skeleton {
37
+ @apply absolute inset-0 animate-pulse bg-muted/20;
38
+ }
39
+ .image-error {
40
+ @apply absolute inset-0 flex items-center justify-center bg-muted/10 text-on-muted text-sm;
41
+ }
42
+
43
+ .image-controls {
44
+ @apply absolute inset-x-0 bottom-0 z-20 flex flex-col p-2 transition-opacity duration-200;
45
+ }
46
+ .image-controls.visible {
47
+ @apply opacity-100;
48
+ }
49
+ .image-controls.invisible {
50
+ @apply opacity-0;
51
+ }
52
+
53
+ .image-actions {
54
+ @apply flex justify-end items-center gap-2;
55
+ }
56
+ }