@telia/teddy 0.7.50 → 0.7.52

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 (81) hide show
  1. package/dist/components/avatar/avatar-root.d.ts +1 -1
  2. package/dist/components/avatar/index.d.ts +1 -1
  3. package/dist/components/breadcrumbs/breadcrumbs-link.d.ts +1 -1
  4. package/dist/components/breadcrumbs/index.d.ts +1 -1
  5. package/dist/components/card/card-link.d.ts +1 -1
  6. package/dist/components/card/card.cjs +5 -5
  7. package/dist/components/card/card.d.ts +1 -1
  8. package/dist/components/card/card.js +5 -5
  9. package/dist/components/channel-button/channel-button-root.d.ts +4 -4
  10. package/dist/components/channel-button/index.d.ts +4 -4
  11. package/dist/components/checkbox/checkbox-group.d.ts +1 -1
  12. package/dist/components/checkbox/index.d.ts +1 -1
  13. package/dist/components/checkbox-card-group/checkbox-card-group-content.cjs +1 -0
  14. package/dist/components/checkbox-card-group/checkbox-card-group-content.js +1 -0
  15. package/dist/components/checkbox-card-group/checkbox-card-group-indicator.cjs +1 -0
  16. package/dist/components/checkbox-card-group/checkbox-card-group-indicator.js +1 -0
  17. package/dist/components/checkbox-card-group/checkbox-card-group-item-title.cjs +1 -0
  18. package/dist/components/checkbox-card-group/checkbox-card-group-item-title.js +1 -0
  19. package/dist/components/checkbox-card-group/checkbox-card-group-item.cjs +1 -0
  20. package/dist/components/checkbox-card-group/checkbox-card-group-item.js +1 -0
  21. package/dist/components/chip/chip-indicator.d.ts +2 -2
  22. package/dist/components/chip/index.d.ts +2 -2
  23. package/dist/components/dashboard-card/dashboard-card-avatar.d.ts +1 -1
  24. package/dist/components/dashed-button/dashed-button-root.d.ts +6 -6
  25. package/dist/components/expandable-card/expandable-card-button.d.ts +2 -2
  26. package/dist/components/expandable-card/index.d.ts +3 -3
  27. package/dist/components/flip-card/flip-card-trigger.d.ts +2 -2
  28. package/dist/components/icon/utils.d.ts +1 -1
  29. package/dist/components/index.cjs +2 -0
  30. package/dist/components/index.d.ts +1 -0
  31. package/dist/components/index.js +2 -0
  32. package/dist/components/modal/modal-close.cjs +1 -0
  33. package/dist/components/modal/modal-close.js +1 -0
  34. package/dist/components/navigation-menu/navigation-menu.cjs +1 -0
  35. package/dist/components/navigation-menu/navigation-menu.d.ts +1 -1
  36. package/dist/components/navigation-menu/navigation-menu.js +1 -0
  37. package/dist/components/notabene/notabene-icon.d.ts +2 -2
  38. package/dist/components/notification/index.d.ts +6 -6
  39. package/dist/components/notification/notification-icon.d.ts +2 -2
  40. package/dist/components/notification/notification-root.d.ts +3 -3
  41. package/dist/components/radio-card-group/radio-card-group-content.cjs +1 -0
  42. package/dist/components/radio-card-group/radio-card-group-content.js +1 -0
  43. package/dist/components/radio-card-group/radio-card-group-item-title.cjs +1 -0
  44. package/dist/components/radio-card-group/radio-card-group-item-title.js +1 -0
  45. package/dist/components/radio-card-group/radio-card-group-item.cjs +1 -0
  46. package/dist/components/radio-card-group/radio-card-group-item.js +1 -0
  47. package/dist/components/scroll-area/index.d.ts +3 -3
  48. package/dist/components/scroll-area/scroll-area-button.d.ts +2 -2
  49. package/dist/components/step-by-step/index.cjs +19 -0
  50. package/dist/components/step-by-step/index.d.ts +30 -0
  51. package/dist/components/step-by-step/index.js +19 -0
  52. package/dist/components/step-by-step/step-by-step-content.cjs +23 -0
  53. package/dist/components/step-by-step/step-by-step-content.d.ts +8 -0
  54. package/dist/components/step-by-step/step-by-step-content.js +23 -0
  55. package/dist/components/step-by-step/step-by-step-description.cjs +17 -0
  56. package/dist/components/step-by-step/step-by-step-description.d.ts +33 -0
  57. package/dist/components/step-by-step/step-by-step-description.js +17 -0
  58. package/dist/components/step-by-step/step-by-step-icon.cjs +29 -0
  59. package/dist/components/step-by-step/step-by-step-icon.d.ts +24 -0
  60. package/dist/components/step-by-step/step-by-step-icon.js +29 -0
  61. package/dist/components/step-by-step/step-by-step-root.cjs +70 -0
  62. package/dist/components/step-by-step/step-by-step-root.d.ts +71 -0
  63. package/dist/components/step-by-step/step-by-step-root.js +70 -0
  64. package/dist/components/step-by-step/step-by-step-step.cjs +36 -0
  65. package/dist/components/step-by-step/step-by-step-step.d.ts +24 -0
  66. package/dist/components/step-by-step/step-by-step-step.js +36 -0
  67. package/dist/components/tabs/tabs-scroll-button.d.ts +2 -2
  68. package/dist/components/tabs/tabs-scroll.d.ts +1 -1
  69. package/dist/components/tabs/tabs-trigger.d.ts +1 -1
  70. package/dist/components/text-field/index.d.ts +2 -2
  71. package/dist/components/text-field/text-field-button.d.ts +2 -2
  72. package/dist/components/toggle/toggle.d.ts +2 -2
  73. package/dist/components/tooltip/index.d.ts +1 -1
  74. package/dist/components/top-row-buttons/top-row-buttons.d.ts +1 -1
  75. package/dist/main.cjs +2 -0
  76. package/dist/main.js +2 -0
  77. package/dist/style.css +214 -1
  78. package/dist/utils/generate-styling/grid.d.ts +24 -24
  79. package/dist/utils/generate-styling/index.d.ts +16 -16
  80. package/dist/utils/generate-styling/util.d.ts +2 -2
  81. package/package.json +2 -2
@@ -3,7 +3,7 @@ import { ItemProps } from './scroll-area-item';
3
3
  import { ButtonProps } from './scroll-area-button';
4
4
 
5
5
  export declare const ScrollArea: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-scroll-area').ScrollAreaProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
6
- variant?: ("button" | "scrollbar" | "hidden") | undefined;
6
+ variant?: ("button" | "hidden" | "scrollbar") | undefined;
7
7
  scrollBehavior?: "auto" | "smooth" | undefined;
8
8
  viewPortClassName?: string | undefined;
9
9
  barClassName?: string | undefined;
@@ -21,7 +21,7 @@ export declare const ScrollArea: import('react').ForwardRefExoticComponent<Omit<
21
21
  loading?: boolean | undefined;
22
22
  fullWidth?: boolean | undefined;
23
23
  size?: "sm" | "md" | "lg" | undefined;
24
- variant?: "list-item" | "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "text-underline" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
24
+ variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "text-underline" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
25
25
  borderStyle?: ("dashed" | "default") | undefined;
26
26
  } & {
27
27
  iconOnly: true;
@@ -33,7 +33,7 @@ export declare const ScrollArea: import('react').ForwardRefExoticComponent<Omit<
33
33
  loading?: boolean | undefined;
34
34
  fullWidth?: boolean | undefined;
35
35
  size?: "sm" | "md" | "lg" | undefined;
36
- variant?: "list-item" | "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "text-underline" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
36
+ variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "text-underline" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
37
37
  borderStyle?: ("dashed" | "default") | undefined;
38
38
  } & {
39
39
  iconOnly?: false | undefined;
@@ -17,7 +17,7 @@ export declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<Reac
17
17
  loading?: boolean | undefined;
18
18
  fullWidth?: boolean | undefined;
19
19
  size?: "sm" | "md" | "lg" | undefined;
20
- variant?: "list-item" | "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "text-underline" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
20
+ variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "text-underline" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
21
21
  borderStyle?: ("dashed" | "default") | undefined;
22
22
  } & {
23
23
  iconOnly: true;
@@ -29,7 +29,7 @@ export declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<Reac
29
29
  loading?: boolean | undefined;
30
30
  fullWidth?: boolean | undefined;
31
31
  size?: "sm" | "md" | "lg" | undefined;
32
- variant?: "list-item" | "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "text-underline" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
32
+ variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "text-underline" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
33
33
  borderStyle?: ("dashed" | "default") | undefined;
34
34
  } & {
35
35
  iconOnly?: false | undefined;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const components_stepByStep_stepByStepRoot = require("./step-by-step-root.cjs");
4
+ const components_stepByStep_stepByStepStep = require("./step-by-step-step.cjs");
5
+ const components_stepByStep_stepByStepIcon = require("./step-by-step-icon.cjs");
6
+ const components_stepByStep_stepByStepDescription = require("./step-by-step-description.cjs");
7
+ const components_stepByStep_stepByStepContent = require("./step-by-step-content.cjs");
8
+ components_stepByStep_stepByStepRoot.Root.displayName = "StepByStep";
9
+ components_stepByStep_stepByStepStep.Step.displayName = "StepByStep.Step";
10
+ components_stepByStep_stepByStepIcon.StepIcon.displayName = "StepByStep.Icon";
11
+ components_stepByStep_stepByStepDescription.Description.displayName = "StepByStep.Description";
12
+ components_stepByStep_stepByStepContent.Content.displayName = "StepByStep.Content";
13
+ const StepByStep = Object.assign(components_stepByStep_stepByStepRoot.Root, {
14
+ Step: components_stepByStep_stepByStepStep.Step,
15
+ Icon: components_stepByStep_stepByStepIcon.StepIcon,
16
+ Description: components_stepByStep_stepByStepDescription.Description,
17
+ Content: components_stepByStep_stepByStepContent.Content
18
+ });
19
+ exports.StepByStep = StepByStep;
@@ -0,0 +1,30 @@
1
+ import { RootProps } from './step-by-step-root';
2
+ import { StepProps } from './step-by-step-step';
3
+ import { StepIcon, StepIconProps } from './step-by-step-icon';
4
+ import { Description, DescriptionProps } from './step-by-step-description';
5
+ import { ContentProps } from './step-by-step-content';
6
+
7
+ declare const StepByStep: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref">, "onSelect"> & {
8
+ interactive?: boolean | undefined;
9
+ selectedIndex?: number | undefined;
10
+ onSelect?: ((index: number) => void) | undefined;
11
+ size?: "xs" | "sm" | "md" | "lg" | undefined;
12
+ borders?: "solid" | "dashed" | undefined;
13
+ standalone?: boolean | undefined;
14
+ } & import('react').RefAttributes<HTMLUListElement>> & {
15
+ Step: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
16
+ index?: number | undefined;
17
+ } & import('react').RefAttributes<HTMLLIElement>>;
18
+ Icon: typeof StepIcon;
19
+ Description: typeof Description;
20
+ Content: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
21
+ };
22
+ type StepByStepProps = {
23
+ Root: RootProps;
24
+ Step: StepProps;
25
+ Icon: StepIconProps;
26
+ Description: DescriptionProps;
27
+ Content: ContentProps;
28
+ };
29
+ export { StepByStep };
30
+ export type { StepByStepProps };
@@ -0,0 +1,19 @@
1
+ import { Root } from "./step-by-step-root.js";
2
+ import { Step } from "./step-by-step-step.js";
3
+ import { StepIcon } from "./step-by-step-icon.js";
4
+ import { Description } from "./step-by-step-description.js";
5
+ import { Content } from "./step-by-step-content.js";
6
+ Root.displayName = "StepByStep";
7
+ Step.displayName = "StepByStep.Step";
8
+ StepIcon.displayName = "StepByStep.Icon";
9
+ Description.displayName = "StepByStep.Description";
10
+ Content.displayName = "StepByStep.Content";
11
+ const StepByStep = Object.assign(Root, {
12
+ Step,
13
+ Icon: StepIcon,
14
+ Description,
15
+ Content
16
+ });
17
+ export {
18
+ StepByStep
19
+ };
@@ -0,0 +1,23 @@
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_stepByStep_stepByStepRoot = require("./step-by-step-root.cjs");
7
+ const components_stepByStep_stepByStepStep = require("./step-by-step-step.cjs");
8
+ const Content = React.forwardRef(
9
+ ({ className, children, ...props }, forwardRef) => {
10
+ const { interactive, opened } = React.useContext(components_stepByStep_stepByStepStep.StepContext);
11
+ const classes = clsx(
12
+ components_stepByStep_stepByStepRoot.styles[`${components_stepByStep_stepByStepRoot.rootClassName}__content`],
13
+ {
14
+ [components_stepByStep_stepByStepRoot.styles[`${components_stepByStep_stepByStepRoot.rootClassName}__content--open`]]: interactive && opened,
15
+ [components_stepByStep_stepByStepRoot.styles[`${components_stepByStep_stepByStepRoot.rootClassName}__content--closed`]]: interactive && !opened
16
+ },
17
+ className
18
+ );
19
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ...props, ref: forwardRef, className: classes, children });
20
+ }
21
+ );
22
+ Content.displayName = "StepByStep.Content";
23
+ exports.Content = Content;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+
3
+ export type ContentProps = React.ComponentPropsWithoutRef<'div'>;
4
+ /**
5
+ * Collapsible content for a step. Only visible when the step is active in interactive mode.
6
+ * In non-interactive mode this content is hidden.
7
+ */
8
+ export declare const Content: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,23 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import clsx from "clsx";
4
+ import { s as styles, rootClassName } from "./step-by-step-root.js";
5
+ import { StepContext } from "./step-by-step-step.js";
6
+ const Content = React__default.forwardRef(
7
+ ({ className, children, ...props }, forwardRef) => {
8
+ const { interactive, opened } = React__default.useContext(StepContext);
9
+ const classes = clsx(
10
+ styles[`${rootClassName}__content`],
11
+ {
12
+ [styles[`${rootClassName}__content--open`]]: interactive && opened,
13
+ [styles[`${rootClassName}__content--closed`]]: interactive && !opened
14
+ },
15
+ className
16
+ );
17
+ return /* @__PURE__ */ jsx("div", { ...props, ref: forwardRef, className: classes, children });
18
+ }
19
+ );
20
+ Content.displayName = "StepByStep.Content";
21
+ export {
22
+ Content
23
+ };
@@ -0,0 +1,17 @@
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 components_stepByStep_stepByStepRoot = require("./step-by-step-root.cjs");
6
+ const components_stepByStep_stepByStepIcon = require("./step-by-step-icon.cjs");
7
+ function Description({ className, heading, icon, imageSrc, number, children }) {
8
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9
+ /* @__PURE__ */ jsxRuntime.jsx(components_stepByStep_stepByStepIcon.StepIcon, { imageSrc, number, children: icon }),
10
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx(components_stepByStep_stepByStepRoot.styles[`${components_stepByStep_stepByStepRoot.rootClassName}__text`], className), children: [
11
+ heading !== void 0 && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: components_stepByStep_stepByStepRoot.styles[`${components_stepByStep_stepByStepRoot.rootClassName}__heading`], children: heading }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: components_stepByStep_stepByStepRoot.styles[`${components_stepByStep_stepByStepRoot.rootClassName}__heading`], children: heading })),
12
+ children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: components_stepByStep_stepByStepRoot.styles[`${components_stepByStep_stepByStepRoot.rootClassName}__description`], children })
13
+ ] })
14
+ ] });
15
+ }
16
+ Description.displayName = "StepByStep.Description";
17
+ exports.Description = Description;
@@ -0,0 +1,33 @@
1
+ import { default as React } from 'react';
2
+
3
+ export type DescriptionProps = {
4
+ readonly className?: string;
5
+ /**
6
+ * Heading text or element displayed next to the icon.
7
+ */
8
+ readonly heading?: React.ReactNode;
9
+ /**
10
+ * Custom icon element rendered inside the icon circle (e.g. <Icon name="..." />).
11
+ * Takes precedence over imageSrc and number if provided.
12
+ */
13
+ readonly icon?: React.ReactNode;
14
+ /**
15
+ * Image source for the icon circle.
16
+ */
17
+ readonly imageSrc?: string;
18
+ /**
19
+ * Number to display inside the icon circle.
20
+ */
21
+ readonly number?: number;
22
+ /**
23
+ * Description body content displayed below the heading.
24
+ */
25
+ readonly children?: React.ReactNode;
26
+ };
27
+ /**
28
+ * Renders the visible row for a step: the icon circle and the heading/description text.
29
+ */
30
+ export declare function Description({ className, heading, icon, imageSrc, number, children }: DescriptionProps): import("react/jsx-runtime").JSX.Element;
31
+ export declare namespace Description {
32
+ var displayName: string;
33
+ }
@@ -0,0 +1,17 @@
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { s as styles, rootClassName } from "./step-by-step-root.js";
4
+ import { StepIcon } from "./step-by-step-icon.js";
5
+ function Description({ className, heading, icon, imageSrc, number, children }) {
6
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
7
+ /* @__PURE__ */ jsx(StepIcon, { imageSrc, number, children: icon }),
8
+ /* @__PURE__ */ jsxs("div", { className: clsx(styles[`${rootClassName}__text`], className), children: [
9
+ heading !== void 0 && (typeof heading === "string" ? /* @__PURE__ */ jsx("h2", { className: styles[`${rootClassName}__heading`], children: heading }) : /* @__PURE__ */ jsx("div", { className: styles[`${rootClassName}__heading`], children: heading })),
10
+ children && /* @__PURE__ */ jsx("div", { className: styles[`${rootClassName}__description`], children })
11
+ ] })
12
+ ] });
13
+ }
14
+ Description.displayName = "StepByStep.Description";
15
+ export {
16
+ Description
17
+ };
@@ -0,0 +1,29 @@
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_stepByStep_stepByStepRoot = require("./step-by-step-root.cjs");
7
+ const components_stepByStep_stepByStepStep = require("./step-by-step-step.cjs");
8
+ function StepIcon({ className, children, number, imageSrc }) {
9
+ const { interactive, opened, index, onSelect } = React.useContext(components_stepByStep_stepByStepStep.StepContext);
10
+ const { standalone } = React.useContext(components_stepByStep_stepByStepRoot.RootContext);
11
+ const classes = clsx(
12
+ components_stepByStep_stepByStepRoot.styles[`${components_stepByStep_stepByStepRoot.rootClassName}__icon-circle`],
13
+ {
14
+ [components_stepByStep_stepByStepRoot.styles[`${components_stepByStep_stepByStepRoot.rootClassName}__icon-circle--interactive`]]: interactive,
15
+ [components_stepByStep_stepByStepRoot.styles[`${components_stepByStep_stepByStepRoot.rootClassName}__icon-circle--highlighted`]]: opened && !standalone
16
+ },
17
+ className
18
+ );
19
+ const content = children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
20
+ imageSrc && /* @__PURE__ */ jsxRuntime.jsx("img", { className: components_stepByStep_stepByStepRoot.styles[`${components_stepByStep_stepByStepRoot.rootClassName}__image`], src: imageSrc, alt: "" }),
21
+ number !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: components_stepByStep_stepByStepRoot.styles[`${components_stepByStep_stepByStepRoot.rootClassName}__number`], children: number })
22
+ ] });
23
+ if (interactive) {
24
+ return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: classes, onClick: () => onSelect(index), "aria-expanded": opened, children: content });
25
+ }
26
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, children: content });
27
+ }
28
+ StepIcon.displayName = "StepByStep.Icon";
29
+ exports.StepIcon = StepIcon;
@@ -0,0 +1,24 @@
1
+ import { default as React } from 'react';
2
+
3
+ export type StepIconProps = {
4
+ readonly className?: string;
5
+ /**
6
+ * Number to display inside the icon circle.
7
+ */
8
+ readonly number?: number;
9
+ /**
10
+ * Image source for displaying an image inside the icon circle.
11
+ */
12
+ readonly imageSrc?: string;
13
+ /**
14
+ * Custom icon element to render inside the circle (e.g. <Icon name="..." />).
15
+ */
16
+ readonly children?: React.ReactNode;
17
+ };
18
+ /**
19
+ * The visual icon circle for a step. Renders as a button in interactive mode.
20
+ */
21
+ export declare function StepIcon({ className, children, number, imageSrc }: StepIconProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare namespace StepIcon {
23
+ var displayName: string;
24
+ }
@@ -0,0 +1,29 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import clsx from "clsx";
4
+ import { RootContext, s as styles, rootClassName } from "./step-by-step-root.js";
5
+ import { StepContext } from "./step-by-step-step.js";
6
+ function StepIcon({ className, children, number, imageSrc }) {
7
+ const { interactive, opened, index, onSelect } = React__default.useContext(StepContext);
8
+ const { standalone } = React__default.useContext(RootContext);
9
+ const classes = clsx(
10
+ styles[`${rootClassName}__icon-circle`],
11
+ {
12
+ [styles[`${rootClassName}__icon-circle--interactive`]]: interactive,
13
+ [styles[`${rootClassName}__icon-circle--highlighted`]]: opened && !standalone
14
+ },
15
+ className
16
+ );
17
+ const content = children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
18
+ imageSrc && /* @__PURE__ */ jsx("img", { className: styles[`${rootClassName}__image`], src: imageSrc, alt: "" }),
19
+ number !== void 0 && /* @__PURE__ */ jsx("span", { className: styles[`${rootClassName}__number`], children: number })
20
+ ] });
21
+ if (interactive) {
22
+ return /* @__PURE__ */ jsx("button", { type: "button", className: classes, onClick: () => onSelect(index), "aria-expanded": opened, children: content });
23
+ }
24
+ return /* @__PURE__ */ jsx("div", { className: classes, children: content });
25
+ }
26
+ StepIcon.displayName = "StepByStep.Icon";
27
+ export {
28
+ StepIcon
29
+ };
@@ -0,0 +1,70 @@
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 styles = {
7
+ "teddy-step-by-step": "_teddy-step-by-step_1nyec_1",
8
+ "teddy-step-by-step--interactive": "_teddy-step-by-step--interactive_1nyec_8",
9
+ "teddy-step-by-step__content": "_teddy-step-by-step__content_1nyec_8",
10
+ "teddy-step-by-step--dashed": "_teddy-step-by-step--dashed_1nyec_11",
11
+ "teddy-step-by-step__step-wrapper": "_teddy-step-by-step__step-wrapper_1nyec_11",
12
+ "teddy-step-by-step__icon-circle": "_teddy-step-by-step__icon-circle_1nyec_17",
13
+ "teddy-step-by-step__icon-circle--highlighted": "_teddy-step-by-step__icon-circle--highlighted_1nyec_22",
14
+ "teddy-step-by-step__text": "_teddy-step-by-step__text_1nyec_44",
15
+ "teddy-step-by-step__number": "_teddy-step-by-step__number_1nyec_71",
16
+ "teddy-step-by-step__heading": "_teddy-step-by-step__heading_1nyec_87",
17
+ "teddy-step-by-step__image": "_teddy-step-by-step__image_1nyec_104",
18
+ "teddy-step-by-step__content--open": "_teddy-step-by-step__content--open_1nyec_118",
19
+ "teddy-step-by-step-height-open": "_teddy-step-by-step-height-open_1nyec_1",
20
+ "teddy-step-by-step__content--closed": "_teddy-step-by-step__content--closed_1nyec_123",
21
+ "teddy-step-by-step-height-close": "_teddy-step-by-step-height-close_1nyec_1",
22
+ "teddy-step-by-step--lg": "_teddy-step-by-step--lg_1nyec_130",
23
+ "teddy-step-by-step--md": "_teddy-step-by-step--md_1nyec_145",
24
+ "teddy-step-by-step--sm": "_teddy-step-by-step--sm_1nyec_160",
25
+ "teddy-step-by-step--xs": "_teddy-step-by-step--xs_1nyec_175"
26
+ };
27
+ const rootClassName = "teddy-step-by-step";
28
+ const RootContext = React.createContext({
29
+ interactive: false,
30
+ selectedIndex: 0,
31
+ onSelect: () => {
32
+ },
33
+ standalone: false
34
+ });
35
+ const Root = React.forwardRef(
36
+ ({
37
+ className,
38
+ children,
39
+ interactive = false,
40
+ selectedIndex: selectedIndexProp,
41
+ onSelect: onSelectProp,
42
+ size = "lg",
43
+ borders = "solid",
44
+ standalone = false,
45
+ ...props
46
+ }, forwardRef) => {
47
+ const [localSelectedIndex, setLocalSelectedIndex] = React.useState(0);
48
+ const selectedIndex = selectedIndexProp ?? localSelectedIndex;
49
+ const onSelect = onSelectProp ?? setLocalSelectedIndex;
50
+ const classes = clsx(
51
+ styles[rootClassName],
52
+ styles[`${rootClassName}--${size}`],
53
+ {
54
+ [styles[`${rootClassName}--interactive`]]: interactive,
55
+ [styles[`${rootClassName}--dashed`]]: borders === "dashed"
56
+ },
57
+ className
58
+ );
59
+ const contextValue = React.useMemo(
60
+ () => ({ interactive, selectedIndex, onSelect, standalone }),
61
+ [interactive, selectedIndex, onSelect, standalone]
62
+ );
63
+ return /* @__PURE__ */ jsxRuntime.jsx(RootContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx("ul", { ...props, ref: forwardRef, className: classes, children }) });
64
+ }
65
+ );
66
+ Root.displayName = "StepByStep";
67
+ exports.Root = Root;
68
+ exports.RootContext = RootContext;
69
+ exports.rootClassName = rootClassName;
70
+ exports.styles = styles;
@@ -0,0 +1,71 @@
1
+ import { default as React } from 'react';
2
+
3
+ export declare const rootClassName = "teddy-step-by-step";
4
+ export type RootContextValue = {
5
+ interactive: boolean;
6
+ selectedIndex: number;
7
+ onSelect: (index: number) => void;
8
+ standalone: boolean;
9
+ };
10
+ export declare const RootContext: React.Context<RootContextValue>;
11
+ export type RootProps = Omit<React.ComponentPropsWithoutRef<'ul'>, 'onSelect'> & {
12
+ /**
13
+ * Whether steps can be clicked to expand/collapse their content.
14
+ */
15
+ interactive?: boolean;
16
+ /**
17
+ * Index of the active step (controlled). Starts at 0.
18
+ */
19
+ selectedIndex?: number;
20
+ /**
21
+ * Callback fired when a step is selected (controlled mode).
22
+ */
23
+ onSelect?: (index: number) => void;
24
+ /**
25
+ * Size of the step icon element.
26
+ * @default 'lg'
27
+ */
28
+ size?: 'xs' | 'sm' | 'md' | 'lg';
29
+ /**
30
+ * Style of the connector line between steps.
31
+ * @default 'solid'
32
+ */
33
+ borders?: 'solid' | 'dashed';
34
+ /**
35
+ * When true, all step icons are rendered in their default (non-highlighted) state
36
+ * regardless of the selected index.
37
+ */
38
+ standalone?: boolean;
39
+ };
40
+ /**
41
+ * The root container for a list of steps.
42
+ */
43
+ export declare const Root: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref">, "onSelect"> & {
44
+ /**
45
+ * Whether steps can be clicked to expand/collapse their content.
46
+ */
47
+ interactive?: boolean | undefined;
48
+ /**
49
+ * Index of the active step (controlled). Starts at 0.
50
+ */
51
+ selectedIndex?: number | undefined;
52
+ /**
53
+ * Callback fired when a step is selected (controlled mode).
54
+ */
55
+ onSelect?: ((index: number) => void) | undefined;
56
+ /**
57
+ * Size of the step icon element.
58
+ * @default 'lg'
59
+ */
60
+ size?: "xs" | "sm" | "md" | "lg" | undefined;
61
+ /**
62
+ * Style of the connector line between steps.
63
+ * @default 'solid'
64
+ */
65
+ borders?: "solid" | "dashed" | undefined;
66
+ /**
67
+ * When true, all step icons are rendered in their default (non-highlighted) state
68
+ * regardless of the selected index.
69
+ */
70
+ standalone?: boolean | undefined;
71
+ } & React.RefAttributes<HTMLUListElement>>;
@@ -0,0 +1,70 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default, { useState } from "react";
3
+ import clsx from "clsx";
4
+ const styles = {
5
+ "teddy-step-by-step": "_teddy-step-by-step_1nyec_1",
6
+ "teddy-step-by-step--interactive": "_teddy-step-by-step--interactive_1nyec_8",
7
+ "teddy-step-by-step__content": "_teddy-step-by-step__content_1nyec_8",
8
+ "teddy-step-by-step--dashed": "_teddy-step-by-step--dashed_1nyec_11",
9
+ "teddy-step-by-step__step-wrapper": "_teddy-step-by-step__step-wrapper_1nyec_11",
10
+ "teddy-step-by-step__icon-circle": "_teddy-step-by-step__icon-circle_1nyec_17",
11
+ "teddy-step-by-step__icon-circle--highlighted": "_teddy-step-by-step__icon-circle--highlighted_1nyec_22",
12
+ "teddy-step-by-step__text": "_teddy-step-by-step__text_1nyec_44",
13
+ "teddy-step-by-step__number": "_teddy-step-by-step__number_1nyec_71",
14
+ "teddy-step-by-step__heading": "_teddy-step-by-step__heading_1nyec_87",
15
+ "teddy-step-by-step__image": "_teddy-step-by-step__image_1nyec_104",
16
+ "teddy-step-by-step__content--open": "_teddy-step-by-step__content--open_1nyec_118",
17
+ "teddy-step-by-step-height-open": "_teddy-step-by-step-height-open_1nyec_1",
18
+ "teddy-step-by-step__content--closed": "_teddy-step-by-step__content--closed_1nyec_123",
19
+ "teddy-step-by-step-height-close": "_teddy-step-by-step-height-close_1nyec_1",
20
+ "teddy-step-by-step--lg": "_teddy-step-by-step--lg_1nyec_130",
21
+ "teddy-step-by-step--md": "_teddy-step-by-step--md_1nyec_145",
22
+ "teddy-step-by-step--sm": "_teddy-step-by-step--sm_1nyec_160",
23
+ "teddy-step-by-step--xs": "_teddy-step-by-step--xs_1nyec_175"
24
+ };
25
+ const rootClassName = "teddy-step-by-step";
26
+ const RootContext = React__default.createContext({
27
+ interactive: false,
28
+ selectedIndex: 0,
29
+ onSelect: () => {
30
+ },
31
+ standalone: false
32
+ });
33
+ const Root = React__default.forwardRef(
34
+ ({
35
+ className,
36
+ children,
37
+ interactive = false,
38
+ selectedIndex: selectedIndexProp,
39
+ onSelect: onSelectProp,
40
+ size = "lg",
41
+ borders = "solid",
42
+ standalone = false,
43
+ ...props
44
+ }, forwardRef) => {
45
+ const [localSelectedIndex, setLocalSelectedIndex] = useState(0);
46
+ const selectedIndex = selectedIndexProp ?? localSelectedIndex;
47
+ const onSelect = onSelectProp ?? setLocalSelectedIndex;
48
+ const classes = clsx(
49
+ styles[rootClassName],
50
+ styles[`${rootClassName}--${size}`],
51
+ {
52
+ [styles[`${rootClassName}--interactive`]]: interactive,
53
+ [styles[`${rootClassName}--dashed`]]: borders === "dashed"
54
+ },
55
+ className
56
+ );
57
+ const contextValue = React__default.useMemo(
58
+ () => ({ interactive, selectedIndex, onSelect, standalone }),
59
+ [interactive, selectedIndex, onSelect, standalone]
60
+ );
61
+ return /* @__PURE__ */ jsx(RootContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx("ul", { ...props, ref: forwardRef, className: classes, children }) });
62
+ }
63
+ );
64
+ Root.displayName = "StepByStep";
65
+ export {
66
+ Root,
67
+ RootContext,
68
+ rootClassName,
69
+ styles as s
70
+ };
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const React = require("react");
5
+ const clsx = require("clsx");
6
+ const components_stepByStep_stepByStepRoot = require("./step-by-step-root.cjs");
7
+ const StepContext = React.createContext({
8
+ index: 0,
9
+ opened: false,
10
+ interactive: false,
11
+ onSelect: () => {
12
+ }
13
+ });
14
+ const Step = React.forwardRef(
15
+ ({ className, children, index = 0, ...props }, forwardRef) => {
16
+ const { interactive, selectedIndex, onSelect } = React.useContext(components_stepByStep_stepByStepRoot.RootContext);
17
+ const opened = selectedIndex === index;
18
+ const classes = clsx(
19
+ components_stepByStep_stepByStepRoot.styles[`${components_stepByStep_stepByStepRoot.rootClassName}__step-wrapper`],
20
+ {
21
+ [components_stepByStep_stepByStepRoot.styles[`${components_stepByStep_stepByStepRoot.rootClassName}__step--opened`]]: opened,
22
+ [components_stepByStep_stepByStepRoot.styles[`${components_stepByStep_stepByStepRoot.rootClassName}__step--closed`]]: !opened,
23
+ [components_stepByStep_stepByStepRoot.styles[`${components_stepByStep_stepByStepRoot.rootClassName}__step--touched`]]: true
24
+ },
25
+ className
26
+ );
27
+ const contextValue = React.useMemo(
28
+ () => ({ index, opened, interactive, onSelect }),
29
+ [index, opened, interactive, onSelect]
30
+ );
31
+ return /* @__PURE__ */ jsxRuntime.jsx(StepContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx("li", { ...props, ref: forwardRef, className: classes, children }) });
32
+ }
33
+ );
34
+ Step.displayName = "StepByStep.Step";
35
+ exports.Step = Step;
36
+ exports.StepContext = StepContext;
@@ -0,0 +1,24 @@
1
+ import { default as React } from 'react';
2
+
3
+ export type StepContextValue = {
4
+ index: number;
5
+ opened: boolean;
6
+ interactive: boolean;
7
+ onSelect: (index: number) => void;
8
+ };
9
+ export declare const StepContext: React.Context<StepContextValue>;
10
+ export type StepProps = React.ComponentPropsWithoutRef<'li'> & {
11
+ /**
12
+ * Zero-based index of this step. Required for interactive mode.
13
+ */
14
+ index?: number;
15
+ };
16
+ /**
17
+ * A single step wrapper within a StepByStep list.
18
+ */
19
+ export declare const Step: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
20
+ /**
21
+ * Zero-based index of this step. Required for interactive mode.
22
+ */
23
+ index?: number | undefined;
24
+ } & React.RefAttributes<HTMLLIElement>>;
@@ -0,0 +1,36 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import clsx from "clsx";
4
+ import { RootContext, s as styles, rootClassName } from "./step-by-step-root.js";
5
+ const StepContext = React__default.createContext({
6
+ index: 0,
7
+ opened: false,
8
+ interactive: false,
9
+ onSelect: () => {
10
+ }
11
+ });
12
+ const Step = React__default.forwardRef(
13
+ ({ className, children, index = 0, ...props }, forwardRef) => {
14
+ const { interactive, selectedIndex, onSelect } = React__default.useContext(RootContext);
15
+ const opened = selectedIndex === index;
16
+ const classes = clsx(
17
+ styles[`${rootClassName}__step-wrapper`],
18
+ {
19
+ [styles[`${rootClassName}__step--opened`]]: opened,
20
+ [styles[`${rootClassName}__step--closed`]]: !opened,
21
+ [styles[`${rootClassName}__step--touched`]]: true
22
+ },
23
+ className
24
+ );
25
+ const contextValue = React__default.useMemo(
26
+ () => ({ index, opened, interactive, onSelect }),
27
+ [index, opened, interactive, onSelect]
28
+ );
29
+ return /* @__PURE__ */ jsx(StepContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx("li", { ...props, ref: forwardRef, className: classes, children }) });
30
+ }
31
+ );
32
+ Step.displayName = "StepByStep.Step";
33
+ export {
34
+ Step,
35
+ StepContext
36
+ };