@rovula/ui 0.0.19 → 0.0.21
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/dist/cjs/bundle.css +3220 -1382
- package/dist/cjs/bundle.js +3 -3
- package/dist/cjs/bundle.js.map +1 -1
- package/dist/cjs/types/components/ActionButton/ActionButton.stories.d.ts +4 -4
- package/dist/cjs/types/components/ActionButton/ActionButton.styles copy.d.ts +6 -0
- package/dist/cjs/types/components/Button/Button.styles copy.d.ts +7 -0
- package/dist/cjs/types/components/Button/Button.styles.d.ts +1 -0
- package/dist/cjs/types/components/Button/Buttons.stories.d.ts +12 -4
- package/dist/cjs/types/components/Calendar/Calendar.d.ts +0 -1
- package/dist/cjs/types/components/Calendar/Calendar.stories.d.ts +7 -7
- package/dist/cjs/types/components/Checkbox/Checkbox.stories.d.ts +6 -6
- package/dist/cjs/types/components/DatePicker/DatePicker.d.ts +2 -0
- package/dist/cjs/types/components/DatePicker/DatePicker.stories.d.ts +2 -0
- package/dist/cjs/types/components/Dropdown/Dropdown.stories.d.ts +8 -6
- package/dist/cjs/types/components/Input/Input.stories.d.ts +12 -12
- package/dist/cjs/types/components/Label/Label.stories.d.ts +6 -6
- package/dist/cjs/types/components/Loading/Loading.d.ts +14 -0
- package/dist/cjs/types/components/Loading/Loading.stories.d.ts +35 -0
- package/dist/cjs/types/components/ProgressBar/ProgressBar.d.ts +13 -0
- package/dist/cjs/types/components/ProgressBar/ProgressBar.stories.d.ts +37 -0
- package/dist/cjs/types/components/RadioGroup/RadioGroup.stories.d.ts +5 -5
- package/dist/cjs/types/components/Search/Search.d.ts +22 -1
- package/dist/cjs/types/components/Search/Search.stories.d.ts +338 -7
- package/dist/cjs/types/components/Table/Table.stories.d.ts +4 -4
- package/dist/cjs/types/components/Text/Text.d.ts +1 -1
- package/dist/cjs/types/components/Text/Text.stories.d.ts +1 -1
- package/dist/cjs/types/components/TextInput/TextInput.d.ts +4 -0
- package/dist/cjs/types/components/TextInput/TextInput.stories.d.ts +11 -6
- package/dist/cjs/types/components/TextInput/TextInput.styles.d.ts +8 -0
- package/dist/cjs/types/index.d.ts +3 -0
- package/dist/cjs/types/stories/ColorGroupPreview.d.ts +1 -0
- package/dist/cjs/types/stories/ColorPreview.d.ts +5 -0
- package/dist/components/ActionButton/ActionButton.js +1 -1
- package/dist/components/ActionButton/ActionButton.stories.js +1 -1
- package/dist/components/ActionButton/ActionButton.styles copy.js +90 -0
- package/dist/components/ActionButton/ActionButton.styles.js +54 -15
- package/dist/components/AlertDialog/AlertDialog.js +2 -2
- package/dist/components/Avatar/Avatar.styles.js +1 -1
- package/dist/components/Button/Button.js +3 -2
- package/dist/components/Button/Button.styles copy.js +210 -0
- package/dist/components/Button/Button.styles.js +203 -43
- package/dist/components/Button/Buttons.stories.js +9 -1
- package/dist/components/Calendar/Calendar.js +39 -2
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Collapsible/Collapsible.styles.js +6 -3
- package/dist/components/DatePicker/DatePicker.js +13 -2
- package/dist/components/Dialog/Dialog.js +4 -4
- package/dist/components/Dropdown/Dropdown.js +9 -7
- package/dist/components/Dropdown/Dropdown.styles.js +1 -1
- package/dist/components/Input/Input.js +8 -1
- package/dist/components/Input/Input.stories.js +3 -2
- package/dist/components/Input/Input.styles.js +13 -5
- package/dist/components/Loading/Loading.js +23 -0
- package/dist/components/Loading/Loading.stories.js +37 -0
- package/dist/components/Popover/Popover.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +22 -0
- package/dist/components/ProgressBar/ProgressBar.stories.js +52 -0
- package/dist/components/RadioGroup/RadioGroup.js +2 -2
- package/dist/components/Search/Search.js +6 -7
- package/dist/components/Search/Search.stories.js +8 -5
- package/dist/components/Text/Text.js +17 -2
- package/dist/components/Text/Text.stories.js +5 -1
- package/dist/components/TextInput/TextInput.js +14 -5
- package/dist/components/TextInput/TextInput.stories.js +3 -2
- package/dist/components/TextInput/TextInput.styles.js +120 -18
- package/dist/esm/bundle.css +3220 -1382
- package/dist/esm/bundle.js +3 -3
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/types/components/ActionButton/ActionButton.stories.d.ts +4 -4
- package/dist/esm/types/components/ActionButton/ActionButton.styles copy.d.ts +6 -0
- package/dist/esm/types/components/Button/Button.styles copy.d.ts +7 -0
- package/dist/esm/types/components/Button/Button.styles.d.ts +1 -0
- package/dist/esm/types/components/Button/Buttons.stories.d.ts +12 -4
- package/dist/esm/types/components/Calendar/Calendar.d.ts +0 -1
- package/dist/esm/types/components/Calendar/Calendar.stories.d.ts +7 -7
- package/dist/esm/types/components/Checkbox/Checkbox.stories.d.ts +6 -6
- package/dist/esm/types/components/DatePicker/DatePicker.d.ts +2 -0
- package/dist/esm/types/components/DatePicker/DatePicker.stories.d.ts +2 -0
- package/dist/esm/types/components/Dropdown/Dropdown.stories.d.ts +8 -6
- package/dist/esm/types/components/Input/Input.stories.d.ts +12 -12
- package/dist/esm/types/components/Label/Label.stories.d.ts +6 -6
- package/dist/esm/types/components/Loading/Loading.d.ts +14 -0
- package/dist/esm/types/components/Loading/Loading.stories.d.ts +35 -0
- package/dist/esm/types/components/ProgressBar/ProgressBar.d.ts +13 -0
- package/dist/esm/types/components/ProgressBar/ProgressBar.stories.d.ts +37 -0
- package/dist/esm/types/components/RadioGroup/RadioGroup.stories.d.ts +5 -5
- package/dist/esm/types/components/Search/Search.d.ts +22 -1
- package/dist/esm/types/components/Search/Search.stories.d.ts +338 -7
- package/dist/esm/types/components/Table/Table.stories.d.ts +4 -4
- package/dist/esm/types/components/Text/Text.d.ts +1 -1
- package/dist/esm/types/components/Text/Text.stories.d.ts +1 -1
- package/dist/esm/types/components/TextInput/TextInput.d.ts +4 -0
- package/dist/esm/types/components/TextInput/TextInput.stories.d.ts +11 -6
- package/dist/esm/types/components/TextInput/TextInput.styles.d.ts +8 -0
- package/dist/esm/types/index.d.ts +3 -0
- package/dist/esm/types/stories/ColorGroupPreview.d.ts +1 -0
- package/dist/esm/types/stories/ColorPreview.d.ts +5 -0
- package/dist/index.d.ts +53 -2
- package/dist/index.js +3 -0
- package/dist/src/theme/global.css +5078 -918
- package/dist/stories/ColorGroupPreview.js +478 -0
- package/dist/stories/ColorPreview.js +8 -0
- package/dist/theme/global.css +7 -227
- package/dist/theme/main-preset.js +131 -67
- package/dist/theme/plugins/utilities/typography.js +12 -0
- package/dist/theme/presets/colors.js +101 -220
- package/dist/theme/theme.d.ts +69 -0
- package/dist/theme/themes/xspector/baseline.css +7 -0
- package/dist/theme/themes/xspector/color.css +67 -0
- package/dist/theme/themes/xspector/components/action-button.css +98 -0
- package/dist/theme/themes/xspector/components/loading.css +11 -0
- package/dist/theme/themes/xspector/palette.css +122 -0
- package/dist/theme/themes/xspector/state.css +89 -0
- package/dist/theme/themes/xspector/transparent.css +68 -0
- package/dist/theme/themes/xspector/typography.css +27 -0
- package/dist/theme/tokens/baseline.css +10 -0
- package/dist/theme/tokens/color.css +63 -0
- package/dist/theme/tokens/components/action-button.css +127 -0
- package/dist/theme/tokens/components/button.css +512 -0
- package/dist/theme/tokens/components/loading.css +11 -0
- package/dist/theme/tokens/components/navbar.css +8 -0
- package/dist/theme/tokens/components/progress-bar.css +8 -0
- package/dist/theme/tokens/palette.css +122 -0
- package/dist/theme/tokens/state.css +82 -0
- package/dist/theme/tokens/transparent.css +68 -0
- package/dist/theme/tokens/typography.css +178 -0
- package/dist/theme/tokens/variables.css +28 -0
- package/dist/theme/utils.js +98 -0
- package/package.json +1 -1
- package/src/_theme/global copy.css +761 -0
- package/src/_theme/global.css +39 -0
- package/src/_theme/main-preset.js +239 -0
- package/src/_theme/plugins/utilities/typography.js +81 -0
- package/src/_theme/presets/colors copy 2.js +319 -0
- package/src/_theme/presets/colors copy.js +229 -0
- package/src/_theme/presets/colors.js +94 -0
- package/src/_theme/theme.d.ts +69 -0
- package/src/_theme/variables/base/button.css +334 -0
- package/src/_theme/variables/base/components copy.css +19 -0
- package/src/_theme/variables/default/colors.css +292 -0
- package/src/_theme/variables/default/typography.css +178 -0
- package/src/_theme/variables/xspector/colors.css +468 -0
- package/src/_theme/variables/xspector/typography.css +178 -0
- package/src/components/ActionButton/ActionButton.stories.tsx +1 -1
- package/src/components/ActionButton/ActionButton.styles copy.ts +95 -0
- package/src/components/ActionButton/ActionButton.styles.ts +54 -19
- package/src/components/ActionButton/ActionButton.tsx +1 -1
- package/src/components/AlertDialog/AlertDialog.tsx +2 -2
- package/src/components/Avatar/Avatar.styles.ts +1 -1
- package/src/components/Button/Button.styles copy.ts +214 -0
- package/src/components/Button/Button.styles.ts +203 -47
- package/src/components/Button/Button.tsx +4 -0
- package/src/components/Button/Buttons.stories.tsx +9 -1
- package/src/components/Calendar/Calendar.tsx +49 -7
- package/src/components/Checkbox/Checkbox.tsx +1 -1
- package/src/components/Collapsible/Collapsible.styles.ts +6 -3
- package/src/components/DatePicker/DatePicker.tsx +8 -2
- package/src/components/Dialog/Dialog.tsx +5 -5
- package/src/components/Dropdown/Dropdown.styles.ts +1 -1
- package/src/components/Dropdown/Dropdown.tsx +14 -12
- package/src/components/Input/Input.stories.tsx +3 -2
- package/src/components/Input/Input.styles.tsx +13 -6
- package/src/components/Input/Input.tsx +8 -1
- package/src/components/Loading/Loading.stories.tsx +43 -0
- package/src/components/Loading/Loading.tsx +72 -0
- package/src/components/Popover/Popover.tsx +1 -1
- package/src/components/ProgressBar/ProgressBar.stories.tsx +78 -0
- package/src/components/ProgressBar/ProgressBar.tsx +62 -0
- package/src/components/RadioGroup/RadioGroup.tsx +2 -2
- package/src/components/Search/Search.stories.tsx +13 -13
- package/src/components/Search/Search.tsx +14 -19
- package/src/components/Text/Text.stories.tsx +6 -4
- package/src/components/Text/Text.tsx +27 -3
- package/src/components/TextInput/TextInput.stories.tsx +3 -2
- package/src/components/TextInput/TextInput.styles.ts +124 -19
- package/src/components/TextInput/TextInput.tsx +34 -4
- package/src/index.ts +3 -0
- package/src/stories/ColorGroupPreview.tsx +494 -0
- package/src/stories/ColorPreview.tsx +45 -0
- package/src/stories/Colors.mdx +14 -0
- package/src/stories/Typography.mdx +7 -151
- package/src/theme/global.css +7 -227
- package/src/theme/main-preset.js +131 -67
- package/src/theme/plugins/utilities/typography.js +12 -0
- package/src/theme/presets/colors.js +101 -220
- package/src/theme/theme.d.ts +69 -0
- package/src/theme/themes/xspector/baseline.css +7 -0
- package/src/theme/themes/xspector/color.css +67 -0
- package/src/theme/themes/xspector/components/action-button.css +98 -0
- package/src/theme/themes/xspector/components/loading.css +11 -0
- package/src/theme/themes/xspector/palette.css +122 -0
- package/src/theme/themes/xspector/state.css +89 -0
- package/src/theme/themes/xspector/transparent.css +68 -0
- package/src/theme/themes/xspector/typography.css +27 -0
- package/src/theme/tokens/baseline.css +10 -0
- package/src/theme/tokens/color.css +63 -0
- package/src/theme/tokens/components/action-button.css +127 -0
- package/src/theme/tokens/components/button.css +512 -0
- package/src/theme/tokens/components/loading.css +11 -0
- package/src/theme/tokens/components/navbar.css +8 -0
- package/src/theme/tokens/components/progress-bar.css +8 -0
- package/src/theme/tokens/palette.css +122 -0
- package/src/theme/tokens/state.css +82 -0
- package/src/theme/tokens/transparent.css +68 -0
- package/src/theme/tokens/typography.css +178 -0
- package/src/theme/tokens/variables.css +28 -0
- package/src/theme/utils.js +98 -0
|
@@ -2,90 +2,246 @@ import { cva } from "class-variance-authority";
|
|
|
2
2
|
|
|
3
3
|
export const buttonVariants = cva(
|
|
4
4
|
[
|
|
5
|
-
|
|
6
|
-
// "font-sans appearance-none select-none rounded-sm border font-medium tracking-[.02857em]",
|
|
7
|
-
// "aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-disabled:cursor-not-allowed",
|
|
8
|
-
"gap-2 font-bold text-white hover:bg-opacity-90 active:scale-[98%]",
|
|
5
|
+
"gap-2 font-bold inline-flex items-center outline-none transition ease-in-out duration-45",
|
|
9
6
|
],
|
|
10
7
|
{
|
|
11
8
|
variants: {
|
|
12
9
|
color: {
|
|
13
|
-
primary:
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
"
|
|
10
|
+
primary: [
|
|
11
|
+
"bg-button-primary-solid-default border-button-primary-solid-default text-button-primary-solid-default fill-button-primary-solid-default",
|
|
12
|
+
"hover:bg-button-primary-solid-hover hover:border-button-primary-solid-hover hover:text-button-primary-solid-hover hover:fill-button-primary-solid-hover",
|
|
13
|
+
"active:bg-button-primary-solid-active active:border-button-primary-solid-active active:text-button-primary-solid-active active:fill-button-primary-solid-active",
|
|
14
|
+
"data-[loading=true]:bg-button-primary-solid-active data-[loading=true]:border-button-primary-solid-active data-[loading=true]:text-button-primary-solid-active data-[loading=true]:fill-button-primary-solid-active",
|
|
15
|
+
"disabled:bg-button-primary-solid-disabled disabled:border-button-primary-solid-disabled disabled:text-button-primary-solid-disabled disabled:fill-button-primary-solid-disabled",
|
|
16
|
+
],
|
|
17
|
+
secondary: [
|
|
18
|
+
"bg-button-secondary-solid-default border-button-secondary-solid-default text-button-secondary-solid-default fill-button-secondary-solid-default",
|
|
19
|
+
"hover:bg-button-secondary-solid-hover hover:border-button-secondary-solid-hover hover:text-button-secondary-solid-hover hover:fill-button-secondary-solid-hover",
|
|
20
|
+
"active:bg-button-secondary-solid-active active:border-button-secondary-solid-active active:text-button-secondary-solid-active active:fill-button-secondary-solid-active",
|
|
21
|
+
"data-[loading=true]:bg-button-secondary-solid-active data-[loading=true]:border-button-secondary-solid-active data-[loading=true]:text-button-secondary-solid-active data-[loading=true]:fill-button-secondary-solid-active",
|
|
22
|
+
"disabled:bg-button-secondary-solid-disabled disabled:border-button-secondary-solid-disabled disabled:text-button-secondary-solid-disabled disabled:fill-button-secondary-solid-disabled",
|
|
23
|
+
],
|
|
24
|
+
tertiary: [
|
|
25
|
+
"bg-button-tertiary-solid-default border-button-tertiary-solid-default text-button-tertiary-solid-default fill-button-tertiary-solid-default",
|
|
26
|
+
"hover:bg-button-tertiary-solid-hover hover:border-button-tertiary-solid-hover hover:text-button-tertiary-solid-hover hover:fill-button-tertiary-solid-hover",
|
|
27
|
+
"active:bg-button-tertiary-solid-active active:border-button-tertiary-solid-active active:text-button-tertiary-solid-active active:fill-button-tertiary-solid-active",
|
|
28
|
+
"data-[loading=true]:bg-button-tertiary-solid-active data-[loading=true]:border-button-tertiary-solid-active data-[loading=true]:text-button-tertiary-solid-active data-[loading=true]:fill-button-tertiary-solid-active",
|
|
29
|
+
"disabled:bg-button-tertiary-solid-disabled disabled:border-button-tertiary-solid-disabled disabled:text-button-tertiary-solid-disabled disabled:fill-button-tertiary-solid-disabled",
|
|
30
|
+
],
|
|
31
|
+
success: [
|
|
32
|
+
"bg-button-success-solid-default border-button-success-solid-default text-button-success-solid-default fill-button-success-solid-default",
|
|
33
|
+
"hover:bg-button-success-solid-hover hover:border-button-success-solid-hover hover:text-button-success-solid-hover hover:fill-button-success-solid-hover",
|
|
34
|
+
"active:bg-button-success-solid-active active:border-button-success-solid-active active:text-button-success-solid-active active:fill-button-success-solid-active",
|
|
35
|
+
"data-[loading=true]:bg-button-success-solid-active data-[loading=true]:border-button-success-solid-active data-[loading=true]:text-button-success-solid-active data-[loading=true]:fill-button-success-solid-active",
|
|
36
|
+
"disabled:bg-button-success-solid-disabled disabled:border-button-success-solid-disabled disabled:text-button-success-solid-disabled disabled:fill-button-success-solid-disabled",
|
|
37
|
+
],
|
|
38
|
+
info: [
|
|
39
|
+
"bg-button-info-solid-default border-button-info-solid-default text-button-info-solid-default fill-button-info-solid-default",
|
|
40
|
+
"hover:bg-button-info-solid-hover hover:border-button-info-solid-hover hover:text-button-info-solid-hover hover:fill-button-info-solid-hover",
|
|
41
|
+
"active:bg-button-info-solid-active active:border-button-info-solid-active active:text-button-info-solid-active active:fill-button-info-solid-active",
|
|
42
|
+
"data-[loading=true]:bg-button-info-solid-active data-[loading=true]:border-button-info-solid-active data-[loading=true]:text-button-info-solid-active data-[loading=true]:fill-button-info-solid-active",
|
|
43
|
+
"disabled:bg-button-info-solid-disabled disabled:border-button-info-solid-disabled disabled:text-button-info-solid-disabled disabled:fill-button-info-solid-disabled",
|
|
44
|
+
],
|
|
45
|
+
warning: [
|
|
46
|
+
"bg-button-warning-solid-default border-button-warning-solid-default text-button-warning-solid-default fill-button-warning-solid-default",
|
|
47
|
+
"hover:bg-button-warning-solid-hover hover:border-button-warning-solid-hover hover:text-button-warning-solid-hover hover:fill-button-warning-solid-hover",
|
|
48
|
+
"active:bg-button-warning-solid-active active:border-button-warning-solid-active active:text-button-warning-solid-active active:fill-button-warning-solid-active",
|
|
49
|
+
"data-[loading=true]:bg-button-warning-solid-active data-[loading=true]:border-button-warning-solid-active data-[loading=true]:text-button-warning-solid-active data-[loading=true]:fill-button-warning-solid-active",
|
|
50
|
+
"disabled:bg-button-warning-solid-disabled disabled:border-button-warning-solid-disabled disabled:text-button-warning-solid-disabled disabled:fill-button-warning-solid-disabled",
|
|
51
|
+
],
|
|
52
|
+
error: [
|
|
53
|
+
"bg-button-error-solid-default border-button-error-solid-default text-button-error-solid-default fill-button-error-solid-default",
|
|
54
|
+
"hover:bg-button-error-solid-hover hover:border-button-error-solid-hover hover:text-button-error-solid-hover hover:fill-button-error-solid-hover",
|
|
55
|
+
"active:bg-button-error-solid-active active:border-button-error-solid-active active:text-button-error-solid-active active:fill-button-error-solid-active",
|
|
56
|
+
"data-[loading=true]:bg-button-error-solid-active data-[loading=true]:border-button-error-solid-active data-[loading=true]:text-button-error-solid-active data-[loading=true]:fill-button-error-solid-active",
|
|
57
|
+
"disabled:bg-button-error-solid-disabled disabled:border-button-error-solid-disabled disabled:text-button-error-solid-disabled disabled:fill-button-error-solid-disabled",
|
|
58
|
+
],
|
|
24
59
|
},
|
|
25
60
|
size: {
|
|
26
|
-
sm: "px-
|
|
27
|
-
md: "px-
|
|
28
|
-
lg: "px-
|
|
61
|
+
sm: "px-md py-1 [&_svg]:size-[18px] typography-buttonMS rounded-sm gap-1",
|
|
62
|
+
md: "px-lg py-2 [&_svg]:size-5 typography-buttonL rounded-md",
|
|
63
|
+
lg: "px-xl py-4 [&_svg]:size-6 typography-buttonL rounded-md",
|
|
29
64
|
},
|
|
30
65
|
variant: {
|
|
31
66
|
solid: "border",
|
|
32
|
-
outline: "border bg-transparent
|
|
33
|
-
flat: "bg-transparent
|
|
34
|
-
link: "bg-transparent underline underline-offset-4
|
|
67
|
+
outline: "border bg-transparent",
|
|
68
|
+
flat: "bg-transparent",
|
|
69
|
+
link: "bg-transparent underline underline-offset-4",
|
|
35
70
|
},
|
|
36
71
|
disabled: {
|
|
37
|
-
true: "pointer-events-none border-transparent bg-
|
|
72
|
+
true: "pointer-events-none border-transparent bg-disable-solid text-disable-outline fill-disable-outline",
|
|
38
73
|
},
|
|
39
74
|
fullwidth: {
|
|
40
75
|
true: "w-full",
|
|
41
76
|
},
|
|
77
|
+
icon: {
|
|
78
|
+
sm: "h-4 w-4",
|
|
79
|
+
md: "h-5 w-5",
|
|
80
|
+
lg: "h-6 w-6",
|
|
81
|
+
},
|
|
42
82
|
},
|
|
43
83
|
compoundVariants: [
|
|
44
84
|
{
|
|
45
|
-
variant:
|
|
46
|
-
|
|
47
|
-
|
|
85
|
+
variant: "outline",
|
|
86
|
+
color: "primary",
|
|
87
|
+
className: [
|
|
88
|
+
"bg-button-primary-outline-default border-button-primary-outline-default text-button-primary-outline-default fill-button-primary-outline-default",
|
|
89
|
+
"hover:bg-button-primary-outline-hover hover:border-button-primary-outline-hover hover:text-button-primary-outline-hover hover:fill-button-primary-outline-hover",
|
|
90
|
+
"active:bg-button-primary-outline-active active:border-button-primary-outline-active active:text-button-primary-outline-active active:fill-button-primary-outline-active",
|
|
91
|
+
"data-[loading=true]:bg-button-primary-outline-active data-[loading=true]:border-button-primary-outline-active data-[loading=true]:text-button-primary-outline-active data-[loading=true]:fill-button-primary-outline-active",
|
|
92
|
+
"disabled:bg-button-primary-outline-disabled disabled:border-button-primary-outline-disabled disabled:text-button-primary-outline-disabled disabled:fill-button-primary-outline-disabled",
|
|
93
|
+
],
|
|
48
94
|
},
|
|
49
95
|
{
|
|
50
|
-
variant: "
|
|
96
|
+
variant: ["flat", "link"],
|
|
51
97
|
color: "primary",
|
|
52
|
-
|
|
98
|
+
className: [
|
|
99
|
+
"bg-button-primary-flat-default border-button-primary-flat-default text-button-primary-flat-default fill-button-primary-flat-default",
|
|
100
|
+
"hover:bg-button-primary-flat-hover hover:border-button-primary-flat-hover hover:text-button-primary-flat-hover hover:fill-button-primary-flat-hover",
|
|
101
|
+
"active:bg-button-primary-flat-active active:border-button-primary-flat-active active:text-button-primary-flat-active active:fill-button-primary-flat-active",
|
|
102
|
+
"data-[loading=true]:bg-button-primary-flat-active data-[loading=true]:border-button-primary-flat-active data-[loading=true]:text-button-primary-flat-active data-[loading=true]:fill-button-primary-flat-active",
|
|
103
|
+
"disabled:bg-button-primary-flat-disabled disabled:border-button-primary-flat-disabled disabled:text-button-primary-flat-disabled disabled:fill-button-primary-flat-disabled",
|
|
104
|
+
],
|
|
53
105
|
},
|
|
54
106
|
{
|
|
55
|
-
variant: "
|
|
107
|
+
variant: "outline",
|
|
108
|
+
color: "secondary",
|
|
109
|
+
className: [
|
|
110
|
+
"bg-button-secondary-outline-default border-button-secondary-outline-default text-button-secondary-outline-default fill-button-secondary-outline-default",
|
|
111
|
+
"hover:bg-button-secondary-outline-hover hover:border-button-secondary-outline-hover hover:text-button-secondary-outline-hover hover:fill-button-secondary-outline-hover",
|
|
112
|
+
"active:bg-button-secondary-outline-active active:border-button-secondary-outline-active active:text-button-secondary-outline-active active:fill-button-secondary-outline-active",
|
|
113
|
+
"data-[loading=true]:bg-button-secondary-outline-active data-[loading=true]:border-button-secondary-outline-active data-[loading=true]:text-button-secondary-outline-active data-[loading=true]:fill-button-secondary-outline-active",
|
|
114
|
+
"disabled:bg-button-secondary-outline-disabled disabled:border-button-secondary-outline-disabled disabled:text-button-secondary-outline-disabled disabled:fill-button-secondary-outline-disabled",
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
variant: ["flat", "link"],
|
|
56
119
|
color: "secondary",
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
120
|
+
className: [
|
|
121
|
+
"bg-button-secondary-flat-default border-button-secondary-flat-default text-button-secondary-flat-default fill-button-secondary-flat-default",
|
|
122
|
+
"hover:bg-button-secondary-flat-hover hover:border-button-secondary-flat-hover hover:text-button-secondary-flat-hover hover:fill-button-secondary-flat-hover",
|
|
123
|
+
"active:bg-button-secondary-flat-active active:border-button-secondary-flat-active active:text-button-secondary-flat-active active:fill-button-secondary-flat-active",
|
|
124
|
+
"data-[loading=true]:bg-button-secondary-flat-active data-[loading=true]:border-button-secondary-flat-active data-[loading=true]:text-button-secondary-flat-active data-[loading=true]:fill-button-secondary-flat-active",
|
|
125
|
+
"disabled:bg-button-secondary-flat-disabled disabled:border-button-secondary-flat-disabled disabled:text-button-secondary-flat-disabled disabled:fill-button-secondary-flat-disabled",
|
|
126
|
+
],
|
|
127
|
+
},
|
|
65
128
|
{
|
|
66
|
-
variant: "
|
|
129
|
+
variant: "outline",
|
|
67
130
|
color: "tertiary",
|
|
68
|
-
|
|
131
|
+
className: [
|
|
132
|
+
"bg-button-tertiary-outline-default border-button-tertiary-outline-default text-button-tertiary-outline-default fill-button-tertiary-outline-default",
|
|
133
|
+
"hover:bg-button-tertiary-outline-hover hover:border-button-tertiary-outline-hover hover:text-button-tertiary-outline-hover hover:fill-button-tertiary-outline-hover",
|
|
134
|
+
"active:bg-button-tertiary-outline-active active:border-button-tertiary-outline-active active:text-button-tertiary-outline-active active:fill-button-tertiary-outline-active",
|
|
135
|
+
"data-[loading=true]:bg-button-tertiary-outline-active data-[loading=true]:border-button-tertiary-outline-active data-[loading=true]:text-button-tertiary-outline-active data-[loading=true]:fill-button-tertiary-outline-active",
|
|
136
|
+
"disabled:bg-button-tertiary-outline-disabled disabled:border-button-tertiary-outline-disabled disabled:text-button-tertiary-outline-disabled disabled:fill-button-tertiary-outline-disabled",
|
|
137
|
+
],
|
|
69
138
|
},
|
|
70
139
|
{
|
|
71
|
-
variant: "
|
|
72
|
-
color: "
|
|
73
|
-
|
|
140
|
+
variant: ["flat", "link"],
|
|
141
|
+
color: "tertiary",
|
|
142
|
+
className: [
|
|
143
|
+
"bg-button-tertiary-flat-default border-button-tertiary-flat-default text-button-tertiary-flat-default fill-button-tertiary-flat-default",
|
|
144
|
+
"hover:bg-button-tertiary-flat-hover hover:border-button-tertiary-flat-hover hover:text-button-tertiary-flat-hover hover:fill-button-tertiary-flat-hover",
|
|
145
|
+
"active:bg-button-tertiary-flat-active active:border-button-tertiary-flat-active active:text-button-tertiary-flat-active active:fill-button-tertiary-flat-active",
|
|
146
|
+
"data-[loading=true]:bg-button-tertiary-flat-active data-[loading=true]:border-button-tertiary-flat-active data-[loading=true]:text-button-tertiary-flat-active data-[loading=true]:fill-button-tertiary-flat-active",
|
|
147
|
+
"disabled:bg-button-tertiary-flat-disabled disabled:border-button-tertiary-flat-disabled disabled:text-button-tertiary-flat-disabled disabled:fill-button-tertiary-flat-disabled",
|
|
148
|
+
],
|
|
74
149
|
},
|
|
75
150
|
{
|
|
76
|
-
variant: "
|
|
151
|
+
variant: "outline",
|
|
77
152
|
color: "info",
|
|
78
|
-
|
|
153
|
+
className: [
|
|
154
|
+
"bg-button-info-outline-default border-button-info-outline-default text-button-info-outline-default fill-button-info-outline-default",
|
|
155
|
+
"hover:bg-button-info-outline-hover hover:border-button-info-outline-hover hover:text-button-info-outline-hover hover:fill-button-info-outline-hover",
|
|
156
|
+
"active:bg-button-info-outline-active active:border-button-info-outline-active active:text-button-info-outline-active active:fill-button-info-outline-active",
|
|
157
|
+
"data-[loading=true]:bg-button-info-outline-active data-[loading=true]:border-button-info-outline-active data-[loading=true]:text-button-info-outline-active data-[loading=true]:fill-button-info-outline-active",
|
|
158
|
+
"disabled:bg-button-info-outline-disabled disabled:border-button-info-outline-disabled disabled:text-button-info-outline-disabled disabled:fill-button-info-outline-disabled",
|
|
159
|
+
],
|
|
79
160
|
},
|
|
80
161
|
{
|
|
81
|
-
variant: "
|
|
162
|
+
variant: ["flat", "link"],
|
|
163
|
+
color: "info",
|
|
164
|
+
className: [
|
|
165
|
+
"bg-button-info-flat-default border-button-info-flat-default text-button-info-flat-default fill-button-info-flat-default",
|
|
166
|
+
"hover:bg-button-info-flat-hover hover:border-button-info-flat-hover hover:text-button-info-flat-hover hover:fill-button-info-flat-hover",
|
|
167
|
+
"active:bg-button-info-flat-active active:border-button-info-flat-active active:text-button-info-flat-active active:fill-button-info-flat-active",
|
|
168
|
+
"data-[loading=true]:bg-button-info-flat-active data-[loading=true]:border-button-info-flat-active data-[loading=true]:text-button-info-flat-active data-[loading=true]:fill-button-info-flat-active",
|
|
169
|
+
"disabled:bg-button-info-flat-disabled disabled:border-button-info-flat-disabled disabled:text-button-info-flat-disabled disabled:fill-button-info-flat-disabled",
|
|
170
|
+
],
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
variant: "outline",
|
|
174
|
+
color: "success",
|
|
175
|
+
className: [
|
|
176
|
+
"bg-button-success-outline-default border-button-success-outline-default text-button-success-outline-default fill-button-success-outline-default",
|
|
177
|
+
"hover:bg-button-success-outline-hover hover:border-button-success-outline-hover hover:text-button-success-outline-hover hover:fill-button-success-outline-hover",
|
|
178
|
+
"active:bg-button-success-outline-active active:border-button-success-outline-active active:text-button-success-outline-active active:fill-button-success-outline-active",
|
|
179
|
+
"data-[loading=true]:bg-button-success-outline-active data-[loading=true]:border-button-success-outline-active data-[loading=true]:text-button-success-outline-active data-[loading=true]:fill-button-success-outline-active",
|
|
180
|
+
"disabled:bg-button-success-outline-disabled disabled:border-button-success-outline-disabled disabled:text-button-success-outline-disabled disabled:fill-button-success-outline-disabled",
|
|
181
|
+
],
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
variant: ["flat", "link"],
|
|
185
|
+
color: "success",
|
|
186
|
+
className: [
|
|
187
|
+
"bg-button-success-flat-default border-button-success-flat-default text-button-success-flat-default fill-button-success-flat-default",
|
|
188
|
+
"hover:bg-button-success-flat-hover hover:border-button-success-flat-hover hover:text-button-success-flat-hover hover:fill-button-success-flat-hover",
|
|
189
|
+
"active:bg-button-success-flat-active active:border-button-success-flat-active active:text-button-success-flat-active active:fill-button-success-flat-active",
|
|
190
|
+
"data-[loading=true]:bg-button-success-flat-active data-[loading=true]:border-button-success-flat-active data-[loading=true]:text-button-success-flat-active data-[loading=true]:fill-button-success-flat-active",
|
|
191
|
+
"disabled:bg-button-success-flat-disabled disabled:border-button-success-flat-disabled disabled:text-button-success-flat-disabled disabled:fill-button-success-flat-disabled",
|
|
192
|
+
],
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
variant: "outline",
|
|
82
196
|
color: "warning",
|
|
83
|
-
|
|
197
|
+
className: [
|
|
198
|
+
"bg-button-warning-outline-default border-button-warning-outline-default text-button-warning-outline-default fill-button-warning-outline-default",
|
|
199
|
+
"hover:bg-button-warning-outline-hover hover:border-button-warning-outline-hover hover:text-button-warning-outline-hover hover:fill-button-warning-outline-hover",
|
|
200
|
+
"active:bg-button-warning-outline-active active:border-button-warning-outline-active active:text-button-warning-outline-active active:fill-button-warning-outline-active",
|
|
201
|
+
"data-[loading=true]:bg-button-warning-outline-active data-[loading=true]:border-button-warning-outline-active data-[loading=true]:text-button-warning-outline-active data-[loading=true]:fill-button-warning-outline-active",
|
|
202
|
+
"disabled:bg-button-warning-outline-disabled disabled:border-button-warning-outline-disabled disabled:text-button-warning-outline-disabled disabled:fill-button-warning-outline-disabled",
|
|
203
|
+
],
|
|
84
204
|
},
|
|
85
205
|
{
|
|
86
|
-
variant: "
|
|
206
|
+
variant: ["flat", "link"],
|
|
207
|
+
color: "warning",
|
|
208
|
+
className: [
|
|
209
|
+
"bg-button-warning-flat-default border-button-warning-flat-default text-button-warning-flat-default fill-button-warning-flat-default",
|
|
210
|
+
"hover:bg-button-warning-flat-hover hover:border-button-warning-flat-hover hover:text-button-warning-flat-hover hover:fill-button-warning-flat-hover",
|
|
211
|
+
"active:bg-button-warning-flat-active active:border-button-warning-flat-active active:text-button-warning-flat-active active:fill-button-warning-flat-active",
|
|
212
|
+
"data-[loading=true]:bg-button-warning-flat-active data-[loading=true]:border-button-warning-flat-active data-[loading=true]:text-button-warning-flat-active data-[loading=true]:fill-button-warning-flat-active",
|
|
213
|
+
"disabled:bg-button-warning-flat-disabled disabled:border-button-warning-flat-disabled disabled:text-button-warning-flat-disabled disabled:fill-button-warning-flat-disabled",
|
|
214
|
+
],
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
variant: "outline",
|
|
218
|
+
color: "error",
|
|
219
|
+
className: [
|
|
220
|
+
"bg-button-error-outline-default border-button-error-outline-default text-button-error-outline-default fill-button-error-outline-default",
|
|
221
|
+
"hover:bg-button-error-outline-hover hover:border-button-error-outline-hover hover:text-button-error-outline-hover hover:fill-button-error-outline-hover",
|
|
222
|
+
"active:bg-button-error-outline-active active:border-button-error-outline-active active:text-button-error-outline-active active:fill-button-error-outline-active",
|
|
223
|
+
"data-[loading=true]:bg-button-error-outline-active data-[loading=true]:border-button-error-outline-active data-[loading=true]:text-button-error-outline-active data-[loading=true]:fill-button-error-outline-active",
|
|
224
|
+
"disabled:bg-button-error-outline-disabled disabled:border-button-error-outline-disabled disabled:text-button-error-outline-disabled disabled:fill-button-error-outline-disabled",
|
|
225
|
+
],
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
variant: ["flat", "link"],
|
|
87
229
|
color: "error",
|
|
88
|
-
|
|
230
|
+
className: [
|
|
231
|
+
"bg-button-error-flat-default border-button-error-flat-default text-button-error-flat-default fill-button-error-flat-default",
|
|
232
|
+
"hover:bg-button-error-flat-hover hover:border-button-error-flat-hover hover:text-button-error-flat-hover hover:fill-button-error-flat-hover",
|
|
233
|
+
"active:bg-button-error-flat-active active:border-button-error-flat-active active:text-button-error-flat-active active:fill-button-error-flat-active",
|
|
234
|
+
"data-[loading=true]:bg-button-error-flat-active data-[loading=true]:border-button-error-flat-active data-[loading=true]:text-button-error-flat-active data-[loading=true]:fill-button-error-flat-active",
|
|
235
|
+
"disabled:bg-button-error-flat-disabled disabled:border-button-error-flat-disabled disabled:text-button-error-flat-disabled disabled:fill-button-error-flat-disabled",
|
|
236
|
+
],
|
|
237
|
+
},
|
|
238
|
+
// --- Disabled --
|
|
239
|
+
{
|
|
240
|
+
variant: ["outline", "flat", "link"],
|
|
241
|
+
disabled: true,
|
|
242
|
+
className: [
|
|
243
|
+
"bg-transparent border-disabled-outline text-disable-outline fill-disable-outline",
|
|
244
|
+
],
|
|
89
245
|
},
|
|
90
246
|
],
|
|
91
247
|
defaultVariants: {
|
|
@@ -3,6 +3,8 @@ import { buttonVariants } from "./Button.styles";
|
|
|
3
3
|
import { cn } from "@/utils/cn";
|
|
4
4
|
import { title } from "process";
|
|
5
5
|
import { ref } from "yup";
|
|
6
|
+
import Loading from "../Loading/Loading";
|
|
7
|
+
import { EyeIcon } from "@heroicons/react/16/solid";
|
|
6
8
|
|
|
7
9
|
export type ButtonProps = {
|
|
8
10
|
title?: string;
|
|
@@ -50,6 +52,7 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
50
52
|
{...props}
|
|
51
53
|
ref={ref}
|
|
52
54
|
aria-disabled={isDisabled || undefined}
|
|
55
|
+
data-loading={isLoading || undefined}
|
|
53
56
|
tabIndex={isDisabled ? -1 : 0}
|
|
54
57
|
className={cn(
|
|
55
58
|
buttonVariants({ size, color, variant, disabled, fullwidth }),
|
|
@@ -59,6 +62,7 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
59
62
|
>
|
|
60
63
|
{
|
|
61
64
|
<>
|
|
65
|
+
{isLoading && <Loading />}
|
|
62
66
|
{startIcon}
|
|
63
67
|
{children || title}
|
|
64
68
|
{endIcon}
|
|
@@ -27,6 +27,8 @@ type Story = StoryObj<typeof Button>;
|
|
|
27
27
|
export const Solid = {
|
|
28
28
|
args: {
|
|
29
29
|
title: "Button",
|
|
30
|
+
disabled: false,
|
|
31
|
+
isLoading: false,
|
|
30
32
|
},
|
|
31
33
|
render: (args) => {
|
|
32
34
|
const props: typeof args = {
|
|
@@ -34,7 +36,7 @@ export const Solid = {
|
|
|
34
36
|
className: "capitalize",
|
|
35
37
|
};
|
|
36
38
|
return (
|
|
37
|
-
<div className="flex gap-2">
|
|
39
|
+
<div className="flex items-start gap-2">
|
|
38
40
|
<Button color="primary" {...props} title="primary" />
|
|
39
41
|
<Button color="secondary" {...props} title="secondary" />
|
|
40
42
|
<Button color="tertiary" {...props} title="tertiary" />
|
|
@@ -51,6 +53,8 @@ export const Outline = {
|
|
|
51
53
|
args: {
|
|
52
54
|
title: "Button",
|
|
53
55
|
variant: "outline",
|
|
56
|
+
disabled: false,
|
|
57
|
+
isLoading: false,
|
|
54
58
|
},
|
|
55
59
|
render: (args) => {
|
|
56
60
|
const props: typeof args = {
|
|
@@ -75,6 +79,8 @@ export const Flat = {
|
|
|
75
79
|
args: {
|
|
76
80
|
title: "Button",
|
|
77
81
|
variant: "flat",
|
|
82
|
+
disabled: false,
|
|
83
|
+
isLoading: false,
|
|
78
84
|
},
|
|
79
85
|
render: (args) => {
|
|
80
86
|
const props: typeof args = {
|
|
@@ -99,6 +105,8 @@ export const Link = {
|
|
|
99
105
|
args: {
|
|
100
106
|
title: "Button",
|
|
101
107
|
variant: "link",
|
|
108
|
+
disabled: false,
|
|
109
|
+
isLoading: false,
|
|
102
110
|
},
|
|
103
111
|
render: (args) => {
|
|
104
112
|
const props: typeof args = {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { DayPicker, getDefaultClassNames } from "react-day-picker";
|
|
5
5
|
|
|
6
|
-
import "react-day-picker/dist/style.css";
|
|
6
|
+
// import "react-day-picker/dist/style.css";
|
|
7
7
|
import { cn } from "@/utils/cn";
|
|
8
8
|
|
|
9
9
|
export type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
|
@@ -22,7 +22,7 @@ function Calendar({
|
|
|
22
22
|
captionLayout="dropdown-years"
|
|
23
23
|
{...props}
|
|
24
24
|
className={cn(
|
|
25
|
-
"bg-
|
|
25
|
+
"bg-surface text-surface-foreground border-surface",
|
|
26
26
|
className
|
|
27
27
|
)}
|
|
28
28
|
classNames={{
|
|
@@ -30,17 +30,59 @@ function Calendar({
|
|
|
30
30
|
day_button: cn(defaultClassNames.day_button, "size-9 "),
|
|
31
31
|
day: "typography-subtitile1 ",
|
|
32
32
|
today:
|
|
33
|
-
"text-bold rounded-full [&_button]:!border-primary [&_button]:!border [&_button]:!border-solid",
|
|
34
|
-
selected: "bg-primary text-primary-foreground rounded-full ",
|
|
33
|
+
"text-bold text-surface-foreground [&_button]:rounded-full [&_button]:!border-primary [&_button]:!border [&_button]:!border-solid",
|
|
34
|
+
selected: "bg-primary !text-primary-foreground rounded-full ",
|
|
35
35
|
weekdays: "text-gray-400",
|
|
36
36
|
month_caption: cn(defaultClassNames.month_caption, "h-[54px]"),
|
|
37
37
|
outside: "text-gray-400",
|
|
38
|
-
nav: cn(defaultClassNames.nav, "gap-6"),
|
|
38
|
+
nav: cn(defaultClassNames.nav, "gap-6 absolute flex right-0"),
|
|
39
39
|
chevron: "fill-primary",
|
|
40
|
-
root: cn(defaultClassNames.root, "px-6 py-4
|
|
41
|
-
caption_label: cn(
|
|
40
|
+
root: cn(defaultClassNames.root, "px-6 py-4"),
|
|
41
|
+
caption_label: cn(
|
|
42
|
+
defaultClassNames.caption_label,
|
|
43
|
+
"gap-2 flex items-center"
|
|
44
|
+
),
|
|
45
|
+
months: "flex flex-col relative",
|
|
42
46
|
...classNames,
|
|
43
47
|
}}
|
|
48
|
+
styles={{
|
|
49
|
+
caption_label: {
|
|
50
|
+
zIndex: 1,
|
|
51
|
+
position: "relative",
|
|
52
|
+
display: "inline-flex",
|
|
53
|
+
alignItems: "center",
|
|
54
|
+
whiteSpace: "nowrap",
|
|
55
|
+
border: 0,
|
|
56
|
+
},
|
|
57
|
+
dropdown: {
|
|
58
|
+
zIndex: 2,
|
|
59
|
+
opacity: 0,
|
|
60
|
+
WebkitAppearance: "none",
|
|
61
|
+
MozAppearance: "none",
|
|
62
|
+
appearance: "none",
|
|
63
|
+
position: "absolute",
|
|
64
|
+
insetBlockStart: 0,
|
|
65
|
+
insetBlockEnd: 0,
|
|
66
|
+
insetInlineStart: 0,
|
|
67
|
+
width: "100%",
|
|
68
|
+
margin: 0,
|
|
69
|
+
padding: 0,
|
|
70
|
+
cursor: "inherit",
|
|
71
|
+
border: "none",
|
|
72
|
+
lineHeight: "inherit",
|
|
73
|
+
},
|
|
74
|
+
dropdowns: {
|
|
75
|
+
position: "relative",
|
|
76
|
+
display: "inline-flex",
|
|
77
|
+
alignItems: "center",
|
|
78
|
+
gap: 4,
|
|
79
|
+
},
|
|
80
|
+
dropdown_root: {
|
|
81
|
+
position: "relative",
|
|
82
|
+
display: "inline-flex",
|
|
83
|
+
alignItems: "center",
|
|
84
|
+
},
|
|
85
|
+
}}
|
|
44
86
|
/>
|
|
45
87
|
);
|
|
46
88
|
}
|
|
@@ -14,7 +14,7 @@ const Checkbox = React.forwardRef<
|
|
|
14
14
|
<CheckboxPrimitive.Root
|
|
15
15
|
ref={ref}
|
|
16
16
|
className={cn(
|
|
17
|
-
"peer h-4 w-4 shrink-0 rounded-sm border border-primary-30 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:border-
|
|
17
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-primary-30 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:border-state-disable-solid",
|
|
18
18
|
{
|
|
19
19
|
"data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground":
|
|
20
20
|
!props.disabled,
|
|
@@ -2,7 +2,7 @@ import { cva } from "class-variance-authority";
|
|
|
2
2
|
|
|
3
3
|
export const collapseButtonVariants = cva(
|
|
4
4
|
[
|
|
5
|
-
"flex flex-1 bg-
|
|
5
|
+
"flex flex-1 bg-secondary-default hover:bg-secondary-hover text-secondary-foreground",
|
|
6
6
|
"focus:outline-none focus-visible:ring focus-visible:ring-gray-500 focus-visible:ring-opacity-75",
|
|
7
7
|
],
|
|
8
8
|
{
|
|
@@ -41,7 +41,10 @@ export const collapseIconVariants = cva(
|
|
|
41
41
|
);
|
|
42
42
|
|
|
43
43
|
export const collapsePanelVariants = cva(
|
|
44
|
-
[
|
|
44
|
+
[
|
|
45
|
+
"flex flex-1 border-t border-t-secondary",
|
|
46
|
+
"transition ease-in-out delay-150 duration-300",
|
|
47
|
+
],
|
|
45
48
|
{
|
|
46
49
|
variants: {
|
|
47
50
|
size: {
|
|
@@ -58,5 +61,5 @@ export const collapsePanelVariants = cva(
|
|
|
58
61
|
);
|
|
59
62
|
|
|
60
63
|
export const collapseContainerVariants = cva([
|
|
61
|
-
"flex flex-col border rounded overflow-hidden",
|
|
64
|
+
"flex flex-col border border-secondary rounded overflow-hidden",
|
|
62
65
|
]);
|
|
@@ -6,7 +6,7 @@ import { CalendarIcon } from "@heroicons/react/16/solid";
|
|
|
6
6
|
import { Calendar } from "../Calendar";
|
|
7
7
|
import { Popover, PopoverContent, PopoverTrigger } from "../Popover/Popover";
|
|
8
8
|
import { Modifiers } from "react-day-picker";
|
|
9
|
-
import { TextInput } from "../TextInput/TextInput";
|
|
9
|
+
import { InputProps, TextInput } from "../TextInput/TextInput";
|
|
10
10
|
import { format } from "date-fns/format";
|
|
11
11
|
|
|
12
12
|
type DatePickerProps = {
|
|
@@ -17,9 +17,14 @@ type DatePickerProps = {
|
|
|
17
17
|
modifiers: Modifiers,
|
|
18
18
|
e: React.MouseEvent | React.KeyboardEvent
|
|
19
19
|
) => void | undefined;
|
|
20
|
+
textInputProps?: Partial<InputProps>;
|
|
20
21
|
};
|
|
21
22
|
|
|
22
|
-
const DatePicker: FC<DatePickerProps> = ({
|
|
23
|
+
const DatePicker: FC<DatePickerProps> = ({
|
|
24
|
+
date,
|
|
25
|
+
onSelect,
|
|
26
|
+
textInputProps,
|
|
27
|
+
}) => {
|
|
23
28
|
const [isOpen, setIsOpen] = useState(false);
|
|
24
29
|
|
|
25
30
|
return (
|
|
@@ -36,6 +41,7 @@ const DatePicker: FC<DatePickerProps> = ({ date, onSelect }) => {
|
|
|
36
41
|
value={date ? format(date, "dd MMM yyyy") : isOpen ? " " : ""}
|
|
37
42
|
hasClearIcon={false}
|
|
38
43
|
endIcon={<CalendarIcon fill="inherit" />}
|
|
44
|
+
{...textInputProps}
|
|
39
45
|
/>
|
|
40
46
|
</div>
|
|
41
47
|
</PopoverTrigger>
|
|
@@ -21,7 +21,7 @@ const DialogOverlay = React.forwardRef<
|
|
|
21
21
|
<DialogPrimitive.Overlay
|
|
22
22
|
ref={ref}
|
|
23
23
|
className={cn(
|
|
24
|
-
"fixed inset-0 z-50 bg-popup-
|
|
24
|
+
"fixed inset-0 z-50 bg-base-popup-curtain data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
25
25
|
className
|
|
26
26
|
)}
|
|
27
27
|
{...props}
|
|
@@ -38,13 +38,13 @@ const DialogContent = React.forwardRef<
|
|
|
38
38
|
<DialogPrimitive.Content
|
|
39
39
|
ref={ref}
|
|
40
40
|
className={cn(
|
|
41
|
-
"fixed text-
|
|
41
|
+
"fixed text-base-popup-foreground left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-base-popup bg-base-popup p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-md",
|
|
42
42
|
className
|
|
43
43
|
)}
|
|
44
44
|
{...props}
|
|
45
45
|
>
|
|
46
46
|
{children}
|
|
47
|
-
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-
|
|
47
|
+
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-primary data-[state=open]:text-primary-foreground">
|
|
48
48
|
<XMarkIcon className="h-4 w-4" />
|
|
49
49
|
<span className="sr-only">Close</span>
|
|
50
50
|
</DialogPrimitive.Close>
|
|
@@ -73,7 +73,7 @@ const DialogFooter = ({
|
|
|
73
73
|
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
74
74
|
<div
|
|
75
75
|
className={cn(
|
|
76
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
76
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 ",
|
|
77
77
|
className
|
|
78
78
|
)}
|
|
79
79
|
{...props}
|
|
@@ -87,7 +87,7 @@ const DialogTitle = React.forwardRef<
|
|
|
87
87
|
>(({ className, ...props }, ref) => (
|
|
88
88
|
<DialogPrimitive.Title
|
|
89
89
|
ref={ref}
|
|
90
|
-
className={cn("typography-h5 tracking-tight", className)}
|
|
90
|
+
className={cn("typography-h5 tracking-tight ", className)}
|
|
91
91
|
{...props}
|
|
92
92
|
/>
|
|
93
93
|
));
|