@agentero/design-system 0.14.0 → 0.15.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentero/design-system",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "A React component library built with Tailwind CSS v4 and Radix UI primitives",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -57,6 +57,10 @@
57
57
  "types": "./src/pagination/index.d.ts",
58
58
  "import": "./src/pagination/index.js"
59
59
  },
60
+ "./progress": {
61
+ "types": "./src/progress/index.d.ts",
62
+ "import": "./src/progress/index.js"
63
+ },
60
64
  "./skeleton": {
61
65
  "types": "./src/skeleton/index.d.ts",
62
66
  "import": "./src/skeleton/index.js"
@@ -98,6 +102,7 @@
98
102
  "@radix-ui/react-accordion": "^1.2.14",
99
103
  "@radix-ui/react-avatar": "^1.1.11",
100
104
  "@radix-ui/react-dropdown-menu": "^2.1.16",
105
+ "@radix-ui/react-progress": "^1.1.12",
101
106
  "@radix-ui/react-separator": "^1.1.8",
102
107
  "@radix-ui/react-slot": "^1.2.4",
103
108
  "@radix-ui/react-switch": "^1.3.2",
@@ -0,0 +1,2 @@
1
+ export { Progress, progressRecipe } from './progress';
2
+ export type { ProgressProps } from './progress';
@@ -0,0 +1,2 @@
1
+ import { Progress as e, progressRecipe as t } from "./progress.js";
2
+ export { e as Progress, t as progressRecipe };
@@ -0,0 +1,89 @@
1
+ export declare const progressRecipe: import('tailwind-variants').TVReturnType<{
2
+ [key: string]: {
3
+ [key: string]: import('tailwind-merge').ClassNameValue | {
4
+ label?: import('tailwind-merge').ClassNameValue;
5
+ track?: import('tailwind-merge').ClassNameValue;
6
+ value?: import('tailwind-merge').ClassNameValue;
7
+ root?: import('tailwind-merge').ClassNameValue;
8
+ indicator?: import('tailwind-merge').ClassNameValue;
9
+ labelRow?: import('tailwind-merge').ClassNameValue;
10
+ };
11
+ };
12
+ } | {
13
+ [x: string]: {
14
+ [x: string]: import('tailwind-merge').ClassNameValue | {
15
+ label?: import('tailwind-merge').ClassNameValue;
16
+ track?: import('tailwind-merge').ClassNameValue;
17
+ value?: import('tailwind-merge').ClassNameValue;
18
+ root?: import('tailwind-merge').ClassNameValue;
19
+ indicator?: import('tailwind-merge').ClassNameValue;
20
+ labelRow?: import('tailwind-merge').ClassNameValue;
21
+ };
22
+ };
23
+ } | {}, {
24
+ root: string;
25
+ track: string;
26
+ indicator: string;
27
+ labelRow: string;
28
+ label: string;
29
+ value: string;
30
+ }, undefined, {
31
+ [key: string]: {
32
+ [key: string]: import('tailwind-merge').ClassNameValue | {
33
+ label?: import('tailwind-merge').ClassNameValue;
34
+ track?: import('tailwind-merge').ClassNameValue;
35
+ value?: import('tailwind-merge').ClassNameValue;
36
+ root?: import('tailwind-merge').ClassNameValue;
37
+ indicator?: import('tailwind-merge').ClassNameValue;
38
+ labelRow?: import('tailwind-merge').ClassNameValue;
39
+ };
40
+ };
41
+ } | {}, {
42
+ root: string;
43
+ track: string;
44
+ indicator: string;
45
+ labelRow: string;
46
+ label: string;
47
+ value: string;
48
+ }, import('tailwind-variants').TVReturnType<unknown, {
49
+ root: string;
50
+ track: string;
51
+ indicator: string;
52
+ labelRow: string;
53
+ label: string;
54
+ value: string;
55
+ }, undefined, unknown, unknown, undefined>>;
56
+ export type ProgressProps = {
57
+ /** Completion percentage, 0–100. Values outside the range are clamped. */
58
+ percentage: number;
59
+ /** Optional label rendered above the bar, with the percentage value on the right. */
60
+ label?: string;
61
+ /** Accessible name when no visible `label` is provided. Defaults to `'Progress'`. */
62
+ 'aria-label'?: string;
63
+ /**
64
+ * Extra classes for the bar, merged last. The fill paints with `currentColor`,
65
+ * so a text color recolors it (e.g. `text-brand-400`); sizing classes resize
66
+ * the track (e.g. `h-3`).
67
+ */
68
+ className?: string;
69
+ };
70
+ /**
71
+ * Progress shows how far a bounded task has advanced — wizard steps, upload
72
+ * status, or a split of a total. Pass `percentage` (0–100) and optionally a
73
+ * `label`, which renders above the bar with the percentage value. Built on
74
+ * Radix UI Progress, so `role="progressbar"` and `aria-value*` come wired.
75
+ *
76
+ * The fill is near-black by default and paints with `currentColor` — recolor
77
+ * it from the consumer with a plain text color class.
78
+ *
79
+ * @summary Horizontal progress bar with optional label
80
+ *
81
+ * @example
82
+ * ```tsx
83
+ * <Progress percentage={62} label="Profile completion" className="text-brand-400" />
84
+ * ```
85
+ */
86
+ export declare const Progress: {
87
+ ({ percentage, label, "aria-label": ariaLabel, className }: ProgressProps): import("react/jsx-runtime").JSX.Element;
88
+ displayName: string;
89
+ };
@@ -0,0 +1,46 @@
1
+ "use client";
2
+ import { tv as e } from "tailwind-variants";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
+ import { useId as r } from "react";
5
+ import * as i from "@radix-ui/react-progress";
6
+ //#region src/progress/progress.tsx
7
+ var a = e({ slots: {
8
+ root: "flex flex-col gap-2",
9
+ track: "relative h-2 w-full overflow-hidden rounded-sm bg-neutrals-200 text-neutrals-900",
10
+ indicator: "size-full bg-current transition-transform duration-600 ease-in-out motion-reduce:transition-none",
11
+ labelRow: "flex items-center justify-between gap-2",
12
+ label: "text-sm text-text-default-base-primary",
13
+ value: "text-base text-text-default-base-primary"
14
+ } }), o = ({ percentage: e, label: o, "aria-label": s, className: c }) => {
15
+ let l = r(), u = a(), d = Math.min(100, Math.max(0, e));
16
+ return /* @__PURE__ */ n("div", {
17
+ "data-slot": "progress",
18
+ className: u.root(),
19
+ children: [o && /* @__PURE__ */ n("div", {
20
+ "data-slot": "progress-label",
21
+ className: u.labelRow(),
22
+ children: [/* @__PURE__ */ t("span", {
23
+ id: l,
24
+ className: u.label(),
25
+ children: o
26
+ }), /* @__PURE__ */ n("span", {
27
+ className: u.value(),
28
+ children: [d, "%"]
29
+ })]
30
+ }), /* @__PURE__ */ t(i.Root, {
31
+ "data-slot": "progress-track",
32
+ value: d,
33
+ "aria-labelledby": o ? l : void 0,
34
+ "aria-label": o ? void 0 : s ?? "Progress",
35
+ className: u.track({ className: c }),
36
+ children: /* @__PURE__ */ t(i.Indicator, {
37
+ "data-slot": "progress-indicator",
38
+ className: u.indicator(),
39
+ style: { transform: `translateX(-${100 - d}%)` }
40
+ })
41
+ })]
42
+ });
43
+ };
44
+ o.displayName = "Progress";
45
+ //#endregion
46
+ export { o as Progress, a as progressRecipe };