@regardio/react 0.6.0 → 0.7.3

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 (102) hide show
  1. package/dist/background-slideshow/index.d.mts +1 -3
  2. package/dist/blurry-gradient/index.d.mts +4 -5
  3. package/dist/button/index.d.mts +1 -1
  4. package/dist/carousel/index.d.mts +42 -8
  5. package/dist/carousel/index.mjs +11 -16
  6. package/dist/checkbox/index.d.mts +7 -16
  7. package/dist/checkbox-group/index.d.mts +3 -4
  8. package/dist/countdown/index.d.mts +1 -3
  9. package/dist/field/index.d.mts +40 -38
  10. package/dist/fieldset/index.d.mts +15 -14
  11. package/dist/form/index.d.mts +2 -3
  12. package/dist/generic-error/index.d.mts +20 -23
  13. package/dist/grid/index.d.mts +77 -1173
  14. package/dist/grid/index.mjs +5 -7
  15. package/dist/heading/index.d.mts +7 -11
  16. package/dist/heading/index.mjs +2 -3
  17. package/dist/highlight/index.d.mts +2 -3
  18. package/dist/hooks/use-current-route-data.d.mts +4 -4
  19. package/dist/hooks/use-current-route-data.mjs +3 -1
  20. package/dist/hooks/use-focus-search.mjs +2 -0
  21. package/dist/hooks/use-matches-data.d.mts +5 -5
  22. package/dist/hooks/use-matches-data.mjs +2 -0
  23. package/dist/hooks/use-media-query.d.mts +4 -4
  24. package/dist/hooks/use-media-query.mjs +2 -0
  25. package/dist/hooks/use-mobile.mjs +2 -0
  26. package/dist/hooks/use-nonce.d.mts +2 -4
  27. package/dist/hooks/use-orientation.d.mts +6 -6
  28. package/dist/hooks/use-orientation.mjs +2 -0
  29. package/dist/hooks/use-user.d.mts +23 -25
  30. package/dist/icon-button/index.d.mts +4 -5
  31. package/dist/if/index.d.mts +2 -4
  32. package/dist/if/index.mjs +4 -4
  33. package/dist/{index-Bm-tWhsb.d.mts → index-Bj5_XfEC.d.mts} +2 -3
  34. package/dist/{index-YT2CkvL6.d.mts → index-C_evL5vG.d.mts} +4 -5
  35. package/dist/input/index.d.mts +1 -1
  36. package/dist/link/index.d.mts +9 -11
  37. package/dist/link/index.mjs +3 -3
  38. package/dist/list/index.d.mts +39 -38
  39. package/dist/list/index.mjs +7 -7
  40. package/dist/markdown-container/index.d.mts +1 -1
  41. package/dist/markdown-container/index.mjs +1 -1
  42. package/dist/password-input/index.d.mts +4 -5
  43. package/dist/picture/index.d.mts +10 -10
  44. package/dist/protected-email/index.d.mts +9 -11
  45. package/dist/radio/index.d.mts +7 -16
  46. package/dist/radio-group/index.d.mts +3 -4
  47. package/dist/slider/index.d.mts +19 -41
  48. package/dist/switch/index.d.mts +7 -16
  49. package/dist/text/index.d.mts +2 -3
  50. package/dist/{text-CPlUND-Z.mjs → text-EQC4zJbE.mjs} +7 -13
  51. package/dist/toggle/index.d.mts +4 -38
  52. package/dist/utils/text/index.d.mts +5 -5
  53. package/dist/utils/text/index.mjs +1 -1
  54. package/package.json +170 -11
  55. package/src/background-slideshow/background-slideshow.tsx +1 -2
  56. package/src/blurry-gradient/blurry-gradient.tsx +1 -1
  57. package/src/button/button.stories.tsx +1 -1
  58. package/src/button/button.tsx +7 -1
  59. package/src/carousel/carousel-content.tsx +17 -14
  60. package/src/carousel/carousel-item.tsx +18 -18
  61. package/src/carousel/carousel-next.tsx +21 -16
  62. package/src/carousel/carousel-previous.tsx +21 -16
  63. package/src/carousel/carousel-root.tsx +91 -86
  64. package/src/checkbox/checkbox.tsx +14 -3
  65. package/src/checkbox-group/checkbox-group.tsx +1 -1
  66. package/src/countdown/countdown.tsx +1 -1
  67. package/src/field/field.stories.tsx +1 -1
  68. package/src/field/field.tsx +27 -6
  69. package/src/fieldset/fieldset.stories.tsx +1 -1
  70. package/src/fieldset/fieldset.tsx +14 -3
  71. package/src/form/form.stories.tsx +1 -1
  72. package/src/form/form.tsx +1 -1
  73. package/src/generic-error/generic-error.tsx +2 -3
  74. package/src/grid/grid-item.tsx +77 -36
  75. package/src/grid/grid-root.tsx +49 -22
  76. package/src/heading/heading.tsx +7 -3
  77. package/src/highlight/highlight.tsx +1 -1
  78. package/src/hooks/use-current-route-data.ts +4 -2
  79. package/src/hooks/use-focus-search.ts +3 -1
  80. package/src/hooks/use-matches-data.ts +2 -0
  81. package/src/hooks/use-media-query.ts +2 -0
  82. package/src/hooks/use-mobile.ts +3 -1
  83. package/src/hooks/use-nonce.ts +3 -3
  84. package/src/hooks/use-orientation.ts +2 -0
  85. package/src/hooks/use-user.tsx +3 -2
  86. package/src/icon-button/icon-button.tsx +1 -1
  87. package/src/if/if.tsx +3 -1
  88. package/src/input/input.stories.tsx +1 -1
  89. package/src/input/input.tsx +1 -1
  90. package/src/link/link.tsx +4 -3
  91. package/src/list/list-item.tsx +10 -13
  92. package/src/list/list-root-context.ts +3 -3
  93. package/src/list/list-root.tsx +10 -13
  94. package/src/password-input/password-input.tsx +1 -1
  95. package/src/protected-email/protected-email.tsx +6 -1
  96. package/src/radio/radio.tsx +14 -3
  97. package/src/radio-group/radio-group.tsx +5 -1
  98. package/src/slider/slider.tsx +29 -7
  99. package/src/switch/switch.tsx +14 -3
  100. package/src/text/text.tsx +6 -1
  101. package/src/toggle/toggle.tsx +3 -3
  102. package/src/utils/text/text.tsx +8 -16
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../chunk-BTpB_u-K.mjs";
2
- import { createContext, forwardRef, useContext, useMemo } from "react";
2
+ import { createContext, useContext, useMemo } from "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
 
5
5
  //#region src/list/list-root-context.ts
@@ -10,9 +10,9 @@ function useListRootContext() {
10
10
 
11
11
  //#endregion
12
12
  //#region src/list/list-item.tsx
13
- function ListItemImpl(props, ref) {
13
+ function ListItemImpl(props) {
14
14
  const context = useListRootContext();
15
- const { render, children, className, ...elementProps } = props;
15
+ const { render, children, className, ref, ...elementProps } = props;
16
16
  return /* @__PURE__ */ jsx(render ?? context?.defaultItemElement ?? "li", {
17
17
  className: context?.defaultItemClassName ? className ? `${context.defaultItemClassName} ${className}` : context.defaultItemClassName : className,
18
18
  ref,
@@ -20,12 +20,12 @@ function ListItemImpl(props, ref) {
20
20
  children
21
21
  });
22
22
  }
23
- const ListItem = forwardRef(ListItemImpl);
23
+ const ListItem = ListItemImpl;
24
24
 
25
25
  //#endregion
26
26
  //#region src/list/list-root.tsx
27
- function ListRootImpl(props, ref) {
28
- const { render = "ul", children, defaultItemElement, defaultItemClassName, ...elementProps } = props;
27
+ function ListRootImpl(props) {
28
+ const { render = "ul", children, defaultItemElement, defaultItemClassName, ref, ...elementProps } = props;
29
29
  const resolvedDefaultItemElement = defaultItemElement ?? (render === "dl" ? "dd" : "li");
30
30
  const contextValue = useMemo(() => ({
31
31
  defaultItemClassName,
@@ -41,7 +41,7 @@ function ListRootImpl(props, ref) {
41
41
  })
42
42
  });
43
43
  }
44
- const ListRoot = forwardRef(ListRootImpl);
44
+ const ListRoot = ListRootImpl;
45
45
 
46
46
  //#endregion
47
47
  //#region src/list/index.parts.ts
@@ -8,7 +8,7 @@ declare function transformLink(to: string | Partial<{
8
8
  hash?: string;
9
9
  }> | undefined): string;
10
10
  type MDXComponent<P = object> = React.ComponentType<P>;
11
- type MarkdownOverrides = MarkdownToJSX.Options['overrides'];
11
+ type MarkdownOverrides = MarkdownToJSX.Options["overrides"];
12
12
  type MarkdownContainerProps = React.PropsWithChildren<{
13
13
  characters?: number;
14
14
  className?: string;
@@ -1,4 +1,4 @@
1
- import { n as replaceSpecialChars } from "../text-CPlUND-Z.mjs";
1
+ import { n as replaceSpecialChars } from "../text-EQC4zJbE.mjs";
2
2
  import { cn } from "@regardio/tailwind/utils";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { MDXProvider } from "@mdx-js/react";
@@ -1,5 +1,4 @@
1
- import { t as Input } from "../index-Bm-tWhsb.mjs";
2
- import * as react_jsx_runtime28 from "react/jsx-runtime";
1
+ import { t as Input } from "../index-Bj5_XfEC.mjs";
3
2
 
4
3
  //#region src/password-input/password-input.d.ts
5
4
  declare const passwordInputVariants: {
@@ -7,10 +6,10 @@ declare const passwordInputVariants: {
7
6
  readonly withToggle: readonly [];
8
7
  };
9
8
  type PasswordInputVariant = keyof typeof passwordInputVariants;
10
- interface PasswordInputProps extends Omit<React.ComponentProps<typeof Input>, 'type' | 'variant'> {
9
+ interface PasswordInputProps extends Omit<React.ComponentProps<typeof Input>, "type" | "variant"> {
11
10
  className?: string;
12
11
  variant?: PasswordInputVariant;
13
- inputVariant?: 'default' | 'error' | 'success';
12
+ inputVariant?: "default" | "error" | "success";
14
13
  showToggle?: boolean;
15
14
  }
16
15
  declare const PasswordInput: ({
@@ -19,6 +18,6 @@ declare const PasswordInput: ({
19
18
  inputVariant,
20
19
  showToggle,
21
20
  ...props
22
- }: PasswordInputProps) => react_jsx_runtime28.JSX.Element;
21
+ }: PasswordInputProps) => React.JSX.Element;
23
22
  //#endregion
24
23
  export { PasswordInput, type PasswordInputProps };
@@ -24,16 +24,16 @@ interface PictureProps {
24
24
  sizes?: string;
25
25
  }
26
26
  /**
27
- * Generic Picture component that works with any image provider
28
- *
29
- * @param alt - Alt text for the image
30
- * @param baseUrl - Base URL with optional placeholder (e.g., 'https://example.com/images/{format}/image.jpg')
31
- * @param className - Optional class for the picture element
32
- * @param formats - Custom formats with size and width
33
- * @param imgClassName - Optional class for the img element
34
- * @param placeholder - Placeholder to replace in baseUrl (default: '{format}')
35
- * @param sizes - Custom sizes attribute
36
- */
27
+ * Generic Picture component that works with any image provider
28
+ *
29
+ * @param alt - Alt text for the image
30
+ * @param baseUrl - Base URL with optional placeholder (e.g., 'https://example.com/images/{format}/image.jpg')
31
+ * @param className - Optional class for the picture element
32
+ * @param formats - Custom formats with size and width
33
+ * @param imgClassName - Optional class for the img element
34
+ * @param placeholder - Placeholder to replace in baseUrl (default: '{format}')
35
+ * @param sizes - Custom sizes attribute
36
+ */
37
37
  declare const Picture: React.FC<PictureProps>;
38
38
  //#endregion
39
39
  export { type ImageFormat, Picture, type PictureProps, screenSizeVariants };
@@ -1,5 +1,3 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
-
3
1
  //#region src/protected-email/protected-email.d.ts
4
2
  interface ProtectedEmailProps {
5
3
  username: string;
@@ -8,19 +6,19 @@ interface ProtectedEmailProps {
8
6
  className?: string;
9
7
  }
10
8
  /**
11
- * ProtectedEmail component that obfuscates email addresses to protect from scrapers.
12
- * The email is only assembled client-side with JavaScript, making it harder for scrapers to extract.
13
- *
14
- * @param username - The part before the @ symbol
15
- * @param domain - The part after the @ symbol
16
- * @param text - Optional display text (defaults to username(at)domain)
17
- * @param className - Optional CSS class name
18
- */
9
+ * ProtectedEmail component that obfuscates email addresses to protect from scrapers.
10
+ * The email is only assembled client-side with JavaScript, making it harder for scrapers to extract.
11
+ *
12
+ * @param username - The part before the @ symbol
13
+ * @param domain - The part after the @ symbol
14
+ * @param text - Optional display text (defaults to username(at)domain)
15
+ * @param className - Optional CSS class name
16
+ */
19
17
  declare function ProtectedEmail({
20
18
  username,
21
19
  domain,
22
20
  text,
23
21
  className
24
- }: ProtectedEmailProps): react_jsx_runtime0.JSX.Element;
22
+ }: ProtectedEmailProps): React.JSX.Element;
25
23
  //#endregion
26
24
  export { ProtectedEmail, type ProtectedEmailProps };
@@ -1,37 +1,28 @@
1
1
  import { ComponentProps } from "react";
2
- import * as react_jsx_runtime24 from "react/jsx-runtime";
3
2
  import { Radio as Radio$1 } from "@base-ui/react/radio";
4
3
 
5
4
  //#region src/radio/radio.d.ts
6
- type RadioSize = 'sm' | 'md' | 'lg';
7
- interface RadioRootProps extends Omit<ComponentProps<typeof Radio$1.Root>, 'className'> {
5
+ type RadioSize = "sm" | "md" | "lg";
6
+ interface RadioRootProps extends Omit<ComponentProps<typeof Radio$1.Root>, "className"> {
8
7
  className?: string;
9
8
  size?: RadioSize;
10
9
  }
11
- interface RadioIndicatorProps extends Omit<ComponentProps<typeof Radio$1.Indicator>, 'className'> {
10
+ interface RadioIndicatorProps extends Omit<ComponentProps<typeof Radio$1.Indicator>, "className"> {
12
11
  className?: string;
13
12
  }
14
13
  declare const RadioRoot: ({
15
14
  className,
16
15
  size,
17
16
  ...props
18
- }: RadioRootProps) => react_jsx_runtime24.JSX.Element;
17
+ }: RadioRootProps) => React.JSX.Element;
19
18
  declare const RadioIndicator: ({
20
19
  className,
21
20
  children,
22
21
  ...props
23
- }: RadioIndicatorProps) => react_jsx_runtime24.JSX.Element;
22
+ }: RadioIndicatorProps) => React.JSX.Element;
24
23
  declare const Radio: {
25
- Indicator: ({
26
- className,
27
- children,
28
- ...props
29
- }: RadioIndicatorProps) => react_jsx_runtime24.JSX.Element;
30
- Root: ({
31
- className,
32
- size,
33
- ...props
34
- }: RadioRootProps) => react_jsx_runtime24.JSX.Element;
24
+ Indicator: typeof RadioIndicator;
25
+ Root: typeof RadioRoot;
35
26
  };
36
27
  //#endregion
37
28
  export { Radio, RadioIndicator, type RadioIndicatorProps, RadioRoot, type RadioRootProps, type RadioSize };
@@ -1,10 +1,9 @@
1
1
  import { ComponentProps } from "react";
2
- import * as react_jsx_runtime29 from "react/jsx-runtime";
3
2
  import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
4
3
 
5
4
  //#region src/radio-group/radio-group.d.ts
6
- type RadioGroupOrientation = 'horizontal' | 'vertical';
7
- interface RadioGroupProps extends Omit<ComponentProps<typeof RadioGroup$1>, 'className'> {
5
+ type RadioGroupOrientation = "horizontal" | "vertical";
6
+ interface RadioGroupProps extends Omit<ComponentProps<typeof RadioGroup$1>, "className"> {
8
7
  className?: string;
9
8
  orientation?: RadioGroupOrientation;
10
9
  }
@@ -12,6 +11,6 @@ declare const RadioGroup: ({
12
11
  className,
13
12
  orientation,
14
13
  ...props
15
- }: RadioGroupProps) => react_jsx_runtime29.JSX.Element;
14
+ }: RadioGroupProps) => React.JSX.Element;
16
15
  //#endregion
17
16
  export { RadioGroup, type RadioGroupOrientation, type RadioGroupProps };
@@ -1,85 +1,63 @@
1
1
  import { ComponentProps } from "react";
2
- import * as react_jsx_runtime31 from "react/jsx-runtime";
3
2
  import { Slider as Slider$1 } from "@base-ui/react/slider";
4
3
 
5
4
  //#region src/slider/slider.d.ts
6
- type SliderSize = 'sm' | 'md' | 'lg';
7
- interface SliderRootProps extends Omit<ComponentProps<typeof Slider$1.Root>, 'className'> {
5
+ type SliderSize = "sm" | "md" | "lg";
6
+ interface SliderRootProps extends Omit<ComponentProps<typeof Slider$1.Root>, "className"> {
8
7
  className?: string;
9
8
  size?: SliderSize;
10
9
  }
11
- interface SliderControlProps extends Omit<ComponentProps<typeof Slider$1.Control>, 'className'> {
10
+ interface SliderControlProps extends Omit<ComponentProps<typeof Slider$1.Control>, "className"> {
12
11
  className?: string;
13
12
  }
14
- interface SliderTrackProps extends Omit<ComponentProps<typeof Slider$1.Track>, 'className'> {
13
+ interface SliderTrackProps extends Omit<ComponentProps<typeof Slider$1.Track>, "className"> {
15
14
  className?: string;
16
15
  size?: SliderSize;
17
16
  }
18
- interface SliderIndicatorProps extends Omit<ComponentProps<typeof Slider$1.Indicator>, 'className'> {
17
+ interface SliderIndicatorProps extends Omit<ComponentProps<typeof Slider$1.Indicator>, "className"> {
19
18
  className?: string;
20
19
  }
21
- interface SliderThumbProps extends Omit<ComponentProps<typeof Slider$1.Thumb>, 'className'> {
20
+ interface SliderThumbProps extends Omit<ComponentProps<typeof Slider$1.Thumb>, "className"> {
22
21
  className?: string;
23
22
  size?: SliderSize;
24
23
  }
25
- interface SliderValueProps extends Omit<ComponentProps<typeof Slider$1.Value>, 'className'> {
24
+ interface SliderValueProps extends Omit<ComponentProps<typeof Slider$1.Value>, "className"> {
26
25
  className?: string;
27
26
  }
28
27
  declare const SliderRoot: ({
29
28
  className,
30
29
  size,
31
30
  ...props
32
- }: SliderRootProps) => react_jsx_runtime31.JSX.Element;
31
+ }: SliderRootProps) => React.JSX.Element;
33
32
  declare const SliderControl: ({
34
33
  className,
35
34
  ...props
36
- }: SliderControlProps) => react_jsx_runtime31.JSX.Element;
35
+ }: SliderControlProps) => React.JSX.Element;
37
36
  declare const SliderTrack: ({
38
37
  className,
39
38
  size,
40
39
  ...props
41
- }: SliderTrackProps) => react_jsx_runtime31.JSX.Element;
40
+ }: SliderTrackProps) => React.JSX.Element;
42
41
  declare const SliderIndicator: ({
43
42
  className,
44
43
  ...props
45
- }: SliderIndicatorProps) => react_jsx_runtime31.JSX.Element;
44
+ }: SliderIndicatorProps) => React.JSX.Element;
46
45
  declare const SliderThumb: ({
47
46
  className,
48
47
  size,
49
48
  ...props
50
- }: SliderThumbProps) => react_jsx_runtime31.JSX.Element;
49
+ }: SliderThumbProps) => React.JSX.Element;
51
50
  declare const SliderValue: ({
52
51
  className,
53
52
  ...props
54
- }: SliderValueProps) => react_jsx_runtime31.JSX.Element;
53
+ }: SliderValueProps) => React.JSX.Element;
55
54
  declare const Slider: {
56
- Control: ({
57
- className,
58
- ...props
59
- }: SliderControlProps) => react_jsx_runtime31.JSX.Element;
60
- Indicator: ({
61
- className,
62
- ...props
63
- }: SliderIndicatorProps) => react_jsx_runtime31.JSX.Element;
64
- Root: ({
65
- className,
66
- size,
67
- ...props
68
- }: SliderRootProps) => react_jsx_runtime31.JSX.Element;
69
- Thumb: ({
70
- className,
71
- size,
72
- ...props
73
- }: SliderThumbProps) => react_jsx_runtime31.JSX.Element;
74
- Track: ({
75
- className,
76
- size,
77
- ...props
78
- }: SliderTrackProps) => react_jsx_runtime31.JSX.Element;
79
- Value: ({
80
- className,
81
- ...props
82
- }: SliderValueProps) => react_jsx_runtime31.JSX.Element;
55
+ Control: typeof SliderControl;
56
+ Indicator: typeof SliderIndicator;
57
+ Root: typeof SliderRoot;
58
+ Thumb: typeof SliderThumb;
59
+ Track: typeof SliderTrack;
60
+ Value: typeof SliderValue;
83
61
  };
84
62
  //#endregion
85
63
  export { Slider, SliderControl, type SliderControlProps, SliderIndicator, type SliderIndicatorProps, SliderRoot, type SliderRootProps, type SliderSize, SliderThumb, type SliderThumbProps, SliderTrack, type SliderTrackProps, SliderValue, type SliderValueProps };
@@ -1,14 +1,13 @@
1
1
  import { ComponentProps } from "react";
2
- import * as react_jsx_runtime53 from "react/jsx-runtime";
3
2
  import { Switch as Switch$1 } from "@base-ui/react/switch";
4
3
 
5
4
  //#region src/switch/switch.d.ts
6
- type SwitchSize = 'sm' | 'md' | 'lg';
7
- interface SwitchRootProps extends Omit<ComponentProps<typeof Switch$1.Root>, 'className'> {
5
+ type SwitchSize = "sm" | "md" | "lg";
6
+ interface SwitchRootProps extends Omit<ComponentProps<typeof Switch$1.Root>, "className"> {
8
7
  className?: string;
9
8
  size?: SwitchSize;
10
9
  }
11
- interface SwitchThumbProps extends Omit<ComponentProps<typeof Switch$1.Thumb>, 'className'> {
10
+ interface SwitchThumbProps extends Omit<ComponentProps<typeof Switch$1.Thumb>, "className"> {
12
11
  className?: string;
13
12
  size?: SwitchSize;
14
13
  }
@@ -16,23 +15,15 @@ declare const SwitchRoot: ({
16
15
  className,
17
16
  size,
18
17
  ...props
19
- }: SwitchRootProps) => react_jsx_runtime53.JSX.Element;
18
+ }: SwitchRootProps) => React.JSX.Element;
20
19
  declare const SwitchThumb: ({
21
20
  className,
22
21
  size,
23
22
  ...props
24
- }: SwitchThumbProps) => react_jsx_runtime53.JSX.Element;
23
+ }: SwitchThumbProps) => React.JSX.Element;
25
24
  declare const Switch: {
26
- Root: ({
27
- className,
28
- size,
29
- ...props
30
- }: SwitchRootProps) => react_jsx_runtime53.JSX.Element;
31
- Thumb: ({
32
- className,
33
- size,
34
- ...props
35
- }: SwitchThumbProps) => react_jsx_runtime53.JSX.Element;
25
+ Root: typeof SwitchRoot;
26
+ Thumb: typeof SwitchThumb;
36
27
  };
37
28
  //#endregion
38
29
  export { Switch, SwitchRoot, type SwitchRootProps, type SwitchSize, SwitchThumb, type SwitchThumbProps };
@@ -1,5 +1,4 @@
1
1
  import { ComponentProps } from "react";
2
- import * as react_jsx_runtime50 from "react/jsx-runtime";
3
2
 
4
3
  //#region src/text/text.d.ts
5
4
  declare const themeColorVariants: {
@@ -12,7 +11,7 @@ declare const textVariants: {
12
11
  };
13
12
  type TextThemeColor = keyof typeof themeColorVariants;
14
13
  type TextVariant = keyof typeof textVariants;
15
- interface TextProps extends ComponentProps<'p'> {
14
+ interface TextProps extends ComponentProps<"p"> {
16
15
  themeColor?: TextThemeColor;
17
16
  variant?: TextVariant;
18
17
  }
@@ -21,6 +20,6 @@ declare const Text: ({
21
20
  className,
22
21
  variant,
23
22
  themeColor
24
- }: TextProps) => react_jsx_runtime50.JSX.Element;
23
+ }: TextProps) => React.JSX.Element;
25
24
  //#endregion
26
25
  export { Text, type TextProps };
@@ -1,4 +1,4 @@
1
- import React, { cloneElement, isValidElement } from "react";
1
+ import { Fragment, cloneElement, isValidElement } from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { replaceShyInString, splitIntoSentences, typographicQuotes } from "@regardio/js/text";
4
4
 
@@ -13,26 +13,20 @@ const lowerCaseSzett = (text, _returnType) => {
13
13
  if (typeof text === "string") return processString(text);
14
14
  if (isValidElement(text)) {
15
15
  const element = text;
16
- const { children, ...props } = element.props;
17
- return cloneElement(element, {
18
- ...props,
19
- children: lowerCaseSzett(children)
20
- });
16
+ const { children } = element.props;
17
+ return cloneElement(element, element.props, lowerCaseSzett(children));
21
18
  }
22
- if (Array.isArray(text)) return text.map((child, index) => /* @__PURE__ */ jsx(React.Fragment, { children: lowerCaseSzett(child) }, index.toString()));
19
+ if (Array.isArray(text)) return text.map((child, index) => /* @__PURE__ */ jsx(Fragment, { children: lowerCaseSzett(child) }, index.toString()));
23
20
  return text;
24
21
  };
25
22
  function replaceShyInReactNode(node) {
26
23
  if (typeof node === "string") return node.replace(/\u00AD/g, "");
27
24
  if (isValidElement(node)) {
28
25
  const element = node;
29
- const { children, ...props } = element.props;
30
- return cloneElement(element, {
31
- ...props,
32
- children: replaceShyInReactNode(children)
33
- });
26
+ const { children } = element.props;
27
+ return cloneElement(element, element.props, replaceShyInReactNode(children));
34
28
  }
35
- if (Array.isArray(node)) return node.map((child, index) => /* @__PURE__ */ jsx(React.Fragment, { children: replaceShyInReactNode(child) }, index.toString()));
29
+ if (Array.isArray(node)) return node.map((child, index) => /* @__PURE__ */ jsx(Fragment, { children: replaceShyInReactNode(child) }, index.toString()));
36
30
  return node;
37
31
  }
38
32
  function shy(input) {
@@ -1,46 +1,12 @@
1
1
  import { ComponentProps, ReactNode } from "react";
2
- import * as react_jsx_runtime51 from "react/jsx-runtime";
2
+ import { tv } from "@regardio/tailwind/utils";
3
3
  import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
4
- import * as tailwind_variants3 from "tailwind-variants";
5
4
 
6
5
  //#region src/toggle/toggle.d.ts
7
- declare const toggle: tailwind_variants3.TVReturnType<{
8
- size: {
9
- lg: string[];
10
- md: string[];
11
- sm: string[];
12
- };
13
- variant: {
14
- default: never[];
15
- ghost: string[];
16
- outline: string[];
17
- };
18
- }, undefined, string[], {
19
- size: {
20
- lg: string[];
21
- md: string[];
22
- sm: string[];
23
- };
24
- variant: {
25
- default: never[];
26
- ghost: string[];
27
- outline: string[];
28
- };
29
- }, undefined, tailwind_variants3.TVReturnType<{
30
- size: {
31
- lg: string[];
32
- md: string[];
33
- sm: string[];
34
- };
35
- variant: {
36
- default: never[];
37
- ghost: string[];
38
- outline: string[];
39
- };
40
- }, undefined, string[], unknown, unknown, undefined>>;
6
+ declare const toggle: ReturnType<typeof tv>;
41
7
  type ToggleVariant = keyof typeof toggle.variants.variant;
42
8
  type ToggleSize = keyof typeof toggle.variants.size;
43
- interface ToggleProps extends Omit<ComponentProps<typeof Toggle$1>, 'className'> {
9
+ interface ToggleProps extends Omit<ComponentProps<typeof Toggle$1>, "className"> {
44
10
  className?: string;
45
11
  variant?: ToggleVariant;
46
12
  size?: ToggleSize;
@@ -54,6 +20,6 @@ declare const Toggle: ({
54
20
  title,
55
21
  children,
56
22
  ...props
57
- }: ToggleProps) => react_jsx_runtime51.JSX.Element;
23
+ }: ToggleProps) => React.JSX.Element;
58
24
  //#endregion
59
25
  export { Toggle, type ToggleProps, type ToggleSize, type ToggleVariant };
@@ -4,13 +4,13 @@ import { ReactNode } from "react";
4
4
  declare const lowerCaseSzett: (text: ReactNode | string, _returnType?: "string") => ReactNode;
5
5
  declare function shy(input: string | ReactNode | null): string | ReactNode | null;
6
6
  /**
7
- * Replace special characters in text: typographic quotes and soft hyphens.
8
- * This is a React-aware version that handles ReactNode trees.
9
- */
7
+ * Replace special characters in text: typographic quotes and soft hyphens.
8
+ * This is a React-aware version that handles ReactNode trees.
9
+ */
10
10
  declare function replaceSpecialChars(text: string, locale: string): string | ReactNode | null;
11
11
  /**
12
- * Wrap sentences in span elements
13
- */
12
+ * Wrap sentences in span elements
13
+ */
14
14
  declare function wrapSentences(text: string): ReactNode;
15
15
  //#endregion
16
16
  export { lowerCaseSzett, replaceSpecialChars, shy, wrapSentences };
@@ -1,3 +1,3 @@
1
- import { i as wrapSentences, n as replaceSpecialChars, r as shy, t as lowerCaseSzett } from "../../text-CPlUND-Z.mjs";
1
+ import { i as wrapSentences, n as replaceSpecialChars, r as shy, t as lowerCaseSzett } from "../../text-EQC4zJbE.mjs";
2
2
 
3
3
  export { lowerCaseSzett, replaceSpecialChars, shy, wrapSentences };