@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,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Barrel for the component catalog: one module per component, each keeping
|
|
3
|
+
* the compound pattern (`Dialog`, `Dialog.Header`, …) with styles inlined
|
|
4
|
+
* via `css()` on the host element. Re-exports every named export from every
|
|
5
|
+
* component module in the catalog.
|
|
6
|
+
*
|
|
7
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
8
|
+
* @copyright Sergio Xalambrí 2026
|
|
9
|
+
*/
|
|
10
|
+
export * from "./accordion.js";
|
|
11
|
+
export * from "./alert.js";
|
|
12
|
+
export * from "./alert-dialog.js";
|
|
13
|
+
export * from "./aspect-ratio.js";
|
|
14
|
+
export * from "./attachment.js";
|
|
15
|
+
export * from "./avatar.js";
|
|
16
|
+
export * from "./badge.js";
|
|
17
|
+
export * from "./breadcrumbs.js";
|
|
18
|
+
export * from "./bubble.js";
|
|
19
|
+
export * from "./button.js";
|
|
20
|
+
export * from "./calendar.js";
|
|
21
|
+
export * from "./card.js";
|
|
22
|
+
export * from "./carousel.js";
|
|
23
|
+
export * from "./chart.js";
|
|
24
|
+
export * from "./checkbox.js";
|
|
25
|
+
export * from "./checkbox-group.js";
|
|
26
|
+
export * from "./color-area.js";
|
|
27
|
+
export * from "./color-field.js";
|
|
28
|
+
export * from "./color-picker.js";
|
|
29
|
+
export * from "./color-slider.js";
|
|
30
|
+
export * from "./color-swatch.js";
|
|
31
|
+
export * from "./color-swatch-picker.js";
|
|
32
|
+
export * from "./color-wheel.js";
|
|
33
|
+
export * from "./combobox.js";
|
|
34
|
+
export * from "./command.js";
|
|
35
|
+
export * from "./confirm.js";
|
|
36
|
+
export * from "./context-menu.js";
|
|
37
|
+
export * from "./date-field.js";
|
|
38
|
+
export * from "./date-picker.js";
|
|
39
|
+
export * from "./date-range-picker.js";
|
|
40
|
+
export * from "./description.js";
|
|
41
|
+
export * from "./dialog.js";
|
|
42
|
+
export * from "./disclosure.js";
|
|
43
|
+
export * from "./drawer.js";
|
|
44
|
+
export * from "./drop-indicator.js";
|
|
45
|
+
export * from "./drop-zone.js";
|
|
46
|
+
export * from "./empty.js";
|
|
47
|
+
export * from "./field-error.js";
|
|
48
|
+
export * from "./file-trigger.js";
|
|
49
|
+
export * from "./form.js";
|
|
50
|
+
export * from "./grid-list.js";
|
|
51
|
+
export * from "./group.js";
|
|
52
|
+
export * from "./header.js";
|
|
53
|
+
export * from "./heading.js";
|
|
54
|
+
export * from "./heading-scope.js";
|
|
55
|
+
export * from "./hover-card.js";
|
|
56
|
+
export * from "./image-placeholder.js";
|
|
57
|
+
export * from "./input.js";
|
|
58
|
+
export * from "./item.js";
|
|
59
|
+
export * from "./keyboard.js";
|
|
60
|
+
export * from "./label.js";
|
|
61
|
+
export * from "./link.js";
|
|
62
|
+
export * from "./link-button.js";
|
|
63
|
+
export * from "./listbox.js";
|
|
64
|
+
export * from "./logo.js";
|
|
65
|
+
export * from "./marker.js";
|
|
66
|
+
export * from "./menu.js";
|
|
67
|
+
export * from "./menubar.js";
|
|
68
|
+
export * from "./message.js";
|
|
69
|
+
export * from "./message-scroller.js";
|
|
70
|
+
export * from "./meter.js";
|
|
71
|
+
export * from "./modal.js";
|
|
72
|
+
export * from "./nav-link.js";
|
|
73
|
+
export * from "./navigation-menu.js";
|
|
74
|
+
export * from "./number-field.js";
|
|
75
|
+
export * from "./otp-field.js";
|
|
76
|
+
export * from "./overlay-arrow.js";
|
|
77
|
+
export * from "./pagination.js";
|
|
78
|
+
export * from "./popover.js";
|
|
79
|
+
export * from "./progress-bar.js";
|
|
80
|
+
export * from "./radio-group.js";
|
|
81
|
+
export * from "./range-calendar.js";
|
|
82
|
+
export * from "./resizable.js";
|
|
83
|
+
export * from "./scroll-area.js";
|
|
84
|
+
export * from "./search-field.js";
|
|
85
|
+
export * from "./section.js";
|
|
86
|
+
export * from "./select.js";
|
|
87
|
+
export * from "./selection-indicator.js";
|
|
88
|
+
export * from "./sentinel-row.js";
|
|
89
|
+
export * from "./separator.js";
|
|
90
|
+
export * from "./shared-element.js";
|
|
91
|
+
export * from "./sheet.js";
|
|
92
|
+
export * from "./sidebar.js";
|
|
93
|
+
export * from "./skeleton.js";
|
|
94
|
+
export * from "./slider.js";
|
|
95
|
+
export * from "./spinner.js";
|
|
96
|
+
export * from "./switch.js";
|
|
97
|
+
export * from "./table.js";
|
|
98
|
+
export * from "./tabs.js";
|
|
99
|
+
export * from "./tag-group.js";
|
|
100
|
+
export * from "./text.js";
|
|
101
|
+
export * from "./text-field.js";
|
|
102
|
+
export * from "./textarea.js";
|
|
103
|
+
export * from "./time-field.js";
|
|
104
|
+
export * from "./toast.js";
|
|
105
|
+
export * from "./toggle-button.js";
|
|
106
|
+
export * from "./toolbar.js";
|
|
107
|
+
export * from "./tooltip.js";
|
|
108
|
+
export * from "./tree.js";
|
|
109
|
+
export * from "./typeset.js";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A single-line native form field for free text entry, rendered as a
|
|
3
|
+
* bordered, rounded `<input>` whose border, background, and focus ring read
|
|
4
|
+
* from a semantic color role. It supplies the field's own box styling only,
|
|
5
|
+
* ready to compose alongside a paired label, hint, and validation message,
|
|
6
|
+
* and serves as the shared foundation every other single-line text control
|
|
7
|
+
* in this library builds on.
|
|
8
|
+
*
|
|
9
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
10
|
+
* @copyright Sergio Xalambrí 2026
|
|
11
|
+
*/
|
|
12
|
+
import type { Handle, Props as TagProps } from "remix/ui";
|
|
13
|
+
/**
|
|
14
|
+
* Prop types for {@link Input}.
|
|
15
|
+
*/
|
|
16
|
+
export declare namespace Input {
|
|
17
|
+
/**
|
|
18
|
+
* Semantic color role for the focus-visible ring, each mapped to its
|
|
19
|
+
* matching `--ui-*` variables. A field marked invalid always reads the
|
|
20
|
+
* danger tone for its ring regardless of `color`.
|
|
21
|
+
*/
|
|
22
|
+
type Color = "brand" | "neutral" | "success" | "warning" | "danger";
|
|
23
|
+
/**
|
|
24
|
+
* Every native `<input>` attribute, unchanged, plus the `mix`
|
|
25
|
+
* passthrough. `role` narrows to match whichever `type` is set, the
|
|
26
|
+
* same correlation the platform itself defines between the two.
|
|
27
|
+
*/
|
|
28
|
+
type Props = TagProps<"input"> & {
|
|
29
|
+
/** Semantic color role for the focus-visible ring. Defaults to {@link DEFAULT_COLOR}. */
|
|
30
|
+
color?: Color;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Renders a native `<input>` host colored via `data-color`, with hover,
|
|
35
|
+
* focus, and disabled states driven by native pseudo-classes; `[aria-invalid="true"]`
|
|
36
|
+
* together with `:user-invalid` forces the danger tone regardless of `color`.
|
|
37
|
+
*
|
|
38
|
+
* @param handle Runtime handle carrying the host `<input>`'s props.
|
|
39
|
+
* @returns The render function producing the field's markup.
|
|
40
|
+
* @example
|
|
41
|
+
* <Label htmlFor="email">{t("form.email.label")}</Label>
|
|
42
|
+
* <Input id="email" type="email" required />
|
|
43
|
+
* @example
|
|
44
|
+
* <Input
|
|
45
|
+
* aria-label={t("form.search.label")}
|
|
46
|
+
* color="brand"
|
|
47
|
+
* placeholder={t("form.search.placeholder")}
|
|
48
|
+
* />
|
|
49
|
+
* @example
|
|
50
|
+
* <Input id="username" aria-describedby="username-error" aria-invalid="true" />
|
|
51
|
+
* <FieldError id="username-error">{t("form.username.taken")}</FieldError>
|
|
52
|
+
*/
|
|
53
|
+
export declare function Input(handle: Handle<Input.Props>): () => import("remix/ui").RemixElement;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsx as _jsx } from "remix/ui/jsx-runtime";
|
|
2
|
+
import { bg, border, fg, outline } from "@sdxc/u/color";
|
|
3
|
+
import { opacity, rounded } from "@sdxc/u/effects";
|
|
4
|
+
import { cursor } from "@sdxc/u/general";
|
|
5
|
+
import { block } from "@sdxc/u/layout";
|
|
6
|
+
import { bs, is, pb, pi } from "@sdxc/u/size";
|
|
7
|
+
import { focusVisible, hover, invalid, when } from "@sdxc/u/state";
|
|
8
|
+
import { text } from "@sdxc/u/typography";
|
|
9
|
+
import { interactiveTransition } from "../styles/interactive-transition.js";
|
|
10
|
+
/** Semantic color role {@link Input} falls back to when `color` is omitted. */
|
|
11
|
+
const DEFAULT_COLOR = "neutral";
|
|
12
|
+
/**
|
|
13
|
+
* Renders a native `<input>` host colored via `data-color`, with hover,
|
|
14
|
+
* focus, and disabled states driven by native pseudo-classes; `[aria-invalid="true"]`
|
|
15
|
+
* together with `:user-invalid` forces the danger tone regardless of `color`.
|
|
16
|
+
*
|
|
17
|
+
* @param handle Runtime handle carrying the host `<input>`'s props.
|
|
18
|
+
* @returns The render function producing the field's markup.
|
|
19
|
+
* @example
|
|
20
|
+
* <Label htmlFor="email">{t("form.email.label")}</Label>
|
|
21
|
+
* <Input id="email" type="email" required />
|
|
22
|
+
* @example
|
|
23
|
+
* <Input
|
|
24
|
+
* aria-label={t("form.search.label")}
|
|
25
|
+
* color="brand"
|
|
26
|
+
* placeholder={t("form.search.placeholder")}
|
|
27
|
+
* />
|
|
28
|
+
* @example
|
|
29
|
+
* <Input id="username" aria-describedby="username-error" aria-invalid="true" />
|
|
30
|
+
* <FieldError id="username-error">{t("form.username.taken")}</FieldError>
|
|
31
|
+
*/
|
|
32
|
+
export function Input(handle) {
|
|
33
|
+
return () => {
|
|
34
|
+
let { color, mix, ...rest } = handle.props;
|
|
35
|
+
let resolvedColor = color ?? DEFAULT_COLOR;
|
|
36
|
+
return (_jsx("input", { ...rest, "data-color": resolvedColor, mix: [
|
|
37
|
+
interactiveTransition(),
|
|
38
|
+
block(),
|
|
39
|
+
is("full"),
|
|
40
|
+
bs(10),
|
|
41
|
+
rounded("md"),
|
|
42
|
+
border({ color: "neutral", width: 1 }),
|
|
43
|
+
bg("neutral.tint"),
|
|
44
|
+
fg("neutral.emphasis"),
|
|
45
|
+
pi(3),
|
|
46
|
+
pb(2),
|
|
47
|
+
when("&::placeholder", fg("neutral.muted")),
|
|
48
|
+
hover(border("neutral.strong")),
|
|
49
|
+
when("&:focus", [border("neutral.strong"), outline("none")]),
|
|
50
|
+
focusVisible([
|
|
51
|
+
border("neutral.strong"),
|
|
52
|
+
outline({ color: "neutral.ring", offset: 0 }),
|
|
53
|
+
when('&[data-color="brand"]', [
|
|
54
|
+
border("brand.strong"),
|
|
55
|
+
outline({ color: "brand.ring", offset: 0 }),
|
|
56
|
+
]),
|
|
57
|
+
when('&[data-color="success"]', [
|
|
58
|
+
border("success.strong"),
|
|
59
|
+
outline({ color: "success.ring", offset: 0 }),
|
|
60
|
+
]),
|
|
61
|
+
when('&[data-color="warning"]', [
|
|
62
|
+
border("warning.strong"),
|
|
63
|
+
outline({ color: "warning.ring", offset: 0 }),
|
|
64
|
+
]),
|
|
65
|
+
when('&[data-color="danger"]', [
|
|
66
|
+
border("danger.strong"),
|
|
67
|
+
outline({ color: "danger.ring", offset: 0 }),
|
|
68
|
+
]),
|
|
69
|
+
]),
|
|
70
|
+
invalid([border("danger.strong"), outline({ color: "danger.ring", offset: 0 })]),
|
|
71
|
+
when("&:disabled", [opacity(50), bg("neutral.bg-tint-hover"), cursor("not-allowed")]),
|
|
72
|
+
text("sm"),
|
|
73
|
+
mix,
|
|
74
|
+
] }));
|
|
75
|
+
};
|
|
76
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A single-line content row composing a leading media slot, a title and
|
|
3
|
+
* description content slot, and a trailing action slot along one
|
|
4
|
+
* horizontally centered line — the shape a settings row, a notification
|
|
5
|
+
* list entry, or a file row all share. Every part lays out through the
|
|
6
|
+
* row's own flex line rather than any part reading a semantic role from its
|
|
7
|
+
* neighbors, so a row renders correctly whichever parts a given list needs:
|
|
8
|
+
* media and content alone, content and actions alone, or all three.
|
|
9
|
+
*
|
|
10
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
11
|
+
* @copyright Sergio Xalambrí 2026
|
|
12
|
+
*/
|
|
13
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/ui";
|
|
14
|
+
/**
|
|
15
|
+
* Prop types for {@link Item} and its compound parts.
|
|
16
|
+
*/
|
|
17
|
+
export declare namespace Item {
|
|
18
|
+
/**
|
|
19
|
+
* Props accepted by {@link Item}.
|
|
20
|
+
*/
|
|
21
|
+
interface Props extends TagProps<"div"> {
|
|
22
|
+
/** The row's compound parts: {@link Item.Media}, {@link Item.Content}, and {@link Item.Actions}. */
|
|
23
|
+
children: RemixNode;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Props accepted by {@link Item.Media}.
|
|
27
|
+
*/
|
|
28
|
+
interface MediaProps extends TagProps<"div"> {
|
|
29
|
+
/** The leading graphic — an icon, an image thumbnail, an Avatar instance, or a checkbox. */
|
|
30
|
+
children: RemixNode;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Props accepted by {@link Item.Content}.
|
|
34
|
+
*/
|
|
35
|
+
interface ContentProps extends TagProps<"div"> {
|
|
36
|
+
/** {@link Item.Title} and, optionally, {@link Item.Description}. */
|
|
37
|
+
children: RemixNode;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Props accepted by {@link Item.Title}.
|
|
41
|
+
*/
|
|
42
|
+
interface TitleProps extends TagProps<"div"> {
|
|
43
|
+
/** The row's label text. */
|
|
44
|
+
children: RemixNode;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Props accepted by {@link Item.Description}.
|
|
48
|
+
*/
|
|
49
|
+
interface DescriptionProps extends TagProps<"p"> {
|
|
50
|
+
/** Supporting detail below the title — a file size, an email address, a timestamp. */
|
|
51
|
+
children: RemixNode;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Props accepted by {@link Item.Actions}.
|
|
55
|
+
*/
|
|
56
|
+
interface ActionsProps extends TagProps<"div"> {
|
|
57
|
+
/** A run of buttons, links, or a switch — whatever control the row offers. */
|
|
58
|
+
children: RemixNode;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Renders the row's host: a `<div>` laying {@link Item.Media},
|
|
63
|
+
* {@link Item.Content}, and {@link Item.Actions} on one flex line, dropping
|
|
64
|
+
* {@link Item.Actions} to a second line once the row narrows past threshold.
|
|
65
|
+
*
|
|
66
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
67
|
+
* @returns The render function producing the row's markup.
|
|
68
|
+
* @example
|
|
69
|
+
* <Item>
|
|
70
|
+
* <Item.Media><FileTextIcon aria-hidden /></Item.Media>
|
|
71
|
+
* <Item.Content>
|
|
72
|
+
* <Item.Title>quarterly-report.pdf</Item.Title>
|
|
73
|
+
* <Item.Description>2.4 MB</Item.Description>
|
|
74
|
+
* </Item.Content>
|
|
75
|
+
* <Item.Actions>
|
|
76
|
+
* <Button aria-label={t("files.download")}><DownloadIcon /></Button>
|
|
77
|
+
* </Item.Actions>
|
|
78
|
+
* </Item>
|
|
79
|
+
* @example
|
|
80
|
+
* <Item>
|
|
81
|
+
* <Item.Content>
|
|
82
|
+
* <Item.Title>{t("settings.emailNotifications.title")}</Item.Title>
|
|
83
|
+
* <Item.Description>{t("settings.emailNotifications.description")}</Item.Description>
|
|
84
|
+
* </Item.Content>
|
|
85
|
+
* <Item.Actions>
|
|
86
|
+
* <Switch name="emailNotifications" />
|
|
87
|
+
* </Item.Actions>
|
|
88
|
+
* </Item>
|
|
89
|
+
*/
|
|
90
|
+
export declare function Item(handle: Handle<Item.Props>): () => import("remix/ui").RemixElement;
|
|
91
|
+
export declare namespace Item {
|
|
92
|
+
var Media: (handle: Handle<Item.MediaProps>) => () => import("remix/ui").RemixElement;
|
|
93
|
+
var Content: (handle: Handle<Item.ContentProps>) => () => import("remix/ui").RemixElement;
|
|
94
|
+
var Title: (handle: Handle<Item.TitleProps>) => () => import("remix/ui").RemixElement;
|
|
95
|
+
var Description: (handle: Handle<Item.DescriptionProps>) => () => import("remix/ui").RemixElement;
|
|
96
|
+
var Actions: (handle: Handle<Item.ActionsProps>) => () => import("remix/ui").RemixElement;
|
|
97
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { jsx as _jsx } from "remix/ui/jsx-runtime";
|
|
2
|
+
import { fg } from "@sdxc/u/color";
|
|
3
|
+
import { raw } from "@sdxc/u/general";
|
|
4
|
+
import { basis, center, container, flex, flexCol, flexWrap, gap, grow, items, shrink, } from "@sdxc/u/layout";
|
|
5
|
+
import { atMax } from "@sdxc/u/responsive";
|
|
6
|
+
import { bs, is, mis, minIs, pb, pi } from "@sdxc/u/size";
|
|
7
|
+
import { when } from "@sdxc/u/state";
|
|
8
|
+
import { fontSize, leading, text, truncate, weight } from "@sdxc/u/typography";
|
|
9
|
+
/**
|
|
10
|
+
* Named container {@link Item} declares on its own host, so
|
|
11
|
+
* {@link Item.Actions} can adapt to the row's own width instead of the
|
|
12
|
+
* page's, keeping the same row width in a full page or a narrow panel.
|
|
13
|
+
*/
|
|
14
|
+
const CONTAINER_NAME = "ui-item";
|
|
15
|
+
/**
|
|
16
|
+
* `@container` max-width threshold below which the row can't hold
|
|
17
|
+
* {@link Item.Media}, {@link Item.Content}, and {@link Item.Actions} on one
|
|
18
|
+
* line without crowding {@link Item.Content}'s text out of room.
|
|
19
|
+
*/
|
|
20
|
+
const NARROW_CONTAINER_SIZE = "20rem";
|
|
21
|
+
/**
|
|
22
|
+
* Renders the row's host: a `<div>` laying {@link Item.Media},
|
|
23
|
+
* {@link Item.Content}, and {@link Item.Actions} on one flex line, dropping
|
|
24
|
+
* {@link Item.Actions} to a second line once the row narrows past threshold.
|
|
25
|
+
*
|
|
26
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
27
|
+
* @returns The render function producing the row's markup.
|
|
28
|
+
* @example
|
|
29
|
+
* <Item>
|
|
30
|
+
* <Item.Media><FileTextIcon aria-hidden /></Item.Media>
|
|
31
|
+
* <Item.Content>
|
|
32
|
+
* <Item.Title>quarterly-report.pdf</Item.Title>
|
|
33
|
+
* <Item.Description>2.4 MB</Item.Description>
|
|
34
|
+
* </Item.Content>
|
|
35
|
+
* <Item.Actions>
|
|
36
|
+
* <Button aria-label={t("files.download")}><DownloadIcon /></Button>
|
|
37
|
+
* </Item.Actions>
|
|
38
|
+
* </Item>
|
|
39
|
+
* @example
|
|
40
|
+
* <Item>
|
|
41
|
+
* <Item.Content>
|
|
42
|
+
* <Item.Title>{t("settings.emailNotifications.title")}</Item.Title>
|
|
43
|
+
* <Item.Description>{t("settings.emailNotifications.description")}</Item.Description>
|
|
44
|
+
* </Item.Content>
|
|
45
|
+
* <Item.Actions>
|
|
46
|
+
* <Switch name="emailNotifications" />
|
|
47
|
+
* </Item.Actions>
|
|
48
|
+
* </Item>
|
|
49
|
+
*/
|
|
50
|
+
export function Item(handle) {
|
|
51
|
+
return () => {
|
|
52
|
+
let { children, mix, ...rest } = handle.props;
|
|
53
|
+
return (_jsx("div", { ...rest, "data-slot": "item", mix: [
|
|
54
|
+
flex(),
|
|
55
|
+
items("center"),
|
|
56
|
+
gap("var(--ui-item-gap, 0.75rem)"),
|
|
57
|
+
pb("var(--ui-item-padding-block, 0.625rem)"),
|
|
58
|
+
pi("var(--ui-item-padding-inline, 0.75rem)"),
|
|
59
|
+
container(CONTAINER_NAME),
|
|
60
|
+
atMax(NARROW_CONTAINER_SIZE, CONTAINER_NAME, flexWrap("wrap")),
|
|
61
|
+
mix,
|
|
62
|
+
], children: children }));
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Renders {@link Item.MediaProps.children} as the row's leading slot: a
|
|
67
|
+
* shrink-proof, centered `<div>` colored from the neutral foreground so a
|
|
68
|
+
* nested icon inherits it through `currentcolor`.
|
|
69
|
+
*
|
|
70
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
71
|
+
* @returns The render function producing the media slot's markup.
|
|
72
|
+
* @example
|
|
73
|
+
* <Item.Media><FileTextIcon aria-hidden /></Item.Media>
|
|
74
|
+
* @example
|
|
75
|
+
* <Item.Media>
|
|
76
|
+
* <Avatar size="sm">
|
|
77
|
+
* <Avatar.Image src={member.avatarUrl} alt={member.name} />
|
|
78
|
+
* <Avatar.Fallback>{member.initials}</Avatar.Fallback>
|
|
79
|
+
* </Avatar>
|
|
80
|
+
* </Item.Media>
|
|
81
|
+
*/
|
|
82
|
+
Item.Media = function ItemMedia(handle) {
|
|
83
|
+
return () => {
|
|
84
|
+
let { children, mix, ...rest } = handle.props;
|
|
85
|
+
return (_jsx("div", { ...rest, "data-slot": "media", mix: [
|
|
86
|
+
center(),
|
|
87
|
+
fg("neutral"),
|
|
88
|
+
when("& > svg", [is(5), bs(5)]),
|
|
89
|
+
shrink(),
|
|
90
|
+
is("var(--ui-item-media-size, 2rem)"),
|
|
91
|
+
bs("var(--ui-item-media-size, 2rem)"),
|
|
92
|
+
mix,
|
|
93
|
+
], children: children }));
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Renders {@link Item.ContentProps.children} as the row's text column: a
|
|
98
|
+
* `<div>` stacking {@link Item.Title} and {@link Item.Description} with its
|
|
99
|
+
* minimum inline size collapsed to `0` so their truncation takes effect.
|
|
100
|
+
*
|
|
101
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
102
|
+
* @returns The render function producing the text column's markup.
|
|
103
|
+
* @example
|
|
104
|
+
* <Item.Content>
|
|
105
|
+
* <Item.Title>quarterly-report.pdf</Item.Title>
|
|
106
|
+
* <Item.Description>2.4 MB</Item.Description>
|
|
107
|
+
* </Item.Content>
|
|
108
|
+
*/
|
|
109
|
+
Item.Content = function ItemContent(handle) {
|
|
110
|
+
return () => {
|
|
111
|
+
let { children, mix, ...rest } = handle.props;
|
|
112
|
+
return (_jsx("div", { ...rest, "data-slot": "content", mix: [flex(), flexCol(), minIs(0), gap(0.5), grow(), shrink(1), basis("0%"), mix], children: children }));
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Renders {@link Item.TitleProps.children} as the row's label in a plain
|
|
117
|
+
* `<div>`, since a document outline gains nothing from a heading entry per
|
|
118
|
+
* repeated row, truncated to one line in the foreground's emphasized tone.
|
|
119
|
+
*
|
|
120
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
121
|
+
* @returns The render function producing the title's markup.
|
|
122
|
+
* @example
|
|
123
|
+
* <Item.Title>quarterly-report.pdf</Item.Title>
|
|
124
|
+
*/
|
|
125
|
+
Item.Title = function ItemTitle(handle) {
|
|
126
|
+
return () => {
|
|
127
|
+
let { children, mix, ...rest } = handle.props;
|
|
128
|
+
return (_jsx("div", { ...rest, "data-slot": "title", mix: [weight("medium"), fg("neutral.emphasis"), truncate(), text("sm"), mix], children: children }));
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Renders {@link Item.DescriptionProps.children} as the row's supporting
|
|
133
|
+
* detail in a native `<p>`, truncated to one line to match
|
|
134
|
+
* {@link Item.Title} so the pair reads as one compact two-line block.
|
|
135
|
+
*
|
|
136
|
+
* @param handle Runtime handle carrying the host `<p>`'s props.
|
|
137
|
+
* @returns The render function producing the description's markup.
|
|
138
|
+
* @example
|
|
139
|
+
* <Item.Description>2.4 MB</Item.Description>
|
|
140
|
+
*/
|
|
141
|
+
Item.Description = function ItemDescription(handle) {
|
|
142
|
+
return () => {
|
|
143
|
+
let { children, mix, ...rest } = handle.props;
|
|
144
|
+
return (_jsx("p", { ...rest, "data-slot": "description", mix: [
|
|
145
|
+
fg("neutral.muted"),
|
|
146
|
+
truncate(),
|
|
147
|
+
fontSize("0.8125rem"),
|
|
148
|
+
leading("calc(1.125 / 0.8125)"),
|
|
149
|
+
mix,
|
|
150
|
+
], children: children }));
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Renders {@link Item.ActionsProps.children} as the row's trailing slot,
|
|
155
|
+
* pinned to the inline-end edge; once {@link Item} wraps narrow, it drops
|
|
156
|
+
* to its own line, indented past {@link Item.Media} to read as trailing.
|
|
157
|
+
*
|
|
158
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
159
|
+
* @returns The render function producing the action slot's markup.
|
|
160
|
+
* @example
|
|
161
|
+
* <Item.Actions>
|
|
162
|
+
* <Button aria-label={t("files.download")}><DownloadIcon /></Button>
|
|
163
|
+
* <Button aria-label={t("files.remove")}><XIcon /></Button>
|
|
164
|
+
* </Item.Actions>
|
|
165
|
+
*/
|
|
166
|
+
Item.Actions = function ItemActions(handle) {
|
|
167
|
+
return () => {
|
|
168
|
+
let { children, mix, ...rest } = handle.props;
|
|
169
|
+
return (_jsx("div", { ...rest, "data-slot": "actions", mix: [
|
|
170
|
+
flex(),
|
|
171
|
+
items("center"),
|
|
172
|
+
mis("auto"),
|
|
173
|
+
shrink(),
|
|
174
|
+
gap("var(--ui-item-actions-gap, 0.5rem)"),
|
|
175
|
+
atMax(NARROW_CONTAINER_SIZE, CONTAINER_NAME, [
|
|
176
|
+
basis("100%"),
|
|
177
|
+
raw({
|
|
178
|
+
justifyContent: "flex-end",
|
|
179
|
+
marginInlineStart: "calc(var(--ui-item-media-size, 2rem) + var(--ui-item-gap, 0.75rem))",
|
|
180
|
+
}),
|
|
181
|
+
]),
|
|
182
|
+
mix,
|
|
183
|
+
], children: children }));
|
|
184
|
+
};
|
|
185
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A keyboard-shortcut hint rendered inside a native `<kbd>` element, sized
|
|
3
|
+
* and colored as a small muted annotation. Its inline-start auto margin
|
|
4
|
+
* pushes it to the trailing edge of whatever row it sits in — a menu item's
|
|
5
|
+
* command, a tooltip's accelerator, a button's shortcut label.
|
|
6
|
+
*
|
|
7
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
8
|
+
* @copyright Sergio Xalambrí 2026
|
|
9
|
+
*/
|
|
10
|
+
import type { Handle, Props as TagProps } from "remix/ui";
|
|
11
|
+
/**
|
|
12
|
+
* Prop types for {@link Keyboard}.
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace Keyboard {
|
|
15
|
+
/**
|
|
16
|
+
* Every native `<kbd>` attribute, unchanged, plus the `mix` passthrough.
|
|
17
|
+
* Renders as a small, muted, trailing-aligned annotation whose content is
|
|
18
|
+
* whatever `children` the consumer supplies — a key, a chord, a glyph.
|
|
19
|
+
*/
|
|
20
|
+
interface Props extends TagProps<"kbd"> {
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Renders its children inside a `<kbd>` element styled as a small, muted
|
|
25
|
+
* shortcut hint whose inline-start auto margin pushes it to the trailing
|
|
26
|
+
* edge of whatever row it sits in — a menu item, a tooltip, a button.
|
|
27
|
+
*
|
|
28
|
+
* @param handle Runtime handle carrying the host `<kbd>`'s props.
|
|
29
|
+
* @returns The render function producing the shortcut hint's markup.
|
|
30
|
+
* @example
|
|
31
|
+
* <Keyboard>⌘K</Keyboard>
|
|
32
|
+
*/
|
|
33
|
+
export declare function Keyboard(handle: Handle<Keyboard.Props>): () => import("remix/ui").RemixElement;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "remix/ui/jsx-runtime";
|
|
2
|
+
import { fg } from "@sdxc/u/color";
|
|
3
|
+
import { mis } from "@sdxc/u/size";
|
|
4
|
+
import { text } from "@sdxc/u/typography";
|
|
5
|
+
/**
|
|
6
|
+
* Renders its children inside a `<kbd>` element styled as a small, muted
|
|
7
|
+
* shortcut hint whose inline-start auto margin pushes it to the trailing
|
|
8
|
+
* edge of whatever row it sits in — a menu item, a tooltip, a button.
|
|
9
|
+
*
|
|
10
|
+
* @param handle Runtime handle carrying the host `<kbd>`'s props.
|
|
11
|
+
* @returns The render function producing the shortcut hint's markup.
|
|
12
|
+
* @example
|
|
13
|
+
* <Keyboard>⌘K</Keyboard>
|
|
14
|
+
*/
|
|
15
|
+
export function Keyboard(handle) {
|
|
16
|
+
return () => {
|
|
17
|
+
let { mix, ...rest } = handle.props;
|
|
18
|
+
return _jsx("kbd", { ...rest, mix: [mis("auto"), fg("neutral.muted"), text("xs"), mix] });
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A caption for a form control, associated with its field either through
|
|
3
|
+
* the native `for`/`id` relationship (set `htmlFor` to the field's `id`) or
|
|
4
|
+
* by wrapping the control as a child. It renders as a single line of
|
|
5
|
+
* emphasized text at the library's default label size, weight, and color.
|
|
6
|
+
*
|
|
7
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
8
|
+
* @copyright Sergio Xalambrí 2026
|
|
9
|
+
*/
|
|
10
|
+
import type { Handle, Props as TagProps } from "remix/ui";
|
|
11
|
+
/**
|
|
12
|
+
* Prop types for {@link Label}.
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace Label {
|
|
15
|
+
/**
|
|
16
|
+
* Every native `<label>` attribute, unchanged, plus the `mix` passthrough.
|
|
17
|
+
* Renders at the library's default caption size, medium weight, and
|
|
18
|
+
* emphasized neutral foreground; set `htmlFor` or nest the field as a child.
|
|
19
|
+
*/
|
|
20
|
+
interface Props extends TagProps<"label"> {
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Renders its children inside a native `<label>` element, sized and colored
|
|
25
|
+
* as a form field caption. Pair it with a field by setting `htmlFor` to the
|
|
26
|
+
* field's `id`, or wrap the field directly so the platform associates them.
|
|
27
|
+
*
|
|
28
|
+
* @param handle Runtime handle carrying the host `<label>`'s props.
|
|
29
|
+
* @returns The render function producing the label's markup.
|
|
30
|
+
* @example
|
|
31
|
+
* <Label htmlFor="email">{t("form.email.label")}</Label>
|
|
32
|
+
* @example
|
|
33
|
+
* <Label>
|
|
34
|
+
* {t("form.newsletter.label")}
|
|
35
|
+
* <input type="checkbox" name="newsletter" />
|
|
36
|
+
* </Label>
|
|
37
|
+
*/
|
|
38
|
+
export declare function Label(handle: Handle<Label.Props>): () => import("remix/ui").RemixElement;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "remix/ui/jsx-runtime";
|
|
2
|
+
import { fg } from "@sdxc/u/color";
|
|
3
|
+
import { fontSize, leading, weight } from "@sdxc/u/typography";
|
|
4
|
+
/**
|
|
5
|
+
* Renders its children inside a native `<label>` element, sized and colored
|
|
6
|
+
* as a form field caption. Pair it with a field by setting `htmlFor` to the
|
|
7
|
+
* field's `id`, or wrap the field directly so the platform associates them.
|
|
8
|
+
*
|
|
9
|
+
* @param handle Runtime handle carrying the host `<label>`'s props.
|
|
10
|
+
* @returns The render function producing the label's markup.
|
|
11
|
+
* @example
|
|
12
|
+
* <Label htmlFor="email">{t("form.email.label")}</Label>
|
|
13
|
+
* @example
|
|
14
|
+
* <Label>
|
|
15
|
+
* {t("form.newsletter.label")}
|
|
16
|
+
* <input type="checkbox" name="newsletter" />
|
|
17
|
+
* </Label>
|
|
18
|
+
*/
|
|
19
|
+
export function Label(handle) {
|
|
20
|
+
return () => {
|
|
21
|
+
let { mix, ...rest } = handle.props;
|
|
22
|
+
return (_jsx("label", { ...rest, mix: [weight("medium"), fg("neutral.emphasis"), fontSize("sm"), leading("none"), mix] }));
|
|
23
|
+
};
|
|
24
|
+
}
|