@cedar-design/ui-vue 1.1.0 → 1.1.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/es/_components/field-presentation/EditorPanel.vue.mjs +1 -1
- package/es/_components/field-presentation/editor-pending.mjs +4 -0
- package/es/_components/field-presentation/with-field-presentation.mjs +33 -7
- package/es/_components/picker-field/PickerField.vue.mjs +6 -12
- package/es/_components/picker-field/range-labels.mjs +16 -0
- package/es/_components/selected-options/style/index.css +33 -15
- package/es/_components/selection-field/use-selection-session.mjs +1 -0
- package/es/_components/virtual-list-v2/VirtualList2.vue.mjs +21 -3
- package/es/_utils/modal-focus.mjs +9 -2
- package/es/_utils/modal-surface.mjs +9 -3
- package/es/anchor/style/index.css +1 -1
- package/es/auto-complete/auto-complete.mjs +2 -2
- package/es/auto-complete/presentation.mjs +1 -0
- package/es/auto-complete/props.mjs +2 -0
- package/es/auto-complete/style/index.css +7 -2
- package/es/back-top/style/index.css +1 -1
- package/es/button/base.mjs +6 -0
- package/es/button/index.mjs +8 -8
- package/es/button/style/index.css +1 -1
- package/es/card/Card.vue.mjs +46 -12
- package/es/carousel/style/index.css +1 -1
- package/es/cascader/CascaderMenu.vue.mjs +2 -2
- package/es/cascader/cascader-option.mjs +11 -6
- package/es/cascader/field-adapter.mjs +1 -0
- package/es/cascader/props.mjs +2 -0
- package/es/cascader/style/index.css +36 -9
- package/es/cascader/use-cascader-focus.mjs +9 -6
- package/es/cedar.css +187 -79
- package/es/cedar.esm.js +21694 -21413
- package/es/checkbox/base.mjs +6 -0
- package/es/checkbox/checkbox-group.vue.mjs +2 -2
- package/es/checkbox/index.mjs +1 -1
- package/es/checkbox/presentation.mjs +2 -2
- package/es/checkbox/style/index.css +1 -1
- package/es/countdown/use-countdown.mjs +7 -2
- package/es/date/DatePanelActions.vue.mjs +1 -1
- package/es/date/DateShortcuts.vue.mjs +1 -1
- package/es/date/picker/panels/Footer2.vue.mjs +1 -1
- package/es/date/picker/panels/Shortcuts2.vue.mjs +1 -1
- package/es/date/picker/style/index.css +1 -1
- package/es/dialog/Dialog.vue.mjs +1 -1
- package/es/ellipsis/style/index.css +1 -1
- package/es/form/FormItem2.vue.mjs +35 -7
- package/es/form/FormItemLabel.vue.mjs +4 -3
- package/es/form/focus-explicit-label.mjs +28 -0
- package/es/form/style/index.css +1 -1
- package/es/input/base.mjs +7 -0
- package/es/input/index.mjs +16 -16
- package/es/layout/style/index.css +1 -1
- package/es/nav-menu/style/index.css +1 -1
- package/es/pagination/PageInput.vue.mjs +2 -2
- package/es/pagination/style/index.css +2 -2
- package/es/people-select/PeopleSelect.mjs +23 -50
- package/es/people-select/Person.vue.mjs +1 -1
- package/es/people-select/emits.mjs +1 -1
- package/es/people-select/people-select.mjs +6 -8
- package/es/people-select/presentation.mjs +3 -1
- package/es/people-select/props.mjs +9 -3
- package/es/people-select/selection.mjs +43 -0
- package/es/people-select/style/index.css +6 -0
- package/es/progress/style/index.css +2 -2
- package/es/radio/style/index.css +1 -1
- package/es/rate/style/index.css +1 -1
- package/es/ripple/index.mjs +57 -1
- package/es/scheduler/style/index.css +1 -1
- package/es/search/HistoryContent.vue.mjs +3 -3
- package/es/search/props.mjs +0 -1
- package/es/search/search.vue.mjs +1 -1
- package/es/select/props.mjs +2 -0
- package/es/select/select.mjs +10 -4
- package/es/select/style/index.css +22 -12
- package/es/select/use-select-controller.mjs +14 -2
- package/es/slider/Slider.vue.mjs +39 -21
- package/es/slider/SliderInput.vue.mjs +4 -2
- package/es/slider/style/index.css +2 -2
- package/es/steps/style/index.css +10 -10
- package/es/switch/Switch.vue.mjs +6 -1
- package/es/switch/style/index.css +1 -1
- package/es/table/structural-slot.mjs +17 -0
- package/es/table/style/index.css +2 -2
- package/es/table/table-tbody.mjs +2 -1
- package/es/table/table-td.mjs +3 -2
- package/es/table/table-th.mjs +3 -2
- package/es/table/table-thead.mjs +2 -1
- package/es/table/table-tr.mjs +3 -2
- package/es/table/table.mjs +22 -5
- package/es/tabs/style/index.css +1 -1
- package/es/time/picker/Panel2.vue.mjs +1 -1
- package/es/time/picker/RangePanel2.vue.mjs +1 -1
- package/es/tree/style/index.css +1 -1
- package/es/tree-select/panel.mjs +3 -1
- package/es/tree-select/presentation.mjs +1 -0
- package/es/tree-select/props.mjs +2 -0
- package/es/tree-select/style/index.css +49 -7
- package/es/trigger/interaction.mjs +1 -1
- package/es/trigger/popup-move-focus.mjs +6 -6
- package/es/trigger/position.mjs +41 -3
- package/es/trigger/positioner.mjs +28 -5
- package/es/trigger/trigger.mjs +1 -1
- package/es/upload/composables/use-upload-queue.mjs +9 -1
- package/es/upload/composables/use-uploader.mjs +31 -11
- package/es/upload/upload.vue.mjs +10 -2
- package/lib/_components/field-presentation/EditorPanel.vue.js +3 -3
- package/lib/_components/field-presentation/editor-pending.js +4 -0
- package/lib/_components/field-presentation/with-field-presentation.js +32 -6
- package/lib/_components/picker-field/PickerField.vue.js +6 -12
- package/lib/_components/picker-field/range-labels.js +16 -0
- package/lib/_components/selected-options/style/index.css +33 -15
- package/lib/_components/selection-field/use-selection-session.js +1 -0
- package/lib/_components/virtual-list-v2/VirtualList2.vue.js +20 -2
- package/lib/_utils/modal-focus.js +9 -2
- package/lib/_utils/modal-surface.js +9 -3
- package/lib/anchor/style/index.css +1 -1
- package/lib/auto-complete/auto-complete.js +2 -2
- package/lib/auto-complete/presentation.js +1 -0
- package/lib/auto-complete/props.js +2 -0
- package/lib/auto-complete/style/index.css +7 -2
- package/lib/back-top/style/index.css +1 -1
- package/lib/button/base.js +6 -0
- package/lib/button/index.js +4 -4
- package/lib/button/style/index.css +1 -1
- package/lib/card/Card.vue.js +47 -13
- package/lib/carousel/style/index.css +1 -1
- package/lib/cascader/CascaderMenu.vue.js +2 -2
- package/lib/cascader/cascader-option.js +11 -6
- package/lib/cascader/field-adapter.js +1 -0
- package/lib/cascader/props.js +2 -0
- package/lib/cascader/style/index.css +36 -9
- package/lib/cascader/use-cascader-focus.js +9 -6
- package/lib/cedar.cjs.js +1149 -738
- package/lib/cedar.css +187 -79
- package/lib/checkbox/base.js +6 -0
- package/lib/checkbox/index.js +4 -4
- package/lib/checkbox/presentation.js +2 -2
- package/lib/checkbox/style/index.css +1 -1
- package/lib/countdown/use-countdown.js +7 -2
- package/lib/date/DatePanelActions.vue.js +3 -3
- package/lib/date/DateShortcuts.vue.js +2 -2
- package/lib/date/picker/panels/Footer2.vue.js +2 -2
- package/lib/date/picker/panels/Shortcuts2.vue.js +2 -2
- package/lib/date/picker/style/index.css +1 -1
- package/lib/dialog/Dialog.vue.js +3 -3
- package/lib/ellipsis/style/index.css +1 -1
- package/lib/form/FormItem2.vue.js +35 -7
- package/lib/form/FormItemLabel.vue.js +3 -2
- package/lib/form/focus-explicit-label.js +28 -0
- package/lib/form/style/index.css +1 -1
- package/lib/input/base.js +7 -0
- package/lib/input/index.js +4 -4
- package/lib/layout/style/index.css +1 -1
- package/lib/nav-menu/style/index.css +1 -1
- package/lib/pagination/PageInput.vue.js +2 -2
- package/lib/pagination/style/index.css +2 -2
- package/lib/people-select/PeopleSelect.js +22 -49
- package/lib/people-select/Person.vue.js +3 -3
- package/lib/people-select/emits.js +1 -1
- package/lib/people-select/people-select.js +6 -8
- package/lib/people-select/presentation.js +3 -1
- package/lib/people-select/props.js +9 -3
- package/lib/people-select/selection.js +43 -0
- package/lib/people-select/style/index.css +6 -0
- package/lib/progress/style/index.css +2 -2
- package/lib/radio/style/index.css +1 -1
- package/lib/rate/style/index.css +1 -1
- package/lib/ripple/index.js +57 -1
- package/lib/scheduler/style/index.css +1 -1
- package/lib/search/HistoryContent.vue.js +4 -4
- package/lib/search/props.js +0 -1
- package/lib/search/search.vue.js +2 -2
- package/lib/select/props.js +2 -0
- package/lib/select/select.js +10 -4
- package/lib/select/style/index.css +22 -12
- package/lib/select/use-select-controller.js +14 -2
- package/lib/slider/Slider.vue.js +38 -20
- package/lib/slider/SliderInput.vue.js +4 -2
- package/lib/slider/style/index.css +2 -2
- package/lib/steps/style/index.css +10 -10
- package/lib/switch/Switch.vue.js +5 -0
- package/lib/switch/style/index.css +1 -1
- package/lib/table/structural-slot.js +17 -0
- package/lib/table/style/index.css +2 -2
- package/lib/table/table-tbody.js +2 -1
- package/lib/table/table-td.js +3 -2
- package/lib/table/table-th.js +3 -2
- package/lib/table/table-thead.js +2 -1
- package/lib/table/table-tr.js +3 -2
- package/lib/table/table.js +21 -4
- package/lib/tabs/style/index.css +1 -1
- package/lib/time/picker/Panel2.vue.js +2 -2
- package/lib/time/picker/RangePanel2.vue.js +2 -2
- package/lib/tree/style/index.css +1 -1
- package/lib/tree-select/panel.js +3 -1
- package/lib/tree-select/presentation.js +1 -0
- package/lib/tree-select/props.js +2 -0
- package/lib/tree-select/style/index.css +49 -7
- package/lib/trigger/popup-move-focus.js +6 -6
- package/lib/trigger/position.js +40 -2
- package/lib/trigger/positioner.js +27 -4
- package/lib/trigger/trigger.js +1 -1
- package/lib/upload/composables/use-upload-queue.js +9 -1
- package/lib/upload/composables/use-uploader.js +31 -11
- package/lib/upload/upload.vue.js +9 -1
- package/package.json +6 -6
- package/types/_components/field-presentation/editor-pending.d.ts +3 -0
- package/types/_components/field-presentation/with-field-presentation.d.ts +2 -0
- package/types/_components/picker-field/range-labels.d.ts +1 -0
- package/types/_utils/modal-focus.d.ts +1 -0
- package/types/auto-complete/auto-complete.d.ts +9 -0
- package/types/auto-complete/index.d.ts +30 -0
- package/types/auto-complete/presentation.d.ts +9 -0
- package/types/auto-complete/props.d.ts +5 -0
- package/types/button/base.d.ts +266 -0
- package/types/button/index.d.ts +5 -1
- package/types/cascader/Cascader.vue.d.ts +9 -0
- package/types/cascader/index.d.ts +30 -0
- package/types/cascader/presentation.d.ts +15 -0
- package/types/cascader/props.d.ts +5 -0
- package/types/cascader/use-cascader-controller.d.ts +4 -0
- package/types/checkbox/base.d.ts +361 -0
- package/types/checkbox/index.d.ts +5 -1
- package/types/date/picker/DateRangePicker.vue.d.ts +12 -496
- package/types/date/picker/DateRangePickerPanel.vue.d.ts +12 -496
- package/types/date/picker/Picker.vue.d.ts +12 -496
- package/types/date/picker/PickerPanel.vue.d.ts +12 -496
- package/types/date/picker/panels/Footer.vue.d.ts +3 -124
- package/types/date/picker/panels/Shortcuts.vue.d.ts +3 -124
- package/types/date/picker/panels/date/Index.vue.d.ts +3 -124
- package/types/date/picker/panels/week/Index.vue.d.ts +3 -124
- package/types/form/FormItemLabel.vue.d.ts +2 -2
- package/types/form/context.d.ts +1 -1
- package/types/form/focus-explicit-label.d.ts +2 -0
- package/types/input/base.d.ts +481 -0
- package/types/input/index.d.ts +5 -1
- package/types/people-select/PeopleSelect.d.ts +38 -16
- package/types/people-select/emits.d.ts +3 -2
- package/types/people-select/index.d.ts +135 -63
- package/types/people-select/people-select.d.ts +47 -16
- package/types/people-select/presentation.d.ts +46 -16
- package/types/people-select/props.d.ts +17 -6
- package/types/people-select/selection.d.ts +11 -0
- package/types/people-select/types.d.ts +5 -1
- package/types/popconfirm/Popconfirm.vue.d.ts +2 -0
- package/types/popconfirm/index.d.ts +8 -0
- package/types/select/index.d.ts +30 -0
- package/types/select/native-editor-owner.d.ts +1 -0
- package/types/select/props.d.ts +5 -0
- package/types/select/select.d.ts +9 -0
- package/types/select/use-select-controller.d.ts +5 -0
- package/types/slider/SliderInput.vue.d.ts +4 -0
- package/types/table/structural-slot.d.ts +3 -0
- package/types/table/table-operation-td.d.ts +2 -0
- package/types/time/picker/Panel.vue.d.ts +3 -124
- package/types/time/picker/RangePanel.vue.d.ts +6 -248
- package/types/time/presentation/TimePanelContent.vue.d.ts +9 -372
- package/types/transfer/Transfer.vue.d.ts +4 -0
- package/types/transfer/TransferView.vue.d.ts +2 -0
- package/types/transfer/index.d.ts +16 -0
- package/types/transfer/presentation.d.ts +4 -0
- package/types/tree/BaseNode.vue.d.ts +2 -0
- package/types/tree/TransitionNodeList.vue.d.ts +2 -0
- package/types/tree-select/TreeSelect.vue.d.ts +13 -0
- package/types/tree-select/index.d.ts +50 -0
- package/types/tree-select/presentation.d.ts +13 -0
- package/types/tree-select/props.d.ts +5 -0
- package/types/trigger/position.d.ts +1 -0
- package/types/typography/EditContent.vue.d.ts +6 -0
- package/types/upload/composables/use-upload-queue.d.ts +1 -0
- package/types/upload/composables/use-uploader.d.ts +2 -0
- package/types/upload/upload.vue.d.ts +3 -3
- package/umd/_components/selected-options/style/index.css +33 -15
- package/umd/anchor/style/index.css +1 -1
- package/umd/auto-complete/style/index.css +7 -2
- package/umd/back-top/style/index.css +1 -1
- package/umd/button/style/index.css +1 -1
- package/umd/carousel/style/index.css +1 -1
- package/umd/cascader/style/index.css +36 -9
- package/umd/cedar.css +187 -79
- package/umd/cedar.js +6 -6
- package/umd/checkbox/style/index.css +1 -1
- package/umd/date/picker/style/index.css +1 -1
- package/umd/ellipsis/style/index.css +1 -1
- package/umd/form/style/index.css +1 -1
- package/umd/layout/style/index.css +1 -1
- package/umd/nav-menu/style/index.css +1 -1
- package/umd/pagination/style/index.css +2 -2
- package/umd/people-select/style/index.css +6 -0
- package/umd/progress/style/index.css +2 -2
- package/umd/radio/style/index.css +1 -1
- package/umd/rate/style/index.css +1 -1
- package/umd/scheduler/style/index.css +1 -1
- package/umd/select/style/index.css +22 -12
- package/umd/slider/style/index.css +2 -2
- package/umd/steps/style/index.css +10 -10
- package/umd/switch/style/index.css +1 -1
- package/umd/table/style/index.css +2 -2
- package/umd/tabs/style/index.css +1 -1
- package/umd/tree/style/index.css +1 -1
- package/umd/tree-select/style/index.css +49 -7
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
}
|
|
4
4
|
:root,
|
|
5
5
|
:where([data-c-theme]) {
|
|
6
|
-
--c-slider-active-color: var(--c-sys-color-
|
|
6
|
+
--c-slider-active-color: var(--c-sys-color-action-primary);
|
|
7
7
|
--c-slider-track-color: var(--c-sys-color-state-hover);
|
|
8
8
|
--c-slider-thumb-color: var(--c-sys-color-surface-default);
|
|
9
|
-
--c-slider-thumb-border-color: var(--c-sys-color-
|
|
9
|
+
--c-slider-thumb-border-color: var(--c-sys-color-action-primary);
|
|
10
10
|
--c-slider-text-color: var(--c-sys-color-content-secondary);
|
|
11
11
|
--c-slider-tooltip-background: var(--c-sys-color-surface-tooltip);
|
|
12
12
|
--c-slider-tooltip-color: var(--c-sys-color-content-on-dark);
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
--c-steps-circle-item-tail-color-wait: var(--c-sys-color-border-default);
|
|
28
28
|
--c-steps-circle-item-title-color-wait: var(--c-sys-color-content-secondary);
|
|
29
29
|
--c-steps-circle-item-description-color-wait: var(--c-sys-color-content-secondary);
|
|
30
|
-
--c-steps-circle-item-bg-process: var(--c-sys-color-
|
|
30
|
+
--c-steps-circle-item-bg-process: var(--c-sys-color-action-primary);
|
|
31
31
|
--c-steps-circle-item-border-color-process: transparent;
|
|
32
32
|
--c-steps-circle-item-icon-text-color-process: var(--c-sys-color-surface-default);
|
|
33
|
-
--c-steps-circle-item-tail-color-process: var(--c-sys-color-
|
|
33
|
+
--c-steps-circle-item-tail-color-process: var(--c-sys-color-action-primary);
|
|
34
34
|
--c-steps-circle-item-title-color-process: var(--c-sys-color-content-primary);
|
|
35
35
|
--c-steps-circle-item-description-color-process: var(--c-sys-color-content-secondary);
|
|
36
36
|
--c-steps-circle-item-bg-finish: var(--c-sys-color-state-selected);
|
|
37
37
|
--c-steps-circle-item-border-color-finish: transparent;
|
|
38
|
-
--c-steps-circle-item-icon-text-color-finish: var(--c-sys-color-
|
|
38
|
+
--c-steps-circle-item-icon-text-color-finish: var(--c-sys-color-action-primary);
|
|
39
39
|
--c-steps-circle-item-title-color-finish: var(--c-sys-color-content-primary);
|
|
40
40
|
--c-steps-circle-item-description-color-finish: var(--c-sys-color-content-secondary);
|
|
41
41
|
--c-steps-circle-item-bg-error: var(--c-sys-color-content-danger);
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
--c-steps-dot-item-tail-color-wait: var(--c-sys-color-border-default);
|
|
62
62
|
--c-steps-dot-item-title-color-wait: var(--c-sys-color-content-secondary);
|
|
63
63
|
--c-steps-dot-item-description-color-wait: var(--c-sys-color-content-secondary);
|
|
64
|
-
--c-steps-dot-item-bg-process: var(--c-sys-color-
|
|
65
|
-
--c-steps-dot-item-border-color-process: var(--c-sys-color-
|
|
66
|
-
--c-steps-dot-item-tail-color-process: var(--c-sys-color-
|
|
64
|
+
--c-steps-dot-item-bg-process: var(--c-sys-color-action-primary);
|
|
65
|
+
--c-steps-dot-item-border-color-process: var(--c-sys-color-action-primary);
|
|
66
|
+
--c-steps-dot-item-tail-color-process: var(--c-sys-color-action-primary);
|
|
67
67
|
--c-steps-dot-item-title-color-process: var(--c-sys-color-content-primary);
|
|
68
68
|
--c-steps-dot-item-description-color-process: var(--c-sys-color-content-secondary);
|
|
69
|
-
--c-steps-dot-item-bg-finish: var(--c-sys-color-
|
|
70
|
-
--c-steps-dot-item-border-color-finish: var(--c-sys-color-
|
|
69
|
+
--c-steps-dot-item-bg-finish: var(--c-sys-color-action-primary);
|
|
70
|
+
--c-steps-dot-item-border-color-finish: var(--c-sys-color-action-primary);
|
|
71
71
|
--c-steps-dot-item-title-color-finish: var(--c-sys-color-content-primary);
|
|
72
72
|
--c-steps-dot-item-description-color-finish: var(--c-sys-color-content-secondary);
|
|
73
73
|
--c-steps-dot-item-bg-error: var(--c-sys-color-content-danger);
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
--c-steps-arrow-item-bg-wait: var(--c-sys-color-surface-muted);
|
|
87
87
|
--c-steps-arrow-item-title-color-wait: var(--c-sys-color-content-secondary);
|
|
88
88
|
--c-steps-arrow-item-description-color-wait: var(--c-sys-color-content-secondary);
|
|
89
|
-
--c-steps-arrow-item-bg-process: var(--c-sys-color-
|
|
89
|
+
--c-steps-arrow-item-bg-process: var(--c-sys-color-action-primary);
|
|
90
90
|
--c-steps-arrow-item-title-color-process: var(--c-sys-color-surface-default);
|
|
91
91
|
--c-steps-arrow-item-description-color-process: var(--c-sys-color-surface-default);
|
|
92
92
|
--c-steps-arrow-item-bg-finish: var(--c-sys-color-state-selected);
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
--c-steps-navigation-arrow-spacing-right: var(--c-spacing-5);
|
|
105
105
|
--c-steps-navigation-ink-spacing-left: var(--c-spacing-none);
|
|
106
106
|
--c-steps-navigation-ink-spacing-right: 30px;
|
|
107
|
-
--c-steps-navigation-ink-bg: var(--c-sys-color-
|
|
107
|
+
--c-steps-navigation-ink-bg: var(--c-sys-color-action-primary);
|
|
108
108
|
--c-steps-changeable-hover-text-color: var(--c-sys-color-content-brand);
|
|
109
109
|
--c-steps-node-font-weight: var(--c-font-weight-500);
|
|
110
110
|
--c-steps-transition-duration-1: var(--c-transition-duration-1);
|
package/lib/switch/Switch.vue.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
+
const editorPending = require("../_components/field-presentation/editor-pending.js");
|
|
4
5
|
const useActionGuard = require("../_hooks/use-action-guard.js");
|
|
5
6
|
const globalConfig = require("../_utils/global-config.js");
|
|
6
7
|
const errorDescription = require("../form/error-description.js");
|
|
@@ -22,6 +23,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
22
23
|
const current = vue.computed(() => props2.modelValue === void 0 ? internal.value : props2.modelValue);
|
|
23
24
|
const checked = vue.computed(() => current.value === props2.checkedValue);
|
|
24
25
|
const pending = vue.ref(false);
|
|
26
|
+
const editorPending$1 = vue.inject(editorPending.fieldEditorControlPending, void 0);
|
|
27
|
+
vue.watch(pending, (value) => {
|
|
28
|
+
if (editorPending$1) editorPending$1.value = value;
|
|
29
|
+
}, { flush: "sync" });
|
|
25
30
|
const busy = vue.computed(() => props2.loading || pending.value);
|
|
26
31
|
const rippleKey = vue.ref(0);
|
|
27
32
|
let active = true;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
--c-switch-size-lg-scale: 1.2;
|
|
13
13
|
--c-switch-hit-area: 0px;
|
|
14
14
|
--c-switch-track-background: var(--c-sys-color-content-secondary);
|
|
15
|
-
--c-switch-track-active-background: var(--c-sys-color-
|
|
15
|
+
--c-switch-track-active-background: var(--c-sys-color-action-primary);
|
|
16
16
|
--c-switch-track-error-background: var(--c-sys-color-content-danger);
|
|
17
17
|
--c-switch-handle-background: var(--c-sys-color-surface-default);
|
|
18
18
|
--c-switch-handle-color: var(--c-sys-color-content-brand);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
function firstStructuralNode(nodes) {
|
|
5
|
+
if (Array.isArray(nodes)) {
|
|
6
|
+
for (const node of nodes) {
|
|
7
|
+
const result = firstStructuralNode(node);
|
|
8
|
+
if (result) return result;
|
|
9
|
+
}
|
|
10
|
+
return void 0;
|
|
11
|
+
}
|
|
12
|
+
if (!vue.isVNode(nodes) || nodes.type === vue.Comment) return void 0;
|
|
13
|
+
if (nodes.type === vue.Text && !String(nodes.children ?? "").trim()) return void 0;
|
|
14
|
+
if (nodes.type === vue.Fragment && Array.isArray(nodes.children)) return firstStructuralNode(nodes.children);
|
|
15
|
+
return nodes;
|
|
16
|
+
}
|
|
17
|
+
exports.firstStructuralNode = firstStructuralNode;
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
--c-table-header-cell-action-margin-left: 2px;
|
|
59
59
|
--c-table-th-actions-margin-left: 8px;
|
|
60
60
|
--c-table-header-filters-icon-color: var(--c-color-text-2);
|
|
61
|
-
--c-table-header-filters-icon-active-color: var(--c-sys-color-
|
|
61
|
+
--c-table-header-filters-icon-active-color: var(--c-sys-color-action-primary);
|
|
62
62
|
--c-table-header-filters-icon-hover-bg: var(--c-color-neutral-4);
|
|
63
63
|
--c-table-filters-icon-font-size: 16px;
|
|
64
64
|
--c-table-filters-width: 24px;
|
|
65
65
|
--c-table-filters-icon-hover-bg: var(--c-color-fill-4);
|
|
66
66
|
--c-table-header-sorter-icon-color: var(--c-color-neutral-5);
|
|
67
67
|
--c-table-header-sorter-icon-next-color: var(--c-color-neutral-6);
|
|
68
|
-
--c-table-header-sorter-icon-active-color: var(--c-sys-color-
|
|
68
|
+
--c-table-header-sorter-icon-active-color: var(--c-sys-color-action-primary);
|
|
69
69
|
--c-table-header-sorter-icon-margin-left: var(--c-spacing-4);
|
|
70
70
|
--c-table-header-sorter-icon-height: 8px;
|
|
71
71
|
--c-table-header-sorter-icon-width: 14px;
|
package/lib/table/table-tbody.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const globalConfig = require("../_utils/global-config.js");
|
|
5
|
+
const structuralSlot = require("./structural-slot.js");
|
|
5
6
|
const {
|
|
6
7
|
name
|
|
7
8
|
} = globalConfig.createNamespace("tbody");
|
|
@@ -11,7 +12,7 @@ const Tbody = /* @__PURE__ */ vue.defineComponent({
|
|
|
11
12
|
slots
|
|
12
13
|
}) {
|
|
13
14
|
return () => {
|
|
14
|
-
return vue.createVNode(slots.tbody?.()
|
|
15
|
+
return vue.createVNode(structuralSlot.firstStructuralNode(slots.tbody?.()) ?? "tbody", null, {
|
|
15
16
|
default: slots.default
|
|
16
17
|
});
|
|
17
18
|
};
|
package/lib/table/table-td.js
CHANGED
|
@@ -11,6 +11,7 @@ const autoTooltip = require("../_components/auto-tooltip/auto-tooltip.js");
|
|
|
11
11
|
const TableSlot_vue_vue_type_script_setup_true_lang = require("./TableSlot.vue.js");
|
|
12
12
|
const forwardTableSlot = require("./forward-table-slot.js");
|
|
13
13
|
const extraColumn = require("./extra-column.js");
|
|
14
|
+
const structuralSlot = require("./structural-slot.js");
|
|
14
15
|
function _isSlot(s) {
|
|
15
16
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
16
17
|
}
|
|
@@ -230,11 +231,11 @@ const Td = /* @__PURE__ */ vue.defineComponent({
|
|
|
230
231
|
}, [renderContent()])]);
|
|
231
232
|
};
|
|
232
233
|
return () => {
|
|
233
|
-
const customCell = slots.td?.({
|
|
234
|
+
const customCell = structuralSlot.firstStructuralNode(slots.td?.({
|
|
234
235
|
record: props.record?.raw,
|
|
235
236
|
column: props.column,
|
|
236
237
|
rowIndex: props.rowIndex ?? -1
|
|
237
|
-
})
|
|
238
|
+
}));
|
|
238
239
|
const customHeaders = customCell?.props && Object.prototype.hasOwnProperty.call(customCell.props, "headers") && customCell.props.headers !== void 0 ? customCell.props.headers : props.headers;
|
|
239
240
|
return vue.createVNode(customCell ?? "td", {
|
|
240
241
|
class: cls.value,
|
package/lib/table/table-th.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const globalConfig = require("../_utils/global-config.js");
|
|
5
|
+
const structuralSlot = require("./structural-slot.js");
|
|
5
6
|
const checkbox_index = require("../checkbox/index.js");
|
|
6
7
|
const radio_index = require("../radio/index.js");
|
|
7
8
|
const button_index = require("../button/index.js");
|
|
@@ -350,9 +351,9 @@ const Th = /* @__PURE__ */ vue.defineComponent({
|
|
|
350
351
|
const rowSpan = props.column.rowSpan ?? 1;
|
|
351
352
|
const resizeColumnName = typeof props.column.title === "string" ? props.column.title : props.column.dataIndex;
|
|
352
353
|
const translatedResizeLabel = t("table.resizeColumn", resizeColumnName);
|
|
353
|
-
const customHeader = props.customHeader ?? slots.th?.({
|
|
354
|
+
const customHeader = structuralSlot.firstStructuralNode([props.customHeader]) ?? structuralSlot.firstStructuralNode(slots.th?.({
|
|
354
355
|
column: props.column
|
|
355
|
-
})
|
|
356
|
+
}));
|
|
356
357
|
return vue.createVNode(customHeader ?? "th", {
|
|
357
358
|
class: cls.value,
|
|
358
359
|
style: style.value,
|
package/lib/table/table-thead.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const globalConfig = require("../_utils/global-config.js");
|
|
5
|
+
const structuralSlot = require("./structural-slot.js");
|
|
5
6
|
const {
|
|
6
7
|
name
|
|
7
8
|
} = globalConfig.createNamespace("thead");
|
|
@@ -11,7 +12,7 @@ const Thead = /* @__PURE__ */ vue.defineComponent({
|
|
|
11
12
|
slots
|
|
12
13
|
}) {
|
|
13
14
|
return () => {
|
|
14
|
-
return vue.createVNode(slots.thead?.()
|
|
15
|
+
return vue.createVNode(structuralSlot.firstStructuralNode(slots.thead?.()) ?? "thead", null, {
|
|
15
16
|
default: slots.default
|
|
16
17
|
});
|
|
17
18
|
};
|
package/lib/table/table-tr.js
CHANGED
|
@@ -4,6 +4,7 @@ const vue = require("vue");
|
|
|
4
4
|
const globalConfig = require("../_utils/global-config.js");
|
|
5
5
|
const context = require("./context.js");
|
|
6
6
|
const columnDirection = require("./column-direction.js");
|
|
7
|
+
const structuralSlot = require("./structural-slot.js");
|
|
7
8
|
const {
|
|
8
9
|
name
|
|
9
10
|
} = globalConfig.createNamespace("tr");
|
|
@@ -36,10 +37,10 @@ const Tr = /* @__PURE__ */ vue.defineComponent({
|
|
|
36
37
|
[`${prefixCls}-tr-checked`]: props.checked
|
|
37
38
|
}]);
|
|
38
39
|
return () => {
|
|
39
|
-
return vue.createVNode(slots.tr?.({
|
|
40
|
+
return vue.createVNode(structuralSlot.firstStructuralNode(slots.tr?.({
|
|
40
41
|
rowIndex: props.rowIndex,
|
|
41
42
|
record: props.record?.raw
|
|
42
|
-
})
|
|
43
|
+
})) ?? "tr", {
|
|
43
44
|
class: cls.value
|
|
44
45
|
}, {
|
|
45
46
|
default: () => {
|
package/lib/table/table.js
CHANGED
|
@@ -25,6 +25,7 @@ const TableSlot_vue_vue_type_script_setup_true_lang = require("./TableSlot.vue.j
|
|
|
25
25
|
const TableColumnSlot_vue_vue_type_script_setup_true_lang = require("./TableColumnSlot.vue.js");
|
|
26
26
|
const forwardTableSlot = require("./forward-table-slot.js");
|
|
27
27
|
const tableThead = require("./table-thead.js");
|
|
28
|
+
const structuralSlot = require("./structural-slot.js");
|
|
28
29
|
const tableTbody = require("./table-tbody.js");
|
|
29
30
|
const tableTr = require("./table-tr.js");
|
|
30
31
|
const tableTh = require("./table-th.js");
|
|
@@ -1281,9 +1282,10 @@ const _Table = /* @__PURE__ */ vue.defineComponent({
|
|
|
1281
1282
|
const semanticId = `c-table-header-${vue.useId()}`;
|
|
1282
1283
|
const visibleHeaderId = (row, index) => `${semanticId}-visible-${row}-${index}`;
|
|
1283
1284
|
const visibleOperationId = (index) => `${semanticId}-visible-operation-${index}`;
|
|
1284
|
-
const
|
|
1285
|
+
const activeHeaderSlot = vue.shallowRef(slots.th);
|
|
1286
|
+
const customHeaders = vue.computed(() => groupColumns.value.map((row) => row.map((column) => structuralSlot.firstStructuralNode(activeHeaderSlot.value?.({
|
|
1285
1287
|
column
|
|
1286
|
-
})
|
|
1288
|
+
})))));
|
|
1287
1289
|
const explicitHeaderName = (value) => typeof value === "string" && value.trim() ? value : void 0;
|
|
1288
1290
|
const semanticRows = (surface) => groupColumns.value.map((row, rowIndex) => [...rowIndex === 0 ? operations.value.map((_, index) => ({
|
|
1289
1291
|
id: `${semanticId}-${surface}-operation-${index}`,
|
|
@@ -1899,13 +1901,27 @@ const _Table = /* @__PURE__ */ vue.defineComponent({
|
|
|
1899
1901
|
}
|
|
1900
1902
|
return Object.keys(result).length > 0 ? result : void 0;
|
|
1901
1903
|
});
|
|
1904
|
+
const tableInstance = vue.getCurrentInstance();
|
|
1905
|
+
let slotSnapshot = [];
|
|
1906
|
+
const currentSlotSnapshot = () => {
|
|
1907
|
+
const incoming = tableInstance.vnode.children;
|
|
1908
|
+
const raw = incoming && !Array.isArray(incoming) && typeof incoming === "object" ? incoming : {};
|
|
1909
|
+
const next = Object.keys(raw).filter((key) => key !== "_" && key !== "$stable").sort().flatMap((key) => [key, raw[key]]);
|
|
1910
|
+
if (next.length !== slotSnapshot.length || next.some((value, index) => value !== slotSnapshot[index])) {
|
|
1911
|
+
slotSnapshot = next;
|
|
1912
|
+
activeHeaderSlot.value = slots.th;
|
|
1913
|
+
}
|
|
1914
|
+
return slotSnapshot;
|
|
1915
|
+
};
|
|
1902
1916
|
const DeferredTable = /* @__PURE__ */ vue.defineComponent({
|
|
1903
1917
|
props: {
|
|
1904
|
-
rowSlotState: Number
|
|
1918
|
+
rowSlotState: Number,
|
|
1919
|
+
slotSnapshot: Array
|
|
1905
1920
|
},
|
|
1906
1921
|
setup: () => () => renderTable()
|
|
1907
1922
|
});
|
|
1908
1923
|
const render = () => {
|
|
1924
|
+
const snapshot = currentSlotSnapshot();
|
|
1909
1925
|
if (slots.default) {
|
|
1910
1926
|
let _slot;
|
|
1911
1927
|
return vue.createVNode(resizeObserver$1.default, {
|
|
@@ -1935,7 +1951,8 @@ const _Table = /* @__PURE__ */ vue.defineComponent({
|
|
|
1935
1951
|
"aria-busy": loadingProps.value.loading || void 0
|
|
1936
1952
|
}, tableInteractionEvents), [children.value, vue.createVNode(Loading_vue_vue_type_script_setup_true_lang.default, loadingProps.value, {
|
|
1937
1953
|
default: () => [props2.pagination !== false && (flattenData.value.length > 0 || sortedData.value.length > 0) && isPaginationTop.value && renderPaginationArea(), vue.createVNode(DeferredTable, {
|
|
1938
|
-
"rowSlotState": (slots.tr ? 1 : 0) | (slots["expand-row"] ? 2 : 0)
|
|
1954
|
+
"rowSlotState": (slots.tr ? 1 : 0) | (slots["expand-row"] ? 2 : 0),
|
|
1955
|
+
"slotSnapshot": snapshot
|
|
1939
1956
|
}, null), props2.pagination !== false && (flattenData.value.length > 0 || sortedData.value.length > 0) && !isPaginationTop.value && renderPaginationArea()]
|
|
1940
1957
|
})])]
|
|
1941
1958
|
});
|
package/lib/tabs/style/index.css
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
:where([data-c-theme]) {
|
|
6
6
|
--c-tabs-background: var(--c-sys-color-surface-default);
|
|
7
7
|
--c-tabs-title-text-color: var(--c-sys-color-content-secondary);
|
|
8
|
-
--c-tabs-title-text-color-active: var(--c-sys-color-
|
|
8
|
+
--c-tabs-title-text-color-active: var(--c-sys-color-action-primary);
|
|
9
9
|
--c-tabs-title-text-color-disabled: var(--c-sys-color-content-disabled);
|
|
10
10
|
--c-tabs-muted-background: var(--c-sys-color-surface-muted);
|
|
11
11
|
--c-tabs-border-color: var(--c-sys-color-border-default);
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const temporalKeyboard = require("../../_utils/temporal-keyboard.js");
|
|
4
4
|
const vue = require("vue");
|
|
5
5
|
const TimeColumn = require("./TimeColumn.vue.js");
|
|
6
|
-
const
|
|
6
|
+
const base = require("../../button/base.js");
|
|
7
7
|
const is = require("../../_utils/is.js");
|
|
8
8
|
const date = require("../../_utils/date.js");
|
|
9
9
|
const globalConfig = require("../../_utils/global-config.js");
|
|
@@ -15,7 +15,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
15
15
|
name: globalConfig.createNamespace("time-picker-panel").name,
|
|
16
16
|
components: {
|
|
17
17
|
TimeColumn: TimeColumn.default,
|
|
18
|
-
Button:
|
|
18
|
+
Button: base.default
|
|
19
19
|
},
|
|
20
20
|
props: {
|
|
21
21
|
min: String,
|
|
@@ -6,14 +6,14 @@ const Panel = require("./Panel.vue.js");
|
|
|
6
6
|
const time_picker_utils_index = require("./utils/index.js");
|
|
7
7
|
const globalConfig = require("../../_utils/global-config.js");
|
|
8
8
|
const locale_index = require("../../locale/index.js");
|
|
9
|
-
const
|
|
9
|
+
const base = require("../../button/base.js");
|
|
10
10
|
const { name } = globalConfig.createNamespace("time-picker-range-panel");
|
|
11
11
|
const panelIndexes = [0, 1];
|
|
12
12
|
const _sfc_main = vue.defineComponent({
|
|
13
13
|
name,
|
|
14
14
|
components: {
|
|
15
15
|
Panel: Panel.default,
|
|
16
|
-
Button:
|
|
16
|
+
Button: base.default
|
|
17
17
|
},
|
|
18
18
|
inheritAttrs: false,
|
|
19
19
|
props: {
|
package/lib/tree/style/index.css
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
--c-tree-focus-outline-width: 2px;
|
|
7
7
|
--c-tree-title-text-color: var(--c-color-text-1);
|
|
8
8
|
--c-tree-title-text-color-hover: var(--c-color-text-1);
|
|
9
|
-
--c-tree-title-text-color-active: var(--c-sys-color-
|
|
9
|
+
--c-tree-title-text-color-active: var(--c-sys-color-action-primary);
|
|
10
10
|
--c-tree-title-text-color-disabled: var(--c-color-text-4);
|
|
11
11
|
--c-tree-title-text-color-active-disabled: var(--c-color-primary-light-3);
|
|
12
12
|
--c-tree-title-bg-hover: var(--c-color-fill-2);
|
package/lib/tree-select/panel.js
CHANGED
|
@@ -197,7 +197,9 @@ const Panel = /* @__PURE__ */ vue.defineComponent({
|
|
|
197
197
|
"aria-disabled": visibleNodeMap.value.get(key)?.disabled,
|
|
198
198
|
"aria-expanded": status.isLeaf ? void 0 : status.expanded,
|
|
199
199
|
"class": [`${prefixCls}-option`, {
|
|
200
|
-
[`${prefixCls}-option-active`]: key === activeKey.value
|
|
200
|
+
[`${prefixCls}-option-active`]: key === activeKey.value,
|
|
201
|
+
[`${prefixCls}-option-selected`]: status.selected || status.checked,
|
|
202
|
+
[`${prefixCls}-option-disabled`]: visibleNodeMap.value.get(key)?.disabled
|
|
201
203
|
}],
|
|
202
204
|
"onMouseenter": () => {
|
|
203
205
|
if (visibleNodeMap.value.has(key) && !visibleNodeMap.value.get(key)?.disabled) activeKey.value = key;
|
|
@@ -6,6 +6,7 @@ const optionLabels = require("../_components/field-presentation/option-labels.js
|
|
|
6
6
|
const withFieldPresentation = require("../_components/field-presentation/with-field-presentation.js");
|
|
7
7
|
const TreeSelect = require("./TreeSelect.vue.js");
|
|
8
8
|
const _TreeSelect = withFieldPresentation.withFieldPresentation(TreeSelect.default, {
|
|
9
|
+
selectionConfirmation: "update",
|
|
9
10
|
pauseSelectionWhileLoading: true,
|
|
10
11
|
editor: ({ props, attrs, value, update, emit, slots, disabled, readonly }) => vue.h(
|
|
11
12
|
SelectionEditor_vue_vue_type_script_setup_true_lang.default,
|
package/lib/tree-select/props.js
CHANGED
|
@@ -7,6 +7,8 @@ const popupContainer = require("../_utils/popup-container.js");
|
|
|
7
7
|
const props$1 = require("../field-decorator/props.js");
|
|
8
8
|
const treeSelectProps = {
|
|
9
9
|
...props$1.fieldLoadingProps,
|
|
10
|
+
/** 弹出编辑是否需要确认;未设置时单选即提交,多选保留确认。 */
|
|
11
|
+
needConfirm: { type: Boolean, default: void 0 },
|
|
10
12
|
openTriggerTarget: openTrigger.openTriggerTargetProp,
|
|
11
13
|
/** 内置字段匹配是否区分大小写。 */
|
|
12
14
|
caseSensitive: { type: Boolean, default: false },
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
:root,
|
|
5
5
|
:where([data-c-theme]) {
|
|
6
6
|
--c-tree-select-option-active-background: var(--c-color-fill-2);
|
|
7
|
-
--c-tree-select-option-radius: var(--c-
|
|
8
|
-
--c-tree-select-popup-padding-left: var(--c-
|
|
9
|
-
--c-tree-select-popup-padding-right: var(--c-
|
|
10
|
-
--c-tree-select-popup-padding-vertical: var(--c-
|
|
7
|
+
--c-tree-select-option-radius: var(--c-select-popup-option-border-radius);
|
|
8
|
+
--c-tree-select-popup-padding-left: var(--c-select-popup-padding-horizontal);
|
|
9
|
+
--c-tree-select-popup-padding-right: var(--c-select-popup-padding-horizontal);
|
|
10
|
+
--c-tree-select-popup-padding-vertical: var(--c-select-popup-padding-vertical);
|
|
11
11
|
--c-tree-select-highlight-font-weight: var(--c-font-weight-500);
|
|
12
12
|
}
|
|
13
13
|
.c-tree-select-popup {
|
|
14
|
+
--c-tree-title-text-color-active: var(--c-select-popup-option-text-color-selected);
|
|
14
15
|
box-sizing: border-box;
|
|
15
16
|
padding: var(--c-tree-select-popup-padding-vertical) 0;
|
|
16
17
|
background-color: var(--c-color-bg-popup);
|
|
@@ -26,7 +27,31 @@
|
|
|
26
27
|
overflow: auto;
|
|
27
28
|
}
|
|
28
29
|
.c-tree-select-popup .c-tree-node {
|
|
29
|
-
|
|
30
|
+
isolation: isolate;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
min-height: var(--c-select-popup-option-height);
|
|
33
|
+
padding-inline: var(--c-select-popup-option-padding-horizontal);
|
|
34
|
+
border-bottom: 0;
|
|
35
|
+
border-radius: var(--c-tree-select-option-radius);
|
|
36
|
+
}
|
|
37
|
+
.c-tree-select-popup .c-tree-node-title,
|
|
38
|
+
.c-tree-select-popup .c-tree-node-selected .c-tree-node-title {
|
|
39
|
+
position: static;
|
|
40
|
+
min-width: 0;
|
|
41
|
+
min-height: inherit;
|
|
42
|
+
margin: 0;
|
|
43
|
+
padding: 0;
|
|
44
|
+
background: transparent;
|
|
45
|
+
}
|
|
46
|
+
.c-tree-select-popup .c-tree-node-title-text {
|
|
47
|
+
flex: 1;
|
|
48
|
+
min-width: 0;
|
|
49
|
+
}
|
|
50
|
+
.c-tree-select-popup .c-tree-node:hover .c-tree-select-option:not(.c-tree-select-option-selected):not(.c-tree-select-option-disabled)::before {
|
|
51
|
+
background: var(--c-tree-select-option-active-background);
|
|
52
|
+
}
|
|
53
|
+
.c-tree-select-popup .c-tree-node:hover .c-tree-select-option-selected:not(.c-tree-select-option-disabled)::before {
|
|
54
|
+
background: var(--c-select-popup-option-bg-selected-hover);
|
|
30
55
|
}
|
|
31
56
|
.c-tree-select-highlight {
|
|
32
57
|
font-weight: var(--c-tree-select-highlight-font-weight);
|
|
@@ -45,8 +70,25 @@
|
|
|
45
70
|
}
|
|
46
71
|
.c-tree-select-option {
|
|
47
72
|
display: block;
|
|
73
|
+
overflow-wrap: anywhere;
|
|
48
74
|
}
|
|
49
|
-
.c-tree-select-option
|
|
50
|
-
|
|
75
|
+
.c-tree-select-option::before {
|
|
76
|
+
content: '';
|
|
77
|
+
position: absolute;
|
|
78
|
+
inset: 0;
|
|
79
|
+
z-index: -1;
|
|
51
80
|
border-radius: var(--c-tree-select-option-radius);
|
|
81
|
+
pointer-events: none;
|
|
82
|
+
}
|
|
83
|
+
.c-tree-select-option-active:not(.c-tree-select-option-selected):not(.c-tree-select-option-disabled)::before {
|
|
84
|
+
background: var(--c-tree-select-option-active-background);
|
|
85
|
+
}
|
|
86
|
+
.c-tree-select-option-selected:not(.c-tree-select-option-disabled) {
|
|
87
|
+
color: var(--c-select-popup-option-text-color-selected);
|
|
88
|
+
}
|
|
89
|
+
.c-tree-select-option-selected:not(.c-tree-select-option-disabled)::before {
|
|
90
|
+
background: var(--c-select-popup-option-bg-selected);
|
|
91
|
+
}
|
|
92
|
+
.c-tree-select-option-active.c-tree-select-option-selected:not(.c-tree-select-option-disabled)::before {
|
|
93
|
+
background: var(--c-select-popup-option-bg-selected-hover);
|
|
52
94
|
}
|
|
@@ -9,19 +9,19 @@ const shadowHostNames = /* @__PURE__ */ new Set(["article", "aside", "blockquote
|
|
|
9
9
|
function mayHideShadow(element) {
|
|
10
10
|
return !element.shadowRoot && (element.localName.includes("-") || shadowHostNames.has(element.localName));
|
|
11
11
|
}
|
|
12
|
-
function documentChain(start) {
|
|
12
|
+
function documentChain(start, allowPartial = false) {
|
|
13
13
|
const documents = [start], frames = [];
|
|
14
14
|
let current = start;
|
|
15
15
|
try {
|
|
16
16
|
while (current.defaultView && current.defaultView.parent !== current.defaultView) {
|
|
17
17
|
const frame = current.defaultView.frameElement;
|
|
18
|
-
if (!frame) return void 0;
|
|
18
|
+
if (!frame) return allowPartial ? { documents, frames } : void 0;
|
|
19
19
|
frames.push(frame);
|
|
20
20
|
current = frame.ownerDocument;
|
|
21
21
|
documents.push(current);
|
|
22
22
|
}
|
|
23
23
|
} catch {
|
|
24
|
-
return void 0;
|
|
24
|
+
return allowPartial ? { documents, frames } : void 0;
|
|
25
25
|
}
|
|
26
26
|
return { documents, frames };
|
|
27
27
|
}
|
|
@@ -30,7 +30,7 @@ function canRestore(owner, destination, anchor, focused) {
|
|
|
30
30
|
const current = owner.activeElement;
|
|
31
31
|
return (!current || current === owner.body || current === owner.documentElement || current === anchor) && (current !== anchor || deepestActive(anchor) === focused);
|
|
32
32
|
}
|
|
33
|
-
const from = documentChain(owner), to = documentChain(destination);
|
|
33
|
+
const from = documentChain(owner, true), to = documentChain(destination, true);
|
|
34
34
|
if (!from || !to) return false;
|
|
35
35
|
const common = from.documents.find((doc) => to.documents.includes(doc));
|
|
36
36
|
if (!common || !common.hasFocus()) return false;
|
|
@@ -79,8 +79,8 @@ function usePopupMoveFocus(target, inline, popup, visible) {
|
|
|
79
79
|
return (event) => {
|
|
80
80
|
if (!moving || moving !== event.target || event.relatedTarget) return false;
|
|
81
81
|
const owner = moving.ownerDocument;
|
|
82
|
-
const chain = documentChain(owner);
|
|
83
|
-
if (!chain) return false;
|
|
82
|
+
const chain = documentChain(owner, true);
|
|
83
|
+
if (!chain || !chain.documents[chain.documents.length - 1].hasFocus()) return false;
|
|
84
84
|
return chain.documents.every((doc) => {
|
|
85
85
|
const current = doc.activeElement;
|
|
86
86
|
return !current || current === doc.body || current === doc.documentElement || current === moving || chain.frames.includes(current);
|
package/lib/trigger/position.js
CHANGED
|
@@ -89,12 +89,21 @@ function getScrollElements(element) {
|
|
|
89
89
|
const visited = /* @__PURE__ */ new Set();
|
|
90
90
|
while (root && !visited.has(root.ownerDocument)) {
|
|
91
91
|
visited.add(root.ownerDocument);
|
|
92
|
-
|
|
92
|
+
const parent = (node) => {
|
|
93
|
+
if (node.assignedSlot) return node.assignedSlot;
|
|
94
|
+
if (node.parentElement) return node.parentElement;
|
|
95
|
+
const tree = node.getRootNode();
|
|
96
|
+
return tree.nodeType === 11 && "host" in tree ? tree.host : null;
|
|
97
|
+
};
|
|
98
|
+
let current = parent(root);
|
|
99
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
93
100
|
while (current && current !== current.ownerDocument.documentElement) {
|
|
101
|
+
if (ancestors.has(current)) break;
|
|
102
|
+
ancestors.add(current);
|
|
94
103
|
const style = current.ownerDocument.defaultView?.getComputedStyle(current);
|
|
95
104
|
const overflow = `${style?.overflow ?? ""}${style?.overflowX ?? ""}${style?.overflowY ?? ""}`;
|
|
96
105
|
if (/(auto|scroll|overlay)/.test(overflow)) result.push(current);
|
|
97
|
-
current = current
|
|
106
|
+
current = parent(current);
|
|
98
107
|
}
|
|
99
108
|
try {
|
|
100
109
|
root = root.ownerDocument.defaultView?.frameElement ?? void 0;
|
|
@@ -104,6 +113,34 @@ function getScrollElements(element) {
|
|
|
104
113
|
}
|
|
105
114
|
return result;
|
|
106
115
|
}
|
|
116
|
+
function getSlotChangeRoots(element) {
|
|
117
|
+
const roots = [];
|
|
118
|
+
const visited = /* @__PURE__ */ new Set();
|
|
119
|
+
let current = element;
|
|
120
|
+
while (current && !visited.has(current)) {
|
|
121
|
+
visited.add(current);
|
|
122
|
+
const parentShadow = current.parentElement?.shadowRoot;
|
|
123
|
+
if (parentShadow) roots.push(parentShadow);
|
|
124
|
+
if (current.assignedSlot) {
|
|
125
|
+
current = current.assignedSlot;
|
|
126
|
+
} else if (current.parentElement) {
|
|
127
|
+
current = current.parentElement;
|
|
128
|
+
} else {
|
|
129
|
+
const tree = current.getRootNode();
|
|
130
|
+
if (tree.nodeType === 11 && "host" in tree) {
|
|
131
|
+
roots.push(tree);
|
|
132
|
+
current = tree.host;
|
|
133
|
+
} else {
|
|
134
|
+
try {
|
|
135
|
+
current = current.ownerDocument.defaultView?.frameElement;
|
|
136
|
+
} catch {
|
|
137
|
+
current = void 0;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return roots;
|
|
143
|
+
}
|
|
107
144
|
function getScrollViews(element) {
|
|
108
145
|
const result = [];
|
|
109
146
|
let document = element?.ownerDocument;
|
|
@@ -123,3 +160,4 @@ function getScrollViews(element) {
|
|
|
123
160
|
exports.calculatePopupPosition = calculatePopupPosition;
|
|
124
161
|
exports.getScrollElements = getScrollElements;
|
|
125
162
|
exports.getScrollViews = getScrollViews;
|
|
163
|
+
exports.getSlotChangeRoots = getSlotChangeRoots;
|