@vkzstudio/muza-ui 1.0.16 → 1.0.18

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 (55) hide show
  1. package/dist/components/Button/buttonVariants.js +1 -1
  2. package/dist/components/Checkbox/Checkbox.d.ts +4 -0
  3. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  4. package/dist/components/Checkbox/Checkbox.js +36 -29
  5. package/dist/components/Checkbox/Checkbox.stories.d.ts +1 -0
  6. package/dist/components/Checkbox/Checkbox.stories.d.ts.map +1 -1
  7. package/dist/components/DatePicker/DatePicker.d.ts +2 -0
  8. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  9. package/dist/components/DatePicker/DatePicker.js +33 -31
  10. package/dist/components/EmptyState/EmptyState.d.ts.map +1 -1
  11. package/dist/components/EmptyState/EmptyState.js +15 -15
  12. package/dist/components/FileUpload/FileUpload.d.ts +6 -2
  13. package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
  14. package/dist/components/FileUpload/FileUpload.js +141 -135
  15. package/dist/components/FileUpload/FileUpload.stories.d.ts +2 -0
  16. package/dist/components/FileUpload/FileUpload.stories.d.ts.map +1 -1
  17. package/dist/components/Flex/Flex.d.ts +3 -1
  18. package/dist/components/Flex/Flex.d.ts.map +1 -1
  19. package/dist/components/Flex/Flex.js +33 -31
  20. package/dist/components/FormField/FormField.d.ts +30 -0
  21. package/dist/components/FormField/FormField.d.ts.map +1 -0
  22. package/dist/components/FormField/FormField.js +56 -0
  23. package/dist/components/FormField/InputHint.d.ts +13 -0
  24. package/dist/components/FormField/InputHint.d.ts.map +1 -0
  25. package/dist/components/FormField/InputHint.js +26 -0
  26. package/dist/components/FormField/InputLabel.d.ts +20 -0
  27. package/dist/components/FormField/InputLabel.d.ts.map +1 -0
  28. package/dist/components/FormField/InputLabel.js +27 -0
  29. package/dist/components/FormField/index.d.ts +4 -0
  30. package/dist/components/FormField/index.d.ts.map +1 -0
  31. package/dist/components/Input/Input.d.ts.map +1 -1
  32. package/dist/components/Input/Input.js +79 -94
  33. package/dist/components/MultiSelect/MultiSelect.d.ts +2 -0
  34. package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
  35. package/dist/components/MultiSelect/MultiSelect.js +125 -131
  36. package/dist/components/Radio/Radio.js +1 -1
  37. package/dist/components/Reorderable/Reorderable.d.ts +1 -1
  38. package/dist/components/Reorderable/Reorderable.d.ts.map +1 -1
  39. package/dist/components/Reorderable/Reorderable.js +47 -45
  40. package/dist/components/ReorderableTable/ReorderableTable.js +5 -5
  41. package/dist/components/Select/Select.d.ts +2 -0
  42. package/dist/components/Select/Select.d.ts.map +1 -1
  43. package/dist/components/Select/Select.js +126 -131
  44. package/dist/components/TextEditor/TextEditor.d.ts +4 -0
  45. package/dist/components/TextEditor/TextEditor.d.ts.map +1 -1
  46. package/dist/components/TextEditor/TextEditor.js +113 -135
  47. package/dist/components/Textarea/Textarea.d.ts +4 -0
  48. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  49. package/dist/components/Textarea/Textarea.js +52 -61
  50. package/dist/components/Textarea/Textarea.stories.d.ts +1 -0
  51. package/dist/components/Textarea/Textarea.stories.d.ts.map +1 -1
  52. package/dist/components/TimePicker/TimePicker.d.ts +2 -0
  53. package/dist/components/TimePicker/TimePicker.d.ts.map +1 -1
  54. package/dist/muza-ui.css +1 -1
  55. package/package.json +1 -1
@@ -1,20 +1,19 @@
1
- import { jsx as r, jsxs as l } from "react/jsx-runtime";
2
- import { forwardRef as I, useEffect as T, useImperativeHandle as O, useRef as $ } from "react";
1
+ import { jsx as r, jsxs as f } from "react/jsx-runtime";
2
+ import { forwardRef as I, useEffect as b, useImperativeHandle as O, useRef as $ } from "react";
3
3
  import { Link as K } from "../../node_modules/@tiptap/extension-link/dist/index.js";
4
4
  import { Placeholder as W } from "../../node_modules/@tiptap/extension-placeholder/dist/index.js";
5
- import { useEditor as Y, EditorContent as q } from "../../node_modules/@tiptap/react/dist/index.js";
6
- import { StarterKit as D } from "../../node_modules/@tiptap/starter-kit/dist/index.js";
7
- import { cva as G } from "class-variance-authority";
8
- import { EditorToolbar as J } from "./EditorToolbar.js";
9
- import { LinkBubbleMenu as Q } from "./LinkBubbleMenu.js";
10
- import { useLinkEditor as X } from "./useLinkEditor.js";
5
+ import { useEditor as q, EditorContent as D } from "../../node_modules/@tiptap/react/dist/index.js";
6
+ import { StarterKit as G } from "../../node_modules/@tiptap/starter-kit/dist/index.js";
7
+ import { cva as J } from "class-variance-authority";
8
+ import { EditorToolbar as Q } from "./EditorToolbar.js";
9
+ import { LinkBubbleMenu as X } from "./LinkBubbleMenu.js";
10
+ import { useLinkEditor as Y } from "./useLinkEditor.js";
11
11
  import { useMuzaTranslations as Z } from "../../translations/TranslationContext.js";
12
- import { cn as d } from "../../utils/cn.js";
13
- import { Flex as L } from "../Flex/Flex.js";
14
- import { Typography as E } from "../Typography/Typography.js";
15
- import { TooltipProvider as tt, Tooltip as et, TooltipTrigger as rt, TooltipContent as ot } from "../Tooltip/Tooltip.js";
16
- import { InfoCircleBold as it } from "@solar-icons/react-perf";
17
- const nt = G(
12
+ import { FormField as tt } from "../FormField/FormField.js";
13
+ import { cn as g } from "../../utils/cn.js";
14
+ import { TooltipProvider as et, Tooltip as rt, TooltipTrigger as ot, TooltipContent as it } from "../Tooltip/Tooltip.js";
15
+ import { InfoCircleBold as nt } from "@solar-icons/react-perf";
16
+ const lt = J(
18
17
  [
19
18
  "overflow-hidden rounded-xl border bg-surface-base-secondary transition-colors",
20
19
  "focus-within:border-comp-texteditor-stroke-focused",
@@ -35,39 +34,41 @@ const nt = G(
35
34
  }
36
35
  ), st = I(
37
36
  ({
38
- value: s,
39
- defaultValue: C,
40
- onChange: p,
41
- onBlur: M,
42
- onFocus: w,
43
- placeholder: H = "",
44
- label: x,
45
- hint: u,
46
- infoTooltip: h,
37
+ value: l,
38
+ defaultValue: y,
39
+ onChange: d,
40
+ onBlur: v,
41
+ onFocus: L,
42
+ placeholder: T = "",
43
+ label: E,
44
+ hint: C,
45
+ infoTooltip: p,
47
46
  disabled: i = !1,
48
- readOnly: f = !1,
49
- error: a,
47
+ readOnly: c = !1,
48
+ required: M,
49
+ disableRequiredAsterisk: H,
50
+ error: s,
50
51
  toolbar: n = {},
51
- toolbarExtra: g,
52
- extensions: z = [],
53
- minHeight: N = 200,
54
- maxHeight: m,
52
+ toolbarExtra: x,
53
+ extensions: w = [],
54
+ minHeight: z = 200,
55
+ maxHeight: a,
55
56
  resizable: P = !0,
56
- className: R,
57
- contentClassName: U,
58
- unstyled: S = !1,
59
- editorClassName: V
60
- }, j) => {
61
- const k = Z(), c = {
57
+ className: N,
58
+ contentClassName: R,
59
+ unstyled: U = !1,
60
+ editorClassName: F
61
+ }, S) => {
62
+ const u = Z(), m = {
62
63
  history: n.history ?? !0,
63
64
  headings: n.headings ?? !0,
64
65
  formatting: n.formatting ?? !0,
65
66
  lists: n.lists ?? !0,
66
67
  link: n.link ?? !0,
67
68
  clearFormatting: n.clearFormatting ?? !0
68
- }, A = !!g || Object.values(c).some((e) => e !== !1), t = Y({
69
+ }, V = !!x || Object.values(m).some((e) => e !== !1), t = q({
69
70
  extensions: [
70
- D.configure({
71
+ G.configure({
71
72
  heading: { levels: [1, 2, 3] },
72
73
  bulletList: {
73
74
  HTMLAttributes: { class: "list-disc ml-6" }
@@ -76,7 +77,7 @@ const nt = G(
76
77
  HTMLAttributes: { class: "list-decimal ml-6" }
77
78
  }
78
79
  }),
79
- ...c.link ? [
80
+ ...m.link ? [
80
81
  K.configure({
81
82
  openOnClick: !1,
82
83
  autolink: !0,
@@ -88,23 +89,23 @@ const nt = G(
88
89
  })
89
90
  ] : [],
90
91
  W.configure({
91
- placeholder: ({ editor: e }) => e.state.doc.textContent.length === 0 ? H : ""
92
+ placeholder: ({ editor: e }) => e.state.doc.textContent.length === 0 ? T : ""
92
93
  }),
93
- ...z
94
+ ...w
94
95
  ],
95
- content: s ?? C ?? "",
96
- editable: !i && !f,
96
+ content: l ?? y ?? "",
97
+ editable: !i && !c,
97
98
  onUpdate: ({ editor: e }) => {
98
- const b = e.getText().trim(), v = e.getHTML();
99
- p == null || p(b.length === 0 ? "" : v);
99
+ const k = e.getText().trim(), _ = e.getHTML();
100
+ d == null || d(k.length === 0 ? "" : _);
100
101
  },
101
- onBlur: M,
102
- onFocus: w,
102
+ onBlur: v,
103
+ onFocus: L,
103
104
  editorProps: {
104
105
  attributes: {
105
- class: d(
106
+ class: g(
106
107
  "outline-none text-sm",
107
- !S && [
108
+ !U && [
108
109
  // Headings
109
110
  "[&_h1]:text-3xl [&_h1]:font-semibold [&_h1]:text-text-dark-primary-def [&_h1]:my-3",
110
111
  "[&_h2]:text-2xl [&_h2]:font-semibold [&_h2]:text-text-dark-primary-def [&_h2]:my-3",
@@ -124,7 +125,7 @@ const nt = G(
124
125
  ],
125
126
  // Placeholder (only when the entire editor is empty — controlled via placeholder function)
126
127
  "[&_.is-empty]:before:content-[attr(data-placeholder)] [&_.is-empty]:before:text-comp-input-text-placeholder [&_.is-empty]:before:float-left [&_.is-empty]:before:h-0 [&_.is-empty]:before:pointer-events-none",
127
- V
128
+ F
128
129
  ),
129
130
  // Inline styles needed because Tailwind CSS 4 JIT doesn't apply to dynamically created elements
130
131
  style: "width: 100%; min-height: 100%; max-width: none;",
@@ -133,15 +134,15 @@ const nt = G(
133
134
  }
134
135
  }
135
136
  });
136
- T(() => {
137
- if (t && s !== void 0) {
137
+ b(() => {
138
+ if (t && l !== void 0) {
138
139
  const e = t.getHTML();
139
- (s || "<p></p>") !== (e || "<p></p>") && t.commands.setContent(s, !1);
140
+ (l || "<p></p>") !== (e || "<p></p>") && t.commands.setContent(l, !1);
140
141
  }
141
- }, [t, s]), T(() => {
142
- t && t.setEditable(!i && !f);
143
- }, [t, i, f]), O(
144
- j,
142
+ }, [t, l]), b(() => {
143
+ t && t.setEditable(!i && !c);
144
+ }, [t, i, c]), O(
145
+ S,
145
146
  () => ({
146
147
  editor: t,
147
148
  focus: () => t == null ? void 0 : t.commands.focus(),
@@ -153,91 +154,68 @@ const nt = G(
153
154
  }),
154
155
  [t]
155
156
  );
156
- const o = X(t), y = $(null), B = i ? "disabled" : a ? "error" : "default", _ = typeof a == "string" ? a : void 0, F = {
157
- minHeight: `${Math.max(N, 200)}px`,
158
- maxHeight: m ? typeof m == "number" ? `${m}px` : m : void 0,
157
+ const o = Y(t), h = $(null), j = i ? "disabled" : s ? "error" : "default", A = typeof s == "string" ? s : void 0, B = {
158
+ minHeight: `${Math.max(z, 200)}px`,
159
+ maxHeight: a ? typeof a == "number" ? `${a}px` : a : void 0,
159
160
  resize: P && !i ? "vertical" : "none"
160
161
  };
161
- return /* @__PURE__ */ r("div", { ref: y, children: /* @__PURE__ */ l(
162
- L,
162
+ return /* @__PURE__ */ r("div", { ref: h, children: /* @__PURE__ */ r(
163
+ tt,
163
164
  {
164
- direction: "column",
165
- className: d("gap-comp-input-gap", R),
166
- children: [
167
- x && /* @__PURE__ */ l(L, { align: "center", gap: "2xs", children: [
168
- /* @__PURE__ */ r(
169
- E,
170
- {
171
- component: "label",
172
- weight: "regular",
173
- size: "sm",
174
- className: "text-comp-select-text-primary",
175
- fixY: !0,
176
- children: x
177
- }
178
- ),
179
- h && /* @__PURE__ */ r(tt, { children: /* @__PURE__ */ l(et, { children: [
180
- /* @__PURE__ */ r(rt, { asChild: !0, children: /* @__PURE__ */ r(it, { className: "cursor-help text-comp-info-ico-def hover:text-comp-info-ico-hover" }) }),
181
- /* @__PURE__ */ r(ot, { children: h })
182
- ] }) })
183
- ] }),
184
- /* @__PURE__ */ l("div", { className: nt({ state: B }), children: [
185
- A && /* @__PURE__ */ r(
186
- J,
187
- {
188
- editor: t,
189
- toolbarConfig: c,
190
- disabled: i,
191
- translations: k.textEditor,
192
- onLinkClick: o.handleLinkToolbarClick,
193
- toolbarExtra: g
194
- }
195
- ),
196
- /* @__PURE__ */ l(
197
- "div",
198
- {
199
- className: d(
200
- "relative overflow-auto px-2xl py-xl",
201
- "mr-[calc(var(--spacing-xl)/2)]",
202
- "pr-[calc(var(--spacing-2xl)-var(--spacing-xl)/2)]",
203
- // Compensate for scrollbar offset
204
- U
205
- ),
206
- style: F,
207
- children: [
208
- /* @__PURE__ */ r(q, { editor: t, className: "h-full w-full" }),
209
- t && c.link && /* @__PURE__ */ r(
210
- Q,
211
- {
212
- editor: t,
213
- containerRef: y,
214
- linkUrl: o.linkUrl,
215
- isEditingLink: o.isEditingLink,
216
- onUrlChange: o.setLinkUrl,
217
- onEdit: o.handleOpenLinkEdit,
218
- onSave: o.handleSaveLink,
219
- onRemove: o.handleRemoveLink,
220
- onCancel: o.handleCancelEdit,
221
- translations: k.textEditor
222
- }
223
- )
224
- ]
225
- }
226
- )
227
- ] }),
228
- (u || _) && /* @__PURE__ */ r(
229
- E,
165
+ label: E,
166
+ hint: A || C,
167
+ error: !!s,
168
+ required: M,
169
+ disableRequiredAsterisk: H,
170
+ className: N,
171
+ labelExtra: p ? /* @__PURE__ */ r(et, { children: /* @__PURE__ */ f(rt, { children: [
172
+ /* @__PURE__ */ r(ot, { asChild: !0, children: /* @__PURE__ */ r(nt, { className: "cursor-help text-comp-info-ico-def hover:text-comp-info-ico-hover" }) }),
173
+ /* @__PURE__ */ r(it, { children: p })
174
+ ] }) }) : void 0,
175
+ children: /* @__PURE__ */ f("div", { className: lt({ state: j }), children: [
176
+ V && /* @__PURE__ */ r(
177
+ Q,
230
178
  {
231
- component: "span",
232
- size: "sm",
233
- weight: "regular",
234
- className: d("text-comp-select-text-secondary", {
235
- "text-comp-input-text-error": a
236
- }),
237
- children: _ || u
179
+ editor: t,
180
+ toolbarConfig: m,
181
+ disabled: i,
182
+ translations: u.textEditor,
183
+ onLinkClick: o.handleLinkToolbarClick,
184
+ toolbarExtra: x
185
+ }
186
+ ),
187
+ /* @__PURE__ */ f(
188
+ "div",
189
+ {
190
+ className: g(
191
+ "relative overflow-auto px-2xl py-xl",
192
+ "mr-[calc(var(--spacing-xl)/2)]",
193
+ "pr-[calc(var(--spacing-2xl)-var(--spacing-xl)/2)]",
194
+ // Compensate for scrollbar offset
195
+ R
196
+ ),
197
+ style: B,
198
+ children: [
199
+ /* @__PURE__ */ r(D, { editor: t, className: "h-full w-full" }),
200
+ t && m.link && /* @__PURE__ */ r(
201
+ X,
202
+ {
203
+ editor: t,
204
+ containerRef: h,
205
+ linkUrl: o.linkUrl,
206
+ isEditingLink: o.isEditingLink,
207
+ onUrlChange: o.setLinkUrl,
208
+ onEdit: o.handleOpenLinkEdit,
209
+ onSave: o.handleSaveLink,
210
+ onRemove: o.handleRemoveLink,
211
+ onCancel: o.handleCancelEdit,
212
+ translations: u.textEditor
213
+ }
214
+ )
215
+ ]
238
216
  }
239
217
  )
240
- ]
218
+ ] })
241
219
  }
242
220
  ) });
243
221
  }
@@ -11,6 +11,10 @@ export interface TextareaProps extends ComponentProps<'textarea'> {
11
11
  error?: boolean;
12
12
  /** Error message displayed below textarea when error is true. Overrides hint text. */
13
13
  errorMessage?: string;
14
+ /** Marks the field as required and displays a red asterisk next to the label. @default false */
15
+ required?: boolean;
16
+ /** Hides the required asterisk even when `required` is true. @default false */
17
+ disableRequiredAsterisk?: boolean;
14
18
  /** Name attribute for form submission. */
15
19
  name?: string;
16
20
  /** Automatically grows textarea height to fit content. @default false */
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAA6B,MAAM,OAAO,CAAA;AAyCtE,wCAAwC;AACxC,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,UAAU,CAAC;IAC/D,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,CAAA;IACpD,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6FAA6F;IAC7F,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mDAAmD;IACnD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,yEAAyE;IACzE,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,eAAO,MAAM,QAAQ,4HA0EpB,CAAA"}
1
+ {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAA6B,MAAM,OAAO,CAAA;AA0CtE,wCAAwC;AACxC,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,UAAU,CAAC;IAC/D,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,CAAA;IACpD,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6FAA6F;IAC7F,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mDAAmD;IACnD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,gGAAgG;IAChG,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+EAA+E;IAC/E,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,yEAAyE;IACzE,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,eAAO,MAAM,QAAQ,4HA8DpB,CAAA"}
@@ -1,11 +1,12 @@
1
- import { jsxs as v, jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as w, useId as I, useRef as k } from "react";
3
- import { cva as N } from "class-variance-authority";
4
- import { Typography as d, typographyVariants as R } from "../Typography/Typography.js";
5
- import { cn as c } from "../../utils/cn.js";
6
- const T = N(
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { forwardRef as z, useId as w, useRef as I } from "react";
3
+ import { cva as k } from "class-variance-authority";
4
+ import { FormField as R } from "../FormField/FormField.js";
5
+ import { cn as F } from "../../utils/cn.js";
6
+ import { typographyVariants as V } from "../Typography/Typography.js";
7
+ const $ = k(
7
8
  [
8
- R({
9
+ V({
9
10
  variant: "body",
10
11
  weight: "medium",
11
12
  size: "base"
@@ -37,66 +38,56 @@ const T = N(
37
38
  resize: "none"
38
39
  }
39
40
  }
40
- ), V = w(
41
+ ), N = z(
41
42
  ({
42
- className: m,
43
- label: a,
44
- hint: i,
43
+ className: d,
44
+ label: p,
45
+ hint: c,
45
46
  id: u,
46
47
  error: o,
47
- resize: x,
48
- autoResize: n,
49
- errorMessage: s,
50
- ...f
51
- }, l) => {
52
- const h = I(), e = u ?? h, b = `${e}-hint`, g = `${e}-label`, y = k(null), p = (typeof l == "function" ? null : l) ?? y, z = () => {
53
- const t = p.current;
48
+ resize: m,
49
+ autoResize: a,
50
+ errorMessage: i,
51
+ required: r,
52
+ disableRequiredAsterisk: f,
53
+ ...h
54
+ }, n) => {
55
+ const x = w(), e = u ?? x, b = `${e}-hint`, y = `${e}-label`, g = I(null), l = (typeof n == "function" ? null : n) ?? g, v = () => {
56
+ const t = l.current;
54
57
  t && (t.style.height = "auto", t.style.height = `${t.scrollHeight + 2}px`);
55
58
  };
56
- return /* @__PURE__ */ v("div", { className: "flex flex-col gap-comp-input-gap", children: [
57
- a && /* @__PURE__ */ r(
58
- d,
59
- {
60
- component: "label",
61
- weight: "regular",
62
- size: "sm",
63
- htmlFor: e,
64
- id: g,
65
- className: "text-comp-input-text-primary",
66
- children: a
67
- }
68
- ),
69
- /* @__PURE__ */ r(
70
- "textarea",
71
- {
72
- "data-slot": "textarea",
73
- ref: p,
74
- id: e,
75
- className: c(
76
- T({ error: o, resize: x, autoResize: n }),
77
- m
78
- ),
79
- ...f,
80
- onInput: n ? z : void 0
81
- }
82
- ),
83
- i && /* @__PURE__ */ r(
84
- d,
85
- {
86
- component: "span",
87
- size: "sm",
88
- weight: "regular",
89
- className: c("text-comp-input-text-secondary", {
90
- "text-comp-input-text-error": o
91
- }),
92
- id: b,
93
- children: o && s ? s : i
94
- }
95
- )
96
- ] });
59
+ return /* @__PURE__ */ s(
60
+ R,
61
+ {
62
+ label: p,
63
+ hint: o && i ? i : c,
64
+ error: o,
65
+ required: r,
66
+ disableRequiredAsterisk: f,
67
+ htmlFor: e,
68
+ labelId: y,
69
+ hintId: b,
70
+ children: /* @__PURE__ */ s(
71
+ "textarea",
72
+ {
73
+ "data-slot": "textarea",
74
+ ref: l,
75
+ id: e,
76
+ required: r,
77
+ "aria-required": r,
78
+ className: F(
79
+ $({ error: o, resize: m, autoResize: a }),
80
+ d
81
+ ),
82
+ ...h,
83
+ onInput: a ? v : void 0
84
+ }
85
+ )
86
+ }
87
+ );
97
88
  }
98
89
  );
99
- V.displayName = "Textarea";
90
+ N.displayName = "Textarea";
100
91
  export {
101
- V as Textarea
92
+ N as Textarea
102
93
  };
@@ -8,6 +8,7 @@ export declare const WithTitleAndHint: Story;
8
8
  export declare const Filled: Story;
9
9
  export declare const Error: Story;
10
10
  export declare const Disabled: Story;
11
+ export declare const Required: Story;
11
12
  export declare const AutoResize: Story;
12
13
  export declare const ResizableHandles: Story;
13
14
  //# sourceMappingURL=Textarea.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.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,CA8F/B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAA;AAEtC,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAe9B,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAgBpB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAiBnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAiBxB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAiB9B,CAAA"}
1
+ {"version":3,"file":"Textarea.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.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,CA8F/B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAA;AAEtC,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAe9B,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAgBpB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAiBnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAiBxB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAiB9B,CAAA"}
@@ -20,6 +20,8 @@ export interface TimePickerProps extends Omit<InputProps, 'type' | 'suffix'> {
20
20
  readOnly?: boolean;
21
21
  /** Marks the field as required in form validation. */
22
22
  required?: boolean;
23
+ /** Hides the required asterisk even when `required` is true. @default false */
24
+ disableRequiredAsterisk?: boolean;
23
25
  }
24
26
  declare const TimePicker: ({ placeholder, ...props }: TimePickerProps) => import("react/jsx-runtime").JSX.Element;
25
27
  export { TimePicker };
@@ -1 +1 @@
1
- {"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":["../../../src/components/TimePicker/TimePicker.tsx"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,UAAU,CAAA;AAEjD;;;GAGG;AACH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC1E,0FAA0F;IAC1F,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mDAAmD;IACnD,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;IAC3B,mDAAmD;IACnD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,QAAA,MAAM,UAAU,GAAI,2BAA2B,eAAe,4CAc7D,CAAA;AAED,OAAO,EAAE,UAAU,EAAE,CAAA"}
1
+ {"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":["../../../src/components/TimePicker/TimePicker.tsx"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,UAAU,CAAA;AAEjD;;;GAGG;AACH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC1E,0FAA0F;IAC1F,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mDAAmD;IACnD,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;IAC3B,mDAAmD;IACnD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+EAA+E;IAC/E,uBAAuB,CAAC,EAAE,OAAO,CAAA;CAClC;AAED,QAAA,MAAM,UAAU,GAAI,2BAA2B,eAAe,4CAc7D,CAAA;AAED,OAAO,EAAE,UAAU,EAAE,CAAA"}