@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, shallowRef, provide, computed, ref, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, toDisplayString, createCommentVNode, renderSlot, createBlock, resolveDynamicComponent, withModifiers, withCtx, createTextVNode, Fragment } from "vue";
|
|
2
2
|
import { createNamespace } from "../../_utils/global-config.mjs";
|
|
3
|
-
import
|
|
3
|
+
import Button from "../../button/base.mjs";
|
|
4
4
|
import { useI18n } from "../../locale/index.mjs";
|
|
5
5
|
import { fieldEditorBoundary, fieldEditorPanel, fieldEditorEnterSubmits } from "./context.mjs";
|
|
6
6
|
import { editorAuxiliaryActions } from "./editor-actions.mjs";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent, getCurrentInstance, provide, computed, inject,
|
|
1
|
+
import { defineComponent, getCurrentInstance, provide, computed, inject, ref, shallowRef, watch, onBeforeUnmount, onDeactivated, onActivated, onMounted, h, nextTick, proxyRefs } from "vue";
|
|
2
2
|
import { useOptionRequest, provideOptionRequest } from "../../_hooks/use-option-request.mjs";
|
|
3
3
|
import { useEmptyValues, provideEmptyValues, resolveEmptyValue } from "../../_utils/empty-value.mjs";
|
|
4
4
|
import { inputGroupKey } from "../../input/context.mjs";
|
|
5
5
|
import { useSelectionSession } from "../selection-field/use-selection-session.mjs";
|
|
6
6
|
import { useFieldPresentation, fieldEditorBoundary, fieldControlFormEvents, invokeBeforeCommit } from "./context.mjs";
|
|
7
7
|
import _sfc_main from "./FieldPresentation.vue.mjs";
|
|
8
|
+
import { fieldEditorControlPending } from "./editor-pending.mjs";
|
|
8
9
|
import { usePresentationForm } from "./form-bridge.mjs";
|
|
9
10
|
function cloneValue(value, seen = /* @__PURE__ */ new WeakMap()) {
|
|
10
11
|
if (value instanceof Date) {
|
|
@@ -23,7 +24,7 @@ function cloneValue(value, seen = /* @__PURE__ */ new WeakMap()) {
|
|
|
23
24
|
}
|
|
24
25
|
return result;
|
|
25
26
|
}
|
|
26
|
-
function sameFieldValue(left, right, seen = /* @__PURE__ */ new WeakMap()) {
|
|
27
|
+
function sameFieldValue(left, right, seen = /* @__PURE__ */ new WeakMap(), reverse = /* @__PURE__ */ new WeakMap()) {
|
|
27
28
|
if (Object.is(left, right)) {
|
|
28
29
|
return true;
|
|
29
30
|
}
|
|
@@ -39,12 +40,16 @@ function sameFieldValue(left, right, seen = /* @__PURE__ */ new WeakMap()) {
|
|
|
39
40
|
if (!Array.isArray(left) && Object.getPrototypeOf(left) !== Object.prototype) {
|
|
40
41
|
return false;
|
|
41
42
|
}
|
|
42
|
-
if (seen.
|
|
43
|
-
return
|
|
43
|
+
if (seen.has(left) || reverse.has(right)) {
|
|
44
|
+
return seen.get(left) === right && reverse.get(right) === left;
|
|
44
45
|
}
|
|
45
46
|
seen.set(left, right);
|
|
47
|
+
reverse.set(right, left);
|
|
46
48
|
const keys = Object.keys(left);
|
|
47
|
-
|
|
49
|
+
const result = keys.length === Object.keys(right).length && keys.every((key) => Object.prototype.hasOwnProperty.call(right, key) && sameFieldValue(left[key], right[key], seen, reverse));
|
|
50
|
+
seen.delete(left);
|
|
51
|
+
reverse.delete(right);
|
|
52
|
+
return result;
|
|
48
53
|
}
|
|
49
54
|
function formatFieldValue(value) {
|
|
50
55
|
if (value == null || value === "") {
|
|
@@ -120,6 +125,8 @@ function withFieldPresentation(Base, adapter = {}) {
|
|
|
120
125
|
readonly: computed(() => props.readonly ?? inputGroup?.readonly.value),
|
|
121
126
|
size: computed(() => props.size ?? inputGroup?.size.value)
|
|
122
127
|
});
|
|
128
|
+
const editorControlPending = ref(false);
|
|
129
|
+
provide(fieldEditorControlPending, editorControlPending);
|
|
123
130
|
const inner = shallowRef();
|
|
124
131
|
const host = ref();
|
|
125
132
|
const localValue = shallowRef(props.defaultValue ?? props.modelValue);
|
|
@@ -240,9 +247,22 @@ function withFieldPresentation(Base, adapter = {}) {
|
|
|
240
247
|
}
|
|
241
248
|
}
|
|
242
249
|
});
|
|
250
|
+
const needConfirm = computed(() => !adapter.selectionConfirmation || (props.needConfirm ?? Boolean(props.multiple)));
|
|
251
|
+
const showConfirm = computed(
|
|
252
|
+
() => needConfirm.value || adapter.selectionConfirmation === "select" && !sameFieldValue(session.draft.value, value.value)
|
|
253
|
+
);
|
|
254
|
+
const completeSelection = () => {
|
|
255
|
+
const candidate = cloneValue(session.draft.value);
|
|
256
|
+
void Promise.resolve(session.commit()).then((accepted) => {
|
|
257
|
+
if (!accepted && open.value && !session.pending.value && sameFieldValue(session.draft.value, candidate)) {
|
|
258
|
+
session.update(value.value);
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
};
|
|
243
262
|
const updateDraft = (next) => {
|
|
244
263
|
if (open.value && !blocked.value) {
|
|
245
264
|
session.update(next);
|
|
265
|
+
if (adapter.selectionConfirmation === "update" && !needConfirm.value) completeSelection();
|
|
246
266
|
}
|
|
247
267
|
};
|
|
248
268
|
const clearDraft = () => {
|
|
@@ -251,6 +271,7 @@ function withFieldPresentation(Base, adapter = {}) {
|
|
|
251
271
|
}
|
|
252
272
|
const fallback = "uncheckedValue" in props ? props.uncheckedValue : typeof props.defaultValue === "boolean" ? false : Array.isArray(value.value) ? [] : props.defaultValue;
|
|
253
273
|
session.update(resolveEmptyValue(props, fallback));
|
|
274
|
+
if (!needConfirm.value) void session.commit();
|
|
254
275
|
};
|
|
255
276
|
const clearReference = async () => {
|
|
256
277
|
if (blocked.value || selectionPaused.value || session.pending.value) {
|
|
@@ -268,8 +289,10 @@ function withFieldPresentation(Base, adapter = {}) {
|
|
|
268
289
|
state.item?.resetValidation?.();
|
|
269
290
|
};
|
|
270
291
|
const confirm = async (event) => {
|
|
292
|
+
if (editorControlPending.value) return false;
|
|
271
293
|
inner.value?.blur?.();
|
|
272
294
|
await nextTick();
|
|
295
|
+
if (editorControlPending.value) return false;
|
|
273
296
|
return session.commit(event);
|
|
274
297
|
};
|
|
275
298
|
watch(
|
|
@@ -479,6 +502,9 @@ function withFieldPresentation(Base, adapter = {}) {
|
|
|
479
502
|
(...args) => {
|
|
480
503
|
if (event === "update:modelValue") {
|
|
481
504
|
updateDraft(args[0]);
|
|
505
|
+
} else if (event === "select" && adapter.selectionConfirmation === "select" && !needConfirm.value) {
|
|
506
|
+
emit(event, ...args);
|
|
507
|
+
void session.commit();
|
|
482
508
|
} else if (adapter.commitEvents?.[event]) {
|
|
483
509
|
if (open.value && !blocked.value && !session.pending.value) commitNotifications.set(event, args);
|
|
484
510
|
} else if (event !== "change" && event !== "update:open" && event !== "open-change") {
|
|
@@ -537,12 +563,12 @@ function withFieldPresentation(Base, adapter = {}) {
|
|
|
537
563
|
open: open.value,
|
|
538
564
|
disabled: form.mergedDisabled.value,
|
|
539
565
|
readonly: form.mergedReadonly.value,
|
|
540
|
-
needConfirm:
|
|
566
|
+
needConfirm: showConfirm.value,
|
|
541
567
|
clearable: props.clearable && !selectionPaused.value,
|
|
542
568
|
onClear: clearDraft,
|
|
543
569
|
loading: Boolean(props.loading || adapter.pauseSelectionWhileLoading && source?.loading.value),
|
|
544
570
|
pending: session.pending.value,
|
|
545
|
-
confirmDisabled: selectionPaused.value || !validDraft(session.draft.value),
|
|
571
|
+
confirmDisabled: editorControlPending.value || selectionPaused.value || !validDraft(session.draft.value),
|
|
546
572
|
error: session.error.value || state.item?.message?.value,
|
|
547
573
|
onOpen: setOpen,
|
|
548
574
|
onEditorReady,
|
|
@@ -4,14 +4,13 @@ import _sfc_main$1 from "../../field-decorator/FieldDecorator.vue.mjs";
|
|
|
4
4
|
import { fieldDecoratorProps } from "../../field-decorator/props.mjs";
|
|
5
5
|
import { useFormErrorDescription } from "../../form/error-description.mjs";
|
|
6
6
|
import { useFormItemLabel } from "../../form/label-context.mjs";
|
|
7
|
-
import { useI18n } from "../../locale/index.mjs";
|
|
8
|
-
import lang from "../../locale/lang/zh-cn.mjs";
|
|
9
7
|
import { splitInputAttrs } from "../../input/native-attrs.mjs";
|
|
10
8
|
import { createNamespace } from "../../_utils/global-config.mjs";
|
|
11
9
|
import { useFieldTexts } from "../field-presentation/texts.mjs";
|
|
12
10
|
import { isFieldOpenClick, blockFieldOpenClick } from "./open-trigger.mjs";
|
|
13
11
|
import { pickerFieldProps } from "./props.mjs";
|
|
14
12
|
import { useRangeFieldIndex } from "./range-field-context.mjs";
|
|
13
|
+
import { usePickerRangeLabels } from "./range-labels.mjs";
|
|
15
14
|
const _hoisted_1 = ["role", "aria-labelledby"];
|
|
16
15
|
const _hoisted_2 = ["id"];
|
|
17
16
|
const _hoisted_3 = ["id", "value", "placeholder", "disabled", "readonly", "aria-expanded", "aria-invalid", "aria-describedby", "aria-haspopup", "onFocus", "onClick", "onBlur", "onInput", "onCompositionend", "onKeydown"];
|
|
@@ -32,7 +31,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
31
|
function inputAttributes(index) {
|
|
33
32
|
const part = { ...props.inputAttrs?.[index] ?? {} };
|
|
34
33
|
for (const key of ["aria-label", "aria-labelledby"]) {
|
|
35
|
-
if (part[key] === void 0 || part[key] === null)
|
|
34
|
+
if (part[key] === void 0 || part[key] === null) {
|
|
35
|
+
delete part[key];
|
|
36
|
+
}
|
|
36
37
|
}
|
|
37
38
|
const common = splitInputAttrs(attrs).native;
|
|
38
39
|
const merged = mergeProps(common, part);
|
|
@@ -74,14 +75,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
74
75
|
});
|
|
75
76
|
const explicitRangeLabel = computed(() => props.range && formLabel?.value?.target ? groupLabelId.value : void 0);
|
|
76
77
|
const endpointLabelId = (index) => `${generatedId}-range-endpoint-${index}`;
|
|
77
|
-
const
|
|
78
|
-
const endpointLabels = computed(() => {
|
|
79
|
-
const legacy = i18nMessage.value.datePicker?.rangePlaceholder?.[props.kind] ?? lang.datePicker.rangePlaceholder[props.kind];
|
|
80
|
-
return [
|
|
81
|
-
i18nMessage.value.fieldPresentation?.rangeStart ?? legacy[0],
|
|
82
|
-
i18nMessage.value.fieldPresentation?.rangeEnd ?? legacy[1]
|
|
83
|
-
];
|
|
84
|
-
});
|
|
78
|
+
const endpointLabels = usePickerRangeLabels(() => props.kind);
|
|
85
79
|
const inputs = [];
|
|
86
80
|
const activeIndex = useRangeFieldIndex(() => props.disabledParts);
|
|
87
81
|
const active = ref(false);
|
|
@@ -256,7 +250,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
256
250
|
key: 2,
|
|
257
251
|
id: endpointLabelId(index),
|
|
258
252
|
hidden: ""
|
|
259
|
-
}, toDisplayString(endpointLabels
|
|
253
|
+
}, toDisplayString(unref(endpointLabels)[index]), 9, _hoisted_2)) : createCommentVNode("", true),
|
|
260
254
|
createElementVNode("input", mergeProps({ ref_for: true }, inputAttributes(index), {
|
|
261
255
|
id: props.inputAttrs?.[index]?.id ?? (index === 0 ? controlId.value : controlId.value + "-" + index),
|
|
262
256
|
ref_for: true,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { useI18n } from "../../locale/index.mjs";
|
|
3
|
+
import lang from "../../locale/lang/zh-cn.mjs";
|
|
4
|
+
function usePickerRangeLabels(kind) {
|
|
5
|
+
const { i18nMessage } = useI18n();
|
|
6
|
+
return computed(() => {
|
|
7
|
+
const legacy = i18nMessage.value.datePicker?.rangePlaceholder?.[kind()] ?? lang.datePicker.rangePlaceholder[kind()];
|
|
8
|
+
return [
|
|
9
|
+
i18nMessage.value.fieldPresentation?.rangeStart ?? legacy[0],
|
|
10
|
+
i18nMessage.value.fieldPresentation?.rangeEnd ?? legacy[1]
|
|
11
|
+
];
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
usePickerRangeLabels
|
|
16
|
+
};
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
.c-selected-options__toggle:focus-visible,
|
|
73
73
|
.c-selected-options__clear:focus-visible,
|
|
74
74
|
.c-selected-options__remove:focus-visible {
|
|
75
|
-
outline: 2px solid var(--c-sys-color-
|
|
75
|
+
outline: 2px solid var(--c-sys-color-action-primary);
|
|
76
76
|
outline-offset: 1px;
|
|
77
77
|
}
|
|
78
78
|
.c-selected-options__toggle {
|
|
@@ -208,10 +208,13 @@
|
|
|
208
208
|
white-space: normal;
|
|
209
209
|
overflow-wrap: anywhere;
|
|
210
210
|
}
|
|
211
|
-
.c-selection-editor .c-select-option.c-select-option-selected
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
211
|
+
.c-selection-editor .c-select-option.c-select-option-selected:not(.c-select-option-disabled) {
|
|
212
|
+
background: var(--c-select-popup-option-bg-selected);
|
|
213
|
+
color: var(--c-select-popup-option-text-color-selected);
|
|
214
|
+
}
|
|
215
|
+
.c-selection-editor .c-select-option.c-select-option-selected:not(.c-select-option-disabled):hover,
|
|
216
|
+
.c-selection-editor .c-select-option.c-select-option-selected:not(.c-select-option-disabled).c-select-option-active {
|
|
217
|
+
background: var(--c-select-popup-option-bg-selected-hover);
|
|
215
218
|
}
|
|
216
219
|
.c-selection-editor .c-select-option-disabled {
|
|
217
220
|
opacity: var(--c-selected-options-disabled-opacity);
|
|
@@ -239,9 +242,13 @@
|
|
|
239
242
|
white-space: normal;
|
|
240
243
|
overflow-wrap: anywhere;
|
|
241
244
|
}
|
|
242
|
-
.c-selection-editor .c-cascader-option
|
|
243
|
-
order:
|
|
244
|
-
|
|
245
|
+
.c-selection-editor .c-cascader-option .c-cascader-option-checkbox {
|
|
246
|
+
order: -1;
|
|
247
|
+
flex: none;
|
|
248
|
+
margin-inline-end: var(--c-selection-editor-gap);
|
|
249
|
+
}
|
|
250
|
+
.c-selection-editor .c-cascader-option .c-cascader-option-checkbox .c-checkbox {
|
|
251
|
+
margin-inline-end: 0;
|
|
245
252
|
}
|
|
246
253
|
.c-selection-editor .c-selection-indicator {
|
|
247
254
|
margin: 0;
|
|
@@ -249,11 +256,13 @@
|
|
|
249
256
|
height: var(--c-selection-editor-check-size);
|
|
250
257
|
border-radius: var(--c-selection-editor-radius);
|
|
251
258
|
}
|
|
252
|
-
.c-selection-editor .c-cascader-option.c-cascader-option-selected
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
259
|
+
.c-selection-editor .c-cascader-option.c-cascader-option-selected:not(.c-cascader-option-disabled) {
|
|
260
|
+
background: var(--c-cascader-item-bg-active);
|
|
261
|
+
color: var(--c-cascader-item-text-color-active);
|
|
262
|
+
}
|
|
263
|
+
.c-selection-editor .c-cascader-option.c-cascader-option-selected:not(.c-cascader-option-disabled):hover,
|
|
264
|
+
.c-selection-editor .c-cascader-option.c-cascader-option-selected:not(.c-cascader-option-disabled).c-cascader-option-active {
|
|
265
|
+
background: var(--c-cascader-item-bg-hover);
|
|
257
266
|
}
|
|
258
267
|
.c-selection-editor--mobile {
|
|
259
268
|
width: 100%;
|
|
@@ -268,8 +277,6 @@
|
|
|
268
277
|
.c-selection-editor--mobile .c-select-dropdown .c-select-option,
|
|
269
278
|
.c-selection-editor--mobile .c-cascader-option {
|
|
270
279
|
min-height: var(--c-selection-editor-touch-height);
|
|
271
|
-
border-radius: 0;
|
|
272
|
-
border-bottom: 1px solid var(--c-selection-editor-border);
|
|
273
280
|
font-size: var(--c-selection-editor-touch-font-size);
|
|
274
281
|
}
|
|
275
282
|
.c-selection-editor--mobile .c-selection-indicator {
|
|
@@ -394,3 +401,14 @@
|
|
|
394
401
|
.c-selection-editor--mobile .c-tree-node {
|
|
395
402
|
min-height: var(--c-selection-editor-touch-height);
|
|
396
403
|
}
|
|
404
|
+
.c-selection-editor--select .c-select-dropdown .c-select-dropdown-list-wrapper,
|
|
405
|
+
.c-selection-editor--auto-complete .c-select-dropdown .c-select-dropdown-list-wrapper,
|
|
406
|
+
.c-selection-editor--people-select .c-select-dropdown .c-select-dropdown-list-wrapper {
|
|
407
|
+
padding-inline: var(--c-select-popup-padding-horizontal);
|
|
408
|
+
}
|
|
409
|
+
.c-selection-editor--select.c-selection-editor--mobile .c-select-dropdown .c-select-option,
|
|
410
|
+
.c-selection-editor--auto-complete.c-selection-editor--mobile .c-select-dropdown .c-select-option,
|
|
411
|
+
.c-selection-editor--people-select.c-selection-editor--mobile .c-select-dropdown .c-select-option {
|
|
412
|
+
border-radius: var(--c-select-popup-option-border-radius);
|
|
413
|
+
border-bottom: 0;
|
|
414
|
+
}
|
|
@@ -53,6 +53,7 @@ function useSelectionSession(options) {
|
|
|
53
53
|
if (options.blocked() || settled.value || pending.value || !options.open.value || options.valid?.(draft.value) === false) {
|
|
54
54
|
return false;
|
|
55
55
|
}
|
|
56
|
+
error.value = "";
|
|
56
57
|
const next = options.clone(draft.value);
|
|
57
58
|
const run = ++epoch;
|
|
58
59
|
const finish = (allowed) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { inlineScrollLeft, setInlineScrollLeft } from "../../_utils/direction.mjs";
|
|
2
2
|
import { getPrefixCls, createNamespace } from "../../_utils/global-config.mjs";
|
|
3
3
|
import { defineComponent, toRefs, computed, ref, onMounted, onBeforeUnmount, watch, nextTick, onActivated, onDeactivated } from "vue";
|
|
4
4
|
import { useSize } from "./hooks/use-size.mjs";
|
|
@@ -105,6 +105,8 @@ const _sfc_main = defineComponent({
|
|
|
105
105
|
await nextTick();
|
|
106
106
|
updateViewport();
|
|
107
107
|
});
|
|
108
|
+
let retainedInlineOffset;
|
|
109
|
+
let retainedScrollTop;
|
|
108
110
|
let scrollRequest = 0;
|
|
109
111
|
let commandedScroll;
|
|
110
112
|
let mounted = false;
|
|
@@ -115,10 +117,25 @@ const _sfc_main = defineComponent({
|
|
|
115
117
|
onMounted(() => {
|
|
116
118
|
mounted = true;
|
|
117
119
|
});
|
|
118
|
-
onActivated(() => {
|
|
119
|
-
if (
|
|
120
|
+
onActivated(async () => {
|
|
121
|
+
if (disposed) return;
|
|
122
|
+
active = true;
|
|
123
|
+
const element = containerRef.value;
|
|
124
|
+
const request = scrollRequest;
|
|
125
|
+
const retained = retainedScrollTop;
|
|
126
|
+
const retainedInline = retainedInlineOffset;
|
|
127
|
+
retainedScrollTop = void 0;
|
|
128
|
+
retainedInlineOffset = void 0;
|
|
129
|
+
if (element && retainedInline !== void 0 && isCurrent(request, element) && inlineScrollLeft(element) === 0) setInlineScrollLeft(element, retainedInline);
|
|
130
|
+
await nextTick();
|
|
131
|
+
if (element && retained !== void 0 && isCurrent(request, element) && element.scrollTop === 0) {
|
|
132
|
+
element.scrollTop = retained;
|
|
133
|
+
if (virtualEnabled.value) setStart(getStartByScroll(element.scrollTop));
|
|
134
|
+
}
|
|
120
135
|
});
|
|
121
136
|
onDeactivated(() => {
|
|
137
|
+
retainedScrollTop = scrollOffset.value;
|
|
138
|
+
retainedInlineOffset = readingOffset;
|
|
122
139
|
active = false;
|
|
123
140
|
scrollRequest++;
|
|
124
141
|
commandedScroll = void 0;
|
|
@@ -220,6 +237,7 @@ const _sfc_main = defineComponent({
|
|
|
220
237
|
if (isNumber(options)) {
|
|
221
238
|
if (Number.isFinite(options)) {
|
|
222
239
|
element.scrollTop = Math.max(0, options);
|
|
240
|
+
scrollOffset.value = element.scrollTop;
|
|
223
241
|
if (virtualEnabled.value) setStart(getStartByScroll(element.scrollTop));
|
|
224
242
|
}
|
|
225
243
|
return;
|
|
@@ -62,6 +62,13 @@ function useModalFocus(root, active, isTop, lockScroll = () => true, ownerDocume
|
|
|
62
62
|
element = target;
|
|
63
63
|
if (!target.contains(target.ownerDocument.activeElement)) target.focus({ preventScroll: true });
|
|
64
64
|
}
|
|
65
|
+
function focusAfterEnter() {
|
|
66
|
+
const doc = root()?.ownerDocument;
|
|
67
|
+
const current = doc?.activeElement;
|
|
68
|
+
if (!current || current === doc?.body || current === doc?.documentElement || previous.includes(current)) {
|
|
69
|
+
focus();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
65
72
|
function restore() {
|
|
66
73
|
const focused = owner?.activeElement;
|
|
67
74
|
const target = previous.find(restorable);
|
|
@@ -144,7 +151,7 @@ function useModalFocus(root, active, isTop, lockScroll = () => true, ownerDocume
|
|
|
144
151
|
unbind();
|
|
145
152
|
bind();
|
|
146
153
|
}
|
|
147
|
-
if (value) capture();
|
|
154
|
+
if (value && (!captured || root() !== element)) capture();
|
|
148
155
|
}, { flush: "post" });
|
|
149
156
|
onMounted(() => {
|
|
150
157
|
mounted = true;
|
|
@@ -167,7 +174,7 @@ function useModalFocus(root, active, isTop, lockScroll = () => true, ownerDocume
|
|
|
167
174
|
unbind();
|
|
168
175
|
restore();
|
|
169
176
|
});
|
|
170
|
-
return { focus, restore, trap };
|
|
177
|
+
return { focus, focusAfterEnter, restore, trap };
|
|
171
178
|
}
|
|
172
179
|
export {
|
|
173
180
|
useModalFocus
|
|
@@ -44,7 +44,7 @@ function useModalSurface(options) {
|
|
|
44
44
|
mergedZIndex,
|
|
45
45
|
modalDocument
|
|
46
46
|
);
|
|
47
|
-
const { focus, restore } = useModalFocus(
|
|
47
|
+
const { focus, focusAfterEnter, restore } = useModalFocus(
|
|
48
48
|
() => options.root.value?.querySelector("[data-modal-focus-root]") ?? options.root.value,
|
|
49
49
|
() => mergedOpen.value,
|
|
50
50
|
onStackTop,
|
|
@@ -52,7 +52,13 @@ function useModalSurface(options) {
|
|
|
52
52
|
modalDocument
|
|
53
53
|
);
|
|
54
54
|
watch([popupContainerTarget, () => options.popupContainer() === false], () => {
|
|
55
|
-
nextTick(
|
|
55
|
+
nextTick(() => {
|
|
56
|
+
const doc = modalDocument();
|
|
57
|
+
const current = doc?.activeElement;
|
|
58
|
+
if (!current || current === doc?.body || current === doc?.documentElement) {
|
|
59
|
+
focus();
|
|
60
|
+
}
|
|
61
|
+
});
|
|
56
62
|
}, { flush: "post" });
|
|
57
63
|
useScrollLock(
|
|
58
64
|
() => scrollLockTarget.value,
|
|
@@ -126,7 +132,7 @@ function useModalSurface(options) {
|
|
|
126
132
|
onBeforeUnmount(unbind);
|
|
127
133
|
function opened() {
|
|
128
134
|
if (mergedOpen.value) {
|
|
129
|
-
|
|
135
|
+
focusAfterEnter();
|
|
130
136
|
transition.opened();
|
|
131
137
|
}
|
|
132
138
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
--c-anchor-title-margin-bottom: var(--c-spacing-1);
|
|
15
15
|
--c-anchor-color-title: var(--c-color-text-2);
|
|
16
16
|
--c-anchor-color-title-hover: rgb(var(--c-primary-5));
|
|
17
|
-
--c-anchor-color-title-active: var(--c-sys-color-
|
|
17
|
+
--c-anchor-color-title-active: var(--c-sys-color-action-primary);
|
|
18
18
|
--c-anchor-font-weight-title-hover: var(--c-font-weight-500);
|
|
19
19
|
--c-anchor-font-weight-title-active: var(--c-font-weight-500);
|
|
20
20
|
--c-anchor-color-bg-title-hover: var(--c-color-fill-2);
|
|
@@ -6,7 +6,7 @@ import { useOptionRequest } from "../_hooks/use-option-request.mjs";
|
|
|
6
6
|
import { createNamespace, getPrefixCls } from "../_utils/global-config.mjs";
|
|
7
7
|
import { isUndefined, isNull, isFunction } from "../_utils/is.mjs";
|
|
8
8
|
import { resolveTextInputMaxLength, normalizeTextInputValue } from "../_utils/text-input-value.mjs";
|
|
9
|
-
import
|
|
9
|
+
import SearchInput from "../input/base.mjs";
|
|
10
10
|
import { useInputForm } from "../input/use-input-form.mjs";
|
|
11
11
|
import { useSelect } from "../select/hooks/use-select.mjs";
|
|
12
12
|
import Optgroup from "../select/Optgroup.vue.mjs";
|
|
@@ -354,7 +354,7 @@ const Base = /* @__PURE__ */ defineComponent({
|
|
|
354
354
|
"aria-activedescendant": computedOpen.value && !loading.value && activeKey.value && enabledOptionKeys.value.includes(activeKey.value) && optionRefs.value[activeKey.value] ? getOptionId(activeKey.value) : void 0,
|
|
355
355
|
autocomplete: "off"
|
|
356
356
|
}));
|
|
357
|
-
const renderInput = (restAttrs) => createVNode(
|
|
357
|
+
const renderInput = (restAttrs) => createVNode(SearchInput, mergeProps({
|
|
358
358
|
"loading": loading.value,
|
|
359
359
|
"loadingMode": props.loadingMode
|
|
360
360
|
}, restAttrs, {
|
|
@@ -4,6 +4,7 @@ import { withFieldPresentation } from "../_components/field-presentation/with-fi
|
|
|
4
4
|
import _sfc_main from "../_components/selected-options/SelectionEditor.vue.mjs";
|
|
5
5
|
import Base from "./auto-complete.mjs";
|
|
6
6
|
const _AutoComplete = withFieldPresentation(Base, {
|
|
7
|
+
selectionConfirmation: "select",
|
|
7
8
|
methods: ["focus", "blur", "refresh"],
|
|
8
9
|
defaultPresentation: defaultSelectionPresentation,
|
|
9
10
|
intent: "input",
|
|
@@ -5,6 +5,8 @@ import { emptyValueProp } from "../_utils/empty-value.mjs";
|
|
|
5
5
|
import { popupContainerProp } from "../_utils/popup-container.mjs";
|
|
6
6
|
const autoCompleteProps = {
|
|
7
7
|
...fieldLoadingProps,
|
|
8
|
+
/** 弹出编辑是否需要确认;默认选中候选项即提交,自定义文本通过确认提交。 */
|
|
9
|
+
needConfirm: { type: Boolean, default: void 0 },
|
|
8
10
|
searchDelay: { type: Number, default: 250 },
|
|
9
11
|
/** 清空动作产生的模型值;省略保留原默认值。 */
|
|
10
12
|
...fieldPresentationProps,
|
|
@@ -54,11 +54,16 @@
|
|
|
54
54
|
color: var(--c-auto-complete-option-text-color-selected);
|
|
55
55
|
background-color: var(--c-auto-complete-option-bg-selected);
|
|
56
56
|
}
|
|
57
|
-
.c-select-dropdown:where(.c-auto-complete__dropdown) .c-select-option-active,
|
|
58
|
-
.c-select-dropdown:where(.c-auto-complete__dropdown) .c-select-option:not(.c-select-
|
|
57
|
+
.c-select-dropdown:where(.c-auto-complete__dropdown) .c-select-option-active:not(.c-select-option-selected):not(.c-select-option-disabled),
|
|
58
|
+
.c-select-dropdown:where(.c-auto-complete__dropdown) .c-select-option:not(.c-select-option-selected):not(.c-select-option-disabled):hover {
|
|
59
59
|
color: var(--c-auto-complete-option-text-color-hover);
|
|
60
60
|
background-color: var(--c-auto-complete-option-bg-hover);
|
|
61
61
|
}
|
|
62
|
+
.c-select-dropdown:where(.c-auto-complete__dropdown) .c-select-option-selected.c-select-option-active:not(.c-select-option-disabled),
|
|
63
|
+
.c-select-dropdown:where(.c-auto-complete__dropdown) .c-select-option-selected:not(.c-select-option-disabled):hover {
|
|
64
|
+
color: var(--c-auto-complete-option-text-color-selected);
|
|
65
|
+
background-color: var(--c-auto-complete-option-bg-hover);
|
|
66
|
+
}
|
|
62
67
|
.c-select-dropdown:where(.c-auto-complete__dropdown) .c-select-option-disabled {
|
|
63
68
|
color: var(--c-auto-complete-option-text-color-disabled);
|
|
64
69
|
background-color: var(--c-auto-complete-option-bg-disabled);
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
--c-back-top-background: var(--c-sys-color-surface-raised);
|
|
13
13
|
--c-back-top-text-color: var(--c-sys-color-content-brand);
|
|
14
14
|
--c-back-top-hover-background: var(--c-sys-color-state-hover);
|
|
15
|
-
--c-back-top-focus-color: var(--c-sys-color-
|
|
15
|
+
--c-back-top-focus-color: var(--c-sys-color-action-primary);
|
|
16
16
|
--c-back-top-focus-width: 2px;
|
|
17
17
|
--c-back-top-focus-offset: 2px;
|
|
18
18
|
--c-back-top-z-index: var(--c-z-index-local-sticky);
|
package/es/button/index.mjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { withInstall } from "../_utils/global-config.mjs";
|
|
2
|
-
import
|
|
3
|
-
import _sfc_main
|
|
2
|
+
import Button$1 from "./base.mjs";
|
|
3
|
+
import _sfc_main from "./ButtonGroup.vue.mjs";
|
|
4
4
|
import { buttonProps } from "./props.mjs";
|
|
5
5
|
import { buttonGroupProps } from "./group-props.mjs";
|
|
6
6
|
const Button = withInstall(
|
|
7
|
-
|
|
8
|
-
Object.assign(
|
|
9
|
-
Group: _sfc_main
|
|
7
|
+
Button$1,
|
|
8
|
+
Object.assign(Button$1, {
|
|
9
|
+
Group: _sfc_main
|
|
10
10
|
}),
|
|
11
|
-
{ components: [
|
|
11
|
+
{ components: [Button$1, _sfc_main] }
|
|
12
12
|
);
|
|
13
13
|
const _ButtonComponent = Button;
|
|
14
|
-
const _ButtonGroupComponent = _sfc_main
|
|
14
|
+
const _ButtonGroupComponent = _sfc_main;
|
|
15
15
|
export {
|
|
16
16
|
Button,
|
|
17
|
-
_sfc_main
|
|
17
|
+
_sfc_main as ButtonGroup,
|
|
18
18
|
_ButtonComponent,
|
|
19
19
|
_ButtonGroupComponent,
|
|
20
20
|
buttonGroupProps,
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
--c-button-disabled-color: var(--c-color-fill-2);
|
|
16
16
|
--c-button-disabled-solid-text-color: var(--c-sys-color-content-on-dark);
|
|
17
17
|
--c-button-disabled-text-color: var(--c-sys-color-content-disabled);
|
|
18
|
-
--c-button-focus-color: var(--c-sys-color-
|
|
18
|
+
--c-button-focus-color: var(--c-sys-color-action-primary);
|
|
19
19
|
--c-button-info-color: var(--c-sys-color-status-info);
|
|
20
20
|
--c-button-info-disabled-color: rgb(var(--c-blue-3));
|
|
21
21
|
--c-button-info-foreground-color: var(--c-sys-color-content-info);
|