@glob-ui/progress 0.0.0-stage → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kevin Martínez E
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,17 @@
1
- # Temporary Holding Version
1
+ # @glob-ui/progress
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A progress bar, determinate with a value or indeterminate while the length is unknown.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add @glob-ui/progress
9
+ ```
10
+
11
+ ## Documentation
12
+
13
+ Full docs, examples and the accessibility table: [Progress](https://github.com/kevin-martineze/GlobUI/tree/main/apps/docs/content/docs/components/progress.mdx).
14
+
15
+ ## License
16
+
17
+ MIT. See [LICENSE](./LICENSE).
@@ -0,0 +1,28 @@
1
+ import * as react from 'react';
2
+ import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const progressVariants: (props?: ({
6
+ size?: "sm" | "md" | "lg" | null | undefined;
7
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
8
+ declare const fillTone: {
9
+ readonly primary: "bg-glob-primary";
10
+ readonly success: "bg-glob-success";
11
+ readonly warning: "bg-glob-warning";
12
+ readonly danger: "bg-glob-danger";
13
+ };
14
+ interface ProgressProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "role">, VariantProps<typeof progressVariants> {
15
+ /** Current value from 0 to `max`. `null` (or omitted) shows an indeterminate bar. Values outside the range are clamped. */
16
+ value?: number | null;
17
+ /** The value that means complete. Default 100. */
18
+ max?: number;
19
+ tone?: keyof typeof fillTone;
20
+ /** The text screen readers read instead of the number. Default: the percentage, for example "40%". */
21
+ getValueLabel?: (value: number, max: number) => string;
22
+ }
23
+ /**
24
+ * A progress bar. It needs a name: pass `aria-label` or `aria-labelledby` (for example a Label's id).
25
+ */
26
+ declare const Progress: react.ForwardRefExoticComponent<ProgressProps & react.RefAttributes<HTMLDivElement>>;
27
+
28
+ export { Progress, type ProgressProps, progressVariants };
@@ -0,0 +1,28 @@
1
+ import * as react from 'react';
2
+ import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const progressVariants: (props?: ({
6
+ size?: "sm" | "md" | "lg" | null | undefined;
7
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
8
+ declare const fillTone: {
9
+ readonly primary: "bg-glob-primary";
10
+ readonly success: "bg-glob-success";
11
+ readonly warning: "bg-glob-warning";
12
+ readonly danger: "bg-glob-danger";
13
+ };
14
+ interface ProgressProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "role">, VariantProps<typeof progressVariants> {
15
+ /** Current value from 0 to `max`. `null` (or omitted) shows an indeterminate bar. Values outside the range are clamped. */
16
+ value?: number | null;
17
+ /** The value that means complete. Default 100. */
18
+ max?: number;
19
+ tone?: keyof typeof fillTone;
20
+ /** The text screen readers read instead of the number. Default: the percentage, for example "40%". */
21
+ getValueLabel?: (value: number, max: number) => string;
22
+ }
23
+ /**
24
+ * A progress bar. It needs a name: pass `aria-label` or `aria-labelledby` (for example a Label's id).
25
+ */
26
+ declare const Progress: react.ForwardRefExoticComponent<ProgressProps & react.RefAttributes<HTMLDivElement>>;
27
+
28
+ export { Progress, type ProgressProps, progressVariants };
package/dist/index.js ADDED
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ var __objRest = (source, exclude) => {
24
+ var target = {};
25
+ for (var prop in source)
26
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
27
+ target[prop] = source[prop];
28
+ if (source != null && __getOwnPropSymbols)
29
+ for (var prop of __getOwnPropSymbols(source)) {
30
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
31
+ target[prop] = source[prop];
32
+ }
33
+ return target;
34
+ };
35
+ var __export = (target, all) => {
36
+ for (var name in all)
37
+ __defProp(target, name, { get: all[name], enumerable: true });
38
+ };
39
+ var __copyProps = (to, from, except, desc) => {
40
+ if (from && typeof from === "object" || typeof from === "function") {
41
+ for (let key of __getOwnPropNames(from))
42
+ if (!__hasOwnProp.call(to, key) && key !== except)
43
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
44
+ }
45
+ return to;
46
+ };
47
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
48
+
49
+ // src/index.ts
50
+ var index_exports = {};
51
+ __export(index_exports, {
52
+ Progress: () => Progress,
53
+ progressVariants: () => progressVariants
54
+ });
55
+ module.exports = __toCommonJS(index_exports);
56
+
57
+ // src/progress.tsx
58
+ var import_react = require("react");
59
+ var import_class_variance_authority = require("class-variance-authority");
60
+ var import_utils = require("@glob-ui/utils");
61
+ var import_jsx_runtime = (
62
+ // Slides across the track; with reduced motion it becomes a static full bar that pulses.
63
+ require("react/jsx-runtime")
64
+ );
65
+ var progressVariants = (0, import_class_variance_authority.cva)("relative w-full overflow-hidden rounded-glob-sm bg-glob-surface-hover", {
66
+ variants: {
67
+ size: {
68
+ sm: "h-1",
69
+ md: "h-2",
70
+ lg: "h-3"
71
+ }
72
+ },
73
+ defaultVariants: {
74
+ size: "md"
75
+ }
76
+ });
77
+ var fillTone = {
78
+ primary: "bg-glob-primary",
79
+ success: "bg-glob-success",
80
+ warning: "bg-glob-warning",
81
+ danger: "bg-glob-danger"
82
+ };
83
+ var Progress = (0, import_react.forwardRef)(
84
+ (_a, ref) => {
85
+ var _b = _a, { className, value, max = 100, size, tone = "primary", getValueLabel } = _b, props = __objRest(_b, ["className", "value", "max", "size", "tone", "getValueLabel"]);
86
+ const indeterminate = value === null || value === void 0;
87
+ const safeMax = max > 0 ? max : 100;
88
+ const clamped = indeterminate ? 0 : Math.min(Math.max(value, 0), safeMax);
89
+ const percent = clamped / safeMax * 100;
90
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
91
+ "div",
92
+ __spreadProps(__spreadValues({
93
+ ref,
94
+ role: "progressbar",
95
+ "aria-valuemin": 0,
96
+ "aria-valuemax": safeMax,
97
+ "aria-valuenow": indeterminate ? void 0 : clamped,
98
+ "aria-valuetext": indeterminate ? void 0 : getValueLabel ? getValueLabel(clamped, safeMax) : `${Math.round(percent)}%`,
99
+ className: (0, import_utils.cn)(progressVariants({ size, className }))
100
+ }, props), {
101
+ children: indeterminate ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
102
+ "div",
103
+ {
104
+ className: (0, import_utils.cn)(
105
+ "h-full w-2/5 animate-glob-indeterminate rounded-glob-sm motion-reduce:w-full motion-reduce:animate-pulse",
106
+ fillTone[tone]
107
+ )
108
+ }
109
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
110
+ "div",
111
+ {
112
+ className: (0, import_utils.cn)("h-full w-full rounded-glob-sm transition-transform duration-300 ease-out motion-reduce:transition-none", fillTone[tone]),
113
+ style: { transform: `translateX(-${100 - percent}%)` }
114
+ }
115
+ )
116
+ })
117
+ );
118
+ }
119
+ );
120
+ Progress.displayName = "Progress";
121
+ // Annotate the CommonJS export names for ESM import in node:
122
+ 0 && (module.exports = {
123
+ Progress,
124
+ progressVariants
125
+ });
126
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/progress.tsx"],"sourcesContent":["export { Progress, progressVariants } from \"./progress\"\nexport type { ProgressProps } from \"./progress\"\n","import { forwardRef } from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@glob-ui/utils\"\n\nconst progressVariants = cva(\"relative w-full overflow-hidden rounded-glob-sm bg-glob-surface-hover\", {\n variants: {\n size: {\n sm: \"h-1\",\n md: \"h-2\",\n lg: \"h-3\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n})\n\nconst fillTone = {\n primary: \"bg-glob-primary\",\n success: \"bg-glob-success\",\n warning: \"bg-glob-warning\",\n danger: \"bg-glob-danger\",\n} as const\n\nexport interface ProgressProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"role\">,\n VariantProps<typeof progressVariants> {\n /** Current value from 0 to `max`. `null` (or omitted) shows an indeterminate bar. Values outside the range are clamped. */\n value?: number | null\n /** The value that means complete. Default 100. */\n max?: number\n tone?: keyof typeof fillTone\n /** The text screen readers read instead of the number. Default: the percentage, for example \"40%\". */\n getValueLabel?: (value: number, max: number) => string\n}\n\n/**\n * A progress bar. It needs a name: pass `aria-label` or `aria-labelledby` (for example a Label's id).\n */\nconst Progress = forwardRef<HTMLDivElement, ProgressProps>(\n ({ className, value, max = 100, size, tone = \"primary\", getValueLabel, ...props }, ref) => {\n const indeterminate = value === null || value === undefined\n const safeMax = max > 0 ? max : 100\n const clamped = indeterminate ? 0 : Math.min(Math.max(value, 0), safeMax)\n const percent = (clamped / safeMax) * 100\n\n return (\n <div\n ref={ref}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={safeMax}\n aria-valuenow={indeterminate ? undefined : clamped}\n aria-valuetext={indeterminate ? undefined : getValueLabel ? getValueLabel(clamped, safeMax) : `${Math.round(percent)}%`}\n className={cn(progressVariants({ size, className }))}\n {...props}\n >\n {indeterminate ? (\n // Slides across the track; with reduced motion it becomes a static full bar that pulses.\n <div\n className={cn(\n \"h-full w-2/5 animate-glob-indeterminate rounded-glob-sm motion-reduce:w-full motion-reduce:animate-pulse\",\n fillTone[tone]\n )}\n />\n ) : (\n <div\n className={cn(\"h-full w-full rounded-glob-sm transition-transform duration-300 ease-out motion-reduce:transition-none\", fillTone[tone])}\n style={{ transform: `translateX(-${100 - percent}%)` }}\n />\n )}\n </div>\n )\n }\n)\nProgress.displayName = \"Progress\"\n\nexport { Progress, progressVariants }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA2B;AAC3B,sCAAuC;AACvC,mBAAmB;AAyDT;AAAA;AAAA;AAAA;AAvDV,IAAM,uBAAmB,qCAAI,yEAAyE;AAAA,EACpG,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,MAAM;AAAA,EACR;AACF,CAAC;AAED,IAAM,WAAW;AAAA,EACf,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACV;AAiBA,IAAM,eAAW;AAAA,EACf,CAAC,IAAkF,QAAQ;AAA1F,iBAAE,aAAW,OAAO,MAAM,KAAK,MAAM,OAAO,WAAW,cAxC1D,IAwCG,IAAyE,kBAAzE,IAAyE,CAAvE,aAAW,SAAO,OAAW,QAAM,QAAkB;AACtD,UAAM,gBAAgB,UAAU,QAAQ,UAAU;AAClD,UAAM,UAAU,MAAM,IAAI,MAAM;AAChC,UAAM,UAAU,gBAAgB,IAAI,KAAK,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,OAAO;AACxE,UAAM,UAAW,UAAU,UAAW;AAEtC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,MAAK;AAAA,QACL,iBAAe;AAAA,QACf,iBAAe;AAAA,QACf,iBAAe,gBAAgB,SAAY;AAAA,QAC3C,kBAAgB,gBAAgB,SAAY,gBAAgB,cAAc,SAAS,OAAO,IAAI,GAAG,KAAK,MAAM,OAAO,CAAC;AAAA,QACpH,eAAW,iBAAG,iBAAiB,EAAE,MAAM,UAAU,CAAC,CAAC;AAAA,SAC/C,QARL;AAAA,QAUE,0BAEC;AAAA,UAAC;AAAA;AAAA,YACC,eAAW;AAAA,cACT;AAAA,cACA,SAAS,IAAI;AAAA,YACf;AAAA;AAAA,QACF,IAEA;AAAA,UAAC;AAAA;AAAA,YACC,eAAW,iBAAG,0GAA0G,SAAS,IAAI,CAAC;AAAA,YACtI,OAAO,EAAE,WAAW,eAAe,MAAM,OAAO,KAAK;AAAA;AAAA,QACvD;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AACA,SAAS,cAAc;","names":[]}
package/dist/index.mjs ADDED
@@ -0,0 +1,101 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+
33
+ // src/progress.tsx
34
+ import { forwardRef } from "react";
35
+ import { cva } from "class-variance-authority";
36
+ import { cn } from "@glob-ui/utils";
37
+ import { jsx } from "react/jsx-runtime";
38
+ var progressVariants = cva("relative w-full overflow-hidden rounded-glob-sm bg-glob-surface-hover", {
39
+ variants: {
40
+ size: {
41
+ sm: "h-1",
42
+ md: "h-2",
43
+ lg: "h-3"
44
+ }
45
+ },
46
+ defaultVariants: {
47
+ size: "md"
48
+ }
49
+ });
50
+ var fillTone = {
51
+ primary: "bg-glob-primary",
52
+ success: "bg-glob-success",
53
+ warning: "bg-glob-warning",
54
+ danger: "bg-glob-danger"
55
+ };
56
+ var Progress = forwardRef(
57
+ (_a, ref) => {
58
+ var _b = _a, { className, value, max = 100, size, tone = "primary", getValueLabel } = _b, props = __objRest(_b, ["className", "value", "max", "size", "tone", "getValueLabel"]);
59
+ const indeterminate = value === null || value === void 0;
60
+ const safeMax = max > 0 ? max : 100;
61
+ const clamped = indeterminate ? 0 : Math.min(Math.max(value, 0), safeMax);
62
+ const percent = clamped / safeMax * 100;
63
+ return /* @__PURE__ */ jsx(
64
+ "div",
65
+ __spreadProps(__spreadValues({
66
+ ref,
67
+ role: "progressbar",
68
+ "aria-valuemin": 0,
69
+ "aria-valuemax": safeMax,
70
+ "aria-valuenow": indeterminate ? void 0 : clamped,
71
+ "aria-valuetext": indeterminate ? void 0 : getValueLabel ? getValueLabel(clamped, safeMax) : `${Math.round(percent)}%`,
72
+ className: cn(progressVariants({ size, className }))
73
+ }, props), {
74
+ children: indeterminate ? (
75
+ // Slides across the track; with reduced motion it becomes a static full bar that pulses.
76
+ /* @__PURE__ */ jsx(
77
+ "div",
78
+ {
79
+ className: cn(
80
+ "h-full w-2/5 animate-glob-indeterminate rounded-glob-sm motion-reduce:w-full motion-reduce:animate-pulse",
81
+ fillTone[tone]
82
+ )
83
+ }
84
+ )
85
+ ) : /* @__PURE__ */ jsx(
86
+ "div",
87
+ {
88
+ className: cn("h-full w-full rounded-glob-sm transition-transform duration-300 ease-out motion-reduce:transition-none", fillTone[tone]),
89
+ style: { transform: `translateX(-${100 - percent}%)` }
90
+ }
91
+ )
92
+ })
93
+ );
94
+ }
95
+ );
96
+ Progress.displayName = "Progress";
97
+ export {
98
+ Progress,
99
+ progressVariants
100
+ };
101
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/progress.tsx"],"sourcesContent":["import { forwardRef } from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { cn } from \"@glob-ui/utils\"\n\nconst progressVariants = cva(\"relative w-full overflow-hidden rounded-glob-sm bg-glob-surface-hover\", {\n variants: {\n size: {\n sm: \"h-1\",\n md: \"h-2\",\n lg: \"h-3\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n})\n\nconst fillTone = {\n primary: \"bg-glob-primary\",\n success: \"bg-glob-success\",\n warning: \"bg-glob-warning\",\n danger: \"bg-glob-danger\",\n} as const\n\nexport interface ProgressProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"role\">,\n VariantProps<typeof progressVariants> {\n /** Current value from 0 to `max`. `null` (or omitted) shows an indeterminate bar. Values outside the range are clamped. */\n value?: number | null\n /** The value that means complete. Default 100. */\n max?: number\n tone?: keyof typeof fillTone\n /** The text screen readers read instead of the number. Default: the percentage, for example \"40%\". */\n getValueLabel?: (value: number, max: number) => string\n}\n\n/**\n * A progress bar. It needs a name: pass `aria-label` or `aria-labelledby` (for example a Label's id).\n */\nconst Progress = forwardRef<HTMLDivElement, ProgressProps>(\n ({ className, value, max = 100, size, tone = \"primary\", getValueLabel, ...props }, ref) => {\n const indeterminate = value === null || value === undefined\n const safeMax = max > 0 ? max : 100\n const clamped = indeterminate ? 0 : Math.min(Math.max(value, 0), safeMax)\n const percent = (clamped / safeMax) * 100\n\n return (\n <div\n ref={ref}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={safeMax}\n aria-valuenow={indeterminate ? undefined : clamped}\n aria-valuetext={indeterminate ? undefined : getValueLabel ? getValueLabel(clamped, safeMax) : `${Math.round(percent)}%`}\n className={cn(progressVariants({ size, className }))}\n {...props}\n >\n {indeterminate ? (\n // Slides across the track; with reduced motion it becomes a static full bar that pulses.\n <div\n className={cn(\n \"h-full w-2/5 animate-glob-indeterminate rounded-glob-sm motion-reduce:w-full motion-reduce:animate-pulse\",\n fillTone[tone]\n )}\n />\n ) : (\n <div\n className={cn(\"h-full w-full rounded-glob-sm transition-transform duration-300 ease-out motion-reduce:transition-none\", fillTone[tone])}\n style={{ transform: `translateX(-${100 - percent}%)` }}\n />\n )}\n </div>\n )\n }\n)\nProgress.displayName = \"Progress\"\n\nexport { Progress, progressVariants }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,kBAAkB;AAC3B,SAAS,WAA8B;AACvC,SAAS,UAAU;AAyDT;AAvDV,IAAM,mBAAmB,IAAI,yEAAyE;AAAA,EACpG,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,MAAM;AAAA,EACR;AACF,CAAC;AAED,IAAM,WAAW;AAAA,EACf,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACV;AAiBA,IAAM,WAAW;AAAA,EACf,CAAC,IAAkF,QAAQ;AAA1F,iBAAE,aAAW,OAAO,MAAM,KAAK,MAAM,OAAO,WAAW,cAxC1D,IAwCG,IAAyE,kBAAzE,IAAyE,CAAvE,aAAW,SAAO,OAAW,QAAM,QAAkB;AACtD,UAAM,gBAAgB,UAAU,QAAQ,UAAU;AAClD,UAAM,UAAU,MAAM,IAAI,MAAM;AAChC,UAAM,UAAU,gBAAgB,IAAI,KAAK,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,OAAO;AACxE,UAAM,UAAW,UAAU,UAAW;AAEtC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,MAAK;AAAA,QACL,iBAAe;AAAA,QACf,iBAAe;AAAA,QACf,iBAAe,gBAAgB,SAAY;AAAA,QAC3C,kBAAgB,gBAAgB,SAAY,gBAAgB,cAAc,SAAS,OAAO,IAAI,GAAG,KAAK,MAAM,OAAO,CAAC;AAAA,QACpH,WAAW,GAAG,iBAAiB,EAAE,MAAM,UAAU,CAAC,CAAC;AAAA,SAC/C,QARL;AAAA,QAUE;AAAA;AAAA,UAEC;AAAA,YAAC;AAAA;AAAA,cACC,WAAW;AAAA,gBACT;AAAA,gBACA,SAAS,IAAI;AAAA,cACf;AAAA;AAAA,UACF;AAAA,YAEA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,GAAG,0GAA0G,SAAS,IAAI,CAAC;AAAA,YACtI,OAAO,EAAE,WAAW,eAAe,MAAM,OAAO,KAAK;AAAA;AAAA,QACvD;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AACA,SAAS,cAAc;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,69 @@
1
1
  {
2
2
  "name": "@glob-ui/progress",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "main": "./dist/index.js",
5
+ "module": "./dist/index.mjs",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "import": {
10
+ "types": "./dist/index.d.mts",
11
+ "default": "./dist/index.mjs"
12
+ },
13
+ "require": {
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./dist/index.js"
16
+ }
17
+ },
18
+ "./package.json": "./package.json"
19
+ },
20
+ "files": [
21
+ "dist/",
22
+ "LICENSE",
23
+ "README.md"
24
+ ],
25
+ "peerDependencies": {
26
+ "react": "^19"
27
+ },
28
+ "dependencies": {
29
+ "@glob-ui/utils": "0.1.0",
30
+ "class-variance-authority": "^0.7.1"
31
+ },
32
+ "devDependencies": {
33
+ "react-dom": "^19",
34
+ "tsup": "^8.5.1"
35
+ },
36
+ "description": "A progress bar, determinate with a value or indeterminate while the length is unknown.",
37
+ "keywords": [
38
+ "react",
39
+ "glob-ui",
40
+ "components",
41
+ "accessible",
42
+ "tailwind",
43
+ "progress"
44
+ ],
45
+ "license": "MIT",
46
+ "author": "Kevin Martínez E",
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "git+https://github.com/kevin-martineze/GlobUI.git",
50
+ "directory": "packages/progress"
51
+ },
52
+ "homepage": "https://github.com/kevin-martineze/GlobUI#readme",
53
+ "bugs": {
54
+ "url": "https://github.com/kevin-martineze/GlobUI/issues"
55
+ },
56
+ "publishConfig": {
57
+ "access": "public",
58
+ "provenance": true
59
+ },
60
+ "sideEffects": false,
61
+ "type": "commonjs",
62
+ "engines": {
63
+ "node": ">=18.18"
64
+ },
65
+ "scripts": {
66
+ "build": "tsup",
67
+ "dev": "tsup --watch --no-clean"
68
+ }
6
69
  }