niuma-ui 2.0.3 → 2.0.4
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/CHANGELOG.md +38 -0
- package/dist/components/_shared/src/reka.d.ts +1 -1
- package/dist/components/_shared/src/reka.js +2 -2
- package/dist/components/anchor/index.d.ts +1 -1
- package/dist/components/anchor/src/RsAnchor.css +63 -32
- package/dist/components/anchor/src/RsAnchor.d.ts +29 -2
- package/dist/components/anchor/src/RsAnchor.impl.js +199 -81
- package/dist/components/anchor/src/RsAnchor.js +1 -1
- package/dist/components/anchor/src/anchor-utils.d.ts +36 -4
- package/dist/components/anchor/src/anchor-utils.js +81 -19
- package/dist/components/auto-complete/index.d.ts +2 -0
- package/dist/components/auto-complete/src/RsAutoComplete.css +122 -0
- package/dist/components/auto-complete/src/RsAutoComplete.d.ts +47 -7
- package/dist/components/auto-complete/src/RsAutoComplete.impl.js +180 -72
- package/dist/components/auto-complete/src/RsAutoComplete.js +4 -1
- package/dist/components/auto-complete/src/auto-complete-utils.d.ts +7 -0
- package/dist/components/auto-complete/src/auto-complete-utils.js +17 -0
- package/dist/components/avatar/index.d.ts +1 -0
- package/dist/components/avatar/src/RsAvatar.css +36 -19
- package/dist/components/avatar/src/RsAvatar.d.ts +9 -3
- package/dist/components/avatar/src/RsAvatar.impl.js +57 -33
- package/dist/components/avatar/src/RsAvatar.js +2 -1
- package/dist/components/avatar/src/avatar-utils.d.ts +16 -7
- package/dist/components/avatar/src/avatar-utils.js +41 -3
- package/dist/components/breadcrumb/index.d.ts +1 -1
- package/dist/components/breadcrumb/src/RsBreadcrumb.css +50 -17
- package/dist/components/breadcrumb/src/RsBreadcrumb.d.ts +45 -6
- package/dist/components/breadcrumb/src/RsBreadcrumb.impl.js +111 -12
- package/dist/components/breadcrumb/src/RsBreadcrumb.js +2 -1
- package/dist/components/breadcrumb/src/breadcrumb-utils.d.ts +37 -5
- package/dist/components/breadcrumb/src/breadcrumb-utils.js +70 -9
- package/dist/components/calendar-grid/index.d.ts +2 -0
- package/dist/components/calendar-grid/src/RsCalendarGrid.css +105 -45
- package/dist/components/calendar-grid/src/RsCalendarGrid.d.ts +62 -2
- package/dist/components/calendar-grid/src/RsCalendarGrid.impl.js +265 -94
- package/dist/components/calendar-grid/src/RsCalendarGrid.js +1 -1
- package/dist/components/calendar-grid/src/calendar-grid-utils.d.ts +72 -0
- package/dist/components/calendar-grid/src/calendar-grid-utils.js +122 -0
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/card/src/RsCard.css +108 -98
- package/dist/components/card/src/RsCard.d.ts +3 -12
- package/dist/components/card/src/RsCard.impl.js +29 -25
- package/dist/components/card/src/RsCard.js +2 -1
- package/dist/components/card/src/card-utils.d.ts +25 -0
- package/dist/components/card/src/card-utils.js +10 -0
- package/dist/components/cascader/index.d.ts +1 -0
- package/dist/components/cascader/src/RsCascader.css +175 -30
- package/dist/components/cascader/src/RsCascader.d.ts +15 -3
- package/dist/components/cascader/src/RsCascader.impl.js +277 -48
- package/dist/components/cascader/src/RsCascader.js +1 -1
- package/dist/components/cascader/src/cascader-utils.d.ts +2 -0
- package/dist/components/cascader/src/cascader-utils.js +8 -1
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/checkbox/src/RsCheckbox.css +46 -23
- package/dist/components/checkbox/src/RsCheckbox.d.ts +11 -1
- package/dist/components/checkbox/src/RsCheckbox.impl.js +37 -9
- package/dist/components/checkbox/src/RsCheckbox.js +2 -1
- package/dist/components/checkbox/src/checkbox-utils.d.ts +4 -0
- package/dist/components/checkbox/src/checkbox-utils.js +12 -0
- package/dist/components/container/index.d.ts +1 -1
- package/dist/components/container/src/RsContainer.css +11 -11
- package/dist/components/container/src/RsContainer.d.ts +2 -12
- package/dist/components/container/src/RsContainer.impl.js +10 -57
- package/dist/components/container/src/RsContainer.js +1 -1
- package/dist/components/container/src/container-utils.d.ts +23 -0
- package/dist/components/container/src/container-utils.js +51 -0
- package/dist/components/date-picker/index.d.ts +4 -2
- package/dist/components/date-picker/src/RsDatePicker.css +42 -22
- package/dist/components/date-picker/src/RsDatePicker.d.ts +44 -20
- package/dist/components/date-picker/src/RsDatePicker.impl.js +484 -222
- package/dist/components/date-picker/src/RsDatePicker.js +1 -3
- package/dist/components/date-picker/src/RsDateTimePicker.d.ts +33 -6
- package/dist/components/date-picker/src/RsDateTimePicker.impl.js +47 -6
- package/dist/components/date-picker/src/date-picker-utils.d.ts +19 -0
- package/dist/components/date-picker/src/date-picker-utils.js +33 -10
- package/dist/components/dynamic-tags/index.d.ts +1 -1
- package/dist/components/dynamic-tags/src/RsDynamicTags.css +115 -38
- package/dist/components/dynamic-tags/src/RsDynamicTags.d.ts +58 -17
- package/dist/components/dynamic-tags/src/RsDynamicTags.impl.js +269 -106
- package/dist/components/dynamic-tags/src/RsDynamicTags.js +1 -1
- package/dist/components/dynamic-tags/src/dynamic-tags-utils.d.ts +19 -0
- package/dist/components/dynamic-tags/src/dynamic-tags-utils.js +60 -0
- package/dist/components/fieldset/src/RsFieldset.css +71 -41
- package/dist/components/fieldset/src/RsFieldset.d.ts +21 -2
- package/dist/components/fieldset/src/RsFieldset.impl.js +93 -26
- package/dist/components/fieldset/src/RsFieldset.js +1 -1
- package/dist/components/fieldset/src/fieldset-utils.d.ts +4 -0
- package/dist/components/fieldset/src/fieldset-utils.js +9 -1
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/form/src/RsForm.css +15 -12
- package/dist/components/form/src/RsForm.d.ts +20 -22
- package/dist/components/form/src/RsForm.impl.js +33 -20
- package/dist/components/form/src/RsForm.js +1 -1
- package/dist/components/form/src/form-utils.d.ts +7 -0
- package/dist/components/form/src/form-utils.js +28 -1
- package/dist/components/input/index.d.ts +1 -1
- package/dist/components/input/src/RsInput.css +78 -260
- package/dist/components/input/src/RsInput.d.ts +5 -3
- package/dist/components/input/src/RsInput.impl.js +8 -16
- package/dist/components/input/src/RsInput.js +1 -1
- package/dist/components/input/src/input-utils.d.ts +11 -0
- package/dist/components/input/src/input-utils.js +22 -0
- package/dist/components/input-number/index.d.ts +1 -0
- package/dist/components/input-number/src/RsInputNumber.css +31 -31
- package/dist/components/input-number/src/RsInputNumber.d.ts +15 -13
- package/dist/components/input-number/src/RsInputNumber.impl.js +17 -4
- package/dist/components/input-number/src/RsInputNumber.js +1 -1
- package/dist/components/label/src/RsLabel.css +30 -11
- package/dist/components/label/src/RsLabel.d.ts +18 -1
- package/dist/components/label/src/RsLabel.impl.js +63 -10
- package/dist/components/label/src/RsLabel.js +1 -1
- package/dist/components/label/src/label-utils.d.ts +6 -0
- package/dist/components/label/src/label-utils.js +16 -0
- package/dist/components/link/src/RsLink.d.ts +2 -2
- package/dist/components/loading/src/RsLoading.d.ts +1 -1
- package/dist/components/mentions/index.d.ts +2 -1
- package/dist/components/mentions/src/RsMentions.css +119 -3
- package/dist/components/mentions/src/RsMentions.d.ts +56 -4
- package/dist/components/mentions/src/RsMentions.impl.js +298 -79
- package/dist/components/mentions/src/RsMentions.js +1 -3
- package/dist/components/mentions/src/mentions-utils.d.ts +5 -1
- package/dist/components/mentions/src/mentions-utils.js +28 -9
- package/dist/components/popover/src/RsPopover.d.ts +1 -1
- package/dist/components/radio/index.d.ts +1 -1
- package/dist/components/radio/src/RsRadio.css +7 -6
- package/dist/components/radio/src/RsRadio.d.ts +8 -5
- package/dist/components/radio/src/RsRadio.impl.js +34 -24
- package/dist/components/radio/src/RsRadio.js +2 -1
- package/dist/components/radio/src/RsRadioItem.css +61 -44
- package/dist/components/radio/src/RsRadioItem.d.ts +2 -2
- package/dist/components/radio/src/RsRadioItem.impl.js +53 -20
- package/dist/components/radio/src/RsRadioItem.js +2 -1
- package/dist/components/radio/src/radio-utils.d.ts +12 -1
- package/dist/components/radio/src/radio-utils.js +15 -1
- package/dist/components/scrollbar/src/RsScrollbar.css +71 -24
- package/dist/components/scrollbar/src/RsScrollbar.d.ts +9 -5
- package/dist/components/scrollbar/src/RsScrollbar.impl.js +372 -47
- package/dist/components/scrollbar/src/RsScrollbar.js +2 -1
- package/dist/components/scrollbar/src/scrollbar-utils.d.ts +34 -2
- package/dist/components/scrollbar/src/scrollbar-utils.js +64 -1
- package/dist/components/select/index.d.ts +1 -0
- package/dist/components/select/src/RsSelect.css +54 -42
- package/dist/components/select/src/RsSelect.d.ts +19 -2
- package/dist/components/select/src/RsSelect.impl.js +727 -312
- package/dist/components/select/src/RsSelect.js +1 -1
- package/dist/components/select/src/select-utils.d.ts +4 -2
- package/dist/components/select/src/select-utils.js +8 -3
- package/dist/components/select/src/use-rs-select.d.ts +1 -0
- package/dist/components/select/src/use-rs-select.js +23 -17
- package/dist/components/switch/index.d.ts +2 -1
- package/dist/components/switch/src/RsSwitch.css +36 -18
- package/dist/components/switch/src/RsSwitch.d.ts +18 -5
- package/dist/components/switch/src/RsSwitch.impl.js +61 -29
- package/dist/components/switch/src/RsSwitch.js +2 -1
- package/dist/components/switch/src/switch-utils.d.ts +4 -0
- package/dist/components/switch/src/switch-utils.js +9 -0
- package/dist/components/textarea/src/RsTextarea.css +23 -23
- package/dist/components/textarea/src/RsTextarea.d.ts +6 -12
- package/dist/components/textarea/src/RsTextarea.impl.js +37 -46
- package/dist/components/textarea/src/RsTextarea.js +1 -1
- package/dist/components/textarea/src/textarea-utils.d.ts +27 -0
- package/dist/components/textarea/src/textarea-utils.js +61 -0
- package/dist/components/time-picker/index.d.ts +3 -2
- package/dist/components/time-picker/src/RsTimePicker.css +41 -24
- package/dist/components/time-picker/src/RsTimePicker.d.ts +52 -7
- package/dist/components/time-picker/src/RsTimePicker.impl.js +520 -156
- package/dist/components/time-picker/src/RsTimePicker.js +1 -3
- package/dist/components/time-picker/src/RsTimePickerColumns.css +26 -18
- package/dist/components/time-picker/src/RsTimePickerColumns.d.ts +3 -1
- package/dist/components/time-picker/src/RsTimePickerColumns.impl.js +62 -9
- package/dist/components/time-picker/src/RsTimePickerColumns.js +1 -1
- package/dist/components/time-picker/src/time-picker-utils.d.ts +38 -0
- package/dist/components/time-picker/src/time-picker-utils.js +97 -5
- package/dist/components/toaster/src/RsToaster.d.ts +1 -1
- package/dist/components/tooltip/src/RsTooltip.d.ts +1 -1
- package/dist/components/tree/src/RsTree.d.ts +3 -3
- package/dist/components/tree-select/index.d.ts +2 -0
- package/dist/components/tree-select/src/RsTreeSelect.css +100 -25
- package/dist/components/tree-select/src/RsTreeSelect.d.ts +91 -7
- package/dist/components/tree-select/src/RsTreeSelect.impl.js +464 -79
- package/dist/components/tree-select/src/RsTreeSelect.js +1 -1
- package/dist/components/tree-select/src/tree-select-utils.d.ts +20 -0
- package/dist/components/tree-select/src/tree-select-utils.js +60 -0
- package/dist/components/upload/index.d.ts +2 -1
- package/dist/components/upload/src/RsUpload.css +223 -75
- package/dist/components/upload/src/RsUpload.d.ts +77 -1
- package/dist/components/upload/src/RsUpload.impl.js +404 -90
- package/dist/components/upload/src/RsUpload.js +1 -1
- package/dist/components/upload/src/upload-utils.d.ts +21 -2
- package/dist/components/upload/src/upload-utils.js +139 -9
- package/dist/index.d.ts +21 -11
- package/dist/index.js +6 -0
- package/dist/locale/messages.js +46 -2
- package/dist/styles.css +518 -154
- package/dist/theme/brand.example.css +1 -1
- package/package.json +1 -1
- package/dist/components/breadcrumb/src/RsBreadcrumbItems.d.ts +0 -8
- package/dist/components/breadcrumb/src/RsBreadcrumbItems.impl.js +0 -40
- package/dist/components/breadcrumb/src/RsBreadcrumbItems.js +0 -5
- package/dist/components/date-picker/src/RsDatePicker-1.css +0 -157
- package/dist/components/mentions/src/RsMentions-1.css +0 -29
- package/dist/components/time-picker/src/RsTimePicker-1.css +0 -98
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import './RsTimePicker.css'
|
|
2
|
-
import './RsTimePicker-1.css'
|
|
3
2
|
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
3
|
import RsTimePicker_vue_vue_type_script_setup_true_lang_default from "./RsTimePicker.impl.js";
|
|
5
4
|
|
|
6
|
-
|
|
7
5
|
//#region src/components/time-picker/src/RsTimePicker.vue
|
|
8
|
-
var RsTimePicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(RsTimePicker_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
6
|
+
var RsTimePicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(RsTimePicker_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-74cf1aa1"]]);
|
|
9
7
|
//#endregion
|
|
10
8
|
export { RsTimePicker_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
.rs-time-columns[data-v-
|
|
2
|
+
.rs-time-columns[data-v-2cb69b18] {
|
|
3
3
|
display: grid;
|
|
4
4
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
5
5
|
gap: var(--rs-space-sm);
|
|
@@ -8,72 +8,80 @@
|
|
|
8
8
|
--rs-time-columns-item-font-size: var(--rs-font-size-sm);
|
|
9
9
|
--rs-time-columns-label-font-size: var(--rs-font-size-xs);
|
|
10
10
|
}
|
|
11
|
-
.rs-time-columns--seconds[data-v-
|
|
11
|
+
.rs-time-columns--seconds[data-v-2cb69b18] {
|
|
12
12
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
13
13
|
}
|
|
14
|
-
.rs-time-columns--
|
|
14
|
+
.rs-time-columns--hour12[data-v-2cb69b18] {
|
|
15
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
16
|
+
}
|
|
17
|
+
.rs-time-columns--hour12.rs-time-columns--seconds[data-v-2cb69b18] {
|
|
18
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
19
|
+
}
|
|
20
|
+
.rs-time-columns--ssm[data-v-2cb69b18] {
|
|
15
21
|
--rs-time-columns-list-max-height: 7.5rem;
|
|
16
22
|
--rs-time-columns-item-padding-y: 0.2rem;
|
|
17
23
|
--rs-time-columns-item-font-size: var(--rs-font-size-xs);
|
|
18
24
|
--rs-time-columns-label-font-size: var(--rs-font-size-xs);
|
|
19
25
|
gap: var(--rs-space-xs);
|
|
20
26
|
}
|
|
21
|
-
.rs-time-columns--sm[data-v-
|
|
27
|
+
.rs-time-columns--sm[data-v-2cb69b18] {
|
|
22
28
|
--rs-time-columns-list-max-height: 8.5rem;
|
|
23
29
|
--rs-time-columns-item-padding-y: 0.28rem;
|
|
24
30
|
--rs-time-columns-item-font-size: var(--rs-font-size-xs);
|
|
25
31
|
--rs-time-columns-label-font-size: var(--rs-font-size-xs);
|
|
26
32
|
}
|
|
27
|
-
.rs-time-columns--lg[data-v-
|
|
33
|
+
.rs-time-columns--lg[data-v-2cb69b18] {
|
|
28
34
|
--rs-time-columns-list-max-height: 12rem;
|
|
29
35
|
--rs-time-columns-item-padding-y: 0.5rem;
|
|
30
36
|
--rs-time-columns-item-font-size: var(--rs-font-size-base);
|
|
31
37
|
--rs-time-columns-label-font-size: var(--rs-font-size-xs);
|
|
32
38
|
}
|
|
33
|
-
.rs-time-columns__column[data-v-
|
|
39
|
+
.rs-time-columns__column[data-v-2cb69b18] {
|
|
34
40
|
display: flex;
|
|
35
41
|
min-width: 0;
|
|
36
42
|
flex-direction: column;
|
|
37
43
|
gap: 0.25rem;
|
|
38
44
|
}
|
|
39
|
-
.rs-time-columns__label[data-v-
|
|
45
|
+
.rs-time-columns__label[data-v-2cb69b18] {
|
|
40
46
|
text-align: center;
|
|
41
47
|
font-size: var(--rs-time-columns-label-font-size);
|
|
42
48
|
font-weight: var(--rs-font-weight-medium);
|
|
43
49
|
letter-spacing: 0.02em;
|
|
44
50
|
color: var(--rs-muted);
|
|
45
51
|
}
|
|
46
|
-
.rs-time-columns__list-shell[data-v-
|
|
52
|
+
.rs-time-columns__list-shell[data-v-2cb69b18] {
|
|
47
53
|
overflow: hidden;
|
|
54
|
+
overscroll-behavior: contain;
|
|
48
55
|
border: 1px solid var(--rs-border-subtle);
|
|
49
56
|
border-radius: var(--rs-radius-sm);
|
|
50
57
|
background: color-mix(in srgb, var(--rs-surface) 72%, transparent);
|
|
51
58
|
}
|
|
52
|
-
.rs-time-columns__list[data-v-
|
|
59
|
+
.rs-time-columns__list[data-v-2cb69b18] {
|
|
53
60
|
position: relative;
|
|
54
61
|
max-height: var(--rs-time-columns-list-max-height);
|
|
55
62
|
overflow-y: auto;
|
|
63
|
+
overscroll-behavior: contain;
|
|
56
64
|
padding: 0.25rem;
|
|
57
65
|
scrollbar-width: thin;
|
|
58
66
|
scrollbar-color: color-mix(in srgb, var(--rs-muted) 42%, transparent) transparent;
|
|
59
67
|
}
|
|
60
68
|
/* 去掉 Windows 原生滚动条上下三角,避免盖住圆角描边 */
|
|
61
|
-
.rs-time-columns__list[data-v-
|
|
69
|
+
.rs-time-columns__list[data-v-2cb69b18]::-webkit-scrollbar {
|
|
62
70
|
width: 6px;
|
|
63
71
|
}
|
|
64
|
-
.rs-time-columns__list[data-v-
|
|
72
|
+
.rs-time-columns__list[data-v-2cb69b18]::-webkit-scrollbar-button {
|
|
65
73
|
display: none;
|
|
66
74
|
width: 0;
|
|
67
75
|
height: 0;
|
|
68
76
|
}
|
|
69
|
-
.rs-time-columns__list[data-v-
|
|
77
|
+
.rs-time-columns__list[data-v-2cb69b18]::-webkit-scrollbar-thumb {
|
|
70
78
|
border-radius: 999px;
|
|
71
79
|
background: color-mix(in srgb, var(--rs-muted) 42%, transparent);
|
|
72
80
|
}
|
|
73
|
-
.rs-time-columns__list[data-v-
|
|
81
|
+
.rs-time-columns__list[data-v-2cb69b18]::-webkit-scrollbar-track {
|
|
74
82
|
background: transparent;
|
|
75
83
|
}
|
|
76
|
-
.rs-time-columns__item[data-v-
|
|
84
|
+
.rs-time-columns__item[data-v-2cb69b18] {
|
|
77
85
|
display: flex;
|
|
78
86
|
width: 100%;
|
|
79
87
|
align-items: center;
|
|
@@ -88,17 +96,17 @@
|
|
|
88
96
|
cursor: pointer;
|
|
89
97
|
transition: background var(--rs-transition-fast), color var(--rs-transition-fast);
|
|
90
98
|
}
|
|
91
|
-
.rs-time-columns__item[data-v-
|
|
99
|
+
.rs-time-columns__item[data-v-2cb69b18]:hover:not(:disabled) {
|
|
92
100
|
background: var(--rs-surface-hover);
|
|
93
101
|
}
|
|
94
|
-
.rs-time-columns__item--active[data-v-
|
|
102
|
+
.rs-time-columns__item--active[data-v-2cb69b18] {
|
|
95
103
|
background: var(--rs-primary);
|
|
96
104
|
color: var(--rs-primary-foreground);
|
|
97
105
|
}
|
|
98
|
-
.rs-time-columns__item--active[data-v-
|
|
106
|
+
.rs-time-columns__item--active[data-v-2cb69b18]:hover:not(:disabled) {
|
|
99
107
|
opacity: 0.92;
|
|
100
108
|
}
|
|
101
|
-
.rs-time-columns__item[data-v-
|
|
109
|
+
.rs-time-columns__item[data-v-2cb69b18]:disabled {
|
|
102
110
|
opacity: 0.38;
|
|
103
111
|
cursor: not-allowed;
|
|
104
112
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { RsComponentSize } from '../../../theme/types';
|
|
2
|
-
import { type RsTimeUnit } from './time-picker-utils';
|
|
2
|
+
import { type RsTimePickerHourCycle, type RsTimeUnit } from './time-picker-utils';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
minuteStep?: number;
|
|
5
5
|
second?: boolean;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
size?: RsComponentSize;
|
|
8
|
+
hourCycle?: RsTimePickerHourCycle;
|
|
8
9
|
isUnitDisabled?: (unit: RsTimeUnit, value: number) => boolean;
|
|
9
10
|
};
|
|
10
11
|
declare function scrollToSelection(): void;
|
|
@@ -24,6 +25,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
24
25
|
}>, {
|
|
25
26
|
disabled: boolean;
|
|
26
27
|
second: boolean;
|
|
28
|
+
hourCycle: RsTimePickerHourCycle;
|
|
27
29
|
minuteStep: number;
|
|
28
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
31
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useRsI18n } from "../../../composables/useRsI18n.js";
|
|
2
2
|
import { useResolvedRsComponentSize } from "../../_shared/src/resolve-size.js";
|
|
3
|
-
import { TIME_HOUR_OPTIONS, TIME_SECOND_OPTIONS, formatTimeFromParts, getTimeMinuteOptions, parseTimeValue, scheduleAfterPaint, scrollTimeColumnToValue } from "./time-picker-utils.js";
|
|
3
|
+
import { TIME_HOUR12_OPTIONS, TIME_HOUR_OPTIONS, TIME_SECOND_OPTIONS, containColumnWheel, formatTimeFromParts, getTimeMinuteOptions, parseTimeValue, scheduleAfterPaint, scrollTimeColumnToValue, toHour12, toHour24 } from "./time-picker-utils.js";
|
|
4
4
|
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, mergeModels, nextTick, normalizeClass, onMounted, onUnmounted, openBlock, renderList, toDisplayString, unref, useModel, useTemplateRef, watch } from "vue";
|
|
5
5
|
//#region src/components/time-picker/src/RsTimePickerColumns.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var _hoisted_1 = { class: "rs-time-columns__column" };
|
|
@@ -30,6 +30,15 @@ var _hoisted_12 = [
|
|
|
30
30
|
"disabled",
|
|
31
31
|
"onClick"
|
|
32
32
|
];
|
|
33
|
+
var _hoisted_13 = {
|
|
34
|
+
key: 1,
|
|
35
|
+
class: "rs-time-columns__column"
|
|
36
|
+
};
|
|
37
|
+
var _hoisted_14 = { class: "rs-time-columns__label" };
|
|
38
|
+
var _hoisted_15 = { class: "rs-time-columns__list-shell" };
|
|
39
|
+
var _hoisted_16 = { class: "rs-time-columns__list" };
|
|
40
|
+
var _hoisted_17 = ["disabled"];
|
|
41
|
+
var _hoisted_18 = ["disabled"];
|
|
33
42
|
var RsTimePickerColumns_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
34
43
|
name: "RsTimePickerColumns",
|
|
35
44
|
__name: "RsTimePickerColumns",
|
|
@@ -44,6 +53,7 @@ var RsTimePickerColumns_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
|
|
|
44
53
|
default: false
|
|
45
54
|
},
|
|
46
55
|
size: {},
|
|
56
|
+
hourCycle: { default: 24 },
|
|
47
57
|
isUnitDisabled: {}
|
|
48
58
|
}, {
|
|
49
59
|
"modelValue": { default: "00:00" },
|
|
@@ -55,11 +65,23 @@ var RsTimePickerColumns_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
|
|
|
55
65
|
const props = __props;
|
|
56
66
|
const { t } = useRsI18n();
|
|
57
67
|
const resolvedSize = useResolvedRsComponentSize(() => props.size);
|
|
68
|
+
const rootRef = useTemplateRef("rootRef");
|
|
58
69
|
const hourListRef = useTemplateRef("hourListRef");
|
|
59
70
|
const minuteListRef = useTemplateRef("minuteListRef");
|
|
60
71
|
const secondListRef = useTemplateRef("secondListRef");
|
|
72
|
+
const wheelOpts = {
|
|
73
|
+
capture: true,
|
|
74
|
+
passive: false
|
|
75
|
+
};
|
|
76
|
+
function bindColumnWheel() {
|
|
77
|
+
rootRef.value?.addEventListener("wheel", containColumnWheel, wheelOpts);
|
|
78
|
+
}
|
|
79
|
+
function unbindColumnWheel() {
|
|
80
|
+
rootRef.value?.removeEventListener("wheel", containColumnWheel, wheelOpts);
|
|
81
|
+
}
|
|
61
82
|
let cancelScheduledScroll;
|
|
62
|
-
const
|
|
83
|
+
const useHour12 = computed(() => props.hourCycle === 12);
|
|
84
|
+
const hourOptions = computed(() => useHour12.value ? TIME_HOUR12_OPTIONS : TIME_HOUR_OPTIONS);
|
|
63
85
|
const secondOptions = TIME_SECOND_OPTIONS;
|
|
64
86
|
const minuteOptions = computed(() => getTimeMinuteOptions(props.minuteStep));
|
|
65
87
|
const parts = computed(() => {
|
|
@@ -75,6 +97,7 @@ var RsTimePickerColumns_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
|
|
|
75
97
|
second: 0
|
|
76
98
|
};
|
|
77
99
|
});
|
|
100
|
+
const hour12 = computed(() => toHour12(parts.value.hour));
|
|
78
101
|
function isDisabled(unit, value) {
|
|
79
102
|
return props.disabled || (props.isUnitDisabled?.(unit, value) ?? false);
|
|
80
103
|
}
|
|
@@ -82,7 +105,7 @@ var RsTimePickerColumns_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
|
|
|
82
105
|
scrollTimeColumnToValue(container, value);
|
|
83
106
|
}
|
|
84
107
|
function scrollToSelection() {
|
|
85
|
-
scrollColumn(hourListRef.value, parts.value.hour);
|
|
108
|
+
scrollColumn(hourListRef.value, useHour12.value ? hour12.value.hour : parts.value.hour);
|
|
86
109
|
scrollColumn(minuteListRef.value, parts.value.minute);
|
|
87
110
|
if (props.second) scrollColumn(secondListRef.value, parts.value.second);
|
|
88
111
|
}
|
|
@@ -98,6 +121,12 @@ var RsTimePickerColumns_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
|
|
|
98
121
|
};
|
|
99
122
|
model.value = formatTimeFromParts(next.hour, next.minute, next.second, props.second);
|
|
100
123
|
}
|
|
124
|
+
function selectHour12(hour12Value) {
|
|
125
|
+
selectUnit("hour", toHour24(hour12Value, hour12.value.period));
|
|
126
|
+
}
|
|
127
|
+
function selectPeriod(period) {
|
|
128
|
+
selectUnit("hour", toHour24(hour12.value.hour, period));
|
|
129
|
+
}
|
|
101
130
|
watch(() => [
|
|
102
131
|
parts.value.hour,
|
|
103
132
|
parts.value.minute,
|
|
@@ -107,9 +136,11 @@ var RsTimePickerColumns_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
|
|
|
107
136
|
nextTick(scrollToSelection);
|
|
108
137
|
}, { flush: "post" });
|
|
109
138
|
onMounted(() => {
|
|
139
|
+
bindColumnWheel();
|
|
110
140
|
scrollToSelectionAfterPaint();
|
|
111
141
|
});
|
|
112
142
|
onUnmounted(() => {
|
|
143
|
+
unbindColumnWheel();
|
|
113
144
|
cancelScheduledScroll?.();
|
|
114
145
|
});
|
|
115
146
|
__expose({
|
|
@@ -118,20 +149,27 @@ var RsTimePickerColumns_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
|
|
|
118
149
|
resolvedSize
|
|
119
150
|
});
|
|
120
151
|
return (_ctx, _cache) => {
|
|
121
|
-
return openBlock(), createElementBlock("div", {
|
|
152
|
+
return openBlock(), createElementBlock("div", {
|
|
153
|
+
ref_key: "rootRef",
|
|
154
|
+
ref: rootRef,
|
|
155
|
+
class: normalizeClass(["rs-time-columns", [`rs-time-columns--${unref(resolvedSize)}`, {
|
|
156
|
+
"rs-time-columns--seconds": __props.second,
|
|
157
|
+
"rs-time-columns--hour12": useHour12.value
|
|
158
|
+
}]])
|
|
159
|
+
}, [
|
|
122
160
|
createElementVNode("div", _hoisted_1, [createElementVNode("span", _hoisted_2, toDisplayString(unref(t)("timePicker.hour")), 1), createElementVNode("div", _hoisted_3, [createElementVNode("div", {
|
|
123
161
|
ref_key: "hourListRef",
|
|
124
162
|
ref: hourListRef,
|
|
125
163
|
class: "rs-time-columns__list"
|
|
126
|
-
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
164
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(hourOptions.value, (option) => {
|
|
127
165
|
return openBlock(), createElementBlock("button", {
|
|
128
166
|
key: option.value,
|
|
129
167
|
type: "button",
|
|
130
|
-
class: normalizeClass(["rs-time-columns__item", { "rs-time-columns__item--active": parts.value.hour === option.value }]),
|
|
168
|
+
class: normalizeClass(["rs-time-columns__item", { "rs-time-columns__item--active": useHour12.value ? hour12.value.hour === option.value : parts.value.hour === option.value }]),
|
|
131
169
|
"data-unit": "hour",
|
|
132
170
|
"data-value": option.value,
|
|
133
|
-
disabled: isDisabled("hour", option.value),
|
|
134
|
-
onClick: ($event) => selectUnit("hour", option.value)
|
|
171
|
+
disabled: isDisabled("hour", useHour12.value ? unref(toHour24)(option.value, hour12.value.period) : option.value),
|
|
172
|
+
onClick: ($event) => useHour12.value ? selectHour12(option.value) : selectUnit("hour", option.value)
|
|
135
173
|
}, toDisplayString(option.label), 11, _hoisted_4);
|
|
136
174
|
}), 128))], 512)])]),
|
|
137
175
|
createElementVNode("div", _hoisted_5, [createElementVNode("span", _hoisted_6, toDisplayString(unref(t)("timePicker.minute")), 1), createElementVNode("div", _hoisted_7, [createElementVNode("div", {
|
|
@@ -163,7 +201,22 @@ var RsTimePickerColumns_vue_vue_type_script_setup_true_lang_default = /*@__PURE_
|
|
|
163
201
|
disabled: isDisabled("second", option.value),
|
|
164
202
|
onClick: ($event) => selectUnit("second", option.value)
|
|
165
203
|
}, toDisplayString(option.label), 11, _hoisted_12);
|
|
166
|
-
}), 128))], 512)])])) : createCommentVNode("", true)
|
|
204
|
+
}), 128))], 512)])])) : createCommentVNode("", true),
|
|
205
|
+
useHour12.value ? (openBlock(), createElementBlock("div", _hoisted_13, [createElementVNode("span", _hoisted_14, toDisplayString(unref(t)("timePicker.period")), 1), createElementVNode("div", _hoisted_15, [createElementVNode("div", _hoisted_16, [createElementVNode("button", {
|
|
206
|
+
type: "button",
|
|
207
|
+
class: normalizeClass(["rs-time-columns__item", { "rs-time-columns__item--active": hour12.value.period === "am" }]),
|
|
208
|
+
"data-unit": "period",
|
|
209
|
+
"data-value": "am",
|
|
210
|
+
disabled: isDisabled("hour", unref(toHour24)(hour12.value.hour, "am")),
|
|
211
|
+
onClick: _cache[0] || (_cache[0] = ($event) => selectPeriod("am"))
|
|
212
|
+
}, toDisplayString(unref(t)("timePicker.am")), 11, _hoisted_17), createElementVNode("button", {
|
|
213
|
+
type: "button",
|
|
214
|
+
class: normalizeClass(["rs-time-columns__item", { "rs-time-columns__item--active": hour12.value.period === "pm" }]),
|
|
215
|
+
"data-unit": "period",
|
|
216
|
+
"data-value": "pm",
|
|
217
|
+
disabled: isDisabled("hour", unref(toHour24)(hour12.value.hour, "pm")),
|
|
218
|
+
onClick: _cache[1] || (_cache[1] = ($event) => selectPeriod("pm"))
|
|
219
|
+
}, toDisplayString(unref(t)("timePicker.pm")), 11, _hoisted_18)])])])) : createCommentVNode("", true)
|
|
167
220
|
], 2);
|
|
168
221
|
};
|
|
169
222
|
}
|
|
@@ -3,6 +3,6 @@ import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_exp
|
|
|
3
3
|
import RsTimePickerColumns_vue_vue_type_script_setup_true_lang_default from "./RsTimePickerColumns.impl.js";
|
|
4
4
|
|
|
5
5
|
//#region src/components/time-picker/src/RsTimePickerColumns.vue
|
|
6
|
-
var RsTimePickerColumns_default = /*#__PURE__*/ _plugin_vue_export_helper_default(RsTimePickerColumns_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
6
|
+
var RsTimePickerColumns_default = /*#__PURE__*/ _plugin_vue_export_helper_default(RsTimePickerColumns_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-2cb69b18"]]);
|
|
7
7
|
//#endregion
|
|
8
8
|
export { RsTimePickerColumns_default as default };
|
|
@@ -29,6 +29,15 @@ export declare function getTimeMinuteOptions(step?: number): readonly RsTimeUnit
|
|
|
29
29
|
* 避免 scrollIntoView 带动外层页面 / Popover 滚动。
|
|
30
30
|
*/
|
|
31
31
|
export declare function scrollTimeColumnToValue(container: HTMLElement | null | undefined, value: number): void;
|
|
32
|
+
/** 列内部滚动:给浮层的 capture scroll 用,避免列一滚就重算面板位置。 */
|
|
33
|
+
export declare function isTimeColumnScrollTarget(target: EventTarget | null): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* 把滚轮留在时间列里。到顶/到底或列本身装不下时 preventDefault,避免带动页面。
|
|
36
|
+
* 必须非 passive(`{ passive: false }`)。
|
|
37
|
+
*/
|
|
38
|
+
export declare function containColumnWheel(event: WheelEvent): void;
|
|
39
|
+
/** 面板非列区域:滚轮不要带动外层页面。列内交给 containColumnWheel。 */
|
|
40
|
+
export declare function containOverlayWheel(event: WheelEvent): void;
|
|
32
41
|
export declare function parseTimeValue(value?: string, withSeconds?: boolean): RsParsedTime | null;
|
|
33
42
|
export declare function formatTimeParts(hour: number, minute: number, second?: number): string;
|
|
34
43
|
export declare function formatTimeFromParts(hour: number, minute: number, second: number, withSeconds?: boolean): string;
|
|
@@ -48,4 +57,33 @@ export declare function pickEarlierTime(a?: string, b?: string, withSeconds?: bo
|
|
|
48
57
|
export declare function pickLaterTime(a?: string, b?: string, withSeconds?: boolean): string | undefined;
|
|
49
58
|
export declare function formatTimeRangeDisplay(range: RsTimeRangeValue, options?: {
|
|
50
59
|
separator?: string;
|
|
60
|
+
hourCycle?: RsTimePickerHourCycle;
|
|
61
|
+
locale?: string;
|
|
62
|
+
withSeconds?: boolean;
|
|
63
|
+
}): string;
|
|
64
|
+
/** 12 或 24 小时制。绑定值始终是 24 小时墙钟 HH:mm[:ss]。 */
|
|
65
|
+
export type RsTimePickerHourCycle = 12 | 24;
|
|
66
|
+
/** 按列禁用某一档。hour 为 0–23。 */
|
|
67
|
+
export type RsTimePickerDisabledTime = (unit: RsTimeUnit, value: number) => boolean;
|
|
68
|
+
export type RsTimePickerGetPopupContainer = (trigger?: HTMLElement) => HTMLElement | string | undefined;
|
|
69
|
+
export interface RsTimePickerShortcut {
|
|
70
|
+
label: string;
|
|
71
|
+
value: () => string | RsTimeRangeValue;
|
|
72
|
+
}
|
|
73
|
+
export type RsTimePickerModelValue = string | RsTimeRangeValue;
|
|
74
|
+
/** 12 小时列:12, 1, 2, … 11 */
|
|
75
|
+
export declare const TIME_HOUR12_OPTIONS: readonly RsTimeUnitOption[];
|
|
76
|
+
export declare function toHour12(hour24: number): {
|
|
77
|
+
hour: number;
|
|
78
|
+
period: 'am' | 'pm';
|
|
79
|
+
};
|
|
80
|
+
export declare function toHour24(hour12: number, period: 'am' | 'pm'): number;
|
|
81
|
+
/**
|
|
82
|
+
* 触发器展示。hourCycle=12 用 Intl(上午/下午跟 locale);未传则墙钟 HH:mm[:ss]。
|
|
83
|
+
*/
|
|
84
|
+
export declare function formatTimeDisplay(value: string | undefined, options?: {
|
|
85
|
+
hourCycle?: RsTimePickerHourCycle;
|
|
86
|
+
withSeconds?: boolean;
|
|
87
|
+
locale?: string;
|
|
51
88
|
}): string;
|
|
89
|
+
export declare function resolveTimePickerPortalTarget(getPopupContainer: RsTimePickerGetPopupContainer | undefined, trigger?: HTMLElement | null): string | HTMLElement;
|
|
@@ -3,14 +3,18 @@ var EMPTY_TIME_RANGE = {};
|
|
|
3
3
|
var TIME_PATTERN = /^([01]\d|2[0-3]):([0-5]\d)$/;
|
|
4
4
|
var TIME_WITH_SECONDS_PATTERN = /^([01]\d|2[0-3]):([0-5]\d):([0-5]\d)$/;
|
|
5
5
|
function scheduleAfterPaint(callback) {
|
|
6
|
+
if (typeof window === "undefined") return () => {};
|
|
6
7
|
let cancelled = false;
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
let inner = 0;
|
|
9
|
+
const outer = window.requestAnimationFrame(() => {
|
|
10
|
+
inner = window.requestAnimationFrame(() => {
|
|
9
11
|
if (!cancelled) callback();
|
|
10
12
|
});
|
|
11
13
|
});
|
|
12
14
|
return () => {
|
|
13
15
|
cancelled = true;
|
|
16
|
+
window.cancelAnimationFrame(outer);
|
|
17
|
+
if (inner) window.cancelAnimationFrame(inner);
|
|
14
18
|
};
|
|
15
19
|
}
|
|
16
20
|
function formatTimeUnitLabel(value) {
|
|
@@ -49,6 +53,38 @@ function scrollTimeColumnToValue(container, value) {
|
|
|
49
53
|
const top = item.offsetTop - (container.clientHeight - item.offsetHeight) / 2;
|
|
50
54
|
container.scrollTop = Math.max(0, top);
|
|
51
55
|
}
|
|
56
|
+
/** 列内部滚动:给浮层的 capture scroll 用,避免列一滚就重算面板位置。 */
|
|
57
|
+
function isTimeColumnScrollTarget(target) {
|
|
58
|
+
return target instanceof Element && Boolean(target.closest(".rs-time-columns__list"));
|
|
59
|
+
}
|
|
60
|
+
function resolveTimeColumnList(event) {
|
|
61
|
+
if (event.currentTarget instanceof HTMLElement && event.currentTarget.classList.contains("rs-time-columns__list")) return event.currentTarget;
|
|
62
|
+
if (event.target instanceof Element) return event.target.closest(".rs-time-columns__list");
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* 把滚轮留在时间列里。到顶/到底或列本身装不下时 preventDefault,避免带动页面。
|
|
67
|
+
* 必须非 passive(`{ passive: false }`)。
|
|
68
|
+
*/
|
|
69
|
+
function containColumnWheel(event) {
|
|
70
|
+
event.stopPropagation();
|
|
71
|
+
const list = resolveTimeColumnList(event);
|
|
72
|
+
if (!list) {
|
|
73
|
+
event.preventDefault();
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const delta = event.deltaY;
|
|
77
|
+
if (delta === 0) return;
|
|
78
|
+
const max = list.scrollHeight - list.clientHeight;
|
|
79
|
+
const top = list.scrollTop;
|
|
80
|
+
if (max <= 0 || delta < 0 && top <= 0 || delta > 0 && top >= max - 1) event.preventDefault();
|
|
81
|
+
}
|
|
82
|
+
/** 面板非列区域:滚轮不要带动外层页面。列内交给 containColumnWheel。 */
|
|
83
|
+
function containOverlayWheel(event) {
|
|
84
|
+
if (isTimeColumnScrollTarget(event.target)) return;
|
|
85
|
+
event.stopPropagation();
|
|
86
|
+
event.preventDefault();
|
|
87
|
+
}
|
|
52
88
|
function parseTimeValue(value, withSeconds = false) {
|
|
53
89
|
if (!value?.trim()) return null;
|
|
54
90
|
const trimmed = value.trim();
|
|
@@ -149,10 +185,66 @@ function pickLaterTime(a, b, withSeconds = false) {
|
|
|
149
185
|
}
|
|
150
186
|
function formatTimeRangeDisplay(range, options) {
|
|
151
187
|
const separator = options?.separator ?? " ~ ";
|
|
152
|
-
const start = range.start ?
|
|
153
|
-
|
|
188
|
+
const start = range.start ? formatTimeDisplay(range.start, {
|
|
189
|
+
hourCycle: options?.hourCycle,
|
|
190
|
+
locale: options?.locale,
|
|
191
|
+
withSeconds: options?.withSeconds
|
|
192
|
+
}) : "";
|
|
193
|
+
const end = range.end ? formatTimeDisplay(range.end, {
|
|
194
|
+
hourCycle: options?.hourCycle,
|
|
195
|
+
locale: options?.locale,
|
|
196
|
+
withSeconds: options?.withSeconds
|
|
197
|
+
}) : "";
|
|
154
198
|
if (start && end) return `${start}${separator}${end}`;
|
|
155
199
|
return start || end;
|
|
156
200
|
}
|
|
201
|
+
/** 12 小时列:12, 1, 2, … 11 */
|
|
202
|
+
var TIME_HOUR12_OPTIONS = [{
|
|
203
|
+
value: 12,
|
|
204
|
+
label: "12"
|
|
205
|
+
}, ...Array.from({ length: 11 }, (_, index) => {
|
|
206
|
+
const value = index + 1;
|
|
207
|
+
return {
|
|
208
|
+
value,
|
|
209
|
+
label: String(value)
|
|
210
|
+
};
|
|
211
|
+
})];
|
|
212
|
+
function toHour12(hour24) {
|
|
213
|
+
const period = hour24 >= 12 ? "pm" : "am";
|
|
214
|
+
return {
|
|
215
|
+
hour: hour24 % 12 === 0 ? 12 : hour24 % 12,
|
|
216
|
+
period
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
function toHour24(hour12, period) {
|
|
220
|
+
const hour = hour12 % 12;
|
|
221
|
+
return period === "pm" ? hour + 12 : hour;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* 触发器展示。hourCycle=12 用 Intl(上午/下午跟 locale);未传则墙钟 HH:mm[:ss]。
|
|
225
|
+
*/
|
|
226
|
+
function formatTimeDisplay(value, options) {
|
|
227
|
+
if (!value) return "";
|
|
228
|
+
const parsed = parseTimeValue(value, options?.withSeconds);
|
|
229
|
+
if (!parsed) return value;
|
|
230
|
+
if (options?.hourCycle !== 12) return formatTimeFromParts(parsed.hour, parsed.minute, parsed.second, options?.withSeconds);
|
|
231
|
+
const date = new Date(2e3, 0, 1, parsed.hour, parsed.minute, parsed.second);
|
|
232
|
+
try {
|
|
233
|
+
return new Intl.DateTimeFormat(options.locale || void 0, {
|
|
234
|
+
hour: "numeric",
|
|
235
|
+
minute: "2-digit",
|
|
236
|
+
second: options.withSeconds ? "2-digit" : void 0,
|
|
237
|
+
hour12: true
|
|
238
|
+
}).format(date);
|
|
239
|
+
} catch {
|
|
240
|
+
const { hour, period } = toHour12(parsed.hour);
|
|
241
|
+
return `${formatTimeFromParts(hour % 12 === 0 && hour === 12 ? 12 : hour, parsed.minute, parsed.second, options.withSeconds)} ${period.toUpperCase()}`;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
function resolveTimePickerPortalTarget(getPopupContainer, trigger) {
|
|
245
|
+
if (typeof document === "undefined") return "body";
|
|
246
|
+
if (!getPopupContainer) return "body";
|
|
247
|
+
return getPopupContainer(trigger ?? void 0) ?? "body";
|
|
248
|
+
}
|
|
157
249
|
//#endregion
|
|
158
|
-
export { EMPTY_TIME_RANGE, TIME_HOUR_OPTIONS, TIME_SECOND_OPTIONS, formatTimeFromParts, formatTimeParts, formatTimeRangeDisplay, formatTimeUnitLabel, formatTimeValue, getCurrentTime, getTimeMinuteOptions, isTimeRangeEmpty, isTimeRangeOrdered, isTimeRangeOrderedValues, isTimeWithinBounds, parseTimeToSeconds, parseTimeValue, pickEarlierTime, pickLaterTime, scheduleAfterPaint, scrollTimeColumnToValue, timeToSeconds };
|
|
250
|
+
export { EMPTY_TIME_RANGE, TIME_HOUR12_OPTIONS, TIME_HOUR_OPTIONS, TIME_SECOND_OPTIONS, containColumnWheel, containOverlayWheel, formatTimeDisplay, formatTimeFromParts, formatTimeParts, formatTimeRangeDisplay, formatTimeUnitLabel, formatTimeValue, getCurrentTime, getTimeMinuteOptions, isTimeColumnScrollTarget, isTimeRangeEmpty, isTimeRangeOrdered, isTimeRangeOrderedValues, isTimeWithinBounds, parseTimeToSeconds, parseTimeValue, pickEarlierTime, pickLaterTime, resolveTimePickerPortalTarget, scheduleAfterPaint, scrollTimeColumnToValue, timeToSeconds, toHour12, toHour24 };
|
|
@@ -8,8 +8,8 @@ type __VLS_Props = {
|
|
|
8
8
|
};
|
|
9
9
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
10
10
|
gap: number;
|
|
11
|
-
position: RsToastPosition;
|
|
12
11
|
expand: boolean;
|
|
12
|
+
position: RsToastPosition;
|
|
13
13
|
closeButton: boolean;
|
|
14
14
|
richColors: boolean;
|
|
15
15
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -30,8 +30,8 @@ type __VLS_Slots = {} & {
|
|
|
30
30
|
content?: (props: typeof __VLS_41) => any;
|
|
31
31
|
};
|
|
32
32
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
33
|
-
disabled: boolean;
|
|
34
33
|
icon: boolean;
|
|
34
|
+
disabled: boolean;
|
|
35
35
|
iconName: string;
|
|
36
36
|
side: "top" | "right" | "bottom" | "left";
|
|
37
37
|
sideOffset: number;
|
|
@@ -76,22 +76,22 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
76
76
|
focusNode: typeof focusNode;
|
|
77
77
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
78
78
|
check: (keys: string[], halfCheckedKeys: string[], node: RsTreeNode, key: string) => any;
|
|
79
|
+
expand: (key: string, expanded: boolean) => any;
|
|
79
80
|
"update:modelValue": (value: string | string[]) => any;
|
|
80
81
|
"node-click": (node: RsTreeNode, key: string) => any;
|
|
81
82
|
"node-dblclick": (node: RsTreeNode, key: string) => any;
|
|
82
83
|
"node-contextmenu": (node: RsTreeNode, key: string, event: MouseEvent) => any;
|
|
83
|
-
expand: (key: string, expanded: boolean) => any;
|
|
84
84
|
"node-drop": (dragKey: string, dropKey: string, position: RsTreeDropPosition) => any;
|
|
85
85
|
"update:expandedKeys": (value: string[] | undefined) => any;
|
|
86
86
|
"update:checkedKeys": (value: string[] | undefined) => any;
|
|
87
87
|
"update:halfCheckedKeys": (value: string[] | undefined) => any;
|
|
88
88
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
89
89
|
onCheck?: ((keys: string[], halfCheckedKeys: string[], node: RsTreeNode, key: string) => any) | undefined;
|
|
90
|
+
onExpand?: ((key: string, expanded: boolean) => any) | undefined;
|
|
90
91
|
"onUpdate:modelValue"?: ((value: string | string[]) => any) | undefined;
|
|
91
92
|
"onNode-click"?: ((node: RsTreeNode, key: string) => any) | undefined;
|
|
92
93
|
"onNode-dblclick"?: ((node: RsTreeNode, key: string) => any) | undefined;
|
|
93
94
|
"onNode-contextmenu"?: ((node: RsTreeNode, key: string, event: MouseEvent) => any) | undefined;
|
|
94
|
-
onExpand?: ((key: string, expanded: boolean) => any) | undefined;
|
|
95
95
|
"onNode-drop"?: ((dragKey: string, dropKey: string, position: RsTreeDropPosition) => any) | undefined;
|
|
96
96
|
"onUpdate:expandedKeys"?: ((value: string[] | undefined) => any) | undefined;
|
|
97
97
|
"onUpdate:checkedKeys"?: ((value: string[] | undefined) => any) | undefined;
|
|
@@ -104,7 +104,6 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
104
104
|
virtual: boolean;
|
|
105
105
|
virtualThreshold: number;
|
|
106
106
|
highlight: boolean;
|
|
107
|
-
overscan: number;
|
|
108
107
|
checkable: boolean;
|
|
109
108
|
checkStrictly: boolean;
|
|
110
109
|
onlyCheckLeaf: boolean;
|
|
@@ -120,6 +119,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
120
119
|
lazy: boolean;
|
|
121
120
|
draggable: boolean;
|
|
122
121
|
dragTrigger: RsTreeDragTrigger;
|
|
122
|
+
overscan: number;
|
|
123
123
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
124
124
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
125
125
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1,3 @@
|
|
|
1
1
|
export { default as RsTreeSelect } from './src/RsTreeSelect.js';
|
|
2
|
+
export type { RsTreeSelectExpose, RsTreeSelectInstance } from './src/RsTreeSelect.js';
|
|
3
|
+
export type { RsTreeSelectGetPopupContainer, RsTreeSelectModelValue, RsTreeSelectShowCheckedStrategy, } from './src/tree-select-utils';
|