@vkzstudio/muza-ui 1.0.42 → 1.0.44

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 (53) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +42 -6
  2. package/dist/components/Accordion/Accordion.d.ts.map +1 -1
  3. package/dist/components/Button/Button.d.ts +74 -12
  4. package/dist/components/Button/Button.d.ts.map +1 -1
  5. package/dist/components/Button/Button.js +60 -55
  6. package/dist/components/Button/Button.stories.d.ts +2 -0
  7. package/dist/components/Button/Button.stories.d.ts.map +1 -1
  8. package/dist/components/DataTable/DataTable.d.ts +52 -15
  9. package/dist/components/DataTable/DataTable.d.ts.map +1 -1
  10. package/dist/components/DatePicker/DatePicker.d.ts +69 -36
  11. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  12. package/dist/components/DatePicker/DatePicker.stories.d.ts.map +1 -1
  13. package/dist/components/EdgeButton/EdgeButton.d.ts +16 -12
  14. package/dist/components/EdgeButton/EdgeButton.d.ts.map +1 -1
  15. package/dist/components/EdgeButton/EdgeButton.js +70 -46
  16. package/dist/components/EdgeButton/EdgeButton.stories.d.ts +2 -0
  17. package/dist/components/EdgeButton/EdgeButton.stories.d.ts.map +1 -1
  18. package/dist/components/ExpandableTable/ExpandableTable.d.ts +73 -8
  19. package/dist/components/ExpandableTable/ExpandableTable.d.ts.map +1 -1
  20. package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts +3 -0
  21. package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts.map +1 -1
  22. package/dist/components/ExpandableTable/index.d.ts +1 -1
  23. package/dist/components/ExpandableTable/index.d.ts.map +1 -1
  24. package/dist/components/FileUpload/FileItem.d.ts +16 -0
  25. package/dist/components/FileUpload/FileItem.d.ts.map +1 -1
  26. package/dist/components/FileUpload/FileUpload.d.ts +105 -42
  27. package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
  28. package/dist/components/FileUpload/index.d.ts +1 -1
  29. package/dist/components/FileUpload/index.d.ts.map +1 -1
  30. package/dist/components/Input/Input.d.ts +33 -34
  31. package/dist/components/Input/Input.d.ts.map +1 -1
  32. package/dist/components/Input/Input.stories.d.ts.map +1 -1
  33. package/dist/components/MultiSelect/MultiSelect.d.ts +50 -23
  34. package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
  35. package/dist/components/Reorderable/Reorderable.d.ts +48 -1
  36. package/dist/components/Reorderable/Reorderable.d.ts.map +1 -1
  37. package/dist/components/ReorderableTable/ReorderableTable.d.ts +34 -17
  38. package/dist/components/ReorderableTable/ReorderableTable.d.ts.map +1 -1
  39. package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts.map +1 -1
  40. package/dist/components/Select/Select.d.ts +38 -21
  41. package/dist/components/Select/Select.d.ts.map +1 -1
  42. package/dist/components/Select/index.d.ts +1 -1
  43. package/dist/components/Select/index.d.ts.map +1 -1
  44. package/dist/components/TextEditor/TextEditor.d.ts +82 -46
  45. package/dist/components/TextEditor/TextEditor.d.ts.map +1 -1
  46. package/dist/components/TextEditor/TextEditor.stories.d.ts.map +1 -1
  47. package/dist/components/TextEditor/index.d.ts +1 -1
  48. package/dist/components/TextEditor/index.d.ts.map +1 -1
  49. package/dist/components/Textarea/Textarea.d.ts +41 -10
  50. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  51. package/dist/components/Textarea/Textarea.stories.d.ts.map +1 -1
  52. package/dist/muza-ui.css +1 -1
  53. package/package.json +1 -1
@@ -3,29 +3,44 @@ import { DateRange } from 'react-day-picker';
3
3
  import { CalendarBaseProps } from '../Calendar';
4
4
  import { PopoverContentProps } from '../Popover/Popover';
5
5
  import { Presets } from './utils/getDateRange';
6
+ /**
7
+ * Custom class names for DatePicker internal elements.
8
+ *
9
+ * @example
10
+ * classNames={{ popoverTrigger: 'w-full', input: 'rounded-lg' }}
11
+ */
12
+ export type DatePickerClassNames = Partial<{
13
+ /** Class applied to the Radix popover trigger wrapping the input. */
14
+ popoverTrigger: string;
15
+ /** Class applied to the popover content container. */
16
+ popoverContent: string;
17
+ /** Class applied to the default Input trigger. */
18
+ input: string;
19
+ /** Class applied to each preset button in the left panel. */
20
+ leftPanelButton: string;
21
+ }>;
6
22
  /**
7
23
  * Props for the DatePicker component.
8
24
  *
9
- * Uses a discriminated union on `mode` to type `value`, `defaultValue`,
10
- * `onChange`, and `dateFormatter` for either single date or date range selection.
25
+ * Discriminated union on `mode`: `'single'` for picking one date, `'range'` for a start-end range.
26
+ * The `mode` value narrows `value`, `defaultValue`, `onChange`, and `dateFormatter`
27
+ * to the matching type — see {@link DatePickerSingleProps} and {@link DatePickerRangeProps}.
11
28
  *
12
- * Also inherits calendar layout/visibility props from {@link CalendarBaseProps}
13
- * (e.g. `hideNavigation`, `hideCaption`, `showOutsideDays`, etc.).
29
+ * Also inherits calendar layout and visibility props from {@link CalendarBaseProps}
30
+ * (e.g. `hideNavigation`, `hideCaption`, `showOutsideDays`, `weekStartsOn`, `disabledDates`).
14
31
  */
15
32
  export type DatePickerProps = {
16
- /** Controls horizontal alignment of the calendar popover relative to the trigger. */
33
+ /** Horizontal alignment of the calendar popover relative to the trigger. */
17
34
  alignCalendar?: 'center' | 'end' | 'start';
18
35
  /**
19
- * Defines preset date range options shown in the left panel (range mode only).
36
+ * Preset date range shortcuts shown in the left panel (range mode only).
20
37
  * Each preset has a display `name` and a `type` matching a built-in range calculation.
21
38
  *
22
39
  * @example
23
- * ```tsx
24
40
  * allowedPresets={[
25
41
  * { name: 'Today', type: 'Today' },
26
42
  * { name: 'Last 7 days', type: 'Last 7 days' },
27
43
  * ]}
28
- * ```
29
44
  *
30
45
  * @see Presets
31
46
  */
@@ -33,35 +48,26 @@ export type DatePickerProps = {
33
48
  name: string;
34
49
  type: (typeof Presets)[number];
35
50
  }[];
36
- /** Controls the open state of the calendar popover when used as a controlled component. */
51
+ /** Controlled open state of the calendar popover. */
37
52
  open?: boolean;
38
53
  /** Fires when the popover open state changes. */
39
54
  onOpenChange?: (open: boolean) => void;
40
55
  /**
41
56
  * Custom class names for internal elements.
42
- *
43
- * @example
44
- * ```tsx
45
- * classNames={{ popoverTrigger: 'w-full', input: 'rounded-lg' }}
46
- * ```
57
+ * @see DatePickerClassNames
47
58
  */
48
- classNames?: Partial<{
49
- popoverTrigger: string;
50
- popoverContent: string;
51
- input: string;
52
- leftPanelButton: string;
53
- }>;
59
+ classNames?: DatePickerClassNames;
54
60
  /** Prevents interaction and applies disabled styling. */
55
61
  disabled?: boolean;
56
62
  /** Applies error styling with red border to the input. */
57
63
  error?: boolean;
58
- /** Displays label text above the input. */
64
+ /** Label text displayed above the input. */
59
65
  label?: string;
60
- /** Displays helper text below the input. */
66
+ /** Helper text displayed below the input. */
61
67
  hint?: string;
62
68
  /** Placeholder text shown when no date is selected. */
63
69
  placeholder?: string;
64
- /** Controls which side of the trigger the calendar popover opens on. @default 'bottom' */
70
+ /** Side of the trigger the calendar popover opens on. @default 'bottom' */
65
71
  side?: 'top' | 'right' | 'bottom' | 'left';
66
72
  /** Prevents the popover from overflowing viewport boundaries. @default true */
67
73
  avoidCollisions?: boolean;
@@ -79,24 +85,48 @@ export type DatePickerProps = {
79
85
  /** Replaces the default Input trigger with a custom rendered element. */
80
86
  renderCustomTrigger?: () => ReactNode;
81
87
  /**
82
- * Controls reset button behavior. When true, reset restores `defaultValue`.
83
- * When false or omitted, reset reverts to the last confirmed value.
88
+ * Controls reset button behavior. When `true`, reset restores `defaultValue`.
89
+ * When `false` or omitted, reset reverts to the last confirmed value.
90
+ *
91
+ * @example
92
+ * // Reset clears the field (defaultValue is undefined)
93
+ * <DatePicker shouldResetToDefaultValue defaultValue={undefined} />
84
94
  */
85
95
  shouldResetToDefaultValue?: boolean;
86
- /** When true, every calendar click calls onChange immediately. Buttons remain visible. Reset reverts to value when popover opened. */
96
+ /**
97
+ * Calls `onChange` immediately on every calendar click instead of waiting for
98
+ * confirm. Bottom bar buttons remain visible unless {@link hideBottomBar} is true.
99
+ * Reset reverts to the value the popover was opened with.
100
+ */
87
101
  immediateCommit?: boolean;
88
- /** Range mode only. Replicates react-day-picker v8 range behavior (no longer natively supported in v9): first click sets start, second click sets end (same-day allowed). Clicking the same day again cycles back — when `required` is false the cycle is: selected → one-day range → cleared → selected; otherwise: selected → one-day range → selected. */
102
+ /**
103
+ * Range mode only. Replicates react-day-picker v8 same-day range behavior
104
+ * (no longer supported natively in v9): first click sets start, second click
105
+ * sets end (same day allowed). A third click on the same day cycles back:
106
+ * - `required={false}`: selected → one-day range → cleared → selected
107
+ * - otherwise: selected → one-day range → selected
108
+ */
89
109
  allowOneDayRange?: boolean;
90
- /** Marks the field as required, displaying an asterisk on the label. Also passed to the underlying Calendar — when explicitly set to `false`, allows deselecting dates by clicking the selected date again. */
110
+ /**
111
+ * Marks the field as required and displays an asterisk on the label.
112
+ * Also forwarded to the underlying Calendar — when explicitly set to `false`,
113
+ * dates can be deselected by clicking the selected date again.
114
+ */
91
115
  required?: boolean;
92
116
  /** Hides the required asterisk even when `required` is true. @default false */
93
117
  disableRequiredAsterisk?: boolean;
94
- /** Number of months to display side by side. @default 2 on desktop, 1 on mobile */
118
+ /** Number of months displayed side by side. @default 2 on desktop, 1 on mobile */
95
119
  numberOfMonths?: 1 | 2;
96
- /** Hides the entire bottom bar (text, reset button, and confirm button). Only effective when `immediateCommit` is true. @default false */
120
+ /**
121
+ * Hides the entire bottom bar (text, reset button, and confirm button).
122
+ * Only effective when `immediateCommit` is true. @default false
123
+ */
97
124
  hideBottomBar?: boolean;
98
125
  } & Omit<CalendarBaseProps, 'numberOfMonths' | 'onConfirm' | 'onReset' | 'isExpanded' | 'leftPanelChildren' | 'bottomTextDefault' | 'dateFormatter' | 'dateRangeFormatter' | 'required'> & (DatePickerRangeProps | DatePickerSingleProps);
99
- /** Props for date range selection mode. */
126
+ /**
127
+ * Props for date range selection mode (`mode: 'range'`).
128
+ * Narrows `value`, `defaultValue`, `onChange`, and `dateFormatter` to `DateRange`.
129
+ */
100
130
  export type DatePickerRangeProps = {
101
131
  /** Enables date range selection with start and end dates. */
102
132
  mode: 'range';
@@ -104,12 +134,15 @@ export type DatePickerRangeProps = {
104
134
  value?: DateRange | undefined;
105
135
  /** Initial date range for uncontrolled usage. */
106
136
  defaultValue?: DateRange | undefined;
107
- /** Fires when a date range selection is confirmed, or `undefined` when deselected (`required={false}`). */
137
+ /** Fires when a date range is confirmed, or `undefined` when deselected (`required={false}`). */
108
138
  onChange?: (date: DateRange | undefined) => void;
109
- /** Custom function to format the displayed date range string. */
139
+ /** Custom formatter for the date range displayed in the input trigger. */
110
140
  dateFormatter?: (date: DateRange) => string;
111
141
  };
112
- /** Props for single date selection mode. */
142
+ /**
143
+ * Props for single date selection mode (`mode: 'single'`).
144
+ * Narrows `value`, `defaultValue`, `onChange`, and `dateFormatter` to `Date`.
145
+ */
113
146
  export type DatePickerSingleProps = {
114
147
  /** Enables single date selection. */
115
148
  mode: 'single';
@@ -117,9 +150,9 @@ export type DatePickerSingleProps = {
117
150
  value?: Date | undefined;
118
151
  /** Initial date for uncontrolled usage. */
119
152
  defaultValue?: Date | undefined;
120
- /** Fires when a single date selection is confirmed, or `undefined` when deselected (`required={false}`). */
153
+ /** Fires when a date is confirmed, or `undefined` when deselected (`required={false}`). */
121
154
  onChange?: (date: Date | undefined) => void;
122
- /** Custom function to format the displayed date string. */
155
+ /** Custom formatter for the date displayed in the input trigger. */
123
156
  dateFormatter?: (date: Date) => string;
124
157
  };
125
158
  export declare const DatePicker: import('react').ForwardRefExoticComponent<DatePickerProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/DatePicker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAA2C,MAAM,OAAO,CAAA;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAIjD,OAAO,EAEL,KAAK,iBAAiB,EAGvB,MAAM,aAAa,C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A;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAA;AAExC,eAAO,MAAM,iBAAiB,EAAE,KAoC/B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAsB9B,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE,KAuBxC,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KA0B7B,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAwBtB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAwBnB,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE,KAyBxC,CAAA;AAED,eAAO,MAAM,2BAA2B,EAAE,KAmCzC,CAAA;AAED,eAAO,MAAM,qCAAqC,EAAE,KA8CnD,CAAA;AAED,eAAO,MAAM,4BAA4B,EAAE,KAyB1C,CAAA;AAED,eAAO,MAAM,4BAA4B,EAAE,KAyB1C,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KA0BtB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAwBzB,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,KAkClC,CAAA;AAED,eAAO,MAAM,8BAA8B,EAAE,KAiC5C,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAkC9B,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAoCzB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAqCzB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KA6CxB,CAAA"}
@@ -4,26 +4,30 @@ declare const edgeButtonVariants: (props?: ({
4
4
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
5
5
  /**
6
6
  * Props for the EdgeButton component.
7
- *
8
- * EdgeButton is a fixed-position help button designed for page corners with a distinctive
9
- * rounded top-left corner design and primary brand styling.
7
+ * Extends standard button HTML attributes. `disabled` is re-declared on the
8
+ * interface so JSDoc flows into the generated `.d.ts` output.
10
9
  */
11
10
  export interface EdgeButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
12
- /** Button text content displayed next to the icon. */
11
+ /** Button text content displayed next to the icon. Rendered with Typography (cta, medium, base). */
13
12
  text?: string;
14
- /**
15
- * Prevents user interaction and applies disabled styling with reduced opacity.
16
- * @default false
17
- */
13
+ /** Prevents interaction and applies disabled styling. @default false */
18
14
  disabled?: boolean;
19
15
  /**
20
- * Renders as a span element instead of button (useful for composing with other libraries).
16
+ * When true, merges EdgeButton props/styles onto the single child element via
17
+ * Radix `Slot` (e.g. `<EdgeButton asChild><a href="/help">Help</a></EdgeButton>`
18
+ * renders an `<a>` with all button styling and click target). The leading icon
19
+ * and text are injected as siblings of the child's original content.
20
+ * Note: `disabled` has no effect on non-`<button>` children — use
21
+ * `aria-disabled` on the child instead.
21
22
  * @default false
23
+ *
24
+ * @example
25
+ * <EdgeButton asChild text="Help">
26
+ * <a href="/help" />
27
+ * </EdgeButton>
22
28
  */
23
29
  asChild?: boolean;
24
- /**
25
- * Leading icon element positioned before the text.
26
- */
30
+ /** Leading icon node rendered before the text. Sized to `size-icon-medium`. */
27
31
  icon?: React.ReactNode;
28
32
  }
29
33
  declare const EdgeButton: React.ForwardRefExoticComponent<EdgeButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"EdgeButton.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeButton/EdgeButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,QAAA,MAAM,kBAAkB;;8EAwBvB,CAAA;AAED;;;;;GAKG;AACH,MAAM,WAAW,eACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,sDAAsD;IACtD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED,QAAA,MAAM,UAAU,2FAuCf,CAAA;AAID,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,CAAA"}
1
+ {"version":3,"file":"EdgeButton.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeButton/EdgeButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,QAAA,MAAM,kBAAkB;;8EAwBvB,CAAA;AAED;;;;GAIG;AACH,MAAM,WAAW,eACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,oGAAoG;IACpG,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,+EAA+E;IAC/E,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED,QAAA,MAAM,UAAU,2FAmFf,CAAA;AAID,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,CAAA"}
@@ -1,10 +1,11 @@
1
- import { jsxs as m, jsx as c } from "react/jsx-runtime";
2
- import d from "react";
3
- import { cva as u } from "class-variance-authority";
4
- import { sharedButtonVariants as o } from "../Button/buttonVariants.js";
5
- import { cn as l } from "../../utils/cn.js";
6
- import { Typography as f } from "../Typography/Typography.js";
7
- const z = u(
1
+ import { jsx as e, jsxs as i, Fragment as a } from "react/jsx-runtime";
2
+ import s from "react";
3
+ import { Slot as h, Slottable as l } from "@radix-ui/react-slot";
4
+ import { cva as x } from "class-variance-authority";
5
+ import { sharedButtonVariants as d } from "../Button/buttonVariants.js";
6
+ import { cn as y } from "../../utils/cn.js";
7
+ import { Typography as j } from "../Typography/Typography.js";
8
+ const _ = x(
8
9
  [
9
10
  "inline-flex items-center justify-center",
10
11
  "h-comp-help-button-h gap-comp-button-gap px-comp-help-button-p",
@@ -12,7 +13,7 @@ const z = u(
12
13
  "&>svg]:duration-250 transition-colors duration-250 [&>svg]:transition-opacity",
13
14
  "[&>svg]:size-icon-medium",
14
15
  "disabled:pointer-events-none",
15
- ...o.primary
16
+ ...d.primary
16
17
  ],
17
18
  {
18
19
  variants: {
@@ -28,45 +29,68 @@ const z = u(
28
29
  disabled: !1
29
30
  }
30
31
  }
31
- ), g = d.forwardRef(
32
- ({ onClick: e, disabled: t, text: i, className: r, asChild: a, icon: s, ...n }, p) => /* @__PURE__ */ m(
33
- a ? "span" : "button",
34
- {
35
- ref: p,
36
- type: "button",
37
- onClick: t ? void 0 : e,
38
- disabled: t,
39
- className: l(
40
- "inline-flex items-center justify-center",
41
- "h-comp-help-button-h gap-comp-button-gap px-comp-help-button-p",
42
- "rounded-tl-2xl",
43
- "cursor-pointer disabled:pointer-events-none",
44
- "&>svg]:duration-250 transition-colors duration-250 [&>svg]:transition-opacity",
45
- "[&>svg]:size-icon-medium",
46
- ...o.primary,
47
- r
48
- ),
49
- ...n,
50
- children: [
51
- s,
52
- /* @__PURE__ */ c(
53
- f,
54
- {
55
- component: "span",
56
- size: "base",
57
- variant: "cta",
58
- weight: "medium",
59
- fixY: !0,
60
- children: i
61
- }
32
+ ), B = s.forwardRef(
33
+ ({
34
+ onClick: u,
35
+ disabled: p,
36
+ text: m,
37
+ className: c,
38
+ asChild: n,
39
+ icon: o,
40
+ children: t,
41
+ ...f
42
+ }, b) => {
43
+ const g = n ? h : "button", r = m ? /* @__PURE__ */ e(
44
+ j,
45
+ {
46
+ component: "span",
47
+ size: "base",
48
+ variant: "cta",
49
+ weight: "medium",
50
+ fixY: !0,
51
+ children: m
52
+ }
53
+ ) : null, v = () => n ? s.isValidElement(t) ? /* @__PURE__ */ e(l, { children: s.cloneElement(
54
+ t,
55
+ void 0,
56
+ /* @__PURE__ */ i(a, { children: [
57
+ o,
58
+ r,
59
+ t.props.children
60
+ ] })
61
+ ) }) : /* @__PURE__ */ i(a, { children: [
62
+ o,
63
+ r,
64
+ /* @__PURE__ */ e(l, { children: t })
65
+ ] }) : /* @__PURE__ */ i(a, { children: [
66
+ o,
67
+ r,
68
+ t
69
+ ] });
70
+ return /* @__PURE__ */ e(
71
+ g,
72
+ {
73
+ ref: b,
74
+ onClick: p ? void 0 : u,
75
+ ...n ? {} : { type: "button", disabled: p },
76
+ className: y(
77
+ "inline-flex items-center justify-center",
78
+ "h-comp-help-button-h gap-comp-button-gap px-comp-help-button-p",
79
+ "rounded-tl-2xl",
80
+ "cursor-pointer disabled:pointer-events-none",
81
+ "&>svg]:duration-250 transition-colors duration-250 [&>svg]:transition-opacity",
82
+ "[&>svg]:size-icon-medium",
83
+ ...d.primary,
84
+ c
62
85
  ),
63
- n.children
64
- ]
65
- }
66
- )
86
+ ...f,
87
+ children: v()
88
+ }
89
+ );
90
+ }
67
91
  );
68
- g.displayName = "EdgeButton";
92
+ B.displayName = "EdgeButton";
69
93
  export {
70
- g as EdgeButton,
71
- z as edgeButtonVariants
94
+ B as EdgeButton,
95
+ _ as edgeButtonVariants
72
96
  };
@@ -8,4 +8,6 @@ export declare const WithIcon: Story;
8
8
  export declare const InteractiveStates: Story;
9
9
  export declare const Accessibility: Story;
10
10
  export declare const Playground: Story;
11
+ export declare const AsChildAnchor: Story;
12
+ export declare const AsChildEdgeCases: Story;
11
13
  //# sourceMappingURL=EdgeButton.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EdgeButton.stories.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeButton/EdgeButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAIzC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAkGjC,CAAA;AAED,eAAe,IAAI,CAAA;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAA;AAExC,eAAO,MAAM,OAAO,EAAE,KAYrB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KActB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAqD/B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAmD3B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAexB,CAAA"}
1
+ {"version":3,"file":"EdgeButton.stories.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeButton/EdgeButton.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAI3D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAIzC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAkGjC,CAAA;AAED,eAAe,IAAI,CAAA;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAA;AAExC,eAAO,MAAM,OAAO,EAAE,KAYrB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KActB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAqD/B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAmD3B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAexB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAe3B,CAAA;AAaD,eAAO,MAAM,gBAAgB,EAAE,KA+H9B,CAAA"}
@@ -6,7 +6,19 @@ import { ReactNode } from 'react';
6
6
  export type ResponsiveBreakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
7
7
  /**
8
8
  * Column definition for the ExpandableTable.
9
+ *
9
10
  * @typeParam T - The type of data objects in each row
11
+ *
12
+ * @example
13
+ * const columns: IColumn<Order>[] = [
14
+ * { dataKey: 'date', title: 'Date', responsive: 'sm' },
15
+ * {
16
+ * dataKey: 'status',
17
+ * title: 'Status',
18
+ * responsive: 'md',
19
+ * render: (value) => <Tag variant="success">{value}</Tag>,
20
+ * },
21
+ * ]
10
22
  */
11
23
  export interface IColumn<T> {
12
24
  /** Key of the data object to display in this column. */
@@ -28,20 +40,31 @@ export interface IColumn<T> {
28
40
  * - Named breakpoint (`'xs'..'3xl'`): visible at and above that breakpoint, rendered with static Tailwind classes.
29
41
  * - Boolean: caller supplies the visibility directly (e.g. from `useMediaQuery('(min-width: 52rem)')`).
30
42
  * `true` shows the column, `false` hides it. Use this for arbitrary thresholds.
43
+ *
31
44
  * @default 'xs'
45
+ * @see ResponsiveBreakpoint
32
46
  */
33
47
  responsive?: ResponsiveBreakpoint | boolean;
34
48
  /**
35
49
  * When `responsive` hides this column, also render it in the automatic expandable area
36
50
  * below the row. Set to `false` to just hide the column — useful when the expandable
37
51
  * area already contains a richer version of the same data.
52
+ *
38
53
  * @default true
39
54
  */
40
55
  moveToExpandable?: boolean;
41
56
  }
42
57
  /**
43
58
  * Cell definition within an expandable row section.
59
+ *
44
60
  * @typeParam T - The type of data objects in each row
61
+ *
62
+ * @example
63
+ * const cell: IExpandableTableRowCell<Order> = {
64
+ * dataKey: 'customerName',
65
+ * title: 'Customer',
66
+ * render: (value) => <a href="#profile">{value}</a>,
67
+ * }
45
68
  */
46
69
  export interface IExpandableTableRowCell<T> {
47
70
  /** Key of the data object to display in this cell. */
@@ -50,28 +73,59 @@ export interface IExpandableTableRowCell<T> {
50
73
  className?: string;
51
74
  /** Label rendered next to the cell value. */
52
75
  title: ReactNode;
53
- /** Custom render function for the cell value. When omitted, the raw value is rendered as text. */
76
+ /**
77
+ * Custom render function for the cell value.
78
+ * When omitted, the raw value is rendered as text.
79
+ *
80
+ * @example
81
+ * render: (value, row) => <Typography weight="medium">{value}</Typography>
82
+ */
54
83
  render?: (value: T[keyof T], rowData: T) => ReactNode;
55
84
  }
56
85
  /**
57
86
  * Section definition for the expandable row content.
58
87
  * Groups related cells under an optional heading.
88
+ *
59
89
  * @typeParam T - The type of data objects in each row
90
+ *
91
+ * @example
92
+ * const section: IExpandableTableRowSection<Order> = {
93
+ * title: 'Customer Information',
94
+ * cells: [
95
+ * { dataKey: 'customerName', title: 'Name' },
96
+ * { dataKey: 'customerAddress', title: 'Address' },
97
+ * ],
98
+ * }
60
99
  */
61
100
  export interface IExpandableTableRowSection<T> {
62
101
  /** Optional heading rendered above the section cells. */
63
102
  title?: ReactNode;
64
- /** Array of cell definitions displayed within this section. @see IExpandableTableRowCell */
103
+ /**
104
+ * Array of cell definitions displayed within this section.
105
+ *
106
+ * @see IExpandableTableRowCell
107
+ */
65
108
  cells: IExpandableTableRowCell<T>[];
66
109
  }
67
110
  /**
68
111
  * Props for the ExpandableTable component.
112
+ *
69
113
  * @typeParam T - The type of data objects in each row
70
114
  */
71
115
  export interface ExpandableTableProps<T> {
72
116
  /** Array of data objects where each item represents one table row. */
73
117
  data: T[];
74
- /** Array of column definitions describing headers and cell rendering. @see IColumn */
118
+ /**
119
+ * Array of column definitions describing headers and cell rendering.
120
+ *
121
+ * @example
122
+ * const columns: IColumn<Order>[] = [
123
+ * { dataKey: 'date', title: 'Date', responsive: 'sm' },
124
+ * { dataKey: 'title', title: 'Order' },
125
+ * ]
126
+ *
127
+ * @see IColumn
128
+ */
75
129
  columns: IColumn<T>[];
76
130
  /**
77
131
  * Sections shown when a row is expanded. Can be a static array applied to every row
@@ -80,21 +134,32 @@ export interface ExpandableTableProps<T> {
80
134
  *
81
135
  * @example
82
136
  * // Static sections
83
- * expandableRowSections={[{ title: 'Details', cells: [{ dataKey: 'name', title: 'Name' }] }]}
137
+ * expandableRowSections={[
138
+ * { title: 'Details', cells: [{ dataKey: 'name', title: 'Name' }] },
139
+ * ]}
84
140
  *
85
141
  * // Dynamic sections based on row data
86
- * expandableRowSections={(row) => row.status === 'active' ? activeSections : inactiveSections}
142
+ * expandableRowSections={(row) =>
143
+ * row.status === 'active' ? activeSections : inactiveSections
144
+ * }
87
145
  *
88
146
  * @see IExpandableTableRowSection
89
147
  */
90
148
  expandableRowSections?: IExpandableTableRowSection<T>[] | ((row: T) => IExpandableTableRowSection<T>[]);
91
149
  /**
92
- * Custom CSS classes for internal elements.
150
+ * Custom CSS classes for internal elements of the expanded row area.
151
+ * Use to override the default grid layouts when labels are long or when
152
+ * independent column sizing is needed.
93
153
  *
94
154
  * @example
95
- * ```tsx
155
+ * // Override the outer grid used inside the expanded row
96
156
  * classNames={{ expandedContentGrid: 'md:grid-cols-[200px_1fr]' }}
97
- * ```
157
+ *
158
+ * // Replace the subgrid inside each section with independent columns
159
+ * classNames={{
160
+ * sectionTitle: 'md:grid-cols-[minmax(200px,auto)_1fr]',
161
+ * cellsWrap: 'md:grid-cols-[minmax(200px,auto)_1fr]',
162
+ * }}
98
163
  */
99
164
  classNames?: Partial<{
100
165
  /** Custom class for the expanded content grid container (overrides default `md:grid-cols-[auto_1fr]`). */
@@ -1 +1 @@
1
- {"version":3,"file":"ExpandableTable.d.ts","sourceRoot":"","sources":["../../../src/components/ExpandableTable/ExpandableTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AAuBd;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAC5B,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,KAAK,CAAA;AAET;;;GAGG;AACH,MAAM,WAAW,OAAO,CAAC,CAAC;IACxB,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC,CAAA;IAChB,iDAAiD;IACjD,KAAK,EAAE,SAAS,CAAA;IAChB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,SAAS,CAAA;IACrD;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAA;IAC3C;;;;;OAKG;IACH,gBAAgB,CAAC,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EAAE,CAAA;CACpC;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB,CAAC,CAAC;IACrC,sEAAsE;IACtE,IAAI,EAAE,CAAC,EAAE,CAAA;IACT;;;;;;;;;;OAUG;IACH,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAA;IACrB;;;;;;;;;;;;;;;;;OAiBG;IACH,qBAAqB,CAAC,EAClB,0BAA0B,CAAC,CAAC,CAAC,EAAE,GAC/B,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,0BAA0B,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACjD;;;;;;;;;;;;;;OAcG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;QACnB,0GAA0G;QAC1G,mBAAmB,EAAE,MAAM,CAAA;QAC3B,yFAAyF;QACzF,YAAY,EAAE,MAAM,CAAA;QACpB,0GAA0G;QAC1G,SAAS,EAAE,MAAM,CAAA;KAClB,CAAC,CAAA;CACH;AA4CD,eAAO,MAAM,eAAe,GAAI,CAAC,EAAG,uDAKjC,oBAAoB,CAAC,CAAC,CAAC,4CAiZzB,CAAA"}
@@ -25,6 +25,9 @@ declare const meta: {
25
25
  expandableRowSections: {
26
26
  control: "object";
27
27
  };
28
+ classNames: {
29
+ control: "object";
30
+ };
28
31
  };
29
32
  };
30
33
  export default meta;
@@ -1 +1 @@
1
- {"version":3,"file":"ExpandableTable.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ExpandableTable/ExpandableTable.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAO3D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B8B,CAAA;AAExC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AA+MlC,eAAO,MAAM,MAAM,EAAE,KAsBpB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAkB/B,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KAwJjC,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAuBvB,CAAA;AAED,eAAO,MAAM,4BAA4B,EAAE,KAyH1C,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KA0DhC,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAoExB,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KA6EjC,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KA2E/B,CAAA"}
1
+ {"version":3,"file":"ExpandableTable.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ExpandableTable/ExpandableTable.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAO3D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC8B,CAAA;AAExC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AA+MlC,eAAO,MAAM,MAAM,EAAE,KAsBpB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAkB/B,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KAwJjC,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAuBvB,CAAA;AAED,eAAO,MAAM,4BAA4B,EAAE,KAyH1C,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KA0DhC,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAoExB,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KA6EjC,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KA2E/B,CAAA"}
@@ -1,2 +1,2 @@
1
- export { ExpandableTable, type ExpandableTableProps, type IColumn, type IExpandableTableRowCell, type IExpandableTableRowSection, } from './ExpandableTable';
1
+ export { ExpandableTable, type ExpandableTableProps, type IColumn, type IExpandableTableRowCell, type IExpandableTableRowSection, type ResponsiveBreakpoint, } from './ExpandableTable';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ExpandableTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,OAAO,EACZ,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,GAChC,MAAM,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ExpandableTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,OAAO,EACZ,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,GAC1B,MAAM,mBAAmB,CAAA"}
@@ -1,27 +1,43 @@
1
1
  import * as React from 'react';
2
+ /**
3
+ * Internal base props shared by both `file` and `url` variants of FileItem.
4
+ * Not exported — FileItem is an internal sub-component of FileUpload.
5
+ */
2
6
  interface FileItemBaseProps {
7
+ /** Whether the file has finished uploading. Controls which action buttons render. */
3
8
  uploaded?: boolean;
9
+ /** Upload progress in percent (0–100). Renders a progress bar while strictly between 0 and 100. */
4
10
  progress?: number;
11
+ /** Controls the item's min-height variant. */
5
12
  size?: 'sm' | 'base' | 'lg';
13
+ /** Prevents interaction and applies disabled styling. */
6
14
  disabled?: boolean;
15
+ /** Hides the delete button; download button remains available for uploaded items. */
7
16
  readOnly?: boolean;
17
+ /** Hint message displayed below the item with secondary styling. */
8
18
  note?: React.ReactNode;
19
+ /** Error message displayed below the item with error styling. */
9
20
  error?: React.ReactNode;
10
21
  /** Secondary text displayed below the file name (e.g., file size). */
11
22
  secondaryText?: React.ReactNode;
23
+ /** Fires when the delete button is clicked. */
12
24
  onDelete: () => void;
25
+ /** Fires when an internal error occurs (e.g., download failure). */
13
26
  onError?: (error: string, file?: File) => void;
14
27
  }
28
+ /** Internal props for a FileItem backed by a local `File` object. */
15
29
  interface FileItemFileProps extends FileItemBaseProps {
16
30
  source: 'file';
17
31
  file: File;
18
32
  }
33
+ /** Internal props for a FileItem backed by a remote URL (already-uploaded file). */
19
34
  interface FileItemUrlProps extends FileItemBaseProps {
20
35
  source: 'url';
21
36
  url: string;
22
37
  name: string;
23
38
  type?: string;
24
39
  }
40
+ /** Discriminated union: `source: 'file'` uses a local File, `source: 'url'` references a remote URL. */
25
41
  type FileItemProps = FileItemFileProps | FileItemUrlProps;
26
42
  export declare const FileItem: (props: FileItemProps) => import("react/jsx-runtime").JSX.Element;
27
43
  export {};