@brightlocal/ui-components 2.25.0 → 2.27.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.
Files changed (98) hide show
  1. package/README.md +4 -2
  2. package/component-meta.json +3809 -182
  3. package/dist/alert.cjs +1 -1
  4. package/dist/alert.d.ts +23 -9
  5. package/dist/alert.d.ts.map +1 -1
  6. package/dist/alert.js +95 -87
  7. package/dist/blocks/progress-screen.cjs +1 -0
  8. package/dist/blocks/progress-screen.d.ts +109 -0
  9. package/dist/blocks/progress-screen.d.ts.map +1 -0
  10. package/dist/blocks/progress-screen.js +339 -0
  11. package/dist/blocks/sidebar.cjs +1 -1
  12. package/dist/blocks/sidebar.d.ts.map +1 -1
  13. package/dist/blocks/sidebar.js +155 -153
  14. package/dist/brand-illustration-motif.d.ts +1 -1
  15. package/dist/breadcrumb.cjs +1 -1
  16. package/dist/breadcrumb.d.ts.map +1 -1
  17. package/dist/breadcrumb.js +44 -40
  18. package/dist/button.cjs +1 -1
  19. package/dist/button.d.ts.map +1 -1
  20. package/dist/button.js +28 -28
  21. package/dist/chip.cjs +1 -1
  22. package/dist/chip.d.ts +1 -1
  23. package/dist/chip.d.ts.map +1 -1
  24. package/dist/chip.js +42 -41
  25. package/dist/combobox.cjs +3 -3
  26. package/dist/combobox.d.ts +4 -2
  27. package/dist/combobox.d.ts.map +1 -1
  28. package/dist/combobox.js +161 -161
  29. package/dist/data-table.cjs +1 -1
  30. package/dist/data-table.d.ts +155 -4
  31. package/dist/data-table.d.ts.map +1 -1
  32. package/dist/data-table.js +462 -309
  33. package/dist/global-layout.cjs +1 -1
  34. package/dist/global-layout.d.ts +31 -5
  35. package/dist/global-layout.d.ts.map +1 -1
  36. package/dist/global-layout.js +276 -194
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.d.ts +3 -0
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +462 -451
  41. package/dist/lib/motion.cjs +1 -1
  42. package/dist/lib/motion.js +10 -8
  43. package/dist/link.cjs +1 -1
  44. package/dist/link.d.ts +5 -2
  45. package/dist/link.d.ts.map +1 -1
  46. package/dist/link.js +97 -91
  47. package/dist/list.cjs +1 -1
  48. package/dist/list.js +65 -63
  49. package/dist/progress.cjs +1 -1
  50. package/dist/progress.d.ts +61 -3
  51. package/dist/progress.d.ts.map +1 -1
  52. package/dist/progress.js +142 -65
  53. package/dist/route-progress.cjs +1 -0
  54. package/dist/route-progress.d.ts +103 -0
  55. package/dist/route-progress.d.ts.map +1 -0
  56. package/dist/route-progress.js +106 -0
  57. package/dist/sheet.cjs +1 -1
  58. package/dist/sheet.d.ts +35 -2
  59. package/dist/sheet.d.ts.map +1 -1
  60. package/dist/sheet.js +102 -65
  61. package/dist/sonner.cjs +1 -1
  62. package/dist/sonner.d.ts.map +1 -1
  63. package/dist/sonner.js +11 -15
  64. package/dist/spinner.cjs +1 -0
  65. package/dist/spinner.d.ts +57 -0
  66. package/dist/spinner.d.ts.map +1 -0
  67. package/dist/spinner.js +35 -0
  68. package/dist/stepper.cjs +1 -1
  69. package/dist/stepper.d.ts.map +1 -1
  70. package/dist/stepper.js +26 -25
  71. package/dist/table.cjs +1 -1
  72. package/dist/table.d.ts +1 -1
  73. package/dist/table.d.ts.map +1 -1
  74. package/dist/table.js +6 -2
  75. package/package.json +15 -6
  76. package/src/blocks/progress-screen.tsx +481 -0
  77. package/src/blocks/sidebar.tsx +22 -15
  78. package/src/components/alert.tsx +68 -33
  79. package/src/components/breadcrumb.tsx +9 -4
  80. package/src/components/button.tsx +2 -5
  81. package/src/components/chip.tsx +4 -3
  82. package/src/components/combobox.tsx +15 -8
  83. package/src/components/data-table.tsx +358 -16
  84. package/src/components/global-layout.tsx +228 -62
  85. package/src/components/link.tsx +88 -63
  86. package/src/components/list.tsx +5 -5
  87. package/src/components/progress.tsx +217 -30
  88. package/src/components/route-progress.tsx +354 -0
  89. package/src/components/sheet.tsx +87 -5
  90. package/src/components/sonner.tsx +3 -12
  91. package/src/components/spinner.tsx +94 -0
  92. package/src/components/stepper.tsx +3 -4
  93. package/src/components/table.tsx +6 -2
  94. package/src/index.ts +3 -0
  95. package/dist/browser-entry.d.ts +0 -19
  96. package/dist/browser-entry.d.ts.map +0 -1
  97. package/src/browser-entry.ts +0 -99
  98. package/src/browser-tokens.css +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s={type:"spring",stiffness:500,damping:45},n={stiffness:180,damping:24,mass:1},t={type:"spring",stiffness:80,damping:20,mass:1},S={type:"spring",stiffness:30,damping:9,mass:.5};exports.SPRING_GENTLE=t;exports.SPRING_SETTLE=S;exports.SPRING_SMOOTH=n;exports.SPRING_SNAPPY=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=150,S=200,N={type:"spring",stiffness:500,damping:45},_={stiffness:180,damping:24,mass:1},n={type:"spring",stiffness:80,damping:20,mass:1},t={type:"spring",stiffness:30,damping:9,mass:.5};exports.MOTION_DURATION_BASE_MS=S;exports.MOTION_DURATION_FAST_MS=s;exports.SPRING_GENTLE=n;exports.SPRING_SETTLE=t;exports.SPRING_SMOOTH=_;exports.SPRING_SNAPPY=N;
@@ -1,25 +1,27 @@
1
- const s = {
1
+ const s = 150, n = 200, t = {
2
2
  type: "spring",
3
3
  stiffness: 500,
4
4
  damping: 45
5
- }, n = {
5
+ }, i = {
6
6
  stiffness: 180,
7
7
  damping: 24,
8
8
  mass: 1
9
- }, t = {
9
+ }, p = {
10
10
  type: "spring",
11
11
  stiffness: 80,
12
12
  damping: 20,
13
13
  mass: 1
14
- }, i = {
14
+ }, S = {
15
15
  type: "spring",
16
16
  stiffness: 30,
17
17
  damping: 9,
18
18
  mass: 0.5
19
19
  };
20
20
  export {
21
- t as SPRING_GENTLE,
22
- i as SPRING_SETTLE,
23
- n as SPRING_SMOOTH,
24
- s as SPRING_SNAPPY
21
+ n as MOTION_DURATION_BASE_MS,
22
+ s as MOTION_DURATION_FAST_MS,
23
+ p as SPRING_GENTLE,
24
+ S as SPRING_SETTLE,
25
+ i as SPRING_SMOOTH,
26
+ t as SPRING_SNAPPY
25
27
  };
package/dist/link.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),h=require("react"),y=require("@brightlocal/icons"),d=require("@radix-ui/react-slot"),m=require("class-variance-authority"),j=require("@brightlocal/ui-components/lib/utils");function w(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const S=w(h),a=["justify-center","h-9","px-4","py-2","rounded-full","text-sm","font-semibold","no-underline","whitespace-nowrap","shrink-0","[&_svg]:pointer-events-none","[&_svg]:shrink-0","transition-[color,background-color,border-color,box-shadow]","duration-fast","ease-out","focus-visible:shadow-default"],q=m.cva(["inline-flex","items-center","gap-2","cursor-pointer","outline-none"],{variants:{variant:{inline:["rounded-sm","text-link","dark:text-link-dark","no-underline","hover:underline","hover:underline-offset-4","active:text-link/80","visited:text-link-visited","visited:dark:text-link-visited-dark","transition-[text-decoration,text-decoration-color,text-underline-offset,color]","duration-fast","ease-out","focus-visible:shadow-default"],filled:[...a,"bg-secondary","text-secondary-foreground","hover:bg-secondary/80"],outline:[...a,"border","border-input","border-solid","bg-background","text-foreground","hover:bg-accent","hover:text-accent-foreground","dark:bg-input/30","dark:border-input","dark:hover:bg-input/50","dark:hover:border-input"],ghost:[...a,"bg-transparent","text-foreground","hover:bg-accent"],icon:[...a,"w-9","px-0","bg-transparent","text-foreground","hover:bg-accent"]}},defaultVariants:{variant:"inline"}}),u=S.forwardRef(({className:e,variant:t="inline",dataHook:n,trackingEl:r,trackingLabel:f,asChild:b=!1,external:i=!1,showExternalIcon:g=!0,children:s,...k},p)=>{const x=i?{target:"_blank",rel:"noopener noreferrer"}:{},v=t==="inline"?"link-default":`link-${t}`,l={ref:p,className:j.cn(q({variant:t}),e),"data-hook":n,"data-slot":"link","data-tracking-el":r||v,"data-tracking-label":f,...x,...k},c=i&&g&&o.jsx(y.ExternalLink,{"aria-hidden":"true","data-slot":"external-icon"});return b?o.jsxs(d.Slot,{...l,children:[o.jsx(d.Slottable,{children:s}),c]}):o.jsxs("a",{...l,children:[s,c]})});u.displayName="Link";exports.Link=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),m=require("react"),y=require("@brightlocal/icons"),u=require("@radix-ui/react-slot"),j=require("class-variance-authority"),S=require("@brightlocal/ui-components/button"),a=require("@brightlocal/ui-components/lib/utils");function q(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const O=q(m),_=new Set(["aria-disabled:opacity-50","aria-invalid:ring-destructive/20","dark:aria-invalid:ring-destructive/40","aria-invalid:border-destructive","data-[state=open]:bg-accent"]),i=t=>a.cn(S.ButtonVariants({variant:t,size:"default"}).split(/\s+/).filter(e=>e&&!_.has(e)).join(" "),"no-underline"),w=j.cva("",{variants:{variant:{inline:["inline-flex","items-center","gap-2","cursor-pointer","outline-none","rounded-sm","text-link","dark:text-link-dark","no-underline","hover:underline","hover:underline-offset-4","active:text-link/80","visited:text-link-visited","visited:dark:text-link-visited-dark","transition-[text-decoration,text-decoration-color,text-underline-offset,color]","duration-fast","ease-out","focus-visible:shadow-default"],inherit:["inline","cursor-pointer","outline-none","rounded-sm","text-inherit","underline","underline-offset-4","decoration-current/60","hover:decoration-current","[&_svg]:ml-1","[&_svg]:inline","[&_svg]:align-text-bottom","transition-[text-decoration-color]","duration-fast","ease-out","focus-visible:shadow-default"],primary:i("primary"),filled:i("secondary"),outline:a.cn(i("outline"),"text-foreground"),ghost:i("ghost"),icon:a.cn(i("ghost"),"size-9 p-0")}},defaultVariants:{variant:"inline"}}),f=O.forwardRef(({className:t,variant:e="inline",dataHook:n,trackingEl:r,trackingLabel:k,asChild:g=!1,external:s=!1,showExternalIcon:v=!0,children:l,...x},b)=>{const p=s?{target:"_blank",rel:"noopener noreferrer"}:{},h=e==="inline"?"link-default":`link-${e}`,c={ref:b,className:a.cn(w({variant:e}),t),"data-hook":n,"data-slot":"link","data-tracking-el":r||h,"data-tracking-label":k,...p,...x},d=s&&v&&o.jsx(y.ExternalLink,{"aria-hidden":"true","data-slot":"external-icon"});return g?o.jsxs(u.Slot,{...c,children:[o.jsx(u.Slottable,{children:l}),d]}):o.jsxs("a",{...c,children:[l,d]})});f.displayName="Link";exports.Link=f;
package/dist/link.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from "react";
3
3
  declare const linkVariants: (props?: ({
4
- variant?: "inline" | "ghost" | "filled" | "icon" | "outline" | null | undefined;
4
+ variant?: "inherit" | "inline" | "ghost" | "filled" | "icon" | "outline" | "primary" | null | undefined;
5
5
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
6
  /** Supported visual style variants for the Link component. */
7
7
  export type LinkVariant = NonNullable<VariantProps<typeof linkVariants>["variant"]>;
@@ -11,7 +11,10 @@ export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>
11
11
  */
12
12
  dataHook: string;
13
13
  /**
14
- * Visual style variant. `inline` renders a standard text link; `filled`,
14
+ * Visual style variant. `inline` renders a standard text link; `inherit`
15
+ * renders an always-underlined link that takes the surrounding text colour
16
+ * (for links inside body copy, alerts and muted text); `primary` renders
17
+ * the brand CTA treatment (matches `Button variant="primary"`); `filled`,
15
18
  * `outline` and `ghost` render button-styled treatments for inline actions
16
19
  * and high-priority navigation; `icon` renders a circular icon-only link
17
20
  * (provide an `aria-label` since there is no text content).
@@ -1 +1 @@
1
- {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/components/link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AA0BlE,QAAA,MAAM,YAAY;;8EAyEjB,CAAC;AAEF,8DAA8D;AAC9D,MAAM,MAAM,WAAW,GAAG,WAAW,CACnC,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC,SAAS,CAAC,CAC7C,CAAC;AAEF,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAC9E;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,QAAA,MAAM,IAAI,qFAwDT,CAAC;AAIF,OAAO,EAAE,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/components/link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAmClE,QAAA,MAAM,YAAY;;8EAsFjB,CAAC;AAEF,8DAA8D;AAC9D,MAAM,MAAM,WAAW,GAAG,WAAW,CACnC,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC,SAAS,CAAC,CAC7C,CAAC;AAEF,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAC9E;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,QAAA,MAAM,IAAI,qFAwDT,CAAC;AAIF,OAAO,EAAE,IAAI,EAAE,CAAC"}
package/dist/link.js CHANGED
@@ -1,34 +1,35 @@
1
- import { jsxs as i, jsx as d } from "react/jsx-runtime";
1
+ import { jsxs as s, jsx as d } from "react/jsx-runtime";
2
2
  import * as h from "react";
3
- import { ExternalLink as v } from "@brightlocal/icons";
4
- import { Slot as m, Slottable as w } from "@radix-ui/react-slot";
5
- import { cva as y } from "class-variance-authority";
6
- import { cn as j } from "@brightlocal/ui-components/lib/utils";
7
- const e = [
8
- "justify-center",
9
- "h-9",
10
- "px-4",
11
- "py-2",
12
- "rounded-full",
13
- "text-sm",
14
- "font-semibold",
15
- "no-underline",
16
- "whitespace-nowrap",
17
- "shrink-0",
18
- "[&_svg]:pointer-events-none",
19
- "[&_svg]:shrink-0",
20
- "transition-[color,background-color,border-color,box-shadow]",
21
- "duration-fast",
22
- "ease-out",
23
- "focus-visible:shadow-default"
24
- ], L = y(
25
- // `gap-2` (spacing/2) keeps the icon–text gap consistent across all variants.
26
- ["inline-flex", "items-center", "gap-2", "cursor-pointer", "outline-none"],
3
+ import { ExternalLink as b } from "@brightlocal/icons";
4
+ import { Slot as y, Slottable as S } from "@radix-ui/react-slot";
5
+ import { cva as w } from "class-variance-authority";
6
+ import { ButtonVariants as L } from "@brightlocal/ui-components/button";
7
+ import { cn as n } from "@brightlocal/ui-components/lib/utils";
8
+ const _ = /* @__PURE__ */ new Set([
9
+ "aria-disabled:opacity-50",
10
+ "aria-invalid:ring-destructive/20",
11
+ "dark:aria-invalid:ring-destructive/40",
12
+ "aria-invalid:border-destructive",
13
+ "data-[state=open]:bg-accent"
14
+ ]), e = (i) => n(
15
+ L({ variant: i, size: "default" }).split(/\s+/).filter((t) => t && !_.has(t)).join(" "),
16
+ "no-underline"
17
+ ), j = w(
18
+ // No shared base: the button-styled variants carry the Button base classes,
19
+ // and a base here would be silently overridden by them in tailwind-merge
20
+ // (last wins). Each variant is self-contained.
21
+ "",
27
22
  {
28
23
  variants: {
29
24
  variant: {
30
25
  // Inline text link (default) — the original Link styling.
26
+ // `gap-2` (spacing/2) matches the Button icon–text gap.
31
27
  inline: [
28
+ "inline-flex",
29
+ "items-center",
30
+ "gap-2",
31
+ "cursor-pointer",
32
+ "outline-none",
32
33
  "rounded-sm",
33
34
  // Color tokens (light mode: #2563EB, dark mode: #3B82F6)
34
35
  "text-link",
@@ -47,86 +48,91 @@ const e = [
47
48
  // Focus state
48
49
  "focus-visible:shadow-default"
49
50
  ],
50
- // Button-styled, filled (maps to Button `secondary`).
51
- filled: [
52
- ...e,
53
- "bg-secondary",
54
- "text-secondary-foreground",
55
- "hover:bg-secondary/80"
56
- ],
57
- // Button-styled, bordered. Uses the `input` border token in both modes
58
- // and keeps that border on focus (focus is the shared shadow ring only).
59
- outline: [
60
- ...e,
61
- "border",
62
- "border-input",
63
- "border-solid",
64
- "bg-background",
65
- "text-foreground",
66
- "hover:bg-accent",
67
- "hover:text-accent-foreground",
68
- "dark:bg-input/30",
69
- "dark:border-input",
70
- "dark:hover:bg-input/50",
71
- "dark:hover:border-input"
72
- ],
73
- // Button-styled, transparent (maps to Button `ghost`).
74
- ghost: [
75
- ...e,
76
- "bg-transparent",
77
- "text-foreground",
78
- "hover:bg-accent"
51
+ // Inline link that reads as part of the surrounding sentence: no
52
+ // link colour of its own — `color: inherit` picks up whatever the
53
+ // parent text sets (muted body copy, alert foregrounds, ...).
54
+ // Because colour no longer distinguishes the link from the text
55
+ // around it, the underline is the only affordance and is therefore
56
+ // persistent (WCAG 1.4.1) — hover feedback comes from the underline
57
+ // strengthening, not from a colour change. Deliberately no `visited:`
58
+ // styling: a purple visited colour would break the "part of the
59
+ // sentence" goal. Plain `inline` display (not `inline-flex`) so the
60
+ // link wraps naturally across lines inside a paragraph.
61
+ inherit: [
62
+ "inline",
63
+ "cursor-pointer",
64
+ "outline-none",
65
+ "rounded-sm",
66
+ "text-inherit",
67
+ // Persistent underline; softened until hovered
68
+ "underline",
69
+ "underline-offset-4",
70
+ "decoration-current/60",
71
+ "hover:decoration-current",
72
+ // External icon sits in the text flow with the label
73
+ "[&_svg]:ml-1",
74
+ "[&_svg]:inline",
75
+ "[&_svg]:align-text-bottom",
76
+ // Transitions
77
+ "transition-[text-decoration-color]",
78
+ "duration-fast",
79
+ "ease-out",
80
+ // Focus state
81
+ "focus-visible:shadow-default"
79
82
  ],
83
+ // Button-styled, brand CTA (matches Button `primary`).
84
+ primary: e("primary"),
85
+ // Button-styled, filled (maps to Button `secondary`).
86
+ filled: e("secondary"),
87
+ // Button-styled, bordered (matches Button `outline`). Button's outline
88
+ // declares no text color (buttons default sensibly; anchors inherit
89
+ // ambient/link colors), so links must pin `text-foreground` explicitly.
90
+ outline: n(e("outline"), "text-foreground"),
91
+ // Button-styled, transparent (matches Button `ghost`).
92
+ ghost: e("ghost"),
80
93
  // Icon-only, circular. Mirrors `ghost` in a fixed 36px square
81
- // footprint for icon-only links (e.g. back navigation).
82
- // Requires an `aria-label` since there is no text content.
83
- icon: [
84
- ...e,
85
- "w-9",
86
- "px-0",
87
- "bg-transparent",
88
- "text-foreground",
89
- "hover:bg-accent"
90
- ]
94
+ // footprint — the same `size-9 p-0` Button applies to icon-only
95
+ // buttons. Requires an `aria-label` since there is no text content.
96
+ icon: n(e("ghost"), "size-9 p-0")
91
97
  }
92
98
  },
93
99
  defaultVariants: {
94
100
  variant: "inline"
95
101
  }
96
102
  }
97
- ), S = h.forwardRef(
103
+ ), V = h.forwardRef(
98
104
  ({
99
- className: s,
105
+ className: i,
100
106
  variant: t = "inline",
101
- dataHook: l,
102
- trackingEl: c,
103
- trackingLabel: u,
104
- asChild: f = !1,
107
+ dataHook: c,
108
+ trackingEl: u,
109
+ trackingLabel: f,
110
+ asChild: k = !1,
105
111
  external: r = !1,
106
- showExternalIcon: k = !0,
107
- children: n,
108
- ...b
109
- }, p) => {
110
- const g = r ? { target: "_blank", rel: "noopener noreferrer" } : {}, x = t === "inline" ? "link-default" : `link-${t}`, o = {
111
- ref: p,
112
- className: j(L({ variant: t }), s),
113
- "data-hook": l,
112
+ showExternalIcon: m = !0,
113
+ children: o,
114
+ ...p
115
+ }, v) => {
116
+ const x = r ? { target: "_blank", rel: "noopener noreferrer" } : {}, g = t === "inline" ? "link-default" : `link-${t}`, a = {
117
+ ref: v,
118
+ className: n(j({ variant: t }), i),
119
+ "data-hook": c,
114
120
  "data-slot": "link",
115
- "data-tracking-el": c || x,
116
- "data-tracking-label": u,
117
- ...g,
118
- ...b
119
- }, a = r && k && /* @__PURE__ */ d(v, { "aria-hidden": "true", "data-slot": "external-icon" });
120
- return f ? /* @__PURE__ */ i(m, { ...o, children: [
121
- /* @__PURE__ */ d(w, { children: n }),
122
- a
123
- ] }) : /* @__PURE__ */ i("a", { ...o, children: [
124
- n,
125
- a
121
+ "data-tracking-el": u || g,
122
+ "data-tracking-label": f,
123
+ ...x,
124
+ ...p
125
+ }, l = r && m && /* @__PURE__ */ d(b, { "aria-hidden": "true", "data-slot": "external-icon" });
126
+ return k ? /* @__PURE__ */ s(y, { ...a, children: [
127
+ /* @__PURE__ */ d(S, { children: o }),
128
+ l
129
+ ] }) : /* @__PURE__ */ s("a", { ...a, children: [
130
+ o,
131
+ l
126
132
  ] });
127
133
  }
128
134
  );
129
- S.displayName = "Link";
135
+ V.displayName = "Link";
130
136
  export {
131
- S as Link
137
+ V as Link
132
138
  };
package/dist/list.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),k=require("react"),w=require("@radix-ui/react-slot"),R=require("class-variance-authority"),o=require("@brightlocal/ui-components/lib/utils"),d=require("@brightlocal/ui-components/skeleton");function S(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const r=S(k),c=R.cva(["flex","items-center","gap-4","rounded-lg","py-2","pr-2","pl-4","transition-colors","duration-fast","ease-out"],{variants:{variant:{default:[],filled:["bg-card"],outline:["bg-background","border","border-border"],loading:["flex-col","gap-2","px-0","pt-0","pb-3"]}},defaultVariants:{variant:"filled"}}),m=r.forwardRef(({className:e,dataHook:a,trackingEl:t,trackingLabel:n,...i},l)=>s.jsx("ul",{ref:l,className:o.cn("flex flex-col gap-2",e),"data-hook":a,"data-slot":"list","data-tracking-el":t,"data-tracking-label":n,...i}));m.displayName="List";const f=r.forwardRef(({asChild:e=!1,className:a,variant:t,dataHook:n,trackingEl:i,trackingLabel:l,children:N,...j},y)=>{const h=e?w.Slot:"li";return s.jsx(h,{ref:y,className:o.cn(c({variant:t}),a),"data-hook":n,"data-slot":"item","data-tracking-el":i,"data-tracking-label":l,...j,children:t==="loading"?s.jsxs(s.Fragment,{children:[s.jsx(d.Skeleton,{className:"h-4 w-full"}),s.jsx(d.Skeleton,{className:"h-4 w-full"})]}):N})});f.displayName="Item";const u=r.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("shrink-0",e),"data-slot":"item-media",...a}));u.displayName="ItemMedia";const p=r.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("flex flex-1 flex-col gap-1",e),"data-slot":"item-content",...a}));p.displayName="ItemContent";const g=r.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("text-foreground text-base leading-normal font-medium",e),"data-slot":"item-title",...a}));g.displayName="ItemTitle";const x=r.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("text-muted-foreground text-sm leading-normal font-normal",e),"data-slot":"item-description",...a}));x.displayName="ItemDescription";const b=r.forwardRef(({className:e,...a},t)=>s.jsx("div",{ref:t,className:o.cn("text-muted-foreground flex size-9 shrink-0 items-center justify-center rounded-full",e),"data-slot":"item-actions",...a}));b.displayName="ItemActions";const I=r.forwardRef(({className:e,dataHook:a,...t},n)=>s.jsx("li",{ref:n,className:o.cn("text-muted-foreground flex items-center py-2 pr-2 pl-4 text-base leading-none font-medium",e),"data-hook":a,"data-slot":"item-subheader",...t}));I.displayName="ItemSubheader";exports.Item=f;exports.ItemActions=b;exports.ItemContent=p;exports.ItemDescription=x;exports.ItemMedia=u;exports.ItemSubheader=I;exports.ItemTitle=g;exports.List=m;exports.itemVariants=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),k=require("react"),h=require("@radix-ui/react-slot"),R=require("class-variance-authority"),n=require("@brightlocal/ui-components/lib/utils"),v=require("@brightlocal/ui-components/skeleton");function w(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const r=w(k),d=R.cva(["flex","items-center","gap-4","rounded-lg","py-2","pr-2","pl-4","transition-colors","duration-fast","ease-out"],{variants:{variant:{default:[],filled:["bg-card"],outline:["bg-background","border","border-border"],loading:["p-0"]}},defaultVariants:{variant:"filled"}}),c=r.forwardRef(({className:e,dataHook:a,trackingEl:t,trackingLabel:s,...i},l)=>o.jsx("ul",{ref:l,className:n.cn("flex flex-col gap-2",e),"data-hook":a,"data-slot":"list","data-tracking-el":t,"data-tracking-label":s,...i}));c.displayName="List";const m=r.forwardRef(({asChild:e=!1,className:a,variant:t,dataHook:s,trackingEl:i,trackingLabel:l,children:I,...N},y)=>{const j=e?h.Slot:"li";return o.jsx(j,{ref:y,className:n.cn(d({variant:t}),a),"data-hook":s,"data-slot":"item","data-tracking-el":i,"data-tracking-label":l,...N,children:t==="loading"?o.jsx(v.Skeleton,{className:"h-13 w-full rounded-lg"}):I})});m.displayName="Item";const f=r.forwardRef(({className:e,...a},t)=>o.jsx("div",{ref:t,className:n.cn("shrink-0",e),"data-slot":"item-media",...a}));f.displayName="ItemMedia";const u=r.forwardRef(({className:e,...a},t)=>o.jsx("div",{ref:t,className:n.cn("flex flex-1 flex-col gap-1",e),"data-slot":"item-content",...a}));u.displayName="ItemContent";const p=r.forwardRef(({className:e,...a},t)=>o.jsx("div",{ref:t,className:n.cn("text-foreground text-base leading-normal font-medium",e),"data-slot":"item-title",...a}));p.displayName="ItemTitle";const g=r.forwardRef(({className:e,...a},t)=>o.jsx("div",{ref:t,className:n.cn("text-muted-foreground text-sm leading-normal font-normal",e),"data-slot":"item-description",...a}));g.displayName="ItemDescription";const x=r.forwardRef(({className:e,...a},t)=>o.jsx("div",{ref:t,className:n.cn("text-muted-foreground flex size-9 shrink-0 items-center justify-center rounded-full",e),"data-slot":"item-actions",...a}));x.displayName="ItemActions";const b=r.forwardRef(({className:e,dataHook:a,...t},s)=>o.jsx("li",{ref:s,className:n.cn("text-muted-foreground flex items-center py-2 pr-2 pl-4 text-base leading-none font-medium",e),"data-hook":a,"data-slot":"item-subheader",...t}));b.displayName="ItemSubheader";exports.Item=m;exports.ItemActions=x;exports.ItemContent=u;exports.ItemDescription=g;exports.ItemMedia=f;exports.ItemSubheader=b;exports.ItemTitle=p;exports.List=c;exports.itemVariants=d;
package/dist/list.js CHANGED
@@ -1,10 +1,10 @@
1
- import { jsx as o, jsxs as p, Fragment as u } from "react/jsx-runtime";
2
- import * as l from "react";
3
- import { Slot as g } from "@radix-ui/react-slot";
4
- import { cva as x } from "class-variance-authority";
5
- import { cn as r } from "@brightlocal/ui-components/lib/utils";
6
- import { Skeleton as m } from "@brightlocal/ui-components/skeleton";
7
- const N = x(
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import * as r from "react";
3
+ import { Slot as c } from "@radix-ui/react-slot";
4
+ import { cva as p } from "class-variance-authority";
5
+ import { cn as i } from "@brightlocal/ui-components/lib/utils";
6
+ import { Skeleton as u } from "@brightlocal/ui-components/skeleton";
7
+ const g = p(
8
8
  [
9
9
  "flex",
10
10
  "items-center",
@@ -23,86 +23,88 @@ const N = x(
23
23
  default: [],
24
24
  filled: ["bg-card"],
25
25
  outline: ["bg-background", "border", "border-border"],
26
- loading: ["flex-col", "gap-2", "px-0", "pt-0", "pb-3"]
26
+ loading: ["p-0"]
27
27
  }
28
28
  },
29
29
  defaultVariants: {
30
30
  variant: "filled"
31
31
  }
32
32
  }
33
- ), b = l.forwardRef(
34
- ({ className: t, dataHook: a, trackingEl: e, trackingLabel: s, ...i }, d) => /* @__PURE__ */ o(
33
+ ), x = r.forwardRef(
34
+ ({ className: t, dataHook: a, trackingEl: e, trackingLabel: l, ...d }, s) => /* @__PURE__ */ o(
35
35
  "ul",
36
36
  {
37
- ref: d,
38
- className: r("flex flex-col gap-2", t),
37
+ ref: s,
38
+ className: i("flex flex-col gap-2", t),
39
39
  "data-hook": a,
40
40
  "data-slot": "list",
41
41
  "data-tracking-el": e,
42
- "data-tracking-label": s,
43
- ...i
42
+ "data-tracking-label": l,
43
+ ...d
44
44
  }
45
45
  )
46
46
  );
47
- b.displayName = "List";
48
- const I = l.forwardRef(
47
+ x.displayName = "List";
48
+ const N = r.forwardRef(
49
49
  ({
50
50
  asChild: t = !1,
51
51
  className: a,
52
52
  variant: e,
53
- dataHook: s,
54
- trackingEl: i,
55
- trackingLabel: d,
56
- children: n,
57
- ...f
58
- }, c) => /* @__PURE__ */ o(
59
- t ? g : "li",
53
+ dataHook: l,
54
+ trackingEl: d,
55
+ trackingLabel: s,
56
+ children: m,
57
+ ...n
58
+ }, f) => /* @__PURE__ */ o(
59
+ t ? c : "li",
60
60
  {
61
- ref: c,
62
- className: r(N({ variant: e }), a),
63
- "data-hook": s,
61
+ ref: f,
62
+ className: i(g({ variant: e }), a),
63
+ "data-hook": l,
64
64
  "data-slot": "item",
65
- "data-tracking-el": i,
66
- "data-tracking-label": d,
67
- ...f,
68
- children: e === "loading" ? /* @__PURE__ */ p(u, { children: [
69
- /* @__PURE__ */ o(m, { className: "h-4 w-full" }),
70
- /* @__PURE__ */ o(m, { className: "h-4 w-full" })
71
- ] }) : n
65
+ "data-tracking-el": d,
66
+ "data-tracking-label": s,
67
+ ...n,
68
+ children: e === "loading" ? (
69
+ /* One skeleton per data row, mirroring the filled row's footprint:
70
+ h-13 = py-2 × 2 + the size-9 actions slot that drives the row's
71
+ height, so nothing shifts when the content arrives. */
72
+ /* @__PURE__ */ o(u, { className: "h-13 w-full rounded-lg" })
73
+ ) : m
72
74
  }
73
75
  )
74
76
  );
75
- I.displayName = "Item";
76
- const h = l.forwardRef(
77
+ N.displayName = "Item";
78
+ const I = r.forwardRef(
77
79
  ({ className: t, ...a }, e) => /* @__PURE__ */ o(
78
80
  "div",
79
81
  {
80
82
  ref: e,
81
- className: r("shrink-0", t),
83
+ className: i("shrink-0", t),
82
84
  "data-slot": "item-media",
83
85
  ...a
84
86
  }
85
87
  )
86
88
  );
87
- h.displayName = "ItemMedia";
88
- const k = l.forwardRef(
89
+ I.displayName = "ItemMedia";
90
+ const b = r.forwardRef(
89
91
  ({ className: t, ...a }, e) => /* @__PURE__ */ o(
90
92
  "div",
91
93
  {
92
94
  ref: e,
93
- className: r("flex flex-1 flex-col gap-1", t),
95
+ className: i("flex flex-1 flex-col gap-1", t),
94
96
  "data-slot": "item-content",
95
97
  ...a
96
98
  }
97
99
  )
98
100
  );
99
- k.displayName = "ItemContent";
100
- const y = l.forwardRef(
101
+ b.displayName = "ItemContent";
102
+ const k = r.forwardRef(
101
103
  ({ className: t, ...a }, e) => /* @__PURE__ */ o(
102
104
  "div",
103
105
  {
104
106
  ref: e,
105
- className: r(
107
+ className: i(
106
108
  "text-foreground text-base leading-normal font-medium",
107
109
  t
108
110
  ),
@@ -111,13 +113,13 @@ const y = l.forwardRef(
111
113
  }
112
114
  )
113
115
  );
114
- y.displayName = "ItemTitle";
115
- const w = l.forwardRef(
116
+ k.displayName = "ItemTitle";
117
+ const y = r.forwardRef(
116
118
  ({ className: t, ...a }, e) => /* @__PURE__ */ o(
117
119
  "div",
118
120
  {
119
121
  ref: e,
120
- className: r(
122
+ className: i(
121
123
  "text-muted-foreground text-sm leading-normal font-normal",
122
124
  t
123
125
  ),
@@ -126,13 +128,13 @@ const w = l.forwardRef(
126
128
  }
127
129
  )
128
130
  );
129
- w.displayName = "ItemDescription";
130
- const R = l.forwardRef(
131
+ y.displayName = "ItemDescription";
132
+ const h = r.forwardRef(
131
133
  ({ className: t, ...a }, e) => /* @__PURE__ */ o(
132
134
  "div",
133
135
  {
134
136
  ref: e,
135
- className: r(
137
+ className: i(
136
138
  "text-muted-foreground flex size-9 shrink-0 items-center justify-center rounded-full",
137
139
  t
138
140
  ),
@@ -141,13 +143,13 @@ const R = l.forwardRef(
141
143
  }
142
144
  )
143
145
  );
144
- R.displayName = "ItemActions";
145
- const v = l.forwardRef(
146
- ({ className: t, dataHook: a, ...e }, s) => /* @__PURE__ */ o(
146
+ h.displayName = "ItemActions";
147
+ const w = r.forwardRef(
148
+ ({ className: t, dataHook: a, ...e }, l) => /* @__PURE__ */ o(
147
149
  "li",
148
150
  {
149
- ref: s,
150
- className: r(
151
+ ref: l,
152
+ className: i(
151
153
  "text-muted-foreground flex items-center py-2 pr-2 pl-4 text-base leading-none font-medium",
152
154
  t
153
155
  ),
@@ -157,15 +159,15 @@ const v = l.forwardRef(
157
159
  }
158
160
  )
159
161
  );
160
- v.displayName = "ItemSubheader";
162
+ w.displayName = "ItemSubheader";
161
163
  export {
162
- I as Item,
163
- R as ItemActions,
164
- k as ItemContent,
165
- w as ItemDescription,
166
- h as ItemMedia,
167
- v as ItemSubheader,
168
- y as ItemTitle,
169
- b as List,
170
- N as itemVariants
164
+ N as Item,
165
+ h as ItemActions,
166
+ b as ItemContent,
167
+ y as ItemDescription,
168
+ I as ItemMedia,
169
+ w as ItemSubheader,
170
+ k as ItemTitle,
171
+ x as List,
172
+ g as itemVariants
171
173
  };
package/dist/progress.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),S=require("react"),$=require("@radix-ui/react-progress"),q=require("framer-motion"),i=require("@brightlocal/ui-components/lib/utils"),_=require("@brightlocal/ui-components/hooks/use-prefers-reduced-motion"),v=require("./lib/motion.cjs");function h(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const b=h(S),p=h($),m={green:{track:"bg-brand-primary-foreground/20",indicator:"bg-green-400"},red:{track:"bg-brand-red/20",indicator:"bg-brand-red"},orange:{track:"bg-brand-orange/20",indicator:"bg-brand-orange"},yellow:{track:"bg-brand-yellow/20",indicator:"bg-brand-yellow"}};function I(e,t,r){if(e==null)return"–";if(r==="%")return`${t>0?Math.min(100,Math.max(0,Math.round(e/t*100))):0}%`;const n=r?` ${r}`:"";return t>0?`${e} / ${t}${n}`:`${e}${n}`}const P=b.forwardRef(({className:e,value:t,max:r=100,dataHook:n,trackingEl:c,trackingLabel:y,ariaLabel:j="Progress",label:d,color:x="green",showValue:s=!1,unit:M="%",indicatorClassName:k,disabled:l,...R},N)=>{const g=b.useId(),a=!!d,w=_.usePrefersReducedMotion(),u=m[x]??m.green,O=r>0?Math.min(100,Math.max(0,(t??0)/r*100)):0,f=o.jsx(p.Root,{ref:N,"aria-label":a?void 0:j,"aria-labelledby":a?g:void 0,className:i.cn("relative h-2 w-full overflow-hidden rounded-full",u.track,!a&&!s&&l&&"opacity-50",e),"data-hook":n,"data-slot":"progress","data-tracking-el":c,"data-tracking-label":y,max:r,value:t,...R,children:o.jsx(p.Indicator,{asChild:!0,children:o.jsx(q.motion.div,{animate:{transform:`translateX(-${100-O}%)`},className:i.cn("h-full w-full flex-1",u.indicator,k),"data-slot":"progress-indicator",initial:!1,transition:w?{duration:0}:v.SPRING_GENTLE})})});return!a&&!s?f:o.jsxs("div",{className:i.cn("flex w-full items-center gap-2",l&&"opacity-50"),"data-slot":"progress-wrapper",children:[a&&o.jsx("span",{className:"text-foreground text-xs leading-none font-medium","data-slot":"progress-label",id:g,children:d}),f,s&&o.jsx("span",{className:"text-muted-foreground shrink-0 text-xs leading-none tabular-nums","data-slot":"progress-value",children:I(t,r,M)})]})});P.displayName="Progress";exports.Progress=P;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),B=require("react"),C=require("@radix-ui/react-progress"),G=require("framer-motion"),a=require("@brightlocal/ui-components/lib/utils"),H=require("@brightlocal/ui-components/hooks/use-prefers-reduced-motion"),Y=require("./lib/motion.cjs");function _(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,o.get?o:{enumerable:!0,get:()=>r[e]})}}return t.default=r,Object.freeze(t)}const S=_(B),b=_(C),k={sm:{text:"text-sm",bar:"h-2"},md:{text:"text-base",bar:"h-3"}},R={green:{track:"bg-brand-primary-foreground/20",indicator:"bg-green-400"},red:{track:"bg-brand-red/20",indicator:"bg-brand-red"},orange:{track:"bg-brand-orange/20",indicator:"bg-brand-orange"},yellow:{track:"bg-brand-yellow/20",indicator:"bg-brand-yellow"}},D="40%";function M(r,t,e){if(r==null)return"–";if(e==="%")return`${t>0?Math.min(100,Math.max(0,Math.round(r/t*100))):0}%`;const o=e?` ${e}`:"";return t>0?`${r} / ${t}${o}`:`${r}${o}`}const L=S.forwardRef(({className:r,value:t,max:e=100,dataHook:o,trackingEl:m,trackingLabel:O,ariaLabel:$="Progress",label:h,labelWidth:x=D,color:q="green",size:E="sm",showValue:I=!1,unit:w="%",indicatorClassName:j,statusDescription:l,indeterminate:d=!1,disabled:u,...T},z)=>{const y=S.useId(),n=!!h,v=H.usePrefersReducedMotion(),g=R[q]??R.green,i=k[E]??k.sm,f=x==="auto",c=I&&!d,p=l!=null&&l!==!1,V=n||c,A=e>0?Math.min(100,Math.max(0,(t??0)/e*100)):0,P=s.jsx(b.Root,{ref:z,"aria-label":n?void 0:$,"aria-labelledby":n?y:void 0,className:a.cn("relative w-full overflow-hidden rounded-full",V&&"min-w-0 flex-1",i.bar,g.track,!n&&!c&&u&&"opacity-50",r),"data-hook":o,"data-slot":"progress","data-tracking-el":m,"data-tracking-label":O,max:e,value:d?null:t??0,...T,children:d?s.jsx(b.Indicator,{asChild:!0,children:s.jsx("div",{className:a.cn("h-full w-2/5 rounded-full",g.indicator,v?"translate-x-[75%]":"animate-ambient-sweep",j),"data-slot":"progress-indicator"})}):s.jsx(b.Indicator,{asChild:!0,children:s.jsx(G.motion.div,{animate:{transform:`translateX(-${100-A}%)`},className:a.cn("h-full w-full flex-1",g.indicator,j),"data-slot":"progress-indicator",initial:!1,transition:v?{duration:0}:Y.SPRING_GENTLE})})});if(!n&&!c&&!p)return P;const N=s.jsxs("div",{className:a.cn("flex w-full items-center gap-2",!p&&u&&"opacity-50"),"data-slot":"progress-wrapper",children:[n&&s.jsx("span",{className:a.cn("text-foreground shrink-0 font-medium break-words",f&&"max-w-2/5",i.text),"data-label-width":f?"auto":void 0,"data-slot":"progress-label",id:y,style:f?void 0:{width:x},children:h}),P,c&&s.jsxs("span",{className:a.cn("text-muted-foreground grid min-w-10 shrink-0 text-right tabular-nums",i.text),"data-slot":"progress-value",children:[s.jsx("span",{"aria-hidden":"true",className:"invisible col-start-1 row-start-1","data-slot":"progress-value-sizer",children:M(e,e,w)}),s.jsx("span",{className:"col-start-1 row-start-1","data-slot":"progress-value-text",children:M(t,e,w)})]})]});return p?s.jsxs("div",{className:a.cn("flex w-full flex-col gap-2",u&&"opacity-50"),"data-slot":"progress-status-wrapper",children:[s.jsx("span",{"aria-live":"polite",className:a.cn("text-muted-foreground",i.text),"data-slot":"progress-status",children:l}),N]}):N});L.displayName="Progress";exports.Progress=L;