@stll/ui 0.65.1 → 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 +0 -2
- package/dist/components/accordion.js +1 -2
- 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 +0 -2
- package/dist/components/collapsible.js +1 -2
- 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
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
import { getHourOptions, getMinuteOptions, getTimeFieldNames, splitPickerTime } from "./date-picker-popover.logic.js";
|
|
4
|
+
import { Select, SelectContent as SelectPopup, SelectItem, SelectTrigger, SelectValue } from "./select.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { createContext, useContext, useId, useMemo } from "react";
|
|
7
|
+
// src/components/time-field.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Label, hour, colon, minute. The time tracks never shrink below their value,
|
|
10
|
+
* so a 12-hour `10 AM` is never clipped. Below 13rem, too narrow for the
|
|
11
|
+
* longest label beside its selects, each label takes its own line above them.
|
|
12
|
+
*/
|
|
13
|
+
const TIME_FIELD_GRID_CLASS_NAME = "grid items-center gap-x-1.5 gap-y-1.5 grid-cols-[auto_minmax(max-content,1fr)_auto_minmax(max-content,1fr)] @max-[13rem]/time-fields:grid-cols-[minmax(max-content,1fr)_auto_minmax(max-content,1fr)]";
|
|
14
|
+
/** Set inside a TimeFieldGroup, whose grid every field's row shares. */
|
|
15
|
+
const TimeFieldGroupContext = createContext(false);
|
|
16
|
+
/**
|
|
17
|
+
* Stacks time fields on one grid, so their labels, hours and minutes line up
|
|
18
|
+
* whatever each label's length. A lone TimeField makes its own group.
|
|
19
|
+
*/
|
|
20
|
+
const TimeFieldGroup = ({ children, className, ...props }) => /* @__PURE__ */ jsx(TimeFieldGroupContext.Provider, {
|
|
21
|
+
value: true,
|
|
22
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
23
|
+
className: cn("@container/time-fields min-w-0", className),
|
|
24
|
+
...props,
|
|
25
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
26
|
+
className: TIME_FIELD_GRID_CLASS_NAME,
|
|
27
|
+
children
|
|
28
|
+
})
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* A wall-clock time to the minute: hour and minute selects in the locale's
|
|
33
|
+
* own clock and numerals, so `2 PM` and `14` read as each locale writes them.
|
|
34
|
+
*/
|
|
35
|
+
const TimeField = ({ className, ...props }) => {
|
|
36
|
+
return useContext(TimeFieldGroupContext) ? /* @__PURE__ */ jsx(TimeFieldRow, {
|
|
37
|
+
className,
|
|
38
|
+
...props
|
|
39
|
+
}) : /* @__PURE__ */ jsx(TimeFieldGroup, {
|
|
40
|
+
className,
|
|
41
|
+
children: /* @__PURE__ */ jsx(TimeFieldRow, { ...props })
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
const TimeFieldRow = ({ className, describedBy, disabled, invalid = false, label, locale, onChange, time }) => {
|
|
45
|
+
const labelId = useId();
|
|
46
|
+
const hourOptions = useMemo(() => getHourOptions(locale), [locale]);
|
|
47
|
+
const minuteOptions = useMemo(() => getMinuteOptions(locale), [locale]);
|
|
48
|
+
const fieldNames = useMemo(() => getTimeFieldNames(locale), [locale]);
|
|
49
|
+
const clock = time === null ? null : splitPickerTime(time);
|
|
50
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
51
|
+
"aria-describedby": describedBy,
|
|
52
|
+
"aria-labelledby": labelId,
|
|
53
|
+
className: cn("col-span-full grid grid-cols-subgrid items-center", className),
|
|
54
|
+
role: "group",
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ jsx("span", {
|
|
57
|
+
className: "text-foreground-label text-xs @max-[13rem]/time-fields:col-span-full",
|
|
58
|
+
id: labelId,
|
|
59
|
+
children: label
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ jsx(TimePartSelect, {
|
|
62
|
+
disabled,
|
|
63
|
+
invalid,
|
|
64
|
+
label: fieldNames.hour,
|
|
65
|
+
onChange: (hour) => onChange({
|
|
66
|
+
hour,
|
|
67
|
+
minute: clock?.minute ?? 0
|
|
68
|
+
}),
|
|
69
|
+
options: hourOptions,
|
|
70
|
+
value: clock?.hour ?? null
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ jsx("span", {
|
|
73
|
+
"aria-hidden": "true",
|
|
74
|
+
className: "text-muted-foreground text-xs",
|
|
75
|
+
children: ":"
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ jsx(TimePartSelect, {
|
|
78
|
+
disabled,
|
|
79
|
+
invalid,
|
|
80
|
+
label: fieldNames.minute,
|
|
81
|
+
onChange: (minute) => onChange({
|
|
82
|
+
hour: clock?.hour ?? 0,
|
|
83
|
+
minute
|
|
84
|
+
}),
|
|
85
|
+
options: minuteOptions,
|
|
86
|
+
value: clock?.minute ?? null
|
|
87
|
+
})
|
|
88
|
+
]
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
const TimePartSelect = ({ disabled, invalid, label, onChange, options, value }) => /* @__PURE__ */ jsxs(Select, {
|
|
92
|
+
disabled,
|
|
93
|
+
onValueChange: (next) => {
|
|
94
|
+
if (typeof next === "number") onChange(next);
|
|
95
|
+
},
|
|
96
|
+
value,
|
|
97
|
+
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
98
|
+
"aria-invalid": invalid || void 0,
|
|
99
|
+
"aria-label": label,
|
|
100
|
+
className: "w-full min-w-0 tabular-nums",
|
|
101
|
+
size: "sm",
|
|
102
|
+
children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "—" })
|
|
103
|
+
}), /* @__PURE__ */ jsx(SelectPopup, { children: options.map((option) => /* @__PURE__ */ jsx(SelectItem, {
|
|
104
|
+
value: option.value,
|
|
105
|
+
children: option.label
|
|
106
|
+
}, option.value)) })]
|
|
107
|
+
});
|
|
108
|
+
export { TimeField, TimeFieldGroup };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
2
|
import { Toast, ToastManagerAddOptions, ToastObject } from "@base-ui/react/toast";
|
|
3
|
-
//#region src/components/toast.d.ts
|
|
4
3
|
type ToastData = {
|
|
5
4
|
tooltipStyle?: boolean;
|
|
6
5
|
timeoutPolicy?: {
|
|
@@ -92,5 +91,4 @@ declare function toastCountdownMs({ timeout, type }: {
|
|
|
92
91
|
declare function resolveToastUpdateTimeout(options: ToastUpdateOptions, previous: Pick<ToastObject<ToastData>, "actionProps" | "data" | "description" | "title" | "type">): {
|
|
93
92
|
timeout?: number;
|
|
94
93
|
};
|
|
95
|
-
//#endregion
|
|
96
94
|
export { AnchoredToastProvider, TOAST_RIGHT_OFFSET_VAR, type ToastPosition, ToastProvider, resolveToastUpdateTimeout, stellaToast, toastCountdownMs, toastDedupeId };
|
package/dist/components/toast.js
CHANGED
|
@@ -8,7 +8,7 @@ import { ScrollArea } from "./scroll-area.js";
|
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import * as React$1 from "react";
|
|
10
10
|
import { Toast } from "@base-ui/react/toast";
|
|
11
|
-
|
|
11
|
+
// src/components/toast.tsx
|
|
12
12
|
const toastManager = Toast.createToastManager();
|
|
13
13
|
const anchoredToastManager = Toast.createToastManager();
|
|
14
14
|
const TOAST_RIGHT_OFFSET_VAR = "--stella-toast-right-offset";
|
|
@@ -374,5 +374,4 @@ function getToastIcon(type) {
|
|
|
374
374
|
function isToastType(type) {
|
|
375
375
|
return typeof type === "string" && type in TOAST_ICONS;
|
|
376
376
|
}
|
|
377
|
-
//#endregion
|
|
378
377
|
export { AnchoredToastProvider, TOAST_RIGHT_OFFSET_VAR, ToastProvider, resolveToastUpdateTimeout, stellaToast, toastCountdownMs, toastDedupeId };
|
|
@@ -3,7 +3,6 @@ import * as React$1 from "react";
|
|
|
3
3
|
import { ButtonSize } from "./button.shared.js";
|
|
4
4
|
import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
|
|
5
5
|
import { ToggleProps } from "./toggle.js";
|
|
6
|
-
//#region src/components/toggle-group.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* A segmented control: a row of toggles in one tray, of which one (or, with
|
|
9
8
|
* `multiple`, several) is on. Use it for view modes, density, and filter
|
|
@@ -28,5 +27,4 @@ type ToggleGroupProps<Value extends string> = ToggleGroup$1.Props<Value> & {
|
|
|
28
27
|
size?: ButtonSize | undefined;
|
|
29
28
|
children?: React$1.ReactNode;
|
|
30
29
|
};
|
|
31
|
-
//#endregion
|
|
32
30
|
export { ToggleGroup, ToggleGroupItem, type ToggleGroupProps };
|
|
@@ -4,7 +4,7 @@ import { Toggle } from "./toggle.js";
|
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { createContext, useContext } from "react";
|
|
6
6
|
import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
|
|
7
|
-
|
|
7
|
+
// src/components/toggle-group.tsx
|
|
8
8
|
const ToggleGroupSizeContext = createContext("xs");
|
|
9
9
|
/**
|
|
10
10
|
* A segmented control: a row of toggles in one tray, of which one (or, with
|
|
@@ -41,5 +41,4 @@ const ToggleGroupItem = ({ className, size, variant = "muted", ...props }) => {
|
|
|
41
41
|
...props
|
|
42
42
|
});
|
|
43
43
|
};
|
|
44
|
-
//#endregion
|
|
45
44
|
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -2,7 +2,6 @@ import "./button.js";
|
|
|
2
2
|
import * as React$1 from "react";
|
|
3
3
|
import { ButtonSize } from "./button.shared.js";
|
|
4
4
|
import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
|
|
5
|
-
//#region src/components/toggle.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* A button that stays pressed: a formatting mark, "show resolved", a pinned
|
|
8
7
|
* view. It is a `Button` underneath, so it shares the button's sizes, focus
|
|
@@ -22,5 +21,4 @@ type ToggleProps<Value extends string> = Toggle$1.Props<Value> & {
|
|
|
22
21
|
tooltip?: React$1.ReactNode;
|
|
23
22
|
variant?: ToggleVariant | undefined;
|
|
24
23
|
};
|
|
25
|
-
//#endregion
|
|
26
24
|
export { Toggle, type ToggleProps, type ToggleVariant };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Button } from "./button.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
|
|
5
|
-
|
|
5
|
+
// src/components/toggle.tsx
|
|
6
6
|
/**
|
|
7
7
|
* A button that stays pressed: a formatting mark, "show resolved", a pinned
|
|
8
8
|
* view. It is a `Button` underneath, so it shares the button's sizes, focus
|
|
@@ -22,5 +22,4 @@ const Toggle = ({ size = "sm", tooltip, variant = "muted", ...props }) => /* @__
|
|
|
22
22
|
}),
|
|
23
23
|
...props
|
|
24
24
|
});
|
|
25
|
-
//#endregion
|
|
26
25
|
export { Toggle };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Button } from "./button.js";
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
|
-
//#region src/components/toolbar-icon-action.d.ts
|
|
4
3
|
type ToolbarIconActionProps = Omit<ComponentProps<typeof Button>, "aria-label" | "children" | "size" | "title" | "tooltip" | "variant"> & {
|
|
5
4
|
/** Names the action for the tooltip and for assistive technology. */
|
|
6
5
|
label: string;
|
|
@@ -14,5 +13,4 @@ type ToolbarIconActionProps = Omit<ComponentProps<typeof Button>, "aria-label" |
|
|
|
14
13
|
* and the accessible name, and the row stays the same shape everywhere.
|
|
15
14
|
*/
|
|
16
15
|
export declare const ToolbarIconAction: ({ density, icon, label, ...props }: ToolbarIconActionProps) => import("react").JSX.Element;
|
|
17
|
-
//#endregion
|
|
18
16
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button } from "./button.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/components/toolbar-icon-action.tsx
|
|
4
4
|
const SIZE_BY_DENSITY = {
|
|
5
5
|
header: "icon-sm",
|
|
6
6
|
toolbar: "icon-xs"
|
|
@@ -19,5 +19,4 @@ const ToolbarIconAction = ({ density, icon, label, ...props }) => /* @__PURE__ *
|
|
|
19
19
|
variant: "ghost",
|
|
20
20
|
children: icon
|
|
21
21
|
});
|
|
22
|
-
//#endregion
|
|
23
22
|
export { ToolbarIconAction };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
//#region src/components/tooltip-trigger-helper.d.ts
|
|
3
2
|
type TooltipTriggerOptions = {
|
|
4
3
|
trigger: React$1.ReactElement;
|
|
5
4
|
tooltip: React$1.ReactNode;
|
|
@@ -10,5 +9,4 @@ type TooltipTriggerOptions = {
|
|
|
10
9
|
* `aria-label` to that Button, whose size decides (see `BUTTON_SIZE_CONTENT`).
|
|
11
10
|
*/
|
|
12
11
|
declare const renderTooltipTrigger: ({ trigger, tooltip }: TooltipTriggerOptions) => React$1.JSX.Element;
|
|
13
|
-
//#endregion
|
|
14
12
|
export { renderTooltipTrigger };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { hasTooltipContent } from "../lib/tooltip-content.js";
|
|
3
3
|
import { Tooltip, TooltipContent as TooltipPopup, TooltipTrigger } from "./tooltip.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/components/tooltip-trigger-helper.tsx
|
|
6
6
|
/**
|
|
7
7
|
* Overlay triggers pass only an explicit `tooltip`. They cannot tell whether
|
|
8
8
|
* their content is a label or a glyph; a trigger rendered as `Button` hands its
|
|
@@ -12,5 +12,4 @@ const renderTooltipTrigger = ({ trigger, tooltip }) => {
|
|
|
12
12
|
if (!hasTooltipContent(tooltip)) return trigger;
|
|
13
13
|
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: trigger }), /* @__PURE__ */ jsx(TooltipPopup, { children: tooltip })] });
|
|
14
14
|
};
|
|
15
|
-
//#endregion
|
|
16
15
|
export { renderTooltipTrigger };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { KbdKeys } from "./kbd.js";
|
|
1
2
|
import { ReactNode } from "react";
|
|
2
3
|
import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
|
|
3
|
-
//#region src/components/tooltip.d.ts
|
|
4
4
|
declare const TooltipCreateHandle: typeof Tooltip$1.createHandle;
|
|
5
5
|
/**
|
|
6
6
|
* How long the pointer rests on a trigger before its tooltip opens. Base UI
|
|
@@ -27,10 +27,14 @@ declare const TooltipTrigger: (props: Tooltip$1.Trigger.Props) => import("react"
|
|
|
27
27
|
declare const TooltipFactTrigger: ({ children }: {
|
|
28
28
|
children: ReactNode;
|
|
29
29
|
}) => import("react").JSX.Element;
|
|
30
|
-
declare const TooltipPopup: ({ className, align, sideOffset, side, children, ...props }: Tooltip$1.Popup.Props & {
|
|
30
|
+
declare const TooltipPopup: ({ className, align, sideOffset, side, children, shortcut, ...props }: Tooltip$1.Popup.Props & {
|
|
31
|
+
/**
|
|
32
|
+
* The keys that do the same as the trigger, shown after the label and
|
|
33
|
+
* spelled for the reader's platform (`["mod", "K"]`).
|
|
34
|
+
*/
|
|
35
|
+
shortcut?: KbdKeys | undefined;
|
|
31
36
|
align?: Tooltip$1.Positioner.Props["align"];
|
|
32
37
|
side?: Tooltip$1.Positioner.Props["side"];
|
|
33
38
|
sideOffset?: Tooltip$1.Positioner.Props["sideOffset"];
|
|
34
39
|
}) => import("react").JSX.Element;
|
|
35
|
-
//#endregion
|
|
36
40
|
export { TOOLTIP_OPEN_DELAY_MS, Tooltip, TooltipPopup as TooltipContent, TooltipPopup, TooltipCreateHandle, TooltipFactTrigger, TooltipProvider, TooltipTrigger };
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
3
|
import { OVERLAY_LAYER_CLASS_NAMES } from "../lib/overlay-layer.js";
|
|
4
4
|
import { CONTENT_SIZED_POSITIONER_CLASS_NAME, IN_FLOW_POPUP_CLASS_NAME } from "../lib/positioner-sizing.js";
|
|
5
|
-
import {
|
|
5
|
+
import { Kbd } from "./kbd.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
|
|
7
|
-
|
|
8
|
+
// src/components/tooltip.tsx
|
|
8
9
|
const TooltipCreateHandle = Tooltip$1.createHandle;
|
|
9
10
|
/**
|
|
10
11
|
* How long the pointer rests on a trigger before its tooltip opens. Base UI
|
|
@@ -40,7 +41,7 @@ const TooltipFactTrigger = ({ children }) => /* @__PURE__ */ jsx(Tooltip$1.Trigg
|
|
|
40
41
|
type: "button",
|
|
41
42
|
children
|
|
42
43
|
});
|
|
43
|
-
const TooltipPopup = ({ className, align = "center", sideOffset = 4, side = "top", children, ...props }) => /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
|
|
44
|
+
const TooltipPopup = ({ className, align = "center", sideOffset = 4, side = "top", children, shortcut, ...props }) => /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
|
|
44
45
|
align,
|
|
45
46
|
className: cn(CONTENT_SIZED_POSITIONER_CLASS_NAME, "transition-[top,left,right,bottom,transform] data-instant:transition-none", OVERLAY_LAYER_CLASS_NAMES.popup),
|
|
46
47
|
collisionPadding: 8,
|
|
@@ -54,9 +55,12 @@ const TooltipPopup = ({ className, align = "center", sideOffset = 4, side = "top
|
|
|
54
55
|
children: /* @__PURE__ */ jsx(Tooltip$1.Viewport, {
|
|
55
56
|
className: "relative size-full overflow-clip px-(--viewport-inline-padding) py-1 [--viewport-inline-padding:--spacing(2)] **:data-current:w-[calc(var(--popup-width)-2*var(--viewport-inline-padding)-2px)] **:data-current:opacity-100 **:data-current:transition-opacity **:data-current:data-ending-style:opacity-0 data-instant:transition-none **:data-previous:w-[calc(var(--popup-width)-2*var(--viewport-inline-padding)-2px)] **:data-previous:truncate **:data-previous:opacity-100 **:data-previous:transition-opacity **:data-previous:data-ending-style:opacity-0 **:data-current:data-starting-style:opacity-0 **:data-previous:data-starting-style:opacity-0",
|
|
56
57
|
"data-slot": "tooltip-viewport",
|
|
57
|
-
children
|
|
58
|
+
children: shortcut === void 0 ? children : /* @__PURE__ */ jsxs("span", {
|
|
59
|
+
className: "flex flex-wrap items-center gap-x-2 gap-y-1",
|
|
60
|
+
"data-slot": "tooltip-shortcut-row",
|
|
61
|
+
children: [children, /* @__PURE__ */ jsx(Kbd, { keys: shortcut })]
|
|
62
|
+
})
|
|
58
63
|
})
|
|
59
64
|
})
|
|
60
65
|
}) });
|
|
61
|
-
//#endregion
|
|
62
66
|
export { TOOLTIP_OPEN_DELAY_MS, Tooltip, TooltipPopup as TooltipContent, TooltipPopup, TooltipCreateHandle, TooltipFactTrigger, TooltipProvider, TooltipTrigger };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
2
|
import { TooltipContent as TooltipPopup } from "./tooltip.js";
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
-
//#region src/components/truncated-text.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Text that ends in an ellipsis when it does not fit, and shows the whole of
|
|
7
6
|
* it only when it was actually cut: on hover or focus with a tooltip, and on
|
|
@@ -29,5 +28,4 @@ type TruncatedTextProps = useRender.ComponentProps<"span"> & {
|
|
|
29
28
|
};
|
|
30
29
|
/** Whether the element's text is cut by its box, in either direction. */
|
|
31
30
|
declare function isTextOverflowing(element: Pick<HTMLElement, "clientHeight" | "clientWidth" | "scrollHeight" | "scrollWidth"> | null): boolean;
|
|
32
|
-
//#endregion
|
|
33
31
|
export { TruncatedText, type TruncatedTextLines, type TruncatedTextProps, isTextOverflowing };
|
|
@@ -7,7 +7,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
import * as React$1 from "react";
|
|
8
8
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
9
9
|
import { useRender } from "@base-ui/react/use-render";
|
|
10
|
-
|
|
10
|
+
// src/components/truncated-text.tsx
|
|
11
11
|
/**
|
|
12
12
|
* Text that ends in an ellipsis when it does not fit, and shows the whole of
|
|
13
13
|
* it only when it was actually cut: on hover or focus with a tooltip, and on
|
|
@@ -107,5 +107,4 @@ const CONTROL_SELECTOR = "a[href], button, label, summary, [role=button], [role=
|
|
|
107
107
|
function isInsideControl(element) {
|
|
108
108
|
return element.closest(CONTROL_SELECTOR) !== null;
|
|
109
109
|
}
|
|
110
|
-
//#endregion
|
|
111
110
|
export { TruncatedText, isTextOverflowing };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Button } from "./button.js";
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
|
-
//#region src/components/view-toolbar.d.ts
|
|
4
3
|
/** Shared view controls stay compact and scroll horizontally on small screens. */
|
|
5
4
|
export declare const ViewToolbarChrome: ({ className, ...props }: ComponentProps<"div">) => import("react").JSX.Element;
|
|
6
5
|
type ViewFilterButtonProps = Omit<ComponentProps<typeof Button>, "children" | "size" | "variant" | "aria-label" | "title"> & {
|
|
@@ -8,5 +7,4 @@ type ViewFilterButtonProps = Omit<ComponentProps<typeof Button>, "children" | "s
|
|
|
8
7
|
};
|
|
9
8
|
export declare const ViewFilterButton: ({ label, ...props }: ViewFilterButtonProps) => import("react").JSX.Element;
|
|
10
9
|
export declare const ViewFilterChip: ({ className, ...props }: Omit<ComponentProps<typeof Button>, "size" | "variant">) => import("react").JSX.Element;
|
|
11
|
-
//#endregion
|
|
12
10
|
export {};
|
|
@@ -2,7 +2,7 @@ import { FilterIcon } from "../icons.js";
|
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
3
|
import { Button } from "./button.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/components/view-toolbar.tsx
|
|
6
6
|
/** Shared view controls stay compact and scroll horizontally on small screens. */
|
|
7
7
|
const ViewToolbarChrome = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
8
8
|
className: cn("flex min-w-0 shrink-0 [scrollbar-width:none] flex-nowrap items-center gap-1 overflow-x-auto px-2 py-1 [-ms-overflow-style:none] md:flex-wrap md:overflow-visible [&::-webkit-scrollbar]:hidden", className),
|
|
@@ -22,5 +22,4 @@ const ViewFilterChip = ({ className, ...props }) => /* @__PURE__ */ jsx(Button,
|
|
|
22
22
|
size: "xs",
|
|
23
23
|
variant: "secondary"
|
|
24
24
|
});
|
|
25
|
-
//#endregion
|
|
26
25
|
export { ViewFilterButton, ViewFilterChip, ViewToolbarChrome };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from "react";
|
|
2
|
-
//#region src/components/workspace-shell.d.ts
|
|
3
2
|
type WorkspaceCompactNavigation = {
|
|
4
3
|
/** Navigation content rendered inside Stella's compact sheet. */
|
|
5
4
|
content: ReactElement;
|
|
@@ -80,5 +79,4 @@ type WorkspaceEndRailProps = {
|
|
|
80
79
|
* only the actions and route state.
|
|
81
80
|
*/
|
|
82
81
|
export declare const WorkspaceEndRail: ({ chatAction, children, className, label, overlay, topAction }: WorkspaceEndRailProps) => import("react").JSX.Element;
|
|
83
|
-
//#endregion
|
|
84
82
|
export type { WorkspaceCompactNavigation, WorkspaceEndRailChatAction, WorkspaceEndRailProps, WorkspaceNavigation, WorkspaceShellProps, WorkspaceTopBarContext };
|
|
@@ -8,7 +8,7 @@ import { InspectorRail, InspectorRailCell, InspectorRailContent, InspectorRailFo
|
|
|
8
8
|
import { Sheet, SheetContent as SheetPopup, SheetTitle, SheetTrigger } from "./sheet.js";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { useEffect } from "react";
|
|
11
|
-
|
|
11
|
+
// src/components/workspace-shell.tsx
|
|
12
12
|
/**
|
|
13
13
|
* Stella's complete authenticated workspace frame. It owns the dynamic
|
|
14
14
|
* viewport, sibling rail geometry, sticky top chrome, and sole content
|
|
@@ -107,5 +107,4 @@ const WorkspaceEndRail = ({ chatAction, children, className, label, overlay, top
|
|
|
107
107
|
}) })
|
|
108
108
|
]
|
|
109
109
|
});
|
|
110
|
-
//#endregion
|
|
111
110
|
export { WorkspaceEndRail, WorkspaceShell };
|
package/dist/css.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/data-table/schema.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* A table's schema: which columns exist, what each can do, and how wide it
|
|
4
3
|
* starts. Not how a cell draws — that is the caller's, and it is the reason
|
|
@@ -65,5 +64,4 @@ export declare const tableColumnSizing: <TRender>(schema: TableSchema<TRender>)
|
|
|
65
64
|
* second declaration wins and the first disappears with no error anywhere.
|
|
66
65
|
* Callers that build a schema from user data (a property list) check here.
|
|
67
66
|
*/
|
|
68
|
-
export declare const duplicateColumnIds: <TRender>(schema: TableSchema<TRender>) => string[];
|
|
69
|
-
//#endregion
|
|
67
|
+
export declare const duplicateColumnIds: <TRender>(schema: TableSchema<TRender>) => string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/data-table/schema.ts
|
|
2
2
|
/** Every column a schema declares, in order. */
|
|
3
3
|
const tableColumnIds = (schema) => schema.columns.map((column) => column.id);
|
|
4
4
|
const withCapability = (schema, capability) => schema.columns.filter((column) => column.capabilities[capability]).map((column) => column.id);
|
|
@@ -36,5 +36,4 @@ const duplicateColumnIds = (schema) => {
|
|
|
36
36
|
}
|
|
37
37
|
return [...duplicates];
|
|
38
38
|
};
|
|
39
|
-
//#endregion
|
|
40
39
|
export { duplicateColumnIds, findTableColumn, hideableColumnIds, sortableColumnIds, tableColumnIds, tableColumnSizing, visibleColumnIds };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from "react";
|
|
2
|
-
//#region src/data-table/table.d.ts
|
|
3
2
|
export declare const DataTable: <TItem>({ columns, emptyLabel, getRowProps, isLoading, loadingLabel, loadingRowCount, rowAction, rowKey, rows }: DataTableProps<TItem>) => import("react").JSX.Element;
|
|
4
3
|
type RowProps = Omit<HTMLAttributes<HTMLTableRowElement>, "children">;
|
|
5
4
|
export declare const DATA_TABLE_INTERACTIVE_DESCENDANT_SELECTORS: readonly ["a[href]", "audio[controls]", "button", "input", "select", "textarea", "video[controls]", "summary", "label", "[contenteditable]:not([contenteditable='false'])", "[role='button']", "[role='checkbox']", "[role='combobox']", "[role='link']", "[role='listbox']", "[role='menuitem']", "[role='menuitemcheckbox']", "[role='menuitemradio']", "[role='option']", "[role='radio']", "[role='searchbox']", "[role='slider']", "[role='spinbutton']", "[role='switch']", "[role='tab']", "[role='textbox']", "[role='treeitem']", "[tabindex]:not([tabindex='-1'])", "[data-data-table-stop-row-action]"];
|
|
@@ -29,5 +28,4 @@ export type DataTableProps<TItem> = {
|
|
|
29
28
|
rows: readonly TItem[];
|
|
30
29
|
};
|
|
31
30
|
export declare const isDataTableRowActionTarget: (row: EventTarget, target: EventTarget | null) => boolean;
|
|
32
|
-
//#endregion
|
|
33
31
|
export {};
|
package/dist/data-table/table.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Button } from "../components/button.js";
|
|
|
3
3
|
import { Skeleton } from "../components/skeleton.js";
|
|
4
4
|
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../components/table.js";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/data-table/table.tsx
|
|
7
7
|
const DataTable = ({ columns, emptyLabel, getRowProps, isLoading = false, loadingLabel, loadingRowCount = DEFAULT_LOADING_ROW_COUNT, rowAction, rowKey, rows }) => {
|
|
8
8
|
let content;
|
|
9
9
|
if (isLoading) content = /* @__PURE__ */ jsx(LoadingRows, {
|
|
@@ -124,5 +124,4 @@ const mergeHandlers = (first, second) => {
|
|
|
124
124
|
second(event);
|
|
125
125
|
};
|
|
126
126
|
};
|
|
127
|
-
//#endregion
|
|
128
127
|
export { DATA_TABLE_INTERACTIVE_DESCENDANT_SELECTORS, DataTable, isDataTableRowActionTarget };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
//#region src/hooks/use-contained-handler.d.ts
|
|
3
2
|
type ContainmentRoot = {
|
|
4
3
|
contains: (target: Node) => boolean;
|
|
5
4
|
};
|
|
@@ -51,5 +50,4 @@ export declare const containedEventHandler: <E extends {
|
|
|
51
50
|
currentTarget: unknown;
|
|
52
51
|
target: unknown;
|
|
53
52
|
}>(handler: (event: E) => void) => (event: E) => void;
|
|
54
|
-
//#endregion
|
|
55
53
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/use-contained-handler.ts
|
|
2
2
|
/**
|
|
3
3
|
* Wrap a React event handler so it only fires when the event target
|
|
4
4
|
* is a DOM descendant of the given ref.
|
|
@@ -50,5 +50,4 @@ const containedEventHandler = (handler) => (event) => {
|
|
|
50
50
|
if (event.currentTarget instanceof Node && event.target instanceof Node && !event.currentTarget.contains(event.target)) return;
|
|
51
51
|
handler(event);
|
|
52
52
|
};
|
|
53
|
-
//#endregion
|
|
54
53
|
export { containedEventHandler, containedHandler };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/hooks/use-content-dir.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Resolve the `dir` for a free-text field so the caret and alignment follow
|
|
4
3
|
* the ambient UI direction while the field is empty, then switch to the typed
|
|
@@ -44,5 +43,4 @@ export declare const isStructuredInputType: (type: string | undefined) => boolea
|
|
|
44
43
|
*/
|
|
45
44
|
export declare const contentDir: (value: FieldValue) => "auto" | undefined;
|
|
46
45
|
export declare const useContentDir: ({ dir, value, defaultValue }: UseContentDirArgs) => UseContentDirResult;
|
|
47
|
-
//#endregion
|
|
48
46
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
|
-
|
|
2
|
+
// src/hooks/use-content-dir.ts
|
|
3
3
|
const STRUCTURED_INPUT_TYPES = /* @__PURE__ */ new Set([
|
|
4
4
|
"email",
|
|
5
5
|
"url",
|
|
@@ -41,5 +41,4 @@ const useContentDir = ({ dir, value, defaultValue }) => {
|
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
|
-
//#endregion
|
|
45
44
|
export { contentDir, isStructuredInputType, useContentDir };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { RefObject } from "react";
|
|
2
|
-
//#region src/hooks/use-latest.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* A ref that always holds the latest committed value, readable from
|
|
5
4
|
* event handlers, imperative bridges, and async paths without making
|
|
@@ -17,5 +16,4 @@ import { RefObject } from "react";
|
|
|
17
16
|
* the component body), which the React Compiler cannot model and
|
|
18
17
|
* `no-ref-mirror` bans.
|
|
19
18
|
*/
|
|
20
|
-
export declare const useLatest: <T>(value: T) => RefObject<T>;
|
|
21
|
-
//#endregion
|
|
19
|
+
export declare const useLatest: <T>(value: T) => RefObject<T>;
|
package/dist/hooks/use-latest.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useLayoutEffect, useRef } from "react";
|
|
2
|
-
|
|
2
|
+
// src/hooks/use-latest.ts
|
|
3
3
|
/**
|
|
4
4
|
* A ref that always holds the latest committed value, readable from
|
|
5
5
|
* event handlers, imperative bridges, and async paths without making
|
|
@@ -24,5 +24,4 @@ const useLatest = (value) => {
|
|
|
24
24
|
});
|
|
25
25
|
return ref;
|
|
26
26
|
};
|
|
27
|
-
//#endregion
|
|
28
27
|
export { useLatest };
|
package/dist/hooks/use-mobile.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
|
|
2
|
+
// src/hooks/use-mobile.ts
|
|
3
3
|
/** The `md:` variant's own condition, as a media query. */
|
|
4
4
|
const MD_MEDIA_QUERY = `(min-width: 48rem)`;
|
|
5
5
|
const subscribe = (onChange) => {
|
|
@@ -13,5 +13,4 @@ const getServerSnapshot = () => false;
|
|
|
13
13
|
function useIsMobile() {
|
|
14
14
|
return React$1.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
15
15
|
}
|
|
16
|
-
//#endregion
|
|
17
16
|
export { useIsMobile };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the person asked the system for reduced motion. For behaviour that
|
|
3
|
+
* changes with the preference (a different control, not only a different
|
|
4
|
+
* animation); a CSS-only difference belongs in the `motion-reduce:` variant.
|
|
5
|
+
*/
|
|
6
|
+
export declare const usePrefersReducedMotion: () => boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useSyncExternalStore } from "react";
|
|
2
|
+
// src/hooks/use-prefers-reduced-motion.ts
|
|
3
|
+
const REDUCED_MOTION_QUERY = "(prefers-reduced-motion: reduce)";
|
|
4
|
+
const subscribe = (onChange) => {
|
|
5
|
+
const mediaQueryList = window.matchMedia(REDUCED_MOTION_QUERY);
|
|
6
|
+
mediaQueryList.addEventListener("change", onChange);
|
|
7
|
+
return () => mediaQueryList.removeEventListener("change", onChange);
|
|
8
|
+
};
|
|
9
|
+
const getSnapshot = () => window.matchMedia(REDUCED_MOTION_QUERY).matches;
|
|
10
|
+
const getServerSnapshot = () => false;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the person asked the system for reduced motion. For behaviour that
|
|
13
|
+
* changes with the preference (a different control, not only a different
|
|
14
|
+
* animation); a CSS-only difference belongs in the `motion-reduce:` variant.
|
|
15
|
+
*/
|
|
16
|
+
const usePrefersReducedMotion = () => useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
17
|
+
export { usePrefersReducedMotion };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
|
|
2
|
+
// src/hooks/use-viewport-width.ts
|
|
3
3
|
const subscribe = (onChange) => {
|
|
4
4
|
window.addEventListener("resize", onChange);
|
|
5
5
|
return () => window.removeEventListener("resize", onChange);
|
|
@@ -10,5 +10,4 @@ const getServerSnapshot = () => 0;
|
|
|
10
10
|
function useViewportWidth() {
|
|
11
11
|
return React$1.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
12
12
|
}
|
|
13
|
-
//#endregion
|
|
14
13
|
export { useViewportWidth };
|