@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.
Files changed (172) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +6 -8
  3. package/dist/{components/background-slideshow.js → background-slideshow/index.js} +2 -11
  4. package/dist/{components/blurry-gradient.js → blurry-gradient/index.js} +15 -9
  5. package/dist/{components/carousel.d.ts → carousel/index.d.ts} +17 -9
  6. package/dist/{components/carousel.js → carousel/index.js} +34 -30
  7. package/dist/{components/countdown.js → countdown/index.js} +2 -11
  8. package/dist/{components/generic-error.js → generic-error/index.js} +1 -1
  9. package/dist/grid/index.d.ts +1196 -0
  10. package/dist/grid/index.js +239 -0
  11. package/dist/heading/index.d.ts +24 -0
  12. package/dist/{components/heading.js → heading/index.js} +15 -34
  13. package/dist/highlight/index.d.ts +13 -0
  14. package/dist/{components/highlight.js → highlight/index.js} +9 -17
  15. package/dist/hooks/use-nonce.d.ts +1 -6
  16. package/dist/hooks/use-nonce.js +1 -6
  17. package/dist/{components/icon-button.js → icon-button/index.js} +1 -1
  18. package/dist/{components/if.js → if/index.js} +1 -1
  19. package/dist/{components/iframe.js → iframe/index.js} +2 -11
  20. package/dist/{components/link.d.ts → link/index.d.ts} +19 -13
  21. package/dist/{components/link.js → link/index.js} +31 -36
  22. package/dist/list/index.d.ts +69 -0
  23. package/dist/list/index.js +65 -0
  24. package/dist/{components/markdown-container.js → markdown-container/index.js} +3 -67
  25. package/dist/{components/password-input.js → password-input/index.js} +2 -11
  26. package/dist/{components/picture.js → picture/index.js} +2 -11
  27. package/dist/{components/protected-email.d.ts → protected-email/index.d.ts} +1 -1
  28. package/dist/{components/protected-email.js → protected-email/index.js} +1 -1
  29. package/dist/text/index.d.ts +20 -0
  30. package/dist/text/index.js +38 -0
  31. package/dist/utils/author/index.d.ts +3 -0
  32. package/dist/utils/author/index.js +33 -0
  33. package/dist/utils/text/index.d.ts +15 -0
  34. package/dist/utils/text/index.js +73 -0
  35. package/package.json +170 -187
  36. package/src/background-slideshow/background-slideshow.stories.tsx +137 -0
  37. package/src/{components → background-slideshow}/background-slideshow.tsx +3 -1
  38. package/src/background-slideshow/index.ts +2 -0
  39. package/src/{stories/BlurryGradient.stories.tsx → blurry-gradient/blurry-gradient.stories.tsx} +1 -1
  40. package/src/{components → blurry-gradient}/blurry-gradient.tsx +14 -8
  41. package/src/blurry-gradient/index.ts +2 -0
  42. package/src/carousel/carousel-content.tsx +16 -0
  43. package/src/carousel/carousel-item.tsx +23 -0
  44. package/src/carousel/carousel-next.tsx +22 -0
  45. package/src/carousel/carousel-previous.tsx +22 -0
  46. package/src/{components/carousel.tsx → carousel/carousel-root.tsx} +8 -78
  47. package/src/carousel/carousel.stories.tsx +135 -0
  48. package/src/carousel/index.parts.ts +5 -0
  49. package/src/carousel/index.ts +4 -0
  50. package/src/{stories/Countdown.stories.tsx → countdown/countdown.stories.tsx} +1 -1
  51. package/src/{components → countdown}/countdown.tsx +3 -7
  52. package/src/countdown/index.ts +1 -0
  53. package/src/{stories/GenericError.stories.tsx → generic-error/generic-error.stories.tsx} +1 -1
  54. package/src/{components → generic-error}/generic-error.tsx +2 -0
  55. package/src/generic-error/index.ts +2 -0
  56. package/src/grid/grid-item.tsx +188 -0
  57. package/src/grid/grid-root.tsx +72 -0
  58. package/src/grid/grid.stories.tsx +236 -0
  59. package/src/grid/index.parts.ts +2 -0
  60. package/src/grid/index.ts +5 -0
  61. package/src/{stories/Heading.stories.tsx → heading/heading.stories.tsx} +1 -1
  62. package/src/{components → heading}/heading.tsx +17 -25
  63. package/src/heading/index.ts +2 -0
  64. package/src/{stories/Highlight.stories.tsx → highlight/highlight.stories.tsx} +1 -1
  65. package/src/{components → highlight}/highlight.tsx +13 -9
  66. package/src/highlight/index.ts +2 -0
  67. package/src/hooks/use-nonce.ts +0 -10
  68. package/src/{stories/IconButton.stories.tsx → icon-button/icon-button.stories.tsx} +1 -1
  69. package/src/icon-button/index.ts +2 -0
  70. package/src/{stories/If.stories.tsx → if/if.stories.tsx} +1 -1
  71. package/src/if/index.ts +1 -0
  72. package/src/{stories/Iframe.stories.tsx → iframe/iframe.stories.tsx} +1 -1
  73. package/src/{components → iframe}/iframe.tsx +1 -1
  74. package/src/iframe/index.ts +2 -0
  75. package/src/link/index.ts +2 -0
  76. package/src/{stories/Link.stories.tsx → link/link.stories.tsx} +52 -1
  77. package/src/{components → link}/link.tsx +39 -28
  78. package/src/list/index.parts.ts +2 -0
  79. package/src/list/index.ts +4 -0
  80. package/src/list/list-item.tsx +63 -0
  81. package/src/list/list-root-context.ts +21 -0
  82. package/src/list/list-root.tsx +81 -0
  83. package/src/list/list.css +32 -0
  84. package/src/list/list.stories.tsx +119 -0
  85. package/src/list/list.test.tsx +168 -0
  86. package/src/markdown-container/index.ts +2 -0
  87. package/src/{stories/MarkdownContainer.stories.tsx → markdown-container/markdown-container.stories.tsx} +56 -1
  88. package/src/{components → markdown-container}/markdown-container.tsx +3 -1
  89. package/src/password-input/index.ts +2 -0
  90. package/src/{stories/PasswordInput.stories.tsx → password-input/password-input.stories.tsx} +1 -1
  91. package/src/{components → password-input}/password-input.tsx +4 -4
  92. package/src/picture/index.ts +2 -0
  93. package/src/{stories/Picture.stories.tsx → picture/picture.stories.tsx} +1 -1
  94. package/src/{components → picture}/picture.tsx +2 -4
  95. package/src/protected-email/index.ts +2 -0
  96. package/src/{stories/ProtectedEmail.stories.tsx → protected-email/protected-email.stories.tsx} +1 -1
  97. package/src/{components → protected-email}/protected-email.tsx +3 -1
  98. package/src/tailwind.css +10 -0
  99. package/src/text/index.ts +2 -0
  100. package/src/{stories/Text.stories.tsx → text/text.stories.tsx} +1 -1
  101. package/src/text/text.tsx +46 -0
  102. package/src/utils/author/author.tsx +36 -0
  103. package/src/utils/author/index.ts +1 -0
  104. package/src/utils/text/index.ts +1 -0
  105. package/src/utils/text/text.tsx +103 -0
  106. package/dist/components/box.d.ts +0 -20
  107. package/dist/components/box.js +0 -50
  108. package/dist/components/definition-list.d.ts +0 -43
  109. package/dist/components/definition-list.js +0 -89
  110. package/dist/components/heading.d.ts +0 -27
  111. package/dist/components/highlight.d.ts +0 -19
  112. package/dist/components/item.d.ts +0 -70
  113. package/dist/components/item.js +0 -512
  114. package/dist/components/leaflet-map.d.ts +0 -34
  115. package/dist/components/leaflet-map.js +0 -201
  116. package/dist/components/list-item.d.ts +0 -19
  117. package/dist/components/list-item.js +0 -37
  118. package/dist/components/maptiler-map.d.ts +0 -27
  119. package/dist/components/maptiler-map.js +0 -129
  120. package/dist/components/text.d.ts +0 -20
  121. package/dist/components/text.js +0 -45
  122. package/dist/components/unordered-list.d.ts +0 -19
  123. package/dist/components/unordered-list.js +0 -39
  124. package/dist/utils/author.d.ts +0 -9
  125. package/dist/utils/author.js +0 -55
  126. package/dist/utils/cn.d.ts +0 -9
  127. package/dist/utils/cn.js +0 -14
  128. package/dist/utils/is-route-active.d.ts +0 -19
  129. package/dist/utils/is-route-active.js +0 -56
  130. package/dist/utils/text.d.ts +0 -24
  131. package/dist/utils/text.js +0 -127
  132. package/src/components/box.tsx +0 -45
  133. package/src/components/definition-list.tsx +0 -90
  134. package/src/components/item.tsx +0 -340
  135. package/src/components/leaflet-map.tsx +0 -294
  136. package/src/components/link.test.tsx +0 -387
  137. package/src/components/list-item.tsx +0 -30
  138. package/src/components/maptiler-map.tsx +0 -181
  139. package/src/components/text.tsx +0 -38
  140. package/src/components/unordered-list.tsx +0 -32
  141. package/src/hooks/use-nonce.test.ts +0 -35
  142. package/src/stories/BackgroundSlideshow.stories.tsx +0 -68
  143. package/src/stories/Box.stories.tsx +0 -83
  144. package/src/stories/Carousel.stories.tsx +0 -95
  145. package/src/stories/DefinitionList.stories.tsx +0 -51
  146. package/src/stories/Item.stories.tsx +0 -79
  147. package/src/stories/ListItem.stories.tsx +0 -38
  148. package/src/stories/UnorderedList.stories.tsx +0 -73
  149. package/src/styles/tailwind.css +0 -7
  150. package/src/test-setup.ts +0 -1
  151. package/src/utils/author.test.ts +0 -54
  152. package/src/utils/author.tsx +0 -73
  153. package/src/utils/cn.test.ts +0 -48
  154. package/src/utils/cn.ts +0 -14
  155. package/src/utils/is-route-active.test.ts +0 -80
  156. package/src/utils/is-route-active.ts +0 -100
  157. package/src/utils/text.test.ts +0 -152
  158. package/src/utils/text.tsx +0 -209
  159. package/src/vite-env.d.ts +0 -1
  160. /package/dist/{components/background-slideshow.d.ts → background-slideshow/index.d.ts} +0 -0
  161. /package/dist/{components/blurry-gradient.d.ts → blurry-gradient/index.d.ts} +0 -0
  162. /package/dist/{components/countdown.d.ts → countdown/index.d.ts} +0 -0
  163. /package/dist/{components/generic-error.d.ts → generic-error/index.d.ts} +0 -0
  164. /package/dist/{components/icon-button.d.ts → icon-button/index.d.ts} +0 -0
  165. /package/dist/{components/if.d.ts → if/index.d.ts} +0 -0
  166. /package/dist/{components/iframe.d.ts → iframe/index.d.ts} +0 -0
  167. /package/dist/{components/markdown-container.d.ts → markdown-container/index.d.ts} +0 -0
  168. /package/dist/{components/password-input.d.ts → password-input/index.d.ts} +0 -0
  169. /package/dist/{components/picture.d.ts → picture/index.d.ts} +0 -0
  170. /package/src/{components → icon-button}/icon-button.tsx +0 -0
  171. /package/src/{components → if}/if.tsx +0 -0
  172. /package/src/{styles/storybook.css → storybook.css} +0 -0
@@ -1,512 +0,0 @@
1
- import { defineConfig } from 'cva';
2
- import { twMerge } from 'fluid-tailwindcss/tailwind-merge';
3
- import React, { createContext, useCallback, isValidElement, cloneElement, useContext } from 'react';
4
- import { NavLink } from 'react-router';
5
- import { jsx, Fragment } from 'react/jsx-runtime';
6
-
7
- // src/utils/cn.ts
8
- var { cva, compose } = defineConfig({
9
- hooks: {
10
- onComplete: (className) => {
11
- return twMerge(className);
12
- }
13
- }
14
- });
15
- var lowerCaseSzett = (text, _returnType) => {
16
- const processString = (str) => {
17
- const parts = str.split(/(ß)/g);
18
- return parts.map(
19
- (part, index) => part === "\xDF" ? /* @__PURE__ */ jsx(
20
- "span",
21
- {
22
- className: "lowercase",
23
- children: part
24
- },
25
- index.toString()
26
- ) : part
27
- );
28
- };
29
- if (typeof text === "string") {
30
- return processString(text);
31
- }
32
- if (isValidElement(text)) {
33
- const element = text;
34
- const { children, ...props } = element.props;
35
- return cloneElement(element, {
36
- ...props,
37
- children: lowerCaseSzett(children)
38
- });
39
- }
40
- if (Array.isArray(text)) {
41
- return text.map((child, index) => /* @__PURE__ */ jsx(React.Fragment, { children: lowerCaseSzett(child) }, index.toString()));
42
- }
43
- return text;
44
- };
45
- var PathResolverContext = createContext(null);
46
- PathResolverContext.Provider;
47
- function usePathResolver() {
48
- return useContext(PathResolverContext);
49
- }
50
- var LinkBase = ({
51
- className,
52
- to,
53
- routeKey,
54
- children,
55
- onClick,
56
- viewTransition = true,
57
- ...props
58
- }) => {
59
- const pathResolver = usePathResolver();
60
- let path;
61
- if (routeKey && pathResolver) {
62
- path = pathResolver(routeKey);
63
- } else if (typeof to === "string") {
64
- path = to;
65
- } else {
66
- path = to?.pathname ?? "";
67
- if (to?.search) path += to.search;
68
- if (to?.hash) path += to.hash;
69
- }
70
- const isExternal = path.startsWith("tel:") || path.startsWith("mailto:") || path.startsWith("#") || path.startsWith("http");
71
- const handleClick = useCallback(
72
- (event) => {
73
- onClick?.(event);
74
- if (event.defaultPrevented) return;
75
- if (path.startsWith("tel:") || path.startsWith("mailto:")) {
76
- return;
77
- }
78
- if (path.startsWith("#")) {
79
- event.preventDefault();
80
- const element = document.getElementById(path.substring(1));
81
- if (element) {
82
- element.scrollIntoView({ behavior: "smooth" });
83
- }
84
- return;
85
- }
86
- if (path.startsWith("http")) {
87
- event.preventDefault();
88
- window.open(path, "_blank", "noopener,noreferrer");
89
- return;
90
- }
91
- },
92
- [onClick, path]
93
- );
94
- if (!path) {
95
- return /* @__PURE__ */ jsx(Fragment, { children: typeof children === "function" ? null : children });
96
- }
97
- if (isExternal) {
98
- const externalState = {
99
- isActive: false,
100
- isPending: false,
101
- isTransitioning: false
102
- };
103
- const resolvedClassName = typeof className === "function" ? className(externalState) : className;
104
- const resolvedStyle = typeof props.style === "function" ? props.style(externalState) : props.style;
105
- return /* @__PURE__ */ jsx(
106
- "a",
107
- {
108
- className: resolvedClassName,
109
- href: path,
110
- onClick: handleClick,
111
- style: resolvedStyle,
112
- children: typeof children === "function" ? children(externalState) : children
113
- }
114
- );
115
- }
116
- return /* @__PURE__ */ jsx(
117
- NavLink,
118
- {
119
- ...props,
120
- className,
121
- onClick: handleClick,
122
- to: path,
123
- viewTransition,
124
- children
125
- }
126
- );
127
- };
128
- var link = cva({
129
- base: [],
130
- defaultVariants: {
131
- variant: "primary"
132
- },
133
- variants: {
134
- arrow: {
135
- darr: "darr",
136
- larr: "larr",
137
- rarr: "rarr",
138
- uarr: "uarr"
139
- },
140
- variant: {
141
- button: [
142
- "block",
143
- "button",
144
- "mt-s",
145
- "relative",
146
- "rarr",
147
- "text-right",
148
- "text-sm",
149
- "tracking-wider",
150
- "uppercase"
151
- ],
152
- code: ["font-monospace"],
153
- link: ["rarr", "!bg-transparent", "uppercase", "!tracking-wider"],
154
- navtitle: ["block", "uppercase", "tracking-wider"],
155
- primary: [],
156
- subtitle: ["text-lg"]
157
- }
158
- }
159
- });
160
- var Link = ({
161
- arrow,
162
- children,
163
- className,
164
- routeKey,
165
- to,
166
- variant,
167
- viewTransition,
168
- ...props
169
- }) => {
170
- return /* @__PURE__ */ jsx(
171
- LinkBase,
172
- {
173
- ...props,
174
- className: link({
175
- arrow,
176
- className,
177
- variant
178
- }),
179
- routeKey,
180
- to,
181
- viewTransition,
182
- children: lowerCaseSzett(children)
183
- }
184
- );
185
- };
186
- var priorities = {
187
- high: [],
188
- low: [],
189
- medium: []
190
- };
191
- var paddingValues = {
192
- default: "",
193
- gutter: "p-grid-gutter"
194
- };
195
- var width = {
196
- full: ["col-span-12"],
197
- lg: ["col-span-12", "@xs:col-span-8", "@md:col-span-8", "@xl:col-span-8"],
198
- md: ["col-span-12", "@xs:col-span-6", "@md:col-span-6", "@xl:col-span-6"],
199
- sm: ["col-span-6", "@xs:col-span-6", "@md:col-span-4", "@xl:col-span-4"],
200
- xl: ["col-span-12", "@xs:col-span-8", "@md:col-span-9", "@xl:col-span-10"],
201
- xs: ["col-span-6", "@xs:col-span-4", "@md:col-span-3", "@xl:col-span-2"]
202
- };
203
- var height = {
204
- 1: ["row-span-1"],
205
- 2: ["row-span-2"],
206
- 3: ["row-span-3"],
207
- 4: ["row-span-4"],
208
- 5: ["row-span-5"],
209
- 6: ["row-span-6"]
210
- };
211
- var themeColors = {
212
- black: [],
213
- blue: [],
214
- coral: [],
215
- cyan: [],
216
- gray: [],
217
- green: [],
218
- lime: [],
219
- neutral: [],
220
- olive: [],
221
- orange: [],
222
- pink: [],
223
- purple: [],
224
- red: [],
225
- teal: [],
226
- unstyled: [],
227
- white: [],
228
- yellow: []
229
- };
230
- var item = cva({
231
- base: ["relative"],
232
- compoundVariants: [
233
- {
234
- className: ["bg-gray-300/20", "black:bg-black/20"],
235
- priority: "low",
236
- themeColor: "black"
237
- },
238
- {
239
- className: ["bg-gray-300/50", "black:bg-black/50"],
240
- priority: "medium",
241
- themeColor: "black"
242
- },
243
- {
244
- className: ["bg-gray-300/90", "black:bg-black/90"],
245
- priority: "high",
246
- themeColor: "black"
247
- },
248
- {
249
- className: ["bg-blue-300/20", "black:bg-blue-500/20"],
250
- priority: "low",
251
- themeColor: "blue"
252
- },
253
- {
254
- className: ["bg-blue-300/50", "black:bg-blue-500/50"],
255
- priority: "medium",
256
- themeColor: "blue"
257
- },
258
- {
259
- className: ["bg-blue-300/90", "black:bg-blue-500/80"],
260
- priority: "high",
261
- themeColor: "blue"
262
- },
263
- {
264
- className: ["bg-coral-300/20", "black:bg-coral-500/20"],
265
- priority: "low",
266
- themeColor: "coral"
267
- },
268
- {
269
- className: ["bg-coral-300/50", "black:bg-coral-500/50"],
270
- priority: "medium",
271
- themeColor: "coral"
272
- },
273
- {
274
- className: ["bg-coral-300/90", "black:bg-coral-500/80"],
275
- priority: "high",
276
- themeColor: "coral"
277
- },
278
- {
279
- className: ["bg-cyan-300/20", "black:bg-cyan-500/20"],
280
- priority: "low",
281
- themeColor: "cyan"
282
- },
283
- {
284
- className: ["bg-cyan-300/50", "black:bg-cyan-500/50"],
285
- priority: "medium",
286
- themeColor: "cyan"
287
- },
288
- {
289
- className: ["bg-cyan-300/90", "black:bg-cyan-500/80"],
290
- priority: "high",
291
- themeColor: "cyan"
292
- },
293
- {
294
- className: ["bg-green-300/20", "black:bg-green-500/20"],
295
- priority: "low",
296
- themeColor: "green"
297
- },
298
- {
299
- className: ["bg-green-300/50", "black:bg-green-500/50"],
300
- priority: "medium",
301
- themeColor: "green"
302
- },
303
- {
304
- className: ["bg-green-300/90", "black:bg-green-500/80"],
305
- priority: "high",
306
- themeColor: "green"
307
- },
308
- {
309
- className: ["bg-lime-300/20", "black:bg-lime-500/20"],
310
- priority: "low",
311
- themeColor: "lime"
312
- },
313
- {
314
- className: ["bg-lime-300/50", "black:bg-lime-500/50"],
315
- priority: "medium",
316
- themeColor: "lime"
317
- },
318
- {
319
- className: ["bg-lime-300/90", "black:bg-lime-500/80"],
320
- priority: "high",
321
- themeColor: "lime"
322
- },
323
- {
324
- className: ["bg-gray-100/40", "black:bg-gray-500/5"],
325
- priority: "low",
326
- themeColor: "neutral"
327
- },
328
- {
329
- className: ["bg-gray-200/30", "black:bg-gray-500/20"],
330
- priority: "medium",
331
- themeColor: "neutral"
332
- },
333
- {
334
- className: ["bg-gray-300/70", "black:bg-gray-500/50"],
335
- priority: "high",
336
- themeColor: "neutral"
337
- },
338
- {
339
- className: ["bg-olive-300/20", "black:bg-olive-500/20"],
340
- priority: "low",
341
- themeColor: "olive"
342
- },
343
- {
344
- className: ["bg-olive-300/50", "black:bg-olive-500/50"],
345
- priority: "medium",
346
- themeColor: "olive"
347
- },
348
- {
349
- className: ["bg-olive-300/90", "black:bg-olive-500/80"],
350
- priority: "high",
351
- themeColor: "olive"
352
- },
353
- {
354
- className: ["bg-orange-300/20", "black:bg-orange-500/20"],
355
- priority: "low",
356
- themeColor: "orange"
357
- },
358
- {
359
- className: ["bg-orange-300/50", "black:bg-orange-500/50"],
360
- priority: "medium",
361
- themeColor: "orange"
362
- },
363
- {
364
- className: ["bg-orange-300/90", "black:bg-orange-500/80"],
365
- priority: "high",
366
- themeColor: "orange"
367
- },
368
- {
369
- className: ["bg-pink-300/20", "black:bg-pink-500/20"],
370
- priority: "low",
371
- themeColor: "pink"
372
- },
373
- {
374
- className: ["bg-pink-300/50", "black:bg-pink-500/50"],
375
- priority: "medium",
376
- themeColor: "pink"
377
- },
378
- {
379
- className: ["bg-pink-300/90", "black:bg-pink-500/80"],
380
- priority: "high",
381
- themeColor: "pink"
382
- },
383
- {
384
- className: ["bg-purple-300/20", "black:bg-purple-500/20"],
385
- priority: "low",
386
- themeColor: "purple"
387
- },
388
- {
389
- className: ["bg-purple-300/50", "black:bg-purple-500/50"],
390
- priority: "medium",
391
- themeColor: "purple"
392
- },
393
- {
394
- className: ["bg-purple-300/90", "black:bg-purple-500/80"],
395
- priority: "high",
396
- themeColor: "purple"
397
- },
398
- {
399
- className: ["bg-red-300/20", "black:bg-red-500/20"],
400
- priority: "low",
401
- themeColor: "red"
402
- },
403
- {
404
- className: ["bg-red-300/50", "black:bg-red-500/50"],
405
- priority: "medium",
406
- themeColor: "red"
407
- },
408
- {
409
- className: ["bg-red-300/90", "black:bg-red-500/80"],
410
- priority: "high",
411
- themeColor: "red"
412
- },
413
- {
414
- className: ["bg-teal-300/20", "black:bg-teal-500/20"],
415
- priority: "low",
416
- themeColor: "teal"
417
- },
418
- {
419
- className: ["bg-teal-300/50", "black:bg-teal-500/50"],
420
- priority: "medium",
421
- themeColor: "teal"
422
- },
423
- {
424
- className: ["bg-teal-300/90", "black:bg-teal-500/80"],
425
- priority: "high",
426
- themeColor: "teal"
427
- },
428
- {
429
- className: ["bg-yellow-300/20", "black:bg-yellow-500/20"],
430
- priority: "low",
431
- themeColor: "yellow"
432
- },
433
- {
434
- className: ["bg-yellow-300/50", "black:bg-yellow-500/50"],
435
- priority: "medium",
436
- themeColor: "yellow"
437
- },
438
- {
439
- className: ["bg-yellow-300/90", "black:bg-yellow-500/80"],
440
- priority: "high",
441
- themeColor: "yellow"
442
- },
443
- {
444
- className: ["bg-white/20", "black:bg-white/20"],
445
- priority: "low",
446
- themeColor: "white"
447
- },
448
- {
449
- className: ["bg-white/50", "black:bg-white/50", "black:text-black"],
450
- priority: "medium",
451
- themeColor: "white"
452
- },
453
- {
454
- className: ["bg-white/90", "black:bg-white/80", "black:text-black"],
455
- priority: "high",
456
- themeColor: "white"
457
- }
458
- ],
459
- defaultVariants: {
460
- height: 1,
461
- padding: "default",
462
- priority: "medium",
463
- themeColor: "unstyled",
464
- variant: "primary",
465
- width: "full"
466
- },
467
- variants: {
468
- height,
469
- padding: paddingValues,
470
- priority: priorities,
471
- themeColor: themeColors,
472
- variant: {
473
- primary: [],
474
- reset: ["bg-transparent", "rounded-none"],
475
- spacer: ["hidden"],
476
- unstyled: []
477
- },
478
- width
479
- }
480
- });
481
- var Item = ({
482
- as: Component = "div",
483
- children,
484
- className,
485
- height: height2,
486
- link: link2,
487
- padding,
488
- priority,
489
- themeColor,
490
- variant,
491
- width: width2,
492
- ...props
493
- }) => {
494
- return /* @__PURE__ */ jsx(
495
- Component,
496
- {
497
- className: item({
498
- className,
499
- height: height2,
500
- padding,
501
- priority,
502
- themeColor,
503
- variant,
504
- width: width2
505
- }),
506
- ...props,
507
- children: link2 ? /* @__PURE__ */ jsx(Link, { to: link2, children }) : children
508
- }
509
- );
510
- };
511
-
512
- export { Item, height, paddingValues, priorities, themeColors, width };
@@ -1,34 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- interface MapMarker {
4
- lat: number;
5
- lng: number;
6
- id: string;
7
- content?: string;
8
- htmlContent?: string;
9
- imageUrl?: string;
10
- imageAlt?: string;
11
- offset?: {
12
- x: number;
13
- y: number;
14
- };
15
- }
16
- interface LeafletMapProps {
17
- markers: MapMarker[];
18
- mapUrl: string;
19
- center?: {
20
- lat: number;
21
- lng: number;
22
- };
23
- zoom?: number;
24
- icon?: {
25
- iconUrl: string;
26
- iconSize: [number, number];
27
- iconAnchor: [number, number];
28
- };
29
- attribution?: string;
30
- showPopupsOnHover?: boolean;
31
- }
32
- declare const LeafletMap: ({ markers, mapUrl, center, zoom, icon, attribution, showPopupsOnHover, }: LeafletMapProps) => react_jsx_runtime.JSX.Element;
33
-
34
- export { LeafletMap, LeafletMap as default };