@rovula/ui 0.0.18 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/dist/cjs/bundle.css +3234 -1133
  2. package/dist/cjs/bundle.js +3 -3
  3. package/dist/cjs/bundle.js.map +1 -1
  4. package/dist/cjs/types/components/ActionButton/ActionButton.stories.d.ts +4 -4
  5. package/dist/cjs/types/components/ActionButton/ActionButton.styles copy.d.ts +6 -0
  6. package/dist/cjs/types/components/Button/Button.styles copy.d.ts +7 -0
  7. package/dist/cjs/types/components/Button/Button.styles.d.ts +1 -0
  8. package/dist/cjs/types/components/Button/Buttons.stories.d.ts +12 -4
  9. package/dist/cjs/types/components/Calendar/Calendar.stories.d.ts +574 -122
  10. package/dist/cjs/types/components/Checkbox/Checkbox.stories.d.ts +6 -6
  11. package/dist/cjs/types/components/DatePicker/DatePicker.d.ts +5 -3
  12. package/dist/cjs/types/components/DatePicker/DatePicker.stories.d.ts +4 -2
  13. package/dist/cjs/types/components/Dropdown/Dropdown.stories.d.ts +8 -6
  14. package/dist/cjs/types/components/Input/Input.stories.d.ts +12 -12
  15. package/dist/cjs/types/components/Label/Label.stories.d.ts +6 -6
  16. package/dist/cjs/types/components/Loading/Loading.d.ts +14 -0
  17. package/dist/cjs/types/components/Loading/Loading.stories.d.ts +35 -0
  18. package/dist/cjs/types/components/ProgressBar/ProgressBar.d.ts +13 -0
  19. package/dist/cjs/types/components/ProgressBar/ProgressBar.stories.d.ts +37 -0
  20. package/dist/cjs/types/components/RadioGroup/RadioGroup.stories.d.ts +5 -5
  21. package/dist/cjs/types/components/Search/Search.d.ts +22 -1
  22. package/dist/cjs/types/components/Search/Search.stories.d.ts +338 -7
  23. package/dist/cjs/types/components/Table/Table.stories.d.ts +4 -4
  24. package/dist/cjs/types/components/Text/Text.d.ts +1 -1
  25. package/dist/cjs/types/components/Text/Text.stories.d.ts +1 -1
  26. package/dist/cjs/types/components/TextInput/TextInput.d.ts +4 -0
  27. package/dist/cjs/types/components/TextInput/TextInput.stories.d.ts +11 -6
  28. package/dist/cjs/types/components/TextInput/TextInput.styles.d.ts +8 -0
  29. package/dist/cjs/types/index.d.ts +3 -0
  30. package/dist/cjs/types/stories/ColorGroupPreview.d.ts +1 -0
  31. package/dist/cjs/types/stories/ColorPreview.d.ts +5 -0
  32. package/dist/components/ActionButton/ActionButton.js +1 -1
  33. package/dist/components/ActionButton/ActionButton.stories.js +1 -1
  34. package/dist/components/ActionButton/ActionButton.styles copy.js +90 -0
  35. package/dist/components/ActionButton/ActionButton.styles.js +54 -15
  36. package/dist/components/AlertDialog/AlertDialog.js +2 -2
  37. package/dist/components/Avatar/Avatar.styles.js +1 -1
  38. package/dist/components/Button/Button.js +3 -2
  39. package/dist/components/Button/Button.styles copy.js +210 -0
  40. package/dist/components/Button/Button.styles.js +203 -43
  41. package/dist/components/Button/Buttons.stories.js +9 -1
  42. package/dist/components/Calendar/Calendar.js +39 -11
  43. package/dist/components/Calendar/Calendar.stories.js +4 -2
  44. package/dist/components/Checkbox/Checkbox.js +1 -1
  45. package/dist/components/Collapsible/Collapsible.styles.js +6 -3
  46. package/dist/components/DatePicker/DatePicker.js +14 -4
  47. package/dist/components/Dialog/Dialog.js +4 -4
  48. package/dist/components/Dropdown/Dropdown.js +9 -7
  49. package/dist/components/Dropdown/Dropdown.styles.js +1 -1
  50. package/dist/components/Input/Input.js +8 -1
  51. package/dist/components/Input/Input.stories.js +3 -2
  52. package/dist/components/Input/Input.styles.js +13 -5
  53. package/dist/components/Loading/Loading.js +23 -0
  54. package/dist/components/Loading/Loading.stories.js +37 -0
  55. package/dist/components/Popover/Popover.js +1 -1
  56. package/dist/components/ProgressBar/ProgressBar.js +22 -0
  57. package/dist/components/ProgressBar/ProgressBar.stories.js +52 -0
  58. package/dist/components/RadioGroup/RadioGroup.js +2 -2
  59. package/dist/components/Search/Search.js +6 -7
  60. package/dist/components/Search/Search.stories.js +8 -5
  61. package/dist/components/Text/Text.js +17 -2
  62. package/dist/components/Text/Text.stories.js +5 -1
  63. package/dist/components/TextInput/TextInput.js +14 -5
  64. package/dist/components/TextInput/TextInput.stories.js +3 -2
  65. package/dist/components/TextInput/TextInput.styles.js +120 -18
  66. package/dist/esm/bundle.css +3234 -1133
  67. package/dist/esm/bundle.js +3 -3
  68. package/dist/esm/bundle.js.map +1 -1
  69. package/dist/esm/types/components/ActionButton/ActionButton.stories.d.ts +4 -4
  70. package/dist/esm/types/components/ActionButton/ActionButton.styles copy.d.ts +6 -0
  71. package/dist/esm/types/components/Button/Button.styles copy.d.ts +7 -0
  72. package/dist/esm/types/components/Button/Button.styles.d.ts +1 -0
  73. package/dist/esm/types/components/Button/Buttons.stories.d.ts +12 -4
  74. package/dist/esm/types/components/Calendar/Calendar.stories.d.ts +574 -122
  75. package/dist/esm/types/components/Checkbox/Checkbox.stories.d.ts +6 -6
  76. package/dist/esm/types/components/DatePicker/DatePicker.d.ts +5 -3
  77. package/dist/esm/types/components/DatePicker/DatePicker.stories.d.ts +4 -2
  78. package/dist/esm/types/components/Dropdown/Dropdown.stories.d.ts +8 -6
  79. package/dist/esm/types/components/Input/Input.stories.d.ts +12 -12
  80. package/dist/esm/types/components/Label/Label.stories.d.ts +6 -6
  81. package/dist/esm/types/components/Loading/Loading.d.ts +14 -0
  82. package/dist/esm/types/components/Loading/Loading.stories.d.ts +35 -0
  83. package/dist/esm/types/components/ProgressBar/ProgressBar.d.ts +13 -0
  84. package/dist/esm/types/components/ProgressBar/ProgressBar.stories.d.ts +37 -0
  85. package/dist/esm/types/components/RadioGroup/RadioGroup.stories.d.ts +5 -5
  86. package/dist/esm/types/components/Search/Search.d.ts +22 -1
  87. package/dist/esm/types/components/Search/Search.stories.d.ts +338 -7
  88. package/dist/esm/types/components/Table/Table.stories.d.ts +4 -4
  89. package/dist/esm/types/components/Text/Text.d.ts +1 -1
  90. package/dist/esm/types/components/Text/Text.stories.d.ts +1 -1
  91. package/dist/esm/types/components/TextInput/TextInput.d.ts +4 -0
  92. package/dist/esm/types/components/TextInput/TextInput.stories.d.ts +11 -6
  93. package/dist/esm/types/components/TextInput/TextInput.styles.d.ts +8 -0
  94. package/dist/esm/types/index.d.ts +3 -0
  95. package/dist/esm/types/stories/ColorGroupPreview.d.ts +1 -0
  96. package/dist/esm/types/stories/ColorPreview.d.ts +5 -0
  97. package/dist/index.d.ts +55 -4
  98. package/dist/index.js +3 -0
  99. package/dist/src/theme/global.css +5315 -1209
  100. package/dist/stories/ColorGroupPreview.js +478 -0
  101. package/dist/stories/ColorPreview.js +8 -0
  102. package/dist/theme/global.css +7 -223
  103. package/dist/theme/main-preset.js +131 -67
  104. package/dist/theme/plugins/utilities/typography.js +12 -0
  105. package/dist/theme/presets/colors.js +113 -220
  106. package/dist/theme/theme.d.ts +69 -0
  107. package/dist/theme/themes/xspector/baseline.css +7 -0
  108. package/dist/theme/themes/xspector/color.css +67 -0
  109. package/dist/theme/themes/xspector/components/action-button.css +98 -0
  110. package/dist/theme/themes/xspector/components/loading.css +11 -0
  111. package/dist/theme/themes/xspector/palette.css +122 -0
  112. package/dist/theme/themes/xspector/state.css +89 -0
  113. package/dist/theme/themes/xspector/transparent.css +68 -0
  114. package/dist/theme/themes/xspector/typography.css +27 -0
  115. package/dist/theme/tokens/baseline.css +10 -0
  116. package/dist/theme/tokens/color.css +63 -0
  117. package/dist/theme/tokens/components/action-button.css +127 -0
  118. package/dist/theme/tokens/components/button.css +512 -0
  119. package/dist/theme/tokens/components/loading.css +11 -0
  120. package/dist/theme/tokens/components/navbar.css +8 -0
  121. package/dist/theme/tokens/components/progress-bar.css +8 -0
  122. package/dist/theme/tokens/palette.css +122 -0
  123. package/dist/theme/tokens/state.css +82 -0
  124. package/dist/theme/tokens/transparent.css +68 -0
  125. package/dist/theme/tokens/typography.css +178 -0
  126. package/dist/theme/tokens/variables.css +28 -0
  127. package/dist/theme/utils.js +98 -0
  128. package/package.json +2 -2
  129. package/src/_theme/global copy.css +761 -0
  130. package/src/_theme/global.css +39 -0
  131. package/src/_theme/main-preset.js +239 -0
  132. package/src/_theme/plugins/utilities/typography.js +81 -0
  133. package/src/_theme/presets/colors copy 2.js +319 -0
  134. package/src/_theme/presets/colors copy.js +229 -0
  135. package/src/_theme/presets/colors.js +94 -0
  136. package/src/_theme/theme.d.ts +69 -0
  137. package/src/_theme/variables/base/button.css +334 -0
  138. package/src/_theme/variables/base/components copy.css +19 -0
  139. package/src/_theme/variables/default/colors.css +292 -0
  140. package/src/_theme/variables/default/typography.css +178 -0
  141. package/src/_theme/variables/xspector/colors.css +468 -0
  142. package/src/_theme/variables/xspector/typography.css +178 -0
  143. package/src/components/ActionButton/ActionButton.stories.tsx +1 -1
  144. package/src/components/ActionButton/ActionButton.styles copy.ts +95 -0
  145. package/src/components/ActionButton/ActionButton.styles.ts +54 -19
  146. package/src/components/ActionButton/ActionButton.tsx +1 -1
  147. package/src/components/AlertDialog/AlertDialog.tsx +2 -2
  148. package/src/components/Avatar/Avatar.styles.ts +1 -1
  149. package/src/components/Button/Button.styles copy.ts +214 -0
  150. package/src/components/Button/Button.styles.ts +203 -47
  151. package/src/components/Button/Button.tsx +4 -0
  152. package/src/components/Button/Buttons.stories.tsx +9 -1
  153. package/src/components/Calendar/Calendar.stories.tsx +4 -0
  154. package/src/components/Calendar/Calendar.tsx +63 -38
  155. package/src/components/Checkbox/Checkbox.tsx +1 -1
  156. package/src/components/Collapsible/Collapsible.styles.ts +6 -3
  157. package/src/components/DatePicker/DatePicker.tsx +15 -9
  158. package/src/components/Dialog/Dialog.tsx +5 -5
  159. package/src/components/Dropdown/Dropdown.styles.ts +1 -1
  160. package/src/components/Dropdown/Dropdown.tsx +14 -12
  161. package/src/components/Input/Input.stories.tsx +3 -2
  162. package/src/components/Input/Input.styles.tsx +13 -6
  163. package/src/components/Input/Input.tsx +8 -1
  164. package/src/components/Loading/Loading.stories.tsx +43 -0
  165. package/src/components/Loading/Loading.tsx +72 -0
  166. package/src/components/Popover/Popover.tsx +1 -1
  167. package/src/components/ProgressBar/ProgressBar.stories.tsx +78 -0
  168. package/src/components/ProgressBar/ProgressBar.tsx +62 -0
  169. package/src/components/RadioGroup/RadioGroup.tsx +2 -2
  170. package/src/components/Search/Search.stories.tsx +13 -13
  171. package/src/components/Search/Search.tsx +14 -19
  172. package/src/components/Text/Text.stories.tsx +6 -4
  173. package/src/components/Text/Text.tsx +27 -3
  174. package/src/components/TextInput/TextInput.stories.tsx +3 -2
  175. package/src/components/TextInput/TextInput.styles.ts +124 -19
  176. package/src/components/TextInput/TextInput.tsx +34 -4
  177. package/src/index.ts +3 -0
  178. package/src/stories/ColorGroupPreview.tsx +494 -0
  179. package/src/stories/ColorPreview.tsx +45 -0
  180. package/src/stories/Colors.mdx +14 -0
  181. package/src/stories/Typography.mdx +7 -151
  182. package/src/theme/global.css +7 -223
  183. package/src/theme/main-preset.js +131 -67
  184. package/src/theme/plugins/utilities/typography.js +12 -0
  185. package/src/theme/presets/colors.js +113 -220
  186. package/src/theme/theme.d.ts +69 -0
  187. package/src/theme/themes/xspector/baseline.css +7 -0
  188. package/src/theme/themes/xspector/color.css +67 -0
  189. package/src/theme/themes/xspector/components/action-button.css +98 -0
  190. package/src/theme/themes/xspector/components/loading.css +11 -0
  191. package/src/theme/themes/xspector/palette.css +122 -0
  192. package/src/theme/themes/xspector/state.css +89 -0
  193. package/src/theme/themes/xspector/transparent.css +68 -0
  194. package/src/theme/themes/xspector/typography.css +27 -0
  195. package/src/theme/tokens/baseline.css +10 -0
  196. package/src/theme/tokens/color.css +63 -0
  197. package/src/theme/tokens/components/action-button.css +127 -0
  198. package/src/theme/tokens/components/button.css +512 -0
  199. package/src/theme/tokens/components/loading.css +11 -0
  200. package/src/theme/tokens/components/navbar.css +8 -0
  201. package/src/theme/tokens/components/progress-bar.css +8 -0
  202. package/src/theme/tokens/palette.css +122 -0
  203. package/src/theme/tokens/state.css +82 -0
  204. package/src/theme/tokens/transparent.css +68 -0
  205. package/src/theme/tokens/typography.css +178 -0
  206. package/src/theme/tokens/variables.css +28 -0
  207. 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
- // "inline-flex items-center justify-center align-middle no-underline transition-colors ease-in-out duration-300",
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: "bg-primary border-primary text-primary hover:bg-primary-80",
14
- secondary:
15
- "border-secondary bg-secondary-100 text-secondary-foreground hover:bg-secondary-120",
16
- tertiary:
17
- "border-tertiary-120 bg-tertiary-120 text-tertiary-120 hover:bg-tertiary-100",
18
- success: "border-success bg-success text-success hover:bg-success-120",
19
- info: "border-info bg-info text-info hover:bg-info-100",
20
- warning:
21
- "border-warning bg-warning text-warning hover:bg-warning-100 hover:border-warning-100",
22
- error:
23
- "border-error bg-error text-error hover:bg-error-120 hover:border-error-120",
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-3 py-1 text-sm rounded-[--btn-rounded-sm]",
27
- md: "px-4 py-2 text-sm rounded-[--btn-rounded-md]",
28
- lg: "px-6 py-4 text-base rounded-[--btn-rounded-lg]",
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 hover:bg-opacity-20",
33
- flat: "bg-transparent hover:bg-opacity-20",
34
- link: "bg-transparent underline underline-offset-4 hover:bg-transparent hover:text-opacity-80",
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-secondary-110 text-secondary-130",
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: ["flat", "link"],
46
- disabled: true,
47
- class: "border-transparent bg-transparent",
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: "solid",
96
+ variant: ["flat", "link"],
51
97
  color: "primary",
52
- class: "text-primary-foreground",
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: "solid",
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
- class: "text-secondary-foreground",
58
- },
59
- // {
60
- // variant: "solid",
61
- // disabled: true,
62
- // color: "secondary",
63
- // class: "text-white",
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: "solid",
129
+ variant: "outline",
67
130
  color: "tertiary",
68
- class: "text-tertiary-foreground",
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: "solid",
72
- color: "success",
73
- class: "text-success-foreground",
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: "solid",
151
+ variant: "outline",
77
152
  color: "info",
78
- class: "text-info-foreground",
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: "solid",
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
- class: "text-warning-foreground",
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: "solid",
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
- class: "text-error-foreground",
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 = {
@@ -1,6 +1,8 @@
1
1
  import React from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
3
  import Calendar from "./Calendar";
4
+ import ThemeToggle from "../ThemeToggle";
5
+ import Button from "../Button/Button";
4
6
 
5
7
  // import { Popover, PopoverTrigger, PopoverContent } from "./Popover";
6
8
 
@@ -33,6 +35,8 @@ export const Default = {
33
35
 
34
36
  return (
35
37
  <div className="flex flex-row gap-4 w-full">
38
+ <ThemeToggle />
39
+ <Button>Text</Button>
36
40
  <Calendar
37
41
  mode="single"
38
42
  selected={date}
@@ -1,11 +1,10 @@
1
1
  "use client";
2
2
 
3
3
  import * as React from "react";
4
- import { ChevronLeftIcon, ChevronRightIcon } from "@heroicons/react/16/solid";
5
- import { DayPicker } from "react-day-picker";
4
+ import { DayPicker, getDefaultClassNames } from "react-day-picker";
6
5
 
6
+ // import "react-day-picker/dist/style.css";
7
7
  import { cn } from "@/utils/cn";
8
- import { buttonVariants } from "../Button/Button.styles";
9
8
 
10
9
  export type CalendarProps = React.ComponentProps<typeof DayPicker>;
11
10
 
@@ -15,49 +14,75 @@ function Calendar({
15
14
  showOutsideDays = true,
16
15
  ...props
17
16
  }: CalendarProps) {
17
+ const defaultClassNames = getDefaultClassNames();
18
+
18
19
  return (
19
20
  <DayPicker
20
21
  showOutsideDays={showOutsideDays}
21
- className={cn("p-3", className)}
22
+ captionLayout="dropdown-years"
23
+ {...props}
24
+ className={cn(
25
+ "bg-surface text-surface-foreground border-surface",
26
+ className
27
+ )}
22
28
  classNames={{
23
- months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
24
- month: "space-y-4",
25
- caption: "flex justify-center pt-1 relative items-center",
26
- caption_label: "text-sm font-medium",
27
- nav: "space-x-1 flex items-center",
28
- nav_button: cn(
29
- buttonVariants({ variant: "outline" }),
30
- "flex items-center justify-center size-7 bg-transparent p-0 opacity-50 hover:opacity-100"
29
+ ...defaultClassNames,
30
+ day_button: cn(defaultClassNames.day_button, "size-9 "),
31
+ day: "typography-subtitile1 ",
32
+ today:
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
+ weekdays: "text-gray-400",
36
+ month_caption: cn(defaultClassNames.month_caption, "h-[54px]"),
37
+ outside: "text-gray-400",
38
+ nav: cn(defaultClassNames.nav, "gap-6 absolute flex right-0"),
39
+ chevron: "fill-primary",
40
+ root: cn(defaultClassNames.root, "px-6 py-4"),
41
+ caption_label: cn(
42
+ defaultClassNames.caption_label,
43
+ "gap-2 flex items-center"
31
44
  ),
32
- nav_button_previous: "absolute left-1",
33
- nav_button_next: "absolute right-1",
34
- table: "w-full border-collapse space-y-1",
35
- head_row: "flex",
36
- head_cell:
37
- "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
38
- row: "flex w-full mt-2",
39
- cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
40
- day: cn(
41
- buttonVariants({ variant: "flat" }),
42
- "size-7 p-0 font-normal aria-selected:opacity-100"
43
- ),
44
- day_range_end: "day-range-end",
45
- day_selected:
46
- "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
47
- day_today: "bg-accent text-accent-foreground",
48
- day_outside:
49
- "day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
50
- day_disabled: "text-muted-foreground opacity-50",
51
- day_range_middle:
52
- "aria-selected:bg-accent aria-selected:text-accent-foreground",
53
- day_hidden: "invisible",
45
+ months: "flex flex-col relative",
54
46
  ...classNames,
55
47
  }}
56
- components={{
57
- IconLeft: ({ ...props }) => <ChevronLeftIcon className="h-4 w-4" />,
58
- IconRight: ({ ...props }) => <ChevronRightIcon className="h-4 w-4" />,
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
+ },
59
85
  }}
60
- {...props}
61
86
  />
62
87
  );
63
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-socondary-120 disabled:border-socondary-110",
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-gray-100 hover:bg-gray-200",
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
- ["flex flex-1 border-t", "transition ease-in-out delay-150 duration-300"],
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
  ]);
@@ -4,21 +4,27 @@ import React, { FC, useState } from "react";
4
4
  import { CalendarIcon } from "@heroicons/react/16/solid";
5
5
 
6
6
  import { Calendar } from "../Calendar";
7
- import Button from "../Button/Button";
8
- import { cn } from "@/utils/cn";
9
7
  import { Popover, PopoverContent, PopoverTrigger } from "../Popover/Popover";
10
- import { SelectSingleEventHandler } from "react-day-picker";
11
- import { TextInput } from "../TextInput/TextInput";
8
+ import { Modifiers } from "react-day-picker";
9
+ import { InputProps, TextInput } from "../TextInput/TextInput";
12
10
  import { format } from "date-fns/format";
13
11
 
14
12
  type DatePickerProps = {
15
13
  date: Date | undefined;
16
- onSelect: SelectSingleEventHandler;
14
+ onSelect: (
15
+ selected: Date | undefined,
16
+ triggerDate: Date,
17
+ modifiers: Modifiers,
18
+ e: React.MouseEvent | React.KeyboardEvent
19
+ ) => void | undefined;
20
+ textInputProps?: Partial<InputProps>;
17
21
  };
18
22
 
19
- CalendarIcon;
20
-
21
- const DatePicker: FC<DatePickerProps> = ({ date, onSelect }) => {
23
+ const DatePicker: FC<DatePickerProps> = ({
24
+ date,
25
+ onSelect,
26
+ textInputProps,
27
+ }) => {
22
28
  const [isOpen, setIsOpen] = useState(false);
23
29
 
24
30
  return (
@@ -35,6 +41,7 @@ const DatePicker: FC<DatePickerProps> = ({ date, onSelect }) => {
35
41
  value={date ? format(date, "dd MMM yyyy") : isOpen ? " " : ""}
36
42
  hasClearIcon={false}
37
43
  endIcon={<CalendarIcon fill="inherit" />}
44
+ {...textInputProps}
38
45
  />
39
46
  </div>
40
47
  </PopoverTrigger>
@@ -46,7 +53,6 @@ const DatePicker: FC<DatePickerProps> = ({ date, onSelect }) => {
46
53
  onSelect?.(...value);
47
54
  setIsOpen(false);
48
55
  }}
49
- initialFocus
50
56
  />
51
57
  </PopoverContent>
52
58
  </Popover>