@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
package/src/reset.css
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Base reset: border-box sizing, zeroed margins/padding,
|
|
3
|
+
* borders reset to "0 solid" so bare border-widths work later, form controls
|
|
4
|
+
* that inherit font/color/line-height, transparent button/input backgrounds
|
|
5
|
+
* with a sensible cursor, block-level media, and the rest of the usual
|
|
6
|
+
* list/table/[hidden] normalizations.
|
|
7
|
+
*
|
|
8
|
+
* Every selector is wrapped in :where(...) so the whole file carries zero
|
|
9
|
+
* specificity and can never beat a component's own css() rules.
|
|
10
|
+
*
|
|
11
|
+
* Deliberate exemption: this reset does NOT touch the user-agent styles that
|
|
12
|
+
* <dialog> and [popover] depend on. ::backdrop is left alone entirely, and
|
|
13
|
+
* dialog/[popover] are excluded from the margin reset so their default
|
|
14
|
+
* `margin: auto` centering survives untouched. Overlay components own the
|
|
15
|
+
* rest of their presentation explicitly instead of fighting the reset.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
@layer base, rmx;
|
|
19
|
+
|
|
20
|
+
@layer base {
|
|
21
|
+
:where(*),
|
|
22
|
+
:where(*)::before,
|
|
23
|
+
:where(*)::after {
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
border: 0 solid;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where(:not(dialog, [popover])),
|
|
29
|
+
:where(*)::before,
|
|
30
|
+
:where(*)::after {
|
|
31
|
+
margin: 0;
|
|
32
|
+
padding: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:where(html, :host) {
|
|
36
|
+
line-height: 1.5;
|
|
37
|
+
-webkit-text-size-adjust: 100%;
|
|
38
|
+
tab-size: 4;
|
|
39
|
+
-webkit-tap-highlight-color: transparent;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:where(hr) {
|
|
43
|
+
height: 0;
|
|
44
|
+
color: inherit;
|
|
45
|
+
border-top-width: 1px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:where(abbr[title]) {
|
|
49
|
+
text-decoration: underline dotted;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
53
|
+
font-size: inherit;
|
|
54
|
+
font-weight: inherit;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:where(a) {
|
|
58
|
+
color: inherit;
|
|
59
|
+
text-decoration: inherit;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:where(b, strong) {
|
|
63
|
+
font-weight: bolder;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:where(code, kbd, samp, pre) {
|
|
67
|
+
font-family:
|
|
68
|
+
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
|
|
69
|
+
monospace;
|
|
70
|
+
font-size: 1em;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:where(small) {
|
|
74
|
+
font-size: 80%;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:where(sub, sup) {
|
|
78
|
+
font-size: 75%;
|
|
79
|
+
line-height: 0;
|
|
80
|
+
position: relative;
|
|
81
|
+
vertical-align: baseline;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:where(sub) {
|
|
85
|
+
bottom: -0.25em;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:where(sup) {
|
|
89
|
+
top: -0.5em;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:where(table) {
|
|
93
|
+
text-indent: 0;
|
|
94
|
+
border-color: inherit;
|
|
95
|
+
border-collapse: collapse;
|
|
96
|
+
border-spacing: 0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
:where(:-moz-focusring) {
|
|
100
|
+
outline: auto;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:where(progress) {
|
|
104
|
+
vertical-align: baseline;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
:where(summary) {
|
|
108
|
+
display: list-item;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
:where(ol, ul, menu) {
|
|
112
|
+
list-style: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
:where(img, svg, video, canvas, audio, iframe, embed, object) {
|
|
116
|
+
display: block;
|
|
117
|
+
max-width: 100%;
|
|
118
|
+
vertical-align: middle;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:where(img, video) {
|
|
122
|
+
height: auto;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:where(button, input, select, optgroup, textarea),
|
|
126
|
+
:where(*)::file-selector-button {
|
|
127
|
+
font: inherit;
|
|
128
|
+
font-feature-settings: inherit;
|
|
129
|
+
font-variation-settings: inherit;
|
|
130
|
+
letter-spacing: inherit;
|
|
131
|
+
color: inherit;
|
|
132
|
+
border-radius: 0;
|
|
133
|
+
background-color: transparent;
|
|
134
|
+
opacity: 1;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
:where(select:is([multiple], [size]) optgroup) {
|
|
138
|
+
font-weight: bolder;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
:where(select:is([multiple], [size]) optgroup option) {
|
|
142
|
+
padding-inline-start: 20px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
:where(*)::file-selector-button {
|
|
146
|
+
margin-inline-end: 4px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
:where(*)::placeholder {
|
|
150
|
+
opacity: 1;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
|
|
154
|
+
:where(*)::placeholder {
|
|
155
|
+
color: color-mix(in oklab, currentcolor 50%, transparent);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
:where(textarea) {
|
|
160
|
+
resize: vertical;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
:where(*)::-webkit-search-decoration {
|
|
164
|
+
-webkit-appearance: none;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
:where(*)::-webkit-date-and-time-value {
|
|
168
|
+
min-height: 1lh;
|
|
169
|
+
text-align: inherit;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
:where(*)::-webkit-datetime-edit {
|
|
173
|
+
display: inline-flex;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
:where(*)::-webkit-datetime-edit-fields-wrapper {
|
|
177
|
+
padding: 0;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
:where(*)::-webkit-datetime-edit,
|
|
181
|
+
:where(*)::-webkit-datetime-edit-year-field,
|
|
182
|
+
:where(*)::-webkit-datetime-edit-month-field,
|
|
183
|
+
:where(*)::-webkit-datetime-edit-day-field,
|
|
184
|
+
:where(*)::-webkit-datetime-edit-hour-field,
|
|
185
|
+
:where(*)::-webkit-datetime-edit-minute-field,
|
|
186
|
+
:where(*)::-webkit-datetime-edit-second-field,
|
|
187
|
+
:where(*)::-webkit-datetime-edit-millisecond-field,
|
|
188
|
+
:where(*)::-webkit-datetime-edit-meridiem-field {
|
|
189
|
+
padding-block: 0;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
:where(*)::-webkit-calendar-picker-indicator {
|
|
193
|
+
line-height: 1;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
:where(:-moz-ui-invalid) {
|
|
197
|
+
box-shadow: none;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
:where(button, input[type="button"], input[type="reset"], input[type="submit"]),
|
|
201
|
+
:where(*)::file-selector-button {
|
|
202
|
+
appearance: button;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
:where(button, input[type="button"], input[type="reset"], input[type="submit"]):where(
|
|
206
|
+
:not(:disabled)
|
|
207
|
+
) {
|
|
208
|
+
cursor: pointer;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
:where(:disabled) {
|
|
212
|
+
cursor: not-allowed;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
:where(*)::-webkit-inner-spin-button,
|
|
216
|
+
:where(*)::-webkit-outer-spin-button {
|
|
217
|
+
height: auto;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
:where([hidden]:not([hidden="until-found"])) {
|
|
221
|
+
display: none !important;
|
|
222
|
+
}
|
|
223
|
+
}
|
package/src/theme.css
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Theme Contract
|
|
3
|
+
*
|
|
4
|
+
* `@sdxc/u` defines the base theme contract every consumer follows — this
|
|
5
|
+
* file imports it rather than re-deriving the same semantic-tone structure
|
|
6
|
+
* independently, so `brand`/`neutral`/`success`/`warning`/`danger`, the
|
|
7
|
+
* system defaults, and the spacing/container-breakpoint/font/text-size scale
|
|
8
|
+
* variables all come from one source. Consuming apps must define the
|
|
9
|
+
* `--ui-color-{brand,neutral,danger,warning,success}-{50..950}` palette
|
|
10
|
+
* scales themselves (see `@sdxc/u`'s own theme contract) — there is no
|
|
11
|
+
* default here.
|
|
12
|
+
*
|
|
13
|
+
* This file adds only what's genuinely specific to this package on top of that base:
|
|
14
|
+
* - Interaction-state variants (`-bg-tint-hover`, `-bg-tint-pressed`,
|
|
15
|
+
* `-bg-solid-hover`, `-bg-solid-pressed`) that `@sdxc/u`'s own theme
|
|
16
|
+
* contract doesn't define, since how much a color shifts on hover/press
|
|
17
|
+
* is a component-library design decision, not a lower-level primitive.
|
|
18
|
+
* - A `--ui-chart-{1..8}` categorical color sequence for multi-series
|
|
19
|
+
* charts — a component-library concern, not a theme-contract concept.
|
|
20
|
+
*
|
|
21
|
+
* Dark Mode:
|
|
22
|
+
* - Add .dark class to <html> for forced dark mode
|
|
23
|
+
* - Add .system class to <html> for system preference (prefers-color-scheme)
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
@import "@sdxc/u/theme.css";
|
|
27
|
+
|
|
28
|
+
:root {
|
|
29
|
+
/* Brand */
|
|
30
|
+
--ui-brand-bg-tint-hover: var(--ui-color-brand-100);
|
|
31
|
+
--ui-brand-bg-tint-pressed: var(--ui-color-brand-200);
|
|
32
|
+
--ui-brand-bg-solid-hover: var(--ui-color-brand-700);
|
|
33
|
+
--ui-brand-bg-solid-pressed: var(--ui-color-brand-800);
|
|
34
|
+
|
|
35
|
+
/* Neutral — solid backgrounds use inverted shades (dark on light) */
|
|
36
|
+
--ui-neutral-bg-tint-hover: var(--ui-color-neutral-100);
|
|
37
|
+
--ui-neutral-bg-tint-pressed: var(--ui-color-neutral-200);
|
|
38
|
+
--ui-neutral-bg-solid-hover: var(--ui-color-neutral-800);
|
|
39
|
+
--ui-neutral-bg-solid-pressed: var(--ui-color-neutral-700);
|
|
40
|
+
|
|
41
|
+
/* Danger */
|
|
42
|
+
--ui-danger-bg-tint-hover: var(--ui-color-danger-100);
|
|
43
|
+
--ui-danger-bg-tint-pressed: var(--ui-color-danger-200);
|
|
44
|
+
--ui-danger-bg-solid-hover: var(--ui-color-danger-700);
|
|
45
|
+
--ui-danger-bg-solid-pressed: var(--ui-color-danger-800);
|
|
46
|
+
|
|
47
|
+
/* Warning */
|
|
48
|
+
--ui-warning-bg-tint-hover: var(--ui-color-warning-100);
|
|
49
|
+
--ui-warning-bg-tint-pressed: var(--ui-color-warning-200);
|
|
50
|
+
--ui-warning-bg-solid-hover: var(--ui-color-warning-700);
|
|
51
|
+
--ui-warning-bg-solid-pressed: var(--ui-color-warning-800);
|
|
52
|
+
|
|
53
|
+
/* Success */
|
|
54
|
+
--ui-success-bg-tint-hover: var(--ui-color-success-100);
|
|
55
|
+
--ui-success-bg-tint-pressed: var(--ui-color-success-200);
|
|
56
|
+
--ui-success-bg-solid-hover: var(--ui-color-success-700);
|
|
57
|
+
--ui-success-bg-solid-pressed: var(--ui-color-success-800);
|
|
58
|
+
|
|
59
|
+
/* Chart: categorical sequence for multi-series charts */
|
|
60
|
+
--ui-chart-1: var(--ui-color-brand-600);
|
|
61
|
+
--ui-chart-2: var(--ui-color-success-600);
|
|
62
|
+
--ui-chart-3: var(--ui-color-warning-600);
|
|
63
|
+
--ui-chart-4: var(--ui-color-danger-600);
|
|
64
|
+
--ui-chart-5: var(--ui-color-neutral-600);
|
|
65
|
+
--ui-chart-6: var(--ui-color-brand-400);
|
|
66
|
+
--ui-chart-7: var(--ui-color-success-400);
|
|
67
|
+
--ui-chart-8: var(--ui-color-warning-400);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Forced dark mode */
|
|
71
|
+
:is(.dark, .dark *) {
|
|
72
|
+
--ui-brand-bg-tint-hover: var(--ui-color-brand-900);
|
|
73
|
+
--ui-brand-bg-tint-pressed: var(--ui-color-brand-800);
|
|
74
|
+
--ui-brand-bg-solid-hover: var(--ui-color-brand-700);
|
|
75
|
+
--ui-brand-bg-solid-pressed: var(--ui-color-brand-800);
|
|
76
|
+
|
|
77
|
+
--ui-neutral-bg-tint-hover: var(--ui-color-neutral-900);
|
|
78
|
+
--ui-neutral-bg-tint-pressed: var(--ui-color-neutral-800);
|
|
79
|
+
--ui-neutral-bg-solid-hover: var(--ui-color-neutral-200);
|
|
80
|
+
--ui-neutral-bg-solid-pressed: var(--ui-color-neutral-300);
|
|
81
|
+
|
|
82
|
+
--ui-danger-bg-tint-hover: var(--ui-color-danger-900);
|
|
83
|
+
--ui-danger-bg-tint-pressed: var(--ui-color-danger-800);
|
|
84
|
+
--ui-danger-bg-solid-hover: var(--ui-color-danger-700);
|
|
85
|
+
--ui-danger-bg-solid-pressed: var(--ui-color-danger-800);
|
|
86
|
+
|
|
87
|
+
--ui-warning-bg-tint-hover: var(--ui-color-warning-900);
|
|
88
|
+
--ui-warning-bg-tint-pressed: var(--ui-color-warning-800);
|
|
89
|
+
--ui-warning-bg-solid-hover: var(--ui-color-warning-700);
|
|
90
|
+
--ui-warning-bg-solid-pressed: var(--ui-color-warning-800);
|
|
91
|
+
|
|
92
|
+
--ui-success-bg-tint-hover: var(--ui-color-success-900);
|
|
93
|
+
--ui-success-bg-tint-pressed: var(--ui-color-success-800);
|
|
94
|
+
--ui-success-bg-solid-hover: var(--ui-color-success-700);
|
|
95
|
+
--ui-success-bg-solid-pressed: var(--ui-color-success-800);
|
|
96
|
+
|
|
97
|
+
/* Chart: categorical sequence for multi-series charts */
|
|
98
|
+
--ui-chart-1: var(--ui-color-brand-400);
|
|
99
|
+
--ui-chart-2: var(--ui-color-success-400);
|
|
100
|
+
--ui-chart-3: var(--ui-color-warning-400);
|
|
101
|
+
--ui-chart-4: var(--ui-color-danger-400);
|
|
102
|
+
--ui-chart-5: var(--ui-color-neutral-400);
|
|
103
|
+
--ui-chart-6: var(--ui-color-brand-300);
|
|
104
|
+
--ui-chart-7: var(--ui-color-success-300);
|
|
105
|
+
--ui-chart-8: var(--ui-color-warning-300);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* System-preference dark mode */
|
|
109
|
+
@media (prefers-color-scheme: dark) {
|
|
110
|
+
:is(.system, .system *) {
|
|
111
|
+
--ui-brand-bg-tint-hover: var(--ui-color-brand-900);
|
|
112
|
+
--ui-brand-bg-tint-pressed: var(--ui-color-brand-800);
|
|
113
|
+
--ui-brand-bg-solid-hover: var(--ui-color-brand-700);
|
|
114
|
+
--ui-brand-bg-solid-pressed: var(--ui-color-brand-800);
|
|
115
|
+
|
|
116
|
+
--ui-neutral-bg-tint-hover: var(--ui-color-neutral-900);
|
|
117
|
+
--ui-neutral-bg-tint-pressed: var(--ui-color-neutral-800);
|
|
118
|
+
--ui-neutral-bg-solid-hover: var(--ui-color-neutral-200);
|
|
119
|
+
--ui-neutral-bg-solid-pressed: var(--ui-color-neutral-300);
|
|
120
|
+
|
|
121
|
+
--ui-danger-bg-tint-hover: var(--ui-color-danger-900);
|
|
122
|
+
--ui-danger-bg-tint-pressed: var(--ui-color-danger-800);
|
|
123
|
+
--ui-danger-bg-solid-hover: var(--ui-color-danger-700);
|
|
124
|
+
--ui-danger-bg-solid-pressed: var(--ui-color-danger-800);
|
|
125
|
+
|
|
126
|
+
--ui-warning-bg-tint-hover: var(--ui-color-warning-900);
|
|
127
|
+
--ui-warning-bg-tint-pressed: var(--ui-color-warning-800);
|
|
128
|
+
--ui-warning-bg-solid-hover: var(--ui-color-warning-700);
|
|
129
|
+
--ui-warning-bg-solid-pressed: var(--ui-color-warning-800);
|
|
130
|
+
|
|
131
|
+
--ui-success-bg-tint-hover: var(--ui-color-success-900);
|
|
132
|
+
--ui-success-bg-tint-pressed: var(--ui-color-success-800);
|
|
133
|
+
--ui-success-bg-solid-hover: var(--ui-color-success-700);
|
|
134
|
+
--ui-success-bg-solid-pressed: var(--ui-color-success-800);
|
|
135
|
+
|
|
136
|
+
/* Chart: categorical sequence for multi-series charts */
|
|
137
|
+
--ui-chart-1: var(--ui-color-brand-400);
|
|
138
|
+
--ui-chart-2: var(--ui-color-success-400);
|
|
139
|
+
--ui-chart-3: var(--ui-color-warning-400);
|
|
140
|
+
--ui-chart-4: var(--ui-color-danger-400);
|
|
141
|
+
--ui-chart-5: var(--ui-color-neutral-400);
|
|
142
|
+
--ui-chart-6: var(--ui-color-brand-300);
|
|
143
|
+
--ui-chart-7: var(--ui-color-success-300);
|
|
144
|
+
--ui-chart-8: var(--ui-color-warning-300);
|
|
145
|
+
}
|
|
146
|
+
}
|