@stll/ui 0.65.0 → 0.66.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/dist/calendar/day-calendar.d.ts +8 -3
- package/dist/calendar/day-calendar.js +7 -10
- package/dist/calendar/day-calendar.logic.d.ts +0 -2
- package/dist/calendar/day-calendar.logic.js +1 -2
- package/dist/calendar/primitives.d.ts +1 -3
- package/dist/calendar/primitives.js +1 -2
- package/dist/calendar/resource-calendar.d.ts +0 -2
- package/dist/calendar/resource-calendar.js +1 -2
- package/dist/calendar/resource-calendar.logic.d.ts +1 -3
- package/dist/calendar/resource-calendar.logic.js +1 -2
- package/dist/components/accordion.d.ts +18 -4
- package/dist/components/accordion.js +25 -9
- package/dist/components/ai-label.d.ts +0 -2
- package/dist/components/ai-label.js +1 -2
- package/dist/components/alert-dialog.d.ts +0 -2
- package/dist/components/alert-dialog.js +1 -2
- package/dist/components/animated-count.d.ts +0 -2
- package/dist/components/animated-count.js +1 -2
- package/dist/components/animated-preview.css +152 -0
- package/dist/components/animated-preview.d.ts +75 -0
- package/dist/components/animated-preview.js +105 -0
- package/dist/components/application-rail.d.ts +1 -3
- package/dist/components/application-rail.js +1 -2
- package/dist/components/avatar.d.ts +0 -2
- package/dist/components/avatar.js +1 -2
- package/dist/components/badge.d.ts +0 -2
- package/dist/components/badge.js +1 -2
- package/dist/components/bidi-text.d.ts +0 -2
- package/dist/components/bidi-text.js +1 -2
- package/dist/components/brand-icons.d.ts +0 -2
- package/dist/components/brand-icons.js +1 -2
- package/dist/components/breadcrumb.d.ts +0 -2
- package/dist/components/breadcrumb.js +1 -2
- package/dist/components/button.d.ts +0 -2
- package/dist/components/button.js +35 -13
- package/dist/components/button.native-classes.d.ts +0 -2
- package/dist/components/button.native-classes.js +1 -2
- package/dist/components/button.native.d.ts +0 -2
- package/dist/components/button.native.js +1 -2
- package/dist/components/button.shared.d.ts +1 -3
- package/dist/components/button.shared.js +1 -2
- package/dist/components/checkbox.d.ts +0 -2
- package/dist/components/checkbox.js +1 -2
- package/dist/components/collapsible.d.ts +10 -6
- package/dist/components/collapsible.js +12 -6
- package/dist/components/color-picker.d.ts +12 -5
- package/dist/components/color-picker.js +4 -6
- package/dist/components/combobox.d.ts +0 -2
- package/dist/components/combobox.js +1 -2
- package/dist/components/command.d.ts +0 -2
- package/dist/components/command.js +1 -2
- package/dist/components/composer-tokens.d.ts +1 -3
- package/dist/components/composer-tokens.js +1 -2
- package/dist/components/composer.d.ts +0 -2
- package/dist/components/composer.js +1 -2
- package/dist/components/context-menu.d.ts +1 -3
- package/dist/components/context-menu.js +1 -2
- package/dist/components/copy-button.d.ts +0 -2
- package/dist/components/copy-button.js +1 -2
- package/dist/components/court-badge.d.ts +0 -2
- package/dist/components/court-badge.js +1 -2
- package/dist/components/court-filter.d.ts +0 -2
- package/dist/components/court-filter.js +1 -2
- package/dist/components/date-picker-popover.d.ts +0 -2
- package/dist/components/date-picker-popover.js +4 -68
- package/dist/components/date-picker-popover.logic.d.ts +1 -3
- package/dist/components/date-picker-popover.logic.js +1 -2
- package/dist/components/date-range-filter.d.ts +0 -2
- package/dist/components/date-range-filter.js +1 -2
- package/dist/components/destructive-action-confirmation.d.ts +0 -2
- package/dist/components/destructive-action-confirmation.js +1 -2
- package/dist/components/destructive-confirm-dialog.d.ts +0 -2
- package/dist/components/destructive-confirm-dialog.js +1 -2
- package/dist/components/details-grid.d.ts +13 -5
- package/dist/components/details-grid.js +69 -14
- package/dist/components/dialog-form-state.d.ts +1 -3
- package/dist/components/dialog-form-state.js +1 -2
- package/dist/components/dialog.d.ts +0 -2
- package/dist/components/dialog.js +1 -2
- package/dist/components/directional-icon.d.ts +0 -2
- package/dist/components/directional-icon.js +1 -2
- package/dist/components/document-identity-badge.d.ts +0 -2
- package/dist/components/document-identity-badge.js +1 -2
- package/dist/components/document-identity-badge.logic.d.ts +1 -3
- package/dist/components/document-identity-badge.logic.js +1 -2
- package/dist/components/document-mark.d.ts +9 -0
- package/dist/components/document-mark.js +29 -0
- package/dist/components/document-mark.native.d.ts +11 -0
- package/dist/components/document-mark.native.js +36 -0
- package/dist/components/document-mark.shared.d.ts +378 -0
- package/dist/components/document-mark.shared.js +756 -0
- package/dist/components/field.d.ts +0 -2
- package/dist/components/field.js +1 -2
- package/dist/components/file-input.d.ts +0 -2
- package/dist/components/file-input.js +1 -2
- package/dist/components/form.d.ts +0 -2
- package/dist/components/form.js +1 -2
- package/dist/components/frame.d.ts +0 -2
- package/dist/components/frame.js +1 -2
- package/dist/components/hex-color-picker.d.ts +0 -2
- package/dist/components/hex-color-picker.js +1 -2
- package/dist/components/horizontal-scroller.d.ts +0 -2
- package/dist/components/horizontal-scroller.js +1 -2
- package/dist/components/identity-text.d.ts +0 -2
- package/dist/components/identity-text.js +1 -2
- package/dist/components/inline-drop-indicator.d.ts +1 -3
- package/dist/components/inline-drop-indicator.js +1 -2
- package/dist/components/inline-rename.d.ts +0 -2
- package/dist/components/inline-rename.js +1 -2
- package/dist/components/input-control.d.ts +1 -3
- package/dist/components/input-control.js +1 -2
- package/dist/components/input-group.d.ts +0 -2
- package/dist/components/input-group.js +1 -2
- package/dist/components/input-otp.d.ts +0 -2
- package/dist/components/input-otp.js +1 -2
- package/dist/components/input.d.ts +0 -2
- package/dist/components/input.js +1 -2
- package/dist/components/input.native.d.ts +0 -2
- package/dist/components/input.native.js +1 -2
- package/dist/components/input.shared.d.ts +1 -3
- package/dist/components/kbd.d.ts +58 -0
- package/dist/components/kbd.js +90 -0
- package/dist/components/label.d.ts +0 -2
- package/dist/components/label.js +1 -2
- package/dist/components/landing.d.ts +0 -2
- package/dist/components/landing.js +1 -2
- package/dist/components/list.d.ts +0 -2
- package/dist/components/list.js +1 -2
- package/dist/components/loader.d.ts +0 -2
- package/dist/components/loader.js +1 -2
- package/dist/components/loader.native.d.ts +0 -2
- package/dist/components/loader.native.js +1 -2
- package/dist/components/loader.shared.d.ts +1 -3
- package/dist/components/loader.shared.js +1 -2
- package/dist/components/matter-icon.d.ts +0 -2
- package/dist/components/matter-icon.js +1 -2
- package/dist/components/matter-icon.native.d.ts +0 -2
- package/dist/components/matter-icon.native.js +2 -3
- package/dist/components/matter-icon.shared.d.ts +1 -3
- package/dist/components/matter-icon.shared.js +1 -2
- package/dist/components/menu-section.d.ts +0 -2
- package/dist/components/menu-section.js +1 -2
- package/dist/components/menu.d.ts +18 -4
- package/dist/components/menu.js +27 -7
- package/dist/components/middle-truncate.d.ts +0 -2
- package/dist/components/middle-truncate.js +1 -2
- package/dist/components/middle-truncate.logic.d.ts +0 -2
- package/dist/components/middle-truncate.logic.js +1 -2
- package/dist/components/number-input.d.ts +0 -2
- package/dist/components/number-input.js +1 -2
- package/dist/components/outline-rail.d.ts +12 -3
- package/dist/components/outline-rail.js +61 -9
- package/dist/components/outline-rail.logic.d.ts +0 -2
- package/dist/components/outline-rail.logic.js +7 -3
- package/dist/components/pagination.d.ts +0 -2
- package/dist/components/pagination.js +1 -2
- package/dist/components/popover.d.ts +0 -2
- package/dist/components/popover.js +1 -2
- package/dist/components/preview-card.d.ts +0 -2
- package/dist/components/preview-card.js +1 -2
- package/dist/components/preview-pane.d.ts +0 -2
- package/dist/components/preview-pane.js +1 -2
- package/dist/components/prose.d.ts +0 -2
- package/dist/components/prose.js +1 -2
- package/dist/components/scroll-area.d.ts +0 -2
- package/dist/components/scroll-area.js +1 -2
- package/dist/components/scroll-to-top.d.ts +1 -3
- package/dist/components/scroll-to-top.js +1 -2
- package/dist/components/search-field.d.ts +0 -2
- package/dist/components/search-field.js +1 -2
- package/dist/components/secret-input.d.ts +0 -2
- package/dist/components/secret-input.js +1 -2
- package/dist/components/segmented-icon-toggle.d.ts +0 -2
- package/dist/components/segmented-icon-toggle.js +1 -2
- package/dist/components/select.d.ts +0 -2
- package/dist/components/select.js +1 -2
- package/dist/components/separator.d.ts +0 -2
- package/dist/components/separator.js +1 -2
- package/dist/components/separator.native.d.ts +1 -3
- package/dist/components/separator.native.js +1 -2
- package/dist/components/separator.shared.d.ts +1 -3
- package/dist/components/sheet.d.ts +0 -2
- package/dist/components/sheet.js +1 -2
- package/dist/components/sheet.native.d.ts +1 -3
- package/dist/components/sheet.native.js +1 -2
- package/dist/components/sheet.shared.d.ts +1 -3
- package/dist/components/sidebar.d.ts +0 -2
- package/dist/components/sidebar.js +1 -2
- package/dist/components/sidebar.logic.d.ts +1 -3
- package/dist/components/sidebar.logic.js +1 -2
- package/dist/components/skeleton.d.ts +0 -2
- package/dist/components/skeleton.js +1 -2
- package/dist/components/split-button.d.ts +0 -2
- package/dist/components/split-button.js +1 -2
- package/dist/components/status-mark.d.ts +0 -2
- package/dist/components/status-mark.js +1 -2
- package/dist/components/stella-mark.d.ts +1 -3
- package/dist/components/stella-mark.js +1 -2
- package/dist/components/stella-mark.native.d.ts +1 -3
- package/dist/components/stella-mark.native.js +1 -2
- package/dist/components/stella-mark.shared.d.ts +1 -3
- package/dist/components/stella-mark.shared.js +1 -2
- package/dist/components/stella-wordmark.d.ts +1 -3
- package/dist/components/stella-wordmark.js +1 -2
- package/dist/components/stella-wordmark.native.d.ts +1 -3
- package/dist/components/stella-wordmark.native.js +1 -2
- package/dist/components/stella-wordmark.shared.d.ts +1 -3
- package/dist/components/stella-wordmark.shared.js +1 -2
- package/dist/components/steps.d.ts +0 -2
- package/dist/components/steps.js +1 -2
- package/dist/components/swap-text.d.ts +0 -2
- package/dist/components/swap-text.js +1 -2
- package/dist/components/switch.d.ts +0 -2
- package/dist/components/switch.js +1 -2
- package/dist/components/switch.native.d.ts +0 -2
- package/dist/components/switch.native.js +1 -2
- package/dist/components/switch.shared.d.ts +1 -3
- package/dist/components/table-chart.d.ts +1 -3
- package/dist/components/table-chart.js +1 -2
- package/dist/components/table.d.ts +0 -2
- package/dist/components/table.js +1 -2
- package/dist/components/tabs.d.ts +0 -2
- package/dist/components/tabs.js +1 -2
- package/dist/components/text.d.ts +0 -2
- package/dist/components/text.js +1 -2
- package/dist/components/text.native.d.ts +0 -2
- package/dist/components/text.native.js +1 -2
- package/dist/components/text.shared.d.ts +1 -3
- package/dist/components/text.shared.js +1 -2
- package/dist/components/textarea.d.ts +11 -3
- package/dist/components/textarea.js +51 -13
- package/dist/components/textarea.native.d.ts +1 -3
- package/dist/components/textarea.native.js +1 -2
- package/dist/components/textarea.shared.d.ts +1 -3
- package/dist/components/time-field.d.ts +25 -0
- package/dist/components/time-field.js +108 -0
- package/dist/components/toast.d.ts +0 -2
- package/dist/components/toast.js +1 -2
- package/dist/components/toggle-group.d.ts +0 -2
- package/dist/components/toggle-group.js +1 -2
- package/dist/components/toggle.d.ts +0 -2
- package/dist/components/toggle.js +1 -2
- package/dist/components/toolbar-icon-action.d.ts +0 -2
- package/dist/components/toolbar-icon-action.js +1 -2
- package/dist/components/tooltip-trigger-helper.d.ts +0 -2
- package/dist/components/tooltip-trigger-helper.js +1 -2
- package/dist/components/tooltip.d.ts +7 -3
- package/dist/components/tooltip.js +9 -5
- package/dist/components/truncated-text.d.ts +0 -2
- package/dist/components/truncated-text.js +1 -2
- package/dist/components/view-toolbar.d.ts +0 -2
- package/dist/components/view-toolbar.js +1 -2
- package/dist/components/workspace-shell.d.ts +0 -2
- package/dist/components/workspace-shell.js +1 -2
- package/dist/css.d.ts +0 -1
- package/dist/data-table/schema.d.ts +1 -3
- package/dist/data-table/schema.js +1 -2
- package/dist/data-table/table.d.ts +0 -2
- package/dist/data-table/table.js +1 -2
- package/dist/hooks/use-contained-handler.d.ts +0 -2
- package/dist/hooks/use-contained-handler.js +1 -2
- package/dist/hooks/use-content-dir.d.ts +0 -2
- package/dist/hooks/use-content-dir.js +1 -2
- package/dist/hooks/use-latest.d.ts +1 -3
- package/dist/hooks/use-latest.js +1 -2
- package/dist/hooks/use-mobile.d.ts +1 -3
- package/dist/hooks/use-mobile.js +1 -2
- package/dist/hooks/use-prefers-reduced-motion.d.ts +6 -0
- package/dist/hooks/use-prefers-reduced-motion.js +17 -0
- package/dist/hooks/use-viewport-width.d.ts +1 -3
- package/dist/hooks/use-viewport-width.js +1 -2
- package/dist/index.d.ts +5 -4
- package/dist/index.js +5 -4
- package/dist/inspector/chrome.d.ts +1 -3
- package/dist/inspector/chrome.js +1 -2
- package/dist/inspector/dock.d.ts +0 -2
- package/dist/inspector/dock.js +1 -2
- package/dist/inspector/entity-tab.d.ts +0 -2
- package/dist/inspector/entity-tab.js +1 -2
- package/dist/inspector/entity-tab.logic.d.ts +1 -3
- package/dist/inspector/entity-tab.logic.js +1 -2
- package/dist/inspector/facet-bar.d.ts +1 -3
- package/dist/inspector/facet-bar.js +1 -2
- package/dist/inspector/facet-bar.logic.d.ts +1 -3
- package/dist/inspector/facet-bar.logic.js +1 -2
- package/dist/inspector/layout-tokens.d.ts +1 -3
- package/dist/inspector/layout-tokens.js +1 -2
- package/dist/inspector/pane-width.d.ts +0 -2
- package/dist/inspector/pane-width.js +1 -2
- package/dist/inspector/use-pane-width.d.ts +0 -2
- package/dist/inspector/use-pane-width.js +1 -2
- package/dist/kanban/band-peek.d.ts +1 -3
- package/dist/kanban/band-peek.js +1 -2
- package/dist/kanban/card-properties.d.ts +1 -3
- package/dist/kanban/card-properties.js +1 -2
- package/dist/kanban/card-shell.d.ts +1 -3
- package/dist/kanban/card-shell.js +1 -2
- package/dist/kanban/cell-action.d.ts +1 -3
- package/dist/kanban/cell-action.js +1 -2
- package/dist/kanban/column-band-header.d.ts +1 -3
- package/dist/kanban/column-band-header.js +1 -2
- package/dist/kanban/column-bands.d.ts +1 -3
- package/dist/kanban/column-bands.js +1 -2
- package/dist/kanban/column-header.d.ts +1 -3
- package/dist/kanban/column-header.js +1 -2
- package/dist/kanban/drag-interactions.d.ts +0 -2
- package/dist/kanban/drag-interactions.js +1 -2
- package/dist/kanban/grouping.d.ts +1 -3
- package/dist/kanban/grouping.js +1 -2
- package/dist/kanban/layout-tokens.d.ts +1 -3
- package/dist/kanban/layout-tokens.js +1 -2
- package/dist/kanban/matrix.d.ts +1 -3
- package/dist/kanban/matrix.js +1 -2
- package/dist/kanban/sortable-edge.d.ts +0 -2
- package/dist/kanban/sortable-edge.js +1 -2
- package/dist/kanban/sortable-interactions.d.ts +0 -2
- package/dist/kanban/sortable-interactions.js +1 -2
- package/dist/kanban/sortable-interactions.logic.d.ts +0 -2
- package/dist/kanban/sortable-interactions.logic.js +1 -2
- package/dist/kanban/sticky-lane.d.ts +0 -2
- package/dist/kanban/sticky-lane.js +1 -2
- package/dist/kanban/subgroup-board.d.ts +0 -2
- package/dist/kanban/subgroup-board.js +1 -2
- package/dist/kanban/touch-identity.d.ts +0 -2
- package/dist/kanban/touch-identity.js +1 -2
- package/dist/kanban/virtual-cell.d.ts +1 -3
- package/dist/kanban/virtual-cell.js +1 -2
- package/dist/lib/button-disposition.d.ts +0 -2
- package/dist/lib/button-disposition.js +1 -2
- package/dist/lib/control-size.d.ts +0 -2
- package/dist/lib/control-size.js +1 -2
- package/dist/lib/field-trigger.d.ts +1 -3
- package/dist/lib/field-trigger.js +1 -2
- package/dist/lib/file-picker.d.ts +0 -2
- package/dist/lib/file-picker.js +1 -2
- package/dist/lib/initials.d.ts +1 -3
- package/dist/lib/initials.js +1 -2
- package/dist/lib/inline-reorder.d.ts +0 -2
- package/dist/lib/inline-reorder.js +1 -2
- package/dist/lib/matter-colors.d.ts +0 -2
- package/dist/lib/matter-colors.js +1 -2
- package/dist/lib/menu-row.d.ts +1 -3
- package/dist/lib/menu-row.js +1 -2
- package/dist/lib/option-color.d.ts +1 -3
- package/dist/lib/option-color.js +1 -2
- package/dist/lib/overlay-layer.d.ts +1 -3
- package/dist/lib/overlay-layer.js +1 -2
- package/dist/lib/panel-inset.d.ts +1 -3
- package/dist/lib/panel-inset.js +1 -2
- package/dist/lib/positioner-sizing.d.ts +1 -3
- package/dist/lib/positioner-sizing.js +1 -2
- package/dist/lib/renders-nothing.d.ts +8 -0
- package/dist/lib/renders-nothing.js +14 -0
- package/dist/lib/safe-area.d.ts +1 -3
- package/dist/lib/safe-area.js +1 -2
- package/dist/lib/scroll-edge-fade.d.ts +1 -3
- package/dist/lib/scroll-edge-fade.js +1 -2
- package/dist/lib/slot.d.ts +0 -2
- package/dist/lib/slot.js +1 -2
- package/dist/lib/tab-order.d.ts +0 -2
- package/dist/lib/tab-order.js +1 -2
- package/dist/lib/tooltip-content.d.ts +1 -3
- package/dist/lib/tooltip-content.js +1 -2
- package/dist/lib/typed-character.d.ts +1 -3
- package/dist/lib/typed-character.js +1 -2
- package/dist/lib/utils.d.ts +1 -3
- package/dist/lib/utils.js +1 -2
- package/dist/lib/week.d.ts +1 -3
- package/dist/lib/week.js +1 -2
- package/dist/review/review-author-avatar.d.ts +0 -2
- package/dist/review/review-author-avatar.js +1 -2
- package/dist/review/review-comment-card.d.ts +0 -2
- package/dist/review/review-comment-card.js +1 -2
- package/dist/review/review-decision-actions.d.ts +0 -2
- package/dist/review/review-decision-actions.js +1 -2
- package/dist/review/review-diff-text.d.ts +0 -2
- package/dist/review/review-diff-text.js +1 -2
- package/dist/review/review-out-of-date-notice.d.ts +0 -2
- package/dist/review/review-out-of-date-notice.js +1 -2
- package/dist/review/review-severity-dot.d.ts +0 -2
- package/dist/review/review-severity-dot.js +1 -2
- package/dist/review/review-status-badge.d.ts +0 -2
- package/dist/review/review-status-badge.js +1 -2
- package/dist/review/review-word-diff.d.ts +1 -3
- package/dist/review/review-word-diff.js +1 -2
- package/dist/review/text-mark.d.ts +0 -2
- package/dist/review/text-mark.js +1 -2
- package/dist/styles/theme.css +27 -0
- package/dist/testing/browser-clock.d.ts +1 -3
- package/dist/testing/browser-clock.js +1 -2
- package/package.json +37 -5
|
@@ -10,7 +10,7 @@ import { Input } from "./input.js";
|
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import * as React$1 from "react";
|
|
12
12
|
import { Combobox as Combobox$1 } from "@base-ui/react/combobox";
|
|
13
|
-
|
|
13
|
+
// src/components/combobox.tsx
|
|
14
14
|
const ComboboxContext = React$1.createContext({
|
|
15
15
|
chipsRef: null,
|
|
16
16
|
multiple: false
|
|
@@ -232,5 +232,4 @@ const ComboboxChipRemove = (props) => /* @__PURE__ */ jsx(Combobox$1.ChipRemove,
|
|
|
232
232
|
...props,
|
|
233
233
|
children: /* @__PURE__ */ jsx(XIcon, {})
|
|
234
234
|
});
|
|
235
|
-
//#endregion
|
|
236
235
|
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, ComboboxPopup, ComboboxRow, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue };
|
|
@@ -4,7 +4,6 @@ import { ControlSize } from "../lib/control-size.js";
|
|
|
4
4
|
import { Dialog } from "@base-ui/react/dialog";
|
|
5
5
|
import { DialogContent as DialogPopup } from "./dialog.js";
|
|
6
6
|
import { VariantProps } from "class-variance-authority";
|
|
7
|
-
//#region src/components/command.d.ts
|
|
8
7
|
type CommandProps<ItemValue> = Omit<Autocomplete.Root.Props<ItemValue>, "items"> & {
|
|
9
8
|
items?: readonly ItemValue[] | undefined;
|
|
10
9
|
};
|
|
@@ -36,5 +35,4 @@ declare const CommandItem: ({ className, size, ...props }: Autocomplete.Item.Pro
|
|
|
36
35
|
declare const CommandSeparator: ({ className, ...props }: Autocomplete.Separator.Props) => React$1.JSX.Element;
|
|
37
36
|
declare const CommandShortcut: ({ className, ...props }: React$1.ComponentProps<"span">) => React$1.JSX.Element;
|
|
38
37
|
declare const CommandFooter: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
|
|
39
|
-
//#endregion
|
|
40
38
|
export { Command, CommandCollection, CommandDialog, CommandDialogPopup, CommandDialogTrigger, CommandEmpty, CommandFooter, CommandGroup, CommandGroupLabel, CommandInput, CommandItem, CommandList, CommandPanel, CommandSeparator, CommandShortcut };
|
|
@@ -9,7 +9,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
import { Dialog } from "@base-ui/react/dialog";
|
|
10
10
|
import { cva } from "class-variance-authority";
|
|
11
11
|
import { Autocomplete } from "@base-ui/react/autocomplete";
|
|
12
|
-
|
|
12
|
+
// src/components/command.tsx
|
|
13
13
|
const Command = ({ autoHighlight = "always", keepHighlight = true, open = true, ...props }) => /* @__PURE__ */ jsx(Autocomplete.Root, {
|
|
14
14
|
autoHighlight,
|
|
15
15
|
keepHighlight,
|
|
@@ -114,5 +114,4 @@ const CommandFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
|
114
114
|
"data-slot": "command-footer",
|
|
115
115
|
...props
|
|
116
116
|
});
|
|
117
|
-
//#endregion
|
|
118
117
|
export { Command, CommandCollection, CommandDialog, CommandDialogPopup, CommandDialogTrigger, CommandEmpty, CommandFooter, CommandGroup, CommandGroupLabel, CommandInput, CommandItem, CommandList, CommandPanel, CommandSeparator, CommandShortcut };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/components/composer-tokens.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* The tokens every composer box shares: the chat hero, the chat follow-up
|
|
4
3
|
* bar, the docked bar over documents (inspector chat, file overlay,
|
|
@@ -68,5 +67,4 @@ export declare const COMPOSER_SEND_BUTTON_CLASS = "bg-foreground text-background
|
|
|
68
67
|
* law home's scope and jurisdiction): quiet text with a hover surface, so
|
|
69
68
|
* the row stays subordinate to the box above it.
|
|
70
69
|
*/
|
|
71
|
-
export declare const COMPOSER_PICKER_TRIGGER_CLASS = "text-muted-foreground hover:text-foreground hover:bg-accent inline-flex min-w-0 shrink items-center gap-1 rounded-md px-1.5 py-0.5 text-2xs";
|
|
72
|
-
//#endregion
|
|
70
|
+
export declare const COMPOSER_PICKER_TRIGGER_CLASS = "text-muted-foreground hover:text-foreground hover:bg-accent inline-flex min-w-0 shrink items-center gap-1 rounded-md px-1.5 py-0.5 text-2xs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/composer-tokens.ts
|
|
2
2
|
/**
|
|
3
3
|
* The tokens every composer box shares: the chat hero, the chat follow-up
|
|
4
4
|
* bar, the docked bar over documents (inspector chat, file overlay,
|
|
@@ -69,5 +69,4 @@ const COMPOSER_SEND_BUTTON_CLASS = "bg-foreground text-background hover:bg-foreg
|
|
|
69
69
|
* the row stays subordinate to the box above it.
|
|
70
70
|
*/
|
|
71
71
|
const COMPOSER_PICKER_TRIGGER_CLASS = "text-muted-foreground hover:text-foreground hover:bg-accent inline-flex min-w-0 shrink items-center gap-1 rounded-md px-1.5 py-0.5 text-2xs";
|
|
72
|
-
//#endregion
|
|
73
72
|
export { COMPOSER_BOX_ANONYMIZED_CLASS, COMPOSER_BOX_CLASS, COMPOSER_BOX_FOCUS_CLASS, COMPOSER_COMPACT_ROW_CLASS, COMPOSER_COMPACT_TEXT_CELL_CLASS, COMPOSER_CONTROL_BUTTON_SIZE, COMPOSER_LARGE_ACTION_ROW_CLASS, COMPOSER_LARGE_EDITOR_CLASS, COMPOSER_LARGE_TEXT_WELL_CLASS, COMPOSER_LEADING_GROUP_CLASS, COMPOSER_PICKER_TRIGGER_CLASS, COMPOSER_PLACEHOLDER_CLASS, COMPOSER_SEND_BUTTON_CLASS, COMPOSER_TEXT_CLASS };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { COMPOSER_BOX_ANONYMIZED_CLASS, COMPOSER_BOX_CLASS, COMPOSER_BOX_FOCUS_CLASS, COMPOSER_COMPACT_ROW_CLASS, COMPOSER_COMPACT_TEXT_CELL_CLASS, COMPOSER_CONTROL_BUTTON_SIZE, COMPOSER_LARGE_ACTION_ROW_CLASS, COMPOSER_LARGE_EDITOR_CLASS, COMPOSER_LARGE_TEXT_WELL_CLASS, COMPOSER_LEADING_GROUP_CLASS, COMPOSER_PICKER_TRIGGER_CLASS, COMPOSER_PLACEHOLDER_CLASS, COMPOSER_SEND_BUTTON_CLASS, COMPOSER_TEXT_CLASS } from "./composer-tokens.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
|
-
//#region src/components/composer.d.ts
|
|
4
3
|
type ComposerStatusRowProps = {
|
|
5
4
|
/** Left cluster: matter picker, web-search / anonymize toggles, ... */
|
|
6
5
|
start?: ReactNode | undefined;
|
|
@@ -43,5 +42,4 @@ type ComposerPickerProps<Value extends string> = {
|
|
|
43
42
|
* kind of control.
|
|
44
43
|
*/
|
|
45
44
|
export declare const ComposerPicker: <Value extends string>({ ariaLabel, icon, onChange, options, value }: ComposerPickerProps<Value>) => import("react").JSX.Element;
|
|
46
|
-
//#endregion
|
|
47
45
|
export { COMPOSER_BOX_ANONYMIZED_CLASS, COMPOSER_BOX_CLASS, COMPOSER_BOX_FOCUS_CLASS, COMPOSER_COMPACT_ROW_CLASS, COMPOSER_COMPACT_TEXT_CELL_CLASS, COMPOSER_CONTROL_BUTTON_SIZE, COMPOSER_LARGE_ACTION_ROW_CLASS, COMPOSER_LARGE_EDITOR_CLASS, COMPOSER_LARGE_TEXT_WELL_CLASS, COMPOSER_LEADING_GROUP_CLASS, COMPOSER_PICKER_TRIGGER_CLASS, COMPOSER_PLACEHOLDER_CLASS, COMPOSER_SEND_BUTTON_CLASS, COMPOSER_TEXT_CLASS };
|
|
@@ -4,7 +4,7 @@ import { cn } from "../lib/utils.js";
|
|
|
4
4
|
import { DropdownMenu as Menu, DropdownMenuContent as MenuPopup, DropdownMenuRadioGroup as MenuRadioGroup, DropdownMenuRadioItem as MenuRadioItem, DropdownMenuTrigger as MenuTrigger } from "./menu.js";
|
|
5
5
|
import { COMPOSER_BOX_ANONYMIZED_CLASS, COMPOSER_BOX_CLASS, COMPOSER_BOX_FOCUS_CLASS, COMPOSER_COMPACT_ROW_CLASS, COMPOSER_COMPACT_TEXT_CELL_CLASS, COMPOSER_CONTROL_BUTTON_SIZE, COMPOSER_LARGE_ACTION_ROW_CLASS, COMPOSER_LARGE_EDITOR_CLASS, COMPOSER_LARGE_TEXT_WELL_CLASS, COMPOSER_LEADING_GROUP_CLASS, COMPOSER_PICKER_TRIGGER_CLASS, COMPOSER_PLACEHOLDER_CLASS, COMPOSER_SEND_BUTTON_CLASS, COMPOSER_TEXT_CLASS } from "./composer-tokens.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/components/composer.tsx
|
|
8
8
|
/**
|
|
9
9
|
* The slim status row rendered beneath a composer box: a `text-xs` row with
|
|
10
10
|
* a start cluster and an end slot pinned to the far edge. Shared by every
|
|
@@ -76,5 +76,4 @@ const ComposerPicker = ({ ariaLabel, icon, onChange, options, value }) => {
|
|
|
76
76
|
})
|
|
77
77
|
})] });
|
|
78
78
|
};
|
|
79
|
-
//#endregion
|
|
80
79
|
export { COMPOSER_BOX_ANONYMIZED_CLASS, COMPOSER_BOX_CLASS, COMPOSER_BOX_FOCUS_CLASS, COMPOSER_COMPACT_ROW_CLASS, COMPOSER_COMPACT_TEXT_CELL_CLASS, COMPOSER_CONTROL_BUTTON_SIZE, COMPOSER_LARGE_ACTION_ROW_CLASS, COMPOSER_LARGE_EDITOR_CLASS, COMPOSER_LARGE_TEXT_WELL_CLASS, COMPOSER_LEADING_GROUP_CLASS, COMPOSER_PICKER_TRIGGER_CLASS, COMPOSER_PLACEHOLDER_CLASS, COMPOSER_SEND_BUTTON_CLASS, COMPOSER_TEXT_CLASS, ComposerPicker, ComposerStatusRow };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
//#region src/components/context-menu.d.ts
|
|
3
2
|
export type ContextMenuAction = {
|
|
4
3
|
label: string;
|
|
5
4
|
icon?: ReactNode;
|
|
@@ -32,5 +31,4 @@ export type ContextMenuProps = {
|
|
|
32
31
|
* Renders only the children when `actions` is empty so callers can
|
|
33
32
|
* pass conditionally.
|
|
34
33
|
*/
|
|
35
|
-
export declare const ContextMenu: ({ actions, children }: ContextMenuProps) => ReactNode;
|
|
36
|
-
//#endregion
|
|
34
|
+
export declare const ContextMenu: ({ actions, children }: ContextMenuProps) => ReactNode;
|
|
@@ -3,7 +3,7 @@ import { cn } from "../lib/utils.js";
|
|
|
3
3
|
import { DropdownMenuCheckboxItem as MenuCheckboxItem, DropdownMenuContent as MenuPopup, DropdownMenuItem as MenuItem, DropdownMenuSeparator as MenuSeparator, DropdownMenuSub as MenuSub, DropdownMenuSubContent as MenuSubPopup, DropdownMenuSubTrigger as MenuSubTrigger } from "./menu.js";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { ContextMenu as ContextMenu$1 } from "@base-ui/react/context-menu";
|
|
6
|
-
|
|
6
|
+
// src/components/context-menu.tsx
|
|
7
7
|
/**
|
|
8
8
|
* Wrap arbitrary content with a right-click context menu. Built on
|
|
9
9
|
* base-ui's `ContextMenu`, which is purpose-built for right-click /
|
|
@@ -44,5 +44,4 @@ const ContextMenuActionItem = ({ action }) => {
|
|
|
44
44
|
children: [action.icon, action.label]
|
|
45
45
|
})] });
|
|
46
46
|
};
|
|
47
|
-
//#endregion
|
|
48
47
|
export { ContextMenu };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Button } from "./button.js";
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
3
|
import { CopyToClipboardIcon } from "../icons.js";
|
|
4
|
-
//#region src/components/copy-button.d.ts
|
|
5
4
|
export declare const COPIED_RESET_MS = 1500;
|
|
6
5
|
type CopyButtonProps = Omit<ComponentProps<typeof Button>, "children" | "onClick"> & {
|
|
7
6
|
/** Copies and reports whether it worked; failures stay with the caller. */
|
|
@@ -47,5 +46,4 @@ type CopyFeedbackProps = {
|
|
|
47
46
|
};
|
|
48
47
|
/** The standard copy-to-check glyph and label swap, for compound controls. */
|
|
49
48
|
export declare const CopyFeedback: ({ icon: Icon, labelClassName, copied, copiedLabel, iconOnly, iconClassName, label }: CopyFeedbackProps) => import("react").JSX.Element;
|
|
50
|
-
//#endregion
|
|
51
49
|
export {};
|
|
@@ -4,7 +4,7 @@ import { cn } from "../lib/utils.js";
|
|
|
4
4
|
import { Button } from "./button.js";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
7
|
-
|
|
7
|
+
// src/components/copy-button.tsx
|
|
8
8
|
const COPIED_RESET_MS = 1500;
|
|
9
9
|
const SWAP_CLASS = "col-start-1 row-start-1 transition-[opacity,scale] duration-200 ease-out motion-reduce:transition-none";
|
|
10
10
|
/**
|
|
@@ -106,5 +106,4 @@ const CopyFeedback = ({ icon: Icon = CopyToClipboardIcon, labelClassName, copied
|
|
|
106
106
|
})
|
|
107
107
|
] });
|
|
108
108
|
};
|
|
109
|
-
//#endregion
|
|
110
109
|
export { COPIED_RESET_MS, CopyButton, CopyFeedback, useCopiedFeedback, useCopyConfirmation };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/components/court-badge.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* How a court's abbreviation is drawn: a firm edge for the apex, then lighter
|
|
4
3
|
* treatments down the instances.
|
|
@@ -30,5 +29,4 @@ type CourtBadgeProps = {
|
|
|
30
29
|
* abbreviates gets no chip.
|
|
31
30
|
*/
|
|
32
31
|
export declare const CourtBadge: ({ abbreviation, className, size, weight }: CourtBadgeProps) => import("react").JSX.Element;
|
|
33
|
-
//#endregion
|
|
34
32
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/components/court-badge.tsx
|
|
4
4
|
const COURT_BADGE_BASE_CLASS = "inline-flex shrink-0 items-center rounded-sm border font-mono font-semibold tracking-wide whitespace-nowrap";
|
|
5
5
|
/**
|
|
6
6
|
* The line box runs a third taller than the type, because these capitals
|
|
@@ -47,5 +47,4 @@ const CourtBadge = ({ abbreviation, className, size = "default", weight }) => /*
|
|
|
47
47
|
dir: "ltr",
|
|
48
48
|
children: abbreviation
|
|
49
49
|
});
|
|
50
|
-
//#endregion
|
|
51
50
|
export { CourtBadge };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/components/court-filter.d.ts
|
|
2
1
|
type CourtOption = {
|
|
3
2
|
value: string;
|
|
4
3
|
label?: string;
|
|
@@ -38,5 +37,4 @@ export declare const toggleCourtSelection: (selected: readonly string[], values:
|
|
|
38
37
|
*/
|
|
39
38
|
export declare const MultipleCourtFilter: (options: MultipleCourtFilterProps) => import("react").JSX.Element;
|
|
40
39
|
export declare const SingleCourtFilter: (props: SingleCourtFilterProps) => import("react").JSX.Element;
|
|
41
|
-
//#endregion
|
|
42
40
|
export {};
|
|
@@ -9,7 +9,7 @@ import { Field, FieldLabel } from "./field.js";
|
|
|
9
9
|
import { SearchField } from "./search-field.js";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { useId, useState } from "react";
|
|
12
|
-
|
|
12
|
+
// src/components/court-filter.tsx
|
|
13
13
|
const toggleCourtSelection = (selected, values) => {
|
|
14
14
|
return values.every((value) => selected.includes(value)) ? selected.filter((value) => !values.includes(value)) : [.../* @__PURE__ */ new Set([...selected, ...values])];
|
|
15
15
|
};
|
|
@@ -206,5 +206,4 @@ const SingleCourtFilter = (props) => /* @__PURE__ */ jsx("div", {
|
|
|
206
206
|
options: props
|
|
207
207
|
}, group.value))
|
|
208
208
|
});
|
|
209
|
-
//#endregion
|
|
210
209
|
export { MultipleCourtFilter, SingleCourtFilter, toggleCourtSelection };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DatePickerMode } from "./date-picker-popover.logic.js";
|
|
2
2
|
import { OverlayLayer } from "../lib/overlay-layer.js";
|
|
3
|
-
//#region src/components/date-picker-popover.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* `compact` keeps the dense 32px day cells everywhere. `touch` grows day,
|
|
6
5
|
* month, and year cells to 44px targets under a coarse pointer and leaves a
|
|
@@ -75,5 +74,4 @@ type DatePickerPopoverProps = {
|
|
|
75
74
|
layer?: OverlayLayer;
|
|
76
75
|
};
|
|
77
76
|
declare const DatePickerPopover: (props: DatePickerPopoverProps) => import("react").JSX.Element;
|
|
78
|
-
//#endregion
|
|
79
77
|
export { DatePickerPopover, type DatePickerPopoverProps };
|
|
@@ -6,14 +6,14 @@ import { DirectionalIcon } from "./directional-icon.js";
|
|
|
6
6
|
import { FIELD_TRIGGER_CLASS_NAME } from "../lib/field-trigger.js";
|
|
7
7
|
import { Input } from "./input.js";
|
|
8
8
|
import { getLocaleWeekInfo, getWeekendDays } from "../lib/week.js";
|
|
9
|
-
import { DATE_PICKER_MODE, formatDateTimeValue,
|
|
9
|
+
import { DATE_PICKER_MODE, formatDateTimeValue, joinPickerTime, localDateFromTimestamp, millisecondsUntilNextLocalDate, parseDateTimeValue, resolveCalendarViewMonth, shiftCalendarDate } from "./date-picker-popover.logic.js";
|
|
10
10
|
import { Popover, PopoverContent as PopoverPopup, PopoverTrigger } from "./popover.js";
|
|
11
|
-
import {
|
|
11
|
+
import { TimeField } from "./time-field.js";
|
|
12
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { useCallback, useId, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
14
14
|
import { Result, panic } from "better-result";
|
|
15
15
|
import { Temporal } from "temporal-polyfill/full";
|
|
16
|
-
|
|
16
|
+
// src/components/date-picker-popover.tsx
|
|
17
17
|
const toISODate = (date) => date.toString();
|
|
18
18
|
const toUTCDateTime = (date) => date.toZonedDateTime({
|
|
19
19
|
plainTime: Temporal.PlainTime.from("00:00"),
|
|
@@ -552,6 +552,7 @@ const DatePickerPopoverContent = (props) => {
|
|
|
552
552
|
today
|
|
553
553
|
}),
|
|
554
554
|
selection.mode === DATE_PICKER_MODE.dateTime && /* @__PURE__ */ jsx(TimeField, {
|
|
555
|
+
className: "mt-1 border-t pt-1",
|
|
555
556
|
disabled: value === "",
|
|
556
557
|
label: labels.time,
|
|
557
558
|
locale,
|
|
@@ -638,70 +639,6 @@ const PickerHeader = ({ headingClassName, label, labels, onHeadingClick, onNext,
|
|
|
638
639
|
]
|
|
639
640
|
});
|
|
640
641
|
};
|
|
641
|
-
/**
|
|
642
|
-
* Hour and minute selects in the locale's own clock and numerals. Inert
|
|
643
|
-
* until a day is picked, since a time alone is not a value.
|
|
644
|
-
*/
|
|
645
|
-
const TimeField = ({ disabled, label, locale, onChange, time }) => {
|
|
646
|
-
const labelId = useId();
|
|
647
|
-
const hourOptions = useMemo(() => getHourOptions(locale), [locale]);
|
|
648
|
-
const minuteOptions = useMemo(() => getMinuteOptions(locale), [locale]);
|
|
649
|
-
const fieldNames = useMemo(() => getTimeFieldNames(locale), [locale]);
|
|
650
|
-
const clock = time === null ? null : splitPickerTime(time);
|
|
651
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
652
|
-
"aria-labelledby": labelId,
|
|
653
|
-
className: "mt-1 flex items-center gap-1.5 border-t pt-1",
|
|
654
|
-
role: "group",
|
|
655
|
-
children: [
|
|
656
|
-
/* @__PURE__ */ jsx("span", {
|
|
657
|
-
className: "text-foreground-label shrink-0 text-xs",
|
|
658
|
-
id: labelId,
|
|
659
|
-
children: label
|
|
660
|
-
}),
|
|
661
|
-
/* @__PURE__ */ jsx(TimePartSelect, {
|
|
662
|
-
disabled,
|
|
663
|
-
label: fieldNames.hour,
|
|
664
|
-
onChange: (hour) => onChange({
|
|
665
|
-
hour,
|
|
666
|
-
minute: clock?.minute ?? 0
|
|
667
|
-
}),
|
|
668
|
-
options: hourOptions,
|
|
669
|
-
value: clock?.hour ?? null
|
|
670
|
-
}),
|
|
671
|
-
/* @__PURE__ */ jsx("span", {
|
|
672
|
-
"aria-hidden": "true",
|
|
673
|
-
className: "text-muted-foreground text-xs",
|
|
674
|
-
children: ":"
|
|
675
|
-
}),
|
|
676
|
-
/* @__PURE__ */ jsx(TimePartSelect, {
|
|
677
|
-
disabled,
|
|
678
|
-
label: fieldNames.minute,
|
|
679
|
-
onChange: (minute) => onChange({
|
|
680
|
-
hour: clock?.hour ?? 0,
|
|
681
|
-
minute
|
|
682
|
-
}),
|
|
683
|
-
options: minuteOptions,
|
|
684
|
-
value: clock?.minute ?? null
|
|
685
|
-
})
|
|
686
|
-
]
|
|
687
|
-
});
|
|
688
|
-
};
|
|
689
|
-
const TimePartSelect = ({ disabled, label, onChange, options, value }) => /* @__PURE__ */ jsxs(Select, {
|
|
690
|
-
disabled,
|
|
691
|
-
onValueChange: (next) => {
|
|
692
|
-
if (typeof next === "number") onChange(next);
|
|
693
|
-
},
|
|
694
|
-
value,
|
|
695
|
-
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
696
|
-
"aria-label": label,
|
|
697
|
-
className: "min-w-0 flex-1",
|
|
698
|
-
size: "sm",
|
|
699
|
-
children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "—" })
|
|
700
|
-
}), /* @__PURE__ */ jsx(SelectPopup, { children: options.map((option) => /* @__PURE__ */ jsx(SelectItem, {
|
|
701
|
-
value: option.value,
|
|
702
|
-
children: option.label
|
|
703
|
-
}, option.value)) })]
|
|
704
|
-
});
|
|
705
642
|
const MONTHS_PER_ROW = 3;
|
|
706
643
|
const MonthGrid = ({ locale, viewYear, currentMonth, currentYear, cellClassName, onSelect, today }) => {
|
|
707
644
|
const labels = useMemo(() => getMonthLabels(locale, "short"), [locale]);
|
|
@@ -836,5 +773,4 @@ const TypedDateField = ({ mode, label, value, invalid, errorLabel = "Choose a da
|
|
|
836
773
|
]
|
|
837
774
|
});
|
|
838
775
|
};
|
|
839
|
-
//#endregion
|
|
840
776
|
export { DatePickerPopover };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/components/date-picker-popover.logic.d.ts
|
|
2
1
|
export type CalendarMonth = {
|
|
3
2
|
month: number;
|
|
4
3
|
year: number;
|
|
@@ -52,5 +51,4 @@ export declare const getHourOptions: (locale: string) => PickerTimeOption[];
|
|
|
52
51
|
/** Two-digit minute choices in the locale's numbering system. */
|
|
53
52
|
export declare const getMinuteOptions: (locale: string) => PickerTimeOption[];
|
|
54
53
|
/** Accessible names of the hour and minute fields, from the locale itself. */
|
|
55
|
-
export declare const getTimeFieldNames: (locale: string) => Record<keyof PickerClock, string>;
|
|
56
|
-
//#endregion
|
|
54
|
+
export declare const getTimeFieldNames: (locale: string) => Record<keyof PickerClock, string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill/full";
|
|
2
|
-
|
|
2
|
+
// src/components/date-picker-popover.logic.ts
|
|
3
3
|
const DATE_ROLLOVER_EPSILON_MS = 50;
|
|
4
4
|
const padDatePart = (value) => value.toString().padStart(2, "0");
|
|
5
5
|
const localDateFromTimestamp = (timestamp) => {
|
|
@@ -96,5 +96,4 @@ const getTimeFieldNames = (locale) => {
|
|
|
96
96
|
minute: capitalize(locale, names.of("minute") ?? "minute")
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
|
-
//#endregion
|
|
100
99
|
export { DATE_PICKER_MODE, DEFAULT_PICKER_TIME, formatDateTimeValue, getHourOptions, getMinuteOptions, getTimeFieldNames, joinPickerTime, localDateFromTimestamp, millisecondsUntilNextLocalDate, parseDateTimeValue, resolveCalendarViewMonth, shiftCalendarDate, splitPickerTime };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DatePickerPopoverProps } from "./date-picker-popover.js";
|
|
2
|
-
//#region src/components/date-range-filter.d.ts
|
|
3
2
|
type DateRangeFilterProps = Omit<DatePickerPopoverProps, "value" | "onChange" | "minDate" | "open" | "defaultOpen" | "onOpenChange" | "triggerRef" | "focusTriggerOnOpen" | "id" | "labelledBy" | "mode"> & {
|
|
4
3
|
from: string | null;
|
|
5
4
|
to: string | null;
|
|
@@ -10,5 +9,4 @@ type DateRangeFilterProps = Omit<DatePickerPopoverProps, "value" | "onChange" |
|
|
|
10
9
|
};
|
|
11
10
|
/** Both calendar bounds and the focus handoff belong to the range. */
|
|
12
11
|
declare const DateRangeFilter: ({ from, to, onFromChange, onToChange, fromLabel, toLabel, className, maxDate, ...pickerProps }: DateRangeFilterProps) => import("react").JSX.Element;
|
|
13
|
-
//#endregion
|
|
14
12
|
export { DateRangeFilter, type DateRangeFilterProps };
|
|
@@ -3,7 +3,7 @@ import { cn } from "../lib/utils.js";
|
|
|
3
3
|
import { DatePickerPopover } from "./date-picker-popover.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { useId, useRef, useState } from "react";
|
|
6
|
-
|
|
6
|
+
// src/components/date-range-filter.tsx
|
|
7
7
|
/** Both calendar bounds and the focus handoff belong to the range. */
|
|
8
8
|
const DateRangeFilter = ({ from, to, onFromChange, onToChange, fromLabel, toLabel, className, maxDate, ...pickerProps }) => {
|
|
9
9
|
const id = useId();
|
|
@@ -70,5 +70,4 @@ const DateRangeFilter = ({ from, to, onFromChange, onToChange, fromLabel, toLabe
|
|
|
70
70
|
})]
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
|
-
//#endregion
|
|
74
73
|
export { DateRangeFilter };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
2
|
import { InputProps } from "./input.js";
|
|
3
|
-
//#region src/components/destructive-action-confirmation.d.ts
|
|
4
3
|
type DestructiveActionConfirmationProps = Omit<InputProps, "onChange" | "type" | "value"> & {
|
|
5
4
|
confirmation: string;
|
|
6
5
|
description?: React$1.ReactNode;
|
|
@@ -17,5 +16,4 @@ declare function useDestructiveActionConfirmation(confirmation: string): {
|
|
|
17
16
|
reset: () => void;
|
|
18
17
|
value: string;
|
|
19
18
|
};
|
|
20
|
-
//#endregion
|
|
21
19
|
export { DestructiveActionConfirmation, useDestructiveActionConfirmation };
|
|
@@ -4,7 +4,7 @@ import { Input } from "./input.js";
|
|
|
4
4
|
import { Field, FieldDescription, FieldLabel } from "./field.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import * as React$1 from "react";
|
|
7
|
-
|
|
7
|
+
// src/components/destructive-action-confirmation.tsx
|
|
8
8
|
const DestructiveActionConfirmation = ({ className, confirmation, description, fieldClassName, inputClassName, label, onValueChange, value, ...props }) => {
|
|
9
9
|
const confirmed = isDestructiveActionConfirmed({
|
|
10
10
|
confirmation,
|
|
@@ -56,5 +56,4 @@ function useDestructiveActionConfirmation(confirmation) {
|
|
|
56
56
|
function isDestructiveActionConfirmed({ confirmation, value }) {
|
|
57
57
|
return value === confirmation;
|
|
58
58
|
}
|
|
59
|
-
//#endregion
|
|
60
59
|
export { DestructiveActionConfirmation, useDestructiveActionConfirmation };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
//#region src/components/destructive-confirm-dialog.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* What a settled confirm asks of the dialog: `keep-open` when the action was
|
|
5
4
|
* refused and the dialog shows why, so the caller need not throw to keep it.
|
|
@@ -19,5 +18,4 @@ type DestructiveConfirmDialogProps = {
|
|
|
19
18
|
title: React$1.ReactNode;
|
|
20
19
|
};
|
|
21
20
|
declare const DestructiveConfirmDialog: ({ cancelLabel, confirmLabel, confirmation, description, inputLabel, loading, onConfirm, onOpenChange, open, title }: DestructiveConfirmDialogProps) => React$1.JSX.Element;
|
|
22
|
-
//#endregion
|
|
23
21
|
export { DestructiveConfirmDialog, type DestructiveConfirmDialogProps, type DestructiveConfirmOutcome };
|
|
@@ -3,7 +3,7 @@ import { AlertDialog, AlertDialogClose, AlertDialogContent as AlertDialogPopup,
|
|
|
3
3
|
import { Button } from "./button.js";
|
|
4
4
|
import { DestructiveActionConfirmation, useDestructiveActionConfirmation } from "./destructive-action-confirmation.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/components/destructive-confirm-dialog.tsx
|
|
7
7
|
const DestructiveConfirmDialog = ({ cancelLabel, confirmLabel, confirmation, description, inputLabel, loading = false, onConfirm, onOpenChange, open, title }) => {
|
|
8
8
|
const typedConfirmation = useDestructiveActionConfirmation(confirmation);
|
|
9
9
|
const handleOpenChange = (nextOpen) => {
|
|
@@ -44,5 +44,4 @@ const DestructiveConfirmDialog = ({ cancelLabel, confirmLabel, confirmation, des
|
|
|
44
44
|
] })
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
|
-
//#endregion
|
|
48
47
|
export { DestructiveConfirmDialog };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
//#region src/components/details-grid.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* - `sheet`: a fact sheet; small uppercase labels, up to three pairs per row
|
|
5
4
|
* as the container widens.
|
|
@@ -12,18 +11,27 @@ type DetailsVariant = "sheet" | "list";
|
|
|
12
11
|
* shares one column sized to the longest.
|
|
13
12
|
* - `vertical`: each label above its value, for values too long to share a
|
|
14
13
|
* row (a server address, a list of origins).
|
|
14
|
+
* - `auto`: vertical in a narrow container (a phone, a side panel under
|
|
15
|
+
* 24rem) and horizontal once there is room, measured on the grid's own
|
|
16
|
+
* container rather than the viewport.
|
|
15
17
|
*/
|
|
16
|
-
type DetailsOrientation = "horizontal" | "vertical";
|
|
18
|
+
type DetailsOrientation = "horizontal" | "vertical" | "auto";
|
|
19
|
+
/**
|
|
20
|
+
* How wide the label column of a horizontal grid is. `auto` sizes it to the
|
|
21
|
+
* longest label (the list default); `sm`, `md` (the sheet default, 7rem) and
|
|
22
|
+
* `lg` fix it, so several grids on one page line their values up.
|
|
23
|
+
*/
|
|
24
|
+
type DetailsLabelWidth = "auto" | "sm" | "md" | "lg";
|
|
17
25
|
type DetailsGridProps = React$1.ComponentProps<"dl"> & {
|
|
26
|
+
labelWidth?: DetailsLabelWidth;
|
|
18
27
|
orientation?: DetailsOrientation;
|
|
19
28
|
variant?: DetailsVariant;
|
|
20
29
|
};
|
|
21
|
-
declare const DetailsGrid: ({ className, orientation, variant, ...props }: DetailsGridProps) => React$1.JSX.Element;
|
|
30
|
+
declare const DetailsGrid: ({ className, labelWidth, orientation, variant, ...props }: DetailsGridProps) => React$1.JSX.Element;
|
|
22
31
|
type DetailsItemProps = React$1.ComponentProps<"div"> & {
|
|
23
32
|
label: React$1.ReactNode;
|
|
24
33
|
/** `wide` spans every pair column of a `sheet`. */
|
|
25
34
|
span?: "wide";
|
|
26
35
|
};
|
|
27
36
|
declare const DetailsItem: ({ label, children, span, className, ...props }: DetailsItemProps) => React$1.JSX.Element;
|
|
28
|
-
|
|
29
|
-
export { DetailsGrid, DetailsItem, type DetailsOrientation, type DetailsVariant };
|
|
37
|
+
export { DetailsGrid, DetailsItem, type DetailsLabelWidth, type DetailsOrientation, type DetailsVariant };
|
|
@@ -1,31 +1,65 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { rendersNothing } from "../lib/renders-nothing.js";
|
|
2
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
4
|
import { createContext, useContext } from "react";
|
|
4
|
-
|
|
5
|
+
// src/components/details-grid.tsx
|
|
5
6
|
const DetailsShapeContext = createContext({
|
|
7
|
+
labelWidth: "md",
|
|
6
8
|
orientation: "horizontal",
|
|
7
9
|
variant: "sheet"
|
|
8
10
|
});
|
|
9
11
|
const LIST_CLASS_NAME = {
|
|
10
|
-
|
|
12
|
+
auto: "flex min-w-0 flex-col gap-2 text-sm @min-[24rem]:grid @min-[24rem]:items-center @min-[24rem]:gap-x-4 @min-[24rem]:gap-y-1",
|
|
13
|
+
horizontal: "grid items-center gap-x-4 gap-y-1 text-sm",
|
|
11
14
|
vertical: "flex min-w-0 flex-col gap-2 text-sm"
|
|
12
15
|
};
|
|
16
|
+
/** The list's label and value tracks, per label width. */
|
|
17
|
+
const LIST_COLUMNS_CLASS_NAME = {
|
|
18
|
+
auto: "grid-cols-[auto_minmax(0,1fr)]",
|
|
19
|
+
lg: "grid-cols-[10rem_minmax(0,1fr)]",
|
|
20
|
+
md: "grid-cols-[7rem_minmax(0,1fr)]",
|
|
21
|
+
sm: "grid-cols-[5rem_minmax(0,1fr)]"
|
|
22
|
+
};
|
|
23
|
+
/** The same tracks, applied only once an `auto` list turns horizontal. */
|
|
24
|
+
const LIST_AUTO_COLUMNS_CLASS_NAME = {
|
|
25
|
+
auto: "@min-[24rem]:grid-cols-[auto_minmax(0,1fr)]",
|
|
26
|
+
lg: "@min-[24rem]:grid-cols-[10rem_minmax(0,1fr)]",
|
|
27
|
+
md: "@min-[24rem]:grid-cols-[7rem_minmax(0,1fr)]",
|
|
28
|
+
sm: "@min-[24rem]:grid-cols-[5rem_minmax(0,1fr)]"
|
|
29
|
+
};
|
|
30
|
+
/** A sheet pair's label and value tracks; `auto` keeps the 7rem default. */
|
|
31
|
+
const SHEET_ITEM_COLUMNS_CLASS_NAME = {
|
|
32
|
+
auto: "grid-cols-[minmax(0,7rem)_minmax(0,1fr)]",
|
|
33
|
+
lg: "grid-cols-[minmax(0,10rem)_minmax(0,1fr)]",
|
|
34
|
+
md: "grid-cols-[minmax(0,7rem)_minmax(0,1fr)]",
|
|
35
|
+
sm: "grid-cols-[minmax(0,5rem)_minmax(0,1fr)]"
|
|
36
|
+
};
|
|
37
|
+
const SHEET_AUTO_ITEM_COLUMNS_CLASS_NAME = {
|
|
38
|
+
auto: "@min-[20rem]:grid-cols-[minmax(0,7rem)_minmax(0,1fr)]",
|
|
39
|
+
lg: "@min-[20rem]:grid-cols-[minmax(0,10rem)_minmax(0,1fr)]",
|
|
40
|
+
md: "@min-[20rem]:grid-cols-[minmax(0,7rem)_minmax(0,1fr)]",
|
|
41
|
+
sm: "@min-[20rem]:grid-cols-[minmax(0,5rem)_minmax(0,1fr)]"
|
|
42
|
+
};
|
|
13
43
|
const ITEM_CLASS_NAME = {
|
|
14
44
|
list: {
|
|
45
|
+
auto: "flex min-w-0 flex-col gap-0.5 @min-[24rem]:col-span-full @min-[24rem]:grid @min-[24rem]:grid-cols-subgrid @min-[24rem]:items-center",
|
|
15
46
|
horizontal: "col-span-full grid grid-cols-subgrid items-center",
|
|
16
47
|
vertical: "flex min-w-0 flex-col gap-2"
|
|
17
48
|
},
|
|
18
49
|
sheet: {
|
|
19
|
-
|
|
50
|
+
auto: "flex min-w-0 flex-col gap-1 text-xs @min-[20rem]:grid @min-[20rem]:items-start @min-[20rem]:gap-x-4",
|
|
51
|
+
horizontal: "grid min-w-0 items-start gap-x-4 text-xs",
|
|
20
52
|
vertical: "flex min-w-0 flex-col gap-1 text-xs"
|
|
21
53
|
}
|
|
22
54
|
};
|
|
23
55
|
const LABEL_CLASS_NAME = {
|
|
24
56
|
list: {
|
|
57
|
+
auto: "text-muted-foreground min-w-0",
|
|
25
58
|
horizontal: "text-muted-foreground min-w-0",
|
|
26
59
|
vertical: "font-medium"
|
|
27
60
|
},
|
|
28
61
|
sheet: {
|
|
62
|
+
auto: "text-foreground-disabled min-w-0 font-medium tracking-wide wrap-anywhere uppercase",
|
|
29
63
|
horizontal: "text-foreground-disabled min-w-0 font-medium tracking-wide wrap-anywhere uppercase",
|
|
30
64
|
vertical: "text-foreground-disabled min-w-0 font-medium tracking-wide wrap-anywhere uppercase"
|
|
31
65
|
}
|
|
@@ -34,21 +68,29 @@ const VALUE_CLASS_NAME = {
|
|
|
34
68
|
list: "min-w-0 wrap-anywhere",
|
|
35
69
|
sheet: "text-foreground-strong-muted min-w-0 wrap-anywhere"
|
|
36
70
|
};
|
|
37
|
-
const DetailsGrid = ({ className, orientation = "horizontal", variant = "sheet", ...props }) => {
|
|
71
|
+
const DetailsGrid = ({ className, labelWidth, orientation = "horizontal", variant = "sheet", ...props }) => {
|
|
38
72
|
const shape = {
|
|
73
|
+
labelWidth: labelWidth ?? (variant === "list" ? "auto" : "md"),
|
|
39
74
|
orientation,
|
|
40
75
|
variant
|
|
41
76
|
};
|
|
42
|
-
if (variant === "list")
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
className: cn(LIST_CLASS_NAME[orientation], className),
|
|
77
|
+
if (variant === "list") {
|
|
78
|
+
const list = /* @__PURE__ */ jsx("dl", {
|
|
79
|
+
className: cn(LIST_CLASS_NAME[orientation], orientation === "horizontal" && LIST_COLUMNS_CLASS_NAME[shape.labelWidth], orientation === "auto" && LIST_AUTO_COLUMNS_CLASS_NAME[shape.labelWidth], className),
|
|
46
80
|
"data-orientation": orientation,
|
|
47
81
|
"data-slot": "details-grid",
|
|
48
82
|
"data-variant": variant,
|
|
49
83
|
...props
|
|
50
|
-
})
|
|
51
|
-
|
|
84
|
+
});
|
|
85
|
+
return /* @__PURE__ */ jsx(DetailsShapeContext.Provider, {
|
|
86
|
+
value: shape,
|
|
87
|
+
children: orientation === "auto" ? /* @__PURE__ */ jsx("div", {
|
|
88
|
+
className: "@container min-w-0",
|
|
89
|
+
"data-slot": "details-grid-container",
|
|
90
|
+
children: list
|
|
91
|
+
}) : list
|
|
92
|
+
});
|
|
93
|
+
}
|
|
52
94
|
return /* @__PURE__ */ jsx(DetailsShapeContext.Provider, {
|
|
53
95
|
value: shape,
|
|
54
96
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -63,9 +105,9 @@ const DetailsGrid = ({ className, orientation = "horizontal", variant = "sheet",
|
|
|
63
105
|
});
|
|
64
106
|
};
|
|
65
107
|
const DetailsItem = ({ label, children, span, className, ...props }) => {
|
|
66
|
-
const { orientation, variant } = useContext(DetailsShapeContext);
|
|
108
|
+
const { labelWidth, orientation, variant } = useContext(DetailsShapeContext);
|
|
67
109
|
return /* @__PURE__ */ jsxs("div", {
|
|
68
|
-
className: cn(ITEM_CLASS_NAME[variant][orientation], variant === "sheet" && span === "wide" && "col-span-full", className),
|
|
110
|
+
className: cn(ITEM_CLASS_NAME[variant][orientation], variant === "sheet" && orientation === "horizontal" && SHEET_ITEM_COLUMNS_CLASS_NAME[labelWidth], variant === "sheet" && orientation === "auto" && SHEET_AUTO_ITEM_COLUMNS_CLASS_NAME[labelWidth], variant === "sheet" && span === "wide" && "col-span-full", className),
|
|
69
111
|
"data-slot": "details-item",
|
|
70
112
|
...props,
|
|
71
113
|
children: [/* @__PURE__ */ jsx("dt", {
|
|
@@ -73,9 +115,22 @@ const DetailsItem = ({ label, children, span, className, ...props }) => {
|
|
|
73
115
|
children: label
|
|
74
116
|
}), /* @__PURE__ */ jsx("dd", {
|
|
75
117
|
className: VALUE_CLASS_NAME[variant],
|
|
76
|
-
children
|
|
118
|
+
children: isEmptyValue(children) ? /* @__PURE__ */ jsx("span", {
|
|
119
|
+
"aria-hidden": "true",
|
|
120
|
+
className: "text-foreground-disabled",
|
|
121
|
+
"data-slot": "details-empty",
|
|
122
|
+
children: "—"
|
|
123
|
+
}) : children
|
|
77
124
|
})]
|
|
78
125
|
});
|
|
79
126
|
};
|
|
80
|
-
|
|
127
|
+
/**
|
|
128
|
+
* No value to show: what React draws nothing for (see `rendersNothing`),
|
|
129
|
+
* only whitespace, or a list of only those.
|
|
130
|
+
*/
|
|
131
|
+
function isEmptyValue(value) {
|
|
132
|
+
if (typeof value === "string") return value.trim() === "";
|
|
133
|
+
if (Array.isArray(value)) return value.every((item) => isEmptyValue(item));
|
|
134
|
+
return rendersNothing(value);
|
|
135
|
+
}
|
|
81
136
|
export { DetailsGrid, DetailsItem };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/components/dialog-form-state.d.ts
|
|
2
1
|
export type DialogFormSource = {
|
|
3
2
|
dirty: boolean;
|
|
4
3
|
onDiscard?: (() => void) | undefined;
|
|
@@ -12,5 +11,4 @@ export declare const DialogFormContext: import("react").Context<DialogFormRegist
|
|
|
12
11
|
export declare const DialogFormState: ({ dirty, onDiscard }: {
|
|
13
12
|
dirty: boolean;
|
|
14
13
|
onDiscard?: (() => void) | undefined;
|
|
15
|
-
}) => null;
|
|
16
|
-
//#endregion
|
|
14
|
+
}) => null;
|