@onereach/ui-components 3.0.4-beta.2487.0 → 3.0.4-beta.2497.0
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/dist/bundled/v2/{OrDateTimePicker-11b6d4dd.js → OrDateTimePicker-d6f327ad.js} +50 -14
- package/dist/bundled/v2/components/index.js +1 -1
- package/dist/bundled/v2/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +9 -1
- package/dist/bundled/v2/components/or-date-time-picker-v3/index.js +1 -1
- package/dist/bundled/v2/index.js +2 -2
- package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-b9bc77aa.js → OrDateTimePicker.vue_vue_type_script_lang-ba3ac4fb.js} +39 -3
- package/dist/bundled/v3/components/index.js +1 -1
- package/dist/bundled/v3/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +9 -1
- package/dist/bundled/v3/components/or-date-time-picker-v3/index.js +1 -1
- package/dist/bundled/v3/index.js +17 -13
- package/dist/esm/v2/{OrDateTimePicker-7411ea1f.js → OrDateTimePicker-57094f24.js} +53 -17
- package/dist/esm/v2/components/index.js +1 -1
- package/dist/esm/v2/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +9 -1
- package/dist/esm/v2/components/or-date-time-picker-v3/index.js +4 -4
- package/dist/esm/v2/index.js +1 -1
- package/dist/esm/v3/{OrDateTimePicker-966d5b1d.js → OrDateTimePicker-a8247a84.js} +56 -16
- package/dist/esm/v3/components/index.js +1 -1
- package/dist/esm/v3/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +9 -1
- package/dist/esm/v3/components/or-date-time-picker-v3/index.js +3 -3
- package/dist/esm/v3/index.js +1 -1
- package/package.json +2 -2
- package/src/components/or-date-time-picker-v3/OrDateTimePicker.vue +71 -31
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/styles.ts +3 -0
- package/src/components/or-date-time-picker-v3/styles.ts +5 -2
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, reactive, watch } from 'vue-demi';
|
|
2
|
-
import { s as styleInject } from './style-inject.es-4c6f2515.js';
|
|
3
|
-
import { _ as __vue_component__$f } from './OrInputBox-0f4e8500.js';
|
|
4
|
-
import { I as InputBoxSize } from './OrInputBox.vue_rollup-plugin-vue_script-b2d0c353.js';
|
|
5
2
|
import { D as DropdownClose, a as DropdownOpen } from './dropdown-open-e1f90e0a.js';
|
|
6
3
|
import { a as useIdAttribute, u as useControlAttributes } from './useIdAttribute-859439f0.js';
|
|
7
4
|
import '@vueuse/core';
|
|
@@ -9,6 +6,8 @@ import { u as useValidationAttributes } from './useValidationAttributes-d1abbe34
|
|
|
9
6
|
import { _ as __vue_component__$d } from './OrError-4ffc1c39.js';
|
|
10
7
|
import { _ as __vue_component__$e } from './OrHint-aa221198.js';
|
|
11
8
|
import { _ as __vue_component__$a } from './OrIconButton-ec2e21aa.js';
|
|
9
|
+
import { _ as __vue_component__$f } from './OrInputBox-0f4e8500.js';
|
|
10
|
+
import { I as InputBoxSize } from './OrInputBox.vue_rollup-plugin-vue_script-b2d0c353.js';
|
|
12
11
|
import { _ as __vue_component__$8 } from './OrLabel-63380256.js';
|
|
13
12
|
import { _ as __vue_component__$g } from './OrPopover-83c885d0.js';
|
|
14
13
|
import { _ as __vue_component__$7 } from './OrButton-2283df1c.js';
|
|
@@ -16,6 +15,7 @@ import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
|
16
15
|
import { _ as __vue_component__$9 } from './OrIcon-d35a84d8.js';
|
|
17
16
|
import { _ as __vue_component__$c } from './OrMenuItem-6f9b8a93.js';
|
|
18
17
|
import { _ as __vue_component__$b } from './OrMenu-18a7f179.js';
|
|
18
|
+
import { s as styleInject } from './style-inject.es-4c6f2515.js';
|
|
19
19
|
|
|
20
20
|
function useDefaultDate() {
|
|
21
21
|
return new Date().getUTCDate();
|
|
@@ -44,7 +44,9 @@ const DateTimePickerDaySelect = [
|
|
|
44
44
|
'px-md', 'py-md', 'gap-sm'];
|
|
45
45
|
const DateTimePickerDaySelectButtonGroup = [
|
|
46
46
|
// Layout
|
|
47
|
-
'grid', 'grid-cols-7'
|
|
47
|
+
'grid', 'grid-cols-7',
|
|
48
|
+
// Spacing
|
|
49
|
+
'gap-xs'];
|
|
48
50
|
const DateTimePickerDaySelectButtonGroupItem = [
|
|
49
51
|
// Box
|
|
50
52
|
'min-w-fit',
|
|
@@ -799,8 +801,10 @@ const DateTimePicker = [
|
|
|
799
801
|
// Spacing
|
|
800
802
|
'gap-xs'];
|
|
801
803
|
const DateTimePickerControl = [
|
|
804
|
+
// Layout
|
|
805
|
+
'layout-inline-row justify-center',
|
|
802
806
|
// Theme (focus)
|
|
803
|
-
'focus:theme-border-
|
|
807
|
+
'focus:theme-border-2-current', 'dark:focus:theme-border-2-current-dark', 'focus:theme-border-underline', 'dark:focus:theme-border-underline'];
|
|
804
808
|
|
|
805
809
|
var script = defineComponent({
|
|
806
810
|
name: 'OrDateTimePicker',
|
|
@@ -939,6 +943,34 @@ var script = defineComponent({
|
|
|
939
943
|
popoverInstance.close();
|
|
940
944
|
}
|
|
941
945
|
}
|
|
946
|
+
function formatDate(value) {
|
|
947
|
+
var _a;
|
|
948
|
+
return (_a = value === null || value === void 0 ? void 0 : value.toLocaleString('default', {
|
|
949
|
+
dateStyle: 'short',
|
|
950
|
+
timeZone: 'UTC'
|
|
951
|
+
})) !== null && _a !== void 0 ? _a : '--';
|
|
952
|
+
}
|
|
953
|
+
function formatTime(value) {
|
|
954
|
+
var _a;
|
|
955
|
+
return (_a = value === null || value === void 0 ? void 0 : value.toLocaleString('default', {
|
|
956
|
+
timeStyle: 'short',
|
|
957
|
+
timeZone: 'UTC'
|
|
958
|
+
})) !== null && _a !== void 0 ? _a : '--';
|
|
959
|
+
}
|
|
960
|
+
function formatDateAlt(value) {
|
|
961
|
+
var _a;
|
|
962
|
+
return (_a = value === null || value === void 0 ? void 0 : value.toLocaleString('default', {
|
|
963
|
+
dateStyle: 'medium',
|
|
964
|
+
timeZone: 'UTC'
|
|
965
|
+
})) !== null && _a !== void 0 ? _a : '--';
|
|
966
|
+
}
|
|
967
|
+
function formatTimeAlt(value) {
|
|
968
|
+
var _a;
|
|
969
|
+
return (_a = value === null || value === void 0 ? void 0 : value.toLocaleString('default', {
|
|
970
|
+
timeStyle: 'short',
|
|
971
|
+
timeZone: 'UTC'
|
|
972
|
+
})) !== null && _a !== void 0 ? _a : '--';
|
|
973
|
+
}
|
|
942
974
|
return {
|
|
943
975
|
root,
|
|
944
976
|
dateControl,
|
|
@@ -955,12 +987,16 @@ var script = defineComponent({
|
|
|
955
987
|
toggleDatePopover,
|
|
956
988
|
toggleTimePopover,
|
|
957
989
|
closeDatePopover,
|
|
958
|
-
closeTimePopover
|
|
990
|
+
closeTimePopover,
|
|
991
|
+
formatDate,
|
|
992
|
+
formatTime,
|
|
993
|
+
formatDateAlt,
|
|
994
|
+
formatTimeAlt
|
|
959
995
|
};
|
|
960
996
|
}
|
|
961
997
|
});
|
|
962
998
|
|
|
963
|
-
var css_248z = "input[data-v-
|
|
999
|
+
var css_248z = "input[data-v-183da045]{min-width:0;background:0 0;outline:0}";
|
|
964
1000
|
styleInject(css_248z);
|
|
965
1001
|
|
|
966
1002
|
/* script */
|
|
@@ -1006,7 +1042,7 @@ var __vue_render__ = function () {
|
|
|
1006
1042
|
"readonly": _vm.readonly,
|
|
1007
1043
|
"disabled": _vm.disabled
|
|
1008
1044
|
}
|
|
1009
|
-
}, [_c('
|
|
1045
|
+
}, [_c('div', _vm._b({
|
|
1010
1046
|
directives: [{
|
|
1011
1047
|
name: "dropdown-open",
|
|
1012
1048
|
rawName: "v-dropdown-open",
|
|
@@ -1021,12 +1057,12 @@ var __vue_render__ = function () {
|
|
|
1021
1057
|
ref: "dateControl",
|
|
1022
1058
|
class: _vm.controlStyles,
|
|
1023
1059
|
attrs: {
|
|
1024
|
-
"
|
|
1060
|
+
"contenteditable": true,
|
|
1025
1061
|
"required": _vm.required,
|
|
1026
1062
|
"readonly": _vm.readonly,
|
|
1027
1063
|
"disabled": _vm.disabled
|
|
1028
1064
|
}
|
|
1029
|
-
}, '
|
|
1065
|
+
}, 'div', _vm.controlAttributes, false), [_vm._v("\n " + _vm._s(_vm.formatDate(_vm.proxyModelValue)) + "\n ")]), _vm._v(" "), _c('div', _vm._b({
|
|
1030
1066
|
directives: [{
|
|
1031
1067
|
name: "dropdown-open",
|
|
1032
1068
|
rawName: "v-dropdown-open",
|
|
@@ -1041,12 +1077,12 @@ var __vue_render__ = function () {
|
|
|
1041
1077
|
ref: "timeControl",
|
|
1042
1078
|
class: _vm.controlStyles,
|
|
1043
1079
|
attrs: {
|
|
1044
|
-
"
|
|
1080
|
+
"contenteditable": true,
|
|
1045
1081
|
"required": _vm.required,
|
|
1046
1082
|
"readonly": _vm.readonly,
|
|
1047
1083
|
"disabled": _vm.disabled
|
|
1048
1084
|
}
|
|
1049
|
-
}, '
|
|
1085
|
+
}, 'div', _vm.controlAttributes, false), [_vm._v("\n " + _vm._s(_vm.formatTime(_vm.proxyModelValue)) + "\n ")]), _vm._v(" "), _c('OrPopover', {
|
|
1050
1086
|
ref: "datePopover",
|
|
1051
1087
|
attrs: {
|
|
1052
1088
|
"variant": 'auto',
|
|
@@ -1057,11 +1093,11 @@ var __vue_render__ = function () {
|
|
|
1057
1093
|
attrs: {
|
|
1058
1094
|
"label": "Date"
|
|
1059
1095
|
}
|
|
1060
|
-
}, [_vm._v("\n
|
|
1096
|
+
}, [_vm._v("\n " + _vm._s(_vm.formatDateAlt(_vm.draftModelValue)) + "\n ")]), _vm._v(" "), _c('OrDateTimePickerMobileControl', {
|
|
1061
1097
|
attrs: {
|
|
1062
1098
|
"label": "Time"
|
|
1063
1099
|
}
|
|
1064
|
-
}, [_vm._v("\n
|
|
1100
|
+
}, [_vm._v("\n " + _vm._s(_vm.formatTimeAlt(_vm.draftModelValue)) + "\n ")])], 1), _vm._v(" "), _c('OrDateTimePickerMonthSelect', {
|
|
1065
1101
|
model: {
|
|
1066
1102
|
value: _vm.draftModelValue,
|
|
1067
1103
|
callback: function ($$v) {
|
|
@@ -1099,11 +1135,11 @@ var __vue_render__ = function () {
|
|
|
1099
1135
|
attrs: {
|
|
1100
1136
|
"label": "Date"
|
|
1101
1137
|
}
|
|
1102
|
-
}, [_vm._v("\n
|
|
1138
|
+
}, [_vm._v("\n " + _vm._s(_vm.formatDateAlt(_vm.draftModelValue)) + "\n ")]), _vm._v(" "), _c('OrDateTimePickerMobileControl', {
|
|
1103
1139
|
attrs: {
|
|
1104
1140
|
"label": "Time"
|
|
1105
1141
|
}
|
|
1106
|
-
}, [_vm._v("\n
|
|
1142
|
+
}, [_vm._v("\n " + _vm._s(_vm.formatTimeAlt(_vm.draftModelValue)) + "\n ")])], 1), _vm._v(" "), _c('OrDateTimePickerTimeSelect', {
|
|
1107
1143
|
model: {
|
|
1108
1144
|
value: _vm.draftModelValue,
|
|
1109
1145
|
callback: function ($$v) {
|
|
@@ -1153,7 +1189,7 @@ var __vue_staticRenderFns__ = [];
|
|
|
1153
1189
|
/* style */
|
|
1154
1190
|
const __vue_inject_styles__ = undefined;
|
|
1155
1191
|
/* scoped */
|
|
1156
|
-
const __vue_scope_id__ = "data-v-
|
|
1192
|
+
const __vue_scope_id__ = "data-v-183da045";
|
|
1157
1193
|
/* module identifier */
|
|
1158
1194
|
const __vue_module_identifier__ = undefined;
|
|
1159
1195
|
/* functional template */
|
|
@@ -21,7 +21,7 @@ export { _ as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k
|
|
|
21
21
|
export { _ as OrConfirm } from '../OrConfirm-64e815c7.js';
|
|
22
22
|
export { C as ConfirmType, _ as OrConfirmV3 } from '../OrConfirm-1be17f86.js';
|
|
23
23
|
export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from '../OrDateTimePicker-85e5e03e.js';
|
|
24
|
-
export { _ as OrDateTimePickerV3 } from '../OrDateTimePicker-
|
|
24
|
+
export { _ as OrDateTimePickerV3 } from '../OrDateTimePicker-57094f24.js';
|
|
25
25
|
export { _ as OrInputBoxV3 } from '../OrInputBox-0f4e8500.js';
|
|
26
26
|
export { I as DateTimePickerSize, I as InputBoxSize, a as InputBoxVariant, I as InputSize, I as SearchSize, I as SelectSize, I as TextareaSize } from '../OrInputBox.vue_rollup-plugin-vue_script-b2d0c353.js';
|
|
27
27
|
export { E as EmptyStateSize, _ as OrEmptyStateV3 } from '../OrEmptyState-2d3fd68d.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
|
-
import { DateTimePickerSize } from '
|
|
2
|
+
import { DateTimePickerSize } from './props';
|
|
3
3
|
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
4
4
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
5
5
|
dateControl: import("@vue/composition-api").Ref<HTMLInputElement | undefined>;
|
|
@@ -37,6 +37,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
37
37
|
toggleTimePopover: () => void;
|
|
38
38
|
closeDatePopover: () => void;
|
|
39
39
|
closeTimePopover: () => void;
|
|
40
|
+
formatDate: (value?: Date) => string;
|
|
41
|
+
formatTime: (value?: Date) => string;
|
|
42
|
+
formatDateAlt: (value?: Date) => string;
|
|
43
|
+
formatTimeAlt: (value?: Date) => string;
|
|
40
44
|
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
41
45
|
modelValue: {
|
|
42
46
|
type: DateConstructor;
|
|
@@ -160,6 +164,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
160
164
|
toggleTimePopover: () => void;
|
|
161
165
|
closeDatePopover: () => void;
|
|
162
166
|
closeTimePopover: () => void;
|
|
167
|
+
formatDate: (value?: Date) => string;
|
|
168
|
+
formatTime: (value?: Date) => string;
|
|
169
|
+
formatDateAlt: (value?: Date) => string;
|
|
170
|
+
formatTimeAlt: (value?: Date) => string;
|
|
163
171
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
|
|
164
172
|
modelValue: Date;
|
|
165
173
|
size: DateTimePickerSize;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
export { _ as OrDateTimePickerV3 } from '../../OrDateTimePicker-
|
|
1
|
+
export { _ as OrDateTimePickerV3 } from '../../OrDateTimePicker-57094f24.js';
|
|
2
2
|
export { I as DateTimePickerSize } from '../../OrInputBox.vue_rollup-plugin-vue_script-b2d0c353.js';
|
|
3
3
|
import 'vue-demi';
|
|
4
|
-
import '../../style-inject.es-4c6f2515.js';
|
|
5
|
-
import '../../OrInputBox-0f4e8500.js';
|
|
6
|
-
import '../../normalize-component-6e8e3d80.js';
|
|
7
4
|
import '../../dropdown-open-e1f90e0a.js';
|
|
8
5
|
import '../../useIdAttribute-859439f0.js';
|
|
9
6
|
import '@vueuse/core';
|
|
10
7
|
import '../../useValidationAttributes-d1abbe34.js';
|
|
11
8
|
import '../../OrError-4ffc1c39.js';
|
|
9
|
+
import '../../normalize-component-6e8e3d80.js';
|
|
12
10
|
import '../../OrHint-aa221198.js';
|
|
13
11
|
import '../../OrIconButton-ec2e21aa.js';
|
|
14
12
|
import '../../OrIcon-d35a84d8.js';
|
|
@@ -21,8 +19,10 @@ import '../../OrBottomSheet-29df8db9.js';
|
|
|
21
19
|
import '../../OrOverlay-2ce3cfd7.js';
|
|
22
20
|
import '../../OrTeleport.vue2-fb92f29f.js';
|
|
23
21
|
import 'portal-vue';
|
|
22
|
+
import '../../OrInputBox-0f4e8500.js';
|
|
24
23
|
import '../../OrLabel-63380256.js';
|
|
25
24
|
import '../../OrButton-2283df1c.js';
|
|
26
25
|
import '../../OrLoader-b0c381f9.js';
|
|
27
26
|
import '../../OrMenuItem-6f9b8a93.js';
|
|
28
27
|
import '../../OrMenu-18a7f179.js';
|
|
28
|
+
import '../../style-inject.es-4c6f2515.js';
|
package/dist/esm/v2/index.js
CHANGED
|
@@ -21,7 +21,7 @@ export { _ as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k
|
|
|
21
21
|
export { _ as OrConfirm } from './OrConfirm-64e815c7.js';
|
|
22
22
|
export { C as ConfirmType, _ as OrConfirmV3 } from './OrConfirm-1be17f86.js';
|
|
23
23
|
export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-85e5e03e.js';
|
|
24
|
-
export { _ as OrDateTimePickerV3 } from './OrDateTimePicker-
|
|
24
|
+
export { _ as OrDateTimePickerV3 } from './OrDateTimePicker-57094f24.js';
|
|
25
25
|
export { _ as OrInputBoxV3 } from './OrInputBox-0f4e8500.js';
|
|
26
26
|
export { I as DateTimePickerSize, I as InputBoxSize, a as InputBoxVariant, I as InputSize, I as SearchSize, I as SelectSize, I as TextareaSize } from './OrInputBox.vue_rollup-plugin-vue_script-b2d0c353.js';
|
|
27
27
|
export { E as EmptyStateSize, _ as OrEmptyStateV3 } from './OrEmptyState-2d3fd68d.js';
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, reactive, watch } from 'vue-demi';
|
|
2
|
-
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createBlock, withModifiers, withCtx, createTextVNode, toDisplayString, createVNode, renderSlot, resolveDirective, createCommentVNode, withDirectives, mergeProps, pushScopeId, popScopeId } from 'vue';
|
|
3
|
-
import { s as styleInject } from './style-inject.es-4c6f2515.js';
|
|
4
|
-
import { s as script$f, I as InputBoxSize } from './OrInputBox-901887a1.js';
|
|
5
2
|
import { D as DropdownClose, a as DropdownOpen } from './dropdown-open-e1f90e0a.js';
|
|
6
3
|
import { a as useIdAttribute, u as useControlAttributes } from './useIdAttribute-859439f0.js';
|
|
7
4
|
import '@vueuse/core';
|
|
@@ -9,12 +6,15 @@ import { u as useValidationAttributes } from './useValidationAttributes-d1abbe34
|
|
|
9
6
|
import { s as script$d } from './OrError-c01d0c29.js';
|
|
10
7
|
import { s as script$e } from './OrHint-06ab89d7.js';
|
|
11
8
|
import { s as script$a } from './OrIconButton-e3f4d060.js';
|
|
9
|
+
import { s as script$f, I as InputBoxSize } from './OrInputBox-901887a1.js';
|
|
12
10
|
import { s as script$8 } from './OrLabel-4da56db0.js';
|
|
13
11
|
import { s as script$g } from './OrPopover-3ac8f589.js';
|
|
14
12
|
import { s as script$7 } from './OrButton-5a850657.js';
|
|
13
|
+
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createBlock, withModifiers, withCtx, createTextVNode, toDisplayString, createVNode, renderSlot, resolveDirective, createCommentVNode, withDirectives, mergeProps, pushScopeId, popScopeId } from 'vue';
|
|
15
14
|
import { s as script$9 } from './OrIcon-62793572.js';
|
|
16
15
|
import { s as script$c } from './OrMenuItem-dbee450f.js';
|
|
17
16
|
import { s as script$b } from './OrMenu-70cee836.js';
|
|
17
|
+
import { s as styleInject } from './style-inject.es-4c6f2515.js';
|
|
18
18
|
|
|
19
19
|
function useDefaultDate() {
|
|
20
20
|
return new Date().getUTCDate();
|
|
@@ -43,7 +43,9 @@ const DateTimePickerDaySelect = [
|
|
|
43
43
|
'px-md', 'py-md', 'gap-sm'];
|
|
44
44
|
const DateTimePickerDaySelectButtonGroup = [
|
|
45
45
|
// Layout
|
|
46
|
-
'grid', 'grid-cols-7'
|
|
46
|
+
'grid', 'grid-cols-7',
|
|
47
|
+
// Spacing
|
|
48
|
+
'gap-xs'];
|
|
47
49
|
const DateTimePickerDaySelectButtonGroupItem = [
|
|
48
50
|
// Box
|
|
49
51
|
'min-w-fit',
|
|
@@ -627,8 +629,10 @@ const DateTimePicker = [
|
|
|
627
629
|
// Spacing
|
|
628
630
|
'gap-xs'];
|
|
629
631
|
const DateTimePickerControl = [
|
|
632
|
+
// Layout
|
|
633
|
+
'layout-inline-row justify-center',
|
|
630
634
|
// Theme (focus)
|
|
631
|
-
'focus:theme-border-
|
|
635
|
+
'focus:theme-border-2-current', 'dark:focus:theme-border-2-current-dark', 'focus:theme-border-underline', 'dark:focus:theme-border-underline'];
|
|
632
636
|
|
|
633
637
|
var script = defineComponent({
|
|
634
638
|
name: 'OrDateTimePicker',
|
|
@@ -767,6 +771,34 @@ var script = defineComponent({
|
|
|
767
771
|
popoverInstance.close();
|
|
768
772
|
}
|
|
769
773
|
}
|
|
774
|
+
function formatDate(value) {
|
|
775
|
+
var _a;
|
|
776
|
+
return (_a = value === null || value === void 0 ? void 0 : value.toLocaleString('default', {
|
|
777
|
+
dateStyle: 'short',
|
|
778
|
+
timeZone: 'UTC'
|
|
779
|
+
})) !== null && _a !== void 0 ? _a : '--';
|
|
780
|
+
}
|
|
781
|
+
function formatTime(value) {
|
|
782
|
+
var _a;
|
|
783
|
+
return (_a = value === null || value === void 0 ? void 0 : value.toLocaleString('default', {
|
|
784
|
+
timeStyle: 'short',
|
|
785
|
+
timeZone: 'UTC'
|
|
786
|
+
})) !== null && _a !== void 0 ? _a : '--';
|
|
787
|
+
}
|
|
788
|
+
function formatDateAlt(value) {
|
|
789
|
+
var _a;
|
|
790
|
+
return (_a = value === null || value === void 0 ? void 0 : value.toLocaleString('default', {
|
|
791
|
+
dateStyle: 'medium',
|
|
792
|
+
timeZone: 'UTC'
|
|
793
|
+
})) !== null && _a !== void 0 ? _a : '--';
|
|
794
|
+
}
|
|
795
|
+
function formatTimeAlt(value) {
|
|
796
|
+
var _a;
|
|
797
|
+
return (_a = value === null || value === void 0 ? void 0 : value.toLocaleString('default', {
|
|
798
|
+
timeStyle: 'short',
|
|
799
|
+
timeZone: 'UTC'
|
|
800
|
+
})) !== null && _a !== void 0 ? _a : '--';
|
|
801
|
+
}
|
|
770
802
|
return {
|
|
771
803
|
root,
|
|
772
804
|
dateControl,
|
|
@@ -783,7 +815,11 @@ var script = defineComponent({
|
|
|
783
815
|
toggleDatePopover,
|
|
784
816
|
toggleTimePopover,
|
|
785
817
|
closeDatePopover,
|
|
786
|
-
closeTimePopover
|
|
818
|
+
closeTimePopover,
|
|
819
|
+
formatDate,
|
|
820
|
+
formatTime,
|
|
821
|
+
formatDateAlt,
|
|
822
|
+
formatTimeAlt
|
|
787
823
|
};
|
|
788
824
|
}
|
|
789
825
|
});
|
|
@@ -833,23 +869,23 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
833
869
|
readonly: _ctx.readonly,
|
|
834
870
|
disabled: _ctx.disabled
|
|
835
871
|
}, {
|
|
836
|
-
default: withCtx(() => [
|
|
872
|
+
default: withCtx(() => [createCommentVNode(" <input\n ref=\"dateControl\"\n v-dropdown-open=\"toggleDatePopover\"\n v-dropdown-close=\"closeDatePopover\"\n v-bind=\"controlAttributes\"\n :class=\"controlStyles\"\n :type=\"'text'\"\n :value=\"formatDate(proxyModelValue)\"\n :required=\"required\"\n :readonly=\"readonly\"\n :disabled=\"disabled\"\n > "), createCommentVNode(" <input\n ref=\"timeControl\"\n v-dropdown-open=\"toggleTimePopover\"\n v-dropdown-close=\"closeTimePopover\"\n v-bind=\"controlAttributes\"\n :class=\"controlStyles\"\n :type=\"'text'\"\n :value=\"formatTime(proxyModelValue)\"\n :required=\"required\"\n :readonly=\"readonly\"\n :disabled=\"disabled\"\n > "), withDirectives((openBlock(), createElementBlock("div", mergeProps({
|
|
837
873
|
ref: "dateControl"
|
|
838
874
|
}, _ctx.controlAttributes, {
|
|
839
875
|
class: _ctx.controlStyles,
|
|
840
|
-
|
|
876
|
+
contenteditable: true,
|
|
841
877
|
required: _ctx.required,
|
|
842
878
|
readonly: _ctx.readonly,
|
|
843
879
|
disabled: _ctx.disabled
|
|
844
|
-
}),
|
|
880
|
+
}), [createTextVNode(toDisplayString(_ctx.formatDate(_ctx.proxyModelValue)), 1 /* TEXT */)], 16 /* FULL_PROPS */, _hoisted_1)), [[_directive_dropdown_open, _ctx.toggleDatePopover], [_directive_dropdown_close, _ctx.closeDatePopover]]), withDirectives((openBlock(), createElementBlock("div", mergeProps({
|
|
845
881
|
ref: "timeControl"
|
|
846
882
|
}, _ctx.controlAttributes, {
|
|
847
883
|
class: _ctx.controlStyles,
|
|
848
|
-
|
|
884
|
+
contenteditable: true,
|
|
849
885
|
required: _ctx.required,
|
|
850
886
|
readonly: _ctx.readonly,
|
|
851
887
|
disabled: _ctx.disabled
|
|
852
|
-
}),
|
|
888
|
+
}), [createTextVNode(toDisplayString(_ctx.formatTime(_ctx.proxyModelValue)), 1 /* TEXT */)], 16 /* FULL_PROPS */, _hoisted_2)), [[_directive_dropdown_open, _ctx.toggleTimePopover], [_directive_dropdown_close, _ctx.closeTimePopover]]), createVNode(_component_OrPopover, {
|
|
853
889
|
ref: "datePopover",
|
|
854
890
|
variant: 'auto',
|
|
855
891
|
trigger: _ctx.dateControl,
|
|
@@ -859,12 +895,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
859
895
|
default: withCtx(() => [createVNode(_component_OrDateTimePickerMobileControl, {
|
|
860
896
|
label: "Date"
|
|
861
897
|
}, {
|
|
862
|
-
default: withCtx(() => [createTextVNode(
|
|
898
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatDateAlt(_ctx.draftModelValue)), 1 /* TEXT */)]),
|
|
899
|
+
|
|
863
900
|
_: 1 /* STABLE */
|
|
864
901
|
}), createVNode(_component_OrDateTimePickerMobileControl, {
|
|
865
902
|
label: "Time"
|
|
866
903
|
}, {
|
|
867
|
-
default: withCtx(() => [createTextVNode(
|
|
904
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatTimeAlt(_ctx.draftModelValue)), 1 /* TEXT */)]),
|
|
905
|
+
|
|
868
906
|
_: 1 /* STABLE */
|
|
869
907
|
})]),
|
|
870
908
|
|
|
@@ -896,12 +934,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
896
934
|
default: withCtx(() => [createVNode(_component_OrDateTimePickerMobileControl, {
|
|
897
935
|
label: "Date"
|
|
898
936
|
}, {
|
|
899
|
-
default: withCtx(() => [createTextVNode(
|
|
937
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatDateAlt(_ctx.draftModelValue)), 1 /* TEXT */)]),
|
|
938
|
+
|
|
900
939
|
_: 1 /* STABLE */
|
|
901
940
|
}), createVNode(_component_OrDateTimePickerMobileControl, {
|
|
902
941
|
label: "Time"
|
|
903
942
|
}, {
|
|
904
|
-
default: withCtx(() => [createTextVNode(
|
|
943
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatTimeAlt(_ctx.draftModelValue)), 1 /* TEXT */)]),
|
|
944
|
+
|
|
905
945
|
_: 1 /* STABLE */
|
|
906
946
|
})]),
|
|
907
947
|
|
|
@@ -947,7 +987,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
947
987
|
}, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true)], 2 /* CLASS */);
|
|
948
988
|
}
|
|
949
989
|
|
|
950
|
-
var css_248z = "\ninput[data-v-4ab76bac] {\n min-width: 0;\n background: none;\n outline: none;\n}\
|
|
990
|
+
var css_248z = "\ninput[data-v-4ab76bac] {\n min-width: 0;\n background: none;\n outline: none;\n}\n";
|
|
951
991
|
styleInject(css_248z);
|
|
952
992
|
|
|
953
993
|
script.render = render;
|
|
@@ -18,7 +18,7 @@ export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k
|
|
|
18
18
|
export { s as OrConfirm } from '../OrConfirm-f408faf5.js';
|
|
19
19
|
export { C as ConfirmType, s as OrConfirmV3 } from '../OrConfirm-ecb8c576.js';
|
|
20
20
|
export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from '../OrDateTimePicker-30749526.js';
|
|
21
|
-
export { s as OrDateTimePickerV3 } from '../OrDateTimePicker-
|
|
21
|
+
export { s as OrDateTimePickerV3 } from '../OrDateTimePicker-a8247a84.js';
|
|
22
22
|
export { I as DateTimePickerSize, I as InputBoxSize, a as InputBoxVariant, I as InputSize, s as OrInputBoxV3, I as SearchSize, I as SelectSize, I as TextareaSize } from '../OrInputBox-901887a1.js';
|
|
23
23
|
export { E as EmptyStateSize, s as OrEmptyStateV3 } from '../OrEmptyState-5349a1f9.js';
|
|
24
24
|
export { s as OrError } from '../OrError-f90296db.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
|
-
import { DateTimePickerSize } from '
|
|
2
|
+
import { DateTimePickerSize } from './props';
|
|
3
3
|
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
4
4
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
5
5
|
dateControl: import("@vue/composition-api").Ref<HTMLInputElement | undefined>;
|
|
@@ -37,6 +37,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
37
37
|
toggleTimePopover: () => void;
|
|
38
38
|
closeDatePopover: () => void;
|
|
39
39
|
closeTimePopover: () => void;
|
|
40
|
+
formatDate: (value?: Date) => string;
|
|
41
|
+
formatTime: (value?: Date) => string;
|
|
42
|
+
formatDateAlt: (value?: Date) => string;
|
|
43
|
+
formatTimeAlt: (value?: Date) => string;
|
|
40
44
|
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
41
45
|
modelValue: {
|
|
42
46
|
type: DateConstructor;
|
|
@@ -160,6 +164,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
160
164
|
toggleTimePopover: () => void;
|
|
161
165
|
closeDatePopover: () => void;
|
|
162
166
|
closeTimePopover: () => void;
|
|
167
|
+
formatDate: (value?: Date) => string;
|
|
168
|
+
formatTime: (value?: Date) => string;
|
|
169
|
+
formatDateAlt: (value?: Date) => string;
|
|
170
|
+
formatTimeAlt: (value?: Date) => string;
|
|
163
171
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
|
|
164
172
|
modelValue: Date;
|
|
165
173
|
size: DateTimePickerSize;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
export { s as OrDateTimePickerV3 } from '../../OrDateTimePicker-
|
|
1
|
+
export { s as OrDateTimePickerV3 } from '../../OrDateTimePicker-a8247a84.js';
|
|
2
2
|
export { I as DateTimePickerSize } from '../../OrInputBox-901887a1.js';
|
|
3
3
|
import 'vue-demi';
|
|
4
|
-
import 'vue';
|
|
5
|
-
import '../../style-inject.es-4c6f2515.js';
|
|
6
4
|
import '../../dropdown-open-e1f90e0a.js';
|
|
7
5
|
import '../../useIdAttribute-859439f0.js';
|
|
8
6
|
import '@vueuse/core';
|
|
9
7
|
import '../../useValidationAttributes-d1abbe34.js';
|
|
10
8
|
import '../../OrError-c01d0c29.js';
|
|
9
|
+
import 'vue';
|
|
11
10
|
import '../../OrHint-06ab89d7.js';
|
|
12
11
|
import '../../OrIconButton-e3f4d060.js';
|
|
13
12
|
import '../../OrIcon-62793572.js';
|
|
@@ -24,3 +23,4 @@ import '../../OrButton-5a850657.js';
|
|
|
24
23
|
import '../../OrLoader-b79022da.js';
|
|
25
24
|
import '../../OrMenuItem-dbee450f.js';
|
|
26
25
|
import '../../OrMenu-70cee836.js';
|
|
26
|
+
import '../../style-inject.es-4c6f2515.js';
|
package/dist/esm/v3/index.js
CHANGED
|
@@ -18,7 +18,7 @@ export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k
|
|
|
18
18
|
export { s as OrConfirm } from './OrConfirm-f408faf5.js';
|
|
19
19
|
export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-ecb8c576.js';
|
|
20
20
|
export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-30749526.js';
|
|
21
|
-
export { s as OrDateTimePickerV3 } from './OrDateTimePicker-
|
|
21
|
+
export { s as OrDateTimePickerV3 } from './OrDateTimePicker-a8247a84.js';
|
|
22
22
|
export { I as DateTimePickerSize, I as InputBoxSize, a as InputBoxVariant, I as InputSize, s as OrInputBoxV3, I as SearchSize, I as SelectSize, I as TextareaSize } from './OrInputBox-901887a1.js';
|
|
23
23
|
export { E as EmptyStateSize, s as OrEmptyStateV3 } from './OrEmptyState-5349a1f9.js';
|
|
24
24
|
export { s as OrError } from './OrError-f90296db.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components",
|
|
3
|
-
"version": "3.0.4-beta.
|
|
3
|
+
"version": "3.0.4-beta.2497.0",
|
|
4
4
|
"description": "Vue components library for v2/3",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/auto/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@codemirror/lang-json": "6.0.0",
|
|
39
39
|
"@codemirror/lang-markdown": "6.0.1",
|
|
40
40
|
"@floating-ui/dom": "0.3.1",
|
|
41
|
-
"@onereach/styles": "^2.37.4-beta.
|
|
41
|
+
"@onereach/styles": "^2.37.4-beta.2497.0",
|
|
42
42
|
"@splidejs/splide": "4.0.6",
|
|
43
43
|
"@types/lodash": "4.14.173",
|
|
44
44
|
"@types/sortablejs": "1.10.7",
|