@dashx/react 0.1.0 → 0.1.2

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 (242) hide show
  1. package/dist/cjs/components/button.d.ts +2 -1
  2. package/dist/cjs/components/button.js +1 -1
  3. package/dist/cjs/components/button.js.map +3 -3
  4. package/dist/cjs/components/card.js +1 -1
  5. package/dist/cjs/components/card.js.map +2 -2
  6. package/dist/cjs/components/checkbox.d.ts +18 -0
  7. package/dist/cjs/components/checkbox.js +2 -0
  8. package/dist/cjs/components/checkbox.js.map +7 -0
  9. package/dist/cjs/components/flex.d.ts +66 -49
  10. package/dist/cjs/components/flex.js +1 -1
  11. package/dist/cjs/components/flex.js.map +3 -3
  12. package/dist/cjs/components/form.d.ts +11 -0
  13. package/dist/cjs/components/form.js +2 -0
  14. package/dist/cjs/components/form.js.map +7 -0
  15. package/dist/cjs/components/index.d.ts +5 -0
  16. package/dist/cjs/components/index.js +1 -1
  17. package/dist/cjs/components/index.js.map +2 -2
  18. package/dist/cjs/components/link.d.ts +10 -0
  19. package/dist/cjs/components/link.js +2 -0
  20. package/dist/cjs/components/link.js.map +7 -0
  21. package/dist/cjs/components/number-field.d.ts +11 -0
  22. package/dist/cjs/components/number-field.js +2 -0
  23. package/dist/cjs/components/number-field.js.map +7 -0
  24. package/dist/cjs/components/popover.d.ts +6 -6
  25. package/dist/cjs/components/text-area.d.ts +11 -0
  26. package/dist/cjs/components/text-area.js +2 -0
  27. package/dist/cjs/components/text-area.js.map +7 -0
  28. package/dist/cjs/components/text-field.d.ts +10 -1
  29. package/dist/cjs/components/text-field.js +1 -1
  30. package/dist/cjs/components/text-field.js.map +3 -3
  31. package/dist/cjs/components/text.d.ts +1 -1
  32. package/dist/cjs/components/text.js +1 -1
  33. package/dist/cjs/components/text.js.map +3 -3
  34. package/dist/cjs/components/theme.d.ts +2 -0
  35. package/dist/cjs/components/theme.js +1 -1
  36. package/dist/cjs/components/theme.js.map +3 -3
  37. package/dist/cjs/components/tooltip.js +1 -1
  38. package/dist/cjs/components/tooltip.js.map +2 -2
  39. package/dist/cjs/hooks/index.d.ts +1 -0
  40. package/dist/cjs/hooks/index.js +1 -1
  41. package/dist/cjs/hooks/index.js.map +3 -3
  42. package/dist/cjs/hooks/use-in-app.js +1 -1
  43. package/dist/cjs/hooks/use-in-app.js.map +3 -3
  44. package/dist/cjs/hooks/use-product-release.d.ts +6 -0
  45. package/dist/cjs/hooks/use-product-release.js +2 -0
  46. package/dist/cjs/hooks/use-product-release.js.map +7 -0
  47. package/dist/cjs/index.js.map +1 -1
  48. package/dist/cjs/providers/DashXProvider.d.ts +7 -2
  49. package/dist/cjs/providers/DashXProvider.js +1 -1
  50. package/dist/cjs/providers/DashXProvider.js.map +3 -3
  51. package/dist/cjs/providers/index.d.ts +1 -1
  52. package/dist/cjs/providers/index.js +1 -1
  53. package/dist/cjs/providers/index.js.map +2 -2
  54. package/dist/cjs/utils/helpers.d.ts +2 -0
  55. package/dist/cjs/utils/helpers.js +2 -0
  56. package/dist/cjs/utils/helpers.js.map +7 -0
  57. package/dist/cjs/variants/base-element.d.ts +25 -18
  58. package/dist/cjs/variants/base-element.js +1 -1
  59. package/dist/cjs/variants/base-element.js.map +2 -2
  60. package/dist/cjs/variants/base-field.d.ts +110 -0
  61. package/dist/cjs/variants/base-field.js +2 -0
  62. package/dist/cjs/variants/base-field.js.map +7 -0
  63. package/dist/cjs/variants/base-input.d.ts +5 -0
  64. package/dist/cjs/variants/base-input.js +2 -0
  65. package/dist/cjs/variants/base-input.js.map +7 -0
  66. package/dist/cjs/variants/button.d.ts +26 -54
  67. package/dist/cjs/variants/button.js +1 -1
  68. package/dist/cjs/variants/button.js.map +2 -2
  69. package/dist/cjs/variants/card.d.ts +2 -62
  70. package/dist/cjs/variants/card.js +1 -1
  71. package/dist/cjs/variants/card.js.map +2 -2
  72. package/dist/cjs/variants/checkbox.d.ts +23 -0
  73. package/dist/cjs/variants/checkbox.js +2 -0
  74. package/dist/cjs/variants/checkbox.js.map +7 -0
  75. package/dist/cjs/variants/field-error.d.ts +65 -0
  76. package/dist/cjs/variants/field-error.js +2 -0
  77. package/dist/cjs/variants/field-error.js.map +7 -0
  78. package/dist/cjs/variants/heading.d.ts +19 -205
  79. package/dist/cjs/variants/index.d.ts +2 -0
  80. package/dist/cjs/variants/index.js +1 -1
  81. package/dist/cjs/variants/index.js.map +2 -2
  82. package/dist/cjs/variants/link.d.ts +215 -0
  83. package/dist/cjs/variants/link.js +2 -0
  84. package/dist/cjs/variants/link.js.map +7 -0
  85. package/dist/cjs/variants/popover.d.ts +5 -61
  86. package/dist/cjs/variants/popover.js +1 -1
  87. package/dist/cjs/variants/popover.js.map +2 -2
  88. package/dist/cjs/variants/text-area.d.ts +141 -0
  89. package/dist/cjs/variants/text-area.js +2 -0
  90. package/dist/cjs/variants/text-area.js.map +7 -0
  91. package/dist/cjs/variants/text-field.d.ts +78 -30
  92. package/dist/cjs/variants/text-field.js +1 -1
  93. package/dist/cjs/variants/text-field.js.map +3 -3
  94. package/dist/cjs/variants/text.d.ts +20 -205
  95. package/dist/cjs/variants/text.js +1 -1
  96. package/dist/cjs/variants/text.js.map +2 -2
  97. package/dist/cjs/variants/tooltip.d.ts +1 -1
  98. package/dist/cjs/variants/tooltip.js +1 -1
  99. package/dist/cjs/variants/tooltip.js.map +2 -2
  100. package/dist/cjs/variants/typography.d.ts +14 -159
  101. package/dist/cjs/variants/typography.js +1 -1
  102. package/dist/cjs/variants/typography.js.map +2 -2
  103. package/dist/esm/components/button.d.ts +2 -1
  104. package/dist/esm/components/button.js +1 -1
  105. package/dist/esm/components/button.js.map +3 -3
  106. package/dist/esm/components/card.js +1 -1
  107. package/dist/esm/components/card.js.map +2 -2
  108. package/dist/esm/components/checkbox.d.ts +18 -0
  109. package/dist/esm/components/checkbox.js +2 -0
  110. package/dist/esm/components/checkbox.js.map +7 -0
  111. package/dist/esm/components/flex.d.ts +321 -16
  112. package/dist/esm/components/flex.js +1 -1
  113. package/dist/esm/components/flex.js.map +3 -3
  114. package/dist/esm/components/form.d.ts +11 -0
  115. package/dist/esm/components/form.js +2 -0
  116. package/dist/esm/components/form.js.map +7 -0
  117. package/dist/esm/components/index.d.ts +5 -0
  118. package/dist/esm/components/index.js +1 -1
  119. package/dist/esm/components/index.js.map +2 -2
  120. package/dist/esm/components/link.d.ts +10 -0
  121. package/dist/esm/components/link.js +2 -0
  122. package/dist/esm/components/link.js.map +7 -0
  123. package/dist/esm/components/number-field.d.ts +11 -0
  124. package/dist/esm/components/number-field.js +2 -0
  125. package/dist/esm/components/number-field.js.map +7 -0
  126. package/dist/esm/components/popover.d.ts +6 -6
  127. package/dist/esm/components/text-area.d.ts +11 -0
  128. package/dist/esm/components/text-area.js +2 -0
  129. package/dist/esm/components/text-area.js.map +7 -0
  130. package/dist/esm/components/text-field.d.ts +10 -1
  131. package/dist/esm/components/text-field.js +1 -1
  132. package/dist/esm/components/text-field.js.map +3 -3
  133. package/dist/esm/components/text.d.ts +1 -1
  134. package/dist/esm/components/text.js +1 -1
  135. package/dist/esm/components/text.js.map +3 -3
  136. package/dist/esm/components/theme.d.ts +2 -0
  137. package/dist/esm/components/theme.js +1 -1
  138. package/dist/esm/components/theme.js.map +3 -3
  139. package/dist/esm/components/tooltip.js +1 -1
  140. package/dist/esm/components/tooltip.js.map +2 -2
  141. package/dist/esm/hooks/index.d.ts +1 -0
  142. package/dist/esm/hooks/index.js +1 -1
  143. package/dist/esm/hooks/index.js.map +2 -2
  144. package/dist/esm/hooks/use-in-app.js +1 -1
  145. package/dist/esm/hooks/use-in-app.js.map +3 -3
  146. package/dist/esm/hooks/use-product-release.d.ts +6 -0
  147. package/dist/esm/hooks/use-product-release.js +2 -0
  148. package/dist/esm/hooks/use-product-release.js.map +7 -0
  149. package/dist/esm/providers/DashXProvider.d.ts +7 -2
  150. package/dist/esm/providers/DashXProvider.js +1 -1
  151. package/dist/esm/providers/DashXProvider.js.map +3 -3
  152. package/dist/esm/providers/index.d.ts +1 -1
  153. package/dist/esm/providers/index.js +1 -1
  154. package/dist/esm/providers/index.js.map +3 -3
  155. package/dist/esm/utils/helpers.d.ts +2 -0
  156. package/dist/esm/utils/helpers.js +2 -0
  157. package/dist/esm/utils/helpers.js.map +7 -0
  158. package/dist/esm/variants/base-element.d.ts +91 -0
  159. package/dist/esm/variants/base-element.js +1 -1
  160. package/dist/esm/variants/base-element.js.map +2 -2
  161. package/dist/esm/variants/base-field.d.ts +236 -0
  162. package/dist/esm/variants/base-field.js +2 -0
  163. package/dist/esm/variants/base-field.js.map +7 -0
  164. package/dist/esm/variants/base-input.d.ts +5 -0
  165. package/dist/esm/variants/base-input.js +2 -0
  166. package/dist/esm/variants/base-input.js.map +7 -0
  167. package/dist/esm/variants/button.d.ts +122 -15
  168. package/dist/esm/variants/button.js +1 -1
  169. package/dist/esm/variants/button.js.map +2 -2
  170. package/dist/esm/variants/card.d.ts +2 -2
  171. package/dist/esm/variants/card.js +1 -1
  172. package/dist/esm/variants/card.js.map +2 -2
  173. package/dist/esm/variants/checkbox.d.ts +41 -0
  174. package/dist/esm/variants/checkbox.js +2 -0
  175. package/dist/esm/variants/checkbox.js.map +7 -0
  176. package/dist/esm/variants/field-error.d.ts +149 -0
  177. package/dist/esm/variants/field-error.js +2 -0
  178. package/dist/esm/variants/field-error.js.map +7 -0
  179. package/dist/esm/variants/heading.d.ts +45 -0
  180. package/dist/esm/variants/index.d.ts +2 -0
  181. package/dist/esm/variants/index.js +1 -1
  182. package/dist/esm/variants/index.js.map +2 -2
  183. package/dist/esm/variants/link.d.ts +470 -0
  184. package/dist/esm/variants/link.js +2 -0
  185. package/dist/esm/variants/link.js.map +7 -0
  186. package/dist/esm/variants/popover.d.ts +4 -4
  187. package/dist/esm/variants/popover.js +1 -1
  188. package/dist/esm/variants/popover.js.map +2 -2
  189. package/dist/esm/variants/text-area.d.ts +298 -0
  190. package/dist/esm/variants/text-area.js +2 -0
  191. package/dist/esm/variants/text-area.js.map +7 -0
  192. package/dist/esm/variants/text-field.d.ts +218 -13
  193. package/dist/esm/variants/text-field.js +1 -1
  194. package/dist/esm/variants/text-field.js.map +3 -3
  195. package/dist/esm/variants/text.d.ts +48 -1
  196. package/dist/esm/variants/text.js +1 -1
  197. package/dist/esm/variants/text.js.map +2 -2
  198. package/dist/esm/variants/tooltip.d.ts +1 -1
  199. package/dist/esm/variants/tooltip.js +1 -1
  200. package/dist/esm/variants/tooltip.js.map +2 -2
  201. package/dist/esm/variants/typography.d.ts +35 -0
  202. package/dist/esm/variants/typography.js +1 -1
  203. package/dist/esm/variants/typography.js.map +2 -2
  204. package/package.json +5 -6
  205. package/src/components/button.tsx +17 -21
  206. package/src/components/card.tsx +2 -2
  207. package/src/components/checkbox.tsx +255 -0
  208. package/src/components/flex.tsx +17 -7
  209. package/src/components/form.tsx +30 -0
  210. package/src/components/index.ts +5 -0
  211. package/src/components/link.tsx +90 -0
  212. package/src/components/number-field.tsx +174 -0
  213. package/src/components/text-area.tsx +107 -0
  214. package/src/components/text-field.tsx +103 -3
  215. package/src/components/text.tsx +13 -4
  216. package/src/components/theme.tsx +16 -4
  217. package/src/components/tooltip.tsx +1 -1
  218. package/src/hooks/index.ts +1 -0
  219. package/src/hooks/use-in-app.ts +17 -58
  220. package/src/hooks/use-product-release.ts +38 -0
  221. package/src/providers/DashXProvider.tsx +91 -5
  222. package/src/providers/index.ts +1 -1
  223. package/src/styles/index.css +180 -43
  224. package/src/utils/helpers.ts +21 -0
  225. package/src/variants/base-element.ts +18 -5
  226. package/src/variants/base-field.ts +42 -0
  227. package/src/variants/base-input.ts +13 -0
  228. package/src/variants/button.ts +47 -27
  229. package/src/variants/card.ts +3 -3
  230. package/src/variants/checkbox.ts +33 -0
  231. package/src/variants/field-error.ts +29 -0
  232. package/src/variants/index.ts +2 -0
  233. package/src/variants/link.ts +34 -0
  234. package/src/variants/popover.ts +5 -5
  235. package/src/variants/text-area.ts +26 -0
  236. package/src/variants/text-field.ts +14 -3
  237. package/src/variants/text.ts +2 -1
  238. package/src/variants/tooltip.ts +1 -1
  239. package/src/variants/typography.ts +14 -9
  240. package/styles.css +546 -124
  241. package/dist/cjs/tsconfig.tsbuildinfo +0 -1
  242. package/dist/esm/tsconfig.tsbuildinfo +0 -1
@@ -3,11 +3,24 @@ import { tv } from 'tailwind-variants';
3
3
  const baseElement = tv({
4
4
  variants: {
5
5
  size: {
6
- extrasmall: 'rounded-sm-or-full h-6',
7
- small: 'rounded-sm-or-full h-8',
8
- medium: 'rounded-md-or-full h-10',
9
- large: 'rounded-lg-or-full h-12',
10
- extralarge: 'rounded-lg-or-full h-14',
6
+ extrasmall: 'h-6',
7
+ small: 'h-8',
8
+ medium: 'h-10',
9
+ large: 'h-12',
10
+ extralarge: 'h-14',
11
+ },
12
+ roundness: {
13
+ none: '',
14
+ small: '',
15
+ medium: '',
16
+ large: '',
17
+ full: '',
18
+ },
19
+ elevation: {
20
+ none: '',
21
+ small: '',
22
+ medium: '',
23
+ large: '',
11
24
  },
12
25
  },
13
26
  });
@@ -0,0 +1,42 @@
1
+ import { tv } from 'tailwind-variants';
2
+
3
+ import baseElement from './base-element.js';
4
+ import { baseInput } from './base-input.js';
5
+
6
+ import type { VariantProps } from 'tailwind-variants';
7
+
8
+ const getSpacing = () => ({
9
+ extrasmall: 'py-[3px] px-2 pr-[calc(var(--spacing-2)+var(--append-padding-right,0px))] text-xs',
10
+ small: 'py-[7px] px-3 pr-[calc(var(--spacing-3)+var(--append-padding-right,0px))] text-xs',
11
+ medium: 'py-[9px] px-4 pr-[calc(var(--spacing-4)+var(--append-padding-right,0px))] text-sm',
12
+ large: 'py-3 px-4 pr-[calc(var(--spacing-4)+var(--append-padding-right,0px))] text-sm',
13
+ extralarge:
14
+ 'py-[15px] px-6 pr-[calc(var(--spacing-6)+var(--append-padding-right,0px))] text-base',
15
+ });
16
+
17
+ const baseField = tv({
18
+ extend: baseElement,
19
+ base: baseInput(),
20
+ variants: {
21
+ size: getSpacing(),
22
+ roundness: {
23
+ none: '',
24
+ small: '',
25
+ medium: '',
26
+ large: '',
27
+ full: '',
28
+ },
29
+ elevation: {
30
+ none: '',
31
+ small: '',
32
+ medium: '',
33
+ large: '',
34
+ },
35
+ },
36
+ });
37
+
38
+ type BaseFieldVariantProps = VariantProps<typeof baseField>;
39
+
40
+ export type { BaseFieldVariantProps };
41
+
42
+ export { baseField };
@@ -0,0 +1,13 @@
1
+ import { tv } from 'tailwind-variants';
2
+
3
+ import type { VariantProps } from 'tailwind-variants';
4
+
5
+ const baseInput = tv({
6
+ base: 'data-[invalid="true"]:border-negative-300 data-[invalid="true"]:hover:border-negative-400 data-[invalid="true"]:focus:border-negative-500 data-[invalid="true"]:text-negative-500 data-[invalid="true"]:bg-negative-50 ease-fluid data-[invalid="true"]:focus:outline-negative-500 focus:outline-accent-500 autofill:bg-accent-300 !hover:border-gray-400 border border-gray-300 py-3 px-4 text-sm text-gray-900 outline-none transition-[box-shadow,background-color,color,border-color] duration-300',
7
+ });
8
+
9
+ type BaseInputVariantProps = VariantProps<typeof baseInput>;
10
+
11
+ export type { BaseInputVariantProps };
12
+
13
+ export { baseInput };
@@ -6,33 +6,28 @@ import type { VariantProps } from 'tailwind-variants';
6
6
 
7
7
  const button = tv({
8
8
  extend: baseElement,
9
- base: 'inline-flex items-center justify-center gap-2 outline-none transition-[box-shadow,background-color,color] duration-300 ease-[cubic-bezier(0.25, select-none data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-30',
9
+ base: 'ease-fluid inline-flex items-center justify-center gap-2 outline-none transition-[box-shadow,background-color,color] duration-300 select-none data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 data-[disabled]:shadow-none',
10
10
  variants: {
11
11
  size: {
12
- extrasmall: 'text-xs',
13
- small: 'text-sm',
14
- medium: 'text-base',
15
- large: 'text-lg',
16
- extralarge: 'text-xl',
12
+ extrasmall: 'rounded-sm-or-full text-xs',
13
+ small: 'rounded-sm-or-full text-sm',
14
+ medium: 'rounded-md-or-full text-base',
15
+ large: 'rounded-lg-or-full text-lg',
16
+ extralarge: 'rounded-lg-or-full text-xl',
17
17
  },
18
18
  variant: {
19
- fill: 'text-white',
20
- outline: 'border-2',
21
- simple: 'border-1 hover:ring-1 hover:ring-inset',
19
+ fill: 'text-bg',
20
+ outline: 'ring-2 ring-inset',
21
+ simple: 'ring-1 ring-inset hover:ring-2 data-[focus-visible]:ring-2',
22
22
  ghost: '',
23
23
  },
24
24
  mode: {
25
- distinct: 'data-[focus-visible]:outline-accent-300',
26
- subtle: 'data-[focus-visible]:outline-accent-300',
27
- negative: 'data-[focus-visible]:outline-negative-300',
28
- },
29
- roundness: {
30
- none: '',
31
- small: '',
32
- medium: '',
33
- large: '',
34
- full: '',
25
+ distinct: 'data-[focus-visible]:outline-accent-500',
26
+ subtle: 'data-[focus-visible]:outline-accent-500',
27
+ negative: 'data-[focus-visible]:outline-negative-500',
35
28
  },
29
+ roundness: {},
30
+ elevation: {},
36
31
  shape: {
37
32
  square: '',
38
33
  rect: '',
@@ -42,7 +37,6 @@ const button = tv({
42
37
  right: '',
43
38
  both: '',
44
39
  },
45
- // TODO: shadow
46
40
  },
47
41
  defaultVariants: {
48
42
  size: 'medium',
@@ -55,7 +49,7 @@ const button = tv({
55
49
  mode: 'distinct',
56
50
  variant: 'fill',
57
51
  className:
58
- 'bg-accent-500 hover:bg-accent-600 active:bg-accent-700 shadow-accent-600/30 hover:shadow-accent-600/30 active:shadow-accent-600/30 shadow-sm hover:shadow-lg active:shadow-sm',
52
+ 'bg-accent-500 hover:bg-accent-600 active:bg-accent-700 shadow-accent-400/30 hover:shadow-accent-400/30 active:shadow-accent-400/30',
59
53
  },
60
54
  {
61
55
  mode: 'distinct',
@@ -78,30 +72,30 @@ const button = tv({
78
72
  mode: 'subtle',
79
73
  variant: 'fill',
80
74
  className:
81
- 'bg-gray-500 shadow-sm shadow-gray-600/30 hover:bg-gray-600 hover:shadow-lg hover:shadow-gray-600/30 active:bg-gray-700 active:shadow-sm active:shadow-gray-600/30',
75
+ 'bg-gray-600 shadow-gray-400/30 hover:bg-gray-600 hover:shadow-lg hover:shadow-gray-400/30 active:bg-gray-700 active:shadow-gray-400/30',
82
76
  },
83
77
  {
84
78
  mode: 'subtle',
85
79
  variant: 'outline',
86
- className: 'text-gray-500 hover:text-gray-600 active:text-gray-700',
80
+ className: 'text-gray-600 hover:text-gray-600 active:text-gray-700',
87
81
  },
88
82
  {
89
83
  mode: 'subtle',
90
84
  variant: 'simple',
91
85
  className:
92
- 'text-gray-500 hover:text-gray-600 hover:ring-gray-600 active:text-gray-700 active:ring-gray-700',
86
+ 'text-gray-600 hover:text-gray-600 hover:ring-gray-600 active:text-gray-700 active:ring-gray-700',
93
87
  },
94
88
  {
95
89
  mode: 'subtle',
96
90
  variant: 'ghost',
97
91
  className:
98
- 'text-gray-500 hover:bg-gray-100 hover:text-gray-600 active:bg-gray-200 active:text-gray-700',
92
+ 'text-gray-600 hover:bg-gray-100 hover:text-gray-600 active:bg-gray-200 active:text-gray-700',
99
93
  },
100
94
  {
101
95
  mode: 'negative',
102
96
  variant: 'fill',
103
97
  className:
104
- 'bg-negative-500 hover:bg-negative-600 active:bg-negative-700 shadow-negative-600/30 hover:shadow-negative-600/30 active:shadow-negative-600/30 shadow-sm hover:shadow-lg active:shadow-sm',
98
+ 'bg-negative-500 hover:bg-negative-600 active:bg-negative-700 shadow-negative-400/30 hover:shadow-negative-400/30 active:shadow-negative-400/30',
105
99
  },
106
100
  {
107
101
  mode: 'negative',
@@ -143,7 +137,7 @@ const button = tv({
143
137
  shape: 'rect',
144
138
  size: 'large',
145
139
  className:
146
- 'min-w-28 px-6 data-[inset=left]:-ml-6 data-[inset=right]:-mr-6 data-[inset=both]:-mx-6',
140
+ 'min-w-24 px-6 data-[inset=left]:-ml-6 data-[inset=right]:-mr-6 data-[inset=both]:-mx-6',
147
141
  },
148
142
  {
149
143
  shape: 'rect',
@@ -181,6 +175,32 @@ const button = tv({
181
175
  className:
182
176
  'size-14 p-5 data-[inset=left]:-ml-5 data-[inset=right]:-mr-5 data-[inset=both]:-mx-5',
183
177
  },
178
+
179
+ {
180
+ size: 'extrasmall',
181
+ variant: 'fill',
182
+ className: 'shadow-2xs active:shadow-2xs hover:shadow-sm',
183
+ },
184
+ {
185
+ size: 'small',
186
+ variant: 'fill',
187
+ className: 'shadow-2xs active:shadow-2xs hover:shadow-sm',
188
+ },
189
+ {
190
+ size: 'medium',
191
+ variant: 'fill',
192
+ className: 'shadow-xs hover:shadow-md active:shadow-xs',
193
+ },
194
+ {
195
+ size: 'large',
196
+ variant: 'fill',
197
+ className: 'shadow-sm hover:shadow-lg active:shadow-sm',
198
+ },
199
+ {
200
+ size: 'extralarge',
201
+ variant: 'fill',
202
+ className: 'shadow-sm hover:shadow-lg active:shadow-sm',
203
+ },
184
204
  ],
185
205
  });
186
206
 
@@ -11,12 +11,12 @@ const SPACING = {
11
11
  };
12
12
 
13
13
  const card = tv({
14
- base: 'shadow-2xs bg-white p-[var(--padding)] shadow-gray-400/10',
14
+ base: 'shadow-2xs bg-bg light:shadow-gray-400/30 border border-gray-400/40 p-[var(--padding)]',
15
15
  variants: {
16
16
  roundness: {
17
17
  none: 'rounded-none',
18
- small: 'rounded-sm',
19
- medium: 'rounded-md',
18
+ small: 'rounded-md',
19
+ medium: 'rounded-lg',
20
20
  large: 'rounded-xl',
21
21
  full: 'rounded-full',
22
22
  },
@@ -0,0 +1,33 @@
1
+ import { tv } from 'tailwind-variants';
2
+ import type { VariantProps } from 'tailwind-variants';
3
+ import { baseInput } from './base-input.js';
4
+
5
+ const checkbox = tv({
6
+ extend: baseInput,
7
+ base: 'data-[focus-visible]:outline-accent-500',
8
+ variants: {
9
+ size: {
10
+ small: 'my-[1px] size-[14px] rounded-sm p-[1px]',
11
+ medium: 'my-[2px] size-4 rounded-md p-[2px]',
12
+ large: 'size-6 rounded-lg p-1',
13
+ },
14
+ roundness: {
15
+ none: '',
16
+ small: '',
17
+ medium: '',
18
+ large: '',
19
+ },
20
+ elevation: {
21
+ none: '',
22
+ small: '',
23
+ medium: '',
24
+ large: '',
25
+ },
26
+ },
27
+ });
28
+
29
+ type CheckboxVariantProps = VariantProps<typeof checkbox>;
30
+
31
+ export type { CheckboxVariantProps };
32
+
33
+ export { checkbox };
@@ -0,0 +1,29 @@
1
+ import { tv } from 'tailwind-variants';
2
+
3
+ const fieldError = tv({
4
+ base: 'bg-negative-500 absolute top-[75%] z-[1] transform text-white',
5
+ variants: {
6
+ size: {
7
+ extrasmall: 'rounded-sm-or-full shadow-negative-600/30 left-3 py-1 px-2 shadow-xs',
8
+ small: 'rounded-sm-or-full shadow-negative-600/30 left-3 py-1 px-2 shadow-xs',
9
+ medium: 'rounded-sm-or-full shadow-negative-600/30 left-4 py-2 px-3 shadow-sm',
10
+ large: 'rounded-md-or-full shadow-negative-600/30 left-4 py-3 px-4 shadow-md',
11
+ extralarge: 'rounded-md-or-full shadow-negative-600/30 left-6 py-3 px-4 shadow-md',
12
+ },
13
+ roundness: {
14
+ none: '',
15
+ small: '',
16
+ medium: '',
17
+ large: '',
18
+ full: '',
19
+ },
20
+ elevation: {
21
+ none: '',
22
+ small: '',
23
+ medium: '',
24
+ large: '',
25
+ },
26
+ },
27
+ });
28
+
29
+ export { fieldError };
@@ -1,6 +1,8 @@
1
1
  export * from './button.js';
2
2
  export * from './heading.js';
3
+ export * from './link.js';
3
4
  export * from './popover.js';
4
5
  export * from './text.js';
5
6
  export * from './text-field.js';
6
7
  export * from './tooltip.js';
8
+ export * from './checkbox.js';
@@ -0,0 +1,34 @@
1
+ import { tv } from 'tailwind-variants';
2
+ import type { VariantProps } from 'tailwind-variants';
3
+
4
+ import { text } from './text.js';
5
+
6
+ const link = tv({
7
+ extend: text,
8
+ base: 'ease-fluid underline-offset-2 outline-none transition-[opacity,color] duration-300 hover:opacity-100 data-[focus-visible]:opacity-100 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50',
9
+ variants: {
10
+ align: {},
11
+ size: {},
12
+ weight: {},
13
+ color: {
14
+ accent: 'data-[focus-visible]:outline-accent-500 decoration-accent-500',
15
+ gray: 'data-[focus-visible]:outline-accent-500 decoration-gray-500',
16
+ negative: 'data-[focus-visible]:outline-negative-500 decoration-negative-500',
17
+ },
18
+ variant: {},
19
+ transform: {},
20
+ underline: {
21
+ always: 'underline decoration-2',
22
+ hover: 'decoration-0 hover:underline hover:decoration-2',
23
+ none: 'decoration-0',
24
+ },
25
+ },
26
+ defaultVariants: {
27
+ underline: 'always',
28
+ },
29
+ });
30
+
31
+ type LinkVariantProps = VariantProps<typeof link>;
32
+
33
+ export type { LinkVariantProps };
34
+ export { link };
@@ -3,12 +3,12 @@ import { tv } from 'tailwind-variants';
3
3
  import type { VariantProps } from 'tailwind-variants';
4
4
 
5
5
  const popover = tv({
6
- base: '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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 flex h-[var(--height)] max-h-[var(--max-height)] min-h-[var(--min-height)] w-[var(--width)] max-w-[var(--max-width)] min-w-[var(--min-width)] flex-col justify-start overflow-hidden bg-white shadow-md shadow-gray-400/30 outline-0',
6
+ base: '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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-bg light:shadow-gray-400/30 flex h-[var(--height)] max-h-[var(--max-height)] min-h-[var(--min-height)] w-[var(--width)] max-w-[var(--max-width)] min-w-[var(--min-width)] flex-col justify-start overflow-hidden border border-gray-400/40 shadow-md outline-0',
7
7
  variants: {
8
8
  roundness: {
9
9
  none: 'rounded-none',
10
- small: 'rounded-sm',
11
- medium: 'rounded-md',
10
+ small: 'rounded-md',
11
+ medium: 'rounded-lg',
12
12
  large: 'rounded-xl',
13
13
  full: 'rounded-full',
14
14
  },
@@ -31,11 +31,11 @@ const popoverBody = tv({
31
31
  });
32
32
 
33
33
  const popoverHeader = tv({
34
- base: 'border-b border-b-gray-100 p-[var(--padding)]',
34
+ base: 'border-b border-b-gray-400/40 p-[var(--padding)]',
35
35
  });
36
36
 
37
37
  const popoverFooter = tv({
38
- base: 'border-t border-t-gray-100 p-[var(--padding)]',
38
+ base: 'border-t border-t-gray-400/40 p-[var(--padding)]',
39
39
  });
40
40
 
41
41
  export type { PopoverVariantProps };
@@ -0,0 +1,26 @@
1
+ import { tv } from 'tailwind-variants';
2
+
3
+ import type { VariantProps } from 'tailwind-variants';
4
+ import { baseField } from './base-field.js';
5
+
6
+ const textArea = tv({
7
+ extend: baseField,
8
+ base: 'leading-3',
9
+ variants: {
10
+ elevation: {},
11
+ roundness: {},
12
+ size: {
13
+ extrasmall: 'rounded-sm',
14
+ small: 'rounded-sm',
15
+ medium: 'rounded-md',
16
+ large: 'rounded-lg',
17
+ extralarge: 'rounded-lg',
18
+ },
19
+ },
20
+ });
21
+
22
+ type TextAreaVariantProps = VariantProps<typeof textArea>;
23
+
24
+ export type { TextAreaVariantProps };
25
+
26
+ export { textArea };
@@ -1,11 +1,22 @@
1
1
  import { tv } from 'tailwind-variants';
2
2
 
3
- import baseElement from './base-element.js';
4
-
3
+ import { baseField } from './base-field.js';
5
4
  import type { VariantProps } from 'tailwind-variants';
6
5
 
7
6
  const textField = tv({
8
- extend: baseElement,
7
+ extend: baseField,
8
+ base: 'py-3 px-4 text-sm text-gray-900',
9
+ variants: {
10
+ size: {
11
+ extrasmall: 'rounded-sm-or-full',
12
+ small: 'rounded-sm-or-full',
13
+ medium: 'rounded-md-or-full',
14
+ large: 'rounded-lg-or-full',
15
+ extralarge: 'rounded-lg-or-full',
16
+ },
17
+ roundness: {},
18
+ elevation: {},
19
+ },
9
20
  });
10
21
 
11
22
  type TextFieldVariantProps = VariantProps<typeof textField>;
@@ -6,13 +6,14 @@ import type { VariantProps } from 'tailwind-variants';
6
6
 
7
7
  const text = tv({
8
8
  extend: typography,
9
- base: 'text-gray-950',
9
+ base: 'rounded-sm text-gray-950',
10
10
  variants: {
11
11
  align: {},
12
12
  size: {},
13
13
  weight: {},
14
14
  color: {},
15
15
  variant: {},
16
+ transform: {},
16
17
  },
17
18
  defaultVariants: {
18
19
  size: 3,
@@ -1,7 +1,7 @@
1
1
  import { tv } from 'tailwind-variants';
2
2
 
3
3
  const tooltip = tv({
4
- base: 'bg-gray-600 text-white',
4
+ base: 'bg-gray-600',
5
5
  });
6
6
 
7
7
  export { tooltip };
@@ -5,6 +5,11 @@ import type { VariantProps } from 'tailwind-variants';
5
5
  const typography = tv({
6
6
  base: 'text-gray-950',
7
7
  variants: {
8
+ transform: {
9
+ uppercase: 'uppercase',
10
+ capitalize: 'capitalize',
11
+ lowercase: 'lowercase',
12
+ },
8
13
  align: {
9
14
  center: 'text-center',
10
15
  left: 'text-left',
@@ -49,47 +54,47 @@ const typography = tv({
49
54
  {
50
55
  color: 'accent',
51
56
  variant: 'primary',
52
- className: 'text-accent-950',
57
+ className: 'text-accent-950 opacity-[0.95]',
53
58
  },
54
59
  {
55
60
  color: 'accent',
56
61
  variant: 'secondary',
57
- className: 'text-accent-900',
62
+ className: 'text-accent-900 opacity-[0.90]',
58
63
  },
59
64
  {
60
65
  color: 'accent',
61
66
  variant: 'tertiary',
62
- className: 'text-accent-800',
67
+ className: 'text-accent-800 opacity-[0.80]',
63
68
  },
64
69
  {
65
70
  color: 'gray',
66
71
  variant: 'primary',
67
- className: 'text-gray-950',
72
+ className: 'text-gray-950 opacity-[0.95]',
68
73
  },
69
74
  {
70
75
  color: 'gray',
71
76
  variant: 'secondary',
72
- className: 'text-gray-900',
77
+ className: 'text-gray-900 opacity-[0.90]',
73
78
  },
74
79
  {
75
80
  color: 'gray',
76
81
  variant: 'tertiary',
77
- className: 'text-gray-800',
82
+ className: 'text-gray-800 opacity-[0.80]',
78
83
  },
79
84
  {
80
85
  color: 'negative',
81
86
  variant: 'primary',
82
- className: 'text-negative-950',
87
+ className: 'text-negative-950 opacity-[0.95]',
83
88
  },
84
89
  {
85
90
  color: 'negative',
86
91
  variant: 'secondary',
87
- className: 'text-negative-900',
92
+ className: 'text-negative-900 opacity-[0.90]',
88
93
  },
89
94
  {
90
95
  color: 'negative',
91
96
  variant: 'tertiary',
92
- className: 'text-negative-800',
97
+ className: 'text-negative-800 opacity-[0.80]',
93
98
  },
94
99
  ],
95
100
  });