@regardio/react 0.5.7 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/dist/background-slideshow/index.d.mts +34 -0
  2. package/dist/background-slideshow/index.mjs +110 -0
  3. package/dist/blurry-gradient/index.d.mts +16 -0
  4. package/dist/blurry-gradient/index.mjs +93 -0
  5. package/dist/button/index.d.mts +2 -0
  6. package/dist/button/index.mjs +3 -0
  7. package/dist/button-BiSQpBbc.mjs +129 -0
  8. package/dist/carousel/index.d.mts +74 -0
  9. package/dist/carousel/index.mjs +136 -0
  10. package/dist/checkbox/index.d.mts +28 -0
  11. package/dist/checkbox/index.mjs +70 -0
  12. package/dist/checkbox-group/index.d.mts +16 -0
  13. package/dist/checkbox-group/index.mjs +29 -0
  14. package/dist/chunk-BTpB_u-K.mjs +18 -0
  15. package/dist/countdown/index.d.mts +4 -0
  16. package/dist/countdown/index.mjs +58 -0
  17. package/dist/field/index.d.mts +68 -0
  18. package/dist/field/index.mjs +115 -0
  19. package/dist/fieldset/index.d.mts +34 -0
  20. package/dist/fieldset/index.mjs +61 -0
  21. package/dist/form/index.d.mts +21 -0
  22. package/dist/form/index.mjs +31 -0
  23. package/dist/generic-error/index.d.mts +44 -0
  24. package/dist/generic-error/index.mjs +57 -0
  25. package/dist/grid/index.d.mts +101 -0
  26. package/dist/grid/index.mjs +219 -0
  27. package/dist/heading/index.d.mts +27 -0
  28. package/dist/heading/index.mjs +28 -0
  29. package/dist/highlight/index.d.mts +17 -0
  30. package/dist/highlight/index.mjs +35 -0
  31. package/dist/hooks/use-current-route-data.d.mts +8 -0
  32. package/dist/hooks/use-current-route-data.mjs +22 -0
  33. package/dist/hooks/{use-focus-search.d.ts → use-focus-search.d.mts} +4 -3
  34. package/dist/hooks/use-focus-search.mjs +23 -0
  35. package/dist/hooks/use-matches-data.d.mts +10 -0
  36. package/dist/hooks/use-matches-data.mjs +23 -0
  37. package/dist/hooks/use-media-query.d.mts +9 -0
  38. package/dist/hooks/use-media-query.mjs +28 -0
  39. package/dist/hooks/use-mobile.d.mts +4 -0
  40. package/dist/hooks/use-mobile.mjs +22 -0
  41. package/dist/hooks/use-nonce.d.mts +6 -0
  42. package/dist/hooks/use-nonce.mjs +13 -0
  43. package/dist/hooks/use-orientation.d.mts +12 -0
  44. package/dist/hooks/use-orientation.mjs +32 -0
  45. package/dist/hooks/use-user.d.mts +53 -0
  46. package/dist/hooks/use-user.mjs +39 -0
  47. package/dist/icon-button/index.d.mts +28 -0
  48. package/dist/icon-button/index.mjs +36 -0
  49. package/dist/if/index.d.mts +13 -0
  50. package/dist/if/index.mjs +21 -0
  51. package/dist/iframe/index.d.mts +11 -0
  52. package/dist/iframe/index.mjs +15 -0
  53. package/dist/index-Bj5_XfEC.d.mts +29 -0
  54. package/dist/index-C_evL5vG.d.mts +35 -0
  55. package/dist/input/index.d.mts +2 -0
  56. package/dist/input/index.mjs +3 -0
  57. package/dist/input-CtR6aRVi.mjs +73 -0
  58. package/dist/link/index.d.mts +71 -0
  59. package/dist/link/index.mjs +129 -0
  60. package/dist/list/index.d.mts +72 -0
  61. package/dist/list/index.mjs +54 -0
  62. package/dist/markdown-container/index.d.mts +23 -0
  63. package/dist/markdown-container/index.mjs +71 -0
  64. package/dist/password-input/index.d.mts +23 -0
  65. package/dist/password-input/index.mjs +92 -0
  66. package/dist/picture/index.d.mts +39 -0
  67. package/dist/picture/index.mjs +3 -0
  68. package/dist/picture-DkX3W5zl.mjs +69 -0
  69. package/dist/protected-email/index.d.mts +24 -0
  70. package/dist/protected-email/index.mjs +37 -0
  71. package/dist/radio/index.d.mts +28 -0
  72. package/dist/radio/index.mjs +72 -0
  73. package/dist/radio-group/index.d.mts +16 -0
  74. package/dist/radio-group/index.mjs +29 -0
  75. package/dist/slider/index.d.mts +63 -0
  76. package/dist/slider/index.mjs +133 -0
  77. package/dist/switch/index.d.mts +29 -0
  78. package/dist/switch/index.mjs +87 -0
  79. package/dist/text/index.d.mts +25 -0
  80. package/dist/text/index.mjs +32 -0
  81. package/dist/text-EQC4zJbE.mjs +52 -0
  82. package/dist/toggle/index.d.mts +25 -0
  83. package/dist/toggle/index.mjs +82 -0
  84. package/dist/utils/author/index.d.mts +4 -0
  85. package/dist/utils/author/index.mjs +26 -0
  86. package/dist/utils/text/{index.d.ts → index.d.mts} +9 -8
  87. package/dist/utils/text/index.mjs +3 -0
  88. package/package.json +131 -83
  89. package/src/background-slideshow/background-slideshow.tsx +1 -2
  90. package/src/blurry-gradient/blurry-gradient.tsx +1 -1
  91. package/src/button/button.stories.tsx +161 -0
  92. package/src/button/button.test.tsx +73 -0
  93. package/src/button/button.tsx +118 -0
  94. package/src/button/index.ts +2 -0
  95. package/src/carousel/carousel-content.tsx +17 -14
  96. package/src/carousel/carousel-item.tsx +18 -18
  97. package/src/carousel/carousel-next.tsx +22 -17
  98. package/src/carousel/carousel-previous.tsx +22 -17
  99. package/src/carousel/carousel-root.tsx +91 -86
  100. package/src/checkbox/checkbox.stories.tsx +118 -0
  101. package/src/checkbox/checkbox.tsx +102 -0
  102. package/src/checkbox/index.ts +2 -0
  103. package/src/checkbox-group/checkbox-group.tsx +40 -0
  104. package/src/checkbox-group/index.ts +2 -0
  105. package/src/countdown/countdown.tsx +1 -1
  106. package/src/field/field.stories.tsx +105 -0
  107. package/src/field/field.test.tsx +61 -0
  108. package/src/field/field.tsx +186 -0
  109. package/src/field/index.ts +12 -0
  110. package/src/fieldset/fieldset.stories.tsx +204 -0
  111. package/src/fieldset/fieldset.test.tsx +63 -0
  112. package/src/fieldset/fieldset.tsx +86 -0
  113. package/src/fieldset/index.ts +7 -0
  114. package/src/form/form.stories.tsx +230 -0
  115. package/src/form/form.test.tsx +68 -0
  116. package/src/form/form.tsx +38 -0
  117. package/src/form/index.ts +2 -0
  118. package/src/generic-error/generic-error.tsx +2 -3
  119. package/src/grid/grid-item.tsx +77 -36
  120. package/src/grid/grid-root.tsx +49 -22
  121. package/src/heading/heading.tsx +7 -3
  122. package/src/highlight/highlight.tsx +1 -1
  123. package/src/hooks/use-current-route-data.ts +4 -2
  124. package/src/hooks/use-focus-search.ts +3 -1
  125. package/src/hooks/use-matches-data.ts +2 -0
  126. package/src/hooks/use-media-query.ts +2 -0
  127. package/src/hooks/use-mobile.ts +3 -1
  128. package/src/hooks/use-nonce.ts +3 -3
  129. package/src/hooks/use-orientation.ts +2 -0
  130. package/src/hooks/use-user.tsx +3 -2
  131. package/src/icon-button/icon-button.stories.tsx +128 -7
  132. package/src/icon-button/icon-button.test.tsx +152 -0
  133. package/src/icon-button/icon-button.tsx +43 -9
  134. package/src/if/if.tsx +3 -1
  135. package/src/input/index.ts +2 -0
  136. package/src/input/input.stories.tsx +151 -0
  137. package/src/input/input.test.tsx +65 -0
  138. package/src/input/input.tsx +113 -0
  139. package/src/link/link.tsx +4 -3
  140. package/src/list/list-item.tsx +10 -13
  141. package/src/list/list-root-context.ts +3 -3
  142. package/src/list/list-root.tsx +10 -13
  143. package/src/password-input/index.ts +1 -1
  144. package/src/password-input/password-input.tsx +104 -27
  145. package/src/protected-email/protected-email.tsx +6 -1
  146. package/src/radio/index.ts +2 -0
  147. package/src/radio/radio.tsx +103 -0
  148. package/src/radio-group/index.ts +2 -0
  149. package/src/radio-group/radio-group.tsx +40 -0
  150. package/src/slider/index.ts +18 -0
  151. package/src/slider/slider.tsx +201 -0
  152. package/src/switch/index.ts +2 -0
  153. package/src/switch/switch.stories.tsx +118 -0
  154. package/src/switch/switch.tsx +112 -0
  155. package/src/text/text.tsx +6 -1
  156. package/src/toggle/index.ts +2 -0
  157. package/src/toggle/toggle.stories.tsx +232 -0
  158. package/src/toggle/toggle.test.tsx +149 -0
  159. package/src/toggle/toggle.tsx +88 -0
  160. package/src/utils/text/text.tsx +8 -16
  161. package/dist/background-slideshow/index.d.ts +0 -24
  162. package/dist/background-slideshow/index.js +0 -165
  163. package/dist/blurry-gradient/index.d.ts +0 -16
  164. package/dist/blurry-gradient/index.js +0 -128
  165. package/dist/carousel/index.d.ts +0 -36
  166. package/dist/carousel/index.js +0 -171
  167. package/dist/countdown/index.d.ts +0 -5
  168. package/dist/countdown/index.js +0 -73
  169. package/dist/generic-error/index.d.ts +0 -43
  170. package/dist/generic-error/index.js +0 -47
  171. package/dist/grid/index.d.ts +0 -1196
  172. package/dist/grid/index.js +0 -239
  173. package/dist/heading/index.d.ts +0 -24
  174. package/dist/heading/index.js +0 -99
  175. package/dist/highlight/index.d.ts +0 -13
  176. package/dist/highlight/index.js +0 -59
  177. package/dist/hooks/use-current-route-data.d.ts +0 -7
  178. package/dist/hooks/use-current-route-data.js +0 -16
  179. package/dist/hooks/use-focus-search.js +0 -19
  180. package/dist/hooks/use-matches-data.d.ts +0 -9
  181. package/dist/hooks/use-matches-data.js +0 -15
  182. package/dist/hooks/use-media-query.d.ts +0 -8
  183. package/dist/hooks/use-media-query.js +0 -20
  184. package/dist/hooks/use-mobile.d.ts +0 -3
  185. package/dist/hooks/use-mobile.js +0 -19
  186. package/dist/hooks/use-nonce.d.ts +0 -7
  187. package/dist/hooks/use-nonce.js +0 -8
  188. package/dist/hooks/use-orientation.d.ts +0 -11
  189. package/dist/hooks/use-orientation.js +0 -29
  190. package/dist/hooks/use-user.d.ts +0 -50
  191. package/dist/hooks/use-user.js +0 -25
  192. package/dist/icon-button/index.d.ts +0 -9
  193. package/dist/icon-button/index.js +0 -17
  194. package/dist/if/index.d.ts +0 -10
  195. package/dist/if/index.js +0 -24
  196. package/dist/iframe/index.d.ts +0 -10
  197. package/dist/iframe/index.js +0 -17
  198. package/dist/link/index.d.ts +0 -55
  199. package/dist/link/index.js +0 -195
  200. package/dist/list/index.d.ts +0 -69
  201. package/dist/list/index.js +0 -65
  202. package/dist/markdown-container/index.d.ts +0 -22
  203. package/dist/markdown-container/index.js +0 -128
  204. package/dist/password-input/index.d.ts +0 -11
  205. package/dist/password-input/index.js +0 -46
  206. package/dist/picture/index.d.ts +0 -38
  207. package/dist/picture/index.js +0 -68
  208. package/dist/protected-email/index.d.ts +0 -20
  209. package/dist/protected-email/index.js +0 -30
  210. package/dist/text/index.d.ts +0 -20
  211. package/dist/text/index.js +0 -38
  212. package/dist/utils/author/index.d.ts +0 -3
  213. package/dist/utils/author/index.js +0 -33
  214. package/dist/utils/text/index.js +0 -73
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://www.schemastore.org/package.json",
3
3
  "name": "@regardio/react",
4
- "version": "0.5.7",
4
+ "version": "0.7.0",
5
5
  "private": false,
6
6
  "description": "Regardio React UI components",
7
7
  "keywords": [
@@ -26,118 +26,166 @@
26
26
  ],
27
27
  "type": "module",
28
28
  "exports": {
29
+ "./tailwind.css": "./src/tailwind.css",
29
30
  "./background-slideshow": {
30
- "types": "./dist/background-slideshow/index.d.ts",
31
- "import": "./dist/background-slideshow/index.js"
31
+ "types": "./dist/background-slideshow/index.d.mts",
32
+ "import": "./dist/background-slideshow/index.mjs"
32
33
  },
33
34
  "./blurry-gradient": {
34
- "types": "./dist/blurry-gradient/index.d.ts",
35
- "import": "./dist/blurry-gradient/index.js"
35
+ "types": "./dist/blurry-gradient/index.d.mts",
36
+ "import": "./dist/blurry-gradient/index.mjs"
36
37
  },
37
- "./carousel": {
38
- "types": "./dist/carousel/index.d.ts",
39
- "import": "./dist/carousel/index.js"
38
+ "./button": {
39
+ "types": "./dist/button/index.d.mts",
40
+ "import": "./dist/button/index.mjs"
40
41
  },
41
- "./countdown": {
42
- "types": "./dist/countdown/index.d.ts",
43
- "import": "./dist/countdown/index.js"
42
+ "./carousel": {
43
+ "types": "./dist/carousel/index.d.mts",
44
+ "import": "./dist/carousel/index.mjs"
44
45
  },
45
- "./generic-error": {
46
- "types": "./dist/generic-error/index.d.ts",
47
- "import": "./dist/generic-error/index.js"
46
+ "./checkbox": {
47
+ "types": "./dist/checkbox/index.d.mts",
48
+ "import": "./dist/checkbox/index.mjs"
48
49
  },
49
- "./grid": {
50
- "types": "./dist/grid/index.d.ts",
51
- "import": "./dist/grid/index.js"
50
+ "./checkbox-group": {
51
+ "types": "./dist/checkbox-group/index.d.mts",
52
+ "import": "./dist/checkbox-group/index.mjs"
52
53
  },
53
- "./heading": {
54
- "types": "./dist/heading/index.d.ts",
55
- "import": "./dist/heading/index.js"
54
+ "./countdown": {
55
+ "types": "./dist/countdown/index.d.mts",
56
+ "import": "./dist/countdown/index.mjs"
56
57
  },
57
- "./highlight": {
58
- "types": "./dist/highlight/index.d.ts",
59
- "import": "./dist/highlight/index.js"
58
+ "./field": {
59
+ "types": "./dist/field/index.d.mts",
60
+ "import": "./dist/field/index.mjs"
60
61
  },
61
- "./hooks/use-current-route-data": {
62
- "types": "./dist/hooks/use-current-route-data.d.ts",
63
- "import": "./dist/hooks/use-current-route-data.js"
62
+ "./fieldset": {
63
+ "types": "./dist/fieldset/index.d.mts",
64
+ "import": "./dist/fieldset/index.mjs"
64
65
  },
65
- "./hooks/use-focus-search": {
66
- "types": "./dist/hooks/use-focus-search.d.ts",
67
- "import": "./dist/hooks/use-focus-search.js"
66
+ "./form": {
67
+ "types": "./dist/form/index.d.mts",
68
+ "import": "./dist/form/index.mjs"
68
69
  },
69
- "./hooks/use-matches-data": {
70
- "types": "./dist/hooks/use-matches-data.d.ts",
71
- "import": "./dist/hooks/use-matches-data.js"
72
- },
73
- "./hooks/use-media-query": {
74
- "types": "./dist/hooks/use-media-query.d.ts",
75
- "import": "./dist/hooks/use-media-query.js"
76
- },
77
- "./hooks/use-mobile": {
78
- "types": "./dist/hooks/use-mobile.d.ts",
79
- "import": "./dist/hooks/use-mobile.js"
70
+ "./generic-error": {
71
+ "types": "./dist/generic-error/index.d.mts",
72
+ "import": "./dist/generic-error/index.mjs"
80
73
  },
81
- "./hooks/use-nonce": {
82
- "types": "./dist/hooks/use-nonce.d.ts",
83
- "import": "./dist/hooks/use-nonce.js"
74
+ "./grid": {
75
+ "types": "./dist/grid/index.d.mts",
76
+ "import": "./dist/grid/index.mjs"
84
77
  },
85
- "./hooks/use-orientation": {
86
- "types": "./dist/hooks/use-orientation.d.ts",
87
- "import": "./dist/hooks/use-orientation.js"
78
+ "./heading": {
79
+ "types": "./dist/heading/index.d.mts",
80
+ "import": "./dist/heading/index.mjs"
88
81
  },
89
- "./hooks/use-user": {
90
- "types": "./dist/hooks/use-user.d.ts",
91
- "import": "./dist/hooks/use-user.js"
82
+ "./highlight": {
83
+ "types": "./dist/highlight/index.d.mts",
84
+ "import": "./dist/highlight/index.mjs"
92
85
  },
93
86
  "./icon-button": {
94
- "types": "./dist/icon-button/index.d.ts",
95
- "import": "./dist/icon-button/index.js"
87
+ "types": "./dist/icon-button/index.d.mts",
88
+ "import": "./dist/icon-button/index.mjs"
96
89
  },
97
90
  "./if": {
98
- "types": "./dist/if/index.d.ts",
99
- "import": "./dist/if/index.js"
91
+ "types": "./dist/if/index.d.mts",
92
+ "import": "./dist/if/index.mjs"
100
93
  },
101
94
  "./iframe": {
102
- "types": "./dist/iframe/index.d.ts",
103
- "import": "./dist/iframe/index.js"
95
+ "types": "./dist/iframe/index.d.mts",
96
+ "import": "./dist/iframe/index.mjs"
97
+ },
98
+ "./input": {
99
+ "types": "./dist/input/index.d.mts",
100
+ "import": "./dist/input/index.mjs"
104
101
  },
105
102
  "./link": {
106
- "types": "./dist/link/index.d.ts",
107
- "import": "./dist/link/index.js"
103
+ "types": "./dist/link/index.d.mts",
104
+ "import": "./dist/link/index.mjs"
108
105
  },
109
106
  "./list": {
110
- "types": "./dist/list/index.d.ts",
111
- "import": "./dist/list/index.js"
107
+ "types": "./dist/list/index.d.mts",
108
+ "import": "./dist/list/index.mjs"
112
109
  },
113
110
  "./markdown-container": {
114
- "types": "./dist/markdown-container/index.d.ts",
115
- "import": "./dist/markdown-container/index.js"
111
+ "types": "./dist/markdown-container/index.d.mts",
112
+ "import": "./dist/markdown-container/index.mjs"
116
113
  },
117
114
  "./password-input": {
118
- "types": "./dist/password-input/index.d.ts",
119
- "import": "./dist/password-input/index.js"
115
+ "types": "./dist/password-input/index.d.mts",
116
+ "import": "./dist/password-input/index.mjs"
120
117
  },
121
118
  "./picture": {
122
- "types": "./dist/picture/index.d.ts",
123
- "import": "./dist/picture/index.js"
119
+ "types": "./dist/picture/index.d.mts",
120
+ "import": "./dist/picture/index.mjs"
124
121
  },
125
122
  "./protected-email": {
126
- "types": "./dist/protected-email/index.d.ts",
127
- "import": "./dist/protected-email/index.js"
123
+ "types": "./dist/protected-email/index.d.mts",
124
+ "import": "./dist/protected-email/index.mjs"
125
+ },
126
+ "./radio": {
127
+ "types": "./dist/radio/index.d.mts",
128
+ "import": "./dist/radio/index.mjs"
129
+ },
130
+ "./radio-group": {
131
+ "types": "./dist/radio-group/index.d.mts",
132
+ "import": "./dist/radio-group/index.mjs"
133
+ },
134
+ "./slider": {
135
+ "types": "./dist/slider/index.d.mts",
136
+ "import": "./dist/slider/index.mjs"
137
+ },
138
+ "./switch": {
139
+ "types": "./dist/switch/index.d.mts",
140
+ "import": "./dist/switch/index.mjs"
128
141
  },
129
- "./tailwind.css": "./src/tailwind.css",
130
142
  "./text": {
131
- "types": "./dist/text/index.d.ts",
132
- "import": "./dist/text/index.js"
143
+ "types": "./dist/text/index.d.mts",
144
+ "import": "./dist/text/index.mjs"
145
+ },
146
+ "./toggle": {
147
+ "types": "./dist/toggle/index.d.mts",
148
+ "import": "./dist/toggle/index.mjs"
149
+ },
150
+ "./hooks/use-current-route-data": {
151
+ "types": "./dist/hooks/use-current-route-data.d.mts",
152
+ "import": "./dist/hooks/use-current-route-data.mjs"
153
+ },
154
+ "./hooks/use-focus-search": {
155
+ "types": "./dist/hooks/use-focus-search.d.mts",
156
+ "import": "./dist/hooks/use-focus-search.mjs"
157
+ },
158
+ "./hooks/use-matches-data": {
159
+ "types": "./dist/hooks/use-matches-data.d.mts",
160
+ "import": "./dist/hooks/use-matches-data.mjs"
161
+ },
162
+ "./hooks/use-media-query": {
163
+ "types": "./dist/hooks/use-media-query.d.mts",
164
+ "import": "./dist/hooks/use-media-query.mjs"
165
+ },
166
+ "./hooks/use-mobile": {
167
+ "types": "./dist/hooks/use-mobile.d.mts",
168
+ "import": "./dist/hooks/use-mobile.mjs"
169
+ },
170
+ "./hooks/use-nonce": {
171
+ "types": "./dist/hooks/use-nonce.d.mts",
172
+ "import": "./dist/hooks/use-nonce.mjs"
173
+ },
174
+ "./hooks/use-orientation": {
175
+ "types": "./dist/hooks/use-orientation.d.mts",
176
+ "import": "./dist/hooks/use-orientation.mjs"
177
+ },
178
+ "./hooks/use-user": {
179
+ "types": "./dist/hooks/use-user.d.mts",
180
+ "import": "./dist/hooks/use-user.mjs"
133
181
  },
134
182
  "./utils/author": {
135
- "types": "./dist/utils/author/index.d.ts",
136
- "import": "./dist/utils/author/index.js"
183
+ "types": "./dist/utils/author/index.d.mts",
184
+ "import": "./dist/utils/author/index.mjs"
137
185
  },
138
186
  "./utils/text": {
139
- "types": "./dist/utils/text/index.d.ts",
140
- "import": "./dist/utils/text/index.js"
187
+ "types": "./dist/utils/text/index.d.mts",
188
+ "import": "./dist/utils/text/index.mjs"
141
189
  }
142
190
  },
143
191
  "files": [
@@ -145,9 +193,9 @@
145
193
  "src"
146
194
  ],
147
195
  "scripts": {
148
- "build": "tsup && post-build-exports --preserve \"./tailwind.css\" && pnpm fix",
196
+ "build": "tsdown && pnpm fix",
149
197
  "clean": "exec-clean .turbo dist",
150
- "dev": "tsup --watch",
198
+ "dev": "tsdown --watch",
151
199
  "fix": "exec-p fix:*",
152
200
  "fix:biome": "lint-biome check --write --unsafe .",
153
201
  "fix:md": "lint-md --fix",
@@ -169,10 +217,10 @@
169
217
  "dependencies": {
170
218
  "@base-ui/react": "1.0.0",
171
219
  "@maptiler/leaflet-maptilersdk": "4.1.1",
172
- "@maptiler/sdk": "3.9.0",
220
+ "@maptiler/sdk": "3.10.0",
173
221
  "@mdx-js/react": "3.1.1",
174
- "@regardio/js": "0.6.0",
175
- "@regardio/tailwind": "0.2.0",
222
+ "@regardio/js": "0.7.0",
223
+ "@regardio/tailwind": "0.3.0",
176
224
  "@supabase/supabase-js": "2.90.1",
177
225
  "cmdk": "1.1.1",
178
226
  "embla-carousel": "8.6.0",
@@ -185,15 +233,15 @@
185
233
  "react": "19.2.3",
186
234
  "react-day-picker": "9.13.0",
187
235
  "react-dom": "19.2.3",
188
- "react-hook-form": "7.71.0",
189
- "react-resizable-panels": "4.4.0",
236
+ "react-hook-form": "7.71.1",
237
+ "react-resizable-panels": "4.4.1",
190
238
  "react-router": "7.12.0",
191
239
  "tailwind-variants": "3.2.2",
192
240
  "vaul": "1.1.2",
193
241
  "zod": "4.3.5"
194
242
  },
195
243
  "devDependencies": {
196
- "@regardio/dev": "1.11.4",
244
+ "@regardio/dev": "1.12.0",
197
245
  "@storybook/addon-a11y": "10.1.11",
198
246
  "@storybook/addon-docs": "10.1.11",
199
247
  "@storybook/addon-vitest": "10.1.11",
@@ -214,7 +262,7 @@
214
262
  "playwright": "1.57.0",
215
263
  "storybook": "10.1.11",
216
264
  "tailwindcss": "4.1.18",
217
- "tsup": "8.5.1",
265
+ "tsdown": "0.20.0-beta.3",
218
266
  "typescript": "5.9.3",
219
267
  "vite": "7.3.1",
220
268
  "vitest": "4.0.17"
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import type { ReactElement } from 'react';
4
3
  import { useEffect, useMemo, useRef, useState } from 'react';
5
4
  import { Picture } from '../picture';
6
5
 
@@ -36,7 +35,7 @@ export function BackgroundSlideshow({
36
35
  slideshowInterval = 6000,
37
36
  transitionDuration = 6000,
38
37
  filter,
39
- }: BackgroundSlideshowProps): ReactElement {
38
+ }: BackgroundSlideshowProps): React.JSX.Element {
40
39
  // Validate images synchronously for immediate first image render
41
40
  const validatedImages = useMemo(() => {
42
41
  return images
@@ -11,7 +11,7 @@ export interface BlurryGradientProps extends SVGProps<SVGSVGElement> {
11
11
  description?: string;
12
12
  }
13
13
 
14
- export const BlurryGradient = (props: BlurryGradientProps) => {
14
+ export const BlurryGradient = (props: BlurryGradientProps): React.JSX.Element => {
15
15
  const {
16
16
  description = 'Decorative blurry gradient',
17
17
  neutralColor,
@@ -0,0 +1,161 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Button } from './button';
3
+
4
+ const meta: Meta<typeof Button> = {
5
+ argTypes: {
6
+ children: {
7
+ control: 'text',
8
+ description: 'Button content',
9
+ },
10
+ disabled: {
11
+ control: 'boolean',
12
+ description: 'Disable the button',
13
+ },
14
+ size: {
15
+ control: 'select',
16
+ description: 'Button size',
17
+ options: ['sm', 'md', 'lg', 'xl', '2xl'],
18
+ },
19
+ variant: {
20
+ control: 'select',
21
+ description: 'Button style variant',
22
+ options: ['primary', 'secondary', 'outline', 'ghost', 'destructive'],
23
+ },
24
+ },
25
+ component: Button,
26
+ parameters: {
27
+ layout: 'centered',
28
+ },
29
+ tags: ['autodocs'],
30
+ title: 'Components/Button',
31
+ } satisfies Meta<typeof Button>;
32
+
33
+ export default meta;
34
+ type Story = StoryObj<typeof meta>;
35
+
36
+ export const Default: Story = {
37
+ args: {
38
+ children: 'Button',
39
+ },
40
+ };
41
+
42
+ export const Primary: Story = {
43
+ args: {
44
+ children: 'Primary Button',
45
+ variant: 'primary',
46
+ },
47
+ };
48
+
49
+ export const Secondary: Story = {
50
+ args: {
51
+ children: 'Secondary Button',
52
+ variant: 'secondary',
53
+ },
54
+ };
55
+
56
+ export const Outline: Story = {
57
+ args: {
58
+ children: 'Outline Button',
59
+ variant: 'outline',
60
+ },
61
+ };
62
+
63
+ export const Ghost: Story = {
64
+ args: {
65
+ children: 'Ghost Button',
66
+ variant: 'ghost',
67
+ },
68
+ };
69
+
70
+ export const Destructive: Story = {
71
+ args: {
72
+ children: 'Destructive Button',
73
+ variant: 'destructive',
74
+ },
75
+ };
76
+
77
+ export const Small: Story = {
78
+ args: {
79
+ children: 'Small Button',
80
+ size: 'sm',
81
+ },
82
+ };
83
+
84
+ export const Large: Story = {
85
+ args: {
86
+ children: 'Large Button',
87
+ size: 'lg',
88
+ },
89
+ };
90
+
91
+ export const ExtraLarge: Story = {
92
+ args: {
93
+ children: 'Extra Large Button',
94
+ size: 'xl',
95
+ },
96
+ };
97
+
98
+ export const DoubleExtraLarge: Story = {
99
+ args: {
100
+ children: '2XL Button',
101
+ size: '2xl',
102
+ },
103
+ };
104
+
105
+ export const Disabled: Story = {
106
+ args: {
107
+ children: 'Disabled Button',
108
+ disabled: true,
109
+ },
110
+ };
111
+
112
+ export const WithCustomClass: Story = {
113
+ args: {
114
+ children: 'Button with shadow',
115
+ className: 'shadow-lg',
116
+ },
117
+ };
118
+
119
+ export const AsLink: Story = {
120
+ args: {
121
+ children: 'Link Button',
122
+ nativeButton: false,
123
+ render: (props: React.ComponentProps<'a'>) => (
124
+ <a
125
+ {...props}
126
+ href="#example"
127
+ />
128
+ ),
129
+ },
130
+ };
131
+
132
+ export const AllVariants: Story = {
133
+ render: () => (
134
+ <div className="flex flex-wrap gap-4">
135
+ <Button variant="primary">Primary</Button>
136
+ <Button variant="secondary">Secondary</Button>
137
+ <Button variant="outline">Outline</Button>
138
+ <Button variant="ghost">Ghost</Button>
139
+ <Button variant="destructive">Destructive</Button>
140
+ </div>
141
+ ),
142
+ };
143
+
144
+ export const AllSizes: Story = {
145
+ render: () => (
146
+ <div className="flex flex-wrap items-center gap-4">
147
+ <Button size="sm">Small</Button>
148
+ <Button size="md">Medium</Button>
149
+ <Button size="lg">Large</Button>
150
+ <Button size="xl">Extra Large</Button>
151
+ <Button size="2xl">2XL</Button>
152
+ </div>
153
+ ),
154
+ };
155
+
156
+ export const Interactive: Story = {
157
+ args: {
158
+ children: 'Click me!',
159
+ onClick: () => alert('Button clicked!'),
160
+ },
161
+ };
@@ -0,0 +1,73 @@
1
+ import { render, screen } from '@testing-library/react';
2
+ import { describe, expect, it } from 'vitest';
3
+ import { Button } from './button';
4
+
5
+ describe('Button', () => {
6
+ it('renders children correctly', () => {
7
+ render(<Button>Click me</Button>);
8
+ expect(screen.getByRole('button', { name: 'Click me' })).toBeInTheDocument();
9
+ });
10
+
11
+ it('applies default variant and size classes', () => {
12
+ render(<Button>Default button</Button>);
13
+ const button = screen.getByRole('button', { name: 'Default button' });
14
+ expect(button).toHaveClass('bg-blue-600', 'text-white', 'px-4', 'py-2');
15
+ });
16
+
17
+ it('applies variant classes correctly', () => {
18
+ render(<Button variant="secondary">Secondary button</Button>);
19
+ const button = screen.getByRole('button', { name: 'Secondary button' });
20
+ expect(button).toHaveClass('bg-gray-100', 'text-gray-900');
21
+ });
22
+
23
+ it('applies size classes correctly', () => {
24
+ render(<Button size="lg">Large button</Button>);
25
+ const button = screen.getByRole('button', { name: 'Large button' });
26
+ expect(button).toHaveClass('px-6', 'py-3', 'text-lg');
27
+ });
28
+
29
+ it('applies custom className', () => {
30
+ render(<Button className="custom-class">Custom button</Button>);
31
+ const button = screen.getByRole('button', { name: 'Custom button' });
32
+ expect(button).toHaveClass('custom-class');
33
+ });
34
+
35
+ it('handles disabled state', () => {
36
+ render(<Button disabled>Disabled button</Button>);
37
+ const button = screen.getByRole('button', { name: 'Disabled button' });
38
+ expect(button).toBeDisabled();
39
+ expect(button).toHaveClass('disabled:opacity-50', 'disabled:cursor-not-allowed');
40
+ });
41
+
42
+ it('passes through other props', () => {
43
+ render(
44
+ <Button
45
+ aria-label="Test button"
46
+ data-testid="test-button"
47
+ >
48
+ Test
49
+ </Button>,
50
+ );
51
+ const button = screen.getByTestId('test-button');
52
+ expect(button).toHaveAttribute('aria-label', 'Test button');
53
+ });
54
+
55
+ it('renders as different element when render prop is provided', () => {
56
+ render(
57
+ <Button
58
+ nativeButton={false}
59
+ render={(props) => (
60
+ <a
61
+ {...props}
62
+ href="#test"
63
+ />
64
+ )}
65
+ >
66
+ Link button
67
+ </Button>,
68
+ );
69
+ const link = screen.getByRole('button', { name: 'Link button' });
70
+ expect(link).toHaveAttribute('href', '#test');
71
+ expect(link.tagName).toBe('A');
72
+ });
73
+ });