@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.
Files changed (202) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +5 -5
  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-current-route-data.js → use-current-route-data/index.js} +1 -1
  16. package/dist/hooks/{use-focus-search.js → use-focus-search/index.js} +1 -1
  17. package/dist/hooks/{use-matches-data.js → use-matches-data/index.js} +1 -1
  18. package/dist/hooks/{use-media-query.js → use-media-query/index.js} +1 -1
  19. package/dist/hooks/{use-mobile.js → use-mobile/index.js} +1 -1
  20. package/dist/hooks/use-nonce/index.d.ts +6 -0
  21. package/dist/hooks/use-nonce/index.js +8 -0
  22. package/dist/hooks/{use-orientation.d.ts → use-orientation/index.d.ts} +1 -1
  23. package/dist/hooks/{use-orientation.js → use-orientation/index.js} +1 -1
  24. package/dist/hooks/{use-user.js → use-user/index.js} +1 -1
  25. package/dist/{components/icon-button.js → icon-button/index.js} +1 -1
  26. package/dist/{components/if.js → if/index.js} +1 -1
  27. package/dist/{components/iframe.js → iframe/index.js} +2 -11
  28. package/dist/{components/link.d.ts → link/index.d.ts} +19 -13
  29. package/dist/{components/link.js → link/index.js} +31 -36
  30. package/dist/list/index.d.ts +69 -0
  31. package/dist/list/index.js +65 -0
  32. package/dist/{components/markdown-container.js → markdown-container/index.js} +3 -67
  33. package/dist/{components/password-input.js → password-input/index.js} +2 -11
  34. package/dist/{components/picture.js → picture/index.js} +2 -11
  35. package/dist/{components/protected-email.d.ts → protected-email/index.d.ts} +1 -1
  36. package/dist/{components/protected-email.js → protected-email/index.js} +1 -1
  37. package/dist/text/index.d.ts +20 -0
  38. package/dist/text/index.js +38 -0
  39. package/dist/utils/author/index.d.ts +3 -0
  40. package/dist/utils/author/index.js +33 -0
  41. package/dist/utils/text/index.d.ts +15 -0
  42. package/dist/utils/text/index.js +73 -0
  43. package/package.json +92 -121
  44. package/src/{stories/BackgroundSlideshow.stories.tsx → background-slideshow/background-slideshow.stories.tsx} +1 -1
  45. package/src/{components → background-slideshow}/background-slideshow.tsx +3 -1
  46. package/src/background-slideshow/index.ts +2 -0
  47. package/src/{stories/BlurryGradient.stories.tsx → blurry-gradient/blurry-gradient.stories.tsx} +1 -1
  48. package/src/{components → blurry-gradient}/blurry-gradient.tsx +14 -8
  49. package/src/blurry-gradient/index.ts +2 -0
  50. package/src/carousel/carousel-content.tsx +16 -0
  51. package/src/carousel/carousel-item.tsx +23 -0
  52. package/src/carousel/carousel-next.tsx +22 -0
  53. package/src/carousel/carousel-previous.tsx +22 -0
  54. package/src/{components/carousel.tsx → carousel/carousel-root.tsx} +8 -78
  55. package/src/carousel/carousel.stories.tsx +89 -0
  56. package/src/carousel/index.parts.ts +5 -0
  57. package/src/carousel/index.ts +4 -0
  58. package/src/{stories/Countdown.stories.tsx → countdown/countdown.stories.tsx} +1 -1
  59. package/src/{components → countdown}/countdown.tsx +3 -7
  60. package/src/countdown/index.ts +1 -0
  61. package/src/{stories/GenericError.stories.tsx → generic-error/generic-error.stories.tsx} +1 -1
  62. package/src/{components → generic-error}/generic-error.tsx +2 -0
  63. package/src/generic-error/index.ts +2 -0
  64. package/src/grid/grid-item.tsx +188 -0
  65. package/src/grid/grid-root.tsx +72 -0
  66. package/src/grid/grid.stories.tsx +236 -0
  67. package/src/grid/index.parts.ts +2 -0
  68. package/src/grid/index.ts +5 -0
  69. package/src/{stories/Heading.stories.tsx → heading/heading.stories.tsx} +1 -1
  70. package/src/{components → heading}/heading.tsx +17 -25
  71. package/src/heading/index.ts +2 -0
  72. package/src/{stories/Highlight.stories.tsx → highlight/highlight.stories.tsx} +1 -1
  73. package/src/{components → highlight}/highlight.tsx +13 -9
  74. package/src/highlight/index.ts +2 -0
  75. package/src/hooks/use-current-route-data/index.ts +1 -0
  76. package/src/hooks/use-focus-search/index.ts +1 -0
  77. package/src/hooks/use-matches-data/index.ts +1 -0
  78. package/src/hooks/use-media-query/index.ts +1 -0
  79. package/src/hooks/use-mobile/index.ts +1 -0
  80. package/src/hooks/use-nonce/index.ts +1 -0
  81. package/src/hooks/use-orientation/index.ts +1 -0
  82. package/src/hooks/use-user/index.ts +2 -0
  83. package/src/{stories/IconButton.stories.tsx → icon-button/icon-button.stories.tsx} +1 -1
  84. package/src/icon-button/index.ts +2 -0
  85. package/src/{stories/If.stories.tsx → if/if.stories.tsx} +1 -1
  86. package/src/if/index.ts +1 -0
  87. package/src/{stories/Iframe.stories.tsx → iframe/iframe.stories.tsx} +1 -1
  88. package/src/{components → iframe}/iframe.tsx +1 -1
  89. package/src/iframe/index.ts +2 -0
  90. package/src/link/index.ts +2 -0
  91. package/src/{stories/Link.stories.tsx → link/link.stories.tsx} +1 -1
  92. package/src/{components → link}/link.tsx +39 -28
  93. package/src/list/index.parts.ts +2 -0
  94. package/src/list/index.ts +4 -0
  95. package/src/list/list-item.tsx +63 -0
  96. package/src/list/list-root-context.ts +21 -0
  97. package/src/list/list-root.tsx +81 -0
  98. package/src/list/list.css +32 -0
  99. package/src/list/list.stories.tsx +119 -0
  100. package/src/list/list.test.tsx +168 -0
  101. package/src/markdown-container/index.ts +2 -0
  102. package/src/{stories/MarkdownContainer.stories.tsx → markdown-container/markdown-container.stories.tsx} +1 -1
  103. package/src/{components → markdown-container}/markdown-container.tsx +3 -1
  104. package/src/password-input/index.ts +2 -0
  105. package/src/{stories/PasswordInput.stories.tsx → password-input/password-input.stories.tsx} +1 -1
  106. package/src/{components → password-input}/password-input.tsx +4 -4
  107. package/src/picture/index.ts +2 -0
  108. package/src/{stories/Picture.stories.tsx → picture/picture.stories.tsx} +1 -1
  109. package/src/{components → picture}/picture.tsx +2 -4
  110. package/src/protected-email/index.ts +2 -0
  111. package/src/{stories/ProtectedEmail.stories.tsx → protected-email/protected-email.stories.tsx} +1 -1
  112. package/src/{components → protected-email}/protected-email.tsx +3 -1
  113. package/src/tailwind.css +10 -0
  114. package/src/text/index.ts +2 -0
  115. package/src/{stories/Text.stories.tsx → text/text.stories.tsx} +1 -1
  116. package/src/text/text.tsx +46 -0
  117. package/src/utils/author/author.tsx +36 -0
  118. package/src/utils/author/index.ts +1 -0
  119. package/src/utils/text/index.ts +1 -0
  120. package/src/utils/text/text.tsx +103 -0
  121. package/dist/components/box.d.ts +0 -20
  122. package/dist/components/box.js +0 -50
  123. package/dist/components/definition-list.d.ts +0 -43
  124. package/dist/components/definition-list.js +0 -89
  125. package/dist/components/heading.d.ts +0 -27
  126. package/dist/components/highlight.d.ts +0 -19
  127. package/dist/components/item.d.ts +0 -70
  128. package/dist/components/item.js +0 -512
  129. package/dist/components/leaflet-map.d.ts +0 -34
  130. package/dist/components/leaflet-map.js +0 -201
  131. package/dist/components/list-item.d.ts +0 -19
  132. package/dist/components/list-item.js +0 -37
  133. package/dist/components/maptiler-map.d.ts +0 -27
  134. package/dist/components/maptiler-map.js +0 -129
  135. package/dist/components/text.d.ts +0 -20
  136. package/dist/components/text.js +0 -45
  137. package/dist/components/unordered-list.d.ts +0 -19
  138. package/dist/components/unordered-list.js +0 -39
  139. package/dist/hooks/use-nonce.d.ts +0 -12
  140. package/dist/hooks/use-nonce.js +0 -13
  141. package/dist/utils/author.d.ts +0 -9
  142. package/dist/utils/author.js +0 -55
  143. package/dist/utils/cn.d.ts +0 -9
  144. package/dist/utils/cn.js +0 -14
  145. package/dist/utils/is-route-active.d.ts +0 -19
  146. package/dist/utils/is-route-active.js +0 -56
  147. package/dist/utils/text.d.ts +0 -24
  148. package/dist/utils/text.js +0 -127
  149. package/src/components/box.tsx +0 -45
  150. package/src/components/definition-list.tsx +0 -90
  151. package/src/components/item.tsx +0 -340
  152. package/src/components/leaflet-map.tsx +0 -294
  153. package/src/components/link.test.tsx +0 -387
  154. package/src/components/list-item.tsx +0 -30
  155. package/src/components/maptiler-map.tsx +0 -181
  156. package/src/components/text.tsx +0 -38
  157. package/src/components/unordered-list.tsx +0 -32
  158. package/src/hooks/use-nonce.test.ts +0 -35
  159. package/src/stories/Box.stories.tsx +0 -83
  160. package/src/stories/Carousel.stories.tsx +0 -95
  161. package/src/stories/DefinitionList.stories.tsx +0 -51
  162. package/src/stories/Item.stories.tsx +0 -79
  163. package/src/stories/ListItem.stories.tsx +0 -38
  164. package/src/stories/UnorderedList.stories.tsx +0 -73
  165. package/src/styles/tailwind.css +0 -7
  166. package/src/test-setup.ts +0 -1
  167. package/src/utils/author.test.ts +0 -54
  168. package/src/utils/author.tsx +0 -73
  169. package/src/utils/cn.test.ts +0 -48
  170. package/src/utils/cn.ts +0 -14
  171. package/src/utils/is-route-active.test.ts +0 -80
  172. package/src/utils/is-route-active.ts +0 -100
  173. package/src/utils/text.test.ts +0 -152
  174. package/src/utils/text.tsx +0 -209
  175. package/src/vite-env.d.ts +0 -1
  176. /package/dist/{components/background-slideshow.d.ts → background-slideshow/index.d.ts} +0 -0
  177. /package/dist/{components/blurry-gradient.d.ts → blurry-gradient/index.d.ts} +0 -0
  178. /package/dist/{components/countdown.d.ts → countdown/index.d.ts} +0 -0
  179. /package/dist/{components/generic-error.d.ts → generic-error/index.d.ts} +0 -0
  180. /package/dist/hooks/{use-current-route-data.d.ts → use-current-route-data/index.d.ts} +0 -0
  181. /package/dist/hooks/{use-focus-search.d.ts → use-focus-search/index.d.ts} +0 -0
  182. /package/dist/hooks/{use-matches-data.d.ts → use-matches-data/index.d.ts} +0 -0
  183. /package/dist/hooks/{use-media-query.d.ts → use-media-query/index.d.ts} +0 -0
  184. /package/dist/hooks/{use-mobile.d.ts → use-mobile/index.d.ts} +0 -0
  185. /package/dist/hooks/{use-user.d.ts → use-user/index.d.ts} +0 -0
  186. /package/dist/{components/icon-button.d.ts → icon-button/index.d.ts} +0 -0
  187. /package/dist/{components/if.d.ts → if/index.d.ts} +0 -0
  188. /package/dist/{components/iframe.d.ts → iframe/index.d.ts} +0 -0
  189. /package/dist/{components/markdown-container.d.ts → markdown-container/index.d.ts} +0 -0
  190. /package/dist/{components/password-input.d.ts → password-input/index.d.ts} +0 -0
  191. /package/dist/{components/picture.d.ts → picture/index.d.ts} +0 -0
  192. /package/src/hooks/{use-current-route-data.ts → use-current-route-data/use-current-route-data.ts} +0 -0
  193. /package/src/hooks/{use-focus-search.ts → use-focus-search/use-focus-search.ts} +0 -0
  194. /package/src/hooks/{use-matches-data.ts → use-matches-data/use-matches-data.ts} +0 -0
  195. /package/src/hooks/{use-media-query.ts → use-media-query/use-media-query.ts} +0 -0
  196. /package/src/hooks/{use-mobile.ts → use-mobile/use-mobile.ts} +0 -0
  197. /package/src/hooks/{use-nonce.ts → use-nonce/use-nonce.ts} +0 -0
  198. /package/src/hooks/{use-orientation.ts → use-orientation/use-orientation.ts} +0 -0
  199. /package/src/hooks/{use-user.tsx → use-user/use-user.tsx} +0 -0
  200. /package/src/{components → icon-button}/icon-button.tsx +0 -0
  201. /package/src/{components → if}/if.tsx +0 -0
  202. /package/src/{styles/storybook.css → storybook.css} +0 -0
@@ -1,89 +0,0 @@
1
- import { defineConfig } from 'cva';
2
- import { twMerge } from 'fluid-tailwindcss/tailwind-merge';
3
- import { jsx } from 'react/jsx-runtime';
4
-
5
- // src/utils/cn.ts
6
- var { cva, compose } = defineConfig({
7
- hooks: {
8
- onComplete: (className) => {
9
- return twMerge(className);
10
- }
11
- }
12
- });
13
- var dl = cva({
14
- base: ["grid"],
15
- defaultVariants: {
16
- variant: "primary"
17
- },
18
- variants: {
19
- variant: {
20
- primary: ["grid-cols-[auto,1fr]", "gap-x-s", "gap-y-2xs"],
21
- // Two-column grid with gap
22
- unstyled: ["list-none", "p-0", "grid-cols-1"]
23
- // Unstyled, single column
24
- }
25
- }
26
- });
27
- var dt = cva({
28
- base: [],
29
- defaultVariants: {
30
- variant: "primary"
31
- },
32
- variants: {
33
- variant: {
34
- primary: ["uppercase", "tracking-wide"]
35
- }
36
- }
37
- });
38
- var dd = cva({
39
- base: ["mb-xs"],
40
- defaultVariants: {
41
- variant: "primary"
42
- },
43
- variants: {
44
- variant: {
45
- primary: []
46
- }
47
- }
48
- });
49
- var DefinitionList = (props) => {
50
- const { children, className, variant } = props;
51
- return /* @__PURE__ */ jsx(
52
- "dl",
53
- {
54
- className: dl({
55
- className,
56
- variant
57
- }),
58
- children
59
- }
60
- );
61
- };
62
- var Dt = (props) => {
63
- const { children, className, variant } = props;
64
- return /* @__PURE__ */ jsx(
65
- "dt",
66
- {
67
- className: dt({
68
- className,
69
- variant
70
- }),
71
- children
72
- }
73
- );
74
- };
75
- var Dd = (props) => {
76
- const { children, className, variant } = props;
77
- return /* @__PURE__ */ jsx(
78
- "dd",
79
- {
80
- className: dd({
81
- className,
82
- variant
83
- }),
84
- children
85
- }
86
- );
87
- };
88
-
89
- export { Dd, DefinitionList, Dt };
@@ -1,27 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as cva from 'cva';
3
- import { VariantProps } from 'cva';
4
- import { HTMLAttributes, ElementType } from 'react';
5
-
6
- declare const heading: (props?: ({
7
- level?: 1 | 2 | 3 | 4 | 5 | 6 | undefined;
8
- variant?: undefined;
9
- } & ({
10
- class?: cva.ClassValue;
11
- className?: never;
12
- } | {
13
- class?: never;
14
- className?: cva.ClassValue;
15
- })) | undefined) => string;
16
- interface HeadingProps extends HTMLAttributes<HTMLHeadingElement>, VariantProps<typeof heading> {
17
- as?: ElementType;
18
- className?: string;
19
- locale?: string;
20
- }
21
- type HeadingLevel = HeadingProps['level'];
22
- declare const Heading: {
23
- ({ as, children, className, level, variant, ...props }: HeadingProps): react_jsx_runtime.JSX.Element;
24
- displayName: string;
25
- };
26
-
27
- export { Heading, type HeadingLevel, type HeadingProps };
@@ -1,19 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as cva from 'cva';
3
- import { VariantProps } from 'cva';
4
- import { ComponentProps } from 'react';
5
-
6
- declare const li: (props?: ({
7
- variant?: "primary" | undefined;
8
- } & ({
9
- class?: cva.ClassValue;
10
- className?: never;
11
- } | {
12
- class?: never;
13
- className?: cva.ClassValue;
14
- })) | undefined) => string;
15
- interface HighlightProps extends ComponentProps<'mark'>, VariantProps<typeof li> {
16
- }
17
- declare const Highlight: (props: HighlightProps) => react_jsx_runtime.JSX.Element;
18
-
19
- export { Highlight, type HighlightProps };
@@ -1,70 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as cva from 'cva';
3
- import { VariantProps } from 'cva';
4
- import { ComponentProps, ElementType } from 'react';
5
-
6
- declare const priorities: {
7
- high: never[];
8
- low: never[];
9
- medium: never[];
10
- };
11
- declare const paddingValues: {
12
- default: string;
13
- gutter: string;
14
- };
15
- declare const width: {
16
- full: string[];
17
- lg: string[];
18
- md: string[];
19
- sm: string[];
20
- xl: string[];
21
- xs: string[];
22
- };
23
- declare const height: {
24
- 1: string[];
25
- 2: string[];
26
- 3: string[];
27
- 4: string[];
28
- 5: string[];
29
- 6: string[];
30
- };
31
- declare const themeColors: {
32
- black: never[];
33
- blue: never[];
34
- coral: never[];
35
- cyan: never[];
36
- gray: never[];
37
- green: never[];
38
- lime: never[];
39
- neutral: never[];
40
- olive: never[];
41
- orange: never[];
42
- pink: never[];
43
- purple: never[];
44
- red: never[];
45
- teal: never[];
46
- unstyled: never[];
47
- white: never[];
48
- yellow: never[];
49
- };
50
- declare const item: (props?: ({
51
- height?: 1 | 2 | 3 | 4 | 5 | 6 | undefined;
52
- padding?: "default" | "gutter" | undefined;
53
- priority?: "high" | "low" | "medium" | undefined;
54
- themeColor?: "black" | "blue" | "coral" | "cyan" | "gray" | "green" | "lime" | "olive" | "orange" | "pink" | "purple" | "red" | "teal" | "white" | "yellow" | "unstyled" | "neutral" | undefined;
55
- variant?: "primary" | "reset" | "spacer" | "unstyled" | undefined;
56
- width?: "full" | "lg" | "md" | "sm" | "xl" | "xs" | undefined;
57
- } & ({
58
- class?: cva.ClassValue;
59
- className?: never;
60
- } | {
61
- class?: never;
62
- className?: cva.ClassValue;
63
- })) | undefined) => string;
64
- interface ItemProps extends ComponentProps<'div'>, VariantProps<typeof item> {
65
- as?: ElementType;
66
- link?: string;
67
- }
68
- declare const Item: ({ as: Component, children, className, height, link, padding, priority, themeColor, variant, width, ...props }: ItemProps) => react_jsx_runtime.JSX.Element;
69
-
70
- export { Item, type ItemProps, height, paddingValues, priorities, themeColors, width };
@@ -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 };