@stll/ui 0.65.1 → 0.67.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 +8 -11
- 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 +2 -3
- 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 +2 -3
- 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 +37 -15
- 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 +3 -4
- 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 +8 -10
- package/dist/components/combobox.d.ts +0 -2
- package/dist/components/combobox.js +5 -6
- package/dist/components/command.d.ts +0 -2
- package/dist/components/command.js +4 -5
- 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 +2 -3
- package/dist/components/context-menu.d.ts +9 -2
- package/dist/components/context-menu.js +10 -4
- 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 +3 -4
- package/dist/components/date-picker-popover.d.ts +0 -2
- package/dist/components/date-picker-popover.js +6 -70
- 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 +2 -3
- 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 +4 -5
- 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 +2 -3
- 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/entity-actions.d.ts +34 -0
- package/dist/components/entity-actions.js +132 -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 +2 -3
- 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 +2 -3
- package/dist/components/horizontal-scroller.d.ts +0 -2
- package/dist/components/horizontal-scroller.js +3 -4
- package/dist/components/identity-text.d.ts +0 -2
- package/dist/components/identity-text.js +2 -3
- 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 +2 -3
- 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 +4 -5
- 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 +3 -4
- 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 +2 -3
- 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 +29 -9
- 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 +2 -3
- package/dist/components/outline-rail.d.ts +12 -3
- package/dist/components/outline-rail.js +64 -12
- 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 +2 -3
- 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 +2 -3
- package/dist/components/select.d.ts +0 -2
- package/dist/components/select.js +4 -5
- 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 +3 -4
- package/dist/components/sheet.native.d.ts +1 -3
- package/dist/components/sheet.native.js +2 -3
- package/dist/components/sheet.shared.d.ts +1 -3
- package/dist/components/sidebar.d.ts +0 -2
- package/dist/components/sidebar.js +5 -6
- 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 +2 -3
- 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 +2 -3
- 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 +53 -15
- 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 +4 -5
- 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 +10 -6
- package/dist/components/truncated-text.d.ts +0 -2
- package/dist/components/truncated-text.js +3 -4
- 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 +4 -5
- 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 +2 -3
- 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 +35 -34
- package/dist/inspector/chrome.d.ts +1 -3
- package/dist/inspector/chrome.js +2 -3
- package/dist/inspector/dock.d.ts +0 -2
- package/dist/inspector/dock.js +2 -3
- package/dist/inspector/entity-tab.d.ts +0 -2
- package/dist/inspector/entity-tab.js +3 -4
- 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 +5 -6
- package/dist/inspector/facet-bar.logic.d.ts +1 -3
- package/dist/inspector/facet-bar.logic.js +1 -2
- package/dist/inspector/index.js +2 -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 +2 -3
- package/dist/kanban/cell-action.d.ts +1 -3
- package/dist/kanban/cell-action.js +2 -3
- package/dist/kanban/column-band-header.d.ts +1 -3
- package/dist/kanban/column-band-header.js +2 -3
- 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/index.js +5 -5
- 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 +3 -4
- 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 +5 -6
- 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 +3 -4
- 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/native-context-menu.d.ts +24 -0
- package/dist/lib/native-context-menu.js +85 -0
- 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 +2 -3
- package/dist/review/review-comment-card.d.ts +0 -2
- package/dist/review/review-comment-card.js +3 -4
- package/dist/review/review-decision-actions.d.ts +0 -2
- package/dist/review/review-decision-actions.js +2 -3
- 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 +2 -3
- 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 +50 -23
- package/dist/testing/browser-clock.d.ts +1 -3
- package/dist/testing/browser-clock.js +1 -2
- package/package.json +50 -10
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactNode, RefObject } from "react";
|
|
2
|
-
//#region src/components/outline-rail.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* How prominently an entry reads next to the entries around it. A caller
|
|
5
4
|
* that ranks its entries (a list of search results) steps the near-misses
|
|
@@ -26,6 +25,17 @@ export type OutlineItem = {
|
|
|
26
25
|
color?: string;
|
|
27
26
|
/** How prominently the row reads. Defaults to `primary`. */
|
|
28
27
|
emphasis?: OutlineEmphasis;
|
|
28
|
+
/** The people the entry is about. Its tick stays a tick and shows them on
|
|
29
|
+
* hover or focus; an entry with people stays on the rail however dense the
|
|
30
|
+
* outline gets. */
|
|
31
|
+
portraits?: readonly OutlinePortrait[];
|
|
32
|
+
/** Where the portraits come from, said under them in the tick's card. */
|
|
33
|
+
portraitCredit?: string;
|
|
34
|
+
};
|
|
35
|
+
/** A person an entry is about; `image` null draws their initials. */
|
|
36
|
+
export type OutlinePortrait = {
|
|
37
|
+
image: string | null;
|
|
38
|
+
name: string;
|
|
29
39
|
};
|
|
30
40
|
export type OutlineRailProps = {
|
|
31
41
|
items: OutlineItem[];
|
|
@@ -59,5 +69,4 @@ export type OutlineRailProps = {
|
|
|
59
69
|
export declare const OUTLINE_CONTROL_MIN_SIZE = 32;
|
|
60
70
|
/** The entry as one line of text: label, then its title when it has one. */
|
|
61
71
|
export declare const outlineEntryText: (item: OutlineItem) => string;
|
|
62
|
-
export declare const OutlineRail: ({ items: itemsProp, scrollContainerRef, resolvePct, onJump, activeId, header, formatMetaLabel, collapsedFromLevel, presentation, bottomInset, topOffset, panelWidth, ariaLabel }: OutlineRailProps) => import("react").JSX.Element | null;
|
|
63
|
-
//#endregion
|
|
72
|
+
export declare const OutlineRail: ({ items: itemsProp, scrollContainerRef, resolvePct, onJump, activeId, header, formatMetaLabel, collapsedFromLevel, presentation, bottomInset, topOffset, panelWidth, ariaLabel }: OutlineRailProps) => import("react").JSX.Element | null;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ChevronRightIcon } from "../icons.js";
|
|
3
|
+
import "../lib/panel-inset.js";
|
|
3
4
|
import { cn } from "../lib/utils.js";
|
|
4
|
-
import {
|
|
5
|
-
import { ScrollArea } from "./scroll-area.js";
|
|
5
|
+
import { ReviewAuthorAvatar } from "../review/review-author-avatar.js";
|
|
6
6
|
import { DirectionalIcon } from "./directional-icon.js";
|
|
7
|
-
import "../lib/panel-inset.js";
|
|
8
7
|
import { reconcileOutlineItems, retainOutlineIdSet } from "./outline-rail.logic.js";
|
|
8
|
+
import { ScrollArea } from "./scroll-area.js";
|
|
9
|
+
import { Tooltip, TooltipContent as TooltipPopup, TooltipTrigger } from "./tooltip.js";
|
|
9
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
11
|
import { memo, useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
11
12
|
import { Temporal } from "temporal-polyfill/full";
|
|
12
|
-
|
|
13
|
+
// src/components/outline-rail.tsx
|
|
13
14
|
/**
|
|
14
15
|
* Outline navigation: an embedded panel, a host-owned rail, or a disclosure.
|
|
15
16
|
*
|
|
@@ -43,6 +44,46 @@ const HOVER_OPEN_DWELL_MS = 150;
|
|
|
43
44
|
const ACTIVE_ROW_ATTRIBUTE = "data-outline-active";
|
|
44
45
|
/** The entry as one line of text: label, then its title when it has one. */
|
|
45
46
|
const outlineEntryText = (item) => item.title === void 0 ? item.label : `${item.label} ${item.title}`;
|
|
47
|
+
const MAX_ROW_PORTRAITS = 3;
|
|
48
|
+
const HEAD_FRAME_CLASS = "[&_img]:origin-[50%_26%] [&_img]:scale-200 [&_img]:object-top";
|
|
49
|
+
/** A row's faces, decorative: the row's text carries the names. */
|
|
50
|
+
const OutlineRowPortraits = ({ portraits }) => /* @__PURE__ */ jsx("span", {
|
|
51
|
+
"aria-hidden": true,
|
|
52
|
+
className: "me-1.5 flex shrink-0 -space-x-1.5 rtl:space-x-reverse",
|
|
53
|
+
children: portraits.slice(0, MAX_ROW_PORTRAITS).map((portrait) => /* @__PURE__ */ jsx(ReviewAuthorAvatar, {
|
|
54
|
+
className: cn("ring-background size-6 ring-2", HEAD_FRAME_CLASS),
|
|
55
|
+
fallbackClassName: "text-[10px]",
|
|
56
|
+
image: portrait.image,
|
|
57
|
+
name: portrait.name
|
|
58
|
+
}, portrait.name))
|
|
59
|
+
});
|
|
60
|
+
/** What a tick with people opens: each of them, face and name. The tick's
|
|
61
|
+
* accessible name already says all this, so the card adds only the faces. */
|
|
62
|
+
const OutlinePeopleCard = ({ credit, portraits, title }) => /* @__PURE__ */ jsxs("span", {
|
|
63
|
+
className: "flex max-w-64 flex-col gap-2 py-1",
|
|
64
|
+
children: [
|
|
65
|
+
title !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
66
|
+
className: "text-muted-foreground",
|
|
67
|
+
children: title
|
|
68
|
+
}),
|
|
69
|
+
/* @__PURE__ */ jsx("span", {
|
|
70
|
+
className: "flex flex-col gap-2",
|
|
71
|
+
children: portraits.map((portrait) => /* @__PURE__ */ jsxs("span", {
|
|
72
|
+
className: "flex items-center gap-2 font-medium",
|
|
73
|
+
children: [/* @__PURE__ */ jsx(ReviewAuthorAvatar, {
|
|
74
|
+
"aria-hidden": true,
|
|
75
|
+
className: cn("size-10", HEAD_FRAME_CLASS),
|
|
76
|
+
image: portrait.image,
|
|
77
|
+
name: portrait.name
|
|
78
|
+
}), portrait.name]
|
|
79
|
+
}, portrait.name))
|
|
80
|
+
}),
|
|
81
|
+
credit !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
82
|
+
className: "text-muted-foreground text-2xs",
|
|
83
|
+
children: credit
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
});
|
|
46
87
|
const tickWidth = (level) => {
|
|
47
88
|
return TICK_BASE_WIDTH + (TICK_MAX_LEVEL - Math.min(Math.max(level, 0), TICK_MAX_LEVEL)) * TICK_LEVEL_STEP;
|
|
48
89
|
};
|
|
@@ -119,6 +160,7 @@ const OutlineRowView = ({ item, hasChildren, isCollapsed, isActive, isHovered, i
|
|
|
119
160
|
className: "me-1.5 size-1.5 shrink-0 rounded-full",
|
|
120
161
|
style: { background: `var(${item.color})` }
|
|
121
162
|
}),
|
|
163
|
+
item.portraits !== void 0 && /* @__PURE__ */ jsx(OutlineRowPortraits, { portraits: item.portraits }),
|
|
122
164
|
/* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
123
165
|
render: /* @__PURE__ */ jsx("button", {
|
|
124
166
|
"aria-current": isActive ? "true" : void 0,
|
|
@@ -392,12 +434,13 @@ const OutlineRail = ({ items: itemsProp, scrollContainerRef, resolvePct, onJump,
|
|
|
392
434
|
}, []);
|
|
393
435
|
const visibleTicks = items.flatMap((item) => {
|
|
394
436
|
const pct = pctById.get(item.id);
|
|
395
|
-
return pct !== void 0 && item.level <= railLevelCap ? [{
|
|
437
|
+
return pct !== void 0 && (item.portraits !== void 0 || item.level <= railLevelCap) ? [{
|
|
396
438
|
item,
|
|
397
439
|
pct
|
|
398
440
|
}] : [];
|
|
399
441
|
});
|
|
400
|
-
|
|
442
|
+
const hasPanel = items.length >= 2 || header !== void 0;
|
|
443
|
+
if (!hasPanel && !items.some((item) => item.portraits !== void 0)) return null;
|
|
401
444
|
const visibleTickIds = new Set(visibleTicks.map(({ item }) => item.id));
|
|
402
445
|
const ghostPct = hoveredId !== null && !visibleTickIds.has(hoveredId) ? pctById.get(hoveredId) : void 0;
|
|
403
446
|
const ghostItem = ghostPct === void 0 ? void 0 : items.find((item) => item.id === hoveredId);
|
|
@@ -428,14 +471,16 @@ const OutlineRail = ({ items: itemsProp, scrollContainerRef, resolvePct, onJump,
|
|
|
428
471
|
children: [visibleTicks.map(({ item, pct }) => {
|
|
429
472
|
const isActive = active === item.id;
|
|
430
473
|
const isHovered = hoveredId === item.id;
|
|
474
|
+
const portraits = item.portraits;
|
|
475
|
+
const tickLabel = portraits === void 0 ? item.label : outlineEntryText(item);
|
|
431
476
|
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: /* @__PURE__ */ jsx("button", {
|
|
432
|
-
...presentation === "popover" ? {
|
|
477
|
+
...presentation === "popover" && hasPanel ? {
|
|
433
478
|
"aria-controls": panelId,
|
|
434
479
|
"aria-expanded": panelOpen
|
|
435
480
|
} : {},
|
|
436
481
|
"aria-current": isActive ? "true" : void 0,
|
|
437
|
-
"aria-label":
|
|
438
|
-
className: cn("absolute end-0 rounded-full transition-[width,height,opacity] duration-150", isHovered || isActive ? "opacity-100" : "opacity-45 hover:opacity-90"),
|
|
482
|
+
"aria-label": tickLabel,
|
|
483
|
+
className: cn("absolute end-0 rounded-full transition-[width,height,opacity] duration-150", isHovered || isActive ? "opacity-100" : "opacity-45 hover:opacity-90", portraits !== void 0 && "focus-visible:outline-ring z-10 after:absolute after:-inset-x-2 after:-inset-y-2.5 focus-visible:outline-2 focus-visible:outline-offset-2 pointer-coarse:after:-inset-x-3.5 pointer-coarse:after:-inset-y-5"),
|
|
439
484
|
onBlur: (event) => {
|
|
440
485
|
if (!railRef.current?.contains(event.relatedTarget)) closePanel();
|
|
441
486
|
},
|
|
@@ -457,7 +502,15 @@ const OutlineRail = ({ items: itemsProp, scrollContainerRef, resolvePct, onJump,
|
|
|
457
502
|
background: tickBackground(item.color, isHovered)
|
|
458
503
|
},
|
|
459
504
|
type: "button"
|
|
460
|
-
}) }), /* @__PURE__ */ jsx(TooltipPopup, { children: item.label })
|
|
505
|
+
}) }), portraits === void 0 ? /* @__PURE__ */ jsx(TooltipPopup, { children: item.label }) : /* @__PURE__ */ jsx(TooltipPopup, {
|
|
506
|
+
side: "inline-start",
|
|
507
|
+
sideOffset: presentation === "popover" && hasPanel ? 44 + panelWidth - tickWidth(item.level) : void 0,
|
|
508
|
+
children: /* @__PURE__ */ jsx(OutlinePeopleCard, {
|
|
509
|
+
credit: item.portraitCredit,
|
|
510
|
+
portraits,
|
|
511
|
+
title: item.title
|
|
512
|
+
})
|
|
513
|
+
})] }, item.id);
|
|
461
514
|
}), ghostItem && ghostPct !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
462
515
|
"aria-hidden": true,
|
|
463
516
|
className: "absolute end-0 rounded-full opacity-100",
|
|
@@ -469,7 +522,7 @@ const OutlineRail = ({ items: itemsProp, scrollContainerRef, resolvePct, onJump,
|
|
|
469
522
|
background: ghostItem.color ? `var(${ghostItem.color})` : "var(--option-blue)"
|
|
470
523
|
}
|
|
471
524
|
})]
|
|
472
|
-
}), presentation !== "rail" && /* @__PURE__ */ jsxs("nav", {
|
|
525
|
+
}), presentation !== "rail" && hasPanel && /* @__PURE__ */ jsxs("nav", {
|
|
473
526
|
"aria-label": ariaLabel,
|
|
474
527
|
"aria-hidden": !panelOpen,
|
|
475
528
|
id: panelId,
|
|
@@ -541,5 +594,4 @@ function outlinePanelVisibilityClass(presentation, open) {
|
|
|
541
594
|
if (presentation === "panel") return "flex-1";
|
|
542
595
|
return open ? "translate-x-0 opacity-100" : "pointer-events-none translate-x-2 opacity-0";
|
|
543
596
|
}
|
|
544
|
-
//#endregion
|
|
545
597
|
export { OUTLINE_CONTROL_MIN_SIZE, OUTLINE_EMPHASIS, OutlineRail, outlineEntryText };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { OutlineItem } from "./outline-rail.js";
|
|
2
|
-
//#region src/components/outline-rail.logic.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* `next` with every entry whose content `previous` already holds under the
|
|
5
4
|
* same id replaced by that earlier object, and `previous` itself when nothing
|
|
@@ -22,5 +21,4 @@ type RetainKnownIdsOptions = {
|
|
|
22
21
|
* seen for the first time gets `seed`, and a removed entry drops out.
|
|
23
22
|
*/
|
|
24
23
|
export declare const retainOutlineIdSet: ({ ids, knownIds, seed, items }: RetainKnownIdsOptions) => ReadonlySet<string>;
|
|
25
|
-
//#endregion
|
|
26
24
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/outline-rail.logic.ts
|
|
2
2
|
const OUTLINE_ITEM_EQUALS = Object.values({
|
|
3
3
|
id: (a, b) => a.id === b.id,
|
|
4
4
|
label: (a, b) => a.label === b.label,
|
|
@@ -6,7 +6,12 @@ const OUTLINE_ITEM_EQUALS = Object.values({
|
|
|
6
6
|
level: (a, b) => a.level === b.level,
|
|
7
7
|
meta: (a, b) => a.meta === b.meta,
|
|
8
8
|
color: (a, b) => a.color === b.color,
|
|
9
|
-
emphasis: (a, b) => a.emphasis === b.emphasis
|
|
9
|
+
emphasis: (a, b) => a.emphasis === b.emphasis,
|
|
10
|
+
portraits: (a, b) => a.portraits?.length === b.portraits?.length && (a.portraits ?? []).every((portrait, index) => {
|
|
11
|
+
const other = b.portraits?.[index];
|
|
12
|
+
return other !== void 0 && other.image === portrait.image && other.name === portrait.name;
|
|
13
|
+
}),
|
|
14
|
+
portraitCredit: (a, b) => a.portraitCredit === b.portraitCredit
|
|
10
15
|
});
|
|
11
16
|
const sameOutlineItem = (a, b) => OUTLINE_ITEM_EQUALS.every((equals) => equals(a, b));
|
|
12
17
|
/**
|
|
@@ -36,5 +41,4 @@ const retainOutlineIdSet = ({ ids, knownIds, seed, items }) => {
|
|
|
36
41
|
for (const item of items) if (knownIds.has(item.id) ? ids.has(item.id) : seed(item)) next.add(item.id);
|
|
37
42
|
return next.size === ids.size && [...next].every((id) => ids.has(id)) ? ids : next;
|
|
38
43
|
};
|
|
39
|
-
//#endregion
|
|
40
44
|
export { reconcileOutlineItems, retainOutlineIdSet };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
2
|
import { Button } from "./button.js";
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
-
//#region src/components/pagination.d.ts
|
|
5
4
|
declare const Pagination: ({ className, ...props }: React$1.ComponentProps<"nav">) => React$1.JSX.Element;
|
|
6
5
|
declare const PaginationContent: ({ className, ...props }: React$1.ComponentProps<"ul">) => React$1.JSX.Element;
|
|
7
6
|
declare const PaginationItem: ({ ...props }: React$1.ComponentProps<"li">) => React$1.JSX.Element;
|
|
@@ -13,5 +12,4 @@ declare function PaginationLink({ className, isActive, size, render, ...props }:
|
|
|
13
12
|
declare const PaginationPrevious: ({ className, ...props }: React$1.ComponentProps<typeof PaginationLink>) => React$1.JSX.Element;
|
|
14
13
|
declare const PaginationNext: ({ className, ...props }: React$1.ComponentProps<typeof PaginationLink>) => React$1.JSX.Element;
|
|
15
14
|
declare const PaginationEllipsis: ({ className, ...props }: React$1.ComponentProps<"span">) => React$1.JSX.Element;
|
|
16
|
-
//#endregion
|
|
17
15
|
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
@@ -6,7 +6,7 @@ import { DirectionalIcon } from "./directional-icon.js";
|
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
8
8
|
import { useRender } from "@base-ui/react/use-render";
|
|
9
|
-
|
|
9
|
+
// src/components/pagination.tsx
|
|
10
10
|
const Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx("nav", {
|
|
11
11
|
"aria-label": "Pagination",
|
|
12
12
|
className: cn("mx-auto flex w-full justify-center", className),
|
|
@@ -74,5 +74,4 @@ const PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs("sp
|
|
|
74
74
|
children: "More pages"
|
|
75
75
|
})]
|
|
76
76
|
});
|
|
77
|
-
//#endregion
|
|
78
77
|
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
@@ -2,7 +2,6 @@ import * as React$1 from "react";
|
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
3
|
import { OverlayLayer } from "../lib/overlay-layer.js";
|
|
4
4
|
import { Popover as Popover$1 } from "@base-ui/react/popover";
|
|
5
|
-
//#region src/components/popover.d.ts
|
|
6
5
|
declare const PopoverCreateHandle: typeof Popover$1.createHandle;
|
|
7
6
|
declare const Popover: typeof Popover$1.Root;
|
|
8
7
|
declare function PopoverTrigger({ tooltip, ...props }: Popover$1.Trigger.Props & {
|
|
@@ -43,5 +42,4 @@ declare const PopoverPanel: ({ children, contentClassName, ...props }: Component
|
|
|
43
42
|
declare const PopoverClose: ({ ...props }: Popover$1.Close.Props) => React$1.JSX.Element;
|
|
44
43
|
declare const PopoverTitle: ({ className, ...props }: Popover$1.Title.Props) => React$1.JSX.Element;
|
|
45
44
|
declare const PopoverDescription: ({ className, ...props }: Popover$1.Description.Props) => React$1.JSX.Element;
|
|
46
|
-
//#endregion
|
|
47
45
|
export { Popover, PopoverClose, PopoverPopup as PopoverContent, PopoverPopup, PopoverCreateHandle, PopoverDescription, PopoverPanel, PopoverTitle, PopoverTrigger };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cn } from "../lib/utils.js";
|
|
3
2
|
import { OVERLAY_LAYER_CLASS_NAMES } from "../lib/overlay-layer.js";
|
|
4
3
|
import { CONTENT_SIZED_POSITIONER_CLASS_NAME, IN_FLOW_POPUP_CLASS_NAME } from "../lib/positioner-sizing.js";
|
|
4
|
+
import { cn } from "../lib/utils.js";
|
|
5
5
|
import { renderTooltipTrigger } from "./tooltip-trigger-helper.js";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { Popover as Popover$1 } from "@base-ui/react/popover";
|
|
8
|
-
|
|
8
|
+
// src/components/popover.tsx
|
|
9
9
|
const PopoverCreateHandle = Popover$1.createHandle;
|
|
10
10
|
const Popover = Popover$1.Root;
|
|
11
11
|
function PopoverTrigger({ tooltip, ...props }) {
|
|
@@ -76,5 +76,4 @@ const PopoverDescription = ({ className, ...props }) => /* @__PURE__ */ jsx(Popo
|
|
|
76
76
|
"data-slot": "popover-description",
|
|
77
77
|
...props
|
|
78
78
|
});
|
|
79
|
-
//#endregion
|
|
80
79
|
export { Popover, PopoverClose, PopoverPopup as PopoverContent, PopoverPopup, PopoverCreateHandle, PopoverDescription, PopoverPanel, PopoverTitle, PopoverTrigger };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card";
|
|
3
|
-
//#region src/components/preview-card.d.ts
|
|
4
3
|
export declare const PreviewCard: typeof PreviewCardPrimitive.Root;
|
|
5
4
|
export declare const PreviewCardTrigger: ({ ...props }: PreviewCardPrimitive.Trigger.Props) => React.ReactElement;
|
|
6
5
|
export declare const PreviewCardPopup: ({ className, children, align, sideOffset, anchor, ...props }: PreviewCardPrimitive.Popup.Props & {
|
|
@@ -8,5 +7,4 @@ export declare const PreviewCardPopup: ({ className, children, align, sideOffset
|
|
|
8
7
|
sideOffset?: PreviewCardPrimitive.Positioner.Props["sideOffset"];
|
|
9
8
|
anchor?: PreviewCardPrimitive.Positioner.Props["anchor"];
|
|
10
9
|
}) => React.ReactElement;
|
|
11
|
-
//#endregion
|
|
12
10
|
export { PreviewCard as HoverCard, PreviewCardPopup as HoverCardContent, PreviewCardTrigger as HoverCardTrigger, PreviewCardPrimitive };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card";
|
|
5
|
-
|
|
5
|
+
// src/components/preview-card.tsx
|
|
6
6
|
const PreviewCard = PreviewCardPrimitive.Root;
|
|
7
7
|
const PreviewCardTrigger = ({ ...props }) => /* @__PURE__ */ jsx(PreviewCardPrimitive.Trigger, {
|
|
8
8
|
"data-slot": "preview-card-trigger",
|
|
@@ -21,5 +21,4 @@ const PreviewCardPopup = ({ className, children, align = "center", sideOffset =
|
|
|
21
21
|
children
|
|
22
22
|
})
|
|
23
23
|
}) });
|
|
24
|
-
//#endregion
|
|
25
24
|
export { PreviewCard as HoverCard, PreviewCard, PreviewCardPopup as HoverCardContent, PreviewCardPopup, PreviewCardTrigger as HoverCardTrigger, PreviewCardTrigger, PreviewCardPrimitive };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
//#region src/components/preview-pane.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Side-pane preview pattern: a list of options (menu items, rows) with a
|
|
5
4
|
* fixed-width pane beside it that previews the highlighted option. The pane
|
|
@@ -39,5 +38,4 @@ type PreviewPaneProps = React$1.ComponentProps<"div"> & {
|
|
|
39
38
|
size?: "default" | "thumbnail";
|
|
40
39
|
};
|
|
41
40
|
declare const PreviewPane: ({ children, className, overflow, size, ...props }: PreviewPaneProps) => React$1.JSX.Element;
|
|
42
|
-
//#endregion
|
|
43
41
|
export { MenuPreviewLayout, PreviewPane };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { ScrollArea } from "./scroll-area.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/components/preview-pane.tsx
|
|
5
5
|
const MenuPreviewLayout = ({ children, preview, className, previewWidth = "fixed" }) => /* @__PURE__ */ jsxs("div", {
|
|
6
6
|
className: cn("flex items-stretch", className),
|
|
7
7
|
"data-slot": "menu-preview-layout",
|
|
@@ -40,5 +40,4 @@ const PreviewPane = ({ children, className, overflow = "clip", size = "default",
|
|
|
40
40
|
children
|
|
41
41
|
})
|
|
42
42
|
});
|
|
43
|
-
//#endregion
|
|
44
43
|
export { MenuPreviewLayout, PreviewPane };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
-
//#region src/components/prose.d.ts
|
|
4
3
|
/** Preserve source word breaks while allowing oversized tokens to fit narrow panes. */
|
|
5
4
|
export declare const LEGAL_TEXT_CLASS_NAME = "hyphens-manual wrap-anywhere";
|
|
6
5
|
declare const proseVariants: (props?: ({
|
|
@@ -9,5 +8,4 @@ declare const proseVariants: (props?: ({
|
|
|
9
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
9
|
/** A readable measure for narrative copy; task-shaped text should not use it. */
|
|
11
10
|
export declare const Prose: ({ className, size, tone, ...props }: React$1.ComponentProps<"p"> & VariantProps<typeof proseVariants>) => React$1.JSX.Element;
|
|
12
|
-
//#endregion
|
|
13
11
|
export {};
|
package/dist/components/prose.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
|
-
|
|
4
|
+
// src/components/prose.tsx
|
|
5
5
|
/** Preserve source word breaks while allowing oversized tokens to fit narrow panes. */
|
|
6
6
|
const LEGAL_TEXT_CLASS_NAME = "hyphens-manual wrap-anywhere";
|
|
7
7
|
const proseVariants = cva("max-w-[80ch] leading-relaxed", {
|
|
@@ -32,5 +32,4 @@ const Prose = ({ className, size, tone, ...props }) => /* @__PURE__ */ jsx("p",
|
|
|
32
32
|
}), className),
|
|
33
33
|
...props
|
|
34
34
|
});
|
|
35
|
-
//#endregion
|
|
36
35
|
export { LEGAL_TEXT_CLASS_NAME, Prose };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Ref } from "react";
|
|
2
2
|
import { ScrollArea as ScrollArea$1 } from "@base-ui/react/scroll-area";
|
|
3
|
-
//#region src/components/scroll-area.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Which way the area may scroll. `both` is the primitive's own behaviour: a
|
|
6
5
|
* viewport that scrolls whichever axis its content overflows. `vertical` is
|
|
@@ -27,5 +26,4 @@ declare const ScrollArea: ({ axis, className, children, scrollFade, scrollbarCla
|
|
|
27
26
|
viewportRef?: Ref<HTMLDivElement>;
|
|
28
27
|
}) => import("react").JSX.Element;
|
|
29
28
|
declare const ScrollBar: ({ className, orientation, ...props }: ScrollArea$1.Scrollbar.Props) => import("react").JSX.Element;
|
|
30
|
-
//#endregion
|
|
31
29
|
export { ScrollArea, ScrollBar };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { ScrollArea as ScrollArea$1 } from "@base-ui/react/scroll-area";
|
|
5
|
-
|
|
5
|
+
// src/components/scroll-area.tsx
|
|
6
6
|
const AXIS_VIEWPORT_CLASS = {
|
|
7
7
|
both: "",
|
|
8
8
|
vertical: "overflow-x-hidden"
|
|
@@ -38,5 +38,4 @@ const ScrollBar = ({ className, orientation = "vertical", ...props }) => /* @__P
|
|
|
38
38
|
"data-slot": "scroll-area-thumb"
|
|
39
39
|
})
|
|
40
40
|
});
|
|
41
|
-
//#endregion
|
|
42
41
|
export { ScrollArea, ScrollBar };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { RefObject } from "react";
|
|
2
|
-
//#region src/components/scroll-to-top.d.ts
|
|
3
2
|
export type ScrollToTopProps = {
|
|
4
3
|
scrollContainerRef: RefObject<HTMLElement | null>;
|
|
5
4
|
/** Show once scrollTop exceeds this many px. */
|
|
@@ -7,5 +6,4 @@ export type ScrollToTopProps = {
|
|
|
7
6
|
label?: string;
|
|
8
7
|
className?: string;
|
|
9
8
|
};
|
|
10
|
-
export declare const ScrollToTop: ({ scrollContainerRef, threshold, label, className }: ScrollToTopProps) => import("react").JSX.Element;
|
|
11
|
-
//#endregion
|
|
9
|
+
export declare const ScrollToTop: ({ scrollContainerRef, threshold, label, className }: ScrollToTopProps) => import("react").JSX.Element;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
|
-
|
|
5
|
+
// src/components/scroll-to-top.tsx
|
|
6
6
|
/**
|
|
7
7
|
* Scroll-to-top affordance — a subtle floating button that fades in once a
|
|
8
8
|
* scroll container is scrolled past a threshold and jumps back to the top
|
|
@@ -39,5 +39,4 @@ const ScrollToTop = ({ scrollContainerRef, threshold = 600, label = "Scroll to t
|
|
|
39
39
|
})
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
|
-
//#endregion
|
|
43
42
|
export { ScrollToTop };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
2
|
import { InputGroupInput } from "./input-group.js";
|
|
3
|
-
//#region src/components/search-field.d.ts
|
|
4
3
|
type SearchFieldProps = Omit<React$1.ComponentProps<typeof InputGroupInput>, "onChange" | "type" | "value"> & {
|
|
5
4
|
value: string;
|
|
6
5
|
onValueChange: (value: string) => void;
|
|
@@ -16,5 +15,4 @@ type SearchFieldProps = Omit<React$1.ComponentProps<typeof InputGroupInput>, "on
|
|
|
16
15
|
* hundred rows.
|
|
17
16
|
*/
|
|
18
17
|
declare const SearchField: ({ value, onValueChange, clearLabel, groupClassName, className, onKeyDown, ...props }: SearchFieldProps) => React$1.JSX.Element;
|
|
19
|
-
//#endregion
|
|
20
18
|
export { SearchField, type SearchFieldProps };
|
|
@@ -4,7 +4,7 @@ import { cn } from "../lib/utils.js";
|
|
|
4
4
|
import { Button } from "./button.js";
|
|
5
5
|
import { InputGroup, InputGroupAddon, InputGroupInput } from "./input-group.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/components/search-field.tsx
|
|
8
8
|
/**
|
|
9
9
|
* Filter-as-you-type search box: leading magnifier, clear button once there is
|
|
10
10
|
* a query, and Escape clears before it blurs. The caller owns the query state
|
|
@@ -46,5 +46,4 @@ const SearchField = ({ value, onValueChange, clearLabel, groupClassName, classNa
|
|
|
46
46
|
})
|
|
47
47
|
})]
|
|
48
48
|
});
|
|
49
|
-
//#endregion
|
|
50
49
|
export { SearchField };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { InputProps } from "./input.js";
|
|
2
|
-
//#region src/components/secret-input.d.ts
|
|
3
2
|
type SecretInputProps = Omit<InputProps, "type"> & {
|
|
4
3
|
hideValueLabel: string;
|
|
5
4
|
showValueLabel: string;
|
|
6
5
|
};
|
|
7
6
|
declare const SecretInput: ({ className, dir, disabled, hideValueLabel, showValueLabel, ...props }: SecretInputProps) => import("react").JSX.Element;
|
|
8
|
-
//#endregion
|
|
9
7
|
export { SecretInput, type SecretInputProps };
|
|
@@ -5,7 +5,7 @@ import { Button } from "./button.js";
|
|
|
5
5
|
import { Input } from "./input.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { useState } from "react";
|
|
8
|
-
|
|
8
|
+
// src/components/secret-input.tsx
|
|
9
9
|
const SecretInput = ({ className, dir, disabled, hideValueLabel, showValueLabel, ...props }) => {
|
|
10
10
|
const [visibility, setVisibility] = useState("concealed");
|
|
11
11
|
const isRevealed = visibility === "revealed";
|
|
@@ -34,5 +34,4 @@ const SecretInput = ({ className, dir, disabled, hideValueLabel, showValueLabel,
|
|
|
34
34
|
})]
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
|
-
//#endregion
|
|
38
37
|
export { SecretInput };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ComponentType } from "react";
|
|
2
|
-
//#region src/components/segmented-icon-toggle.d.ts
|
|
3
2
|
type SegmentedIconToggleOption<T extends string> = {
|
|
4
3
|
value: T;
|
|
5
4
|
icon: ComponentType<{
|
|
@@ -19,5 +18,4 @@ type SegmentedIconToggleProps<T extends string> = {
|
|
|
19
18
|
* the same across the app. A `ToggleGroup` of icon items that always holds
|
|
20
19
|
* one value: clicking the chosen option keeps it. */
|
|
21
20
|
export declare const SegmentedIconToggle: <T extends string>({ value, options, onChange, size }: SegmentedIconToggleProps<T>) => import("react").JSX.Element;
|
|
22
|
-
//#endregion
|
|
23
21
|
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
3
|
import { ToggleGroup, ToggleGroupItem } from "./toggle-group.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/components/segmented-icon-toggle.tsx
|
|
6
6
|
/** Compact segmented control of icon buttons (e.g. table row wrap, list
|
|
7
7
|
* density). One shared shell so every density/mode switch looks and behaves
|
|
8
8
|
* the same across the app. A `ToggleGroup` of icon items that always holds
|
|
@@ -19,7 +19,7 @@ const SegmentedIconToggle = ({ value, options, onChange, size = "compact" }) =>
|
|
|
19
19
|
const Icon = option.icon;
|
|
20
20
|
return /* @__PURE__ */ jsx(ToggleGroupItem, {
|
|
21
21
|
"aria-label": option.label,
|
|
22
|
-
className: cn("h-6 w-7 rounded-
|
|
22
|
+
className: cn("h-6 w-7 rounded-sm sm:h-6", size === "touch" && "[@media(any-pointer:coarse)]:h-11 [@media(any-pointer:coarse)]:w-11"),
|
|
23
23
|
"data-control-value": option.value,
|
|
24
24
|
size: "icon-xs",
|
|
25
25
|
value: option.value,
|
|
@@ -27,5 +27,4 @@ const SegmentedIconToggle = ({ value, options, onChange, size = "compact" }) =>
|
|
|
27
27
|
}, option.value);
|
|
28
28
|
})
|
|
29
29
|
});
|
|
30
|
-
//#endregion
|
|
31
30
|
export { SegmentedIconToggle };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
2
|
import { ControlSize } from "../lib/control-size.js";
|
|
3
3
|
import { Select as Select$1 } from "@base-ui/react/select";
|
|
4
|
-
//#region src/components/select.d.ts
|
|
5
4
|
type SelectItemProps = Select$1.Item.Props & {
|
|
6
5
|
label?: string;
|
|
7
6
|
};
|
|
@@ -22,5 +21,4 @@ declare const SelectItem: ({ className, children, label: _label, ...props }: Sel
|
|
|
22
21
|
declare const SelectSeparator: ({ className, ...props }: Select$1.Separator.Props) => React$1.JSX.Element;
|
|
23
22
|
declare const SelectGroup: (props: Select$1.Group.Props) => React$1.JSX.Element;
|
|
24
23
|
declare const SelectGroupLabel: (props: Select$1.GroupLabel.Props) => React$1.JSX.Element;
|
|
25
|
-
//#endregion
|
|
26
24
|
export { Select, SelectPopup as SelectContent, SelectPopup, SelectGroup, SelectGroupLabel, SelectItem, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { useLatest } from "../hooks/use-latest.js";
|
|
2
3
|
import { ChevronDownIcon, ChevronUpIcon, ChevronsUpDownIcon } from "../icons.js";
|
|
3
|
-
import { cn } from "../lib/utils.js";
|
|
4
|
-
import { OVERLAY_LAYER_CLASS_NAMES } from "../lib/overlay-layer.js";
|
|
5
4
|
import { CONTROL_SIZE } from "../lib/control-size.js";
|
|
6
5
|
import { FIELD_TRIGGER_CLASS_NAME } from "../lib/field-trigger.js";
|
|
7
|
-
import {
|
|
6
|
+
import { OVERLAY_LAYER_CLASS_NAMES } from "../lib/overlay-layer.js";
|
|
7
|
+
import { cn } from "../lib/utils.js";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import * as React$1 from "react";
|
|
10
10
|
import { Select as Select$1 } from "@base-ui/react/select";
|
|
11
|
-
|
|
11
|
+
// src/components/select.tsx
|
|
12
12
|
const SelectItemDisplaysContext = React$1.createContext(/* @__PURE__ */ new Map());
|
|
13
13
|
const renderSelectedDisplay = (displays, placeholder) => (value) => {
|
|
14
14
|
if (!displays.has(value)) return placeholder ?? null;
|
|
@@ -191,5 +191,4 @@ const SelectGroupLabel = (props) => /* @__PURE__ */ jsx(Select$1.GroupLabel, {
|
|
|
191
191
|
"data-slot": "select-group-label",
|
|
192
192
|
...props
|
|
193
193
|
});
|
|
194
|
-
//#endregion
|
|
195
194
|
export { Select, SelectPopup as SelectContent, SelectPopup, SelectGroup, SelectGroupLabel, SelectItem, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from "react";
|
|
2
2
|
import { Separator as Separator$1 } from "@base-ui/react/separator";
|
|
3
|
-
//#region src/components/separator.d.ts
|
|
4
3
|
declare const Separator: ({ className, orientation, ...props }: Separator$1.Props) => import("react").JSX.Element;
|
|
5
4
|
type TextSeparatorProps = PropsWithChildren<{
|
|
6
5
|
/** Container overrides, e.g. gap or vertical padding. */
|
|
@@ -37,5 +36,4 @@ type ResizeSeparatorProps = {
|
|
|
37
36
|
* adds no visible width of its own.
|
|
38
37
|
*/
|
|
39
38
|
declare const ResizeSeparator: ({ className, label, value, min, max, keyboardStep, onResize }: ResizeSeparatorProps) => import("react").JSX.Element;
|
|
40
|
-
//#endregion
|
|
41
39
|
export { ResizeSeparator, Separator, TextSeparator };
|
|
@@ -3,7 +3,7 @@ import { cn } from "../lib/utils.js";
|
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { useRef } from "react";
|
|
5
5
|
import { Separator as Separator$1 } from "@base-ui/react/separator";
|
|
6
|
-
|
|
6
|
+
// src/components/separator.tsx
|
|
7
7
|
const Separator = ({ className, orientation = "horizontal", ...props }) => /* @__PURE__ */ jsx(Separator$1, {
|
|
8
8
|
className: cn("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:not-[[class^='h-']]:not-[[class*='_h-']]:self-stretch", className),
|
|
9
9
|
"data-slot": "separator",
|
|
@@ -73,5 +73,4 @@ const ResizeSeparator = ({ className, label, value, min, max, keyboardStep, onRe
|
|
|
73
73
|
tabIndex: 0
|
|
74
74
|
});
|
|
75
75
|
};
|
|
76
|
-
//#endregion
|
|
77
76
|
export { ResizeSeparator, Separator, TextSeparator };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SeparatorContract } from "./separator.shared.js";
|
|
2
2
|
import { ViewProps } from "react-native";
|
|
3
|
-
//#region src/components/separator.native.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* The web's `Separator` (./separator.tsx) on a phone: a hairline in the
|
|
6
5
|
* border colour, across the container or, `vertical`, down it. A list passes
|
|
@@ -10,5 +9,4 @@ export declare const Separator: ({ className, orientation, ...props }: ViewProps
|
|
|
10
9
|
className?: string | undefined;
|
|
11
10
|
/** A hairline holds nothing. */
|
|
12
11
|
children?: never;
|
|
13
|
-
}) => import("react").JSX.Element;
|
|
14
|
-
//#endregion
|
|
12
|
+
}) => import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
|
|
3
|
+
// src/components/separator.native.tsx
|
|
4
4
|
/**
|
|
5
5
|
* The web's `Separator` (./separator.tsx) on a phone: a hairline in the
|
|
6
6
|
* border colour, across the container or, `vertical`, down it. A list passes
|
|
@@ -12,5 +12,4 @@ const Separator = ({ className, orientation = "horizontal", ...props }) => /* @_
|
|
|
12
12
|
className: `bg-border ${orientation === "vertical" ? "w-px self-stretch" : "h-px w-full"} ${className ?? ""}`,
|
|
13
13
|
importantForAccessibility: "no-hide-descendants"
|
|
14
14
|
});
|
|
15
|
-
//#endregion
|
|
16
15
|
export { Separator };
|