@telia/teddy 0.0.15 → 0.0.16
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/components/accordion/accordion.d.ts +2 -1
- package/dist/components/accordion/accordion.js +90 -24
- package/dist/components/accordion/index.js +2 -2
- package/dist/components/badge/badge.js +40 -24
- package/dist/components/badge/index.js +2 -2
- package/dist/components/box/box.js +14 -10
- package/dist/components/box/index.js +2 -2
- package/dist/components/button/button.js +60 -52
- package/dist/components/button/index.js +2 -2
- package/dist/components/card/card.d.ts +29 -3
- package/dist/components/card/card.js +202 -25
- package/dist/components/card/index.js +2 -2
- package/dist/components/field-error-text/field-error-text.js +21 -19
- package/dist/components/field-error-text/index.js +2 -2
- package/dist/components/flex/flex.js +15 -12
- package/dist/components/flex/index.js +2 -2
- package/dist/components/grid/grid.js +15 -12
- package/dist/components/grid/index.js +2 -2
- package/dist/components/heading/heading.js +22 -19
- package/dist/components/heading/index.js +2 -2
- package/dist/components/helper-text/helper-text.js +14 -13
- package/dist/components/helper-text/index.js +2 -2
- package/dist/components/icon/icon.js +16 -14
- package/dist/components/icon/index.js +4 -4
- package/dist/components/index.js +51 -46
- package/dist/components/input/index.js +3 -3
- package/dist/components/input/input.js +79 -66
- package/dist/components/label/index.js +2 -2
- package/dist/components/label/label.js +17 -23
- package/dist/components/link/index.js +2 -2
- package/dist/components/link/link.js +20 -19
- package/dist/components/modal/index.js +2 -2
- package/dist/components/modal/modal.js +173 -14
- package/dist/components/navigation-menu/index.js +2 -2
- package/dist/components/navigation-menu/navigation-menu.js +391 -8
- package/dist/components/notification/index.js +2 -2
- package/dist/components/notification/notification.d.ts +8 -7
- package/dist/components/notification/notification.js +96 -24
- package/dist/components/radio-group/index.js +2 -2
- package/dist/components/radio-group/radio-group.js +91 -8
- package/dist/components/spinner/index.js +2 -2
- package/dist/components/spinner/spinner.js +36 -29
- package/dist/components/text/index.js +2 -2
- package/dist/components/text/text.js +18 -17
- package/dist/components/text-field/index.js +2 -2
- package/dist/components/text-field/text-field.js +110 -90
- package/dist/components/text-spacing/index.js +2 -2
- package/dist/components/text-spacing/text-spacing.js +14 -12
- package/dist/components/toggle/index.js +2 -2
- package/dist/components/toggle/toggle.d.ts +1 -1
- package/dist/components/toggle/toggle.js +84 -23
- package/dist/components/visually-hidden/index.js +2 -2
- package/dist/components/visually-hidden/visually-hidden.js +17 -15
- package/dist/icons/category.js +2 -2
- package/dist/icons/name.js +2 -2
- package/dist/main.js +359 -61
- package/dist/style.css +3402 -0
- package/dist/tokens/border/variables.js +18 -10
- package/dist/tokens/breakpoint/variables.js +8 -5
- package/dist/tokens/color/variables.js +452 -227
- package/dist/tokens/index.d.ts +7 -7
- package/dist/tokens/index.js +308 -14
- package/dist/tokens/motion/variables.js +22 -12
- package/dist/tokens/shadow/variables.js +8 -5
- package/dist/tokens/spacing/variables.js +46 -24
- package/dist/tokens/typography/variables.js +48 -25
- package/dist/utils/action.js +10 -7
- package/dist/utils/composeEventHandlers.js +7 -5
- package/dist/utils/composeRefs.js +13 -9
- package/dist/utils/layout/align.js +5 -4
- package/dist/utils/layout/flex.js +25 -18
- package/dist/utils/layout/gap.js +7 -6
- package/dist/utils/layout/grid.js +31 -24
- package/dist/utils/layout/height.js +12 -11
- package/dist/utils/layout/index.js +76 -59
- package/dist/utils/layout/inset.js +10 -9
- package/dist/utils/layout/justify.js +6 -5
- package/dist/utils/layout/margin.js +10 -9
- package/dist/utils/layout/padding.js +10 -9
- package/dist/utils/layout/position.js +6 -5
- package/dist/utils/layout/util.js +7 -6
- package/dist/utils/layout/width.js +8 -7
- package/package.json +21 -14
- package/dist/assets/badge.css +0 -1
- package/dist/assets/button.css +0 -1
- package/dist/assets/field-error-text.css +0 -1
- package/dist/assets/flex.css +0 -1
- package/dist/assets/grid.css +0 -1
- package/dist/assets/heading.css +0 -1
- package/dist/assets/helper-text.css +0 -1
- package/dist/assets/icon.css +0 -1
- package/dist/assets/input.css +0 -1
- package/dist/assets/label.css +0 -1
- package/dist/assets/link.css +0 -1
- package/dist/assets/main.css +0 -1
- package/dist/assets/navigation-menu.css +0 -1
- package/dist/assets/radio-group.css +0 -1
- package/dist/assets/spinner.css +0 -1
- package/dist/assets/text-field.css +0 -1
- package/dist/assets/text-spacing.css +0 -1
- package/dist/assets/text.css +0 -1
- package/dist/assets/visually-hidden.css +0 -1
- package/dist/badge-Cnug5TzH.js +0 -1855
- package/dist/clsx-DB4S2d7J.js +0 -22
- package/dist/index-DM5e-Whg.js +0 -43
- package/dist/index-DpfSJps6.js +0 -75
- package/dist/index-FPIZOCcD.js +0 -305
- package/dist/navigation-menu-DKuyW8zE.js +0 -1036
- package/dist/radio-group-B--zT3OL.js +0 -440
- package/dist/variables-BKiPmtHY.js +0 -458
- package/dist/variables-BkY5b0io.js +0 -14
- package/dist/variables-Bq0YUbLS.js +0 -14
- package/dist/variables-CDK515QX.js +0 -52
- package/dist/variables-CMRTN8qo.js +0 -28
- package/dist/variables-Dmoh9YtD.js +0 -54
- package/dist/variables-IczXZ5CN.js +0 -24
|
@@ -1,27 +1,204 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import "
|
|
4
|
-
import {
|
|
5
|
-
import "../../
|
|
6
|
-
import "../
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import "
|
|
10
|
-
import "../link/link.js";
|
|
11
|
-
import "../
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { composeRefs } from "../../utils/composeRefs.js";
|
|
5
|
+
import { composeEventHandlers } from "../../utils/composeEventHandlers.js";
|
|
6
|
+
import { Flex } from "../flex/flex.js";
|
|
7
|
+
import { Box } from "../box/box.js";
|
|
8
|
+
import { Heading as Heading$1 } from "../heading/heading.js";
|
|
9
|
+
import { Button as Button$1 } from "../button/button.js";
|
|
10
|
+
import { Link as Link$1 } from "../link/link.js";
|
|
11
|
+
import { TextSpacing } from "../text-spacing/text-spacing.js";
|
|
12
|
+
const styles = {
|
|
13
|
+
"teddy-card": "_teddy-card_16ne3_3",
|
|
14
|
+
"teddy-card__slot": "_teddy-card__slot_16ne3_13",
|
|
15
|
+
"teddy-card__slot--bottom": "_teddy-card__slot--bottom_16ne3_16",
|
|
16
|
+
"teddy-card__slot--center": "_teddy-card__slot--center_16ne3_19",
|
|
17
|
+
"teddy-card__action": "_teddy-card__action_16ne3_40",
|
|
18
|
+
"teddy-card__action--disabled": "_teddy-card__action--disabled_16ne3_40",
|
|
19
|
+
"teddy-card--border": "_teddy-card--border_16ne3_46",
|
|
20
|
+
"teddy-card--purple-light": "_teddy-card--purple-light_16ne3_49",
|
|
21
|
+
"teddy-card--purple-dark": "_teddy-card--purple-dark_16ne3_63",
|
|
22
|
+
"teddy-card--white": "_teddy-card--white_16ne3_82",
|
|
23
|
+
"teddy-card--gray": "_teddy-card--gray_16ne3_96",
|
|
24
|
+
"teddy-card--beige": "_teddy-card--beige_16ne3_110",
|
|
25
|
+
"teddy-card__image--as-background": "_teddy-card__image--as-background_16ne3_124",
|
|
26
|
+
"teddy-card__heading": "_teddy-card__heading_16ne3_127",
|
|
27
|
+
"teddy-card--background-image": "_teddy-card--background-image_16ne3_130",
|
|
28
|
+
"teddy-card__image": "_teddy-card__image_16ne3_124",
|
|
29
|
+
"teddy-card__image--inset-top": "_teddy-card__image--inset-top_16ne3_145",
|
|
30
|
+
"teddy-card__image--inset-bottom": "_teddy-card__image--inset-bottom_16ne3_148",
|
|
31
|
+
"teddy-card__image--inset-left": "_teddy-card__image--inset-left_16ne3_151",
|
|
32
|
+
"teddy-card__image--inset-right": "_teddy-card__image--inset-right_16ne3_154"
|
|
33
|
+
};
|
|
34
|
+
const rootClassName = "teddy-card";
|
|
35
|
+
const actionElementIdentifier = `${rootClassName}__action`;
|
|
36
|
+
const variantOptions = ["purple-light", "purple-dark", "gray", "white", "beige"];
|
|
37
|
+
const RootContext = React__default.createContext(void 0);
|
|
38
|
+
const Root = React__default.forwardRef(
|
|
39
|
+
({ className, children, backgroundImageSrc, variant, bordered, ...props }, forwardRef) => {
|
|
40
|
+
const buttonRef = React__default.useRef(null);
|
|
41
|
+
const linkRef = React__default.useRef(null);
|
|
42
|
+
const classes = clsx(
|
|
43
|
+
[styles[`${rootClassName}`]],
|
|
44
|
+
{
|
|
45
|
+
[styles[`${rootClassName}--${variant}`]]: variant,
|
|
46
|
+
[styles[`${rootClassName}--border`]]: bordered,
|
|
47
|
+
[styles[`${rootClassName}--background-image`]]: backgroundImageSrc
|
|
48
|
+
},
|
|
49
|
+
className
|
|
50
|
+
);
|
|
51
|
+
return /* @__PURE__ */ jsx(RootContext.Provider, { value: { buttonRef, linkRef, variant }, children: /* @__PURE__ */ jsx(TextSpacing, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
52
|
+
Flex,
|
|
53
|
+
{
|
|
54
|
+
direction: "column",
|
|
55
|
+
...props,
|
|
56
|
+
className: classes,
|
|
57
|
+
style: backgroundImageSrc ? { background: `url(${backgroundImageSrc})`, ...props.style } : props.style,
|
|
58
|
+
onClick: composeEventHandlers(props.onClick, (e) => {
|
|
59
|
+
var _a;
|
|
60
|
+
if (e.isDefaultPrevented())
|
|
61
|
+
return;
|
|
62
|
+
if (linkRef.current)
|
|
63
|
+
return linkRef.current.click();
|
|
64
|
+
(_a = buttonRef.current) == null ? void 0 : _a.click();
|
|
65
|
+
}),
|
|
66
|
+
ref: forwardRef,
|
|
67
|
+
children
|
|
68
|
+
}
|
|
69
|
+
) }) });
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
Root.displayName = "Card";
|
|
73
|
+
const Heading = React__default.forwardRef(
|
|
74
|
+
({ className, variant = "title-200", as = "h2", ...props }, forwardRef) => {
|
|
75
|
+
const classes = clsx([styles[`${rootClassName}__heading`]], className);
|
|
76
|
+
return /* @__PURE__ */ jsx(
|
|
77
|
+
Heading$1,
|
|
78
|
+
{
|
|
79
|
+
...props,
|
|
80
|
+
...!props.asChild ? { as, asChild: false } : { as: void 0, asChild: true },
|
|
81
|
+
variant,
|
|
82
|
+
ref: forwardRef,
|
|
83
|
+
className: classes
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
Heading.displayName = "Card.Heading";
|
|
89
|
+
const Content = React__default.forwardRef(({ className, ...props }, forwardRef) => {
|
|
90
|
+
const classes = clsx([styles[`${rootClassName}__content`]], className);
|
|
91
|
+
return /* @__PURE__ */ jsx("div", { ...props, ref: forwardRef, className: classes });
|
|
92
|
+
});
|
|
93
|
+
Content.displayName = "Card.Content";
|
|
94
|
+
const Slot = React__default.forwardRef(({ className, align, ...props }, forwardRef) => {
|
|
95
|
+
const classes = clsx(
|
|
96
|
+
[
|
|
97
|
+
styles[`${rootClassName}__slot`],
|
|
98
|
+
{
|
|
99
|
+
[styles[`${rootClassName}__slot--center`]]: align === "top" || align === "bottom",
|
|
100
|
+
[styles[`${rootClassName}__slot--bottom`]]: align == null ? void 0 : align.includes("bottom")
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
className
|
|
104
|
+
);
|
|
105
|
+
return /* @__PURE__ */ jsx(
|
|
106
|
+
Box,
|
|
107
|
+
{
|
|
108
|
+
position: "absolute",
|
|
109
|
+
top: (align == null ? void 0 : align.includes("top")) ? "0" : void 0,
|
|
110
|
+
bottom: (align == null ? void 0 : align.includes("bottom")) ? "0" : void 0,
|
|
111
|
+
left: (align == null ? void 0 : align.includes("left")) ? "200" : (align == null ? void 0 : align.includes("right")) ? void 0 : "50%",
|
|
112
|
+
right: (align == null ? void 0 : align.includes("right")) ? "200" : void 0,
|
|
113
|
+
...props,
|
|
114
|
+
ref: forwardRef,
|
|
115
|
+
className: classes
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
});
|
|
119
|
+
const insetOptions = [
|
|
120
|
+
"top",
|
|
121
|
+
"bottom",
|
|
122
|
+
"left",
|
|
123
|
+
"right",
|
|
124
|
+
"all",
|
|
125
|
+
"top-right-left",
|
|
126
|
+
"bottom-left-right",
|
|
127
|
+
"top-left",
|
|
128
|
+
"top-right",
|
|
129
|
+
"bottom-left",
|
|
130
|
+
"bottom-right",
|
|
131
|
+
"top-bottom",
|
|
132
|
+
"left-right"
|
|
133
|
+
];
|
|
134
|
+
const Image = React__default.forwardRef(({ className, ...props }, forwardRef) => {
|
|
135
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
136
|
+
const classes = clsx(
|
|
137
|
+
[styles[`${rootClassName}__image`]],
|
|
138
|
+
{
|
|
139
|
+
[styles[`${rootClassName}__image--inset-top`]]: ((_a = props.inset) == null ? void 0 : _a.includes("top")) || ((_b = props.inset) == null ? void 0 : _b.includes("all")),
|
|
140
|
+
[styles[`${rootClassName}__image--inset-bottom`]]: ((_c = props.inset) == null ? void 0 : _c.includes("bottom")) || ((_d = props.inset) == null ? void 0 : _d.includes("all")),
|
|
141
|
+
[styles[`${rootClassName}__image--inset-left`]]: ((_e = props.inset) == null ? void 0 : _e.includes("left")) || ((_f = props.inset) == null ? void 0 : _f.includes("all")),
|
|
142
|
+
[styles[`${rootClassName}__image--inset-right`]]: ((_g = props.inset) == null ? void 0 : _g.includes("right")) || ((_h = props.inset) == null ? void 0 : _h.includes("all"))
|
|
143
|
+
},
|
|
144
|
+
className
|
|
145
|
+
);
|
|
146
|
+
return /* @__PURE__ */ jsx("img", { ...props, ref: forwardRef, className: classes });
|
|
147
|
+
});
|
|
148
|
+
Image.displayName = "Card.Image";
|
|
149
|
+
function getButtonVariant(variant) {
|
|
150
|
+
switch (variant) {
|
|
151
|
+
case "purple-dark":
|
|
152
|
+
return "primary-negative";
|
|
153
|
+
default:
|
|
154
|
+
return "primary";
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
const Button = React__default.forwardRef(
|
|
158
|
+
({ className, iconOnly = false, ...props }, forwardRef) => {
|
|
159
|
+
const context = React__default.useContext(RootContext);
|
|
160
|
+
const classes = clsx(
|
|
161
|
+
[styles[`${rootClassName}__button`]],
|
|
162
|
+
styles[actionElementIdentifier],
|
|
163
|
+
{
|
|
164
|
+
[styles[`${actionElementIdentifier}--disabled`]]: props.disabled
|
|
165
|
+
},
|
|
166
|
+
className
|
|
167
|
+
);
|
|
168
|
+
const ref = composeRefs(context == null ? void 0 : context.buttonRef, forwardRef);
|
|
169
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
170
|
+
Button$1,
|
|
171
|
+
{
|
|
172
|
+
...!iconOnly || !props["aria-label"] ? { iconOnly: false, "aria-label": void 0 } : { iconOnly: true, "aria-label": props["aria-label"] },
|
|
173
|
+
ref,
|
|
174
|
+
variant: getButtonVariant(context == null ? void 0 : context.variant),
|
|
175
|
+
...props,
|
|
176
|
+
className: classes
|
|
177
|
+
}
|
|
178
|
+
) });
|
|
179
|
+
}
|
|
180
|
+
);
|
|
181
|
+
Button.displayName = "Card.Button";
|
|
182
|
+
const Link = React__default.forwardRef(
|
|
183
|
+
({ className, ...props }, forwardRef) => {
|
|
184
|
+
const context = React__default.useContext(RootContext);
|
|
185
|
+
const classes = clsx([styles[`${rootClassName}__link`]], styles[actionElementIdentifier], className);
|
|
186
|
+
const ref = composeRefs(context == null ? void 0 : context.linkRef, forwardRef);
|
|
187
|
+
return /* @__PURE__ */ jsx(Link$1, { ...props, ref, className: classes });
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
Link.displayName = "Card.Link";
|
|
191
|
+
const Card = Object.assign(Root, {
|
|
192
|
+
Root,
|
|
193
|
+
Heading,
|
|
194
|
+
Content,
|
|
195
|
+
Image,
|
|
196
|
+
Button,
|
|
197
|
+
Link,
|
|
198
|
+
Slot,
|
|
199
|
+
variantOptions,
|
|
200
|
+
insetOptions
|
|
201
|
+
});
|
|
25
202
|
export {
|
|
26
|
-
|
|
203
|
+
Card
|
|
27
204
|
};
|
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import a from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import React__default from "react";
|
|
5
4
|
import "../../assets/4bbd022cee9b0f06.svg";
|
|
6
|
-
import { Icon
|
|
7
|
-
import { Text
|
|
8
|
-
const
|
|
5
|
+
import { Icon } from "../icon/icon.js";
|
|
6
|
+
import { Text } from "../text/text.js";
|
|
7
|
+
const styles = {
|
|
9
8
|
"teddy-field-error-text": "_teddy-field-error-text_1735t_1",
|
|
10
9
|
"teddy-field-error-text__indicator": "_teddy-field-error-text__indicator_1735t_12"
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
};
|
|
11
|
+
const rootClassName = "teddy-field-error-text";
|
|
12
|
+
const FieldErrorTextIndicator = React__default.forwardRef(
|
|
13
|
+
({ className, name = "error-filled", ...props }, forwardRef) => {
|
|
14
|
+
const classes = clsx([styles[`${rootClassName}__indicator`]], className);
|
|
15
|
+
return /* @__PURE__ */ jsx(Icon, { ...props, name, ref: forwardRef, className: classes });
|
|
15
16
|
}
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
);
|
|
18
|
+
const FieldErrorTextRoot = React__default.forwardRef(
|
|
19
|
+
({ className, children, ...props }, forwardRef) => {
|
|
20
|
+
const classes = clsx([styles[rootClassName]], className);
|
|
21
|
+
return /* @__PURE__ */ jsx(Text, { ...props, ref: forwardRef, className: classes, children });
|
|
20
22
|
}
|
|
21
23
|
);
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
Indicator:
|
|
24
|
+
FieldErrorTextRoot.displayName = "FieldErrorText";
|
|
25
|
+
const FieldErrorText = Object.assign(FieldErrorTextRoot, {
|
|
26
|
+
Indicator: FieldErrorTextIndicator
|
|
25
27
|
});
|
|
26
28
|
export {
|
|
27
|
-
|
|
29
|
+
FieldErrorText
|
|
28
30
|
};
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const p = {
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
+
import { extractProps } from "../../utils/layout/index.js";
|
|
6
|
+
const styles = {
|
|
8
7
|
"teddy-flex": "_teddy-flex_19teo_2"
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
};
|
|
9
|
+
const rootClassName = "teddy-flex";
|
|
10
|
+
const Flex = React__default.forwardRef((props, forwardRef) => {
|
|
11
|
+
const { className, asChild, ...rest } = extractProps(props);
|
|
12
|
+
const classes = clsx([styles[`${rootClassName}`]], className);
|
|
13
|
+
const Comp = asChild ? Slot : "div";
|
|
14
|
+
return /* @__PURE__ */ jsx(Comp, { ...rest, ref: forwardRef, className: classes });
|
|
12
15
|
});
|
|
13
|
-
|
|
16
|
+
Flex.displayName = "Flex";
|
|
14
17
|
export {
|
|
15
|
-
|
|
18
|
+
Flex
|
|
16
19
|
};
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const n = {
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
+
import { extractProps } from "../../utils/layout/index.js";
|
|
6
|
+
const styles = {
|
|
8
7
|
"teddy-grid": "_teddy-grid_1dv1t_2"
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
};
|
|
9
|
+
const rootClassName = "teddy-grid";
|
|
10
|
+
const Grid = React__default.forwardRef((args, forwardRef) => {
|
|
11
|
+
const { className, as: Tag = "div", asChild, ...props } = extractProps(args);
|
|
12
|
+
const Comp = asChild ? Slot : Tag;
|
|
13
|
+
const classes = clsx([styles[`${rootClassName}`]], className);
|
|
14
|
+
return /* @__PURE__ */ jsx(Comp, { ...props, ref: forwardRef, className: classes });
|
|
12
15
|
});
|
|
13
|
-
|
|
16
|
+
Grid.displayName = "Grid";
|
|
14
17
|
export {
|
|
15
|
-
|
|
18
|
+
Grid
|
|
16
19
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
const e = {
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import React__default from "react";
|
|
5
|
+
import { extractProps } from "../../utils/layout/index.js";
|
|
6
|
+
const styles = {
|
|
8
7
|
"teddy-heading": "_teddy-heading_r8os0_2",
|
|
9
8
|
"teddy-heading--hyphens": "_teddy-heading--hyphens_r8os0_9",
|
|
10
9
|
"teddy-heading--subsection-100": "_teddy-heading--subsection-100_r8os0_12",
|
|
@@ -19,7 +18,9 @@ const e = {
|
|
|
19
18
|
"teddy-heading--display-50": "_teddy-heading--display-50_r8os0_66",
|
|
20
19
|
"teddy-heading--display-100": "_teddy-heading--display-100_r8os0_72",
|
|
21
20
|
"teddy-heading--display-200": "_teddy-heading--display-200_r8os0_78"
|
|
22
|
-
}
|
|
21
|
+
};
|
|
22
|
+
const rootClassName = "teddy-heading";
|
|
23
|
+
const headingVariants = [
|
|
23
24
|
"title-100",
|
|
24
25
|
"title-200",
|
|
25
26
|
"title-300",
|
|
@@ -32,21 +33,23 @@ const e = {
|
|
|
32
33
|
"display-50",
|
|
33
34
|
"display-100",
|
|
34
35
|
"display-200"
|
|
35
|
-
]
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
];
|
|
37
|
+
const Root = React__default.forwardRef((props, forwardRef) => {
|
|
38
|
+
const { className, children, variant, asChild, enableHyphenation, as: Tag, ...rest } = extractProps(props);
|
|
39
|
+
const classes = clsx(
|
|
40
|
+
styles[`${rootClassName}`],
|
|
38
41
|
{
|
|
39
|
-
[
|
|
40
|
-
[
|
|
42
|
+
[styles[`${rootClassName}--${variant}`]]: variant,
|
|
43
|
+
[styles[`${rootClassName}--hyphens`]]: enableHyphenation
|
|
41
44
|
},
|
|
42
|
-
|
|
45
|
+
className
|
|
43
46
|
);
|
|
44
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ jsx(Slot, { ...rest, ref: forwardRef, className: classes, children: asChild ? children : Tag ? /* @__PURE__ */ jsx(Tag, { children }) : null });
|
|
45
48
|
});
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
headingVariants
|
|
49
|
+
Root.displayName = "Heading";
|
|
50
|
+
const Heading = Object.assign(Root, {
|
|
51
|
+
headingVariants
|
|
49
52
|
});
|
|
50
53
|
export {
|
|
51
|
-
|
|
54
|
+
Heading
|
|
52
55
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
const p = {
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import React__default from "react";
|
|
4
|
+
const styles = {
|
|
6
5
|
"teddy-helper-text": "_teddy-helper-text_6xdzb_1",
|
|
7
6
|
"teddy-helper-text--disabled": "_teddy-helper-text--disabled_6xdzb_9"
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
};
|
|
8
|
+
const rootClassName = "teddy-helper-text";
|
|
9
|
+
const HelperText = React__default.forwardRef(
|
|
10
|
+
({ className, children, ...props }, forwardRef) => {
|
|
11
|
+
const classes = clsx(
|
|
12
|
+
[styles[rootClassName]],
|
|
13
|
+
className
|
|
13
14
|
);
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ jsx("span", { ...props, ref: forwardRef, className: classes, children });
|
|
15
16
|
}
|
|
16
17
|
);
|
|
17
|
-
|
|
18
|
+
HelperText.displayName = "HelperText";
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
HelperText
|
|
20
21
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
const t = {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import iconsHref from "../../assets/4bbd022cee9b0f06.svg";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
const styles = {
|
|
6
5
|
"teddy-icon": "_teddy-icon_1rwgf_2",
|
|
7
6
|
"teddy-icon--font": "_teddy-icon--font_1rwgf_7",
|
|
8
7
|
"teddy-icon--xxs": "_teddy-icon--xxs_1rwgf_11",
|
|
@@ -12,16 +11,19 @@ const t = {
|
|
|
12
11
|
"teddy-icon--lg": "_teddy-icon--lg_1rwgf_27",
|
|
13
12
|
"teddy-icon--xl": "_teddy-icon--xl_1rwgf_31",
|
|
14
13
|
"teddy-icon-with-children": "_teddy-icon-with-children_1rwgf_35"
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
};
|
|
15
|
+
const rootClassName = "teddy-icon";
|
|
16
|
+
const rootClassNameWithChildren = `${rootClassName}-with-children`;
|
|
17
|
+
function Icon({ name, size = "font", className, children, ...props }) {
|
|
18
|
+
if (children) {
|
|
19
|
+
return /* @__PURE__ */ jsxs("span", { className: clsx([styles[rootClassNameWithChildren]]), children: [
|
|
20
|
+
/* @__PURE__ */ jsx(Icon, { name, size, className, ...props }),
|
|
21
|
+
children
|
|
21
22
|
] });
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
}
|
|
24
|
+
const classes = clsx([styles[rootClassName], styles[`${rootClassName}--${size}`]], className);
|
|
25
|
+
return /* @__PURE__ */ jsx("svg", { ...props, className: classes, children: /* @__PURE__ */ jsx("use", { href: `${iconsHref}#${name}` }) });
|
|
24
26
|
}
|
|
25
27
|
export {
|
|
26
|
-
|
|
28
|
+
Icon
|
|
27
29
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { Icon
|
|
1
|
+
import { default as default2 } from "../../assets/4bbd022cee9b0f06.svg";
|
|
2
|
+
import { Icon } from "./icon.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
Icon,
|
|
5
|
+
default2 as iconsHref
|
|
6
6
|
};
|