@telia/teddy 0.0.10 → 0.0.11

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 (67) hide show
  1. package/dist/assets/badge.css +1 -1
  2. package/dist/assets/main.css +1 -1
  3. package/dist/assets/radio-group.css +1 -1
  4. package/dist/badge-DscsRVHR.js +1825 -0
  5. package/dist/components/accordion/accordion.js +3 -3
  6. package/dist/components/accordion/index.js +1 -1
  7. package/dist/components/badge/badge.js +3 -3
  8. package/dist/components/badge/index.js +1 -1
  9. package/dist/components/box/box.js +8 -8
  10. package/dist/components/button/button.d.ts +2 -1
  11. package/dist/components/button/button.js +59 -60
  12. package/dist/components/card/card.js +3 -3
  13. package/dist/components/card/index.js +1 -1
  14. package/dist/components/flex/flex.js +1 -1
  15. package/dist/components/grid/grid.js +6 -6
  16. package/dist/components/heading/heading.d.ts +3 -2
  17. package/dist/components/heading/heading.js +20 -21
  18. package/dist/components/index.d.ts +1 -0
  19. package/dist/components/index.js +26 -25
  20. package/dist/components/modal/index.d.ts +2 -0
  21. package/dist/components/modal/index.js +4 -0
  22. package/dist/components/modal/modal.d.ts +76 -0
  23. package/dist/components/modal/modal.js +28 -0
  24. package/dist/components/navigation-menu/index.js +1 -1
  25. package/dist/components/navigation-menu/navigation-menu.d.ts +2 -0
  26. package/dist/components/navigation-menu/navigation-menu.js +8 -1032
  27. package/dist/components/notification/index.js +1 -1
  28. package/dist/components/notification/notification.d.ts +3 -3
  29. package/dist/components/notification/notification.js +4 -4
  30. package/dist/components/radio-group/index.js +1 -1
  31. package/dist/components/radio-group/radio-group.js +1 -1
  32. package/dist/components/text-field/text-field.js +15 -15
  33. package/dist/components/toggle/index.js +1 -1
  34. package/dist/components/toggle/toggle.d.ts +2 -2
  35. package/dist/components/toggle/toggle.js +3 -3
  36. package/dist/{index-DPFZO9xk.js → index-FPIZOCcD.js} +27 -28
  37. package/dist/main.js +41 -40
  38. package/dist/navigation-menu-DKuyW8zE.js +1036 -0
  39. package/dist/{radio-group-DN1IYZdr.js → radio-group-B--zT3OL.js} +8 -8
  40. package/dist/tokens/breakpoint/variables.json.d.ts +11 -0
  41. package/dist/utils/component-props-as.d.ts +5 -0
  42. package/dist/utils/component-props-as.js +1 -0
  43. package/dist/utils/layout/align.d.ts +46 -0
  44. package/dist/utils/layout/align.js +31 -0
  45. package/dist/utils/layout/flex.d.ts +281 -10
  46. package/dist/utils/layout/flex.js +44 -8
  47. package/dist/utils/layout/gap.d.ts +340 -0
  48. package/dist/utils/layout/gap.js +21 -0
  49. package/dist/utils/layout/grid.d.ts +313 -0
  50. package/dist/utils/layout/grid.js +116 -0
  51. package/dist/utils/layout/height.d.ts +118 -0
  52. package/dist/utils/layout/height.js +50 -0
  53. package/dist/utils/layout/index.d.ts +63 -111
  54. package/dist/utils/layout/index.js +62 -147
  55. package/dist/utils/layout/justify.d.ts +39 -0
  56. package/dist/utils/layout/justify.js +16 -0
  57. package/dist/utils/layout/margin.d.ts +443 -11
  58. package/dist/utils/layout/margin.js +1 -1
  59. package/dist/utils/layout/padding.d.ts +478 -0
  60. package/dist/utils/layout/padding.js +32 -0
  61. package/dist/utils/layout/util.d.ts +78 -4
  62. package/dist/utils/layout/util.js +30 -31
  63. package/dist/utils/layout/width.d.ts +43 -7
  64. package/dist/utils/layout/width.js +6 -2
  65. package/package.json +2 -1
  66. package/dist/badge-cOFoFJw0.js +0 -798
  67. package/dist/tokens/spacing/variables.json.d.ts +0 -34
@@ -1,12 +1,12 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../../clsx-DB4S2d7J.js";
3
3
  import "react";
4
- import { A as y } from "../../badge-cOFoFJw0.js";
5
- import "../../radio-group-DN1IYZdr.js";
4
+ import { A as y } from "../../badge-DscsRVHR.js";
5
+ import "../../radio-group-B--zT3OL.js";
6
6
  import "../box/box.js";
7
7
  import "../flex/flex.js";
8
8
  import "../grid/grid.js";
9
- import "../navigation-menu/navigation-menu.js";
9
+ import "../../navigation-menu-DKuyW8zE.js";
10
10
  import "../link/link.js";
11
11
  import "../button/button.js";
12
12
  import "../field-error-text/field-error-text.js";
@@ -1,4 +1,4 @@
1
- import { A as c } from "../../badge-cOFoFJw0.js";
1
+ import { A as c } from "../../badge-DscsRVHR.js";
2
2
  export {
3
3
  c as Accordion
4
4
  };
@@ -1,13 +1,13 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../../clsx-DB4S2d7J.js";
3
3
  import "react";
4
- import { B as y } from "../../badge-cOFoFJw0.js";
4
+ import { B as y } from "../../badge-DscsRVHR.js";
5
5
  import "../../index-DpfSJps6.js";
6
- import "../../radio-group-DN1IYZdr.js";
6
+ import "../../radio-group-B--zT3OL.js";
7
7
  import "../box/box.js";
8
8
  import "../flex/flex.js";
9
9
  import "../grid/grid.js";
10
- import "../navigation-menu/navigation-menu.js";
10
+ import "../../navigation-menu-DKuyW8zE.js";
11
11
  import "../link/link.js";
12
12
  import "../button/button.js";
13
13
  import "../field-error-text/field-error-text.js";
@@ -1,4 +1,4 @@
1
- import { B as o } from "../../badge-cOFoFJw0.js";
1
+ import { B as o } from "../../badge-DscsRVHR.js";
2
2
  export {
3
3
  o as Badge
4
4
  };
@@ -1,11 +1,11 @@
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/index.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 });
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import p from "react";
3
+ import { c as f } from "../../clsx-DB4S2d7J.js";
4
+ import { extractProps as l } from "../../utils/layout/index.js";
5
+ import { $ as d } from "../../index-DpfSJps6.js";
6
+ const i = {}, x = "teddy-box", n = p.forwardRef((o, s) => {
7
+ const { className: t, asChild: r, style: e, ...c } = l(o), a = f([i[`${x}`]], t);
8
+ return /* @__PURE__ */ m(r ? d : "div", { ...c, style: e, ref: s, className: a });
9
9
  });
10
10
  n.displayName = "Box";
11
11
  export {
@@ -1,9 +1,10 @@
1
+ import { ChildrenLayoutProps } from '../../utils/layout';
1
2
  import * as React from 'react';
2
3
  declare const variants: readonly ["primary", "secondary", "destructive", "tertiary-purple", "text", "expressive", "primary-negative", "secondary-negative", "destructive-negative", "tertiary-purple-negative", "text-negative", "expressive-negative"];
3
4
  export type Variant = (typeof variants)[number];
4
5
  declare const sizes: readonly ["sm", "md", "lg"];
5
6
  export type Size = (typeof sizes)[number];
6
- type ButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'aria-label'> & {
7
+ type ButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'aria-label'> & ChildrenLayoutProps & {
7
8
  asChild?: boolean;
8
9
  loading?: boolean;
9
10
  fullWidth?: boolean;
@@ -1,10 +1,11 @@
1
1
  import '../../assets/button.css';
2
- import { jsxs as x, jsx as r } from "react/jsx-runtime";
3
- import { a as $, $ as A } from "../../index-DpfSJps6.js";
2
+ import { jsxs as $, jsx as _ } from "react/jsx-runtime";
3
+ import { a as A, $ as C } from "../../index-DpfSJps6.js";
4
4
  import { c as I } from "../../clsx-DB4S2d7J.js";
5
- import * as w from "react";
6
- import { Spinner as N } from "../spinner/spinner.js";
7
- const j = "_fadeInAnimation_1biph_1", C = "_scaleInAnimation_1biph_1", t = {
5
+ import * as N from "react";
6
+ import { Spinner as w } from "../spinner/spinner.js";
7
+ import { extractProps as j } from "../../utils/layout/index.js";
8
+ const k = "_fadeInAnimation_1biph_1", R = "_scaleInAnimation_1biph_1", t = {
8
9
  "teddy-button": "_teddy-button_1biph_18",
9
10
  "teddy-button--sm": "_teddy-button--sm_1biph_53",
10
11
  "teddy-button--icon-only": "_teddy-button--icon-only_1biph_56",
@@ -26,10 +27,10 @@ const j = "_fadeInAnimation_1biph_1", C = "_scaleInAnimation_1biph_1", t = {
26
27
  "teddy-button--text-negative": "_teddy-button--text-negative_1biph_195",
27
28
  "teddy-button--text": "_teddy-button--text_1biph_195",
28
29
  "teddy-button__loading": "_teddy-button__loading_1biph_242",
29
- fadeInAnimation: j,
30
+ fadeInAnimation: k,
30
31
  "teddy-button__spinner": "_teddy-button__spinner_1biph_253",
31
- scaleInAnimation: C
32
- }, e = "teddy-button", R = [
32
+ scaleInAnimation: R
33
+ }, e = "teddy-button", W = [
33
34
  "primary",
34
35
  "secondary",
35
36
  "destructive",
@@ -42,65 +43,63 @@ const j = "_fadeInAnimation_1biph_1", C = "_scaleInAnimation_1biph_1", t = {
42
43
  "tertiary-purple-negative",
43
44
  "text-negative",
44
45
  "expressive-negative"
45
- ], s = w.forwardRef(
46
- ({
47
- className: y,
46
+ ], b = N.forwardRef((y, p) => {
47
+ const {
48
+ className: u,
48
49
  variant: d,
49
50
  size: o = "md",
50
- iconOnly: u,
51
- fullWidth: p,
51
+ iconOnly: c,
52
+ fullWidth: l,
52
53
  disabled: i = !1,
53
54
  loading: n = !1,
54
- asChild: c = !1,
55
+ asChild: v = !1,
55
56
  onClick: a,
56
- children: l,
57
- ..._
58
- }, v) => {
59
- const m = c ? A : "button", h = I(
60
- [t[e], t[`${e}--${d}`], t[`${e}--${o}`]],
61
- {
62
- [t[`${e}--icon-only`]]: u,
63
- [t[`${e}--negative`]]: d.endsWith("negative"),
64
- [t[`${e}--full-width`]]: p,
65
- [t[`${e}--disabled`]]: i || n
66
- },
67
- y
68
- );
69
- function g(b) {
70
- if (i || n) {
71
- b.preventDefault();
72
- return;
73
- }
74
- a && a(b);
57
+ children: m,
58
+ ...s
59
+ } = j(y), h = v ? C : "button", g = I(
60
+ [t[e], t[`${e}--${d}`], t[`${e}--${o}`]],
61
+ {
62
+ [t[`${e}--icon-only`]]: c,
63
+ [t[`${e}--negative`]]: d.endsWith("negative"),
64
+ [t[`${e}--full-width`]]: l,
65
+ [t[`${e}--disabled`]]: i || n
66
+ },
67
+ u
68
+ );
69
+ function f(r) {
70
+ if (i || n) {
71
+ r.preventDefault();
72
+ return;
75
73
  }
76
- const f = () => d.endsWith("negative") ? "negative-disabled" : "disabled";
77
- return /* @__PURE__ */ x(
78
- m,
79
- {
80
- className: h,
81
- "aria-disabled": _["aria-disabled"] || i || n,
82
- onClick: g,
83
- ref: v,
84
- ..._,
85
- children: [
86
- /* @__PURE__ */ r($, { children: l }),
87
- n && /* @__PURE__ */ r(
88
- N,
89
- {
90
- size: o === "lg" ? "xs" : "xxs",
91
- variant: f(),
92
- className: t[`${e}__spinner`]
93
- }
94
- )
95
- ]
96
- }
97
- );
74
+ a && a(r);
98
75
  }
99
- );
100
- s.displayName = "Button";
101
- const D = Object.assign(s, {
102
- variants: R
76
+ const x = () => d.endsWith("negative") ? "negative-disabled" : "disabled";
77
+ return /* @__PURE__ */ $(
78
+ h,
79
+ {
80
+ className: g,
81
+ "aria-disabled": s["aria-disabled"] || i || n,
82
+ onClick: f,
83
+ ref: p,
84
+ ...s,
85
+ children: [
86
+ /* @__PURE__ */ _(A, { children: m }),
87
+ n && /* @__PURE__ */ _(
88
+ w,
89
+ {
90
+ size: o === "lg" ? "xs" : "xxs",
91
+ variant: x(),
92
+ className: t[`${e}__spinner`]
93
+ }
94
+ )
95
+ ]
96
+ }
97
+ );
98
+ });
99
+ b.displayName = "Button";
100
+ const P = Object.assign(b, {
101
+ variants: W
103
102
  });
104
103
  export {
105
- D as Button
104
+ P as Button
106
105
  };
@@ -1,12 +1,12 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../clsx-DB4S2d7J.js";
4
- import { C as y } from "../../badge-cOFoFJw0.js";
5
- import "../../radio-group-DN1IYZdr.js";
4
+ import { C as y } from "../../badge-DscsRVHR.js";
5
+ import "../../radio-group-B--zT3OL.js";
6
6
  import "../box/box.js";
7
7
  import "../flex/flex.js";
8
8
  import "../grid/grid.js";
9
- import "../navigation-menu/navigation-menu.js";
9
+ import "../../navigation-menu-DKuyW8zE.js";
10
10
  import "../link/link.js";
11
11
  import "../button/button.js";
12
12
  import "../field-error-text/field-error-text.js";
@@ -1,4 +1,4 @@
1
- import { C as o } from "../../badge-cOFoFJw0.js";
1
+ import { C as o } from "../../badge-DscsRVHR.js";
2
2
  export {
3
3
  o as Card
4
4
  };
@@ -3,7 +3,7 @@ import { jsx as a } from "react/jsx-runtime";
3
3
  import m from "react";
4
4
  import { c as l } from "../../clsx-DB4S2d7J.js";
5
5
  import { $ as f } from "../../index-DpfSJps6.js";
6
- import { extractPropsResponsiveLayout as d } from "../../utils/layout/index.js";
6
+ import { extractProps as d } from "../../utils/layout/index.js";
7
7
  const p = {
8
8
  "teddy-flex": "_teddy-flex_19teo_2"
9
9
  }, x = "teddy-flex", i = m.forwardRef((e, o) => {
@@ -3,14 +3,14 @@ import { jsx as m } from "react/jsx-runtime";
3
3
  import i from "react";
4
4
  import { c as p } from "../../clsx-DB4S2d7J.js";
5
5
  import { $ as f } from "../../index-DpfSJps6.js";
6
- import { extractPropsResponsiveLayout as l } from "../../utils/layout/index.js";
6
+ import { extractProps as l } from "../../utils/layout/index.js";
7
7
  const n = {
8
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 });
9
+ }, x = "teddy-grid", y = i.forwardRef((r, s) => {
10
+ const { className: o, as: t = "div", asChild: e, ...a } = l(r), c = e ? f : t, d = p([n[`${x}`]], o);
11
+ return /* @__PURE__ */ m(c, { ...a, ref: s, className: d });
12
12
  });
13
- x.displayName = "Grid";
13
+ y.displayName = "Grid";
14
14
  export {
15
- x as Grid
15
+ y as Grid
16
16
  };
@@ -1,3 +1,4 @@
1
+ import { ChildrenLayoutProps } from '../../utils/layout';
1
2
  import { default as React } from 'react';
2
3
 
3
4
  /** -------------------------------------------------------------------------------------------------
@@ -20,8 +21,8 @@ type RootProps = {
20
21
  * https://developer.mozilla.org/en-US/docs/Web/CSS/hyphens
21
22
  */
22
23
  enableHyphenation?: boolean;
23
- variant: HeadingVariant;
24
- } & (HeadingAsChildProps | HeadingAsProps);
24
+ variant?: HeadingVariant;
25
+ } & ChildrenLayoutProps & (HeadingAsChildProps | HeadingAsProps);
25
26
  declare const Heading: React.ForwardRefExoticComponent<RootProps & React.RefAttributes<HTMLHeadingElement>> & {
26
27
  headingVariants: readonly ["title-100", "title-200", "title-300", "title-400", "title-500", "title-600", "title-700", "subsection-100", "display-25", "display-50", "display-100", "display-200"];
27
28
  };
@@ -1,9 +1,10 @@
1
1
  import '../../assets/heading.css';
2
- import { jsx as a } from "react/jsx-runtime";
3
- import { $ as r } from "../../index-DpfSJps6.js";
2
+ import { jsx as s } from "react/jsx-runtime";
3
+ import { $ as c } from "../../index-DpfSJps6.js";
4
4
  import { c as p } from "../../clsx-DB4S2d7J.js";
5
- import c from "react";
6
- const d = {
5
+ import m from "react";
6
+ import { extractProps as f } from "../../utils/layout/index.js";
7
+ const e = {
7
8
  "teddy-heading": "_teddy-heading_r8os0_2",
8
9
  "teddy-heading--hyphens": "_teddy-heading--hyphens_r8os0_9",
9
10
  "teddy-heading--subsection-100": "_teddy-heading--subsection-100_r8os0_12",
@@ -18,7 +19,7 @@ const d = {
18
19
  "teddy-heading--display-50": "_teddy-heading--display-50_r8os0_66",
19
20
  "teddy-heading--display-100": "_teddy-heading--display-100_r8os0_72",
20
21
  "teddy-heading--display-200": "_teddy-heading--display-200_r8os0_78"
21
- }, e = "teddy-heading", m = [
22
+ }, d = "teddy-heading", $ = [
22
23
  "title-100",
23
24
  "title-200",
24
25
  "title-300",
@@ -31,23 +32,21 @@ const d = {
31
32
  "display-50",
32
33
  "display-100",
33
34
  "display-200"
34
- ], n = c.forwardRef(
35
- ({ className: y, children: t, variant: i, asChild: _, enableHyphenation: l, as: s, ...o }, h) => {
36
- const g = p(
37
- d[`${e}`],
38
- {
39
- [d[`${e}--${i}`]]: i,
40
- [d[`${e}--hyphens`]]: l
41
- },
42
- y
43
- );
44
- return /* @__PURE__ */ a(r, { ...o, ref: h, className: g, children: _ ? t : s ? /* @__PURE__ */ a(s, { children: t }) : null });
45
- }
46
- );
35
+ ], n = m.forwardRef((l, y) => {
36
+ const { className: _, children: t, variant: i, asChild: o, enableHyphenation: h, as: a, ...r } = f(l), g = p(
37
+ e[`${d}`],
38
+ {
39
+ [e[`${d}--${i}`]]: i,
40
+ [e[`${d}--hyphens`]]: h
41
+ },
42
+ _
43
+ );
44
+ return /* @__PURE__ */ s(c, { ...r, ref: y, className: g, children: o ? t : a ? /* @__PURE__ */ s(a, { children: t }) : null });
45
+ });
47
46
  n.displayName = "Heading";
48
- const x = Object.assign(n, {
49
- headingVariants: m
47
+ const R = Object.assign(n, {
48
+ headingVariants: $
50
49
  });
51
50
  export {
52
- x as Heading
51
+ R as Heading
53
52
  };
@@ -1,3 +1,4 @@
1
+ export * from './modal';
1
2
  export * from './notification';
2
3
  export * from './radio-group';
3
4
  export * from './box';
@@ -1,10 +1,10 @@
1
- import { A as e, B as t, C as p, N as x, T as f } from "../badge-cOFoFJw0.js";
2
- import { R as a } from "../radio-group-DN1IYZdr.js";
3
- import { Box as n } from "./box/box.js";
1
+ import { A as e, B as t, C as p, M as x, N as f, T as a } from "../badge-DscsRVHR.js";
2
+ import { R as i } from "../radio-group-B--zT3OL.js";
3
+ import { Box as d } from "./box/box.js";
4
4
  import { Flex as l } from "./flex/flex.js";
5
- import { Grid as u } from "./grid/grid.js";
6
- import { NavigationMenu as c } from "./navigation-menu/navigation-menu.js";
7
- import { Link as B } from "./link/link.js";
5
+ import { Grid as T } from "./grid/grid.js";
6
+ import { N as g } from "../navigation-menu-DKuyW8zE.js";
7
+ import { Link as H } from "./link/link.js";
8
8
  import { Button as F } from "./button/button.js";
9
9
  import { FieldErrorText as I } from "./field-error-text/field-error-text.js";
10
10
  import { HelperText as A } from "./helper-text/helper-text.js";
@@ -12,36 +12,37 @@ import { default as L } from "../assets/5161b177f001ea1a.svg";
12
12
  import { Icon as S } from "./icon/icon.js";
13
13
  import { Input as k, InputGroup as v } from "./input/input.js";
14
14
  import { Label as E } from "./label/label.js";
15
- import { Spinner as V } from "./spinner/spinner.js";
16
- import { Text as j } from "./text/text.js";
17
- import { TextField as w } from "./text-field/text-field.js";
18
- import { Heading as D } from "./heading/heading.js";
19
- import { VisuallyHidden as K } from "./visually-hidden/visually-hidden.js";
20
- import { TextSpacing as P } from "./text-spacing/text-spacing.js";
15
+ import { Spinner as h } from "./spinner/spinner.js";
16
+ import { Text as q } from "./text/text.js";
17
+ import { TextField as z } from "./text-field/text-field.js";
18
+ import { Heading as J } from "./heading/heading.js";
19
+ import { VisuallyHidden as O } from "./visually-hidden/visually-hidden.js";
20
+ import { TextSpacing as Q } from "./text-spacing/text-spacing.js";
21
21
  export {
22
22
  e as Accordion,
23
23
  t as Badge,
24
- n as Box,
24
+ d as Box,
25
25
  F as Button,
26
26
  p as Card,
27
27
  I as FieldErrorText,
28
28
  l as Flex,
29
- u as Grid,
30
- D as Heading,
29
+ T as Grid,
30
+ J as Heading,
31
31
  A as HelperText,
32
32
  S as Icon,
33
33
  k as Input,
34
34
  v as InputGroup,
35
35
  E as Label,
36
- B as Link,
37
- c as NavigationMenu,
38
- x as Notification,
39
- a as RadioGroup,
40
- V as Spinner,
41
- j as Text,
42
- w as TextField,
43
- P as TextSpacing,
44
- f as Toggle,
45
- K as VisuallyHidden,
36
+ H as Link,
37
+ x as Modal,
38
+ g as NavigationMenu,
39
+ f as Notification,
40
+ i as RadioGroup,
41
+ h as Spinner,
42
+ q as Text,
43
+ z as TextField,
44
+ Q as TextSpacing,
45
+ a as Toggle,
46
+ O as VisuallyHidden,
46
47
  L as iconsHref
47
48
  };
@@ -0,0 +1,2 @@
1
+ export { Modal } from './modal';
2
+ export type { ModalProps } from './modal';
@@ -0,0 +1,4 @@
1
+ import { M as r } from "../../badge-DscsRVHR.js";
2
+ export {
3
+ r as Modal
4
+ };
@@ -0,0 +1,76 @@
1
+ import { ComponentPropsAs } from '../../utils/component-props-as';
2
+ import { Flex, Heading, Text } from '..';
3
+ import { default as React } from 'react';
4
+
5
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
6
+ type RootProps = Omit<React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>, 'modal'>;
7
+ /** -------------------------------------------------------------------------------------------------
8
+ * ModalTrigger
9
+ * -----------------------------------------------------------------------------------------------*/
10
+ type TriggerProps = Omit<React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>, 'asChild' | 'children'> & {
11
+ children: React.ReactElement;
12
+ };
13
+ type OverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay> & {
14
+ container?: React.ComponentProps<typeof DialogPrimitive.Portal>['container'];
15
+ };
16
+ /** -------------------------------------------------------------------------------------------------
17
+ * ModalContent
18
+ * -----------------------------------------------------------------------------------------------*/
19
+ type ContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;
20
+ type GroupProps = React.ComponentPropsWithoutRef<typeof Flex> & {
21
+ variant?: 'title' | 'action';
22
+ };
23
+ /** -------------------------------------------------------------------------------------------------
24
+ * ModalTitle
25
+ * -----------------------------------------------------------------------------------------------*/
26
+ type TitleProps = Omit<React.ComponentPropsWithoutRef<typeof Heading>, 'asChild'>;
27
+ /** -------------------------------------------------------------------------------------------------
28
+ * ModalDescription
29
+ * -----------------------------------------------------------------------------------------------*/
30
+ type DescriptionProps = ComponentPropsAs<typeof Text, 'p'>;
31
+ /** -------------------------------------------------------------------------------------------------
32
+ * ModalImage
33
+ * -----------------------------------------------------------------------------------------------*/
34
+ type ImageProps = React.ComponentPropsWithoutRef<'img'> & {
35
+ asChild?: boolean;
36
+ };
37
+ /** -------------------------------------------------------------------------------------------------
38
+ * ModalClose
39
+ * -----------------------------------------------------------------------------------------------*/
40
+ type CloseProps = Omit<React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>, 'asChild' | 'children'> & ({
41
+ children: React.ReactElement;
42
+ slot: 'content';
43
+ } | {
44
+ ['aria-label']: string;
45
+ slot: 'floating';
46
+ children?: never;
47
+ });
48
+ /** -------------------------------------------------------------------------------------------------*/
49
+ export declare const Modal: React.FC<RootProps> & {
50
+ Trigger: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref">, "asChild" | "children"> & {
51
+ children: React.ReactElement;
52
+ } & React.RefAttributes<HTMLButtonElement>>;
53
+ Content: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
54
+ Title: React.ForwardRefExoticComponent<TitleProps & React.RefAttributes<HTMLHeadingElement>>;
55
+ Overlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
56
+ container?: React.ComponentProps<typeof DialogPrimitive.Portal>['container'];
57
+ } & React.RefAttributes<HTMLDivElement>>;
58
+ Description: React.ForwardRefExoticComponent<DescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
59
+ Close: React.ForwardRefExoticComponent<CloseProps & React.RefAttributes<HTMLButtonElement>>;
60
+ Image: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
61
+ asChild?: boolean | undefined;
62
+ } & React.RefAttributes<HTMLImageElement>>;
63
+ Group: React.ForwardRefExoticComponent<GroupProps & React.RefAttributes<HTMLDivElement>>;
64
+ };
65
+ export type ModalProps = {
66
+ Root: RootProps;
67
+ Trigger: TriggerProps;
68
+ Content: ContentProps;
69
+ Title: TitleProps;
70
+ Description: DescriptionProps;
71
+ Overlay: OverlayProps;
72
+ Group: GroupProps;
73
+ Close: CloseProps;
74
+ Image: ImageProps;
75
+ };
76
+ export {};
@@ -0,0 +1,28 @@
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import { M as z } from "../../badge-DscsRVHR.js";
4
+ import "../../radio-group-B--zT3OL.js";
5
+ import "../box/box.js";
6
+ import "../flex/flex.js";
7
+ import "../grid/grid.js";
8
+ import "../../navigation-menu-DKuyW8zE.js";
9
+ import "../link/link.js";
10
+ import "../button/button.js";
11
+ import "../field-error-text/field-error-text.js";
12
+ import "../helper-text/helper-text.js";
13
+ import "../../assets/5161b177f001ea1a.svg";
14
+ import "../icon/icon.js";
15
+ import "../input/input.js";
16
+ import "../label/label.js";
17
+ import "../spinner/spinner.js";
18
+ import "../text/text.js";
19
+ import "../text-field/text-field.js";
20
+ import "../heading/heading.js";
21
+ import "../visually-hidden/visually-hidden.js";
22
+ import "../text-spacing/text-spacing.js";
23
+ import "../../clsx-DB4S2d7J.js";
24
+ import "../../index-DpfSJps6.js";
25
+ import "../../utils/composeRefs.js";
26
+ export {
27
+ z as Modal
28
+ };
@@ -1,4 +1,4 @@
1
- import { NavigationMenu as e } from "./navigation-menu.js";
1
+ import { N as e } from "../../navigation-menu-DKuyW8zE.js";
2
2
  export {
3
3
  e as NavigationMenu
4
4
  };
@@ -23,6 +23,7 @@ type TopMenuItemProps = React.ComponentPropsWithoutRef<'li'>;
23
23
  * -----------------------------------------------------------------------------------------------*/
24
24
  type TopMenuTriggerProps = React.ComponentPropsWithoutRef<'button'> & {
25
25
  value: string;
26
+ active?: boolean;
26
27
  };
27
28
  /** -------------------------------------------------------------------------------------------------
28
29
  * NavigationMenuList
@@ -108,6 +109,7 @@ declare const NavigationMenu: React.ForwardRefExoticComponent<Omit<NavigationMen
108
109
  TopMenuItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
109
110
  TopMenuTrigger: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
110
111
  value: string;
112
+ active?: boolean | undefined;
111
113
  } & React.RefAttributes<HTMLButtonElement>>;
112
114
  };
113
115
  type NavigationMenuProps = {