@telia/teddy 0.0.26 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{sprite.5636ec8e-teddy.svg → sprite.269ba410-teddy.svg} +3 -0
- package/dist/components/accordion/accordion-indicator.cjs +14 -3
- package/dist/components/accordion/accordion-indicator.js +15 -4
- package/dist/components/accordion/accordion-item.cjs +6 -1
- package/dist/components/accordion/accordion-item.d.ts +3 -0
- package/dist/components/accordion/accordion-item.js +8 -3
- package/dist/components/accordion/accordion-root.cjs +41 -14
- package/dist/components/accordion/accordion-root.d.ts +9 -5
- package/dist/components/accordion/accordion-root.js +41 -14
- package/dist/components/badge/alert-badge.cjs +19 -0
- package/dist/components/badge/alert-badge.d.ts +10 -0
- package/dist/components/badge/alert-badge.js +19 -0
- package/dist/components/badge/badge.cjs +13 -9
- package/dist/components/badge/badge.d.ts +2 -1
- package/dist/components/badge/badge.js +14 -10
- package/dist/components/badge/counter-badge.cjs +19 -0
- package/dist/components/badge/counter-badge.d.ts +10 -0
- package/dist/components/badge/counter-badge.js +19 -0
- package/dist/components/badge/index.cjs +4 -0
- package/dist/components/badge/index.d.ts +4 -0
- package/dist/components/badge/index.js +5 -1
- package/dist/components/button/button.cjs +27 -25
- package/dist/components/button/button.d.ts +2 -2
- package/dist/components/button/button.js +27 -25
- package/dist/components/card/card.d.ts +6 -2
- package/dist/components/chip/chip-indicator.cjs +1 -1
- package/dist/components/chip/chip-indicator.d.ts +2 -2
- package/dist/components/chip/chip-indicator.js +1 -1
- package/dist/components/chip/index.d.ts +2 -2
- package/dist/components/drawer/drawer-close.cjs +2 -2
- package/dist/components/drawer/drawer-close.js +2 -2
- package/dist/components/drawer/drawer-content.cjs +3 -2
- package/dist/components/drawer/drawer-content.d.ts +3 -9
- package/dist/components/drawer/drawer-content.js +3 -2
- package/dist/components/drawer/drawer-description.cjs +1 -1
- package/dist/components/drawer/drawer-description.js +1 -1
- package/dist/components/drawer/drawer-footer.cjs +1 -1
- package/dist/components/drawer/drawer-footer.js +1 -1
- package/dist/components/drawer/drawer-overlay.cjs +1 -1
- package/dist/components/drawer/drawer-overlay.js +1 -1
- package/dist/components/drawer/drawer-title.cjs +1 -1
- package/dist/components/drawer/drawer-title.js +1 -1
- package/dist/components/field-error-text/field-error-text.cjs +1 -1
- package/dist/components/field-error-text/field-error-text.js +1 -1
- package/dist/components/flex/flex.cjs +1 -1
- package/dist/components/flex/flex.js +1 -1
- package/dist/components/icon/icon.cjs +3 -3
- package/dist/components/icon/icon.js +3 -3
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/index.cjs +11 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +11 -1
- package/dist/components/input/input-clear-button.cjs +1 -1
- package/dist/components/input/input-clear-button.js +1 -1
- package/dist/components/input/input-group.cjs +11 -11
- package/dist/components/input/input-group.js +11 -11
- package/dist/components/input/input-indicator.cjs +1 -1
- package/dist/components/input/input-indicator.js +1 -1
- package/dist/components/list/index.cjs +16 -0
- package/dist/components/list/index.d.ts +47 -0
- package/dist/components/list/index.js +16 -0
- package/dist/components/list/list-content.cjs +14 -0
- package/dist/components/list/list-content.d.ts +4 -0
- package/dist/components/list/list-content.js +14 -0
- package/dist/components/list/list-illustration.cjs +23 -0
- package/dist/components/list/list-illustration.d.ts +9 -0
- package/dist/components/list/list-illustration.js +23 -0
- package/dist/components/list/list-item.cjs +12 -0
- package/dist/components/list/list-item.d.ts +4 -0
- package/dist/components/list/list-item.js +12 -0
- package/dist/components/list/list.cjs +52 -0
- package/dist/components/list/list.d.ts +43 -0
- package/dist/components/list/list.js +52 -0
- package/dist/components/modal/modal.cjs +6 -1
- package/dist/components/modal/modal.js +6 -1
- package/dist/components/navigation-menu/global-navigation/global-navigation-desktop.cjs +9 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-desktop.d.ts +4 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-desktop.js +9 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-mobile.cjs +21 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-mobile.d.ts +4 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-mobile.js +21 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.cjs +369 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.d.ts +8 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.js +369 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-root.cjs +12 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-root.d.ts +33 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-root.js +12 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-search-field.cjs +37 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-search-field.d.ts +10 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-search-field.js +37 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-search.cjs +12 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-search.d.ts +8 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-search.js +12 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-shopping-cart.cjs +11 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-shopping-cart.d.ts +4 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-shopping-cart.js +11 -0
- package/dist/components/navigation-menu/global-navigation/index.cjs +4 -0
- package/dist/components/navigation-menu/global-navigation/index.d.ts +6 -0
- package/dist/components/navigation-menu/global-navigation/index.js +4 -0
- package/dist/components/navigation-menu/global-navigation/utils.cjs +318 -0
- package/dist/components/navigation-menu/global-navigation/utils.d.ts +496 -0
- package/dist/components/navigation-menu/global-navigation/utils.js +318 -0
- package/dist/components/navigation-menu/index.cjs +2 -0
- package/dist/components/navigation-menu/index.d.ts +1 -0
- package/dist/components/navigation-menu/index.js +2 -0
- package/dist/components/navigation-menu/navigation-menu.cjs +49 -23
- package/dist/components/navigation-menu/navigation-menu.d.ts +6 -1
- package/dist/components/navigation-menu/navigation-menu.js +50 -24
- package/dist/components/notification/notification.cjs +1 -1
- package/dist/components/notification/notification.d.ts +11 -5
- package/dist/components/notification/notification.js +1 -1
- package/dist/components/scroll-area/index.d.ts +6 -2
- package/dist/components/scroll-area/scroll-area-bar.cjs +19 -13
- package/dist/components/scroll-area/scroll-area-bar.js +19 -13
- package/dist/components/scroll-area/scroll-area-button.cjs +1 -1
- package/dist/components/scroll-area/scroll-area-button.d.ts +6 -2
- package/dist/components/scroll-area/scroll-area-button.js +1 -1
- package/dist/components/tabs/index.cjs +6 -0
- package/dist/components/tabs/index.d.ts +8 -4
- package/dist/components/tabs/index.js +6 -0
- package/dist/components/tabs/tabs-root.cjs +5 -4
- package/dist/components/tabs/tabs-root.d.ts +1 -1
- package/dist/components/tabs/tabs-root.js +5 -4
- package/dist/components/tabs/tabs-scroll-button.d.ts +6 -2
- package/dist/components/tabs/tabs-trigger.cjs +2 -1
- package/dist/components/tabs/tabs-trigger.d.ts +1 -1
- package/dist/components/tabs/tabs-trigger.js +2 -1
- package/dist/components/text-field/index.d.ts +6 -2
- package/dist/components/text-field/text-field-button.d.ts +6 -2
- package/dist/components/toggle/toggle.cjs +5 -5
- package/dist/components/toggle/toggle.d.ts +2 -2
- package/dist/components/toggle/toggle.js +5 -5
- package/dist/components/tooltip/index.cjs +22 -0
- package/dist/components/tooltip/index.d.ts +40 -0
- package/dist/components/tooltip/index.js +22 -0
- package/dist/components/tooltip/tooltip-arrow.cjs +33 -0
- package/dist/components/tooltip/tooltip-arrow.d.ts +6 -0
- package/dist/components/tooltip/tooltip-arrow.js +16 -0
- package/dist/components/tooltip/tooltip-content.cjs +46 -0
- package/dist/components/tooltip/tooltip-content.d.ts +80 -0
- package/dist/components/tooltip/tooltip-content.js +29 -0
- package/dist/components/tooltip/tooltip-portal.cjs +26 -0
- package/dist/components/tooltip/tooltip-portal.d.ts +7 -0
- package/dist/components/tooltip/tooltip-portal.js +9 -0
- package/dist/components/tooltip/tooltip-provider.cjs +30 -0
- package/dist/components/tooltip/tooltip-provider.d.ts +9 -0
- package/dist/components/tooltip/tooltip-provider.js +13 -0
- package/dist/components/tooltip/tooltip-root.cjs +36 -0
- package/dist/components/tooltip/tooltip-root.d.ts +25 -0
- package/dist/components/tooltip/tooltip-root.js +19 -0
- package/dist/components/tooltip/tooltip-trigger.cjs +38 -0
- package/dist/components/tooltip/tooltip-trigger.d.ts +6 -0
- package/dist/components/tooltip/tooltip-trigger.js +21 -0
- package/dist/drawer.module-BZV0Appw.js +14 -0
- package/dist/drawer.module-rgUBNOkt.cjs +13 -0
- package/dist/icons/category.cjs +1 -0
- package/dist/icons/category.d.ts +3 -0
- package/dist/icons/category.js +1 -0
- package/dist/icons/name.cjs +1 -0
- package/dist/icons/name.d.ts +1 -1
- package/dist/icons/name.js +1 -0
- package/dist/main.cjs +11 -1
- package/dist/main.js +11 -1
- package/dist/style.css +948 -659
- package/dist/tooltip.module-D_3DOZOn.cjs +15 -0
- package/dist/tooltip.module-DnKU2XS4.js +16 -0
- package/dist/utils/generate-styling/index.cjs +12 -2
- package/dist/utils/generate-styling/index.d.ts +70 -3
- package/dist/utils/generate-styling/index.js +12 -2
- package/package.json +2 -1
- package/dist/drawer.module-BxsrDZFu.js +0 -14
- package/dist/drawer.module-CWDhohQm.cjs +0 -13
|
@@ -102,6 +102,9 @@
|
|
|
102
102
|
<symbol fill="none" viewBox="0 0 24 25" id="share">
|
|
103
103
|
<path fill="currentColor" fill-rule="evenodd" d="M18 4.4a2.1 2.1 0 1 0 0 4.2 2.1 2.1 0 0 0 0-4.2Zm-3.9 2.1a3.9 3.9 0 1 1 .892 2.483l-6.188 2.652a3.913 3.913 0 0 1 0 1.73l6.188 2.652a3.9 3.9 0 1 1-.796 1.617l-6.188-2.652a3.9 3.9 0 1 1 0-4.965l6.188-2.652A3.915 3.915 0 0 1 14.1 6.5ZM5 10.4a2.1 2.1 0 1 0 0 4.2 2.1 2.1 0 0 0 0-4.2Zm13 6a2.1 2.1 0 1 0 0 4.2 2.1 2.1 0 0 0 0-4.2Z" clip-rule="evenodd"></path>
|
|
104
104
|
</symbol>
|
|
105
|
+
<symbol viewBox="0 0 24 24" fill="none" id="shortcut">
|
|
106
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.36348 5.99998C8.36348 5.50292 8.76642 5.09998 9.26348 5.09998L17.2635 5.09998C17.7605 5.09998 18.1635 5.50292 18.1635 5.99998V14C18.1635 14.497 17.7605 14.9 17.2635 14.9C16.7664 14.9 16.3635 14.497 16.3635 14V8.17276L6.6364 17.8998C6.28493 18.2512 5.71508 18.2512 5.36361 17.8998C5.01214 17.5483 5.01214 16.9784 5.36361 16.627L15.0907 6.89998H9.26348C8.76642 6.89998 8.36348 6.49703 8.36348 5.99998Z" fill="currentColor"></path>
|
|
107
|
+
</symbol>
|
|
105
108
|
<symbol fill="none" viewBox="0 0 24 24" id="shuffle">
|
|
106
109
|
<path fill="currentColor" fill-rule="evenodd" d="M18.844 4.625a.9.9 0 0 1 1.273 0l2.235 2.235a.9.9 0 0 1 0 1.273l-2.235 2.235a.9.9 0 1 1-1.273-1.272l.7-.7h-3.057l-1.98 1.98a.9.9 0 1 1-1.273-1.272l2.244-2.244a.9.9 0 0 1 .636-.263h3.43l-.7-.7a.9.9 0 0 1 0-1.272ZM1.47 7.502a.9.9 0 0 1 .9-.9h4.77a.9.9 0 0 1 .637.264L12.2 11.29a.892.892 0 0 1 .12.12l4.167 4.167h3.056l-.699-.7a.9.9 0 1 1 1.273-1.272l2.235 2.235a.9.9 0 0 1 0 1.273l-2.235 2.235a.9.9 0 1 1-1.273-1.272l.7-.7h-3.43a.9.9 0 0 1-.636-.263l-3.854-3.854-3.848 3.849a.9.9 0 0 1-.636.263H2.37a.9.9 0 0 1 0-1.8h4.397l3.584-3.584-3.584-3.585H2.369a.9.9 0 0 1-.9-.9Z" clip-rule="evenodd"></path>
|
|
107
110
|
</symbol>
|
|
@@ -4,12 +4,23 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const clsx = require("clsx");
|
|
5
5
|
const React = require("react");
|
|
6
6
|
const components_accordion_accordionRoot = require("./accordion-root.cjs");
|
|
7
|
-
require("../../assets/sprite.
|
|
7
|
+
require("../../assets/sprite.269ba410-teddy.svg");
|
|
8
8
|
const components_icon_icon = require("../icon/icon.cjs");
|
|
9
|
+
const components_accordion_accordionItem = require("./accordion-item.cjs");
|
|
9
10
|
const Indicator = React.forwardRef(
|
|
10
11
|
({ className, children, ...props }, forwardRef) => {
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
var _a, _b;
|
|
13
|
+
const isOpen = (_a = React.useContext(components_accordion_accordionItem.ItemContext)) == null ? void 0 : _a.isOpen;
|
|
14
|
+
const variant = (_b = React.useContext(components_accordion_accordionRoot.RootContext)) == null ? void 0 : _b.variant;
|
|
15
|
+
const classes = clsx(
|
|
16
|
+
[components_accordion_accordionRoot.styles[`${components_accordion_accordionRoot.rootClassName}__indicator`]],
|
|
17
|
+
{
|
|
18
|
+
[components_accordion_accordionRoot.styles[`${components_accordion_accordionRoot.rootClassName}__indicator--rotate`]]: variant !== "info-area"
|
|
19
|
+
},
|
|
20
|
+
className
|
|
21
|
+
);
|
|
22
|
+
const icon = variant === "info-area" && isOpen ? "minus" : variant === "info-area" ? "info" : "chevron-down";
|
|
23
|
+
return /* @__PURE__ */ jsxRuntime.jsx(components_icon_icon.Icon, { "aria-hidden": true, name: icon, ...props, ref: forwardRef, className: classes, children });
|
|
13
24
|
}
|
|
14
25
|
);
|
|
15
26
|
Indicator.displayName = "Indicator";
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import React__default from "react";
|
|
4
|
-
import { s as styles, rootClassName } from "./accordion-root.js";
|
|
5
|
-
import "../../assets/sprite.
|
|
4
|
+
import { RootContext, s as styles, rootClassName } from "./accordion-root.js";
|
|
5
|
+
import "../../assets/sprite.269ba410-teddy.svg";
|
|
6
6
|
import { Icon } from "../icon/icon.js";
|
|
7
|
+
import { ItemContext } from "./accordion-item.js";
|
|
7
8
|
const Indicator = React__default.forwardRef(
|
|
8
9
|
({ className, children, ...props }, forwardRef) => {
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
var _a, _b;
|
|
11
|
+
const isOpen = (_a = React__default.useContext(ItemContext)) == null ? void 0 : _a.isOpen;
|
|
12
|
+
const variant = (_b = React__default.useContext(RootContext)) == null ? void 0 : _b.variant;
|
|
13
|
+
const classes = clsx(
|
|
14
|
+
[styles[`${rootClassName}__indicator`]],
|
|
15
|
+
{
|
|
16
|
+
[styles[`${rootClassName}__indicator--rotate`]]: variant !== "info-area"
|
|
17
|
+
},
|
|
18
|
+
className
|
|
19
|
+
);
|
|
20
|
+
const icon = variant === "info-area" && isOpen ? "minus" : variant === "info-area" ? "info" : "chevron-down";
|
|
21
|
+
return /* @__PURE__ */ jsx(Icon, { "aria-hidden": true, name: icon, ...props, ref: forwardRef, className: classes, children });
|
|
11
22
|
}
|
|
12
23
|
);
|
|
13
24
|
Indicator.displayName = "Indicator";
|
|
@@ -22,11 +22,16 @@ function _interopNamespaceDefault(e) {
|
|
|
22
22
|
return Object.freeze(n);
|
|
23
23
|
}
|
|
24
24
|
const AccordionPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(AccordionPrimitive);
|
|
25
|
+
const ItemContext = React.createContext({ isOpen: false });
|
|
25
26
|
const Item = React.forwardRef(
|
|
26
27
|
({ className, children, ...props }, forwardRef) => {
|
|
28
|
+
var _a;
|
|
27
29
|
const classes = clsx([components_accordion_accordionRoot.styles[`${components_accordion_accordionRoot.rootClassName}__item`]], className);
|
|
28
|
-
|
|
30
|
+
const openValues = (_a = React.useContext(components_accordion_accordionRoot.RootContext)) == null ? void 0 : _a.value;
|
|
31
|
+
const isOpen = typeof openValues === "string" ? openValues === props.value : openValues == null ? void 0 : openValues.includes(props.value);
|
|
32
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ItemContext.Provider, { value: { isOpen }, children: /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Item, { ...props, ref: forwardRef, className: classes, children }) });
|
|
29
33
|
}
|
|
30
34
|
);
|
|
31
35
|
Item.displayName = "Item";
|
|
32
36
|
exports.Item = Item;
|
|
37
|
+
exports.ItemContext = ItemContext;
|
|
@@ -2,6 +2,9 @@ import { default as React } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
4
4
|
export type ItemProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>;
|
|
5
|
+
export declare const ItemContext: React.Context<{
|
|
6
|
+
isOpen: boolean | undefined;
|
|
7
|
+
}>;
|
|
5
8
|
/**
|
|
6
9
|
* Contains all the parts of a collapsible section.
|
|
7
10
|
*/
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import React__default from "react";
|
|
4
|
-
import { s as styles, rootClassName } from "./accordion-root.js";
|
|
4
|
+
import { s as styles, rootClassName, RootContext } from "./accordion-root.js";
|
|
5
5
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
6
|
+
const ItemContext = React__default.createContext({ isOpen: false });
|
|
6
7
|
const Item = React__default.forwardRef(
|
|
7
8
|
({ className, children, ...props }, forwardRef) => {
|
|
9
|
+
var _a;
|
|
8
10
|
const classes = clsx([styles[`${rootClassName}__item`]], className);
|
|
9
|
-
|
|
11
|
+
const openValues = (_a = React__default.useContext(RootContext)) == null ? void 0 : _a.value;
|
|
12
|
+
const isOpen = typeof openValues === "string" ? openValues === props.value : openValues == null ? void 0 : openValues.includes(props.value);
|
|
13
|
+
return /* @__PURE__ */ jsx(ItemContext.Provider, { value: { isOpen }, children: /* @__PURE__ */ jsx(AccordionPrimitive.Item, { ...props, ref: forwardRef, className: classes, children }) });
|
|
10
14
|
}
|
|
11
15
|
);
|
|
12
16
|
Item.displayName = "Item";
|
|
13
17
|
export {
|
|
14
|
-
Item
|
|
18
|
+
Item,
|
|
19
|
+
ItemContext
|
|
15
20
|
};
|
|
@@ -4,6 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const clsx = require("clsx");
|
|
5
5
|
const React = require("react");
|
|
6
6
|
const AccordionPrimitive = require("@radix-ui/react-accordion");
|
|
7
|
+
const reactUseControllableState = require("@radix-ui/react-use-controllable-state");
|
|
7
8
|
function _interopNamespaceDefault(e) {
|
|
8
9
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
9
10
|
if (e) {
|
|
@@ -21,36 +22,62 @@ function _interopNamespaceDefault(e) {
|
|
|
21
22
|
return Object.freeze(n);
|
|
22
23
|
}
|
|
23
24
|
const AccordionPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(AccordionPrimitive);
|
|
24
|
-
const slideDown = "
|
|
25
|
-
const slideUp = "
|
|
25
|
+
const slideDown = "_slideDown_1arsz_1";
|
|
26
|
+
const slideUp = "_slideUp_1arsz_1";
|
|
26
27
|
const styles = {
|
|
27
|
-
"teddy-accordion
|
|
28
|
-
"teddy-
|
|
29
|
-
"teddy-
|
|
30
|
-
"teddy-
|
|
31
|
-
"teddy-
|
|
32
|
-
"teddy-
|
|
33
|
-
"teddy-
|
|
34
|
-
"teddy-
|
|
35
|
-
"teddy-accordion__indicator": "_teddy-
|
|
28
|
+
"teddy-accordion": "_teddy-accordion_1arsz_3",
|
|
29
|
+
"teddy-accordion--indented": "_teddy-accordion--indented_1arsz_11",
|
|
30
|
+
"teddy-accordion__header": "_teddy-accordion__header_1arsz_11",
|
|
31
|
+
"teddy-accordion__content": "_teddy-accordion__content_1arsz_14",
|
|
32
|
+
"teddy-accordion--negative": "_teddy-accordion--negative_1arsz_17",
|
|
33
|
+
"teddy-accordion__title": "_teddy-accordion__title_1arsz_21",
|
|
34
|
+
"teddy-accordion__trigger": "_teddy-accordion__trigger_1arsz_24",
|
|
35
|
+
"teddy-accordion__item": "_teddy-accordion__item_1arsz_32",
|
|
36
|
+
"teddy-accordion__indicator": "_teddy-accordion__indicator_1arsz_101",
|
|
37
|
+
"teddy-accordion__indicator--rotate": "_teddy-accordion__indicator--rotate_1arsz_112",
|
|
36
38
|
slideDown,
|
|
37
|
-
slideUp
|
|
39
|
+
slideUp,
|
|
40
|
+
"teddy-accordion--info-area": "_teddy-accordion--info-area_1arsz_138"
|
|
38
41
|
};
|
|
39
42
|
const rootClassName = "teddy-accordion";
|
|
43
|
+
const RootContext = React.createContext({ value: void 0, variant: void 0 });
|
|
44
|
+
const AccordionSingle = React.forwardRef(
|
|
45
|
+
({ variant, value: valueProp, defaultValue, onValueChange = () => {
|
|
46
|
+
}, ...props }, forwardRef) => {
|
|
47
|
+
const [value, setValue] = reactUseControllableState.useControllableState({
|
|
48
|
+
prop: valueProp,
|
|
49
|
+
defaultProp: defaultValue,
|
|
50
|
+
onChange: onValueChange
|
|
51
|
+
});
|
|
52
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RootContext.Provider, { value: { value, variant }, children: /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Root, { ...props, type: "single", value, onValueChange: setValue, ref: forwardRef }) });
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
const AccordionMultiple = React.forwardRef(
|
|
56
|
+
({ variant, value: valueProp, defaultValue, onValueChange = () => {
|
|
57
|
+
}, ...props }, forwardRef) => {
|
|
58
|
+
const [value, setValue] = reactUseControllableState.useControllableState({
|
|
59
|
+
prop: valueProp,
|
|
60
|
+
defaultProp: defaultValue,
|
|
61
|
+
onChange: onValueChange
|
|
62
|
+
});
|
|
63
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RootContext.Provider, { value: { value, variant }, children: /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Root, { ...props, type: "multiple", value, onValueChange: setValue, ref: forwardRef }) });
|
|
64
|
+
}
|
|
65
|
+
);
|
|
40
66
|
const Root = React.forwardRef(
|
|
41
67
|
({ className, variant = "default", children, indented = false, ...props }, forwardRef) => {
|
|
42
68
|
const classes = clsx(
|
|
43
69
|
styles[rootClassName],
|
|
44
70
|
styles[`${rootClassName}--${variant}`],
|
|
45
71
|
{
|
|
46
|
-
[styles[`${rootClassName}--indented`]]: indented
|
|
72
|
+
[styles[`${rootClassName}--indented`]]: indented || variant === "info-area"
|
|
47
73
|
},
|
|
48
74
|
className
|
|
49
75
|
);
|
|
50
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
76
|
+
return props.type === "single" ? /* @__PURE__ */ jsxRuntime.jsx(AccordionSingle, { ...props, variant, ref: forwardRef, className: classes, children }) : /* @__PURE__ */ jsxRuntime.jsx(AccordionMultiple, { ...props, variant, ref: forwardRef, className: classes, children });
|
|
51
77
|
}
|
|
52
78
|
);
|
|
53
79
|
Root.displayName = "Root";
|
|
54
80
|
exports.Root = Root;
|
|
81
|
+
exports.RootContext = RootContext;
|
|
55
82
|
exports.rootClassName = rootClassName;
|
|
56
83
|
exports.styles = styles;
|
|
@@ -2,13 +2,17 @@ import { default as React } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
4
4
|
export declare const rootClassName = "teddy-accordion";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
export declare const RootContext: React.Context<{
|
|
6
|
+
value: string | string[] | undefined;
|
|
7
|
+
variant: RootProps['variant'];
|
|
8
|
+
}>;
|
|
9
|
+
export type RootProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Root> & ({
|
|
9
10
|
variant?: 'default' | 'negative';
|
|
10
11
|
indented?: boolean;
|
|
11
|
-
}
|
|
12
|
+
} | {
|
|
13
|
+
variant: 'info-area';
|
|
14
|
+
indented?: never;
|
|
15
|
+
});
|
|
12
16
|
/**
|
|
13
17
|
* The Accordion component is used to render the root element.
|
|
14
18
|
*/
|
|
@@ -2,38 +2,65 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import React__default from "react";
|
|
4
4
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
5
|
-
|
|
6
|
-
const
|
|
5
|
+
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
6
|
+
const slideDown = "_slideDown_1arsz_1";
|
|
7
|
+
const slideUp = "_slideUp_1arsz_1";
|
|
7
8
|
const styles = {
|
|
8
|
-
"teddy-accordion
|
|
9
|
-
"teddy-
|
|
10
|
-
"teddy-
|
|
11
|
-
"teddy-
|
|
12
|
-
"teddy-
|
|
13
|
-
"teddy-
|
|
14
|
-
"teddy-
|
|
15
|
-
"teddy-
|
|
16
|
-
"teddy-accordion__indicator": "_teddy-
|
|
9
|
+
"teddy-accordion": "_teddy-accordion_1arsz_3",
|
|
10
|
+
"teddy-accordion--indented": "_teddy-accordion--indented_1arsz_11",
|
|
11
|
+
"teddy-accordion__header": "_teddy-accordion__header_1arsz_11",
|
|
12
|
+
"teddy-accordion__content": "_teddy-accordion__content_1arsz_14",
|
|
13
|
+
"teddy-accordion--negative": "_teddy-accordion--negative_1arsz_17",
|
|
14
|
+
"teddy-accordion__title": "_teddy-accordion__title_1arsz_21",
|
|
15
|
+
"teddy-accordion__trigger": "_teddy-accordion__trigger_1arsz_24",
|
|
16
|
+
"teddy-accordion__item": "_teddy-accordion__item_1arsz_32",
|
|
17
|
+
"teddy-accordion__indicator": "_teddy-accordion__indicator_1arsz_101",
|
|
18
|
+
"teddy-accordion__indicator--rotate": "_teddy-accordion__indicator--rotate_1arsz_112",
|
|
17
19
|
slideDown,
|
|
18
|
-
slideUp
|
|
20
|
+
slideUp,
|
|
21
|
+
"teddy-accordion--info-area": "_teddy-accordion--info-area_1arsz_138"
|
|
19
22
|
};
|
|
20
23
|
const rootClassName = "teddy-accordion";
|
|
24
|
+
const RootContext = React__default.createContext({ value: void 0, variant: void 0 });
|
|
25
|
+
const AccordionSingle = React__default.forwardRef(
|
|
26
|
+
({ variant, value: valueProp, defaultValue, onValueChange = () => {
|
|
27
|
+
}, ...props }, forwardRef) => {
|
|
28
|
+
const [value, setValue] = useControllableState({
|
|
29
|
+
prop: valueProp,
|
|
30
|
+
defaultProp: defaultValue,
|
|
31
|
+
onChange: onValueChange
|
|
32
|
+
});
|
|
33
|
+
return /* @__PURE__ */ jsx(RootContext.Provider, { value: { value, variant }, children: /* @__PURE__ */ jsx(AccordionPrimitive.Root, { ...props, type: "single", value, onValueChange: setValue, ref: forwardRef }) });
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
const AccordionMultiple = React__default.forwardRef(
|
|
37
|
+
({ variant, value: valueProp, defaultValue, onValueChange = () => {
|
|
38
|
+
}, ...props }, forwardRef) => {
|
|
39
|
+
const [value, setValue] = useControllableState({
|
|
40
|
+
prop: valueProp,
|
|
41
|
+
defaultProp: defaultValue,
|
|
42
|
+
onChange: onValueChange
|
|
43
|
+
});
|
|
44
|
+
return /* @__PURE__ */ jsx(RootContext.Provider, { value: { value, variant }, children: /* @__PURE__ */ jsx(AccordionPrimitive.Root, { ...props, type: "multiple", value, onValueChange: setValue, ref: forwardRef }) });
|
|
45
|
+
}
|
|
46
|
+
);
|
|
21
47
|
const Root = React__default.forwardRef(
|
|
22
48
|
({ className, variant = "default", children, indented = false, ...props }, forwardRef) => {
|
|
23
49
|
const classes = clsx(
|
|
24
50
|
styles[rootClassName],
|
|
25
51
|
styles[`${rootClassName}--${variant}`],
|
|
26
52
|
{
|
|
27
|
-
[styles[`${rootClassName}--indented`]]: indented
|
|
53
|
+
[styles[`${rootClassName}--indented`]]: indented || variant === "info-area"
|
|
28
54
|
},
|
|
29
55
|
className
|
|
30
56
|
);
|
|
31
|
-
return /* @__PURE__ */ jsx(
|
|
57
|
+
return props.type === "single" ? /* @__PURE__ */ jsx(AccordionSingle, { ...props, variant, ref: forwardRef, className: classes, children }) : /* @__PURE__ */ jsx(AccordionMultiple, { ...props, variant, ref: forwardRef, className: classes, children });
|
|
32
58
|
}
|
|
33
59
|
);
|
|
34
60
|
Root.displayName = "Root";
|
|
35
61
|
export {
|
|
36
62
|
Root,
|
|
63
|
+
RootContext,
|
|
37
64
|
rootClassName,
|
|
38
65
|
styles as s
|
|
39
66
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const clsx = require("clsx");
|
|
5
|
+
const React = require("react");
|
|
6
|
+
const components_badge_badge = require("./badge.cjs");
|
|
7
|
+
const reactSlot = require("@radix-ui/react-slot");
|
|
8
|
+
const AlertBadge = React.forwardRef(
|
|
9
|
+
({ className, variant, asChild, ...props }, forwardRef) => {
|
|
10
|
+
const classes = clsx(
|
|
11
|
+
[components_badge_badge.styles[`${components_badge_badge.rootClassName}`], components_badge_badge.styles[`${components_badge_badge.rootClassName}--alert-badge`], components_badge_badge.styles[`${components_badge_badge.rootClassName}--${variant}`]],
|
|
12
|
+
className
|
|
13
|
+
);
|
|
14
|
+
const Comp = asChild ? reactSlot.Slot : "span";
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...props, ref: forwardRef, className: classes });
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
AlertBadge.displayName = "AlertBadge";
|
|
19
|
+
exports.AlertBadge = AlertBadge;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BadgeProps } from './badge';
|
|
3
|
+
|
|
4
|
+
type AlertBadgeProps = Omit<BadgeProps, 'hideIcon' | 'children'>;
|
|
5
|
+
/**
|
|
6
|
+
* The Alert badge is used to indicate a status, like new notifications or an items availability.
|
|
7
|
+
*/
|
|
8
|
+
declare const AlertBadge: React.ForwardRefExoticComponent<AlertBadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
9
|
+
export { AlertBadge };
|
|
10
|
+
export type { AlertBadgeProps };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import React__default from "react";
|
|
4
|
+
import { s as styles, rootClassName } from "./badge.js";
|
|
5
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
6
|
+
const AlertBadge = React__default.forwardRef(
|
|
7
|
+
({ className, variant, asChild, ...props }, forwardRef) => {
|
|
8
|
+
const classes = clsx(
|
|
9
|
+
[styles[`${rootClassName}`], styles[`${rootClassName}--alert-badge`], styles[`${rootClassName}--${variant}`]],
|
|
10
|
+
className
|
|
11
|
+
);
|
|
12
|
+
const Comp = asChild ? Slot : "span";
|
|
13
|
+
return /* @__PURE__ */ jsx(Comp, { ...props, ref: forwardRef, className: classes });
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
AlertBadge.displayName = "AlertBadge";
|
|
17
|
+
export {
|
|
18
|
+
AlertBadge
|
|
19
|
+
};
|
|
@@ -4,17 +4,19 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const clsx = require("clsx");
|
|
5
5
|
const React = require("react");
|
|
6
6
|
const reactSlot = require("@radix-ui/react-slot");
|
|
7
|
-
require("../../assets/sprite.
|
|
7
|
+
require("../../assets/sprite.269ba410-teddy.svg");
|
|
8
8
|
const components_icon_icon = require("../icon/icon.cjs");
|
|
9
9
|
const styles = {
|
|
10
|
-
"teddy-badge": "_teddy-
|
|
11
|
-
"teddy-badge--
|
|
12
|
-
"teddy-badge--
|
|
13
|
-
"teddy-badge--
|
|
14
|
-
"teddy-badge--
|
|
15
|
-
"teddy-badge--
|
|
16
|
-
"teddy-badge--
|
|
17
|
-
"teddy-badge--
|
|
10
|
+
"teddy-badge": "_teddy-badge_1fsdh_1",
|
|
11
|
+
"teddy-badge--counter-badge": "_teddy-badge--counter-badge_1fsdh_13",
|
|
12
|
+
"teddy-badge--alert-badge": "_teddy-badge--alert-badge_1fsdh_19",
|
|
13
|
+
"teddy-badge--attention": "_teddy-badge--attention_1fsdh_29",
|
|
14
|
+
"teddy-badge--special": "_teddy-badge--special_1fsdh_36",
|
|
15
|
+
"teddy-badge--neutral": "_teddy-badge--neutral_1fsdh_40",
|
|
16
|
+
"teddy-badge--information": "_teddy-badge--information_1fsdh_48",
|
|
17
|
+
"teddy-badge--success": "_teddy-badge--success_1fsdh_56",
|
|
18
|
+
"teddy-badge--warning": "_teddy-badge--warning_1fsdh_64",
|
|
19
|
+
"teddy-badge--error": "_teddy-badge--error_1fsdh_72"
|
|
18
20
|
};
|
|
19
21
|
const rootClassName = "teddy-badge";
|
|
20
22
|
function getIcon(variant) {
|
|
@@ -41,3 +43,5 @@ const Badge = React.forwardRef(
|
|
|
41
43
|
);
|
|
42
44
|
Badge.displayName = "Badge";
|
|
43
45
|
exports.Badge = Badge;
|
|
46
|
+
exports.rootClassName = rootClassName;
|
|
47
|
+
exports.styles = styles;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
+
export declare const rootClassName = "teddy-badge";
|
|
3
4
|
/** -------------------------------------------------------------------------------------------------
|
|
4
5
|
* Badge
|
|
5
6
|
* -----------------------------------------------------------------------------------------------*/
|
|
6
|
-
type Variant = 'attention' | 'special' | 'neutral' | 'information' | 'success' | 'warning' | 'error';
|
|
7
|
+
export type Variant = 'attention' | 'special' | 'neutral' | 'information' | 'success' | 'warning' | 'error';
|
|
7
8
|
type BadgeProps = React.ComponentPropsWithoutRef<'span'> & {
|
|
8
9
|
asChild?: boolean;
|
|
9
10
|
variant: Variant;
|
|
@@ -2,17 +2,19 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import React__default from "react";
|
|
4
4
|
import { Slottable, Slot } from "@radix-ui/react-slot";
|
|
5
|
-
import "../../assets/sprite.
|
|
5
|
+
import "../../assets/sprite.269ba410-teddy.svg";
|
|
6
6
|
import { Icon } from "../icon/icon.js";
|
|
7
7
|
const styles = {
|
|
8
|
-
"teddy-badge": "_teddy-
|
|
9
|
-
"teddy-badge--
|
|
10
|
-
"teddy-badge--
|
|
11
|
-
"teddy-badge--
|
|
12
|
-
"teddy-badge--
|
|
13
|
-
"teddy-badge--
|
|
14
|
-
"teddy-badge--
|
|
15
|
-
"teddy-badge--
|
|
8
|
+
"teddy-badge": "_teddy-badge_1fsdh_1",
|
|
9
|
+
"teddy-badge--counter-badge": "_teddy-badge--counter-badge_1fsdh_13",
|
|
10
|
+
"teddy-badge--alert-badge": "_teddy-badge--alert-badge_1fsdh_19",
|
|
11
|
+
"teddy-badge--attention": "_teddy-badge--attention_1fsdh_29",
|
|
12
|
+
"teddy-badge--special": "_teddy-badge--special_1fsdh_36",
|
|
13
|
+
"teddy-badge--neutral": "_teddy-badge--neutral_1fsdh_40",
|
|
14
|
+
"teddy-badge--information": "_teddy-badge--information_1fsdh_48",
|
|
15
|
+
"teddy-badge--success": "_teddy-badge--success_1fsdh_56",
|
|
16
|
+
"teddy-badge--warning": "_teddy-badge--warning_1fsdh_64",
|
|
17
|
+
"teddy-badge--error": "_teddy-badge--error_1fsdh_72"
|
|
16
18
|
};
|
|
17
19
|
const rootClassName = "teddy-badge";
|
|
18
20
|
function getIcon(variant) {
|
|
@@ -39,5 +41,7 @@ const Badge = React__default.forwardRef(
|
|
|
39
41
|
);
|
|
40
42
|
Badge.displayName = "Badge";
|
|
41
43
|
export {
|
|
42
|
-
Badge
|
|
44
|
+
Badge,
|
|
45
|
+
rootClassName,
|
|
46
|
+
styles as s
|
|
43
47
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const clsx = require("clsx");
|
|
5
|
+
const React = require("react");
|
|
6
|
+
const components_badge_badge = require("./badge.cjs");
|
|
7
|
+
const reactSlot = require("@radix-ui/react-slot");
|
|
8
|
+
const CounterBadge = React.forwardRef(
|
|
9
|
+
({ className, variant, asChild, ...props }, forwardRef) => {
|
|
10
|
+
const classes = clsx(
|
|
11
|
+
[components_badge_badge.styles[`${components_badge_badge.rootClassName}`], components_badge_badge.styles[`${components_badge_badge.rootClassName}--counter-badge`], components_badge_badge.styles[`${components_badge_badge.rootClassName}--${variant}`]],
|
|
12
|
+
className
|
|
13
|
+
);
|
|
14
|
+
const Comp = asChild ? reactSlot.Slot : "span";
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...props, ref: forwardRef, className: classes });
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
CounterBadge.displayName = "CounterBadge";
|
|
19
|
+
exports.CounterBadge = CounterBadge;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BadgeProps } from './badge';
|
|
3
|
+
|
|
4
|
+
type CounterBadgeProps = Omit<BadgeProps, 'hideIcon'>;
|
|
5
|
+
/**
|
|
6
|
+
* The Alert badge is used to indicate a numeric value, commonly used for Cart items.
|
|
7
|
+
*/
|
|
8
|
+
declare const CounterBadge: React.ForwardRefExoticComponent<CounterBadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
9
|
+
export { CounterBadge };
|
|
10
|
+
export type { CounterBadgeProps };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import React__default from "react";
|
|
4
|
+
import { s as styles, rootClassName } from "./badge.js";
|
|
5
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
6
|
+
const CounterBadge = React__default.forwardRef(
|
|
7
|
+
({ className, variant, asChild, ...props }, forwardRef) => {
|
|
8
|
+
const classes = clsx(
|
|
9
|
+
[styles[`${rootClassName}`], styles[`${rootClassName}--counter-badge`], styles[`${rootClassName}--${variant}`]],
|
|
10
|
+
className
|
|
11
|
+
);
|
|
12
|
+
const Comp = asChild ? Slot : "span";
|
|
13
|
+
return /* @__PURE__ */ jsx(Comp, { ...props, ref: forwardRef, className: classes });
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
CounterBadge.displayName = "CounterBadge";
|
|
17
|
+
export {
|
|
18
|
+
CounterBadge
|
|
19
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const components_badge_badge = require("./badge.cjs");
|
|
4
|
+
const components_badge_alertBadge = require("./alert-badge.cjs");
|
|
5
|
+
const components_badge_counterBadge = require("./counter-badge.cjs");
|
|
4
6
|
exports.Badge = components_badge_badge.Badge;
|
|
7
|
+
exports.AlertBadge = components_badge_alertBadge.AlertBadge;
|
|
8
|
+
exports.CounterBadge = components_badge_counterBadge.CounterBadge;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
export { Badge } from './badge';
|
|
2
2
|
export type { BadgeProps } from './badge';
|
|
3
|
+
export { AlertBadge } from './alert-badge';
|
|
4
|
+
export type { AlertBadgeProps } from './alert-badge';
|
|
5
|
+
export { CounterBadge } from './counter-badge';
|
|
6
|
+
export type { CounterBadgeProps } from './counter-badge';
|
|
@@ -23,32 +23,33 @@ function _interopNamespaceDefault(e) {
|
|
|
23
23
|
return Object.freeze(n);
|
|
24
24
|
}
|
|
25
25
|
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
26
|
-
const fadeInAnimation = "
|
|
27
|
-
const scaleInAnimation = "
|
|
26
|
+
const fadeInAnimation = "_fadeInAnimation_aswkh_1";
|
|
27
|
+
const scaleInAnimation = "_scaleInAnimation_aswkh_1";
|
|
28
28
|
const styles = {
|
|
29
|
-
"teddy-button": "_teddy-
|
|
30
|
-
"teddy-button--sm": "_teddy-button--
|
|
31
|
-
"teddy-button--icon-only": "_teddy-button--icon-
|
|
32
|
-
"teddy-button--md": "_teddy-button--
|
|
33
|
-
"teddy-button--lg": "_teddy-button--
|
|
34
|
-
"teddy-button--full-width": "_teddy-button--full-
|
|
35
|
-
"teddy-button--primary": "_teddy-button--
|
|
36
|
-
"teddy-button--disabled": "_teddy-button--
|
|
37
|
-
"teddy-button--primary-negative": "_teddy-button--primary-
|
|
38
|
-
"teddy-button--secondary": "_teddy-button--
|
|
39
|
-
"teddy-button--secondary-negative": "_teddy-button--secondary-
|
|
40
|
-
"teddy-button--expressive": "_teddy-button--
|
|
41
|
-
"teddy-button--expressive-negative": "_teddy-button--expressive-
|
|
42
|
-
"teddy-button--negative": "_teddy-button--
|
|
43
|
-
"teddy-button--destructive": "_teddy-button--
|
|
44
|
-
"teddy-button--destructive-negative": "_teddy-button--destructive-
|
|
45
|
-
"teddy-button--tertiary-purple": "_teddy-button--tertiary-
|
|
46
|
-
"teddy-button--tertiary-purple-negative": "_teddy-button--tertiary-purple-
|
|
47
|
-
"teddy-button--
|
|
48
|
-
"teddy-button--text": "_teddy-button--
|
|
49
|
-
"teddy-
|
|
29
|
+
"teddy-button": "_teddy-button_aswkh_18",
|
|
30
|
+
"teddy-button--sm": "_teddy-button--sm_aswkh_53",
|
|
31
|
+
"teddy-button--icon-only": "_teddy-button--icon-only_aswkh_56",
|
|
32
|
+
"teddy-button--md": "_teddy-button--md_aswkh_59",
|
|
33
|
+
"teddy-button--lg": "_teddy-button--lg_aswkh_65",
|
|
34
|
+
"teddy-button--full-width": "_teddy-button--full-width_aswkh_71",
|
|
35
|
+
"teddy-button--primary": "_teddy-button--primary_aswkh_74",
|
|
36
|
+
"teddy-button--disabled": "_teddy-button--disabled_aswkh_78",
|
|
37
|
+
"teddy-button--primary-negative": "_teddy-button--primary-negative_aswkh_84",
|
|
38
|
+
"teddy-button--secondary": "_teddy-button--secondary_aswkh_96",
|
|
39
|
+
"teddy-button--secondary-negative": "_teddy-button--secondary-negative_aswkh_107",
|
|
40
|
+
"teddy-button--expressive": "_teddy-button--expressive_aswkh_118",
|
|
41
|
+
"teddy-button--expressive-negative": "_teddy-button--expressive-negative_aswkh_128",
|
|
42
|
+
"teddy-button--negative": "_teddy-button--negative_aswkh_140",
|
|
43
|
+
"teddy-button--destructive": "_teddy-button--destructive_aswkh_147",
|
|
44
|
+
"teddy-button--destructive-negative": "_teddy-button--destructive-negative_aswkh_157",
|
|
45
|
+
"teddy-button--tertiary-purple": "_teddy-button--tertiary-purple_aswkh_167",
|
|
46
|
+
"teddy-button--tertiary-purple-negative": "_teddy-button--tertiary-purple-negative_aswkh_180",
|
|
47
|
+
"teddy-button--list-item": "_teddy-button--list-item_aswkh_195",
|
|
48
|
+
"teddy-button--text-negative": "_teddy-button--text-negative_aswkh_214",
|
|
49
|
+
"teddy-button--text": "_teddy-button--text_aswkh_214",
|
|
50
|
+
"teddy-button__loading": "_teddy-button__loading_aswkh_261",
|
|
50
51
|
fadeInAnimation,
|
|
51
|
-
"teddy-button__spinner": "_teddy-
|
|
52
|
+
"teddy-button__spinner": "_teddy-button__spinner_aswkh_272",
|
|
52
53
|
scaleInAnimation
|
|
53
54
|
};
|
|
54
55
|
const rootClassName = "teddy-button";
|
|
@@ -64,7 +65,8 @@ const variants = [
|
|
|
64
65
|
"destructive-negative",
|
|
65
66
|
"tertiary-purple-negative",
|
|
66
67
|
"text-negative",
|
|
67
|
-
"expressive-negative"
|
|
68
|
+
"expressive-negative",
|
|
69
|
+
"list-item"
|
|
68
70
|
];
|
|
69
71
|
const Root = React__namespace.forwardRef((args, ref) => {
|
|
70
72
|
const {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChildrenLayoutProps } from '../../utils/generate-styling';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
declare const variants: readonly ["primary", "secondary", "destructive", "tertiary-purple", "text", "expressive", "primary-negative", "secondary-negative", "destructive-negative", "tertiary-purple-negative", "text-negative", "expressive-negative"];
|
|
3
|
+
declare const variants: readonly ["primary", "secondary", "destructive", "tertiary-purple", "text", "expressive", "primary-negative", "secondary-negative", "destructive-negative", "tertiary-purple-negative", "text-negative", "expressive-negative", "list-item"];
|
|
4
4
|
export type Variant = (typeof variants)[number];
|
|
5
5
|
declare const sizes: readonly ["sm", "md", "lg"];
|
|
6
6
|
export type Size = (typeof sizes)[number];
|
|
@@ -18,7 +18,7 @@ type ButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'aria-lab
|
|
|
18
18
|
['aria-label']?: string;
|
|
19
19
|
});
|
|
20
20
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>> & {
|
|
21
|
-
variants: readonly ["primary", "secondary", "destructive", "tertiary-purple", "text", "expressive", "primary-negative", "secondary-negative", "destructive-negative", "tertiary-purple-negative", "text-negative", "expressive-negative"];
|
|
21
|
+
variants: readonly ["primary", "secondary", "destructive", "tertiary-purple", "text", "expressive", "primary-negative", "secondary-negative", "destructive-negative", "tertiary-purple-negative", "text-negative", "expressive-negative", "list-item"];
|
|
22
22
|
};
|
|
23
23
|
export { Button };
|
|
24
24
|
export type { ButtonProps };
|