@regardio/react 0.4.7 → 0.5.5
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 +6 -8
- 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-nonce.d.ts +1 -6
- package/dist/hooks/use-nonce.js +1 -6
- 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 +170 -187
- package/src/background-slideshow/background-slideshow.stories.tsx +137 -0
- 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 +135 -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-nonce.ts +0 -10
- 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} +52 -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} +56 -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/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/BackgroundSlideshow.stories.tsx +0 -68
- 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/{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/{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
|
@@ -1,223 +1,149 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://www.schemastore.org/package.json",
|
|
3
|
-
"
|
|
3
|
+
"name": "@regardio/react",
|
|
4
|
+
"version": "0.5.5",
|
|
5
|
+
"private": false,
|
|
6
|
+
"description": "Regardio React UI components",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"react",
|
|
9
|
+
"components",
|
|
10
|
+
"ui",
|
|
11
|
+
"regardio",
|
|
12
|
+
"tailwindcss"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/regardio/react/blob/main/README.md",
|
|
4
15
|
"bugs": {
|
|
5
16
|
"url": "https://github.com/regardio/react/issues"
|
|
6
17
|
},
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"@maptiler/sdk": "3.9.0",
|
|
11
|
-
"@mdx-js/react": "3.1.1",
|
|
12
|
-
"@regardio/js": "0.4.2",
|
|
13
|
-
"@supabase/supabase-js": "2.89.0",
|
|
14
|
-
"cmdk": "1.1.1",
|
|
15
|
-
"cva": "beta",
|
|
16
|
-
"embla-carousel": "8.6.0",
|
|
17
|
-
"embla-carousel-react": "8.6.0",
|
|
18
|
-
"fluid-tailwindcss": "1.0.5",
|
|
19
|
-
"input-otp": "1.4.2",
|
|
20
|
-
"intl-parse-accept-language": "1.0.0",
|
|
21
|
-
"leaflet": "alpha",
|
|
22
|
-
"lucide-react": "0.562.0",
|
|
23
|
-
"markdown-to-jsx": "9.5.0",
|
|
24
|
-
"react": "19.2.3",
|
|
25
|
-
"react-day-picker": "9.13.0",
|
|
26
|
-
"react-dom": "19.2.3",
|
|
27
|
-
"react-hook-form": "7.70.0",
|
|
28
|
-
"react-resizable-panels": "4.2.1",
|
|
29
|
-
"react-router": "7.11.0",
|
|
30
|
-
"tailwind-merge": "3.4.0",
|
|
31
|
-
"vaul": "1.1.2",
|
|
32
|
-
"zod": "4.3.5"
|
|
33
|
-
},
|
|
34
|
-
"description": "Regardio React UI components",
|
|
35
|
-
"devDependencies": {
|
|
36
|
-
"@regardio/dev": "1.10.1",
|
|
37
|
-
"@storybook/addon-a11y": "10.1.11",
|
|
38
|
-
"@storybook/addon-docs": "10.1.11",
|
|
39
|
-
"@storybook/addon-vitest": "10.1.11",
|
|
40
|
-
"@storybook/react-vite": "10.1.11",
|
|
41
|
-
"@tailwindcss/vite": "4.1.18",
|
|
42
|
-
"@testing-library/jest-dom": "6.9.1",
|
|
43
|
-
"@testing-library/react": "16.3.1",
|
|
44
|
-
"@total-typescript/ts-reset": "0.6.1",
|
|
45
|
-
"@types/leaflet": "1.9.21",
|
|
46
|
-
"@types/node": "25.0.3",
|
|
47
|
-
"@types/react": "19.2.7",
|
|
48
|
-
"@types/react-dom": "19.2.3",
|
|
49
|
-
"@vitejs/plugin-react": "5.1.2",
|
|
50
|
-
"@vitest/browser-playwright": "4.0.16",
|
|
51
|
-
"@vitest/coverage-v8": "4.0.16",
|
|
52
|
-
"@vitest/ui": "4.0.16",
|
|
53
|
-
"jsdom": "27.4.0",
|
|
54
|
-
"playwright": "1.57.0",
|
|
55
|
-
"storybook": "10.1.11",
|
|
56
|
-
"tailwindcss": "4.1.18",
|
|
57
|
-
"tsup": "8.5.1",
|
|
58
|
-
"typescript": "5.9.3",
|
|
59
|
-
"vite": "7.3.0",
|
|
60
|
-
"vitest": "4.0.16"
|
|
61
|
-
},
|
|
62
|
-
"engines": {
|
|
63
|
-
"node": ">=18"
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/regardio/react.git"
|
|
64
21
|
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"author": "Bernd Matzner <bernd.matzner@regard.io>",
|
|
24
|
+
"sideEffects": [
|
|
25
|
+
"./src/tailwind.css"
|
|
26
|
+
],
|
|
27
|
+
"type": "module",
|
|
65
28
|
"exports": {
|
|
66
|
-
"./
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
},
|
|
70
|
-
"./components/blurry-gradient": {
|
|
71
|
-
"import": "./dist/components/blurry-gradient.js",
|
|
72
|
-
"types": "./dist/components/blurry-gradient.d.ts"
|
|
73
|
-
},
|
|
74
|
-
"./components/box": {
|
|
75
|
-
"import": "./dist/components/box.js",
|
|
76
|
-
"types": "./dist/components/box.d.ts"
|
|
77
|
-
},
|
|
78
|
-
"./components/carousel": {
|
|
79
|
-
"import": "./dist/components/carousel.js",
|
|
80
|
-
"types": "./dist/components/carousel.d.ts"
|
|
81
|
-
},
|
|
82
|
-
"./components/countdown": {
|
|
83
|
-
"import": "./dist/components/countdown.js",
|
|
84
|
-
"types": "./dist/components/countdown.d.ts"
|
|
85
|
-
},
|
|
86
|
-
"./components/definition-list": {
|
|
87
|
-
"import": "./dist/components/definition-list.js",
|
|
88
|
-
"types": "./dist/components/definition-list.d.ts"
|
|
29
|
+
"./background-slideshow": {
|
|
30
|
+
"types": "./dist/background-slideshow/index.d.ts",
|
|
31
|
+
"import": "./dist/background-slideshow/index.js"
|
|
89
32
|
},
|
|
90
|
-
"./
|
|
91
|
-
"
|
|
92
|
-
"
|
|
33
|
+
"./blurry-gradient": {
|
|
34
|
+
"types": "./dist/blurry-gradient/index.d.ts",
|
|
35
|
+
"import": "./dist/blurry-gradient/index.js"
|
|
93
36
|
},
|
|
94
|
-
"./
|
|
95
|
-
"
|
|
96
|
-
"
|
|
37
|
+
"./carousel": {
|
|
38
|
+
"types": "./dist/carousel/index.d.ts",
|
|
39
|
+
"import": "./dist/carousel/index.js"
|
|
97
40
|
},
|
|
98
|
-
"./
|
|
99
|
-
"
|
|
100
|
-
"
|
|
41
|
+
"./countdown": {
|
|
42
|
+
"types": "./dist/countdown/index.d.ts",
|
|
43
|
+
"import": "./dist/countdown/index.js"
|
|
101
44
|
},
|
|
102
|
-
"./
|
|
103
|
-
"
|
|
104
|
-
"
|
|
45
|
+
"./generic-error": {
|
|
46
|
+
"types": "./dist/generic-error/index.d.ts",
|
|
47
|
+
"import": "./dist/generic-error/index.js"
|
|
105
48
|
},
|
|
106
|
-
"./
|
|
107
|
-
"
|
|
108
|
-
"
|
|
49
|
+
"./grid": {
|
|
50
|
+
"types": "./dist/grid/index.d.ts",
|
|
51
|
+
"import": "./dist/grid/index.js"
|
|
109
52
|
},
|
|
110
|
-
"./
|
|
111
|
-
"
|
|
112
|
-
"
|
|
53
|
+
"./heading": {
|
|
54
|
+
"types": "./dist/heading/index.d.ts",
|
|
55
|
+
"import": "./dist/heading/index.js"
|
|
113
56
|
},
|
|
114
|
-
"./
|
|
115
|
-
"
|
|
116
|
-
"
|
|
57
|
+
"./highlight": {
|
|
58
|
+
"types": "./dist/highlight/index.d.ts",
|
|
59
|
+
"import": "./dist/highlight/index.js"
|
|
117
60
|
},
|
|
118
|
-
"./
|
|
119
|
-
"
|
|
120
|
-
"
|
|
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"
|
|
121
64
|
},
|
|
122
|
-
"./
|
|
123
|
-
"
|
|
124
|
-
"
|
|
65
|
+
"./hooks/use-focus-search": {
|
|
66
|
+
"types": "./dist/hooks/use-focus-search.d.ts",
|
|
67
|
+
"import": "./dist/hooks/use-focus-search.js"
|
|
125
68
|
},
|
|
126
|
-
"./
|
|
127
|
-
"
|
|
128
|
-
"
|
|
69
|
+
"./hooks/use-matches-data": {
|
|
70
|
+
"types": "./dist/hooks/use-matches-data.d.ts",
|
|
71
|
+
"import": "./dist/hooks/use-matches-data.js"
|
|
129
72
|
},
|
|
130
|
-
"./
|
|
131
|
-
"
|
|
132
|
-
"
|
|
73
|
+
"./hooks/use-media-query": {
|
|
74
|
+
"types": "./dist/hooks/use-media-query.d.ts",
|
|
75
|
+
"import": "./dist/hooks/use-media-query.js"
|
|
133
76
|
},
|
|
134
|
-
"./
|
|
135
|
-
"
|
|
136
|
-
"
|
|
77
|
+
"./hooks/use-mobile": {
|
|
78
|
+
"types": "./dist/hooks/use-mobile.d.ts",
|
|
79
|
+
"import": "./dist/hooks/use-mobile.js"
|
|
137
80
|
},
|
|
138
|
-
"./
|
|
139
|
-
"
|
|
140
|
-
"
|
|
81
|
+
"./hooks/use-nonce": {
|
|
82
|
+
"types": "./dist/hooks/use-nonce.d.ts",
|
|
83
|
+
"import": "./dist/hooks/use-nonce.js"
|
|
141
84
|
},
|
|
142
|
-
"./
|
|
143
|
-
"
|
|
144
|
-
"
|
|
85
|
+
"./hooks/use-orientation": {
|
|
86
|
+
"types": "./dist/hooks/use-orientation.d.ts",
|
|
87
|
+
"import": "./dist/hooks/use-orientation.js"
|
|
145
88
|
},
|
|
146
|
-
"./
|
|
147
|
-
"
|
|
148
|
-
"
|
|
89
|
+
"./hooks/use-user": {
|
|
90
|
+
"types": "./dist/hooks/use-user.d.ts",
|
|
91
|
+
"import": "./dist/hooks/use-user.js"
|
|
149
92
|
},
|
|
150
|
-
"./
|
|
151
|
-
"
|
|
152
|
-
"
|
|
93
|
+
"./icon-button": {
|
|
94
|
+
"types": "./dist/icon-button/index.d.ts",
|
|
95
|
+
"import": "./dist/icon-button/index.js"
|
|
153
96
|
},
|
|
154
|
-
"./
|
|
155
|
-
"
|
|
156
|
-
"
|
|
97
|
+
"./if": {
|
|
98
|
+
"types": "./dist/if/index.d.ts",
|
|
99
|
+
"import": "./dist/if/index.js"
|
|
157
100
|
},
|
|
158
|
-
"./
|
|
159
|
-
"
|
|
160
|
-
"
|
|
101
|
+
"./iframe": {
|
|
102
|
+
"types": "./dist/iframe/index.d.ts",
|
|
103
|
+
"import": "./dist/iframe/index.js"
|
|
161
104
|
},
|
|
162
|
-
"./
|
|
163
|
-
"
|
|
164
|
-
"
|
|
105
|
+
"./link": {
|
|
106
|
+
"types": "./dist/link/index.d.ts",
|
|
107
|
+
"import": "./dist/link/index.js"
|
|
165
108
|
},
|
|
166
|
-
"./
|
|
167
|
-
"
|
|
168
|
-
"
|
|
109
|
+
"./list": {
|
|
110
|
+
"types": "./dist/list/index.d.ts",
|
|
111
|
+
"import": "./dist/list/index.js"
|
|
169
112
|
},
|
|
170
|
-
"./
|
|
171
|
-
"
|
|
172
|
-
"
|
|
113
|
+
"./markdown-container": {
|
|
114
|
+
"types": "./dist/markdown-container/index.d.ts",
|
|
115
|
+
"import": "./dist/markdown-container/index.js"
|
|
173
116
|
},
|
|
174
|
-
"./
|
|
175
|
-
"
|
|
176
|
-
"
|
|
117
|
+
"./password-input": {
|
|
118
|
+
"types": "./dist/password-input/index.d.ts",
|
|
119
|
+
"import": "./dist/password-input/index.js"
|
|
177
120
|
},
|
|
178
|
-
"./
|
|
179
|
-
"
|
|
180
|
-
"
|
|
121
|
+
"./picture": {
|
|
122
|
+
"types": "./dist/picture/index.d.ts",
|
|
123
|
+
"import": "./dist/picture/index.js"
|
|
181
124
|
},
|
|
182
|
-
"./
|
|
183
|
-
"
|
|
184
|
-
"
|
|
125
|
+
"./protected-email": {
|
|
126
|
+
"types": "./dist/protected-email/index.d.ts",
|
|
127
|
+
"import": "./dist/protected-email/index.js"
|
|
185
128
|
},
|
|
186
|
-
"./
|
|
187
|
-
|
|
188
|
-
"types": "./dist/
|
|
129
|
+
"./tailwind.css": "./src/tailwind.css",
|
|
130
|
+
"./text": {
|
|
131
|
+
"types": "./dist/text/index.d.ts",
|
|
132
|
+
"import": "./dist/text/index.js"
|
|
189
133
|
},
|
|
190
|
-
"./tailwind.css": "./src/styles/tailwind.css",
|
|
191
134
|
"./utils/author": {
|
|
192
|
-
"
|
|
193
|
-
"
|
|
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"
|
|
135
|
+
"types": "./dist/utils/author/index.d.ts",
|
|
136
|
+
"import": "./dist/utils/author/index.js"
|
|
202
137
|
},
|
|
203
138
|
"./utils/text": {
|
|
204
|
-
"
|
|
205
|
-
"
|
|
139
|
+
"types": "./dist/utils/text/index.d.ts",
|
|
140
|
+
"import": "./dist/utils/text/index.js"
|
|
206
141
|
}
|
|
207
142
|
},
|
|
208
|
-
"files": [
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
"name": "@regardio/react",
|
|
213
|
-
"private": false,
|
|
214
|
-
"publishConfig": {
|
|
215
|
-
"access": "public"
|
|
216
|
-
},
|
|
217
|
-
"repository": {
|
|
218
|
-
"type": "git",
|
|
219
|
-
"url": "git+https://github.com/regardio/react.git"
|
|
220
|
-
},
|
|
143
|
+
"files": [
|
|
144
|
+
"dist",
|
|
145
|
+
"src"
|
|
146
|
+
],
|
|
221
147
|
"scripts": {
|
|
222
148
|
"build": "tsup && post-build-exports --preserve \"./tailwind.css\" && pnpm fix",
|
|
223
149
|
"clean": "exec-clean .turbo dist",
|
|
@@ -225,13 +151,14 @@
|
|
|
225
151
|
"fix": "exec-p fix:*",
|
|
226
152
|
"fix:biome": "lint-biome check --write --unsafe .",
|
|
227
153
|
"fix:md": "lint-md --fix",
|
|
154
|
+
"fix:pkg": "lint-package --fix",
|
|
228
155
|
"lint": "exec-p lint:*",
|
|
229
156
|
"lint:biome": "lint-biome check .",
|
|
230
157
|
"lint:md": "lint-md",
|
|
158
|
+
"lint:pkg": "lint-package",
|
|
231
159
|
"prepare": "exec-husky",
|
|
232
160
|
"release": "flow-release",
|
|
233
|
-
"report": "
|
|
234
|
-
"report:unit": "vitest run --reporter html",
|
|
161
|
+
"report": "vitest run --coverage",
|
|
235
162
|
"storybook": "storybook dev -p 6006",
|
|
236
163
|
"storybook:build": "storybook build -o storybook-static",
|
|
237
164
|
"test": "exec-s test:*",
|
|
@@ -239,7 +166,63 @@
|
|
|
239
166
|
"typecheck": "exec-tsc --noEmit",
|
|
240
167
|
"version": "flow-changeset version"
|
|
241
168
|
},
|
|
242
|
-
"
|
|
243
|
-
|
|
244
|
-
|
|
169
|
+
"dependencies": {
|
|
170
|
+
"@base-ui/react": "1.0.0",
|
|
171
|
+
"@maptiler/leaflet-maptilersdk": "4.1.1",
|
|
172
|
+
"@maptiler/sdk": "3.9.0",
|
|
173
|
+
"@mdx-js/react": "3.1.1",
|
|
174
|
+
"@regardio/js": "0.6.0",
|
|
175
|
+
"@regardio/tailwind": "0.1.3",
|
|
176
|
+
"@supabase/supabase-js": "2.90.0",
|
|
177
|
+
"cmdk": "1.1.1",
|
|
178
|
+
"embla-carousel": "8.6.0",
|
|
179
|
+
"embla-carousel-react": "8.6.0",
|
|
180
|
+
"input-otp": "1.4.2",
|
|
181
|
+
"intl-parse-accept-language": "1.0.0",
|
|
182
|
+
"leaflet": "alpha",
|
|
183
|
+
"lucide-react": "0.562.0",
|
|
184
|
+
"markdown-to-jsx": "9.5.1",
|
|
185
|
+
"react": "19.2.3",
|
|
186
|
+
"react-day-picker": "9.13.0",
|
|
187
|
+
"react-dom": "19.2.3",
|
|
188
|
+
"react-hook-form": "7.70.0",
|
|
189
|
+
"react-resizable-panels": "4.3.1",
|
|
190
|
+
"react-router": "7.12.0",
|
|
191
|
+
"tailwind-variants": "3.2.2",
|
|
192
|
+
"vaul": "1.1.2",
|
|
193
|
+
"zod": "4.3.5"
|
|
194
|
+
},
|
|
195
|
+
"devDependencies": {
|
|
196
|
+
"@regardio/dev": "1.11.1",
|
|
197
|
+
"@storybook/addon-a11y": "10.1.11",
|
|
198
|
+
"@storybook/addon-docs": "10.1.11",
|
|
199
|
+
"@storybook/addon-vitest": "10.1.11",
|
|
200
|
+
"@storybook/react-vite": "10.1.11",
|
|
201
|
+
"@tailwindcss/vite": "4.1.18",
|
|
202
|
+
"@testing-library/jest-dom": "6.9.1",
|
|
203
|
+
"@testing-library/react": "16.3.1",
|
|
204
|
+
"@total-typescript/ts-reset": "0.6.1",
|
|
205
|
+
"@types/leaflet": "1.9.21",
|
|
206
|
+
"@types/node": "25.0.3",
|
|
207
|
+
"@types/react": "19.2.7",
|
|
208
|
+
"@types/react-dom": "19.2.3",
|
|
209
|
+
"@vitejs/plugin-react": "5.1.2",
|
|
210
|
+
"@vitest/browser-playwright": "4.0.16",
|
|
211
|
+
"@vitest/coverage-v8": "4.0.16",
|
|
212
|
+
"@vitest/ui": "4.0.16",
|
|
213
|
+
"jsdom": "27.4.0",
|
|
214
|
+
"playwright": "1.57.0",
|
|
215
|
+
"storybook": "10.1.11",
|
|
216
|
+
"tailwindcss": "4.1.18",
|
|
217
|
+
"tsup": "8.5.1",
|
|
218
|
+
"typescript": "5.9.3",
|
|
219
|
+
"vite": "7.3.1",
|
|
220
|
+
"vitest": "4.0.16"
|
|
221
|
+
},
|
|
222
|
+
"engines": {
|
|
223
|
+
"node": ">=18"
|
|
224
|
+
},
|
|
225
|
+
"publishConfig": {
|
|
226
|
+
"access": "public"
|
|
227
|
+
}
|
|
245
228
|
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { BackgroundSlideshow, type ImageData } from './background-slideshow';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof BackgroundSlideshow> = {
|
|
5
|
+
component: BackgroundSlideshow,
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: 'fullscreen',
|
|
8
|
+
},
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
title: 'Components/BackgroundSlideshow',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
type Story = StoryObj<typeof BackgroundSlideshow>;
|
|
15
|
+
|
|
16
|
+
const sampleImages: ImageData[] = [
|
|
17
|
+
{
|
|
18
|
+
at: { de: 'Bild 1', en: 'Image 1' },
|
|
19
|
+
fn: 'image1.jpg',
|
|
20
|
+
hu: 200,
|
|
21
|
+
id: '1',
|
|
22
|
+
po: false,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
at: { de: 'Bild 2', en: 'Image 2' },
|
|
26
|
+
fn: 'image2.jpg',
|
|
27
|
+
hu: 150,
|
|
28
|
+
id: '2',
|
|
29
|
+
po: false,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
at: { de: 'Bild 3', en: 'Image 3' },
|
|
33
|
+
fn: 'image3.jpg',
|
|
34
|
+
hu: 100,
|
|
35
|
+
id: '3',
|
|
36
|
+
po: false,
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
export const Default: Story = {
|
|
41
|
+
args: {
|
|
42
|
+
baseUrl: 'https://via.placeholder.com/{format}?text=Image+{id}',
|
|
43
|
+
className: 'h-[400px] w-full',
|
|
44
|
+
images: sampleImages,
|
|
45
|
+
locale: 'en',
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const WithoutSlideshow: Story = {
|
|
50
|
+
args: {
|
|
51
|
+
baseUrl: 'https://via.placeholder.com/{format}?text=Static',
|
|
52
|
+
className: 'h-[400px] w-full',
|
|
53
|
+
images: sampleImages,
|
|
54
|
+
locale: 'en',
|
|
55
|
+
slideshow: false,
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const FastTransition: Story = {
|
|
60
|
+
args: {
|
|
61
|
+
baseUrl: 'https://via.placeholder.com/{format}?text=Fast',
|
|
62
|
+
className: 'h-[400px] w-full',
|
|
63
|
+
images: sampleImages,
|
|
64
|
+
locale: 'en',
|
|
65
|
+
slideshowInterval: 2000,
|
|
66
|
+
transitionDuration: 1000,
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const SingleImage: Story = {
|
|
71
|
+
args: {
|
|
72
|
+
baseUrl: 'https://via.placeholder.com/{format}?text=Single',
|
|
73
|
+
className: 'h-[400px] w-full',
|
|
74
|
+
images: [sampleImages[0] as ImageData],
|
|
75
|
+
locale: 'en',
|
|
76
|
+
slideshow: true,
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const EmptyImages: Story = {
|
|
81
|
+
args: {
|
|
82
|
+
baseUrl: 'https://via.placeholder.com/{format}',
|
|
83
|
+
className: 'h-[400px] w-full bg-gray-200',
|
|
84
|
+
images: [],
|
|
85
|
+
locale: 'en',
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export const WithFilter: Story = {
|
|
90
|
+
args: {
|
|
91
|
+
baseUrl: 'https://via.placeholder.com/{format}?text=Filtered',
|
|
92
|
+
className: 'h-[400px] w-full',
|
|
93
|
+
filter: (img: ImageData) => img.hu > 100,
|
|
94
|
+
images: sampleImages,
|
|
95
|
+
locale: 'en',
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export const GermanLocale: Story = {
|
|
100
|
+
args: {
|
|
101
|
+
baseUrl: 'https://via.placeholder.com/{format}?text=German',
|
|
102
|
+
className: 'h-[400px] w-full',
|
|
103
|
+
images: sampleImages,
|
|
104
|
+
locale: 'de',
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export const ShortTransition: Story = {
|
|
109
|
+
args: {
|
|
110
|
+
baseUrl: 'https://via.placeholder.com/{format}?text=Short',
|
|
111
|
+
className: 'h-[400px] w-full',
|
|
112
|
+
images: sampleImages,
|
|
113
|
+
locale: 'en',
|
|
114
|
+
slideshowInterval: 1000,
|
|
115
|
+
transitionDuration: 2000,
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export const MediumTransition: Story = {
|
|
120
|
+
args: {
|
|
121
|
+
baseUrl: 'https://via.placeholder.com/{format}?text=Medium',
|
|
122
|
+
className: 'h-[400px] w-full',
|
|
123
|
+
images: sampleImages,
|
|
124
|
+
locale: 'en',
|
|
125
|
+
transitionDuration: 4000,
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export const LongTransition: Story = {
|
|
130
|
+
args: {
|
|
131
|
+
baseUrl: 'https://via.placeholder.com/{format}?text=Long',
|
|
132
|
+
className: 'h-[400px] w-full',
|
|
133
|
+
images: sampleImages,
|
|
134
|
+
locale: 'en',
|
|
135
|
+
transitionDuration: 5000,
|
|
136
|
+
},
|
|
137
|
+
};
|
|
@@ -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>
|