@maple-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 +3 -3
- package/es/_components/field-presentation/editor-pending.mjs +4 -0
- package/es/_components/field-presentation/form-bridge.mjs +1 -1
- package/es/_components/field-presentation/with-field-presentation.mjs +51 -8
- package/es/_components/picker-field/PickerField.vue.mjs +3 -13
- package/es/_components/picker-field/TemporalCurrent.vue.mjs +2 -3
- package/es/_components/picker-field/range-labels.mjs +18 -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 +26 -4
- package/es/action-sheet/ActionSheet2.vue.mjs +2 -3
- 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/breadcrumb/style/index.css +1 -1
- package/es/button/base.mjs +7 -0
- package/es/button/index.mjs +9 -9
- package/es/button/style/index.css +1 -1
- package/es/card/Card.vue.mjs +55 -13
- package/es/carousel/style/index.css +1 -1
- package/es/carousel/use-carousel-locale.mjs +10 -3
- package/es/cascader/CascaderMenu.vue.mjs +2 -2
- package/es/cascader/cascader-option.mjs +15 -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/style/index.mjs +1 -0
- package/es/cascader/use-cascader-focus.mjs +9 -6
- package/es/checkbox/CheckboxGroup.vue.mjs +2 -2
- package/es/checkbox/base.mjs +7 -0
- 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 +9 -2
- package/es/date/DatePanelActions.vue.mjs +4 -4
- package/es/date/DateRangeQuickPanel.vue.mjs +2 -2
- package/es/date/DateShortcuts.vue.mjs +2 -2
- package/es/date/field-adapter.mjs +2 -3
- package/es/date/picker-panels/DayPickerPanel2.vue.mjs +4 -5
- package/es/date/picker-panels/MonthPickerPanel2.vue.mjs +5 -6
- package/es/date/picker-panels/PanelHeader2.vue.mjs +6 -7
- package/es/date/picker-panels/YearPickerPanel2.vue.mjs +2 -2
- package/es/date/presentation/CalendarContent2.vue.mjs +13 -14
- package/es/date/presentation/CalendarViewport.vue.mjs +2 -3
- package/es/date/presentation/use-date-locale.mjs +2 -3
- package/es/date/presentation/use-field-locale.mjs +5 -6
- package/es/date/presentation/use-panel-actions-locale.mjs +4 -5
- package/es/date-range/presentation/RangeContent2.vue.mjs +4 -5
- package/es/dialog/Dialog.vue.mjs +3 -3
- package/es/ellipsis/style/index.css +1 -1
- package/es/fab/Fab.mjs +4 -5
- package/es/form/FormItemLabel.vue.mjs +4 -3
- package/es/form/focus-explicit-label.mjs +52 -0
- package/es/input/base.mjs +7 -0
- package/es/input/index.mjs +19 -19
- package/es/locale/date-text.mjs +38 -0
- package/es/locale/misc-text.mjs +23 -0
- package/es/locale/temporal-text.mjs +22 -0
- package/es/locale/zh-CN.mjs +235 -131
- package/es/maple-vue.mjs +1 -1
- package/es/maple.css +273 -207
- package/es/maple.esm.js +19385 -18978
- package/es/nav-menu/style/index.css +1 -1
- package/es/notice-bar/NoticeBar2.vue.mjs +2 -3
- package/es/number-keyboard/NumberKeyboard2.vue.mjs +5 -6
- package/es/pagination/PageInput.vue.mjs +2 -2
- package/es/pagination/style/index.css +2 -2
- package/es/people-select/PeopleSelect.mjs +35 -54
- package/es/people-select/Person.vue.mjs +3 -3
- 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 +64 -0
- package/es/people-select/style/index.css +6 -0
- package/es/picker/Picker.vue.mjs +2 -2
- package/es/picker/Picker2.vue.mjs +4 -5
- package/es/picker/base.mjs +7 -0
- package/es/picker/index.mjs +5 -5
- package/es/progress/style/index.css +2 -2
- package/es/radio/style/index.css +1 -1
- package/es/rate/style/index.css +2 -2
- package/es/ripple/index.mjs +78 -0
- package/es/search/HistoryContent.vue.mjs +4 -4
- package/es/search/Search.vue.mjs +4 -4
- package/es/search/props.mjs +1 -2
- package/es/select/props.mjs +2 -0
- package/es/select/select.mjs +14 -4
- package/es/select/style/index.css +22 -12
- package/es/select/use-select-controller.mjs +22 -2
- package/es/slider/Slider.vue.mjs +43 -21
- package/es/slider/SliderInput.vue.mjs +14 -2
- package/es/slider/style/index.css +2 -2
- package/es/steps/style/index.css +10 -10
- package/es/switch/Switch.vue.mjs +12 -1
- package/es/switch/style/index.css +1 -1
- package/es/tab-bar/TabBar.vue.mjs +2 -2
- package/es/tab-bar/style/index.css +2 -2
- package/es/tabs/style/index.css +1 -1
- package/es/tabs/use-tabs-configuration.mjs +2 -3
- package/es/themes/alps-light/index.mjs +10 -11
- package/es/themes/create-brand-dark.mjs +18 -0
- package/es/themes/dark/breadcrumb-item.mjs +1 -1
- package/es/themes/dark/cascader.mjs +1 -1
- package/es/themes/dark/index.mjs +2 -2
- package/es/themes/firefly-light/index.mjs +12 -13
- package/es/themes/index.mjs +2 -2
- package/es/themes/maple-light/index.mjs +2 -2
- package/es/time/presentation/TimeFieldPanel.vue.mjs +2 -2
- package/es/time/presentation/TimePanelContent2.vue.mjs +8 -9
- package/es/time/presentation/use-field-locale.mjs +5 -6
- package/es/time/props.mjs +1 -1
- package/es/time-range/presentation/TimePanelContent2.vue.mjs +6 -7
- package/es/time-range/props.mjs +1 -1
- package/es/trigger/popup-move-focus.mjs +6 -6
- package/es/trigger/position.mjs +49 -3
- package/es/trigger/positioner.mjs +34 -5
- package/es/trigger/trigger.mjs +1 -1
- package/es/upload/Upload.vue.mjs +18 -2
- package/es/upload/composables/use-upload-queue.mjs +10 -1
- package/es/upload/composables/use-uploader.mjs +45 -11
- package/es/upload/use-upload-locale.mjs +16 -12
- package/es/utils/modal-focus.mjs +9 -2
- package/es/utils/modal-surface.mjs +9 -3
- package/highlight/web-types.en-US.json +698 -176
- package/highlight/web-types.zh-CN.json +699 -177
- 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 +50 -7
- package/lib/_components/picker-field/PickerField.vue.js +3 -13
- package/lib/_components/picker-field/TemporalCurrent.vue.js +2 -3
- package/lib/_components/picker-field/range-labels.js +18 -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 +25 -3
- package/lib/action-sheet/ActionSheet2.vue.js +2 -3
- 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/breadcrumb/style/index.css +1 -1
- package/lib/button/base.js +7 -0
- package/lib/button/index.js +4 -4
- package/lib/button/style/index.css +1 -1
- package/lib/card/Card.vue.js +55 -13
- package/lib/carousel/style/index.css +1 -1
- package/lib/carousel/use-carousel-locale.js +9 -2
- package/lib/cascader/CascaderMenu.vue.js +2 -2
- package/lib/cascader/cascader-option.js +15 -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/style/index.js +1 -0
- package/lib/cascader/use-cascader-focus.js +9 -6
- package/lib/checkbox/base.js +7 -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 +9 -2
- package/lib/date/DatePanelActions.vue.js +4 -4
- package/lib/date/DateRangeQuickPanel.vue.js +2 -2
- package/lib/date/DateShortcuts.vue.js +2 -2
- package/lib/date/field-adapter.js +2 -3
- package/lib/date/picker-panels/DayPickerPanel2.vue.js +6 -7
- package/lib/date/picker-panels/MonthPickerPanel2.vue.js +7 -8
- package/lib/date/picker-panels/PanelHeader2.vue.js +6 -7
- package/lib/date/picker-panels/YearPickerPanel2.vue.js +2 -2
- package/lib/date/presentation/CalendarContent2.vue.js +13 -14
- package/lib/date/presentation/CalendarViewport.vue.js +2 -3
- package/lib/date/presentation/use-date-locale.js +2 -3
- package/lib/date/presentation/use-field-locale.js +5 -6
- package/lib/date/presentation/use-panel-actions-locale.js +4 -5
- package/lib/date-range/presentation/RangeContent2.vue.js +4 -5
- package/lib/dialog/Dialog.vue.js +3 -3
- package/lib/ellipsis/style/index.css +1 -1
- package/lib/fab/Fab.js +4 -5
- package/lib/form/FormItemLabel.vue.js +3 -2
- package/lib/form/focus-explicit-label.js +52 -0
- package/lib/input/base.js +7 -0
- package/lib/input/index.js +5 -5
- package/lib/locale/date-text.js +38 -0
- package/lib/locale/misc-text.js +23 -0
- package/lib/locale/temporal-text.js +22 -0
- package/lib/locale/zh-CN.js +234 -130
- package/lib/maple-vue.js +1 -1
- package/lib/maple.cjs.js +3637 -2963
- package/lib/maple.css +273 -207
- package/lib/nav-menu/style/index.css +1 -1
- package/lib/notice-bar/NoticeBar2.vue.js +2 -3
- package/lib/number-keyboard/NumberKeyboard2.vue.js +5 -6
- package/lib/pagination/PageInput.vue.js +2 -2
- package/lib/pagination/style/index.css +2 -2
- package/lib/people-select/PeopleSelect.js +34 -53
- 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 +64 -0
- package/lib/people-select/style/index.css +6 -0
- package/lib/picker/Picker.vue.js +2 -2
- package/lib/picker/Picker2.vue.js +4 -5
- package/lib/picker/base.js +7 -0
- package/lib/picker/index.js +5 -5
- package/lib/progress/style/index.css +2 -2
- package/lib/radio/style/index.css +1 -1
- package/lib/rate/style/index.css +2 -2
- package/lib/ripple/index.js +78 -0
- package/lib/search/HistoryContent.vue.js +4 -4
- package/lib/search/Search.vue.js +4 -4
- package/lib/search/props.js +1 -2
- package/lib/select/props.js +2 -0
- package/lib/select/select.js +14 -4
- package/lib/select/style/index.css +22 -12
- package/lib/select/use-select-controller.js +22 -2
- package/lib/slider/Slider.vue.js +42 -20
- package/lib/slider/SliderInput.vue.js +14 -2
- package/lib/slider/style/index.css +2 -2
- package/lib/steps/style/index.css +10 -10
- package/lib/switch/Switch.vue.js +11 -0
- package/lib/switch/style/index.css +1 -1
- package/lib/tab-bar/TabBar.vue.js +2 -2
- package/lib/tab-bar/style/index.css +2 -2
- package/lib/tabs/style/index.css +1 -1
- package/lib/tabs/use-tabs-configuration.js +2 -3
- package/lib/themes/alps-light/index.js +10 -11
- package/lib/themes/create-brand-dark.js +18 -0
- package/lib/themes/dark/breadcrumb-item.js +1 -1
- package/lib/themes/dark/cascader.js +1 -1
- package/lib/themes/dark/index.js +2 -2
- package/lib/themes/firefly-light/index.js +12 -13
- package/lib/themes/index.js +2 -2
- package/lib/themes/maple-light/index.js +2 -2
- package/lib/time/presentation/TimeFieldPanel.vue.js +2 -2
- package/lib/time/presentation/TimePanelContent2.vue.js +8 -9
- package/lib/time/presentation/use-field-locale.js +5 -6
- package/lib/time/props.js +1 -1
- package/lib/time-range/presentation/TimePanelContent2.vue.js +6 -7
- package/lib/time-range/props.js +1 -1
- package/lib/trigger/popup-move-focus.js +6 -6
- package/lib/trigger/position.js +48 -2
- package/lib/trigger/positioner.js +33 -4
- package/lib/trigger/trigger.js +1 -1
- package/lib/upload/Upload.vue.js +17 -1
- package/lib/upload/composables/use-upload-queue.js +10 -1
- package/lib/upload/composables/use-uploader.js +45 -11
- package/lib/upload/use-upload-locale.js +15 -11
- package/lib/utils/modal-focus.js +9 -2
- package/lib/utils/modal-surface.js +9 -3
- package/package.json +6 -6
- package/types/styleVars.d.ts +3 -0
- package/types-generated/_components/field-presentation/editor-pending.d.ts +3 -0
- package/types-generated/_components/field-presentation/with-field-presentation.d.ts +2 -0
- package/types-generated/_components/picker-field/range-labels.d.ts +1 -0
- package/types-generated/action-sheet/ActionSheet.vue.d.ts +2 -1
- package/types-generated/action-sheet/index.d.ts +1 -1
- package/types-generated/auto-complete/auto-complete.d.ts +13 -4
- package/types-generated/auto-complete/index.d.ts +30 -0
- package/types-generated/auto-complete/presentation.d.ts +9 -0
- package/types-generated/auto-complete/props.d.ts +5 -1
- package/types-generated/breadcrumb/index.d.ts +72 -2
- package/types-generated/button/base.d.ts +266 -0
- package/types-generated/button/index.d.ts +3 -1
- package/types-generated/cascader/Cascader.vue.d.ts +10 -1
- package/types-generated/cascader/CascaderPanel.vue.d.ts +1 -1
- package/types-generated/cascader/index.d.ts +39 -9
- package/types-generated/cascader/presentation.d.ts +18 -3
- package/types-generated/cascader/props.d.ts +5 -0
- package/types-generated/cascader/style/index.d.ts +1 -0
- package/types-generated/cascader/use-cascader-controller.d.ts +4 -0
- package/types-generated/checkbox/base.d.ts +361 -0
- package/types-generated/checkbox/index.d.ts +362 -3
- package/types-generated/date/picker-panels/DayPickerPanel.vue.d.ts +6 -248
- package/types-generated/date/picker-panels/MonthPickerPanel.vue.d.ts +8 -249
- package/types-generated/date/picker-panels/PanelHeader.vue.d.ts +3 -124
- package/types-generated/date/picker-panels/YearPickerPanel.vue.d.ts +6 -248
- package/types-generated/date/presentation/CalendarContent.vue.d.ts +1169 -966
- package/types-generated/date-range/presentation/RangeContent.vue.d.ts +2561 -1430
- package/types-generated/form/focus-explicit-label.d.ts +2 -0
- package/types-generated/index.d.ts +1 -1
- package/types-generated/input/base.d.ts +481 -0
- package/types-generated/input/index.d.ts +2 -0
- package/types-generated/locale/date-text.d.ts +2 -0
- package/types-generated/locale/misc-text.d.ts +2 -0
- package/types-generated/locale/temporal-text.d.ts +2 -0
- package/types-generated/maple-vue.d.ts +1 -1
- package/types-generated/menu/index.d.ts +1022 -2
- package/types-generated/people-select/PeopleSelect.d.ts +38 -16
- package/types-generated/people-select/emits.d.ts +3 -2
- package/types-generated/people-select/index.d.ts +135 -63
- package/types-generated/people-select/people-select.d.ts +47 -16
- package/types-generated/people-select/presentation.d.ts +46 -16
- package/types-generated/people-select/props.d.ts +18 -7
- package/types-generated/people-select/selection.d.ts +11 -0
- package/types-generated/people-select/types.d.ts +5 -1
- package/types-generated/picker/Picker.vue.d.ts +5 -125
- package/types-generated/picker/base.d.ts +2043 -0
- package/types-generated/picker/index.d.ts +1134 -206
- package/types-generated/radio/index.d.ts +365 -2
- package/types-generated/search/Search.vue.d.ts +2 -2
- package/types-generated/search/props.d.ts +1 -1
- package/types-generated/select/index.d.ts +30 -0
- package/types-generated/select/native-editor-owner.d.ts +1 -0
- package/types-generated/select/props.d.ts +6 -1
- package/types-generated/select/select.d.ts +9 -0
- package/types-generated/select/use-select-controller.d.ts +5 -0
- package/types-generated/slider/SliderInput.vue.d.ts +4 -0
- package/types-generated/themes/dark/cascader.d.ts +1 -1
- package/types-generated/themes/index.d.ts +2 -2
- package/types-generated/time/presentation/TimePanelContent.vue.d.ts +1117 -309
- package/types-generated/time/props.d.ts +3 -2
- package/types-generated/time-range/picker-props.d.ts +1 -1
- package/types-generated/time-range/presentation/TimePanelContent.vue.d.ts +1125 -317
- package/types-generated/time-range/props.d.ts +6 -5
- package/types-generated/trigger/position.d.ts +1 -0
- package/types-generated/upload/Upload.vue.d.ts +11 -11
- package/types-generated/upload/composables/use-upload-queue.d.ts +1 -0
- package/types-generated/upload/composables/use-uploader.d.ts +2 -0
- package/types-generated/utils/modal-focus.d.ts +1 -0
- package/umd/_components/selected-options/style/index.css +33 -15
- package/umd/auto-complete/style/index.css +7 -2
- package/umd/back-top/style/index.css +1 -1
- package/umd/breadcrumb/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/checkbox/style/index.css +1 -1
- package/umd/ellipsis/style/index.css +1 -1
- package/umd/maple.css +273 -207
- package/umd/maple.js +3 -3
- 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 +2 -2
- 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/tab-bar/style/index.css +2 -2
- package/umd/tabs/style/index.css +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
:where([data-mp-theme]) {
|
|
6
6
|
--mp-nav-menu-background: var(--mp-sys-color-surface-overlay);
|
|
7
7
|
--mp-nav-menu-color: var(--mp-sys-color-content-primary);
|
|
8
|
-
--mp-nav-menu-active-color: var(--mp-sys-color-
|
|
8
|
+
--mp-nav-menu-active-color: var(--mp-sys-color-action-primary);
|
|
9
9
|
--mp-nav-menu-disabled-color: var(--mp-color-text-disabled);
|
|
10
10
|
--mp-nav-menu-border-color: var(--mp-sys-color-border-default);
|
|
11
11
|
--mp-nav-menu-height: 48px;
|
|
@@ -3,12 +3,11 @@ import { IconClose } from "@maple-design/icons-vue";
|
|
|
3
3
|
import { toNumber } from "@maple-design/shared-vue";
|
|
4
4
|
import "../icon/index.mjs";
|
|
5
5
|
import _sfc_main$1 from "../icon/RegisteredIcon.vue.mjs";
|
|
6
|
-
import "../locale/index.mjs";
|
|
7
6
|
import { injectLocaleProvider } from "../locale-provider/provide.mjs";
|
|
7
|
+
import { miscText } from "../locale/misc-text.mjs";
|
|
8
8
|
import { createNamespace } from "../utils/components.mjs";
|
|
9
9
|
import { props } from "./props.mjs";
|
|
10
10
|
import _sfc_main$2 from "../icon/Icon.vue.mjs";
|
|
11
|
-
import { t } from "../locale/state.mjs";
|
|
12
11
|
const { name, n, classes } = createNamespace("notice-bar");
|
|
13
12
|
const _sfc_main = defineComponent({
|
|
14
13
|
name,
|
|
@@ -21,7 +20,7 @@ const _sfc_main = defineComponent({
|
|
|
21
20
|
emits: ["close", "replay"],
|
|
22
21
|
setup(props2, { emit }) {
|
|
23
22
|
const { t: translate } = injectLocaleProvider();
|
|
24
|
-
const closeLabel = computed(() => String(translate?.("common.close") ??
|
|
23
|
+
const closeLabel = computed(() => String(translate?.("common.close") ?? miscText("common.close") ?? "Close"));
|
|
25
24
|
const visible = ref(true);
|
|
26
25
|
const contentRef = ref(null);
|
|
27
26
|
const textRef = ref(null);
|
|
@@ -4,15 +4,14 @@ import { toNumber } from "@maple-design/shared-vue";
|
|
|
4
4
|
import { useVModel } from "@maple-design/use-vue";
|
|
5
5
|
import { useFormErrorDescription } from "../form/error-description.mjs";
|
|
6
6
|
import "../icon/index.mjs";
|
|
7
|
-
import "../locale/index.mjs";
|
|
8
7
|
import { injectLocaleProvider } from "../locale-provider/provide.mjs";
|
|
8
|
+
import { miscText } from "../locale/misc-text.mjs";
|
|
9
9
|
import "../popup/index.mjs";
|
|
10
10
|
import { Ripple } from "../ripple/index.mjs";
|
|
11
11
|
import { createNamespace } from "../utils/components.mjs";
|
|
12
12
|
import { props } from "./props.mjs";
|
|
13
13
|
import _sfc_main$1 from "../icon/Icon.vue.mjs";
|
|
14
14
|
import _sfc_main$2 from "../popup/Popup.vue.mjs";
|
|
15
|
-
import { t } from "../locale/state.mjs";
|
|
16
15
|
const { name, n, classes } = createNamespace("number-keyboard");
|
|
17
16
|
function shuffle(items) {
|
|
18
17
|
const result = [...items];
|
|
@@ -49,9 +48,9 @@ const _sfc_main = defineComponent({
|
|
|
49
48
|
const { describe: describeError } = useFormErrorDescription();
|
|
50
49
|
const { t: localT } = injectLocaleProvider();
|
|
51
50
|
const titleId = `number-keyboard-title-${useId()}`;
|
|
52
|
-
const deleteLabel = computed(() => (localT ||
|
|
53
|
-
const closeLabel = computed(() => (localT ||
|
|
54
|
-
const dialogLabel = () => attrs["aria-label"] ?? (!attrs["aria-labelledby"] && !props2.title ? (localT ||
|
|
51
|
+
const deleteLabel = computed(() => (localT || miscText)("numberKeyboard.delete") ?? "Delete");
|
|
52
|
+
const closeLabel = computed(() => (localT || miscText)("numberKeyboard.done") ?? "Done");
|
|
53
|
+
const dialogLabel = () => attrs["aria-label"] ?? (!attrs["aria-labelledby"] && !props2.title ? (localT || miscText)("numberKeyboard.label") ?? "Number keyboard" : void 0);
|
|
55
54
|
const dialogLabelledby = () => attrs["aria-labelledby"] ?? (!attrs["aria-label"] && props2.title ? titleId : void 0);
|
|
56
55
|
const contentAttrs = () => Object.fromEntries(Object.entries(attrs).filter(([key]) => key !== "aria-label" && key !== "aria-labelledby"));
|
|
57
56
|
const open = useVModel(props2, "open", { emit, eventName: "update:open", defaultValue: props2.defaultOpen });
|
|
@@ -66,7 +65,7 @@ const _sfc_main = defineComponent({
|
|
|
66
65
|
}
|
|
67
66
|
return props2.overlayClosable ?? true;
|
|
68
67
|
});
|
|
69
|
-
const closeText = computed(() => props2.closeButtonText ??
|
|
68
|
+
const closeText = computed(() => props2.closeButtonText ?? (localT || miscText)("cascaderPickerDoneButtonText"));
|
|
70
69
|
const extraKeys = computed(() => {
|
|
71
70
|
const { extraKey } = props2;
|
|
72
71
|
if (!extraKey || extraKey === "") {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, withKeys, withModifiers } from "vue";
|
|
2
|
-
import
|
|
2
|
+
import MpInput from "../input/base.mjs";
|
|
3
3
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
4
|
__name: "PageInput",
|
|
5
5
|
props: {
|
|
@@ -12,7 +12,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12
12
|
setup(__props, { emit: __emit }) {
|
|
13
13
|
const emit = __emit;
|
|
14
14
|
return (_ctx, _cache) => {
|
|
15
|
-
return openBlock(), createBlock(unref(
|
|
15
|
+
return openBlock(), createBlock(unref(MpInput), {
|
|
16
16
|
"edit-mode": "direct",
|
|
17
17
|
"model-value": _ctx.modelValue,
|
|
18
18
|
size: _ctx.size,
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
--mp-pagination-touch-size: 44px;
|
|
22
22
|
--mp-pagination-focus-width: 2px;
|
|
23
23
|
--mp-pagination-focus-offset: 1px;
|
|
24
|
-
--mp-pagination-focus-color: var(--mp-sys-color-
|
|
24
|
+
--mp-pagination-focus-color: var(--mp-sys-color-action-primary);
|
|
25
25
|
--mp-pagination-item-background: transparent;
|
|
26
26
|
--mp-pagination-hover-background: var(--mp-color-fill-1);
|
|
27
27
|
--mp-pagination-active-background: var(--mp-color-primary-light-1);
|
|
28
|
-
--mp-pagination-active-color: var(--mp-sys-color-
|
|
28
|
+
--mp-pagination-active-color: var(--mp-sys-color-action-primary);
|
|
29
29
|
--mp-pagination-disabled-color: var(--mp-color-text-disabled);
|
|
30
30
|
--mp-pagination-disabled-background: var(--mp-color-fill-1);
|
|
31
31
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, ref,
|
|
1
|
+
import { defineComponent, computed, ref, onMounted, watch, onBeforeUnmount, h } from "vue";
|
|
2
2
|
import { useAsyncData } from "@maple-design/use-vue";
|
|
3
3
|
import { useFieldPresentation } from "../_components/field-presentation/context.mjs";
|
|
4
4
|
import { usePresentationForm } from "../_components/field-presentation/form-bridge.mjs";
|
|
@@ -8,6 +8,7 @@ import { peopleSelectEmits } from "./emits.mjs";
|
|
|
8
8
|
import _sfc_main from "./Person.vue.mjs";
|
|
9
9
|
import Presented from "./presentation.mjs";
|
|
10
10
|
import { peopleSelectProps } from "./props.mjs";
|
|
11
|
+
import { useSelectedPeople } from "./selection.mjs";
|
|
11
12
|
const _PeopleSelect = defineComponent({
|
|
12
13
|
name: createNamespace("people-select").name,
|
|
13
14
|
inheritAttrs: false,
|
|
@@ -32,42 +33,18 @@ const _PeopleSelect = defineComponent({
|
|
|
32
33
|
immediate: false
|
|
33
34
|
});
|
|
34
35
|
const options = computed(() => Array.isArray(props.options) ? props.options : source.data.value);
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (person) {
|
|
41
|
-
selectedCache.value = person;
|
|
42
|
-
} else if (selectedCache.value?.value !== value.value) {
|
|
43
|
-
selectedCache.value = void 0;
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
{ immediate: true }
|
|
47
|
-
);
|
|
48
|
-
const selected = computed(() => {
|
|
49
|
-
const current = options.value.find((person) => person.value === value.value);
|
|
50
|
-
if (current) {
|
|
51
|
-
return current;
|
|
52
|
-
}
|
|
53
|
-
if (typeof props.fallbackOption === "function" && value.value != null) {
|
|
54
|
-
return props.fallbackOption(value.value);
|
|
55
|
-
}
|
|
56
|
-
if (props.fallbackOption !== false && props.label) {
|
|
57
|
-
return { ...selectedCache.value, value: value.value ?? "", label: props.label };
|
|
36
|
+
const selection = useSelectedPeople(props, value, options);
|
|
37
|
+
const selected = computed(
|
|
38
|
+
() => selection.people.value[0] ?? {
|
|
39
|
+
value: "",
|
|
40
|
+
label: props.label || props.defaultText
|
|
58
41
|
}
|
|
59
|
-
|
|
60
|
-
return selectedCache.value;
|
|
61
|
-
}
|
|
62
|
-
return {
|
|
63
|
-
value: value.value ?? "",
|
|
64
|
-
label: props.fallbackOption === false ? props.defaultText : props.label || value.value || props.defaultText
|
|
65
|
-
};
|
|
66
|
-
});
|
|
42
|
+
);
|
|
67
43
|
const readScope = computed(() => ({
|
|
68
44
|
value: value.value,
|
|
69
|
-
text: emptyPolicy.isEmpty(value.value) ? emptyPolicy.emptyText.value :
|
|
70
|
-
person: selected.value
|
|
45
|
+
text: emptyPolicy.isEmpty(value.value) ? emptyPolicy.emptyText.value : selection.people.value.map((person) => person.label).join(", "),
|
|
46
|
+
person: selected.value,
|
|
47
|
+
...props.multiple ? { people: selection.people.value } : {}
|
|
71
48
|
}));
|
|
72
49
|
const childOptions = options;
|
|
73
50
|
async function load(query) {
|
|
@@ -109,25 +86,29 @@ const _PeopleSelect = defineComponent({
|
|
|
109
86
|
if (emptyPolicy.isEmpty(value.value)) {
|
|
110
87
|
return emptyPolicy.emptyText.value;
|
|
111
88
|
}
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
|
|
89
|
+
const renderPerson = (person) => {
|
|
90
|
+
const scope = {
|
|
91
|
+
person,
|
|
92
|
+
disabled: form.mergedDisabled.value || !person.value || !!person.disabled
|
|
93
|
+
};
|
|
94
|
+
const actions = slots.actions ? slots.actions(scope) : props.renderActions?.(scope);
|
|
95
|
+
return h(
|
|
96
|
+
_sfc_main,
|
|
97
|
+
{
|
|
98
|
+
key: person.value,
|
|
99
|
+
person,
|
|
100
|
+
showAvatar: props.showAvatar,
|
|
101
|
+
disabled: scope.disabled,
|
|
102
|
+
showPhone: props.showPhone,
|
|
103
|
+
showChat: props.showChat,
|
|
104
|
+
call: props.call,
|
|
105
|
+
chat: props.chat,
|
|
106
|
+
onActionError: (error, action) => emit("action-error", error, action)
|
|
107
|
+
},
|
|
108
|
+
actions == null ? void 0 : { default: () => actions }
|
|
109
|
+
);
|
|
115
110
|
};
|
|
116
|
-
|
|
117
|
-
return h(
|
|
118
|
-
_sfc_main,
|
|
119
|
-
{
|
|
120
|
-
person: selected.value,
|
|
121
|
-
showAvatar: props.showAvatar,
|
|
122
|
-
disabled: scope.disabled,
|
|
123
|
-
showPhone: props.showPhone,
|
|
124
|
-
showChat: props.showChat,
|
|
125
|
-
call: props.call,
|
|
126
|
-
chat: props.chat,
|
|
127
|
-
onActionError: (error, action) => emit("action-error", error, action)
|
|
128
|
-
},
|
|
129
|
-
actions == null ? void 0 : { default: () => actions }
|
|
130
|
-
);
|
|
111
|
+
return props.multiple ? h("span", { class: "mp-people-select-people" }, selection.people.value.map(renderPerson)) : renderPerson(selected.value);
|
|
131
112
|
};
|
|
132
113
|
const personSlots = () => ({
|
|
133
114
|
...slots,
|
|
@@ -149,8 +130,8 @@ const _PeopleSelect = defineComponent({
|
|
|
149
130
|
ref: control,
|
|
150
131
|
modelValue: value.value,
|
|
151
132
|
options: childOptions.value,
|
|
152
|
-
label: selected.value.label,
|
|
153
|
-
fallbackOption: props.fallbackOption === false ? false :
|
|
133
|
+
label: props.multiple ? "" : selected.value.label,
|
|
134
|
+
fallbackOption: props.fallbackOption === false ? false : selection.resolve,
|
|
154
135
|
loading: props.loading || source.loading.value,
|
|
155
136
|
filterOption: props.filterOption ?? !remote.value,
|
|
156
137
|
"onUpdate:modelValue": update,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, reactive, openBlock, createElementBlock, normalizeClass, unref, createCommentVNode, createElementVNode, toDisplayString, withModifiers, renderSlot, createBlock, withCtx } from "vue";
|
|
2
|
-
import
|
|
2
|
+
import MpButton from "../button/base.mjs";
|
|
3
3
|
import { createNamespace } from "../utils/components.mjs";
|
|
4
4
|
import { usePeopleTexts } from "./use-people-texts.mjs";
|
|
5
5
|
const _hoisted_1 = ["src"];
|
|
@@ -61,7 +61,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
61
61
|
}, ["stop"]))
|
|
62
62
|
}, [
|
|
63
63
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
64
|
-
_ctx.showPhone ? (openBlock(), createBlock(unref(
|
|
64
|
+
_ctx.showPhone ? (openBlock(), createBlock(unref(MpButton), {
|
|
65
65
|
key: 0,
|
|
66
66
|
size: "xs",
|
|
67
67
|
variant: "text",
|
|
@@ -88,7 +88,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
88
88
|
])),
|
|
89
89
|
_: 1
|
|
90
90
|
}, 8, ["disabled", "aria-label", "loading"])) : createCommentVNode("", true),
|
|
91
|
-
_ctx.showChat ? (openBlock(), createBlock(unref(
|
|
91
|
+
_ctx.showChat ? (openBlock(), createBlock(unref(MpButton), {
|
|
92
92
|
key: 1,
|
|
93
93
|
size: "xs",
|
|
94
94
|
variant: "text",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const identity = (value) => value === null || typeof value === "string";
|
|
1
|
+
const identity = (value) => value === null || typeof value === "string" || Array.isArray(value) && value.every((id) => typeof id === "string");
|
|
2
2
|
const peopleSelectEmits = {
|
|
3
3
|
"update:modelValue": identity,
|
|
4
4
|
"update:open": (open) => typeof open === "boolean",
|
|
@@ -3,7 +3,9 @@ import { selectionEditorSurface } from "../_components/selected-options/context.
|
|
|
3
3
|
import { useFormItem } from "../form/item-provide.mjs";
|
|
4
4
|
import { Select } from "../select/index.mjs";
|
|
5
5
|
import { createNamespace } from "../utils/components.mjs";
|
|
6
|
+
import { peopleSelectEmits } from "./emits.mjs";
|
|
6
7
|
import { peopleSelectProps } from "./props.mjs";
|
|
8
|
+
import { peopleText } from "./selection.mjs";
|
|
7
9
|
const {
|
|
8
10
|
name
|
|
9
11
|
} = createNamespace("people-select");
|
|
@@ -11,12 +13,7 @@ const Base = /* @__PURE__ */ defineComponent({
|
|
|
11
13
|
name,
|
|
12
14
|
inheritAttrs: false,
|
|
13
15
|
props: peopleSelectProps,
|
|
14
|
-
emits:
|
|
15
|
-
"update:modelValue": (value) => value === null || typeof value === "string",
|
|
16
|
-
change: (value) => value === null || typeof value === "string",
|
|
17
|
-
clear: () => true,
|
|
18
|
-
search: (query) => typeof query === "string"
|
|
19
|
-
},
|
|
16
|
+
emits: peopleSelectEmits,
|
|
20
17
|
setup(props, {
|
|
21
18
|
emit,
|
|
22
19
|
attrs,
|
|
@@ -42,12 +39,12 @@ const Base = /* @__PURE__ */ defineComponent({
|
|
|
42
39
|
...option
|
|
43
40
|
})));
|
|
44
41
|
const blocked = () => mergedDisabled.value || mergedReadonly.value || props.loading;
|
|
45
|
-
const label = computed(() => (
|
|
42
|
+
const label = computed(() => peopleText(value.value, props));
|
|
46
43
|
const commit = (next) => {
|
|
47
44
|
if (blocked()) {
|
|
48
45
|
return;
|
|
49
46
|
}
|
|
50
|
-
const text = next === null ? null : typeof next === "string" ? next : "";
|
|
47
|
+
const text = next === null ? null : props.multiple ? Array.isArray(next) ? next.filter((id) => typeof id === "string") : [] : typeof next === "string" ? next : "";
|
|
51
48
|
if (props.modelValue === void 0) {
|
|
52
49
|
localValue.value = text;
|
|
53
50
|
}
|
|
@@ -60,6 +57,7 @@ const Base = /* @__PURE__ */ defineComponent({
|
|
|
60
57
|
name: props.name
|
|
61
58
|
}, {
|
|
62
59
|
"placeholder": props.placeholder,
|
|
60
|
+
"multiple": props.multiple,
|
|
63
61
|
"clearable": props.clearable,
|
|
64
62
|
"emptyValue": props.emptyValue,
|
|
65
63
|
"filterable": props.filterable,
|
|
@@ -2,10 +2,12 @@ import { h } from "vue";
|
|
|
2
2
|
import { withFieldPresentation } from "../_components/field-presentation/with-field-presentation.mjs";
|
|
3
3
|
import _sfc_main from "../_components/selected-options/SelectionEditor.vue.mjs";
|
|
4
4
|
import Base from "./people-select.mjs";
|
|
5
|
+
import { peopleText } from "./selection.mjs";
|
|
5
6
|
const Presented = withFieldPresentation(Base, {
|
|
7
|
+
selectionConfirmation: "update",
|
|
6
8
|
methods: ["focus", "blur"],
|
|
7
9
|
defaultPresentation: "popup",
|
|
8
|
-
text:
|
|
10
|
+
text: peopleText,
|
|
9
11
|
editor: ({ props, attrs, value, update, emit, slots, disabled, readonly }) => h(
|
|
10
12
|
_sfc_main,
|
|
11
13
|
{ kind: "people-select" },
|
|
@@ -4,6 +4,8 @@ import { selectProps } from "../select/props.mjs";
|
|
|
4
4
|
import { emptyValueProp } from "../utils/empty-value.mjs";
|
|
5
5
|
const peopleSelectProps = {
|
|
6
6
|
...fieldLoadingProps,
|
|
7
|
+
/** 弹出编辑是否需要确认;未设置时单选即提交,多选保留确认。 */
|
|
8
|
+
needConfirm: { type: Boolean, default: void 0 },
|
|
7
9
|
...fieldPresentationProps,
|
|
8
10
|
emptyValue: emptyValueProp(),
|
|
9
11
|
/** Reactive display data for a selected value absent from options. */
|
|
@@ -41,9 +43,13 @@ const peopleSelectProps = {
|
|
|
41
43
|
type: String,
|
|
42
44
|
default: "-"
|
|
43
45
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
multiple: selectProps.multiple,
|
|
47
|
+
modelValue: { type: [String, Array], default: void 0 },
|
|
48
|
+
/** 非受控初始选中人员 ID 或 ID 数组,仅创建时读取。 */
|
|
49
|
+
defaultValue: {
|
|
50
|
+
type: [String, Array],
|
|
51
|
+
default: (props) => props.multiple ? [] : ""
|
|
52
|
+
},
|
|
47
53
|
isLabel: {
|
|
48
54
|
type: Boolean,
|
|
49
55
|
default: false
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { shallowRef, watch, computed } from "vue";
|
|
2
|
+
function personIds(value) {
|
|
3
|
+
return Array.isArray(value) ? value : value == null ? [] : [value];
|
|
4
|
+
}
|
|
5
|
+
function useSelectedPeople(props, value, options) {
|
|
6
|
+
const cache = shallowRef(/* @__PURE__ */ new Map());
|
|
7
|
+
watch(
|
|
8
|
+
[options, value],
|
|
9
|
+
() => {
|
|
10
|
+
const next = /* @__PURE__ */ new Map();
|
|
11
|
+
for (const id of personIds(value.value)) {
|
|
12
|
+
const person = options.value.find((option) => option.value === id) ?? cache.value.get(id);
|
|
13
|
+
if (person) {
|
|
14
|
+
next.set(id, person);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
cache.value = next;
|
|
18
|
+
},
|
|
19
|
+
{ immediate: true, flush: "sync" }
|
|
20
|
+
);
|
|
21
|
+
function resolve(id) {
|
|
22
|
+
const current = options.value.find((option) => option.value === id);
|
|
23
|
+
if (current) {
|
|
24
|
+
return current;
|
|
25
|
+
}
|
|
26
|
+
if (typeof props.fallbackOption === "function") {
|
|
27
|
+
return props.fallbackOption(id);
|
|
28
|
+
}
|
|
29
|
+
if (props.fallbackOption !== false) {
|
|
30
|
+
if (!props.multiple && props.label) {
|
|
31
|
+
return { ...cache.value.get(id), value: id, label: props.label };
|
|
32
|
+
}
|
|
33
|
+
const cached = cache.value.get(id);
|
|
34
|
+
if (cached) {
|
|
35
|
+
return cached;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
value: id,
|
|
40
|
+
label: props.fallbackOption === false ? props.defaultText ?? "-" : !props.multiple && props.label || id || (props.defaultText ?? "-")
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
people: computed(() => personIds(value.value).map(resolve)),
|
|
45
|
+
resolve
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function peopleText(value, props) {
|
|
49
|
+
return personIds(value).map((id) => {
|
|
50
|
+
const option = Array.isArray(props.options) ? props.options.find((person) => person.value === id) : void 0;
|
|
51
|
+
if (option) {
|
|
52
|
+
return option.label;
|
|
53
|
+
}
|
|
54
|
+
if (typeof props.fallbackOption === "function") {
|
|
55
|
+
return props.fallbackOption(id).label;
|
|
56
|
+
}
|
|
57
|
+
return !props.multiple && props.label || id || (props.defaultText ?? "-");
|
|
58
|
+
}).join(", ");
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
peopleText,
|
|
62
|
+
personIds,
|
|
63
|
+
useSelectedPeople
|
|
64
|
+
};
|
package/es/picker/Picker.vue.mjs
CHANGED
|
@@ -157,7 +157,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
157
157
|
_: 3
|
|
158
158
|
}, 16);
|
|
159
159
|
}
|
|
160
|
-
const
|
|
160
|
+
const Picker = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
161
161
|
export {
|
|
162
|
-
|
|
162
|
+
Picker as default
|
|
163
163
|
};
|
|
@@ -2,12 +2,12 @@ import { defineComponent, ref, computed, useId, onMounted, onActivated, onDeacti
|
|
|
2
2
|
import { IconCheck } from "@maple-design/icons-vue";
|
|
3
3
|
import { toNumber, clamp, clampArrayRange } from "@maple-design/shared-vue";
|
|
4
4
|
import { useTouch } from "@maple-design/use-vue";
|
|
5
|
-
import
|
|
5
|
+
import MpButton from "../button/base.mjs";
|
|
6
6
|
import { useFormErrorDescription } from "../form/error-description.mjs";
|
|
7
7
|
import { useFormItem } from "../form/item-provide.mjs";
|
|
8
8
|
import "../icon/index.mjs";
|
|
9
|
-
import "../locale/index.mjs";
|
|
10
9
|
import { injectLocaleProvider } from "../locale-provider/provide.mjs";
|
|
10
|
+
import { temporalText } from "../locale/temporal-text.mjs";
|
|
11
11
|
import "../popup/index.mjs";
|
|
12
12
|
import { createNamespace } from "../utils/components.mjs";
|
|
13
13
|
import { toPxNum, getTranslateY } from "../utils/elements.mjs";
|
|
@@ -15,7 +15,6 @@ import { useFieldNames } from "../utils/options.mjs";
|
|
|
15
15
|
import { props } from "./props.mjs";
|
|
16
16
|
import _sfc_main$1 from "../popup/Popup.vue.mjs";
|
|
17
17
|
import _sfc_main$2 from "../icon/Icon.vue.mjs";
|
|
18
|
-
import { t } from "../locale/state.mjs";
|
|
19
18
|
const { name, n, classes } = createNamespace("picker");
|
|
20
19
|
const MOMENTUM_RECORD_TIME = 300;
|
|
21
20
|
const MOMENTUM_ALLOW_DISTANCE = 15;
|
|
@@ -26,7 +25,7 @@ const _sfc_main = defineComponent({
|
|
|
26
25
|
name,
|
|
27
26
|
components: {
|
|
28
27
|
MIconCheck: IconCheck,
|
|
29
|
-
MpButton
|
|
28
|
+
MpButton,
|
|
30
29
|
MpIcon: _sfc_main$2,
|
|
31
30
|
MpPopup: _sfc_main$1
|
|
32
31
|
},
|
|
@@ -545,7 +544,7 @@ const _sfc_main = defineComponent({
|
|
|
545
544
|
Transition,
|
|
546
545
|
toRaw,
|
|
547
546
|
pt,
|
|
548
|
-
t,
|
|
547
|
+
t: temporalText,
|
|
549
548
|
n,
|
|
550
549
|
classes,
|
|
551
550
|
isOptionSelected,
|
package/es/picker/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { reactive, nextTick } from "vue";
|
|
2
2
|
import { isArray, call } from "@maple-design/shared-vue";
|
|
3
3
|
import { withInstall, withPropsDefaultsSetter, mountInstance } from "../utils/components.mjs";
|
|
4
|
-
import
|
|
4
|
+
import MpPicker from "./base.mjs";
|
|
5
5
|
import { props } from "./props.mjs";
|
|
6
6
|
let singletonOptions;
|
|
7
7
|
function Picker(options) {
|
|
@@ -17,7 +17,7 @@ function Picker(options) {
|
|
|
17
17
|
function resetSingletonOptions() {
|
|
18
18
|
singletonOptions === reactivePickerOptions && (singletonOptions = null);
|
|
19
19
|
}
|
|
20
|
-
const { unmountInstance } = mountInstance(
|
|
20
|
+
const { unmountInstance } = mountInstance(MpPicker, reactivePickerOptions, {
|
|
21
21
|
onConfirm: (values, indexes, options2) => {
|
|
22
22
|
resolve({
|
|
23
23
|
state: "confirm",
|
|
@@ -72,10 +72,10 @@ Picker.close = function() {
|
|
|
72
72
|
prevSingletonOptions.open = false;
|
|
73
73
|
});
|
|
74
74
|
};
|
|
75
|
-
Picker.Component = withInstall(
|
|
76
|
-
const InstalledPicker = withInstall(
|
|
75
|
+
Picker.Component = withInstall(MpPicker);
|
|
76
|
+
const InstalledPicker = withInstall(MpPicker, Picker);
|
|
77
77
|
withPropsDefaultsSetter(Picker, props);
|
|
78
|
-
const _PickerComponent =
|
|
78
|
+
const _PickerComponent = MpPicker;
|
|
79
79
|
export {
|
|
80
80
|
_PickerComponent,
|
|
81
81
|
InstalledPicker as default,
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
--mp-progress-font-size: var(--mp-sys-font-size-sm);
|
|
7
7
|
--mp-progress-text-color: var(--mp-sys-color-content-secondary);
|
|
8
8
|
--mp-progress-track-color: var(--mp-sys-color-state-hover);
|
|
9
|
-
--mp-progress-default-color: var(--mp-sys-color-
|
|
10
|
-
--mp-progress-primary-color: var(--mp-sys-color-
|
|
9
|
+
--mp-progress-default-color: var(--mp-sys-color-action-primary);
|
|
10
|
+
--mp-progress-primary-color: var(--mp-sys-color-action-primary);
|
|
11
11
|
--mp-progress-secondary-color: var(--mp-sys-color-content-secondary);
|
|
12
12
|
--mp-progress-tertiary-color: var(--mp-sys-color-content-tertiary);
|
|
13
13
|
--mp-progress-info-color: var(--mp-sys-color-content-info);
|
package/es/radio/style/index.css
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
}
|
|
4
4
|
:root,
|
|
5
5
|
:where([data-mp-theme]) {
|
|
6
|
-
--mp-radio-control-color-checked: var(--mp-sys-color-
|
|
6
|
+
--mp-radio-control-color-checked: var(--mp-sys-color-action-primary);
|
|
7
7
|
--mp-radio-control-color: var(--mp-sys-color-content-secondary);
|
|
8
8
|
--mp-radio-control-color-disabled: var(--mp-sys-color-content-disabled);
|
|
9
9
|
--mp-radio-control-color-error: var(--mp-sys-color-content-danger);
|
package/es/rate/style/index.css
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
--mp-rate-disabled-color: var(--mp-sys-color-content-disabled);
|
|
7
7
|
--mp-rate-error-color: var(--mp-sys-color-content-danger);
|
|
8
8
|
--mp-rate-active-scale: 1.2;
|
|
9
|
-
--mp-rate-focus-color: var(--mp-sys-color-
|
|
9
|
+
--mp-rate-focus-color: var(--mp-sys-color-action-primary);
|
|
10
10
|
--mp-rate-focus-width: 2px;
|
|
11
11
|
--mp-rate-focus-offset: 2px;
|
|
12
12
|
--mp-rate-size: 24px;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
--mp-rate-min-height: 0px;
|
|
15
15
|
--mp-rate-action-padding: 4px;
|
|
16
16
|
--mp-rate-empty-color: var(--mp-color-text);
|
|
17
|
-
--mp-rate-active-color: var(--mp-sys-color-
|
|
17
|
+
--mp-rate-active-color: var(--mp-sys-color-action-primary);
|
|
18
18
|
--mp-rate-transition-duration: 250ms;
|
|
19
19
|
--mp-rate-scale-duration: 250ms;
|
|
20
20
|
--mp-rate-transition-timing-function: ease;
|