@vkzstudio/muza-ui 1.0.29 → 1.0.30

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.
@@ -31,6 +31,10 @@ export interface CheckboxProps extends ComponentProps<typeof CheckboxPrimitive.R
31
31
  required?: boolean;
32
32
  /** Hides the required asterisk even when `required` is true. @default false */
33
33
  disableRequiredAsterisk?: boolean;
34
+ /** Font weight for the primary label. When `secondaryLabel` is present, primary is always medium. @default 'regular' */
35
+ weight?: 'regular' | 'medium';
36
+ /** Applies danger styling (red) to the checkbox for destructive actions. @default false */
37
+ danger?: boolean;
34
38
  }
35
39
  export declare const Checkbox: import('react').ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
36
40
  //# sourceMappingURL=Checkbox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,SAAS,EAGf,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAA;AAK7D;;;GAGG;AACH,MAAM,WAAW,aACf,SAAQ,cAAc,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC;IACrD,0FAA0F;IAC1F,OAAO,CAAC,EAAE,OAAO,GAAG,eAAe,CAAA;IACnC,mEAAmE;IACnE,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,iFAAiF;IACjF,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,eAAe,KAAK,IAAI,CAAA;IAC9D,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kFAAkF;IAClF,eAAe,CAAC,EAAE,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,2DAA2D;IAC3D,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,mGAAmG;IACnG,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+EAA+E;IAC/E,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,wHAAwH;IACxH,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;IAC7B,2FAA2F;IAC3F,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,eAAO,MAAM,QAAQ,0HAoGpB,CAAA"}
@@ -1,31 +1,33 @@
1
- import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as u, useId as g } from "react";
3
- import * as n from "@radix-ui/react-checkbox";
4
- import { CheckMinus as v, Checked as N } from "../Icons/CustomIcons.js";
5
- import { cn as s } from "../../utils/cn.js";
6
- import { Typography as d } from "../Typography/Typography.js";
7
- const z = u(
1
+ import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as v, useId as N } from "react";
3
+ import * as c from "@radix-ui/react-checkbox";
4
+ import { CheckMinus as z, Checked as w } from "../Icons/CustomIcons.js";
5
+ import { cn as a } from "../../utils/cn.js";
6
+ import { Typography as n } from "../Typography/Typography.js";
7
+ const C = v(
8
8
  ({
9
- isIndeterminate: l = !1,
10
- label: c,
9
+ isIndeterminate: b = !1,
10
+ label: d,
11
11
  secondaryLabel: e,
12
- className: b,
13
- id: f,
14
- disabled: t,
12
+ className: f,
13
+ id: l,
14
+ disabled: o,
15
15
  error: m,
16
- required: o,
16
+ required: t,
17
17
  disableRequiredAsterisk: h,
18
+ weight: k = "regular",
19
+ danger: p,
18
20
  ...x
19
- }, k) => {
20
- const p = g(), a = f || p;
21
- return /* @__PURE__ */ i("div", { className: "isolate flex items-start gap-sm", children: [
21
+ }, u) => {
22
+ const g = N(), i = l || g;
23
+ return /* @__PURE__ */ s("div", { className: "isolate flex items-start gap-sm", children: [
22
24
  /* @__PURE__ */ r(
23
- n.Root,
25
+ c.Root,
24
26
  {
25
- ref: k,
26
- id: a,
27
+ ref: u,
28
+ id: i,
27
29
  "data-slot": "checkbox",
28
- className: s(
30
+ className: a(
29
31
  "peer relative flex size-icon-small shrink-0 cursor-pointer items-center justify-center",
30
32
  "rounded-[25%] focus-visible-default",
31
33
  'before:absolute before:inset-0 before:z-[-1] before:rounded-[25%] before:border before:border-comp-checkbox-stroke-def before:transition-colors before:content-[""]',
@@ -33,56 +35,59 @@ const z = u(
33
35
  "data-[state=checked]:text-primary-foreground data-[state=checked]:border-comp-checkbox-stroke-hover data-[state=checked]:bg-comp-checkbox-bg-active",
34
36
  "disabled:cursor-not-allowed disabled:before:border-comp-checkbox-stroke-disabled disabled:before:bg-comp-checkbox-bg-disabled",
35
37
  { "before:border-stroke-error-def": m },
36
- b
38
+ {
39
+ "before:border-comp-button-danger-stroke-def hover:before:border-comp-button-danger-stroke-hover hover:before:bg-comp-button-danger-ghost-bg-hover disabled:before:border-comp-button-danger-stroke-disabled disabled:before:bg-comp-button-danger-bg-disabled data-[state=checked]:bg-comp-button-danger-bg-def": p
40
+ },
41
+ f
37
42
  ),
38
- disabled: t,
39
- required: o,
40
- "aria-required": o,
43
+ disabled: o,
44
+ required: t,
45
+ "aria-required": t,
41
46
  ...x,
42
47
  children: /* @__PURE__ */ r(
43
- n.Indicator,
48
+ c.Indicator,
44
49
  {
45
50
  "data-slot": "checkbox-indicator",
46
51
  className: "flex size-full shrink-0 items-center justify-center text-current transition-none",
47
- children: l ? /* @__PURE__ */ r(v, { className: "size-full shrink-0 text-icon-invert-def" }) : /* @__PURE__ */ r(N, { className: "size-full shrink-0 text-icon-invert-def" })
52
+ children: b ? /* @__PURE__ */ r(z, { className: "size-full shrink-0 text-icon-invert-def" }) : /* @__PURE__ */ r(w, { className: "size-full shrink-0 text-icon-invert-def" })
48
53
  }
49
54
  )
50
55
  }
51
56
  ),
52
- c && /* @__PURE__ */ i(
57
+ d && /* @__PURE__ */ s(
53
58
  "label",
54
59
  {
55
- htmlFor: a,
56
- className: s(
60
+ htmlFor: i,
61
+ className: a(
57
62
  "fix-y-text-1 cursor-pointer leading-none text-text-dark-primary-def select-none",
58
63
  {
59
- "cursor-not-allowed text-text-dark-disabled": t
64
+ "cursor-not-allowed text-text-dark-disabled": o
60
65
  }
61
66
  ),
62
- "aria-disabled": t,
67
+ "aria-disabled": o,
63
68
  children: [
64
- /* @__PURE__ */ i(
65
- d,
69
+ /* @__PURE__ */ s(
70
+ n,
66
71
  {
67
72
  component: "span",
68
73
  variant: "body",
69
- weight: e != null && e.length ? "medium" : "regular",
74
+ weight: e != null && e.length ? "medium" : k,
70
75
  size: "base",
71
76
  children: [
72
- c,
73
- o && !h && /* @__PURE__ */ r("span", { className: "text-comp-input-text-error", children: " *" })
77
+ d,
78
+ t && !h && /* @__PURE__ */ r("span", { className: "text-comp-input-text-error", children: " *" })
74
79
  ]
75
80
  }
76
81
  ),
77
82
  (e == null ? void 0 : e.length) && /* @__PURE__ */ r(
78
- d,
83
+ n,
79
84
  {
80
85
  component: "span",
81
86
  variant: "body",
82
87
  weight: "regular",
83
88
  size: "base",
84
- className: s("block text-text-dark-secondary", {
85
- "text-text-dark-disabled": t
89
+ className: a("block text-text-dark-secondary", {
90
+ "text-text-dark-disabled": o
86
91
  }),
87
92
  children: e
88
93
  }
@@ -93,7 +98,7 @@ const z = u(
93
98
  ] });
94
99
  }
95
100
  );
96
- z.displayName = "Checkbox";
101
+ C.displayName = "Checkbox";
97
102
  export {
98
- z as Checkbox
103
+ C as Checkbox
99
104
  };
@@ -5,6 +5,7 @@ export default meta;
5
5
  type Story = StoryObj<typeof Checkbox>;
6
6
  export declare const Default: Story;
7
7
  export declare const WithLabel: Story;
8
+ export declare const MediumWeight: Story;
8
9
  export declare const WithSecondaryLabel: Story;
9
10
  export declare const Checked: Story;
10
11
  export declare const CheckedWithLabel: Story;
@@ -15,4 +16,6 @@ export declare const DisabledWithLabel: Story;
15
16
  export declare const Error: Story;
16
17
  export declare const Required: Story;
17
18
  export declare const ErrorWithLabel: Story;
19
+ export declare const Danger: Story;
20
+ export declare const DangerWithLabel: Story;
18
21
  //# sourceMappingURL=Checkbox.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CA4E/B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAA;AAEtC,eAAO,MAAM,OAAO,EAAE,KAerB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAiBvB,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KAahC,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAYrB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAa9B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAc3B,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,KAcpC,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KActB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAc/B,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAanB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAatB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAc5B,CAAA"}
1
+ {"version":3,"file":"Checkbox.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAgF/B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAA;AAEtC,eAAO,MAAM,OAAO,EAAE,KAerB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAiBvB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAc1B,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KAahC,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAYrB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAa9B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAc3B,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,KAcpC,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KActB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAc/B,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAanB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAatB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAc5B,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAcpB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAc7B,CAAA"}
@@ -49,6 +49,8 @@ export interface IMultiSelectProps {
49
49
  labelExtra?: ReactNode;
50
50
  /** Tooltip content shown in an info icon next to the label. Overridden by `labelExtra` if both are provided. */
51
51
  infoTooltip?: string;
52
+ /** Distance in pixels from viewport edge before the dropdown repositions. Passed to Radix collision padding. */
53
+ collisionPadding?: number;
52
54
  }
53
55
  export declare const MultiSelect: React.ForwardRefExoticComponent<IMultiSelectProps & React.RefAttributes<HTMLButtonElement>>;
54
56
  //# sourceMappingURL=MultiSelect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MultiSelect.d.ts","sourceRoot":"","sources":["../../../src/components/MultiSelect/MultiSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,KAA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AAW,6FAqMvB,CAAA"}
@@ -1,23 +1,23 @@
1
1
  import { jsx as r, jsxs as u } from "react/jsx-runtime";
2
- import f, { forwardRef as V, useId as $, useMemo as T, useRef as _, useEffect as B } from "react";
2
+ import f, { forwardRef as $, useId as P, useMemo as T, useRef as _, useEffect as B } from "react";
3
3
  import { triggerWrapperVariants as L } from "../Select/utils.js";
4
- import { useMuzaTranslations as P } from "../../translations/TranslationContext.js";
4
+ import { useMuzaTranslations as U } from "../../translations/TranslationContext.js";
5
5
  import { Tag as p } from "../Tag/Tag.js";
6
- import { FormField as U } from "../FormField/FormField.js";
7
- import { DropdownMenu as G, DropdownMenuTrigger as H, DropdownMenuContent as J, DropdownMenuCheckboxItem as K } from "../DropdownMenu/DropdownMenu.js";
8
- import { Typography as Q } from "../Typography/Typography.js";
9
- import { AltArrowUpOutline as X } from "@solar-icons/react-perf";
10
- import { cn as Y } from "../../utils/cn.js";
11
- const Z = V(
6
+ import { FormField as G } from "../FormField/FormField.js";
7
+ import { DropdownMenu as H, DropdownMenuTrigger as J, DropdownMenuContent as K, DropdownMenuCheckboxItem as Q } from "../DropdownMenu/DropdownMenu.js";
8
+ import { Typography as X } from "../Typography/Typography.js";
9
+ import { AltArrowUpOutline as Y } from "@solar-icons/react-perf";
10
+ import { cn as Z } from "../../utils/cn.js";
11
+ const ee = $(
12
12
  (I, h) => {
13
- const z = P(), {
13
+ const z = U(), {
14
14
  label: x,
15
15
  hint: g,
16
16
  error: b,
17
- options: c,
17
+ options: o,
18
18
  onChange: l,
19
19
  value: t,
20
- disabled: o,
20
+ disabled: c,
21
21
  prefix: d,
22
22
  maxNumberOfVisibleTags: i = 2,
23
23
  size: D,
@@ -25,8 +25,9 @@ const Z = V(
25
25
  required: v,
26
26
  disableRequiredAsterisk: W,
27
27
  labelExtra: k,
28
- infoTooltip: A
29
- } = I, w = S ?? z.select.placeholder, N = $(), C = x ? `${N}-label` : void 0, O = g ? `${N}-hint` : void 0, M = T(() => new Map(c.map((e) => [e.value, e.label])), [c]), j = T(() => {
28
+ infoTooltip: A,
29
+ collisionPadding: C
30
+ } = I, w = S ?? z.select.placeholder, N = P(), O = x ? `${N}-label` : void 0, j = g ? `${N}-hint` : void 0, M = T(() => new Map(o.map((e) => [e.value, e.label])), [o]), q = T(() => {
30
31
  const e = t && t.map((n) => M.get(n));
31
32
  return e != null && e.length ? e.length <= i ? /* @__PURE__ */ r("div", { className: "flex flex-1 items-start justify-start gap-xs", children: e.map((n, s) => /* @__PURE__ */ r(p, { variant: "info", className: "max-w-[72px]", children: n }, s)) }) : /* @__PURE__ */ r("div", { className: "flex flex-1 items-center gap-xs", children: [
32
33
  ...e.slice(0, i).map((n, s) => /* @__PURE__ */ r(
@@ -43,7 +44,7 @@ const Z = V(
43
44
  "+"
44
45
  ] }, "more")
45
46
  ] }) : /* @__PURE__ */ r(
46
- Q,
47
+ X,
47
48
  {
48
49
  size: "input",
49
50
  className: "grow-1 fix-y-text truncate text-left text-comp-select-text-placeholder",
@@ -52,10 +53,10 @@ const Z = V(
52
53
  children: w
53
54
  }
54
55
  );
55
- }, [t, w, i, M]), [y, q] = f.useState(!1), [R, E] = f.useState(0), m = f.useRef(!1), F = _(null), a = (typeof h == "function" ? null : h) ?? F;
56
+ }, [t, w, i, M]), [y, E] = f.useState(!1), [R, F] = f.useState(0), m = f.useRef(!1), V = _(null), a = (typeof h == "function" ? null : h) ?? V;
56
57
  return B(() => {
57
58
  const e = () => {
58
- a.current && E(a.current.offsetWidth);
59
+ a.current && F(a.current.offsetWidth);
59
60
  };
60
61
  e();
61
62
  const n = new ResizeObserver(e);
@@ -63,32 +64,32 @@ const Z = V(
63
64
  n.disconnect();
64
65
  };
65
66
  }, [a]), /* @__PURE__ */ r(
66
- U,
67
+ G,
67
68
  {
68
69
  label: x,
69
70
  hint: g,
70
71
  error: b,
71
72
  required: v,
72
73
  disableRequiredAsterisk: W,
73
- labelId: C,
74
- hintId: O,
74
+ labelId: O,
75
+ hintId: j,
75
76
  labelExtra: k,
76
77
  infoTooltip: A,
77
78
  children: /* @__PURE__ */ u(
78
- G,
79
+ H,
79
80
  {
80
81
  onOpenChange: (e) => {
81
- q(e);
82
+ E(e);
82
83
  },
83
84
  children: [
84
- /* @__PURE__ */ r(H, { disabled: o, asChild: !0, children: /* @__PURE__ */ r(
85
+ /* @__PURE__ */ r(J, { disabled: c, asChild: !0, children: /* @__PURE__ */ r(
85
86
  "button",
86
87
  {
87
88
  ref: a,
88
89
  type: "button",
89
90
  role: "input",
90
91
  tabIndex: 0,
91
- disabled: o,
92
+ disabled: c,
92
93
  "aria-required": v,
93
94
  className: L({
94
95
  size: D,
@@ -100,15 +101,15 @@ const Z = V(
100
101
  d && /* @__PURE__ */ r(
101
102
  "span",
102
103
  {
103
- className: o ? "text-comp-select-icon-disabled" : "text-comp-select-icon-brand-def",
104
+ className: c ? "text-comp-select-icon-disabled" : "text-comp-select-icon-brand-def",
104
105
  children: d
105
106
  }
106
107
  ),
107
- j,
108
+ q,
108
109
  /* @__PURE__ */ r(
109
- X,
110
+ Y,
110
111
  {
111
- className: Y(
112
+ className: Z(
112
113
  "transition-transform duration-200",
113
114
  y ? "rotate-0" : "rotate-180"
114
115
  )
@@ -118,7 +119,7 @@ const Z = V(
118
119
  }
119
120
  ) }),
120
121
  /* @__PURE__ */ r(
121
- J,
122
+ K,
122
123
  {
123
124
  className: "mt-1",
124
125
  style: {
@@ -127,8 +128,9 @@ const Z = V(
127
128
  onCloseAutoFocus: (e) => {
128
129
  m.current || e.preventDefault(), m.current = !1;
129
130
  },
130
- children: c.map((e) => /* @__PURE__ */ r(
131
- K,
131
+ collisionPadding: C,
132
+ children: o.map((e) => /* @__PURE__ */ r(
133
+ Q,
132
134
  {
133
135
  checked: t == null ? void 0 : t.includes(e.value),
134
136
  disabled: e.disabled,
@@ -149,7 +151,7 @@ const Z = V(
149
151
  );
150
152
  }
151
153
  );
152
- Z.displayName = "MultiSelect";
154
+ ee.displayName = "MultiSelect";
153
155
  export {
154
- Z as MultiSelect
156
+ ee as MultiSelect
155
157
  };
@@ -27,8 +27,10 @@ export interface RadioGroupItemProps extends React.ComponentProps<typeof RadioGr
27
27
  label?: string;
28
28
  /** Secondary text displayed below the primary label in lighter styling. */
29
29
  secondaryLabel?: string;
30
+ /** Font weight for the primary label. When `secondaryLabel` is present, primary is always medium. @default 'regular' */
31
+ weight?: 'regular' | 'medium';
30
32
  }
31
33
  declare const RadioGroup: ({ className, ...props }: RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
32
- declare const RadioGroupItem: ({ className, id, label, secondaryLabel, disabled, ...props }: RadioGroupItemProps) => import("react/jsx-runtime").JSX.Element;
34
+ declare const RadioGroupItem: ({ className, id, label, secondaryLabel, disabled, weight, ...props }: RadioGroupItemProps) => import("react/jsx-runtime").JSX.Element;
33
35
  export { RadioGroup, RadioGroupItem };
34
36
  //# sourceMappingURL=Radio.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAIlE;;;GAGG;AACH,MAAM,WAAW,eACf,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC;IAC7D,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kDAAkD;IAClD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,mBACf,SAAQ,KAAK,CAA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,GAAI,yBAAyB,eAAe,4CAQ3D,CAAA;AAED,QAAA,MAAM,cAAc,GAAI,sEAQrB,mBAAmB,4CAgErB,CAAA;AAED,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAA"}
@@ -1,24 +1,25 @@
1
1
  import { jsx as r, jsxs as n } from "react/jsx-runtime";
2
- import * as p from "react";
2
+ import * as b from "react";
3
3
  import * as s from "@radix-ui/react-radio-group";
4
4
  import { cn as t } from "../../utils/cn.js";
5
5
  import { Typography as m } from "../Typography/Typography.js";
6
- const x = ({ className: i, ...a }) => /* @__PURE__ */ r(
6
+ const g = ({ className: i, ...a }) => /* @__PURE__ */ r(
7
7
  s.Root,
8
8
  {
9
9
  "data-slot": "radio-group",
10
10
  className: t(i),
11
11
  ...a
12
12
  }
13
- ), g = ({
13
+ ), k = ({
14
14
  className: i,
15
15
  id: a,
16
16
  label: c,
17
17
  secondaryLabel: e,
18
18
  disabled: o,
19
- ...l
19
+ weight: l = "regular",
20
+ ...f
20
21
  }) => {
21
- const f = p.useId(), d = a || f;
22
+ const p = b.useId(), d = a || p;
22
23
  return /* @__PURE__ */ n("div", { className: "isolate flex items-start gap-sm", children: [
23
24
  /* @__PURE__ */ r(
24
25
  s.Item,
@@ -35,7 +36,7 @@ const x = ({ className: i, ...a }) => /* @__PURE__ */ r(
35
36
  ),
36
37
  id: d,
37
38
  disabled: o,
38
- ...l,
39
+ ...f,
39
40
  children: /* @__PURE__ */ r(
40
41
  s.Indicator,
41
42
  {
@@ -63,7 +64,7 @@ const x = ({ className: i, ...a }) => /* @__PURE__ */ r(
63
64
  {
64
65
  component: "span",
65
66
  variant: "body",
66
- weight: e != null && e.length ? "medium" : "regular",
67
+ weight: e != null && e.length ? "medium" : l,
67
68
  size: "base",
68
69
  children: c
69
70
  }
@@ -87,6 +88,6 @@ const x = ({ className: i, ...a }) => /* @__PURE__ */ r(
87
88
  ] });
88
89
  };
89
90
  export {
90
- x as RadioGroup,
91
- g as RadioGroupItem
91
+ g as RadioGroup,
92
+ k as RadioGroupItem
92
93
  };
@@ -5,5 +5,6 @@ export default meta;
5
5
  type Story = StoryObj<typeof RadioGroupItem>;
6
6
  export declare const Default: Story;
7
7
  export declare const Playground: Story;
8
+ export declare const MediumWeight: Story;
8
9
  export declare const WithSecondaryLabel: Story;
9
10
  //# sourceMappingURL=Radio.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/Radio.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAc,cAAc,EAAE,MAAM,SAAS,CAAA;AAEpD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAoDrC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAA;AAE5C,eAAO,MAAM,OAAO,EAAE,KAqBrB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KA0BxB,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KA6BhC,CAAA"}
1
+ {"version":3,"file":"Radio.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/Radio.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAc,cAAc,EAAE,MAAM,SAAS,CAAA;AAEpD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAwDrC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAA;AAE5C,eAAO,MAAM,OAAO,EAAE,KAqBrB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KA0BxB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAmB1B,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KA6BhC,CAAA"}
@@ -1,8 +1,8 @@
1
- import { jsxs as u, Fragment as m, jsx as n } from "react/jsx-runtime";
2
- import { ToolbarButton as h } from "./ToolbarButton.js";
3
- import { ToolbarSeparator as e } from "./ToolbarSeparator.js";
1
+ import { jsxs as h, Fragment as m, jsx as n } from "react/jsx-runtime";
2
+ import { ToolbarButton as u } from "./ToolbarButton.js";
3
+ import { ToolbarSeparator as v } from "./ToolbarSeparator.js";
4
4
  import { TextH1 as B, TextH2 as L, TextH3 as A, BulletList as T, NumberList as i } from "../Icons/CustomIcons.js";
5
- import { Flex as v } from "../Flex/Flex.js";
5
+ import { Flex as e } from "../Flex/Flex.js";
6
6
  import { UndoLeftBold as H, UndoRightBold as y, TextBoldBold as F, TextItalicBold as w, TextCrossBold as I, LinkRoundBold as N, EraserBold as S } from "@solar-icons/react-perf";
7
7
  const O = ({
8
8
  editor: l,
@@ -13,19 +13,19 @@ const O = ({
13
13
  toolbarExtra: p
14
14
  }) => {
15
15
  const g = (k, f) => typeof k == "boolean" ? k : k.includes(f);
16
- return /* @__PURE__ */ u(
17
- v,
16
+ return /* @__PURE__ */ h(
17
+ e,
18
18
  {
19
19
  wrap: "wrap",
20
20
  align: "center",
21
21
  gap: "md",
22
22
  padding: { px: "2xl", py: "md" },
23
- className: "border-b border-comp-texteditor-stroke-def",
23
+ className: "border-b border-comp-input-stroke-def",
24
24
  children: [
25
- c.history !== !1 && /* @__PURE__ */ u(m, { children: [
26
- /* @__PURE__ */ u(v, { align: "center", gap: "3xs", children: [
25
+ c.history !== !1 && /* @__PURE__ */ h(m, { children: [
26
+ /* @__PURE__ */ h(e, { align: "center", gap: "3xs", children: [
27
27
  g(c.history, "undo") && /* @__PURE__ */ n(
28
- h,
28
+ u,
29
29
  {
30
30
  icon: /* @__PURE__ */ n(H, {}),
31
31
  onClick: () => l == null ? void 0 : l.chain().focus().undo().run(),
@@ -34,7 +34,7 @@ const O = ({
34
34
  }
35
35
  ),
36
36
  g(c.history, "redo") && /* @__PURE__ */ n(
37
- h,
37
+ u,
38
38
  {
39
39
  icon: /* @__PURE__ */ n(y, {}),
40
40
  onClick: () => l == null ? void 0 : l.chain().focus().redo().run(),
@@ -43,12 +43,12 @@ const O = ({
43
43
  }
44
44
  )
45
45
  ] }),
46
- /* @__PURE__ */ n(e, {})
46
+ /* @__PURE__ */ n(v, {})
47
47
  ] }),
48
- c.headings !== !1 && /* @__PURE__ */ u(m, { children: [
49
- /* @__PURE__ */ u(v, { align: "center", gap: "3xs", children: [
48
+ c.headings !== !1 && /* @__PURE__ */ h(m, { children: [
49
+ /* @__PURE__ */ h(e, { align: "center", gap: "3xs", children: [
50
50
  g(c.headings, 1) && /* @__PURE__ */ n(
51
- h,
51
+ u,
52
52
  {
53
53
  icon: /* @__PURE__ */ n(B, {}),
54
54
  onClick: () => l == null ? void 0 : l.chain().focus().toggleHeading({ level: 1 }).run(),
@@ -58,7 +58,7 @@ const O = ({
58
58
  }
59
59
  ),
60
60
  g(c.headings, 2) && /* @__PURE__ */ n(
61
- h,
61
+ u,
62
62
  {
63
63
  icon: /* @__PURE__ */ n(L, {}),
64
64
  onClick: () => l == null ? void 0 : l.chain().focus().toggleHeading({ level: 2 }).run(),
@@ -68,7 +68,7 @@ const O = ({
68
68
  }
69
69
  ),
70
70
  g(c.headings, 3) && /* @__PURE__ */ n(
71
- h,
71
+ u,
72
72
  {
73
73
  icon: /* @__PURE__ */ n(A, {}),
74
74
  onClick: () => l == null ? void 0 : l.chain().focus().toggleHeading({ level: 3 }).run(),
@@ -78,12 +78,12 @@ const O = ({
78
78
  }
79
79
  )
80
80
  ] }),
81
- /* @__PURE__ */ n(e, {})
81
+ /* @__PURE__ */ n(v, {})
82
82
  ] }),
83
- c.formatting !== !1 && /* @__PURE__ */ u(m, { children: [
84
- /* @__PURE__ */ u(v, { align: "center", gap: "3xs", children: [
83
+ c.formatting !== !1 && /* @__PURE__ */ h(m, { children: [
84
+ /* @__PURE__ */ h(e, { align: "center", gap: "3xs", children: [
85
85
  g(c.formatting, "bold") && /* @__PURE__ */ n(
86
- h,
86
+ u,
87
87
  {
88
88
  icon: /* @__PURE__ */ n(F, {}),
89
89
  onClick: () => l == null ? void 0 : l.chain().focus().toggleBold().run(),
@@ -93,7 +93,7 @@ const O = ({
93
93
  }
94
94
  ),
95
95
  g(c.formatting, "italic") && /* @__PURE__ */ n(
96
- h,
96
+ u,
97
97
  {
98
98
  icon: /* @__PURE__ */ n(w, {}),
99
99
  onClick: () => l == null ? void 0 : l.chain().focus().toggleItalic().run(),
@@ -103,7 +103,7 @@ const O = ({
103
103
  }
104
104
  ),
105
105
  g(c.formatting, "strikethrough") && /* @__PURE__ */ n(
106
- h,
106
+ u,
107
107
  {
108
108
  icon: /* @__PURE__ */ n(I, {}),
109
109
  onClick: () => l == null ? void 0 : l.chain().focus().toggleStrike().run(),
@@ -113,12 +113,12 @@ const O = ({
113
113
  }
114
114
  )
115
115
  ] }),
116
- /* @__PURE__ */ n(e, {})
116
+ /* @__PURE__ */ n(v, {})
117
117
  ] }),
118
- c.lists !== !1 && /* @__PURE__ */ u(m, { children: [
119
- /* @__PURE__ */ u(v, { align: "center", gap: "3xs", children: [
118
+ c.lists !== !1 && /* @__PURE__ */ h(m, { children: [
119
+ /* @__PURE__ */ h(e, { align: "center", gap: "3xs", children: [
120
120
  g(c.lists, "bullet") && /* @__PURE__ */ n(
121
- h,
121
+ u,
122
122
  {
123
123
  icon: /* @__PURE__ */ n(T, {}),
124
124
  onClick: () => l == null ? void 0 : l.chain().focus().toggleBulletList().run(),
@@ -128,7 +128,7 @@ const O = ({
128
128
  }
129
129
  ),
130
130
  g(c.lists, "ordered") && /* @__PURE__ */ n(
131
- h,
131
+ u,
132
132
  {
133
133
  icon: /* @__PURE__ */ n(i, {}),
134
134
  onClick: () => l == null ? void 0 : l.chain().focus().toggleOrderedList().run(),
@@ -138,11 +138,11 @@ const O = ({
138
138
  }
139
139
  )
140
140
  ] }),
141
- /* @__PURE__ */ n(e, {})
141
+ /* @__PURE__ */ n(v, {})
142
142
  ] }),
143
- c.link && /* @__PURE__ */ u(m, { children: [
143
+ c.link && /* @__PURE__ */ h(m, { children: [
144
144
  /* @__PURE__ */ n(
145
- h,
145
+ u,
146
146
  {
147
147
  icon: /* @__PURE__ */ n(N, {}),
148
148
  onClick: x,
@@ -151,11 +151,11 @@ const O = ({
151
151
  label: s.insertLink
152
152
  }
153
153
  ),
154
- /* @__PURE__ */ n(e, {})
154
+ /* @__PURE__ */ n(v, {})
155
155
  ] }),
156
- c.clearFormatting && /* @__PURE__ */ u(m, { children: [
156
+ c.clearFormatting && /* @__PURE__ */ h(m, { children: [
157
157
  /* @__PURE__ */ n(
158
- h,
158
+ u,
159
159
  {
160
160
  icon: /* @__PURE__ */ n(S, {}),
161
161
  onClick: () => l == null ? void 0 : l.chain().focus().unsetAllMarks().clearNodes().run(),
@@ -163,7 +163,7 @@ const O = ({
163
163
  label: s.clearFormatting
164
164
  }
165
165
  ),
166
- p && /* @__PURE__ */ n(e, {})
166
+ p && /* @__PURE__ */ n(v, {})
167
167
  ] }),
168
168
  p
169
169
  ]