@stackone/malachite 2.136.0 → 2.137.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/COMPONENTS.md CHANGED
@@ -79,7 +79,7 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
79
79
  - **`Toggle`** — On/off switch. Add `label` for a visible caption, and `variant` to give it standalone toolbar-filter chrome — pick the family it sits beside: `pill` matches the filter-bar inputs (`Search`, `MultiSelect`), `button` renders the whole control as an outline `Button` with the switch as its trailing icon. `bordered` is shorthand for `variant="pill"`. `tone="pending"` paints the checked track amber, for a switch whose change has not been written yet — pair it with a `SelectionBar` reporting the same diff. The unchecked track never changes: nothing is pending about a switch that is off. Forwards a ref to its root element, so it can anchor an `InlineConfirm`. _Key props:_ `checked`, `onChange`, `disabled`, `ToggleSize` (`small` | `medium`), `ToggleTone` (`default` | `pending`), `label`, `ToggleVariant` (`pill` | `button`), `bordered`, `aria-label`, `aria-labelledby`, `aria-describedby`, `id`.
80
80
  - **`Dropdown`** — Single-select dropdown. `DropdownSize` is `small` (28px) | `medium` (32px) | `large` (42px), matching Button; `fullWidth` fills the container instead of sizing to content, which is what a table cell or a toolbar slot needs — without it the field column sizes to its content, so a consumer has to compute a width; `width` fixes that width outright, the way `MultiSelect` does, for a toolbar lining the two up rather than letting each hug its own label — a narrower container still wins, since the width clamps to it; Until this release a `search` trigger could not go below the intrinsic width of its bare `input`, so a `width` under roughly 200px was ignored; it now shrinks with the rest. The open menu fills the trigger and left-aligns under it, as Figma draws every tier of `Dropdown Component - Standard`, so `width` sizes both — the menu is the width of the control that opened it and does not widen for a long option, which ellipsises instead, so a row of controls and their open menus stay on one set of edges; below 160px the menu keeps that floor rather than shrinking to a chip nobody can read, and `minWidth` raises that floor without widening the trigger — for a picker a column pins narrow whose options carry a subtitle the trigger never shows; `menuAlign="end"` lines a menu wider than its trigger up with the trigger's right edge instead, so a control at the right of a card opens its menu inwards rather than past the card; near a viewport edge it anchors to the trigger's other side before falling back to the viewport, so the two share an edge wherever one fits; `small` is the chip that sits beside a page title and rounds tighter (10px) than the taller sizes. These names each moved up a tier in 0.71 — the old `xsmall`/`small`/`medium` are now `small`/`medium`/`large`. Pass `value` for a controlled selection whose source of truth lives elsewhere (URL or app state): the trigger follows it without the consumer remounting via `key`, which used to discard focus mid-interaction. `defaultValue` keeps the uncontrolled behaviour. `clearable` adds a clear control to the trigger once something is selected and reports it as `onItemSelected(undefined)` — without it a selection cannot be undone, so filter bars had to invent a sentinel "any" item to carry that meaning. `requiredIndicator` switches the label between the library default of naming the optional fields, an `asterisk` on the required ones for designs drawn that way, and `none` for a field whose value is supplied rather than asked for — a locked control is still required, but a marker only sends the reader looking for something to fill in. Visual only: `aria-required` is set from `required` whichever is chosen. `showSubtitleInTrigger` promotes the selected item's `subtitle` into the closed trigger, on one line under the value, so the consequence of a choice stays on screen once the menu shuts — the trigger trades its fixed height for a floor and grows by that line, and either line too long for it ellipsises, with a single tooltip carrying whichever lines are cut off, value first; `triggerTooltip={false}` drops that tooltip where the open menu is the way to read them. It does not combine with `search`, whose trigger is a single-line text input with nowhere to put a second line, so the type rejects the pair rather than letting a consumer ask for a subtitle and get none. `subtitleLayout` decides how a subtitle sits in the open menu: the default `inline` keeps it on the label's row after a divider, which suits a short qualifier, while `stacked` gives it its own line beneath the label — one line either way, ellipsised rather than wrapped, so inline a sentence-length subtitle is cut back to a few words. Every option row carries a tooltip for whatever it had to cut, across all three of label, subtitle and `rightSideText`, so nothing the row hides is unreadable. Passing `formControl` is enough to show validation on the same terms as `Input`, though only validation: the trigger still paints `value` or `defaultValue`, never the value the form holds. The resolver's message renders on its own line beneath the field in the destructive colour, politely announced, with `aria-invalid` and `aria-describedby` wired, while an explicit `helperText` keeps its own line above it and stays dimmed, and `error={false}` suppresses the resolver outright. An item's `subtitle` renders inline markdown in the option, trigger and tooltip, with links drawn but inert, since the option is itself the click target; a subtitle with no markdown syntax stays a plain text node. An item's `badge` (e.g. a `Tag`) sits at the right end of its option in the open menu, after any `rightSideText`, and never shows in the closed trigger or the search input; it does not shrink, and the option is still named by its label alone. `wrapSubtitles` lets stacked subtitles wrap to show in full in the open list, for a short list whose options need their whole description. _Key props:_ `DropdownItem[]` (items take `badge`), `DropdownSize`, `fullWidth`, `width`, `minWidth`, `menuAlign` (`start` | `end`), `value`, `defaultValue`, `label`, `search`, `onSearchChange` (search mode only: the query as typed, and an empty string once a pick, a clear, Escape or a click outside empties it, for offering the typed text as an item of its own; items are still filtered by the query, so the label of that item must contain it, and it must stay in `items` once picked or the trigger shows the placeholder), `showSubtitleInTrigger`, `triggerTooltip`, `subtitleLayout`, `clearable`, `required`, `requiredIndicator`, `error`, `helperText`, `loading`, `formControl`, `aria-label`, `aria-labelledby`, `id`.
81
81
  - **`DatePicker`** — Picks one day, or one instant with `precision="minute"` or `"second"`, from Figma's calendar in a popover. Day precision commits on click; a time precision adds hour/minute(/second) columns and holds a draft until Apply, which Escape or an outside click discards. `timeZone="utc"` draws the UTC calendar day and suffixes times with "UTC" whatever the browser's zone, as the logs pages need. Values are `Date`s; ISO strings are accepted (a string without an offset, such as `2025-01-20` or `2025-01-20T10:00`, is read in `timeZone`), and a `formControl` field seeded with a string is written back as an ISO string. `min`/`max` bound the instant (days and times outside are disabled, as are month arrows and keyboard paging that would leave them; a value clamped up to `min` rounds up to the precision, so on `min`'s own day a day-precision value is `min` itself) and `isDateDisabled` rules out single days. The grid is an ARIA grid with a roving tab stop: arrows move by day and week, PageUp/PageDown by month (Shift for a year), Home/End to the week's ends, Enter or Space picks; every day of a range is `aria-selected`, and a hidden live line asks for the end date once the start is picked. The trigger sits on the 28/32/42 control ladder with Dropdown's chrome; `clearable` adds a clear control reported as `onChange(null)`. Colours come from `text`, `accent` and `card`, so a rebrand repaints the picker; the derived states (hover, outside-month text, selected fill, today ring, range band, pressed opacity) can each be overridden through the `datePicker` theme group (`applyTheme({ colors: { datePicker: { selectedBackground } } })`). _Key props:_ `value`, `defaultValue`, `onChange`, `precision` (`day` | `minute` | `second`), `minuteStep`, `timeZone` (`local` | `utc`), `weekStartsOn`, `min`, `max`, `isDateDisabled`, `presets`, `clearable`, `tag` (`{ label, type }` status beside the value), `tone` (`default` | `chosen` | `pending`, paint only), `placeholder`, `size`, `fullWidth`, `width`, `label`, `description`, `hint`, `tooltip`, `helperText`, `required`, `requiredIndicator`, `formControl`, `error`, `disabled`, `loading`, `id`, `aria-label`, `aria-labelledby`.
82
- - **`DateRangePicker`** — `DatePicker`'s range form, with the same props and a `{ start, end }` value. The second click completes a day range; a click before the start restarts it. The end always covers the whole of its last unit (`23:59:59.999` for a picked day, the last millisecond of the picked minute or second), so a filter on the range keeps its final minutes. In a `formControl` field a cleared range writes `null`. With a time precision a Start/End switch picks which end the time columns edit, end times before the start are not offered, and Apply waits for both ends. `presets` list beside the calendar and apply at once; pass a function (`value: () => ({ start, end })`) for a relative preset such as "Past 1 hour", so it is measured when clicked rather than when the page loaded. _Key props:_ `value` / `defaultValue` (`{ start, end }`), `onChange`, `presets` (`DateRangePreset[]`), plus every `DatePicker` prop.
82
+ - **`DateRangePicker`** — `DatePicker`'s range form, with the same props and a `{ start, end }` value. The second click completes a day range; a click before the start restarts it. The end always covers the whole of its last unit (`23:59:59.999` for a picked day, the last millisecond of the picked minute or second), so a filter on the range keeps its final minutes. In a `formControl` field a cleared range writes `null`. With a time precision a Start/End switch picks which end the time columns edit, end times before the start are not offered, and Apply waits for both ends. `presets` list beside the calendar and apply at once; pass a function (`value: () => ({ start, end })`) for a relative preset such as "Past 1 hour", so it is measured when clicked rather than when the page loaded. A preset with `disabled: true` stays visible and focusable but cannot resolve or commit a value, for plan-locked ranges; `disabledReason` explains why in a tooltip and as its accessible description. _Key props:_ `value` / `defaultValue` (`{ start, end }`), `onChange`, `presets` (`DateRangePreset[]`), plus every `DatePicker` prop.
83
83
  - **`MultiSelect`** — Multi-select dropdown. `width` fixes the trigger, as `Dropdown` and `Search` take it, so a toolbar can put its controls on one width — and, as with those two, a container narrower than the value still wins; the menu fills the trigger and left-aligns under it, so that one prop sizes both; `minWidth` raises the 160px floor a narrow trigger falls back to. An option label too long for the menu ellipsises, and hovering it shows the full label — above the description in `hover` mode — as `Dropdown` does for its options. `requiredIndicator` follows the same three-way convention the single-select controls do, so a form choosing asterisks does not get "(Optional)" on one of its fields. _Key props:_ `MultiSelectOption[]`, `MultiSelectSize`, `width`, `minWidth`, `label`, `searchable`, `inlineSearch`, `chips`, `chipsRemovable`, `required`, `requiredIndicator`, `aria-label`, `aria-labelledby`, `id`.
84
84
  - **`FilterSearch`** — One search field that filters across several categories. Clicking lists the filters, each with its description and an example; picking one lists its values behind a `Filters > Name` breadcrumb, and typing before picking searches the values of every filter at once, tagging each match with the filter it belongs to. Select All / Deselect All act on whatever the query matches. Each filter becomes a segmented chip, its name then its values (`Connector | Notion, Attio +2`), that reopens its values when clicked; an item `icon` is drawn in its menu row and in the chip, and `chipLabel: false` on a filter drops its name from the chip (`Configured only`); Backspace in an empty field removes the last one. `onQueryChange` reports the text in the field, for analytics or a server-side search. With `textFilter` (`{ value, label }`, under a `value` no filter uses) the typed text is itself the first row while searching (`Search "acme"`); committing it adds a `Search: acme` chip whose selection is `{ filter: textFilter.value, items: [text] }`, replacing any earlier text, so a free-text search can sit in the URL beside the filters, and clicking that chip puts the text back in the field. Controlled: `onChange` gets the next selection and the `changes` that produced it, an empty `items` meaning the filter was removed, so a URL-backed selection writes back only what moved. Chips keep the order filters were added in even when `value` comes back reordered, and keep their labels while `filters` reloads. `filtersButton` puts a Filters button, with the applied count, at the right end of the bar that opens a Filters panel beneath it: every filter at once, each drawn by its `control` (`list`, the default, a checkbox per value with an optional `count` badge and a search box past 8 values; `toggle`, a switch for the filter's one value; `segmented`, All plus one segment per value), applied as they change and mirrored as chips in the bar, with Clear all leaving the typed text alone. The button and the filter chips are then the only way to filters: the field is a plain search box (`role="searchbox"`) that never opens a menu, reports what is typed through `onQueryChange`, keeps it on blur and while the panel is open, and pins it as the `textFilter` chip on Enter. _Key props:_ `filters` (`control`, item `count`), `value`, `onChange`, `onClear`, `onActiveFilterChange`, `onQueryChange`, `textFilter`, `filtersButton`, `placeholder`, `size`, `width`, `loading`, `disabled`, `clearable`, `maxVisibleChips`, `aria-label`, `aria-labelledby`, `id`.
85
85
  - **`QueryInput`** — A textbox with inline syntax colouring and a suggestion menu anchored to the caret. It carries no grammar of its own: the consumer parses the value, hands back `tokens` to colour and `suggestions` to offer, so the vocabulary lives in the consuming app rather than here. _Key props:_ `value`, `onChange`, `tokens`, `suggestions`, `activeRange`, `onAccept`, `onQueryContextChange`, `onSubmit`, `placeholder`, `size`, `disabled`, `loading`, `emptyMessage`, `className`, `style`, `aria-label`, `aria-labelledby`.
@@ -132,7 +132,7 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
132
132
  - **`ScoreMeter`** — A score from 0 to 1 on a track that runs from a low end to a high end through the success, warning and error colours, such as a classifier’s confidence that a response holds a prompt injection. A ringed marker sits at the score, painted by `tone` for the outcome it led to, and an optional line marks the `threshold` where it starts to count as high; leave `threshold` out when it is not known and no line or threshold label is drawn. `lowLabel`, `highLabel` and `thresholdLabel` sit under the track and are hidden from assistive tech, which reads the `meter` by its `label` and `valueText` instead. Scores outside 0 to 1, or not a number, are clamped onto the scale. _Key props:_ `value`, `label`, `valueText`, `threshold`, `thresholdLabel`, `lowLabel`, `highLabel`, `tone` (`ScoreMeterTone`: `neutral` | `success` | `warning` | `error`; default `neutral`), `className`.
133
133
  - **`Hexagon`** — A filled hexagon (or, with `shape="shield"`, a shield with a star cut out) in one status tone: the mark for an outcome, or a risk or protection level when a shield, as a `LinkCard` `icon` and the unit of a `HexagonScale`. Tones fill from the theme: `neutral` grey (`text.dimmed`), `success` green (`text.success`), `caution` pale amber (`warning.fillMuted`), `warning` amber (`warning.fill`), `error` red (`error.background`, as `TimeBarChart` fills it). `dimmed` draws it at 20% for a step of a scale that is not the current one. Always decorative and hidden from assistive tech, so the text beside it has to name what it marks. Styled inline so it still draws outside the shadow root’s stylesheet. _Key props:_ `tone` (`HexagonTone`: `neutral` | `success` | `caution` | `warning` | `error`; default `neutral`), `size` (`HexagonSize`: `small` 16px | `medium` 18px; default `medium`), `shape` (`HexagonShape`: `hexagon` | `shield`; default `hexagon`; shields for a risk or protection level), `dimmed`, `className`.
134
134
  - **`HexagonScale`** — A row of small hexagons (or shields, with `shape="shield"`, for a risk or protection level), one per step of an ordered scale, with the `current` step at full strength and the rest dimmed to 20%; with no `current` every step is dimmed. Built for a `LinkCard`’s `trailing` slot, where it places an outcome or risk level on a scale such as allowed → redacted → monitored → denied, or low → critical with shields. Beside text that already names the step it is decorative and hidden from assistive tech; give it a `label` only when it stands alone and it reads as an image of that name. `stepLabels` names each step in a tooltip on its mark, and `currentNote` follows the current step’s name there, such as “High · this call”; the tooltips open on hover only, add no tab stops and need the shadow root’s stylesheet, so leave `stepLabels` off in an `ActionMenu`. Styled inline so it still draws inside an `ActionMenu`, which portals outside the shadow root. _Key props:_ `steps` (`HexagonTone[]`, in order), `shape` (`HexagonShape`; default `hexagon`), `current` (index of the step drawn at full strength), `label`, `stepLabels`, `currentNote`, `className`.
135
- - **`TimeBarChart`** — Counts per time bucket as stacked bars on a UTC axis, the request-volume chart above a log list. Every bucket in `range` takes a slot whether or not it has data, so gaps read as gaps; a zone-less time string is read as UTC. Hover or arrow-key through buckets for a tooltip listing every series and the total; `highlightTime` shades the bucket holding a time from elsewhere on the page, such as the hovered log row. With `onRangeSelect`, dragging across bars reports the whole buckets covered, `end` exclusive so it goes straight back in as `range`, and whether the selection takes in the last bucket. `loading` dims bars already drawn rather than replacing them, and shows a spinner only when there is nothing to dim. Series colours follow the theme’s status tokens by `tone`, and failures always stack above successes whatever order `series` comes in, so position separates them where colour alone might not; a legend names them unless `legend={false}`. A visually hidden table carries the same numbers for screen readers. _Key props:_ `series` (`{ key, label, tone }[]`, stacked by tone with `error` on top; `TimeBarChartTone`: `success` | `error` | `neutral`), `buckets` (`{ start, values }[]`), `interval` (`{ unit, step }`; `TimeBarChartUnit`: `minute` | `hour` | `day` | `week` | `month`), `range` (`end` exclusive, as a selection reports it; at most 2,000 buckets, the newest kept), `TimeBarChartSize` (`small` | `medium` | `large`), `loading`, `error`, `errorTitle`, `errorSubTitle`, `valueLabel`, `legend`, `highlightTime`, `onRangeSelect`, `aria-label`, `aria-labelledby`, `className`, `style`.
135
+ - **`TimeBarChart`** — Counts per time bucket as stacked bars on a UTC axis by default, or a local display with `timeZone="local"`, the request-volume chart above a log list. Every bucket in `range` takes a slot whether or not it has data, so gaps read as gaps; a zone-less time string is read as UTC. Hover or arrow-key through buckets for a tooltip listing every series and the total; `highlightTime` shades the bucket holding a time from elsewhere on the page, such as the hovered log row. With `onRangeSelect`, dragging across bars reports the whole buckets covered, `end` exclusive so it goes straight back in as `range`, and whether the selection takes in the last bucket. `loading` dims bars already drawn rather than replacing them, and shows a spinner only when there is nothing to dim. Series colours follow the theme’s status tokens by `tone`, and failures always stack above successes whatever order `series` comes in, so position separates them where colour alone might not; a legend names them unless `legend={false}`. A visually hidden table carries the same numbers for screen readers. `timeZone` applies to axis labels, tooltips and the hidden table; stored instants, bucket boundaries and range selections remain UTC. Ticks stay on the UTC bars and only their labels change, so in a zone behind UTC a day or month bar is named by its local start, the previous date. Local tooltip times include their UTC offset. _Key props:_ `series` (`{ key, label, tone }[]`, stacked by tone with `error` on top; `TimeBarChartTone`: `success` | `error` | `neutral`), `buckets` (`{ start, values }[]`), `interval` (`{ unit, step }`; `TimeBarChartUnit`: `minute` | `hour` | `day` | `week` | `month`), `range` (`end` exclusive, as a selection reports it; at most 2,000 buckets, the newest kept), `TimeBarChartSize` (`small` | `medium` | `large`), `loading`, `error`, `errorTitle`, `errorSubTitle`, `valueLabel`, `legend`, `timeZone` (`utc` | `local`, default `utc`), `highlightTime`, `onRangeSelect`, `aria-label`, `aria-labelledby`, `className`, `style`.
136
136
  - **`TimeBarChartSwatch`** — The mark a `TimeBarChart` draws a series in, by its `tone`, for naming the series somewhere other than the chart's legend, such as a count beside the chart standing in for it. It matches the legend and the tooltip, and the bars draw the same colour at 40%; it follows the theme with them. Decorative: the label beside it does the naming. _Key props:_ `tone` (`TimeBarChartTone`).
137
137
  - **`Timeline`** — A vertical sequence of steps as an ordered list (`Timeline.Item`): a dot on a connecting line, a title, its timing at the right and a free-form body below, such as what happened to one API call. `titleCode` sets code after the title in the mono face as one phrase with it, such as `n8n called` then `Salesforce | Delete contact`. The dot is painted by `tone` from the theme’s text tokens (`neutral` is secondary text, the rest their status colours), or replaced by a decorative `marker` such as the caller’s logo. `icon` keeps the ring and draws a 12-14px glyph inside it in place of the dot, painted by `tone`, such as the call’s source type (MCP, API key, webhook); `skipped` beats `marker`, which beats `icon`. `stopped` puts an error badge (`stoppedLabel`, default "Stopped here") after the title of the step a flow ended on and paints its dot `error` unless a `tone` is set; the line ends at the last item. `meta` puts facts about a step in one wrapping row under its title, such as `calls` 2 and `status` 200, each label secondary and its value in the mono face, 18px apart, as a `dl`. `skipped` marks a step that never ran with a grey chevron in place of the dot; the title has to say so. For steps a person works through (complete, open, locked) use `StepList`. _Key props:_ `aria-label`, `aria-labelledby`; on `Timeline.Item`: `title`, `eyebrow` (a short label above the title naming the stage), `titleCode`, `time`, `tone` (`TimelineTone`: `neutral` | `info` | `success` | `warning` | `error`), `marker` (fills the 24px circle in place of the ringed dot), `icon` (a glyph inside the ring, painted by `tone`), `skipped`, `stopped`, `stoppedLabel`, `meta` (`TimelineMetaEntry[]`: `label`, `value`).
138
138
  - **`Table`** — Data table with columns, sizing, pagination and row selection. `column.align` places a column's header as well as its cells. What lands on the aligned edge is the last thing in the header row rather than the title: the sort caret on a sortable column, the info icon on one carrying `info` without a sorter. `headerVariant` picks the header layout, and only `inline` lines header and body up exactly, because both are cells of one `<table>`. `detached` builds them from flex rows (with table, row, columnheader and cell roles, so a clickable row is a focusable row named by its cells that Enter activates, as the inline table's is), where a sortable header cell is 32px narrower than a non-sortable one — its padding sits on the inner button rather than on the flex item — so its header cells sit 15–17px off their column at any alignment; reach for `inline` where exact alignment matters. Sorting is internal, so the array passed as `data` is not the order rendered once a column is sorted: `onVisibleOrderChange` reports the rows in render order — the whole of `data`, compared by `rowKey` so an equal order never re-fires — for a consumer stepping a master-detail view the way the user sees it. On the detached header, `title`, `subtitle` and `extra` add a title row on the frame above the column headers, the row a `framed` `Card` draws, and it docks with them under `stickyHeaderTop` (with `showHeader={false}` nothing docks and it scrolls with the rows). The inline header has no frame, so it draws none of the three and warns in development. _Key props:_ `TableColumns` (incl. `align`, and `titleShrinks` for a title that truncates itself in a fixed-width column, inline header only), `TableSize`, `TableType`, `TableRowSelection`, `TablePaginationPosition` (`pagination.position`, in antd naming: a pager on each edge named, aligned as named, 16px from the rows; bottom right by default), `rowDensity` (`default`; `compact`, about 30px rows; `snug`, 38px rows with 12px side padding and a tighter header), `headerVariant`, `title`, `subtitle`, `extra`, `onVisibleOrderChange`, `scrollHeight` (a height, or `"fill"` for the room left in its scroller once the content above and below it fits, so the page itself never scrolls), `loadingRowCount` (skeleton rows while `loading`, 1 to 50), `aria-label` and `aria-labelledby` (name the table in either layout, in its loading and error states too; a detached table with neither takes its name from its title row).
@@ -1,36 +1,38 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import n from "./DatePickerField.js";
3
- import { toDate as v } from "./dateMath.js";
4
- const c = (t, u) => {
5
- const o = v(t, u);
6
- return o ? { start: o, end: null } : null;
7
- }, V = ({
8
- value: t,
9
- defaultValue: u = null,
10
- onChange: o,
11
- presets: r,
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import e from "./DatePickerField.js";
3
+ import { toDate as f } from "./dateMath.js";
4
+ const b = (o, d) => {
5
+ const a = f(o, d);
6
+ return a ? { start: a, end: null } : null;
7
+ }, F = ({
8
+ value: o,
9
+ defaultValue: d = null,
10
+ onChange: a,
11
+ presets: u,
12
12
  ...m
13
13
  }) => {
14
- const d = m.timeZone ?? "local", a = (l) => c(l, d);
15
- return /* @__PURE__ */ f(
16
- n,
14
+ const r = m.timeZone ?? "local", t = (l) => b(l, r);
15
+ return /* @__PURE__ */ n(
16
+ e,
17
17
  {
18
18
  ...m,
19
19
  mode: "single",
20
- value: t === void 0 ? void 0 : a(t),
21
- defaultValue: a(u),
22
- readFormValue: a,
20
+ value: o === void 0 ? void 0 : t(o),
21
+ defaultValue: t(d),
22
+ readFormValue: t,
23
23
  toFormValue: (l, i) => l.start ? i(l.start) : null,
24
- onCommit: (l) => o == null ? void 0 : o((l == null ? void 0 : l.start) ?? null),
25
- presets: r == null ? void 0 : r.map((l) => ({
24
+ onCommit: (l) => a == null ? void 0 : a((l == null ? void 0 : l.start) ?? null),
25
+ presets: u == null ? void 0 : u.map((l) => ({
26
26
  label: l.label,
27
- resolve: () => a(typeof l.value == "function" ? l.value() : l.value)
27
+ disabled: l.disabled,
28
+ disabledReason: l.disabledReason,
29
+ resolve: () => t(typeof l.value == "function" ? l.value() : l.value)
28
30
  }))
29
31
  }
30
32
  );
31
33
  };
32
34
  export {
33
- V as DatePicker,
34
- V as default
35
+ F as DatePicker,
36
+ F as default
35
37
  };
36
38
  //# sourceMappingURL=DatePicker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.js","sources":["../../src/components/DatePicker.tsx"],"sourcesContent":["import type React from 'react';\nimport DatePickerField from './DatePickerField';\nimport type { Selection } from './DatePickerPanel';\nimport { type DatePickerTimeZone, toDate } from './dateMath';\nimport type { DateInput, DatePickerBaseProps, DateSinglePreset } from './datePickerTypes';\n\nexport interface DatePickerProps extends DatePickerBaseProps {\n /** Controlled value. `null` is a controlled empty field; leave it out to stay uncontrolled. */\n value?: DateInput | null;\n defaultValue?: DateInput | null;\n onChange?: (value: Date | null) => void;\n /** Applies at once and closes the picker, with no Apply step. */\n presets?: DateSinglePreset[];\n}\n\nconst toSelection = (input: unknown, zone: DatePickerTimeZone): Selection | null => {\n const start = toDate(input as DateInput | null | undefined, zone);\n return start ? { start, end: null } : null;\n};\n\nconst DatePicker: React.FC<DatePickerProps> = ({\n value,\n defaultValue = null,\n onChange,\n presets,\n ...rest\n}) => {\n const zone = rest.timeZone ?? 'local';\n const read = (input: unknown) => toSelection(input, zone);\n return (\n <DatePickerField\n {...rest}\n mode=\"single\"\n value={value === undefined ? undefined : read(value)}\n defaultValue={read(defaultValue)}\n readFormValue={read}\n toFormValue={(selection, serialize) =>\n selection.start ? serialize(selection.start) : null\n }\n onCommit={(selection) => onChange?.(selection?.start ?? null)}\n presets={presets?.map((preset) => ({\n label: preset.label,\n resolve: () =>\n read(typeof preset.value === 'function' ? preset.value() : preset.value),\n }))}\n />\n );\n};\n\nexport { DatePicker };\nexport default DatePicker;\n"],"names":["toSelection","input","zone","start","toDate","DatePicker","value","defaultValue","onChange","presets","rest","read","jsx","DatePickerField","selection","serialize","preset"],"mappings":";;;AAeA,MAAMA,IAAc,CAACC,GAAgBC,MAA+C;AAChF,QAAMC,IAAQC,EAAOH,GAAuCC,CAAI;AAChE,SAAOC,IAAQ,EAAE,OAAAA,GAAO,KAAK,SAAS;AAC1C,GAEME,IAAwC,CAAC;AAAA,EAC3C,OAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACP,MAAM;AACF,QAAMR,IAAOQ,EAAK,YAAY,SACxBC,IAAO,CAACV,MAAmBD,EAAYC,GAAOC,CAAI;AACxD,SACI,gBAAAU;AAAA,IAACC;AAAA,IAAA;AAAA,MACI,GAAGH;AAAA,MACJ,MAAK;AAAA,MACL,OAAOJ,MAAU,SAAY,SAAYK,EAAKL,CAAK;AAAA,MACnD,cAAcK,EAAKJ,CAAY;AAAA,MAC/B,eAAeI;AAAA,MACf,aAAa,CAACG,GAAWC,MACrBD,EAAU,QAAQC,EAAUD,EAAU,KAAK,IAAI;AAAA,MAEnD,UAAU,CAACA,MAAcN,KAAA,gBAAAA,GAAWM,KAAA,gBAAAA,EAAW,UAAS;AAAA,MACxD,SAASL,KAAA,gBAAAA,EAAS,IAAI,CAACO,OAAY;AAAA,QAC/B,OAAOA,EAAO;AAAA,QACd,SAAS,MACLL,EAAK,OAAOK,EAAO,SAAU,aAAaA,EAAO,UAAUA,EAAO,KAAK;AAAA,MAAA;AAAA,IAC7E;AAAA,EAAA;AAGd;"}
1
+ {"version":3,"file":"DatePicker.js","sources":["../../src/components/DatePicker.tsx"],"sourcesContent":["import type React from 'react';\nimport DatePickerField from './DatePickerField';\nimport type { Selection } from './DatePickerPanel';\nimport { type DatePickerTimeZone, toDate } from './dateMath';\nimport type { DateInput, DatePickerBaseProps, DateSinglePreset } from './datePickerTypes';\n\nexport interface DatePickerProps extends DatePickerBaseProps {\n /** Controlled value. `null` is a controlled empty field; leave it out to stay uncontrolled. */\n value?: DateInput | null;\n defaultValue?: DateInput | null;\n onChange?: (value: Date | null) => void;\n /** Applies at once and closes the picker, with no Apply step. */\n presets?: DateSinglePreset[];\n}\n\nconst toSelection = (input: unknown, zone: DatePickerTimeZone): Selection | null => {\n const start = toDate(input as DateInput | null | undefined, zone);\n return start ? { start, end: null } : null;\n};\n\nconst DatePicker: React.FC<DatePickerProps> = ({\n value,\n defaultValue = null,\n onChange,\n presets,\n ...rest\n}) => {\n const zone = rest.timeZone ?? 'local';\n const read = (input: unknown) => toSelection(input, zone);\n return (\n <DatePickerField\n {...rest}\n mode=\"single\"\n value={value === undefined ? undefined : read(value)}\n defaultValue={read(defaultValue)}\n readFormValue={read}\n toFormValue={(selection, serialize) =>\n selection.start ? serialize(selection.start) : null\n }\n onCommit={(selection) => onChange?.(selection?.start ?? null)}\n presets={presets?.map((preset) => ({\n label: preset.label,\n disabled: preset.disabled,\n disabledReason: preset.disabledReason,\n resolve: () =>\n read(typeof preset.value === 'function' ? preset.value() : preset.value),\n }))}\n />\n );\n};\n\nexport { DatePicker };\nexport default DatePicker;\n"],"names":["toSelection","input","zone","start","toDate","DatePicker","value","defaultValue","onChange","presets","rest","read","jsx","DatePickerField","selection","serialize","preset"],"mappings":";;;AAeA,MAAMA,IAAc,CAACC,GAAgBC,MAA+C;AAChF,QAAMC,IAAQC,EAAOH,GAAuCC,CAAI;AAChE,SAAOC,IAAQ,EAAE,OAAAA,GAAO,KAAK,SAAS;AAC1C,GAEME,IAAwC,CAAC;AAAA,EAC3C,OAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACP,MAAM;AACF,QAAMR,IAAOQ,EAAK,YAAY,SACxBC,IAAO,CAACV,MAAmBD,EAAYC,GAAOC,CAAI;AACxD,SACI,gBAAAU;AAAA,IAACC;AAAA,IAAA;AAAA,MACI,GAAGH;AAAA,MACJ,MAAK;AAAA,MACL,OAAOJ,MAAU,SAAY,SAAYK,EAAKL,CAAK;AAAA,MACnD,cAAcK,EAAKJ,CAAY;AAAA,MAC/B,eAAeI;AAAA,MACf,aAAa,CAACG,GAAWC,MACrBD,EAAU,QAAQC,EAAUD,EAAU,KAAK,IAAI;AAAA,MAEnD,UAAU,CAACA,MAAcN,KAAA,gBAAAA,GAAWM,KAAA,gBAAAA,EAAW,UAAS;AAAA,MACxD,SAASL,KAAA,gBAAAA,EAAS,IAAI,CAACO,OAAY;AAAA,QAC/B,OAAOA,EAAO;AAAA,QACd,UAAUA,EAAO;AAAA,QACjB,gBAAgBA,EAAO;AAAA,QACvB,SAAS,MACLL,EAAK,OAAOK,EAAO,SAAU,aAAaA,EAAO,UAAUA,EAAO,KAAK;AAAA,MAAA;AAAA,IAC7E;AAAA,EAAA;AAGd;"}
@@ -1,131 +1,131 @@
1
- import { jsx as a, jsxs as ae, Fragment as Se } from "react/jsx-runtime";
2
- import { useState as E, useRef as re } from "react";
3
- import Oe, { useFormFieldIds as $e } from "./BaseFormComponent.js";
4
- import ke from "./CustomIcons/CloseIcon.js";
5
- import we from "./DatePickerPanel.js";
6
- import Pe from "./DatePickerTrigger.js";
7
- import { FieldMessage as Re } from "./FieldMessage.js";
8
- import Ne from "./LoadingInput.js";
9
- import { Popover as ze } from "./Popover.js";
10
- import { controlWidthStyle as ie } from "./controlWidth.js";
11
- import { toDate as ne, formatDate as Fe, dayKeyString as Ae, dayKeyOf as Le } from "./dateMath.js";
12
- import { TRIGGER_HEIGHT as _e, ICON_BUTTON_CLASS as Ee, CLEAR_POSITION as Me } from "./datePickerStyles.js";
13
- import { FOCUS_RING as je } from "./focusRing.js";
14
- import { useDatePickerDraft as Ge } from "./useDatePickerDraft.js";
15
- const Be = (o, n, s) => o != null && o.start ? n === "single" ? s(o.start) : o.end ? `${s(o.start)} - ${s(o.end)}` : null : null, He = /^\d{4}-\d{2}-\d{2}$/, Ue = (o) => {
16
- const n = typeof o == "object" && o !== null && "start" in o ? o.start : o;
17
- return typeof n != "string" ? "date" : He.test(n) ? "dateOnly" : "iso";
18
- }, Ve = ({
19
- field: o,
1
+ import { jsx as o, jsxs as re, Fragment as Oe } from "react/jsx-runtime";
2
+ import { useState as M, useRef as ie } from "react";
3
+ import $e, { useFormFieldIds as ke } from "./BaseFormComponent.js";
4
+ import we from "./CustomIcons/CloseIcon.js";
5
+ import Pe from "./DatePickerPanel.js";
6
+ import Re from "./DatePickerTrigger.js";
7
+ import { FieldMessage as Ne } from "./FieldMessage.js";
8
+ import ze from "./LoadingInput.js";
9
+ import { Popover as Fe } from "./Popover.js";
10
+ import { controlWidthStyle as le } from "./controlWidth.js";
11
+ import { toDate as ne, formatDate as Ae, dayKeyString as Le, dayKeyOf as _e } from "./dateMath.js";
12
+ import { TRIGGER_HEIGHT as Ee, ICON_BUTTON_CLASS as Me, CLEAR_POSITION as je } from "./datePickerStyles.js";
13
+ import { FOCUS_RING as Ge } from "./focusRing.js";
14
+ import { useDatePickerDraft as Be } from "./useDatePickerDraft.js";
15
+ const He = (a, n, s) => a != null && a.start ? n === "single" ? s(a.start) : a.end ? `${s(a.start)} - ${s(a.end)}` : null : null, Ue = /^\d{4}-\d{2}-\d{2}$/, Ve = (a) => {
16
+ const n = typeof a == "object" && a !== null && "start" in a ? a.start : a;
17
+ return typeof n != "string" ? "date" : Ue.test(n) ? "dateOnly" : "iso";
18
+ }, We = ({
19
+ field: a,
20
20
  ids: n,
21
21
  form: s,
22
- uncontrolled: T,
23
- setUncontrolled: h
22
+ uncontrolled: C,
23
+ setUncontrolled: y
24
24
  }) => {
25
25
  const {
26
- mode: r,
27
- value: f,
28
- readFormValue: y,
29
- toFormValue: C,
26
+ mode: i,
27
+ value: u,
28
+ readFormValue: b,
29
+ toFormValue: S,
30
30
  onCommit: x,
31
- presets: i,
31
+ presets: r,
32
32
  formControl: g,
33
- helperText: u,
34
- placeholder: S,
33
+ helperText: h,
34
+ placeholder: O,
35
35
  precision: d = "day",
36
- minuteStep: O = 1,
36
+ minuteStep: $ = 1,
37
37
  timeZone: l = "local",
38
38
  weekStartsOn: c = "monday",
39
- min: $,
40
- max: k,
41
- isDateDisabled: w,
42
- clearable: le = !1,
43
- disabled: b = !1,
44
- error: M,
45
- tone: se = "default",
46
- tag: j,
47
- size: G = "medium",
48
- fullWidth: de = !1,
49
- width: ce,
50
- "aria-label": P,
51
- "aria-labelledby": B
52
- } = o, { controlId: I, labelId: me, descriptionId: pe, hintId: fe, helperTextId: R } = n, {
53
- error: ue,
54
- message: he,
55
- onFieldChange: N,
39
+ min: k,
40
+ max: w,
41
+ isDateDisabled: P,
42
+ clearable: se = !1,
43
+ disabled: I = !1,
44
+ error: j,
45
+ tone: de = "default",
46
+ tag: G,
47
+ size: B = "medium",
48
+ fullWidth: ce = !1,
49
+ width: me,
50
+ "aria-label": R,
51
+ "aria-labelledby": H
52
+ } = a, { controlId: v, labelId: pe, descriptionId: fe, hintId: ue, helperTextId: N } = n, {
53
+ error: he,
54
+ message: ye,
55
+ onFieldChange: z,
56
56
  onFieldBlur: m,
57
- emptyValue: H,
57
+ emptyValue: U,
58
58
  value: p
59
- } = s, ye = ne($, l) ?? void 0, ge = ne(k, l) ?? void 0, z = `${I}-value`, U = `${I}-tag`, V = `${I}-name`, W = re(null), q = re(null), [K, F] = E(!1);
60
- b && K && F(!1);
61
- const A = K && !b, v = p != null && p !== "" ? Ue(p) : null, [Y, be] = E(null);
62
- v && v !== Y && be(v);
63
- const L = v ?? Y ?? (p === "" ? "iso" : "date"), Z = f !== void 0 ? f : g ? y(p) : T, Ie = (e) => L === "iso" ? e.toISOString() : L === "dateOnly" ? Ae(Le(e, l)) : e, _ = (e) => {
64
- f === void 0 && !g && h(e);
65
- const D = H === "" && (r === "range" || L === "date") ? null : H;
66
- N == null || N(e ? C(e, Ie) : D), x(e), F(!1);
67
- }, t = Ge({
68
- mode: r,
59
+ } = s, be = ne(k, l) ?? void 0, ge = ne(w, l) ?? void 0, F = `${v}-value`, V = `${v}-tag`, W = `${v}-name`, q = ie(null), K = ie(null), [Y, A] = M(!1);
60
+ I && Y && A(!1);
61
+ const L = Y && !I, D = p != null && p !== "" ? Ve(p) : null, [Z, Ie] = M(null);
62
+ D && D !== Z && Ie(D);
63
+ const _ = D ?? Z ?? (p === "" ? "iso" : "date"), J = u !== void 0 ? u : g ? b(p) : C, ve = (e) => _ === "iso" ? e.toISOString() : _ === "dateOnly" ? Le(_e(e, l)) : e, E = (e) => {
64
+ u === void 0 && !g && y(e);
65
+ const f = U === "" && (i === "range" || _ === "date") ? null : U;
66
+ z == null || z(e ? S(e, ve) : f), x(e), A(!1);
67
+ }, t = Be({
68
+ mode: i,
69
69
  zone: l,
70
70
  precision: d,
71
- minDate: ye,
71
+ minDate: be,
72
72
  maxDate: ge,
73
- isDateDisabled: w,
74
- commit: _
75
- }), ve = (e) => {
76
- e ? t.reset(Z) : m == null || m(), F(e);
77
- }, De = M ?? ue, J = M === !1 ? void 0 : he, Q = `${R}-error`, Te = [
78
- pe,
73
+ isDateDisabled: P,
74
+ commit: E
75
+ }), De = (e) => {
76
+ e ? t.reset(J) : m == null || m(), A(e);
77
+ }, Te = j ?? he, Q = j === !1 ? void 0 : ye, X = `${N}-error`, Ce = [
79
78
  fe,
80
- u ? R : void 0,
81
- J ? Q : void 0
82
- ].filter(Boolean).join(" ") || void 0, X = Be(Z, r, (e) => Fe(e, l, d)), ee = le && !b && X !== null, Ce = j ? `${z} ${U}` : z, te = P ? V : me, xe = B ?? (te ? `${te} ${Ce}` : void 0);
83
- return /* @__PURE__ */ ae(Se, { children: [
84
- /* @__PURE__ */ ae(
79
+ ue,
80
+ h ? N : void 0,
81
+ Q ? X : void 0
82
+ ].filter(Boolean).join(" ") || void 0, ee = He(J, i, (e) => Ae(e, l, d)), te = se && !I && ee !== null, Se = G ? `${F} ${V}` : F, ae = R ? W : pe, xe = H ?? (ae ? `${ae} ${Se}` : void 0);
83
+ return /* @__PURE__ */ re(Oe, { children: [
84
+ /* @__PURE__ */ re(
85
85
  "div",
86
86
  {
87
- className: `relative flex max-w-full ${de ? "w-full" : "self-start"}`,
88
- style: ie(ce),
87
+ className: `relative flex max-w-full ${ce ? "w-full" : "self-start"}`,
88
+ style: le(me),
89
89
  children: [
90
- /* @__PURE__ */ a(
91
- ze,
90
+ /* @__PURE__ */ o(
91
+ Fe,
92
92
  {
93
- open: A,
94
- onOpenChange: ve,
95
- "aria-label": r === "range" ? "Choose date range" : "Choose date",
93
+ open: L,
94
+ onOpenChange: De,
95
+ "aria-label": i === "range" ? "Choose date range" : "Choose date",
96
96
  placement: "bottom-start",
97
97
  padding: "none",
98
- initialFocusRef: q,
99
- trigger: /* @__PURE__ */ a(
100
- Pe,
98
+ initialFocusRef: K,
99
+ trigger: /* @__PURE__ */ o(
100
+ Re,
101
101
  {
102
- id: I,
103
- size: G,
104
- text: X,
105
- placeholder: S ?? (r === "range" ? "Select date range" : "Select date"),
106
- valueId: z,
107
- tagId: U,
108
- tag: j,
109
- open: A,
110
- error: !!De,
111
- tone: se,
112
- clearRoom: ee,
113
- disabled: b,
114
- ref: W,
102
+ id: v,
103
+ size: B,
104
+ text: ee,
105
+ placeholder: O ?? (i === "range" ? "Select date range" : "Select date"),
106
+ valueId: F,
107
+ tagId: V,
108
+ tag: G,
109
+ open: L,
110
+ error: !!Te,
111
+ tone: de,
112
+ clearRoom: te,
113
+ disabled: I,
114
+ ref: q,
115
115
  "aria-labelledby": xe,
116
- "aria-describedby": Te,
116
+ "aria-describedby": Ce,
117
117
  onBlur: () => {
118
- A || m == null || m();
118
+ L || m == null || m();
119
119
  }
120
120
  }
121
121
  ),
122
- children: /* @__PURE__ */ a(
123
- we,
122
+ children: /* @__PURE__ */ o(
123
+ Pe,
124
124
  {
125
- mode: r,
125
+ mode: i,
126
126
  zone: l,
127
127
  precision: d,
128
- minuteStep: O,
128
+ minuteStep: $,
129
129
  weekStart: c,
130
130
  view: t.view,
131
131
  onViewChange: t.setView,
@@ -140,109 +140,114 @@ const Be = (o, n, s) => o != null && o.start ? n === "single" ? s(o.start) : o.e
140
140
  isTimeDisabled: t.isTimeDisabled,
141
141
  onPickDay: t.pickDay,
142
142
  onPickTime: t.pickTime,
143
- presets: i == null ? void 0 : i.map((e) => e.label),
143
+ presets: r == null ? void 0 : r.map(({ label: e, disabled: f, disabledReason: T }) => ({
144
+ label: e,
145
+ disabled: f,
146
+ disabledReason: T
147
+ })),
144
148
  onPreset: (e) => {
145
- var oe;
146
- const D = (oe = i == null ? void 0 : i[e]) == null ? void 0 : oe.resolve();
147
- D && t.commitPreset(D);
149
+ var T, oe;
150
+ if ((T = r == null ? void 0 : r[e]) != null && T.disabled) return;
151
+ const f = (oe = r == null ? void 0 : r[e]) == null ? void 0 : oe.resolve();
152
+ f && t.commitPreset(f);
148
153
  },
149
154
  todayLabel: d === "day" ? "Today" : "Now",
150
155
  todayDisabled: t.todayDisabled,
151
156
  onToday: t.pickToday,
152
157
  showApply: d !== "day",
153
158
  applyDisabled: !t.complete,
154
- onApply: () => _(t.draft),
155
- initialFocusRef: q
159
+ onApply: () => E(t.draft),
160
+ initialFocusRef: K
156
161
  }
157
162
  )
158
163
  }
159
164
  ),
160
- P && !B && /* @__PURE__ */ a("span", { id: V, hidden: !0, children: P }),
161
- ee && /* @__PURE__ */ a(
165
+ R && !H && /* @__PURE__ */ o("span", { id: W, hidden: !0, children: R }),
166
+ te && /* @__PURE__ */ o(
162
167
  "button",
163
168
  {
164
169
  type: "button",
165
- "aria-label": r === "range" ? "Clear date range" : "Clear date",
170
+ "aria-label": i === "range" ? "Clear date range" : "Clear date",
166
171
  onClick: () => {
167
172
  var e;
168
- _(null), (e = W.current) == null || e.focus();
173
+ E(null), (e = q.current) == null || e.focus();
169
174
  },
170
- className: `absolute inset-y-0 my-auto z-10 flex size-5 items-center justify-center rounded-full border-none bg-transparent p-0 cursor-pointer ${Ee} transition-colors ${je} ${Me[G]}`,
171
- children: /* @__PURE__ */ a(ke, { size: 13 })
175
+ className: `absolute inset-y-0 my-auto z-10 flex size-5 items-center justify-center rounded-full border-none bg-transparent p-0 cursor-pointer ${Me} transition-colors ${Ge} ${je[B]}`,
176
+ children: /* @__PURE__ */ o(we, { size: 13 })
172
177
  }
173
178
  )
174
179
  ]
175
180
  }
176
181
  ),
177
- u && /* @__PURE__ */ a(
182
+ h && /* @__PURE__ */ o(
178
183
  "div",
179
184
  {
180
- id: R,
185
+ id: N,
181
186
  className: "mt-1 text-[length:var(--malachite-font-size-small,13px)] text-left pl-2 text-[var(--malachite-text-dimmed,rgb(161,161,161))]",
182
- children: u
187
+ children: h
183
188
  }
184
189
  ),
185
- /* @__PURE__ */ a(Re, { id: Q, message: J, spaced: !0 })
190
+ /* @__PURE__ */ o(Ne, { id: X, message: Q, spaced: !0 })
186
191
  ] });
187
- }, lt = (o) => {
192
+ }, st = (a) => {
188
193
  const {
189
194
  defaultValue: n,
190
195
  name: s,
191
- formControl: T,
192
- label: h,
193
- hint: r,
194
- hintIcon: f,
195
- description: y,
196
- tooltip: C,
196
+ formControl: C,
197
+ label: y,
198
+ hint: i,
199
+ hintIcon: u,
200
+ description: b,
201
+ tooltip: S,
197
202
  helperText: x,
198
- required: i,
203
+ required: r,
199
204
  requiredIndicator: g,
200
- loading: u = !1,
201
- size: S = "medium",
205
+ loading: h = !1,
206
+ size: O = "medium",
202
207
  fullWidth: d = !1,
203
- width: O,
208
+ width: $,
204
209
  id: l
205
- } = o, c = $e({ id: l, label: h, description: y, hint: r, helperText: !0 }), [$, k] = E(n);
206
- return /* @__PURE__ */ a(
207
- Oe,
210
+ } = a, c = ke({ id: l, label: y, description: b, hint: i, helperText: !0 }), [k, w] = M(n);
211
+ return /* @__PURE__ */ o(
212
+ $e,
208
213
  {
209
214
  fullWidth: d,
210
- label: h,
211
- hint: r,
212
- hintIcon: f,
213
- tooltip: C,
215
+ label: y,
216
+ hint: i,
217
+ hintIcon: u,
218
+ tooltip: S,
214
219
  name: s,
215
- required: i,
220
+ required: r,
216
221
  requiredIndicator: g,
217
- loading: u,
218
- formControl: T,
219
- description: y,
222
+ loading: h,
223
+ formControl: C,
224
+ description: b,
220
225
  controlId: c.controlId,
221
226
  labelId: c.labelId,
222
227
  descriptionId: c.descriptionId,
223
228
  hintId: c.hintId,
224
- loadingComponent: /* @__PURE__ */ a("div", { style: ie(O), children: /* @__PURE__ */ a(
225
- Ne,
229
+ loadingComponent: /* @__PURE__ */ o("div", { style: le($), children: /* @__PURE__ */ o(
230
+ ze,
226
231
  {
227
- heightClass: _e[S],
232
+ heightClass: Ee[O],
228
233
  helperText: !!x,
229
234
  helperTextMarginTop: !0
230
235
  }
231
236
  ) }),
232
- children: (w) => /* @__PURE__ */ a(
233
- Ve,
237
+ children: (P) => /* @__PURE__ */ o(
238
+ We,
234
239
  {
235
- field: o,
240
+ field: a,
236
241
  ids: c,
237
- form: w,
238
- uncontrolled: $,
239
- setUncontrolled: k
242
+ form: P,
243
+ uncontrolled: k,
244
+ setUncontrolled: w
240
245
  }
241
246
  )
242
247
  }
243
248
  );
244
249
  };
245
250
  export {
246
- lt as default
251
+ st as default
247
252
  };
248
253
  //# sourceMappingURL=DatePickerField.js.map