@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.
- package/dist/background-slideshow/index.d.mts +34 -0
- package/dist/background-slideshow/index.mjs +110 -0
- package/dist/blurry-gradient/index.d.mts +16 -0
- package/dist/blurry-gradient/index.mjs +93 -0
- package/dist/button/index.d.mts +2 -0
- package/dist/button/index.mjs +3 -0
- package/dist/button-BiSQpBbc.mjs +129 -0
- package/dist/carousel/index.d.mts +74 -0
- package/dist/carousel/index.mjs +136 -0
- package/dist/checkbox/index.d.mts +28 -0
- package/dist/checkbox/index.mjs +70 -0
- package/dist/checkbox-group/index.d.mts +16 -0
- package/dist/checkbox-group/index.mjs +29 -0
- package/dist/chunk-BTpB_u-K.mjs +18 -0
- package/dist/countdown/index.d.mts +4 -0
- package/dist/countdown/index.mjs +58 -0
- package/dist/field/index.d.mts +68 -0
- package/dist/field/index.mjs +115 -0
- package/dist/fieldset/index.d.mts +34 -0
- package/dist/fieldset/index.mjs +61 -0
- package/dist/form/index.d.mts +21 -0
- package/dist/form/index.mjs +31 -0
- package/dist/generic-error/index.d.mts +44 -0
- package/dist/generic-error/index.mjs +57 -0
- package/dist/grid/index.d.mts +101 -0
- package/dist/grid/index.mjs +219 -0
- package/dist/heading/index.d.mts +27 -0
- package/dist/heading/index.mjs +28 -0
- package/dist/highlight/index.d.mts +17 -0
- package/dist/highlight/index.mjs +35 -0
- package/dist/hooks/use-current-route-data.d.mts +8 -0
- package/dist/hooks/use-current-route-data.mjs +22 -0
- package/dist/hooks/{use-focus-search.d.ts → use-focus-search.d.mts} +4 -3
- package/dist/hooks/use-focus-search.mjs +23 -0
- package/dist/hooks/use-matches-data.d.mts +10 -0
- package/dist/hooks/use-matches-data.mjs +23 -0
- package/dist/hooks/use-media-query.d.mts +9 -0
- package/dist/hooks/use-media-query.mjs +28 -0
- package/dist/hooks/use-mobile.d.mts +4 -0
- package/dist/hooks/use-mobile.mjs +22 -0
- package/dist/hooks/use-nonce.d.mts +6 -0
- package/dist/hooks/use-nonce.mjs +13 -0
- package/dist/hooks/use-orientation.d.mts +12 -0
- package/dist/hooks/use-orientation.mjs +32 -0
- package/dist/hooks/use-user.d.mts +53 -0
- package/dist/hooks/use-user.mjs +39 -0
- package/dist/icon-button/index.d.mts +28 -0
- package/dist/icon-button/index.mjs +36 -0
- package/dist/if/index.d.mts +13 -0
- package/dist/if/index.mjs +21 -0
- package/dist/iframe/index.d.mts +11 -0
- package/dist/iframe/index.mjs +15 -0
- package/dist/index-Bj5_XfEC.d.mts +29 -0
- package/dist/index-C_evL5vG.d.mts +35 -0
- package/dist/input/index.d.mts +2 -0
- package/dist/input/index.mjs +3 -0
- package/dist/input-CtR6aRVi.mjs +73 -0
- package/dist/link/index.d.mts +71 -0
- package/dist/link/index.mjs +129 -0
- package/dist/list/index.d.mts +72 -0
- package/dist/list/index.mjs +54 -0
- package/dist/markdown-container/index.d.mts +23 -0
- package/dist/markdown-container/index.mjs +71 -0
- package/dist/password-input/index.d.mts +23 -0
- package/dist/password-input/index.mjs +92 -0
- package/dist/picture/index.d.mts +39 -0
- package/dist/picture/index.mjs +3 -0
- package/dist/picture-DkX3W5zl.mjs +69 -0
- package/dist/protected-email/index.d.mts +24 -0
- package/dist/protected-email/index.mjs +37 -0
- package/dist/radio/index.d.mts +28 -0
- package/dist/radio/index.mjs +72 -0
- package/dist/radio-group/index.d.mts +16 -0
- package/dist/radio-group/index.mjs +29 -0
- package/dist/slider/index.d.mts +63 -0
- package/dist/slider/index.mjs +133 -0
- package/dist/switch/index.d.mts +29 -0
- package/dist/switch/index.mjs +87 -0
- package/dist/text/index.d.mts +25 -0
- package/dist/text/index.mjs +32 -0
- package/dist/text-EQC4zJbE.mjs +52 -0
- package/dist/toggle/index.d.mts +25 -0
- package/dist/toggle/index.mjs +82 -0
- package/dist/utils/author/index.d.mts +4 -0
- package/dist/utils/author/index.mjs +26 -0
- package/dist/utils/text/{index.d.ts → index.d.mts} +9 -8
- package/dist/utils/text/index.mjs +3 -0
- package/package.json +131 -83
- package/src/background-slideshow/background-slideshow.tsx +1 -2
- package/src/blurry-gradient/blurry-gradient.tsx +1 -1
- package/src/button/button.stories.tsx +161 -0
- package/src/button/button.test.tsx +73 -0
- package/src/button/button.tsx +118 -0
- package/src/button/index.ts +2 -0
- package/src/carousel/carousel-content.tsx +17 -14
- package/src/carousel/carousel-item.tsx +18 -18
- package/src/carousel/carousel-next.tsx +22 -17
- package/src/carousel/carousel-previous.tsx +22 -17
- package/src/carousel/carousel-root.tsx +91 -86
- package/src/checkbox/checkbox.stories.tsx +118 -0
- package/src/checkbox/checkbox.tsx +102 -0
- package/src/checkbox/index.ts +2 -0
- package/src/checkbox-group/checkbox-group.tsx +40 -0
- package/src/checkbox-group/index.ts +2 -0
- package/src/countdown/countdown.tsx +1 -1
- package/src/field/field.stories.tsx +105 -0
- package/src/field/field.test.tsx +61 -0
- package/src/field/field.tsx +186 -0
- package/src/field/index.ts +12 -0
- package/src/fieldset/fieldset.stories.tsx +204 -0
- package/src/fieldset/fieldset.test.tsx +63 -0
- package/src/fieldset/fieldset.tsx +86 -0
- package/src/fieldset/index.ts +7 -0
- package/src/form/form.stories.tsx +230 -0
- package/src/form/form.test.tsx +68 -0
- package/src/form/form.tsx +38 -0
- package/src/form/index.ts +2 -0
- package/src/generic-error/generic-error.tsx +2 -3
- package/src/grid/grid-item.tsx +77 -36
- package/src/grid/grid-root.tsx +49 -22
- package/src/heading/heading.tsx +7 -3
- package/src/highlight/highlight.tsx +1 -1
- package/src/hooks/use-current-route-data.ts +4 -2
- package/src/hooks/use-focus-search.ts +3 -1
- package/src/hooks/use-matches-data.ts +2 -0
- package/src/hooks/use-media-query.ts +2 -0
- package/src/hooks/use-mobile.ts +3 -1
- package/src/hooks/use-nonce.ts +3 -3
- package/src/hooks/use-orientation.ts +2 -0
- package/src/hooks/use-user.tsx +3 -2
- package/src/icon-button/icon-button.stories.tsx +128 -7
- package/src/icon-button/icon-button.test.tsx +152 -0
- package/src/icon-button/icon-button.tsx +43 -9
- package/src/if/if.tsx +3 -1
- package/src/input/index.ts +2 -0
- package/src/input/input.stories.tsx +151 -0
- package/src/input/input.test.tsx +65 -0
- package/src/input/input.tsx +113 -0
- package/src/link/link.tsx +4 -3
- package/src/list/list-item.tsx +10 -13
- package/src/list/list-root-context.ts +3 -3
- package/src/list/list-root.tsx +10 -13
- package/src/password-input/index.ts +1 -1
- package/src/password-input/password-input.tsx +104 -27
- package/src/protected-email/protected-email.tsx +6 -1
- package/src/radio/index.ts +2 -0
- package/src/radio/radio.tsx +103 -0
- package/src/radio-group/index.ts +2 -0
- package/src/radio-group/radio-group.tsx +40 -0
- package/src/slider/index.ts +18 -0
- package/src/slider/slider.tsx +201 -0
- package/src/switch/index.ts +2 -0
- package/src/switch/switch.stories.tsx +118 -0
- package/src/switch/switch.tsx +112 -0
- package/src/text/text.tsx +6 -1
- package/src/toggle/index.ts +2 -0
- package/src/toggle/toggle.stories.tsx +232 -0
- package/src/toggle/toggle.test.tsx +149 -0
- package/src/toggle/toggle.tsx +88 -0
- package/src/utils/text/text.tsx +8 -16
- package/dist/background-slideshow/index.d.ts +0 -24
- package/dist/background-slideshow/index.js +0 -165
- package/dist/blurry-gradient/index.d.ts +0 -16
- package/dist/blurry-gradient/index.js +0 -128
- package/dist/carousel/index.d.ts +0 -36
- package/dist/carousel/index.js +0 -171
- package/dist/countdown/index.d.ts +0 -5
- package/dist/countdown/index.js +0 -73
- package/dist/generic-error/index.d.ts +0 -43
- package/dist/generic-error/index.js +0 -47
- package/dist/grid/index.d.ts +0 -1196
- package/dist/grid/index.js +0 -239
- package/dist/heading/index.d.ts +0 -24
- package/dist/heading/index.js +0 -99
- package/dist/highlight/index.d.ts +0 -13
- package/dist/highlight/index.js +0 -59
- package/dist/hooks/use-current-route-data.d.ts +0 -7
- package/dist/hooks/use-current-route-data.js +0 -16
- package/dist/hooks/use-focus-search.js +0 -19
- package/dist/hooks/use-matches-data.d.ts +0 -9
- package/dist/hooks/use-matches-data.js +0 -15
- package/dist/hooks/use-media-query.d.ts +0 -8
- package/dist/hooks/use-media-query.js +0 -20
- package/dist/hooks/use-mobile.d.ts +0 -3
- package/dist/hooks/use-mobile.js +0 -19
- package/dist/hooks/use-nonce.d.ts +0 -7
- package/dist/hooks/use-nonce.js +0 -8
- package/dist/hooks/use-orientation.d.ts +0 -11
- package/dist/hooks/use-orientation.js +0 -29
- package/dist/hooks/use-user.d.ts +0 -50
- package/dist/hooks/use-user.js +0 -25
- package/dist/icon-button/index.d.ts +0 -9
- package/dist/icon-button/index.js +0 -17
- package/dist/if/index.d.ts +0 -10
- package/dist/if/index.js +0 -24
- package/dist/iframe/index.d.ts +0 -10
- package/dist/iframe/index.js +0 -17
- package/dist/link/index.d.ts +0 -55
- package/dist/link/index.js +0 -195
- package/dist/list/index.d.ts +0 -69
- package/dist/list/index.js +0 -65
- package/dist/markdown-container/index.d.ts +0 -22
- package/dist/markdown-container/index.js +0 -128
- package/dist/password-input/index.d.ts +0 -11
- package/dist/password-input/index.js +0 -46
- package/dist/picture/index.d.ts +0 -38
- package/dist/picture/index.js +0 -68
- package/dist/protected-email/index.d.ts +0 -20
- package/dist/protected-email/index.js +0 -30
- package/dist/text/index.d.ts +0 -20
- package/dist/text/index.js +0 -38
- package/dist/utils/author/index.d.ts +0 -3
- package/dist/utils/author/index.js +0 -33
- 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.
|
|
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.
|
|
31
|
-
"import": "./dist/background-slideshow/index.
|
|
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.
|
|
35
|
-
"import": "./dist/blurry-gradient/index.
|
|
35
|
+
"types": "./dist/blurry-gradient/index.d.mts",
|
|
36
|
+
"import": "./dist/blurry-gradient/index.mjs"
|
|
36
37
|
},
|
|
37
|
-
"./
|
|
38
|
-
"types": "./dist/
|
|
39
|
-
"import": "./dist/
|
|
38
|
+
"./button": {
|
|
39
|
+
"types": "./dist/button/index.d.mts",
|
|
40
|
+
"import": "./dist/button/index.mjs"
|
|
40
41
|
},
|
|
41
|
-
"./
|
|
42
|
-
"types": "./dist/
|
|
43
|
-
"import": "./dist/
|
|
42
|
+
"./carousel": {
|
|
43
|
+
"types": "./dist/carousel/index.d.mts",
|
|
44
|
+
"import": "./dist/carousel/index.mjs"
|
|
44
45
|
},
|
|
45
|
-
"./
|
|
46
|
-
"types": "./dist/
|
|
47
|
-
"import": "./dist/
|
|
46
|
+
"./checkbox": {
|
|
47
|
+
"types": "./dist/checkbox/index.d.mts",
|
|
48
|
+
"import": "./dist/checkbox/index.mjs"
|
|
48
49
|
},
|
|
49
|
-
"./
|
|
50
|
-
"types": "./dist/
|
|
51
|
-
"import": "./dist/
|
|
50
|
+
"./checkbox-group": {
|
|
51
|
+
"types": "./dist/checkbox-group/index.d.mts",
|
|
52
|
+
"import": "./dist/checkbox-group/index.mjs"
|
|
52
53
|
},
|
|
53
|
-
"./
|
|
54
|
-
"types": "./dist/
|
|
55
|
-
"import": "./dist/
|
|
54
|
+
"./countdown": {
|
|
55
|
+
"types": "./dist/countdown/index.d.mts",
|
|
56
|
+
"import": "./dist/countdown/index.mjs"
|
|
56
57
|
},
|
|
57
|
-
"./
|
|
58
|
-
"types": "./dist/
|
|
59
|
-
"import": "./dist/
|
|
58
|
+
"./field": {
|
|
59
|
+
"types": "./dist/field/index.d.mts",
|
|
60
|
+
"import": "./dist/field/index.mjs"
|
|
60
61
|
},
|
|
61
|
-
"./
|
|
62
|
-
"types": "./dist/
|
|
63
|
-
"import": "./dist/
|
|
62
|
+
"./fieldset": {
|
|
63
|
+
"types": "./dist/fieldset/index.d.mts",
|
|
64
|
+
"import": "./dist/fieldset/index.mjs"
|
|
64
65
|
},
|
|
65
|
-
"./
|
|
66
|
-
"types": "./dist/
|
|
67
|
-
"import": "./dist/
|
|
66
|
+
"./form": {
|
|
67
|
+
"types": "./dist/form/index.d.mts",
|
|
68
|
+
"import": "./dist/form/index.mjs"
|
|
68
69
|
},
|
|
69
|
-
"./
|
|
70
|
-
"types": "./dist/
|
|
71
|
-
"import": "./dist/
|
|
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
|
-
"./
|
|
82
|
-
"types": "./dist/
|
|
83
|
-
"import": "./dist/
|
|
74
|
+
"./grid": {
|
|
75
|
+
"types": "./dist/grid/index.d.mts",
|
|
76
|
+
"import": "./dist/grid/index.mjs"
|
|
84
77
|
},
|
|
85
|
-
"./
|
|
86
|
-
"types": "./dist/
|
|
87
|
-
"import": "./dist/
|
|
78
|
+
"./heading": {
|
|
79
|
+
"types": "./dist/heading/index.d.mts",
|
|
80
|
+
"import": "./dist/heading/index.mjs"
|
|
88
81
|
},
|
|
89
|
-
"./
|
|
90
|
-
"types": "./dist/
|
|
91
|
-
"import": "./dist/
|
|
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.
|
|
95
|
-
"import": "./dist/icon-button/index.
|
|
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.
|
|
99
|
-
"import": "./dist/if/index.
|
|
91
|
+
"types": "./dist/if/index.d.mts",
|
|
92
|
+
"import": "./dist/if/index.mjs"
|
|
100
93
|
},
|
|
101
94
|
"./iframe": {
|
|
102
|
-
"types": "./dist/iframe/index.d.
|
|
103
|
-
"import": "./dist/iframe/index.
|
|
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.
|
|
107
|
-
"import": "./dist/link/index.
|
|
103
|
+
"types": "./dist/link/index.d.mts",
|
|
104
|
+
"import": "./dist/link/index.mjs"
|
|
108
105
|
},
|
|
109
106
|
"./list": {
|
|
110
|
-
"types": "./dist/list/index.d.
|
|
111
|
-
"import": "./dist/list/index.
|
|
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.
|
|
115
|
-
"import": "./dist/markdown-container/index.
|
|
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.
|
|
119
|
-
"import": "./dist/password-input/index.
|
|
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.
|
|
123
|
-
"import": "./dist/picture/index.
|
|
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.
|
|
127
|
-
"import": "./dist/protected-email/index.
|
|
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.
|
|
132
|
-
"import": "./dist/text/index.
|
|
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.
|
|
136
|
-
"import": "./dist/utils/author/index.
|
|
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.
|
|
140
|
-
"import": "./dist/utils/text/index.
|
|
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": "
|
|
196
|
+
"build": "tsdown && pnpm fix",
|
|
149
197
|
"clean": "exec-clean .turbo dist",
|
|
150
|
-
"dev": "
|
|
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.
|
|
220
|
+
"@maptiler/sdk": "3.10.0",
|
|
173
221
|
"@mdx-js/react": "3.1.1",
|
|
174
|
-
"@regardio/js": "0.
|
|
175
|
-
"@regardio/tailwind": "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.
|
|
189
|
-
"react-resizable-panels": "4.4.
|
|
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.
|
|
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
|
-
"
|
|
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):
|
|
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
|
+
});
|