naive-ui 2.32.2 → 2.33.2
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 +425 -248
- package/dist/index.prod.js +2 -2
- package/es/_internal/select-menu/src/SelectOption.js +1 -2
- package/es/_utils/cssr/index.js +1 -1
- package/es/calendar/src/Calendar.js +2 -1
- package/es/card/src/Card.d.ts +24 -1
- package/es/card/src/Card.js +8 -4
- package/es/card/src/styles/index.cssr.js +17 -8
- package/es/card/styles/dark.js +3 -1
- package/es/card/styles/light.d.ts +2 -0
- package/es/card/styles/light.js +1 -1
- package/es/countdown/src/Countdown.js +0 -5
- package/es/data-table/src/DataTable.d.ts +10 -0
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +1 -0
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +1 -0
- package/es/data-table/src/TableParts/Body.d.ts +1 -0
- package/es/data-table/src/TableParts/Cell.d.ts +2 -0
- package/es/data-table/src/TableParts/Header.d.ts +1 -0
- package/es/data-table/src/use-sorter.js +1 -1
- package/es/data-table/styles/light.d.ts +1 -0
- package/es/dialog/index.d.ts +1 -1
- package/es/dialog/index.js +1 -1
- package/es/dialog/src/DialogEnvironment.d.ts +3 -0
- package/es/dialog/src/DialogEnvironment.js +2 -2
- package/es/dialog/src/DialogProvider.d.ts +4 -0
- package/es/dialog/src/DialogProvider.js +2 -1
- package/es/dialog/src/composables.d.ts +4 -0
- package/es/dialog/src/composables.js +17 -0
- package/es/dialog/src/context.d.ts +2 -1
- package/es/dialog/src/context.js +1 -0
- package/es/form/src/FormItem.d.ts +1 -0
- package/es/form/src/FormItem.js +27 -18
- package/es/form/src/styles/form-item.cssr.js +41 -19
- package/es/form/src/utils.d.ts +1 -0
- package/es/form/src/utils.js +15 -10
- package/es/input/src/utils.js +1 -1
- package/es/locales/common/frFR.js +8 -11
- package/es/menu/src/Menu.d.ts +13 -0
- package/es/menu/src/Menu.js +7 -1
- package/es/modal/src/BodyWrapper.d.ts +2 -0
- package/es/modal/src/Modal.d.ts +18 -0
- package/es/modal/src/presetProps.d.ts +1 -1
- package/es/modal/styles/light.d.ts +2 -0
- package/es/pagination/src/Pagination.js +5 -1
- package/es/radio/src/Radio.d.ts +13 -32
- package/es/radio/src/Radio.js +7 -6
- package/es/radio/src/RadioButton.d.ts +6 -9
- package/es/radio/src/RadioButton.js +7 -11
- package/es/radio/src/RadioGroup.d.ts +17 -8
- package/es/radio/src/RadioGroup.js +2 -2
- package/es/radio/src/interface.d.ts +2 -2
- package/es/radio/src/styles/radio.cssr.js +4 -1
- package/es/radio/src/use-radio.d.ts +4 -32
- package/es/radio/src/use-radio.js +12 -10
- package/es/radio/styles/dark.js +1 -1
- package/es/radio/styles/light.d.ts +1 -0
- package/es/radio/styles/light.js +1 -1
- package/es/rate/src/Rate.d.ts +23 -14
- package/es/rate/src/Rate.js +32 -12
- package/es/rate/src/interface.d.ts +2 -0
- package/es/rate/src/interface.js +1 -0
- package/es/rate/src/styles/index.cssr.js +13 -13
- package/es/slider/src/Slider.d.ts +13 -0
- package/es/slider/src/Slider.js +6 -3
- package/es/theme-editor/src/MaximizeIcon.d.ts +1 -0
- package/es/theme-editor/src/MaximizeIcon.js +8 -0
- package/es/theme-editor/src/MinimizeIcon.d.ts +1 -0
- package/es/theme-editor/src/MinimizeIcon.js +8 -0
- package/es/theme-editor/src/ThemeEditor.d.ts +4 -0
- package/es/theme-editor/src/ThemeEditor.js +42 -18
- package/es/tree/src/styles/index.cssr.js +4 -3
- package/es/upload/src/interface.d.ts +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/select-menu/src/SelectOption.js +1 -2
- package/lib/_utils/cssr/index.js +2 -5
- package/lib/calendar/src/Calendar.js +2 -1
- package/lib/card/src/Card.d.ts +24 -1
- package/lib/card/src/Card.js +8 -4
- package/lib/card/src/styles/index.cssr.js +17 -8
- package/lib/card/styles/dark.js +3 -1
- package/lib/card/styles/light.d.ts +2 -0
- package/lib/card/styles/light.js +1 -1
- package/lib/countdown/src/Countdown.js +0 -5
- package/lib/data-table/src/DataTable.d.ts +10 -0
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +1 -0
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +1 -0
- package/lib/data-table/src/TableParts/Body.d.ts +1 -0
- package/lib/data-table/src/TableParts/Cell.d.ts +2 -0
- package/lib/data-table/src/TableParts/Header.d.ts +1 -0
- package/lib/data-table/src/use-sorter.js +1 -1
- package/lib/data-table/styles/light.d.ts +1 -0
- package/lib/dialog/index.d.ts +1 -1
- package/lib/dialog/index.js +4 -3
- package/lib/dialog/src/DialogEnvironment.d.ts +3 -0
- package/lib/dialog/src/DialogEnvironment.js +2 -2
- package/lib/dialog/src/DialogProvider.d.ts +4 -0
- package/lib/dialog/src/DialogProvider.js +1 -0
- package/lib/dialog/src/composables.d.ts +4 -0
- package/lib/dialog/src/{use-dialog.js → composables.js} +9 -1
- package/lib/dialog/src/context.d.ts +2 -1
- package/lib/dialog/src/context.js +2 -1
- package/lib/form/src/FormItem.d.ts +1 -0
- package/lib/form/src/FormItem.js +27 -18
- package/lib/form/src/styles/form-item.cssr.js +41 -19
- package/lib/form/src/utils.d.ts +1 -0
- package/lib/form/src/utils.js +15 -10
- package/lib/input/src/utils.js +1 -1
- package/lib/locales/common/frFR.js +8 -11
- package/lib/menu/src/Menu.d.ts +13 -0
- package/lib/menu/src/Menu.js +7 -1
- package/lib/modal/src/BodyWrapper.d.ts +2 -0
- package/lib/modal/src/Modal.d.ts +18 -0
- package/lib/modal/src/presetProps.d.ts +1 -1
- package/lib/modal/styles/light.d.ts +2 -0
- package/lib/pagination/src/Pagination.js +5 -1
- package/lib/radio/src/Radio.d.ts +13 -32
- package/lib/radio/src/Radio.js +7 -6
- package/lib/radio/src/RadioButton.d.ts +6 -9
- package/lib/radio/src/RadioButton.js +7 -14
- package/lib/radio/src/RadioGroup.d.ts +17 -8
- package/lib/radio/src/RadioGroup.js +2 -2
- package/lib/radio/src/interface.d.ts +2 -2
- package/lib/radio/src/styles/radio.cssr.js +4 -1
- package/lib/radio/src/use-radio.d.ts +4 -32
- package/lib/radio/src/use-radio.js +11 -9
- package/lib/radio/styles/dark.js +1 -1
- package/lib/radio/styles/light.d.ts +1 -0
- package/lib/radio/styles/light.js +1 -1
- package/lib/rate/src/Rate.d.ts +23 -14
- package/lib/rate/src/Rate.js +32 -12
- package/lib/rate/src/interface.d.ts +2 -0
- package/lib/rate/src/interface.js +2 -0
- package/lib/rate/src/styles/index.cssr.js +13 -13
- package/lib/slider/src/Slider.d.ts +13 -0
- package/lib/slider/src/Slider.js +6 -3
- package/lib/theme-editor/src/MaximizeIcon.d.ts +1 -0
- package/lib/theme-editor/src/MaximizeIcon.js +11 -0
- package/lib/theme-editor/src/MinimizeIcon.d.ts +1 -0
- package/lib/theme-editor/src/MinimizeIcon.js +11 -0
- package/lib/theme-editor/src/ThemeEditor.d.ts +4 -0
- package/lib/theme-editor/src/ThemeEditor.js +42 -18
- package/lib/tree/src/styles/index.cssr.js +4 -3
- package/lib/upload/src/interface.d.ts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +8 -7
- package/web-types.json +36 -5
- package/es/countdown/src/utils.d.ts +0 -0
- package/es/countdown/src/utils.js +0 -1
- package/es/dialog/src/use-dialog.d.ts +0 -2
- package/es/dialog/src/use-dialog.js +0 -10
- package/lib/countdown/src/utils.d.ts +0 -0
- package/lib/countdown/src/utils.js +0 -1
- package/lib/dialog/src/use-dialog.d.ts +0 -2
|
@@ -19,17 +19,17 @@ export default cB('rate', {
|
|
|
19
19
|
transform: scale(1);
|
|
20
20
|
font-size: var(--n-item-size);
|
|
21
21
|
color: var(--n-item-color);
|
|
22
|
-
`, [c('&:not(:first-child)',
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
`, [c('&:not(:first-child)', `
|
|
23
|
+
margin-left: 6px;
|
|
24
|
+
`), cM('active', `
|
|
25
|
+
color: var(--n-item-color-active);
|
|
26
|
+
`)]), cNotM('readonly', `
|
|
27
27
|
cursor: pointer;
|
|
28
|
-
`, [cE('item', [c('&:hover',
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
`, [cE('item', [c('&:hover', `
|
|
29
|
+
transform: scale(1.05);
|
|
30
|
+
`), c('&:active', `
|
|
31
|
+
transform: scale(0.96);
|
|
32
|
+
`)])]), cE('half', `
|
|
33
33
|
display: flex;
|
|
34
34
|
transition: inherit;
|
|
35
35
|
position: absolute;
|
|
@@ -39,6 +39,6 @@ export default cB('rate', {
|
|
|
39
39
|
width: 50%;
|
|
40
40
|
overflow: hidden;
|
|
41
41
|
color: rgba(255, 255, 255, 0);
|
|
42
|
-
`, [cM('active',
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
`, [cM('active', `
|
|
43
|
+
color: var(--n-item-color-active);
|
|
44
|
+
`)])]);
|
|
@@ -21,6 +21,10 @@ export declare const sliderProps: {
|
|
|
21
21
|
readonly default: undefined;
|
|
22
22
|
};
|
|
23
23
|
readonly formatTooltip: PropType<(value: number) => string | number>;
|
|
24
|
+
readonly keyboard: {
|
|
25
|
+
readonly type: BooleanConstructor;
|
|
26
|
+
readonly default: true;
|
|
27
|
+
};
|
|
24
28
|
readonly min: {
|
|
25
29
|
readonly type: NumberConstructor;
|
|
26
30
|
readonly default: 0;
|
|
@@ -152,6 +156,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
152
156
|
readonly default: undefined;
|
|
153
157
|
};
|
|
154
158
|
readonly formatTooltip: PropType<(value: number) => string | number>;
|
|
159
|
+
readonly keyboard: {
|
|
160
|
+
readonly type: BooleanConstructor;
|
|
161
|
+
readonly default: true;
|
|
162
|
+
};
|
|
155
163
|
readonly min: {
|
|
156
164
|
readonly type: NumberConstructor;
|
|
157
165
|
readonly default: 0;
|
|
@@ -357,6 +365,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
357
365
|
readonly default: undefined;
|
|
358
366
|
};
|
|
359
367
|
readonly formatTooltip: PropType<(value: number) => string | number>;
|
|
368
|
+
readonly keyboard: {
|
|
369
|
+
readonly type: BooleanConstructor;
|
|
370
|
+
readonly default: true;
|
|
371
|
+
};
|
|
360
372
|
readonly min: {
|
|
361
373
|
readonly type: NumberConstructor;
|
|
362
374
|
readonly default: 0;
|
|
@@ -482,6 +494,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
482
494
|
readonly min: number;
|
|
483
495
|
readonly to: string | boolean | HTMLElement;
|
|
484
496
|
readonly defaultValue: number | number[];
|
|
497
|
+
readonly keyboard: boolean;
|
|
485
498
|
readonly showTooltip: boolean | undefined;
|
|
486
499
|
}>;
|
|
487
500
|
export default _default;
|
package/es/slider/src/Slider.js
CHANGED
|
@@ -15,7 +15,10 @@ export const sliderProps = Object.assign(Object.assign({}, useTheme.props), { to
|
|
|
15
15
|
}, marks: Object, disabled: {
|
|
16
16
|
type: Boolean,
|
|
17
17
|
default: undefined
|
|
18
|
-
}, formatTooltip: Function,
|
|
18
|
+
}, formatTooltip: Function, keyboard: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: true
|
|
21
|
+
}, min: {
|
|
19
22
|
type: Number,
|
|
20
23
|
default: 0
|
|
21
24
|
}, max: {
|
|
@@ -256,7 +259,7 @@ export default defineComponent({
|
|
|
256
259
|
return Number(newValue.toFixed(precisionRef.value));
|
|
257
260
|
}
|
|
258
261
|
function getClosestMark(currentValue, markValues = markValuesRef.value, buffer) {
|
|
259
|
-
if (!markValues ||
|
|
262
|
+
if (!(markValues === null || markValues === void 0 ? void 0 : markValues.length))
|
|
260
263
|
return null;
|
|
261
264
|
let closestMark = null;
|
|
262
265
|
let index = -1;
|
|
@@ -296,7 +299,7 @@ export default defineComponent({
|
|
|
296
299
|
}
|
|
297
300
|
// dom event handle
|
|
298
301
|
function handleRailKeyDown(e) {
|
|
299
|
-
if (mergedDisabledRef.value)
|
|
302
|
+
if (mergedDisabledRef.value || !props.keyboard)
|
|
300
303
|
return;
|
|
301
304
|
const { vertical, reverse } = props;
|
|
302
305
|
switch (e.key) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MaximizeIcon: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { h, defineComponent } from 'vue';
|
|
2
|
+
export const MaximizeIcon = defineComponent({
|
|
3
|
+
render() {
|
|
4
|
+
return (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16" },
|
|
5
|
+
h("g", { fill: "none" },
|
|
6
|
+
h("path", { d: "M8.5 2a.5.5 0 0 0 0 1h3.793L3 12.293V8.5a.5.5 0 0 0-1 0v4.9a.6.6 0 0 0 .6.6h4.9a.5.5 0 0 0 0-1H3.707L13 3.707V7.5a.5.5 0 0 0 1 0V2.6a.6.6 0 0 0-.6-.6H8.5z", fill: "currentColor" }))));
|
|
7
|
+
}
|
|
8
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MinimizeIcon: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { h, defineComponent } from 'vue';
|
|
2
|
+
export const MinimizeIcon = defineComponent({
|
|
3
|
+
render() {
|
|
4
|
+
return (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" },
|
|
5
|
+
h("path", { d: "M4 18v2h6.586L2 28.582L3.414 30L12 21.414V28h2V18H4z", fill: "currentColor" }),
|
|
6
|
+
h("path", { d: "M30 3.416L28.592 2L20 10.586V4h-2v10h10v-2h-6.586L30 3.416z", fill: "currentColor" })));
|
|
7
|
+
}
|
|
8
|
+
});
|
|
@@ -130,5 +130,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
130
130
|
handleExportClick: () => void;
|
|
131
131
|
handleImportClick: () => void;
|
|
132
132
|
handleInputFileChange: () => void;
|
|
133
|
+
toggleMaximized: () => void;
|
|
134
|
+
isMaximized: import("vue").Ref<{
|
|
135
|
+
valueOf: () => boolean;
|
|
136
|
+
}>;
|
|
133
137
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
134
138
|
export default _default;
|
|
@@ -7,6 +7,7 @@ import { NPopover } from '../../popover';
|
|
|
7
7
|
import { NCollapse, NCollapseItem } from '../../collapse';
|
|
8
8
|
import { NInput } from '../../input';
|
|
9
9
|
import { NSpace } from '../../space';
|
|
10
|
+
import { NGrid, NGi } from '../../grid';
|
|
10
11
|
import { useLocale } from '../../_mixins';
|
|
11
12
|
import { NElement } from '../../element';
|
|
12
13
|
import { NDivider } from '../../divider';
|
|
@@ -14,6 +15,9 @@ import { NButton } from '../../button';
|
|
|
14
15
|
import { NColorPicker } from '../../color-picker';
|
|
15
16
|
import { NEmpty } from '../../empty';
|
|
16
17
|
import { lockHtmlScrollRightCompensationRef } from '../../_utils';
|
|
18
|
+
import { NIcon } from '../../icon';
|
|
19
|
+
import { MaximizeIcon } from './MaximizeIcon';
|
|
20
|
+
import { MinimizeIcon } from './MinimizeIcon';
|
|
17
21
|
const ColorWandIcon = (h("svg", { viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: '1em', height: '1em', color: 'currentColor' } },
|
|
18
22
|
h("path", { d: "M13.5 1C13.7761 1 14 1.22386 14 1.5V2H14.5C14.7761 2 15 2.22386 15 2.5C15 2.77614 14.7761 3 14.5 3H14V3.5C14 3.77614 13.7761 4 13.5 4C13.2239 4 13 3.77614 13 3.5V3H12.5C12.2239 3 12 2.77614 12 2.5C12 2.22386 12.2239 2 12.5 2H13V1.5C13 1.22386 13.2239 1 13.5 1Z", fill: "currentColor" }),
|
|
19
23
|
h("path", { d: "M3.5 3C3.77615 3 4 3.22386 4 3.5V4H4.5C4.77615 4 5 4.22386 5 4.5C5 4.77614 4.77615 5 4.5 5H4V5.5C4 5.77614 3.77615 6 3.5 6C3.22386 6 3 5.77614 3 5.5V5H2.5C2.22386 5 2 4.77614 2 4.5C2 4.22386 2.22386 4 2.5 4H3V3.5C3 3.22386 3.22386 3 3.5 3Z", fill: "currentColor" }),
|
|
@@ -31,6 +35,7 @@ export default defineComponent({
|
|
|
31
35
|
name: 'ThemeEditor',
|
|
32
36
|
inheritAttrs: false,
|
|
33
37
|
setup() {
|
|
38
|
+
const isMaximized = ref(false);
|
|
34
39
|
const fileInputRef = ref(null);
|
|
35
40
|
const NConfigProvider = inject(configProviderInjectionKey, null);
|
|
36
41
|
const theme = computed(() => {
|
|
@@ -91,6 +96,9 @@ export default defineComponent({
|
|
|
91
96
|
return;
|
|
92
97
|
fileInput.click();
|
|
93
98
|
}
|
|
99
|
+
function toggleMaximized() {
|
|
100
|
+
isMaximized.value = !isMaximized.value;
|
|
101
|
+
}
|
|
94
102
|
function handleInputFileChange() {
|
|
95
103
|
const { value: fileInput } = fileInputRef;
|
|
96
104
|
if (!fileInput)
|
|
@@ -143,7 +151,9 @@ export default defineComponent({
|
|
|
143
151
|
handleClearAllClick,
|
|
144
152
|
handleExportClick,
|
|
145
153
|
handleImportClick,
|
|
146
|
-
handleInputFileChange
|
|
154
|
+
handleInputFileChange,
|
|
155
|
+
toggleMaximized,
|
|
156
|
+
isMaximized
|
|
147
157
|
};
|
|
148
158
|
},
|
|
149
159
|
render() {
|
|
@@ -152,7 +162,7 @@ export default defineComponent({
|
|
|
152
162
|
var _a, _b;
|
|
153
163
|
return [
|
|
154
164
|
h(NPopover, { scrollable: true, arrowPointToCenter: true, trigger: "manual", show: this.showPanel, displayDirective: "show", placement: "top-end", style: {
|
|
155
|
-
width: '288px',
|
|
165
|
+
width: this.isMaximized ? 'calc(100vw - 80px)' : '288px',
|
|
156
166
|
height: 'calc(100vh - 200px)',
|
|
157
167
|
padding: 0
|
|
158
168
|
} }, {
|
|
@@ -192,12 +202,20 @@ export default defineComponent({
|
|
|
192
202
|
visibility: 'hidden'
|
|
193
203
|
}, onChange: this.handleInputFileChange }),
|
|
194
204
|
h(NSpace, { vertical: true }, {
|
|
195
|
-
default: () =>
|
|
196
|
-
h("
|
|
205
|
+
default: () => [
|
|
206
|
+
h(NSpace, { align: "center", justify: "space-between", style: {
|
|
197
207
|
marginBottom: '8px',
|
|
198
208
|
fontSize: '18px',
|
|
199
209
|
fontWeight: 500
|
|
200
|
-
} },
|
|
210
|
+
} }, {
|
|
211
|
+
default: () => (h(Fragment, null,
|
|
212
|
+
h("span", null, this.locale.title),
|
|
213
|
+
h(NButton, { onClick: this.toggleMaximized, secondary: true, circle: true, size: "tiny" }, {
|
|
214
|
+
icon: () => (h(NIcon, { component: this.isMaximized
|
|
215
|
+
? MinimizeIcon
|
|
216
|
+
: MaximizeIcon }))
|
|
217
|
+
})))
|
|
218
|
+
}),
|
|
201
219
|
this.locale.filterCompName,
|
|
202
220
|
h(NInput, { onChange: () => {
|
|
203
221
|
this.compNamePattern = this.tempCompNamePattern;
|
|
@@ -227,7 +245,8 @@ export default defineComponent({
|
|
|
227
245
|
h(NButton, { block: true, size: "small", onClick: this.handleExportClick }, {
|
|
228
246
|
default: () => this.locale.export
|
|
229
247
|
})))
|
|
230
|
-
})
|
|
248
|
+
})
|
|
249
|
+
]
|
|
231
250
|
}),
|
|
232
251
|
h(NDivider, null),
|
|
233
252
|
h(NCollapse, null, {
|
|
@@ -261,16 +280,20 @@ export default defineComponent({
|
|
|
261
280
|
}
|
|
262
281
|
filteredItemsCount += 1;
|
|
263
282
|
return (h(NCollapseItem, { title: themeKey, name: themeKey }, {
|
|
264
|
-
default: () => {
|
|
265
|
-
|
|
266
|
-
|
|
283
|
+
default: () => (h(NGrid, { xGap: 32, yGap: 16, responsive: "screen", cols: this.isMaximized
|
|
284
|
+
? '1 xs:1 s:2 m:3 l:4'
|
|
285
|
+
: 1 }, {
|
|
286
|
+
default: () => varKeys.map((varKey) => (h(NGi, null, {
|
|
287
|
+
default: () => {
|
|
267
288
|
var _a, _b, _c, _d;
|
|
268
|
-
return
|
|
289
|
+
return (h(Fragment, null,
|
|
269
290
|
h("div", { key: `${varKey}Label`, style: {
|
|
270
291
|
wordBreak: 'break-word'
|
|
271
292
|
} }, varKey),
|
|
272
|
-
showColorPicker(varKey) ? (h(NColorPicker, { key: varKey, modes: ['rgb', 'hex'], value: ((_b = (_a = this
|
|
273
|
-
|
|
293
|
+
showColorPicker(varKey) ? (h(NColorPicker, { key: varKey, modes: ['rgb', 'hex'], value: ((_b = (_a = this
|
|
294
|
+
.tempOverrides) === null || _a === void 0 ? void 0 : _a[themeKey]) === null || _b === void 0 ? void 0 : _b[varKey]) ||
|
|
295
|
+
componentTheme[varKey], onComplete: this
|
|
296
|
+
.applyTempOverrides, onUpdateValue: (value) => {
|
|
274
297
|
this.setTempOverrides(themeKey, varKey, value);
|
|
275
298
|
} }, {
|
|
276
299
|
action: () => {
|
|
@@ -285,13 +308,14 @@ export default defineComponent({
|
|
|
285
308
|
.restore
|
|
286
309
|
}));
|
|
287
310
|
}
|
|
288
|
-
})) : (h(NInput, { key: varKey, onChange: this
|
|
311
|
+
})) : (h(NInput, { key: varKey, onChange: this
|
|
312
|
+
.applyTempOverrides, onUpdateValue: (value) => {
|
|
289
313
|
this.setTempOverrides(themeKey, varKey, value);
|
|
290
|
-
}, value: ((_d = (_c = this
|
|
291
|
-
|
|
292
|
-
}
|
|
293
|
-
}))
|
|
294
|
-
}
|
|
314
|
+
}, value: ((_d = (_c = this
|
|
315
|
+
.tempOverrides) === null || _c === void 0 ? void 0 : _c[themeKey]) === null || _d === void 0 ? void 0 : _d[varKey]) || '', placeholder: componentTheme[varKey] }))));
|
|
316
|
+
}
|
|
317
|
+
})))
|
|
318
|
+
}))
|
|
295
319
|
}));
|
|
296
320
|
});
|
|
297
321
|
if (!filteredItemsCount)
|
|
@@ -45,8 +45,8 @@ export default cB('tree', `
|
|
|
45
45
|
`)]), cNotM('disabled', [cM('clickable', [cB('tree-node-content', `
|
|
46
46
|
cursor: pointer;
|
|
47
47
|
`)])])]), cM('block-node', [cB('tree-node-content', `
|
|
48
|
-
flex
|
|
49
|
-
|
|
48
|
+
flex: 1;
|
|
49
|
+
min-width: 0;
|
|
50
50
|
`)]), cNotM('block-line', [cB('tree-node', [cNotM('disabled', [cB('tree-node-content', [c('&:hover', {
|
|
51
51
|
backgroundColor: 'var(--n-node-color-hover)'
|
|
52
52
|
})]), cM('selectable', [cB('tree-node-content', [c('&:active', {
|
|
@@ -131,7 +131,8 @@ export default cB('tree', `
|
|
|
131
131
|
`), cE('text', `
|
|
132
132
|
border-bottom: 1px solid #0000;
|
|
133
133
|
transition: border-color .3s var(--n-bezier);
|
|
134
|
-
flex-grow:1;
|
|
134
|
+
flex-grow: 1;
|
|
135
|
+
max-width: 100%;
|
|
135
136
|
`), cE('suffix', `
|
|
136
137
|
display: inline-flex;
|
|
137
138
|
`)]), cE('empty', 'margin: auto;')]);
|
|
@@ -95,7 +95,7 @@ export interface UploadInst {
|
|
|
95
95
|
export declare type OnBeforeUpload = (data: {
|
|
96
96
|
file: SettledFileInfo;
|
|
97
97
|
fileList: SettledFileInfo[];
|
|
98
|
-
}) => Promise<
|
|
98
|
+
}) => Promise<boolean | void> | boolean | void;
|
|
99
99
|
export declare type ListType = 'text' | 'image' | 'image-card';
|
|
100
100
|
export declare type OnPreview = (file: SettledFileInfo) => void;
|
|
101
101
|
export declare type CreateThumbnailUrl = (file: File) => Promise<string>;
|
package/es/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "2.
|
|
1
|
+
declare const _default: "2.33.2";
|
|
2
2
|
export default _default;
|
package/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '2.
|
|
1
|
+
export default '2.33.2';
|
|
@@ -6,11 +6,10 @@ const _utils_1 = require("../../../_utils");
|
|
|
6
6
|
const icons_1 = require("../../icons");
|
|
7
7
|
const icon_1 = require("../../icon");
|
|
8
8
|
const interface_1 = require("./interface");
|
|
9
|
-
const checkMarkIcon = (0, vue_1.h)(icons_1.CheckmarkIcon);
|
|
10
9
|
function renderCheckMark(show, clsPrefix) {
|
|
11
10
|
return ((0, vue_1.h)(vue_1.Transition, { name: "fade-in-scale-up-transition" }, {
|
|
12
11
|
default: () => show ? ((0, vue_1.h)(icon_1.NBaseIcon, { clsPrefix: clsPrefix, class: `${clsPrefix}-base-select-option__check` }, {
|
|
13
|
-
default: () =>
|
|
12
|
+
default: () => (0, vue_1.h)(icons_1.CheckmarkIcon)
|
|
14
13
|
})) : null
|
|
15
14
|
}));
|
|
16
15
|
}
|
package/lib/_utils/cssr/index.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.createKey = exports.find = exports.namespace = exports.prefix = exports.asModal = exports.insidePopover = exports.insideModal = exports.cCB = exports.cNotM = exports.cM = exports.cE = exports.cB = exports.c = void 0;
|
|
7
4
|
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
8
5
|
const css_render_1 = require("css-render");
|
|
9
|
-
const plugin_bem_1 =
|
|
6
|
+
const plugin_bem_1 = require("@css-render/plugin-bem");
|
|
10
7
|
const namespace = 'n';
|
|
11
8
|
exports.namespace = namespace;
|
|
12
9
|
const prefix = `.${namespace}-`;
|
|
@@ -14,7 +11,7 @@ exports.prefix = prefix;
|
|
|
14
11
|
const elementPrefix = '__';
|
|
15
12
|
const modifierPrefix = '--';
|
|
16
13
|
const cssr = (0, css_render_1.CssRender)();
|
|
17
|
-
const plugin = (0, plugin_bem_1.
|
|
14
|
+
const plugin = (0, plugin_bem_1.plugin)({
|
|
18
15
|
blockPrefix: prefix,
|
|
19
16
|
elementPrefix,
|
|
20
17
|
modifierPrefix
|
|
@@ -24,12 +24,13 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
24
24
|
name: 'Calendar',
|
|
25
25
|
props: exports.calendarProps,
|
|
26
26
|
setup(props) {
|
|
27
|
+
var _a;
|
|
27
28
|
const { mergedClsPrefixRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
|
|
28
29
|
const themeRef = (0, _mixins_1.useTheme)('Calendar', '-calendar', index_cssr_1.default, styles_1.calendarLight, props, mergedClsPrefixRef);
|
|
29
30
|
const { localeRef, dateLocaleRef } = (0, _mixins_1.useLocale)('DatePicker');
|
|
30
31
|
const now = Date.now();
|
|
31
32
|
// ts => timestamp
|
|
32
|
-
const monthTsRef = (0, vue_1.ref)((0, date_fns_1.startOfMonth)(now).valueOf());
|
|
33
|
+
const monthTsRef = (0, vue_1.ref)((0, date_fns_1.startOfMonth)((_a = props.defaultValue) !== null && _a !== void 0 ? _a : now).valueOf());
|
|
33
34
|
const uncontrolledValueRef = (0, vue_1.ref)(props.defaultValue || null);
|
|
34
35
|
const mergedValueRef = (0, vooks_1.useMergedState)((0, vue_1.toRef)(props, 'value'), uncontrolledValueRef);
|
|
35
36
|
function doUpdateValue(value, time) {
|
package/lib/card/src/Card.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export declare const cardBaseProps: {
|
|
|
32
32
|
readonly role: StringConstructor;
|
|
33
33
|
readonly onClose: PropType<MaybeArray<() => void>>;
|
|
34
34
|
};
|
|
35
|
-
export declare const cardBasePropKeys: ("size" | "title" | "role" | "bordered" | "closable" | "contentStyle" | "onClose" | "headerStyle" | "footerStyle" | "hoverable" | "
|
|
35
|
+
export declare const cardBasePropKeys: ("size" | "title" | "role" | "bordered" | "closable" | "contentStyle" | "onClose" | "headerStyle" | "footerStyle" | "hoverable" | "embedded" | "headerExtraStyle" | "segmented")[];
|
|
36
36
|
export declare const cardProps: {
|
|
37
37
|
title: StringConstructor;
|
|
38
38
|
contentStyle: PropType<string | CSSProperties>;
|
|
@@ -66,6 +66,8 @@ export declare const cardProps: {
|
|
|
66
66
|
colorPopover: string;
|
|
67
67
|
colorTarget: string;
|
|
68
68
|
colorEmbedded: string;
|
|
69
|
+
colorEmbeddedModal: string;
|
|
70
|
+
colorEmbeddedPopover: string;
|
|
69
71
|
textColor: string;
|
|
70
72
|
titleTextColor: string;
|
|
71
73
|
borderColor: string;
|
|
@@ -101,6 +103,8 @@ export declare const cardProps: {
|
|
|
101
103
|
colorPopover: string;
|
|
102
104
|
colorTarget: string;
|
|
103
105
|
colorEmbedded: string;
|
|
106
|
+
colorEmbeddedModal: string;
|
|
107
|
+
colorEmbeddedPopover: string;
|
|
104
108
|
textColor: string;
|
|
105
109
|
titleTextColor: string;
|
|
106
110
|
borderColor: string;
|
|
@@ -136,6 +140,8 @@ export declare const cardProps: {
|
|
|
136
140
|
colorPopover: string;
|
|
137
141
|
colorTarget: string;
|
|
138
142
|
colorEmbedded: string;
|
|
143
|
+
colorEmbeddedModal: string;
|
|
144
|
+
colorEmbeddedPopover: string;
|
|
139
145
|
textColor: string;
|
|
140
146
|
titleTextColor: string;
|
|
141
147
|
borderColor: string;
|
|
@@ -199,6 +205,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
199
205
|
colorPopover: string;
|
|
200
206
|
colorTarget: string;
|
|
201
207
|
colorEmbedded: string;
|
|
208
|
+
colorEmbeddedModal: string;
|
|
209
|
+
colorEmbeddedPopover: string;
|
|
202
210
|
textColor: string;
|
|
203
211
|
titleTextColor: string;
|
|
204
212
|
borderColor: string;
|
|
@@ -234,6 +242,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
234
242
|
colorPopover: string;
|
|
235
243
|
colorTarget: string;
|
|
236
244
|
colorEmbedded: string;
|
|
245
|
+
colorEmbeddedModal: string;
|
|
246
|
+
colorEmbeddedPopover: string;
|
|
237
247
|
textColor: string;
|
|
238
248
|
titleTextColor: string;
|
|
239
249
|
borderColor: string;
|
|
@@ -269,6 +279,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
269
279
|
colorPopover: string;
|
|
270
280
|
colorTarget: string;
|
|
271
281
|
colorEmbedded: string;
|
|
282
|
+
colorEmbeddedModal: string;
|
|
283
|
+
colorEmbeddedPopover: string;
|
|
272
284
|
textColor: string;
|
|
273
285
|
titleTextColor: string;
|
|
274
286
|
borderColor: string;
|
|
@@ -413,6 +425,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
413
425
|
colorPopover: string;
|
|
414
426
|
colorTarget: string;
|
|
415
427
|
colorEmbedded: string;
|
|
428
|
+
colorEmbeddedModal: string;
|
|
429
|
+
colorEmbeddedPopover: string;
|
|
416
430
|
textColor: string;
|
|
417
431
|
titleTextColor: string;
|
|
418
432
|
borderColor: string;
|
|
@@ -453,6 +467,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
453
467
|
'--n-color': string;
|
|
454
468
|
'--n-color-modal': string;
|
|
455
469
|
'--n-color-popover': string;
|
|
470
|
+
'--n-color-embedded': string;
|
|
471
|
+
'--n-color-embedded-modal': string;
|
|
472
|
+
'--n-color-embedded-popover': string;
|
|
456
473
|
'--n-color-target': string;
|
|
457
474
|
'--n-text-color': string;
|
|
458
475
|
'--n-line-height': string;
|
|
@@ -510,6 +527,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
510
527
|
colorPopover: string;
|
|
511
528
|
colorTarget: string;
|
|
512
529
|
colorEmbedded: string;
|
|
530
|
+
colorEmbeddedModal: string;
|
|
531
|
+
colorEmbeddedPopover: string;
|
|
513
532
|
textColor: string;
|
|
514
533
|
titleTextColor: string;
|
|
515
534
|
borderColor: string;
|
|
@@ -545,6 +564,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
545
564
|
colorPopover: string;
|
|
546
565
|
colorTarget: string;
|
|
547
566
|
colorEmbedded: string;
|
|
567
|
+
colorEmbeddedModal: string;
|
|
568
|
+
colorEmbeddedPopover: string;
|
|
548
569
|
textColor: string;
|
|
549
570
|
titleTextColor: string;
|
|
550
571
|
borderColor: string;
|
|
@@ -580,6 +601,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
580
601
|
colorPopover: string;
|
|
581
602
|
colorTarget: string;
|
|
582
603
|
colorEmbedded: string;
|
|
604
|
+
colorEmbeddedModal: string;
|
|
605
|
+
colorEmbeddedPopover: string;
|
|
583
606
|
textColor: string;
|
|
584
607
|
titleTextColor: string;
|
|
585
608
|
borderColor: string;
|
package/lib/card/src/Card.js
CHANGED
|
@@ -55,14 +55,17 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
55
55
|
const rtlEnabledRef = (0, use_rtl_1.useRtl)('Card', mergedRtlRef, mergedClsPrefixRef);
|
|
56
56
|
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
57
57
|
const { size } = props;
|
|
58
|
-
const { self: { color, colorModal, colorTarget, textColor, titleTextColor, titleFontWeight, borderColor, actionColor, borderRadius, lineHeight, closeIconColor, closeIconColorHover, closeIconColorPressed, closeColorHover, closeColorPressed, closeBorderRadius, closeIconSize, closeSize, boxShadow, colorPopover, colorEmbedded, [(0, _utils_1.createKey)('padding', size)]: padding, [(0, _utils_1.createKey)('fontSize', size)]: fontSize, [(0, _utils_1.createKey)('titleFontSize', size)]: titleFontSize }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
58
|
+
const { self: { color, colorModal, colorTarget, textColor, titleTextColor, titleFontWeight, borderColor, actionColor, borderRadius, lineHeight, closeIconColor, closeIconColorHover, closeIconColorPressed, closeColorHover, closeColorPressed, closeBorderRadius, closeIconSize, closeSize, boxShadow, colorPopover, colorEmbedded, colorEmbeddedModal, colorEmbeddedPopover, [(0, _utils_1.createKey)('padding', size)]: padding, [(0, _utils_1.createKey)('fontSize', size)]: fontSize, [(0, _utils_1.createKey)('titleFontSize', size)]: titleFontSize }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
59
59
|
const { top: paddingTop, left: paddingLeft, bottom: paddingBottom } = (0, seemly_1.getPadding)(padding);
|
|
60
60
|
return {
|
|
61
61
|
'--n-bezier': cubicBezierEaseInOut,
|
|
62
62
|
'--n-border-radius': borderRadius,
|
|
63
|
-
'--n-color':
|
|
63
|
+
'--n-color': color,
|
|
64
64
|
'--n-color-modal': colorModal,
|
|
65
65
|
'--n-color-popover': colorPopover,
|
|
66
|
+
'--n-color-embedded': colorEmbedded,
|
|
67
|
+
'--n-color-embedded-modal': colorEmbeddedModal,
|
|
68
|
+
'--n-color-embedded-popover': colorEmbeddedPopover,
|
|
66
69
|
'--n-color-target': colorTarget,
|
|
67
70
|
'--n-text-color': textColor,
|
|
68
71
|
'--n-line-height': lineHeight,
|
|
@@ -103,11 +106,12 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
103
106
|
};
|
|
104
107
|
},
|
|
105
108
|
render() {
|
|
106
|
-
const { segmented, bordered, hoverable, mergedClsPrefix, rtlEnabled, onRender, $slots } = this;
|
|
109
|
+
const { segmented, bordered, hoverable, mergedClsPrefix, rtlEnabled, onRender, embedded, $slots } = this;
|
|
107
110
|
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
108
111
|
return ((0, vue_1.h)("div", { class: [
|
|
109
112
|
`${mergedClsPrefix}-card`,
|
|
110
113
|
this.themeClass,
|
|
114
|
+
embedded && `${mergedClsPrefix}-card--embedded`,
|
|
111
115
|
{
|
|
112
116
|
[`${mergedClsPrefix}-card--rtl`]: rtlEnabled,
|
|
113
117
|
[`${mergedClsPrefix}-card--content${typeof segmented !== 'boolean' && segmented.content === 'soft'
|
|
@@ -124,7 +128,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
124
128
|
(0, _utils_1.resolveWrappedSlot)($slots.cover, (children) => children && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-cover`, role: "none" }, children))),
|
|
125
129
|
(0, _utils_1.resolveWrappedSlot)($slots.header, (children) => {
|
|
126
130
|
return children || this.title || this.closable ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-header`, style: this.headerStyle },
|
|
127
|
-
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-header__main`, role: "heading" }, children ||
|
|
131
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-header__main`, role: "heading" }, children || this.title),
|
|
128
132
|
(0, _utils_1.resolveWrappedSlot)($slots['header-extra'], (children) => children && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-header__extra`, style: this.headerExtraStyle }, children))),
|
|
129
133
|
this.closable ? ((0, vue_1.h)(_internal_1.NBaseClose, { clsPrefix: mergedClsPrefix, class: `${mergedClsPrefix}-card-header__close`, onClick: this.handleCloseClick, absolute: true })) : null)) : null;
|
|
130
134
|
}),
|
|
@@ -29,6 +29,9 @@ const cssr_1 = require("../../../_utils/cssr"); // vars:
|
|
|
29
29
|
// --n-close-icon-color-pressed
|
|
30
30
|
// --n-border-color
|
|
31
31
|
// --n-box-shadow
|
|
32
|
+
// --n-color-embedded
|
|
33
|
+
// --n-color-embedded-modal
|
|
34
|
+
// --n-color-embedded-popover
|
|
32
35
|
|
|
33
36
|
|
|
34
37
|
exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('card', `
|
|
@@ -48,7 +51,9 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('card', `
|
|
|
48
51
|
background-color .3s var(--n-bezier),
|
|
49
52
|
box-shadow .3s var(--n-bezier),
|
|
50
53
|
border-color .3s var(--n-bezier);
|
|
51
|
-
`, [(0, cssr_1.
|
|
54
|
+
`, [(0, cssr_1.asModal)({
|
|
55
|
+
background: 'var(--n-color-modal)'
|
|
56
|
+
}), (0, cssr_1.cM)('hoverable', [(0, cssr_1.c)('&:hover', 'box-shadow: var(--n-box-shadow);')]), (0, cssr_1.cM)('content-segmented', [(0, cssr_1.c)('>', [(0, cssr_1.cE)('content', {
|
|
52
57
|
paddingTop: 'var(--n-padding-bottom)'
|
|
53
58
|
})])]), (0, cssr_1.cM)('content-soft-segmented', [(0, cssr_1.c)('>', [(0, cssr_1.cE)('content', `
|
|
54
59
|
margin: 0 var(--n-padding-left);
|
|
@@ -122,10 +127,14 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('card', `
|
|
|
122
127
|
transition: 'border-color 0.3s var(--n-bezier)'
|
|
123
128
|
}, [(0, cssr_1.c)('&:not(:first-child)', {
|
|
124
129
|
borderTop: '1px solid var(--n-border-color)'
|
|
125
|
-
})])])])
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
})])])]), (0, cssr_1.cM)('embedded', `
|
|
131
|
+
background-color: var(--n-color-embedded);
|
|
132
|
+
`)]), (0, cssr_1.insideModal)((0, cssr_1.cB)('card', `
|
|
133
|
+
background: var(--n-color-modal);
|
|
134
|
+
`, [(0, cssr_1.cM)('embedded', `
|
|
135
|
+
background-color: var(--n-color-embedded-modal);
|
|
136
|
+
`)])), (0, cssr_1.insidePopover)((0, cssr_1.cB)('card', `
|
|
137
|
+
background: var(--n-color-popover);
|
|
138
|
+
`, [(0, cssr_1.cM)('embedded', `
|
|
139
|
+
background-color: var(--n-color-embedded-popover);
|
|
140
|
+
`)]))]);
|
package/lib/card/styles/dark.js
CHANGED
|
@@ -7,8 +7,10 @@ const cardDark = {
|
|
|
7
7
|
common: common_1.commonDark,
|
|
8
8
|
self(vars) {
|
|
9
9
|
const commonSelf = (0, light_1.self)(vars);
|
|
10
|
-
const { cardColor } = vars;
|
|
10
|
+
const { cardColor, modalColor, popoverColor } = vars;
|
|
11
11
|
commonSelf.colorEmbedded = cardColor;
|
|
12
|
+
commonSelf.colorEmbeddedModal = modalColor;
|
|
13
|
+
commonSelf.colorEmbeddedPopover = popoverColor;
|
|
12
14
|
return commonSelf;
|
|
13
15
|
}
|
|
14
16
|
};
|
package/lib/card/styles/light.js
CHANGED
|
@@ -8,7 +8,7 @@ const common_1 = require("../../_styles/common");
|
|
|
8
8
|
const _common_1 = __importDefault(require("./_common"));
|
|
9
9
|
const self = (vars) => {
|
|
10
10
|
const { primaryColor, borderRadius, lineHeight, fontSize, cardColor, textColor2, textColor1, dividerColor, fontWeightStrong, closeIconColor, closeIconColorHover, closeIconColorPressed, closeColorHover, closeColorPressed, modalColor, boxShadow1, popoverColor, actionColor } = vars;
|
|
11
|
-
return Object.assign(Object.assign({}, _common_1.default), { lineHeight, color: cardColor, colorModal: modalColor, colorPopover: popoverColor, colorTarget: primaryColor, colorEmbedded: actionColor, textColor: textColor2, titleTextColor: textColor1, borderColor: dividerColor, actionColor, titleFontWeight: fontWeightStrong, closeColorHover,
|
|
11
|
+
return Object.assign(Object.assign({}, _common_1.default), { lineHeight, color: cardColor, colorModal: modalColor, colorPopover: popoverColor, colorTarget: primaryColor, colorEmbedded: actionColor, colorEmbeddedModal: actionColor, colorEmbeddedPopover: actionColor, textColor: textColor2, titleTextColor: textColor1, borderColor: dividerColor, actionColor, titleFontWeight: fontWeightStrong, closeColorHover,
|
|
12
12
|
closeColorPressed, closeBorderRadius: borderRadius, closeIconColor,
|
|
13
13
|
closeIconColorHover,
|
|
14
14
|
closeIconColorPressed, fontSizeSmall: fontSize, fontSizeMedium: fontSize, fontSizeLarge: fontSize, fontSizeHuge: fontSize, boxShadow: boxShadow1, borderRadius });
|
|
@@ -23,7 +23,6 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
23
23
|
props: exports.countdownProps,
|
|
24
24
|
setup(props) {
|
|
25
25
|
let timerId = null;
|
|
26
|
-
let rafId = null;
|
|
27
26
|
let elapsed = 0;
|
|
28
27
|
let finished = false;
|
|
29
28
|
// in ms
|
|
@@ -92,10 +91,6 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
92
91
|
window.clearTimeout(timerId);
|
|
93
92
|
timerId = null;
|
|
94
93
|
}
|
|
95
|
-
if (rafId !== null) {
|
|
96
|
-
window.cancelAnimationFrame(rafId);
|
|
97
|
-
rafId = null;
|
|
98
|
-
}
|
|
99
94
|
};
|
|
100
95
|
(0, vue_1.onMounted)(() => {
|
|
101
96
|
(0, vue_1.watchEffect)(() => {
|