@kubex/zinc 1.1.185 → 2.0.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/.browserslistrc +2 -0
- package/.github/workflows/js_build_and_deploy.yaml +54 -1
- package/.github/workflows/test.yaml +27 -0
- package/dist/chunks/zn.UWJLIXDT.js +1 -0
- package/dist/custom-elements.json +10319 -2666
- package/dist/vscode.html-custom-data.json +1012 -57
- package/dist/web-types.json +2097 -145
- package/dist/zn.d.ts +2294 -416
- package/dist/zn.min.css +1 -1
- package/dist/zn.min.js +2310 -1637
- package/docs/_includes/default.njk +4 -1
- package/docs/assets/scripts/docs.js +22 -6
- package/docs/assets/styles/docs.css +9 -2
- package/docs/data/report-table-day-compare.json +380 -0
- package/docs/data/report-table.json +314 -0
- package/docs/pages/components/avatar-group.md +57 -0
- package/docs/pages/components/badge.md +67 -0
- package/docs/pages/components/button.md +41 -1
- package/docs/pages/components/chat-message.md +16 -0
- package/docs/pages/components/checkbox.md +1 -1
- package/docs/pages/components/chip.md +25 -13
- package/docs/pages/components/color-picker.md +37 -0
- package/docs/pages/components/copy-button.md +2 -2
- package/docs/pages/components/data-table-filter.md +33 -50
- package/docs/pages/components/data-table-search.md +4 -4
- package/docs/pages/components/data-table.md +27 -3
- package/docs/pages/components/date-range.md +116 -0
- package/docs/pages/components/dialog.md +29 -37
- package/docs/pages/components/diff-row.md +28 -0
- package/docs/pages/components/diff.md +46 -0
- package/docs/pages/components/editor.md +55 -0
- package/docs/pages/components/icon.md +46 -1
- package/docs/pages/components/input.md +30 -11
- package/docs/pages/components/item.md +35 -0
- package/docs/pages/components/key-value.md +25 -0
- package/docs/pages/components/menu.md +74 -7
- package/docs/pages/components/nav-item.md +15 -0
- package/docs/pages/components/nav-list.md +132 -0
- package/docs/pages/components/navbar.md +100 -1
- package/docs/pages/components/page.md +242 -74
- package/docs/pages/components/priority-list.md +43 -5
- package/docs/pages/components/query-builder.md +23 -0
- package/docs/pages/components/radio-group.md +33 -1
- package/docs/pages/components/radio.md +1 -1
- package/docs/pages/components/report-table.md +202 -0
- package/docs/pages/components/stat.md +30 -0
- package/docs/pages/components/tile.md +11 -0
- package/docs/pages/components/tooltip.md +1 -1
- package/docs/pages/components/translation-grid.md +86 -0
- package/docs/pages/components/vertical-stepper.md +108 -64
- package/package.json +2 -1
- package/scss/_global-spacing.scss +2 -2
- package/scss/_root.scss +11 -171
- package/scss/boot.scss +14 -0
- package/scss/mixins/_helper-mixins.scss +24 -2
- package/scss/mixins/_motion-mixins.scss +126 -0
- package/scss/mixins/_spacing-mixins.scss +4 -3
- package/scss/mixins/_tab-indicator-mixins.scss +12 -0
- package/scss/mixins/_typography-mixins.scss +1 -1
- package/scss/mixins/index.scss +14 -0
- package/scss/shared/_base.scss +32 -1
- package/scss/shared/_button-mixin.scss +7 -5
- package/scss/shared/_table.scss +35 -4
- package/scss/shared/nav.scss +4 -0
- package/scss/shared/shimmer.scss +1 -1
- package/scss/table-controls.scss +206 -0
- package/scss/themes/_dark.scss +1 -3
- package/scss/themes/_index.scss +1 -1
- package/scss/themes/_light.scss +46 -6
- package/scss/themes/_modes.scss +11 -11
- package/scss/themes/_openbyte.scss +944 -0
- package/scss/themes/_typography.scss +4 -2
- package/scss/variables/index.scss +0 -9
- package/src/components/alert/alert.component.ts +14 -4
- package/src/components/alert/alert.scss +55 -69
- package/src/components/alert/alert.test.ts +8 -0
- package/src/components/animated-button/animated-button.component.ts +3 -2
- package/src/components/animated-button/animated-button.scss +6 -23
- package/src/components/animated-button/animated-button.test.ts +4 -3
- package/src/components/avatar-group/avatar-group.component.ts +84 -0
- package/src/components/avatar-group/avatar-group.scss +54 -0
- package/src/components/avatar-group/avatar-group.test.ts +59 -0
- package/src/components/avatar-group/index.ts +12 -0
- package/src/components/badge/badge.component.ts +49 -0
- package/src/components/badge/badge.scss +80 -0
- package/src/components/badge/badge.test.ts +34 -0
- package/src/components/badge/index.ts +12 -0
- package/src/components/bulk-actions/bulk-actions.component.ts +14 -2
- package/src/components/button/button.component.ts +228 -8
- package/src/components/button/button.scss +115 -32
- package/src/components/button/button.test.ts +122 -0
- package/src/components/button-menu/button-menu.component.ts +32 -11
- package/src/components/button-menu/button-menu.scss +5 -1
- package/src/components/channel-tile/channel-tile.component.ts +34 -27
- package/src/components/channel-tile/channel-tile.scss +76 -43
- package/src/components/chart/builders.test.ts +46 -0
- package/src/components/chart/builders.ts +27 -3
- package/src/components/chart/chart-live.test.ts +4 -6
- package/src/components/chart/chart.component.ts +125 -5
- package/src/components/chart/chart.scss +121 -0
- package/src/components/chart/chart.test.ts +81 -0
- package/src/components/chat-message/chat-message.component.ts +21 -1
- package/src/components/chat-message/chat-message.scss +13 -2
- package/src/components/chat-message/chat-message.test.ts +9 -0
- package/src/components/checkbox/checkbox.component.ts +61 -27
- package/src/components/checkbox/checkbox.scss +58 -25
- package/src/components/checkbox-group/checkbox-group.component.ts +7 -1
- package/src/components/chip/chip.component.ts +11 -1
- package/src/components/chip/chip.scss +91 -26
- package/src/components/chip/chip.test.ts +17 -0
- package/src/components/collapsible/collapsible.component.ts +17 -3
- package/src/components/collapsible/collapsible.scss +19 -10
- package/src/components/color-picker/color-picker.component.ts +277 -0
- package/src/components/color-picker/color-picker.scss +141 -0
- package/src/components/color-picker/color-picker.test.ts +57 -0
- package/src/components/color-picker/index.ts +12 -0
- package/src/components/cols/cols.component.ts +10 -0
- package/src/components/cols/cols.test.ts +17 -0
- package/src/components/confirm/confirm.component.ts +20 -6
- package/src/components/confirm/confirm.test.ts +52 -0
- package/src/components/content-block/content-block.component.ts +38 -9
- package/src/components/content-block/content-block.scss +11 -5
- package/src/components/content-block/content-block.test.ts +26 -0
- package/src/components/copy-button/copy-button.component.ts +2 -2
- package/src/components/copy-button/copy-button.scss +17 -4
- package/src/components/data-select/data-select.component.ts +3 -1
- package/src/components/data-table/data-table.component.ts +362 -140
- package/src/components/data-table/data-table.scss +136 -60
- package/src/components/data-table/data-table.test.ts +356 -4
- package/src/components/data-table-filter/data-table-filter.component.ts +426 -406
- package/src/components/data-table-filter/data-table-filter.scss +176 -148
- package/src/components/data-table-filter/data-table-filter.test.ts +271 -273
- package/src/components/data-table-search/data-table-search.component.ts +4 -2
- package/src/components/data-table-search/data-table-search.scss +8 -1
- package/src/components/data-table-search/data-table-search.test.ts +29 -0
- package/src/components/date-range/date-range-math.test.ts +78 -0
- package/src/components/date-range/date-range-math.ts +105 -0
- package/src/components/date-range/date-range.component.ts +375 -0
- package/src/components/date-range/date-range.scss +272 -0
- package/src/components/date-range/date-range.test.ts +247 -0
- package/src/components/date-range/index.ts +12 -0
- package/src/components/datepicker/datepicker.component.ts +44 -7
- package/src/components/datepicker/datepicker.scss +9 -0
- package/src/components/datepicker/datepicker.test.ts +2 -2
- package/src/components/dialog/dialog.component.ts +38 -19
- package/src/components/dialog/dialog.scss +65 -36
- package/src/components/dialog/dialog.test.ts +14 -0
- package/src/components/diff/diff.component.ts +55 -0
- package/src/components/diff/diff.scss +46 -0
- package/src/components/diff/diff.test.ts +15 -0
- package/src/components/diff/index.ts +12 -0
- package/src/components/diff-row/diff-row.component.ts +75 -0
- package/src/components/diff-row/diff-row.scss +70 -0
- package/src/components/diff-row/diff-row.test.ts +37 -0
- package/src/components/diff-row/index.ts +12 -0
- package/src/components/dropdown/dropdown.component.ts +12 -10
- package/src/components/dropdown/dropdown.scss +2 -0
- package/src/components/editor/editor.component.ts +159 -11
- package/src/components/editor/editor.scss +250 -1
- package/src/components/editor/editor.test.ts +31 -3
- package/src/components/editor/modules/ai/panel/ai-panel.scss +0 -1
- package/src/components/editor/modules/attachment/attachment.ts +53 -31
- package/src/components/editor/modules/context-menu/context-menu.ts +17 -0
- package/src/components/editor/modules/dialog/dialog.component.ts +23 -1
- package/src/components/editor/modules/dialog/dialog.test.ts +28 -0
- package/src/components/editor/modules/emoji/emoji.ts +4 -5
- package/src/components/editor/modules/merge-field/merge-field.ts +83 -0
- package/src/components/editor/modules/toolbar/toolbar.component.ts +121 -68
- package/src/components/editor/modules/toolbar/toolbar.scss +38 -0
- package/src/components/editor/modules/toolbar/toolbar.ts +25 -1
- package/src/components/empty-state/empty-state.component.ts +6 -1
- package/src/components/empty-state/empty-state.scss +21 -4
- package/src/components/expanding-action/expanding-action.component.ts +22 -34
- package/src/components/expanding-action/expanding-action.scss +3 -45
- package/src/components/expanding-action/expanding-action.test.ts +2 -1
- package/src/components/file/file.component.ts +30 -2
- package/src/components/file/file.scss +6 -0
- package/src/components/flow-builder/flow-builder.component.ts +36 -3
- package/src/components/flow-builder/flow-builder.scss +0 -6
- package/src/components/flow-builder/modules/flow-canvas/flow-canvas.component.ts +8 -0
- package/src/components/flow-builder/modules/flow-canvas/flow-canvas.scss +10 -5
- package/src/components/flow-builder/modules/flow-node/flow-node.component.ts +17 -0
- package/src/components/flow-builder/modules/flow-node/flow-node.scss +10 -0
- package/src/components/form-actions/form-actions.component.ts +48 -2
- package/src/components/form-actions/form-actions.scss +1 -1
- package/src/components/form-group/form-group.component.ts +10 -3
- package/src/components/form-group/form-group.scss +37 -4
- package/src/components/form-group/form-group.test.ts +10 -0
- package/src/components/header/header.component.ts +11 -4
- package/src/components/header/header.scss +47 -5
- package/src/components/hover-container/hover-container.component.ts +4 -5
- package/src/components/icon/icon.component.ts +95 -9
- package/src/components/icon/icon.scss +70 -6
- package/src/components/icon/icon.test.ts +55 -0
- package/src/components/icon-picker/icon-picker.component.ts +35 -1
- package/src/components/inline-edit/inline-edit.component.ts +38 -8
- package/src/components/inline-edit/inline-edit.scss +128 -19
- package/src/components/input/input.component.ts +173 -297
- package/src/components/input/input.scss +65 -43
- package/src/components/input/input.test.ts +86 -4
- package/src/components/item/item.component.ts +12 -0
- package/src/components/item/item.scss +102 -3
- package/src/components/item/item.test.ts +23 -0
- package/src/components/key/key.component.ts +2 -2
- package/src/components/key/key.scss +11 -0
- package/src/components/key-value/index.ts +12 -0
- package/src/components/key-value/key-value.component.ts +160 -0
- package/src/components/key-value/key-value.scss +20 -0
- package/src/components/key-value/key-value.test.ts +22 -0
- package/src/components/markdown-editor/markdown-editor.component.ts +8 -1
- package/src/components/menu/menu.component.ts +21 -2
- package/src/components/menu/menu.scss +43 -23
- package/src/components/menu/menu.test.ts +33 -0
- package/src/components/menu-item/menu-item.component.ts +13 -2
- package/src/components/menu-item/menu-item.scss +56 -23
- package/src/components/menu-item/menu-item.test.ts +31 -0
- package/src/components/menu-item/submenu-controller.ts +25 -15
- package/src/components/menu-label/index.ts +12 -0
- package/src/components/menu-label/menu-label.component.ts +30 -0
- package/src/components/menu-label/menu-label.scss +18 -0
- package/src/components/nav-item/index.ts +12 -0
- package/src/components/nav-item/nav-item.component.ts +83 -0
- package/src/components/nav-item/nav-item.scss +128 -0
- package/src/components/nav-list/index.ts +12 -0
- package/src/components/nav-list/nav-list.component.ts +313 -0
- package/src/components/nav-list/nav-list.scss +87 -0
- package/src/components/nav-list/nav-list.test.ts +250 -0
- package/src/components/navbar/navbar.component.ts +235 -171
- package/src/components/navbar/navbar.scss +333 -169
- package/src/components/navbar/navbar.test.ts +63 -143
- package/src/components/page/page.component.ts +114 -29
- package/src/components/page/page.scss +223 -95
- package/src/components/page/page.test.ts +214 -3
- package/src/components/page-builder/page-builder.component.ts +51 -5
- package/src/components/page-builder/page-builder.scss +6 -1
- package/src/components/page-nav/page-nav.component.ts +25 -3
- package/src/components/page-nav/page-nav.scss +10 -2
- package/src/components/pagination/pagination.scss +1 -1
- package/src/components/panel/panel.component.ts +14 -13
- package/src/components/panel/panel.scss +14 -10
- package/src/components/panel/panel.test.ts +42 -0
- package/src/components/popup/popup.component.ts +20 -13
- package/src/components/popup/popup.test.ts +21 -1
- package/src/components/priority-list/priority-list.component.ts +157 -172
- package/src/components/priority-list/priority-list.scss +113 -17
- package/src/components/priority-list/priority-list.test.ts +301 -3
- package/src/components/progress-bar/progress-bar.component.ts +1 -1
- package/src/components/progress-bar/progress-bar.scss +16 -4
- package/src/components/progress-tile/progress-tile.scss +1 -1
- package/src/components/query-builder/query-builder.component.ts +85 -10
- package/src/components/query-builder/query-builder.scss +7 -1
- package/src/components/query-builder/query-builder.test.ts +40 -0
- package/src/components/radio/radio.component.ts +57 -18
- package/src/components/radio/radio.scss +101 -26
- package/src/components/radio-group/radio-group.component.ts +45 -7
- package/src/components/radio-group/radio-group.scss +17 -0
- package/src/components/radio-group/radio-group.test.ts +63 -2
- package/src/components/rating/rating.component.ts +23 -0
- package/src/components/rating/rating.scss +1 -1
- package/src/components/remarkd-editor/remarkd-editor.component.ts +60 -5
- package/src/components/remarkd-editor/remarkd-editor.scss +12 -4
- package/src/components/report-table/index.ts +12 -0
- package/src/components/report-table/report-format.test.ts +86 -0
- package/src/components/report-table/report-format.ts +72 -0
- package/src/components/report-table/report-math.test.ts +74 -0
- package/src/components/report-table/report-math.ts +252 -0
- package/src/components/report-table/report-table.component.ts +681 -0
- package/src/components/report-table/report-table.scss +328 -0
- package/src/components/report-table/report-table.test.ts +702 -0
- package/src/components/reveal/reveal.component.ts +15 -1
- package/src/components/reveal/reveal.scss +5 -0
- package/src/components/schedule-builder/schedule-builder.component.ts +23 -8
- package/src/components/scroll-container/scroll-container.component.ts +19 -1
- package/src/components/scroll-container/scroll-container.scss +6 -1
- package/src/components/select/select.component.ts +52 -36
- package/src/components/select/select.scss +42 -25
- package/src/components/select/select.test.ts +14 -2
- package/src/components/settings-container/settings-container.scss +18 -5
- package/src/components/sidebar/sidebar.component.ts +8 -1
- package/src/components/sidebar/sidebar.scss +6 -1
- package/src/components/skeleton/skeleton.component.ts +3 -3
- package/src/components/skeleton/skeleton.scss +6 -6
- package/src/components/skeleton/skeleton.test.ts +9 -0
- package/src/components/slash-menu/slash-menu.scss +1 -1
- package/src/components/slideout/slideout.component.ts +20 -3
- package/src/components/slideout/slideout.scss +13 -6
- package/src/components/slideout/slideout.test.ts +19 -0
- package/src/components/split-button/split-button.component.ts +1 -1
- package/src/components/split-pane/split-pane.component.ts +71 -8
- package/src/components/split-pane/split-pane.scss +145 -41
- package/src/components/split-pane/split-pane.test.ts +23 -3
- package/src/components/stat/stat.component.ts +209 -14
- package/src/components/stat/stat.scss +305 -5
- package/src/components/stat/stat.test.ts +143 -2
- package/src/components/status-indicator/status-indicator.scss +22 -21
- package/src/components/stepper/stepper.scss +3 -3
- package/src/components/tab/tab.component.ts +1 -0
- package/src/components/table/table.component.ts +12 -1
- package/src/components/table/table.scss +21 -13
- package/src/components/table/table.test.ts +17 -0
- package/src/components/tabs/tabs.component.ts +150 -37
- package/src/components/tabs/tabs.scss +48 -7
- package/src/components/tabs/tabs.test.ts +169 -0
- package/src/components/textarea/textarea.component.ts +25 -3
- package/src/components/textarea/textarea.scss +10 -0
- package/src/components/textarea/textarea.test.ts +8 -4
- package/src/components/theme-editor/theme-editor.scss +0 -6
- package/src/components/tile/tile.component.ts +32 -2
- package/src/components/tile/tile.scss +40 -7
- package/src/components/tile/tile.test.ts +10 -0
- package/src/components/toggle/toggle.component.ts +23 -7
- package/src/components/toggle/toggle.scss +36 -29
- package/src/components/toggle/toggle.test.ts +17 -0
- package/src/components/tooltip/tooltip.component.ts +3 -0
- package/src/components/tooltip/tooltip.scss +11 -6
- package/src/components/tooltip/tooltip.test.ts +12 -0
- package/src/components/translation-field/index.ts +12 -0
- package/src/components/translation-field/translation-field.component.ts +55 -0
- package/src/components/translation-field/translation-field.scss +101 -0
- package/src/components/translation-fields/index.ts +12 -0
- package/src/components/translation-fields/translation-fields.component.ts +80 -0
- package/src/components/translation-fields/translation-fields.scss +60 -0
- package/src/components/translation-grid/index.ts +12 -0
- package/src/components/translation-grid/translation-grid.component.ts +157 -0
- package/src/components/translation-grid/translation-grid.scss +138 -0
- package/src/components/translation-grid/translation-grid.test.ts +28 -0
- package/src/components/vertical-stepper/vertical-stepper.component.ts +35 -9
- package/src/components/vertical-stepper/vertical-stepper.scss +110 -39
- package/src/components/vertical-stepper/vertical-stepper.test.ts +35 -0
- package/src/components/well/well.scss +2 -2
- package/src/events/events.ts +2 -0
- package/src/events/zn-chart-click.ts +13 -0
- package/src/events/zn-report-change.ts +7 -0
- package/src/form-control.scss +36 -3
- package/src/internal/anchored-popover.ts +175 -0
- package/src/internal/animate.ts +19 -5
- package/src/internal/cosmic-border.ts +15 -0
- package/src/internal/form.ts +1 -1
- package/src/internal/hover-intent.ts +15 -0
- package/src/internal/input-modality.ts +15 -0
- package/src/internal/pointer-intent.ts +37 -0
- package/src/internal/reorder.ts +632 -0
- package/src/internal/scroll.ts +51 -3
- package/src/internal/selection-card.ts +1 -1
- package/src/internal/tab-indicator.ts +92 -0
- package/src/internal/table-sort.ts +25 -0
- package/src/internal/table-tabs.ts +108 -0
- package/src/internal/test-drag.ts +35 -0
- package/src/internal/theme-openbyte.test.ts +126 -0
- package/src/internal/theme.ts +4 -4
- package/src/internal/zinc-element.ts +2 -2
- package/src/selection-card.scss +25 -0
- package/src/types/web-test-runner-commands.d.ts +1 -0
- package/src/utilities/color.test.ts +43 -0
- package/src/utilities/color.ts +189 -0
- package/src/zinc.ts +14 -0
- package/.github/workflows/eleventy_build.yml +0 -42
- package/scss/themes/_aura.scss +0 -114
|
@@ -2,27 +2,27 @@
|
|
|
2
2
|
--skeleton-speed: 3s;
|
|
3
3
|
--skeleton-width: 100%;
|
|
4
4
|
--skeleton-height: 20px;
|
|
5
|
-
--skeleton-border-radius: 4px;
|
|
5
|
+
--skeleton-border-radius: var(--zn-skeleton-border-radius, 4px);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.skeleton {
|
|
9
9
|
height: var(--skeleton-height);
|
|
10
10
|
width: var(--skeleton-width);
|
|
11
11
|
border-radius: var(--skeleton-border-radius);
|
|
12
|
-
background-color: lightgrey;
|
|
12
|
+
background-color: var(--zn-skeleton-background, lightgrey);
|
|
13
13
|
|
|
14
14
|
@media (prefers-reduced-motion: reduce) {
|
|
15
15
|
background-repeat: no-repeat;
|
|
16
|
-
background-color: lightgrey;
|
|
16
|
+
background-color: var(--zn-skeleton-background, lightgrey);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
@media (prefers-reduced-motion: no-preference) {
|
|
20
20
|
background-repeat: no-repeat;
|
|
21
21
|
background-image: linear-gradient(
|
|
22
22
|
90deg,
|
|
23
|
-
|
|
24
|
-
rgba(255, 255, 255, 0.8) 50%,
|
|
25
|
-
|
|
23
|
+
transparent 0%,
|
|
24
|
+
var(--zn-skeleton-shimmer, rgba(255, 255, 255, 0.8)) 50%,
|
|
25
|
+
transparent 100%
|
|
26
26
|
);
|
|
27
27
|
background-size: 200% 100%;
|
|
28
28
|
background-position: -150% 0;
|
|
@@ -7,4 +7,13 @@ describe('<zn-skeleton>', () => {
|
|
|
7
7
|
|
|
8
8
|
expect(el).to.exist;
|
|
9
9
|
});
|
|
10
|
+
|
|
11
|
+
it('takes its radius from the theme token unless radius is set', async () => {
|
|
12
|
+
const themed = await fixture<HTMLElement>(html`<zn-skeleton style="--zn-skeleton-border-radius: 7px"></zn-skeleton>`);
|
|
13
|
+
const explicit = await fixture<HTMLElement>(html`<zn-skeleton radius="0" style="--zn-skeleton-border-radius: 7px"></zn-skeleton>`);
|
|
14
|
+
const radius = (el: HTMLElement) => getComputedStyle(el.shadowRoot!.querySelector('.skeleton')!).borderTopLeftRadius;
|
|
15
|
+
|
|
16
|
+
expect(radius(themed)).to.equal('7px');
|
|
17
|
+
expect(radius(explicit)).to.equal('0px');
|
|
18
|
+
});
|
|
10
19
|
});
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
cursor: pointer;
|
|
126
126
|
|
|
127
127
|
&:hover:not(&--disabled) {
|
|
128
|
-
background: var(--zn-
|
|
128
|
+
background: rgba(var(--zn-color-primary), 0.04);
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
// The active item is where Enter lands, so it is tinted rather than merely shaded like a hover.
|
|
@@ -119,6 +119,19 @@ export default class ZnSlideout extends ZincElement {
|
|
|
119
119
|
this.hide();
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
// Escape on a native modal dialog closes it directly, bypassing zn-request-close
|
|
123
|
+
private handleCancel = (event: Event) => {
|
|
124
|
+
event.preventDefault();
|
|
125
|
+
this.requestClose('keyboard');
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
// The browser can refuse to cancel a repeated Escape, closing the dialog anyway
|
|
129
|
+
private handleNativeClose = () => {
|
|
130
|
+
if (this.open) {
|
|
131
|
+
void this.hide();
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
|
|
122
135
|
private addOpenListeners() {
|
|
123
136
|
if ('CloseWatcher' in window) {
|
|
124
137
|
this.closeWatcher?.destroy();
|
|
@@ -178,6 +191,8 @@ export default class ZnSlideout extends ZincElement {
|
|
|
178
191
|
return html`
|
|
179
192
|
<dialog
|
|
180
193
|
part="base"
|
|
194
|
+
@cancel=${this.handleCancel}
|
|
195
|
+
@close=${this.handleNativeClose}
|
|
181
196
|
role="alertdialog"
|
|
182
197
|
aria-modal="true"
|
|
183
198
|
aria-hidden=${this.open ? 'false' : 'true'}
|
|
@@ -198,10 +213,12 @@ export default class ZnSlideout extends ZincElement {
|
|
|
198
213
|
part="close-button"
|
|
199
214
|
exportparts="base:close-button__base"
|
|
200
215
|
class="slideout__close"
|
|
201
|
-
icon="
|
|
202
|
-
icon-size="
|
|
216
|
+
icon="x@lu"
|
|
217
|
+
icon-size="16"
|
|
218
|
+
icon-button="small"
|
|
219
|
+
plain
|
|
203
220
|
type="button"
|
|
204
|
-
|
|
221
|
+
label="Close"
|
|
205
222
|
@click="${() => this.requestClose('close-button')}"
|
|
206
223
|
></zn-button>
|
|
207
224
|
</div>
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
:host {
|
|
4
4
|
--width: min(100vw, 46rem);
|
|
5
|
-
--header-spacing: var(--zn-spacing-large) var(--zn-spacing-large) var(--zn-spacing-medium);
|
|
6
|
-
--body-spacing: var(--zn-spacing-medium) var(--zn-spacing-large);
|
|
7
|
-
--footer-spacing: var(--zn-spacing-large);
|
|
5
|
+
--header-spacing: var(--zn-slideout-header-spacing, var(--zn-spacing-large) var(--zn-spacing-large) var(--zn-spacing-medium));
|
|
6
|
+
--body-spacing: var(--zn-slideout-body-spacing, var(--zn-spacing-medium) var(--zn-spacing-large));
|
|
7
|
+
--footer-spacing: var(--zn-slideout-footer-spacing, var(--zn-spacing-large));
|
|
8
8
|
--icon-background-color: var(--zn-color-primary-200);
|
|
9
9
|
--icon-color: var(--zn-color-primary-600);
|
|
10
10
|
--caption-color: var(--zn-color-primary-600);
|
|
@@ -27,10 +27,11 @@
|
|
|
27
27
|
padding: 0;
|
|
28
28
|
width: 1100px;
|
|
29
29
|
background: rgb(var(--zn-body));
|
|
30
|
-
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
|
|
30
|
+
box-shadow: var(--zn-slideout-shadow, 0 0 10px 0 rgba(0, 0, 0, 0.1));
|
|
31
31
|
|
|
32
32
|
&::backdrop {
|
|
33
33
|
background: var(--zn-overlay-background-color);
|
|
34
|
+
backdrop-filter: var(--zn-overlay-backdrop-filter, none);
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
|
|
@@ -46,10 +47,11 @@
|
|
|
46
47
|
flex: 1 1 auto;
|
|
47
48
|
align-items: center;
|
|
48
49
|
font: inherit;
|
|
50
|
+
font-family: var(--zn-text-h2-font-family, inherit);
|
|
49
51
|
margin: 0;
|
|
50
52
|
color: rgb(var(--zn-text-panel-title));
|
|
51
|
-
font-size: var(--zn-font-size-x-large);
|
|
52
|
-
font-weight: var(--zn-font-weight-semibold);
|
|
53
|
+
font-size: var(--zn-dialog-title-font-size, var(--zn-font-size-x-large));
|
|
54
|
+
font-weight: var(--zn-dialog-title-font-weight, var(--zn-font-weight-semibold));
|
|
53
55
|
letter-spacing: var(--zn-letter-spacing-normal);
|
|
54
56
|
line-height: var(--zn-font-size-x-large);
|
|
55
57
|
padding: var(--header-spacing);
|
|
@@ -74,6 +76,11 @@
|
|
|
74
76
|
}
|
|
75
77
|
}
|
|
76
78
|
|
|
79
|
+
&__close {
|
|
80
|
+
--zn-button-height: var(--zn-page-closer-size);
|
|
81
|
+
--zn-button-icon-width: var(--zn-page-closer-size);
|
|
82
|
+
}
|
|
83
|
+
|
|
77
84
|
&__body {
|
|
78
85
|
flex: 1 1 auto;
|
|
79
86
|
display: block;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import '../../../dist/zn.min.js';
|
|
2
|
+
import { emulateMedia } from '@web/test-runner-commands';
|
|
2
3
|
import { expect, fixture, html } from '@open-wc/testing';
|
|
3
4
|
|
|
4
5
|
describe('<zn-slideout>', () => {
|
|
@@ -7,4 +8,22 @@ describe('<zn-slideout>', () => {
|
|
|
7
8
|
|
|
8
9
|
expect(el).to.exist;
|
|
9
10
|
});
|
|
11
|
+
|
|
12
|
+
describe('reduced motion', () => {
|
|
13
|
+
before(() => emulateMedia({reducedMotion: 'reduce'}));
|
|
14
|
+
after(() => emulateMedia({reducedMotion: 'no-preference'}));
|
|
15
|
+
|
|
16
|
+
it('fades without sliding', async () => {
|
|
17
|
+
const el = await fixture<HTMLElement & { show: () => Promise<void> }>(html` <zn-slideout></zn-slideout> `);
|
|
18
|
+
const dialog = el.shadowRoot!.querySelector('.slideout')!;
|
|
19
|
+
|
|
20
|
+
void el.show();
|
|
21
|
+
const [animation] = dialog.getAnimations();
|
|
22
|
+
const keyframes = (animation.effect as KeyframeEffect).getKeyframes();
|
|
23
|
+
|
|
24
|
+
expect(keyframes.map(keyframe => keyframe.opacity)).to.deep.equal(['0', '1']);
|
|
25
|
+
expect(keyframes.some(keyframe => 'transform' in keyframe)).to.be.false;
|
|
26
|
+
expect(animation.effect!.getTiming().duration).to.equal(150);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
10
29
|
});
|
|
@@ -105,7 +105,7 @@ export default class ZnSplitButton extends ZincElement implements ZincFormContro
|
|
|
105
105
|
@click=${this.handleTriggerClick}>
|
|
106
106
|
${this.caption}
|
|
107
107
|
</zn-button>
|
|
108
|
-
<zn-button icon="keyboard_arrow_down"></zn-button>
|
|
108
|
+
<zn-button icon="keyboard_arrow_down" label="More options"></zn-button>
|
|
109
109
|
</zn-button-group>
|
|
110
110
|
</div>
|
|
111
111
|
`;
|
|
@@ -83,7 +83,10 @@ export default class ZnSplitPane extends ZincElement {
|
|
|
83
83
|
this._setFocusPane(parseInt((e.selectedTarget as HTMLElement).getAttribute('split-pane-focus')!));
|
|
84
84
|
});
|
|
85
85
|
this.addEventListener('zn-split-pane-focus-change', this.focusChangeHandler);
|
|
86
|
-
this.resizeObserver = new ResizeObserver(() =>
|
|
86
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
87
|
+
this.refreshNarrowState();
|
|
88
|
+
this.keepSecondarySize();
|
|
89
|
+
});
|
|
87
90
|
this.resizeObserver.observe(this);
|
|
88
91
|
}
|
|
89
92
|
|
|
@@ -94,6 +97,18 @@ export default class ZnSplitPane extends ZincElement {
|
|
|
94
97
|
super.disconnectedCallback();
|
|
95
98
|
}
|
|
96
99
|
|
|
100
|
+
// The primary pane is sized in pixels, so a `secondary` pane would otherwise take up every change in the container
|
|
101
|
+
private keepSecondarySize() {
|
|
102
|
+
if (!this.preferSecondarySize || !this.calculatePixels || !this.currentContainerSize) return;
|
|
103
|
+
|
|
104
|
+
const containerSize = this.vertical ? this.getBoundingClientRect().height : this.getBoundingClientRect().width;
|
|
105
|
+
if (!containerSize || containerSize === this.currentContainerSize) return;
|
|
106
|
+
|
|
107
|
+
const secondarySize = this.currentContainerSize - this.currentPixelSize;
|
|
108
|
+
this.currentContainerSize = containerSize;
|
|
109
|
+
this.setSize(containerSize - secondarySize);
|
|
110
|
+
}
|
|
111
|
+
|
|
97
112
|
private refreshNarrowState() {
|
|
98
113
|
const nowNarrow = this.getBoundingClientRect().width < MERGED_NAVIGATION_BREAKPOINT_PX;
|
|
99
114
|
if (nowNarrow !== this.parentIsNarrow) {
|
|
@@ -105,7 +120,6 @@ export default class ZnSplitPane extends ZincElement {
|
|
|
105
120
|
|
|
106
121
|
firstUpdated(changedProperties: PropertyValues) {
|
|
107
122
|
setTimeout(this.applyStoredSize.bind(this), 100);
|
|
108
|
-
this.refreshNarrowState();
|
|
109
123
|
super.firstUpdated(changedProperties);
|
|
110
124
|
}
|
|
111
125
|
|
|
@@ -154,7 +168,7 @@ export default class ZnSplitPane extends ZincElement {
|
|
|
154
168
|
}.bind(this);
|
|
155
169
|
|
|
156
170
|
this.mouseUpHandler = function () {
|
|
157
|
-
this.
|
|
171
|
+
this.storeSize();
|
|
158
172
|
this.classList.remove('resizing');
|
|
159
173
|
window.removeEventListener('touchmove', this.mouseMoveHandler);
|
|
160
174
|
window.removeEventListener('mousemove', this.mouseMoveHandler);
|
|
@@ -170,6 +184,41 @@ export default class ZnSplitPane extends ZincElement {
|
|
|
170
184
|
window.addEventListener('mouseup', this.mouseUpHandler);
|
|
171
185
|
}
|
|
172
186
|
|
|
187
|
+
private storeSize() {
|
|
188
|
+
this._store.set(this.storeKey, Math.round(this.currentPixelSize) + "," + Math.round(this.currentPercentSize) + "," + this.currentContainerSize);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
private handleResizerKeyDown(e: KeyboardEvent) {
|
|
192
|
+
if (this.hide === 'primary' || this.hide === 'secondary') {
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
this.currentContainerSize = this.vertical ? this.getBoundingClientRect().height : this.getBoundingClientRect().width;
|
|
197
|
+
const step = this.calculatePixels ? 10 : this.currentContainerSize / 100;
|
|
198
|
+
let size: number;
|
|
199
|
+
switch (e.key) {
|
|
200
|
+
case 'ArrowLeft':
|
|
201
|
+
case 'ArrowUp':
|
|
202
|
+
size = this.currentPixelSize - step;
|
|
203
|
+
break;
|
|
204
|
+
case 'ArrowRight':
|
|
205
|
+
case 'ArrowDown':
|
|
206
|
+
size = this.currentPixelSize + step;
|
|
207
|
+
break;
|
|
208
|
+
case 'Home':
|
|
209
|
+
size = 0;
|
|
210
|
+
break;
|
|
211
|
+
case 'End':
|
|
212
|
+
size = this.currentContainerSize;
|
|
213
|
+
break;
|
|
214
|
+
default:
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
e.preventDefault();
|
|
218
|
+
this.setSize(size);
|
|
219
|
+
this.storeSize();
|
|
220
|
+
}
|
|
221
|
+
|
|
173
222
|
setSize(primaryPanelPixels: number) {
|
|
174
223
|
const hasMinimumSecondaryPaneSize = Number.isFinite(this.minimumSecondaryPaneSize);
|
|
175
224
|
const maximumPrimaryPanelPixels = hasMinimumSecondaryPaneSize
|
|
@@ -216,6 +265,7 @@ export default class ZnSplitPane extends ZincElement {
|
|
|
216
265
|
this.currentPixelSize = pixelSize;
|
|
217
266
|
this.currentPercentSize = percentSize;
|
|
218
267
|
this.primaryFull = this.calculatePixels ? (this.currentPixelSize + 'px') : (this.currentPercentSize + '%');
|
|
268
|
+
this.requestUpdate();
|
|
219
269
|
}
|
|
220
270
|
|
|
221
271
|
_setFocusPane(idx: number) {
|
|
@@ -300,21 +350,34 @@ export default class ZnSplitPane extends ZincElement {
|
|
|
300
350
|
--min-panel-size: ${this.minimumPaneSize}${this.calculatePixels ? 'px' : '%'};
|
|
301
351
|
--min-secondary-panel-size: ${minimumSecondaryPaneSize};
|
|
302
352
|
--max-panel-size: ${this.maximumPaneSize ? this.maximumPaneSize + (this.calculatePixels ? 'px' : '%') : 'none'};
|
|
303
|
-
--initial-size: ${this.primaryFull};
|
|
304
353
|
--resize-size: ${resizeWidth};
|
|
305
354
|
--resize-margin: ${resizeMargin};
|
|
306
355
|
}</style>
|
|
307
|
-
<ul id="split-nav">
|
|
356
|
+
<ul id="split-nav" role="tablist">
|
|
308
357
|
${this.getNavigationItems().map(item => html`
|
|
309
|
-
<li class="${item.active ? 'active' : ''}"
|
|
358
|
+
<li class="${item.active ? 'active' : ''}" role="tab" tabindex="0" aria-selected="${item.active}"
|
|
359
|
+
@click="${item.select}"
|
|
360
|
+
@keydown="${(e: KeyboardEvent) => {
|
|
361
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
362
|
+
e.preventDefault();
|
|
363
|
+
item.select();
|
|
364
|
+
}
|
|
365
|
+
}}">
|
|
310
366
|
${item.caption}
|
|
311
367
|
</li>
|
|
312
368
|
`)}
|
|
313
369
|
</ul>
|
|
314
|
-
<div id="primary-pane">
|
|
370
|
+
<div id="primary-pane" style="--zn-split-pane-size: ${this.primaryFull}">
|
|
315
371
|
<slot name="primary" @slotchange="${() => this.requestUpdate()}"></slot>
|
|
316
372
|
</div>
|
|
317
|
-
<div @mousedown="${this.resize}" @touchstart="${this.resize}" id="resizer"
|
|
373
|
+
<div @mousedown="${this.resize}" @touchstart="${this.resize}" @keydown="${this.handleResizerKeyDown}" id="resizer"
|
|
374
|
+
role="separator" tabindex="0"
|
|
375
|
+
aria-orientation="${this.vertical ? 'horizontal' : 'vertical'}"
|
|
376
|
+
aria-valuenow="${Math.round(this.calculatePixels ? this.currentPixelSize : this.currentPercentSize)}"
|
|
377
|
+
aria-valuemin="${this.minimumPaneSize}"
|
|
378
|
+
aria-valuemax="${this.maximumPaneSize || (this.calculatePixels ? Math.round(this.currentContainerSize) : 100)}">
|
|
379
|
+
<span id="grip"></span>
|
|
380
|
+
</div>
|
|
318
381
|
<div id="secondary-pane">
|
|
319
382
|
<slot name="secondary" @slotchange="${() => this.requestUpdate()}"></slot>
|
|
320
383
|
</div>
|
|
@@ -6,14 +6,15 @@
|
|
|
6
6
|
gap: 0 calc(var(--zn-base-gap) / 2);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
// Slotted panes are light DOM,
|
|
9
|
+
// Slotted panes are light DOM, out of reach of the ::-webkit-scrollbar rules here.
|
|
10
|
+
// Flex-stretched, not `height: 100%`, which costs Safari ~30ms per DOM or hover change inside the panes.
|
|
10
11
|
::slotted(*) {
|
|
11
12
|
display: flex;
|
|
12
13
|
flex-direction: column;
|
|
13
|
-
|
|
14
|
+
flex: 1 1 0;
|
|
15
|
+
min-height: 0;
|
|
14
16
|
overflow-y: auto;
|
|
15
|
-
|
|
16
|
-
scrollbar-color: mixins.$scrollbar-thumb transparent;
|
|
17
|
+
@include mixins.scrollbars-standard;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
:host {
|
|
@@ -28,11 +29,11 @@
|
|
|
28
29
|
container-type: inline-size;
|
|
29
30
|
position: relative;
|
|
30
31
|
|
|
31
|
-
// Panes are sized from --
|
|
32
|
+
// Panes are sized from --zn-split-pane-size, never from their content. Without an
|
|
32
33
|
// explicit flex-basis, a wide unbreakable child (long token in a <pre>, wide
|
|
33
34
|
// table) becomes the flex base size and the resizer stops having any effect.
|
|
34
35
|
#primary-pane {
|
|
35
|
-
flex: 0 1 var(--
|
|
36
|
+
flex: 0 1 var(--zn-split-pane-size, 50%);
|
|
36
37
|
min-width: 0;
|
|
37
38
|
min-height: 0;
|
|
38
39
|
}
|
|
@@ -44,12 +45,22 @@
|
|
|
44
45
|
overflow: hidden;
|
|
45
46
|
}
|
|
46
47
|
|
|
48
|
+
#primary-pane, #secondary-pane {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
}
|
|
52
|
+
|
|
47
53
|
slot {
|
|
48
54
|
overflow: auto;
|
|
49
55
|
}
|
|
50
56
|
|
|
57
|
+
--resizer-line: transparent;
|
|
58
|
+
--resizer-active: var(--zn-split-pane-handle-hover, rgb(var(--zn-primary)));
|
|
59
|
+
|
|
51
60
|
#resizer {
|
|
52
61
|
position: relative;
|
|
62
|
+
outline: none;
|
|
63
|
+
cursor: col-resize;
|
|
53
64
|
|
|
54
65
|
&:after {
|
|
55
66
|
content: "";
|
|
@@ -62,15 +73,56 @@
|
|
|
62
73
|
display: block;
|
|
63
74
|
position: absolute;
|
|
64
75
|
z-index: 1;
|
|
65
|
-
|
|
76
|
+
background-color: var(--resizer-line);
|
|
77
|
+
// Size changes aren't transitioned: fractional in-between widths leave stale strips of the line painted
|
|
78
|
+
transition: background-color var(--zn-transition-fast) var(--zn-ease-out);
|
|
66
79
|
}
|
|
80
|
+
}
|
|
67
81
|
|
|
68
|
-
|
|
82
|
+
#grip {
|
|
83
|
+
position: absolute;
|
|
84
|
+
top: 50%;
|
|
85
|
+
left: 50%;
|
|
86
|
+
translate: -50% -50%;
|
|
87
|
+
z-index: 2;
|
|
88
|
+
width: 4px;
|
|
89
|
+
height: 28px;
|
|
90
|
+
border-radius: 999px;
|
|
91
|
+
// Faded by mixing into the gutter, not opacity, so the divider line stays hidden behind the pill
|
|
92
|
+
background-color: color-mix(in srgb, color-mix(in srgb, rgb(var(--zn-border-color)), rgb(var(--zn-text)) 20%), var(--zn-split-pane-gutter, rgb(var(--zn-body))));
|
|
93
|
+
box-shadow: 0 0 0 2px var(--zn-split-pane-gutter, rgb(var(--zn-body)));
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
transition: background-color var(--zn-transition-fast) var(--zn-ease-out),
|
|
96
|
+
scale var(--zn-transition-fast) var(--zn-ease-out);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@include wc.hover-fine {
|
|
100
|
+
// Delay the hover highlight so the cursor passing over the gutter doesn't flash it.
|
|
101
|
+
#resizer:hover {
|
|
102
|
+
&:before, #grip {
|
|
103
|
+
transition-delay: 150ms;
|
|
104
|
+
background-color: var(--resizer-active);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
69
108
|
|
|
70
|
-
|
|
71
|
-
|
|
109
|
+
#resizer:focus-visible {
|
|
110
|
+
&:before, #grip {
|
|
111
|
+
background-color: var(--resizer-active);
|
|
72
112
|
}
|
|
73
113
|
}
|
|
114
|
+
|
|
115
|
+
#resizer:focus-visible #grip {
|
|
116
|
+
outline: var(--zn-focus-ring);
|
|
117
|
+
outline-offset: 2px;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:host(.resizing) #resizer {
|
|
122
|
+
&:before, #grip {
|
|
123
|
+
background-color: var(--resizer-active);
|
|
124
|
+
transition-delay: 0ms;
|
|
125
|
+
}
|
|
74
126
|
}
|
|
75
127
|
|
|
76
128
|
:host(:not([vertical])), zn-split-pane:not([vertical]) {
|
|
@@ -105,23 +157,24 @@
|
|
|
105
157
|
|
|
106
158
|
&::before {
|
|
107
159
|
content: '';
|
|
108
|
-
left:
|
|
109
|
-
right:
|
|
160
|
+
left: 0;
|
|
161
|
+
right: 0;
|
|
110
162
|
bottom: -1px;
|
|
111
163
|
position: absolute;
|
|
112
164
|
background-color: rgb(var(--zn-accent));
|
|
113
|
-
|
|
165
|
+
scale: 0 1;
|
|
166
|
+
transition: scale var(--zn-transition-medium) var(--zn-ease-out);
|
|
114
167
|
height: var(--zn-spacing-2x-small);
|
|
115
168
|
}
|
|
116
169
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
170
|
+
@include wc.hover-fine {
|
|
171
|
+
&:hover::before {
|
|
172
|
+
scale: .6 1;
|
|
173
|
+
}
|
|
120
174
|
}
|
|
121
175
|
|
|
122
176
|
&.active::before {
|
|
123
|
-
|
|
124
|
-
right: 0;
|
|
177
|
+
scale: 1 1;
|
|
125
178
|
}
|
|
126
179
|
}
|
|
127
180
|
}
|
|
@@ -149,6 +202,8 @@
|
|
|
149
202
|
#primary-pane {
|
|
150
203
|
max-width: var(--max-panel-size, none);
|
|
151
204
|
overflow: hidden;
|
|
205
|
+
// Keeps a scrollbar along the pane's edge clear of the divider and its grip
|
|
206
|
+
padding-inline-end: 4px;
|
|
152
207
|
}
|
|
153
208
|
|
|
154
209
|
#resizer {
|
|
@@ -162,16 +217,38 @@
|
|
|
162
217
|
}
|
|
163
218
|
|
|
164
219
|
|
|
220
|
+
// Edges kept on whole pixels; half-pixel offsets leave parts of the line repainted at a different width
|
|
165
221
|
&:before {
|
|
166
222
|
height: 100%;
|
|
167
|
-
width: 1px;
|
|
223
|
+
width: var(--resizer-width, 1px);
|
|
168
224
|
top: 0;
|
|
169
|
-
left:
|
|
170
|
-
|
|
225
|
+
left: calc(1px - var(--resizer-width, 1px));
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
&:focus-visible {
|
|
229
|
+
--resizer-width: 2px;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@include wc.hover-fine {
|
|
234
|
+
#resizer:hover {
|
|
235
|
+
--resizer-width: 2px;
|
|
236
|
+
|
|
237
|
+
#grip {
|
|
238
|
+
scale: 1 1.3;
|
|
239
|
+
}
|
|
171
240
|
}
|
|
172
241
|
}
|
|
173
242
|
}
|
|
174
243
|
|
|
244
|
+
:host(.resizing:not([vertical])) #resizer {
|
|
245
|
+
--resizer-width: 2px;
|
|
246
|
+
|
|
247
|
+
#grip {
|
|
248
|
+
scale: 1 1.3;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
175
252
|
:host([merged-navigation]:not([vertical])) {
|
|
176
253
|
@include wc.container-query(zero, md) {
|
|
177
254
|
padding-top: 0;
|
|
@@ -244,13 +321,13 @@
|
|
|
244
321
|
|
|
245
322
|
:host([focus-pane="0"]) {
|
|
246
323
|
#primary-pane {
|
|
247
|
-
display:
|
|
324
|
+
display: flex;
|
|
248
325
|
}
|
|
249
326
|
}
|
|
250
327
|
|
|
251
328
|
:host([focus-pane="1"]) {
|
|
252
329
|
#secondary-pane {
|
|
253
|
-
display:
|
|
330
|
+
display: flex;
|
|
254
331
|
}
|
|
255
332
|
}
|
|
256
333
|
|
|
@@ -290,10 +367,40 @@
|
|
|
290
367
|
|
|
291
368
|
&:before {
|
|
292
369
|
width: 100%;
|
|
293
|
-
height: 1px;
|
|
370
|
+
height: var(--resizer-width, 1px);
|
|
294
371
|
left: 0;
|
|
295
|
-
top:
|
|
296
|
-
|
|
372
|
+
top: calc(1px - var(--resizer-width, 1px));
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
&:focus-visible {
|
|
376
|
+
--resizer-width: 2px;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
#grip {
|
|
381
|
+
width: 28px;
|
|
382
|
+
height: 4px;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
@include wc.hover-fine {
|
|
386
|
+
#resizer:hover {
|
|
387
|
+
--resizer-width: 2px;
|
|
388
|
+
|
|
389
|
+
#grip {
|
|
390
|
+
scale: 1.3 1;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
:host(.resizing[vertical]) {
|
|
397
|
+
cursor: row-resize;
|
|
398
|
+
|
|
399
|
+
#resizer {
|
|
400
|
+
--resizer-width: 2px;
|
|
401
|
+
|
|
402
|
+
#grip {
|
|
403
|
+
scale: 1.3 1;
|
|
297
404
|
}
|
|
298
405
|
}
|
|
299
406
|
}
|
|
@@ -350,7 +457,7 @@ $padding: 8px;
|
|
|
350
457
|
#secondary-pane {
|
|
351
458
|
overflow: hidden;
|
|
352
459
|
border-radius: 10px 0 0 0;
|
|
353
|
-
background-color: #fbfbfb;
|
|
460
|
+
background-color: var(--zn-split-pane-secondary-background, #fbfbfb);
|
|
354
461
|
border: 1px solid rgb(var(--zn-border-color)) !important;
|
|
355
462
|
border-bottom-width: 0 !important;
|
|
356
463
|
}
|
|
@@ -366,24 +473,21 @@ $padding: 8px;
|
|
|
366
473
|
border-bottom-width: 0 !important;
|
|
367
474
|
}
|
|
368
475
|
}
|
|
369
|
-
|
|
370
|
-
#resizer::before {
|
|
371
|
-
background-color: transparent !important;
|
|
372
|
-
}
|
|
373
476
|
}
|
|
374
477
|
}
|
|
375
478
|
|
|
376
|
-
:host([padded]:not(
|
|
377
|
-
:
|
|
378
|
-
|
|
379
|
-
background-color: transparent;
|
|
380
|
-
}
|
|
479
|
+
:host([bordered]:not([padded]):not([padded-right])) {
|
|
480
|
+
--resizer-line: rgb(var(--zn-border-color));
|
|
481
|
+
}
|
|
381
482
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
483
|
+
#split-nav li:focus-visible {
|
|
484
|
+
outline: var(--zn-focus-ring);
|
|
485
|
+
outline-offset: calc(-1 * var(--zn-focus-ring-width));
|
|
385
486
|
}
|
|
386
487
|
|
|
387
|
-
|
|
388
|
-
|
|
488
|
+
@include wc.reduced-motion {
|
|
489
|
+
#grip {
|
|
490
|
+
scale: none !important;
|
|
491
|
+
transition-property: background-color;
|
|
492
|
+
}
|
|
389
493
|
}
|