@flood-md/react 0.2.6 → 0.2.9

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 (85) hide show
  1. package/README.md +45 -1
  2. package/dist/alert-dialog.js +1 -1
  3. package/dist/calendar-period-grid.d.ts +17 -0
  4. package/dist/calendar-period-grid.js +13 -0
  5. package/dist/calendar-value.d.ts +10 -0
  6. package/dist/calendar-value.js +48 -0
  7. package/dist/calendar.d.ts +21 -0
  8. package/dist/calendar.js +259 -0
  9. package/dist/checkbox.js +1 -1
  10. package/dist/choice-group.js +1 -1
  11. package/dist/collection-cards.d.ts +4 -0
  12. package/dist/collection-cards.js +21 -0
  13. package/dist/color-controls.d.ts +5 -0
  14. package/dist/color-controls.js +110 -0
  15. package/dist/combobox.js +22 -13
  16. package/dist/command-list.d.ts +3 -0
  17. package/dist/command-list.js +93 -0
  18. package/dist/content-elements.js +7 -7
  19. package/dist/context-menu.d.ts +2 -0
  20. package/dist/context-menu.js +76 -0
  21. package/dist/data-display.js +2 -2
  22. package/dist/data-table.d.ts +2 -0
  23. package/dist/data-table.js +58 -0
  24. package/dist/date-field.d.ts +2 -0
  25. package/dist/date-field.js +172 -0
  26. package/dist/date-picker.d.ts +3 -0
  27. package/dist/date-picker.js +108 -0
  28. package/dist/date-range-field.d.ts +3 -0
  29. package/dist/date-range-field.js +84 -0
  30. package/dist/date-range-picker.d.ts +2 -0
  31. package/dist/date-range-picker.js +81 -0
  32. package/dist/date-range-value.d.ts +8 -0
  33. package/dist/date-range-value.js +13 -0
  34. package/dist/date-time-picker.d.ts +3 -0
  35. package/dist/date-time-picker.js +31 -0
  36. package/dist/date-time-range-picker.d.ts +2 -0
  37. package/dist/date-time-range-picker.js +51 -0
  38. package/dist/date-value.d.ts +10 -0
  39. package/dist/date-value.js +31 -0
  40. package/dist/disclosure.js +1 -1
  41. package/dist/editable.d.ts +3 -0
  42. package/dist/editable.js +135 -0
  43. package/dist/error-summary.d.ts +3 -0
  44. package/dist/error-summary.js +39 -0
  45. package/dist/feedback-actions.js +2 -2
  46. package/dist/feedback.js +2 -2
  47. package/dist/file-input.js +1 -1
  48. package/dist/file-records.d.ts +5 -0
  49. package/dist/file-records.js +55 -0
  50. package/dist/form-controls.js +25 -13
  51. package/dist/foundations.css +401 -3
  52. package/dist/hover-card.d.ts +3 -0
  53. package/dist/hover-card.js +144 -0
  54. package/dist/index.d.ts +661 -2
  55. package/dist/index.js +190 -86
  56. package/dist/menu.d.ts +27 -1
  57. package/dist/menu.js +327 -89
  58. package/dist/navigation-layout.js +6 -6
  59. package/dist/navigation-tree.d.ts +3 -0
  60. package/dist/navigation-tree.js +98 -0
  61. package/dist/navigation.js +3 -3
  62. package/dist/numeric-input.js +1 -1
  63. package/dist/overlays.js +11 -10
  64. package/dist/range-calendar.d.ts +2 -0
  65. package/dist/range-calendar.js +35 -0
  66. package/dist/resizable-panels.d.ts +3 -0
  67. package/dist/resizable-panels.js +205 -0
  68. package/dist/scroll-area.js +1 -1
  69. package/dist/select.js +17 -6
  70. package/dist/slider.js +1 -1
  71. package/dist/tag-input.d.ts +3 -0
  72. package/dist/tag-input.js +181 -0
  73. package/dist/text-inputs.js +2 -2
  74. package/dist/time-field.d.ts +2 -0
  75. package/dist/time-field.js +176 -0
  76. package/dist/time-picker.d.ts +2 -0
  77. package/dist/time-picker.js +83 -0
  78. package/dist/time-value.d.ts +12 -0
  79. package/dist/time-value.js +36 -0
  80. package/dist/toolbar.js +1 -1
  81. package/dist/tree-select.d.ts +3 -0
  82. package/dist/tree-select.js +113 -0
  83. package/dist/tree.d.ts +3 -0
  84. package/dist/tree.js +206 -0
  85. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -25,12 +25,114 @@ import { ConfirmationDialog } from "./alert-dialog.js";
25
25
  import { FilePicker } from "./file-input.js";
26
26
  import { SearchField, PasswordField } from "./text-inputs.js";
27
27
  import { SearchSelection } from "./combobox.js";
28
+ import { FreeTagEntry } from "./tag-input.js";
29
+ import { InlineEditable } from "./editable.js";
30
+ import { SearchCommandList } from "./command-list.js";
31
+ import { SegmentedDateField } from "./date-field.js";
32
+ import { SegmentedTimeField } from "./time-field.js";
33
+ import { DateCalendar } from "./calendar.js";
34
+ import { CalendarDatePicker } from "./date-picker.js";
35
+ import { ValidationErrorSummary } from "./error-summary.js";
36
+ import { ResizablePaneGroup } from "./resizable-panels.js";
37
+ import { DateRangeCalendar } from "./range-calendar.js";
38
+ import { PairedDateRangeField } from "./date-range-field.js";
39
+ import { CalendarDateRangePicker } from "./date-range-picker.js";
40
+ import { ContextActionMenu } from "./context-menu.js";
41
+ import { SelectionTree } from "./tree.js";
42
+ import { ClockTimePicker } from "./time-picker.js";
43
+ import { CivilDateTimeRangePicker } from "./date-time-range-picker.js";
44
+ import { FileRecord, UploadRecord, ModalImagePreview, FileMetadata } from "./file-records.js";
45
+ import { ManagedDataTable } from "./data-table.js";
46
+ import { CheckableCard, ExclusiveCard } from "./collection-cards.js";
47
+ import { ColorPreview, ColorEditor } from "./color-controls.js";
48
+ import { HoverPreview } from "./hover-card.js";
49
+ import { HierarchicalSelect } from "./tree-select.js";
50
+ import { CivilDateTimePicker } from "./date-time-picker.js";
51
+ import { HierarchicalNavigation } from "./navigation-tree.js";
52
+ /** @since 0.2.8 */
53
+ export const TimePicker = /* @__PURE__ */ forwardRef(function TimePicker(props, ref) { return _jsx(ClockTimePicker, { ...props, ref: ref }); });
54
+ /** Four atomic civil date/time form values, without timezone conversion. @since 0.2.8 */
55
+ export const DateTimeRangePicker = /* @__PURE__ */ forwardRef(function DateTimeRangePicker(props, ref) { return _jsx(CivilDateTimeRangePicker, { ...props, ref: ref }); });
56
+ /** A quiet combined format/size chip; display metadata only. @since 0.2.8 */
57
+ export const FileMeta = /* @__PURE__ */ forwardRef(function FileMeta(props, ref) { return _jsx(FileMetadata, { ...props, ref: ref }); });
58
+ /** A display row; it neither reads files nor creates object URLs. @since 0.2.8 */
59
+ export const FileItem = /* @__PURE__ */ forwardRef(function FileItem(props, ref) { return _jsx(FileRecord, { ...props, ref: ref }); });
60
+ /** A named native list of FileItem rows. @since 0.2.8 */
61
+ export const FileList = /* @__PURE__ */ forwardRef(function FileList({ label, className, ...props }, ref) {
62
+ if (!label.trim())
63
+ throw new Error("Flood FileList requires a nonempty label");
64
+ return _jsx(DataList, { ...props, ref: ref, "aria-label": label, className: classes("flood-file-list", className) });
65
+ });
66
+ /** Host-owned upload state with applicable actions only. @since 0.2.8 */
67
+ export const UploadItem = /* @__PURE__ */ forwardRef(function UploadItem(props, ref) { return _jsx(UploadRecord, { ...props, ref: ref }); });
68
+ /** A named native list of UploadItem rows. @since 0.2.8 */
69
+ export const UploadList = /* @__PURE__ */ forwardRef(function UploadList(props, ref) { return _jsx(FileList, { ...props, ref: ref }); });
70
+ /** A single-image viewer using Flood Dialog focus and dismissal. @since 0.2.8 */
71
+ export const ImagePreview = /* @__PURE__ */ forwardRef(function ImagePreview(props, ref) { return _jsx(ModalImagePreview, { ...props, ref: ref }); });
72
+ /** A client-side table composed from native table, checkbox and pagination. @since 0.2.8 */
73
+ export const DataTable = /* @__PURE__ */ forwardRef(function DataTable(props, ref) { return _jsx(ManagedDataTable, { ...props, ref: ref }); });
74
+ /** A native list; links and actions stay independent. @since 0.2.8 */
75
+ export const DataList = /* @__PURE__ */ forwardRef(function DataList({ density = "comfortable", dividers = true, className, ...props }, ref) {
76
+ return _jsx("ul", { ...props, ref: ref, role: "list", "data-density": density, "data-dividers": dividers, className: classes("flood-data-list", className) });
77
+ });
78
+ /** A structured list row, never an interactive wrapper. @since 0.2.8 */
79
+ export const DataListItem = /* @__PURE__ */ forwardRef(function DataListItem({ title, description, media, metadata, actions, className, ...props }, ref) {
80
+ return _jsxs("li", { ...props, ref: ref, className: classes("flood-data-list-item", className), children: [hasFieldContent(media) && _jsx("div", { className: "flood-data-list-item__media", children: media }), _jsxs("div", { className: "flood-data-list-item__copy", children: [_jsx("div", { className: "flood-data-list-item__title", children: title }), hasFieldContent(description) && _jsx("div", { className: "flood-data-list-item__description", children: description })] }), (hasFieldContent(metadata) || hasFieldContent(actions)) && _jsxs("div", { className: "flood-data-list-item__trailing", children: [hasFieldContent(metadata) && _jsx("div", { className: "flood-data-list-item__metadata", children: metadata }), hasFieldContent(actions) && _jsx("div", { className: "flood-data-list-item__actions", children: actions })] })] });
81
+ });
82
+ /** A native checkbox inside a clickable noninteractive content card. @since 0.2.8 */
83
+ export const CheckCard = /* @__PURE__ */ forwardRef(function CheckCard(props, ref) { return _jsx(CheckableCard, { ...props, ref: ref }); });
84
+ /** Give exclusive choices the same native name and an enclosing Fieldset. @since 0.2.8 */
85
+ export const RadioCard = /* @__PURE__ */ forwardRef(function RadioCard(props, ref) { return _jsx(ExclusiveCard, { ...props, ref: ref }); });
86
+ /** @since 0.2.8 */
87
+ export const ColorSwatch = /* @__PURE__ */ forwardRef(function ColorSwatch(props, ref) { return _jsx(ColorPreview, { ...props, ref: ref }); });
88
+ /** @since 0.2.8 */
89
+ export const ColorPicker = /* @__PURE__ */ forwardRef(function ColorPicker(props, ref) { return _jsx(ColorEditor, { ...props, ref: ref }); });
90
+ /** @since 0.2.8 */
91
+ export const HoverCard = /* @__PURE__ */ forwardRef(function HoverCard(props, ref) { return _jsx(HoverPreview, { ...props, ref: ref }); });
92
+ /** @since 0.2.8 */
93
+ export const TreeSelect = /* @__PURE__ */ forwardRef(function TreeSelect(props, ref) { return _jsx(HierarchicalSelect, { ...props, ref: ref }); });
94
+ /** @since 0.2.8 */
95
+ export const DateTimePicker = /* @__PURE__ */ forwardRef(function DateTimePicker(props, ref) {
96
+ return _jsx(CivilDateTimePicker, { ...props, ref: ref });
97
+ });
98
+ /** @since 0.2.7 */
99
+ export const Tree = /* @__PURE__ */ forwardRef(function Tree(props, ref) {
100
+ return _jsx(SelectionTree, { ...props, ref: ref });
101
+ });
102
+ /** @since 0.2.7 */
103
+ export const NavigationTree = /* @__PURE__ */ forwardRef(function NavigationTree(props, ref) {
104
+ return _jsx(HierarchicalNavigation, { ...props, ref: ref });
105
+ });
106
+ /** @since 0.2.7 */
107
+ export const ErrorSummary = /* @__PURE__ */ forwardRef(function ErrorSummary({ announcement = "off", autoFocus = false, ...props }, ref) { return _jsx(ValidationErrorSummary, { ...props, ref: ref, announcement: announcement, autoFocus: autoFocus }); });
108
+ /** @since 0.2.7 */
109
+ export const ResizablePanels = /* @__PURE__ */ forwardRef(function ResizablePanels({ orientation = "horizontal", defaultValue = 50, min = 10, max = 90, step = 1, largeStep = 10, ...props }, ref) { return _jsx(ResizablePaneGroup, { ...props, ref: ref, orientation: orientation, defaultValue: defaultValue, min: min, max: max, step: step, largeStep: largeStep }); });
110
+ /** @since 0.2.7 */
111
+ export const RangeCalendar = /* @__PURE__ */ forwardRef(function RangeCalendar({ weekStartsOn = 0, locale = "en-US", autoFocus = false, ...props }, ref) { return _jsx(DateRangeCalendar, { ...props, ref: ref, weekStartsOn: weekStartsOn, locale: locale, autoFocus: autoFocus }); });
112
+ /** @since 0.2.7 */
113
+ export const DateRangeField = /* @__PURE__ */ forwardRef(function DateRangeField({ controlSize = "md", order = "month-day-year", startLabel = "Start date", endLabel = "End date", ...props }, ref) { return _jsx(PairedDateRangeField, { ...props, ref: ref, controlSize: controlSize, order: order, startLabel: startLabel, endLabel: endLabel }); });
114
+ /** @since 0.2.7 */
115
+ export const DateRangePicker = /* @__PURE__ */ forwardRef(function DateRangePicker({ controlSize = "md", defaultOpen = false, ...props }, ref) { return _jsx(CalendarDateRangePicker, { ...props, ref: ref, controlSize: controlSize, defaultOpen: defaultOpen }); });
116
+ /** @since 0.2.7 */
117
+ export const DatePicker = /* @__PURE__ */ forwardRef(function DatePicker({ controlSize = "md", defaultOpen = false, ...props }, ref) { return _jsx(CalendarDatePicker, { ...props, ref: ref, controlSize: controlSize, defaultOpen: defaultOpen }); });
118
+ /** @since 0.2.7 */
119
+ export const Calendar = /* @__PURE__ */ forwardRef(function Calendar({ weekStartsOn = 0, locale = "en-US", autoFocus = false, ...props }, ref) { return _jsx(DateCalendar, { ...props, ref: ref, weekStartsOn: weekStartsOn, locale: locale, autoFocus: autoFocus }); });
120
+ /** @since 0.2.7 */
121
+ export const TimeField = /* @__PURE__ */ forwardRef(function TimeField({ controlSize = "md", precision = "minute", ...props }, ref) { return _jsx(SegmentedTimeField, { ...props, ref: ref, controlSize: controlSize, precision: precision }); });
122
+ /** @since 0.2.7 */
123
+ export const DateField = /* @__PURE__ */ forwardRef(function DateField({ controlSize = "md", order = "month-day-year", ...props }, ref) { return _jsx(SegmentedDateField, { ...props, ref: ref, controlSize: controlSize, order: order }); });
124
+ /** @since 0.2.7 */
125
+ export const CommandList = /* @__PURE__ */ forwardRef(function CommandList({ controlSize = "md", hideLabel = false, disabled = false, loading = false, ...props }, ref) { return _jsx(SearchCommandList, { ...props, ref: ref, controlSize: controlSize, hideLabel: hideLabel, disabled: disabled, loading: loading }); });
126
+ /** @since 0.2.7 */
127
+ export const TagInput = /* @__PURE__ */ forwardRef(function TagInput({ controlSize = "md", hideLabel = false, removeLabel = "Remove", requiredMessage = "Add at least one tag.", ...props }, ref) { return _jsx(FreeTagEntry, { ...props, ref: ref, controlSize: controlSize, hideLabel: hideLabel, removeLabel: removeLabel, requiredMessage: requiredMessage }); });
128
+ /** @since 0.2.7 */
129
+ export const Editable = /* @__PURE__ */ forwardRef(function Editable({ controlSize = "md", blurAction = "commit", showActions = true, ...props }, ref) { return _jsx(InlineEditable, { ...props, ref: ref, controlSize: controlSize, blurAction: blurAction, showActions: showActions }); });
28
130
  const classes = (...values) => values.filter(Boolean).join(" ");
29
- export const Button = forwardRef(function Button({ variant = "solid", size = "md", loading = false, disabled, type = "button", className, children, ...props }, ref) {
131
+ export const Button = /* @__PURE__ */ forwardRef(function Button({ variant = "solid", size = "md", loading = false, disabled, type = "button", className, children, ...props }, ref) {
30
132
  return (_jsxs("button", { ...props, ref: ref, type: type, disabled: disabled || loading, "aria-busy": loading || undefined, className: classes("flood-button", `flood-button--${variant}`, `flood-button--${size}`, className), children: [loading && _jsx(Spinner, { decorative: true }), children] }));
31
133
  });
32
134
  /** @since 0.2.5 */
33
- export const Tag = forwardRef(function Tag({ size = "md", icon, disabled = false, onRemove, removeLabel, removeButtonProps, className, children, ...props }, ref) {
135
+ export const Tag = /* @__PURE__ */ forwardRef(function Tag({ size = "md", icon, disabled = false, onRemove, removeLabel, removeButtonProps, className, children, ...props }, ref) {
34
136
  const label = removeLabel ?? (typeof children === "string" || typeof children === "number" ? `Remove ${children}` : "");
35
137
  if (onRemove && !label.trim())
36
138
  throw new Error("Flood Tag removal needs an accessible removeLabel for rich content");
@@ -39,67 +141,69 @@ export const Tag = forwardRef(function Tag({ size = "md", icon, disabled = false
39
141
  onRemove(); }, children: _jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", "aria-hidden": "true", children: _jsx("path", { d: "m6 6 12 12M18 6 6 18" }) }) })] });
40
142
  });
41
143
  /** @since 0.2.4 */
42
- export const Kbd = forwardRef(function Kbd({ size = "sm", className, ...props }, ref) {
144
+ export const Kbd = /* @__PURE__ */ forwardRef(function Kbd({ size = "sm", className, ...props }, ref) {
43
145
  return _jsx("kbd", { ...props, ref: ref, className: classes("flood-kbd", className), "data-size": size });
44
146
  });
45
147
  /** @since 0.2.4 */
46
- export const Toolbar = forwardRef(function Toolbar({ label, orientation = "horizontal", loop = true, ...props }, ref) {
148
+ export const Toolbar = /* @__PURE__ */ forwardRef(function Toolbar({ label, orientation = "horizontal", loop = true, ...props }, ref) {
47
149
  return _jsx(RovingToolbar, { ...props, ref: ref, label: label, orientation: orientation, loop: loop });
48
150
  });
49
151
  /** @since 0.2.4 */
50
- export const DescriptionList = forwardRef(function DescriptionList({ items, layout = "inline", density = "compact", dividers = false, ...props }, ref) {
152
+ export const DescriptionList = /* @__PURE__ */ forwardRef(function DescriptionList({ items, layout = "inline", density = "compact", dividers = false, ...props }, ref) {
51
153
  return _jsx(DescribedData, { ...props, ref: ref, items: items, layout: layout, density: density, dividers: dividers });
52
154
  });
53
155
  /** @since 0.2.4 */
54
- export const Table = forwardRef(function Table({ caption, children, hideCaption = false, density = "comfortable", striped = false, scrollLabel, ...props }, ref) {
156
+ export const Table = /* @__PURE__ */ forwardRef(function Table({ caption, children, hideCaption = false, density = "comfortable", striped = false, scrollLabel, ...props }, ref) {
55
157
  return _jsx(TabularData, { ...props, ref: ref, caption: caption, hideCaption: hideCaption, density: density, striped: striped, scrollLabel: scrollLabel, children: children });
56
158
  });
57
159
  /** @since 0.2.4 */
58
- export const Badge = forwardRef(function Badge({ size = "md", tone = "neutral", variant = "subtle", className, ...props }, ref) {
160
+ export const Badge = /* @__PURE__ */ forwardRef(function Badge({ size = "md", tone = "neutral", variant = "subtle", className, ...props }, ref) {
59
161
  return _jsx("span", { ...props, ref: ref, className: classes("flood-badge", className), "data-size": size, "data-tone": tone, "data-variant": variant });
60
162
  });
61
163
  /** @since 0.2.4 */
62
- export const Spinner = forwardRef(function Spinner({ size = "md", label = "Loading", decorative = false, className, ...props }, ref) {
164
+ export const Spinner = /* @__PURE__ */ forwardRef(function Spinner({ size = "md", label = "Loading", decorative = false, className, ...props }, ref) {
63
165
  return _jsxs("span", { ...props, ref: ref, className: classes("flood-loading", className), "data-size": size, role: decorative ? undefined : "status", "aria-hidden": decorative || undefined, children: [_jsx("span", { className: "flood-spinner", "aria-hidden": "true" }), !decorative && _jsx(VisuallyHidden, { children: label })] });
64
166
  });
65
167
  /** @since 0.2.4 */
66
- export const Skeleton = forwardRef(function Skeleton({ shape = "text", width, height, animate = true, className, style, ...props }, ref) {
168
+ export const Skeleton = /* @__PURE__ */ forwardRef(function Skeleton({ shape = "text", width, height, animate = true, className, style, ...props }, ref) {
67
169
  return _jsx("span", { ...props, ref: ref, className: classes("flood-skeleton", className), "data-shape": shape, "data-animate": animate, "aria-hidden": "true", style: { width, height, ...style } });
68
170
  });
69
171
  /** @since 0.2.4 */
70
- export const Avatar = forwardRef(function Avatar({ name, src, fallback, size = "md", shape = "circle", decorative = false, className, ...props }, ref) {
172
+ export const Avatar = /* @__PURE__ */ forwardRef(function Avatar({ name, src, fallback, size = "md", shape = "circle", decorative = false, className, ...props }, ref) {
71
173
  const initials = name.trim().split(/\s+/u).filter(Boolean).slice(0, 2).map(word => Array.from(word)[0]).join("").toUpperCase();
72
174
  return _jsx("span", { ...props, ref: ref, className: classes("flood-avatar", className), "data-size": size, "data-shape": shape, role: decorative ? undefined : "img", "aria-label": decorative ? undefined : name, "aria-hidden": decorative || undefined, children: _jsx(AvatarArtwork, { src: src, fallback: fallback ?? (initials || "?") }, src ?? "") });
73
175
  });
74
176
  /** @since 0.2.4 */
75
- export const Progress = forwardRef(function Progress({ label, value, max = 100, valueText, size = "md", tone = "accent", hideLabel = false, ...props }, ref) {
177
+ export const Progress = /* @__PURE__ */ forwardRef(function Progress({ label, value, max = 100, valueText, size = "md", tone = "accent", hideLabel = false, ...props }, ref) {
76
178
  return _jsx(ValueIndicator, { ...props, ref: ref, kind: "progress", label: label, value: value, min: 0, max: max, valueText: valueText, size: size, tone: tone, hideLabel: hideLabel });
77
179
  });
78
180
  /** @since 0.2.4 */
79
- export const Meter = forwardRef(function Meter({ label, value, min = 0, max = 100, valueText, size = "md", tone = "neutral", hideLabel = false, ...props }, ref) {
181
+ export const Meter = /* @__PURE__ */ forwardRef(function Meter({ label, value, min = 0, max = 100, valueText, size = "md", tone = "neutral", hideLabel = false, ...props }, ref) {
80
182
  return _jsx(ValueIndicator, { ...props, ref: ref, kind: "meter", label: label, value: value, min: min, max: max, valueText: valueText, size: size, tone: tone, hideLabel: hideLabel });
81
183
  });
82
184
  /** @since 0.2.4 */
83
- export const Alert = forwardRef(function Alert({ title, tone = "info", icon, announcement = "off", ...props }, ref) {
185
+ export const Alert = /* @__PURE__ */ forwardRef(function Alert({ title, tone = "info", icon, announcement = "off", ...props }, ref) {
84
186
  return _jsx(FeedbackMessage, { ...props, ref: ref, title: title, tone: tone, icon: icon, announcement: announcement });
85
187
  });
86
- export const Tabs = forwardRef(function Tabs({ activationMode = "automatic", orientation = "horizontal", controlSize = "md", disabled = false, iconOnly = false, ...props }, ref) { return _jsx(TabNavigation, { ...props, ref: ref, activationMode: activationMode, orientation: orientation, controlSize: controlSize, disabled: disabled, iconOnly: iconOnly }); });
87
- export const Breadcrumb = forwardRef(function Breadcrumb({ label = "Breadcrumb", separator = "/", ...props }, ref) { return _jsx(BreadcrumbNavigation, { ...props, ref: ref, label: label, separator: separator }); });
88
- export const Pagination = forwardRef(function Pagination({ siblingCount = 1, controlSize = "sm", disabled = false, label = "Pagination", previousLabel = "Previous page", nextLabel = "Next page", ...props }, ref) { return _jsx(PageNavigation, { ...props, ref: ref, siblingCount: siblingCount, controlSize: controlSize, disabled: disabled, label: label, previousLabel: previousLabel, nextLabel: nextLabel }); });
188
+ export const Tabs = /* @__PURE__ */ forwardRef(function Tabs({ activationMode = "automatic", orientation = "horizontal", controlSize = "md", disabled = false, iconOnly = false, ...props }, ref) { return _jsx(TabNavigation, { ...props, ref: ref, activationMode: activationMode, orientation: orientation, controlSize: controlSize, disabled: disabled, iconOnly: iconOnly }); });
189
+ export const Breadcrumb = /* @__PURE__ */ forwardRef(function Breadcrumb({ label = "Breadcrumb", separator = "/", ...props }, ref) { return _jsx(BreadcrumbNavigation, { ...props, ref: ref, label: label, separator: separator }); });
190
+ export const Pagination = /* @__PURE__ */ forwardRef(function Pagination({ siblingCount = 1, controlSize = "sm", disabled = false, label = "Pagination", previousLabel = "Previous page", nextLabel = "Next page", ...props }, ref) { return _jsx(PageNavigation, { ...props, ref: ref, siblingCount: siblingCount, controlSize: controlSize, disabled: disabled, label: label, previousLabel: previousLabel, nextLabel: nextLabel }); });
191
+ /** @since 0.2.7 */
192
+ export const ContextMenu = /* @__PURE__ */ forwardRef(function ContextMenu({ defaultOpen = false, disabled = false, controlSize = "sm", ...props }, ref) { return _jsx(ContextActionMenu, { ...props, ref: ref, defaultOpen: defaultOpen, disabled: disabled, controlSize: controlSize }); });
89
193
  /** @since 0.2.4 */
90
- export const Menu = forwardRef(function Menu({ defaultOpen = false, disabled = false, side = "bottom", align = "start", controlSize = "sm", ...props }, ref) {
194
+ export const Menu = /* @__PURE__ */ forwardRef(function Menu({ defaultOpen = false, disabled = false, side = "bottom", align = "start", controlSize = "sm", ...props }, ref) {
91
195
  return _jsx(ActionMenu, { ...props, ref: ref, defaultOpen: defaultOpen, disabled: disabled, side: side, align: align, controlSize: controlSize });
92
196
  });
93
- export const Tooltip = forwardRef(function Tooltip({ side = "top", align = "center", delay = 300, disabled = false, ...props }, ref) { return _jsx(AnchoredOverlay, { ...props, ref: ref, kind: "tooltip", side: side, align: align, delay: delay, disabled: disabled }); });
94
- export const Popover = forwardRef(function Popover({ side = "bottom", align = "start", defaultOpen = false, disabled = false, closeLabel = "Close", ...props }, ref) { return _jsx(AnchoredOverlay, { ...props, ref: ref, kind: "popover", side: side, align: align, defaultOpen: defaultOpen, disabled: disabled, closeLabel: closeLabel }); });
95
- export const Dialog = forwardRef(function Dialog({ defaultOpen = false, disabled = false, closeLabel = "Close", closeOnOutsideClick = true, ...props }, ref) { return _jsx(ModalOverlay, { ...props, ref: ref, defaultOpen: defaultOpen, disabled: disabled, closeLabel: closeLabel, closeOnOutsideClick: closeOnOutsideClick }); });
96
- export const Drawer = forwardRef(function Drawer({ side = "end", size = "md", defaultOpen = false, closeLabel = "Close", closeOnOutsideClick = true, className, footer, ...props }, ref) {
197
+ export const Tooltip = /* @__PURE__ */ forwardRef(function Tooltip({ side = "top", align = "center", delay = 300, disabled = false, ...props }, ref) { return _jsx(AnchoredOverlay, { ...props, ref: ref, kind: "tooltip", side: side, align: align, delay: delay, disabled: disabled }); });
198
+ export const Popover = /* @__PURE__ */ forwardRef(function Popover({ side = "bottom", align = "start", defaultOpen = false, disabled = false, closeLabel = "Close", ...props }, ref) { return _jsx(AnchoredOverlay, { ...props, ref: ref, kind: "popover", side: side, align: align, defaultOpen: defaultOpen, disabled: disabled, closeLabel: closeLabel }); });
199
+ export const Dialog = /* @__PURE__ */ forwardRef(function Dialog({ defaultOpen = false, disabled = false, closeLabel = "Close", closeOnOutsideClick = true, ...props }, ref) { return _jsx(ModalOverlay, { ...props, ref: ref, defaultOpen: defaultOpen, disabled: disabled, closeLabel: closeLabel, closeOnOutsideClick: closeOnOutsideClick }); });
200
+ export const Drawer = /* @__PURE__ */ forwardRef(function Drawer({ side = "end", size = "md", defaultOpen = false, closeLabel = "Close", closeOnOutsideClick = true, className, footer, ...props }, ref) {
97
201
  return _jsx(ModalOverlay, { ...props, ref: ref, defaultOpen: defaultOpen, closeLabel: closeLabel, closeOnOutsideClick: closeOnOutsideClick, className: classes("flood-drawer", className), "data-side": side, "data-size": size, scrollBody: true, footer: footer });
98
202
  });
99
- export const AlertDialog = forwardRef(function AlertDialog({ defaultOpen = false, confirmLabel = "Continue", cancelLabel = "Cancel", confirmDisabled = false, ...props }, ref) {
203
+ export const AlertDialog = /* @__PURE__ */ forwardRef(function AlertDialog({ defaultOpen = false, confirmLabel = "Continue", cancelLabel = "Cancel", confirmDisabled = false, ...props }, ref) {
100
204
  return _jsx(ConfirmationDialog, { ...props, ref: ref, defaultOpen: defaultOpen, confirmLabel: confirmLabel, cancelLabel: cancelLabel, confirmDisabled: confirmDisabled });
101
205
  });
102
- export const Collapsible = forwardRef(function Collapsible({ open, defaultOpen = false, onOpenChange, disabled = false, controlSize = "md", ...props }, ref) {
206
+ export const Collapsible = /* @__PURE__ */ forwardRef(function Collapsible({ open, defaultOpen = false, onOpenChange, disabled = false, controlSize = "md", ...props }, ref) {
103
207
  const [local, setLocal] = useState(defaultOpen);
104
208
  return _jsx(Disclosure, { ...props, ref: ref, expanded: open ?? local, disabled: disabled, controlSize: controlSize, onExpandedChange: next => {
105
209
  if (open === undefined)
@@ -107,7 +211,7 @@ export const Collapsible = forwardRef(function Collapsible({ open, defaultOpen =
107
211
  onOpenChange?.(next);
108
212
  } });
109
213
  });
110
- export const Accordion = forwardRef(function Accordion({ label, items, expansionMode = "single", value, defaultValue = [], onValueChange, disabled = false, controlSize = "md", headingLevel = 3, className, onKeyDown, ...props }, ref) {
214
+ export const Accordion = /* @__PURE__ */ forwardRef(function Accordion({ label, items, expansionMode = "single", value, defaultValue = [], onValueChange, disabled = false, controlSize = "md", headingLevel = 3, className, onKeyDown, ...props }, ref) {
111
215
  const [local, setLocal] = useState(() => [...new Set(defaultValue)]);
112
216
  const expanded = value ?? local;
113
217
  if (new Set(items.map(item => item.value)).size !== items.length)
@@ -135,7 +239,7 @@ export const Accordion = forwardRef(function Accordion({ label, items, expansion
135
239
  }, children: item.content }, item.value)) });
136
240
  });
137
241
  /** A native toggle button; its accessible name stays stable when pressed. */
138
- export const Toggle = forwardRef(function Toggle({ pressed, defaultPressed = false, onPressedChange, iconOnly = false, size = "md", variant = "subtle", onClick, className, children, disabled, loading, ...props }, ref) {
242
+ export const Toggle = /* @__PURE__ */ forwardRef(function Toggle({ pressed, defaultPressed = false, onPressedChange, iconOnly = false, size = "md", variant = "subtle", onClick, className, children, disabled, loading, ...props }, ref) {
139
243
  const [local, setLocal] = useState(defaultPressed);
140
244
  const selected = pressed ?? local;
141
245
  return _jsx(Button, { ...props, ref: ref, type: "button", "aria-pressed": selected, size: size, variant: variant, disabled: disabled, loading: loading, className: classes("flood-toggle", iconOnly && "flood-icon-button", className), onClick: event => {
@@ -148,7 +252,7 @@ export const Toggle = forwardRef(function Toggle({ pressed, defaultPressed = fal
148
252
  }, children: iconOnly ? _jsx(IconSlot, { size: size, children: children }) : children });
149
253
  });
150
254
  /** Optional selections exposed as pressed buttons, not radios, tabs or a toolbar. */
151
- export const ToggleGroup = forwardRef(function ToggleGroup({ label, options, selectionMode = "multiple", value, defaultValue = [], onValueChange, orientation = "horizontal", size = "md", variant = "subtle", disabled = false, iconOnly = false, className, onKeyDown, ...props }, ref) {
255
+ export const ToggleGroup = /* @__PURE__ */ forwardRef(function ToggleGroup({ label, options, selectionMode = "multiple", value, defaultValue = [], onValueChange, orientation = "horizontal", size = "md", variant = "subtle", disabled = false, iconOnly = false, className, onKeyDown, ...props }, ref) {
152
256
  const [local, setLocal] = useState(() => [...new Set(defaultValue)]);
153
257
  const selected = value ?? local;
154
258
  if (new Set(options.map(option => option.value)).size !== options.length)
@@ -181,66 +285,66 @@ export const ToggleGroup = forwardRef(function ToggleGroup({ label, options, sel
181
285
  }, children: iconOnly ? option.icon : _jsxs(_Fragment, { children: [option.icon && _jsx(IconSlot, { size: size, children: option.icon }), option.label] }) }, option.value)) }) });
182
286
  });
183
287
  /** Connected actions keep their ordinary Tab order; this is not a toolbar. */
184
- export const ButtonGroup = forwardRef(function ButtonGroup({ label, orientation = "horizontal", className, ...props }, ref) {
288
+ export const ButtonGroup = /* @__PURE__ */ forwardRef(function ButtonGroup({ label, orientation = "horizontal", className, ...props }, ref) {
185
289
  return _jsx(ScrollArea, { orientation: "horizontal", tabIndex: -1, role: "group", "aria-label": `${label} scrolling`, className: "flood-connected-scroll", hidden: props.hidden, dir: props.dir, lang: props.lang, style: { maxInlineSize: "100%" }, children: _jsx("div", { ...props, ref: ref, role: "group", "aria-label": label, "data-orientation": orientation, className: classes("flood-button-group", className) }) });
186
290
  });
187
- export const Input = forwardRef(function Input({ invalid, status, controlSize = "md", className, ...props }, ref) {
291
+ export const Input = /* @__PURE__ */ forwardRef(function Input({ invalid, status, controlSize = "md", className, ...props }, ref) {
188
292
  return (_jsx("input", { ...props, ref: ref, "data-status": resolveFieldStatus(status, invalid, props["aria-invalid"]), "aria-invalid": invalid || status === "error" || props["aria-invalid"], className: classes("flood-input", `flood-control--${controlSize}`, className) }));
189
293
  });
190
294
  /** One real Input with host-owned logical start/end adornments. Ref and native attributes target the input. */
191
- export const InputGroup = forwardRef(function InputGroup({ start, end, controlSize = "md", className, style, invalid, status, disabled, readOnly, ...props }, ref) {
295
+ export const InputGroup = /* @__PURE__ */ forwardRef(function InputGroup({ start, end, controlSize = "md", className, style, invalid, status, disabled, readOnly, ...props }, ref) {
192
296
  return _jsxs("div", { hidden: props.hidden, dir: props.dir, lang: props.lang, className: classes("flood-input-group", `flood-control--${controlSize}`, className), style: style, "data-status": resolveFieldStatus(status, invalid, props["aria-invalid"]), "data-disabled": disabled || undefined, "data-readonly": readOnly || undefined, children: [hasFieldContent(start) && _jsx("div", { className: "flood-input-group__addon flood-input-group__addon--start", children: typeof start === "string" ? _jsx("bdi", { dir: "auto", children: start }) : start }), _jsx(Input, { ...props, ref: ref, controlSize: controlSize, invalid: invalid, status: status, disabled: disabled, readOnly: readOnly }), hasFieldContent(end) && _jsx("div", { className: "flood-input-group__addon flood-input-group__addon--end", children: typeof end === "string" ? _jsx("bdi", { dir: "auto", children: end }) : end })] });
193
297
  });
194
- export const FileInput = forwardRef(function FileInput({ clearable = true, clearLabel = "Clear files", controlSize = "md", ...props }, ref) {
298
+ export const FileInput = /* @__PURE__ */ forwardRef(function FileInput({ clearable = true, clearLabel = "Clear files", controlSize = "md", ...props }, ref) {
195
299
  return _jsx(FilePicker, { ...props, ref: ref, clearable: clearable, clearLabel: clearLabel, controlSize: controlSize, actionComponent: IconButton, iconComponent: IconSlot });
196
300
  });
197
- export const SearchInput = forwardRef(function SearchInput({ clearable = true, clearLabel = "Clear search", controlSize = "md", ...props }, ref) {
301
+ export const SearchInput = /* @__PURE__ */ forwardRef(function SearchInput({ clearable = true, clearLabel = "Clear search", controlSize = "md", ...props }, ref) {
198
302
  return _jsx(SearchField, { ...props, ref: ref, clearable: clearable, clearLabel: clearLabel, controlSize: controlSize, group: InputGroup, action: IconButton, icon: IconSlot });
199
303
  });
200
- export const PasswordInput = forwardRef(function PasswordInput({ defaultVisible = false, showPasswordLabel = "Show password", hidePasswordLabel = "Hide password", controlSize = "md", ...props }, ref) {
304
+ export const PasswordInput = /* @__PURE__ */ forwardRef(function PasswordInput({ defaultVisible = false, showPasswordLabel = "Show password", hidePasswordLabel = "Hide password", controlSize = "md", ...props }, ref) {
201
305
  return _jsx(PasswordField, { ...props, ref: ref, defaultVisible: defaultVisible, showPasswordLabel: showPasswordLabel, hidePasswordLabel: hidePasswordLabel, controlSize: controlSize, group: InputGroup, action: IconButton, icon: IconSlot });
202
306
  });
203
307
  /** @since 0.2.5 */
204
- export const Combobox = forwardRef(function Combobox({ value, defaultValue = "", onValueChange, clearable = false, emptyMessage = "No results found.", listLabel = "Options", toggleLabel = "Show options", clearLabel = "Clear selection", invalidSelectionMessage = "Select an option.", controlSize = "md", ...props }, ref) {
308
+ export const Combobox = /* @__PURE__ */ forwardRef(function Combobox({ value, defaultValue = "", onValueChange, clearable = false, emptyMessage = "No results found.", listLabel = "Options", toggleLabel = "Show options", clearLabel = "Clear selection", invalidSelectionMessage = "Select an option.", controlSize = "md", ...props }, ref) {
205
309
  return _jsx(SearchSelection, { ...props, ref: ref, multiple: false, selectedValues: value === undefined ? undefined : value ? [value] : [], initialValues: defaultValue ? [defaultValue] : [], onSelectionChange: next => onValueChange?.(next[0] ?? ""), clearable: clearable, emptyMessage: emptyMessage, listLabel: listLabel, toggleLabel: toggleLabel, clearLabel: clearLabel, invalidSelectionMessage: invalidSelectionMessage, controlSize: controlSize });
206
310
  });
207
311
  /** @since 0.2.5 */
208
- export const MultiSelect = forwardRef(function MultiSelect({ value, defaultValue = [], onValueChange, removeItemLabel = "Remove", clearable = false, emptyMessage = "No results found.", listLabel = "Options", toggleLabel = "Show options", clearLabel = "Clear selection", invalidSelectionMessage = "Select at least one option.", controlSize = "md", ...props }, ref) {
312
+ export const MultiSelect = /* @__PURE__ */ forwardRef(function MultiSelect({ value, defaultValue = [], onValueChange, removeItemLabel = "Remove", clearable = false, emptyMessage = "No results found.", listLabel = "Options", toggleLabel = "Show options", clearLabel = "Clear selection", invalidSelectionMessage = "Select at least one option.", controlSize = "md", ...props }, ref) {
209
313
  return _jsx(SearchSelection, { ...props, ref: ref, multiple: true, selectedValues: value, initialValues: defaultValue, onSelectionChange: onValueChange, removeItemLabel: removeItemLabel, clearable: clearable, emptyMessage: emptyMessage, listLabel: listLabel, toggleLabel: toggleLabel, clearLabel: clearLabel, invalidSelectionMessage: invalidSelectionMessage, controlSize: controlSize });
210
314
  });
211
315
  /** @since 0.2.5 */
212
- export const NumberInput = forwardRef(function NumberInput({ defaultValue = 0, step = 1, controlSize = "md", decreaseLabel = "Decrease value", increaseLabel = "Increase value", ...props }, ref) {
316
+ export const NumberInput = /* @__PURE__ */ forwardRef(function NumberInput({ defaultValue = 0, step = 1, controlSize = "md", decreaseLabel = "Decrease value", increaseLabel = "Increase value", ...props }, ref) {
213
317
  return _jsx(NumericStepper, { ...props, ref: ref, defaultValue: defaultValue, step: step, controlSize: controlSize, decreaseLabel: decreaseLabel, increaseLabel: increaseLabel, inputComponent: InputGroup, buttonComponent: IconButton });
214
318
  });
215
319
  /** @since 0.2.5 */
216
- export const Slider = forwardRef(function Slider({ defaultValue = [50], min = 0, max = 100, step = 1, showValue = true, readOnly = false, controlSize = "md", ...props }, ref) {
320
+ export const Slider = /* @__PURE__ */ forwardRef(function Slider({ defaultValue = [50], min = 0, max = 100, step = 1, showValue = true, readOnly = false, controlSize = "md", ...props }, ref) {
217
321
  return _jsx(RangeControl, { ...props, ref: ref, defaultValue: defaultValue, min: min, max: max, step: step, showValue: showValue, readOnly: readOnly, controlSize: controlSize, fieldsetComponent: Fieldset });
218
322
  });
219
- export const Textarea = forwardRef(function Textarea({ invalid, status, controlSize = "md", className, ...props }, ref) {
323
+ export const Textarea = /* @__PURE__ */ forwardRef(function Textarea({ invalid, status, controlSize = "md", className, ...props }, ref) {
220
324
  return (_jsx("textarea", { ...props, ref: ref, "data-status": resolveFieldStatus(status, invalid, props["aria-invalid"]), "aria-invalid": invalid || status === "error" || props["aria-invalid"], className: classes("flood-input", "flood-textarea", `flood-control--${controlSize}`, className) }));
221
325
  });
222
326
  /** Native select and option semantics with an independent visual control size. */
223
- export const Select = forwardRef(function Select({ invalid, status, controlSize = "md", className, multiple, size, ...props }, ref) {
327
+ export const Select = /* @__PURE__ */ forwardRef(function Select({ invalid, status, controlSize = "md", className, multiple, size, ...props }, ref) {
224
328
  const listbox = multiple || (size !== undefined && size > 1);
225
329
  if (!listbox)
226
330
  return _jsx(SingleSelect, { ...props, status: status, invalid: invalid, controlSize: controlSize, className: className, size: size, ref: ref });
227
331
  return (_jsx("span", { hidden: props.hidden, dir: props.dir, lang: props.lang, className: classes("flood-select", `flood-control--${controlSize}`, listbox && "flood-select--listbox"), children: _jsx("select", { ...props, ref: ref, multiple: multiple, size: size, "data-status": resolveFieldStatus(status, invalid, props["aria-invalid"]), "aria-invalid": invalid || status === "error" || props["aria-invalid"], className: classes("flood-input", "flood-select__control", `flood-control--${controlSize}`, className) }) }));
228
332
  });
229
- export const Checkbox = forwardRef(function Checkbox({ label, indeterminate = false, className, ...props }, ref) {
333
+ export const Checkbox = /* @__PURE__ */ forwardRef(function Checkbox({ label, indeterminate = false, className, ...props }, ref) {
230
334
  return (_jsxs("label", { hidden: props.hidden, dir: props.dir, lang: props.lang, className: classes("flood-choice", className), children: [_jsx(MixedCheckbox, { ...props, ref: ref, indeterminate: indeterminate }), _jsx("span", { children: label })] }));
231
335
  });
232
- export const Radio = forwardRef(function Radio({ label, className, ...props }, ref) {
336
+ export const Radio = /* @__PURE__ */ forwardRef(function Radio({ label, className, ...props }, ref) {
233
337
  return (_jsxs("label", { hidden: props.hidden, dir: props.dir, lang: props.lang, className: classes("flood-choice", className), children: [_jsx("input", { ...props, ref: ref, type: "radio", className: "flood-check" }), _jsx("span", { children: label })] }));
234
338
  });
235
- export const Switch = forwardRef(function Switch({ label, className, ...props }, ref) {
339
+ export const Switch = /* @__PURE__ */ forwardRef(function Switch({ label, className, ...props }, ref) {
236
340
  return (_jsxs("label", { hidden: props.hidden, dir: props.dir, lang: props.lang, className: classes("flood-choice", "flood-switch", className), children: [_jsx("span", { children: label }), _jsx("input", { ...props, ref: ref, type: "checkbox", role: "switch", className: "flood-switch-input" })] }));
237
341
  });
238
342
  /** A native label; the required marker never substitutes for the control's required prop. */
239
- export const Label = forwardRef(function Label({ required, children, className, ...props }, ref) {
343
+ export const Label = /* @__PURE__ */ forwardRef(function Label({ required, children, className, ...props }, ref) {
240
344
  return _jsxs("label", { ...props, ref: ref, className: classes("flood-label", className), children: [children, required && _jsx("span", { "aria-hidden": "true", children: " *" })] });
241
345
  });
242
346
  /** A native group: disabled, form ownership and nested fieldsets retain browser behavior. */
243
- export const Fieldset = forwardRef(function Fieldset({ legend, hideLabel = false, hint, error, message, status, children, className, id: explicitId, "aria-describedby": describedBy, "aria-invalid": ariaInvalid, ...props }, ref) {
347
+ export const Fieldset = /* @__PURE__ */ forwardRef(function Fieldset({ legend, hideLabel = false, hint, error, message, status, children, className, id: explicitId, "aria-describedby": describedBy, "aria-invalid": ariaInvalid, ...props }, ref) {
244
348
  const generatedId = useId();
245
349
  const id = explicitId ?? `flood-${generatedId}`;
246
350
  const legendRef = useFocusableHidden(hideLabel);
@@ -249,11 +353,11 @@ export const Fieldset = forwardRef(function Fieldset({ legend, hideLabel = false
249
353
  const description = mergeDescriptions(describedBy, hasHint && `${id}-hint`, hasError && `${id}-error`, hasMessage && `${id}-message`);
250
354
  return _jsxs("fieldset", { ...props, ref: ref, id: id, className: classes("flood-fieldset", className), "data-hide-label": hideLabel || undefined, "data-status": resolvedStatus, "aria-describedby": description, "aria-invalid": resolvedStatus === "error" || ariaInvalid || undefined, children: [_jsx("legend", { ref: legendRef, className: classes("flood-legend", hideLabel && "flood-visually-hidden--focusable"), children: legend }), _jsxs("div", { className: "flood-fieldset__body", children: [hasHint && _jsx("div", { id: `${id}-hint`, className: "flood-hint", children: hint }), children, hasMessage && _jsx("div", { id: `${id}-message`, className: "flood-message", role: resolvedStatus === "error" ? "alert" : undefined, children: message }), hasError && _jsx("div", { id: `${id}-error`, className: "flood-error", role: "alert", children: error })] })] });
251
355
  });
252
- export const RadioGroup = forwardRef(function RadioGroup({ value, defaultValue, onValueChange, orientation = "vertical", ...props }, ref) {
356
+ export const RadioGroup = /* @__PURE__ */ forwardRef(function RadioGroup({ value, defaultValue, onValueChange, orientation = "vertical", ...props }, ref) {
253
357
  return _jsx(ChoiceGroup, { ...props, ref: ref, kind: "radio", orientation: orientation, selected: value === undefined ? undefined : [value], initial: defaultValue === undefined ? [] : [defaultValue], onSelectionChange: next => onValueChange?.(next[0] ?? ""), fieldsetComponent: Fieldset, choiceComponent: Radio });
254
358
  });
255
359
  /** A segmented presentation of native single-choice inputs, retaining forms and reset. */
256
- export const SegmentedControl = forwardRef(function SegmentedControl({ label, options, controlSize = "md", iconOnly = false, fullWidth = false, orientation = "horizontal", className, onKeyDown, ...props }, ref) {
360
+ export const SegmentedControl = /* @__PURE__ */ forwardRef(function SegmentedControl({ label, options, controlSize = "md", iconOnly = false, fullWidth = false, orientation = "horizontal", className, onKeyDown, ...props }, ref) {
257
361
  if (iconOnly && options.some(option => !option.icon))
258
362
  throw new Error("Flood icon-only segments require icons");
259
363
  return _jsx(RadioGroup, { ...props, ref: ref, legend: label, orientation: orientation, className: classes("flood-segmented", `flood-control--${controlSize}`, iconOnly && "flood-segmented--icons", fullWidth && "flood-segmented--full", className), options: options.map(option => ({ ...option, label: _jsxs(_Fragment, { children: [option.icon && _jsx(IconSlot, { size: controlSize, children: option.icon }), iconOnly ? _jsx("span", { className: "flood-segmented__name", children: option.label }) : option.label] }) })), onKeyDown: event => {
@@ -275,7 +379,7 @@ export const SegmentedControl = forwardRef(function SegmentedControl({ label, op
275
379
  }
276
380
  } });
277
381
  });
278
- export const CheckboxGroup = forwardRef(function CheckboxGroup({ value, defaultValue = [], onValueChange, orientation = "vertical", ...props }, ref) {
382
+ export const CheckboxGroup = /* @__PURE__ */ forwardRef(function CheckboxGroup({ value, defaultValue = [], onValueChange, orientation = "vertical", ...props }, ref) {
279
383
  return _jsx(ChoiceGroup, { ...props, ref: ref, kind: "checkbox", orientation: orientation, selected: value, initial: defaultValue, onSelectionChange: onValueChange, fieldsetComponent: Fieldset, choiceComponent: Checkbox });
280
384
  });
281
385
  export function Field({ status, message, id: explicitId, label, hideLabel = false, hint, error, required, describedBy, children, }) {
@@ -295,61 +399,61 @@ export function Field({ status, message, id: explicitId, label, hideLabel = fals
295
399
  required,
296
400
  }), hasHint && (_jsx("div", { id: `${id}-hint`, className: "flood-hint", children: hint })), hasMessage && !hasError && _jsx("div", { id: `${id}-message`, className: "flood-message", role: resolvedStatus === "error" ? "alert" : undefined, children: message }), hasError && (_jsx("div", { id: `${id}-error`, className: "flood-error", role: "alert", children: error }))] }));
297
401
  }
298
- export const Link = forwardRef(function Link({ variant = "text", size = "md", className, ...props }, ref) {
402
+ export const Link = /* @__PURE__ */ forwardRef(function Link({ variant = "text", size = "md", className, ...props }, ref) {
299
403
  return (_jsx("a", { ...props, ref: ref, className: classes("flood-link", variant !== "text" && "flood-link--button", variant !== "text" && "flood-button", variant !== "text" && `flood-button--${variant}`, variant !== "text" && `flood-button--${size}`, className) }));
300
404
  });
301
405
  /** Explicit opt-in to the dark foundations profile; no global theme mutation. */
302
- export const FloodRoot = forwardRef(function FloodRoot({ className, ...props }, ref) {
406
+ export const FloodRoot = /* @__PURE__ */ forwardRef(function FloodRoot({ className, ...props }, ref) {
303
407
  return _jsx("div", { ...props, ref: ref, "data-flood-foundations": "neutral", "data-flood-theme": "dark", className: classes("flood-root", className) });
304
408
  });
305
- export const Text = forwardRef(function Text({ as = "span", size = "body", tone = "default", className, ...props }, ref) {
409
+ export const Text = /* @__PURE__ */ forwardRef(function Text({ as = "span", size = "body", tone = "default", className, ...props }, ref) {
306
410
  return createElement(as, { ...props, ref, className: classes("flood-text", `flood-type--${size}`, `flood-tone--${tone}`, className) });
307
411
  });
308
- export const Heading = forwardRef(function Heading({ level = 2, size = "page", className, ...props }, ref) {
412
+ export const Heading = /* @__PURE__ */ forwardRef(function Heading({ level = 2, size = "page", className, ...props }, ref) {
309
413
  return createElement(`h${level}`, { ...props, ref, className: classes("flood-heading", `flood-type--${size}`, className) });
310
414
  });
311
- export const Stack = forwardRef(function Stack({ gap = "4", style, className, ...props }, ref) {
415
+ export const Stack = /* @__PURE__ */ forwardRef(function Stack({ gap = "4", style, className, ...props }, ref) {
312
416
  return _jsx("div", { ...props, ref: ref, className: classes("flood-stack", className), style: { "--flood-layout-gap": `var(--flood-sys-space-${gap})`, ...style } });
313
417
  });
314
- export const Inline = forwardRef(function Inline({ gap = "2", align = "center", style, className, ...props }, ref) {
418
+ export const Inline = /* @__PURE__ */ forwardRef(function Inline({ gap = "2", align = "center", style, className, ...props }, ref) {
315
419
  return _jsx("div", { ...props, ref: ref, className: classes("flood-inline", className), style: { "--flood-layout-gap": `var(--flood-sys-space-${gap})`, alignItems: align === "start" ? "flex-start" : align === "end" ? "flex-end" : align, ...style } });
316
420
  });
317
- export const Surface = forwardRef(function Surface({ elevation = "default", padding = "6", style, className, ...props }, ref) {
421
+ export const Surface = /* @__PURE__ */ forwardRef(function Surface({ elevation = "default", padding = "6", style, className, ...props }, ref) {
318
422
  return _jsx("div", { ...props, ref: ref, "data-flood-elevation": elevation, className: classes("flood-surface", className), style: { background: `var(--flood-sys-color-surface-${elevation})`, padding: `var(--flood-sys-space-${padding})`, ...style } });
319
423
  });
320
424
  /** Centered content with logical gutters; max width includes padding. @since 0.2.4 */
321
- export const Container = forwardRef(function Container({ size = "lg", gutter = "6", className, style, ...props }, ref) {
425
+ export const Container = /* @__PURE__ */ forwardRef(function Container({ size = "lg", gutter = "6", className, style, ...props }, ref) {
322
426
  return _jsx("div", { ...props, ref: ref, className: classes("flood-container", className), style: {
323
427
  "--flood-container-max": size === "full" ? "none" : `var(--flood-sys-size-container-${size})`,
324
428
  "--flood-container-gutter": `var(--flood-sys-space-${gutter})`, ...style,
325
429
  } });
326
430
  });
327
431
  /** Auto-fit by default; explicit columns retain their count at every width. @since 0.2.4 */
328
- export const Grid = forwardRef(function Grid({ columns, minItemWidth, gap = "4", className, style, ...props }, ref) {
432
+ export const Grid = /* @__PURE__ */ forwardRef(function Grid({ columns, minItemWidth, gap = "4", className, style, ...props }, ref) {
329
433
  return _jsx("div", { ...props, ref: ref, className: classes("flood-grid", className), style: {
330
434
  gridTemplateColumns: columns ? `repeat(${columns}, minmax(0, 1fr))` : undefined,
331
435
  "--flood-grid-min": minItemWidth, "--flood-layout-gap": `var(--flood-sys-space-${gap})`, ...style,
332
436
  } });
333
437
  });
334
438
  /** Nonvisual content, with optional reveal when a descendant receives focus. @since 0.2.4 */
335
- export const VisuallyHidden = forwardRef(function VisuallyHidden({ as = "span", focusable = false, className, ...props }, ref) {
439
+ export const VisuallyHidden = /* @__PURE__ */ forwardRef(function VisuallyHidden({ as = "span", focusable = false, className, ...props }, ref) {
336
440
  const hiddenRef = useFocusableHidden(focusable, ref);
337
441
  return createElement(as, { ...props, ref: hiddenRef, className: classes(focusable ? "flood-visually-hidden--focusable" : "flood-visually-hidden", className) });
338
442
  });
339
443
  /** Reserve media geometry. Child content may overflow rather than being clipped. @since 0.2.4 */
340
- export const AspectRatio = forwardRef(function AspectRatio({ ratio = 16 / 9, className, style, children, ...props }, ref) {
444
+ export const AspectRatio = /* @__PURE__ */ forwardRef(function AspectRatio({ ratio = 16 / 9, className, style, children, ...props }, ref) {
341
445
  if (!Number.isFinite(ratio) || ratio <= 0)
342
446
  throw new RangeError("Flood AspectRatio requires a finite positive ratio");
343
447
  return _jsx("div", { ...props, ref: ref, className: classes("flood-aspect-ratio", className), style: { aspectRatio: String(ratio), ...style }, children: _jsx("div", { className: "flood-aspect-ratio__content", children: children }) });
344
448
  });
345
449
  /** Native image semantics, explicit alternative text and bounded media fitting. @since 0.2.4 */
346
- export const Image = forwardRef(function Image({ alt, fit = "cover", className, ...props }, ref) {
450
+ export const Image = /* @__PURE__ */ forwardRef(function Image({ alt, fit = "cover", className, ...props }, ref) {
347
451
  if (typeof alt !== "string")
348
452
  throw new TypeError("Flood Image requires explicit alt text (empty for decorative images)");
349
453
  return _jsx("img", { ...props, ref: ref, alt: alt, "data-fit": fit, className: classes("flood-image", className) });
350
454
  });
351
455
  /** Native list items supplied by the host; hidden markers retain list semantics. @since 0.2.4 */
352
- export const List = forwardRef(function List({ ordered = false, start, reversed, marker = true, gap = "2", className, style, ...props }, ref) {
456
+ export const List = /* @__PURE__ */ forwardRef(function List({ ordered = false, start, reversed, marker = true, gap = "2", className, style, ...props }, ref) {
353
457
  if (start !== undefined && !Number.isSafeInteger(start))
354
458
  throw new RangeError("Flood List start requires a safe integer");
355
459
  return createElement(ordered ? "ol" : "ul", { ...props, ref, start: ordered ? start : undefined,
@@ -357,60 +461,60 @@ export const List = forwardRef(function List({ ordered = false, start, reversed,
357
461
  className: classes("flood-list", className), style: { "--flood-layout-gap": `var(--flood-sys-space-${gap})`, ...style } });
358
462
  });
359
463
  /** Static empty content, not loading, an error boundary or a live announcement. @since 0.2.4 */
360
- export const EmptyState = forwardRef(function EmptyState({ title, description, icon, actions, headingLevel = 2, density = "comfortable", className, ...props }, ref) {
464
+ export const EmptyState = /* @__PURE__ */ forwardRef(function EmptyState({ title, description, icon, actions, headingLevel = 2, density = "comfortable", className, ...props }, ref) {
361
465
  if (typeof title !== "string" || !title.trim())
362
466
  throw new Error("Flood EmptyState requires a nonempty title");
363
467
  return _jsxs(Stack, { ...props, ref: ref, gap: "4", "data-density": density, className: classes("flood-empty-state", className), children: [hasFieldContent(icon) && _jsx("div", { className: "flood-empty-state__icon", children: _jsx(IconSlot, { size: "2xl", children: icon }) }), _jsxs(Stack, { gap: "1", children: [_jsx(Heading, { level: headingLevel, size: "section", children: title }), hasFieldContent(description) && _jsx(Text, { as: "div", size: "compact", tone: "subtle", children: description })] }), hasFieldContent(actions) && _jsx(Inline, { gap: "2", className: "flood-empty-state__actions", children: actions })] });
364
468
  });
365
469
  /** A structured content surface, not an interactive wrapper. @since 0.2.4 */
366
- export const Card = forwardRef(function Card({ title, description, actions, footer, headingLevel = 2, density = "comfortable", elevation = "default", children, className, ...props }, ref) {
470
+ export const Card = /* @__PURE__ */ forwardRef(function Card({ title, description, actions, footer, headingLevel = 2, density = "comfortable", elevation = "default", children, className, ...props }, ref) {
367
471
  const present = hasFieldContent;
368
472
  const heading = present(title), hint = present(description), action = present(actions);
369
473
  return _jsxs(Surface, { ...props, ref: ref, elevation: elevation, padding: density === "compact" ? "4" : "6", "data-density": density, className: classes("flood-card", className), children: [(heading || hint || action) && _jsxs("div", { className: "flood-card__header", children: [(heading || hint) && _jsxs("div", { className: "flood-card__intro", children: [heading && _jsx(Heading, { level: headingLevel, size: "section", children: title }), hint && _jsx(Text, { as: "div", size: "compact", tone: "subtle", children: description })] }), action && _jsx("div", { className: "flood-card__actions", children: actions })] }), present(children) && _jsx("div", { className: "flood-card__body", children: children }), present(footer) && _jsx("div", { className: "flood-card__footer", children: footer })] });
370
474
  });
371
475
  /** Adapter for the host's SVG icon package; glyphs are not bundled. */
372
- export const IconSlot = forwardRef(function IconSlot({ size = "md", label, className, children, ...props }, ref) {
476
+ export const IconSlot = /* @__PURE__ */ forwardRef(function IconSlot({ size = "md", label, className, children, ...props }, ref) {
373
477
  return _jsx("span", { ...props, ref: ref, role: label ? "img" : undefined, "aria-label": label, "aria-hidden": label ? undefined : true, className: classes("flood-icon", `flood-icon--${size}`, className), children: children });
374
478
  });
375
- export const IconButton = forwardRef(function IconButton({ label, size = "md", variant = "subtle", className, children, ...props }, ref) {
479
+ export const IconButton = /* @__PURE__ */ forwardRef(function IconButton({ label, size = "md", variant = "subtle", className, children, ...props }, ref) {
376
480
  return _jsx(Button, { ...props, ref: ref, size: size, variant: variant, "aria-label": label, className: classes("flood-icon-button", className), children: _jsx(IconSlot, { size: size, children: children }) });
377
481
  });
378
- export const Divider = forwardRef(function Divider({ className, ...props }, ref) {
482
+ export const Divider = /* @__PURE__ */ forwardRef(function Divider({ className, ...props }, ref) {
379
483
  return _jsx("hr", { ...props, ref: ref, className: classes("flood-divider", className) });
380
484
  });
381
485
  /** Selectable code with an optional host-owned action; no clipboard side effects. */
382
- export const CodeSnippet = forwardRef(function CodeSnippet({ code, codeDirection = "ltr", action, className, ...props }, ref) {
486
+ export const CodeSnippet = /* @__PURE__ */ forwardRef(function CodeSnippet({ code, codeDirection = "ltr", action, className, ...props }, ref) {
383
487
  return (_jsxs("div", { ...props, ref: ref, className: classes("flood-code-snippet", className), children: [_jsx("code", { dir: codeDirection, className: "flood-code-snippet__code", children: code }), action != null && _jsx("div", { className: "flood-code-snippet__action", children: action })] }));
384
488
  });
385
489
  /** Native scrolling with inset overlay tracks; the ref targets the scrollable viewport. */
386
- export const ScrollArea = forwardRef(function ScrollArea({ orientation = "vertical", contentInset = "scrollbar", ...props }, ref) {
490
+ export const ScrollArea = /* @__PURE__ */ forwardRef(function ScrollArea({ orientation = "vertical", contentInset = "scrollbar", ...props }, ref) {
387
491
  return _jsx(OverlayScrollArea, { ...props, orientation: orientation, contentInset: contentInset, ref: ref });
388
492
  });
389
- export const CopyButton = forwardRef(function CopyButton({ copyLabel = "Copy", copiedLabel = "Copied", errorLabel = "Failed", resetDelay = 2000, size = "md", variant = "subtle", ...props }, ref) {
493
+ export const CopyButton = /* @__PURE__ */ forwardRef(function CopyButton({ copyLabel = "Copy", copiedLabel = "Copied", errorLabel = "Failed", resetDelay = 2000, size = "md", variant = "subtle", ...props }, ref) {
390
494
  return _jsx(ClipboardAction, { ...props, ref: ref, copyLabel: copyLabel, copiedLabel: copiedLabel, errorLabel: errorLabel, resetDelay: resetDelay, size: size, variant: variant });
391
495
  });
392
- export const ToastRegion = forwardRef(function ToastRegion({ label = "Notifications", closeLabel = "Dismiss notification", placement = "bottom-end", limit = 3, inline = false, hotkey = true, ...props }, ref) {
496
+ export const ToastRegion = /* @__PURE__ */ forwardRef(function ToastRegion({ label = "Notifications", closeLabel = "Dismiss notification", placement = "bottom-end", limit = 3, inline = false, hotkey = true, ...props }, ref) {
393
497
  return _jsx(NotificationRegion, { ...props, ref: ref, label: label, closeLabel: closeLabel, placement: placement, limit: limit, inline: inline, hotkey: hotkey });
394
498
  });
395
- export const AvatarGroup = forwardRef(function AvatarGroup({ max = 4, size = "md", ...props }, ref) { return _jsx(GroupedAvatars, { ...props, ref: ref, max: max, size: size }); });
396
- export const StatusIndicator = forwardRef(function StatusIndicator({ tone = "neutral", size = "md", announce = false, ...props }, ref) { return _jsx(NamedStatus, { ...props, ref: ref, tone: tone, size: size, announce: announce }); });
397
- export const Figure = forwardRef(function Figure({ captionPosition = "after", ...props }, ref) { return _jsx(CaptionedFigure, { ...props, ref: ref, captionPosition: captionPosition }); });
398
- export const Blockquote = forwardRef(function Blockquote(props, ref) {
499
+ export const AvatarGroup = /* @__PURE__ */ forwardRef(function AvatarGroup({ max = 4, size = "md", ...props }, ref) { return _jsx(GroupedAvatars, { ...props, ref: ref, max: max, size: size }); });
500
+ export const StatusIndicator = /* @__PURE__ */ forwardRef(function StatusIndicator({ tone = "neutral", size = "md", announce = false, ...props }, ref) { return _jsx(NamedStatus, { ...props, ref: ref, tone: tone, size: size, announce: announce }); });
501
+ export const Figure = /* @__PURE__ */ forwardRef(function Figure({ captionPosition = "after", ...props }, ref) { return _jsx(CaptionedFigure, { ...props, ref: ref, captionPosition: captionPosition }); });
502
+ export const Blockquote = /* @__PURE__ */ forwardRef(function Blockquote(props, ref) {
399
503
  return _jsx(AttributedQuote, { ...props, ref: ref });
400
504
  });
401
- export const InlineCode = forwardRef(function InlineCode({ size = "md", wrap = true, ...props }, ref) { return _jsx(InlineCodeText, { ...props, ref: ref, size: size, wrap: wrap }); });
402
- export const Metric = forwardRef(function Metric({ size = "md", ...props }, ref) { return _jsx(MeasuredValue, { ...props, ref: ref, size: size }); });
403
- export const Timeline = forwardRef(function Timeline(props, ref) {
505
+ export const InlineCode = /* @__PURE__ */ forwardRef(function InlineCode({ size = "md", wrap = true, ...props }, ref) { return _jsx(InlineCodeText, { ...props, ref: ref, size: size, wrap: wrap }); });
506
+ export const Metric = /* @__PURE__ */ forwardRef(function Metric({ size = "md", ...props }, ref) { return _jsx(MeasuredValue, { ...props, ref: ref, size: size }); });
507
+ export const Timeline = /* @__PURE__ */ forwardRef(function Timeline(props, ref) {
404
508
  return _jsx(EventTimeline, { ...props, ref: ref });
405
509
  });
406
- export const NavigationList = forwardRef(function NavigationList({ size = "md", ...props }, ref) { return _jsx(NavigationMenu, { ...props, ref: ref, size: size }); });
407
- export const Steps = forwardRef(function Steps({ orientation = "horizontal", ...props }, ref) { return _jsx(StepSequence, { ...props, ref: ref, orientation: orientation }); });
408
- export const Section = forwardRef(function Section({ headingLevel = 2, headingSize = "section", ...props }, ref) { return _jsx(ContentSection, { ...props, ref: ref, headingLevel: headingLevel, headingSize: headingSize }); });
409
- export const Split = forwardRef(function Split({ side = "end", ratio = "main", collapseAt = "md", gap = "6", ...props }, ref) { return _jsx(SplitLayout, { ...props, ref: ref, side: side, ratio: ratio, collapseAt: collapseAt, gap: gap }); });
410
- export const Center = forwardRef(function Center({ inline = false, ...props }, ref) { return _jsx(CenterLayout, { ...props, ref: ref, inline: inline }); });
411
- export const SkipLink = forwardRef(function SkipLink({ children = "Skip to content", ...props }, ref) { return _jsx(SkipNavigation, { ...props, ref: ref, children: children }); });
412
- export const ListBox = forwardRef(function ListBox({ multiple = false, disabled = false, readOnly = false, hideLabel = false, controlSize = "md", ...props }, ref) { return _jsx(CollectionListBox, { ...props, ref: ref, multiple: multiple, disabled: disabled, readOnly: readOnly, hideLabel: hideLabel, controlSize: controlSize }); });
413
- export const PinInput = forwardRef(function PinInput({ length = 6, mode = "numeric", mask = false, hideLabel = false, controlSize = "md", ...props }, ref) { return _jsx(SegmentedPinInput, { ...props, ref: ref, length: length, mode: mode, mask: mask, hideLabel: hideLabel, controlSize: controlSize }); });
414
- export const Rating = forwardRef(function Rating({ max = 5, defaultValue = 0, hideLabel = false, readOnly = false, size = "md", ...props }, ref) { return _jsx(StarRating, { ...props, ref: ref, max: max, defaultValue: defaultValue, hideLabel: hideLabel, readOnly: readOnly, size: size }); });
415
- export const Dropzone = forwardRef(function Dropzone({ description = "Drop files here or choose from your device.", multiple = true, ...props }, ref) { return _jsx(FileDropzone, { ...props, ref: ref, description: description, multiple: multiple }); });
416
- export const CharacterCount = forwardRef(function CharacterCount({ mode = "count", label = "Characters", overLimitLabel = "Over limit", ...props }, ref) { return _jsx(SupportingCharacterCount, { ...props, ref: ref, mode: mode, label: label, overLimitLabel: overLimitLabel }); });
510
+ export const NavigationList = /* @__PURE__ */ forwardRef(function NavigationList({ size = "md", ...props }, ref) { return _jsx(NavigationMenu, { ...props, ref: ref, size: size }); });
511
+ export const Steps = /* @__PURE__ */ forwardRef(function Steps({ orientation = "horizontal", ...props }, ref) { return _jsx(StepSequence, { ...props, ref: ref, orientation: orientation }); });
512
+ export const Section = /* @__PURE__ */ forwardRef(function Section({ headingLevel = 2, headingSize = "section", ...props }, ref) { return _jsx(ContentSection, { ...props, ref: ref, headingLevel: headingLevel, headingSize: headingSize }); });
513
+ export const Split = /* @__PURE__ */ forwardRef(function Split({ side = "end", ratio = "main", collapseAt = "md", gap = "6", ...props }, ref) { return _jsx(SplitLayout, { ...props, ref: ref, side: side, ratio: ratio, collapseAt: collapseAt, gap: gap }); });
514
+ export const Center = /* @__PURE__ */ forwardRef(function Center({ inline = false, ...props }, ref) { return _jsx(CenterLayout, { ...props, ref: ref, inline: inline }); });
515
+ export const SkipLink = /* @__PURE__ */ forwardRef(function SkipLink({ children = "Skip to content", ...props }, ref) { return _jsx(SkipNavigation, { ...props, ref: ref, children: children }); });
516
+ export const ListBox = /* @__PURE__ */ forwardRef(function ListBox({ multiple = false, disabled = false, readOnly = false, hideLabel = false, controlSize = "md", ...props }, ref) { return _jsx(CollectionListBox, { ...props, ref: ref, multiple: multiple, disabled: disabled, readOnly: readOnly, hideLabel: hideLabel, controlSize: controlSize }); });
517
+ export const PinInput = /* @__PURE__ */ forwardRef(function PinInput({ length = 6, mode = "numeric", mask = false, hideLabel = false, controlSize = "md", ...props }, ref) { return _jsx(SegmentedPinInput, { ...props, ref: ref, length: length, mode: mode, mask: mask, hideLabel: hideLabel, controlSize: controlSize }); });
518
+ export const Rating = /* @__PURE__ */ forwardRef(function Rating({ max = 5, defaultValue = 0, hideLabel = false, readOnly = false, size = "md", ...props }, ref) { return _jsx(StarRating, { ...props, ref: ref, max: max, defaultValue: defaultValue, hideLabel: hideLabel, readOnly: readOnly, size: size }); });
519
+ export const Dropzone = /* @__PURE__ */ forwardRef(function Dropzone({ description = "Drop files here or choose from your device.", multiple = true, ...props }, ref) { return _jsx(FileDropzone, { ...props, ref: ref, description: description, multiple: multiple }); });
520
+ export const CharacterCount = /* @__PURE__ */ forwardRef(function CharacterCount({ mode = "count", label = "Characters", overLimitLabel = "Over limit", ...props }, ref) { return _jsx(SupportingCharacterCount, { ...props, ref: ref, mode: mode, label: label, overLimitLabel: overLimitLabel }); });
package/dist/menu.d.ts CHANGED
@@ -1,2 +1,28 @@
1
- import type { MenuProps } from "./index.js";
1
+ import { type HTMLAttributes } from "react";
2
+ import type { MenuItem, MenuProps, MenuSubmenuItem } from "./index.js";
3
+ type InternalItem = MenuItem | MenuSubmenuItem;
4
+ type Edge = "first" | "last";
5
+ /** Validate each level while retaining globally unique action IDs. */
6
+ export declare function validateMenuTree(items: readonly InternalItem[]): void;
7
+ export declare function focusMenuEdge(panel: HTMLElement | null, edge?: Edge): void;
8
+ interface MenuLayerProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "role"> {
9
+ label: string;
10
+ items: readonly InternalItem[];
11
+ open: boolean;
12
+ requestOpen: (open: boolean) => void;
13
+ closeTree: () => void;
14
+ anchor: () => HTMLElement | null;
15
+ rootAnchor: () => HTMLElement | null;
16
+ rootPanel?: () => HTMLDivElement | null;
17
+ onAction?: (id: string) => void;
18
+ edge?: () => Edge;
19
+ nested?: boolean;
20
+ position?: (panel: HTMLDivElement) => void;
21
+ side?: MenuProps["side"];
22
+ align?: MenuProps["align"];
23
+ controlSize?: MenuProps["controlSize"];
24
+ }
25
+ /** Internal native top-layer engine shared by Menu and ContextMenu. */
26
+ export declare const MenuLayer: import("react").ForwardRefExoticComponent<MenuLayerProps & import("react").RefAttributes<HTMLDivElement>>;
2
27
  export declare const ActionMenu: import("react").ForwardRefExoticComponent<MenuProps & import("react").RefAttributes<HTMLDivElement>>;
28
+ export {};