@telia/teddy 0.3.0 → 0.3.2
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-illustration.d.ts +1 -1
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/channel-button/channel-button-illustration.cjs +33 -0
- package/dist/components/channel-button/channel-button-illustration.d.ts +8 -0
- package/dist/components/channel-button/channel-button-illustration.js +33 -0
- package/dist/components/channel-button/channel-button-image.cjs +19 -0
- package/dist/components/channel-button/channel-button-image.d.ts +5 -0
- package/dist/components/channel-button/channel-button-image.js +19 -0
- package/dist/components/channel-button/channel-button-root.cjs +41 -0
- package/dist/components/channel-button/channel-button-root.d.ts +34 -0
- package/dist/components/channel-button/channel-button-root.js +41 -0
- package/dist/components/channel-button/channel-button-text.cjs +23 -0
- package/dist/components/channel-button/channel-button-text.d.ts +5 -0
- package/dist/components/channel-button/channel-button-text.js +23 -0
- package/dist/components/channel-button/index.cjs +15 -0
- package/dist/components/channel-button/index.d.ts +91 -0
- package/dist/components/channel-button/index.js +15 -0
- package/dist/components/checkbox/checkbox-group-list.d.ts +1 -1
- package/dist/components/checkbox/checkbox-group.d.ts +1 -1
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/chip/chip-indicator.d.ts +2 -2
- package/dist/components/chip/index.d.ts +2 -2
- package/dist/components/color-dot/index.d.ts +1 -1
- package/dist/components/expandable-card/expandable-card-button.d.ts +2 -2
- package/dist/components/expandable-card/index.d.ts +3 -3
- package/dist/components/icon/utils.d.ts +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/link/link.cjs +10 -10
- package/dist/components/link/link.js +10 -10
- package/dist/components/modal/modal.cjs +2 -1
- package/dist/components/modal/modal.js +2 -1
- package/dist/components/navigation-menu/navigation-menu.cjs +2 -1
- package/dist/components/navigation-menu/navigation-menu.js +2 -1
- package/dist/components/notabene/index.cjs +4 -9
- package/dist/components/notabene/index.d.ts +51 -8
- package/dist/components/notabene/index.js +4 -9
- package/dist/components/notabene/notabene-icon.cjs +1 -1
- package/dist/components/notabene/notabene-icon.d.ts +2 -2
- package/dist/components/notabene/notabene-icon.js +1 -1
- package/dist/components/notification/index.cjs +13 -2
- package/dist/components/notification/index.d.ts +132 -2
- package/dist/components/notification/index.js +12 -1
- package/dist/components/notification/notification-dismiss.cjs +46 -0
- package/dist/components/notification/notification-dismiss.d.ts +5 -0
- package/dist/components/notification/notification-dismiss.js +29 -0
- package/dist/components/notification/notification-footer.cjs +18 -0
- package/dist/components/notification/notification-footer.d.ts +5 -0
- package/dist/components/notification/notification-footer.js +18 -0
- package/dist/components/notification/notification-heading.cjs +18 -0
- package/dist/components/notification/notification-heading.d.ts +5 -0
- package/dist/components/notification/notification-heading.js +18 -0
- package/dist/components/notification/notification-icon.cjs +32 -0
- package/dist/components/notification/notification-icon.d.ts +9 -0
- package/dist/components/notification/notification-icon.js +32 -0
- package/dist/components/notification/notification-root.cjs +59 -0
- package/dist/components/notification/notification-root.d.ts +86 -0
- package/dist/components/notification/notification-root.js +42 -0
- package/dist/components/notification/notification-text.cjs +15 -0
- package/dist/components/notification/notification-text.d.ts +5 -0
- package/dist/components/notification/notification-text.js +15 -0
- package/dist/components/radio-card-group/radio-card-group-content.cjs +2 -1
- package/dist/components/radio-card-group/radio-card-group-content.js +2 -1
- package/dist/components/radio-card-group/radio-card-group-item-title.cjs +11 -10
- package/dist/components/radio-card-group/radio-card-group-item-title.js +11 -10
- package/dist/components/radio-card-group/radio-card-group-item.cjs +2 -1
- package/dist/components/radio-card-group/radio-card-group-item.js +2 -1
- package/dist/components/scroll-area/index.d.ts +2 -2
- package/dist/components/scroll-area/scroll-area-button.d.ts +2 -2
- package/dist/components/tabs/index.d.ts +2 -2
- package/dist/components/tabs/tabs-scroll-button.d.ts +2 -2
- package/dist/components/text-field/index.d.ts +2 -2
- package/dist/components/text-field/text-field-button.d.ts +2 -2
- package/dist/components/toggle/toggle.d.ts +2 -2
- package/dist/components/tooltip/index.d.ts +2 -2
- package/dist/main.cjs +4 -2
- package/dist/main.js +3 -1
- package/dist/style.css +1035 -948
- package/dist/utils/generate-styling/grid.d.ts +24 -24
- package/dist/utils/generate-styling/index.d.ts +16 -16
- package/dist/utils/generate-styling/util.d.ts +2 -2
- package/package.json +16 -16
- package/dist/components/notification/notification.cjs +0 -116
- package/dist/components/notification/notification.d.ts +0 -106
- package/dist/components/notification/notification.js +0 -99
|
@@ -0,0 +1,46 @@
|
|
|
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 CollapsiblePrimitive = require("@radix-ui/react-collapsible");
|
|
7
|
+
const components_button_button = require("../button/button.cjs");
|
|
8
|
+
require("../../assets/sprite.1321fab0-teddy.svg");
|
|
9
|
+
const components_icon_icon = require("../icon/icon.cjs");
|
|
10
|
+
const components_notification_notificationRoot = require("./notification-root.cjs");
|
|
11
|
+
function _interopNamespaceDefault(e) {
|
|
12
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
13
|
+
if (e) {
|
|
14
|
+
for (const k in e) {
|
|
15
|
+
if (k !== "default") {
|
|
16
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: () => e[k]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
const CollapsiblePrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(CollapsiblePrimitive);
|
|
28
|
+
const Dismiss = React.forwardRef(
|
|
29
|
+
({ className, children, ...props }, forwardRef) => {
|
|
30
|
+
const classes = clsx([components_notification_notificationRoot.styles[`${components_notification_notificationRoot.rootClassName}__dismiss`]], className);
|
|
31
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CollapsiblePrimitive__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32
|
+
components_button_button.Button,
|
|
33
|
+
{
|
|
34
|
+
iconOnly: true,
|
|
35
|
+
"aria-label": "Lukk",
|
|
36
|
+
variant: "tertiary-purple",
|
|
37
|
+
...props,
|
|
38
|
+
ref: forwardRef,
|
|
39
|
+
className: classes,
|
|
40
|
+
children: children || /* @__PURE__ */ jsxRuntime.jsx(components_icon_icon.Icon, { size: "sm", name: "close" })
|
|
41
|
+
}
|
|
42
|
+
) });
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
Dismiss.displayName = "Dismiss";
|
|
46
|
+
exports.Dismiss = Dismiss;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Button as ButtonPrimitives } from '../button';
|
|
3
|
+
|
|
4
|
+
export type DismissProps = Omit<React.ComponentPropsWithoutRef<typeof ButtonPrimitives>, 'variant'>;
|
|
5
|
+
export declare const Dismiss: React.ForwardRefExoticComponent<DismissProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
5
|
+
import { Button } from "../button/button.js";
|
|
6
|
+
import "../../assets/sprite.1321fab0-teddy.svg";
|
|
7
|
+
import { Icon } from "../icon/icon.js";
|
|
8
|
+
import { s as styles, rootClassName } from "./notification-root.js";
|
|
9
|
+
const Dismiss = React__default.forwardRef(
|
|
10
|
+
({ className, children, ...props }, forwardRef) => {
|
|
11
|
+
const classes = clsx([styles[`${rootClassName}__dismiss`]], className);
|
|
12
|
+
return /* @__PURE__ */ jsx(CollapsiblePrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
13
|
+
Button,
|
|
14
|
+
{
|
|
15
|
+
iconOnly: true,
|
|
16
|
+
"aria-label": "Lukk",
|
|
17
|
+
variant: "tertiary-purple",
|
|
18
|
+
...props,
|
|
19
|
+
ref: forwardRef,
|
|
20
|
+
className: classes,
|
|
21
|
+
children: children || /* @__PURE__ */ jsx(Icon, { size: "sm", name: "close" })
|
|
22
|
+
}
|
|
23
|
+
) });
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
Dismiss.displayName = "Dismiss";
|
|
27
|
+
export {
|
|
28
|
+
Dismiss
|
|
29
|
+
};
|
|
@@ -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_notification_notificationRoot = require("./notification-root.cjs");
|
|
7
|
+
const components_box_box = require("../box/box.cjs");
|
|
8
|
+
const Footer = React.forwardRef(
|
|
9
|
+
({ className, ...props }, forwardRef) => {
|
|
10
|
+
const classes = clsx([components_notification_notificationRoot.styles[`${components_notification_notificationRoot.rootClassName}__footer`]], className);
|
|
11
|
+
const context = React.useContext(components_notification_notificationRoot.NotificationContext);
|
|
12
|
+
if ((context == null ? void 0 : context.type) === "tile")
|
|
13
|
+
return null;
|
|
14
|
+
return /* @__PURE__ */ jsxRuntime.jsx(components_box_box.Box, { ...props, ref: forwardRef, className: classes });
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
Footer.displayName = "Notification.Footer";
|
|
18
|
+
exports.Footer = Footer;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { s as styles, rootClassName, NotificationContext } from "./notification-root.js";
|
|
5
|
+
import { Box } from "../box/box.js";
|
|
6
|
+
const Footer = React__default.forwardRef(
|
|
7
|
+
({ className, ...props }, forwardRef) => {
|
|
8
|
+
const classes = clsx([styles[`${rootClassName}__footer`]], className);
|
|
9
|
+
const context = React__default.useContext(NotificationContext);
|
|
10
|
+
if ((context == null ? void 0 : context.type) === "tile")
|
|
11
|
+
return null;
|
|
12
|
+
return /* @__PURE__ */ jsx(Box, { ...props, ref: forwardRef, className: classes });
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
Footer.displayName = "Notification.Footer";
|
|
16
|
+
export {
|
|
17
|
+
Footer
|
|
18
|
+
};
|
|
@@ -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 components_heading_heading = require("../heading/heading.cjs");
|
|
6
|
+
const components_notification_notificationRoot = require("./notification-root.cjs");
|
|
7
|
+
const clsx = require("clsx");
|
|
8
|
+
const Heading = React.forwardRef(
|
|
9
|
+
({ className, ...props }, forwardRef) => {
|
|
10
|
+
const classes = clsx([components_notification_notificationRoot.styles[`${components_notification_notificationRoot.rootClassName}__heading`]], className);
|
|
11
|
+
const context = React.useContext(components_notification_notificationRoot.NotificationContext);
|
|
12
|
+
if ((context == null ? void 0 : context.type) === "tile")
|
|
13
|
+
return null;
|
|
14
|
+
return /* @__PURE__ */ jsxRuntime.jsx(components_heading_heading.Heading, { ...props, variant: "subsection-100", asChild: false, ref: forwardRef, className: classes });
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
Heading.displayName = "Heading";
|
|
18
|
+
exports.Heading = Heading;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Heading as HeadingPrimitives } from '../heading';
|
|
3
|
+
|
|
4
|
+
export type HeadingProps = Omit<React.ComponentPropsWithoutRef<typeof HeadingPrimitives>, 'asChild' | 'variant'>;
|
|
5
|
+
export declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import { Heading as Heading$1 } from "../heading/heading.js";
|
|
4
|
+
import { s as styles, rootClassName, NotificationContext } from "./notification-root.js";
|
|
5
|
+
import clsx from "clsx";
|
|
6
|
+
const Heading = React__default.forwardRef(
|
|
7
|
+
({ className, ...props }, forwardRef) => {
|
|
8
|
+
const classes = clsx([styles[`${rootClassName}__heading`]], className);
|
|
9
|
+
const context = React__default.useContext(NotificationContext);
|
|
10
|
+
if ((context == null ? void 0 : context.type) === "tile")
|
|
11
|
+
return null;
|
|
12
|
+
return /* @__PURE__ */ jsx(Heading$1, { ...props, variant: "subsection-100", asChild: false, ref: forwardRef, className: classes });
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
Heading.displayName = "Heading";
|
|
16
|
+
export {
|
|
17
|
+
Heading
|
|
18
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
require("../../assets/sprite.1321fab0-teddy.svg");
|
|
6
|
+
const components_icon_icon = require("../icon/icon.cjs");
|
|
7
|
+
const components_notification_notificationRoot = require("./notification-root.cjs");
|
|
8
|
+
const clsx = require("clsx");
|
|
9
|
+
function getVariantIcon(variant) {
|
|
10
|
+
switch (variant) {
|
|
11
|
+
case "success":
|
|
12
|
+
return "check-circle-filled";
|
|
13
|
+
case "error":
|
|
14
|
+
return "error-filled";
|
|
15
|
+
case "warning":
|
|
16
|
+
return "alert-filled";
|
|
17
|
+
case "information":
|
|
18
|
+
return "info-filled";
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const Icon = React.forwardRef(
|
|
22
|
+
({ className, ...props }, forwardRef) => {
|
|
23
|
+
const classes = clsx([components_notification_notificationRoot.styles[`${components_notification_notificationRoot.rootClassName}__icon`]], className);
|
|
24
|
+
const context = React.useContext(components_notification_notificationRoot.NotificationContext);
|
|
25
|
+
const name = props.name || getVariantIcon(context == null ? void 0 : context.variant);
|
|
26
|
+
if (!name)
|
|
27
|
+
return props.children;
|
|
28
|
+
return /* @__PURE__ */ jsxRuntime.jsx(components_icon_icon.Icon, { size: "md", ...props, name, ref: forwardRef, className: classes });
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
Icon.displayName = "Icon";
|
|
32
|
+
exports.Icon = Icon;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Icon as IconPrimitives } from '../icon';
|
|
3
|
+
|
|
4
|
+
export type IconProps = Partial<React.ComponentPropsWithoutRef<typeof IconPrimitives>>;
|
|
5
|
+
export declare const Icon: React.ForwardRefExoticComponent<Partial<Omit<React.SVGProps<SVGSVGElement> & {
|
|
6
|
+
name: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "x" | "key" | "download" | "split" | "alert" | "radio" | "copy" | "add" | "reverse" | "infinite" | "visible" | "help" | "zoom-out" | "zoom" | "email" | "close" | "error" | "focus" | "play" | "sync" | "present" | "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "dislike" | "edit" | "heart-filled" | "heart" | "invisible" | "like" | "lock-open" | "lock" | "login" | "logout" | "maximize" | "minimize" | "mute" | "password-invisible" | "password-visible" | "play-filled" | "remove-filled" | "remove" | "save" | "send" | "settings" | "share" | "shortcut" | "shuffle" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "tv-next" | "tv-pause" | "tv-previous" | "tv-stop" | "upload" | "volume" | "connected-building" | "home" | "hospital" | "industry" | "premises-datacenter" | "premises-large" | "premises-medium" | "premises-small" | "premises" | "store" | "address-book" | "b2b-customer" | "care" | "chat-robot" | "chat" | "child-1" | "child-2" | "conversation" | "customer-dialogue" | "dsl-hub" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-sad" | "sms" | "support" | "user-admin" | "vcard" | "voicemail" | "battery" | "bluetooth" | "broadband" | "broken-phone" | "cast" | "cloud-connect" | "connected" | "core-router" | "daas-device" | "data-transfer" | "desktop" | "devices" | "esim-simcard" | "esim" | "face-id" | "fiber" | "fingerprint" | "fiveg" | "fourg" | "home-installation" | "industrial-iot" | "internet" | "it-service" | "laptop" | "mobile-broadband" | "network" | "phone-recycling" | "phone-ringing" | "phone" | "rack" | "refill-card" | "remote-control" | "repair" | "roaming" | "router" | "secure-device" | "sense-car" | "server" | "service-device" | "service-supervision" | "slow-wifi" | "smart-wifi" | "smartphone" | "smartwatch" | "tablet" | "trade-phone" | "tv" | "usb" | "voice-switch" | "wallplug" | "wireless-off" | "wireless-weak" | "wireless" | "world-alert" | "world-off" | "world-question" | "bar-chart" | "doc" | "document-doc" | "document-edit" | "document-pdf" | "document-ppt" | "excel" | "folder-copy" | "folder-new" | "folder" | "gif" | "graph" | "media-content" | "org-chart" | "pie-chart" | "print" | "register" | "report" | "simcard" | "spell-check" | "credit-card" | "euro" | "invoice" | "kontantkort" | "kr" | "late-payment" | "money-back-euro" | "money-back-kr" | "money-euro" | "money-kr" | "pay-monthly-euro" | "pay-monthly-kr" | "pay-once-euro" | "pay-once-kr" | "payment-success" | "savings" | "wallet" | "airplay" | "camera" | "entertainment" | "external" | "film" | "games" | "megaphone" | "microphone" | "music" | "player-settings" | "record" | "stream" | "trailer" | "video-conference" | "activity-level" | "ai-robot" | "bag" | "basketball" | "blood-pressure" | "bulb" | "business-continuity" | "business-intelligence" | "calendar" | "cart" | "close-circle" | "cloud" | "coffee" | "compass" | "construction" | "cookie" | "delivery" | "drone" | "education" | "efficiency" | "environment" | "facemask" | "flag" | "food" | "fraud" | "getting-started" | "home-care" | "job-search" | "layers" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "press-button" | "price" | "pulse" | "recycle" | "reservation" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "smart-connect" | "snowflake" | "speedometer" | "spyware" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "youtube" | "alert-filled" | "check-circle-filled" | "check-circle" | "error-filled" | "info-filled" | "info" | "question-filled" | "question" | "warning" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-subdirectory" | "arrow-up" | "card-view" | "checkmark-bold" | "checkmark" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "grid-view" | "list-view" | "minus-bold" | "minus" | "more-horizontal" | "more-vertical" | "plus" | "services" | "sorter" | "table-view";
|
|
7
|
+
size?: ("xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "font") | undefined;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}, "ref">> & React.RefAttributes<SVGSVGElement>>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import "../../assets/sprite.1321fab0-teddy.svg";
|
|
4
|
+
import { Icon as Icon$1 } from "../icon/icon.js";
|
|
5
|
+
import { s as styles, rootClassName, NotificationContext } from "./notification-root.js";
|
|
6
|
+
import clsx from "clsx";
|
|
7
|
+
function getVariantIcon(variant) {
|
|
8
|
+
switch (variant) {
|
|
9
|
+
case "success":
|
|
10
|
+
return "check-circle-filled";
|
|
11
|
+
case "error":
|
|
12
|
+
return "error-filled";
|
|
13
|
+
case "warning":
|
|
14
|
+
return "alert-filled";
|
|
15
|
+
case "information":
|
|
16
|
+
return "info-filled";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const Icon = React__default.forwardRef(
|
|
20
|
+
({ className, ...props }, forwardRef) => {
|
|
21
|
+
const classes = clsx([styles[`${rootClassName}__icon`]], className);
|
|
22
|
+
const context = React__default.useContext(NotificationContext);
|
|
23
|
+
const name = props.name || getVariantIcon(context == null ? void 0 : context.variant);
|
|
24
|
+
if (!name)
|
|
25
|
+
return props.children;
|
|
26
|
+
return /* @__PURE__ */ jsx(Icon$1, { size: "md", ...props, name, ref: forwardRef, className: classes });
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
Icon.displayName = "Icon";
|
|
30
|
+
export {
|
|
31
|
+
Icon
|
|
32
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
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 CollapsiblePrimitive = require("@radix-ui/react-collapsible");
|
|
7
|
+
const reactUseControllableState = require("@radix-ui/react-use-controllable-state");
|
|
8
|
+
const components_card_index = require("../card/index.cjs");
|
|
9
|
+
function _interopNamespaceDefault(e) {
|
|
10
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
11
|
+
if (e) {
|
|
12
|
+
for (const k in e) {
|
|
13
|
+
if (k !== "default") {
|
|
14
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: () => e[k]
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
n.default = e;
|
|
23
|
+
return Object.freeze(n);
|
|
24
|
+
}
|
|
25
|
+
const CollapsiblePrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(CollapsiblePrimitive);
|
|
26
|
+
const styles = {
|
|
27
|
+
"teddy-notification": "_teddy-notification_18bjx_3",
|
|
28
|
+
"teddy-notification--success": "_teddy-notification--success_18bjx_11",
|
|
29
|
+
"teddy-notification--warning": "_teddy-notification--warning_18bjx_16",
|
|
30
|
+
"teddy-notification--error": "_teddy-notification--error_18bjx_21",
|
|
31
|
+
"teddy-notification--information": "_teddy-notification--information_18bjx_26",
|
|
32
|
+
"teddy-notification--beige": "_teddy-notification--beige_18bjx_31",
|
|
33
|
+
"teddy-notification--teal": "_teddy-notification--teal_18bjx_36",
|
|
34
|
+
"teddy-notification--gray": "_teddy-notification--gray_18bjx_41",
|
|
35
|
+
"teddy-notification--tile": "_teddy-notification--tile_18bjx_46",
|
|
36
|
+
"teddy-notification__text": "_teddy-notification__text_18bjx_49",
|
|
37
|
+
"teddy-notification__dismiss": "_teddy-notification__dismiss_18bjx_52",
|
|
38
|
+
"teddy-notification__heading": "_teddy-notification__heading_18bjx_56",
|
|
39
|
+
"teddy-notification__footer": "_teddy-notification__footer_18bjx_65",
|
|
40
|
+
"teddy-notification__icon": "_teddy-notification__icon_18bjx_68"
|
|
41
|
+
};
|
|
42
|
+
const rootClassName = "teddy-notification";
|
|
43
|
+
const NotificationContext = React.createContext(void 0);
|
|
44
|
+
const Root = React.forwardRef(
|
|
45
|
+
({ className, open: openProp, defaultOpen, onOpenChange, variant, type, ...props }, forwardRef) => {
|
|
46
|
+
const classes = clsx([styles[`${rootClassName}`]], styles[`${rootClassName}--${variant}`], styles[`${rootClassName}--${type}`], className);
|
|
47
|
+
const [open = true, setOpen] = reactUseControllableState.useControllableState({
|
|
48
|
+
prop: openProp,
|
|
49
|
+
defaultProp: defaultOpen,
|
|
50
|
+
onChange: onOpenChange
|
|
51
|
+
});
|
|
52
|
+
return /* @__PURE__ */ jsxRuntime.jsx(NotificationContext.Provider, { value: { variant, type }, children: /* @__PURE__ */ jsxRuntime.jsx(CollapsiblePrimitive__namespace.Root, { open, onOpenChange: setOpen, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(CollapsiblePrimitive__namespace.Content, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(components_card_index.Card, { variant: "white", as: void 0, ...props, ref: forwardRef, className: classes }) }) }) });
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
Root.displayName = "Root";
|
|
56
|
+
exports.NotificationContext = NotificationContext;
|
|
57
|
+
exports.Root = Root;
|
|
58
|
+
exports.rootClassName = rootClassName;
|
|
59
|
+
exports.styles = styles;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Card } from '../card';
|
|
3
|
+
|
|
4
|
+
export declare const rootClassName = "teddy-notification";
|
|
5
|
+
export type RootProps = Omit<React.ComponentPropsWithoutRef<typeof Card>, 'variant' | 'as' | 'layout'> & {
|
|
6
|
+
/**
|
|
7
|
+
* The variant of the notification.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
variant?: 'success' | 'error' | 'warning' | 'information' | 'beige' | 'teal' | 'gray';
|
|
11
|
+
/**
|
|
12
|
+
* The tyoe of the notification.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
type?: 'card' | 'tile';
|
|
16
|
+
open?: boolean;
|
|
17
|
+
defaultOpen?: boolean;
|
|
18
|
+
onOpenChange?: (open: boolean) => void;
|
|
19
|
+
role?: 'alert';
|
|
20
|
+
};
|
|
21
|
+
export declare const NotificationContext: React.Context<Pick<RootProps, "type" | "variant"> | undefined>;
|
|
22
|
+
/** Groups Icon and Text parts. This component is based on the div element */
|
|
23
|
+
export declare const Root: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & 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/radius').RadiusProps & 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 & {
|
|
24
|
+
display?: import('../../utils/generate-styling').DisplayChildren | undefined;
|
|
25
|
+
} & import('../../utils/generate-styling/gap').GapProps & {
|
|
26
|
+
align?: import('../../utils/generate-styling/align').Align | undefined;
|
|
27
|
+
justify?: import('../../utils/generate-styling/justify').Justify | undefined;
|
|
28
|
+
} & import('../../utils/generate-styling/grid').GridLayout & {
|
|
29
|
+
asChild: true;
|
|
30
|
+
as?: undefined;
|
|
31
|
+
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
32
|
+
asChild?: boolean | undefined;
|
|
33
|
+
variant?: "beige" | "gray" | "white" | "purple-light" | "purple-dark" | "beige-light" | undefined;
|
|
34
|
+
bordered?: boolean | undefined;
|
|
35
|
+
shadow?: boolean | undefined;
|
|
36
|
+
backgroundImageSrc?: string | undefined;
|
|
37
|
+
imageGradient?: ("default" | "dark" | "light") | undefined;
|
|
38
|
+
layout?: import('../card/card').Layout | undefined;
|
|
39
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & 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/radius').RadiusProps & 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 & {
|
|
40
|
+
display?: import('../../utils/generate-styling').DisplayChildren | undefined;
|
|
41
|
+
} & import('../../utils/generate-styling/gap').GapProps & {
|
|
42
|
+
align?: import('../../utils/generate-styling/align').Align | undefined;
|
|
43
|
+
justify?: import('../../utils/generate-styling/justify').Justify | undefined;
|
|
44
|
+
} & import('../../utils/generate-styling/grid').GridLayout & {
|
|
45
|
+
as?: "span" | undefined;
|
|
46
|
+
asChild?: false | undefined;
|
|
47
|
+
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
48
|
+
asChild?: boolean | undefined;
|
|
49
|
+
variant?: "beige" | "gray" | "white" | "purple-light" | "purple-dark" | "beige-light" | undefined;
|
|
50
|
+
bordered?: boolean | undefined;
|
|
51
|
+
shadow?: boolean | undefined;
|
|
52
|
+
backgroundImageSrc?: string | undefined;
|
|
53
|
+
imageGradient?: ("default" | "dark" | "light") | undefined;
|
|
54
|
+
layout?: import('../card/card').Layout | undefined;
|
|
55
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & 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/radius').RadiusProps & 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 & {
|
|
56
|
+
display?: import('../../utils/generate-styling').DisplayChildren | undefined;
|
|
57
|
+
} & import('../../utils/generate-styling/gap').GapProps & {
|
|
58
|
+
align?: import('../../utils/generate-styling/align').Align | undefined;
|
|
59
|
+
justify?: import('../../utils/generate-styling/justify').Justify | undefined;
|
|
60
|
+
} & import('../../utils/generate-styling/grid').GridLayout & {
|
|
61
|
+
as: "div";
|
|
62
|
+
asChild?: false | undefined;
|
|
63
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
64
|
+
asChild?: boolean | undefined;
|
|
65
|
+
variant?: "beige" | "gray" | "white" | "purple-light" | "purple-dark" | "beige-light" | undefined;
|
|
66
|
+
bordered?: boolean | undefined;
|
|
67
|
+
shadow?: boolean | undefined;
|
|
68
|
+
backgroundImageSrc?: string | undefined;
|
|
69
|
+
imageGradient?: ("default" | "dark" | "light") | undefined;
|
|
70
|
+
layout?: import('../card/card').Layout | undefined;
|
|
71
|
+
} & React.RefAttributes<HTMLDivElement>, "ref">, "as" | "variant" | "layout"> & {
|
|
72
|
+
/**
|
|
73
|
+
* The variant of the notification.
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
variant?: "beige" | "gray" | "teal" | "error" | "warning" | "information" | "success" | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* The tyoe of the notification.
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
type?: "card" | "tile" | undefined;
|
|
82
|
+
open?: boolean | undefined;
|
|
83
|
+
defaultOpen?: boolean | undefined;
|
|
84
|
+
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
85
|
+
role?: "alert" | undefined;
|
|
86
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
5
|
+
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
6
|
+
import { Card } from "../card/index.js";
|
|
7
|
+
const styles = {
|
|
8
|
+
"teddy-notification": "_teddy-notification_18bjx_3",
|
|
9
|
+
"teddy-notification--success": "_teddy-notification--success_18bjx_11",
|
|
10
|
+
"teddy-notification--warning": "_teddy-notification--warning_18bjx_16",
|
|
11
|
+
"teddy-notification--error": "_teddy-notification--error_18bjx_21",
|
|
12
|
+
"teddy-notification--information": "_teddy-notification--information_18bjx_26",
|
|
13
|
+
"teddy-notification--beige": "_teddy-notification--beige_18bjx_31",
|
|
14
|
+
"teddy-notification--teal": "_teddy-notification--teal_18bjx_36",
|
|
15
|
+
"teddy-notification--gray": "_teddy-notification--gray_18bjx_41",
|
|
16
|
+
"teddy-notification--tile": "_teddy-notification--tile_18bjx_46",
|
|
17
|
+
"teddy-notification__text": "_teddy-notification__text_18bjx_49",
|
|
18
|
+
"teddy-notification__dismiss": "_teddy-notification__dismiss_18bjx_52",
|
|
19
|
+
"teddy-notification__heading": "_teddy-notification__heading_18bjx_56",
|
|
20
|
+
"teddy-notification__footer": "_teddy-notification__footer_18bjx_65",
|
|
21
|
+
"teddy-notification__icon": "_teddy-notification__icon_18bjx_68"
|
|
22
|
+
};
|
|
23
|
+
const rootClassName = "teddy-notification";
|
|
24
|
+
const NotificationContext = React__default.createContext(void 0);
|
|
25
|
+
const Root = React__default.forwardRef(
|
|
26
|
+
({ className, open: openProp, defaultOpen, onOpenChange, variant, type, ...props }, forwardRef) => {
|
|
27
|
+
const classes = clsx([styles[`${rootClassName}`]], styles[`${rootClassName}--${variant}`], styles[`${rootClassName}--${type}`], className);
|
|
28
|
+
const [open = true, setOpen] = useControllableState({
|
|
29
|
+
prop: openProp,
|
|
30
|
+
defaultProp: defaultOpen,
|
|
31
|
+
onChange: onOpenChange
|
|
32
|
+
});
|
|
33
|
+
return /* @__PURE__ */ jsx(NotificationContext.Provider, { value: { variant, type }, children: /* @__PURE__ */ jsx(CollapsiblePrimitive.Root, { open, onOpenChange: setOpen, asChild: true, children: /* @__PURE__ */ jsx(CollapsiblePrimitive.Content, { asChild: true, children: /* @__PURE__ */ jsx(Card, { variant: "white", as: void 0, ...props, ref: forwardRef, className: classes }) }) }) });
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
Root.displayName = "Root";
|
|
37
|
+
export {
|
|
38
|
+
NotificationContext,
|
|
39
|
+
Root,
|
|
40
|
+
rootClassName,
|
|
41
|
+
styles as s
|
|
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_text_text = require("../text/text.cjs");
|
|
7
|
+
const components_notification_notificationRoot = require("./notification-root.cjs");
|
|
8
|
+
const Text = React.forwardRef(
|
|
9
|
+
({ className, ...props }, forwardRef) => {
|
|
10
|
+
const classes = clsx([components_notification_notificationRoot.styles[`${components_notification_notificationRoot.rootClassName}__text`]], className);
|
|
11
|
+
return /* @__PURE__ */ jsxRuntime.jsx(components_text_text.Text, { ...props, ref: forwardRef, className: classes });
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
Text.displayName = "Text";
|
|
15
|
+
exports.Text = Text;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Text as TextPrimitives } from '../text';
|
|
3
|
+
|
|
4
|
+
export type TextProps = React.ComponentPropsWithoutRef<typeof TextPrimitives>;
|
|
5
|
+
export declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { Text as Text$1 } from "../text/text.js";
|
|
5
|
+
import { s as styles, rootClassName } from "./notification-root.js";
|
|
6
|
+
const Text = React__default.forwardRef(
|
|
7
|
+
({ className, ...props }, forwardRef) => {
|
|
8
|
+
const classes = clsx([styles[`${rootClassName}__text`]], className);
|
|
9
|
+
return /* @__PURE__ */ jsx(Text$1, { ...props, ref: forwardRef, className: classes });
|
|
10
|
+
}
|
|
11
|
+
);
|
|
12
|
+
Text.displayName = "Text";
|
|
13
|
+
export {
|
|
14
|
+
Text
|
|
15
|
+
};
|
|
@@ -4,6 +4,7 @@ require("react/jsx-runtime");
|
|
|
4
4
|
require("clsx");
|
|
5
5
|
require("react");
|
|
6
6
|
require("./radio-card-group-root.cjs");
|
|
7
|
+
require("../channel-button/index.cjs");
|
|
7
8
|
require("../collapsible/index.cjs");
|
|
8
9
|
require("../meter-bar/index.cjs");
|
|
9
10
|
require("../skeleton/index.cjs");
|
|
@@ -26,7 +27,7 @@ require("../drawer/index.cjs");
|
|
|
26
27
|
require("../image/image.cjs");
|
|
27
28
|
require("../chip/index.cjs");
|
|
28
29
|
require("../../assets/sprite.1321fab0-teddy.svg");
|
|
29
|
-
require("../notification/
|
|
30
|
+
require("../notification/index.cjs");
|
|
30
31
|
require("../radio-group/index.cjs");
|
|
31
32
|
require("../box/box.cjs");
|
|
32
33
|
require("../flex/flex.cjs");
|
|
@@ -2,6 +2,7 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "clsx";
|
|
3
3
|
import "react";
|
|
4
4
|
import "./radio-card-group-root.js";
|
|
5
|
+
import "../channel-button/index.js";
|
|
5
6
|
import "../collapsible/index.js";
|
|
6
7
|
import "../meter-bar/index.js";
|
|
7
8
|
import "../skeleton/index.js";
|
|
@@ -24,7 +25,7 @@ import "../drawer/index.js";
|
|
|
24
25
|
import "../image/image.js";
|
|
25
26
|
import "../chip/index.js";
|
|
26
27
|
import "../../assets/sprite.1321fab0-teddy.svg";
|
|
27
|
-
import "../notification/
|
|
28
|
+
import "../notification/index.js";
|
|
28
29
|
import "../radio-group/index.js";
|
|
29
30
|
import "../box/box.js";
|
|
30
31
|
import "../flex/flex.js";
|
|
@@ -12,6 +12,7 @@ const reactSlot = require("@radix-ui/react-slot");
|
|
|
12
12
|
const reactUseControllableState = require("@radix-ui/react-use-controllable-state");
|
|
13
13
|
const utils_generateStyling_index = require("../../utils/generate-styling/index.cjs");
|
|
14
14
|
const tokens_motion_variables = require("../../tokens/motion/variables.cjs");
|
|
15
|
+
require("../channel-button/index.cjs");
|
|
15
16
|
require("../collapsible/index.cjs");
|
|
16
17
|
require("../meter-bar/index.cjs");
|
|
17
18
|
require("../skeleton/index.cjs");
|
|
@@ -37,7 +38,7 @@ require("../chip/index.cjs");
|
|
|
37
38
|
require("../../assets/sprite.1321fab0-teddy.svg");
|
|
38
39
|
const DrawerPrimitive = require("@radix-ui/react-dialog");
|
|
39
40
|
const components_icon_icon = require("../icon/icon.cjs");
|
|
40
|
-
require("../notification/
|
|
41
|
+
require("../notification/index.cjs");
|
|
41
42
|
require("../radio-group/index.cjs");
|
|
42
43
|
const components_box_box = require("../box/box.cjs");
|
|
43
44
|
const components_flex_flex = require("../flex/flex.cjs");
|
|
@@ -156,11 +157,11 @@ const Root$2 = (props) => {
|
|
|
156
157
|
const scrollRef = React.useRef(null);
|
|
157
158
|
return /* @__PURE__ */ jsxRuntime.jsx(RootContext$1.Provider, { value: { imageRef, actionGroupRef, scrollRef }, children: /* @__PURE__ */ jsxRuntime.jsx(DrawerPrimitive__namespace.Root, { ...props, modal: true }) });
|
|
158
159
|
};
|
|
159
|
-
Root$2.displayName = "
|
|
160
|
+
Root$2.displayName = "Modal.Root";
|
|
160
161
|
const Trigger$1 = React.forwardRef(
|
|
161
162
|
({ children, ...props }, forwardedRef) => /* @__PURE__ */ jsxRuntime.jsx(DrawerPrimitive__namespace.Trigger, { ...props, ref: forwardedRef, asChild: true, children })
|
|
162
163
|
);
|
|
163
|
-
Trigger$1.displayName = "
|
|
164
|
+
Trigger$1.displayName = "Modal.Trigger";
|
|
164
165
|
const OverlayContext = React.createContext(false);
|
|
165
166
|
const Overlay = React.forwardRef(
|
|
166
167
|
({ className, forceMount, container, ...rest }, forwardedRef) => {
|
|
@@ -168,7 +169,7 @@ const Overlay = React.forwardRef(
|
|
|
168
169
|
return /* @__PURE__ */ jsxRuntime.jsx(OverlayContext.Provider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsx(DrawerPrimitive__namespace.Portal, { container, forceMount, children: /* @__PURE__ */ jsxRuntime.jsx(DrawerPrimitive__namespace.Overlay, { className: classes, ref: forwardedRef, ...rest }) }) });
|
|
169
170
|
}
|
|
170
171
|
);
|
|
171
|
-
Overlay.displayName = "
|
|
172
|
+
Overlay.displayName = "Modal.Content";
|
|
172
173
|
const InnerContent = React.forwardRef(
|
|
173
174
|
function InnerContent2({ asChild, children, className, ...props }, forwardedRef) {
|
|
174
175
|
const classes = clsx([styles$2[`${rootClassName$2}__scroll`]], className);
|
|
@@ -204,7 +205,7 @@ const Content$1 = React.forwardRef(
|
|
|
204
205
|
return /* @__PURE__ */ jsxRuntime.jsx(InnerContent, { ref: forwardedRef, ...contentProps });
|
|
205
206
|
}
|
|
206
207
|
);
|
|
207
|
-
Content$1.displayName = "
|
|
208
|
+
Content$1.displayName = "Modal.Content";
|
|
208
209
|
const GroupContext = React.createContext(false);
|
|
209
210
|
const Group = React.forwardRef(
|
|
210
211
|
({ className, variant, ...props }, forwardedRef) => {
|
|
@@ -241,7 +242,7 @@ const Group = React.forwardRef(
|
|
|
241
242
|
) });
|
|
242
243
|
}
|
|
243
244
|
);
|
|
244
|
-
Group.displayName = "
|
|
245
|
+
Group.displayName = "Modal.Group";
|
|
245
246
|
const TitleInner = React.forwardRef(
|
|
246
247
|
function TitleInner2(props, forwardedRef) {
|
|
247
248
|
return /* @__PURE__ */ jsxRuntime.jsx(DrawerPrimitive__namespace.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(components_heading_heading.Heading, { variant: "title-200", as: "h2", ...props, asChild: false, ref: forwardedRef }) });
|
|
@@ -254,16 +255,16 @@ const Title = React.forwardRef((props, forwardedRef) => {
|
|
|
254
255
|
}
|
|
255
256
|
return /* @__PURE__ */ jsxRuntime.jsx(TitleInner, { ...props, ref: forwardedRef });
|
|
256
257
|
});
|
|
257
|
-
Title.displayName = "
|
|
258
|
+
Title.displayName = "Modal.Title";
|
|
258
259
|
const Description = React.forwardRef((props, forwardedRef) => /* @__PURE__ */ jsxRuntime.jsx(DrawerPrimitive__namespace.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(components_text_text.Text, { as: "p", variant: "paragraph-100", ...props, asChild: false, ref: forwardedRef }) }));
|
|
259
|
-
Description.displayName = "
|
|
260
|
+
Description.displayName = "Modal.Description";
|
|
260
261
|
const Image = React.forwardRef(({ asChild, ...props }, forwardedRef) => {
|
|
261
262
|
const classes = clsx([styles$2[`${rootClassName$2}__image`]], props.className);
|
|
262
263
|
const context = React.useContext(RootContext$1);
|
|
263
264
|
const Comp = asChild ? reactSlot.Slot : "img";
|
|
264
265
|
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...props, className: classes, ref: utils_composeRefs.composeRefs(context.imageRef, forwardedRef) });
|
|
265
266
|
});
|
|
266
|
-
Image.displayName = "
|
|
267
|
+
Image.displayName = "Modal.Image";
|
|
267
268
|
const Close = React.forwardRef(
|
|
268
269
|
({ className, ...props }, forwardedRef) => {
|
|
269
270
|
const classes = clsx([styles$2[`${rootClassName$2}__close`]], {
|
|
@@ -280,7 +281,7 @@ const Close = React.forwardRef(
|
|
|
280
281
|
return /* @__PURE__ */ jsxRuntime.jsx(DrawerPrimitive__namespace.Close, { ...props, className: classes, ref: forwardedRef, asChild: true, children: props.children || /* @__PURE__ */ jsxRuntime.jsx(components_button_button.Button, { variant: hasImage ? "primary-negative" : "tertiary-purple", iconOnly: true, "aria-label": props["aria-label"], children: /* @__PURE__ */ jsxRuntime.jsx(components_icon_icon.Icon, { name: "close" }) }) });
|
|
281
282
|
}
|
|
282
283
|
);
|
|
283
|
-
Close.displayName = "
|
|
284
|
+
Close.displayName = "Close";
|
|
284
285
|
const Modal = Object.assign(Root$2, { Trigger: Trigger$1, Content: Content$1, Title, Overlay, Description, Close, Image, Group });
|
|
285
286
|
const styles$1 = {
|
|
286
287
|
"teddy-navigation-menu": "_teddy-navigation-menu_6p30v_1",
|