@regardio/react 0.4.7 → 0.5.1
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/LICENSE +1 -1
- package/README.md +5 -5
- package/dist/{components/background-slideshow.js → background-slideshow/index.js} +2 -11
- package/dist/{components/blurry-gradient.js → blurry-gradient/index.js} +15 -9
- package/dist/{components/carousel.d.ts → carousel/index.d.ts} +17 -9
- package/dist/{components/carousel.js → carousel/index.js} +34 -30
- package/dist/{components/countdown.js → countdown/index.js} +2 -11
- package/dist/{components/generic-error.js → generic-error/index.js} +1 -1
- package/dist/grid/index.d.ts +1196 -0
- package/dist/grid/index.js +239 -0
- package/dist/heading/index.d.ts +24 -0
- package/dist/{components/heading.js → heading/index.js} +15 -34
- package/dist/highlight/index.d.ts +13 -0
- package/dist/{components/highlight.js → highlight/index.js} +9 -17
- package/dist/hooks/{use-current-route-data.js → use-current-route-data/index.js} +1 -1
- package/dist/hooks/{use-focus-search.js → use-focus-search/index.js} +1 -1
- package/dist/hooks/{use-matches-data.js → use-matches-data/index.js} +1 -1
- package/dist/hooks/{use-media-query.js → use-media-query/index.js} +1 -1
- package/dist/hooks/{use-mobile.js → use-mobile/index.js} +1 -1
- package/dist/hooks/use-nonce/index.d.ts +6 -0
- package/dist/hooks/use-nonce/index.js +8 -0
- package/dist/hooks/{use-orientation.d.ts → use-orientation/index.d.ts} +1 -1
- package/dist/hooks/{use-orientation.js → use-orientation/index.js} +1 -1
- package/dist/hooks/{use-user.js → use-user/index.js} +1 -1
- package/dist/{components/icon-button.js → icon-button/index.js} +1 -1
- package/dist/{components/if.js → if/index.js} +1 -1
- package/dist/{components/iframe.js → iframe/index.js} +2 -11
- package/dist/{components/link.d.ts → link/index.d.ts} +19 -13
- package/dist/{components/link.js → link/index.js} +31 -36
- package/dist/list/index.d.ts +69 -0
- package/dist/list/index.js +65 -0
- package/dist/{components/markdown-container.js → markdown-container/index.js} +3 -67
- package/dist/{components/password-input.js → password-input/index.js} +2 -11
- package/dist/{components/picture.js → picture/index.js} +2 -11
- package/dist/{components/protected-email.d.ts → protected-email/index.d.ts} +1 -1
- package/dist/{components/protected-email.js → protected-email/index.js} +1 -1
- package/dist/text/index.d.ts +20 -0
- package/dist/text/index.js +38 -0
- package/dist/utils/author/index.d.ts +3 -0
- package/dist/utils/author/index.js +33 -0
- package/dist/utils/text/index.d.ts +15 -0
- package/dist/utils/text/index.js +73 -0
- package/package.json +92 -121
- package/src/{stories/BackgroundSlideshow.stories.tsx → background-slideshow/background-slideshow.stories.tsx} +1 -1
- package/src/{components → background-slideshow}/background-slideshow.tsx +3 -1
- package/src/background-slideshow/index.ts +2 -0
- package/src/{stories/BlurryGradient.stories.tsx → blurry-gradient/blurry-gradient.stories.tsx} +1 -1
- package/src/{components → blurry-gradient}/blurry-gradient.tsx +14 -8
- package/src/blurry-gradient/index.ts +2 -0
- package/src/carousel/carousel-content.tsx +16 -0
- package/src/carousel/carousel-item.tsx +23 -0
- package/src/carousel/carousel-next.tsx +22 -0
- package/src/carousel/carousel-previous.tsx +22 -0
- package/src/{components/carousel.tsx → carousel/carousel-root.tsx} +8 -78
- package/src/carousel/carousel.stories.tsx +89 -0
- package/src/carousel/index.parts.ts +5 -0
- package/src/carousel/index.ts +4 -0
- package/src/{stories/Countdown.stories.tsx → countdown/countdown.stories.tsx} +1 -1
- package/src/{components → countdown}/countdown.tsx +3 -7
- package/src/countdown/index.ts +1 -0
- package/src/{stories/GenericError.stories.tsx → generic-error/generic-error.stories.tsx} +1 -1
- package/src/{components → generic-error}/generic-error.tsx +2 -0
- package/src/generic-error/index.ts +2 -0
- package/src/grid/grid-item.tsx +188 -0
- package/src/grid/grid-root.tsx +72 -0
- package/src/grid/grid.stories.tsx +236 -0
- package/src/grid/index.parts.ts +2 -0
- package/src/grid/index.ts +5 -0
- package/src/{stories/Heading.stories.tsx → heading/heading.stories.tsx} +1 -1
- package/src/{components → heading}/heading.tsx +17 -25
- package/src/heading/index.ts +2 -0
- package/src/{stories/Highlight.stories.tsx → highlight/highlight.stories.tsx} +1 -1
- package/src/{components → highlight}/highlight.tsx +13 -9
- package/src/highlight/index.ts +2 -0
- package/src/hooks/use-current-route-data/index.ts +1 -0
- package/src/hooks/use-focus-search/index.ts +1 -0
- package/src/hooks/use-matches-data/index.ts +1 -0
- package/src/hooks/use-media-query/index.ts +1 -0
- package/src/hooks/use-mobile/index.ts +1 -0
- package/src/hooks/use-nonce/index.ts +1 -0
- package/src/hooks/use-orientation/index.ts +1 -0
- package/src/hooks/use-user/index.ts +2 -0
- package/src/{stories/IconButton.stories.tsx → icon-button/icon-button.stories.tsx} +1 -1
- package/src/icon-button/index.ts +2 -0
- package/src/{stories/If.stories.tsx → if/if.stories.tsx} +1 -1
- package/src/if/index.ts +1 -0
- package/src/{stories/Iframe.stories.tsx → iframe/iframe.stories.tsx} +1 -1
- package/src/{components → iframe}/iframe.tsx +1 -1
- package/src/iframe/index.ts +2 -0
- package/src/link/index.ts +2 -0
- package/src/{stories/Link.stories.tsx → link/link.stories.tsx} +1 -1
- package/src/{components → link}/link.tsx +39 -28
- package/src/list/index.parts.ts +2 -0
- package/src/list/index.ts +4 -0
- package/src/list/list-item.tsx +63 -0
- package/src/list/list-root-context.ts +21 -0
- package/src/list/list-root.tsx +81 -0
- package/src/list/list.css +32 -0
- package/src/list/list.stories.tsx +119 -0
- package/src/list/list.test.tsx +168 -0
- package/src/markdown-container/index.ts +2 -0
- package/src/{stories/MarkdownContainer.stories.tsx → markdown-container/markdown-container.stories.tsx} +1 -1
- package/src/{components → markdown-container}/markdown-container.tsx +3 -1
- package/src/password-input/index.ts +2 -0
- package/src/{stories/PasswordInput.stories.tsx → password-input/password-input.stories.tsx} +1 -1
- package/src/{components → password-input}/password-input.tsx +4 -4
- package/src/picture/index.ts +2 -0
- package/src/{stories/Picture.stories.tsx → picture/picture.stories.tsx} +1 -1
- package/src/{components → picture}/picture.tsx +2 -4
- package/src/protected-email/index.ts +2 -0
- package/src/{stories/ProtectedEmail.stories.tsx → protected-email/protected-email.stories.tsx} +1 -1
- package/src/{components → protected-email}/protected-email.tsx +3 -1
- package/src/tailwind.css +10 -0
- package/src/text/index.ts +2 -0
- package/src/{stories/Text.stories.tsx → text/text.stories.tsx} +1 -1
- package/src/text/text.tsx +46 -0
- package/src/utils/author/author.tsx +36 -0
- package/src/utils/author/index.ts +1 -0
- package/src/utils/text/index.ts +1 -0
- package/src/utils/text/text.tsx +103 -0
- package/dist/components/box.d.ts +0 -20
- package/dist/components/box.js +0 -50
- package/dist/components/definition-list.d.ts +0 -43
- package/dist/components/definition-list.js +0 -89
- package/dist/components/heading.d.ts +0 -27
- package/dist/components/highlight.d.ts +0 -19
- package/dist/components/item.d.ts +0 -70
- package/dist/components/item.js +0 -512
- package/dist/components/leaflet-map.d.ts +0 -34
- package/dist/components/leaflet-map.js +0 -201
- package/dist/components/list-item.d.ts +0 -19
- package/dist/components/list-item.js +0 -37
- package/dist/components/maptiler-map.d.ts +0 -27
- package/dist/components/maptiler-map.js +0 -129
- package/dist/components/text.d.ts +0 -20
- package/dist/components/text.js +0 -45
- package/dist/components/unordered-list.d.ts +0 -19
- package/dist/components/unordered-list.js +0 -39
- package/dist/hooks/use-nonce.d.ts +0 -12
- package/dist/hooks/use-nonce.js +0 -13
- package/dist/utils/author.d.ts +0 -9
- package/dist/utils/author.js +0 -55
- package/dist/utils/cn.d.ts +0 -9
- package/dist/utils/cn.js +0 -14
- package/dist/utils/is-route-active.d.ts +0 -19
- package/dist/utils/is-route-active.js +0 -56
- package/dist/utils/text.d.ts +0 -24
- package/dist/utils/text.js +0 -127
- package/src/components/box.tsx +0 -45
- package/src/components/definition-list.tsx +0 -90
- package/src/components/item.tsx +0 -340
- package/src/components/leaflet-map.tsx +0 -294
- package/src/components/link.test.tsx +0 -387
- package/src/components/list-item.tsx +0 -30
- package/src/components/maptiler-map.tsx +0 -181
- package/src/components/text.tsx +0 -38
- package/src/components/unordered-list.tsx +0 -32
- package/src/hooks/use-nonce.test.ts +0 -35
- package/src/stories/Box.stories.tsx +0 -83
- package/src/stories/Carousel.stories.tsx +0 -95
- package/src/stories/DefinitionList.stories.tsx +0 -51
- package/src/stories/Item.stories.tsx +0 -79
- package/src/stories/ListItem.stories.tsx +0 -38
- package/src/stories/UnorderedList.stories.tsx +0 -73
- package/src/styles/tailwind.css +0 -7
- package/src/test-setup.ts +0 -1
- package/src/utils/author.test.ts +0 -54
- package/src/utils/author.tsx +0 -73
- package/src/utils/cn.test.ts +0 -48
- package/src/utils/cn.ts +0 -14
- package/src/utils/is-route-active.test.ts +0 -80
- package/src/utils/is-route-active.ts +0 -100
- package/src/utils/text.test.ts +0 -152
- package/src/utils/text.tsx +0 -209
- package/src/vite-env.d.ts +0 -1
- /package/dist/{components/background-slideshow.d.ts → background-slideshow/index.d.ts} +0 -0
- /package/dist/{components/blurry-gradient.d.ts → blurry-gradient/index.d.ts} +0 -0
- /package/dist/{components/countdown.d.ts → countdown/index.d.ts} +0 -0
- /package/dist/{components/generic-error.d.ts → generic-error/index.d.ts} +0 -0
- /package/dist/hooks/{use-current-route-data.d.ts → use-current-route-data/index.d.ts} +0 -0
- /package/dist/hooks/{use-focus-search.d.ts → use-focus-search/index.d.ts} +0 -0
- /package/dist/hooks/{use-matches-data.d.ts → use-matches-data/index.d.ts} +0 -0
- /package/dist/hooks/{use-media-query.d.ts → use-media-query/index.d.ts} +0 -0
- /package/dist/hooks/{use-mobile.d.ts → use-mobile/index.d.ts} +0 -0
- /package/dist/hooks/{use-user.d.ts → use-user/index.d.ts} +0 -0
- /package/dist/{components/icon-button.d.ts → icon-button/index.d.ts} +0 -0
- /package/dist/{components/if.d.ts → if/index.d.ts} +0 -0
- /package/dist/{components/iframe.d.ts → iframe/index.d.ts} +0 -0
- /package/dist/{components/markdown-container.d.ts → markdown-container/index.d.ts} +0 -0
- /package/dist/{components/password-input.d.ts → password-input/index.d.ts} +0 -0
- /package/dist/{components/picture.d.ts → picture/index.d.ts} +0 -0
- /package/src/hooks/{use-current-route-data.ts → use-current-route-data/use-current-route-data.ts} +0 -0
- /package/src/hooks/{use-focus-search.ts → use-focus-search/use-focus-search.ts} +0 -0
- /package/src/hooks/{use-matches-data.ts → use-matches-data/use-matches-data.ts} +0 -0
- /package/src/hooks/{use-media-query.ts → use-media-query/use-media-query.ts} +0 -0
- /package/src/hooks/{use-mobile.ts → use-mobile/use-mobile.ts} +0 -0
- /package/src/hooks/{use-nonce.ts → use-nonce/use-nonce.ts} +0 -0
- /package/src/hooks/{use-orientation.ts → use-orientation/use-orientation.ts} +0 -0
- /package/src/hooks/{use-user.tsx → use-user/use-user.tsx} +0 -0
- /package/src/{components → icon-button}/icon-button.tsx +0 -0
- /package/src/{components → if}/if.tsx +0 -0
- /package/src/{styles/storybook.css → storybook.css} +0 -0
package/package.json
CHANGED
|
@@ -9,13 +9,12 @@
|
|
|
9
9
|
"@maptiler/leaflet-maptilersdk": "4.1.1",
|
|
10
10
|
"@maptiler/sdk": "3.9.0",
|
|
11
11
|
"@mdx-js/react": "3.1.1",
|
|
12
|
-
"@regardio/js": "0.
|
|
13
|
-
"@
|
|
12
|
+
"@regardio/js": "0.5.0",
|
|
13
|
+
"@regardio/tailwind": "0.1.2",
|
|
14
|
+
"@supabase/supabase-js": "2.90.0",
|
|
14
15
|
"cmdk": "1.1.1",
|
|
15
|
-
"cva": "beta",
|
|
16
16
|
"embla-carousel": "8.6.0",
|
|
17
17
|
"embla-carousel-react": "8.6.0",
|
|
18
|
-
"fluid-tailwindcss": "1.0.5",
|
|
19
18
|
"input-otp": "1.4.2",
|
|
20
19
|
"intl-parse-accept-language": "1.0.0",
|
|
21
20
|
"leaflet": "alpha",
|
|
@@ -25,15 +24,15 @@
|
|
|
25
24
|
"react-day-picker": "9.13.0",
|
|
26
25
|
"react-dom": "19.2.3",
|
|
27
26
|
"react-hook-form": "7.70.0",
|
|
28
|
-
"react-resizable-panels": "4.
|
|
27
|
+
"react-resizable-panels": "4.3.0",
|
|
29
28
|
"react-router": "7.11.0",
|
|
30
|
-
"tailwind-
|
|
29
|
+
"tailwind-variants": "3.2.2",
|
|
31
30
|
"vaul": "1.1.2",
|
|
32
31
|
"zod": "4.3.5"
|
|
33
32
|
},
|
|
34
33
|
"description": "Regardio React UI components",
|
|
35
34
|
"devDependencies": {
|
|
36
|
-
"@regardio/dev": "1.10.
|
|
35
|
+
"@regardio/dev": "1.10.3",
|
|
37
36
|
"@storybook/addon-a11y": "10.1.11",
|
|
38
37
|
"@storybook/addon-docs": "10.1.11",
|
|
39
38
|
"@storybook/addon-vitest": "10.1.11",
|
|
@@ -56,153 +55,125 @@
|
|
|
56
55
|
"tailwindcss": "4.1.18",
|
|
57
56
|
"tsup": "8.5.1",
|
|
58
57
|
"typescript": "5.9.3",
|
|
59
|
-
"vite": "7.3.
|
|
58
|
+
"vite": "7.3.1",
|
|
60
59
|
"vitest": "4.0.16"
|
|
61
60
|
},
|
|
62
61
|
"engines": {
|
|
63
62
|
"node": ">=18"
|
|
64
63
|
},
|
|
65
64
|
"exports": {
|
|
66
|
-
"./
|
|
67
|
-
"import": "./dist/
|
|
68
|
-
"types": "./dist/
|
|
65
|
+
"./background-slideshow": {
|
|
66
|
+
"import": "./dist/background-slideshow/index.js",
|
|
67
|
+
"types": "./dist/background-slideshow/index.d.ts"
|
|
69
68
|
},
|
|
70
|
-
"./
|
|
71
|
-
"import": "./dist/
|
|
72
|
-
"types": "./dist/
|
|
69
|
+
"./blurry-gradient": {
|
|
70
|
+
"import": "./dist/blurry-gradient/index.js",
|
|
71
|
+
"types": "./dist/blurry-gradient/index.d.ts"
|
|
73
72
|
},
|
|
74
|
-
"./
|
|
75
|
-
"import": "./dist/
|
|
76
|
-
"types": "./dist/
|
|
73
|
+
"./carousel": {
|
|
74
|
+
"import": "./dist/carousel/index.js",
|
|
75
|
+
"types": "./dist/carousel/index.d.ts"
|
|
77
76
|
},
|
|
78
|
-
"./
|
|
79
|
-
"import": "./dist/
|
|
80
|
-
"types": "./dist/
|
|
77
|
+
"./countdown": {
|
|
78
|
+
"import": "./dist/countdown/index.js",
|
|
79
|
+
"types": "./dist/countdown/index.d.ts"
|
|
81
80
|
},
|
|
82
|
-
"./
|
|
83
|
-
"import": "./dist/
|
|
84
|
-
"types": "./dist/
|
|
81
|
+
"./generic-error": {
|
|
82
|
+
"import": "./dist/generic-error/index.js",
|
|
83
|
+
"types": "./dist/generic-error/index.d.ts"
|
|
85
84
|
},
|
|
86
|
-
"./
|
|
87
|
-
"import": "./dist/
|
|
88
|
-
"types": "./dist/
|
|
85
|
+
"./grid": {
|
|
86
|
+
"import": "./dist/grid/index.js",
|
|
87
|
+
"types": "./dist/grid/index.d.ts"
|
|
89
88
|
},
|
|
90
|
-
"./
|
|
91
|
-
"import": "./dist/
|
|
92
|
-
"types": "./dist/
|
|
89
|
+
"./heading": {
|
|
90
|
+
"import": "./dist/heading/index.js",
|
|
91
|
+
"types": "./dist/heading/index.d.ts"
|
|
93
92
|
},
|
|
94
|
-
"./
|
|
95
|
-
"import": "./dist/
|
|
96
|
-
"types": "./dist/
|
|
93
|
+
"./highlight": {
|
|
94
|
+
"import": "./dist/highlight/index.js",
|
|
95
|
+
"types": "./dist/highlight/index.d.ts"
|
|
97
96
|
},
|
|
98
|
-
"./
|
|
99
|
-
"import": "./dist/
|
|
100
|
-
"types": "./dist/
|
|
101
|
-
},
|
|
102
|
-
"./components/icon-button": {
|
|
103
|
-
"import": "./dist/components/icon-button.js",
|
|
104
|
-
"types": "./dist/components/icon-button.d.ts"
|
|
105
|
-
},
|
|
106
|
-
"./components/if": {
|
|
107
|
-
"import": "./dist/components/if.js",
|
|
108
|
-
"types": "./dist/components/if.d.ts"
|
|
109
|
-
},
|
|
110
|
-
"./components/iframe": {
|
|
111
|
-
"import": "./dist/components/iframe.js",
|
|
112
|
-
"types": "./dist/components/iframe.d.ts"
|
|
113
|
-
},
|
|
114
|
-
"./components/item": {
|
|
115
|
-
"import": "./dist/components/item.js",
|
|
116
|
-
"types": "./dist/components/item.d.ts"
|
|
117
|
-
},
|
|
118
|
-
"./components/leaflet-map": {
|
|
119
|
-
"import": "./dist/components/leaflet-map.js",
|
|
120
|
-
"types": "./dist/components/leaflet-map.d.ts"
|
|
97
|
+
"./hooks/use-current-route-data": {
|
|
98
|
+
"import": "./dist/hooks/use-current-route-data/index.js",
|
|
99
|
+
"types": "./dist/hooks/use-current-route-data/index.d.ts"
|
|
121
100
|
},
|
|
122
|
-
"./
|
|
123
|
-
"import": "./dist/
|
|
124
|
-
"types": "./dist/
|
|
101
|
+
"./hooks/use-focus-search": {
|
|
102
|
+
"import": "./dist/hooks/use-focus-search/index.js",
|
|
103
|
+
"types": "./dist/hooks/use-focus-search/index.d.ts"
|
|
125
104
|
},
|
|
126
|
-
"./
|
|
127
|
-
"import": "./dist/
|
|
128
|
-
"types": "./dist/
|
|
105
|
+
"./hooks/use-matches-data": {
|
|
106
|
+
"import": "./dist/hooks/use-matches-data/index.js",
|
|
107
|
+
"types": "./dist/hooks/use-matches-data/index.d.ts"
|
|
129
108
|
},
|
|
130
|
-
"./
|
|
131
|
-
"import": "./dist/
|
|
132
|
-
"types": "./dist/
|
|
109
|
+
"./hooks/use-media-query": {
|
|
110
|
+
"import": "./dist/hooks/use-media-query/index.js",
|
|
111
|
+
"types": "./dist/hooks/use-media-query/index.d.ts"
|
|
133
112
|
},
|
|
134
|
-
"./
|
|
135
|
-
"import": "./dist/
|
|
136
|
-
"types": "./dist/
|
|
113
|
+
"./hooks/use-mobile": {
|
|
114
|
+
"import": "./dist/hooks/use-mobile/index.js",
|
|
115
|
+
"types": "./dist/hooks/use-mobile/index.d.ts"
|
|
137
116
|
},
|
|
138
|
-
"./
|
|
139
|
-
"import": "./dist/
|
|
140
|
-
"types": "./dist/
|
|
117
|
+
"./hooks/use-nonce": {
|
|
118
|
+
"import": "./dist/hooks/use-nonce/index.js",
|
|
119
|
+
"types": "./dist/hooks/use-nonce/index.d.ts"
|
|
141
120
|
},
|
|
142
|
-
"./
|
|
143
|
-
"import": "./dist/
|
|
144
|
-
"types": "./dist/
|
|
121
|
+
"./hooks/use-orientation": {
|
|
122
|
+
"import": "./dist/hooks/use-orientation/index.js",
|
|
123
|
+
"types": "./dist/hooks/use-orientation/index.d.ts"
|
|
145
124
|
},
|
|
146
|
-
"./
|
|
147
|
-
"import": "./dist/
|
|
148
|
-
"types": "./dist/
|
|
125
|
+
"./hooks/use-user": {
|
|
126
|
+
"import": "./dist/hooks/use-user/index.js",
|
|
127
|
+
"types": "./dist/hooks/use-user/index.d.ts"
|
|
149
128
|
},
|
|
150
|
-
"./
|
|
151
|
-
"import": "./dist/
|
|
152
|
-
"types": "./dist/
|
|
129
|
+
"./icon-button": {
|
|
130
|
+
"import": "./dist/icon-button/index.js",
|
|
131
|
+
"types": "./dist/icon-button/index.d.ts"
|
|
153
132
|
},
|
|
154
|
-
"./
|
|
155
|
-
"import": "./dist/
|
|
156
|
-
"types": "./dist/
|
|
133
|
+
"./if": {
|
|
134
|
+
"import": "./dist/if/index.js",
|
|
135
|
+
"types": "./dist/if/index.d.ts"
|
|
157
136
|
},
|
|
158
|
-
"./
|
|
159
|
-
"import": "./dist/
|
|
160
|
-
"types": "./dist/
|
|
137
|
+
"./iframe": {
|
|
138
|
+
"import": "./dist/iframe/index.js",
|
|
139
|
+
"types": "./dist/iframe/index.d.ts"
|
|
161
140
|
},
|
|
162
|
-
"./
|
|
163
|
-
"import": "./dist/
|
|
164
|
-
"types": "./dist/
|
|
141
|
+
"./link": {
|
|
142
|
+
"import": "./dist/link/index.js",
|
|
143
|
+
"types": "./dist/link/index.d.ts"
|
|
165
144
|
},
|
|
166
|
-
"./
|
|
167
|
-
"import": "./dist/
|
|
168
|
-
"types": "./dist/
|
|
145
|
+
"./list": {
|
|
146
|
+
"import": "./dist/list/index.js",
|
|
147
|
+
"types": "./dist/list/index.d.ts"
|
|
169
148
|
},
|
|
170
|
-
"./
|
|
171
|
-
"import": "./dist/
|
|
172
|
-
"types": "./dist/
|
|
149
|
+
"./markdown-container": {
|
|
150
|
+
"import": "./dist/markdown-container/index.js",
|
|
151
|
+
"types": "./dist/markdown-container/index.d.ts"
|
|
173
152
|
},
|
|
174
|
-
"./
|
|
175
|
-
"import": "./dist/
|
|
176
|
-
"types": "./dist/
|
|
153
|
+
"./password-input": {
|
|
154
|
+
"import": "./dist/password-input/index.js",
|
|
155
|
+
"types": "./dist/password-input/index.d.ts"
|
|
177
156
|
},
|
|
178
|
-
"./
|
|
179
|
-
"import": "./dist/
|
|
180
|
-
"types": "./dist/
|
|
157
|
+
"./picture": {
|
|
158
|
+
"import": "./dist/picture/index.js",
|
|
159
|
+
"types": "./dist/picture/index.d.ts"
|
|
181
160
|
},
|
|
182
|
-
"./
|
|
183
|
-
"import": "./dist/
|
|
184
|
-
"types": "./dist/
|
|
161
|
+
"./protected-email": {
|
|
162
|
+
"import": "./dist/protected-email/index.js",
|
|
163
|
+
"types": "./dist/protected-email/index.d.ts"
|
|
185
164
|
},
|
|
186
|
-
"./
|
|
187
|
-
|
|
188
|
-
"
|
|
165
|
+
"./tailwind.css": "./src/tailwind.css",
|
|
166
|
+
"./text": {
|
|
167
|
+
"import": "./dist/text/index.js",
|
|
168
|
+
"types": "./dist/text/index.d.ts"
|
|
189
169
|
},
|
|
190
|
-
"./tailwind.css": "./src/styles/tailwind.css",
|
|
191
170
|
"./utils/author": {
|
|
192
|
-
"import": "./dist/utils/author.js",
|
|
193
|
-
"types": "./dist/utils/author.d.ts"
|
|
194
|
-
},
|
|
195
|
-
"./utils/cn": {
|
|
196
|
-
"import": "./dist/utils/cn.js",
|
|
197
|
-
"types": "./dist/utils/cn.d.ts"
|
|
198
|
-
},
|
|
199
|
-
"./utils/is-route-active": {
|
|
200
|
-
"import": "./dist/utils/is-route-active.js",
|
|
201
|
-
"types": "./dist/utils/is-route-active.d.ts"
|
|
171
|
+
"import": "./dist/utils/author/index.js",
|
|
172
|
+
"types": "./dist/utils/author/index.d.ts"
|
|
202
173
|
},
|
|
203
174
|
"./utils/text": {
|
|
204
|
-
"import": "./dist/utils/text.js",
|
|
205
|
-
"types": "./dist/utils/text.d.ts"
|
|
175
|
+
"import": "./dist/utils/text/index.js",
|
|
176
|
+
"types": "./dist/utils/text/index.d.ts"
|
|
206
177
|
}
|
|
207
178
|
},
|
|
208
179
|
"files": ["dist", "src"],
|
|
@@ -239,7 +210,7 @@
|
|
|
239
210
|
"typecheck": "exec-tsc --noEmit",
|
|
240
211
|
"version": "flow-changeset version"
|
|
241
212
|
},
|
|
242
|
-
"sideEffects": ["./src/
|
|
213
|
+
"sideEffects": ["./src/tailwind.css"],
|
|
243
214
|
"type": "module",
|
|
244
|
-
"version": "0.
|
|
215
|
+
"version": "0.5.1"
|
|
245
216
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { BackgroundSlideshow, type ImageData } from '
|
|
2
|
+
import { BackgroundSlideshow, type ImageData } from './background-slideshow';
|
|
3
3
|
|
|
4
4
|
const meta: Meta<typeof BackgroundSlideshow> = {
|
|
5
5
|
component: BackgroundSlideshow,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import type { ReactElement } from 'react';
|
|
2
4
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
-
import { Picture } from '
|
|
5
|
+
import { Picture } from '../picture';
|
|
4
6
|
|
|
5
7
|
export type ImageData = {
|
|
6
8
|
at: Record<string, string>; // Alt text in different languages
|
|
@@ -12,7 +12,13 @@ export interface BlurryGradientProps extends SVGProps<SVGSVGElement> {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export const BlurryGradient = (props: BlurryGradientProps) => {
|
|
15
|
-
const {
|
|
15
|
+
const {
|
|
16
|
+
description = 'Decorative blurry gradient',
|
|
17
|
+
neutralColor,
|
|
18
|
+
primaryColor,
|
|
19
|
+
secondaryColor,
|
|
20
|
+
...svgProps
|
|
21
|
+
} = props;
|
|
16
22
|
const titleId = 'blurryGradientTitle';
|
|
17
23
|
|
|
18
24
|
return (
|
|
@@ -50,7 +56,7 @@ export const BlurryGradient = (props: BlurryGradientProps) => {
|
|
|
50
56
|
</filter>
|
|
51
57
|
</defs>
|
|
52
58
|
<rect
|
|
53
|
-
fill={
|
|
59
|
+
fill={primaryColor}
|
|
54
60
|
height="1000"
|
|
55
61
|
width="1000"
|
|
56
62
|
/>
|
|
@@ -58,37 +64,37 @@ export const BlurryGradient = (props: BlurryGradientProps) => {
|
|
|
58
64
|
<circle
|
|
59
65
|
cx="730"
|
|
60
66
|
cy="559"
|
|
61
|
-
fill={
|
|
67
|
+
fill={secondaryColor}
|
|
62
68
|
r="357"
|
|
63
69
|
/>
|
|
64
70
|
<circle
|
|
65
71
|
cx="316"
|
|
66
72
|
cy="248"
|
|
67
|
-
fill={
|
|
73
|
+
fill={primaryColor}
|
|
68
74
|
r="357"
|
|
69
75
|
/>
|
|
70
76
|
<circle
|
|
71
77
|
cx="509"
|
|
72
78
|
cy="410"
|
|
73
|
-
fill={
|
|
79
|
+
fill={neutralColor}
|
|
74
80
|
r="357"
|
|
75
81
|
/>
|
|
76
82
|
<circle
|
|
77
83
|
cx="633"
|
|
78
84
|
cy="232"
|
|
79
|
-
fill={
|
|
85
|
+
fill={secondaryColor}
|
|
80
86
|
r="357"
|
|
81
87
|
/>
|
|
82
88
|
<circle
|
|
83
89
|
cx="156"
|
|
84
90
|
cy="82"
|
|
85
|
-
fill={
|
|
91
|
+
fill={primaryColor}
|
|
86
92
|
r="357"
|
|
87
93
|
/>
|
|
88
94
|
<circle
|
|
89
95
|
cx="150"
|
|
90
96
|
cy="389"
|
|
91
|
-
fill={
|
|
97
|
+
fill={neutralColor}
|
|
92
98
|
r="357"
|
|
93
99
|
/>
|
|
94
100
|
</g>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, type HTMLAttributes } from 'react';
|
|
4
|
+
|
|
5
|
+
export const CarouselContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
|
|
6
|
+
({ className, ...props }, ref) => {
|
|
7
|
+
return (
|
|
8
|
+
<div
|
|
9
|
+
className={className}
|
|
10
|
+
ref={ref}
|
|
11
|
+
{...props}
|
|
12
|
+
/>
|
|
13
|
+
);
|
|
14
|
+
},
|
|
15
|
+
);
|
|
16
|
+
CarouselContent.displayName = 'CarouselContent';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, type HTMLAttributes } from 'react';
|
|
4
|
+
|
|
5
|
+
export interface CarouselItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
'aria-label'?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const CarouselItem = forwardRef<HTMLDivElement, CarouselItemProps>(
|
|
10
|
+
({ className, ...props }, ref) => {
|
|
11
|
+
return (
|
|
12
|
+
// biome-ignore lint/a11y/useSemanticElements: False positive
|
|
13
|
+
<div
|
|
14
|
+
aria-roledescription="slide"
|
|
15
|
+
className={className}
|
|
16
|
+
ref={ref}
|
|
17
|
+
role="group"
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
);
|
|
21
|
+
},
|
|
22
|
+
);
|
|
23
|
+
CarouselItem.displayName = 'CarouselItem';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, type HTMLAttributes } from 'react';
|
|
4
|
+
import { useCarousel } from './carousel-root';
|
|
5
|
+
|
|
6
|
+
export const CarouselNext = forwardRef<HTMLButtonElement, HTMLAttributes<HTMLButtonElement>>(
|
|
7
|
+
({ className, ...props }, ref) => {
|
|
8
|
+
const { canScrollNext, scrollNext } = useCarousel();
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<button
|
|
12
|
+
className={className}
|
|
13
|
+
disabled={!canScrollNext}
|
|
14
|
+
onClick={scrollNext}
|
|
15
|
+
ref={ref}
|
|
16
|
+
type="button"
|
|
17
|
+
{...props}
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
},
|
|
21
|
+
);
|
|
22
|
+
CarouselNext.displayName = 'CarouselNext';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, type HTMLAttributes } from 'react';
|
|
4
|
+
import { useCarousel } from './carousel-root';
|
|
5
|
+
|
|
6
|
+
export const CarouselPrevious = forwardRef<HTMLButtonElement, HTMLAttributes<HTMLButtonElement>>(
|
|
7
|
+
({ className, ...props }, ref) => {
|
|
8
|
+
const { canScrollPrev, scrollPrev } = useCarousel();
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<button
|
|
12
|
+
className={className}
|
|
13
|
+
disabled={!canScrollPrev}
|
|
14
|
+
onClick={scrollPrev}
|
|
15
|
+
ref={ref}
|
|
16
|
+
type="button"
|
|
17
|
+
{...props}
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
},
|
|
21
|
+
);
|
|
22
|
+
CarouselPrevious.displayName = 'CarouselPrevious';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import type { EmblaCarouselType, EmblaOptionsType } from 'embla-carousel';
|
|
2
4
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
3
5
|
import {
|
|
@@ -10,7 +12,6 @@ import {
|
|
|
10
12
|
useEffect,
|
|
11
13
|
useState,
|
|
12
14
|
} from 'react';
|
|
13
|
-
import { cn } from '../utils/cn';
|
|
14
15
|
|
|
15
16
|
export type CarouselApi = EmblaCarouselType;
|
|
16
17
|
|
|
@@ -24,21 +25,21 @@ interface CarouselContextValue {
|
|
|
24
25
|
|
|
25
26
|
const CarouselContext = createContext<CarouselContextValue | null>(null);
|
|
26
27
|
|
|
27
|
-
function useCarousel() {
|
|
28
|
+
export function useCarousel() {
|
|
28
29
|
const context = useContext(CarouselContext);
|
|
29
30
|
if (!context) {
|
|
30
|
-
throw new Error('useCarousel must be used within a <Carousel />');
|
|
31
|
+
throw new Error('useCarousel must be used within a <Carousel.Root />');
|
|
31
32
|
}
|
|
32
33
|
return context;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
interface
|
|
36
|
+
export interface CarouselRootProps extends HTMLAttributes<HTMLDivElement> {
|
|
36
37
|
opts?: EmblaOptionsType;
|
|
37
38
|
setApi?: (api: CarouselApi) => void;
|
|
38
39
|
orientation?: 'horizontal' | 'vertical';
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
const
|
|
42
|
+
export const CarouselRoot = forwardRef<HTMLDivElement, CarouselRootProps>(
|
|
42
43
|
({ children, className, opts, orientation = 'horizontal', setApi, ...props }, ref) => {
|
|
43
44
|
const [emblaRef, emblaApi] = useEmblaCarousel({
|
|
44
45
|
...opts,
|
|
@@ -110,7 +111,7 @@ const Carousel = forwardRef<HTMLDivElement, CarouselProps>(
|
|
|
110
111
|
<section
|
|
111
112
|
aria-label="Carousel"
|
|
112
113
|
aria-roledescription="carousel"
|
|
113
|
-
className={
|
|
114
|
+
className={className}
|
|
114
115
|
onKeyDownCapture={handleKeyDown}
|
|
115
116
|
ref={ref}
|
|
116
117
|
{...props}
|
|
@@ -123,75 +124,4 @@ const Carousel = forwardRef<HTMLDivElement, CarouselProps>(
|
|
|
123
124
|
);
|
|
124
125
|
},
|
|
125
126
|
);
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
const CarouselContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
|
|
129
|
-
({ className, ...props }, ref) => {
|
|
130
|
-
return (
|
|
131
|
-
<div
|
|
132
|
-
className={cn('flex', className)}
|
|
133
|
-
ref={ref}
|
|
134
|
-
{...props}
|
|
135
|
-
/>
|
|
136
|
-
);
|
|
137
|
-
},
|
|
138
|
-
);
|
|
139
|
-
CarouselContent.displayName = 'CarouselContent';
|
|
140
|
-
|
|
141
|
-
interface CarouselItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
142
|
-
'aria-label'?: string;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
const CarouselItem = forwardRef<HTMLDivElement, CarouselItemProps>(
|
|
146
|
-
({ className, ...props }, ref) => {
|
|
147
|
-
return (
|
|
148
|
-
// biome-ignore lint/a11y/useSemanticElements: False positive
|
|
149
|
-
<div
|
|
150
|
-
aria-roledescription="slide"
|
|
151
|
-
className={cn('min-w-0 shrink-0 grow-0', className)}
|
|
152
|
-
ref={ref}
|
|
153
|
-
role="group"
|
|
154
|
-
{...props}
|
|
155
|
-
/>
|
|
156
|
-
);
|
|
157
|
-
},
|
|
158
|
-
);
|
|
159
|
-
CarouselItem.displayName = 'CarouselItem';
|
|
160
|
-
|
|
161
|
-
const CarouselPrevious = forwardRef<HTMLButtonElement, HTMLAttributes<HTMLButtonElement>>(
|
|
162
|
-
({ className, ...props }, ref) => {
|
|
163
|
-
const { canScrollPrev, scrollPrev } = useCarousel();
|
|
164
|
-
|
|
165
|
-
return (
|
|
166
|
-
<button
|
|
167
|
-
className={cn('disabled:opacity-50', className)}
|
|
168
|
-
disabled={!canScrollPrev}
|
|
169
|
-
onClick={scrollPrev}
|
|
170
|
-
ref={ref}
|
|
171
|
-
type="button"
|
|
172
|
-
{...props}
|
|
173
|
-
/>
|
|
174
|
-
);
|
|
175
|
-
},
|
|
176
|
-
);
|
|
177
|
-
CarouselPrevious.displayName = 'CarouselPrevious';
|
|
178
|
-
|
|
179
|
-
const CarouselNext = forwardRef<HTMLButtonElement, HTMLAttributes<HTMLButtonElement>>(
|
|
180
|
-
({ className, ...props }, ref) => {
|
|
181
|
-
const { canScrollNext, scrollNext } = useCarousel();
|
|
182
|
-
|
|
183
|
-
return (
|
|
184
|
-
<button
|
|
185
|
-
className={cn('disabled:opacity-50', className)}
|
|
186
|
-
disabled={!canScrollNext}
|
|
187
|
-
onClick={scrollNext}
|
|
188
|
-
ref={ref}
|
|
189
|
-
type="button"
|
|
190
|
-
{...props}
|
|
191
|
-
/>
|
|
192
|
-
);
|
|
193
|
-
},
|
|
194
|
-
);
|
|
195
|
-
CarouselNext.displayName = 'CarouselNext';
|
|
196
|
-
|
|
197
|
-
export { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, useCarousel };
|
|
127
|
+
CarouselRoot.displayName = 'CarouselRoot';
|