@telia/teddy 0.0.9 → 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.
- package/dist/assets/badge.css +1 -1
- package/dist/assets/heading.css +1 -1
- package/dist/assets/main.css +1 -1
- package/dist/assets/navigation-menu.css +1 -1
- package/dist/assets/radio-group.css +1 -1
- package/dist/badge-DscsRVHR.js +1825 -0
- package/dist/components/accordion/accordion.d.ts +1 -1
- package/dist/components/accordion/accordion.js +3 -3
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/badge/badge.js +3 -3
- package/dist/components/badge/index.js +1 -1
- package/dist/components/box/box.js +8 -8
- package/dist/components/button/button.d.ts +2 -1
- package/dist/components/button/button.js +59 -60
- package/dist/components/card/card.js +3 -3
- package/dist/components/card/index.js +1 -1
- package/dist/components/flex/flex.js +1 -1
- package/dist/components/grid/grid.js +6 -6
- package/dist/components/heading/heading.d.ts +9 -36
- package/dist/components/heading/heading.js +36 -37
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +35 -33
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/index.js +4 -0
- package/dist/components/modal/modal.d.ts +76 -0
- package/dist/components/modal/modal.js +28 -0
- package/dist/components/navigation-menu/index.js +1 -1
- package/dist/components/navigation-menu/navigation-menu.d.ts +2 -0
- package/dist/components/navigation-menu/navigation-menu.js +8 -1032
- package/dist/components/notification/index.d.ts +2 -0
- package/dist/components/notification/index.js +4 -0
- package/dist/components/notification/notification.d.ts +59 -0
- package/dist/components/notification/notification.js +27 -0
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/radio-group/radio-group.js +1 -1
- package/dist/components/text-field/text-field.js +15 -15
- package/dist/components/toggle/index.js +1 -1
- package/dist/components/toggle/toggle.d.ts +1 -1
- package/dist/components/toggle/toggle.js +3 -3
- package/dist/{index-0Eg2mucA.js → index-FPIZOCcD.js} +80 -80
- package/dist/main.js +51 -49
- package/dist/navigation-menu-DKuyW8zE.js +1036 -0
- package/dist/{radio-group-BR5SMJXJ.js → radio-group-B--zT3OL.js} +8 -8
- package/dist/tokens/breakpoint/variables.json.d.ts +11 -0
- package/dist/utils/component-props-as.d.ts +5 -0
- package/dist/utils/component-props-as.js +1 -0
- package/dist/utils/layout/align.d.ts +46 -0
- package/dist/utils/layout/align.js +31 -0
- package/dist/utils/layout/flex.d.ts +294 -0
- package/dist/utils/layout/flex.js +60 -0
- package/dist/utils/layout/gap.d.ts +340 -0
- package/dist/utils/layout/gap.js +21 -0
- package/dist/utils/layout/grid.d.ts +313 -0
- package/dist/utils/layout/grid.js +116 -0
- package/dist/utils/layout/height.d.ts +118 -0
- package/dist/utils/layout/height.js +50 -0
- package/dist/utils/layout/index.d.ts +70 -0
- package/dist/utils/layout/index.js +71 -0
- package/dist/utils/layout/justify.d.ts +39 -0
- package/dist/utils/layout/justify.js +16 -0
- package/dist/utils/layout/margin.d.ts +478 -0
- package/dist/utils/layout/margin.js +32 -0
- package/dist/utils/layout/padding.d.ts +478 -0
- package/dist/utils/layout/padding.js +32 -0
- package/dist/utils/layout/util.d.ts +82 -0
- package/dist/utils/layout/util.js +32 -0
- package/dist/utils/layout/width.d.ts +69 -0
- package/dist/utils/layout/width.js +25 -0
- package/package.json +5 -1
- package/dist/badge-9vHb0-Jo.js +0 -721
- package/dist/tokens/spacing/variables.json.d.ts +0 -34
- package/dist/utils/layout.d.ts +0 -150
- package/dist/utils/layout.js +0 -221
|
@@ -36,7 +36,7 @@ type ContentProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Con
|
|
|
36
36
|
* -----------------------------------------------------------------------------------------------*/
|
|
37
37
|
type TitleProps = Omit<HeadingProps['Root'], 'variant'> & {
|
|
38
38
|
variant?: HeadingProps['Root']['variant'];
|
|
39
|
-
} & (HeadingProps['AsChildProps'] | HeadingProps['
|
|
39
|
+
} & (HeadingProps['AsChildProps'] | HeadingProps['AsProps']);
|
|
40
40
|
declare const Accordion: React.ForwardRefExoticComponent<RootProps & React.RefAttributes<HTMLDivElement>> & {
|
|
41
41
|
Trigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
42
42
|
hideIndicator?: boolean | undefined;
|
|
@@ -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-
|
|
5
|
-
import "../../radio-group-
|
|
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 "
|
|
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,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-
|
|
4
|
+
import { B as y } from "../../badge-DscsRVHR.js";
|
|
5
5
|
import "../../index-DpfSJps6.js";
|
|
6
|
-
import "../../radio-group-
|
|
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 "
|
|
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,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
5
|
-
import { $ as
|
|
6
|
-
const
|
|
7
|
-
const { className: t, asChild: e, ...
|
|
8
|
-
return /* @__PURE__ */
|
|
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
|
|
3
|
-
import { a as
|
|
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
|
|
6
|
-
import { Spinner as
|
|
7
|
-
|
|
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:
|
|
30
|
+
fadeInAnimation: k,
|
|
30
31
|
"teddy-button__spinner": "_teddy-button__spinner_1biph_253",
|
|
31
|
-
scaleInAnimation:
|
|
32
|
-
}, e = "teddy-button",
|
|
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
|
-
],
|
|
46
|
-
|
|
47
|
-
className:
|
|
46
|
+
], b = N.forwardRef((y, p) => {
|
|
47
|
+
const {
|
|
48
|
+
className: u,
|
|
48
49
|
variant: d,
|
|
49
50
|
size: o = "md",
|
|
50
|
-
iconOnly:
|
|
51
|
-
fullWidth:
|
|
51
|
+
iconOnly: c,
|
|
52
|
+
fullWidth: l,
|
|
52
53
|
disabled: i = !1,
|
|
53
54
|
loading: n = !1,
|
|
54
|
-
asChild:
|
|
55
|
+
asChild: v = !1,
|
|
55
56
|
onClick: a,
|
|
56
|
-
children:
|
|
57
|
-
...
|
|
58
|
-
}, v
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
{
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
|
|
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
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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
|
-
|
|
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-
|
|
5
|
-
import "../../radio-group-
|
|
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 "
|
|
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";
|
|
@@ -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 {
|
|
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 {
|
|
6
|
+
import { extractProps as l } from "../../utils/layout/index.js";
|
|
7
7
|
const n = {
|
|
8
8
|
"teddy-grid": "_teddy-grid_1dv1t_2"
|
|
9
|
-
},
|
|
10
|
-
const { className:
|
|
11
|
-
return /* @__PURE__ */ m(c, { ...a, ref:
|
|
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
|
-
|
|
13
|
+
y.displayName = "Grid";
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
y as Grid
|
|
16
16
|
};
|
|
@@ -1,41 +1,19 @@
|
|
|
1
|
+
import { ChildrenLayoutProps } from '../../utils/layout';
|
|
1
2
|
import { default as React } from 'react';
|
|
2
3
|
|
|
3
4
|
/** -------------------------------------------------------------------------------------------------
|
|
4
5
|
* Heading
|
|
5
6
|
* -----------------------------------------------------------------------------------------------*/
|
|
6
7
|
declare const 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"];
|
|
7
|
-
type
|
|
8
|
-
|
|
9
|
-
* If `true`, the children element will be cloned and used instead of the heading element.
|
|
10
|
-
*/
|
|
8
|
+
type HeadingVariant = (typeof headingVariants)[number];
|
|
9
|
+
type HeadingAsChildProps = {
|
|
11
10
|
asChild: true;
|
|
12
11
|
as?: never;
|
|
13
12
|
} & React.ComponentPropsWithoutRef<'h1'>;
|
|
14
|
-
type
|
|
15
|
-
as
|
|
13
|
+
type HeadingAsProps = {
|
|
14
|
+
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
16
15
|
asChild?: false;
|
|
17
16
|
} & React.ComponentPropsWithoutRef<'h1'>;
|
|
18
|
-
type H2Props = {
|
|
19
|
-
as: 'h2';
|
|
20
|
-
asChild?: false;
|
|
21
|
-
} & React.ComponentPropsWithoutRef<'h2'>;
|
|
22
|
-
type H3Props = {
|
|
23
|
-
as: 'h3';
|
|
24
|
-
asChild?: false;
|
|
25
|
-
} & React.ComponentPropsWithoutRef<'h3'>;
|
|
26
|
-
type H4Props = {
|
|
27
|
-
as: 'h4';
|
|
28
|
-
asChild?: false;
|
|
29
|
-
} & React.ComponentPropsWithoutRef<'h4'>;
|
|
30
|
-
type H5Props = {
|
|
31
|
-
as: 'h5';
|
|
32
|
-
asChild?: false;
|
|
33
|
-
} & React.ComponentPropsWithoutRef<'h5'>;
|
|
34
|
-
type H6Props = {
|
|
35
|
-
as: 'h6';
|
|
36
|
-
asChild?: false;
|
|
37
|
-
} & React.ComponentPropsWithoutRef<'h6'>;
|
|
38
|
-
type HeadingVariant = (typeof headingVariants)[number];
|
|
39
17
|
type RootProps = {
|
|
40
18
|
/**
|
|
41
19
|
* EnableHyphenation
|
|
@@ -43,21 +21,16 @@ type RootProps = {
|
|
|
43
21
|
* https://developer.mozilla.org/en-US/docs/Web/CSS/hyphens
|
|
44
22
|
*/
|
|
45
23
|
enableHyphenation?: boolean;
|
|
46
|
-
variant
|
|
47
|
-
} &
|
|
24
|
+
variant?: HeadingVariant;
|
|
25
|
+
} & ChildrenLayoutProps & (HeadingAsChildProps | HeadingAsProps);
|
|
48
26
|
declare const Heading: React.ForwardRefExoticComponent<RootProps & React.RefAttributes<HTMLHeadingElement>> & {
|
|
49
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"];
|
|
50
28
|
};
|
|
51
29
|
type HeadingProps = {
|
|
52
30
|
Root: RootProps;
|
|
53
31
|
headingVariants: typeof headingVariants;
|
|
54
|
-
AsChildProps:
|
|
55
|
-
|
|
56
|
-
H2Props: H2Props;
|
|
57
|
-
H3Props: H3Props;
|
|
58
|
-
H4Props: H4Props;
|
|
59
|
-
H5Props: H5Props;
|
|
60
|
-
H6Props: H6Props;
|
|
32
|
+
AsChildProps: HeadingAsChildProps;
|
|
33
|
+
AsProps: HeadingAsProps;
|
|
61
34
|
};
|
|
62
35
|
export { Heading };
|
|
63
36
|
export type { HeadingProps };
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import '../../assets/heading.css';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { $ as
|
|
4
|
-
import { c as
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"teddy-heading
|
|
9
|
-
"teddy-heading--
|
|
10
|
-
"teddy-heading--
|
|
11
|
-
"teddy-heading--title-
|
|
12
|
-
"teddy-heading--title-
|
|
13
|
-
"teddy-heading--title-
|
|
14
|
-
"teddy-heading--title-
|
|
15
|
-
"teddy-heading--title-
|
|
16
|
-
"teddy-heading--title-
|
|
17
|
-
"teddy-heading--
|
|
18
|
-
"teddy-heading--display-
|
|
19
|
-
"teddy-heading--display-
|
|
20
|
-
"teddy-heading--display-
|
|
21
|
-
|
|
2
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import { $ as c } from "../../index-DpfSJps6.js";
|
|
4
|
+
import { c as p } from "../../clsx-DB4S2d7J.js";
|
|
5
|
+
import m from "react";
|
|
6
|
+
import { extractProps as f } from "../../utils/layout/index.js";
|
|
7
|
+
const e = {
|
|
8
|
+
"teddy-heading": "_teddy-heading_r8os0_2",
|
|
9
|
+
"teddy-heading--hyphens": "_teddy-heading--hyphens_r8os0_9",
|
|
10
|
+
"teddy-heading--subsection-100": "_teddy-heading--subsection-100_r8os0_12",
|
|
11
|
+
"teddy-heading--title-100": "_teddy-heading--title-100_r8os0_18",
|
|
12
|
+
"teddy-heading--title-200": "_teddy-heading--title-200_r8os0_24",
|
|
13
|
+
"teddy-heading--title-300": "_teddy-heading--title-300_r8os0_30",
|
|
14
|
+
"teddy-heading--title-400": "_teddy-heading--title-400_r8os0_36",
|
|
15
|
+
"teddy-heading--title-500": "_teddy-heading--title-500_r8os0_42",
|
|
16
|
+
"teddy-heading--title-600": "_teddy-heading--title-600_r8os0_48",
|
|
17
|
+
"teddy-heading--title-700": "_teddy-heading--title-700_r8os0_54",
|
|
18
|
+
"teddy-heading--display-25": "_teddy-heading--display-25_r8os0_60",
|
|
19
|
+
"teddy-heading--display-50": "_teddy-heading--display-50_r8os0_66",
|
|
20
|
+
"teddy-heading--display-100": "_teddy-heading--display-100_r8os0_72",
|
|
21
|
+
"teddy-heading--display-200": "_teddy-heading--display-200_r8os0_78"
|
|
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
|
-
],
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const u = Object.assign(y, {
|
|
49
|
-
headingVariants: j
|
|
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
|
+
});
|
|
46
|
+
n.displayName = "Heading";
|
|
47
|
+
const R = Object.assign(n, {
|
|
48
|
+
headingVariants: $
|
|
50
49
|
});
|
|
51
50
|
export {
|
|
52
|
-
|
|
51
|
+
R as Heading
|
|
53
52
|
};
|
package/dist/components/index.js
CHANGED
|
@@ -1,46 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Grid as
|
|
6
|
-
import {
|
|
7
|
-
import { Link as
|
|
8
|
-
import { Button as
|
|
9
|
-
import { FieldErrorText as
|
|
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
|
+
import { Flex as l } from "./flex/flex.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
|
+
import { Button as F } from "./button/button.js";
|
|
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";
|
|
11
11
|
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
|
|
16
|
-
import { Text as
|
|
17
|
-
import { TextField as
|
|
18
|
-
import { Heading as
|
|
19
|
-
import { VisuallyHidden as
|
|
20
|
-
import { TextSpacing as
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
e as Accordion,
|
|
23
|
+
t as Badge,
|
|
24
|
+
d as Box,
|
|
25
|
+
F as Button,
|
|
26
|
+
p as Card,
|
|
27
|
+
I as FieldErrorText,
|
|
28
|
+
l as Flex,
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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,
|
|
45
47
|
L as iconsHref
|
|
46
48
|
};
|
|
@@ -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 {};
|