@sdxc/ui 0.0.0-pre.1
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/LICENSE.md +21 -0
- package/README.md +812 -0
- package/dist/animations/index.d.ts +12 -0
- package/dist/animations/index.js +12 -0
- package/dist/animations/keyframes.d.ts +162 -0
- package/dist/animations/keyframes.js +297 -0
- package/dist/animations/scroll.d.ts +154 -0
- package/dist/animations/scroll.js +228 -0
- package/dist/animations/tokens.d.ts +47 -0
- package/dist/animations/tokens.js +47 -0
- package/dist/animations/transitions.d.ts +143 -0
- package/dist/animations/transitions.js +147 -0
- package/dist/behaviors/announcer.d.ts +90 -0
- package/dist/behaviors/announcer.js +93 -0
- package/dist/behaviors/calendar-model.d.ts +218 -0
- package/dist/behaviors/calendar-model.js +376 -0
- package/dist/behaviors/drag-session.d.ts +119 -0
- package/dist/behaviors/drag-session.js +110 -0
- package/dist/behaviors/filter-model.d.ts +117 -0
- package/dist/behaviors/filter-model.js +185 -0
- package/dist/behaviors/index.d.ts +16 -0
- package/dist/behaviors/index.js +16 -0
- package/dist/behaviors/resize-session.d.ts +115 -0
- package/dist/behaviors/resize-session.js +157 -0
- package/dist/behaviors/scroll-follow-model.d.ts +180 -0
- package/dist/behaviors/scroll-follow-model.js +197 -0
- package/dist/behaviors/selection-model.d.ts +129 -0
- package/dist/behaviors/selection-model.js +259 -0
- package/dist/behaviors/toaster.d.ts +144 -0
- package/dist/behaviors/toaster.js +228 -0
- package/dist/components/accordion.d.ts +93 -0
- package/dist/components/accordion.js +165 -0
- package/dist/components/alert-dialog.d.ts +110 -0
- package/dist/components/alert-dialog.js +169 -0
- package/dist/components/alert.d.ts +109 -0
- package/dist/components/alert.js +160 -0
- package/dist/components/aspect-ratio.d.ts +44 -0
- package/dist/components/aspect-ratio.js +35 -0
- package/dist/components/attachment.d.ts +146 -0
- package/dist/components/attachment.js +320 -0
- package/dist/components/avatar.d.ts +118 -0
- package/dist/components/avatar.js +89 -0
- package/dist/components/badge.d.ts +66 -0
- package/dist/components/badge.js +129 -0
- package/dist/components/breadcrumbs.d.ts +67 -0
- package/dist/components/breadcrumbs.js +121 -0
- package/dist/components/bubble.d.ts +91 -0
- package/dist/components/bubble.js +216 -0
- package/dist/components/button.d.ts +78 -0
- package/dist/components/button.js +207 -0
- package/dist/components/calendar.d.ts +166 -0
- package/dist/components/calendar.js +320 -0
- package/dist/components/card.d.ts +82 -0
- package/dist/components/card.js +126 -0
- package/dist/components/carousel.d.ts +96 -0
- package/dist/components/carousel.js +214 -0
- package/dist/components/chart.d.ts +485 -0
- package/dist/components/chart.js +563 -0
- package/dist/components/checkbox-group.d.ts +58 -0
- package/dist/components/checkbox-group.js +53 -0
- package/dist/components/checkbox.d.ts +61 -0
- package/dist/components/checkbox.js +81 -0
- package/dist/components/color-area.d.ts +83 -0
- package/dist/components/color-area.js +251 -0
- package/dist/components/color-field.d.ts +128 -0
- package/dist/components/color-field.js +73 -0
- package/dist/components/color-picker.d.ts +132 -0
- package/dist/components/color-picker.js +183 -0
- package/dist/components/color-slider.d.ts +103 -0
- package/dist/components/color-slider.js +198 -0
- package/dist/components/color-swatch-picker.d.ts +106 -0
- package/dist/components/color-swatch-picker.js +75 -0
- package/dist/components/color-swatch.d.ts +57 -0
- package/dist/components/color-swatch.js +82 -0
- package/dist/components/color-wheel.d.ts +58 -0
- package/dist/components/color-wheel.js +160 -0
- package/dist/components/combobox.d.ts +73 -0
- package/dist/components/combobox.js +108 -0
- package/dist/components/command.d.ts +80 -0
- package/dist/components/command.js +151 -0
- package/dist/components/confirm.d.ts +124 -0
- package/dist/components/confirm.js +56 -0
- package/dist/components/context-menu.d.ts +108 -0
- package/dist/components/context-menu.js +200 -0
- package/dist/components/date-field.d.ts +110 -0
- package/dist/components/date-field.js +49 -0
- package/dist/components/date-picker.d.ts +136 -0
- package/dist/components/date-picker.js +155 -0
- package/dist/components/date-range-picker.d.ts +152 -0
- package/dist/components/date-range-picker.js +106 -0
- package/dist/components/description.d.ts +36 -0
- package/dist/components/description.js +21 -0
- package/dist/components/dialog.d.ts +97 -0
- package/dist/components/dialog.js +203 -0
- package/dist/components/disclosure.d.ts +85 -0
- package/dist/components/disclosure.js +180 -0
- package/dist/components/drawer.d.ts +82 -0
- package/dist/components/drawer.js +162 -0
- package/dist/components/drop-indicator.d.ts +43 -0
- package/dist/components/drop-indicator.js +47 -0
- package/dist/components/drop-zone.d.ts +73 -0
- package/dist/components/drop-zone.js +54 -0
- package/dist/components/empty.d.ts +89 -0
- package/dist/components/empty.js +129 -0
- package/dist/components/field-error.d.ts +41 -0
- package/dist/components/field-error.js +36 -0
- package/dist/components/file-trigger.d.ts +84 -0
- package/dist/components/file-trigger.js +169 -0
- package/dist/components/form.d.ts +118 -0
- package/dist/components/form.js +113 -0
- package/dist/components/grid-list.d.ts +112 -0
- package/dist/components/grid-list.js +220 -0
- package/dist/components/group.d.ts +45 -0
- package/dist/components/group.js +44 -0
- package/dist/components/header.d.ts +33 -0
- package/dist/components/header.js +29 -0
- package/dist/components/heading-scope.d.ts +83 -0
- package/dist/components/heading-scope.js +82 -0
- package/dist/components/heading.d.ts +50 -0
- package/dist/components/heading.js +31 -0
- package/dist/components/hover-card.d.ts +77 -0
- package/dist/components/hover-card.js +151 -0
- package/dist/components/image-placeholder.d.ts +105 -0
- package/dist/components/image-placeholder.js +212 -0
- package/dist/components/index.d.ts +109 -0
- package/dist/components/index.js +109 -0
- package/dist/components/input.d.ts +53 -0
- package/dist/components/input.js +76 -0
- package/dist/components/item.d.ts +97 -0
- package/dist/components/item.js +185 -0
- package/dist/components/keyboard.d.ts +33 -0
- package/dist/components/keyboard.js +20 -0
- package/dist/components/label.d.ts +38 -0
- package/dist/components/label.js +24 -0
- package/dist/components/link-button.d.ts +59 -0
- package/dist/components/link-button.js +174 -0
- package/dist/components/link.d.ts +43 -0
- package/dist/components/link.js +85 -0
- package/dist/components/listbox.d.ts +119 -0
- package/dist/components/listbox.js +114 -0
- package/dist/components/logo.d.ts +117 -0
- package/dist/components/logo.js +89 -0
- package/dist/components/marker.d.ts +82 -0
- package/dist/components/marker.js +163 -0
- package/dist/components/menu.d.ts +90 -0
- package/dist/components/menu.js +146 -0
- package/dist/components/menubar.d.ts +54 -0
- package/dist/components/menubar.js +118 -0
- package/dist/components/message-scroller.d.ts +109 -0
- package/dist/components/message-scroller.js +180 -0
- package/dist/components/message.d.ts +104 -0
- package/dist/components/message.js +200 -0
- package/dist/components/meter.d.ts +60 -0
- package/dist/components/meter.js +110 -0
- package/dist/components/modal.d.ts +71 -0
- package/dist/components/modal.js +120 -0
- package/dist/components/nav-link.d.ts +53 -0
- package/dist/components/nav-link.js +83 -0
- package/dist/components/navigation-menu.d.ts +150 -0
- package/dist/components/navigation-menu.js +381 -0
- package/dist/components/number-field.d.ts +76 -0
- package/dist/components/number-field.js +190 -0
- package/dist/components/otp-field.d.ts +68 -0
- package/dist/components/otp-field.js +46 -0
- package/dist/components/overlay-arrow.d.ts +51 -0
- package/dist/components/overlay-arrow.js +77 -0
- package/dist/components/pagination.d.ts +67 -0
- package/dist/components/pagination.js +164 -0
- package/dist/components/popover.d.ts +69 -0
- package/dist/components/popover.js +68 -0
- package/dist/components/progress-bar.d.ts +53 -0
- package/dist/components/progress-bar.js +90 -0
- package/dist/components/radio-group.d.ts +102 -0
- package/dist/components/radio-group.js +114 -0
- package/dist/components/range-calendar.d.ts +169 -0
- package/dist/components/range-calendar.js +216 -0
- package/dist/components/resizable.d.ts +98 -0
- package/dist/components/resizable.js +151 -0
- package/dist/components/scroll-area.d.ts +54 -0
- package/dist/components/scroll-area.js +89 -0
- package/dist/components/search-field.d.ts +55 -0
- package/dist/components/search-field.js +49 -0
- package/dist/components/section.d.ts +37 -0
- package/dist/components/section.js +22 -0
- package/dist/components/select.d.ts +96 -0
- package/dist/components/select.js +285 -0
- package/dist/components/selection-indicator.d.ts +47 -0
- package/dist/components/selection-indicator.js +50 -0
- package/dist/components/sentinel-row.d.ts +22 -0
- package/dist/components/sentinel-row.js +29 -0
- package/dist/components/separator.d.ts +35 -0
- package/dist/components/separator.js +48 -0
- package/dist/components/shared-element.d.ts +45 -0
- package/dist/components/shared-element.js +48 -0
- package/dist/components/sheet.d.ts +78 -0
- package/dist/components/sheet.js +167 -0
- package/dist/components/sidebar.d.ts +288 -0
- package/dist/components/sidebar.js +1068 -0
- package/dist/components/skeleton.d.ts +36 -0
- package/dist/components/skeleton.js +38 -0
- package/dist/components/slider.d.ts +102 -0
- package/dist/components/slider.js +179 -0
- package/dist/components/spinner.d.ts +55 -0
- package/dist/components/spinner.js +51 -0
- package/dist/components/switch.d.ts +47 -0
- package/dist/components/switch.js +82 -0
- package/dist/components/table.d.ts +139 -0
- package/dist/components/table.js +216 -0
- package/dist/components/tabs.d.ts +124 -0
- package/dist/components/tabs.js +246 -0
- package/dist/components/tag-group.d.ts +83 -0
- package/dist/components/tag-group.js +157 -0
- package/dist/components/text-field.d.ts +119 -0
- package/dist/components/text-field.js +51 -0
- package/dist/components/text.d.ts +34 -0
- package/dist/components/text.js +19 -0
- package/dist/components/textarea.d.ts +52 -0
- package/dist/components/textarea.js +82 -0
- package/dist/components/time-field.d.ts +110 -0
- package/dist/components/time-field.js +48 -0
- package/dist/components/toast.d.ts +149 -0
- package/dist/components/toast.js +365 -0
- package/dist/components/toggle-button.d.ts +115 -0
- package/dist/components/toggle-button.js +237 -0
- package/dist/components/toolbar.d.ts +47 -0
- package/dist/components/toolbar.js +54 -0
- package/dist/components/tooltip.d.ts +52 -0
- package/dist/components/tooltip.js +92 -0
- package/dist/components/tree.d.ts +123 -0
- package/dist/components/tree.js +239 -0
- package/dist/components/typeset.d.ts +53 -0
- package/dist/components/typeset.js +271 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/mixins/aria-checked.d.ts +42 -0
- package/dist/mixins/aria-checked.js +127 -0
- package/dist/mixins/attachment-trigger.d.ts +64 -0
- package/dist/mixins/attachment-trigger.js +190 -0
- package/dist/mixins/calendar-keys.d.ts +27 -0
- package/dist/mixins/calendar-keys.js +113 -0
- package/dist/mixins/carousel-controls.d.ts +30 -0
- package/dist/mixins/carousel-controls.js +222 -0
- package/dist/mixins/chart-tooltip.d.ts +118 -0
- package/dist/mixins/chart-tooltip.js +323 -0
- package/dist/mixins/clear-field.d.ts +60 -0
- package/dist/mixins/clear-field.js +100 -0
- package/dist/mixins/color-area-drag.d.ts +58 -0
- package/dist/mixins/color-area-drag.js +162 -0
- package/dist/mixins/color-channel-sync.d.ts +73 -0
- package/dist/mixins/color-channel-sync.js +169 -0
- package/dist/mixins/color-preview.d.ts +28 -0
- package/dist/mixins/color-preview.js +77 -0
- package/dist/mixins/color-wheel-drag.d.ts +58 -0
- package/dist/mixins/color-wheel-drag.js +139 -0
- package/dist/mixins/combobox-filter.d.ts +59 -0
- package/dist/mixins/combobox-filter.js +81 -0
- package/dist/mixins/command-filter.d.ts +55 -0
- package/dist/mixins/command-filter.js +121 -0
- package/dist/mixins/command-keys.d.ts +31 -0
- package/dist/mixins/command-keys.js +116 -0
- package/dist/mixins/context-menu.d.ts +24 -0
- package/dist/mixins/context-menu.js +64 -0
- package/dist/mixins/copy-to-clipboard.d.ts +64 -0
- package/dist/mixins/copy-to-clipboard.js +109 -0
- package/dist/mixins/dismiss.d.ts +77 -0
- package/dist/mixins/dismiss.js +151 -0
- package/dist/mixins/drag-reorder.d.ts +88 -0
- package/dist/mixins/drag-reorder.js +214 -0
- package/dist/mixins/drop-zone.d.ts +52 -0
- package/dist/mixins/drop-zone.js +132 -0
- package/dist/mixins/dual-range.d.ts +60 -0
- package/dist/mixins/dual-range.js +100 -0
- package/dist/mixins/grid-list-keys.d.ts +34 -0
- package/dist/mixins/grid-list-keys.js +260 -0
- package/dist/mixins/heading-level-fallback.d.ts +81 -0
- package/dist/mixins/heading-level-fallback.js +112 -0
- package/dist/mixins/hotkey.d.ts +26 -0
- package/dist/mixins/hotkey.js +132 -0
- package/dist/mixins/image-fallback.d.ts +57 -0
- package/dist/mixins/image-fallback.js +86 -0
- package/dist/mixins/index.d.ts +48 -0
- package/dist/mixins/index.js +48 -0
- package/dist/mixins/listbox-keys.d.ts +52 -0
- package/dist/mixins/listbox-keys.js +63 -0
- package/dist/mixins/long-press.d.ts +76 -0
- package/dist/mixins/long-press.js +130 -0
- package/dist/mixins/menu-keys.d.ts +40 -0
- package/dist/mixins/menu-keys.js +117 -0
- package/dist/mixins/menubar-keys.d.ts +59 -0
- package/dist/mixins/menubar-keys.js +230 -0
- package/dist/mixins/message-follow.d.ts +56 -0
- package/dist/mixins/message-follow.js +368 -0
- package/dist/mixins/otp-slots.d.ts +53 -0
- package/dist/mixins/otp-slots.js +175 -0
- package/dist/mixins/persist.d.ts +36 -0
- package/dist/mixins/persist.js +78 -0
- package/dist/mixins/press-toggle.d.ts +43 -0
- package/dist/mixins/press-toggle.js +61 -0
- package/dist/mixins/range-preview.d.ts +26 -0
- package/dist/mixins/range-preview.js +120 -0
- package/dist/mixins/resize-handle.d.ts +101 -0
- package/dist/mixins/resize-handle.js +288 -0
- package/dist/mixins/stepper.d.ts +81 -0
- package/dist/mixins/stepper.js +194 -0
- package/dist/mixins/tab-keys.d.ts +30 -0
- package/dist/mixins/tab-keys.js +63 -0
- package/dist/mixins/theme-toggle.d.ts +82 -0
- package/dist/mixins/theme-toggle.js +158 -0
- package/dist/mixins/track-host-node.d.ts +34 -0
- package/dist/mixins/track-host-node.js +42 -0
- package/dist/mixins/treeKeys.d.ts +57 -0
- package/dist/mixins/treeKeys.js +266 -0
- package/dist/mixins/validate.d.ts +65 -0
- package/dist/mixins/validate.js +139 -0
- package/dist/mixins/view-transition.d.ts +56 -0
- package/dist/mixins/view-transition.js +111 -0
- package/dist/styles/chart-palette.d.ts +34 -0
- package/dist/styles/chart-palette.js +27 -0
- package/dist/styles/field-stack-layout.d.ts +27 -0
- package/dist/styles/field-stack-layout.js +16 -0
- package/dist/styles/floating-surface.d.ts +32 -0
- package/dist/styles/floating-surface.js +30 -0
- package/dist/styles/graphic-host.d.ts +25 -0
- package/dist/styles/graphic-host.js +18 -0
- package/dist/styles/index.d.ts +20 -0
- package/dist/styles/index.js +20 -0
- package/dist/styles/interactive-transition.d.ts +32 -0
- package/dist/styles/interactive-transition.js +32 -0
- package/dist/styles/legend-toggle.d.ts +29 -0
- package/dist/styles/legend-toggle.js +24 -0
- package/dist/styles/output-caption-text.d.ts +22 -0
- package/dist/styles/output-caption-text.js +15 -0
- package/dist/styles/panel-chrome.d.ts +34 -0
- package/dist/styles/panel-chrome.js +26 -0
- package/dist/styles/range-thumb-appearance.d.ts +36 -0
- package/dist/styles/range-thumb-appearance.js +76 -0
- package/dist/styles/rtl-aware-gradient-direction.d.ts +28 -0
- package/dist/styles/rtl-aware-gradient-direction.js +28 -0
- package/dist/styles/semantic-color-panel.d.ts +35 -0
- package/dist/styles/semantic-color-panel.js +41 -0
- package/dist/utils/chart-marker-indices.d.ts +22 -0
- package/dist/utils/chart-marker-indices.js +45 -0
- package/dist/utils/chart-path.d.ts +86 -0
- package/dist/utils/chart-path.js +122 -0
- package/dist/utils/chart-scale.d.ts +182 -0
- package/dist/utils/chart-scale.js +221 -0
- package/dist/utils/color-math.d.ts +252 -0
- package/dist/utils/color-math.js +480 -0
- package/dist/utils/command-event.d.ts +24 -0
- package/dist/utils/command-event.js +26 -0
- package/dist/utils/css-styles.d.ts +21 -0
- package/dist/utils/css-styles.js +11 -0
- package/dist/utils/decorative-icon.d.ts +15 -0
- package/dist/utils/decorative-icon.js +15 -0
- package/dist/utils/disabled-selector.d.ts +22 -0
- package/dist/utils/disabled-selector.js +22 -0
- package/dist/utils/dispatch-change.d.ts +17 -0
- package/dist/utils/dispatch-change.js +19 -0
- package/dist/utils/field-parts.d.ts +26 -0
- package/dist/utils/field-parts.js +12 -0
- package/dist/utils/full-turn-radians.d.ts +16 -0
- package/dist/utils/full-turn-radians.js +16 -0
- package/dist/utils/geometry.d.ts +14 -0
- package/dist/utils/geometry.js +9 -0
- package/dist/utils/has-accessible-text.d.ts +19 -0
- package/dist/utils/has-accessible-text.js +30 -0
- package/dist/utils/hue-spectrum.d.ts +19 -0
- package/dist/utils/hue-spectrum.js +19 -0
- package/dist/utils/index.d.ts +35 -0
- package/dist/utils/index.js +35 -0
- package/dist/utils/is-new-primary-press.d.ts +29 -0
- package/dist/utils/is-new-primary-press.js +31 -0
- package/dist/utils/keyboard-nav.d.ts +64 -0
- package/dist/utils/keyboard-nav.js +79 -0
- package/dist/utils/merge-style.d.ts +33 -0
- package/dist/utils/merge-style.js +30 -0
- package/dist/utils/paired-range-inputs.d.ts +26 -0
- package/dist/utils/paired-range-inputs.js +29 -0
- package/dist/utils/placement.d.ts +18 -0
- package/dist/utils/placement.js +12 -0
- package/dist/utils/prefers-reduced-motion.d.ts +17 -0
- package/dist/utils/prefers-reduced-motion.js +19 -0
- package/dist/utils/resolve-field-wiring.d.ts +83 -0
- package/dist/utils/resolve-field-wiring.js +53 -0
- package/dist/utils/resolve-fill-percent.d.ts +28 -0
- package/dist/utils/resolve-fill-percent.js +34 -0
- package/dist/utils/round-precision.d.ts +22 -0
- package/dist/utils/round-precision.js +25 -0
- package/dist/utils/semantic-color-panel.d.ts +35 -0
- package/dist/utils/semantic-color-panel.js +28 -0
- package/dist/utils/semantic-color.d.ts +17 -0
- package/dist/utils/semantic-color.js +11 -0
- package/dist/utils/warn-if-no-accessible-name.d.ts +52 -0
- package/dist/utils/warn-if-no-accessible-name.js +55 -0
- package/dist/utils/write-cookie.d.ts +35 -0
- package/dist/utils/write-cookie.js +37 -0
- package/package.json +32 -0
- package/src/reset.css +223 -0
- package/src/theme.css +146 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A tabular data display built on the native `<table>` element, with column
|
|
3
|
+
* headers that become sort links and a trailing row that becomes a
|
|
4
|
+
* "load more" link — both driven entirely by URLs a consumer computes, so the
|
|
5
|
+
* sorted or paginated result renders back from the server with no client
|
|
6
|
+
* state to track.
|
|
7
|
+
*
|
|
8
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
9
|
+
* @copyright Sergio Xalambrí 2026
|
|
10
|
+
*/
|
|
11
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/ui";
|
|
12
|
+
/**
|
|
13
|
+
* Prop types for {@link Table} and its compound parts.
|
|
14
|
+
*/
|
|
15
|
+
export declare namespace Table {
|
|
16
|
+
/**
|
|
17
|
+
* Text alignment for a column's header and, by convention, its cells.
|
|
18
|
+
* `"start"`/`"end"` follow the writing direction, so a column stays
|
|
19
|
+
* left- or right-aligned correctly under `dir="rtl"`.
|
|
20
|
+
*/
|
|
21
|
+
type Align = "start" | "center" | "end";
|
|
22
|
+
/**
|
|
23
|
+
* Current sort direction for a sortable column, matching the values the
|
|
24
|
+
* native `aria-sort` attribute accepts. Leaving it unset while `href` is
|
|
25
|
+
* set renders the column as sortable but not the active sort key.
|
|
26
|
+
*/
|
|
27
|
+
type SortDirection = "ascending" | "descending";
|
|
28
|
+
/**
|
|
29
|
+
* Every native `<table>` attribute, unchanged, plus the `mix` passthrough.
|
|
30
|
+
*/
|
|
31
|
+
interface Props extends TagProps<"table"> {
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Every native `<div>` attribute, unchanged, plus the `mix` passthrough.
|
|
35
|
+
*/
|
|
36
|
+
interface ContainerProps extends TagProps<"div"> {
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Every native `<thead>` attribute, unchanged, plus the `mix` passthrough.
|
|
40
|
+
*/
|
|
41
|
+
interface HeaderProps extends TagProps<"thead"> {
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Every native `<tbody>` attribute, unchanged, plus the `mix` passthrough.
|
|
45
|
+
*/
|
|
46
|
+
interface BodyProps extends TagProps<"tbody"> {
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Per-part styling for the elements a sortable {@link Table.Column} renders
|
|
50
|
+
* besides its own `<th>` host.
|
|
51
|
+
*/
|
|
52
|
+
interface ColumnPartsProps {
|
|
53
|
+
/** Styling for the header's inner link, rendered only when `href` is set. */
|
|
54
|
+
link?: TagProps<"a">["mix"];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Every native `<th>` attribute, plus the `mix` passthrough. Setting
|
|
58
|
+
* `href` turns the header into a sort link exposing `aria-sort`; `align`
|
|
59
|
+
* shadows the deprecated native `align` with the logical values above.
|
|
60
|
+
*/
|
|
61
|
+
interface ColumnProps extends Omit<TagProps<"th">, "align"> {
|
|
62
|
+
/** Text alignment for the header and its indicator. Defaults to {@link DEFAULT_ALIGN}. */
|
|
63
|
+
align?: Align;
|
|
64
|
+
/** Target URL that re-requests the table sorted by this column. Omit for an unsortable column. */
|
|
65
|
+
href?: string;
|
|
66
|
+
/** This column's current sort direction, when it's the active sort key. */
|
|
67
|
+
sortDirection?: SortDirection;
|
|
68
|
+
/** Per-part styling for the sortable header's internal elements. */
|
|
69
|
+
parts?: ColumnPartsProps;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Every native `<tr>` attribute, unchanged, plus the `mix` passthrough.
|
|
73
|
+
* Set `aria-selected="true"` directly to mark a row selected — the row's
|
|
74
|
+
* own selection tint rides that native attribute.
|
|
75
|
+
*/
|
|
76
|
+
interface RowProps extends TagProps<"tr"> {
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Every native `<td>` attribute, unchanged, plus the `mix` passthrough.
|
|
80
|
+
*/
|
|
81
|
+
interface CellProps extends TagProps<"td"> {
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Per-part styling for the elements {@link Table.LoadMore} renders besides
|
|
85
|
+
* its own `<tr>` host.
|
|
86
|
+
*/
|
|
87
|
+
interface LoadMorePartsProps {
|
|
88
|
+
/** Styling for the `<td>` spanning the row beneath the link. */
|
|
89
|
+
cell?: TagProps<"td">["mix"];
|
|
90
|
+
/** Styling for the link itself. */
|
|
91
|
+
link?: TagProps<"a">["mix"];
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Every native `<tr>` attribute, plus the `mix` passthrough. `colSpan`
|
|
95
|
+
* should match the number of columns the surrounding table renders so
|
|
96
|
+
* the link spans the full row width.
|
|
97
|
+
*/
|
|
98
|
+
interface LoadMoreProps extends TagProps<"tr"> {
|
|
99
|
+
/** Target URL that renders the next page of results. */
|
|
100
|
+
href: string;
|
|
101
|
+
/** Number of columns the surrounding table renders, so the link spans the full row width. */
|
|
102
|
+
colSpan: number;
|
|
103
|
+
/** The link's visible label, e.g. "Load more" or "Next page". */
|
|
104
|
+
children: RemixNode;
|
|
105
|
+
/** Per-part styling for the row's internal cell and link. */
|
|
106
|
+
parts?: LoadMorePartsProps;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Renders the table's `<table>` host: a full-width, border-collapsed grid
|
|
111
|
+
* with a small base font size, ready to hold {@link Table.Header} and
|
|
112
|
+
* {@link Table.Body}. Dev mode warns when it lacks an accessible name.
|
|
113
|
+
*
|
|
114
|
+
* @param handle Runtime handle carrying the host `<table>`'s props.
|
|
115
|
+
* @returns The render function producing the table's markup.
|
|
116
|
+
* @example
|
|
117
|
+
* <Table aria-label={t("subjects.title")}>
|
|
118
|
+
* <Table.Header>
|
|
119
|
+
* <Table.Row>
|
|
120
|
+
* <Table.Column>{t("subjects.name")}</Table.Column>
|
|
121
|
+
* </Table.Row>
|
|
122
|
+
* </Table.Header>
|
|
123
|
+
* <Table.Body>
|
|
124
|
+
* <Table.Row>
|
|
125
|
+
* <Table.Cell>{subject.name}</Table.Cell>
|
|
126
|
+
* </Table.Row>
|
|
127
|
+
* </Table.Body>
|
|
128
|
+
* </Table>
|
|
129
|
+
*/
|
|
130
|
+
export declare function Table(handle: Handle<Table.Props>): () => import("remix/ui").RemixElement;
|
|
131
|
+
export declare namespace Table {
|
|
132
|
+
var Container: (handle: Handle<Table.ContainerProps>) => () => import("remix/ui").RemixElement;
|
|
133
|
+
var Header: (handle: Handle<Table.HeaderProps>) => () => import("remix/ui").RemixElement;
|
|
134
|
+
var Body: (handle: Handle<Table.BodyProps>) => () => import("remix/ui").RemixElement;
|
|
135
|
+
var Column: (handle: Handle<Table.ColumnProps>) => () => import("remix/ui").RemixElement;
|
|
136
|
+
var Row: (handle: Handle<Table.RowProps>) => () => import("remix/ui").RemixElement;
|
|
137
|
+
var Cell: (handle: Handle<Table.CellProps>) => () => import("remix/ui").RemixElement;
|
|
138
|
+
var LoadMore: (handle: Handle<Table.LoadMoreProps>) => () => import("remix/ui").RemixElement;
|
|
139
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/ui/jsx-runtime";
|
|
2
|
+
import { ArrowDownIcon, ArrowUpDownIcon, ArrowUpIcon } from "@sdxc/icons";
|
|
3
|
+
import { bg, borderEdge, center, container, cursor, fg, fontSize, gap, hover, inlineFlex, is, items, opacity, outline, overflow, p, pb, pi, raw, relative, textAlign, textDecoration, userSelect, virtualize, weight, when, } from "@sdxc/u";
|
|
4
|
+
import { attrs } from "remix/ui";
|
|
5
|
+
import { interactiveTransition } from "../styles/interactive-transition.js";
|
|
6
|
+
import { warnIfNoAccessibleLabel } from "../utils/warn-if-no-accessible-name.js";
|
|
7
|
+
/**
|
|
8
|
+
* Named container {@link Table.Container} declares on its own host, so a
|
|
9
|
+
* consumer's own descendant styles can query the wrapper's width instead of
|
|
10
|
+
* the page's.
|
|
11
|
+
*/
|
|
12
|
+
const CONTAINER_NAME = "ui-table";
|
|
13
|
+
/** Text alignment {@link Table.Column} falls back to when `align` is omitted. */
|
|
14
|
+
const DEFAULT_ALIGN = "start";
|
|
15
|
+
/**
|
|
16
|
+
* Renders the table's `<table>` host: a full-width, border-collapsed grid
|
|
17
|
+
* with a small base font size, ready to hold {@link Table.Header} and
|
|
18
|
+
* {@link Table.Body}. Dev mode warns when it lacks an accessible name.
|
|
19
|
+
*
|
|
20
|
+
* @param handle Runtime handle carrying the host `<table>`'s props.
|
|
21
|
+
* @returns The render function producing the table's markup.
|
|
22
|
+
* @example
|
|
23
|
+
* <Table aria-label={t("subjects.title")}>
|
|
24
|
+
* <Table.Header>
|
|
25
|
+
* <Table.Row>
|
|
26
|
+
* <Table.Column>{t("subjects.name")}</Table.Column>
|
|
27
|
+
* </Table.Row>
|
|
28
|
+
* </Table.Header>
|
|
29
|
+
* <Table.Body>
|
|
30
|
+
* <Table.Row>
|
|
31
|
+
* <Table.Cell>{subject.name}</Table.Cell>
|
|
32
|
+
* </Table.Row>
|
|
33
|
+
* </Table.Body>
|
|
34
|
+
* </Table>
|
|
35
|
+
*/
|
|
36
|
+
export function Table(handle) {
|
|
37
|
+
return () => {
|
|
38
|
+
let { mix, ...rest } = handle.props;
|
|
39
|
+
warnIfNoAccessibleLabel(handle.props, 'Table: needs an "aria-label" or "aria-labelledby" describing its contents for assistive technology.');
|
|
40
|
+
return (_jsx("table", { ...rest, "data-slot": "table", mix: [is("100%"), raw({ borderCollapse: "collapse" }), fontSize("sm"), mix] }));
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Renders an optional wrapper around {@link Table}: a relatively positioned
|
|
45
|
+
* `<div>` that scrolls its own inline axis when the table grows wider than
|
|
46
|
+
* the available space, and declares the `ui-table` named container.
|
|
47
|
+
*
|
|
48
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
49
|
+
* @returns The render function producing the wrapper's markup.
|
|
50
|
+
* @example
|
|
51
|
+
* <Table.Container>
|
|
52
|
+
* <Table aria-label={t("subjects.title")}>...</Table>
|
|
53
|
+
* </Table.Container>
|
|
54
|
+
*/
|
|
55
|
+
Table.Container = function TableContainer(handle) {
|
|
56
|
+
return () => {
|
|
57
|
+
let { mix, ...rest } = handle.props;
|
|
58
|
+
return (_jsx("div", { ...rest, "data-slot": "container", mix: [relative(), is("100%"), overflow("auto"), container(CONTAINER_NAME), mix] }));
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Renders the table's `<thead>` host: a plain wrapper for the header
|
|
63
|
+
* {@link Table.Row}, separated from {@link Table.Body} by a block-end border.
|
|
64
|
+
*
|
|
65
|
+
* @param handle Runtime handle carrying the host `<thead>`'s props.
|
|
66
|
+
* @returns The render function producing the header section's markup.
|
|
67
|
+
* @example
|
|
68
|
+
* <Table.Header>
|
|
69
|
+
* <Table.Row>
|
|
70
|
+
* <Table.Column>{t("subjects.name")}</Table.Column>
|
|
71
|
+
* </Table.Row>
|
|
72
|
+
* </Table.Header>
|
|
73
|
+
*/
|
|
74
|
+
Table.Header = function TableHeader(handle) {
|
|
75
|
+
return () => {
|
|
76
|
+
let { mix, ...rest } = handle.props;
|
|
77
|
+
return (_jsx("thead", { ...rest, "data-slot": "header", mix: [borderEdge("block-end", { color: "neutral", width: 1 }), mix] }));
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Renders the table's `<tbody>` host: a block-start border rules the space
|
|
82
|
+
* between direct row children, and `content-visibility: auto` lets a long
|
|
83
|
+
* body's off-screen rows skip layout and paint until they scroll into view.
|
|
84
|
+
*
|
|
85
|
+
* @param handle Runtime handle carrying the host `<tbody>`'s props.
|
|
86
|
+
* @returns The render function producing the body section's markup.
|
|
87
|
+
* @example
|
|
88
|
+
* <Table.Body>
|
|
89
|
+
* {subjects.map((subject) => (
|
|
90
|
+
* <Table.Row key={subject.id}>
|
|
91
|
+
* <Table.Cell>{subject.name}</Table.Cell>
|
|
92
|
+
* </Table.Row>
|
|
93
|
+
* ))}
|
|
94
|
+
* </Table.Body>
|
|
95
|
+
*/
|
|
96
|
+
Table.Body = function TableBody(handle) {
|
|
97
|
+
return () => {
|
|
98
|
+
let { mix, ...rest } = handle.props;
|
|
99
|
+
return (_jsx("tbody", { ...rest, "data-slot": "body", mix: [
|
|
100
|
+
virtualize("auto var(--ui-table-body-intrinsic-size, 32rem)"),
|
|
101
|
+
when("& > :not([hidden]) ~ :not([hidden])", borderEdge("block-start", { color: "neutral", width: 1 })),
|
|
102
|
+
mix,
|
|
103
|
+
] }));
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Renders a column header inside a native `<th scope="col">`, aligned by
|
|
108
|
+
* the `data-align` attribute. Setting `href` turns the label into a sort
|
|
109
|
+
* link exposing `aria-sort` and a direction indicator for the active key.
|
|
110
|
+
*
|
|
111
|
+
* @param handle Runtime handle carrying the host `<th>`'s props.
|
|
112
|
+
* @returns The render function producing the column header's markup.
|
|
113
|
+
* @example
|
|
114
|
+
* <Table.Column>{t("subjects.email")}</Table.Column>
|
|
115
|
+
* @example
|
|
116
|
+
* <Table.Column href={sortUrl("name", nextDirection)} sortDirection={activeSort === "name" ? currentDirection : undefined}>
|
|
117
|
+
* {t("subjects.name")}
|
|
118
|
+
* </Table.Column>
|
|
119
|
+
*/
|
|
120
|
+
Table.Column = function TableColumn(handle) {
|
|
121
|
+
return () => {
|
|
122
|
+
let { align, href, sortDirection, parts, children, mix, ...rest } = handle.props;
|
|
123
|
+
let resolvedAlign = align ?? DEFAULT_ALIGN;
|
|
124
|
+
return (_jsx("th", { ...rest, "data-align": resolvedAlign, "aria-sort": href ? (sortDirection ?? "none") : undefined, "data-slot": "column", mix: [
|
|
125
|
+
attrs({ scope: "col" }),
|
|
126
|
+
pi("1rem"),
|
|
127
|
+
pb("0.75rem"),
|
|
128
|
+
textAlign("start"),
|
|
129
|
+
weight(500),
|
|
130
|
+
fg("neutral"),
|
|
131
|
+
when('&[data-align="center"]', textAlign("center")),
|
|
132
|
+
when('&[data-align="end"]', textAlign("end")),
|
|
133
|
+
when("&[aria-sort]", when("&:hover", bg("neutral.tint"))),
|
|
134
|
+
when("&[aria-sort]", [cursor("pointer"), userSelect()]),
|
|
135
|
+
mix,
|
|
136
|
+
], children: href ? (_jsxs("a", { href: href, mix: [
|
|
137
|
+
when("&:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
138
|
+
inlineFlex(),
|
|
139
|
+
items("center"),
|
|
140
|
+
gap("0.25rem"),
|
|
141
|
+
fg("inherit"),
|
|
142
|
+
textDecoration("none"),
|
|
143
|
+
hover(textDecoration("underline")),
|
|
144
|
+
parts?.link,
|
|
145
|
+
], children: [children, sortDirection === "ascending" && _jsx(ArrowUpIcon, { size: 14 }), sortDirection === "descending" && _jsx(ArrowDownIcon, { size: 14 }), !sortDirection && _jsx(ArrowUpDownIcon, { size: 14, mix: [opacity(40)] })] })) : (children) }));
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* Renders a native `<tr>` host: transitions its background smoothly, tints
|
|
150
|
+
* it on hover, and tints it more strongly when it carries
|
|
151
|
+
* `aria-selected="true"`, set directly since selection state is native.
|
|
152
|
+
*
|
|
153
|
+
* @param handle Runtime handle carrying the host `<tr>`'s props.
|
|
154
|
+
* @returns The render function producing the row's markup.
|
|
155
|
+
* @example
|
|
156
|
+
* <Table.Row>
|
|
157
|
+
* <Table.Cell>{subject.name}</Table.Cell>
|
|
158
|
+
* </Table.Row>
|
|
159
|
+
* @example
|
|
160
|
+
* <Table.Row aria-selected="true">
|
|
161
|
+
* <Table.Cell>{subject.name}</Table.Cell>
|
|
162
|
+
* </Table.Row>
|
|
163
|
+
*/
|
|
164
|
+
Table.Row = function TableRow(handle) {
|
|
165
|
+
return () => {
|
|
166
|
+
let { mix, ...rest } = handle.props;
|
|
167
|
+
return (_jsx("tr", { ...rest, "data-slot": "row", mix: [
|
|
168
|
+
interactiveTransition(),
|
|
169
|
+
hover(bg("neutral.tint")),
|
|
170
|
+
when('&[aria-selected="true"]', bg("brand.tint")),
|
|
171
|
+
mix,
|
|
172
|
+
] }));
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* Renders a native `<td>` host, padded on every side and colored as the
|
|
177
|
+
* table's emphasized foreground text.
|
|
178
|
+
*
|
|
179
|
+
* @param handle Runtime handle carrying the host `<td>`'s props.
|
|
180
|
+
* @returns The render function producing the cell's markup.
|
|
181
|
+
* @example
|
|
182
|
+
* <Table.Cell>{subject.name}</Table.Cell>
|
|
183
|
+
*/
|
|
184
|
+
Table.Cell = function TableCell(handle) {
|
|
185
|
+
return () => {
|
|
186
|
+
let { mix, ...rest } = handle.props;
|
|
187
|
+
return (_jsx("td", { ...rest, "data-slot": "cell", mix: [pi("1rem"), pb("0.75rem"), fg("neutral.emphasis"), mix] }));
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Renders a trailing row carrying a single link that spans every column,
|
|
192
|
+
* standing in for an auto-loading "next page" trigger since fetching more
|
|
193
|
+
* rows without a full navigation requires script a consumer attaches.
|
|
194
|
+
*
|
|
195
|
+
* @param handle Runtime handle carrying the host `<tr>`'s props.
|
|
196
|
+
* @returns The render function producing the row's markup.
|
|
197
|
+
* @example
|
|
198
|
+
* <Table.LoadMore href={nextPageUrl} colSpan={4}>
|
|
199
|
+
* {t("subjects.loadMore")}
|
|
200
|
+
* </Table.LoadMore>
|
|
201
|
+
*/
|
|
202
|
+
Table.LoadMore = function TableLoadMore(handle) {
|
|
203
|
+
return () => {
|
|
204
|
+
let { href, colSpan, parts, children, mix, ...rest } = handle.props;
|
|
205
|
+
return (_jsx("tr", { ...rest, "data-slot": "load-more", mix: [mix], children: _jsx("td", { colSpan: colSpan, mix: [p("0"), parts?.cell], children: _jsx("a", { href: href, mix: [
|
|
206
|
+
when("&:focus-visible", outline({ color: "brand.ring", offset: 2 })),
|
|
207
|
+
center(),
|
|
208
|
+
pb("1rem"),
|
|
209
|
+
fg("neutral.muted"),
|
|
210
|
+
hover(fg("neutral")),
|
|
211
|
+
fontSize("sm"),
|
|
212
|
+
textDecoration("none"),
|
|
213
|
+
parts?.link,
|
|
214
|
+
], children: children }) }) }));
|
|
215
|
+
};
|
|
216
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A set of tabs whose active view comes from routing rather than tracked
|
|
3
|
+
* selection state: each tab renders as a native link carrying the `tab`
|
|
4
|
+
* role, and whichever one points at the page currently being viewed carries
|
|
5
|
+
* `aria-selected="true"` to read as the active tab. `Tabs.List` lays the
|
|
6
|
+
* links out along `Tabs`' orientation axis, sharing that axis with every
|
|
7
|
+
* `Tabs.Tab` through component context, and `Tabs.Panel` holds the content
|
|
8
|
+
* the current tab's page renders inside `Tabs.Panels`.
|
|
9
|
+
*
|
|
10
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
11
|
+
* @copyright Sergio Xalambrí 2026
|
|
12
|
+
*/
|
|
13
|
+
import type { UtilityMixin } from "@sdxc/u";
|
|
14
|
+
import type { SizeValue } from "@sdxc/u/tokens";
|
|
15
|
+
import type { Handle, Props as TagProps } from "remix/ui";
|
|
16
|
+
/**
|
|
17
|
+
* Prop types for {@link Tabs} and its compound parts.
|
|
18
|
+
*/
|
|
19
|
+
export declare namespace Tabs {
|
|
20
|
+
/**
|
|
21
|
+
* Axis {@link Tabs.List}'s links lay out along: a single row with the
|
|
22
|
+
* active indicator running beneath it, or a single column with the
|
|
23
|
+
* indicator running alongside it.
|
|
24
|
+
*/
|
|
25
|
+
type Orientation = "horizontal" | "vertical";
|
|
26
|
+
/**
|
|
27
|
+
* Value {@link Tabs} stores in component context so every
|
|
28
|
+
* {@link Tabs.List} and {@link Tabs.Tab} nested inside mirrors the same
|
|
29
|
+
* orientation automatically.
|
|
30
|
+
*/
|
|
31
|
+
interface Context {
|
|
32
|
+
/** The root's resolved layout axis. */
|
|
33
|
+
orientation: Orientation;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Props accepted by {@link Tabs}.
|
|
37
|
+
*/
|
|
38
|
+
interface Props extends TagProps<"div"> {
|
|
39
|
+
/** Layout axis. Defaults to {@link DEFAULT_ORIENTATION}. */
|
|
40
|
+
orientation?: Orientation;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Props accepted by {@link Tabs.List}.
|
|
44
|
+
*/
|
|
45
|
+
interface ListProps extends TagProps<"div"> {
|
|
46
|
+
/**
|
|
47
|
+
* Index of the currently active tab, for a route-driven tab bar with
|
|
48
|
+
* no client-side measurement of the active tab's bounds. Given with
|
|
49
|
+
* `tabSize`, {@link Tabs.List} computes its own indicator position.
|
|
50
|
+
*/
|
|
51
|
+
activeIndex?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Every {@link Tabs.Tab}'s fixed size along the enclosing
|
|
54
|
+
* {@link Tabs}'s layout axis, required alongside `activeIndex` since
|
|
55
|
+
* the indicator's offset depends on how far apart the tabs sit.
|
|
56
|
+
*/
|
|
57
|
+
tabSize?: SizeValue;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Props accepted by {@link Tabs.Tab}. A type alias, since the native
|
|
61
|
+
* anchor props already encode `href`/`role` as a union; `href` is
|
|
62
|
+
* narrowed to required, since every tab is link-mode and needs one.
|
|
63
|
+
*/
|
|
64
|
+
type TabProps = TagProps<"a"> & {
|
|
65
|
+
/** The page this tab navigates to. */
|
|
66
|
+
href: string;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Props accepted by {@link Tabs.Panels}.
|
|
70
|
+
*/
|
|
71
|
+
interface PanelsProps extends TagProps<"div"> {
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Props accepted by {@link Tabs.Panel}.
|
|
75
|
+
*/
|
|
76
|
+
interface PanelProps extends TagProps<"div"> {
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Renders the root host: a plain `<div>` stacking {@link Tabs.List} above
|
|
81
|
+
* {@link Tabs.Panels}, switching to a side-by-side row when `orientation`
|
|
82
|
+
* is `"vertical"` and sharing that axis through component context.
|
|
83
|
+
*
|
|
84
|
+
* @param handle Runtime handle carrying the host `<div>`'s props and providing {@link Tabs.Context}.
|
|
85
|
+
* @returns The render function producing the root's markup.
|
|
86
|
+
* @example
|
|
87
|
+
* <Tabs>
|
|
88
|
+
* <Tabs.List aria-label={t("settings.sections")}>
|
|
89
|
+
* <Tabs.Tab href="/settings/profile" aria-selected="true">{t("settings.profile")}</Tabs.Tab>
|
|
90
|
+
* <Tabs.Tab href="/settings/billing" aria-selected="false">{t("settings.billing")}</Tabs.Tab>
|
|
91
|
+
* </Tabs.List>
|
|
92
|
+
* <Tabs.Panels>
|
|
93
|
+
* <Tabs.Panel>{t("settings.profile.body")}</Tabs.Panel>
|
|
94
|
+
* </Tabs.Panels>
|
|
95
|
+
* </Tabs>
|
|
96
|
+
* @example
|
|
97
|
+
* <Tabs orientation="vertical">
|
|
98
|
+
* <Tabs.List aria-label={t("settings.sections")}>
|
|
99
|
+
* <Tabs.Tab href="/settings/profile" aria-selected="true">{t("settings.profile")}</Tabs.Tab>
|
|
100
|
+
* <Tabs.Tab href="/settings/billing" aria-selected="false">{t("settings.billing")}</Tabs.Tab>
|
|
101
|
+
* </Tabs.List>
|
|
102
|
+
* <Tabs.Panels>
|
|
103
|
+
* <Tabs.Panel>{t("settings.profile.body")}</Tabs.Panel>
|
|
104
|
+
* </Tabs.Panels>
|
|
105
|
+
* </Tabs>
|
|
106
|
+
*/
|
|
107
|
+
export declare function Tabs(handle: Handle<Tabs.Props, Tabs.Context>): () => import("remix/ui").RemixElement;
|
|
108
|
+
export declare namespace Tabs {
|
|
109
|
+
var List: (handle: Handle<Tabs.ListProps>) => () => import("remix/ui").RemixElement;
|
|
110
|
+
var Tab: (handle: Handle<Tabs.TabProps>) => () => import("remix/ui").RemixElement;
|
|
111
|
+
var Panels: (handle: Handle<Tabs.PanelsProps>) => () => import("remix/ui").RemixElement;
|
|
112
|
+
var Panel: (handle: Handle<Tabs.PanelProps>) => () => import("remix/ui").RemixElement;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Computes the `--ui-tab-indicator-*` custom properties {@link Tabs.List}'s
|
|
116
|
+
* sliding indicator reads for a controlled `activeIndex`. Assumes every
|
|
117
|
+
* {@link Tabs.Tab} shares one fixed `tabSize` and sits `LIST_GAP` apart.
|
|
118
|
+
*
|
|
119
|
+
* @param orientation The enclosing {@link Tabs}'s layout axis.
|
|
120
|
+
* @param activeIndex Index of the active tab among its siblings.
|
|
121
|
+
* @param tabSize Every tab's fixed size along `orientation`'s axis.
|
|
122
|
+
* @returns A `raw()` mixin setting the indicator's offset, length, and opacity.
|
|
123
|
+
*/
|
|
124
|
+
export declare function tabIndicatorMix(orientation: Tabs.Orientation, activeIndex: number, tabSize: SizeValue): UtilityMixin;
|