@auronui/styles 1.0.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.
- package/DATA_ATTRIBUTES.md +163 -0
- package/LICENSE +21 -0
- package/README.md +54 -0
- package/base/base.css +40 -0
- package/components/accordion.css +201 -0
- package/components/alert-dialog.css +307 -0
- package/components/alert.css +143 -0
- package/components/aspect-ratio.css +8 -0
- package/components/autocomplete.css +685 -0
- package/components/avatar.css +78 -0
- package/components/badge.css +186 -0
- package/components/breadcrumbs.css +76 -0
- package/components/button-group.css +126 -0
- package/components/button.css +282 -0
- package/components/calendar-year-picker.css +193 -0
- package/components/calendar.css +332 -0
- package/components/card.css +225 -0
- package/components/checkbox-group.css +7 -0
- package/components/checkbox.css +268 -0
- package/components/chip.css +227 -0
- package/components/close-button.css +65 -0
- package/components/collapsible-group.css +7 -0
- package/components/collapsible.css +74 -0
- package/components/color-area.css +81 -0
- package/components/color-field.css +99 -0
- package/components/color-input-group.css +153 -0
- package/components/color-picker.css +121 -0
- package/components/color-slider.css +266 -0
- package/components/color-swatch-picker.css +247 -0
- package/components/color-swatch.css +42 -0
- package/components/combo-box.css +203 -0
- package/components/date-input-group.css +125 -0
- package/components/date-input.css +529 -0
- package/components/date-picker.css +86 -0
- package/components/date-range-field.css +538 -0
- package/components/date-range-picker.css +93 -0
- package/components/description.css +4 -0
- package/components/drawer.css +222 -0
- package/components/dropdown.css +67 -0
- package/components/empty-state.css +4 -0
- package/components/error-message.css +13 -0
- package/components/field-error.css +19 -0
- package/components/fieldset.css +39 -0
- package/components/header.css +7 -0
- package/components/index.css +164 -0
- package/components/input-otp.css +124 -0
- package/components/input.css +603 -0
- package/components/kbd.css +27 -0
- package/components/label.css +28 -0
- package/components/link.css +144 -0
- package/components/list-box-item.css +29 -0
- package/components/list-box-section.css +13 -0
- package/components/list-box.css +11 -0
- package/components/menu-item.css +68 -0
- package/components/menu-section.css +18 -0
- package/components/menu.css +7 -0
- package/components/meter.css +104 -0
- package/components/modal.css +335 -0
- package/components/number-field.css +395 -0
- package/components/pagination.css +157 -0
- package/components/popover.css +96 -0
- package/components/progress-bar.css +126 -0
- package/components/progress-circle.css +82 -0
- package/components/radio-group.css +47 -0
- package/components/radio.css +157 -0
- package/components/range-calendar.css +402 -0
- package/components/scroll-area.css +70 -0
- package/components/scroll-shadow.css +77 -0
- package/components/select.css +649 -0
- package/components/separator.css +59 -0
- package/components/skeleton.css +48 -0
- package/components/slider.css +155 -0
- package/components/spinner.css +42 -0
- package/components/splitter.css +74 -0
- package/components/stepper.css +160 -0
- package/components/surface.css +23 -0
- package/components/switch-group.css +17 -0
- package/components/switch.css +194 -0
- package/components/table.css +341 -0
- package/components/tabs.css +262 -0
- package/components/tag-group.css +66 -0
- package/components/tag.css +99 -0
- package/components/textarea.css +536 -0
- package/components/time-field.css +530 -0
- package/components/toast.css +267 -0
- package/components/toggle-button-group.css +174 -0
- package/components/toggle-button.css +149 -0
- package/components/toolbar.css +32 -0
- package/components/tooltip.css +47 -0
- package/components/tree.css +81 -0
- package/index.css +29 -0
- package/package.json +415 -0
- package/src/components/accordion/accordion.styles.ts +46 -0
- package/src/components/accordion/index.ts +1 -0
- package/src/components/alert/alert.styles.ts +37 -0
- package/src/components/alert/index.ts +1 -0
- package/src/components/alert-dialog/alert-dialog.styles.ts +72 -0
- package/src/components/alert-dialog/index.ts +1 -0
- package/src/components/aspect-ratio/aspect-ratio.styles.ts +10 -0
- package/src/components/aspect-ratio/index.ts +1 -0
- package/src/components/autocomplete/autocomplete.styles.ts +86 -0
- package/src/components/autocomplete/index.ts +1 -0
- package/src/components/avatar/avatar.styles.ts +53 -0
- package/src/components/avatar/index.ts +1 -0
- package/src/components/badge/badge.styles.ts +77 -0
- package/src/components/badge/index.ts +1 -0
- package/src/components/breadcrumbs/breadcrumbs.styles.ts +14 -0
- package/src/components/breadcrumbs/index.ts +1 -0
- package/src/components/button/__tests__/button.styles.test.ts +79 -0
- package/src/components/button/button.styles.ts +65 -0
- package/src/components/button/index.ts +1 -0
- package/src/components/button-group/button-group.styles.ts +32 -0
- package/src/components/button-group/index.ts +1 -0
- package/src/components/calendar/calendar.styles.ts +60 -0
- package/src/components/calendar/index.ts +1 -0
- package/src/components/calendar-year-picker/calendar-year-picker.styles.ts +15 -0
- package/src/components/calendar-year-picker/index.ts +1 -0
- package/src/components/card/card.styles.ts +65 -0
- package/src/components/card/index.ts +1 -0
- package/src/components/checkbox/checkbox.styles.ts +27 -0
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/checkbox-group/checkbox-group.styles.ts +18 -0
- package/src/components/checkbox-group/index.ts +1 -0
- package/src/components/chip/chip.styles.ts +65 -0
- package/src/components/chip/index.ts +1 -0
- package/src/components/close-button/close-button.styles.ts +17 -0
- package/src/components/close-button/index.ts +1 -0
- package/src/components/collapsible/collapsible.styles.ts +25 -0
- package/src/components/collapsible/index.ts +1 -0
- package/src/components/collapsible-group/collapsible-group.styles.ts +13 -0
- package/src/components/collapsible-group/index.ts +1 -0
- package/src/components/color-area/color-area.styles.ts +23 -0
- package/src/components/color-area/index.ts +1 -0
- package/src/components/color-field/color-field.styles.ts +18 -0
- package/src/components/color-field/index.ts +1 -0
- package/src/components/color-input-group/color-input-group.styles.ts +34 -0
- package/src/components/color-input-group/index.ts +1 -0
- package/src/components/color-picker/color-picker.styles.ts +13 -0
- package/src/components/color-picker/index.ts +1 -0
- package/src/components/color-slider/color-slider.styles.ts +14 -0
- package/src/components/color-slider/index.ts +1 -0
- package/src/components/color-swatch/color-swatch.styles.ts +26 -0
- package/src/components/color-swatch/index.ts +1 -0
- package/src/components/color-swatch-picker/color-swatch-picker.styles.ts +54 -0
- package/src/components/color-swatch-picker/index.ts +1 -0
- package/src/components/combo-box/combo-box.styles.ts +26 -0
- package/src/components/combo-box/index.ts +1 -0
- package/src/components/date-input/date-input.styles.ts +86 -0
- package/src/components/date-input/index.ts +1 -0
- package/src/components/date-picker/date-picker.styles.ts +14 -0
- package/src/components/date-picker/index.ts +1 -0
- package/src/components/date-range-field/date-range-field.styles.ts +87 -0
- package/src/components/date-range-field/index.ts +1 -0
- package/src/components/date-range-picker/date-range-picker.styles.ts +14 -0
- package/src/components/date-range-picker/index.ts +1 -0
- package/src/components/description/description.styles.ts +9 -0
- package/src/components/description/index.ts +1 -0
- package/src/components/drawer/drawer.styles.ts +55 -0
- package/src/components/drawer/index.ts +1 -0
- package/src/components/dropdown/dropdown.styles.ts +14 -0
- package/src/components/dropdown/index.ts +1 -0
- package/src/components/empty-state/empty-state.styles.ts +9 -0
- package/src/components/empty-state/index.ts +1 -0
- package/src/components/error-message/error-message.styles.ts +9 -0
- package/src/components/error-message/index.ts +1 -0
- package/src/components/fieldset/fieldset.styles.ts +29 -0
- package/src/components/fieldset/index.ts +1 -0
- package/src/components/header/header.styles.ts +5 -0
- package/src/components/header/index.ts +1 -0
- package/src/components/index.ts +84 -0
- package/src/components/input/index.ts +1 -0
- package/src/components/input/input.styles.ts +87 -0
- package/src/components/input-otp/index.ts +1 -0
- package/src/components/input-otp/input-otp.styles.ts +30 -0
- package/src/components/kbd/index.ts +1 -0
- package/src/components/kbd/kbd.styles.ts +20 -0
- package/src/components/label/index.ts +1 -0
- package/src/components/label/label.styles.ts +25 -0
- package/src/components/link/index.ts +1 -0
- package/src/components/link/link.styles.ts +38 -0
- package/src/components/list-box/index.ts +1 -0
- package/src/components/list-box/list-box.styles.ts +18 -0
- package/src/components/list-box-item/index.ts +1 -0
- package/src/components/list-box-item/list-box-item.styles.ts +25 -0
- package/src/components/list-box-section/index.ts +1 -0
- package/src/components/list-box-section/list-box-section.styles.ts +13 -0
- package/src/components/menu/index.ts +1 -0
- package/src/components/menu/menu.styles.ts +9 -0
- package/src/components/menu-item/index.ts +1 -0
- package/src/components/menu-item/menu-item.styles.ts +26 -0
- package/src/components/menu-section/index.ts +1 -0
- package/src/components/menu-section/menu-section.styles.ts +14 -0
- package/src/components/meter/index.ts +1 -0
- package/src/components/meter/meter.styles.ts +48 -0
- package/src/components/modal/index.ts +1 -0
- package/src/components/modal/modal.styles.ts +70 -0
- package/src/components/number-field/index.ts +1 -0
- package/src/components/number-field/number-field.styles.ts +80 -0
- package/src/components/pagination/index.ts +1 -0
- package/src/components/pagination/pagination.styles.ts +32 -0
- package/src/components/popover/index.ts +1 -0
- package/src/components/popover/popover.styles.ts +14 -0
- package/src/components/progress-bar/index.ts +1 -0
- package/src/components/progress-bar/progress-bar.styles.ts +97 -0
- package/src/components/progress-circle/index.ts +1 -0
- package/src/components/progress-circle/progress-circle.styles.ts +74 -0
- package/src/components/radio/index.ts +1 -0
- package/src/components/radio/radio.styles.ts +14 -0
- package/src/components/radio-group/index.ts +1 -0
- package/src/components/radio-group/radio-group.styles.ts +18 -0
- package/src/components/range-calendar/index.ts +1 -0
- package/src/components/range-calendar/range-calendar.styles.ts +60 -0
- package/src/components/scroll-shadow/index.ts +1 -0
- package/src/components/scroll-shadow/scroll-shadow.styles.ts +37 -0
- package/src/components/select/index.ts +1 -0
- package/src/components/select/select.styles.ts +86 -0
- package/src/components/separator/index.ts +1 -0
- package/src/components/separator/separator.styles.ts +25 -0
- package/src/components/skeleton/index.ts +1 -0
- package/src/components/skeleton/skeleton.styles.ts +21 -0
- package/src/components/slider/index.ts +1 -0
- package/src/components/slider/slider.styles.ts +40 -0
- package/src/components/spinner/index.ts +1 -0
- package/src/components/spinner/spinner.styles.ts +28 -0
- package/src/components/splitter/index.ts +1 -0
- package/src/components/splitter/splitter.styles.ts +28 -0
- package/src/components/stepper/index.ts +1 -0
- package/src/components/stepper/stepper.styles.ts +57 -0
- package/src/components/surface/index.ts +1 -0
- package/src/components/surface/surface.styles.ts +20 -0
- package/src/components/switch/index.ts +1 -0
- package/src/components/switch/switch.styles.ts +31 -0
- package/src/components/switch-group/index.ts +1 -0
- package/src/components/switch-group/switch-group.styles.ts +25 -0
- package/src/components/table/index.ts +1 -0
- package/src/components/table/table.styles.ts +47 -0
- package/src/components/tabs/index.ts +1 -0
- package/src/components/tabs/tabs.styles.ts +31 -0
- package/src/components/tag/index.ts +1 -0
- package/src/components/tag/tag.styles.ts +37 -0
- package/src/components/tag-group/index.ts +1 -0
- package/src/components/tag-group/tag-group.styles.ts +12 -0
- package/src/components/text/index.ts +1 -0
- package/src/components/text/text.styles.ts +29 -0
- package/src/components/textarea/index.ts +1 -0
- package/src/components/textarea/textarea.styles.ts +86 -0
- package/src/components/time-field/index.ts +1 -0
- package/src/components/time-field/time-field.styles.ts +86 -0
- package/src/components/toast/index.ts +1 -0
- package/src/components/toast/toast.styles.ts +67 -0
- package/src/components/toggle-button/index.ts +1 -0
- package/src/components/toggle-button/toggle-button.styles.ts +28 -0
- package/src/components/toggle-button-group/index.ts +1 -0
- package/src/components/toggle-button-group/toggle-button-group.styles.ts +39 -0
- package/src/components/toolbar/index.ts +1 -0
- package/src/components/toolbar/toolbar.styles.ts +23 -0
- package/src/components/tooltip/index.ts +1 -0
- package/src/components/tooltip/tooltip.styles.ts +12 -0
- package/src/components/tree/index.ts +1 -0
- package/src/components/tree/tree.styles.ts +33 -0
- package/src/index.ts +5 -0
- package/src/utils/index.ts +15 -0
- package/themes/default/components/index.css +6 -0
- package/themes/default/index.css +8 -0
- package/themes/default/variables.css +168 -0
- package/themes/shared/theme.css +196 -0
- package/utilities/index.css +244 -0
- package/variants/index.css +106 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./aspect-ratio.styles";
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type {VariantProps} from "../../utils";
|
|
2
|
+
|
|
3
|
+
import {tv} from "tailwind-variants";
|
|
4
|
+
|
|
5
|
+
export const autocompleteVariants = tv({
|
|
6
|
+
slots: {
|
|
7
|
+
base: "autocomplete-root",
|
|
8
|
+
mainWrapper: "autocomplete__main-wrapper",
|
|
9
|
+
trigger: "autocomplete__trigger",
|
|
10
|
+
input: "autocomplete__input",
|
|
11
|
+
startContent: "autocomplete__start-content",
|
|
12
|
+
indicator: "autocomplete__indicator",
|
|
13
|
+
clearButton: "autocomplete__clear-button",
|
|
14
|
+
label: "autocomplete__label",
|
|
15
|
+
helperWrapper: "autocomplete__helper-wrapper",
|
|
16
|
+
description: "autocomplete__description",
|
|
17
|
+
errorMessage: "autocomplete__error-message",
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
variant: "flat",
|
|
21
|
+
size: "md",
|
|
22
|
+
color: "default",
|
|
23
|
+
fullWidth: false,
|
|
24
|
+
isInvalid: false,
|
|
25
|
+
isDisabled: false,
|
|
26
|
+
isReadonly: false,
|
|
27
|
+
hasLabel: false,
|
|
28
|
+
labelPlacement: "inside",
|
|
29
|
+
},
|
|
30
|
+
variants: {
|
|
31
|
+
variant: {
|
|
32
|
+
flat: { trigger: "autocomplete__trigger--flat" },
|
|
33
|
+
bordered: { trigger: "autocomplete__trigger--bordered" },
|
|
34
|
+
faded: { trigger: "autocomplete__trigger--faded" },
|
|
35
|
+
underlined: { trigger: "autocomplete__trigger--underlined" },
|
|
36
|
+
raised: { trigger: "autocomplete__trigger--raised" },
|
|
37
|
+
},
|
|
38
|
+
size: {
|
|
39
|
+
sm: { trigger: "autocomplete__trigger--sm" },
|
|
40
|
+
md: {},
|
|
41
|
+
lg: { trigger: "autocomplete__trigger--lg" },
|
|
42
|
+
},
|
|
43
|
+
color: {
|
|
44
|
+
default: { trigger: "autocomplete__trigger--default" },
|
|
45
|
+
primary: { trigger: "autocomplete__trigger--primary" },
|
|
46
|
+
secondary: { trigger: "autocomplete__trigger--secondary" },
|
|
47
|
+
success: { trigger: "autocomplete__trigger--success" },
|
|
48
|
+
warning: { trigger: "autocomplete__trigger--warning" },
|
|
49
|
+
danger: { trigger: "autocomplete__trigger--danger" },
|
|
50
|
+
},
|
|
51
|
+
fullWidth: {
|
|
52
|
+
false: {},
|
|
53
|
+
true: { base: "autocomplete-root--full-width", trigger: "autocomplete__trigger--full-width" },
|
|
54
|
+
},
|
|
55
|
+
isInvalid: {
|
|
56
|
+
false: {},
|
|
57
|
+
true: { base: "autocomplete-root--invalid", trigger: "autocomplete__trigger--invalid" },
|
|
58
|
+
},
|
|
59
|
+
isDisabled: {
|
|
60
|
+
false: {},
|
|
61
|
+
true: { base: "autocomplete-root--disabled", trigger: "autocomplete__trigger--disabled" },
|
|
62
|
+
},
|
|
63
|
+
isReadonly: {
|
|
64
|
+
false: {},
|
|
65
|
+
true: { trigger: "autocomplete__trigger--readonly" },
|
|
66
|
+
},
|
|
67
|
+
hasLabel: {
|
|
68
|
+
false: {},
|
|
69
|
+
true: {},
|
|
70
|
+
},
|
|
71
|
+
labelPlacement: {
|
|
72
|
+
inside: { base: "autocomplete-root--label-inside" },
|
|
73
|
+
outside: { base: "autocomplete-root--label-outside" },
|
|
74
|
+
"outside-left": { base: "autocomplete-root--label-outside-left" },
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
compoundVariants: [
|
|
78
|
+
{
|
|
79
|
+
hasLabel: true,
|
|
80
|
+
labelPlacement: "inside",
|
|
81
|
+
class: { trigger: "autocomplete__trigger--label-inside" },
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
export type AutocompleteVariants = VariantProps<typeof autocompleteVariants>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./autocomplete.styles";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type {VariantProps} from "../../utils";
|
|
2
|
+
|
|
3
|
+
import {tv} from "tailwind-variants";
|
|
4
|
+
|
|
5
|
+
export const avatarVariants = tv({
|
|
6
|
+
defaultVariants: {
|
|
7
|
+
color: "default",
|
|
8
|
+
size: "md",
|
|
9
|
+
},
|
|
10
|
+
slots: {
|
|
11
|
+
base: "avatar",
|
|
12
|
+
fallback: "avatar__fallback",
|
|
13
|
+
image: "avatar__image",
|
|
14
|
+
},
|
|
15
|
+
variants: {
|
|
16
|
+
color: {
|
|
17
|
+
accent: {
|
|
18
|
+
fallback: "avatar__fallback--accent",
|
|
19
|
+
},
|
|
20
|
+
danger: {
|
|
21
|
+
fallback: "avatar__fallback--danger",
|
|
22
|
+
},
|
|
23
|
+
default: {
|
|
24
|
+
fallback: "avatar__fallback--default",
|
|
25
|
+
},
|
|
26
|
+
success: {
|
|
27
|
+
fallback: "avatar__fallback--success",
|
|
28
|
+
},
|
|
29
|
+
warning: {
|
|
30
|
+
fallback: "avatar__fallback--warning",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
size: {
|
|
34
|
+
lg: {
|
|
35
|
+
base: "avatar--lg",
|
|
36
|
+
},
|
|
37
|
+
md: {
|
|
38
|
+
base: "avatar--md",
|
|
39
|
+
},
|
|
40
|
+
sm: {
|
|
41
|
+
base: "avatar--sm",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
variant: {
|
|
45
|
+
default: {},
|
|
46
|
+
soft: {
|
|
47
|
+
base: "avatar--soft",
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export type AvatarVariants = VariantProps<typeof avatarVariants>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./avatar.styles";
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type {VariantProps} from "../../utils";
|
|
2
|
+
|
|
3
|
+
import {tv} from "tailwind-variants";
|
|
4
|
+
|
|
5
|
+
export const badgeVariants = tv({
|
|
6
|
+
defaultVariants: {
|
|
7
|
+
color: "default",
|
|
8
|
+
placement: "top-right",
|
|
9
|
+
size: "md",
|
|
10
|
+
variant: "primary",
|
|
11
|
+
},
|
|
12
|
+
slots: {
|
|
13
|
+
anchor: "badge-anchor",
|
|
14
|
+
base: "badge",
|
|
15
|
+
label: "badge__label",
|
|
16
|
+
},
|
|
17
|
+
variants: {
|
|
18
|
+
color: {
|
|
19
|
+
accent: {
|
|
20
|
+
base: "badge--accent",
|
|
21
|
+
},
|
|
22
|
+
danger: {
|
|
23
|
+
base: "badge--danger",
|
|
24
|
+
},
|
|
25
|
+
default: {
|
|
26
|
+
base: "badge--default",
|
|
27
|
+
},
|
|
28
|
+
success: {
|
|
29
|
+
base: "badge--success",
|
|
30
|
+
},
|
|
31
|
+
warning: {
|
|
32
|
+
base: "badge--warning",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
placement: {
|
|
36
|
+
"bottom-left": {
|
|
37
|
+
base: "badge--bottom-left",
|
|
38
|
+
},
|
|
39
|
+
"bottom-right": {
|
|
40
|
+
base: "badge--bottom-right",
|
|
41
|
+
},
|
|
42
|
+
"top-left": {
|
|
43
|
+
base: "badge--top-left",
|
|
44
|
+
},
|
|
45
|
+
"top-right": {
|
|
46
|
+
base: "badge--top-right",
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
size: {
|
|
50
|
+
lg: {
|
|
51
|
+
base: "badge--lg",
|
|
52
|
+
},
|
|
53
|
+
md: {
|
|
54
|
+
base: "badge--md",
|
|
55
|
+
},
|
|
56
|
+
sm: {
|
|
57
|
+
base: "badge--sm",
|
|
58
|
+
},
|
|
59
|
+
xs: {
|
|
60
|
+
base: "badge--xs",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
variant: {
|
|
64
|
+
primary: {
|
|
65
|
+
base: "badge--primary",
|
|
66
|
+
},
|
|
67
|
+
secondary: {
|
|
68
|
+
base: "badge--secondary",
|
|
69
|
+
},
|
|
70
|
+
soft: {
|
|
71
|
+
base: "badge--soft",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
export type BadgeVariants = VariantProps<typeof badgeVariants>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./badge.styles";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type {VariantProps} from "../../utils";
|
|
2
|
+
|
|
3
|
+
import {tv} from "tailwind-variants";
|
|
4
|
+
|
|
5
|
+
export const breadcrumbsVariants = tv({
|
|
6
|
+
slots: {
|
|
7
|
+
base: "breadcrumbs",
|
|
8
|
+
item: "breadcrumbs__item",
|
|
9
|
+
link: "breadcrumbs__link",
|
|
10
|
+
separator: "breadcrumbs__separator",
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export type BreadcrumbsVariants = VariantProps<typeof breadcrumbsVariants>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./breadcrumbs.styles";
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest'
|
|
2
|
+
import { buttonVariants } from '../button.styles'
|
|
3
|
+
|
|
4
|
+
describe('buttonVariants (slots)', () => {
|
|
5
|
+
it('returns slot functions for base, startContent, label, endContent, spinner', () => {
|
|
6
|
+
const slots = buttonVariants({})
|
|
7
|
+
expect(typeof slots.base).toBe('function')
|
|
8
|
+
expect(typeof slots.startContent).toBe('function')
|
|
9
|
+
expect(typeof slots.label).toBe('function')
|
|
10
|
+
expect(typeof slots.endContent).toBe('function')
|
|
11
|
+
expect(typeof slots.spinner).toBe('function')
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
it('base slot includes "button" class always', () => {
|
|
15
|
+
expect(buttonVariants({}).base()).toContain('button')
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
it('primary variant (default)', () => {
|
|
19
|
+
expect(buttonVariants({ variant: 'primary' }).base()).toContain('button--primary')
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
it('success variant', () => {
|
|
23
|
+
expect(buttonVariants({ variant: 'success' }).base()).toContain('button--success')
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
it('success-soft variant', () => {
|
|
27
|
+
expect(buttonVariants({ variant: 'success-soft' }).base()).toContain('button--success-soft')
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
it('warning variant', () => {
|
|
31
|
+
expect(buttonVariants({ variant: 'warning' }).base()).toContain('button--warning')
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
it('warning-soft variant', () => {
|
|
35
|
+
expect(buttonVariants({ variant: 'warning-soft' }).base()).toContain('button--warning-soft')
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
it('danger variant', () => {
|
|
39
|
+
expect(buttonVariants({ variant: 'danger' }).base()).toContain('button--danger')
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
it('danger-soft variant', () => {
|
|
43
|
+
expect(buttonVariants({ variant: 'danger-soft' }).base()).toContain('button--danger-soft')
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
it('isLoading=true adds button--loading to base', () => {
|
|
47
|
+
expect(buttonVariants({ isLoading: true }).base()).toContain('button--loading')
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
it('isLoading=true adds button__label--loading to label', () => {
|
|
51
|
+
expect(buttonVariants({ isLoading: true }).label()).toContain('button__label--loading')
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
it('isLoading=false (default) does not add loading classes', () => {
|
|
55
|
+
const slots = buttonVariants({ isLoading: false })
|
|
56
|
+
expect(slots.base()).not.toContain('button--loading')
|
|
57
|
+
expect(slots.label()).not.toContain('button__label--loading')
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
it('startContent slot', () => {
|
|
61
|
+
expect(buttonVariants({}).startContent()).toContain('button__start-content')
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
it('endContent slot', () => {
|
|
65
|
+
expect(buttonVariants({}).endContent()).toContain('button__end-content')
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
it('spinner slot', () => {
|
|
69
|
+
expect(buttonVariants({}).spinner()).toContain('button__spinner')
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
it('fullWidth=true adds button--full-width', () => {
|
|
73
|
+
expect(buttonVariants({ fullWidth: true }).base()).toContain('button--full-width')
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
it('isIconOnly=true adds button--icon-only', () => {
|
|
77
|
+
expect(buttonVariants({ isIconOnly: true }).base()).toContain('button--icon-only')
|
|
78
|
+
})
|
|
79
|
+
})
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type {VariantProps} from "../../utils";
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
|
|
4
|
+
export const buttonVariants = tv({
|
|
5
|
+
slots: {
|
|
6
|
+
base: "button",
|
|
7
|
+
startContent: "button__start-content",
|
|
8
|
+
label: "button__label",
|
|
9
|
+
endContent: "button__end-content",
|
|
10
|
+
spinner: "button__spinner",
|
|
11
|
+
},
|
|
12
|
+
defaultVariants: {
|
|
13
|
+
fullWidth: false,
|
|
14
|
+
isIconOnly: false,
|
|
15
|
+
isLoading: false,
|
|
16
|
+
size: "md",
|
|
17
|
+
variant: "primary",
|
|
18
|
+
},
|
|
19
|
+
variants: {
|
|
20
|
+
fullWidth: {
|
|
21
|
+
false: { base: "" },
|
|
22
|
+
true: { base: "button--full-width" },
|
|
23
|
+
},
|
|
24
|
+
isIconOnly: {
|
|
25
|
+
false: {},
|
|
26
|
+
true: { base: "button--icon-only" },
|
|
27
|
+
},
|
|
28
|
+
isLoading: {
|
|
29
|
+
false: {},
|
|
30
|
+
true: {
|
|
31
|
+
base: "button--loading",
|
|
32
|
+
label: "button__label--loading",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
radius: {
|
|
36
|
+
none: { base: "button--radius-none" },
|
|
37
|
+
sm: { base: "button--radius-sm" },
|
|
38
|
+
md: { base: "button--radius-md" },
|
|
39
|
+
lg: { base: "button--radius-lg" },
|
|
40
|
+
full: { base: "button--radius-full" },
|
|
41
|
+
},
|
|
42
|
+
size: {
|
|
43
|
+
xl: { base: "button--xl" },
|
|
44
|
+
lg: { base: "button--lg" },
|
|
45
|
+
md: { base: "button--md" },
|
|
46
|
+
sm: { base: "button--sm" },
|
|
47
|
+
xs: { base: "button--xs" },
|
|
48
|
+
},
|
|
49
|
+
variant: {
|
|
50
|
+
danger: { base: "button--danger" },
|
|
51
|
+
"danger-soft": { base: "button--danger-soft" },
|
|
52
|
+
ghost: { base: "button--ghost" },
|
|
53
|
+
outline: { base: "button--outline" },
|
|
54
|
+
primary: { base: "button--primary" },
|
|
55
|
+
secondary: { base: "button--secondary" },
|
|
56
|
+
success: { base: "button--success" },
|
|
57
|
+
"success-soft": { base: "button--success-soft" },
|
|
58
|
+
tertiary: { base: "button--tertiary" },
|
|
59
|
+
warning: { base: "button--warning" },
|
|
60
|
+
"warning-soft": { base: "button--warning-soft" },
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
export type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./button.styles";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type {VariantProps} from "../../utils";
|
|
2
|
+
|
|
3
|
+
import {tv} from "tailwind-variants";
|
|
4
|
+
|
|
5
|
+
export const buttonGroupVariants = tv({
|
|
6
|
+
defaultVariants: {
|
|
7
|
+
fullWidth: false,
|
|
8
|
+
orientation: "horizontal",
|
|
9
|
+
},
|
|
10
|
+
slots: {
|
|
11
|
+
base: "button-group",
|
|
12
|
+
separator: "button-group__separator",
|
|
13
|
+
},
|
|
14
|
+
variants: {
|
|
15
|
+
fullWidth: {
|
|
16
|
+
false: {},
|
|
17
|
+
true: {
|
|
18
|
+
base: "button-group--full-width",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
orientation: {
|
|
22
|
+
horizontal: {
|
|
23
|
+
base: "button-group--horizontal",
|
|
24
|
+
},
|
|
25
|
+
vertical: {
|
|
26
|
+
base: "button-group--vertical",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export type ButtonGroupVariants = VariantProps<typeof buttonGroupVariants>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./button-group.styles";
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type {VariantProps} from "../../utils";
|
|
2
|
+
|
|
3
|
+
import {tv} from "tailwind-variants";
|
|
4
|
+
|
|
5
|
+
export const calendarVariants = tv({
|
|
6
|
+
defaultVariants: {},
|
|
7
|
+
slots: {
|
|
8
|
+
/** Root calendar container */
|
|
9
|
+
base: "calendar",
|
|
10
|
+
/** Calendar cell (td) */
|
|
11
|
+
cell: "calendar__cell",
|
|
12
|
+
/** Inner cell trigger button (full-cell hit target over the TD's circle) */
|
|
13
|
+
cellButton: "calendar__cell-button",
|
|
14
|
+
/** Cell indicator (small dot at bottom of cell) */
|
|
15
|
+
cellIndicator: "calendar__cell-indicator",
|
|
16
|
+
/** Calendar grid (table) */
|
|
17
|
+
grid: "calendar__grid",
|
|
18
|
+
/** Grid body (tbody) */
|
|
19
|
+
gridBody: "calendar__grid-body",
|
|
20
|
+
/** Grid header (thead) */
|
|
21
|
+
gridHeader: "calendar__grid-header",
|
|
22
|
+
/** Grid row (tr) */
|
|
23
|
+
gridRow: "calendar__grid-row",
|
|
24
|
+
/** Calendar header containing heading and navigation */
|
|
25
|
+
header: "calendar__header",
|
|
26
|
+
/** Header cell (th - day names) */
|
|
27
|
+
headerCell: "calendar__header-cell",
|
|
28
|
+
/** Month/year heading text */
|
|
29
|
+
heading: "calendar__heading",
|
|
30
|
+
/** Clickable heading button that cycles date/month/year views */
|
|
31
|
+
headingButton: "calendar__heading-button px-4 py-2",
|
|
32
|
+
/** Month-view grid (3 cols x 4 rows of month cells) */
|
|
33
|
+
monthGrid: "calendar__month-grid",
|
|
34
|
+
/** Month-view grid body (tbody) */
|
|
35
|
+
monthGridBody: "calendar__month-grid-body",
|
|
36
|
+
/** Month-view grid row (tr) */
|
|
37
|
+
monthGridRow: "calendar__month-grid-row",
|
|
38
|
+
/** Month cell (button per month) */
|
|
39
|
+
monthCell: "calendar__month-cell px-4 py-2",
|
|
40
|
+
/** Month cell label */
|
|
41
|
+
monthCellLabel: "calendar__month-cell-label",
|
|
42
|
+
/** Year-view grid (3 cols x 4 rows of year cells) */
|
|
43
|
+
yearGrid: "calendar__year-grid",
|
|
44
|
+
/** Year-view grid body (tbody) */
|
|
45
|
+
yearGridBody: "calendar__year-grid-body",
|
|
46
|
+
/** Year-view grid row (tr) */
|
|
47
|
+
yearGridRow: "calendar__year-grid-row",
|
|
48
|
+
/** Year cell (button per year) */
|
|
49
|
+
yearCell: "calendar__year-cell px-4 py-2",
|
|
50
|
+
/** Year cell label */
|
|
51
|
+
yearCellLabel: "calendar__year-cell-label",
|
|
52
|
+
/** Previous/Next navigation button */
|
|
53
|
+
navButton: "calendar__nav-button",
|
|
54
|
+
/** Navigation button icon */
|
|
55
|
+
navButtonIcon: "calendar__nav-button-icon",
|
|
56
|
+
},
|
|
57
|
+
variants: {},
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export type CalendarVariants = VariantProps<typeof calendarVariants>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./calendar.styles";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type {VariantProps} from "../../utils";
|
|
2
|
+
|
|
3
|
+
import {tv} from "tailwind-variants";
|
|
4
|
+
|
|
5
|
+
export const calendarYearPickerVariants = tv({
|
|
6
|
+
slots: {
|
|
7
|
+
trigger: "calendar-year-picker__trigger",
|
|
8
|
+
triggerHeading: "calendar-year-picker__trigger-heading",
|
|
9
|
+
triggerIndicator: "calendar-year-picker__trigger-indicator",
|
|
10
|
+
yearCell: "calendar-year-picker__year-cell",
|
|
11
|
+
yearGrid: "calendar-year-picker__year-grid",
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type CalendarYearPickerVariants = VariantProps<typeof calendarYearPickerVariants>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./calendar-year-picker.styles";
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type {VariantProps} from "../../utils";
|
|
2
|
+
|
|
3
|
+
import {tv} from "tailwind-variants";
|
|
4
|
+
|
|
5
|
+
const cardVariants = tv({
|
|
6
|
+
defaultVariants: {
|
|
7
|
+
variant: "default",
|
|
8
|
+
shadow: "sm",
|
|
9
|
+
radius: "lg",
|
|
10
|
+
isHoverable: false,
|
|
11
|
+
isPressable: false,
|
|
12
|
+
isDisabled: false,
|
|
13
|
+
fullWidth: false,
|
|
14
|
+
},
|
|
15
|
+
slots: {
|
|
16
|
+
base: "card",
|
|
17
|
+
content: "card__content",
|
|
18
|
+
description: "card__description",
|
|
19
|
+
footer: "card__footer",
|
|
20
|
+
header: "card__header",
|
|
21
|
+
title: "card__title",
|
|
22
|
+
},
|
|
23
|
+
variants: {
|
|
24
|
+
variant: {
|
|
25
|
+
default: {base: "card--default"},
|
|
26
|
+
secondary: {base: "card--secondary"},
|
|
27
|
+
tertiary: {base: "card--tertiary"},
|
|
28
|
+
transparent: {base: "card--transparent"},
|
|
29
|
+
bordered: {base: "card--bordered"},
|
|
30
|
+
blurred: {base: "card--blurred"},
|
|
31
|
+
},
|
|
32
|
+
shadow: {
|
|
33
|
+
none: {base: "card--shadow-none"},
|
|
34
|
+
sm: {base: "card--shadow-sm"},
|
|
35
|
+
md: {base: "card--shadow-md"},
|
|
36
|
+
lg: {base: "card--shadow-lg"},
|
|
37
|
+
},
|
|
38
|
+
radius: {
|
|
39
|
+
none: {base: "card--radius-none"},
|
|
40
|
+
sm: {base: "card--radius-sm"},
|
|
41
|
+
md: {base: "card--radius-md"},
|
|
42
|
+
lg: {base: "card--radius-lg"},
|
|
43
|
+
xl: {base: ""},
|
|
44
|
+
},
|
|
45
|
+
isHoverable: {
|
|
46
|
+
true: {base: "card--hoverable"},
|
|
47
|
+
false: {},
|
|
48
|
+
},
|
|
49
|
+
isPressable: {
|
|
50
|
+
true: {base: "card--pressable"},
|
|
51
|
+
false: {},
|
|
52
|
+
},
|
|
53
|
+
isDisabled: {
|
|
54
|
+
true: {base: "card--disabled"},
|
|
55
|
+
false: {},
|
|
56
|
+
},
|
|
57
|
+
fullWidth: {
|
|
58
|
+
true: {base: "card--full-width"},
|
|
59
|
+
false: {},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export {cardVariants};
|
|
65
|
+
export type CardVariants = VariantProps<typeof cardVariants>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./card.styles";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type {VariantProps} from "../../utils";
|
|
2
|
+
|
|
3
|
+
import {tv} from "tailwind-variants";
|
|
4
|
+
|
|
5
|
+
export const checkboxVariants = tv({
|
|
6
|
+
defaultVariants: {
|
|
7
|
+
variant: "primary",
|
|
8
|
+
},
|
|
9
|
+
slots: {
|
|
10
|
+
base: "checkbox",
|
|
11
|
+
content: "checkbox__content",
|
|
12
|
+
control: "checkbox__control",
|
|
13
|
+
indicator: "checkbox__indicator",
|
|
14
|
+
},
|
|
15
|
+
variants: {
|
|
16
|
+
variant: {
|
|
17
|
+
primary: {
|
|
18
|
+
base: "checkbox--primary",
|
|
19
|
+
},
|
|
20
|
+
secondary: {
|
|
21
|
+
base: "checkbox--secondary",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export type CheckboxVariants = VariantProps<typeof checkboxVariants>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./checkbox.styles";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type {VariantProps} from "../../utils";
|
|
2
|
+
|
|
3
|
+
import {tv} from "tailwind-variants";
|
|
4
|
+
|
|
5
|
+
export const checkboxGroupVariants = tv({
|
|
6
|
+
base: "checkbox-group",
|
|
7
|
+
defaultVariants: {
|
|
8
|
+
variant: "primary",
|
|
9
|
+
},
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
primary: "checkbox-group--primary",
|
|
13
|
+
secondary: "checkbox-group--secondary",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export type CheckboxGroupVariants = VariantProps<typeof checkboxGroupVariants>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./checkbox-group.styles";
|