@weave-framework/ui 0.2.107
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 +21 -0
- package/README.md +17 -0
- package/dist/autocomplete/autocomplete.d.ts +86 -0
- package/dist/autocomplete/autocomplete.d.ts.map +1 -0
- package/dist/autocomplete/autocomplete.js +263 -0
- package/dist/autocomplete/autocomplete.js.map +1 -0
- package/dist/badge/badge.d.ts +39 -0
- package/dist/badge/badge.d.ts.map +1 -0
- package/dist/badge/badge.js +59 -0
- package/dist/badge/badge.js.map +1 -0
- package/dist/bottom-sheet/bottom-sheet.d.ts +21 -0
- package/dist/bottom-sheet/bottom-sheet.d.ts.map +1 -0
- package/dist/bottom-sheet/bottom-sheet.js +82 -0
- package/dist/bottom-sheet/bottom-sheet.js.map +1 -0
- package/dist/button/button.d.ts +47 -0
- package/dist/button/button.d.ts.map +1 -0
- package/dist/button/button.js +47 -0
- package/dist/button/button.js.map +1 -0
- package/dist/button-toggle/button-toggle.d.ts +65 -0
- package/dist/button-toggle/button-toggle.d.ts.map +1 -0
- package/dist/button-toggle/button-toggle.js +127 -0
- package/dist/button-toggle/button-toggle.js.map +1 -0
- package/dist/card/card.d.ts +30 -0
- package/dist/card/card.d.ts.map +1 -0
- package/dist/card/card.js +32 -0
- package/dist/card/card.js.map +1 -0
- package/dist/cdk/bidi.d.ts +19 -0
- package/dist/cdk/bidi.d.ts.map +1 -0
- package/dist/cdk/bidi.js +32 -0
- package/dist/cdk/bidi.js.map +1 -0
- package/dist/cdk/breakpoints.d.ts +21 -0
- package/dist/cdk/breakpoints.d.ts.map +1 -0
- package/dist/cdk/breakpoints.js +39 -0
- package/dist/cdk/breakpoints.js.map +1 -0
- package/dist/cdk/clipboard.d.ts +8 -0
- package/dist/cdk/clipboard.d.ts.map +1 -0
- package/dist/cdk/clipboard.js +38 -0
- package/dist/cdk/clipboard.js.map +1 -0
- package/dist/cdk/data-source.d.ts +41 -0
- package/dist/cdk/data-source.d.ts.map +1 -0
- package/dist/cdk/data-source.js +36 -0
- package/dist/cdk/data-source.js.map +1 -0
- package/dist/cdk/date-adapter.d.ts +63 -0
- package/dist/cdk/date-adapter.d.ts.map +1 -0
- package/dist/cdk/date-adapter.js +155 -0
- package/dist/cdk/date-adapter.js.map +1 -0
- package/dist/cdk/drag-drop.d.ts +77 -0
- package/dist/cdk/drag-drop.d.ts.map +1 -0
- package/dist/cdk/drag-drop.js +268 -0
- package/dist/cdk/drag-drop.js.map +1 -0
- package/dist/cdk/focus-monitor.d.ts +27 -0
- package/dist/cdk/focus-monitor.d.ts.map +1 -0
- package/dist/cdk/focus-monitor.js +66 -0
- package/dist/cdk/focus-monitor.js.map +1 -0
- package/dist/cdk/focus-trap.d.ts +39 -0
- package/dist/cdk/focus-trap.d.ts.map +1 -0
- package/dist/cdk/focus-trap.js +127 -0
- package/dist/cdk/focus-trap.js.map +1 -0
- package/dist/cdk/index.d.ts +29 -0
- package/dist/cdk/index.d.ts.map +1 -0
- package/dist/cdk/index.js +29 -0
- package/dist/cdk/index.js.map +1 -0
- package/dist/cdk/interactivity.d.ts +19 -0
- package/dist/cdk/interactivity.d.ts.map +1 -0
- package/dist/cdk/interactivity.js +70 -0
- package/dist/cdk/interactivity.js.map +1 -0
- package/dist/cdk/key-manager.d.ts +41 -0
- package/dist/cdk/key-manager.d.ts.map +1 -0
- package/dist/cdk/key-manager.js +126 -0
- package/dist/cdk/key-manager.js.map +1 -0
- package/dist/cdk/live-announcer.d.ts +19 -0
- package/dist/cdk/live-announcer.d.ts.map +1 -0
- package/dist/cdk/live-announcer.js +48 -0
- package/dist/cdk/live-announcer.js.map +1 -0
- package/dist/cdk/observers.d.ts +17 -0
- package/dist/cdk/observers.d.ts.map +1 -0
- package/dist/cdk/observers.js +35 -0
- package/dist/cdk/observers.js.map +1 -0
- package/dist/cdk/overlay.d.ts +73 -0
- package/dist/cdk/overlay.d.ts.map +1 -0
- package/dist/cdk/overlay.js +154 -0
- package/dist/cdk/overlay.js.map +1 -0
- package/dist/cdk/platform.d.ts +22 -0
- package/dist/cdk/platform.d.ts.map +1 -0
- package/dist/cdk/platform.js +55 -0
- package/dist/cdk/platform.js.map +1 -0
- package/dist/cdk/portal.d.ts +31 -0
- package/dist/cdk/portal.d.ts.map +1 -0
- package/dist/cdk/portal.js +55 -0
- package/dist/cdk/portal.js.map +1 -0
- package/dist/cdk/positioning.d.ts +53 -0
- package/dist/cdk/positioning.d.ts.map +1 -0
- package/dist/cdk/positioning.js +140 -0
- package/dist/cdk/positioning.js.map +1 -0
- package/dist/cdk/scroll.d.ts +43 -0
- package/dist/cdk/scroll.d.ts.map +1 -0
- package/dist/cdk/scroll.js +97 -0
- package/dist/cdk/scroll.js.map +1 -0
- package/dist/cdk/selection-model.d.ts +50 -0
- package/dist/cdk/selection-model.d.ts.map +1 -0
- package/dist/cdk/selection-model.js +77 -0
- package/dist/cdk/selection-model.js.map +1 -0
- package/dist/cdk/virtual-scroll.d.ts +50 -0
- package/dist/cdk/virtual-scroll.d.ts.map +1 -0
- package/dist/cdk/virtual-scroll.js +92 -0
- package/dist/cdk/virtual-scroll.js.map +1 -0
- package/dist/checkbox/checkbox.d.ts +65 -0
- package/dist/checkbox/checkbox.d.ts.map +1 -0
- package/dist/checkbox/checkbox.js +82 -0
- package/dist/checkbox/checkbox.js.map +1 -0
- package/dist/chips/chips.d.ts +65 -0
- package/dist/chips/chips.d.ts.map +1 -0
- package/dist/chips/chips.js +119 -0
- package/dist/chips/chips.js.map +1 -0
- package/dist/context-menu/context-menu.d.ts +32 -0
- package/dist/context-menu/context-menu.d.ts.map +1 -0
- package/dist/context-menu/context-menu.js +63 -0
- package/dist/context-menu/context-menu.js.map +1 -0
- package/dist/datepicker/datepicker.d.ts +100 -0
- package/dist/datepicker/datepicker.d.ts.map +1 -0
- package/dist/datepicker/datepicker.js +440 -0
- package/dist/datepicker/datepicker.js.map +1 -0
- package/dist/dialog/dialog.d.ts +27 -0
- package/dist/dialog/dialog.d.ts.map +1 -0
- package/dist/dialog/dialog.js +47 -0
- package/dist/dialog/dialog.js.map +1 -0
- package/dist/dialog/modal-core.d.ts +42 -0
- package/dist/dialog/modal-core.d.ts.map +1 -0
- package/dist/dialog/modal-core.js +103 -0
- package/dist/dialog/modal-core.js.map +1 -0
- package/dist/expansion/expansion.d.ts +71 -0
- package/dist/expansion/expansion.d.ts.map +1 -0
- package/dist/expansion/expansion.js +127 -0
- package/dist/expansion/expansion.js.map +1 -0
- package/dist/form-field/form-field.d.ts +48 -0
- package/dist/form-field/form-field.d.ts.map +1 -0
- package/dist/form-field/form-field.js +89 -0
- package/dist/form-field/form-field.js.map +1 -0
- package/dist/grid-list/grid-list.d.ts +25 -0
- package/dist/grid-list/grid-list.d.ts.map +1 -0
- package/dist/grid-list/grid-list.js +22 -0
- package/dist/grid-list/grid-list.js.map +1 -0
- package/dist/icon/icon.d.ts +40 -0
- package/dist/icon/icon.d.ts.map +1 -0
- package/dist/icon/icon.js +99 -0
- package/dist/icon/icon.js.map +1 -0
- package/dist/icon/icons.d.ts +60 -0
- package/dist/icon/icons.d.ts.map +1 -0
- package/dist/icon/icons.js +126 -0
- package/dist/icon/icons.js.map +1 -0
- package/dist/icon/lucide-icons.d.ts +11 -0
- package/dist/icon/lucide-icons.d.ts.map +1 -0
- package/dist/icon/lucide-icons.js +65 -0
- package/dist/icon/lucide-icons.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/input/input.d.ts +90 -0
- package/dist/input/input.d.ts.map +1 -0
- package/dist/input/input.js +138 -0
- package/dist/input/input.js.map +1 -0
- package/dist/internal/compose.d.ts +26 -0
- package/dist/internal/compose.d.ts.map +1 -0
- package/dist/internal/compose.js +32 -0
- package/dist/internal/compose.js.map +1 -0
- package/dist/list/list.d.ts +70 -0
- package/dist/list/list.d.ts.map +1 -0
- package/dist/list/list.js +144 -0
- package/dist/list/list.js.map +1 -0
- package/dist/menu/menu-core.d.ts +56 -0
- package/dist/menu/menu-core.d.ts.map +1 -0
- package/dist/menu/menu-core.js +122 -0
- package/dist/menu/menu-core.js.map +1 -0
- package/dist/menu/menu.d.ts +31 -0
- package/dist/menu/menu.d.ts.map +1 -0
- package/dist/menu/menu.js +68 -0
- package/dist/menu/menu.js.map +1 -0
- package/dist/menubar/menubar.d.ts +49 -0
- package/dist/menubar/menubar.d.ts.map +1 -0
- package/dist/menubar/menubar.js +162 -0
- package/dist/menubar/menubar.js.map +1 -0
- package/dist/paginator/paginator.d.ts +89 -0
- package/dist/paginator/paginator.d.ts.map +1 -0
- package/dist/paginator/paginator.js +159 -0
- package/dist/paginator/paginator.js.map +1 -0
- package/dist/popover-edit/popover-edit.d.ts +33 -0
- package/dist/popover-edit/popover-edit.d.ts.map +1 -0
- package/dist/popover-edit/popover-edit.js +107 -0
- package/dist/popover-edit/popover-edit.js.map +1 -0
- package/dist/progress-bar/progress-bar.d.ts +32 -0
- package/dist/progress-bar/progress-bar.d.ts.map +1 -0
- package/dist/progress-bar/progress-bar.js +42 -0
- package/dist/progress-bar/progress-bar.js.map +1 -0
- package/dist/progress-spinner/progress-spinner.d.ts +25 -0
- package/dist/progress-spinner/progress-spinner.d.ts.map +1 -0
- package/dist/progress-spinner/progress-spinner.js +25 -0
- package/dist/progress-spinner/progress-spinner.js.map +1 -0
- package/dist/radio/radio.d.ts +68 -0
- package/dist/radio/radio.d.ts.map +1 -0
- package/dist/radio/radio.js +81 -0
- package/dist/radio/radio.js.map +1 -0
- package/dist/ripple/ripple.d.ts +20 -0
- package/dist/ripple/ripple.d.ts.map +1 -0
- package/dist/ripple/ripple.js +41 -0
- package/dist/ripple/ripple.js.map +1 -0
- package/dist/select/select.d.ts +83 -0
- package/dist/select/select.d.ts.map +1 -0
- package/dist/select/select.js +320 -0
- package/dist/select/select.js.map +1 -0
- package/dist/shared/options.d.ts +44 -0
- package/dist/shared/options.d.ts.map +1 -0
- package/dist/shared/options.js +59 -0
- package/dist/shared/options.js.map +1 -0
- package/dist/shared/positions.d.ts +20 -0
- package/dist/shared/positions.d.ts.map +1 -0
- package/dist/shared/positions.js +27 -0
- package/dist/shared/positions.js.map +1 -0
- package/dist/sidenav/sidenav.d.ts +65 -0
- package/dist/sidenav/sidenav.d.ts.map +1 -0
- package/dist/sidenav/sidenav.js +120 -0
- package/dist/sidenav/sidenav.js.map +1 -0
- package/dist/slide-toggle/slide-toggle.d.ts +56 -0
- package/dist/slide-toggle/slide-toggle.d.ts.map +1 -0
- package/dist/slide-toggle/slide-toggle.js +62 -0
- package/dist/slide-toggle/slide-toggle.js.map +1 -0
- package/dist/slider/slider.d.ts +69 -0
- package/dist/slider/slider.d.ts.map +1 -0
- package/dist/slider/slider.js +184 -0
- package/dist/slider/slider.js.map +1 -0
- package/dist/snackbar/snackbar.d.ts +25 -0
- package/dist/snackbar/snackbar.d.ts.map +1 -0
- package/dist/snackbar/snackbar.js +135 -0
- package/dist/snackbar/snackbar.js.map +1 -0
- package/dist/stepper/stepper.d.ts +87 -0
- package/dist/stepper/stepper.d.ts.map +1 -0
- package/dist/stepper/stepper.js +142 -0
- package/dist/stepper/stepper.js.map +1 -0
- package/dist/table/table.d.ts +140 -0
- package/dist/table/table.d.ts.map +1 -0
- package/dist/table/table.js +312 -0
- package/dist/table/table.js.map +1 -0
- package/dist/tabs/tabs.d.ts +64 -0
- package/dist/tabs/tabs.d.ts.map +1 -0
- package/dist/tabs/tabs.js +126 -0
- package/dist/tabs/tabs.js.map +1 -0
- package/dist/timepicker/timepicker.d.ts +83 -0
- package/dist/timepicker/timepicker.d.ts.map +1 -0
- package/dist/timepicker/timepicker.js +303 -0
- package/dist/timepicker/timepicker.js.map +1 -0
- package/dist/toolbar/toolbar.d.ts +34 -0
- package/dist/toolbar/toolbar.d.ts.map +1 -0
- package/dist/toolbar/toolbar.js +35 -0
- package/dist/toolbar/toolbar.js.map +1 -0
- package/dist/tooltip/tooltip.d.ts +30 -0
- package/dist/tooltip/tooltip.d.ts.map +1 -0
- package/dist/tooltip/tooltip.js +109 -0
- package/dist/tooltip/tooltip.js.map +1 -0
- package/dist/tree/tree.d.ts +100 -0
- package/dist/tree/tree.d.ts.map +1 -0
- package/dist/tree/tree.js +288 -0
- package/dist/tree/tree.js.map +1 -0
- package/package.json +230 -0
- package/src/styles/_api.scss +384 -0
- package/src/styles/_helpers.scss +101 -0
- package/src/styles/_index.scss +12 -0
- package/src/styles/_ref.scss +20 -0
- package/src/styles/_sass-utils.scss +14 -0
- package/src/styles/_token-utils.scss +24 -0
- package/src/styles/components/autocomplete/_index.scss +10 -0
- package/src/styles/components/autocomplete/_styles.scss +46 -0
- package/src/styles/components/autocomplete/_tokens.scss +28 -0
- package/src/styles/components/badge/_index.scss +12 -0
- package/src/styles/components/badge/_styles.scss +72 -0
- package/src/styles/components/badge/_tokens.scss +27 -0
- package/src/styles/components/bottom-sheet/_index.scss +9 -0
- package/src/styles/components/bottom-sheet/_styles.scss +77 -0
- package/src/styles/components/bottom-sheet/_tokens.scss +33 -0
- package/src/styles/components/button/_index.scss +12 -0
- package/src/styles/components/button/_styles.scss +106 -0
- package/src/styles/components/button/_tokens.scss +36 -0
- package/src/styles/components/button-toggle/_index.scss +12 -0
- package/src/styles/components/button-toggle/_styles.scss +57 -0
- package/src/styles/components/button-toggle/_tokens.scss +25 -0
- package/src/styles/components/card/_index.scss +15 -0
- package/src/styles/components/card/_styles.scss +68 -0
- package/src/styles/components/card/_tokens.scss +26 -0
- package/src/styles/components/checkbox/_index.scss +13 -0
- package/src/styles/components/checkbox/_styles.scss +108 -0
- package/src/styles/components/checkbox/_tokens.scss +25 -0
- package/src/styles/components/chips/_index.scss +12 -0
- package/src/styles/components/chips/_styles.scss +83 -0
- package/src/styles/components/chips/_tokens.scss +28 -0
- package/src/styles/components/datepicker/_index.scss +10 -0
- package/src/styles/components/datepicker/_styles.scss +203 -0
- package/src/styles/components/datepicker/_tokens.scss +50 -0
- package/src/styles/components/dialog/_index.scss +9 -0
- package/src/styles/components/dialog/_styles.scss +54 -0
- package/src/styles/components/dialog/_tokens.scss +29 -0
- package/src/styles/components/divider/_index.scss +8 -0
- package/src/styles/components/divider/_styles.scss +18 -0
- package/src/styles/components/divider/_tokens.scss +12 -0
- package/src/styles/components/expansion/_index.scss +14 -0
- package/src/styles/components/expansion/_styles.scss +128 -0
- package/src/styles/components/expansion/_tokens.scss +32 -0
- package/src/styles/components/form-field/_index.scss +13 -0
- package/src/styles/components/form-field/_styles.scss +39 -0
- package/src/styles/components/form-field/_tokens.scss +19 -0
- package/src/styles/components/grid-list/_index.scss +12 -0
- package/src/styles/components/grid-list/_styles.scss +31 -0
- package/src/styles/components/grid-list/_tokens.scss +18 -0
- package/src/styles/components/icon/_index.scss +8 -0
- package/src/styles/components/icon/_styles.scss +18 -0
- package/src/styles/components/icon/_tokens.scss +8 -0
- package/src/styles/components/input/_index.scss +13 -0
- package/src/styles/components/input/_styles.scss +111 -0
- package/src/styles/components/input/_tokens.scss +21 -0
- package/src/styles/components/list/_index.scss +12 -0
- package/src/styles/components/list/_styles.scss +87 -0
- package/src/styles/components/list/_tokens.scss +31 -0
- package/src/styles/components/menu/_index.scss +9 -0
- package/src/styles/components/menu/_styles.scss +60 -0
- package/src/styles/components/menu/_tokens.scss +33 -0
- package/src/styles/components/menubar/_index.scss +9 -0
- package/src/styles/components/menubar/_styles.scss +41 -0
- package/src/styles/components/menubar/_tokens.scss +25 -0
- package/src/styles/components/overlay/_index.scss +8 -0
- package/src/styles/components/overlay/_styles.scss +25 -0
- package/src/styles/components/overlay/_tokens.scss +21 -0
- package/src/styles/components/paginator/_index.scss +14 -0
- package/src/styles/components/paginator/_styles.scss +77 -0
- package/src/styles/components/paginator/_tokens.scss +28 -0
- package/src/styles/components/popover-edit/_index.scss +9 -0
- package/src/styles/components/popover-edit/_styles.scss +31 -0
- package/src/styles/components/popover-edit/_tokens.scss +21 -0
- package/src/styles/components/progress-bar/_index.scss +11 -0
- package/src/styles/components/progress-bar/_styles.scss +39 -0
- package/src/styles/components/progress-bar/_tokens.scss +17 -0
- package/src/styles/components/progress-spinner/_index.scss +11 -0
- package/src/styles/components/progress-spinner/_styles.scss +26 -0
- package/src/styles/components/progress-spinner/_tokens.scss +15 -0
- package/src/styles/components/radio/_index.scss +14 -0
- package/src/styles/components/radio/_styles.scss +92 -0
- package/src/styles/components/radio/_tokens.scss +24 -0
- package/src/styles/components/ripple/_index.scss +8 -0
- package/src/styles/components/ripple/_styles.scss +20 -0
- package/src/styles/components/ripple/_tokens.scss +12 -0
- package/src/styles/components/select/_index.scss +9 -0
- package/src/styles/components/select/_styles.scss +120 -0
- package/src/styles/components/select/_tokens.scss +35 -0
- package/src/styles/components/sidenav/_index.scss +14 -0
- package/src/styles/components/sidenav/_styles.scss +105 -0
- package/src/styles/components/sidenav/_tokens.scss +24 -0
- package/src/styles/components/slide-toggle/_index.scss +13 -0
- package/src/styles/components/slide-toggle/_styles.scss +86 -0
- package/src/styles/components/slide-toggle/_tokens.scss +24 -0
- package/src/styles/components/slider/_index.scss +13 -0
- package/src/styles/components/slider/_styles.scss +77 -0
- package/src/styles/components/slider/_tokens.scss +21 -0
- package/src/styles/components/snackbar/_index.scss +8 -0
- package/src/styles/components/snackbar/_styles.scss +59 -0
- package/src/styles/components/snackbar/_tokens.scss +28 -0
- package/src/styles/components/stepper/_index.scss +14 -0
- package/src/styles/components/stepper/_styles.scss +129 -0
- package/src/styles/components/stepper/_tokens.scss +44 -0
- package/src/styles/components/table/_index.scss +14 -0
- package/src/styles/components/table/_styles.scss +202 -0
- package/src/styles/components/table/_tokens.scss +47 -0
- package/src/styles/components/tabs/_index.scss +13 -0
- package/src/styles/components/tabs/_styles.scss +76 -0
- package/src/styles/components/tabs/_tokens.scss +28 -0
- package/src/styles/components/timepicker/_index.scss +9 -0
- package/src/styles/components/timepicker/_styles.scss +136 -0
- package/src/styles/components/timepicker/_tokens.scss +46 -0
- package/src/styles/components/toolbar/_index.scss +12 -0
- package/src/styles/components/toolbar/_styles.scss +41 -0
- package/src/styles/components/toolbar/_tokens.scss +17 -0
- package/src/styles/components/tooltip/_index.scss +8 -0
- package/src/styles/components/tooltip/_styles.scss +29 -0
- package/src/styles/components/tooltip/_tokens.scss +22 -0
- package/src/styles/components/tree/_index.scss +13 -0
- package/src/styles/components/tree/_styles.scss +99 -0
- package/src/styles/components/tree/_tokens.scss +38 -0
- package/src/styles/theme/_defaults.scss +50 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// checkbox — styles() mixin (class rules). Forwarded by ./_index.scss.
|
|
2
|
+
@use '../../helpers' as helpers;
|
|
3
|
+
|
|
4
|
+
@mixin styles() {
|
|
5
|
+
.weave-checkbox {
|
|
6
|
+
position: relative;
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: var(--weave-checkbox-gap);
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
|
|
12
|
+
@content;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* The real input overlays the whole label (opacity 0) so it stays keyboard- and
|
|
16
|
+
pointer-reachable while the __box carries the visual. */
|
|
17
|
+
.weave-checkbox__input {
|
|
18
|
+
position: absolute;
|
|
19
|
+
inset: 0;
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
margin: 0;
|
|
23
|
+
opacity: 0;
|
|
24
|
+
cursor: inherit;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.weave-checkbox__box {
|
|
28
|
+
position: relative;
|
|
29
|
+
flex: none;
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
width: var(--weave-checkbox-size);
|
|
32
|
+
height: var(--weave-checkbox-size);
|
|
33
|
+
border: var(--weave-checkbox-border-width) solid var(--weave-checkbox-border);
|
|
34
|
+
border-radius: var(--weave-checkbox-radius);
|
|
35
|
+
background: var(--weave-checkbox-background);
|
|
36
|
+
transition:
|
|
37
|
+
background var(--weave-checkbox-duration) ease,
|
|
38
|
+
border-color var(--weave-checkbox-duration) ease;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* The ✓ tick — the shared checkmark glyph, revealed when checked. */
|
|
42
|
+
.weave-checkbox__box::after {
|
|
43
|
+
@include helpers.checkmark(var(--weave-checkbox-mark));
|
|
44
|
+
position: absolute;
|
|
45
|
+
left: 50%;
|
|
46
|
+
top: 46%;
|
|
47
|
+
transform: translate(-50%, -50%) rotate(45deg);
|
|
48
|
+
opacity: 0;
|
|
49
|
+
transition: opacity var(--weave-checkbox-duration) ease;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* The mixed dash — shown when indeterminate. */
|
|
53
|
+
.weave-checkbox__box::before {
|
|
54
|
+
content: '';
|
|
55
|
+
position: absolute;
|
|
56
|
+
left: 50%;
|
|
57
|
+
top: 50%;
|
|
58
|
+
width: 10px;
|
|
59
|
+
height: 2px;
|
|
60
|
+
border-radius: 1px;
|
|
61
|
+
background: var(--weave-checkbox-mark);
|
|
62
|
+
transform: translate(-50%, -50%);
|
|
63
|
+
opacity: 0;
|
|
64
|
+
transition: opacity var(--weave-checkbox-duration) ease;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.weave-checkbox__label {
|
|
68
|
+
font-size: var(--weave-checkbox-label-size);
|
|
69
|
+
color: var(--weave-checkbox-label-text);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* On (checked or indeterminate) — the accent fill. */
|
|
73
|
+
.weave-checkbox__input:checked + .weave-checkbox__box,
|
|
74
|
+
.weave-checkbox__input:indeterminate + .weave-checkbox__box {
|
|
75
|
+
background: var(--weave-checkbox-checked-background);
|
|
76
|
+
border-color: var(--weave-checkbox-checked-background);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.weave-checkbox__input:checked + .weave-checkbox__box::after {
|
|
80
|
+
opacity: 1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Indeterminate rules come AFTER checked so a box that is both shows the dash, not
|
|
84
|
+
the tick. */
|
|
85
|
+
.weave-checkbox__input:indeterminate + .weave-checkbox__box::after {
|
|
86
|
+
opacity: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.weave-checkbox__input:indeterminate + .weave-checkbox__box::before {
|
|
90
|
+
opacity: 1;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.weave-checkbox__input:focus-visible + .weave-checkbox__box {
|
|
94
|
+
@include helpers.focus-ring;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.weave-checkbox__input:disabled {
|
|
98
|
+
cursor: not-allowed;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.weave-checkbox__input:disabled + .weave-checkbox__box {
|
|
102
|
+
opacity: 0.5;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.weave-checkbox__input:disabled ~ .weave-checkbox__label {
|
|
106
|
+
color: var(--weave-checkbox-disabled-text);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// checkbox — design tokens (schema). Forwarded by ./_index.scss.
|
|
2
|
+
@use '../../ref' as ref;
|
|
3
|
+
|
|
4
|
+
$tokens: (
|
|
5
|
+
color: (
|
|
6
|
+
border: ref.ref('color.line'),
|
|
7
|
+
background: transparent,
|
|
8
|
+
checked-background: ref.ref('color.accent'),
|
|
9
|
+
// On-accent tick: a fixed white (accent is dark in Light + Dim, so surface/canvas
|
|
10
|
+
// wouldn't contrast) — same call as the badge.
|
|
11
|
+
mark: #fff,
|
|
12
|
+
label-text: ref.ref('color.ink'),
|
|
13
|
+
disabled-text: ref.ref('color.sub'),
|
|
14
|
+
),
|
|
15
|
+
size: (
|
|
16
|
+
size: 20px,
|
|
17
|
+
radius: 3px,
|
|
18
|
+
border-width: 1.5px,
|
|
19
|
+
gap: 8px,
|
|
20
|
+
duration: ref.ref('motion.fast'),
|
|
21
|
+
),
|
|
22
|
+
typography: (
|
|
23
|
+
label-size: 13px,
|
|
24
|
+
),
|
|
25
|
+
);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Chips — a removable tag list. Behavior lives in chips.ts (array value + forms binding,
|
|
2
|
+
// remove via × / Backspace/Delete, arrow-nav via the CDK listKeyManager); this is the visual.
|
|
3
|
+
//
|
|
4
|
+
// Each chip is a 1px-bordered pill (radius 3px) = `__label` + a `×` `__remove` button; an
|
|
5
|
+
// optional dashed `__chip--add` "+ Add" chip trails the list. Roving-tabindex group
|
|
6
|
+
// (`role=group`); the remove button carries an `aria-label`.
|
|
7
|
+
//
|
|
8
|
+
// Barrel — forwards the split partials ($tokens + the styles() mixin). Add another
|
|
9
|
+
// concern as its own file and @forward it here.
|
|
10
|
+
|
|
11
|
+
@forward 'tokens';
|
|
12
|
+
@forward 'styles';
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// chips — styles() mixin (class rules). Forwarded by ./_index.scss.
|
|
2
|
+
@use '../../helpers' as helpers;
|
|
3
|
+
|
|
4
|
+
@mixin styles() {
|
|
5
|
+
.weave-chips {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
flex-wrap: wrap;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: var(--weave-chips-gap);
|
|
10
|
+
|
|
11
|
+
@content;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.weave-chips__chip {
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: var(--weave-chips-chip-gap);
|
|
18
|
+
padding: var(--weave-chips-padding-y) var(--weave-chips-padding-x);
|
|
19
|
+
border: 1px solid var(--weave-chips-border);
|
|
20
|
+
border-radius: var(--weave-chips-radius);
|
|
21
|
+
background: transparent;
|
|
22
|
+
color: var(--weave-chips-text);
|
|
23
|
+
font-size: var(--weave-chips-font-size);
|
|
24
|
+
line-height: var(--weave-chips-line-height);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.weave-chips__chip:focus-visible {
|
|
28
|
+
@include helpers.focus-ring;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.weave-chips__label {
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.weave-chips__remove {
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
width: var(--weave-chips-remove-size);
|
|
40
|
+
height: var(--weave-chips-remove-size);
|
|
41
|
+
margin-inline-end: var(--weave-chips-remove-nudge); // pull the × toward the chip edge (RTL-aware)
|
|
42
|
+
padding: 0;
|
|
43
|
+
border: 0;
|
|
44
|
+
border-radius: 50%;
|
|
45
|
+
background: transparent;
|
|
46
|
+
color: var(--weave-chips-remove);
|
|
47
|
+
font-size: var(--weave-chips-remove-font-size);
|
|
48
|
+
line-height: 1;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
transition:
|
|
51
|
+
color var(--weave-chips-duration) ease,
|
|
52
|
+
background var(--weave-chips-duration) ease;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.weave-chips__remove:hover:not(:disabled) {
|
|
56
|
+
color: var(--weave-chips-text);
|
|
57
|
+
background: var(--weave-chips-hover);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.weave-chips__remove:disabled {
|
|
61
|
+
cursor: not-allowed;
|
|
62
|
+
opacity: 0.5;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* The dashed "+ Add" chip — a real button. */
|
|
66
|
+
.weave-chips__chip--add {
|
|
67
|
+
gap: var(--weave-chips-add-gap);
|
|
68
|
+
border-style: dashed;
|
|
69
|
+
color: var(--weave-chips-add-text);
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
font-family: inherit;
|
|
72
|
+
transition: background var(--weave-chips-duration) ease;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.weave-chips__chip--add:hover:not(:disabled) {
|
|
76
|
+
background: var(--weave-chips-hover);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.weave-chips__chip--add:disabled {
|
|
80
|
+
cursor: not-allowed;
|
|
81
|
+
opacity: 0.5;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// chips — design tokens (schema). Forwarded by ./_index.scss.
|
|
2
|
+
@use '../../ref' as ref;
|
|
3
|
+
|
|
4
|
+
$tokens: (
|
|
5
|
+
color: (
|
|
6
|
+
border: ref.ref('color.line'),
|
|
7
|
+
text: ref.ref('color.ink'),
|
|
8
|
+
hover: ref.ref('color.field'),
|
|
9
|
+
remove: ref.ref('color.sub'),
|
|
10
|
+
add-text: ref.ref('color.sub'),
|
|
11
|
+
),
|
|
12
|
+
size: (
|
|
13
|
+
radius: 3px,
|
|
14
|
+
padding-x: 10px,
|
|
15
|
+
padding-y: 4px,
|
|
16
|
+
gap: 8px,
|
|
17
|
+
chip-gap: 6px,
|
|
18
|
+
add-gap: 4px,
|
|
19
|
+
remove-size: 16px,
|
|
20
|
+
remove-nudge: -4px,
|
|
21
|
+
duration: ref.ref('motion.fast'),
|
|
22
|
+
),
|
|
23
|
+
typography: (
|
|
24
|
+
font-size: 12px,
|
|
25
|
+
line-height: 1.4,
|
|
26
|
+
remove-font-size: 14px,
|
|
27
|
+
),
|
|
28
|
+
);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Datepicker — a date field + calendar popover. Behavior lives in datepicker.ts (trigger
|
|
2
|
+
// field + a CDK-overlay calendar grid, all date math via the CDK Date adapter); this is the
|
|
3
|
+
// visual. An underline trigger field (shared field-underline helper, like Select) with a
|
|
4
|
+
// calendar icon; the calendar reuses the overlay-panel chrome and lays out a 7-col month grid
|
|
5
|
+
// where the selected day = accent fill + white and today = an inset accent ring.
|
|
6
|
+
//
|
|
7
|
+
// Barrel — forwards the split partials ($tokens + the styles() mixin).
|
|
8
|
+
|
|
9
|
+
@forward 'tokens';
|
|
10
|
+
@forward 'styles';
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
// datepicker — styles() mixin. An underline trigger field (shared field-underline helper,
|
|
2
|
+
// like Select) with a calendar icon; the calendar panel reuses the overlay-panel chrome and
|
|
3
|
+
// lays out a 7-col month grid. Selected day = accent fill + white; today = inset accent ring;
|
|
4
|
+
// state rides ARIA attrs / classes (the panel is portaled — no native pseudo). Forwarded by
|
|
5
|
+
// ./_index.scss.
|
|
6
|
+
@use '../../helpers' as helpers;
|
|
7
|
+
|
|
8
|
+
@mixin styles() {
|
|
9
|
+
.weave-datepicker {
|
|
10
|
+
display: block;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.weave-datepicker__field {
|
|
14
|
+
@include helpers.field-underline(
|
|
15
|
+
var(--weave-datepicker-border),
|
|
16
|
+
var(--weave-datepicker-focus),
|
|
17
|
+
var(--weave-datepicker-border-width)
|
|
18
|
+
);
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: var(--weave-datepicker-gap);
|
|
22
|
+
padding: var(--weave-datepicker-field-padding-y) 0;
|
|
23
|
+
color: var(--weave-datepicker-text);
|
|
24
|
+
font-size: var(--weave-datepicker-font-size);
|
|
25
|
+
font-weight: var(--weave-datepicker-weight);
|
|
26
|
+
line-height: 1.4;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.weave-datepicker__value--placeholder {
|
|
31
|
+
color: var(--weave-datepicker-placeholder);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Editable text field (opt-in `editable`) — the input IS the combobox; underline is the
|
|
35
|
+
// field wrapper's (shared helper), so the input strips its own chrome.
|
|
36
|
+
.weave-datepicker__input {
|
|
37
|
+
@include helpers.field-reset;
|
|
38
|
+
flex: 1 1 auto;
|
|
39
|
+
min-width: 0;
|
|
40
|
+
padding: 0;
|
|
41
|
+
color: var(--weave-datepicker-text);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.weave-datepicker__input::placeholder {
|
|
45
|
+
color: var(--weave-datepicker-placeholder);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Calendar-toggle button (editable mode) — wraps the icon glyph.
|
|
49
|
+
.weave-datepicker__icon-button {
|
|
50
|
+
@include helpers.field-reset;
|
|
51
|
+
display: inline-flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
flex: 0 0 auto;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.weave-datepicker__icon-button:focus-visible {
|
|
58
|
+
@include helpers.focus-ring;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.weave-datepicker__spacer {
|
|
62
|
+
flex: 1 1 auto;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.weave-datepicker__clear {
|
|
66
|
+
@include helpers.clear-button(var(--weave-datepicker-placeholder), var(--weave-datepicker-text));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// A small calendar glyph (pure CSS: a bordered box with a filled header bar).
|
|
70
|
+
.weave-datepicker__icon {
|
|
71
|
+
position: relative;
|
|
72
|
+
flex: 0 0 auto;
|
|
73
|
+
width: var(--weave-datepicker-icon-size);
|
|
74
|
+
height: var(--weave-datepicker-icon-size);
|
|
75
|
+
border: 1.5px solid var(--weave-datepicker-icon);
|
|
76
|
+
border-radius: 2px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.weave-datepicker__icon::before {
|
|
80
|
+
content: '';
|
|
81
|
+
position: absolute;
|
|
82
|
+
inset: -1.5px -1.5px auto -1.5px;
|
|
83
|
+
height: 3px;
|
|
84
|
+
background: var(--weave-datepicker-icon);
|
|
85
|
+
border-radius: 2px 2px 0 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.weave-datepicker--disabled .weave-datepicker__field {
|
|
89
|
+
color: var(--weave-datepicker-disabled-text);
|
|
90
|
+
cursor: default;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.weave-datepicker--invalid .weave-datepicker__field {
|
|
94
|
+
border-bottom-color: var(--weave-datepicker-error);
|
|
95
|
+
box-shadow: inset 0 -1px 0 0 var(--weave-datepicker-error);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* ── calendar panel ── */
|
|
99
|
+
.weave-datepicker__panel {
|
|
100
|
+
@include helpers.overlay-panel;
|
|
101
|
+
width: var(--weave-datepicker-panel-width);
|
|
102
|
+
padding: var(--weave-datepicker-panel-padding);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.weave-datepicker__nav {
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
justify-content: space-between;
|
|
109
|
+
margin-bottom: 6px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.weave-datepicker__nav-button {
|
|
113
|
+
@include helpers.field-reset;
|
|
114
|
+
display: inline-flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
justify-content: center;
|
|
117
|
+
width: var(--weave-datepicker-nav-size);
|
|
118
|
+
height: var(--weave-datepicker-nav-size);
|
|
119
|
+
border-radius: 50%;
|
|
120
|
+
color: var(--weave-datepicker-nav);
|
|
121
|
+
cursor: pointer;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.weave-datepicker__nav-button:hover {
|
|
125
|
+
color: var(--weave-datepicker-nav-hover);
|
|
126
|
+
background: var(--weave-datepicker-cell-hover);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.weave-datepicker__nav-button:focus-visible {
|
|
130
|
+
@include helpers.focus-ring;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.weave-datepicker__month-label {
|
|
134
|
+
font-size: var(--weave-datepicker-month-label-size);
|
|
135
|
+
font-weight: var(--weave-datepicker-month-label-weight);
|
|
136
|
+
color: var(--weave-datepicker-text);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.weave-datepicker__weekdays {
|
|
140
|
+
display: grid;
|
|
141
|
+
grid-template-columns: repeat(7, 1fr);
|
|
142
|
+
margin-bottom: 2px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.weave-datepicker__weekday {
|
|
146
|
+
display: flex;
|
|
147
|
+
align-items: center;
|
|
148
|
+
justify-content: center;
|
|
149
|
+
height: var(--weave-datepicker-cell-size);
|
|
150
|
+
color: var(--weave-datepicker-weekday);
|
|
151
|
+
font-size: var(--weave-datepicker-weekday-size);
|
|
152
|
+
font-weight: 400;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.weave-datepicker__row {
|
|
156
|
+
display: grid;
|
|
157
|
+
grid-template-columns: repeat(7, 1fr);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.weave-datepicker__cell {
|
|
161
|
+
@include helpers.field-reset;
|
|
162
|
+
display: inline-flex;
|
|
163
|
+
align-items: center;
|
|
164
|
+
justify-content: center;
|
|
165
|
+
width: var(--weave-datepicker-cell-size);
|
|
166
|
+
height: var(--weave-datepicker-cell-size);
|
|
167
|
+
margin: 1px auto;
|
|
168
|
+
border-radius: var(--weave-datepicker-cell-radius);
|
|
169
|
+
color: var(--weave-datepicker-cell-text);
|
|
170
|
+
font-size: var(--weave-datepicker-cell-size);
|
|
171
|
+
cursor: pointer;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// A non-day slot (leading/trailing blank).
|
|
175
|
+
.weave-datepicker__cell--blank {
|
|
176
|
+
cursor: default;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.weave-datepicker__cell:not(:disabled):not(.weave-datepicker__cell--selected):hover {
|
|
180
|
+
background: var(--weave-datepicker-cell-hover);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.weave-datepicker__cell:focus-visible {
|
|
184
|
+
@include helpers.focus-ring($offset: -1px);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Today = an inset accent ring (design).
|
|
188
|
+
.weave-datepicker__cell--today {
|
|
189
|
+
box-shadow: inset 0 0 0 1px var(--weave-datepicker-today-ring);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// Selected = accent fill + white (design) — wins over today's ring.
|
|
193
|
+
.weave-datepicker__cell--selected {
|
|
194
|
+
background: var(--weave-datepicker-selected-background);
|
|
195
|
+
color: var(--weave-datepicker-selected-text);
|
|
196
|
+
box-shadow: none;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.weave-datepicker__cell--disabled {
|
|
200
|
+
color: var(--weave-datepicker-disabled-text);
|
|
201
|
+
cursor: default;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// datepicker — design tokens (schema). An underline trigger field (like Select) + a calendar
|
|
2
|
+
// popover: a 7-col month grid where the selected day = accent fill + white and today = an
|
|
3
|
+
// inset accent ring (per the design README). Panel reuses the shared overlay-panel chrome.
|
|
4
|
+
// Forwarded by ./_index.scss.
|
|
5
|
+
@use '../../ref' as ref;
|
|
6
|
+
|
|
7
|
+
$tokens: (
|
|
8
|
+
color: (
|
|
9
|
+
text: ref.ref('color.ink'),
|
|
10
|
+
placeholder: ref.ref('color.sub'),
|
|
11
|
+
border: ref.ref('color.line'),
|
|
12
|
+
focus: ref.ref('color.accent'),
|
|
13
|
+
error: ref.ref('color.error'),
|
|
14
|
+
icon: ref.ref('color.sub'),
|
|
15
|
+
disabled-text: ref.ref('color.sub'),
|
|
16
|
+
// Calendar.
|
|
17
|
+
nav: ref.ref('color.sub'),
|
|
18
|
+
nav-hover: ref.ref('color.ink'),
|
|
19
|
+
weekday: ref.ref('color.sub'),
|
|
20
|
+
cell-text: ref.ref('color.ink'),
|
|
21
|
+
cell-hover: ref.ref('color.field'),
|
|
22
|
+
// Selected day = accent fill + white text (the design).
|
|
23
|
+
selected-background: ref.ref('color.accent'),
|
|
24
|
+
selected-text: ref.ref('color.surface'),
|
|
25
|
+
// Today = an inset 1px accent ring.
|
|
26
|
+
today-ring: ref.ref('color.accent'),
|
|
27
|
+
),
|
|
28
|
+
size: (
|
|
29
|
+
gap: 8px,
|
|
30
|
+
field-padding-y: 6px,
|
|
31
|
+
border-width: 1.5px,
|
|
32
|
+
radius: ref.ref('shape.radius'),
|
|
33
|
+
icon-size: 14px,
|
|
34
|
+
// Calendar geometry (design: ~236px popover).
|
|
35
|
+
panel-width: 236px,
|
|
36
|
+
panel-padding: 10px,
|
|
37
|
+
cell-size: 30px,
|
|
38
|
+
cell-radius: ref.ref('shape.radius'),
|
|
39
|
+
nav-size: 26px,
|
|
40
|
+
duration: ref.ref('motion.fast'),
|
|
41
|
+
),
|
|
42
|
+
typography: (
|
|
43
|
+
font-size: 13px,
|
|
44
|
+
weight: 500,
|
|
45
|
+
cell-size: 12px,
|
|
46
|
+
weekday-size: 11px,
|
|
47
|
+
month-label-size: 13px,
|
|
48
|
+
month-label-weight: 600,
|
|
49
|
+
),
|
|
50
|
+
);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Dialog — a centered modal panel. Behavior lives in dialog.ts (openDialog → DialogRef:
|
|
2
|
+
// CDK overlay + dimming backdrop + blockScroll + focus-trap/restore + Esc/backdrop close);
|
|
3
|
+
// this is the visual: a hairline flex-column panel with three regions — a fixed header
|
|
4
|
+
// (optional), a vertically-scrolling content area (always), and a fixed actions row
|
|
5
|
+
// (optional) — bounded so it never exceeds the viewport.
|
|
6
|
+
//
|
|
7
|
+
// Barrel — forwards the split partials ($tokens + the styles() mixin).
|
|
8
|
+
@forward 'tokens';
|
|
9
|
+
@forward 'styles';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// dialog — styles() mixin (class rules). A hairline modal panel (surface + 1px line, NO
|
|
2
|
+
// shadow) laid out as a flex column of three regions: a fixed header, a scrolling content
|
|
3
|
+
// area, and a fixed actions row. The panel never exceeds the viewport (max-width/height),
|
|
4
|
+
// so tall content scrolls INSIDE __content while header/actions stay put. Forwarded by
|
|
5
|
+
// ./_index.scss.
|
|
6
|
+
|
|
7
|
+
@mixin styles() {
|
|
8
|
+
.weave-dialog {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
width: var(--weave-dialog-width);
|
|
13
|
+
min-width: var(--weave-dialog-min-width);
|
|
14
|
+
// Never exceed the viewport — this clamp always wins over the inline width/height.
|
|
15
|
+
max-width: calc(100vw - 2 * var(--weave-dialog-margin));
|
|
16
|
+
max-height: calc(100vh - 2 * var(--weave-dialog-margin));
|
|
17
|
+
background: var(--weave-dialog-surface);
|
|
18
|
+
color: var(--weave-dialog-text);
|
|
19
|
+
border: 1px solid var(--weave-dialog-line);
|
|
20
|
+
border-radius: var(--weave-dialog-radius);
|
|
21
|
+
overflow: hidden; // clip the regions to the panel radius
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Header — fixed (doesn't scroll); only present when the dev supplies one.
|
|
25
|
+
.weave-dialog__header {
|
|
26
|
+
flex: 0 0 auto;
|
|
27
|
+
padding: var(--weave-dialog-padding);
|
|
28
|
+
border-bottom: 1px solid var(--weave-dialog-line);
|
|
29
|
+
font-size: var(--weave-dialog-title-size);
|
|
30
|
+
font-weight: var(--weave-dialog-title-weight);
|
|
31
|
+
line-height: var(--weave-dialog-title-line-height);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Content — always present; takes the remaining height and scrolls vertically.
|
|
35
|
+
// `min-height:0` lets the flex child shrink below its content size so the scroll engages.
|
|
36
|
+
.weave-dialog__content {
|
|
37
|
+
flex: 1 1 auto;
|
|
38
|
+
min-height: 0;
|
|
39
|
+
overflow-y: auto;
|
|
40
|
+
padding: var(--weave-dialog-padding);
|
|
41
|
+
line-height: var(--weave-dialog-content-line-height);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Actions — fixed footer, right-aligned; only present when the dev supplies actions.
|
|
45
|
+
.weave-dialog__actions {
|
|
46
|
+
flex: 0 0 auto;
|
|
47
|
+
display: flex;
|
|
48
|
+
justify-content: flex-end;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: var(--weave-dialog-actions-gap);
|
|
51
|
+
padding: var(--weave-dialog-padding);
|
|
52
|
+
border-top: 1px solid var(--weave-dialog-line);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// dialog — design tokens (schema). A centered modal panel; the backdrop dim comes from the
|
|
2
|
+
// shared overlay republic. Forwarded by ./_index.scss.
|
|
3
|
+
@use '../../ref' as ref;
|
|
4
|
+
|
|
5
|
+
$tokens: (
|
|
6
|
+
color: (
|
|
7
|
+
surface: ref.ref('color.surface'),
|
|
8
|
+
text: ref.ref('color.ink'),
|
|
9
|
+
// Header/actions dividers.
|
|
10
|
+
line: ref.ref('color.line'),
|
|
11
|
+
),
|
|
12
|
+
size: (
|
|
13
|
+
// Default preferred width; per-dialog override via openDialog({ width }). Always
|
|
14
|
+
// clamped by the viewport (max-width below), so it can't overflow the screen.
|
|
15
|
+
width: 560px,
|
|
16
|
+
min-width: 320px,
|
|
17
|
+
// Gap kept from each viewport edge (drives the max-width/height clamp).
|
|
18
|
+
margin: 16px,
|
|
19
|
+
radius: ref.ref('shape.radius'),
|
|
20
|
+
padding: 20px,
|
|
21
|
+
actions-gap: 8px,
|
|
22
|
+
),
|
|
23
|
+
typography: (
|
|
24
|
+
title-size: 15px,
|
|
25
|
+
title-weight: 600,
|
|
26
|
+
title-line-height: 1.3,
|
|
27
|
+
content-line-height: 1.5,
|
|
28
|
+
),
|
|
29
|
+
);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Divider — a hairline rule. Weave: 1px var(--line) horizontal; 1px×16px vertical.
|
|
2
|
+
// Pure CSS (no behavior). Two-layer anatomy: token schema ($tokens) + styles() rules.
|
|
3
|
+
//
|
|
4
|
+
// Barrel — forwards the split partials ($tokens + the styles() mixin). Add another
|
|
5
|
+
// concern as its own file (e.g. _keyframes.scss) and @forward it here.
|
|
6
|
+
|
|
7
|
+
@forward 'tokens';
|
|
8
|
+
@forward 'styles';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// divider — styles() mixin (class rules). Forwarded by ./_index.scss.
|
|
2
|
+
|
|
3
|
+
@mixin styles() {
|
|
4
|
+
.weave-divider {
|
|
5
|
+
border: 0;
|
|
6
|
+
border-top: var(--weave-divider-thickness) solid var(--weave-divider-line);
|
|
7
|
+
margin: 0;
|
|
8
|
+
align-self: stretch;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.weave-divider--vertical {
|
|
12
|
+
border-top: 0;
|
|
13
|
+
border-left: var(--weave-divider-thickness) solid var(--weave-divider-line);
|
|
14
|
+
width: 0;
|
|
15
|
+
height: var(--weave-divider-height);
|
|
16
|
+
align-self: center;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Expansion — an accordion of collapsible panels. Behavior lives in expansion.ts
|
|
2
|
+
// (open-set + single/multi toggle + arrow-key header nav; bodies appended on mount);
|
|
3
|
+
// this is the visual.
|
|
4
|
+
//
|
|
5
|
+
// A panel = a role=heading > <button> header (title + a +/- marker) toggling a
|
|
6
|
+
// role=region body. Open/collapsed state rides the NATIVE ARIA attrs, not a class:
|
|
7
|
+
// [aria-expanded=true] tints the header (--field) + flips the marker to −; the region
|
|
8
|
+
// [data-open=true] animates via grid-template-rows 0fr→1fr (no JS height measure).
|
|
9
|
+
//
|
|
10
|
+
// Barrel — forwards the split partials ($tokens + the styles() mixin). Add another
|
|
11
|
+
// concern as its own file and @forward it here.
|
|
12
|
+
|
|
13
|
+
@forward 'tokens';
|
|
14
|
+
@forward 'styles';
|