@telia/teddy 0.4.4 → 0.4.5

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 (76) hide show
  1. package/dist/components/card/card-illustration.d.ts +1 -1
  2. package/dist/components/channel-button/channel-button-root.d.ts +3 -3
  3. package/dist/components/channel-button/index.d.ts +3 -3
  4. package/dist/components/checkbox/checkbox-group.d.ts +1 -1
  5. package/dist/components/checkbox/index.d.ts +1 -1
  6. package/dist/components/chip/chip-indicator.d.ts +2 -2
  7. package/dist/components/chip/index.d.ts +2 -2
  8. package/dist/components/color-dot/index.d.ts +1 -1
  9. package/dist/components/expandable-card/expandable-card-button.d.ts +2 -2
  10. package/dist/components/expandable-card/index.d.ts +3 -3
  11. package/dist/components/flip-card/flip-card-back.cjs +39 -0
  12. package/dist/components/flip-card/flip-card-back.d.ts +27 -0
  13. package/dist/components/flip-card/flip-card-back.js +39 -0
  14. package/dist/components/flip-card/flip-card-footer.cjs +22 -0
  15. package/dist/components/flip-card/flip-card-footer.d.ts +14 -0
  16. package/dist/components/flip-card/flip-card-footer.js +22 -0
  17. package/dist/components/flip-card/flip-card-front.cjs +29 -0
  18. package/dist/components/flip-card/flip-card-front.d.ts +21 -0
  19. package/dist/components/flip-card/flip-card-front.js +29 -0
  20. package/dist/components/flip-card/flip-card-root.cjs +132 -0
  21. package/dist/components/flip-card/flip-card-root.d.ts +60 -0
  22. package/dist/components/flip-card/flip-card-root.js +132 -0
  23. package/dist/components/flip-card/flip-card-trigger.cjs +36 -0
  24. package/dist/components/flip-card/flip-card-trigger.d.ts +63 -0
  25. package/dist/components/flip-card/flip-card-trigger.js +36 -0
  26. package/dist/components/flip-card/index.cjs +18 -0
  27. package/dist/components/flip-card/index.d.ts +154 -0
  28. package/dist/components/flip-card/index.js +18 -0
  29. package/dist/components/icon/utils.d.ts +1 -1
  30. package/dist/components/index.cjs +2 -0
  31. package/dist/components/index.d.ts +1 -0
  32. package/dist/components/index.js +2 -0
  33. package/dist/components/modal/modal-close.cjs +1 -0
  34. package/dist/components/modal/modal-close.js +1 -0
  35. package/dist/components/navigation-menu/navigation-menu.cjs +1 -0
  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 +1 -1
  39. package/dist/components/notification/notification-icon.d.ts +2 -2
  40. package/dist/components/notification/notification-root.d.ts +1 -1
  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.cjs +4 -3
  48. package/dist/components/scroll-area/index.d.ts +6 -3
  49. package/dist/components/scroll-area/index.js +3 -2
  50. package/dist/components/scroll-area/scroll-area-bar.cjs +6 -250
  51. package/dist/components/scroll-area/scroll-area-bar.js +6 -233
  52. package/dist/components/scroll-area/scroll-area-button.cjs +2 -2
  53. package/dist/components/scroll-area/scroll-area-button.d.ts +2 -2
  54. package/dist/components/scroll-area/scroll-area-button.js +1 -1
  55. package/dist/components/scroll-area/scroll-area-corner.cjs +2 -2
  56. package/dist/components/scroll-area/scroll-area-corner.js +1 -1
  57. package/dist/components/scroll-area/scroll-area-item.cjs +3 -3
  58. package/dist/components/scroll-area/scroll-area-item.js +1 -1
  59. package/dist/components/scroll-area/scroll-area-root.cjs +4 -5
  60. package/dist/components/scroll-area/scroll-area-root.d.ts +19 -3
  61. package/dist/components/scroll-area/scroll-area-root.js +1 -2
  62. package/dist/components/scroll-area/scroll-area-thumb.cjs +251 -6
  63. package/dist/components/scroll-area/scroll-area-thumb.js +234 -6
  64. package/dist/components/tabs/index.d.ts +5 -3
  65. package/dist/components/tabs/tabs-scroll-button.d.ts +2 -2
  66. package/dist/components/tabs/tabs-scroll.d.ts +3 -1
  67. package/dist/components/text-field/index.d.ts +2 -2
  68. package/dist/components/text-field/text-field-button.d.ts +2 -2
  69. package/dist/components/toggle/toggle.d.ts +2 -2
  70. package/dist/main.cjs +2 -0
  71. package/dist/main.js +2 -0
  72. package/dist/style.css +3373 -3307
  73. package/dist/utils/generate-styling/grid.d.ts +24 -24
  74. package/dist/utils/generate-styling/index.d.ts +16 -16
  75. package/dist/utils/generate-styling/util.d.ts +2 -2
  76. package/package.json +1 -1
@@ -0,0 +1,60 @@
1
+ import { default as React } from 'react';
2
+
3
+ export declare const rootClassName = "teddy-flip-card";
4
+ export type FlipContextType = {
5
+ flipped: boolean | undefined;
6
+ setFlipped: React.Dispatch<React.SetStateAction<boolean | undefined>>;
7
+ frontId: string;
8
+ backId: string;
9
+ frontRef: React.RefObject<HTMLDivElement> | undefined;
10
+ backRef: React.RefObject<HTMLDivElement> | undefined;
11
+ };
12
+ export declare const FlipContext: React.Context<FlipContextType>;
13
+ export type RootProps = React.ComponentPropsWithoutRef<'div'> & {
14
+ /**
15
+ * Initial flip state of the card. Use this for uncontrolled components.
16
+ * @default false
17
+ */
18
+ defaultFlipped?: boolean;
19
+ /**
20
+ * Callback function triggered when the flip state changes.
21
+ * Receives the new flip state as a parameter.
22
+ * @param flipped The new flip state (true for back side showing, false for front side)
23
+ */
24
+ onFlippedChange?: (flipped: boolean) => void;
25
+ /**
26
+ * Controlled flip state of the card. When provided, the card becomes a controlled component,
27
+ * requiring manual state updates through the onFlippedChange callback.
28
+ * - true: shows the back side
29
+ * - false: shows the front side
30
+ */
31
+ flipped?: boolean;
32
+ /**
33
+ * Label for the card for assistive technology
34
+ */
35
+ 'aria-label'?: string;
36
+ };
37
+ export declare const Root: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
38
+ /**
39
+ * Initial flip state of the card. Use this for uncontrolled components.
40
+ * @default false
41
+ */
42
+ defaultFlipped?: boolean | undefined;
43
+ /**
44
+ * Callback function triggered when the flip state changes.
45
+ * Receives the new flip state as a parameter.
46
+ * @param flipped The new flip state (true for back side showing, false for front side)
47
+ */
48
+ onFlippedChange?: ((flipped: boolean) => void) | undefined;
49
+ /**
50
+ * Controlled flip state of the card. When provided, the card becomes a controlled component,
51
+ * requiring manual state updates through the onFlippedChange callback.
52
+ * - true: shows the back side
53
+ * - false: shows the front side
54
+ */
55
+ flipped?: boolean | undefined;
56
+ /**
57
+ * Label for the card for assistive technology
58
+ */
59
+ 'aria-label'?: string | undefined;
60
+ } & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,132 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default, { createContext, useRef, useState, useLayoutEffect, useEffect } from "react";
3
+ import clsx from "clsx";
4
+ import { useControllableState } from "@radix-ui/react-use-controllable-state";
5
+ import { useComposedRefs } from "../../utils/composeRefs.js";
6
+ const styles = {
7
+ "teddy-flip-card": "_teddy-flip-card_1is05_1",
8
+ "teddy-flip-card--flipped": "_teddy-flip-card--flipped_1is05_12",
9
+ "teddy-flip-card__front": "_teddy-flip-card__front_1is05_15",
10
+ "teddy-flip-card__back": "_teddy-flip-card__back_1is05_19",
11
+ "teddy-flip-card__back-inner": "_teddy-flip-card__back-inner_1is05_31",
12
+ "teddy-flip-card__scroll-area-view-port": "_teddy-flip-card__scroll-area-view-port_1is05_38",
13
+ "teddy-flip-card__footer": "_teddy-flip-card__footer_1is05_42",
14
+ "teddy-flip-card__footer--purple-light": "_teddy-flip-card__footer--purple-light_1is05_50",
15
+ "teddy-flip-card__footer--purple-dark": "_teddy-flip-card__footer--purple-dark_1is05_53",
16
+ "teddy-flip-card__footer--beige": "_teddy-flip-card__footer--beige_1is05_56",
17
+ "teddy-flip-card__footer--beige-light": "_teddy-flip-card__footer--beige-light_1is05_59",
18
+ "teddy-flip-card__footer--gray": "_teddy-flip-card__footer--gray_1is05_62",
19
+ "teddy-flip-card__footer--white": "_teddy-flip-card__footer--white_1is05_65"
20
+ };
21
+ const rootClassName = "teddy-flip-card";
22
+ const FlipContext = createContext({
23
+ flipped: false,
24
+ setFlipped: () => void 0,
25
+ frontId: "",
26
+ backId: "",
27
+ frontRef: void 0,
28
+ backRef: void 0
29
+ });
30
+ const FALLBACK_ANIMATION_DURATION = 500;
31
+ function parseTimeToMs(time) {
32
+ if (time.endsWith("ms")) {
33
+ return parseFloat(time);
34
+ } else if (time.endsWith("s")) {
35
+ return parseFloat(time) * 1e3;
36
+ }
37
+ return FALLBACK_ANIMATION_DURATION;
38
+ }
39
+ const Root = React__default.forwardRef(
40
+ ({
41
+ className,
42
+ defaultFlipped,
43
+ onFlippedChange,
44
+ flipped: flippedProp,
45
+ children,
46
+ "aria-label": ariaLabel,
47
+ id,
48
+ ...props
49
+ }, forwardRef) => {
50
+ const [flipped, setFlipped] = useControllableState({
51
+ onChange: onFlippedChange,
52
+ prop: flippedProp,
53
+ defaultProp: defaultFlipped
54
+ });
55
+ const internalRef = useRef(null);
56
+ const composedRef = useComposedRefs(forwardRef, internalRef);
57
+ const frontRef = useRef(null);
58
+ const backRef = useRef(null);
59
+ const timerRef = useRef();
60
+ const [animationDuration, setAnimationDuration] = useState(FALLBACK_ANIMATION_DURATION);
61
+ const uniqueId = id || `flip-card-${Math.random().toString(36).substring(2, 9)}`;
62
+ const frontId = `${uniqueId}-front`;
63
+ const backId = `${uniqueId}-back`;
64
+ const classes = clsx(
65
+ [styles[`${rootClassName}`]],
66
+ {
67
+ [styles[`${rootClassName}--flipped`]]: flipped
68
+ },
69
+ className
70
+ );
71
+ useLayoutEffect(() => {
72
+ if (internalRef.current) {
73
+ const computedStyle = window.getComputedStyle(internalRef.current);
74
+ const transitionDuration = computedStyle.getPropertyValue("transition-duration");
75
+ if (transitionDuration) {
76
+ const durationMs = parseTimeToMs(transitionDuration);
77
+ setAnimationDuration(durationMs + 50);
78
+ }
79
+ if (frontRef.current) {
80
+ const frontSize = frontRef.current.getBoundingClientRect();
81
+ internalRef.current.style.width = `${frontSize.width}px`;
82
+ internalRef.current.style.height = `${frontSize.height}px`;
83
+ }
84
+ }
85
+ }, []);
86
+ useEffect(() => {
87
+ if (!frontRef.current || !backRef.current)
88
+ return;
89
+ if (timerRef.current) {
90
+ clearTimeout(timerRef.current);
91
+ }
92
+ frontRef.current.style.display = "";
93
+ backRef.current.style.display = "";
94
+ timerRef.current = setTimeout(() => {
95
+ if (frontRef.current && backRef.current) {
96
+ if (flipped) {
97
+ frontRef.current.style.display = "none";
98
+ } else {
99
+ backRef.current.style.display = "none";
100
+ }
101
+ }
102
+ }, animationDuration);
103
+ }, [flipped, animationDuration]);
104
+ useEffect(() => {
105
+ return () => {
106
+ if (timerRef.current) {
107
+ clearTimeout(timerRef.current);
108
+ }
109
+ };
110
+ }, []);
111
+ return /* @__PURE__ */ jsx(FlipContext.Provider, { value: { flipped, setFlipped, frontId, backId, frontRef, backRef }, children: /* @__PURE__ */ jsx(
112
+ "div",
113
+ {
114
+ ...props,
115
+ ref: composedRef,
116
+ className: classes,
117
+ role: "region",
118
+ "aria-label": ariaLabel || "Flip card",
119
+ "aria-roledescription": "flip card",
120
+ "aria-live": "polite",
121
+ children
122
+ }
123
+ ) });
124
+ }
125
+ );
126
+ Root.displayName = "Root";
127
+ export {
128
+ FlipContext,
129
+ Root,
130
+ rootClassName,
131
+ styles as s
132
+ };
@@ -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 components_flipCard_flipCardRoot = require("./flip-card-root.cjs");
6
+ const components_button_button = require("../button/button.cjs");
7
+ const utils_composeEventHandlers = require("../../utils/composeEventHandlers.cjs");
8
+ const Trigger = React.forwardRef(
9
+ ({ children, variant, "aria-label": ariaLabel, ...props }, forwardRef) => {
10
+ const { flipped, setFlipped, frontId, backId } = React.useContext(components_flipCard_flipCardRoot.FlipContext);
11
+ const handleClick = () => {
12
+ setFlipped(!flipped);
13
+ };
14
+ const isBackButton = variant === "back";
15
+ const controls = isBackButton ? frontId : backId;
16
+ const expanded = isBackButton ? !flipped : flipped;
17
+ const defaultAriaLabel = isBackButton ? "Snu til forsiden" : "Snu til baksiden";
18
+ return /* @__PURE__ */ jsxRuntime.jsx(
19
+ components_button_button.Button,
20
+ {
21
+ size: variant === "back" ? "sm" : void 0,
22
+ fullWidth: variant === "back",
23
+ ...props,
24
+ variant: variant === "back" ? "text" : variant,
25
+ ref: forwardRef,
26
+ onClick: utils_composeEventHandlers.composeEventHandlers(handleClick, props.onClick),
27
+ "aria-controls": controls,
28
+ "aria-expanded": expanded,
29
+ "aria-label": ariaLabel || defaultAriaLabel,
30
+ children
31
+ }
32
+ );
33
+ }
34
+ );
35
+ Trigger.displayName = "Trigger";
36
+ exports.Trigger = Trigger;
@@ -0,0 +1,63 @@
1
+ import { default as React } from 'react';
2
+ import { Button, ButtonProps } from '../button';
3
+
4
+ export type TriggerProps = Omit<React.ComponentPropsWithoutRef<typeof Button>, 'variant' | 'iconOnly'> & {
5
+ /**
6
+ * The visual style of the trigger button.
7
+ *
8
+ * When set to 'back', applies a specialized style for trigger buttons
9
+ * on the back side of the card - using text variant and smaller size.
10
+ *
11
+ * Otherwise, accepts any standard Button variant.
12
+ *
13
+ * @default undefined - Uses the default Button variant
14
+ */
15
+ variant?: ButtonProps['variant'] | 'back';
16
+ /**
17
+ * The content of the trigger button.
18
+ * Typically text that indicates the action (e.g., "Flip", "See details", "Back").
19
+ */
20
+ children?: React.ReactNode;
21
+ };
22
+ export declare const Trigger: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/radius').RadiusProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
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
+ borderStyle?: ("default" | "dashed") | undefined;
31
+ } & {
32
+ iconOnly: true;
33
+ "aria-label": string;
34
+ } & React.RefAttributes<HTMLButtonElement>, "ref"> | Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/radius').RadiusProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
35
+ display?: import('../../utils/generate-styling').DisplayChildren | undefined;
36
+ } & {
37
+ asChild?: boolean | undefined;
38
+ loading?: boolean | undefined;
39
+ fullWidth?: boolean | undefined;
40
+ size?: "sm" | "md" | "lg" | undefined;
41
+ variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
42
+ borderStyle?: ("default" | "dashed") | undefined;
43
+ } & {
44
+ iconOnly?: false | undefined;
45
+ "aria-label"?: string | undefined;
46
+ } & React.RefAttributes<HTMLButtonElement>, "ref">, "variant" | "iconOnly"> & {
47
+ /**
48
+ * The visual style of the trigger button.
49
+ *
50
+ * When set to 'back', applies a specialized style for trigger buttons
51
+ * on the back side of the card - using text variant and smaller size.
52
+ *
53
+ * Otherwise, accepts any standard Button variant.
54
+ *
55
+ * @default undefined - Uses the default Button variant
56
+ */
57
+ variant?: ButtonProps['variant'] | 'back';
58
+ /**
59
+ * The content of the trigger button.
60
+ * Typically text that indicates the action (e.g., "Flip", "See details", "Back").
61
+ */
62
+ children?: React.ReactNode;
63
+ } & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,36 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default, { useContext } from "react";
3
+ import { FlipContext } from "./flip-card-root.js";
4
+ import { Button } from "../button/button.js";
5
+ import { composeEventHandlers } from "../../utils/composeEventHandlers.js";
6
+ const Trigger = React__default.forwardRef(
7
+ ({ children, variant, "aria-label": ariaLabel, ...props }, forwardRef) => {
8
+ const { flipped, setFlipped, frontId, backId } = useContext(FlipContext);
9
+ const handleClick = () => {
10
+ setFlipped(!flipped);
11
+ };
12
+ const isBackButton = variant === "back";
13
+ const controls = isBackButton ? frontId : backId;
14
+ const expanded = isBackButton ? !flipped : flipped;
15
+ const defaultAriaLabel = isBackButton ? "Snu til forsiden" : "Snu til baksiden";
16
+ return /* @__PURE__ */ jsx(
17
+ Button,
18
+ {
19
+ size: variant === "back" ? "sm" : void 0,
20
+ fullWidth: variant === "back",
21
+ ...props,
22
+ variant: variant === "back" ? "text" : variant,
23
+ ref: forwardRef,
24
+ onClick: composeEventHandlers(handleClick, props.onClick),
25
+ "aria-controls": controls,
26
+ "aria-expanded": expanded,
27
+ "aria-label": ariaLabel || defaultAriaLabel,
28
+ children
29
+ }
30
+ );
31
+ }
32
+ );
33
+ Trigger.displayName = "Trigger";
34
+ export {
35
+ Trigger
36
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const components_flipCard_flipCardRoot = require("./flip-card-root.cjs");
4
+ const components_flipCard_flipCardBack = require("./flip-card-back.cjs");
5
+ const components_flipCard_flipCardFront = require("./flip-card-front.cjs");
6
+ const components_flipCard_flipCardTrigger = require("./flip-card-trigger.cjs");
7
+ const components_flipCard_flipCardFooter = require("./flip-card-footer.cjs");
8
+ const FlipCard = components_flipCard_flipCardRoot.Root;
9
+ FlipCard.displayName = "FlipCard";
10
+ FlipCard.Back = components_flipCard_flipCardBack.Back;
11
+ FlipCard.Back.displayName = "FlipCard.Back";
12
+ FlipCard.Front = components_flipCard_flipCardFront.Front;
13
+ FlipCard.Front.displayName = "FlipCard.Front";
14
+ FlipCard.Trigger = components_flipCard_flipCardTrigger.Trigger;
15
+ FlipCard.Trigger.displayName = "FlipCard.Trigger";
16
+ FlipCard.Footer = components_flipCard_flipCardFooter.Footer;
17
+ FlipCard.Footer.displayName = "FlipCard.Footer";
18
+ exports.FlipCard = FlipCard;
@@ -0,0 +1,154 @@
1
+ import { RootProps } from './flip-card-root';
2
+ import { Back, BackProps } from './flip-card-back';
3
+ import { Front, FrontProps } from './flip-card-front';
4
+ import { Trigger, TriggerProps } from './flip-card-trigger';
5
+ import { Footer, FooterProps } from './flip-card-footer';
6
+
7
+ export type FlipCardProps = {
8
+ Root: RootProps;
9
+ Back: BackProps;
10
+ Front: FrontProps;
11
+ Trigger: TriggerProps;
12
+ Footer: FooterProps;
13
+ };
14
+ /**
15
+ * FlipCard enhances the standard Card component with flip animation capabilities.
16
+ *
17
+ * Use FlipCard as a drop-in replacement for Card when you need the flip functionality,
18
+ * while continuing to use regular Card subcomponents within the Front and Back components.
19
+ * Both Front and Back components are regular Card root elements with the flip behavior added.
20
+ *
21
+ * @component
22
+ *
23
+ * @example Basic usage with Card subcomponents
24
+ * ```tsx
25
+ * <FlipCard>
26
+ * <FlipCard.Front>
27
+ * <Card.Heading>Card Front</Card.Heading>
28
+ * <Card.Description>Click to see details</Card.Description>
29
+ * <Card.Content>
30
+ * <FlipCard.Trigger>Learn More</FlipCard.Trigger>
31
+ * </Card.Content>
32
+ * </FlipCard.Front>
33
+ * <FlipCard.Back>
34
+ * <Card.Heading>Card Back</Card.Heading>
35
+ * <Card.Description>Here are the details</Card.Description>
36
+ * <Card.Content>Additional content goes here</Card.Content>
37
+ * <FlipCard.Footer>
38
+ * <FlipCard.Trigger variant="back">Back</FlipCard.Trigger>
39
+ * </FlipCard.Footer>
40
+ * </FlipCard.Back>
41
+ * </FlipCard>
42
+ * ```
43
+ *
44
+ * @example With controlled state
45
+ * ```tsx
46
+ * const [flipped, setFlipped] = useState(false);
47
+ *
48
+ * <FlipCard
49
+ * flipped={flipped}
50
+ * onFlippedChange={setFlipped}
51
+ * >
52
+ * <FlipCard.Front>
53
+ * <Card.Heading>Card Front</Card.Heading>
54
+ * </FlipCard.Front>
55
+ * <FlipCard.Back>
56
+ * <Card.Heading>Card Back</Card.Heading>
57
+ * </FlipCard.Back>
58
+ * </FlipCard>
59
+ * ```
60
+ */
61
+ declare const FlipCard: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
62
+ defaultFlipped?: boolean | undefined;
63
+ onFlippedChange?: ((flipped: boolean) => void) | undefined;
64
+ flipped?: boolean | undefined;
65
+ 'aria-label'?: string | undefined;
66
+ } & import('react').RefAttributes<HTMLDivElement>> & {
67
+ /**
68
+ * Container for content displayed on the back of the card.
69
+ * This content is shown when the card is flipped.
70
+ *
71
+ * This is a regular Card component, so you can use all Card subcomponents inside it:
72
+ * Card.Heading, Card.Description, Card.Content, etc.
73
+ *
74
+ * Includes accessibility features:
75
+ * - Proper ARIA attributes (aria-hidden when not visible)
76
+ * - Automatic focus management
77
+ * - Scroll capabilities for handling overflow content
78
+ *
79
+ * @component
80
+ *
81
+ * @example
82
+ * ```tsx
83
+ * <FlipCard.Back aria-label="Additional product details">
84
+ * <Card.Heading>Details</Card.Heading>
85
+ * <Card.Description>Additional information</Card.Description>
86
+ * <Card.Content>Main content here</Card.Content>
87
+ * </FlipCard.Back>
88
+ * ```
89
+ */
90
+ Back: typeof Back;
91
+ /**
92
+ * Container for content displayed on the front of the card.
93
+ * This content is shown by default when the card is not flipped.
94
+ *
95
+ * This is a regular Card component, so you can use all Card subcomponents inside it:
96
+ * Card.Heading, Card.Description, Card.Content, etc.
97
+ *
98
+ * The Front component determines the overall dimensions of the FlipCard.
99
+ *
100
+ * Includes accessibility features:
101
+ * - Proper ARIA attributes (aria-hidden when not visible)
102
+ * - Automatic focus management
103
+ *
104
+ * @component
105
+ *
106
+ * @example
107
+ * ```tsx
108
+ * <FlipCard.Front aria-label="Product overview">
109
+ * <Card.Heading>Product Name</Card.Heading>
110
+ * <Card.Illustration>
111
+ * <img src="/product.jpg" alt="Product" />
112
+ * </Card.Illustration>
113
+ * <Card.Content>Preview content</Card.Content>
114
+ * </FlipCard.Front>
115
+ * ```
116
+ */
117
+ Front: typeof Front;
118
+ /**
119
+ * Button to toggle the card between front and back states.
120
+ * Can be placed anywhere within Front or Back components.
121
+ *
122
+ * @component
123
+ *
124
+ * @example
125
+ * ```tsx
126
+ * <Card.Content>
127
+ * <FlipCard.Trigger>See Details</FlipCard.Trigger>
128
+ * </Card.Content>
129
+ * ```
130
+ *
131
+ * @example Back button
132
+ * ```tsx
133
+ * <FlipCard.Trigger variant="back" aria-label="Return to product overview">
134
+ * Back to Front
135
+ * </FlipCard.Trigger>
136
+ * ```
137
+ */
138
+ Trigger: typeof Trigger;
139
+ /**
140
+ * Container for positioning content (typically a trigger button) at the bottom
141
+ * of either the front or back card side.
142
+ *
143
+ * @component
144
+ *
145
+ * @example
146
+ * ```tsx
147
+ * <FlipCard.Footer>
148
+ * <FlipCard.Trigger variant="back">Back</FlipCard.Trigger>
149
+ * </FlipCard.Footer>
150
+ * ```
151
+ */
152
+ Footer: typeof Footer;
153
+ };
154
+ export { FlipCard };
@@ -0,0 +1,18 @@
1
+ import { Root } from "./flip-card-root.js";
2
+ import { Back } from "./flip-card-back.js";
3
+ import { Front } from "./flip-card-front.js";
4
+ import { Trigger } from "./flip-card-trigger.js";
5
+ import { Footer } from "./flip-card-footer.js";
6
+ const FlipCard = Root;
7
+ FlipCard.displayName = "FlipCard";
8
+ FlipCard.Back = Back;
9
+ FlipCard.Back.displayName = "FlipCard.Back";
10
+ FlipCard.Front = Front;
11
+ FlipCard.Front.displayName = "FlipCard.Front";
12
+ FlipCard.Trigger = Trigger;
13
+ FlipCard.Trigger.displayName = "FlipCard.Trigger";
14
+ FlipCard.Footer = Footer;
15
+ FlipCard.Footer.displayName = "FlipCard.Footer";
16
+ export {
17
+ FlipCard
18
+ };
@@ -1 +1 @@
1
- export declare const isIconName: (value: string | null) => value is "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "x" | "key" | "download" | "split" | "alert" | "radio" | "copy" | "add" | "reverse" | "infinite" | "visible" | "help" | "zoom-out" | "zoom" | "email" | "close" | "error" | "focus" | "play" | "sync" | "present" | "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "dislike" | "edit" | "heart-filled" | "heart" | "invisible" | "like" | "lock-open" | "lock" | "login" | "logout" | "maximize" | "minimize" | "mute" | "password-invisible" | "password-visible" | "play-filled" | "remove-filled" | "remove" | "save" | "send" | "settings" | "share" | "shortcut" | "shuffle" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "tv-next" | "tv-pause" | "tv-previous" | "tv-stop" | "upload" | "volume" | "connected-building" | "home" | "hospital" | "industry" | "premises-datacenter" | "premises-large" | "premises-medium" | "premises-small" | "premises" | "store" | "address-book" | "b2b-customer" | "care" | "chat-robot" | "chat" | "child-1" | "child-2" | "conversation" | "customer-dialogue" | "dsl-hub" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-sad" | "sms" | "support" | "user-admin" | "vcard" | "voicemail" | "battery" | "bluetooth" | "broadband" | "broken-phone" | "cast" | "cloud-connect" | "connected" | "core-router" | "daas-device" | "data-transfer" | "desktop" | "devices" | "esim-simcard" | "esim" | "face-id" | "fiber" | "fingerprint" | "fiveg" | "fourg" | "home-installation" | "industrial-iot" | "internet" | "it-service" | "laptop" | "mobile-broadband" | "network" | "phone-recycling" | "phone-ringing" | "phone" | "rack" | "refill-card" | "remote-control" | "repair" | "roaming" | "router" | "secure-device" | "sense-car" | "server" | "service-device" | "service-supervision" | "slow-wifi" | "smart-wifi" | "smartphone" | "smartwatch" | "tablet" | "trade-phone" | "tv" | "usb" | "voice-switch" | "wallplug" | "wireless-off" | "wireless-weak" | "wireless" | "world-alert" | "world-off" | "world-question" | "bar-chart" | "doc" | "document-doc" | "document-edit" | "document-pdf" | "document-ppt" | "excel" | "folder-copy" | "folder-new" | "folder" | "gif" | "graph" | "media-content" | "org-chart" | "pie-chart" | "print" | "register" | "report" | "simcard" | "spell-check" | "credit-card" | "euro" | "invoice" | "kontantkort" | "kr" | "late-payment" | "money-back-euro" | "money-back-kr" | "money-euro" | "money-kr" | "pay-monthly-euro" | "pay-monthly-kr" | "pay-once-euro" | "pay-once-kr" | "payment-success" | "savings" | "wallet" | "airplay" | "camera" | "entertainment" | "external" | "film" | "games" | "megaphone" | "microphone" | "music" | "player-settings" | "record" | "stream" | "trailer" | "video-conference" | "activity-level" | "ai-robot" | "bag" | "basketball" | "blood-pressure" | "bulb" | "business-continuity" | "business-intelligence" | "calendar" | "cart" | "close-circle" | "cloud" | "coffee" | "compass" | "construction" | "cookie" | "delivery" | "drone" | "education" | "efficiency" | "environment" | "facemask" | "flag" | "food" | "fraud" | "getting-started" | "home-care" | "job-search" | "layers" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "press-button" | "price" | "pulse" | "recycle" | "reservation" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "smart-connect" | "snowflake" | "speedometer" | "spyware" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "youtube" | "alert-filled" | "check-circle-filled" | "check-circle" | "error-filled" | "info-filled" | "info" | "question-filled" | "question" | "warning" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-subdirectory" | "arrow-up" | "card-view" | "checkmark-bold" | "checkmark" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "grid-view" | "list-view" | "minus-bold" | "minus" | "more-horizontal" | "more-vertical" | "plus" | "services" | "sorter" | "table-view";
1
+ export declare const isIconName: (value: string | null) => value is "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "key" | "x" | "download" | "split" | "alert" | "radio" | "email" | "copy" | "add" | "reverse" | "infinite" | "visible" | "help" | "zoom-out" | "zoom" | "close" | "error" | "focus" | "play" | "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "dislike" | "edit" | "heart-filled" | "heart" | "invisible" | "like" | "lock-open" | "lock" | "login" | "logout" | "maximize" | "minimize" | "mute" | "password-invisible" | "password-visible" | "play-filled" | "remove-filled" | "remove" | "save" | "send" | "settings" | "share" | "shortcut" | "shuffle" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "sync" | "tv-next" | "tv-pause" | "tv-previous" | "tv-stop" | "upload" | "volume" | "connected-building" | "home" | "hospital" | "industry" | "premises-datacenter" | "premises-large" | "premises-medium" | "premises-small" | "premises" | "store" | "address-book" | "b2b-customer" | "care" | "chat-robot" | "chat" | "child-1" | "child-2" | "conversation" | "customer-dialogue" | "dsl-hub" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-sad" | "sms" | "support" | "user-admin" | "vcard" | "voicemail" | "battery" | "bluetooth" | "broadband" | "broken-phone" | "cast" | "cloud-connect" | "connected" | "core-router" | "daas-device" | "data-transfer" | "desktop" | "devices" | "esim-simcard" | "esim" | "face-id" | "fiber" | "fingerprint" | "fiveg" | "fourg" | "home-installation" | "industrial-iot" | "internet" | "it-service" | "laptop" | "mobile-broadband" | "network" | "phone-recycling" | "phone-ringing" | "phone" | "rack" | "refill-card" | "remote-control" | "repair" | "roaming" | "router" | "secure-device" | "sense-car" | "server" | "service-device" | "service-supervision" | "slow-wifi" | "smart-wifi" | "smartphone" | "smartwatch" | "tablet" | "trade-phone" | "tv" | "usb" | "voice-switch" | "wallplug" | "wireless-off" | "wireless-weak" | "wireless" | "world-alert" | "world-off" | "world-question" | "bar-chart" | "doc" | "document-doc" | "document-edit" | "document-pdf" | "document-ppt" | "excel" | "folder-copy" | "folder-new" | "folder" | "gif" | "graph" | "media-content" | "org-chart" | "pie-chart" | "print" | "register" | "report" | "simcard" | "spell-check" | "credit-card" | "euro" | "invoice" | "kontantkort" | "kr" | "late-payment" | "money-back-euro" | "money-back-kr" | "money-euro" | "money-kr" | "pay-monthly-euro" | "pay-monthly-kr" | "pay-once-euro" | "pay-once-kr" | "payment-success" | "savings" | "wallet" | "airplay" | "camera" | "entertainment" | "external" | "film" | "games" | "megaphone" | "microphone" | "music" | "player-settings" | "record" | "stream" | "trailer" | "video-conference" | "activity-level" | "ai-robot" | "bag" | "basketball" | "blood-pressure" | "bulb" | "business-continuity" | "business-intelligence" | "calendar" | "cart" | "close-circle" | "cloud" | "coffee" | "compass" | "construction" | "cookie" | "delivery" | "drone" | "education" | "efficiency" | "environment" | "facemask" | "flag" | "food" | "fraud" | "getting-started" | "home-care" | "job-search" | "layers" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "present" | "press-button" | "price" | "pulse" | "recycle" | "reservation" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "smart-connect" | "snowflake" | "speedometer" | "spyware" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "youtube" | "alert-filled" | "check-circle-filled" | "check-circle" | "error-filled" | "info-filled" | "info" | "question-filled" | "question" | "warning" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-subdirectory" | "arrow-up" | "card-view" | "checkmark-bold" | "checkmark" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "grid-view" | "list-view" | "minus-bold" | "minus" | "more-horizontal" | "more-vertical" | "plus" | "services" | "sorter" | "table-view";
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const components_flipCard_index = require("./flip-card/index.cjs");
3
4
  const components_channelButton_index = require("./channel-button/index.cjs");
4
5
  const components_collapsible_index = require("./collapsible/index.cjs");
5
6
  const components_meterBar_index = require("./meter-bar/index.cjs");
@@ -55,6 +56,7 @@ const components_carousel_carouselRoot = require("./carousel/carousel-root.cjs")
55
56
  const components_slider_slider = require("./slider/slider.cjs");
56
57
  const sonner = require("sonner");
57
58
  const components_input_inputGroup = require("./input/input-group.cjs");
59
+ exports.FlipCard = components_flipCard_index.FlipCard;
58
60
  exports.ChannelButton = components_channelButton_index.ChannelButton;
59
61
  exports.Collapsible = components_collapsible_index.Collapsible;
60
62
  exports.MeterBar = components_meterBar_index.MeterBar;
@@ -1,3 +1,4 @@
1
+ export * from './flip-card';
1
2
  export * from './channel-button';
2
3
  export * from './collapsible';
3
4
  export * from './meter-bar';
@@ -1,3 +1,4 @@
1
+ import { FlipCard } from "./flip-card/index.js";
1
2
  import { ChannelButton } from "./channel-button/index.js";
2
3
  import { Collapsible } from "./collapsible/index.js";
3
4
  import { MeterBar } from "./meter-bar/index.js";
@@ -76,6 +77,7 @@ export {
76
77
  ExpandableCard,
77
78
  FieldErrorText,
78
79
  Flex,
80
+ FlipCard,
79
81
  G as GlobalNavigation,
80
82
  Grid,
81
83
  Heading,
@@ -3,6 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("react/jsx-runtime");
4
4
  require("react");
5
5
  require("@radix-ui/react-dialog");
6
+ require("../flip-card/index.cjs");
6
7
  require("../channel-button/index.cjs");
7
8
  require("../collapsible/index.cjs");
8
9
  require("../meter-bar/index.cjs");
@@ -1,6 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "@radix-ui/react-dialog";
4
+ import "../flip-card/index.js";
4
5
  import "../channel-button/index.js";
5
6
  import "../collapsible/index.js";
6
7
  import "../meter-bar/index.js";
@@ -12,6 +12,7 @@ require("@radix-ui/react-slot");
12
12
  require("@radix-ui/react-use-controllable-state");
13
13
  require("../../utils/generate-styling/index.cjs");
14
14
  require("../../tokens/motion/variables.cjs");
15
+ require("../flip-card/index.cjs");
15
16
  require("../channel-button/index.cjs");
16
17
  require("../collapsible/index.cjs");
17
18
  require("../meter-bar/index.cjs");
@@ -10,6 +10,7 @@ import "@radix-ui/react-slot";
10
10
  import "@radix-ui/react-use-controllable-state";
11
11
  import "../../utils/generate-styling/index.js";
12
12
  import "../../tokens/motion/variables.js";
13
+ import "../flip-card/index.js";
13
14
  import "../channel-button/index.js";
14
15
  import "../collapsible/index.js";
15
16
  import "../meter-bar/index.js";