@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
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Field as Field$1 } from "@base-ui/react/field";
|
|
2
|
-
//#region src/components/field.d.ts
|
|
3
2
|
declare const Field: ({ className, ...props }: Field$1.Root.Props) => import("react").JSX.Element;
|
|
4
3
|
declare const FieldLabel: ({ className, ...props }: Field$1.Label.Props) => import("react").JSX.Element;
|
|
5
4
|
declare const FieldItem: ({ className, ...props }: Field$1.Item.Props) => import("react").JSX.Element;
|
|
@@ -13,5 +12,4 @@ declare const FieldDescription: ({ className, ...props }: Field$1.Description.Pr
|
|
|
13
12
|
declare const FieldError: ({ className, ...props }: Field$1.Error.Props) => import("react").JSX.Element;
|
|
14
13
|
declare const FieldControl: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").FieldControlProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
15
14
|
declare const FieldValidity: import("react").FC<import("@base-ui/react").FieldValidityProps>;
|
|
16
|
-
//#endregion
|
|
17
15
|
export { Field, FieldControl, FieldDescription, FieldError, FieldItem, FieldLabel, FieldValidity };
|
package/dist/components/field.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Field as Field$1 } from "@base-ui/react/field";
|
|
5
|
-
|
|
5
|
+
// src/components/field.tsx
|
|
6
6
|
const Field = ({ className, ...props }) => /* @__PURE__ */ jsx(Field$1.Root, {
|
|
7
7
|
className: cn("flex flex-col items-start gap-2", className),
|
|
8
8
|
"data-slot": "field",
|
|
@@ -36,5 +36,4 @@ const FieldError = ({ className, ...props }) => /* @__PURE__ */ jsx(Field$1.Erro
|
|
|
36
36
|
});
|
|
37
37
|
const FieldControl = Field$1.Control;
|
|
38
38
|
const FieldValidity = Field$1.Validity;
|
|
39
|
-
//#endregion
|
|
40
39
|
export { Field, FieldControl, FieldDescription, FieldError, FieldItem, FieldLabel, FieldValidity };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/components/file-input.d.ts
|
|
2
1
|
type FileInputProps = {
|
|
3
2
|
accept?: string | undefined;
|
|
4
3
|
"aria-labelledby"?: string | undefined;
|
|
@@ -10,5 +9,4 @@ type FileInputProps = {
|
|
|
10
9
|
emptyLabel: string;
|
|
11
10
|
};
|
|
12
11
|
declare const FileInput: ({ accept, "aria-labelledby": labelledBy, className, disabled, file, onFileChange, chooseLabel, emptyLabel }: FileInputProps) => import("react").JSX.Element;
|
|
13
|
-
//#endregion
|
|
14
12
|
export { FileInput, type FileInputProps };
|
|
@@ -5,7 +5,7 @@ import { Button } from "./button.js";
|
|
|
5
5
|
import { openFilePicker } from "../lib/file-picker.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { useId } from "react";
|
|
8
|
-
|
|
8
|
+
// src/components/file-input.tsx
|
|
9
9
|
const FileInput = ({ accept, "aria-labelledby": labelledBy, className, disabled, file, onFileChange, chooseLabel, emptyLabel }) => {
|
|
10
10
|
const triggerId = useId();
|
|
11
11
|
return /* @__PURE__ */ jsxs("span", {
|
|
@@ -30,5 +30,4 @@ const FileInput = ({ accept, "aria-labelledby": labelledBy, className, disabled,
|
|
|
30
30
|
})]
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
|
-
//#endregion
|
|
34
33
|
export { FileInput };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Form as Form$1 } from "@base-ui/react/form";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
-
//#region src/components/form.d.ts
|
|
4
3
|
declare const formVariants: (props?: ({
|
|
5
4
|
density?: "compact" | "default" | "snug" | null | undefined;
|
|
6
5
|
layout?: "inline" | "stack" | null | undefined;
|
|
@@ -44,5 +43,4 @@ type FormProps = Form$1.Props & VariantProps<typeof formVariants> & {
|
|
|
44
43
|
* unsaved-changes guard.
|
|
45
44
|
*/
|
|
46
45
|
declare const Form: ({ className, density, layout, dirty, onDiscard, children, ...props }: FormProps) => import("react").JSX.Element;
|
|
47
|
-
//#endregion
|
|
48
46
|
export { Form, type FormErrors, type FormProps, formVariants };
|
package/dist/components/form.js
CHANGED
|
@@ -4,7 +4,7 @@ import { DialogFormState } from "./dialog-form-state.js";
|
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { cva } from "class-variance-authority";
|
|
6
6
|
import { Form as Form$1 } from "@base-ui/react/form";
|
|
7
|
-
|
|
7
|
+
// src/components/form.tsx
|
|
8
8
|
const formVariants = cva("flex w-full", {
|
|
9
9
|
defaultVariants: {
|
|
10
10
|
density: "default",
|
|
@@ -63,5 +63,4 @@ const Form = ({ className, density, layout, dirty = false, onDiscard, children,
|
|
|
63
63
|
onDiscard
|
|
64
64
|
}), children]
|
|
65
65
|
});
|
|
66
|
-
//#endregion
|
|
67
66
|
export { Form, formVariants };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
//#region src/components/frame.d.ts
|
|
3
2
|
declare const Frame: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
|
|
4
3
|
declare const FramePanel: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
|
|
5
4
|
declare const FrameHeader: ({ className, ...props }: React$1.ComponentProps<"header">) => React$1.JSX.Element;
|
|
6
5
|
declare const FrameTitle: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
|
|
7
6
|
declare const FrameDescription: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
|
|
8
7
|
declare const FrameFooter: ({ className, ...props }: React$1.ComponentProps<"footer">) => React$1.JSX.Element;
|
|
9
|
-
//#endregion
|
|
10
8
|
export { Frame, FrameDescription, FrameFooter, FrameHeader, FramePanel, FrameTitle };
|
package/dist/components/frame.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/components/frame.tsx
|
|
4
4
|
const Frame = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
5
5
|
className: cn("bg-muted/72 relative flex flex-col rounded-2xl p-1", "*:[[data-slot=frame-panel]+[data-slot=frame-panel]]:mt-1", className),
|
|
6
6
|
"data-slot": "frame",
|
|
@@ -31,5 +31,4 @@ const FrameFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("footer", {
|
|
|
31
31
|
"data-slot": "frame-panel-footer",
|
|
32
32
|
...props
|
|
33
33
|
});
|
|
34
|
-
//#endregion
|
|
35
34
|
export { Frame, FrameDescription, FrameFooter, FrameHeader, FramePanel, FrameTitle };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
//#region src/components/hex-color-picker.d.ts
|
|
3
2
|
type HexColorPickerProps = {
|
|
4
3
|
/** Hex color with or without # (e.g. "#ff0000" or "FF0000") */
|
|
5
4
|
color?: string | undefined;
|
|
@@ -7,5 +6,4 @@ type HexColorPickerProps = {
|
|
|
7
6
|
className?: string;
|
|
8
7
|
};
|
|
9
8
|
declare const HexColorPicker: ({ color, onChange, className }: HexColorPickerProps) => React$1.JSX.Element;
|
|
10
|
-
//#endregion
|
|
11
9
|
export { HexColorPicker, type HexColorPickerProps };
|
|
@@ -4,7 +4,7 @@ import { containedHandler } from "../hooks/use-contained-handler.js";
|
|
|
4
4
|
import { useLatest } from "../hooks/use-latest.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
7
|
-
|
|
7
|
+
// src/components/hex-color-picker.tsx
|
|
8
8
|
/**
|
|
9
9
|
* Hex color picker — saturation/brightness square + hue strip.
|
|
10
10
|
*
|
|
@@ -361,5 +361,4 @@ const HexColorPicker = ({ color = "000000", onChange, className }) => {
|
|
|
361
361
|
})]
|
|
362
362
|
});
|
|
363
363
|
};
|
|
364
|
-
//#endregion
|
|
365
364
|
export { HexColorPicker };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
|
-
//#region src/components/horizontal-scroller.d.ts
|
|
3
2
|
type ScrollDirection = "ltr" | "rtl";
|
|
4
3
|
type HorizontalScrollerProps = ComponentProps<"div"> & {
|
|
5
4
|
nextLabel: string;
|
|
@@ -16,5 +15,4 @@ export declare const HorizontalScroller: ({ children, className, nextLabel, prev
|
|
|
16
15
|
export declare const scrollState: (scrollLeft: number, scrollWidth: number, clientWidth: number, direction: ScrollDirection) => ScrollState;
|
|
17
16
|
/** Wheel deltas arrive in pixels, lines or pages; scrollBy takes pixels. */
|
|
18
17
|
export declare const wheelDeltaPixels: (event: Pick<WheelEvent, "deltaMode" | "deltaY">, node: Pick<HTMLElement, "clientWidth">) => number;
|
|
19
|
-
//#endregion
|
|
20
18
|
export {};
|
|
@@ -5,7 +5,7 @@ import { containedEventHandler } from "../hooks/use-contained-handler.js";
|
|
|
5
5
|
import { SCROLL_EDGE_FADE_CLASS, writeScrollEdgeFade } from "../lib/scroll-edge-fade.js";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { useCallback, useState } from "react";
|
|
8
|
-
|
|
8
|
+
// src/components/horizontal-scroller.tsx
|
|
9
9
|
const CONTROL_CLASS = "bg-background/90 text-foreground absolute top-1/2 -translate-y-1/2 rounded-full border p-1 shadow-sm";
|
|
10
10
|
const HorizontalScroller = ({ children, className, nextLabel, previousLabel, contentClassName, viewportClassName, ...props }) => {
|
|
11
11
|
const [viewport, setViewport] = useState(null);
|
|
@@ -105,5 +105,4 @@ const wheelDeltaPixels = (event, node) => {
|
|
|
105
105
|
default: return event.deltaY;
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
|
-
//#endregion
|
|
109
108
|
export { HorizontalScroller, scrollState, wheelDeltaPixels };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
//#region src/components/identity-text.d.ts
|
|
2
1
|
type IdentityTextProps = {
|
|
3
2
|
children: string;
|
|
4
3
|
className?: string;
|
|
5
4
|
};
|
|
6
5
|
/** Discloses clipped names on hover and when their owning control receives focus. */
|
|
7
6
|
export declare const IdentityText: ({ children, className }: IdentityTextProps) => import("react").JSX.Element;
|
|
8
|
-
//#endregion
|
|
9
7
|
export {};
|
|
@@ -4,7 +4,7 @@ import { Tooltip, TooltipContent as TooltipPopup, TooltipTrigger } from "./toolt
|
|
|
4
4
|
import { withoutDirectionalControls } from "./bidi-text.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { useCallback, useId, useState } from "react";
|
|
7
|
-
|
|
7
|
+
// src/components/identity-text.tsx
|
|
8
8
|
/** Discloses clipped names on hover and when their owning control receives focus. */
|
|
9
9
|
const IdentityText = ({ children, className }) => {
|
|
10
10
|
const triggerId = useId();
|
|
@@ -70,5 +70,4 @@ const IdentityText = ({ children, className }) => {
|
|
|
70
70
|
})]
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
|
-
//#endregion
|
|
74
73
|
export { IdentityText };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { InlineDropPosition } from "../lib/inline-reorder.js";
|
|
2
|
-
//#region src/components/inline-drop-indicator.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* The bar beside a dragged-over item in a horizontal row. Render it inside
|
|
5
4
|
* the item's positioned wrapper; `before`/`after` follow the text direction.
|
|
6
5
|
*/
|
|
7
6
|
export declare const InlineDropIndicator: ({ position }: {
|
|
8
7
|
position: InlineDropPosition | null;
|
|
9
|
-
}) => import("react").JSX.Element | null;
|
|
10
|
-
//#endregion
|
|
8
|
+
}) => import("react").JSX.Element | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/components/inline-drop-indicator.tsx
|
|
4
4
|
/**
|
|
5
5
|
* The bar beside a dragged-over item in a horizontal row. Render it inside
|
|
6
6
|
* the item's positioned wrapper; `before`/`after` follow the text direction.
|
|
@@ -9,5 +9,4 @@ const InlineDropIndicator = ({ position }) => position === null ? null : /* @__P
|
|
|
9
9
|
"aria-hidden": "true",
|
|
10
10
|
className: cn("bg-primary pointer-events-none absolute inset-y-1 z-20 w-0.5 rounded-full", position === "before" ? "start-0" : "end-0")
|
|
11
11
|
});
|
|
12
|
-
//#endregion
|
|
13
12
|
export { InlineDropIndicator };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
|
-
//#region src/components/inline-rename.d.ts
|
|
3
2
|
type InlineRenameInputProps = Omit<ComponentProps<"input">, "value" | "onChange" | "onKeyDown" | "size"> & {
|
|
4
3
|
value: string;
|
|
5
4
|
onValueChange: (value: string) => void;
|
|
@@ -9,5 +8,4 @@ type InlineRenameInputProps = Omit<ComponentProps<"input">, "value" | "onChange"
|
|
|
9
8
|
fill?: boolean;
|
|
10
9
|
};
|
|
11
10
|
export declare const InlineRenameInput: ({ value, onValueChange, onCommit, onCancel, onBlur, className, ref, dir, fill, ...props }: InlineRenameInputProps) => import("react").JSX.Element;
|
|
12
|
-
//#endregion
|
|
13
11
|
export {};
|
|
@@ -3,7 +3,7 @@ import { contentDir, isStructuredInputType } from "../hooks/use-content-dir.js";
|
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { useCallback, useImperativeHandle, useRef } from "react";
|
|
5
5
|
import { panic } from "better-result";
|
|
6
|
-
|
|
6
|
+
// src/components/inline-rename.tsx
|
|
7
7
|
/** Content-sized rename field; the title's parent owns its typography. */
|
|
8
8
|
const mirrorTextFor = (value, placeholder) => {
|
|
9
9
|
if (value !== "") return value;
|
|
@@ -72,5 +72,4 @@ const InlineRenameInput = ({ value, onValueChange, onCommit, onCancel, onBlur, c
|
|
|
72
72
|
})]
|
|
73
73
|
});
|
|
74
74
|
};
|
|
75
|
-
//#endregion
|
|
76
75
|
export { InlineRenameInput };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/components/input-control.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* A text control is two boxes: the bordered wrapper a caller styles and the
|
|
4
3
|
* element the text is typed into. The wrapper is what a height applies to and
|
|
@@ -24,5 +23,4 @@ export declare const INPUT_SIZE_CLASS_NAMES: {
|
|
|
24
23
|
* the caret room, and a matching negative margin keeps the text in line with
|
|
25
24
|
* its neighbours.
|
|
26
25
|
*/
|
|
27
|
-
export declare const INLINE_FIELD_CLASS_NAME = "placeholder:text-foreground-placeholder focus-visible:ring-ring/30 -mx-1 min-h-0 w-full min-w-0 rounded-sm bg-transparent px-1 py-0 font-[inherit] text-[length:inherit] leading-[inherit] text-inherit outline-none focus-visible:ring-2";
|
|
28
|
-
//#endregion
|
|
26
|
+
export declare const INLINE_FIELD_CLASS_NAME = "placeholder:text-foreground-placeholder focus-visible:ring-ring/30 -mx-1 min-h-0 w-full min-w-0 rounded-sm bg-transparent px-1 py-0 font-[inherit] text-[length:inherit] leading-[inherit] text-inherit outline-none focus-visible:ring-2";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CONTROL_SIZE } from "../lib/control-size.js";
|
|
2
|
-
|
|
2
|
+
// src/components/input-control.ts
|
|
3
3
|
/**
|
|
4
4
|
* A text control is two boxes: the bordered wrapper a caller styles and the
|
|
5
5
|
* element the text is typed into. The wrapper is what a height applies to and
|
|
@@ -26,5 +26,4 @@ const INPUT_SIZE_CLASS_NAMES = {
|
|
|
26
26
|
* its neighbours.
|
|
27
27
|
*/
|
|
28
28
|
const INLINE_FIELD_CLASS_NAME = "placeholder:text-foreground-placeholder focus-visible:ring-ring/30 -mx-1 min-h-0 w-full min-w-0 rounded-sm bg-transparent px-1 py-0 font-[inherit] text-[length:inherit] leading-[inherit] text-inherit outline-none focus-visible:ring-2";
|
|
29
|
-
//#endregion
|
|
30
29
|
export { INLINE_FIELD_CLASS_NAME, INPUT_CONTROL_CLASS_NAME, INPUT_ELEMENT_CLASS_NAME, INPUT_SIZE_CLASS_NAMES };
|
|
@@ -2,7 +2,6 @@ import * as React$1 from "react";
|
|
|
2
2
|
import { InputProps } from "./input.js";
|
|
3
3
|
import { TextareaProps } from "./textarea.js";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
|
-
//#region src/components/input-group.d.ts
|
|
6
5
|
declare const InputGroup: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
|
|
7
6
|
declare const inputGroupAddonVariants: (props?: ({
|
|
8
7
|
align?: "block-end" | "block-start" | "inline-end" | "inline-start" | null | undefined;
|
|
@@ -11,5 +10,4 @@ declare const InputGroupAddon: ({ className, align, ...props }: React$1.Componen
|
|
|
11
10
|
declare const InputGroupText: ({ className, ...props }: React$1.ComponentProps<"span">) => React$1.JSX.Element;
|
|
12
11
|
declare const InputGroupInput: ({ className, ...props }: InputProps) => React$1.JSX.Element;
|
|
13
12
|
declare const InputGroupTextarea: ({ className, ...props }: TextareaProps) => React$1.JSX.Element;
|
|
14
|
-
//#endregion
|
|
15
13
|
export { InputGroup, InputGroupAddon, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
@@ -4,7 +4,7 @@ import { Input } from "./input.js";
|
|
|
4
4
|
import { Textarea } from "./textarea.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { cva } from "class-variance-authority";
|
|
7
|
-
|
|
7
|
+
// src/components/input-group.tsx
|
|
8
8
|
const InputGroup = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
9
9
|
className: cn("border-input bg-background text-foreground ring-ring/24 has-autofill:bg-foreground/4 has-[input:focus-visible,textarea:focus-visible]:border-ring has-[input[aria-invalid],textarea[aria-invalid]]:border-destructive/36 has-[input:focus-visible,textarea:focus-visible]:has-[input[aria-invalid],textarea[aria-invalid]]:border-destructive/64 has-[input:focus-visible,textarea:focus-visible]:has-[input[aria-invalid],textarea[aria-invalid]]:ring-destructive/16 dark:bg-input/32 dark:has-autofill:bg-foreground/8 dark:has-[input[aria-invalid],textarea[aria-invalid]]:ring-destructive/24 relative inline-flex w-full min-w-0 items-center rounded-lg border text-base shadow-xs/5 not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-[input:disabled,textarea:disabled]:not-has-[input:focus-visible,textarea:focus-visible]:not-has-[input[aria-invalid],textarea[aria-invalid]]:before:shadow-[0_1px_--theme(--color-black/4%)] has-data-[align=block-end]:h-auto has-data-[align=block-end]:flex-col has-data-[align=block-start]:h-auto has-data-[align=block-start]:flex-col has-[input:disabled,textarea:disabled]:opacity-64 has-[input:disabled,textarea:disabled,input:focus-visible,textarea:focus-visible,input[aria-invalid],textarea[aria-invalid]]:shadow-none has-[input:focus-visible,textarea:focus-visible]:ring-[3px] has-[textarea]:h-auto sm:text-sm dark:not-has-[input:disabled,textarea:disabled]:not-has-[input:focus-visible,textarea:focus-visible]:not-has-[input[aria-invalid],textarea[aria-invalid]]:before:shadow-[0_-1px_--theme(--color-white/6%)] has-data-[align=inline-end]:**:[[data-size=sm]_input]:pe-1.5 has-data-[align=inline-start]:**:[[data-size=sm]_input]:ps-1.5 *:[[data-slot=input-control],[data-slot=textarea-control]]:contents *:[[data-slot=input-control],[data-slot=textarea-control]]:before:hidden has-data-[align=block-end]:**:[input]:pt-1.5 has-data-[align=block-start]:**:[input]:pb-1.5 has-data-[align=inline-end]:**:[input]:pe-2 has-data-[align=inline-start]:**:[input]:ps-2 has-[[data-align=block-start],[data-align=block-end]]:**:[input]:h-auto **:[textarea_button]:rounded-[calc(var(--radius-md)-1px)] **:[textarea]:min-h-20.5 **:[textarea]:resize-none **:[textarea]:py-[calc(--spacing(3)-1px)] **:[textarea]:max-sm:min-h-23.5", className),
|
|
10
10
|
"data-slot": "input-group",
|
|
@@ -49,5 +49,4 @@ const InputGroupTextarea = ({ className, ...props }) => /* @__PURE__ */ jsx(Text
|
|
|
49
49
|
unstyled: true,
|
|
50
50
|
...props
|
|
51
51
|
});
|
|
52
|
-
//#endregion
|
|
53
52
|
export { InputGroup, InputGroupAddon, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
2
|
import { OTPInput } from "input-otp";
|
|
3
|
-
//#region src/components/input-otp.d.ts
|
|
4
3
|
declare const InputOTP: ({ className, containerClassName, ...props }: React$1.ComponentProps<typeof OTPInput> & {
|
|
5
4
|
containerClassName?: string;
|
|
6
5
|
}) => React$1.JSX.Element;
|
|
@@ -9,5 +8,4 @@ declare const InputOTPSlot: ({ index, className, ...props }: React$1.ComponentPr
|
|
|
9
8
|
index: number;
|
|
10
9
|
}) => React$1.JSX.Element;
|
|
11
10
|
declare const InputOTPSeparator: ({ ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
|
|
12
|
-
//#endregion
|
|
13
11
|
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
@@ -4,7 +4,7 @@ import { cn } from "../lib/utils.js";
|
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
7
|
-
|
|
7
|
+
// src/components/input-otp.tsx
|
|
8
8
|
const InputOTP = ({ className, containerClassName, ...props }) => /* @__PURE__ */ jsx(OTPInput, {
|
|
9
9
|
className: cn("disabled:cursor-not-allowed", className),
|
|
10
10
|
containerClassName: cn("flex items-center gap-2 has-disabled:opacity-50", containerClassName),
|
|
@@ -35,5 +35,4 @@ const InputOTPSeparator = ({ ...props }) => /* @__PURE__ */ jsx("div", {
|
|
|
35
35
|
...props,
|
|
36
36
|
children: /* @__PURE__ */ jsx(MinusIcon, {})
|
|
37
37
|
});
|
|
38
|
-
//#endregion
|
|
39
38
|
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
2
|
import { ControlSize } from "../lib/control-size.js";
|
|
3
3
|
import { Input as Input$1 } from "@base-ui/react/input";
|
|
4
|
-
//#region src/components/input.d.ts
|
|
5
4
|
type InputProps = Omit<Input$1.Props & React$1.RefAttributes<HTMLInputElement>, "size" | "style" | "type"> & {
|
|
6
5
|
type?: Exclude<React$1.HTMLInputTypeAttribute, "file"> | undefined;
|
|
7
6
|
size?: ControlSize | number;
|
|
@@ -16,5 +15,4 @@ type InputProps = Omit<Input$1.Props & React$1.RefAttributes<HTMLInputElement>,
|
|
|
16
15
|
nativeInput?: boolean;
|
|
17
16
|
};
|
|
18
17
|
declare const Input: ({ className, size, unstyled, inline, nativeInput, dir, onChange, ...props }: InputProps) => React$1.JSX.Element;
|
|
19
|
-
//#endregion
|
|
20
18
|
export { Input, type InputProps };
|
package/dist/components/input.js
CHANGED
|
@@ -6,7 +6,7 @@ import { isStructuredInputType, useContentDir } from "../hooks/use-content-dir.j
|
|
|
6
6
|
import { INLINE_FIELD_CLASS_NAME, INPUT_ELEMENT_CLASS_NAME, INPUT_SIZE_CLASS_NAMES } from "./input-control.js";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { Input as Input$1 } from "@base-ui/react/input";
|
|
9
|
-
|
|
9
|
+
// src/components/input.tsx
|
|
10
10
|
const Input = ({ className, size = CONTROL_SIZE.default, unstyled = false, inline = false, nativeInput = false, dir, onChange, ...props }) => {
|
|
11
11
|
const controlSize = typeof size === "number" ? CONTROL_SIZE.default : size;
|
|
12
12
|
const contentDir = useContentDir({
|
|
@@ -45,5 +45,4 @@ const Input = ({ className, size = CONTROL_SIZE.default, unstyled = false, inlin
|
|
|
45
45
|
})]
|
|
46
46
|
});
|
|
47
47
|
};
|
|
48
|
-
//#endregion
|
|
49
48
|
export { Input };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { InputContract, TextFieldContract } from "./input.shared.js";
|
|
2
2
|
import { TextInputProps } from "react-native";
|
|
3
|
-
//#region src/components/input.native.d.ts
|
|
4
3
|
type NativeFieldProps = Omit<TextInputProps, keyof TextFieldContract> & TextFieldContract & {
|
|
5
4
|
className?: string | undefined;
|
|
6
5
|
};
|
|
@@ -19,5 +18,4 @@ type InputProps = NativeFieldProps & {
|
|
|
19
18
|
* box, or iOS's filled search field for `type="search"`.
|
|
20
19
|
*/
|
|
21
20
|
export declare const Input: ({ type, unstyled, size, ...props }: InputProps) => import("react").JSX.Element;
|
|
22
|
-
//#endregion
|
|
23
21
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { textFontFamily } from "./text.native.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { TextInput } from "react-native";
|
|
4
|
-
|
|
4
|
+
// src/components/input.native.tsx
|
|
5
5
|
/** The field's text at each control size, as the web sets it on a phone. */
|
|
6
6
|
const TEXT_SIZE = {
|
|
7
7
|
sm: "text-sm",
|
|
@@ -62,5 +62,4 @@ const Input = ({ type = "text", unstyled = false, size = "default", ...props })
|
|
|
62
62
|
box: inputBox(type, size, unstyled),
|
|
63
63
|
size
|
|
64
64
|
});
|
|
65
|
-
//#endregion
|
|
66
65
|
export { Input, NativeField };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ControlSize } from "../lib/control-size.js";
|
|
2
|
-
//#region src/components/input.shared.d.ts
|
|
3
2
|
/** The props every text field renderer accepts, with one meaning. */
|
|
4
3
|
export type TextFieldContract = {
|
|
5
4
|
size?: ControlSize;
|
|
@@ -15,5 +14,4 @@ export type TextFieldContract = {
|
|
|
15
14
|
/** A single-line field also says what it holds; `search` draws a search field. */
|
|
16
15
|
export type InputContract = TextFieldContract & {
|
|
17
16
|
type?: "email" | "search" | "tel" | "text" | "url";
|
|
18
|
-
};
|
|
19
|
-
//#endregion
|
|
17
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
/**
|
|
3
|
+
* A key or a key combination, drawn as key caps.
|
|
4
|
+
*
|
|
5
|
+
* Give it `keys` and it spells modifiers the way the reader's platform does:
|
|
6
|
+
* `["mod", "K"]` reads `⌘K` on Apple devices and `Ctrl+K` elsewhere. The
|
|
7
|
+
* server and the first client render use the non-Apple spelling, and the
|
|
8
|
+
* label switches once mounted, so hydration never disagrees. Children are
|
|
9
|
+
* shown as written, for a key that needs no translation.
|
|
10
|
+
*
|
|
11
|
+
* `MenuShortcut` and `TooltipPopup`'s `shortcut` render through it, so a
|
|
12
|
+
* shortcut reads the same in a menu, a tooltip and a hint.
|
|
13
|
+
*/
|
|
14
|
+
declare const Kbd: ({ className, children, keys, variant, ...props }: KbdProps) => React$1.JSX.Element;
|
|
15
|
+
/** A modifier or named key `Kbd` spells per platform; anything else as is. */
|
|
16
|
+
type KbdNamedKey = "mod" | "ctrl" | "alt" | "shift" | "enter" | "escape" | "backspace" | "delete" | "tab" | "up" | "down" | "left" | "right";
|
|
17
|
+
/**
|
|
18
|
+
* A named key (see `KbdNamedKey`) or any other key (a letter, a digit, a
|
|
19
|
+
* symbol), which is shown as written.
|
|
20
|
+
*/
|
|
21
|
+
type KbdKey = string;
|
|
22
|
+
/**
|
|
23
|
+
* A combination: at least one key, so a shortcut can never draw an empty
|
|
24
|
+
* key cap.
|
|
25
|
+
*/
|
|
26
|
+
type KbdKeys = readonly [KbdKey, ...KbdKey[]];
|
|
27
|
+
type KbdPlatform = "apple" | "other";
|
|
28
|
+
/**
|
|
29
|
+
* - `cap` (default): a boxed key cap, for a shortcut that stands on its own
|
|
30
|
+
* (a hint, a tooltip).
|
|
31
|
+
* - `plain`: the keys as quiet text with no box, for the end of a row of
|
|
32
|
+
* labels (a menu item), where caps would crowd it.
|
|
33
|
+
*/
|
|
34
|
+
type KbdVariant = "cap" | "plain";
|
|
35
|
+
type KbdProps = React$1.ComponentProps<"kbd"> & {
|
|
36
|
+
keys?: KbdKeys | undefined;
|
|
37
|
+
variant?: KbdVariant | undefined;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* The combination as the platform writes it: Apple glyphs run together
|
|
41
|
+
* (`⌘⇧K`), other platforms join words with `+` (`Ctrl+Shift+K`).
|
|
42
|
+
*/
|
|
43
|
+
declare function formatKeys(keys: readonly KbdKey[], platform: KbdPlatform): string;
|
|
44
|
+
/** What platform detection reads; `userAgentData` is not in every browser. */
|
|
45
|
+
type KbdNavigator = Pick<Navigator, "platform"> & {
|
|
46
|
+
userAgentData?: {
|
|
47
|
+
platform?: string | undefined;
|
|
48
|
+
} | undefined;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* The platform a navigator reports. A browser that has `userAgentData` may
|
|
52
|
+
* leave its `platform` empty, so an empty name falls back to
|
|
53
|
+
* `navigator.platform` as a missing one does.
|
|
54
|
+
*/
|
|
55
|
+
declare function kbdPlatformOf(nav: KbdNavigator): KbdPlatform;
|
|
56
|
+
/** The reader's platform once mounted; `other` on the server and in hydration. */
|
|
57
|
+
declare function useKbdPlatform(): KbdPlatform;
|
|
58
|
+
export { Kbd, type KbdKey, type KbdKeys, type KbdNamedKey, type KbdNavigator, type KbdPlatform, type KbdProps, type KbdVariant, formatKeys, kbdPlatformOf, useKbdPlatform };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { useSyncExternalStore } from "react";
|
|
5
|
+
// src/components/kbd.tsx
|
|
6
|
+
/**
|
|
7
|
+
* A key or a key combination, drawn as key caps.
|
|
8
|
+
*
|
|
9
|
+
* Give it `keys` and it spells modifiers the way the reader's platform does:
|
|
10
|
+
* `["mod", "K"]` reads `⌘K` on Apple devices and `Ctrl+K` elsewhere. The
|
|
11
|
+
* server and the first client render use the non-Apple spelling, and the
|
|
12
|
+
* label switches once mounted, so hydration never disagrees. Children are
|
|
13
|
+
* shown as written, for a key that needs no translation.
|
|
14
|
+
*
|
|
15
|
+
* `MenuShortcut` and `TooltipPopup`'s `shortcut` render through it, so a
|
|
16
|
+
* shortcut reads the same in a menu, a tooltip and a hint.
|
|
17
|
+
*/
|
|
18
|
+
const Kbd = ({ className, children, keys, variant = "cap", ...props }) => {
|
|
19
|
+
const platform = useKbdPlatform();
|
|
20
|
+
return /* @__PURE__ */ jsx("kbd", {
|
|
21
|
+
className: cn("inline-flex shrink-0 items-center justify-center gap-0.5 font-sans leading-none font-medium tabular-nums", KBD_VARIANT_CLASS_NAME[variant], className),
|
|
22
|
+
"data-slot": "kbd",
|
|
23
|
+
"data-variant": variant,
|
|
24
|
+
...props,
|
|
25
|
+
children: keys === void 0 ? children : formatKeys(keys, platform)
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
const KBD_VARIANT_CLASS_NAME = {
|
|
29
|
+
cap: "border-border bg-muted text-muted-foreground text-2xs h-5 min-w-5 rounded border px-1",
|
|
30
|
+
plain: "text-foreground-label text-xs tracking-widest"
|
|
31
|
+
};
|
|
32
|
+
const KEY_LABELS = {
|
|
33
|
+
apple: {
|
|
34
|
+
alt: "⌥",
|
|
35
|
+
backspace: "⌫",
|
|
36
|
+
ctrl: "⌃",
|
|
37
|
+
delete: "⌦",
|
|
38
|
+
down: "↓",
|
|
39
|
+
enter: "↩",
|
|
40
|
+
escape: "Esc",
|
|
41
|
+
left: "←",
|
|
42
|
+
mod: "⌘",
|
|
43
|
+
right: "→",
|
|
44
|
+
shift: "⇧",
|
|
45
|
+
tab: "⇥",
|
|
46
|
+
up: "↑"
|
|
47
|
+
},
|
|
48
|
+
other: {
|
|
49
|
+
alt: "Alt",
|
|
50
|
+
backspace: "Backspace",
|
|
51
|
+
ctrl: "Ctrl",
|
|
52
|
+
delete: "Del",
|
|
53
|
+
down: "↓",
|
|
54
|
+
enter: "Enter",
|
|
55
|
+
escape: "Esc",
|
|
56
|
+
left: "←",
|
|
57
|
+
mod: "Ctrl",
|
|
58
|
+
right: "→",
|
|
59
|
+
shift: "Shift",
|
|
60
|
+
tab: "Tab",
|
|
61
|
+
up: "↑"
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
function isNamedKey(key) {
|
|
65
|
+
return Object.hasOwn(KEY_LABELS.other, key);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The combination as the platform writes it: Apple glyphs run together
|
|
69
|
+
* (`⌘⇧K`), other platforms join words with `+` (`Ctrl+Shift+K`).
|
|
70
|
+
*/
|
|
71
|
+
function formatKeys(keys, platform) {
|
|
72
|
+
return keys.map((key) => isNamedKey(key) ? KEY_LABELS[platform][key] : key).join(platform === "apple" ? "" : "+");
|
|
73
|
+
}
|
|
74
|
+
const APPLE_PLATFORM_PATTERN = /mac|iphone|ipad|ipod/iu;
|
|
75
|
+
/**
|
|
76
|
+
* The platform a navigator reports. A browser that has `userAgentData` may
|
|
77
|
+
* leave its `platform` empty, so an empty name falls back to
|
|
78
|
+
* `navigator.platform` as a missing one does.
|
|
79
|
+
*/
|
|
80
|
+
function kbdPlatformOf(nav) {
|
|
81
|
+
const name = nav.userAgentData?.platform || nav.platform;
|
|
82
|
+
return APPLE_PLATFORM_PATTERN.test(name) ? "apple" : "other";
|
|
83
|
+
}
|
|
84
|
+
const detectKbdPlatform = () => kbdPlatformOf(navigator);
|
|
85
|
+
const subscribeToNothing = () => () => void 0;
|
|
86
|
+
/** The reader's platform once mounted; `other` on the server and in hydration. */
|
|
87
|
+
function useKbdPlatform() {
|
|
88
|
+
return useSyncExternalStore(subscribeToNothing, detectKbdPlatform, () => "other");
|
|
89
|
+
}
|
|
90
|
+
export { Kbd, formatKeys, kbdPlatformOf, useKbdPlatform };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
-
//#region src/components/label.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* - `default`: the caption above or beside a control.
|
|
5
4
|
* - `choice`: one row of a list of choices, wrapping its radio or checkbox so
|
|
@@ -23,5 +22,4 @@ type LabelVariant = keyof typeof LABEL_VARIANT_CLASS_NAME;
|
|
|
23
22
|
declare function Label({ className, render, variant, ...props }: useRender.ComponentProps<"label"> & {
|
|
24
23
|
variant?: LabelVariant;
|
|
25
24
|
}): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
26
|
-
//#endregion
|
|
27
25
|
export { Label, type LabelVariant };
|
package/dist/components/label.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
3
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
4
|
import { useRender } from "@base-ui/react/use-render";
|
|
5
|
-
|
|
5
|
+
// src/components/label.tsx
|
|
6
6
|
/**
|
|
7
7
|
* - `default`: the caption above or beside a control.
|
|
8
8
|
* - `choice`: one row of a list of choices, wrapping its radio or checkbox so
|
|
@@ -33,5 +33,4 @@ function Label({ className, render, variant = "default", ...props }) {
|
|
|
33
33
|
render
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
//#endregion
|
|
37
36
|
export { Label };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from "react";
|
|
2
|
-
//#region src/components/landing.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* A home screen's one shape: a greeting and a box in the upper fold, three
|
|
5
4
|
* columns of what the reader reaches from it below. The chat home and the
|
|
@@ -61,5 +60,4 @@ type LandingEmptyProps = {
|
|
|
61
60
|
children: ReactNode;
|
|
62
61
|
};
|
|
63
62
|
export declare const LandingEmpty: ({ children }: LandingEmptyProps) => import("react").JSX.Element;
|
|
64
|
-
//#endregion
|
|
65
63
|
export {};
|
|
@@ -3,7 +3,7 @@ import { cn } from "../lib/utils.js";
|
|
|
3
3
|
import { BidiText } from "./bidi-text.js";
|
|
4
4
|
import { ScrollArea } from "./scroll-area.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/components/landing.tsx
|
|
7
7
|
const LandingLayout = ({ actions, hero, children, footer }) => /* @__PURE__ */ jsxs("div", {
|
|
8
8
|
className: "mx-auto flex h-full w-full max-w-5xl flex-1 flex-col overflow-hidden",
|
|
9
9
|
children: [actions, /* @__PURE__ */ jsx("div", {
|
|
@@ -106,5 +106,4 @@ const LandingEmpty = ({ children }) => /* @__PURE__ */ jsx("div", {
|
|
|
106
106
|
className: "border-border text-muted-foreground rounded-md border border-dashed px-3 py-3 text-sm",
|
|
107
107
|
children
|
|
108
108
|
});
|
|
109
|
-
//#endregion
|
|
110
109
|
export { LANDING_ROW_CLASS, LANDING_SECTION_HEADING_CLASS, LandingButton, LandingEmpty, LandingGreeting, LandingItemText, LandingLayout, LandingRowIcon, LandingSection };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
-
//#region src/components/list.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Grouped list: a titled section holding one surface of hairline-divided
|
|
7
6
|
* rows. Use it for settings and inventories of named things (connections,
|
|
@@ -60,5 +59,4 @@ type StatusTone = "neutral" | "success" | "warning" | "destructive";
|
|
|
60
59
|
declare const ListItemStatus: ({ tone, className, children, ...props }: React$1.ComponentProps<"span"> & {
|
|
61
60
|
tone?: StatusTone;
|
|
62
61
|
}) => React$1.JSX.Element;
|
|
63
|
-
//#endregion
|
|
64
62
|
export { List, ListEmpty, ListGroup, ListGroupAction, ListGroupCount, ListGroupDescription, ListGroupHeader, ListGroupHeading, ListGroupTitle, ListItem, ListItemActions, ListItemContent, ListItemDescription, ListItemMedia, ListItemStatus, ListItemTitle, type StatusTone };
|