@telia/teddy 0.0.33 → 0.0.35

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.
Files changed (129) hide show
  1. package/dist/components/box/box.cjs +2 -2
  2. package/dist/components/box/box.js +2 -2
  3. package/dist/components/chip/chip-indicator.d.ts +1 -1
  4. package/dist/components/chip/index.d.ts +1 -1
  5. package/dist/components/color-dot/color-dot-root.cjs +29 -0
  6. package/dist/components/color-dot/color-dot-root.d.ts +20 -0
  7. package/dist/components/color-dot/color-dot-root.js +29 -0
  8. package/dist/components/color-dot/index.cjs +5 -0
  9. package/dist/components/color-dot/index.d.ts +12 -0
  10. package/dist/components/color-dot/index.js +5 -0
  11. package/dist/components/drawer/drawer-close.cjs +1 -1
  12. package/dist/components/drawer/drawer-close.js +1 -1
  13. package/dist/components/drawer/drawer-content.cjs +10 -2
  14. package/dist/components/drawer/drawer-content.d.ts +1 -0
  15. package/dist/components/drawer/drawer-content.js +10 -2
  16. package/dist/components/drawer/drawer-description.cjs +1 -1
  17. package/dist/components/drawer/drawer-description.js +1 -1
  18. package/dist/components/drawer/drawer-footer.cjs +1 -1
  19. package/dist/components/drawer/drawer-footer.js +1 -1
  20. package/dist/components/drawer/drawer-overlay.cjs +1 -1
  21. package/dist/components/drawer/drawer-overlay.js +1 -1
  22. package/dist/components/drawer/drawer-title.cjs +1 -1
  23. package/dist/components/drawer/drawer-title.js +1 -1
  24. package/dist/components/expandable-card/expandable-card-button.cjs +29 -0
  25. package/dist/components/expandable-card/expandable-card-button.d.ts +33 -0
  26. package/dist/components/expandable-card/expandable-card-button.js +29 -0
  27. package/dist/components/expandable-card/expandable-card-content.cjs +32 -0
  28. package/dist/components/expandable-card/expandable-card-content.d.ts +5 -0
  29. package/dist/components/expandable-card/expandable-card-content.js +15 -0
  30. package/dist/components/expandable-card/expandable-card-description.cjs +14 -0
  31. package/dist/components/expandable-card/expandable-card-description.d.ts +5 -0
  32. package/dist/components/expandable-card/expandable-card-description.js +14 -0
  33. package/dist/components/expandable-card/expandable-card-header.cjs +13 -0
  34. package/dist/components/expandable-card/expandable-card-header.d.ts +4 -0
  35. package/dist/components/expandable-card/expandable-card-header.js +13 -0
  36. package/dist/components/expandable-card/expandable-card-hidden.cjs +13 -0
  37. package/dist/components/expandable-card/expandable-card-hidden.d.ts +4 -0
  38. package/dist/components/expandable-card/expandable-card-hidden.js +13 -0
  39. package/dist/components/expandable-card/expandable-card-indicator.cjs +16 -0
  40. package/dist/components/expandable-card/expandable-card-indicator.d.ts +7 -0
  41. package/dist/components/expandable-card/expandable-card-indicator.js +16 -0
  42. package/dist/components/expandable-card/expandable-card-item.cjs +36 -0
  43. package/dist/components/expandable-card/expandable-card-item.d.ts +5 -0
  44. package/dist/components/expandable-card/expandable-card-item.js +19 -0
  45. package/dist/components/expandable-card/expandable-card-line.cjs +16 -0
  46. package/dist/components/expandable-card/expandable-card-line.d.ts +8 -0
  47. package/dist/components/expandable-card/expandable-card-line.js +16 -0
  48. package/dist/components/expandable-card/expandable-card-price.cjs +13 -0
  49. package/dist/components/expandable-card/expandable-card-price.d.ts +4 -0
  50. package/dist/components/expandable-card/expandable-card-price.js +13 -0
  51. package/dist/components/expandable-card/expandable-card-root.cjs +51 -0
  52. package/dist/components/expandable-card/expandable-card-root.d.ts +6 -0
  53. package/dist/components/expandable-card/expandable-card-root.js +34 -0
  54. package/dist/components/expandable-card/expandable-card-slot.cjs +33 -0
  55. package/dist/components/expandable-card/expandable-card-slot.d.ts +8 -0
  56. package/dist/components/expandable-card/expandable-card-slot.js +33 -0
  57. package/dist/components/expandable-card/expandable-card-trigger.cjs +35 -0
  58. package/dist/components/expandable-card/expandable-card-trigger.d.ts +8 -0
  59. package/dist/components/expandable-card/expandable-card-trigger.js +18 -0
  60. package/dist/components/expandable-card/index.cjs +37 -0
  61. package/dist/components/expandable-card/index.d.ts +61 -0
  62. package/dist/components/expandable-card/index.js +37 -0
  63. package/dist/components/flex/flex.cjs +2 -2
  64. package/dist/components/flex/flex.js +2 -2
  65. package/dist/components/grid/grid.cjs +2 -2
  66. package/dist/components/grid/grid.js +2 -2
  67. package/dist/components/index.cjs +8 -2
  68. package/dist/components/index.d.ts +3 -0
  69. package/dist/components/index.js +7 -1
  70. package/dist/components/list/index.d.ts +3 -0
  71. package/dist/components/list/list.cjs +15 -15
  72. package/dist/components/list/list.d.ts +6 -1
  73. package/dist/components/list/list.js +15 -15
  74. package/dist/components/modal/modal.cjs +4 -1
  75. package/dist/components/modal/modal.js +4 -1
  76. package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.cjs +40 -16
  77. package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.js +40 -16
  78. package/dist/components/navigation-menu/global-navigation/global-navigation-root.d.ts +7 -9
  79. package/dist/components/navigation-menu/global-navigation/global-navigation-shopping-cart.cjs +4 -0
  80. package/dist/components/navigation-menu/global-navigation/global-navigation-shopping-cart.js +4 -0
  81. package/dist/components/navigation-menu/navigation-menu.d.ts +1 -1
  82. package/dist/components/notabene/notabene-icon.d.ts +1 -1
  83. package/dist/components/notabene/notabene-root.cjs +3 -3
  84. package/dist/components/notabene/notabene-root.js +3 -3
  85. package/dist/components/notification/notification.d.ts +1 -1
  86. package/dist/components/progress-bar/progress-bar.d.ts +1 -1
  87. package/dist/components/radio-group/index.cjs +20 -2
  88. package/dist/components/radio-group/index.d.ts +70 -2
  89. package/dist/components/radio-group/index.js +19 -1
  90. package/dist/components/radio-group/radio-group-indicator.cjs +32 -0
  91. package/dist/components/radio-group/radio-group-indicator.d.ts +5 -0
  92. package/dist/components/radio-group/radio-group-indicator.js +15 -0
  93. package/dist/components/radio-group/radio-group-item-label.cjs +18 -0
  94. package/dist/components/radio-group/radio-group-item-label.d.ts +15 -0
  95. package/dist/components/radio-group/radio-group-item-label.js +18 -0
  96. package/dist/components/radio-group/radio-group-item.cjs +16 -0
  97. package/dist/components/radio-group/radio-group-item.d.ts +9 -0
  98. package/dist/components/radio-group/radio-group-item.js +16 -0
  99. package/dist/components/radio-group/radio-group-label.cjs +29 -0
  100. package/dist/components/radio-group/radio-group-label.d.ts +66 -0
  101. package/dist/components/radio-group/radio-group-label.js +29 -0
  102. package/dist/components/radio-group/radio-group-root.cjs +46 -0
  103. package/dist/components/radio-group/radio-group-root.d.ts +52 -0
  104. package/dist/components/radio-group/radio-group-root.js +29 -0
  105. package/dist/components/radio-group/radio-group-trigger.cjs +38 -0
  106. package/dist/components/radio-group/radio-group-trigger.d.ts +14 -0
  107. package/dist/components/radio-group/radio-group-trigger.js +21 -0
  108. package/dist/components/ribbon/index.cjs +6 -0
  109. package/dist/components/ribbon/index.d.ts +6 -0
  110. package/dist/components/ribbon/index.js +6 -0
  111. package/dist/components/ribbon/ribbon-root.cjs +32 -0
  112. package/dist/components/ribbon/ribbon-root.d.ts +13 -0
  113. package/dist/components/ribbon/ribbon-root.js +32 -0
  114. package/dist/components/tabs/index.d.ts +2 -2
  115. package/dist/components/tabs/tabs-root.d.ts +1 -1
  116. package/dist/components/tabs/tabs-trigger.d.ts +1 -1
  117. package/dist/components/toggle/toggle.d.ts +1 -1
  118. package/dist/components/tooltip/index.d.ts +1 -1
  119. package/dist/drawer.module-BPXo6-Q2.js +15 -0
  120. package/dist/drawer.module-_pUdp_M1.cjs +14 -0
  121. package/dist/main.cjs +8 -2
  122. package/dist/main.js +7 -1
  123. package/dist/style.css +731 -518
  124. package/package.json +1 -1
  125. package/dist/components/radio-group/radio-group.cjs +0 -110
  126. package/dist/components/radio-group/radio-group.d.ts +0 -161
  127. package/dist/components/radio-group/radio-group.js +0 -93
  128. package/dist/drawer.module-BZV0Appw.js +0 -14
  129. package/dist/drawer.module-rgUBNOkt.cjs +0 -13
@@ -0,0 +1,13 @@
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_expandableCard_expandableCardRoot = require("./expandable-card-root.cjs");
7
+ const HiddenContainer = React.forwardRef(
8
+ ({ className, children, ...props }, forwardRef) => {
9
+ const classes = clsx([components_expandableCard_expandableCardRoot.styles[`${components_expandableCard_expandableCardRoot.rootClassName}__hidden`]], className);
10
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ...props, ref: forwardRef, className: classes, children });
11
+ }
12
+ );
13
+ exports.HiddenContainer = HiddenContainer;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+
3
+ export type HiddenContainerProps = React.ComponentPropsWithoutRef<"div">;
4
+ export declare const HiddenContainer: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,13 @@
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 "./expandable-card-root.js";
5
+ const HiddenContainer = React__default.forwardRef(
6
+ ({ className, children, ...props }, forwardRef) => {
7
+ const classes = clsx([styles[`${rootClassName}__hidden`]], className);
8
+ return /* @__PURE__ */ jsx("div", { ...props, ref: forwardRef, className: classes, children });
9
+ }
10
+ );
11
+ export {
12
+ HiddenContainer
13
+ };
@@ -0,0 +1,16 @@
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_expandableCard_expandableCardRoot = require("./expandable-card-root.cjs");
7
+ require("../../assets/sprite.269ba410-teddy.svg");
8
+ const components_icon_icon = require("../icon/icon.cjs");
9
+ const Indicator = React.forwardRef(
10
+ ({ className, children, name = "chevron-down", ...props }, forwardRef) => {
11
+ const classes = clsx([components_expandableCard_expandableCardRoot.styles[`${components_expandableCard_expandableCardRoot.rootClassName}__indicator`]], className);
12
+ return /* @__PURE__ */ jsxRuntime.jsx(components_icon_icon.Icon, { "aria-hidden": true, name, ...props, ref: forwardRef, className: classes, children });
13
+ }
14
+ );
15
+ Indicator.displayName = "Indicator";
16
+ exports.Indicator = Indicator;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { IconProps } from '../icon';
3
+
4
+ export type IndicatorProps = Partial<IconProps> & {
5
+ name?: IconProps['name'];
6
+ };
7
+ export declare const Indicator: React.ForwardRefExoticComponent<Omit<IndicatorProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
@@ -0,0 +1,16 @@
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 "./expandable-card-root.js";
5
+ import "../../assets/sprite.269ba410-teddy.svg";
6
+ import { Icon } from "../icon/icon.js";
7
+ const Indicator = React__default.forwardRef(
8
+ ({ className, children, name = "chevron-down", ...props }, forwardRef) => {
9
+ const classes = clsx([styles[`${rootClassName}__indicator`]], className);
10
+ return /* @__PURE__ */ jsx(Icon, { "aria-hidden": true, name, ...props, ref: forwardRef, className: classes, children });
11
+ }
12
+ );
13
+ Indicator.displayName = "Indicator";
14
+ export {
15
+ Indicator
16
+ };
@@ -0,0 +1,36 @@
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_expandableCard_expandableCardRoot = require("./expandable-card-root.cjs");
7
+ const AccordionPrimitive = require("@radix-ui/react-accordion");
8
+ function _interopNamespaceDefault(e) {
9
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
10
+ if (e) {
11
+ for (const k in e) {
12
+ if (k !== "default") {
13
+ const d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: () => e[k]
17
+ });
18
+ }
19
+ }
20
+ }
21
+ n.default = e;
22
+ return Object.freeze(n);
23
+ }
24
+ const AccordionPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(AccordionPrimitive);
25
+ const Item = React.forwardRef(
26
+ ({ className, children, ...props }, forwardRef) => {
27
+ const classes = clsx(
28
+ [components_expandableCard_expandableCardRoot.styles[`${components_expandableCard_expandableCardRoot.rootClassName}__item`]],
29
+ {},
30
+ className
31
+ );
32
+ return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Item, { ...props, ref: forwardRef, className: classes, children });
33
+ }
34
+ );
35
+ Item.displayName = "Item";
36
+ exports.Item = Item;
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+
3
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
4
+ export type ItemProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>;
5
+ export declare const Item: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -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 "./expandable-card-root.js";
5
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
6
+ const Item = React__default.forwardRef(
7
+ ({ className, children, ...props }, forwardRef) => {
8
+ const classes = clsx(
9
+ [styles[`${rootClassName}__item`]],
10
+ {},
11
+ className
12
+ );
13
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Item, { ...props, ref: forwardRef, className: classes, children });
14
+ }
15
+ );
16
+ Item.displayName = "Item";
17
+ export {
18
+ Item
19
+ };
@@ -0,0 +1,16 @@
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_box_box = require("../box/box.cjs");
6
+ const clsx = require("clsx");
7
+ const components_expandableCard_expandableCardRoot = require("./expandable-card-root.cjs");
8
+ const tokens_spacing_variables = require("../../tokens/spacing/variables.cjs");
9
+ const Line = React.forwardRef(({ className, ...props }, forwardRef) => {
10
+ const classes = clsx(
11
+ [components_expandableCard_expandableCardRoot.styles[`${components_expandableCard_expandableCardRoot.rootClassName}__line`]],
12
+ className
13
+ );
14
+ return /* @__PURE__ */ jsxRuntime.jsx(components_box_box.Box, { width: "100%", p: "0", m: `${tokens_spacing_variables.teddySpacing200} 0`, ...props, ref: forwardRef, className: classes, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("hr", {}) });
15
+ });
16
+ exports.Line = Line;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { Box } from '../box';
3
+
4
+ /** -------------------------------------------------------------------------------------------------
5
+ * Line
6
+ * -----------------------------------------------------------------------------------------------*/
7
+ export type LineProps = Omit<React.ComponentPropsWithoutRef<typeof Box>, 'asChild' | 'as' | 'children'>;
8
+ export declare const Line: React.ForwardRefExoticComponent<LineProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,16 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import { Box } from "../box/box.js";
4
+ import clsx from "clsx";
5
+ import { s as styles, rootClassName } from "./expandable-card-root.js";
6
+ import { teddySpacing200 } from "../../tokens/spacing/variables.js";
7
+ const Line = React__default.forwardRef(({ className, ...props }, forwardRef) => {
8
+ const classes = clsx(
9
+ [styles[`${rootClassName}__line`]],
10
+ className
11
+ );
12
+ return /* @__PURE__ */ jsx(Box, { width: "100%", p: "0", m: `${teddySpacing200} 0`, ...props, ref: forwardRef, className: classes, asChild: true, children: /* @__PURE__ */ jsx("hr", {}) });
13
+ });
14
+ export {
15
+ Line
16
+ };
@@ -0,0 +1,13 @@
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_expandableCard_expandableCardRoot = require("./expandable-card-root.cjs");
7
+ const Price = React.forwardRef(
8
+ ({ className, children, ...props }, forwardRef) => {
9
+ const classes = clsx([components_expandableCard_expandableCardRoot.styles[`${components_expandableCard_expandableCardRoot.rootClassName}__price`]], className);
10
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, ...props, ref: forwardRef, children });
11
+ }
12
+ );
13
+ exports.Price = Price;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+
3
+ export type PriceProps = React.ComponentPropsWithoutRef<"div">;
4
+ export declare const Price: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,13 @@
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 "./expandable-card-root.js";
5
+ const Price = React__default.forwardRef(
6
+ ({ className, children, ...props }, forwardRef) => {
7
+ const classes = clsx([styles[`${rootClassName}__price`]], className);
8
+ return /* @__PURE__ */ jsx("div", { className: classes, ...props, ref: forwardRef, children });
9
+ }
10
+ );
11
+ export {
12
+ Price
13
+ };
@@ -0,0 +1,51 @@
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 AccordionPrimitive = require("@radix-ui/react-accordion");
7
+ function _interopNamespaceDefault(e) {
8
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
9
+ if (e) {
10
+ for (const k in e) {
11
+ if (k !== "default") {
12
+ const d = Object.getOwnPropertyDescriptor(e, k);
13
+ Object.defineProperty(n, k, d.get ? d : {
14
+ enumerable: true,
15
+ get: () => e[k]
16
+ });
17
+ }
18
+ }
19
+ }
20
+ n.default = e;
21
+ return Object.freeze(n);
22
+ }
23
+ const AccordionPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(AccordionPrimitive);
24
+ const styles = {
25
+ "teddy-expandable-card": "_teddy-expandable-card_12yyw_1",
26
+ "teddy-expandable-card__item": "_teddy-expandable-card__item_12yyw_6",
27
+ "teddy-expandable-card__trigger": "_teddy-expandable-card__trigger_12yyw_14",
28
+ "teddy-expandable-card__indicator": "_teddy-expandable-card__indicator_12yyw_38",
29
+ "teddy-expandable-card__hidden": "_teddy-expandable-card__hidden_12yyw_50",
30
+ "teddy-expandable-card__line": "_teddy-expandable-card__line_12yyw_56",
31
+ "teddy-expandable-card__content": "_teddy-expandable-card__content_12yyw_59",
32
+ "teddy-expandable-card__description": "_teddy-expandable-card__description_12yyw_68",
33
+ "teddy-expandable-card__price": "_teddy-expandable-card__price_12yyw_79",
34
+ "teddy-expandable-card__header": "_teddy-expandable-card__header_12yyw_83",
35
+ "teddy-expandable-card__slot": "_teddy-expandable-card__slot_12yyw_91",
36
+ "teddy-expandable-card__slot--center": "_teddy-expandable-card__slot--center_12yyw_96",
37
+ "teddy-expandable-card__slot--bottom": "_teddy-expandable-card__slot--bottom_12yyw_99",
38
+ "teddy-expandable-card__button--right": "_teddy-expandable-card__button--right_12yyw_112",
39
+ "teddy-expandable-card__button--left": "_teddy-expandable-card__button--left_12yyw_115"
40
+ };
41
+ const rootClassName = "teddy-expandable-card";
42
+ const Root = React.forwardRef(
43
+ ({ className, children, ...props }, forwardRef) => {
44
+ const classes = clsx([styles[`${rootClassName}`]], className);
45
+ return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Root, { ...props, ref: forwardRef, className: classes, children });
46
+ }
47
+ );
48
+ Root.displayName = "Root";
49
+ exports.Root = Root;
50
+ exports.rootClassName = rootClassName;
51
+ exports.styles = styles;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+
3
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
4
+ export declare const rootClassName = "teddy-expandable-card";
5
+ export type RootProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Root>;
6
+ export declare const Root: React.ForwardRefExoticComponent<RootProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,34 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import clsx from "clsx";
4
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
5
+ const styles = {
6
+ "teddy-expandable-card": "_teddy-expandable-card_12yyw_1",
7
+ "teddy-expandable-card__item": "_teddy-expandable-card__item_12yyw_6",
8
+ "teddy-expandable-card__trigger": "_teddy-expandable-card__trigger_12yyw_14",
9
+ "teddy-expandable-card__indicator": "_teddy-expandable-card__indicator_12yyw_38",
10
+ "teddy-expandable-card__hidden": "_teddy-expandable-card__hidden_12yyw_50",
11
+ "teddy-expandable-card__line": "_teddy-expandable-card__line_12yyw_56",
12
+ "teddy-expandable-card__content": "_teddy-expandable-card__content_12yyw_59",
13
+ "teddy-expandable-card__description": "_teddy-expandable-card__description_12yyw_68",
14
+ "teddy-expandable-card__price": "_teddy-expandable-card__price_12yyw_79",
15
+ "teddy-expandable-card__header": "_teddy-expandable-card__header_12yyw_83",
16
+ "teddy-expandable-card__slot": "_teddy-expandable-card__slot_12yyw_91",
17
+ "teddy-expandable-card__slot--center": "_teddy-expandable-card__slot--center_12yyw_96",
18
+ "teddy-expandable-card__slot--bottom": "_teddy-expandable-card__slot--bottom_12yyw_99",
19
+ "teddy-expandable-card__button--right": "_teddy-expandable-card__button--right_12yyw_112",
20
+ "teddy-expandable-card__button--left": "_teddy-expandable-card__button--left_12yyw_115"
21
+ };
22
+ const rootClassName = "teddy-expandable-card";
23
+ const Root = React__default.forwardRef(
24
+ ({ className, children, ...props }, forwardRef) => {
25
+ const classes = clsx([styles[`${rootClassName}`]], className);
26
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Root, { ...props, ref: forwardRef, className: classes, children });
27
+ }
28
+ );
29
+ Root.displayName = "Root";
30
+ export {
31
+ Root,
32
+ rootClassName,
33
+ styles as s
34
+ };
@@ -0,0 +1,33 @@
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_box_box = require("../box/box.cjs");
7
+ const components_expandableCard_expandableCardRoot = require("./expandable-card-root.cjs");
8
+ const Slot = React.forwardRef(({ className, align, ...props }, forwardRef) => {
9
+ const classes = clsx(
10
+ [
11
+ components_expandableCard_expandableCardRoot.styles[`${components_expandableCard_expandableCardRoot.rootClassName}__slot`],
12
+ {
13
+ [components_expandableCard_expandableCardRoot.styles[`${components_expandableCard_expandableCardRoot.rootClassName}__slot--center`]]: align === "top" || align === "bottom",
14
+ [components_expandableCard_expandableCardRoot.styles[`${components_expandableCard_expandableCardRoot.rootClassName}__slot--bottom`]]: align == null ? void 0 : align.includes("bottom")
15
+ }
16
+ ],
17
+ className
18
+ );
19
+ return /* @__PURE__ */ jsxRuntime.jsx(
20
+ components_box_box.Box,
21
+ {
22
+ position: "absolute",
23
+ top: (align == null ? void 0 : align.includes("top")) ? "0" : void 0,
24
+ bottom: (align == null ? void 0 : align.includes("bottom")) ? "0" : void 0,
25
+ left: (align == null ? void 0 : align.includes("left")) ? "300" : (align == null ? void 0 : align.includes("right")) ? void 0 : "50%",
26
+ right: (align == null ? void 0 : align.includes("right")) ? "300" : void 0,
27
+ ...props,
28
+ ref: forwardRef,
29
+ className: classes
30
+ }
31
+ );
32
+ });
33
+ 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,33 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import React__default from "react";
4
+ import { Box } from "../box/box.js";
5
+ import { s as styles, rootClassName } from "./expandable-card-root.js";
6
+ const Slot = React__default.forwardRef(({ className, align, ...props }, forwardRef) => {
7
+ const classes = clsx(
8
+ [
9
+ styles[`${rootClassName}__slot`],
10
+ {
11
+ [styles[`${rootClassName}__slot--center`]]: align === "top" || align === "bottom",
12
+ [styles[`${rootClassName}__slot--bottom`]]: align == null ? void 0 : align.includes("bottom")
13
+ }
14
+ ],
15
+ className
16
+ );
17
+ return /* @__PURE__ */ jsx(
18
+ Box,
19
+ {
20
+ position: "absolute",
21
+ top: (align == null ? void 0 : align.includes("top")) ? "0" : void 0,
22
+ bottom: (align == null ? void 0 : align.includes("bottom")) ? "0" : void 0,
23
+ left: (align == null ? void 0 : align.includes("left")) ? "300" : (align == null ? void 0 : align.includes("right")) ? void 0 : "50%",
24
+ right: (align == null ? void 0 : align.includes("right")) ? "300" : void 0,
25
+ ...props,
26
+ ref: forwardRef,
27
+ className: classes
28
+ }
29
+ );
30
+ });
31
+ export {
32
+ Slot
33
+ };
@@ -0,0 +1,35 @@
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_expandableCard_expandableCardRoot = require("./expandable-card-root.cjs");
7
+ const AccordionPrimitive = require("@radix-ui/react-accordion");
8
+ function _interopNamespaceDefault(e) {
9
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
10
+ if (e) {
11
+ for (const k in e) {
12
+ if (k !== "default") {
13
+ const d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: () => e[k]
17
+ });
18
+ }
19
+ }
20
+ }
21
+ n.default = e;
22
+ return Object.freeze(n);
23
+ }
24
+ const AccordionPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(AccordionPrimitive);
25
+ const Trigger = React.forwardRef(
26
+ ({ className, children, ...props }, forwardRef) => {
27
+ const classes = clsx(
28
+ [components_expandableCard_expandableCardRoot.styles[`${components_expandableCard_expandableCardRoot.rootClassName}__trigger`]],
29
+ className
30
+ );
31
+ return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Trigger, { ...props, ref: forwardRef, className: classes, children });
32
+ }
33
+ );
34
+ Trigger.displayName = "Trigger";
35
+ exports.Trigger = Trigger;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+
3
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
4
+ /** -------------------------------------------------------------------------------------------------
5
+ * Trigger
6
+ * -----------------------------------------------------------------------------------------------*/
7
+ export type TriggerProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>;
8
+ export declare const Trigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,18 @@
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 "./expandable-card-root.js";
5
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
6
+ const Trigger = React__default.forwardRef(
7
+ ({ className, children, ...props }, forwardRef) => {
8
+ const classes = clsx(
9
+ [styles[`${rootClassName}__trigger`]],
10
+ className
11
+ );
12
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Trigger, { ...props, ref: forwardRef, className: classes, children });
13
+ }
14
+ );
15
+ Trigger.displayName = "Trigger";
16
+ export {
17
+ Trigger
18
+ };
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const components_expandableCard_expandableCardContent = require("./expandable-card-content.cjs");
4
+ const components_expandableCard_expandableCardHeader = require("./expandable-card-header.cjs");
5
+ const components_expandableCard_expandableCardItem = require("./expandable-card-item.cjs");
6
+ const components_expandableCard_expandableCardLine = require("./expandable-card-line.cjs");
7
+ const components_expandableCard_expandableCardRoot = require("./expandable-card-root.cjs");
8
+ const components_expandableCard_expandableCardTrigger = require("./expandable-card-trigger.cjs");
9
+ const components_expandableCard_expandableCardSlot = require("./expandable-card-slot.cjs");
10
+ const components_expandableCard_expandableCardHidden = require("./expandable-card-hidden.cjs");
11
+ const components_expandableCard_expandableCardButton = require("./expandable-card-button.cjs");
12
+ const components_expandableCard_expandableCardDescription = require("./expandable-card-description.cjs");
13
+ const components_expandableCard_expandableCardPrice = require("./expandable-card-price.cjs");
14
+ components_expandableCard_expandableCardRoot.Root.displayName = "ExpandableCard";
15
+ components_expandableCard_expandableCardItem.Item.displayName = "ExpandableCard.Item";
16
+ components_expandableCard_expandableCardLine.Line.displayName = "ExpandableCard.Line";
17
+ components_expandableCard_expandableCardContent.Content.displayName = "ExpandableCard.Content";
18
+ components_expandableCard_expandableCardTrigger.Trigger.displayName = "ExpandableCard.Trigger";
19
+ components_expandableCard_expandableCardHeader.Header.displayName = "ExpandableCard.Header";
20
+ components_expandableCard_expandableCardDescription.Description.displayName = "ExpandableCard.Description";
21
+ components_expandableCard_expandableCardPrice.Price.displayName = "ExpandableCard.Price";
22
+ components_expandableCard_expandableCardSlot.Slot.displayName = "ExpandableCard.Slot";
23
+ components_expandableCard_expandableCardHidden.HiddenContainer.displayName = "ExpandableCard.HiddenContainer";
24
+ components_expandableCard_expandableCardButton.Button.displayName = "ExpandableCard.Button";
25
+ const ExpandableCard = Object.assign(components_expandableCard_expandableCardRoot.Root, {
26
+ Item: components_expandableCard_expandableCardItem.Item,
27
+ Line: components_expandableCard_expandableCardLine.Line,
28
+ Content: components_expandableCard_expandableCardContent.Content,
29
+ Trigger: components_expandableCard_expandableCardTrigger.Trigger,
30
+ Header: components_expandableCard_expandableCardHeader.Header,
31
+ Description: components_expandableCard_expandableCardDescription.Description,
32
+ Price: components_expandableCard_expandableCardPrice.Price,
33
+ Slot: components_expandableCard_expandableCardSlot.Slot,
34
+ HiddenContainer: components_expandableCard_expandableCardHidden.HiddenContainer,
35
+ Button: components_expandableCard_expandableCardButton.Button
36
+ });
37
+ exports.ExpandableCard = ExpandableCard;
@@ -0,0 +1,61 @@
1
+ import { ContentProps } from './expandable-card-content';
2
+ import { HeaderProps } from './expandable-card-header';
3
+ import { ItemProps } from './expandable-card-item';
4
+ import { LineProps } from './expandable-card-line';
5
+ import { RootProps } from './expandable-card-root';
6
+ import { SlotProps } from './expandable-card-slot';
7
+ import { HiddenContainerProps } from './expandable-card-hidden';
8
+ import { ButtonProps } from './expandable-card-button';
9
+ import { DescriptionProps } from './expandable-card-description';
10
+ import { PriceProps } from './expandable-card-price';
11
+
12
+ export declare const ExpandableCard: import('react').ForwardRefExoticComponent<RootProps & import('react').RefAttributes<HTMLDivElement>> & {
13
+ Item: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-accordion').AccordionItemProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
14
+ Line: import('react').ForwardRefExoticComponent<LineProps & import('react').RefAttributes<HTMLDivElement>>;
15
+ Content: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-accordion').AccordionContentProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
16
+ Trigger: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-accordion').AccordionTriggerProps & import('react').RefAttributes<HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
17
+ Header: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
18
+ Description: import('react').ForwardRefExoticComponent<DescriptionProps & import('react').RefAttributes<HTMLDivElement>>;
19
+ Price: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
20
+ Slot: import('react').ForwardRefExoticComponent<SlotProps & import('react').RefAttributes<HTMLDivElement>>;
21
+ HiddenContainer: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
22
+ Button: import('react').ForwardRefExoticComponent<Omit<Omit<Omit<import('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: true;
32
+ "aria-label": string;
33
+ } & import('react').RefAttributes<HTMLButtonElement>, "ref"> | Omit<Omit<import('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 & {
34
+ display?: import('../../utils/generate-styling').DisplayChildren | undefined;
35
+ } & {
36
+ asChild?: boolean | undefined;
37
+ loading?: boolean | undefined;
38
+ fullWidth?: boolean | undefined;
39
+ size?: "sm" | "md" | "lg" | undefined;
40
+ variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
41
+ } & {
42
+ iconOnly?: false | undefined;
43
+ "aria-label"?: string | undefined;
44
+ } & import('react').RefAttributes<HTMLButtonElement>, "ref">, "variant"> & {
45
+ variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
46
+ position?: "left" | "right" | undefined;
47
+ } & import('react').RefAttributes<HTMLButtonElement>>;
48
+ };
49
+ export type ExpandableCardProps = {
50
+ Root: RootProps;
51
+ Item: ItemProps;
52
+ Line: LineProps;
53
+ Content: ContentProps;
54
+ Trigger: ContentProps;
55
+ Header: HeaderProps;
56
+ Description: DescriptionProps;
57
+ Price: PriceProps;
58
+ Slot: SlotProps;
59
+ HiddenContainer: HiddenContainerProps;
60
+ Button: ButtonProps;
61
+ };
@@ -0,0 +1,37 @@
1
+ import { Content } from "./expandable-card-content.js";
2
+ import { Header } from "./expandable-card-header.js";
3
+ import { Item } from "./expandable-card-item.js";
4
+ import { Line } from "./expandable-card-line.js";
5
+ import { Root } from "./expandable-card-root.js";
6
+ import { Trigger } from "./expandable-card-trigger.js";
7
+ import { Slot } from "./expandable-card-slot.js";
8
+ import { HiddenContainer } from "./expandable-card-hidden.js";
9
+ import { Button } from "./expandable-card-button.js";
10
+ import { Description } from "./expandable-card-description.js";
11
+ import { Price } from "./expandable-card-price.js";
12
+ Root.displayName = "ExpandableCard";
13
+ Item.displayName = "ExpandableCard.Item";
14
+ Line.displayName = "ExpandableCard.Line";
15
+ Content.displayName = "ExpandableCard.Content";
16
+ Trigger.displayName = "ExpandableCard.Trigger";
17
+ Header.displayName = "ExpandableCard.Header";
18
+ Description.displayName = "ExpandableCard.Description";
19
+ Price.displayName = "ExpandableCard.Price";
20
+ Slot.displayName = "ExpandableCard.Slot";
21
+ HiddenContainer.displayName = "ExpandableCard.HiddenContainer";
22
+ Button.displayName = "ExpandableCard.Button";
23
+ const ExpandableCard = Object.assign(Root, {
24
+ Item,
25
+ Line,
26
+ Content,
27
+ Trigger,
28
+ Header,
29
+ Description,
30
+ Price,
31
+ Slot,
32
+ HiddenContainer,
33
+ Button
34
+ });
35
+ export {
36
+ ExpandableCard
37
+ };
@@ -10,9 +10,9 @@ const styles = {
10
10
  };
11
11
  const rootClassName = "teddy-flex";
12
12
  const Flex = React.forwardRef((props, forwardRef) => {
13
- const { className, asChild, ...rest } = utils_generateStyling_index.extractProps(props);
13
+ const { className, asChild, as = "div", ...rest } = utils_generateStyling_index.extractProps(props);
14
14
  const classes = clsx([styles[`${rootClassName}`]], className);
15
- const Comp = asChild ? reactSlot.Slot : "div";
15
+ const Comp = asChild ? reactSlot.Slot : as;
16
16
  return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...rest, ref: forwardRef, className: classes });
17
17
  });
18
18
  Flex.displayName = "Flex";
@@ -8,9 +8,9 @@ const styles = {
8
8
  };
9
9
  const rootClassName = "teddy-flex";
10
10
  const Flex = React__default.forwardRef((props, forwardRef) => {
11
- const { className, asChild, ...rest } = extractProps(props);
11
+ const { className, asChild, as = "div", ...rest } = extractProps(props);
12
12
  const classes = clsx([styles[`${rootClassName}`]], className);
13
- const Comp = asChild ? Slot : "div";
13
+ const Comp = asChild ? Slot : as;
14
14
  return /* @__PURE__ */ jsx(Comp, { ...rest, ref: forwardRef, className: classes });
15
15
  });
16
16
  Flex.displayName = "Flex";