@telia/teddy 0.0.5 → 0.0.6

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 (47) hide show
  1. package/dist/assets/badge.css +1 -1
  2. package/dist/assets/flex.css +1 -0
  3. package/dist/assets/grid.css +1 -1
  4. package/dist/assets/main.css +1 -1
  5. package/dist/assets/radio-group.css +1 -0
  6. package/dist/assets/spinner.css +1 -1
  7. package/dist/badge-tBBi5HpV.js +720 -0
  8. package/dist/components/accordion/accordion.d.ts +1 -0
  9. package/dist/components/accordion/accordion.js +6 -3
  10. package/dist/components/accordion/index.js +1 -1
  11. package/dist/components/badge/badge.js +6 -3
  12. package/dist/components/badge/index.js +1 -1
  13. package/dist/components/box/box.d.ts +23 -0
  14. package/dist/components/box/box.js +13 -0
  15. package/dist/components/box/index.d.ts +2 -0
  16. package/dist/components/box/index.js +4 -0
  17. package/dist/components/card/card.d.ts +2 -2
  18. package/dist/components/card/card.js +6 -3
  19. package/dist/components/card/index.js +1 -1
  20. package/dist/components/flex/flex.d.ts +23 -0
  21. package/dist/components/flex/flex.js +16 -0
  22. package/dist/components/flex/index.d.ts +2 -0
  23. package/dist/components/flex/index.js +4 -0
  24. package/dist/components/grid/grid.d.ts +2 -2
  25. package/dist/components/grid/grid.js +13 -15
  26. package/dist/components/index.d.ts +3 -0
  27. package/dist/components/index.js +44 -38
  28. package/dist/components/input/input.d.ts +3 -0
  29. package/dist/components/input/input.js +50 -51
  30. package/dist/components/navigation-menu/index.js +1 -1
  31. package/dist/components/navigation-menu/navigation-menu.js +1033 -8
  32. package/dist/components/radio-group/index.d.ts +2 -0
  33. package/dist/components/radio-group/index.js +4 -0
  34. package/dist/components/radio-group/radio-group.d.ts +52 -0
  35. package/dist/components/radio-group/radio-group.js +9 -0
  36. package/dist/components/spinner/spinner.js +25 -25
  37. package/dist/components/switch/index.js +1 -1
  38. package/dist/components/switch/switch.d.ts +1 -1
  39. package/dist/components/switch/switch.js +6 -3
  40. package/dist/index-0Eg2mucA.js +305 -0
  41. package/dist/main.js +58 -52
  42. package/dist/radio-group-0Oc9WTDf.js +422 -0
  43. package/dist/utils/layout.d.ts +109 -19
  44. package/dist/utils/layout.js +160 -39
  45. package/package.json +15 -14
  46. package/dist/badge-CbHdlkcM.js +0 -742
  47. package/dist/navigation-menu-BgN7IKev.js +0 -1334
@@ -7,6 +7,7 @@ import * as AccordionPrimitive from '@radix-ui/react-accordion';
7
7
  * -----------------------------------------------------------------------------------------------*/
8
8
  type RootProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Root> & {
9
9
  variant?: 'default' | 'negative';
10
+ indented?: boolean;
10
11
  };
11
12
  /** -------------------------------------------------------------------------------------------------
12
13
  * Item
@@ -1,9 +1,12 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../../clsx-DB4S2d7J.js";
3
3
  import "react";
4
- import { A as u } from "../../badge-CbHdlkcM.js";
4
+ import { A as y } from "../../badge-tBBi5HpV.js";
5
+ import "../../radio-group-0Oc9WTDf.js";
6
+ import "../box/box.js";
7
+ import "../flex/flex.js";
5
8
  import "../grid/grid.js";
6
- import "../../navigation-menu-BgN7IKev.js";
9
+ import "../navigation-menu/navigation-menu.js";
7
10
  import "../link/link.js";
8
11
  import "../button/button.js";
9
12
  import "../field-error-text/field-error-text.js";
@@ -20,5 +23,5 @@ import "../visually-hidden/visually-hidden.js";
20
23
  import "../text-spacing/text-spacing.js";
21
24
  import "../../index-DpfSJps6.js";
22
25
  export {
23
- u as Accordion
26
+ y as Accordion
24
27
  };
@@ -1,4 +1,4 @@
1
- import { A as c } from "../../badge-CbHdlkcM.js";
1
+ import { A as c } from "../../badge-tBBi5HpV.js";
2
2
  export {
3
3
  c as Accordion
4
4
  };
@@ -1,10 +1,13 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../../clsx-DB4S2d7J.js";
3
3
  import "react";
4
- import { B as u } from "../../badge-CbHdlkcM.js";
4
+ import { B as y } from "../../badge-tBBi5HpV.js";
5
5
  import "../../index-DpfSJps6.js";
6
+ import "../../radio-group-0Oc9WTDf.js";
7
+ import "../box/box.js";
8
+ import "../flex/flex.js";
6
9
  import "../grid/grid.js";
7
- import "../../navigation-menu-BgN7IKev.js";
10
+ import "../navigation-menu/navigation-menu.js";
8
11
  import "../link/link.js";
9
12
  import "../button/button.js";
10
13
  import "../field-error-text/field-error-text.js";
@@ -20,5 +23,5 @@ import "../heading/heading.js";
20
23
  import "../visually-hidden/visually-hidden.js";
21
24
  import "../text-spacing/text-spacing.js";
22
25
  export {
23
- u as Badge
26
+ y as Badge
24
27
  };
@@ -1,4 +1,4 @@
1
- import { B as o } from "../../badge-CbHdlkcM.js";
1
+ import { B as o } from "../../badge-tBBi5HpV.js";
2
2
  export {
3
3
  o as Badge
4
4
  };
@@ -0,0 +1,23 @@
1
+ import { ChildrenLayoutProps } from '../../utils/layout';
2
+ import { default as React } from 'react';
3
+
4
+ /** -------------------------------------------------------------------------------------------------
5
+ * Box
6
+ * -----------------------------------------------------------------------------------------------*/
7
+ type AsChildProps = {
8
+ asChild: true;
9
+ as?: never;
10
+ } & React.ComponentPropsWithoutRef<'span'>;
11
+ type SpanProps = {
12
+ as?: 'span';
13
+ asChild?: false;
14
+ } & React.ComponentPropsWithoutRef<'span'>;
15
+ type DivProps = {
16
+ as: 'div';
17
+ asChild?: false;
18
+ } & React.ComponentPropsWithoutRef<'div'>;
19
+ type BoxProps = React.ComponentPropsWithoutRef<'div'> & ChildrenLayoutProps & (AsChildProps | SpanProps | DivProps);
20
+ /** */
21
+ declare const Box: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLDivElement>>;
22
+ export { Box };
23
+ export type { BoxProps };
@@ -0,0 +1,13 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import m from "react";
3
+ import { c as p } from "../../clsx-DB4S2d7J.js";
4
+ import { extractPropsResponsiveLayout as f } from "../../utils/layout.js";
5
+ import { $ as i } from "../../index-DpfSJps6.js";
6
+ const l = {}, d = "teddy-box", n = m.forwardRef((o, s) => {
7
+ const { className: t, asChild: e, ...r } = f(o), c = p([l[`${d}`]], t);
8
+ return /* @__PURE__ */ a(e ? i : "div", { ...r, ref: s, className: c });
9
+ });
10
+ n.displayName = "Box";
11
+ export {
12
+ n as Box
13
+ };
@@ -0,0 +1,2 @@
1
+ export { Box } from './box';
2
+ export type { BoxProps } from './box';
@@ -0,0 +1,4 @@
1
+ import { Box as x } from "./box.js";
2
+ export {
3
+ x as Box
4
+ };
@@ -43,7 +43,7 @@ declare const Card: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps
43
43
  Content: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
44
44
  Image: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
45
45
  /** The inset allows make the image bleed out to the edges */
46
- inset?: "top" | "bottom" | "left" | "right" | "all" | "top-right-left" | "bottom-left-right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-bottom" | "left-right" | undefined;
46
+ inset?: "all" | "top" | "bottom" | "left" | "right" | "top-right-left" | "bottom-left-right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-bottom" | "left-right" | undefined;
47
47
  } & React.RefAttributes<HTMLImageElement>>;
48
48
  Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
49
49
  Link: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
@@ -51,7 +51,7 @@ declare const Card: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps
51
51
  disableVisited?: boolean | undefined;
52
52
  ensureTargetArea?: boolean | undefined;
53
53
  silent?: boolean | undefined;
54
- variant: "text" | "text-negative" | "navigation" | "standalone" | "standalone-negative" | "navigation-negative";
54
+ variant: "text" | "navigation" | "text-negative" | "standalone" | "standalone-negative" | "navigation-negative";
55
55
  } & React.RefAttributes<HTMLAnchorElement>, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
56
56
  variantOptions: readonly ["purple-light", "purple-dark", "gray", "white", "beige"];
57
57
  insetOptions: readonly ["top", "bottom", "left", "right", "all", "top-right-left", "bottom-left-right", "top-left", "top-right", "bottom-left", "bottom-right", "top-bottom", "left-right"];
@@ -1,9 +1,12 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../clsx-DB4S2d7J.js";
4
- import { C as u } from "../../badge-CbHdlkcM.js";
4
+ import { C as y } from "../../badge-tBBi5HpV.js";
5
+ import "../../radio-group-0Oc9WTDf.js";
6
+ import "../box/box.js";
7
+ import "../flex/flex.js";
5
8
  import "../grid/grid.js";
6
- import "../../navigation-menu-BgN7IKev.js";
9
+ import "../navigation-menu/navigation-menu.js";
7
10
  import "../link/link.js";
8
11
  import "../button/button.js";
9
12
  import "../field-error-text/field-error-text.js";
@@ -20,5 +23,5 @@ import "../text-spacing/text-spacing.js";
20
23
  import "../../utils/composeRefs.js";
21
24
  import "../../utils/composeEventHandlers.js";
22
25
  export {
23
- u as Card
26
+ y as Card
24
27
  };
@@ -1,4 +1,4 @@
1
- import { C as o } from "../../badge-CbHdlkcM.js";
1
+ import { C as o } from "../../badge-tBBi5HpV.js";
2
2
  export {
3
3
  o as Card
4
4
  };
@@ -0,0 +1,23 @@
1
+ import { LayoutFlexProps } from '../../utils/layout';
2
+ import { default as React } from 'react';
3
+
4
+ /** -------------------------------------------------------------------------------------------------
5
+ * Flex
6
+ * -----------------------------------------------------------------------------------------------*/
7
+ type AsChildProps = {
8
+ asChild: true;
9
+ as?: never;
10
+ } & React.ComponentPropsWithoutRef<'span'>;
11
+ type SpanProps = {
12
+ as?: 'span';
13
+ asChild?: false;
14
+ } & React.ComponentPropsWithoutRef<'span'>;
15
+ type DivProps = {
16
+ as: 'div';
17
+ asChild?: false;
18
+ } & React.ComponentPropsWithoutRef<'div'>;
19
+ type FlexProps = React.ComponentPropsWithoutRef<'div'> & LayoutFlexProps & (AsChildProps | SpanProps | DivProps);
20
+ /** */
21
+ declare const Flex: React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<HTMLDivElement>>;
22
+ export { Flex };
23
+ export type { FlexProps };
@@ -0,0 +1,16 @@
1
+ import '../../assets/flex.css';
2
+ import { jsx as a } from "react/jsx-runtime";
3
+ import m from "react";
4
+ import { c as l } from "../../clsx-DB4S2d7J.js";
5
+ import { $ as f } from "../../index-DpfSJps6.js";
6
+ import { extractPropsResponsiveLayout as d } from "../../utils/layout.js";
7
+ const p = {
8
+ "teddy-flex": "_teddy-flex_19teo_2"
9
+ }, x = "teddy-flex", i = m.forwardRef((e, o) => {
10
+ const { className: s, asChild: t, ...r } = d(e), c = l([p[`${x}`]], s);
11
+ return /* @__PURE__ */ a(t ? f : "div", { ...r, ref: o, className: c });
12
+ });
13
+ i.displayName = "Flex";
14
+ export {
15
+ i as Flex
16
+ };
@@ -0,0 +1,2 @@
1
+ export { Flex } from './flex';
2
+ export type { FlexProps } from './flex';
@@ -0,0 +1,4 @@
1
+ import { Flex as r } from "./flex.js";
2
+ export {
3
+ r as Flex
4
+ };
@@ -1,4 +1,4 @@
1
- import { LayoutProps } from '../../utils/layout';
1
+ import { LayoutGridProps } from '../../utils/layout';
2
2
  import { default as React } from 'react';
3
3
 
4
4
  /** -------------------------------------------------------------------------------------------------
@@ -16,7 +16,7 @@ type DivProps = {
16
16
  as: 'div';
17
17
  asChild?: false;
18
18
  } & React.ComponentPropsWithoutRef<'div'>;
19
- type GridProps = React.ComponentPropsWithoutRef<'div'> & LayoutProps & (AsChildProps | SpanProps | DivProps);
19
+ type GridProps = React.ComponentPropsWithoutRef<'div'> & LayoutGridProps & (AsChildProps | SpanProps | DivProps);
20
20
  /** */
21
21
  declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>>;
22
22
  export { Grid };
@@ -1,18 +1,16 @@
1
1
  import '../../assets/grid.css';
2
- import { jsx as x } from "react/jsx-runtime";
3
- import _ from "react";
4
- import { c as $ } from "../../clsx-DB4S2d7J.js";
5
- import { $ as g } from "../../index-DpfSJps6.js";
6
- import { extractResponsiveLayout as u } from "../../utils/layout.js";
7
- const v = {
8
- "teddy-grid": "_teddy-grid_12o73_2"
9
- }, C = "teddy-grid", G = _.forwardRef(
10
- ({ className: s, display: o, columns: r, rows: e, flow: t, align: c, justify: a, gap: d = "100", as: i = "div", asChild: m, ...p }, f) => {
11
- const n = m ? g : i, l = u({ display: o, columns: r, rows: e, flow: t, align: c, justify: a, gap: d }), y = $([v[`${C}`]], l, s);
12
- return /* @__PURE__ */ x(n, { ...p, ref: f, className: y });
13
- }
14
- );
15
- G.displayName = "Grid";
2
+ import { jsx as m } from "react/jsx-runtime";
3
+ import i from "react";
4
+ import { c as p } from "../../clsx-DB4S2d7J.js";
5
+ import { $ as f } from "../../index-DpfSJps6.js";
6
+ import { extractPropsResponsiveLayout as l } from "../../utils/layout.js";
7
+ const n = {
8
+ "teddy-grid": "_teddy-grid_1dv1t_2"
9
+ }, y = "teddy-grid", x = i.forwardRef((s, o) => {
10
+ const { className: r, as: t = "div", asChild: e, ...a } = l(s), c = e ? f : t, d = p([n[`${y}`]], r);
11
+ return /* @__PURE__ */ m(c, { ...a, ref: o, className: d });
12
+ });
13
+ x.displayName = "Grid";
16
14
  export {
17
- G as Grid
15
+ x as Grid
18
16
  };
@@ -1,3 +1,6 @@
1
+ export * from './radio-group';
2
+ export * from './box';
3
+ export * from './flex';
1
4
  export * from './card';
2
5
  export * from './grid';
3
6
  export * from './navigation-menu';
@@ -1,40 +1,46 @@
1
- import { A as e, B as t, C as p, S as x } from "../badge-CbHdlkcM.js";
2
- import { Grid as m } from "./grid/grid.js";
3
- import { N as i } from "../navigation-menu-BgN7IKev.js";
4
- import { Link as d } from "./link/link.js";
5
- import { Button as l } from "./button/button.js";
6
- import { FieldErrorText as c } from "./field-error-text/field-error-text.js";
7
- import { HelperText as g } from "./helper-text/helper-text.js";
8
- import { default as S } from "../assets/5161b177f001ea1a.svg";
9
- import { Icon as I } from "./icon/icon.js";
10
- import { Input as C, InputGroup as F } from "./input/input.js";
11
- import { Label as L } from "./label/label.js";
12
- import { Spinner as b } from "./spinner/spinner.js";
13
- import { Text as k } from "./text/text.js";
14
- import { TextField as w } from "./text-field/text-field.js";
15
- import { Heading as E } from "./heading/heading.js";
16
- import { VisuallyHidden as V } from "./visually-hidden/visually-hidden.js";
17
- import { TextSpacing as q } from "./text-spacing/text-spacing.js";
1
+ import { R as e } from "../radio-group-0Oc9WTDf.js";
2
+ import { Box as p } from "./box/box.js";
3
+ import { Flex as f } from "./flex/flex.js";
4
+ import { A as a, B as i, C as n, S as d } from "../badge-tBBi5HpV.js";
5
+ import { Grid as s } from "./grid/grid.js";
6
+ import { NavigationMenu as c } from "./navigation-menu/navigation-menu.js";
7
+ import { Link as g } from "./link/link.js";
8
+ import { Button as H } from "./button/button.js";
9
+ import { FieldErrorText as F } from "./field-error-text/field-error-text.js";
10
+ import { HelperText as I } from "./helper-text/helper-text.js";
11
+ import { default as C } from "../assets/5161b177f001ea1a.svg";
12
+ import { Icon as R } from "./icon/icon.js";
13
+ import { Input as h, InputGroup as k } from "./input/input.js";
14
+ import { Label as w } from "./label/label.js";
15
+ import { Spinner as E } from "./spinner/spinner.js";
16
+ import { Text as N } from "./text/text.js";
17
+ import { TextField as j } from "./text-field/text-field.js";
18
+ import { Heading as z } from "./heading/heading.js";
19
+ import { VisuallyHidden as J } from "./visually-hidden/visually-hidden.js";
20
+ import { TextSpacing as O } from "./text-spacing/text-spacing.js";
18
21
  export {
19
- e as Accordion,
20
- t as Badge,
21
- l as Button,
22
- p as Card,
23
- c as FieldErrorText,
24
- m as Grid,
25
- E as Heading,
26
- g as HelperText,
27
- I as Icon,
28
- C as Input,
29
- F as InputGroup,
30
- L as Label,
31
- d as Link,
32
- i as NavigationMenu,
33
- b as Spinner,
34
- x as Switch,
35
- k as Text,
36
- w as TextField,
37
- q as TextSpacing,
38
- V as VisuallyHidden,
39
- S as iconsHref
22
+ a as Accordion,
23
+ i as Badge,
24
+ p as Box,
25
+ H as Button,
26
+ n as Card,
27
+ F as FieldErrorText,
28
+ f as Flex,
29
+ s as Grid,
30
+ z as Heading,
31
+ I as HelperText,
32
+ R as Icon,
33
+ h as Input,
34
+ k as InputGroup,
35
+ w as Label,
36
+ g as Link,
37
+ c as NavigationMenu,
38
+ e as RadioGroup,
39
+ E as Spinner,
40
+ d as Switch,
41
+ N as Text,
42
+ j as TextField,
43
+ O as TextSpacing,
44
+ J as VisuallyHidden,
45
+ C as iconsHref
40
46
  };
@@ -8,6 +8,7 @@ type InputProps = Omit<Input, 'children'> & {
8
8
  validationState?: ValidationState;
9
9
  /** Whether to show a loading indicator. */
10
10
  isLoading?: boolean;
11
+ /** Called when the value changes. */
11
12
  onValueChange?: (value: string) => void;
12
13
  };
13
14
  /** The input element */
@@ -16,6 +17,7 @@ declare const Input: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTM
16
17
  validationState?: ValidationState | undefined;
17
18
  /** Whether to show a loading indicator. */
18
19
  isLoading?: boolean | undefined;
20
+ /** Called when the value changes. */
19
21
  onValueChange?: ((value: string) => void) | undefined;
20
22
  } & React.RefAttributes<HTMLInputElement>>;
21
23
  type InputIndicatorProps = React.ComponentPropsWithoutRef<'svg'> & {
@@ -28,6 +30,7 @@ declare const InputGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTM
28
30
  validationState?: ValidationState | undefined;
29
31
  /** Whether to show a loading indicator. */
30
32
  isLoading?: boolean | undefined;
33
+ /** Called when the value changes. */
31
34
  onValueChange?: ((value: string) => void) | undefined;
32
35
  } & React.RefAttributes<HTMLInputElement>>;
33
36
  Indicator: React.ForwardRefExoticComponent<Omit<React.SVGProps<SVGSVGElement>, "ref"> & {
@@ -1,11 +1,11 @@
1
1
  import '../../assets/input.css';
2
- import { jsxs as y, jsx as o } from "react/jsx-runtime";
2
+ import { jsxs as y, jsx as r } from "react/jsx-runtime";
3
3
  import { c } from "../../clsx-DB4S2d7J.js";
4
- import s from "react";
4
+ import a from "react";
5
5
  import "../../assets/5161b177f001ea1a.svg";
6
- import { Icon as C } from "../icon/icon.js";
7
- import { Spinner as h } from "../spinner/spinner.js";
8
- const x = "_fadeInAnimation_1o9uu_1", A = "_scaleInAnimation_1o9uu_1", a = {
6
+ import { Icon as x } from "../icon/icon.js";
7
+ import { Spinner as A } from "../spinner/spinner.js";
8
+ const C = "_fadeInAnimation_1o9uu_1", G = "_scaleInAnimation_1o9uu_1", s = {
9
9
  "teddy-input": "_teddy-input_1o9uu_17",
10
10
  "teddy-input__frame": "_teddy-input__frame_1o9uu_24",
11
11
  "teddy-input__input": "_teddy-input__input_1o9uu_31",
@@ -13,92 +13,91 @@ const x = "_fadeInAnimation_1o9uu_1", A = "_scaleInAnimation_1o9uu_1", a = {
13
13
  "teddy-input__input--invalid": "_teddy-input__input--invalid_1o9uu_66",
14
14
  "teddy-input__indicator": "_teddy-input__indicator_1o9uu_72",
15
15
  "teddy-input__input--error": "_teddy-input__input--error_1o9uu_75",
16
- fadeInAnimation: x,
17
- scaleInAnimation: A
16
+ fadeInAnimation: C,
17
+ scaleInAnimation: G
18
18
  }, _ = "teddy-input";
19
- function G(i) {
20
- const e = i == null ? void 0 : i.target;
21
- if (e.closest("input, button, a"))
19
+ function P(n) {
20
+ const i = n == null ? void 0 : n.target;
21
+ if (i.closest("input, button, a"))
22
22
  return;
23
- const t = [...i.currentTarget.getElementsByTagName("input")].find((d) => d);
23
+ const t = [...n.currentTarget.getElementsByTagName("input")].find((d) => d);
24
24
  if (!t)
25
25
  return;
26
- const r = (t.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_PRECEDING) !== 0 ? 0 : t.value.length;
26
+ const u = (t.compareDocumentPosition(i) & Node.DOCUMENT_POSITION_PRECEDING) !== 0 ? 0 : t.value.length;
27
27
  requestAnimationFrame(() => {
28
28
  try {
29
- t.setSelectionRange(r, r);
29
+ t.setSelectionRange(u, u);
30
30
  } finally {
31
31
  t.focus();
32
32
  }
33
33
  });
34
34
  }
35
- const g = s.createContext(void 0), p = s.forwardRef(
36
- ({ className: i, children: e, ...t }, n) => {
37
- const u = c([a[`${_}`]], i);
38
- return /* @__PURE__ */ y("div", { ...t, onPointerDown: G, ref: n, className: u, children: [
39
- /* @__PURE__ */ o(g.Provider, { value: !0, children: e }),
40
- /* @__PURE__ */ o("div", { className: a[`${_}__frame`] })
35
+ const v = a.createContext(void 0), p = a.forwardRef(
36
+ ({ className: n, children: i, ...t }, e) => {
37
+ const o = c([s[`${_}`]], n);
38
+ return /* @__PURE__ */ y("div", { ...t, onPointerDown: P, ref: e, className: o, children: [
39
+ /* @__PURE__ */ r(v.Provider, { value: !0, children: i }),
40
+ /* @__PURE__ */ r("div", { className: s[`${_}__frame`] })
41
41
  ] });
42
42
  }
43
43
  );
44
44
  p.displayName = "InputGroup";
45
- const v = s.forwardRef(
46
- ({ className: i, isLoading: e, validationState: t, ...n }, u) => {
47
- const r = s.useContext(g), d = c(
45
+ const N = a.forwardRef(
46
+ ({ className: n, onValueChange: i, isLoading: t, validationState: e, ...o }, u) => {
47
+ const d = a.useContext(v), m = c(
48
48
  [
49
- a[`${_}__input`],
49
+ s[`${_}__input`],
50
50
  {
51
- [a[`${_}__input--valid`]]: t === "valid",
52
- [a[`${_}__input--error`]]: t === "invalid"
51
+ [s[`${_}__input--valid`]]: e === "valid",
52
+ [s[`${_}__input--error`]]: e === "invalid"
53
53
  }
54
54
  ],
55
- i
56
- ), N = r === !0;
57
- function m(f) {
58
- var I;
59
- (I = n.onValueChange) == null || I.call(n, f.target.value), n.onChange && n.onChange(f);
55
+ n
56
+ ), g = d === !0;
57
+ function f(I) {
58
+ i == null || i(I.target.value), o.onChange && o.onChange(I);
60
59
  }
61
- return N ? /* @__PURE__ */ o(
60
+ return g ? /* @__PURE__ */ r(
62
61
  "input",
63
62
  {
64
- "aria-invalid": t === "invalid",
65
- ...n,
66
- onChange: m,
67
- className: d,
63
+ "aria-invalid": e === "invalid",
64
+ ...o,
65
+ onChange: f,
66
+ className: m,
68
67
  ref: u
69
68
  }
70
69
  ) : /* @__PURE__ */ y(p, { children: [
71
- /* @__PURE__ */ o(
70
+ /* @__PURE__ */ r(
72
71
  "input",
73
72
  {
74
- "aria-invalid": t === "invalid",
75
- ...n,
76
- onChange: m,
77
- className: d,
73
+ "aria-invalid": e === "invalid",
74
+ ...o,
75
+ onChange: f,
76
+ className: m,
78
77
  ref: u
79
78
  }
80
79
  ),
81
- /* @__PURE__ */ o(l, { isValid: t === "valid", isLoading: e })
80
+ /* @__PURE__ */ r(l, { isValid: e === "valid", isLoading: t })
82
81
  ] });
83
82
  }
84
83
  );
85
- v.displayName = "Input";
86
- const l = s.forwardRef(
87
- ({ className: i, isLoading: e, isValid: t, ...n }, u) => {
88
- if (!t && !e)
84
+ N.displayName = "Input";
85
+ const l = a.forwardRef(
86
+ ({ className: n, isLoading: i, isValid: t, ...e }, o) => {
87
+ if (!t && !i)
89
88
  return null;
90
- if (!t && e)
91
- return /* @__PURE__ */ o(h, { className: i, size: "xs", ...n, ref: u });
92
- const r = c([a[`${_}__indicator`]], i);
93
- return /* @__PURE__ */ o(C, { ...n, size: "md", name: "check-circle-filled", className: r, ref: u });
89
+ if (!t && i)
90
+ return /* @__PURE__ */ r(A, { className: n, size: "xs", ...e, ref: o });
91
+ const u = c([s[`${_}__indicator`]], n);
92
+ return /* @__PURE__ */ r(x, { ...e, size: "md", name: "check-circle-filled", className: u, ref: o });
94
93
  }
95
94
  );
96
95
  l.displayName = "InputIndicator";
97
96
  const T = Object.assign(p, {
98
- Input: v,
97
+ Input: N,
99
98
  Indicator: l
100
99
  });
101
100
  export {
102
- v as Input,
101
+ N as Input,
103
102
  T as InputGroup
104
103
  };
@@ -1,4 +1,4 @@
1
- import { N as e } from "../../navigation-menu-BgN7IKev.js";
1
+ import { NavigationMenu as e } from "./navigation-menu.js";
2
2
  export {
3
3
  e as NavigationMenu
4
4
  };