@telia/teddy 0.0.37 → 0.0.38
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/card/card-button.cjs +42 -0
- package/dist/components/card/card-button.d.ts +35 -0
- package/dist/components/card/card-button.js +42 -0
- package/dist/components/card/card-content.cjs +15 -0
- package/dist/components/card/card-content.d.ts +6 -0
- package/dist/components/card/card-content.js +15 -0
- package/dist/components/card/card-footer.cjs +15 -0
- package/dist/components/card/card-footer.d.ts +6 -0
- package/dist/components/card/card-footer.js +15 -0
- package/dist/components/card/card-heading.cjs +25 -0
- package/dist/components/card/card-heading.d.ts +6 -0
- package/dist/components/card/card-heading.js +25 -0
- package/dist/components/card/card-illustration.cjs +22 -0
- package/dist/components/card/card-illustration.d.ts +15 -0
- package/dist/components/card/card-illustration.js +22 -0
- package/dist/components/card/card-line.cjs +13 -0
- package/dist/components/card/card-line.d.ts +5 -0
- package/dist/components/card/card-line.js +13 -0
- package/dist/components/card/card-link.cjs +18 -0
- package/dist/components/card/card-link.d.ts +11 -0
- package/dist/components/card/card-link.js +18 -0
- package/dist/components/card/card-slot.cjs +36 -0
- package/dist/components/card/card-slot.d.ts +8 -0
- package/dist/components/card/card-slot.js +36 -0
- package/dist/components/card/card.cjs +38 -171
- package/dist/components/card/card.d.ts +15 -99
- package/dist/components/card/card.js +39 -172
- package/dist/components/card/index.cjs +28 -1
- package/dist/components/card/index.d.ts +64 -2
- package/dist/components/card/index.js +28 -1
- package/dist/components/card/utils.cjs +4 -0
- package/dist/components/card/utils.d.ts +2 -0
- package/dist/components/card/utils.js +4 -0
- package/dist/components/date-picker/css.cjs +59 -0
- package/dist/components/date-picker/css.d.ts +1 -0
- package/dist/components/date-picker/css.js +59 -0
- package/dist/components/date-picker/date-picker-day.cjs +67 -0
- package/dist/components/date-picker/date-picker-day.d.ts +13 -0
- package/dist/components/date-picker/date-picker-day.js +67 -0
- package/dist/components/date-picker/date-picker-input.cjs +89 -0
- package/dist/components/date-picker/date-picker-input.d.ts +27 -0
- package/dist/components/date-picker/date-picker-input.js +90 -0
- package/dist/components/date-picker/date-picker-localization.cjs +31 -0
- package/dist/components/date-picker/date-picker-localization.d.ts +20 -0
- package/dist/components/date-picker/date-picker-localization.js +32 -0
- package/dist/components/date-picker/date-picker-month.cjs +42 -0
- package/dist/components/date-picker/date-picker-month.d.ts +20 -0
- package/dist/components/date-picker/date-picker-month.js +43 -0
- package/dist/components/date-picker/date-picker-navigation-key.cjs +15 -0
- package/dist/components/date-picker/date-picker-navigation-key.d.ts +14 -0
- package/dist/components/date-picker/date-picker-navigation-key.js +16 -0
- package/dist/components/date-picker/date-picker-props.cjs +1 -0
- package/dist/components/date-picker/date-picker-props.d.ts +23 -0
- package/dist/components/date-picker/date-picker-props.js +1 -0
- package/dist/components/date-picker/date-picker-unique-id.cjs +4 -0
- package/dist/components/date-picker/date-picker-unique-id.d.ts +1 -0
- package/dist/components/date-picker/date-picker-unique-id.js +4 -0
- package/dist/components/date-picker/date-picker-year-print.cjs +61 -0
- package/dist/components/date-picker/date-picker-year-print.d.ts +12 -0
- package/dist/components/date-picker/date-picker-year-print.js +61 -0
- package/dist/components/date-picker/date-picker-year.cjs +36 -0
- package/dist/components/date-picker/date-picker-year.d.ts +16 -0
- package/dist/components/date-picker/date-picker-year.js +37 -0
- package/dist/components/date-picker/date-picker.cjs +597 -0
- package/dist/components/date-picker/date-picker.d.ts +5 -0
- package/dist/components/date-picker/date-picker.js +597 -0
- package/dist/components/date-picker/date-utils.cjs +340 -0
- package/dist/components/date-picker/date-utils.d.ts +29 -0
- package/dist/components/date-picker/date-utils.js +340 -0
- package/dist/components/date-picker/date-year-range.cjs +1 -0
- package/dist/components/date-picker/date-year-range.d.ts +4 -0
- package/dist/components/date-picker/date-year-range.js +1 -0
- package/dist/components/date-picker/dialog-utils.cjs +36 -0
- package/dist/components/date-picker/dialog-utils.d.ts +3 -0
- package/dist/components/date-picker/dialog-utils.js +36 -0
- package/dist/components/date-picker/index.cjs +4 -0
- package/dist/components/date-picker/index.d.ts +2 -0
- package/dist/components/date-picker/index.js +4 -0
- package/dist/components/expandable-card/expandable-card-root.cjs +15 -15
- package/dist/components/expandable-card/expandable-card-root.js +15 -15
- package/dist/components/image/image.cjs +1 -1
- package/dist/components/image/image.js +1 -1
- package/dist/components/index.cjs +4 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +3 -1
- package/dist/components/modal/modal.cjs +4 -4
- package/dist/components/modal/modal.js +4 -4
- package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.cjs +5 -5
- package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.js +5 -5
- package/dist/components/navigation-menu/global-navigation/utils.cjs +127 -126
- package/dist/components/navigation-menu/global-navigation/utils.d.ts +227 -219
- package/dist/components/navigation-menu/global-navigation/utils.js +127 -126
- package/dist/components/notification/notification.cjs +2 -2
- package/dist/components/notification/notification.d.ts +7 -7
- package/dist/components/notification/notification.js +1 -1
- package/dist/main.cjs +4 -2
- package/dist/main.js +3 -1
- package/dist/style.css +623 -179
- package/package.json +1 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const clsx = require("clsx");
|
|
6
|
+
const components_card_card = require("./card.cjs");
|
|
7
|
+
const utils_composeRefs = require("../../utils/composeRefs.cjs");
|
|
8
|
+
const components_button_button = require("../button/button.cjs");
|
|
9
|
+
function getButtonVariant(variant) {
|
|
10
|
+
switch (variant) {
|
|
11
|
+
case "purple-dark":
|
|
12
|
+
return "primary-negative";
|
|
13
|
+
default:
|
|
14
|
+
return "primary";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const Button = React.forwardRef(
|
|
18
|
+
({ className, iconOnly = false, ...props }, forwardRef) => {
|
|
19
|
+
const context = React.useContext(components_card_card.RootContext);
|
|
20
|
+
const classes = clsx(
|
|
21
|
+
[components_card_card.styles[`${components_card_card.rootClassName}__button`]],
|
|
22
|
+
components_card_card.styles[components_card_card.actionElementIdentifier],
|
|
23
|
+
{
|
|
24
|
+
[components_card_card.styles[`${components_card_card.actionElementIdentifier}--disabled`]]: props.disabled
|
|
25
|
+
},
|
|
26
|
+
className
|
|
27
|
+
);
|
|
28
|
+
const ref = utils_composeRefs.composeRefs(context == null ? void 0 : context.buttonRef, forwardRef);
|
|
29
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30
|
+
components_button_button.Button,
|
|
31
|
+
{
|
|
32
|
+
...!iconOnly || !props["aria-label"] ? { iconOnly: false, "aria-label": void 0 } : { iconOnly: true, "aria-label": props["aria-label"] },
|
|
33
|
+
ref,
|
|
34
|
+
variant: getButtonVariant(context == null ? void 0 : context.variant),
|
|
35
|
+
...props,
|
|
36
|
+
className: classes
|
|
37
|
+
}
|
|
38
|
+
) });
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
Button.displayName = "Button";
|
|
42
|
+
exports.Button = Button;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Button as PrimitiveButton } from '../button';
|
|
3
|
+
|
|
4
|
+
export type ButtonProps = Omit<React.ComponentPropsWithoutRef<typeof PrimitiveButton>, 'variant'> & {
|
|
5
|
+
variant?: React.ComponentPropsWithoutRef<typeof PrimitiveButton>['variant'];
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The button element is used when you want a trigger in the card
|
|
9
|
+
* When this card button element is used, the entire card is clickable
|
|
10
|
+
*/
|
|
11
|
+
export declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
|
|
12
|
+
display?: import('../../utils/generate-styling').DisplayChildren | undefined;
|
|
13
|
+
} & {
|
|
14
|
+
asChild?: boolean | undefined;
|
|
15
|
+
loading?: boolean | undefined;
|
|
16
|
+
fullWidth?: boolean | undefined;
|
|
17
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
18
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
19
|
+
} & {
|
|
20
|
+
iconOnly: true;
|
|
21
|
+
"aria-label": string;
|
|
22
|
+
} & React.RefAttributes<HTMLButtonElement>, "ref"> | Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
|
|
23
|
+
display?: import('../../utils/generate-styling').DisplayChildren | undefined;
|
|
24
|
+
} & {
|
|
25
|
+
asChild?: boolean | undefined;
|
|
26
|
+
loading?: boolean | undefined;
|
|
27
|
+
fullWidth?: boolean | undefined;
|
|
28
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
29
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
30
|
+
} & {
|
|
31
|
+
iconOnly?: false | undefined;
|
|
32
|
+
"aria-label"?: string | undefined;
|
|
33
|
+
} & React.RefAttributes<HTMLButtonElement>, "ref">, "variant"> & {
|
|
34
|
+
variant?: React.ComponentPropsWithoutRef<typeof PrimitiveButton>['variant'];
|
|
35
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { RootContext, s as styles, rootClassName, actionElementIdentifier } from "./card.js";
|
|
5
|
+
import { composeRefs } from "../../utils/composeRefs.js";
|
|
6
|
+
import { Button as Button$1 } from "../button/button.js";
|
|
7
|
+
function getButtonVariant(variant) {
|
|
8
|
+
switch (variant) {
|
|
9
|
+
case "purple-dark":
|
|
10
|
+
return "primary-negative";
|
|
11
|
+
default:
|
|
12
|
+
return "primary";
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const Button = React__default.forwardRef(
|
|
16
|
+
({ className, iconOnly = false, ...props }, forwardRef) => {
|
|
17
|
+
const context = React__default.useContext(RootContext);
|
|
18
|
+
const classes = clsx(
|
|
19
|
+
[styles[`${rootClassName}__button`]],
|
|
20
|
+
styles[actionElementIdentifier],
|
|
21
|
+
{
|
|
22
|
+
[styles[`${actionElementIdentifier}--disabled`]]: props.disabled
|
|
23
|
+
},
|
|
24
|
+
className
|
|
25
|
+
);
|
|
26
|
+
const ref = composeRefs(context == null ? void 0 : context.buttonRef, forwardRef);
|
|
27
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
28
|
+
Button$1,
|
|
29
|
+
{
|
|
30
|
+
...!iconOnly || !props["aria-label"] ? { iconOnly: false, "aria-label": void 0 } : { iconOnly: true, "aria-label": props["aria-label"] },
|
|
31
|
+
ref,
|
|
32
|
+
variant: getButtonVariant(context == null ? void 0 : context.variant),
|
|
33
|
+
...props,
|
|
34
|
+
className: classes
|
|
35
|
+
}
|
|
36
|
+
) });
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
Button.displayName = "Button";
|
|
40
|
+
export {
|
|
41
|
+
Button
|
|
42
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const clsx = require("clsx");
|
|
6
|
+
const components_card_card = require("./card.cjs");
|
|
7
|
+
const components_box_box = require("../box/box.cjs");
|
|
8
|
+
const Content = React.forwardRef(
|
|
9
|
+
({ className, ...props }, forwardRef) => {
|
|
10
|
+
const classes = clsx([components_card_card.styles[`${components_card_card.rootClassName}__content`]], className);
|
|
11
|
+
return /* @__PURE__ */ jsxRuntime.jsx(components_box_box.Box, { ...props, ref: forwardRef, className: classes });
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
Content.displayName = "Content";
|
|
15
|
+
exports.Content = Content;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Box } from '../box';
|
|
3
|
+
|
|
4
|
+
export type ContentProps = React.ComponentPropsWithoutRef<typeof Box>;
|
|
5
|
+
/** The content for the card */
|
|
6
|
+
export declare const Content: React.ForwardRefExoticComponent<ContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { s as styles, rootClassName } from "./card.js";
|
|
5
|
+
import { Box } from "../box/box.js";
|
|
6
|
+
const Content = React__default.forwardRef(
|
|
7
|
+
({ className, ...props }, forwardRef) => {
|
|
8
|
+
const classes = clsx([styles[`${rootClassName}__content`]], className);
|
|
9
|
+
return /* @__PURE__ */ jsx(Box, { ...props, ref: forwardRef, className: classes });
|
|
10
|
+
}
|
|
11
|
+
);
|
|
12
|
+
Content.displayName = "Content";
|
|
13
|
+
export {
|
|
14
|
+
Content
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const clsx = require("clsx");
|
|
6
|
+
const components_card_card = require("./card.cjs");
|
|
7
|
+
const components_flex_flex = require("../flex/flex.cjs");
|
|
8
|
+
const Footer = React.forwardRef(
|
|
9
|
+
({ className, ...props }, forwardRef) => {
|
|
10
|
+
const classes = clsx([components_card_card.styles[`${components_card_card.rootClassName}__footer`]], className);
|
|
11
|
+
return /* @__PURE__ */ jsxRuntime.jsx(components_flex_flex.Flex, { justify: "end", align: "center", width: "100%", ...props, ref: forwardRef, className: classes });
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
Footer.displayName = "Footer";
|
|
15
|
+
exports.Footer = Footer;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Flex } from '../flex';
|
|
3
|
+
|
|
4
|
+
export type FooterProps = React.ComponentPropsWithoutRef<typeof Flex>;
|
|
5
|
+
/** The Footer for the card */
|
|
6
|
+
export declare const Footer: React.ForwardRefExoticComponent<FooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { s as styles, rootClassName } from "./card.js";
|
|
5
|
+
import { Flex } from "../flex/flex.js";
|
|
6
|
+
const Footer = React__default.forwardRef(
|
|
7
|
+
({ className, ...props }, forwardRef) => {
|
|
8
|
+
const classes = clsx([styles[`${rootClassName}__footer`]], className);
|
|
9
|
+
return /* @__PURE__ */ jsx(Flex, { justify: "end", align: "center", width: "100%", ...props, ref: forwardRef, className: classes });
|
|
10
|
+
}
|
|
11
|
+
);
|
|
12
|
+
Footer.displayName = "Footer";
|
|
13
|
+
export {
|
|
14
|
+
Footer
|
|
15
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const clsx = require("clsx");
|
|
6
|
+
const components_card_card = require("./card.cjs");
|
|
7
|
+
const components_heading_heading = require("../heading/heading.cjs");
|
|
8
|
+
const Heading = React.forwardRef(
|
|
9
|
+
({ className, as = "h2", ...props }, forwardRef) => {
|
|
10
|
+
const classes = clsx([components_card_card.styles[`${components_card_card.rootClassName}__heading`]], className);
|
|
11
|
+
const variant = props.variant ?? "title-200";
|
|
12
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13
|
+
components_heading_heading.Heading,
|
|
14
|
+
{
|
|
15
|
+
...props,
|
|
16
|
+
...!props.asChild ? { as, asChild: false } : { as: void 0, asChild: true },
|
|
17
|
+
variant,
|
|
18
|
+
ref: forwardRef,
|
|
19
|
+
className: classes
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
Heading.displayName = "Heading";
|
|
25
|
+
exports.Heading = Heading;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Heading as PrimitiveHeading } from '../heading';
|
|
3
|
+
|
|
4
|
+
export type HeadingProps = Partial<React.ComponentPropsWithoutRef<typeof PrimitiveHeading>>;
|
|
5
|
+
/** The heading for the card */
|
|
6
|
+
export declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { s as styles, rootClassName } from "./card.js";
|
|
5
|
+
import { Heading as Heading$1 } from "../heading/heading.js";
|
|
6
|
+
const Heading = React__default.forwardRef(
|
|
7
|
+
({ className, as = "h2", ...props }, forwardRef) => {
|
|
8
|
+
const classes = clsx([styles[`${rootClassName}__heading`]], className);
|
|
9
|
+
const variant = props.variant ?? "title-200";
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
Heading$1,
|
|
12
|
+
{
|
|
13
|
+
...props,
|
|
14
|
+
...!props.asChild ? { as, asChild: false } : { as: void 0, asChild: true },
|
|
15
|
+
variant,
|
|
16
|
+
ref: forwardRef,
|
|
17
|
+
className: classes
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
Heading.displayName = "Heading";
|
|
23
|
+
export {
|
|
24
|
+
Heading
|
|
25
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const clsx = require("clsx");
|
|
6
|
+
const components_card_card = require("./card.cjs");
|
|
7
|
+
const Illustration = React.forwardRef(
|
|
8
|
+
({ className, children, rounded, inset: insetProps, ...props }, forwardRef) => {
|
|
9
|
+
const rootContext = React.useContext(components_card_card.RootContext);
|
|
10
|
+
const inset = insetProps || ((rootContext == null ? void 0 : rootContext.layout) === "rich-card" ? "top-right-left" : void 0);
|
|
11
|
+
const classes = clsx([components_card_card.styles[`${components_card_card.rootClassName}__illustration`]], className, [components_card_card.styles[`${components_card_card.rootClassName}__inset`]], {
|
|
12
|
+
[components_card_card.styles[`${components_card_card.rootClassName}__inset--top`]]: (inset == null ? void 0 : inset.includes("top")) || (inset == null ? void 0 : inset.includes("all")),
|
|
13
|
+
[components_card_card.styles[`${components_card_card.rootClassName}__inset--bottom`]]: (inset == null ? void 0 : inset.includes("bottom")) || (inset == null ? void 0 : inset.includes("all")),
|
|
14
|
+
[components_card_card.styles[`${components_card_card.rootClassName}__inset--left`]]: (inset == null ? void 0 : inset.includes("left")) || (inset == null ? void 0 : inset.includes("all")),
|
|
15
|
+
[components_card_card.styles[`${components_card_card.rootClassName}__inset--right`]]: (inset == null ? void 0 : inset.includes("right")) || (inset == null ? void 0 : inset.includes("all")),
|
|
16
|
+
[components_card_card.styles[`${components_card_card.rootClassName}__illustration--rounded`]]: rounded
|
|
17
|
+
});
|
|
18
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...props, className: classes, ref: forwardRef, children });
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
Illustration.displayName = "Illustration";
|
|
22
|
+
exports.Illustration = Illustration;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
declare const 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"];
|
|
4
|
+
export type IllustrationProps = React.ComponentPropsWithoutRef<'div'> & {
|
|
5
|
+
/** The inset allows make the image bleed out to the edges */
|
|
6
|
+
inset?: (typeof insetOptions)[number];
|
|
7
|
+
rounded?: boolean;
|
|
8
|
+
};
|
|
9
|
+
/** The illustration for the card */
|
|
10
|
+
export declare const Illustration: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
11
|
+
/** The inset allows make the image bleed out to the edges */
|
|
12
|
+
inset?: "top" | "bottom" | "left" | "right" | "all" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-right-left" | "bottom-left-right" | "top-bottom" | "left-right" | undefined;
|
|
13
|
+
rounded?: boolean | undefined;
|
|
14
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { RootContext, s as styles, rootClassName } from "./card.js";
|
|
5
|
+
const Illustration = React__default.forwardRef(
|
|
6
|
+
({ className, children, rounded, inset: insetProps, ...props }, forwardRef) => {
|
|
7
|
+
const rootContext = React__default.useContext(RootContext);
|
|
8
|
+
const inset = insetProps || ((rootContext == null ? void 0 : rootContext.layout) === "rich-card" ? "top-right-left" : void 0);
|
|
9
|
+
const classes = clsx([styles[`${rootClassName}__illustration`]], className, [styles[`${rootClassName}__inset`]], {
|
|
10
|
+
[styles[`${rootClassName}__inset--top`]]: (inset == null ? void 0 : inset.includes("top")) || (inset == null ? void 0 : inset.includes("all")),
|
|
11
|
+
[styles[`${rootClassName}__inset--bottom`]]: (inset == null ? void 0 : inset.includes("bottom")) || (inset == null ? void 0 : inset.includes("all")),
|
|
12
|
+
[styles[`${rootClassName}__inset--left`]]: (inset == null ? void 0 : inset.includes("left")) || (inset == null ? void 0 : inset.includes("all")),
|
|
13
|
+
[styles[`${rootClassName}__inset--right`]]: (inset == null ? void 0 : inset.includes("right")) || (inset == null ? void 0 : inset.includes("all")),
|
|
14
|
+
[styles[`${rootClassName}__illustration--rounded`]]: rounded
|
|
15
|
+
});
|
|
16
|
+
return /* @__PURE__ */ jsx("div", { ...props, className: classes, ref: forwardRef, children });
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
Illustration.displayName = "Illustration";
|
|
20
|
+
export {
|
|
21
|
+
Illustration
|
|
22
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const clsx = require("clsx");
|
|
6
|
+
const components_card_card = require("./card.cjs");
|
|
7
|
+
const components_box_box = require("../box/box.cjs");
|
|
8
|
+
const tokens_spacing_variables = require("../../tokens/spacing/variables.cjs");
|
|
9
|
+
const Line = React.forwardRef(({ className, ...props }, forwardRef) => {
|
|
10
|
+
const classes = clsx([components_card_card.styles[`${components_card_card.rootClassName}__line`]], className);
|
|
11
|
+
return /* @__PURE__ */ jsxRuntime.jsx(components_box_box.Box, { width: "100%", p: "0", m: `${tokens_spacing_variables.teddySpacing50} 0`, ...props, ref: forwardRef, className: classes, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("hr", {}) });
|
|
12
|
+
});
|
|
13
|
+
exports.Line = Line;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Box } from '../box';
|
|
3
|
+
|
|
4
|
+
export type LineProps = Omit<React.ComponentPropsWithoutRef<typeof Box>, 'asChild' | 'as' | 'children'>;
|
|
5
|
+
export declare const Line: React.ForwardRefExoticComponent<LineProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { s as styles, rootClassName } from "./card.js";
|
|
5
|
+
import { Box } from "../box/box.js";
|
|
6
|
+
import { teddySpacing50 } from "../../tokens/spacing/variables.js";
|
|
7
|
+
const Line = React__default.forwardRef(({ className, ...props }, forwardRef) => {
|
|
8
|
+
const classes = clsx([styles[`${rootClassName}__line`]], className);
|
|
9
|
+
return /* @__PURE__ */ jsx(Box, { width: "100%", p: "0", m: `${teddySpacing50} 0`, ...props, ref: forwardRef, className: classes, asChild: true, children: /* @__PURE__ */ jsx("hr", {}) });
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
Line
|
|
13
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const clsx = require("clsx");
|
|
6
|
+
const components_card_card = require("./card.cjs");
|
|
7
|
+
const utils_composeRefs = require("../../utils/composeRefs.cjs");
|
|
8
|
+
const components_link_link = require("../link/link.cjs");
|
|
9
|
+
const Link = React.forwardRef(
|
|
10
|
+
({ className, ...props }, forwardRef) => {
|
|
11
|
+
const context = React.useContext(components_card_card.RootContext);
|
|
12
|
+
const classes = clsx([components_card_card.styles[`${components_card_card.rootClassName}__link`]], components_card_card.styles[components_card_card.actionElementIdentifier], className);
|
|
13
|
+
const ref = utils_composeRefs.composeRefs(context == null ? void 0 : context.linkRef, forwardRef);
|
|
14
|
+
return /* @__PURE__ */ jsxRuntime.jsx(components_link_link.Link, { ...props, ref, className: classes });
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
Link.displayName = "Link";
|
|
18
|
+
exports.Link = Link;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Link as PrimitiveLink } from '../link';
|
|
3
|
+
|
|
4
|
+
export type LinkProps = React.ComponentPropsWithoutRef<typeof PrimitiveLink>;
|
|
5
|
+
export declare const Link: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
6
|
+
asChild?: boolean | undefined;
|
|
7
|
+
disableVisited?: boolean | undefined;
|
|
8
|
+
ensureTargetArea?: boolean | undefined;
|
|
9
|
+
silent?: boolean | undefined;
|
|
10
|
+
variant: "text" | "navigation" | "text-negative" | "standalone" | "standalone-negative" | "navigation-negative";
|
|
11
|
+
} & React.RefAttributes<HTMLAnchorElement>, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { RootContext, s as styles, rootClassName, actionElementIdentifier } from "./card.js";
|
|
5
|
+
import { composeRefs } from "../../utils/composeRefs.js";
|
|
6
|
+
import { Link as Link$1 } from "../link/link.js";
|
|
7
|
+
const Link = React__default.forwardRef(
|
|
8
|
+
({ className, ...props }, forwardRef) => {
|
|
9
|
+
const context = React__default.useContext(RootContext);
|
|
10
|
+
const classes = clsx([styles[`${rootClassName}__link`]], styles[actionElementIdentifier], className);
|
|
11
|
+
const ref = composeRefs(context == null ? void 0 : context.linkRef, forwardRef);
|
|
12
|
+
return /* @__PURE__ */ jsx(Link$1, { ...props, ref, className: classes });
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
Link.displayName = "Link";
|
|
16
|
+
export {
|
|
17
|
+
Link
|
|
18
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const clsx = require("clsx");
|
|
6
|
+
const components_card_card = require("./card.cjs");
|
|
7
|
+
const components_box_box = require("../box/box.cjs");
|
|
8
|
+
const Slot = React.forwardRef(
|
|
9
|
+
({ className, align, ...props }, forwardRef) => {
|
|
10
|
+
const classes = clsx(
|
|
11
|
+
[
|
|
12
|
+
components_card_card.styles[`${components_card_card.rootClassName}__slot`],
|
|
13
|
+
{
|
|
14
|
+
[components_card_card.styles[`${components_card_card.rootClassName}__slot--center`]]: align === "top" || align === "bottom",
|
|
15
|
+
[components_card_card.styles[`${components_card_card.rootClassName}__slot--bottom`]]: align == null ? void 0 : align.includes("bottom")
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
className
|
|
19
|
+
);
|
|
20
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
21
|
+
components_box_box.Box,
|
|
22
|
+
{
|
|
23
|
+
position: "absolute",
|
|
24
|
+
top: (align == null ? void 0 : align.includes("top")) ? "0" : void 0,
|
|
25
|
+
bottom: (align == null ? void 0 : align.includes("bottom")) ? "0" : void 0,
|
|
26
|
+
left: (align == null ? void 0 : align.includes("left")) ? "200" : (align == null ? void 0 : align.includes("right")) ? void 0 : "50%",
|
|
27
|
+
right: (align == null ? void 0 : align.includes("right")) ? "200" : void 0,
|
|
28
|
+
...props,
|
|
29
|
+
ref: forwardRef,
|
|
30
|
+
className: classes
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
Slot.displayName = "Slot";
|
|
36
|
+
exports.Slot = Slot;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Box } from '../box';
|
|
3
|
+
|
|
4
|
+
export type SlotProps = React.ComponentPropsWithoutRef<typeof Box> & {
|
|
5
|
+
align?: 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
6
|
+
};
|
|
7
|
+
/** An element that has absolute position, used to place content on the edge of the card */
|
|
8
|
+
export declare const Slot: React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { s as styles, rootClassName } from "./card.js";
|
|
5
|
+
import { Box } from "../box/box.js";
|
|
6
|
+
const Slot = React__default.forwardRef(
|
|
7
|
+
({ className, align, ...props }, forwardRef) => {
|
|
8
|
+
const classes = clsx(
|
|
9
|
+
[
|
|
10
|
+
styles[`${rootClassName}__slot`],
|
|
11
|
+
{
|
|
12
|
+
[styles[`${rootClassName}__slot--center`]]: align === "top" || align === "bottom",
|
|
13
|
+
[styles[`${rootClassName}__slot--bottom`]]: align == null ? void 0 : align.includes("bottom")
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
className
|
|
17
|
+
);
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
Box,
|
|
20
|
+
{
|
|
21
|
+
position: "absolute",
|
|
22
|
+
top: (align == null ? void 0 : align.includes("top")) ? "0" : void 0,
|
|
23
|
+
bottom: (align == null ? void 0 : align.includes("bottom")) ? "0" : void 0,
|
|
24
|
+
left: (align == null ? void 0 : align.includes("left")) ? "200" : (align == null ? void 0 : align.includes("right")) ? void 0 : "50%",
|
|
25
|
+
right: (align == null ? void 0 : align.includes("right")) ? "200" : void 0,
|
|
26
|
+
...props,
|
|
27
|
+
ref: forwardRef,
|
|
28
|
+
className: classes
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
Slot.displayName = "Slot";
|
|
34
|
+
export {
|
|
35
|
+
Slot
|
|
36
|
+
};
|