ui-svelte 0.2.11 → 0.2.13
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.
- package/README.md +2 -2
- package/dist/charts/ArcChart.svelte +9 -14
- package/dist/charts/ArcChart.svelte.d.ts +3 -3
- package/dist/charts/AreaChart.svelte +347 -118
- package/dist/charts/AreaChart.svelte.d.ts +33 -4
- package/dist/charts/BarChart.svelte +288 -66
- package/dist/charts/BarChart.svelte.d.ts +26 -1
- package/dist/charts/Candlestick.svelte +53 -50
- package/dist/charts/Candlestick.svelte.d.ts +8 -8
- package/dist/charts/LineChart.svelte +391 -91
- package/dist/charts/LineChart.svelte.d.ts +26 -3
- package/dist/charts/PieChart.svelte +333 -92
- package/dist/charts/PieChart.svelte.d.ts +33 -5
- package/dist/charts/css/arc-chart.css +3 -3
- package/dist/charts/css/area-chart.css +127 -29
- package/dist/charts/css/bar-chart.css +114 -8
- package/dist/charts/css/candlestick.css +2 -0
- package/dist/charts/css/line-chart.css +111 -13
- package/dist/charts/css/pie-chart.css +92 -20
- package/dist/control/Audio.svelte +86 -44
- package/dist/control/Audio.svelte.d.ts +4 -1
- package/dist/control/Button.svelte +18 -27
- package/dist/control/Button.svelte.d.ts +3 -2
- package/dist/control/Fab.svelte +103 -0
- package/dist/control/Fab.svelte.d.ts +25 -0
- package/dist/control/IconButton.svelte +17 -27
- package/dist/control/IconButton.svelte.d.ts +3 -3
- package/dist/control/Image.svelte +123 -0
- package/dist/control/Image.svelte.d.ts +13 -0
- package/dist/control/Record.svelte +141 -98
- package/dist/control/Record.svelte.d.ts +2 -1
- package/dist/control/ToggleGroup.svelte +22 -8
- package/dist/control/ToggleGroup.svelte.d.ts +2 -1
- package/dist/control/ToggleTheme.svelte +13 -11
- package/dist/control/ToggleTheme.svelte.d.ts +3 -2
- package/dist/control/Video.svelte +57 -29
- package/dist/control/Video.svelte.d.ts +1 -0
- package/dist/control/css/btn.css +200 -152
- package/dist/control/css/fab.css +84 -0
- package/dist/control/css/image.css +56 -0
- package/dist/control/css/media.css +95 -30
- package/dist/control/css/toggle-group.css +253 -84
- package/dist/control/css/video.css +1 -14
- package/dist/css/animations.css +5 -9
- package/dist/css/base.css +13 -347
- package/dist/css/decorations.css +561 -0
- package/dist/css/rich-text.css +485 -0
- package/dist/css/transitions.css +158 -0
- package/dist/css/typography.css +291 -0
- package/dist/css/utilities.css +0 -4
- package/dist/display/Accordion.svelte +28 -4
- package/dist/display/Accordion.svelte.d.ts +2 -1
- package/dist/display/Alert.svelte +32 -12
- package/dist/display/Alert.svelte.d.ts +2 -3
- package/dist/display/Avatar.svelte +23 -18
- package/dist/display/Avatar.svelte.d.ts +4 -1
- package/dist/display/AvatarGroup.svelte +20 -18
- package/dist/display/AvatarGroup.svelte.d.ts +6 -3
- package/dist/display/Badge.svelte +11 -4
- package/dist/display/Badge.svelte.d.ts +2 -1
- package/dist/display/Card.svelte +15 -14
- package/dist/display/Card.svelte.d.ts +2 -3
- package/dist/display/Carousel.svelte +130 -99
- package/dist/display/Carousel.svelte.d.ts +6 -4
- package/dist/display/ChatBox.svelte +245 -106
- package/dist/display/ChatBox.svelte.d.ts +32 -5
- package/dist/display/Chip.svelte +31 -17
- package/dist/display/Chip.svelte.d.ts +3 -2
- package/dist/display/Code.svelte +7 -4
- package/dist/display/Code.svelte.d.ts +1 -0
- package/dist/display/Collapsible.svelte +30 -4
- package/dist/display/Collapsible.svelte.d.ts +2 -1
- package/dist/display/Countdown.svelte +169 -0
- package/dist/display/Countdown.svelte.d.ts +21 -0
- package/dist/display/Empty.svelte +37 -3
- package/dist/display/Empty.svelte.d.ts +3 -0
- package/dist/display/Item.svelte +42 -11
- package/dist/display/Item.svelte.d.ts +4 -2
- package/dist/display/Map.svelte +488 -0
- package/dist/display/Map.svelte.d.ts +44 -0
- package/dist/display/Marquee.svelte +0 -2
- package/dist/display/Section.svelte +14 -12
- package/dist/display/Section.svelte.d.ts +2 -3
- package/dist/display/Skeleton.svelte +32 -0
- package/dist/display/Skeleton.svelte.d.ts +10 -0
- package/dist/display/Table.svelte +94 -132
- package/dist/display/Table.svelte.d.ts +10 -1
- package/dist/display/css/accordion.css +349 -52
- package/dist/display/css/alert.css +38 -18
- package/dist/display/css/avatar-group.css +38 -75
- package/dist/display/css/avatar.css +139 -121
- package/dist/display/css/badge.css +50 -27
- package/dist/display/css/card.css +123 -71
- package/dist/display/css/carousel.css +25 -5
- package/dist/display/css/chat-box.css +158 -26
- package/dist/display/css/chip.css +142 -68
- package/dist/display/css/code.css +2 -6
- package/dist/display/css/collapsible.css +349 -45
- package/dist/display/css/countdown.css +206 -0
- package/dist/display/css/divider.css +8 -6
- package/dist/display/css/empty.css +7 -0
- package/dist/display/css/item.css +330 -84
- package/dist/display/css/map.css +164 -0
- package/dist/display/css/marquee.css +0 -3
- package/dist/display/css/section.css +89 -65
- package/dist/display/css/skeleton.css +58 -0
- package/dist/display/css/table.css +309 -193
- package/dist/form/Checkbox.svelte +11 -5
- package/dist/form/Checkbox.svelte.d.ts +2 -1
- package/dist/form/ColorField.svelte +601 -0
- package/dist/form/ColorField.svelte.d.ts +29 -0
- package/dist/form/ComboBox.svelte +24 -9
- package/dist/form/ComboBox.svelte.d.ts +2 -2
- package/dist/form/CsvField.svelte +62 -136
- package/dist/form/CsvField.svelte.d.ts +2 -2
- package/dist/form/DateField.svelte +33 -15
- package/dist/form/DateField.svelte.d.ts +2 -1
- package/dist/form/DateRange.svelte +436 -0
- package/dist/form/DateRange.svelte.d.ts +24 -0
- package/dist/form/DragDrop.svelte +578 -0
- package/dist/form/DragDrop.svelte.d.ts +33 -0
- package/dist/form/Dropzone.svelte +28 -8
- package/dist/form/Dropzone.svelte.d.ts +2 -2
- package/dist/form/Editor.svelte +626 -0
- package/dist/form/Editor.svelte.d.ts +50 -0
- package/dist/form/ImageCropper.svelte +422 -61
- package/dist/form/ImageCropper.svelte.d.ts +15 -1
- package/dist/form/{PasswordStrength.svelte → PasswordField.svelte} +58 -24
- package/dist/form/{PasswordStrength.svelte.d.ts → PasswordField.svelte.d.ts} +6 -5
- package/dist/form/PhoneField.svelte +26 -14
- package/dist/form/PhoneField.svelte.d.ts +4 -3
- package/dist/form/PinField.svelte +39 -31
- package/dist/form/PinField.svelte.d.ts +3 -3
- package/dist/form/RadioGroup.svelte +9 -5
- package/dist/form/RadioGroup.svelte.d.ts +1 -1
- package/dist/form/Select.svelte +20 -19
- package/dist/form/Select.svelte.d.ts +2 -2
- package/dist/form/Slider.svelte +10 -4
- package/dist/form/Slider.svelte.d.ts +2 -1
- package/dist/form/TextField.svelte +29 -11
- package/dist/form/TextField.svelte.d.ts +5 -4
- package/dist/form/Textarea.svelte +15 -6
- package/dist/form/Textarea.svelte.d.ts +2 -2
- package/dist/form/Toggle.svelte +7 -3
- package/dist/form/Toggle.svelte.d.ts +1 -1
- package/dist/form/css/checkbox.css +18 -2
- package/dist/form/css/color-field.css +141 -0
- package/dist/form/css/control.css +193 -82
- package/dist/form/css/csv-field.css +221 -0
- package/dist/form/css/date-range.css +122 -0
- package/dist/form/css/date.css +24 -2
- package/dist/form/css/drag-drop.css +234 -0
- package/dist/form/css/dropzone.css +153 -34
- package/dist/form/css/editor.css +367 -0
- package/dist/form/css/field.css +4 -0
- package/dist/form/css/image-cropper.css +242 -20
- package/dist/form/css/radio-group.css +26 -1
- package/dist/form/css/select.css +2 -2
- package/dist/form/css/slider.css +37 -0
- package/dist/form/css/textarea.css +178 -75
- package/dist/form/css/toggle.css +15 -3
- package/dist/hooks/use-chat.svelte.js +1 -1
- package/dist/hooks/use-form.svelte.js +3 -3
- package/dist/hooks/use-search.svelte.js +0 -3
- package/dist/hooks/use-table.svelte.d.ts +1 -0
- package/dist/hooks/use-table.svelte.js +6 -0
- package/dist/icons/index.d.ts +34 -2
- package/dist/icons/index.js +36 -4
- package/dist/index.css +44 -49
- package/dist/index.d.ts +14 -4
- package/dist/index.js +13 -3
- package/dist/layout/AppBar.svelte +22 -14
- package/dist/layout/AppBar.svelte.d.ts +2 -1
- package/dist/layout/Footer.svelte +19 -11
- package/dist/layout/Footer.svelte.d.ts +2 -1
- package/dist/layout/Provider.svelte +32 -9
- package/dist/layout/Provider.svelte.d.ts +3 -1
- package/dist/layout/Sidebar.svelte +17 -8
- package/dist/layout/Sidebar.svelte.d.ts +2 -1
- package/dist/layout/css/app-bar.css +63 -66
- package/dist/layout/css/footer.css +62 -65
- package/dist/layout/css/sidebar.css +120 -59
- package/dist/navigation/BottomNav.svelte +51 -14
- package/dist/navigation/FooterGroup.svelte +1 -1
- package/dist/navigation/NavMenu.svelte +47 -23
- package/dist/navigation/NavMenu.svelte.d.ts +29 -0
- package/dist/navigation/Pagination.svelte +158 -0
- package/dist/navigation/Pagination.svelte.d.ts +18 -0
- package/dist/navigation/SideNav.svelte +30 -25
- package/dist/navigation/SideNav.svelte.d.ts +2 -3
- package/dist/navigation/Tabs.svelte +17 -7
- package/dist/navigation/Tabs.svelte.d.ts +2 -2
- package/dist/navigation/css/bottom-nav.css +319 -257
- package/dist/navigation/css/footer-group.css +1 -1
- package/dist/navigation/css/footer-nav.css +1 -1
- package/dist/navigation/css/nav-menu.css +331 -106
- package/dist/navigation/css/pagination.css +74 -0
- package/dist/navigation/css/side-nav.css +514 -75
- package/dist/navigation/css/tabs.css +246 -52
- package/dist/overlay/AlertDialog.svelte +58 -0
- package/dist/overlay/AlertDialog.svelte.d.ts +14 -25
- package/dist/overlay/Command.svelte +347 -0
- package/dist/overlay/Command.svelte.d.ts +33 -25
- package/dist/overlay/Drawer.svelte +49 -21
- package/dist/overlay/Drawer.svelte.d.ts +2 -2
- package/dist/overlay/Dropdown.svelte +3 -3
- package/dist/overlay/Modal.svelte +51 -16
- package/dist/overlay/Modal.svelte.d.ts +3 -3
- package/dist/overlay/Toast.svelte +41 -17
- package/dist/overlay/Toast.svelte.d.ts +1 -1
- package/dist/overlay/Tooltip.svelte +36 -27
- package/dist/overlay/Tooltip.svelte.d.ts +2 -2
- package/dist/overlay/css/command.css +68 -0
- package/dist/overlay/css/drawer.css +63 -24
- package/dist/overlay/css/dropdown.css +1 -1
- package/dist/overlay/css/hovercard.css +1 -1
- package/dist/overlay/css/modal.css +79 -27
- package/dist/overlay/css/toast.css +40 -24
- package/dist/overlay/css/tooltip.css +110 -67
- package/dist/stores/theme.svelte.js +44 -12
- package/dist/stores/toast.svelte.d.ts +4 -4
- package/dist/stores/toast.svelte.js +2 -2
- package/package.json +1 -1
- package/dist/utils/charts.d.ts +0 -27
- package/dist/utils/charts.js +0 -140
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import {
|
|
3
3
|
MaximizeSquareMinimalisticLinearIcon,
|
|
4
|
-
|
|
4
|
+
PauseFilledIcon,
|
|
5
5
|
PictureInPicture24RegularIcon,
|
|
6
|
-
|
|
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 {
|
|
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
|
-
<
|
|
160
|
-
{
|
|
161
|
-
|
|
162
|
-
{
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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 -->
|
|
@@ -186,26 +204,35 @@
|
|
|
186
204
|
min={0}
|
|
187
205
|
max={1}
|
|
188
206
|
step={0.1}
|
|
207
|
+
{color}
|
|
189
208
|
size="sm"
|
|
190
209
|
name="video-volume"
|
|
191
210
|
hideLabel
|
|
192
211
|
/>
|
|
193
212
|
</div>
|
|
194
213
|
{/if}
|
|
195
|
-
<
|
|
196
|
-
{
|
|
197
|
-
|
|
198
|
-
{
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
214
|
+
<IconButton
|
|
215
|
+
onclick={toggleMute}
|
|
216
|
+
icon={videoParams.muted ? Speaker24RegularIcon : SpeakerMute24RegularIcon}
|
|
217
|
+
{color}
|
|
218
|
+
variant="overlay"
|
|
219
|
+
size="sm"
|
|
220
|
+
/>
|
|
202
221
|
</div>
|
|
203
|
-
<
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
222
|
+
<IconButton
|
|
223
|
+
onclick={handleTogglePip}
|
|
224
|
+
icon={PictureInPicture24RegularIcon}
|
|
225
|
+
{color}
|
|
226
|
+
variant="overlay"
|
|
227
|
+
size="sm"
|
|
228
|
+
/>
|
|
229
|
+
<IconButton
|
|
230
|
+
onclick={handleToggleMaximize}
|
|
231
|
+
icon={MaximizeSquareMinimalisticLinearIcon}
|
|
232
|
+
{color}
|
|
233
|
+
variant="overlay"
|
|
234
|
+
size="sm"
|
|
235
|
+
/>
|
|
209
236
|
</div>
|
|
210
237
|
</div>
|
|
211
238
|
<div class={cn('video-control-progress', showControls ? 'visible' : 'invisible')}>
|
|
@@ -215,6 +242,7 @@
|
|
|
215
242
|
max={videoParams.duration}
|
|
216
243
|
bind:value={videoParams.time}
|
|
217
244
|
name="video-time"
|
|
245
|
+
{color}
|
|
218
246
|
hideLabel
|
|
219
247
|
/>
|
|
220
248
|
</div>
|
|
@@ -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>;
|
package/dist/control/css/btn.css
CHANGED
|
@@ -1,202 +1,250 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.btn {
|
|
3
|
-
@apply relative flex items-center justify-center w-fit
|
|
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-
|
|
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
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
24
|
-
@apply h-
|
|
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
|
-
|
|
29
|
-
|
|
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
|
-
|
|
32
|
-
@apply h-
|
|
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
|
-
|
|
36
|
-
@apply h-
|
|
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-
|
|
41
|
-
@apply
|
|
123
|
+
.btn.is-wide {
|
|
124
|
+
@apply w-full;
|
|
125
|
+
}
|
|
42
126
|
|
|
43
|
-
|
|
44
|
-
|
|
127
|
+
.btn.is-soft {
|
|
128
|
+
&.is-primary {
|
|
129
|
+
@apply bg-soft-primary text-primary hover:bg-soft-primary/60;
|
|
45
130
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
@apply h-10 w-auto;
|
|
131
|
+
&.is-secondary {
|
|
132
|
+
@apply bg-soft-secondary text-secondary hover:bg-soft-secondary/60;
|
|
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-soft-muted text-on-muted hover:bg-soft-muted/60;
|
|
57
136
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
@apply h-12 w-auto;
|
|
137
|
+
&.is-success {
|
|
138
|
+
@apply bg-soft-success text-success hover:bg-soft-success/60;
|
|
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-soft-info text-info hover:bg-soft-info/60;
|
|
69
142
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
143
|
+
&.is-warning {
|
|
144
|
+
@apply bg-soft-warning text-warning hover:bg-soft-warning/60;
|
|
145
|
+
}
|
|
146
|
+
&.is-danger {
|
|
147
|
+
@apply bg-soft-danger text-danger hover:bg-soft-danger/60;
|
|
73
148
|
}
|
|
74
149
|
}
|
|
75
150
|
|
|
76
|
-
.btn.is-
|
|
77
|
-
|
|
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
|
-
|
|
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-muted text-on-muted hover:bg-muted/80;
|
|
93
160
|
}
|
|
94
|
-
|
|
95
|
-
|
|
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
|
-
|
|
108
|
-
|
|
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-
|
|
113
|
-
|
|
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
|
-
|
|
120
|
-
|
|
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-muted text-on-muted hover:bg-muted hover:text-on-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-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
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-muted hover:text-on-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-
|
|
193
|
-
|
|
223
|
+
.btn.is-overlay {
|
|
224
|
+
&.is-primary {
|
|
225
|
+
@apply bg-overlay text-on-overlay hover:bg-primary hover:text-on-primary;
|
|
226
|
+
}
|
|
227
|
+
&.is-secondary {
|
|
228
|
+
@apply bg-overlay text-on-overlay hover:bg-secondary hover:text-on-secondary;
|
|
229
|
+
}
|
|
230
|
+
&.is-muted {
|
|
231
|
+
@apply bg-overlay text-on-overlay hover:bg-muted hover:text-on-muted;
|
|
232
|
+
}
|
|
233
|
+
&.is-success {
|
|
234
|
+
@apply bg-overlay text-on-overlay hover:bg-success hover:text-on-success;
|
|
235
|
+
}
|
|
236
|
+
&.is-info {
|
|
237
|
+
@apply bg-overlay text-on-overlay hover:bg-info hover:text-on-info;
|
|
238
|
+
}
|
|
239
|
+
&.is-warning {
|
|
240
|
+
@apply bg-overlay text-on-overlay hover:bg-warning hover:text-on-warning;
|
|
241
|
+
}
|
|
242
|
+
&.is-danger {
|
|
243
|
+
@apply bg-overlay text-on-overlay hover:bg-danger hover:text-on-danger;
|
|
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,84 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.fab-container {
|
|
3
|
+
--fab-offset-x: 1rem;
|
|
4
|
+
--fab-offset-y: 1rem;
|
|
5
|
+
|
|
6
|
+
@apply absolute z-50 flex flex-col items-center;
|
|
7
|
+
|
|
8
|
+
&.is-fixed {
|
|
9
|
+
@apply fixed;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&.is-top-left {
|
|
13
|
+
top: var(--fab-offset-y);
|
|
14
|
+
left: var(--fab-offset-x);
|
|
15
|
+
@apply flex-col-reverse;
|
|
16
|
+
.fab-actions {
|
|
17
|
+
@apply flex-col-reverse mt-3;
|
|
18
|
+
}
|
|
19
|
+
.fab-action {
|
|
20
|
+
@apply flex-row-reverse;
|
|
21
|
+
.fab-action-label {
|
|
22
|
+
@apply ml-0 mr-3;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.is-top-right {
|
|
28
|
+
top: var(--fab-offset-y);
|
|
29
|
+
right: var(--fab-offset-x);
|
|
30
|
+
@apply flex-col-reverse;
|
|
31
|
+
.fab-actions {
|
|
32
|
+
@apply flex-col-reverse mt-3;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.is-bottom-left {
|
|
37
|
+
bottom: var(--fab-offset-y);
|
|
38
|
+
left: var(--fab-offset-x);
|
|
39
|
+
.fab-action {
|
|
40
|
+
@apply flex-row-reverse;
|
|
41
|
+
.fab-action-label {
|
|
42
|
+
@apply ml-0 mr-3;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&.is-bottom-right {
|
|
48
|
+
bottom: var(--fab-offset-y);
|
|
49
|
+
right: var(--fab-offset-x);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.fab-trigger {
|
|
54
|
+
@apply transition-transform duration-300;
|
|
55
|
+
|
|
56
|
+
&.is-open {
|
|
57
|
+
@apply rotate-45;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.fab-actions {
|
|
62
|
+
@apply flex flex-col gap-3 mb-3;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.fab-action {
|
|
66
|
+
@apply flex items-center justify-end;
|
|
67
|
+
animation: fab-action-appear 0.2s ease-out forwards;
|
|
68
|
+
animation-delay: var(--fab-action-delay, 0ms);
|
|
69
|
+
opacity: 0;
|
|
70
|
+
transform: scale(0.8) translateY(10px);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@keyframes fab-action-appear {
|
|
74
|
+
to {
|
|
75
|
+
opacity: 1;
|
|
76
|
+
transform: scale(1) translateY(0);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.fab-action-label {
|
|
81
|
+
@apply ml-3 px-3 py-1.5 text-sm font-medium whitespace-nowrap;
|
|
82
|
+
@apply bg-surface text-on-surface rounded-ui shadow-md;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -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
|
+
}
|