@zentauri-ui/zentauri-components 1.5.21 → 1.5.31

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 (98) hide show
  1. package/README.md +59 -2
  2. package/cli/registry.json +2 -0
  3. package/dist/charts/area.js +1 -1
  4. package/dist/charts/area.js.map +1 -1
  5. package/dist/charts/area.mjs +1 -1
  6. package/dist/charts/area.mjs.map +1 -1
  7. package/dist/charts/bar/Bar.d.ts.map +1 -1
  8. package/dist/charts/bar.js +2 -1
  9. package/dist/charts/bar.js.map +1 -1
  10. package/dist/charts/bar.mjs +2 -1
  11. package/dist/charts/bar.mjs.map +1 -1
  12. package/dist/charts/pie/Pie.d.ts +1 -1
  13. package/dist/charts/pie/Pie.d.ts.map +1 -1
  14. package/dist/charts/pie.js +10 -7
  15. package/dist/charts/pie.js.map +1 -1
  16. package/dist/charts/pie.mjs +10 -7
  17. package/dist/charts/pie.mjs.map +1 -1
  18. package/dist/charts/shared/types.d.ts +10 -6
  19. package/dist/charts/shared/types.d.ts.map +1 -1
  20. package/dist/chunk-7OHC4ERB.mjs +60 -0
  21. package/dist/chunk-7OHC4ERB.mjs.map +1 -0
  22. package/dist/{chunk-2VQJ6OIL.js → chunk-HPN7H5ZM.js} +2 -2
  23. package/dist/{chunk-2VQJ6OIL.js.map → chunk-HPN7H5ZM.js.map} +1 -1
  24. package/dist/chunk-JJDANNNL.mjs +71 -0
  25. package/dist/chunk-JJDANNNL.mjs.map +1 -0
  26. package/dist/chunk-KXUG4WVW.js +62 -0
  27. package/dist/chunk-KXUG4WVW.js.map +1 -0
  28. package/dist/chunk-MEJMX4QI.js +73 -0
  29. package/dist/chunk-MEJMX4QI.js.map +1 -0
  30. package/dist/chunk-N6B35KWW.mjs +3 -0
  31. package/dist/chunk-N6B35KWW.mjs.map +1 -0
  32. package/dist/{chunk-73VCO5TE.mjs → chunk-NWOE2TZN.mjs} +2 -2
  33. package/dist/{chunk-73VCO5TE.mjs.map → chunk-NWOE2TZN.mjs.map} +1 -1
  34. package/dist/chunk-RGOMHX4G.js +4 -0
  35. package/dist/chunk-RGOMHX4G.js.map +1 -0
  36. package/dist/hooks/useControllableState.js +3 -2
  37. package/dist/hooks/useControllableState.mjs +2 -1
  38. package/dist/hooks/useDisclosure.js +3 -2
  39. package/dist/hooks/useDisclosure.js.map +1 -1
  40. package/dist/hooks/useDisclosure.mjs +2 -1
  41. package/dist/hooks/useDisclosure.mjs.map +1 -1
  42. package/dist/hooks/useDynamicStepper/index.d.ts +2 -0
  43. package/dist/hooks/useDynamicStepper/index.d.ts.map +1 -0
  44. package/dist/hooks/useDynamicStepper/useDynamicStepper.d.ts +9 -0
  45. package/dist/hooks/useDynamicStepper/useDynamicStepper.d.ts.map +1 -0
  46. package/dist/hooks/useDynamicStepper.js +14 -0
  47. package/dist/hooks/useDynamicStepper.js.map +1 -0
  48. package/dist/hooks/useDynamicStepper.mjs +5 -0
  49. package/dist/hooks/useDynamicStepper.mjs.map +1 -0
  50. package/dist/ui/buttons.js +7 -55
  51. package/dist/ui/buttons.js.map +1 -1
  52. package/dist/ui/buttons.mjs +2 -58
  53. package/dist/ui/buttons.mjs.map +1 -1
  54. package/dist/ui/dynamic-stepper/dynamic-stepper.d.ts +6 -0
  55. package/dist/ui/dynamic-stepper/dynamic-stepper.d.ts.map +1 -0
  56. package/dist/ui/dynamic-stepper/index.d.ts +5 -0
  57. package/dist/ui/dynamic-stepper/index.d.ts.map +1 -0
  58. package/dist/ui/dynamic-stepper/types.d.ts +61 -0
  59. package/dist/ui/dynamic-stepper/types.d.ts.map +1 -0
  60. package/dist/ui/dynamic-stepper/variants.d.ts +21 -0
  61. package/dist/ui/dynamic-stepper/variants.d.ts.map +1 -0
  62. package/dist/ui/dynamic-stepper.js +312 -0
  63. package/dist/ui/dynamic-stepper.js.map +1 -0
  64. package/dist/ui/dynamic-stepper.mjs +305 -0
  65. package/dist/ui/dynamic-stepper.mjs.map +1 -0
  66. package/dist/ui/pagination/pagination.d.ts +5 -16
  67. package/dist/ui/pagination/pagination.d.ts.map +1 -1
  68. package/dist/ui/pagination/types.d.ts +2 -2
  69. package/dist/ui/pagination/types.d.ts.map +1 -1
  70. package/dist/ui/pagination.js +171 -180
  71. package/dist/ui/pagination.js.map +1 -1
  72. package/dist/ui/pagination.mjs +172 -181
  73. package/dist/ui/pagination.mjs.map +1 -1
  74. package/dist/ui/typography/blockquote-base.d.ts.map +1 -1
  75. package/dist/ui/typography/code-block-base.d.ts.map +1 -1
  76. package/dist/ui/typography/heading-base.d.ts.map +1 -1
  77. package/dist/ui/typography/inline-code-base.d.ts.map +1 -1
  78. package/dist/ui/typography.js.map +1 -1
  79. package/dist/ui/typography.mjs.map +1 -1
  80. package/package.json +1 -1
  81. package/src/charts/area/Area.tsx +1 -1
  82. package/src/charts/bar/Bar.tsx +1 -0
  83. package/src/charts/pie/Pie.tsx +9 -7
  84. package/src/charts/shared/types.ts +10 -6
  85. package/src/hooks/useDynamicStepper/index.ts +3 -0
  86. package/src/hooks/useDynamicStepper/useDynamicStepper.test.ts +107 -0
  87. package/src/hooks/useDynamicStepper/useDynamicStepper.ts +91 -0
  88. package/src/ui/dynamic-stepper/dynamic-stepper.test.tsx +109 -0
  89. package/src/ui/dynamic-stepper/dynamic-stepper.tsx +173 -0
  90. package/src/ui/dynamic-stepper/index.ts +24 -0
  91. package/src/ui/dynamic-stepper/types.ts +85 -0
  92. package/src/ui/dynamic-stepper/variants.ts +238 -0
  93. package/src/ui/pagination/pagination.tsx +186 -197
  94. package/src/ui/pagination/types.ts +2 -2
  95. package/src/ui/typography/blockquote-base.tsx +0 -2
  96. package/src/ui/typography/code-block-base.tsx +0 -2
  97. package/src/ui/typography/heading-base.tsx +0 -2
  98. package/src/ui/typography/inline-code-base.tsx +0 -2
@@ -0,0 +1,173 @@
1
+ "use client";
2
+
3
+ import { useId } from "react";
4
+
5
+ import { useDynamicStepper } from "../../hooks/useDynamicStepper/useDynamicStepper";
6
+ import { cn } from "../../lib/utils";
7
+ import { Button } from "../buttons/button";
8
+
9
+ import type { DynamicStepperProps } from "./types";
10
+ import {
11
+ dynamicStepperIndicatorToneClass,
12
+ dynamicStepperIndicatorVariants,
13
+ dynamicStepperItemVariants,
14
+ dynamicStepperMapperVariants,
15
+ dynamicStepperRootVariants,
16
+ } from "./variants";
17
+
18
+ export const DynamicStepper = ({
19
+ steps,
20
+ orientation = "horizontal",
21
+ buttonAppearance = "outline",
22
+ buttonSize = "md",
23
+ indicatorSize = "md",
24
+ indicatorCompleteAppearance = "emerald",
25
+ indicatorCurrentAppearance = "violet",
26
+ indicatorUpcomingAppearance = "outline",
27
+ activeStep: activeStepProp,
28
+ defaultActiveStep,
29
+ onActiveStepChange,
30
+ onPrevious,
31
+ onNext,
32
+ prevLabel = "Previous",
33
+ nextLabel = "Next",
34
+ className,
35
+ ref,
36
+ ...rest
37
+ }: DynamicStepperProps) => {
38
+ const baseId = useId();
39
+ const previousId = `${baseId}-previous`;
40
+ const nextId = `${baseId}-next`;
41
+ const mapperId = `${baseId}-mapper`;
42
+
43
+ const { activeStep, goPrevious, goNext, canGoPrevious, canGoNext } =
44
+ useDynamicStepper({
45
+ stepCount: steps.length,
46
+ activeStep: activeStepProp,
47
+ defaultActiveStep,
48
+ onActiveStepChange,
49
+ onPrevious,
50
+ onNext,
51
+ });
52
+
53
+ if (steps.length === 0) {
54
+ return null;
55
+ }
56
+
57
+ const itemOrientation =
58
+ orientation === "vertical" ? "vertical" : "horizontal";
59
+
60
+ return (
61
+ <div
62
+ ref={ref}
63
+ role="navigation"
64
+ data-slot="dynamic-stepper"
65
+ className={cn(dynamicStepperRootVariants({ orientation }), className)}
66
+ {...rest}
67
+ >
68
+ <Button
69
+ id={previousId}
70
+ data-slot="dynamic-stepper-previous"
71
+ type="button"
72
+ appearance={buttonAppearance}
73
+ size={buttonSize}
74
+ disabled={!canGoPrevious}
75
+ onClick={goPrevious}
76
+ className={
77
+ orientation === "vertical" ? "shrink-0 self-start" : "shrink-0"
78
+ }
79
+ >
80
+ {prevLabel}
81
+ </Button>
82
+
83
+ <ol
84
+ id={mapperId}
85
+ aria-label="Steps"
86
+ data-slot="dynamic-stepper-mapper"
87
+ className={dynamicStepperMapperVariants({ orientation })}
88
+ >
89
+ {steps.map((step, index) => {
90
+ const key = step.id ?? `dynamic-stepper-step-${index}`;
91
+ const isCurrent = index === activeStep;
92
+ const semanticState =
93
+ index < activeStep
94
+ ? "complete"
95
+ : isCurrent
96
+ ? "current"
97
+ : "upcoming";
98
+ const indicatorTone =
99
+ semanticState === "complete"
100
+ ? indicatorCompleteAppearance
101
+ : semanticState === "current"
102
+ ? indicatorCurrentAppearance
103
+ : indicatorUpcomingAppearance;
104
+
105
+ const isVertical = orientation === "vertical";
106
+
107
+ return (
108
+ <li
109
+ key={key}
110
+ data-slot="dynamic-stepper-item"
111
+ aria-current={isCurrent ? "step" : undefined}
112
+ className={dynamicStepperItemVariants({
113
+ orientation: itemOrientation,
114
+ })}
115
+ >
116
+ <div
117
+ data-slot="dynamic-stepper-indicator"
118
+ className={cn(
119
+ dynamicStepperIndicatorVariants({ size: indicatorSize }),
120
+ dynamicStepperIndicatorToneClass(
121
+ semanticState,
122
+ indicatorTone,
123
+ ),
124
+ )}
125
+ >
126
+ {step.indicator ?? index + 1}
127
+ </div>
128
+ <div
129
+ className={cn(
130
+ "min-w-0",
131
+ !isVertical && "flex flex-col items-center",
132
+ )}
133
+ >
134
+ {step.title != null && (
135
+ <div
136
+ className={cn(
137
+ "text-sm font-semibold text-white",
138
+ !isVertical && "mt-3",
139
+ )}
140
+ >
141
+ {step.title}
142
+ </div>
143
+ )}
144
+ {step.description != null && (
145
+ <p className="mt-1 text-xs text-slate-400">
146
+ {step.description}
147
+ </p>
148
+ )}
149
+ </div>
150
+ </li>
151
+ );
152
+ })}
153
+ </ol>
154
+
155
+ <Button
156
+ id={nextId}
157
+ data-slot="dynamic-stepper-next"
158
+ type="button"
159
+ appearance={buttonAppearance}
160
+ size={buttonSize}
161
+ disabled={!canGoNext}
162
+ onClick={goNext}
163
+ className={
164
+ orientation === "vertical" ? "shrink-0 self-start" : "shrink-0"
165
+ }
166
+ >
167
+ {nextLabel}
168
+ </Button>
169
+ </div>
170
+ );
171
+ };
172
+
173
+ DynamicStepper.displayName = "DynamicStepper";
@@ -0,0 +1,24 @@
1
+ "use client";
2
+
3
+ export { DynamicStepper } from "./dynamic-stepper";
4
+ export type {
5
+ DynamicStepperButtonAppearance,
6
+ DynamicStepperButtonSize,
7
+ DynamicStepperIndicatorSize,
8
+ DynamicStepperIndicatorToneAppearance,
9
+ DynamicStepperOrientation,
10
+ DynamicStepperProps,
11
+ DynamicStepperStep,
12
+ UseDynamicStepperParams,
13
+ UseDynamicStepperResult,
14
+ } from "./types";
15
+ export {
16
+ dynamicStepperIndicatorToneClass,
17
+ dynamicStepperIndicatorVariants,
18
+ dynamicStepperItemVariants,
19
+ dynamicStepperMapperVariants,
20
+ dynamicStepperRootVariants,
21
+ } from "./variants";
22
+ export type {
23
+ DynamicStepperIndicatorSemanticState,
24
+ } from "./variants";
@@ -0,0 +1,85 @@
1
+ import type { VariantProps } from "class-variance-authority";
2
+ import type { ComponentPropsWithRef, ReactNode } from "react";
3
+
4
+ import type { buttonVariants } from "../buttons/variants";
5
+ import type {
6
+ DynamicStepperIndicatorToneAppearance,
7
+ dynamicStepperIndicatorVariants,
8
+ dynamicStepperRootVariants,
9
+ } from "./variants";
10
+
11
+ export type DynamicStepperOrientation = NonNullable<
12
+ VariantProps<typeof dynamicStepperRootVariants>["orientation"]
13
+ >;
14
+
15
+ export type DynamicStepperIndicatorSize = NonNullable<
16
+ VariantProps<typeof dynamicStepperIndicatorVariants>["size"]
17
+ >;
18
+
19
+ export type { DynamicStepperIndicatorToneAppearance };
20
+
21
+ export type DynamicStepperStep = {
22
+ id?: string;
23
+ title?: ReactNode;
24
+ description?: ReactNode;
25
+ indicator?: ReactNode;
26
+ };
27
+
28
+ export type DynamicStepperButtonAppearance = NonNullable<
29
+ VariantProps<typeof buttonVariants>["appearance"]
30
+ >;
31
+
32
+ export type DynamicStepperButtonSize = NonNullable<
33
+ VariantProps<typeof buttonVariants>["size"]
34
+ >;
35
+
36
+ export type UseDynamicStepperParams = {
37
+ stepCount: number;
38
+ /** Controlled active step index (0-based). */
39
+ activeStep?: number;
40
+ /** Initial step when uncontrolled. Clamped to `[0, stepCount - 1]`. */
41
+ defaultActiveStep?: number;
42
+ onActiveStepChange?: (step: number) => void;
43
+ /** Fires after a successful move from the previous button with the new index. */
44
+ onPrevious?: (nextStep: number) => void;
45
+ /** Fires after a successful move from the next button with the new index. */
46
+ onNext?: (nextStep: number) => void;
47
+ };
48
+
49
+ export type UseDynamicStepperResult = {
50
+ /** Active step index (0-based), clamped to valid range. */
51
+ activeStep: number;
52
+ setActiveStep: (next: number | ((prev: number) => number)) => void;
53
+ goPrevious: () => void;
54
+ goNext: () => void;
55
+ canGoPrevious: boolean;
56
+ canGoNext: boolean;
57
+ stepCount: number;
58
+ };
59
+
60
+ export type DynamicStepperProps = Omit<
61
+ ComponentPropsWithRef<"div">,
62
+ "children"
63
+ > & {
64
+ steps: DynamicStepperStep[];
65
+ orientation?: DynamicStepperOrientation;
66
+ /** Passed to Previous / Next `Button` components. */
67
+ buttonAppearance?: DynamicStepperButtonAppearance;
68
+ /** Passed to Previous / Next `Button` components. */
69
+ buttonSize?: DynamicStepperButtonSize;
70
+ /** Indicator + text scale inside the mapper. */
71
+ indicatorSize?: DynamicStepperIndicatorSize;
72
+ /** Tone for completed steps (non-gradient button palette). @defaultValue emerald */
73
+ indicatorCompleteAppearance?: DynamicStepperIndicatorToneAppearance;
74
+ /** Tone for the active step. @defaultValue violet */
75
+ indicatorCurrentAppearance?: DynamicStepperIndicatorToneAppearance;
76
+ /** Tone for upcoming steps. @defaultValue outline */
77
+ indicatorUpcomingAppearance?: DynamicStepperIndicatorToneAppearance;
78
+ activeStep?: number;
79
+ defaultActiveStep?: number;
80
+ onActiveStepChange?: (step: number) => void;
81
+ onPrevious?: (nextStep: number) => void;
82
+ onNext?: (nextStep: number) => void;
83
+ prevLabel?: ReactNode;
84
+ nextLabel?: ReactNode;
85
+ };
@@ -0,0 +1,238 @@
1
+ import type { VariantProps } from "class-variance-authority";
2
+ import { cva } from "class-variance-authority";
3
+
4
+ import type { buttonVariants } from "../buttons/variants";
5
+
6
+ type GradientButtonAppearance =
7
+ | "gradient-blue"
8
+ | "gradient-green"
9
+ | "gradient-red"
10
+ | "gradient-yellow"
11
+ | "gradient-purple"
12
+ | "gradient-teal"
13
+ | "gradient-indigo"
14
+ | "gradient-pink"
15
+ | "gradient-orange";
16
+
17
+ /** Button `appearance` keys usable for indicator tones (gradients excluded). */
18
+ export type DynamicStepperIndicatorToneAppearance = Exclude<
19
+ NonNullable<VariantProps<typeof buttonVariants>["appearance"]>,
20
+ GradientButtonAppearance
21
+ >;
22
+
23
+ export type DynamicStepperIndicatorSemanticState =
24
+ | "complete"
25
+ | "current"
26
+ | "upcoming";
27
+
28
+ const INDICATOR_TONE_CLASSES: Record<
29
+ DynamicStepperIndicatorToneAppearance,
30
+ Record<DynamicStepperIndicatorSemanticState, string>
31
+ > = {
32
+ default: {
33
+ complete:
34
+ "border-slate-400/55 bg-slate-500/25 text-slate-50 ring-2 ring-slate-400/25",
35
+ current:
36
+ "border-slate-300 bg-slate-500/35 text-white ring-2 ring-slate-300/45",
37
+ upcoming: "border-white/15 bg-white/5 text-slate-400",
38
+ },
39
+ secondary: {
40
+ complete:
41
+ "border-slate-600 bg-slate-800/70 text-slate-200 ring-2 ring-slate-600/35",
42
+ current:
43
+ "border-slate-500 bg-slate-700/55 text-white ring-2 ring-slate-500/45",
44
+ upcoming: "border-white/10 bg-slate-900/50 text-slate-500",
45
+ },
46
+ destructive: {
47
+ complete:
48
+ "border-rose-500/60 bg-rose-500/20 text-rose-100 ring-2 ring-rose-400/30",
49
+ current:
50
+ "border-rose-400 bg-rose-600/35 text-white ring-2 ring-rose-400/50",
51
+ upcoming: "border-white/15 bg-rose-950/25 text-slate-400",
52
+ },
53
+ outline: {
54
+ complete:
55
+ "border-emerald-500/55 bg-transparent text-emerald-200 ring-2 ring-emerald-500/25",
56
+ current:
57
+ "border-white/30 bg-white/10 text-white ring-2 ring-white/25",
58
+ upcoming: "border-white/15 bg-white/5 text-slate-400",
59
+ },
60
+ ghost: {
61
+ complete:
62
+ "border-transparent bg-emerald-500/15 text-emerald-200 ring-2 ring-emerald-400/20",
63
+ current:
64
+ "border-transparent bg-white/10 text-white ring-2 ring-white/15",
65
+ upcoming: "border-transparent bg-transparent text-slate-500",
66
+ },
67
+ link: {
68
+ complete:
69
+ "border-cyan-500/45 bg-cyan-950/35 text-cyan-200 ring-2 ring-cyan-400/25",
70
+ current:
71
+ "border-cyan-400 bg-cyan-900/45 text-cyan-50 ring-2 ring-cyan-400/45",
72
+ upcoming: "border-white/10 bg-transparent text-slate-500",
73
+ },
74
+ glass: {
75
+ complete:
76
+ "border-white/25 bg-white/10 text-emerald-100 shadow-[inset_0_1px_0_rgba(255,255,255,0.06)] backdrop-blur-md ring-2 ring-emerald-400/25",
77
+ current:
78
+ "border-white/35 bg-white/15 text-white shadow-[inset_0_1px_0_rgba(255,255,255,0.08)] backdrop-blur-md ring-2 ring-white/30",
79
+ upcoming:
80
+ "border-white/15 bg-white/5 text-slate-400 backdrop-blur-sm",
81
+ },
82
+ emerald: {
83
+ complete:
84
+ "border-emerald-500/60 bg-emerald-500/20 text-emerald-100 ring-2 ring-emerald-400/30",
85
+ current:
86
+ "border-emerald-400 bg-emerald-500/30 text-white ring-2 ring-emerald-400/50",
87
+ upcoming:
88
+ "border-white/15 bg-emerald-950/30 text-emerald-200/55",
89
+ },
90
+ indigo: {
91
+ complete:
92
+ "border-indigo-500/60 bg-indigo-500/20 text-indigo-100 ring-2 ring-indigo-400/30",
93
+ current:
94
+ "border-indigo-400 bg-indigo-500/30 text-white ring-2 ring-indigo-400/50",
95
+ upcoming:
96
+ "border-white/15 bg-indigo-950/30 text-indigo-200/55",
97
+ },
98
+ purple: {
99
+ complete:
100
+ "border-purple-500/60 bg-purple-500/20 text-purple-100 ring-2 ring-purple-400/30",
101
+ current:
102
+ "border-purple-400 bg-purple-500/30 text-white ring-2 ring-purple-400/50",
103
+ upcoming:
104
+ "border-white/15 bg-purple-950/30 text-purple-200/55",
105
+ },
106
+ pink: {
107
+ complete:
108
+ "border-pink-500/60 bg-pink-500/20 text-pink-100 ring-2 ring-pink-400/30",
109
+ current:
110
+ "border-pink-400 bg-pink-500/30 text-white ring-2 ring-pink-400/50",
111
+ upcoming:
112
+ "border-white/15 bg-pink-950/30 text-pink-200/55",
113
+ },
114
+ rose: {
115
+ complete:
116
+ "border-rose-500/60 bg-rose-500/20 text-rose-100 ring-2 ring-rose-400/30",
117
+ current:
118
+ "border-rose-400 bg-rose-500/30 text-white ring-2 ring-rose-400/50",
119
+ upcoming:
120
+ "border-white/15 bg-rose-950/30 text-rose-200/55",
121
+ },
122
+ sky: {
123
+ complete:
124
+ "border-sky-500/60 bg-sky-500/20 text-sky-100 ring-2 ring-sky-400/30",
125
+ current:
126
+ "border-sky-400 bg-sky-500/30 text-white ring-2 ring-sky-400/50",
127
+ upcoming:
128
+ "border-white/15 bg-sky-950/30 text-sky-200/55",
129
+ },
130
+ teal: {
131
+ complete:
132
+ "border-teal-500/60 bg-teal-500/20 text-teal-100 ring-2 ring-teal-400/30",
133
+ current:
134
+ "border-teal-400 bg-teal-500/30 text-white ring-2 ring-teal-400/50",
135
+ upcoming:
136
+ "border-white/15 bg-teal-950/30 text-teal-200/55",
137
+ },
138
+ yellow: {
139
+ complete:
140
+ "border-yellow-500/60 bg-yellow-500/20 text-yellow-100 ring-2 ring-yellow-400/30",
141
+ current:
142
+ "border-yellow-400 bg-yellow-600/35 text-white ring-2 ring-yellow-400/50",
143
+ upcoming:
144
+ "border-white/15 bg-yellow-950/35 text-yellow-200/55",
145
+ },
146
+ orange: {
147
+ complete:
148
+ "border-orange-500/60 bg-orange-500/20 text-orange-100 ring-2 ring-orange-400/30",
149
+ current:
150
+ "border-orange-400 bg-orange-600/35 text-white ring-2 ring-orange-400/50",
151
+ upcoming:
152
+ "border-white/15 bg-orange-950/30 text-orange-200/55",
153
+ },
154
+ gray: {
155
+ complete:
156
+ "border-gray-500/60 bg-gray-500/20 text-gray-100 ring-2 ring-gray-400/30",
157
+ current:
158
+ "border-gray-400 bg-gray-600/35 text-white ring-2 ring-gray-400/50",
159
+ upcoming:
160
+ "border-white/15 bg-gray-950/30 text-gray-300/70",
161
+ },
162
+ amber: {
163
+ complete:
164
+ "border-amber-500/60 bg-amber-500/20 text-amber-100 ring-2 ring-amber-400/30",
165
+ current:
166
+ "border-amber-400 bg-amber-600/35 text-white ring-2 ring-amber-400/50",
167
+ upcoming:
168
+ "border-white/15 bg-amber-950/35 text-amber-200/55",
169
+ },
170
+ violet: {
171
+ complete:
172
+ "border-violet-500/60 bg-violet-500/20 text-violet-100 ring-2 ring-violet-400/30",
173
+ current:
174
+ "border-violet-400 bg-violet-500/30 text-white ring-2 ring-violet-400/50",
175
+ upcoming:
176
+ "border-white/15 bg-violet-950/30 text-violet-200/55",
177
+ },
178
+ };
179
+
180
+ export function dynamicStepperIndicatorToneClass(
181
+ state: DynamicStepperIndicatorSemanticState,
182
+ tone: DynamicStepperIndicatorToneAppearance,
183
+ ): string {
184
+ return INDICATOR_TONE_CLASSES[tone][state];
185
+ }
186
+
187
+ export const dynamicStepperRootVariants = cva("flex w-full", {
188
+ variants: {
189
+ orientation: {
190
+ horizontal:
191
+ "flex-row flex-wrap items-start justify-between gap-4 md:flex-nowrap md:items-center",
192
+ vertical: "flex-col gap-6",
193
+ },
194
+ },
195
+ defaultVariants: {
196
+ orientation: "horizontal",
197
+ },
198
+ });
199
+
200
+ export const dynamicStepperMapperVariants = cva("m-0 min-w-0 flex-1 list-none p-0", {
201
+ variants: {
202
+ orientation: {
203
+ horizontal: "flex flex-row flex-wrap items-start justify-center gap-4",
204
+ vertical: "flex flex-col gap-6",
205
+ },
206
+ },
207
+ defaultVariants: {
208
+ orientation: "horizontal",
209
+ },
210
+ });
211
+
212
+ export const dynamicStepperItemVariants = cva("relative flex gap-3", {
213
+ variants: {
214
+ orientation: {
215
+ horizontal: "min-w-0 flex-col items-center text-center",
216
+ vertical: "flex-row items-start text-left",
217
+ },
218
+ },
219
+ defaultVariants: {
220
+ orientation: "horizontal",
221
+ },
222
+ });
223
+
224
+ export const dynamicStepperIndicatorVariants = cva(
225
+ "grid size-9 shrink-0 place-items-center rounded-full border text-sm font-semibold transition-colors",
226
+ {
227
+ variants: {
228
+ size: {
229
+ sm: "size-8 text-xs",
230
+ md: "size-9 text-sm",
231
+ lg: "size-10 text-base",
232
+ },
233
+ },
234
+ defaultVariants: {
235
+ size: "md",
236
+ },
237
+ },
238
+ );