eco-vue-js 0.10.92 → 0.10.94
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/components/BottomSheet/WBottomSheet.vue.d.ts +1 -0
- package/dist/components/BottomSheet/WBottomSheet.vue.d.ts.map +1 -1
- package/dist/components/BottomSheet/WBottomSheet.vue.js +2 -2
- package/dist/components/Button/WButton.vue.d.ts +8 -2
- package/dist/components/Button/WButton.vue.d.ts.map +1 -1
- package/dist/components/Button/WButton.vue.js +42 -5
- package/dist/components/Button/WButtonGroup.vue.js +4 -0
- package/dist/components/Button/WButtonInput.vue.d.ts.map +1 -1
- package/dist/components/Button/types.d.ts +2 -0
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/Checkbox/WCheckboxGroup.vue.js +2 -0
- package/dist/components/Checkbox/WCheckboxGroupMultiple.vue.js +2 -0
- package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts +2 -153
- package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts.map +1 -1
- package/dist/components/DropdownMenu/WDropdownMenu.vue.js +2 -1
- package/dist/components/FieldWrapper/WFieldWrapper.vue.d.ts +1 -0
- package/dist/components/FieldWrapper/WFieldWrapper.vue.d.ts.map +1 -1
- package/dist/components/FieldWrapper/WFieldWrapper.vue.js +20 -13
- package/dist/components/FieldWrapper/types.d.ts +2 -0
- package/dist/components/FieldWrapper/types.d.ts.map +1 -1
- package/dist/components/FieldWrapper/use/useFieldSaved.d.ts +6 -0
- package/dist/components/FieldWrapper/use/useFieldSaved.d.ts.map +1 -0
- package/dist/components/FieldWrapper/use/useFieldSaved.js +29 -0
- package/dist/components/FormAsync/WFormAsyncButtonGroup.vue.js +4 -0
- package/dist/components/FormAsync/WFormAsyncCheckboxGroup.vue.js +2 -0
- package/dist/components/FormAsync/WFormAsyncInput.vue.d.ts +6 -0
- package/dist/components/FormAsync/WFormAsyncInput.vue.d.ts.map +1 -1
- package/dist/components/FormAsync/WFormAsyncInput.vue.js +19 -2
- package/dist/components/FormAsync/WFormAsyncSelect.vue.js +3 -0
- package/dist/components/FormAsync/WFormAsyncSelectInfiniteSingle.vue.js +3 -0
- package/dist/components/FormAsync/WFormAsyncSelectSingle.vue.js +3 -0
- package/dist/components/FormAsync/WFormAsyncSelectStringified.vue.js +3 -0
- package/dist/components/FormAsync/use/useFormAsync.d.ts.map +1 -1
- package/dist/components/FormAsync/use/useFormAsync.js +3 -2
- package/dist/components/Input/WInput.vue.d.ts +7 -2
- package/dist/components/Input/WInput.vue.d.ts.map +1 -1
- package/dist/components/Input/WInput.vue.js +81 -65
- package/dist/components/Input/WInputAsync.vue.d.ts +6 -0
- package/dist/components/Input/WInputAsync.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputAsync.vue.js +76 -42
- package/dist/components/Input/WInputDate.vue.js +3 -0
- package/dist/components/Input/WInputOptions.vue.js +3 -0
- package/dist/components/Input/WInputSuggest.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputSuggest.vue.js +5 -1
- package/dist/components/Input/components/ContentEditable.vue.d.ts +24 -0
- package/dist/components/Input/components/ContentEditable.vue.d.ts.map +1 -0
- package/dist/components/Input/components/ContentEditable.vue.js +123 -0
- package/dist/components/Input/components/ContentEditable.vue2.js +5 -0
- package/dist/components/Input/types.d.ts +2 -1
- package/dist/components/Input/types.d.ts.map +1 -1
- package/dist/components/List/WListCard.vue.js +1 -1
- package/dist/components/Page/WPage.vue.d.ts.map +1 -1
- package/dist/components/Page/WPage.vue.js +9 -10
- package/dist/components/Select/WSelect.vue.js +3 -0
- package/dist/components/Select/WSelectAsync.vue.js +3 -0
- package/dist/components/Select/WSelectAsyncSingle.vue.js +3 -0
- package/dist/components/Select/WSelectSingle.vue.js +3 -0
- package/dist/components/Select/WSelectStringified.vue.js +3 -0
- package/dist/components/Toggle/WToggle.vue.js +3 -3
- package/dist/utils/SemanticType.js +6 -6
- package/package.json +1 -1
- package/tailwind-base/plugins/default.ts +10 -1
@@ -38,6 +38,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
38
38
|
allowPaste: { type: Boolean },
|
39
39
|
hideInput: { type: Boolean },
|
40
40
|
noWrap: { type: Boolean },
|
41
|
+
textTransparent: { type: Boolean },
|
41
42
|
title: {},
|
42
43
|
titleIcon: {},
|
43
44
|
description: {},
|
@@ -57,6 +58,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
57
58
|
filterValue: {},
|
58
59
|
subgrid: { type: Boolean },
|
59
60
|
seamless: { type: Boolean },
|
61
|
+
savedText: {},
|
62
|
+
topText: { type: Boolean },
|
60
63
|
parentElement: {},
|
61
64
|
maxHeight: { default: 440 },
|
62
65
|
maxWidth: { default: 480 },
|
@@ -44,6 +44,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
44
44
|
allowPaste: { type: Boolean },
|
45
45
|
hideInput: { type: Boolean },
|
46
46
|
noWrap: { type: Boolean },
|
47
|
+
textTransparent: { type: Boolean },
|
47
48
|
title: {},
|
48
49
|
titleIcon: {},
|
49
50
|
description: {},
|
@@ -63,6 +64,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
63
64
|
filterValue: {},
|
64
65
|
subgrid: { type: Boolean },
|
65
66
|
seamless: { type: Boolean },
|
67
|
+
savedText: {},
|
68
|
+
topText: { type: Boolean },
|
66
69
|
parentElement: {},
|
67
70
|
maxHeight: {},
|
68
71
|
maxWidth: {},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WInputSuggest.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInputSuggest.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WInputSuggest.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInputSuggest.vue"],"names":[],"mappings":"AA8GA;AAuNA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;AAE9C,OAAO,EAAC,KAAK,KAAK,EAAgC,MAAM,KAAK,CAAA;yBA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AAI;YAC9C,MAAM,GAAG,IAAI;YACb,OAAO,GAAG,IAAI;YACd,aAAa,GAAG,IAAI;YACpB,OAAO,SAAS,UAAU,GAAG,IAAI;YACjC,MAAM,SAAS,UAAU,GAAG,IAAI;;EA2XlC,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA5ZzE,wBA4Z4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -40,6 +40,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
40
40
|
allowPaste: { type: Boolean },
|
41
41
|
hideInput: { type: Boolean },
|
42
42
|
noWrap: { type: Boolean },
|
43
|
+
textTransparent: { type: Boolean },
|
43
44
|
title: {},
|
44
45
|
titleIcon: {},
|
45
46
|
description: {},
|
@@ -59,6 +60,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
59
60
|
filterValue: {},
|
60
61
|
subgrid: { type: Boolean },
|
61
62
|
seamless: { type: Boolean },
|
63
|
+
savedText: {},
|
64
|
+
topText: { type: Boolean },
|
62
65
|
parentElement: {},
|
63
66
|
maxHeight: { default: 320 },
|
64
67
|
maxWidth: { default: 600 },
|
@@ -124,7 +127,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
124
127
|
title: toggleScope?.unclickable === false ? _ctx.mobileTitle ?? _ctx.title : _ctx.title,
|
125
128
|
unclickable: toggleScope?.unclickable,
|
126
129
|
description: toggleScope?.unclickable === false ? void 0 : _ctx.description,
|
127
|
-
seamless: toggleScope?.unclickable === false ? false : props.seamless
|
130
|
+
seamless: toggleScope?.unclickable === false ? false : props.seamless,
|
131
|
+
topText: _ctx.topText || isOpen.value && !toggleScope?.isTop
|
128
132
|
}, {
|
129
133
|
class: {
|
130
134
|
"cursor-pointer": !unref(isDisabled) && !unref(isReadonly),
|
@@ -0,0 +1,24 @@
|
|
1
|
+
type __VLS_Props = {
|
2
|
+
value: string;
|
3
|
+
placeholder?: string;
|
4
|
+
maxLength?: number;
|
5
|
+
};
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
7
|
+
focus: () => void;
|
8
|
+
blur: () => void;
|
9
|
+
offsetWidth: number;
|
10
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
11
|
+
blur: (value: FocusEvent) => any;
|
12
|
+
focus: (value: FocusEvent) => any;
|
13
|
+
keydown: (value: KeyboardEvent) => any;
|
14
|
+
"update:model-value": (value: string) => any;
|
15
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
16
|
+
onBlur?: ((value: FocusEvent) => any) | undefined;
|
17
|
+
onFocus?: ((value: FocusEvent) => any) | undefined;
|
18
|
+
onKeydown?: ((value: KeyboardEvent) => any) | undefined;
|
19
|
+
"onUpdate:model-value"?: ((value: string) => any) | undefined;
|
20
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
21
|
+
element: HTMLDivElement;
|
22
|
+
}, HTMLDivElement>;
|
23
|
+
export default _default;
|
24
|
+
//# sourceMappingURL=ContentEditable.vue.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ContentEditable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/components/ContentEditable.vue"],"names":[],"mappings":"AAoBA;AA2JA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;;;;;;;;;;;;;;;;;;AAgMF,wBAUG"}
|
@@ -0,0 +1,123 @@
|
|
1
|
+
import { defineComponent, useTemplateRef, createElementBlock, openBlock, nextTick } from 'vue';
|
2
|
+
|
3
|
+
const _hoisted_1 = ["textContent", "placeholder"];
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
5
|
+
__name: "ContentEditable",
|
6
|
+
props: {
|
7
|
+
value: {},
|
8
|
+
placeholder: {},
|
9
|
+
maxLength: {}
|
10
|
+
},
|
11
|
+
emits: ["update:model-value", "focus", "blur", "keydown"],
|
12
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
13
|
+
const props = __props;
|
14
|
+
const emit = __emit;
|
15
|
+
const elementRef = useTemplateRef("element");
|
16
|
+
const onInput = (e) => {
|
17
|
+
e.stopImmediatePropagation();
|
18
|
+
if (!(e.target instanceof HTMLDivElement)) return;
|
19
|
+
const text = e.target.textContent?.replace(/\r\n?/g, "\n") ?? "";
|
20
|
+
if (text === props.value) return;
|
21
|
+
if (props.maxLength && typeof text === "string" && text.length > props.maxLength) {
|
22
|
+
e.preventDefault();
|
23
|
+
const substring = text.substring(0, props.maxLength);
|
24
|
+
if (e.target) e.target.textContent = substring;
|
25
|
+
emit("update:model-value", substring);
|
26
|
+
} else {
|
27
|
+
emit("update:model-value", text);
|
28
|
+
}
|
29
|
+
};
|
30
|
+
const onPaste = async (e) => {
|
31
|
+
e.preventDefault();
|
32
|
+
navigator.clipboard.readText();
|
33
|
+
const text = (e.clipboardData?.getData("text/plain") || await navigator.clipboard.readText()).replace(/\r\n?/g, "\n");
|
34
|
+
insertPlain(text);
|
35
|
+
};
|
36
|
+
const onKeyDown = (e) => {
|
37
|
+
if (e.key === "Enter" && !e.shiftKey) {
|
38
|
+
e.preventDefault();
|
39
|
+
insertPlain("\n");
|
40
|
+
} else {
|
41
|
+
emit("keydown", e);
|
42
|
+
}
|
43
|
+
};
|
44
|
+
const insertPlain = (text) => {
|
45
|
+
const root = elementRef.value;
|
46
|
+
if (!root) return;
|
47
|
+
const { start, end } = getSelectionOffsets(root);
|
48
|
+
const next = (props.value ?? "").slice(0, start) + text + ((props.value ?? "").slice(end) || " ");
|
49
|
+
const caretAfter = start + text.length;
|
50
|
+
emit("update:model-value", next);
|
51
|
+
nextTick(() => setCaretByCharIndex(root, caretAfter));
|
52
|
+
};
|
53
|
+
const getSelectionOffsets = (root) => {
|
54
|
+
const selection = window.getSelection();
|
55
|
+
if (!selection || selection.rangeCount === 0) return { start: 0, end: 0 };
|
56
|
+
const range = selection.getRangeAt(0);
|
57
|
+
const pre = range.cloneRange();
|
58
|
+
pre.selectNodeContents(root);
|
59
|
+
pre.setEnd(range.startContainer, range.startOffset);
|
60
|
+
const start = pre.toString().length;
|
61
|
+
const selected = range.toString().length;
|
62
|
+
return { start, end: start + selected };
|
63
|
+
};
|
64
|
+
const setCaretByCharIndex = (root, index) => {
|
65
|
+
if (!root.firstChild) root.appendChild(document.createTextNode(""));
|
66
|
+
const walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT, null);
|
67
|
+
let node, pos = index;
|
68
|
+
while (node = walker.nextNode()) {
|
69
|
+
const len = node.nodeValue?.length ?? 0;
|
70
|
+
if (pos <= len) {
|
71
|
+
const r2 = document.createRange();
|
72
|
+
r2.setStart(node, pos);
|
73
|
+
r2.collapse(true);
|
74
|
+
const selection2 = window.getSelection();
|
75
|
+
selection2?.removeAllRanges();
|
76
|
+
selection2?.addRange(r2);
|
77
|
+
return;
|
78
|
+
}
|
79
|
+
pos -= len;
|
80
|
+
}
|
81
|
+
const last = root.lastChild;
|
82
|
+
if (!last) return;
|
83
|
+
const r = document.createRange();
|
84
|
+
r.setStart(last, last.nodeType === Node.TEXT_NODE && last.nodeValue ? last.nodeValue.length : last.childNodes.length);
|
85
|
+
r.collapse(true);
|
86
|
+
const selection = window.getSelection();
|
87
|
+
selection?.removeAllRanges();
|
88
|
+
selection?.addRange(r);
|
89
|
+
};
|
90
|
+
const focus = () => {
|
91
|
+
elementRef.value?.focus();
|
92
|
+
};
|
93
|
+
const blur = () => {
|
94
|
+
elementRef.value?.blur();
|
95
|
+
};
|
96
|
+
__expose({
|
97
|
+
focus,
|
98
|
+
blur,
|
99
|
+
get offsetWidth() {
|
100
|
+
return elementRef.value?.offsetWidth ?? 0;
|
101
|
+
}
|
102
|
+
});
|
103
|
+
return (_ctx, _cache) => {
|
104
|
+
return openBlock(), createElementBlock("div", {
|
105
|
+
ref: "element",
|
106
|
+
contenteditable: "true",
|
107
|
+
role: "textbox",
|
108
|
+
"aria-multiline": "true",
|
109
|
+
spellcheck: "false",
|
110
|
+
textContent: _ctx.value,
|
111
|
+
placeholder: _ctx.placeholder,
|
112
|
+
class: "whitespace-pre-wrap [word-wrap:break-word] empty:before:pointer-events-none empty:before:text-gray-400 empty:before:[content:attr(placeholder)] dark:empty:before:text-gray-500",
|
113
|
+
onInput,
|
114
|
+
onPaste,
|
115
|
+
onKeydown: onKeyDown,
|
116
|
+
onFocus: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("focus", $event)),
|
117
|
+
onBlur: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("blur", $event))
|
118
|
+
}, null, 40, _hoisted_1);
|
119
|
+
};
|
120
|
+
}
|
121
|
+
});
|
122
|
+
|
123
|
+
export { _sfc_main as default };
|
@@ -28,11 +28,12 @@ export interface InputProps<Type extends InputType> extends Omit<FieldWrapperPro
|
|
28
28
|
allowPaste?: boolean;
|
29
29
|
hideInput?: boolean;
|
30
30
|
noWrap?: boolean;
|
31
|
+
textTransparent?: boolean;
|
31
32
|
}
|
32
33
|
export interface InputAsyncProps<Type extends InputType> extends InputProps<Type> {
|
33
34
|
validate?: ValidateFn | ValidateFn[];
|
34
35
|
debounce?: number;
|
35
|
-
|
36
|
+
instant?: boolean;
|
36
37
|
}
|
37
38
|
export interface InputSuggestProps<Type extends InputType> extends Omit<InputProps<Type>, 'unclickable'>, Partial<Omit<DropdownMenuProps, 'isOpen' | 'updateAlign' | 'emitUpdate'>> {
|
38
39
|
mobileTitle?: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/types.ts"],"names":[],"mappings":"A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AAE,OAAO,CAAA;KAAC,CAAC,CAAA;CACnF;AAED,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;IACnF,UAAU,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;IAC7B,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,OAAO,CAAC,EAAE,IAAI,CAAA;CACf"}
|
@@ -59,7 +59,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
59
59
|
const toggleMenu = (event) => {
|
60
60
|
if (props.disabled || props.disableMore || !containerRef.value || !moreRef.value || event.ctrlKey) return;
|
61
61
|
const containerRect = containerRef.value.getBoundingClientRect();
|
62
|
-
position.value = { left: event.
|
62
|
+
position.value = { left: event.clientX - containerRect.x + "px", top: event.clientY - containerRect.y + "px" };
|
63
63
|
moreRef.value.open();
|
64
64
|
event.preventDefault();
|
65
65
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WPage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Page/WPage.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WPage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Page/WPage.vue"],"names":[],"mappings":"AA+FA;AAyRA,OAAO,EAAC,KAAK,SAAS,EAAmE,MAAM,KAAK,CAAA;AAUpG,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,aAAa,CAAC,EAAE,SAAS,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,WAAW,CAAC,EAAE,WAAW,EAAE,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;CAC9B,CAAC;AAsKF,iBAAS,cAAc;WAmJT,OAAO,IAA6B;;wBAjBtB,GAAG;wBAGF,GAAG;;kCArRL,IAAI;;YAmRF,GAAG;sBACN,GAAG;sBAEF,GAAG;;;;;;;EAkB7B;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;OAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, useTemplateRef, ref, watch, nextTick, onMounted, onBeforeUnmount, resolveComponent, createElementBlock, openBlock, Fragment, createElementVNode, createBlock, createCommentVNode,
|
1
|
+
import { defineComponent, useTemplateRef, ref, watch, nextTick, onMounted, onBeforeUnmount, resolveComponent, createElementBlock, openBlock, Fragment, createElementVNode, createBlock, createCommentVNode, mergeProps, createVNode, renderSlot, normalizeProps, guardReactiveProps, normalizeClass, resolveDynamicComponent, toDisplayString, unref, createSlots, withCtx } from 'vue';
|
2
2
|
import { useHeader } from '../HeaderBar/use/useHeader.js';
|
3
3
|
import { dateFormat } from '../../utils/dateTime.js';
|
4
4
|
import _sfc_main$1 from './WPageTitle.vue.js';
|
@@ -150,12 +150,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
150
150
|
return (_ctx, _cache) => {
|
151
151
|
const _component_WPage = resolveComponent("WPage", true);
|
152
152
|
return openBlock(), createElementBlock(Fragment, null, [
|
153
|
-
createElementVNode("div", {
|
153
|
+
createElementVNode("div", mergeProps(_ctx.$attrs, {
|
154
154
|
ref: "element",
|
155
|
-
class:
|
155
|
+
class: ["not-print:shadow-md bg-default text-black-default light relative isolate grid h-[29.62cm] w-[21.01cm] break-before-page grid-cols-1 grid-rows-[auto,1fr] overflow-hidden px-[1cm] py-[2cm]", {
|
156
156
|
"[counter-increment:page] after:absolute after:bottom-[1cm] after:right-[1cm] after:text-xs after:[--tw-content:counter(page)]": !_ctx.empty
|
157
|
-
}]
|
158
|
-
}, [
|
157
|
+
}]
|
158
|
+
}), [
|
159
159
|
_ctx.title && !_ctx.topTitle ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
160
160
|
createVNode(_sfc_main$1, {
|
161
161
|
title: _ctx.title,
|
@@ -184,9 +184,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
184
184
|
_ctx.watermark ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
185
185
|
createElementVNode("div", _hoisted_7, toDisplayString(_ctx.watermark), 1)
|
186
186
|
])) : createCommentVNode("", true)
|
187
|
-
],
|
188
|
-
overflow.value.length !== 0 ? (openBlock(), createBlock(_component_WPage, {
|
189
|
-
key: 0,
|
187
|
+
], 16),
|
188
|
+
overflow.value.length !== 0 ? (openBlock(), createBlock(_component_WPage, mergeProps({ key: 0 }, _ctx.$attrs, {
|
190
189
|
prerendered: overflow.value,
|
191
190
|
title: _ctx.title,
|
192
191
|
"top-title": "",
|
@@ -195,7 +194,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
195
194
|
date: _ctx.date,
|
196
195
|
empty: _ctx.empty,
|
197
196
|
watermark: _ctx.watermark
|
198
|
-
}, createSlots({ _: 2 }, [
|
197
|
+
}), createSlots({ _: 2 }, [
|
199
198
|
_ctx.$slots.header ? {
|
200
199
|
name: "header",
|
201
200
|
fn: withCtx(() => [
|
@@ -210,7 +209,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
210
209
|
]),
|
211
210
|
key: "1"
|
212
211
|
} : void 0
|
213
|
-
]),
|
212
|
+
]), 1040, ["prerendered", "title", "center-logo", "logo-component", "date", "empty", "watermark"])) : createCommentVNode("", true)
|
214
213
|
], 64);
|
215
214
|
};
|
216
215
|
}
|
@@ -58,6 +58,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
58
58
|
placeholderSecure: { type: Boolean },
|
59
59
|
allowPaste: { type: Boolean },
|
60
60
|
noWrap: { type: Boolean },
|
61
|
+
textTransparent: { type: Boolean },
|
61
62
|
title: {},
|
62
63
|
titleIcon: {},
|
63
64
|
description: {},
|
@@ -76,6 +77,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
76
77
|
filterValue: {},
|
77
78
|
subgrid: { type: Boolean },
|
78
79
|
seamless: { type: Boolean },
|
80
|
+
savedText: {},
|
81
|
+
topText: { type: Boolean },
|
79
82
|
parentElement: {},
|
80
83
|
maxHeight: {},
|
81
84
|
maxWidth: {},
|
@@ -51,6 +51,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
51
51
|
placeholderSecure: { type: Boolean },
|
52
52
|
allowPaste: { type: Boolean },
|
53
53
|
noWrap: { type: Boolean },
|
54
|
+
textTransparent: { type: Boolean },
|
54
55
|
title: {},
|
55
56
|
titleIcon: {},
|
56
57
|
description: {},
|
@@ -69,6 +70,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
69
70
|
filterValue: {},
|
70
71
|
subgrid: { type: Boolean },
|
71
72
|
seamless: { type: Boolean },
|
73
|
+
savedText: {},
|
74
|
+
topText: { type: Boolean },
|
72
75
|
parentElement: {},
|
73
76
|
maxHeight: {},
|
74
77
|
maxWidth: {},
|
@@ -48,6 +48,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
48
48
|
placeholderSecure: { type: Boolean },
|
49
49
|
allowPaste: { type: Boolean },
|
50
50
|
noWrap: { type: Boolean },
|
51
|
+
textTransparent: { type: Boolean },
|
51
52
|
title: {},
|
52
53
|
titleIcon: {},
|
53
54
|
description: {},
|
@@ -66,6 +67,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
66
67
|
filterValue: {},
|
67
68
|
subgrid: { type: Boolean },
|
68
69
|
seamless: { type: Boolean },
|
70
|
+
savedText: {},
|
71
|
+
topText: { type: Boolean },
|
69
72
|
parentElement: {},
|
70
73
|
maxHeight: {},
|
71
74
|
maxWidth: {},
|
@@ -44,6 +44,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
44
44
|
placeholderSecure: { type: Boolean },
|
45
45
|
allowPaste: { type: Boolean },
|
46
46
|
noWrap: { type: Boolean },
|
47
|
+
textTransparent: { type: Boolean },
|
47
48
|
title: {},
|
48
49
|
titleIcon: {},
|
49
50
|
description: {},
|
@@ -62,6 +63,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
62
63
|
filterValue: {},
|
63
64
|
subgrid: { type: Boolean },
|
64
65
|
seamless: { type: Boolean },
|
66
|
+
savedText: {},
|
67
|
+
topText: { type: Boolean },
|
65
68
|
parentElement: {},
|
66
69
|
maxHeight: {},
|
67
70
|
maxWidth: {},
|
@@ -44,6 +44,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
44
44
|
placeholderSecure: { type: Boolean },
|
45
45
|
allowPaste: { type: Boolean },
|
46
46
|
noWrap: { type: Boolean },
|
47
|
+
textTransparent: { type: Boolean },
|
47
48
|
title: {},
|
48
49
|
titleIcon: {},
|
49
50
|
description: {},
|
@@ -62,6 +63,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
62
63
|
filterValue: {},
|
63
64
|
subgrid: { type: Boolean },
|
64
65
|
seamless: { type: Boolean },
|
66
|
+
savedText: {},
|
67
|
+
topText: { type: Boolean },
|
65
68
|
parentElement: {},
|
66
69
|
maxHeight: {},
|
67
70
|
maxWidth: {},
|
@@ -102,7 +102,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
102
102
|
], 2)) : createCommentVNode("", true),
|
103
103
|
createElementVNode("div", _hoisted_2, [
|
104
104
|
createElementVNode("div", {
|
105
|
-
class: normalizeClass(["width-
|
105
|
+
class: normalizeClass(["width-[calc(var(--w-input-height)+0.5rem)] p-0.75 h-full rounded-full bg-[200%_auto] [background-position:right]", {
|
106
106
|
"bg-gray-300 dark:bg-gray-700": !value.value || _ctx.loading,
|
107
107
|
[unref(semanticTypeBackgroundMap)[unref(SemanticType).PRIMARY]]: value.value && !_ctx.loading
|
108
108
|
}])
|
@@ -110,8 +110,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
110
110
|
createElementVNode("div", _hoisted_3, [
|
111
111
|
createElementVNode("div", {
|
112
112
|
class: normalizeClass(["bg-default text-primary dark:text-primary-dark absolute z-10 flex aspect-square h-full items-center justify-center rounded-full shadow-md transition-[right]", {
|
113
|
-
"right-[calc(100%-
|
114
|
-
"right-[calc(50%-0.
|
113
|
+
"right-[calc(100%-(var(--w-input-height)-0.75rem))]": value.value === false,
|
114
|
+
"right-[calc(50%-(var(--w-input-height)-0.75rem)/2)]": value.value === null,
|
115
115
|
"right-0": value.value === true,
|
116
116
|
"w-ripple w-ripple-hover": !unref(isDisabled) && !unref(isReadonly) && !unref(isSkeleton)
|
117
117
|
}])
|
@@ -34,12 +34,12 @@ const setSemanticTypeChipMap = (value) => {
|
|
34
34
|
Object.assign(semanticTypeChipMap, value);
|
35
35
|
};
|
36
36
|
const semanticTypeBorderMap = reactive({
|
37
|
-
["primary" /* PRIMARY */]: "border
|
38
|
-
["secondary" /* SECONDARY */]: "border
|
39
|
-
["negative" /* NEGARIVE */]: "border
|
40
|
-
["positive" /* POSITIVE */]: "border
|
41
|
-
["warning" /* WARNING */]: "border
|
42
|
-
["info" /* INFO */]: "border
|
37
|
+
["primary" /* PRIMARY */]: "border-solid border-primary dark:border-primary-dark",
|
38
|
+
["secondary" /* SECONDARY */]: "border-solid border-gray-300 dark:border-gray-700",
|
39
|
+
["negative" /* NEGARIVE */]: "border-solid border-negative dark:border-negative-dark",
|
40
|
+
["positive" /* POSITIVE */]: "border-solid border-positive dark:border-positive-dark",
|
41
|
+
["warning" /* WARNING */]: "border-solid border-warning dark:border-warning-dark",
|
42
|
+
["info" /* INFO */]: "border-solid border-info dark:border-info-dark"
|
43
43
|
});
|
44
44
|
const useSemanticTypeBorderMap = () => {
|
45
45
|
return semanticTypeBorderMap;
|
package/package.json
CHANGED
@@ -146,7 +146,7 @@ const pluginDefault = plugin(function ({matchUtilities, addVariant, addUtilities
|
|
146
146
|
'overflow-y': 'auto',
|
147
147
|
},
|
148
148
|
},
|
149
|
-
'
|
149
|
+
'*::-webkit-resizer': {
|
150
150
|
transform: 'scale(2)',
|
151
151
|
'transform-origin': 'top left',
|
152
152
|
'background-size': '7px 7px',
|
@@ -420,6 +420,15 @@ const pluginDefault = plugin(function ({matchUtilities, addVariant, addUtilities
|
|
420
420
|
},
|
421
421
|
)
|
422
422
|
|
423
|
+
matchUtilities(
|
424
|
+
{
|
425
|
+
'w-button-border': value => ({'--w-button-border': value}),
|
426
|
+
},
|
427
|
+
{
|
428
|
+
values: theme('borderWidth'),
|
429
|
+
},
|
430
|
+
)
|
431
|
+
|
423
432
|
matchUtilities(
|
424
433
|
{
|
425
434
|
'w-skeleton-opacity': value => ({'--w-skeleton-opacity': value}),
|