naive-ui 2.41.1 → 2.42.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/index.js +48 -37
- package/dist/index.mjs +48 -37
- package/dist/index.prod.js +1 -1
- package/dist/index.prod.mjs +1 -1
- package/es/_internal/icon/src/styles/index.cssr.mjs +0 -1
- package/es/anchor/index.d.ts +1 -0
- package/es/anchor/src/Link.d.ts +3 -2
- package/es/anchor/src/Link.mjs +5 -2
- package/es/anchor/src/public-types.d.ts +5 -0
- package/es/anchor/src/public-types.mjs +1 -0
- package/es/date-picker/src/DatePicker.d.ts +2 -2
- package/es/date-picker/src/DatePicker.mjs +1 -1
- package/es/date-picker/src/panel/date.d.ts +2 -2
- package/es/date-picker/src/panel/daterange.d.ts +3 -3
- package/es/date-picker/src/panel/datetime.d.ts +2 -2
- package/es/date-picker/src/panel/datetime.mjs +1 -1
- package/es/date-picker/src/panel/datetimerange.d.ts +3 -3
- package/es/date-picker/src/panel/datetimerange.mjs +2 -2
- package/es/date-picker/src/panel/month.d.ts +2 -2
- package/es/date-picker/src/panel/monthrange.d.ts +3 -3
- package/es/date-picker/src/panel/panelHeader.d.ts +4 -4
- package/es/date-picker/src/panel/use-calendar.d.ts +1 -1
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +2 -2
- package/es/date-picker/src/panel/use-dual-calendar.mjs +3 -3
- package/es/date-picker/src/panel/use-panel-common.d.ts +1 -1
- package/es/date-picker/src/panel/use-panel-common.mjs +1 -1
- package/es/date-picker/src/props.d.ts +1 -1
- package/es/date-picker/src/props.mjs +1 -1
- package/es/icon/src/styles/index.cssr.mjs +0 -1
- package/es/input-otp/src/InputOtp.d.ts +4 -0
- package/es/input-otp/src/InputOtp.mjs +7 -2
- package/es/input-otp/src/styles/index.cssr.mjs +12 -3
- package/es/radio/src/Radio.mjs +5 -5
- package/es/radio/src/styles/radio.cssr.mjs +3 -7
- package/es/tree/src/styles/index.cssr.mjs +0 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/_internal/icon/src/styles/index.cssr.js +0 -1
- package/lib/anchor/index.d.ts +1 -0
- package/lib/anchor/src/Link.d.ts +3 -2
- package/lib/anchor/src/Link.js +4 -1
- package/lib/anchor/src/public-types.d.ts +5 -0
- package/lib/anchor/src/public-types.js +2 -0
- package/lib/date-picker/src/DatePicker.d.ts +2 -2
- package/lib/date-picker/src/DatePicker.js +1 -1
- package/lib/date-picker/src/panel/date.d.ts +2 -2
- package/lib/date-picker/src/panel/daterange.d.ts +3 -3
- package/lib/date-picker/src/panel/datetime.d.ts +2 -2
- package/lib/date-picker/src/panel/datetime.js +1 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +3 -3
- package/lib/date-picker/src/panel/datetimerange.js +2 -2
- package/lib/date-picker/src/panel/month.d.ts +2 -2
- package/lib/date-picker/src/panel/monthrange.d.ts +3 -3
- package/lib/date-picker/src/panel/panelHeader.d.ts +4 -4
- package/lib/date-picker/src/panel/use-calendar.d.ts +1 -1
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +2 -2
- package/lib/date-picker/src/panel/use-dual-calendar.js +3 -3
- package/lib/date-picker/src/panel/use-panel-common.d.ts +1 -1
- package/lib/date-picker/src/panel/use-panel-common.js +1 -1
- package/lib/date-picker/src/props.d.ts +1 -1
- package/lib/date-picker/src/props.js +1 -1
- package/lib/icon/src/styles/index.cssr.js +0 -1
- package/lib/input-otp/src/InputOtp.d.ts +4 -0
- package/lib/input-otp/src/InputOtp.js +9 -3
- package/lib/input-otp/src/styles/index.cssr.js +11 -2
- package/lib/radio/src/Radio.js +2 -2
- package/lib/radio/src/styles/radio.cssr.js +3 -7
- package/lib/tree/src/styles/index.cssr.js +0 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +23 -6
package/dist/index.js
CHANGED
|
@@ -32126,7 +32126,6 @@
|
|
|
32126
32126
|
display: inline-block;
|
|
32127
32127
|
position: relative;
|
|
32128
32128
|
fill: currentColor;
|
|
32129
|
-
transform: translateZ(0);
|
|
32130
32129
|
`, [c$1("svg", `
|
|
32131
32130
|
height: 1em;
|
|
32132
32131
|
width: 1em;
|
|
@@ -40560,6 +40559,7 @@
|
|
|
40560
40559
|
var Link = vue.defineComponent({
|
|
40561
40560
|
name: "AnchorLink",
|
|
40562
40561
|
props: anchorLinkProps,
|
|
40562
|
+
slots: Object,
|
|
40563
40563
|
setup(props, { slots }) {
|
|
40564
40564
|
const titleRef = vue.ref(null);
|
|
40565
40565
|
const NAnchor = vue.inject(anchorInjectionKey);
|
|
@@ -40602,7 +40602,9 @@
|
|
|
40602
40602
|
title: getTitleAttribute(props.title),
|
|
40603
40603
|
onClick: handleClick
|
|
40604
40604
|
},
|
|
40605
|
-
|
|
40605
|
+
{
|
|
40606
|
+
default: () => resolveSlot(slots.title, () => [props.title])
|
|
40607
|
+
}
|
|
40606
40608
|
),
|
|
40607
40609
|
slots.default?.()
|
|
40608
40610
|
);
|
|
@@ -62960,14 +62962,10 @@
|
|
|
62960
62962
|
`), cB("radio-input", `
|
|
62961
62963
|
position: absolute;
|
|
62962
62964
|
border: 0;
|
|
62963
|
-
|
|
62964
|
-
|
|
62965
|
-
right: 0;
|
|
62966
|
-
top: 0;
|
|
62967
|
-
bottom: 0;
|
|
62965
|
+
width: 0;
|
|
62966
|
+
height: 0;
|
|
62968
62967
|
opacity: 0;
|
|
62969
|
-
|
|
62970
|
-
cursor: pointer;
|
|
62968
|
+
margin: 0;
|
|
62971
62969
|
`), cE("dot", `
|
|
62972
62970
|
position: absolute;
|
|
62973
62971
|
top: 50%;
|
|
@@ -63265,7 +63263,15 @@
|
|
|
63265
63263
|
],
|
|
63266
63264
|
style: this.cssVars
|
|
63267
63265
|
},
|
|
63268
|
-
/* @__PURE__ */ vue.h(
|
|
63266
|
+
/* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-radio__dot-wrapper` }, "\xA0", /* @__PURE__ */ vue.h(
|
|
63267
|
+
"div",
|
|
63268
|
+
{
|
|
63269
|
+
class: [
|
|
63270
|
+
`${mergedClsPrefix}-radio__dot`,
|
|
63271
|
+
this.renderSafeChecked && `${mergedClsPrefix}-radio__dot--checked`
|
|
63272
|
+
]
|
|
63273
|
+
}
|
|
63274
|
+
), /* @__PURE__ */ vue.h(
|
|
63269
63275
|
"input",
|
|
63270
63276
|
{
|
|
63271
63277
|
ref: "inputRef",
|
|
@@ -63279,15 +63285,6 @@
|
|
|
63279
63285
|
onFocus: this.handleRadioInputFocus,
|
|
63280
63286
|
onBlur: this.handleRadioInputBlur
|
|
63281
63287
|
}
|
|
63282
|
-
),
|
|
63283
|
-
/* @__PURE__ */ vue.h("div", { class: `${mergedClsPrefix}-radio__dot-wrapper` }, "\xA0", /* @__PURE__ */ vue.h(
|
|
63284
|
-
"div",
|
|
63285
|
-
{
|
|
63286
|
-
class: [
|
|
63287
|
-
`${mergedClsPrefix}-radio__dot`,
|
|
63288
|
-
this.renderSafeChecked && `${mergedClsPrefix}-radio__dot--checked`
|
|
63289
|
-
]
|
|
63290
|
-
}
|
|
63291
63288
|
)),
|
|
63292
63289
|
resolveWrappedSlot($slots.default, (children) => {
|
|
63293
63290
|
if (!children && !label)
|
|
@@ -64744,7 +64741,6 @@
|
|
|
64744
64741
|
display: inline-block;
|
|
64745
64742
|
position: relative;
|
|
64746
64743
|
fill: currentColor;
|
|
64747
|
-
transform: translateZ(0);
|
|
64748
64744
|
`, [cM("color-transition", {
|
|
64749
64745
|
transition: "color .3s var(--n-bezier)"
|
|
64750
64746
|
}), cM("depth", {
|
|
@@ -69490,7 +69486,7 @@
|
|
|
69490
69486
|
type: Boolean,
|
|
69491
69487
|
default: void 0
|
|
69492
69488
|
},
|
|
69493
|
-
|
|
69489
|
+
timePickerFormat: {
|
|
69494
69490
|
type: String,
|
|
69495
69491
|
value: TIME_FORMAT
|
|
69496
69492
|
},
|
|
@@ -70938,7 +70934,7 @@
|
|
|
70938
70934
|
if (typeof startTime !== "number") {
|
|
70939
70935
|
startTime = getTime(startTime);
|
|
70940
70936
|
}
|
|
70941
|
-
if (source !== "shortcutPreview") {
|
|
70937
|
+
if (source !== "shortcutPreview" && source !== "shortcutDone") {
|
|
70942
70938
|
let startDefaultTime;
|
|
70943
70939
|
let endDefaultTime;
|
|
70944
70940
|
if (type === "datetimerange") {
|
|
@@ -70960,7 +70956,7 @@
|
|
|
70960
70956
|
endTime = getTime(set(endTime, endDefaultTime));
|
|
70961
70957
|
}
|
|
70962
70958
|
}
|
|
70963
|
-
panelCommon.doUpdateValue([startTime, endTime], props.panel && source === "done");
|
|
70959
|
+
panelCommon.doUpdateValue([startTime, endTime], props.panel && (source === "done" || source === "shortcutDone"));
|
|
70964
70960
|
}
|
|
70965
70961
|
function sanitizeValue(datetime) {
|
|
70966
70962
|
if (type === "datetimerange") {
|
|
@@ -71097,7 +71093,7 @@
|
|
|
71097
71093
|
function handleRangeShortcutClick(shortcut) {
|
|
71098
71094
|
const shortcutValue = panelCommon.getShortcutValue(shortcut);
|
|
71099
71095
|
if (!Array.isArray(shortcutValue)) return;
|
|
71100
|
-
changeStartEndTime(shortcutValue[0], shortcutValue[1], "
|
|
71096
|
+
changeStartEndTime(shortcutValue[0], shortcutValue[1], "shortcutDone");
|
|
71101
71097
|
panelCommon.clearPendingValue();
|
|
71102
71098
|
handleConfirmClick();
|
|
71103
71099
|
}
|
|
@@ -74209,7 +74205,7 @@
|
|
|
74209
74205
|
{
|
|
74210
74206
|
size: this.timePickerSize,
|
|
74211
74207
|
placeholder: this.locale.selectTime,
|
|
74212
|
-
format: this.
|
|
74208
|
+
format: this.timePickerFormat,
|
|
74213
74209
|
...Array.isArray(timePickerProps) ? void 0 : timePickerProps,
|
|
74214
74210
|
showIcon: false,
|
|
74215
74211
|
to: false,
|
|
@@ -74445,7 +74441,7 @@
|
|
|
74445
74441
|
NTimePicker,
|
|
74446
74442
|
{
|
|
74447
74443
|
placeholder: this.locale.selectTime,
|
|
74448
|
-
format: this.
|
|
74444
|
+
format: this.timePickerFormat,
|
|
74449
74445
|
size: this.timePickerSize,
|
|
74450
74446
|
...Array.isArray(timePickerProps) ? timePickerProps[0] : timePickerProps,
|
|
74451
74447
|
value: this.startTimeValue,
|
|
@@ -74479,7 +74475,7 @@
|
|
|
74479
74475
|
NTimePicker,
|
|
74480
74476
|
{
|
|
74481
74477
|
placeholder: this.locale.selectTime,
|
|
74482
|
-
format: this.
|
|
74478
|
+
format: this.timePickerFormat,
|
|
74483
74479
|
size: this.timePickerSize,
|
|
74484
74480
|
...Array.isArray(timePickerProps) ? timePickerProps[1] : timePickerProps,
|
|
74485
74481
|
disabled: this.isSelecting,
|
|
@@ -75082,7 +75078,7 @@
|
|
|
75082
75078
|
endPlaceholder: String,
|
|
75083
75079
|
format: String,
|
|
75084
75080
|
dateFormat: String,
|
|
75085
|
-
|
|
75081
|
+
timePickerFormat: String,
|
|
75086
75082
|
actions: Array,
|
|
75087
75083
|
shortcuts: Object,
|
|
75088
75084
|
isDateDisabled: Function,
|
|
@@ -76452,7 +76448,7 @@
|
|
|
76452
76448
|
onPrevMonth: this.onPrevMonth,
|
|
76453
76449
|
onNextYear: this.onNextYear,
|
|
76454
76450
|
onPrevYear: this.onPrevYear,
|
|
76455
|
-
|
|
76451
|
+
timePickerFormat: this.timePickerFormat,
|
|
76456
76452
|
dateFormat: this.dateFormat,
|
|
76457
76453
|
calendarDayFormat: this.calendarDayFormat,
|
|
76458
76454
|
calendarHeaderYearFormat: this.calendarHeaderYearFormat,
|
|
@@ -90861,10 +90857,19 @@
|
|
|
90861
90857
|
display: flex;
|
|
90862
90858
|
align-items: center;
|
|
90863
90859
|
gap: var(--n-gap);
|
|
90864
|
-
`, [cB("input", `
|
|
90865
|
-
|
|
90866
|
-
|
|
90867
|
-
|
|
90860
|
+
`, [cM("block", ``, [cB("input", ``, [cNotM("autosize", `
|
|
90861
|
+
text-align: center;
|
|
90862
|
+
min-width: 0;
|
|
90863
|
+
`), cM("autosize", `
|
|
90864
|
+
text-align: center;
|
|
90865
|
+
min-width: 0;
|
|
90866
|
+
`)])]), cNotM("block", ``, [cB("input", ``, [cNotM("autosize", `
|
|
90867
|
+
width: var(--n-input-width);
|
|
90868
|
+
text-align: center;
|
|
90869
|
+
`), cM("autosize", `
|
|
90870
|
+
width: var(--n-input-width);
|
|
90871
|
+
text-align: center;
|
|
90872
|
+
`)])])])]);
|
|
90868
90873
|
|
|
90869
90874
|
const inputOtpProps = {
|
|
90870
90875
|
...useTheme.props,
|
|
@@ -90874,6 +90879,7 @@
|
|
|
90874
90879
|
type: Number,
|
|
90875
90880
|
default: 6
|
|
90876
90881
|
},
|
|
90882
|
+
block: Boolean,
|
|
90877
90883
|
size: String,
|
|
90878
90884
|
disabled: Boolean,
|
|
90879
90885
|
mask: Boolean,
|
|
@@ -91018,6 +91024,9 @@
|
|
|
91018
91024
|
nTriggerFormChange();
|
|
91019
91025
|
}
|
|
91020
91026
|
const handlePaste = (e, index) => {
|
|
91027
|
+
if (props.readonly || mergedDisabledRef.value) {
|
|
91028
|
+
return;
|
|
91029
|
+
}
|
|
91021
91030
|
e.preventDefault();
|
|
91022
91031
|
const { clipboardData } = e;
|
|
91023
91032
|
const text = clipboardData?.getData("text");
|
|
@@ -91050,9 +91059,11 @@
|
|
|
91050
91059
|
}
|
|
91051
91060
|
};
|
|
91052
91061
|
const handleKeydown = (e, index) => {
|
|
91062
|
+
if (mergedDisabledRef.value)
|
|
91063
|
+
return;
|
|
91053
91064
|
const keyCode = e.code || e.key;
|
|
91054
91065
|
const currentValue = justifyValue(mergedValueRef.value);
|
|
91055
|
-
if (keyCode === "Backspace") {
|
|
91066
|
+
if (keyCode === "Backspace" && !props.readonly) {
|
|
91056
91067
|
e.preventDefault();
|
|
91057
91068
|
currentValue[Math.max(index, 0)] = "";
|
|
91058
91069
|
doUpdateValue(currentValue, { diff: "", index, source: "delete" });
|
|
@@ -91126,7 +91137,8 @@
|
|
|
91126
91137
|
class: [
|
|
91127
91138
|
`${mergedClsPrefix}-input-otp`,
|
|
91128
91139
|
themeClass,
|
|
91129
|
-
this.rtlEnabled && `${mergedClsPrefix}-input-otp--rtl
|
|
91140
|
+
this.rtlEnabled && `${mergedClsPrefix}-input-otp--rtl`,
|
|
91141
|
+
this.block && `${mergedClsPrefix}-input-otp--block`
|
|
91130
91142
|
]
|
|
91131
91143
|
},
|
|
91132
91144
|
repeat(this.length, void 0).map(
|
|
@@ -105433,7 +105445,6 @@
|
|
|
105433
105445
|
box-sizing: border-box;
|
|
105434
105446
|
padding: var(--n-node-wrapper-padding);
|
|
105435
105447
|
`), cB("tree-node", `
|
|
105436
|
-
transform: translate3d(0,0,0);
|
|
105437
105448
|
position: relative;
|
|
105438
105449
|
display: flex;
|
|
105439
105450
|
border-radius: var(--n-node-border-radius);
|
|
@@ -110862,7 +110873,7 @@
|
|
|
110862
110873
|
});
|
|
110863
110874
|
}
|
|
110864
110875
|
|
|
110865
|
-
var version = "2.
|
|
110876
|
+
var version = "2.42.0";
|
|
110866
110877
|
|
|
110867
110878
|
function create({
|
|
110868
110879
|
componentPrefix = "N",
|
package/dist/index.mjs
CHANGED
|
@@ -32122,7 +32122,6 @@ var style$1E = cB("base-icon", `
|
|
|
32122
32122
|
display: inline-block;
|
|
32123
32123
|
position: relative;
|
|
32124
32124
|
fill: currentColor;
|
|
32125
|
-
transform: translateZ(0);
|
|
32126
32125
|
`, [c$1("svg", `
|
|
32127
32126
|
height: 1em;
|
|
32128
32127
|
width: 1em;
|
|
@@ -40556,6 +40555,7 @@ const anchorLinkProps = {
|
|
|
40556
40555
|
var Link = defineComponent({
|
|
40557
40556
|
name: "AnchorLink",
|
|
40558
40557
|
props: anchorLinkProps,
|
|
40558
|
+
slots: Object,
|
|
40559
40559
|
setup(props, { slots }) {
|
|
40560
40560
|
const titleRef = ref(null);
|
|
40561
40561
|
const NAnchor = inject(anchorInjectionKey);
|
|
@@ -40598,7 +40598,9 @@ var Link = defineComponent({
|
|
|
40598
40598
|
title: getTitleAttribute(props.title),
|
|
40599
40599
|
onClick: handleClick
|
|
40600
40600
|
},
|
|
40601
|
-
|
|
40601
|
+
{
|
|
40602
|
+
default: () => resolveSlot(slots.title, () => [props.title])
|
|
40603
|
+
}
|
|
40602
40604
|
),
|
|
40603
40605
|
slots.default?.()
|
|
40604
40606
|
);
|
|
@@ -62956,14 +62958,10 @@ var style$12 = cB("radio", `
|
|
|
62956
62958
|
`), cB("radio-input", `
|
|
62957
62959
|
position: absolute;
|
|
62958
62960
|
border: 0;
|
|
62959
|
-
|
|
62960
|
-
|
|
62961
|
-
right: 0;
|
|
62962
|
-
top: 0;
|
|
62963
|
-
bottom: 0;
|
|
62961
|
+
width: 0;
|
|
62962
|
+
height: 0;
|
|
62964
62963
|
opacity: 0;
|
|
62965
|
-
|
|
62966
|
-
cursor: pointer;
|
|
62964
|
+
margin: 0;
|
|
62967
62965
|
`), cE("dot", `
|
|
62968
62966
|
position: absolute;
|
|
62969
62967
|
top: 50%;
|
|
@@ -63261,7 +63259,15 @@ var NRadio = defineComponent({
|
|
|
63261
63259
|
],
|
|
63262
63260
|
style: this.cssVars
|
|
63263
63261
|
},
|
|
63264
|
-
/* @__PURE__ */ h(
|
|
63262
|
+
/* @__PURE__ */ h("div", { class: `${mergedClsPrefix}-radio__dot-wrapper` }, "\xA0", /* @__PURE__ */ h(
|
|
63263
|
+
"div",
|
|
63264
|
+
{
|
|
63265
|
+
class: [
|
|
63266
|
+
`${mergedClsPrefix}-radio__dot`,
|
|
63267
|
+
this.renderSafeChecked && `${mergedClsPrefix}-radio__dot--checked`
|
|
63268
|
+
]
|
|
63269
|
+
}
|
|
63270
|
+
), /* @__PURE__ */ h(
|
|
63265
63271
|
"input",
|
|
63266
63272
|
{
|
|
63267
63273
|
ref: "inputRef",
|
|
@@ -63275,15 +63281,6 @@ var NRadio = defineComponent({
|
|
|
63275
63281
|
onFocus: this.handleRadioInputFocus,
|
|
63276
63282
|
onBlur: this.handleRadioInputBlur
|
|
63277
63283
|
}
|
|
63278
|
-
),
|
|
63279
|
-
/* @__PURE__ */ h("div", { class: `${mergedClsPrefix}-radio__dot-wrapper` }, "\xA0", /* @__PURE__ */ h(
|
|
63280
|
-
"div",
|
|
63281
|
-
{
|
|
63282
|
-
class: [
|
|
63283
|
-
`${mergedClsPrefix}-radio__dot`,
|
|
63284
|
-
this.renderSafeChecked && `${mergedClsPrefix}-radio__dot--checked`
|
|
63285
|
-
]
|
|
63286
|
-
}
|
|
63287
63284
|
)),
|
|
63288
63285
|
resolveWrappedSlot($slots.default, (children) => {
|
|
63289
63286
|
if (!children && !label)
|
|
@@ -64740,7 +64737,6 @@ var style$$ = cB("icon", `
|
|
|
64740
64737
|
display: inline-block;
|
|
64741
64738
|
position: relative;
|
|
64742
64739
|
fill: currentColor;
|
|
64743
|
-
transform: translateZ(0);
|
|
64744
64740
|
`, [cM("color-transition", {
|
|
64745
64741
|
transition: "color .3s var(--n-bezier)"
|
|
64746
64742
|
}), cM("depth", {
|
|
@@ -69486,7 +69482,7 @@ const usePanelCommonProps = {
|
|
|
69486
69482
|
type: Boolean,
|
|
69487
69483
|
default: void 0
|
|
69488
69484
|
},
|
|
69489
|
-
|
|
69485
|
+
timePickerFormat: {
|
|
69490
69486
|
type: String,
|
|
69491
69487
|
value: TIME_FORMAT
|
|
69492
69488
|
},
|
|
@@ -70934,7 +70930,7 @@ function useDualCalendar(props, type) {
|
|
|
70934
70930
|
if (typeof startTime !== "number") {
|
|
70935
70931
|
startTime = getTime(startTime);
|
|
70936
70932
|
}
|
|
70937
|
-
if (source !== "shortcutPreview") {
|
|
70933
|
+
if (source !== "shortcutPreview" && source !== "shortcutDone") {
|
|
70938
70934
|
let startDefaultTime;
|
|
70939
70935
|
let endDefaultTime;
|
|
70940
70936
|
if (type === "datetimerange") {
|
|
@@ -70956,7 +70952,7 @@ function useDualCalendar(props, type) {
|
|
|
70956
70952
|
endTime = getTime(set(endTime, endDefaultTime));
|
|
70957
70953
|
}
|
|
70958
70954
|
}
|
|
70959
|
-
panelCommon.doUpdateValue([startTime, endTime], props.panel && source === "done");
|
|
70955
|
+
panelCommon.doUpdateValue([startTime, endTime], props.panel && (source === "done" || source === "shortcutDone"));
|
|
70960
70956
|
}
|
|
70961
70957
|
function sanitizeValue(datetime) {
|
|
70962
70958
|
if (type === "datetimerange") {
|
|
@@ -71093,7 +71089,7 @@ function useDualCalendar(props, type) {
|
|
|
71093
71089
|
function handleRangeShortcutClick(shortcut) {
|
|
71094
71090
|
const shortcutValue = panelCommon.getShortcutValue(shortcut);
|
|
71095
71091
|
if (!Array.isArray(shortcutValue)) return;
|
|
71096
|
-
changeStartEndTime(shortcutValue[0], shortcutValue[1], "
|
|
71092
|
+
changeStartEndTime(shortcutValue[0], shortcutValue[1], "shortcutDone");
|
|
71097
71093
|
panelCommon.clearPendingValue();
|
|
71098
71094
|
handleConfirmClick();
|
|
71099
71095
|
}
|
|
@@ -74205,7 +74201,7 @@ var DatetimePanel = defineComponent({
|
|
|
74205
74201
|
{
|
|
74206
74202
|
size: this.timePickerSize,
|
|
74207
74203
|
placeholder: this.locale.selectTime,
|
|
74208
|
-
format: this.
|
|
74204
|
+
format: this.timePickerFormat,
|
|
74209
74205
|
...Array.isArray(timePickerProps) ? void 0 : timePickerProps,
|
|
74210
74206
|
showIcon: false,
|
|
74211
74207
|
to: false,
|
|
@@ -74441,7 +74437,7 @@ var DatetimerangePanel = defineComponent({
|
|
|
74441
74437
|
NTimePicker,
|
|
74442
74438
|
{
|
|
74443
74439
|
placeholder: this.locale.selectTime,
|
|
74444
|
-
format: this.
|
|
74440
|
+
format: this.timePickerFormat,
|
|
74445
74441
|
size: this.timePickerSize,
|
|
74446
74442
|
...Array.isArray(timePickerProps) ? timePickerProps[0] : timePickerProps,
|
|
74447
74443
|
value: this.startTimeValue,
|
|
@@ -74475,7 +74471,7 @@ var DatetimerangePanel = defineComponent({
|
|
|
74475
74471
|
NTimePicker,
|
|
74476
74472
|
{
|
|
74477
74473
|
placeholder: this.locale.selectTime,
|
|
74478
|
-
format: this.
|
|
74474
|
+
format: this.timePickerFormat,
|
|
74479
74475
|
size: this.timePickerSize,
|
|
74480
74476
|
...Array.isArray(timePickerProps) ? timePickerProps[1] : timePickerProps,
|
|
74481
74477
|
disabled: this.isSelecting,
|
|
@@ -75078,7 +75074,7 @@ const datePickerProps = {
|
|
|
75078
75074
|
endPlaceholder: String,
|
|
75079
75075
|
format: String,
|
|
75080
75076
|
dateFormat: String,
|
|
75081
|
-
|
|
75077
|
+
timePickerFormat: String,
|
|
75082
75078
|
actions: Array,
|
|
75083
75079
|
shortcuts: Object,
|
|
75084
75080
|
isDateDisabled: Function,
|
|
@@ -76448,7 +76444,7 @@ var DatePicker = defineComponent({
|
|
|
76448
76444
|
onPrevMonth: this.onPrevMonth,
|
|
76449
76445
|
onNextYear: this.onNextYear,
|
|
76450
76446
|
onPrevYear: this.onPrevYear,
|
|
76451
|
-
|
|
76447
|
+
timePickerFormat: this.timePickerFormat,
|
|
76452
76448
|
dateFormat: this.dateFormat,
|
|
76453
76449
|
calendarDayFormat: this.calendarDayFormat,
|
|
76454
76450
|
calendarHeaderYearFormat: this.calendarHeaderYearFormat,
|
|
@@ -90857,10 +90853,19 @@ var style$D = c$1([cB("input-otp", `
|
|
|
90857
90853
|
display: flex;
|
|
90858
90854
|
align-items: center;
|
|
90859
90855
|
gap: var(--n-gap);
|
|
90860
|
-
`, [cB("input", `
|
|
90861
|
-
|
|
90862
|
-
|
|
90863
|
-
|
|
90856
|
+
`, [cM("block", ``, [cB("input", ``, [cNotM("autosize", `
|
|
90857
|
+
text-align: center;
|
|
90858
|
+
min-width: 0;
|
|
90859
|
+
`), cM("autosize", `
|
|
90860
|
+
text-align: center;
|
|
90861
|
+
min-width: 0;
|
|
90862
|
+
`)])]), cNotM("block", ``, [cB("input", ``, [cNotM("autosize", `
|
|
90863
|
+
width: var(--n-input-width);
|
|
90864
|
+
text-align: center;
|
|
90865
|
+
`), cM("autosize", `
|
|
90866
|
+
width: var(--n-input-width);
|
|
90867
|
+
text-align: center;
|
|
90868
|
+
`)])])])]);
|
|
90864
90869
|
|
|
90865
90870
|
const inputOtpProps = {
|
|
90866
90871
|
...useTheme.props,
|
|
@@ -90870,6 +90875,7 @@ const inputOtpProps = {
|
|
|
90870
90875
|
type: Number,
|
|
90871
90876
|
default: 6
|
|
90872
90877
|
},
|
|
90878
|
+
block: Boolean,
|
|
90873
90879
|
size: String,
|
|
90874
90880
|
disabled: Boolean,
|
|
90875
90881
|
mask: Boolean,
|
|
@@ -91014,6 +91020,9 @@ var InputOtp = defineComponent({
|
|
|
91014
91020
|
nTriggerFormChange();
|
|
91015
91021
|
}
|
|
91016
91022
|
const handlePaste = (e, index) => {
|
|
91023
|
+
if (props.readonly || mergedDisabledRef.value) {
|
|
91024
|
+
return;
|
|
91025
|
+
}
|
|
91017
91026
|
e.preventDefault();
|
|
91018
91027
|
const { clipboardData } = e;
|
|
91019
91028
|
const text = clipboardData?.getData("text");
|
|
@@ -91046,9 +91055,11 @@ var InputOtp = defineComponent({
|
|
|
91046
91055
|
}
|
|
91047
91056
|
};
|
|
91048
91057
|
const handleKeydown = (e, index) => {
|
|
91058
|
+
if (mergedDisabledRef.value)
|
|
91059
|
+
return;
|
|
91049
91060
|
const keyCode = e.code || e.key;
|
|
91050
91061
|
const currentValue = justifyValue(mergedValueRef.value);
|
|
91051
|
-
if (keyCode === "Backspace") {
|
|
91062
|
+
if (keyCode === "Backspace" && !props.readonly) {
|
|
91052
91063
|
e.preventDefault();
|
|
91053
91064
|
currentValue[Math.max(index, 0)] = "";
|
|
91054
91065
|
doUpdateValue(currentValue, { diff: "", index, source: "delete" });
|
|
@@ -91122,7 +91133,8 @@ var InputOtp = defineComponent({
|
|
|
91122
91133
|
class: [
|
|
91123
91134
|
`${mergedClsPrefix}-input-otp`,
|
|
91124
91135
|
themeClass,
|
|
91125
|
-
this.rtlEnabled && `${mergedClsPrefix}-input-otp--rtl
|
|
91136
|
+
this.rtlEnabled && `${mergedClsPrefix}-input-otp--rtl`,
|
|
91137
|
+
this.block && `${mergedClsPrefix}-input-otp--block`
|
|
91126
91138
|
]
|
|
91127
91139
|
},
|
|
91128
91140
|
repeat(this.length, void 0).map(
|
|
@@ -105429,7 +105441,6 @@ var style$a = cB("tree", `
|
|
|
105429
105441
|
box-sizing: border-box;
|
|
105430
105442
|
padding: var(--n-node-wrapper-padding);
|
|
105431
105443
|
`), cB("tree-node", `
|
|
105432
|
-
transform: translate3d(0,0,0);
|
|
105433
105444
|
position: relative;
|
|
105434
105445
|
display: flex;
|
|
105435
105446
|
border-radius: var(--n-node-border-radius);
|
|
@@ -110858,7 +110869,7 @@ function useThemeVars() {
|
|
|
110858
110869
|
});
|
|
110859
110870
|
}
|
|
110860
110871
|
|
|
110861
|
-
var version = "2.
|
|
110872
|
+
var version = "2.42.0";
|
|
110862
110873
|
|
|
110863
110874
|
function create({
|
|
110864
110875
|
componentPrefix = "N",
|