@astra-kit/ui 1.0.0 → 1.2.1

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 (43) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +14 -3
  3. package/THIRD_PARTY_NOTICES.md +1 -1
  4. package/dist/components/button-link.d.ts +15 -0
  5. package/dist/components/button-link.js +70 -0
  6. package/dist/components/button-recipe.d.ts +27 -0
  7. package/dist/components/button-recipe.js +44 -0
  8. package/dist/components/button.d.ts +3 -5
  9. package/dist/components/button.js +1 -25
  10. package/dist/components/empty-state.d.ts +20 -0
  11. package/dist/components/empty-state.js +357 -0
  12. package/dist/components/metric-card.d.ts +22 -0
  13. package/dist/components/metric-card.js +378 -0
  14. package/dist/components/radio-group.d.ts +5 -3
  15. package/dist/components/radio-group.js +88 -85
  16. package/dist/components/stepper.d.ts +39 -0
  17. package/dist/components/stepper.js +693 -0
  18. package/dist/components/timeline.d.ts +51 -0
  19. package/dist/components/timeline.js +1013 -0
  20. package/dist/components/usage-meter.d.ts +39 -0
  21. package/dist/components/usage-meter.js +1093 -0
  22. package/dist/constants/empty-state.d.ts +12 -0
  23. package/dist/constants/empty-state.js +12 -0
  24. package/dist/constants/metric-card.d.ts +12 -0
  25. package/dist/constants/metric-card.js +12 -0
  26. package/dist/constants/stepper.d.ts +52 -0
  27. package/dist/constants/stepper.js +23 -0
  28. package/dist/constants/timeline.d.ts +62 -0
  29. package/dist/constants/timeline.js +31 -0
  30. package/dist/constants/usage-meter.d.ts +100 -0
  31. package/dist/constants/usage-meter.js +38 -0
  32. package/dist/hooks/use-has-entered-view.d.ts +9 -0
  33. package/dist/hooks/use-has-entered-view.js +46 -0
  34. package/dist/index.d.ts +7 -0
  35. package/dist/index.js +8 -0
  36. package/dist/motion/arc-odometer.d.ts +53 -0
  37. package/dist/motion/arc-odometer.js +424 -0
  38. package/dist/motion/arc-text-swap.d.ts +22 -0
  39. package/dist/motion/arc-text-swap.js +142 -0
  40. package/dist/motion/arc-tokens.d.ts +1 -0
  41. package/dist/motion/arc-tokens.js +2 -1
  42. package/dist/styles.css +1 -1
  43. package/package.json +31 -1
@@ -0,0 +1,39 @@
1
+ import type { HTMLAttributes } from "react";
2
+ import type { StepperDetails, StepperMessages, StepperOrientation, StepperStatus } from "../constants/stepper.js";
3
+ export type { StepperDetails, StepperMessages, StepperOrientation, StepperStatus };
4
+ export type StepperStep = {
5
+ /** Stable key, so each step keeps its own motion when the list changes. */
6
+ id: string;
7
+ label: string;
8
+ /** A short hint under the label. */
9
+ description?: string;
10
+ /** Marks the step as failed: the marker morphs into an alert and this message replaces the description. */
11
+ error?: string;
12
+ };
13
+ export type StepperProps = Omit<HTMLAttributes<HTMLElement>, "children" | "role"> & {
14
+ /** Steps in order. */
15
+ steps: StepperStep[];
16
+ /** Index of the step in progress. `steps.length` marks the whole flow complete. */
17
+ current: number;
18
+ /** Layout direction. Defaults to `"horizontal"`. */
19
+ orientation?: StepperOrientation;
20
+ /** Called with the index of a completed step when it is chosen. Without it the stepper is read only. */
21
+ onStepSelect?: (index: number) => void;
22
+ /** `"current"` shows only the active step's description. Errors always show. Defaults to `"all"`. */
23
+ details?: StepperDetails;
24
+ /** Markers only. Horizontal steppers switch to this below 30rem on their own. */
25
+ compact?: boolean;
26
+ /** Accessible name of the stepper. Defaults to "Progreso". */
27
+ label?: string;
28
+ /** Announced, and shown in the compact caption, once every step is complete. Defaults to "Todos los pasos completados". */
29
+ completeLabel?: string;
30
+ /** Replaces any of the Spanish screen-reader statuses and the step announcement. */
31
+ messages?: Partial<StepperMessages>;
32
+ };
33
+ /**
34
+ * A horizontal or vertical steps indicator driven by the current index, with optional navigation back to completed steps.
35
+ * @param props - Steps, current index, orientation, selection callback, copy and native attributes.
36
+ * @returns The stepper: a labelled `nav` when interactive, otherwise a `role="group"`.
37
+ */
38
+ declare function Stepper({ steps, current, orientation, onStepSelect, details, compact, label, completeLabel, messages, className, ...props }: StepperProps): import("react").JSX.Element;
39
+ export { Stepper };