@nightshadeui/components 3.1.1 → 3.2.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/README.md +21 -0
- package/css.d.ts +2 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +7 -0
- package/dist/_virtual/_rolldown/runtime.js +10 -0
- package/dist/components/BaseMenu.css +1 -0
- package/dist/components/BaseMenu.js +108 -0
- package/dist/components/BaseMenu.vue.d.ts +21 -8
- package/dist/components/BaseMenu.vue.d.ts.map +1 -1
- package/dist/components/Btn.css +1 -0
- package/dist/components/Btn.js +186 -0
- package/dist/components/Btn.vue.d.ts +38 -2
- package/dist/components/Btn.vue.d.ts.map +1 -1
- package/dist/components/Bubble.css +1 -0
- package/dist/components/Bubble.js +37 -0
- package/dist/components/Bubble.vue.d.ts +12 -2
- package/dist/components/Bubble.vue.d.ts.map +1 -1
- package/dist/components/Checkbox.css +1 -0
- package/dist/components/Checkbox.js +116 -0
- package/dist/components/Checkbox.vue.d.ts +15 -3
- package/dist/components/Checkbox.vue.d.ts.map +1 -1
- package/dist/components/Chip.css +1 -0
- package/dist/components/Chip.js +91 -0
- package/dist/components/Chip.vue.d.ts +16 -2
- package/dist/components/Chip.vue.d.ts.map +1 -1
- package/dist/components/ContextMenu.js +56 -0
- package/dist/components/ContextMenu.vue.d.ts +28 -8
- package/dist/components/ContextMenu.vue.d.ts.map +1 -1
- package/dist/components/ContextPopup.js +166 -0
- package/dist/components/ContextPopup.vue.d.ts +23 -2
- package/dist/components/ContextPopup.vue.d.ts.map +1 -1
- package/dist/components/Filler.css +1 -0
- package/dist/components/Filler.js +18 -0
- package/dist/components/Filler.vue.d.ts +6 -2
- package/dist/components/Filler.vue.d.ts.map +1 -1
- package/dist/components/HGroup.css +1 -0
- package/dist/components/HGroup.js +44 -0
- package/dist/components/HGroup.vue.d.ts +21 -8
- package/dist/components/HGroup.vue.d.ts.map +1 -1
- package/dist/components/InputBase.css +1 -0
- package/dist/components/InputBase.js +115 -0
- package/dist/components/InputBase.vue.d.ts +16 -2
- package/dist/components/InputBase.vue.d.ts.map +1 -1
- package/dist/components/InputGroup.css +1 -0
- package/dist/components/InputGroup.js +21 -0
- package/dist/components/InputGroup.vue.d.ts +12 -2
- package/dist/components/InputGroup.vue.d.ts.map +1 -1
- package/dist/components/InputSelect.css +1 -0
- package/dist/components/InputSelect.js +110 -0
- package/dist/components/InputSelect.vue.d.ts +18 -2
- package/dist/components/InputSelect.vue.d.ts.map +1 -1
- package/dist/components/InputText.css +1 -0
- package/dist/components/InputText.js +77 -0
- package/dist/components/InputText.vue.d.ts +18 -2
- package/dist/components/InputText.vue.d.ts.map +1 -1
- package/dist/components/InputTextarea.css +1 -0
- package/dist/components/InputTextarea.js +80 -0
- package/dist/components/InputTextarea.vue.d.ts +18 -2
- package/dist/components/InputTextarea.vue.d.ts.map +1 -1
- package/dist/components/ModalOverlay.css +1 -0
- package/dist/components/ModalOverlay.js +45 -0
- package/dist/components/ModalOverlay.vue.d.ts +12 -2
- package/dist/components/ModalOverlay.vue.d.ts.map +1 -1
- package/dist/components/RouterBtn.js +39 -0
- package/dist/components/RouterBtn.vue.d.ts +10 -2
- package/dist/components/RouterBtn.vue.d.ts.map +1 -1
- package/dist/components/Slider.css +1 -0
- package/dist/components/Slider.js +326 -0
- package/dist/components/Slider.vue.d.ts +10 -2
- package/dist/components/Slider.vue.d.ts.map +1 -1
- package/dist/components/Tab.css +1 -0
- package/dist/components/Tab.js +56 -0
- package/dist/components/Tab.vue.d.ts +12 -2
- package/dist/components/Tab.vue.d.ts.map +1 -1
- package/dist/components/TabCap.css +1 -0
- package/dist/components/TabCap.js +28 -0
- package/dist/components/TabCap.vue.d.ts +6 -2
- package/dist/components/TabCap.vue.d.ts.map +1 -1
- package/dist/components/Toggle.css +1 -0
- package/dist/components/Toggle.js +102 -0
- package/dist/components/Toggle.vue.d.ts +6 -2
- package/dist/components/Toggle.vue.d.ts.map +1 -1
- package/dist/components/ToolPanel.css +1 -0
- package/dist/components/ToolPanel.js +33 -0
- package/dist/components/ToolPanel.vue.d.ts +12 -2
- package/dist/components/ToolPanel.vue.d.ts.map +1 -1
- package/dist/components/Tooltip.css +1 -0
- package/dist/components/Tooltip.js +97 -0
- package/dist/components/Tooltip.vue.d.ts +225 -0
- package/dist/components/Tooltip.vue.d.ts.map +1 -0
- package/dist/components/VGroup.css +1 -0
- package/dist/components/VGroup.js +36 -0
- package/dist/components/VGroup.vue.d.ts +21 -8
- package/dist/components/VGroup.vue.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +51 -0
- package/dist/components.css +39 -1
- package/dist/directives/index.d.ts +2 -0
- package/dist/directives/index.d.ts.map +1 -0
- package/dist/directives/tooltip.d.ts +14 -0
- package/dist/directives/tooltip.d.ts.map +1 -0
- package/dist/directives/tooltip.js +23 -0
- package/dist/glyphs/GlyphCheck.js +17 -0
- package/dist/glyphs/GlyphCheck.vue.d.ts +2 -1
- package/dist/glyphs/GlyphCheck.vue.d.ts.map +1 -1
- package/dist/glyphs/GlyphXmark.js +17 -0
- package/dist/glyphs/GlyphXmark.vue.d.ts +2 -1
- package/dist/glyphs/GlyphXmark.vue.d.ts.map +1 -1
- package/dist/helpers/props.js +28 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -0
- package/package.json +14 -8
- package/src/components/BaseMenu.vue +36 -29
- package/src/components/Btn.vue +197 -191
- package/src/components/Bubble.vue +110 -103
- package/src/components/Checkbox.vue +93 -86
- package/src/components/Chip.vue +109 -102
- package/src/components/ContextPopup.vue +9 -1
- package/src/components/Filler.vue +21 -14
- package/src/components/HGroup.vue +47 -41
- package/src/components/InputBase.vue +137 -130
- package/src/components/InputGroup.vue +26 -16
- package/src/components/InputSelect.vue +28 -21
- package/src/components/InputText.vue +24 -17
- package/src/components/InputTextarea.vue +31 -24
- package/src/components/ModalOverlay.vue +21 -14
- package/src/components/Slider.vue +258 -249
- package/src/components/Tab.vue +73 -66
- package/src/components/TabCap.vue +20 -13
- package/src/components/Toggle.vue +102 -95
- package/src/components/ToolPanel.vue +36 -35
- package/src/components/Tooltip.vue +184 -0
- package/src/components/VGroup.vue +43 -37
- package/src/components/index.ts +2 -0
- package/src/directives/index.ts +1 -0
- package/src/directives/tooltip.ts +50 -0
- package/src/index.ts +1 -0
- package/dist/components.mjs +0 -1719
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
export type __VLS_LocalComponents = {};
|
|
4
|
+
export type __VLS_GlobalComponents = import('vue').GlobalComponents;
|
|
5
|
+
export type __VLS_LocalDirectives = {};
|
|
6
|
+
export type __VLS_Slots = ReturnType<typeof __VLS_template>["__VLS_Slots"];
|
|
7
|
+
declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
8
|
tagName: {
|
|
3
9
|
type: StringConstructor;
|
|
4
10
|
default: string;
|
|
@@ -11,14 +17,19 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
11
17
|
type: StringConstructor;
|
|
12
18
|
};
|
|
13
19
|
gap: {
|
|
14
|
-
type: StringConstructor;
|
|
15
|
-
default: string;
|
|
20
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
16
21
|
};
|
|
17
22
|
wrap: {
|
|
18
23
|
type: BooleanConstructor;
|
|
19
24
|
default: boolean;
|
|
20
25
|
};
|
|
21
|
-
}>, {}, {}, {
|
|
26
|
+
}>, {}, {}, {
|
|
27
|
+
gapStyle(): {
|
|
28
|
+
'--HGroup-gap'?: undefined;
|
|
29
|
+
} | {
|
|
30
|
+
'--HGroup-gap': string;
|
|
31
|
+
};
|
|
32
|
+
}, {}, {
|
|
22
33
|
inject: {
|
|
23
34
|
$nightshade: {
|
|
24
35
|
default: null;
|
|
@@ -40,8 +51,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
40
51
|
type: StringConstructor;
|
|
41
52
|
};
|
|
42
53
|
gap: {
|
|
43
|
-
type: StringConstructor;
|
|
44
|
-
default: string;
|
|
54
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
45
55
|
};
|
|
46
56
|
wrap: {
|
|
47
57
|
type: BooleanConstructor;
|
|
@@ -50,8 +60,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
50
60
|
}>> & Readonly<{}>, {
|
|
51
61
|
tagName: string;
|
|
52
62
|
align: string;
|
|
53
|
-
gap: string;
|
|
54
63
|
wrap: boolean;
|
|
55
64
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
56
|
-
|
|
65
|
+
declare function __VLS_template(): {
|
|
66
|
+
__VLS_Slots: {
|
|
67
|
+
default?: (props: {}) => any;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
57
70
|
//# sourceMappingURL=HGroup.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HGroup.vue.d.ts","sourceRoot":"","sources":["../../src/components/HGroup.vue"],"names":[],"mappings":"AAeA;"}
|
|
1
|
+
{"version":3,"file":"HGroup.vue.d.ts","sourceRoot":"","sources":["../../src/components/HGroup.vue"],"names":[],"mappings":"AAeA;wBAqF0B,OAAO,YAAY;;oCAE/B,EAAE;qCACF,OAAO,KAAK,EAAE,gBAAgB;oCAG9B,EAAE;0BAmDF,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,aAAa,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EA2BG;AA7EH;;kBAyCc,CAAC,KAAK,IAAgB,KAAK,GAAG;;EAM3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer nightshade;@layer nightshade-components{.InputBase[data-v-a0a65109]{--InputBase-size:var(--input-major-height);--InputBase-padding-x:var(--input-major-padding);--InputBase-padding-y:var(--input-minor-padding);--InputBase-gap:var(--input-gap);--InputBase-font-size:var(--input-font-size);--InputBase-text:var(--text-base);--InputBase-background:var(--surface-base);--InputBase-outline:transparent;--InputBase-outline-size:var(--input-outline-size);--InputBase-outline-offset:var(--input-outline-offset);--InputBase-border-size:var(--input-border-size);--InputBase-border:var(--tone-border);--InputBase-radius:var(--radius-m);--InputBase-shadow:var(--shadow-light);--InputBase-box-shadow:0 1px 5px -1px var(--InputBase-shadow) inset;--InputBase-label-text:var(--text-base);--InputBase-label-font-size:var(--font-size-s);outline:0;flex-flow:column;display:flex;position:relative}.Container[data-v-a0a65109]{z-index:1;box-sizing:border-box;padding:calc(var(--InputBase-padding-y) - var(--InputBase-border-size)) calc(var(--InputBase-padding-x) - var(--InputBase-border-size));align-items:center;gap:var(--InputBase-gap);width:100%;min-height:var(--InputBase-size);color:var(--InputBase-text);background:var(--InputBase-background);box-shadow:var(--InputBase-box-shadow);outline:var(--InputBase-outline-size) solid var(--InputBase-outline);outline-offset:var(--InputBase-outline-offset);border:var(--InputBase-border-size) solid var(--InputBase-border);border-radius:var(--InputBase-radius);font-size:var(--InputBase-font-size);transition:color .3s,outline .3s,border-radius .3s,filter .3s;display:flex;position:relative}.InputBase[data-v-a0a65109]:not(.InputBase-disabled):focus-within,.InputBase.InputBase-forceFocus[data-v-a0a65109]{z-index:10;--InputBase-outline:var(--tone-focus-outline);--InputBase-border:var(--tone-focus-border);--InputBase-label-text:var(--tone-focus-border)}.InputBase-disabled[data-v-a0a65109]{--InputBase-background:var(--surface-deep)}.InputBase-disabled .Container[data-v-a0a65109]{opacity:var(--input-disabled-opacity);filter:var(--input-disabled-filter);cursor:not-allowed}.InputBase-fixedHeight .Container[data-v-a0a65109]{height:var(--InputBase-size)}.InputBase-round[data-v-a0a65109]{--InputBase-radius:calc(.5 * var(--InputBase-size))}.InputBase-flat[data-v-a0a65109]{--InputBase-box-shadow:none}.Label[data-v-a0a65109]{max-width:calc(100% - 2 * var(--sp2))}.Label.TabLabel[data-v-a0a65109]{z-index:0;margin:0 var(--sp2);--Tab-size:calc(.75 * var(--InputBase-size));--Tab-cap-size:calc(.75 * var(--InputBase-size));--Tab-font-size:var(--InputBase-font-size);align-self:flex-start;position:relative}.Label.TextLabel[data-v-a0a65109]{margin:0 var(--InputBase-padding-x);height:var(--sp3);line-height:1.5;font-size:var(--InputBase-label-font-size);color:var(--InputBase-text);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.Label.InlineLabel[data-v-a0a65109]{z-index:2;margin:0 var(--InputBase-padding-x);height:var(--sp2);line-height:var(--sp2);font-size:var(--InputBase-label-font-size);border-radius:var(--radius-m);color:var(--InputBase-label-text);text-shadow:0 0 3px var(--InputBase-background), 0 0 3px var(--InputBase-background), 0 0 3px var(--InputBase-background), 0 0 3px var(--InputBase-background), 0 0 3px var(--InputBase-background), 0 0 3px var(--InputBase-background), 0 0 3px var(--InputBase-background), 0 0 3px var(--InputBase-background), 0 0 3px var(--InputBase-background), 0 0 3px var(--InputBase-background);-webkit-user-select:none;user-select:none;white-space:nowrap;text-overflow:ellipsis;padding:0 2px;position:absolute;top:-2px;left:-2px;overflow:hidden;transform:translateY(-50%)}}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import './InputBase.css';
|
|
2
|
+
import { nightshadeMixin as e } from "../helpers/props.js";
|
|
3
|
+
import t from "./Tab.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import n from "../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
import { Fragment as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, normalizeClass as c, openBlock as l, renderSlot as u, resolveComponent as d, resolveDynamicComponent as f, toDisplayString as p, withCtx as m } from "vue";
|
|
7
|
+
// src/components/InputBase.vue
|
|
8
|
+
var h = {
|
|
9
|
+
components: { Tab: t },
|
|
10
|
+
mixins: [e],
|
|
11
|
+
props: {
|
|
12
|
+
tagName: { default: "label" },
|
|
13
|
+
tone: { type: String },
|
|
14
|
+
label: { type: String },
|
|
15
|
+
labelStyle: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "inline"
|
|
18
|
+
},
|
|
19
|
+
size: { type: String },
|
|
20
|
+
fixedHeight: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !0
|
|
23
|
+
},
|
|
24
|
+
flat: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: !1
|
|
27
|
+
},
|
|
28
|
+
round: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: !1
|
|
31
|
+
},
|
|
32
|
+
outline: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: !1
|
|
35
|
+
},
|
|
36
|
+
disabled: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: !1
|
|
39
|
+
},
|
|
40
|
+
forceFocus: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: !1
|
|
43
|
+
},
|
|
44
|
+
forceHover: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: !1
|
|
47
|
+
},
|
|
48
|
+
hoverOverrides: { type: Object },
|
|
49
|
+
focusOverrides: { type: Object }
|
|
50
|
+
},
|
|
51
|
+
data() {
|
|
52
|
+
return {
|
|
53
|
+
hover: !1,
|
|
54
|
+
focus: !1
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
computed: {
|
|
58
|
+
baseStyle() {
|
|
59
|
+
let { resolvedProps: e } = this;
|
|
60
|
+
return {
|
|
61
|
+
tone: e.tone,
|
|
62
|
+
size: e.size,
|
|
63
|
+
flat: e.flat,
|
|
64
|
+
round: e.round,
|
|
65
|
+
outline: e.outline,
|
|
66
|
+
labelStyle: e.labelStyle
|
|
67
|
+
};
|
|
68
|
+
},
|
|
69
|
+
effectiveStyle() {
|
|
70
|
+
let { baseStyle: e, hoverOverrides: t = {}, focusOverrides: n = {}, hover: r, focus: i, resolvedProps: a } = this, { forceHover: o, forceFocus: s } = a, c = Object.assign({}, e);
|
|
71
|
+
return (r || o) && Object.assign(c, t), (i || s) && Object.assign(c, n), c;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}, g = {
|
|
75
|
+
key: 1,
|
|
76
|
+
class: "Label TextLabel"
|
|
77
|
+
}, _ = {
|
|
78
|
+
key: 2,
|
|
79
|
+
class: "Label InlineLabel"
|
|
80
|
+
}, v = { class: "InputElement Container" };
|
|
81
|
+
function y(e, t, n, h, y, b) {
|
|
82
|
+
let x = d("Tab");
|
|
83
|
+
return l(), i(f(e.resolvedProps.tagName), {
|
|
84
|
+
class: c(["InputBase", [
|
|
85
|
+
b.effectiveStyle.tone && `tone-${b.effectiveStyle.tone}`,
|
|
86
|
+
b.effectiveStyle.size && `input-size-${b.effectiveStyle.size}`,
|
|
87
|
+
{
|
|
88
|
+
"InputBase-fixedHeight": e.resolvedProps.fixedHeight,
|
|
89
|
+
"InputBase-flat": b.effectiveStyle.flat,
|
|
90
|
+
"InputBase-round": b.effectiveStyle.round,
|
|
91
|
+
"InputBase-disabled": e.resolvedProps.disabled,
|
|
92
|
+
"InputBase-forceFocus": e.resolvedProps.forceFocus,
|
|
93
|
+
"InputBase-forceHover": e.resolvedProps.forceHover
|
|
94
|
+
}
|
|
95
|
+
]]),
|
|
96
|
+
onMouseenter: t[0] ||= (e) => y.hover = !0,
|
|
97
|
+
onMouseleave: t[1] ||= (e) => y.hover = !1,
|
|
98
|
+
onFocusin: t[2] ||= (e) => y.focus = !0,
|
|
99
|
+
onFocusout: t[3] ||= (e) => y.focus = !1
|
|
100
|
+
}, {
|
|
101
|
+
default: m(() => [e.resolvedProps.label ? (l(), o(r, { key: 0 }, [
|
|
102
|
+
e.resolvedProps.labelStyle === "tab" ? (l(), i(x, {
|
|
103
|
+
key: 0,
|
|
104
|
+
class: "Label TabLabel",
|
|
105
|
+
label: e.resolvedProps.label,
|
|
106
|
+
tone: b.effectiveStyle.tone
|
|
107
|
+
}, null, 8, ["label", "tone"])) : a("", !0),
|
|
108
|
+
e.resolvedProps.labelStyle === "text" ? (l(), o("div", g, p(e.resolvedProps.label), 1)) : a("", !0),
|
|
109
|
+
e.resolvedProps.labelStyle === "inline" ? (l(), o("div", _, p(e.resolvedProps.label), 1)) : a("", !0)
|
|
110
|
+
], 64)) : a("", !0), s("div", v, [u(e.$slots, "default", {}, void 0, !0)])]),
|
|
111
|
+
_: 3
|
|
112
|
+
}, 40, ["class"]);
|
|
113
|
+
}
|
|
114
|
+
var b = /*#__PURE__*/ n(h, [["render", y], ["__scopeId", "data-v-a0a65109"]]);
|
|
115
|
+
export { b as default };
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { default as Tab } from './Tab.vue';
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
4
|
+
export type __VLS_LocalComponents = typeof __VLS_componentsOption;
|
|
5
|
+
export type __VLS_GlobalComponents = import('vue').GlobalComponents;
|
|
6
|
+
export type __VLS_LocalDirectives = {};
|
|
7
|
+
export type __VLS_Slots = ReturnType<typeof __VLS_template>["__VLS_Slots"];
|
|
8
|
+
declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
9
|
tagName: {
|
|
3
10
|
default: string;
|
|
4
11
|
};
|
|
@@ -192,5 +199,12 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
192
199
|
dir: string;
|
|
193
200
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
194
201
|
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
195
|
-
|
|
202
|
+
declare namespace __VLS_componentsOption {
|
|
203
|
+
export { Tab };
|
|
204
|
+
}
|
|
205
|
+
declare function __VLS_template(): {
|
|
206
|
+
__VLS_Slots: {
|
|
207
|
+
default?: (props: {}) => any;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
196
210
|
//# sourceMappingURL=InputBase.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputBase.vue.d.ts","sourceRoot":"","sources":["../../src/components/InputBase.vue"],"names":[],"mappings":"AA0CA;"}
|
|
1
|
+
{"version":3,"file":"InputBase.vue.d.ts","sourceRoot":"","sources":["../../src/components/InputBase.vue"],"names":[],"mappings":"AA0CA;wBAqS0B,OAAO,YAAY;;oCAK/B,OAAO,sBAAsB;qCAC7B,OAAO,KAAK,EAAE,gBAAgB;oCAG9B,EAAE;0BA4JF,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,aAAa,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEAsEG;;;;AAjOH;;kBAkJc,CAAC,KAAK,IAAiB,KAAK,GAAG;;EAM5C;gBAtKe,WAAW"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer nightshade;@layer nightshade-components{.InputGroup[data-v-04e7374e]{align-items:end;gap:var(--input-border-size);flex-flow:row;display:flex}:is(.InputGroup[data-v-04e7374e]>.InputElement:not(:first-child),.InputGroup[data-v-04e7374e]>:not(:first-child)>.InputElement){border-start-start-radius:0;border-end-start-radius:0}:is(.InputGroup[data-v-04e7374e]>.InputElement:not(:last-child),.InputGroup[data-v-04e7374e]>:not(:last-child)>.InputElement){border-start-end-radius:0;border-end-end-radius:0}}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import './InputGroup.css';
|
|
2
|
+
import { nightshadeMixin as e } from "../helpers/props.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
import { createBlock as n, openBlock as r, renderSlot as i, resolveDynamicComponent as a, withCtx as o } from "vue";
|
|
6
|
+
// src/components/InputGroup.vue
|
|
7
|
+
var s = {
|
|
8
|
+
mixins: [e],
|
|
9
|
+
props: { tagName: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "div"
|
|
12
|
+
} }
|
|
13
|
+
};
|
|
14
|
+
function c(e, t, s, c, l, u) {
|
|
15
|
+
return r(), n(a(e.resolvedProps.tagName), { class: "InputGroup" }, {
|
|
16
|
+
default: o(() => [i(e.$slots, "default", {}, void 0, !0)]),
|
|
17
|
+
_: 3
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
var l = /*#__PURE__*/ t(s, [["render", c], ["__scopeId", "data-v-04e7374e"]]);
|
|
21
|
+
export { l as default };
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
export type __VLS_LocalComponents = {};
|
|
4
|
+
export type __VLS_GlobalComponents = import('vue').GlobalComponents;
|
|
5
|
+
export type __VLS_LocalDirectives = {};
|
|
6
|
+
export type __VLS_Slots = ReturnType<typeof __VLS_template>["__VLS_Slots"];
|
|
7
|
+
declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
8
|
tagName: {
|
|
3
9
|
type: StringConstructor;
|
|
4
10
|
default: string;
|
|
@@ -20,5 +26,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
20
26
|
}>> & Readonly<{}>, {
|
|
21
27
|
tagName: string;
|
|
22
28
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
23
|
-
|
|
29
|
+
declare function __VLS_template(): {
|
|
30
|
+
__VLS_Slots: {
|
|
31
|
+
default?: (props: {}) => any;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
24
34
|
//# sourceMappingURL=InputGroup.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputGroup.vue.d.ts","sourceRoot":"","sources":["../../src/components/InputGroup.vue"],"names":[],"mappings":"AAOA;"}
|
|
1
|
+
{"version":3,"file":"InputGroup.vue.d.ts","sourceRoot":"","sources":["../../src/components/InputGroup.vue"],"names":[],"mappings":"AAOA;wBA0D0B,OAAO,YAAY;;oCAE/B,EAAE;qCACF,OAAO,KAAK,EAAE,gBAAgB;oCAG9B,EAAE;0BAsCF,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,aAAa,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;6EAQG;AA7CH;;kBA4Bc,CAAC,KAAK,IAAgB,KAAK,GAAG;;EAM3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer nightshade;@layer nightshade-components{.InputSelect[data-v-d5afcd3d]:not(.InputSelect-disabled){cursor:pointer}select[data-v-d5afcd3d]{appearance:none;box-sizing:border-box;-webkit-user-select:text;user-select:text;width:100%;min-width:0;color:inherit;font:inherit;cursor:inherit;background:0 0;border:0;outline:0;flex:1;padding:0}select[aria-readonly=true][data-v-d5afcd3d]{pointer-events:none}}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import './InputSelect.css';
|
|
2
|
+
import { collectProps as e, nightshadeMixin as t } from "../helpers/props.js";
|
|
3
|
+
import n from "./InputBase.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import r from "../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
import { Fragment as i, createBlock as a, createElementBlock as o, createElementVNode as s, mergeProps as c, openBlock as l, renderList as u, renderSlot as d, resolveComponent as f, toDisplayString as p, withCtx as m } from "vue";
|
|
7
|
+
// src/components/InputSelect.vue
|
|
8
|
+
var h = {
|
|
9
|
+
components: { InputBase: n },
|
|
10
|
+
mixins: [t],
|
|
11
|
+
props: {
|
|
12
|
+
...n.props,
|
|
13
|
+
tagName: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "label"
|
|
16
|
+
},
|
|
17
|
+
modelValue: { type: [String, Number] },
|
|
18
|
+
options: {
|
|
19
|
+
type: Array,
|
|
20
|
+
default: () => []
|
|
21
|
+
},
|
|
22
|
+
autoFocus: { type: Boolean },
|
|
23
|
+
readonly: { type: Boolean }
|
|
24
|
+
},
|
|
25
|
+
emits: [
|
|
26
|
+
"focus",
|
|
27
|
+
"blur",
|
|
28
|
+
"input",
|
|
29
|
+
"change",
|
|
30
|
+
"update:modelValue"
|
|
31
|
+
],
|
|
32
|
+
computed: {
|
|
33
|
+
inputBaseProps() {
|
|
34
|
+
return e(this, n);
|
|
35
|
+
},
|
|
36
|
+
hasGroupedOptions() {
|
|
37
|
+
return this.resolvedProps.options.some((e) => e?.group);
|
|
38
|
+
},
|
|
39
|
+
groupedOptions() {
|
|
40
|
+
let e = [{
|
|
41
|
+
label: "",
|
|
42
|
+
options: []
|
|
43
|
+
}];
|
|
44
|
+
for (let t of this.resolvedProps.options) {
|
|
45
|
+
let n = t?.group ?? "", r = e.find((e) => e.label === n);
|
|
46
|
+
r ? r.options.push(t) : e.push({
|
|
47
|
+
label: n,
|
|
48
|
+
options: [t]
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return e;
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
mounted() {
|
|
55
|
+
this.resolvedProps.autoFocus && this.$refs.input?.focus();
|
|
56
|
+
},
|
|
57
|
+
methods: {
|
|
58
|
+
onInput(e) {
|
|
59
|
+
this.$emit("input", e);
|
|
60
|
+
},
|
|
61
|
+
onChange(e) {
|
|
62
|
+
this.resolvedProps.readonly ? e.target.value = this.resolvedProps.modelValue : (this.$emit("change", e), this.$emit("update:modelValue", e.target.value));
|
|
63
|
+
},
|
|
64
|
+
optionLabel(e) {
|
|
65
|
+
return String(e?.label ?? e?.value ?? "");
|
|
66
|
+
},
|
|
67
|
+
optionKey(e) {
|
|
68
|
+
return `${e?.group ?? ""}:${String(e?.value ?? "")}`;
|
|
69
|
+
},
|
|
70
|
+
onBaseClick(e) {
|
|
71
|
+
let t = this.$refs.input;
|
|
72
|
+
e.target !== t && (e.preventDefault(), typeof t.showPicker == "function" ? t.showPicker() : t.click());
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}, g = [
|
|
76
|
+
"value",
|
|
77
|
+
"disabled",
|
|
78
|
+
"aria-readonly"
|
|
79
|
+
], _ = ["label"], v = ["value"], y = ["value"];
|
|
80
|
+
function b(e, t, n, r, h, b) {
|
|
81
|
+
let x = f("InputBase");
|
|
82
|
+
return l(), a(x, c({ class: "InputSelect" }, b.inputBaseProps, { onClick: t[4] ||= (e) => b.onBaseClick(e) }), {
|
|
83
|
+
default: m(() => [
|
|
84
|
+
d(e.$slots, "before", {}, void 0, !0),
|
|
85
|
+
s("select", {
|
|
86
|
+
ref: "input",
|
|
87
|
+
value: e.resolvedProps.modelValue,
|
|
88
|
+
disabled: e.resolvedProps.disabled,
|
|
89
|
+
"aria-readonly": e.resolvedProps.readonly,
|
|
90
|
+
onInput: t[0] ||= (e) => b.onInput(e),
|
|
91
|
+
onChange: t[1] ||= (e) => b.onChange(e),
|
|
92
|
+
onFocus: t[2] ||= (t) => e.$emit("focus", t),
|
|
93
|
+
onBlur: t[3] ||= (t) => e.$emit("blur", t)
|
|
94
|
+
}, [b.hasGroupedOptions ? (l(!0), o(i, { key: 0 }, u(b.groupedOptions, (e) => (l(), o("optgroup", {
|
|
95
|
+
key: e.label,
|
|
96
|
+
label: e.label
|
|
97
|
+
}, [(l(!0), o(i, null, u(e.options, (e) => (l(), o("option", {
|
|
98
|
+
key: b.optionKey(e),
|
|
99
|
+
value: e.value
|
|
100
|
+
}, p(b.optionLabel(e)), 9, v))), 128))], 8, _))), 128)) : (l(!0), o(i, { key: 1 }, u(e.resolvedProps.options, (e) => (l(), o("option", {
|
|
101
|
+
key: b.optionKey(e),
|
|
102
|
+
value: e.value
|
|
103
|
+
}, p(b.optionLabel(e)), 9, y))), 128))], 40, g),
|
|
104
|
+
d(e.$slots, "after", {}, void 0, !0)
|
|
105
|
+
]),
|
|
106
|
+
_: 3
|
|
107
|
+
}, 16);
|
|
108
|
+
}
|
|
109
|
+
var x = /*#__PURE__*/ r(h, [["render", b], ["__scopeId", "data-v-d5afcd3d"]]);
|
|
110
|
+
export { x as default };
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { default as InputBase } from './InputBase.vue';
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
4
|
+
export type __VLS_LocalComponents = typeof __VLS_componentsOption;
|
|
5
|
+
export type __VLS_GlobalComponents = import('vue').GlobalComponents;
|
|
6
|
+
export type __VLS_LocalDirectives = {};
|
|
7
|
+
export type __VLS_Slots = ReturnType<typeof __VLS_template>["__VLS_Slots"];
|
|
8
|
+
declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {
|
|
2
9
|
inputBaseProps(): Record<string, any>;
|
|
3
10
|
hasGroupedOptions(): any;
|
|
4
11
|
groupedOptions(): {
|
|
@@ -224,5 +231,14 @@ declare const _default: import('vue').DefineComponent<{}, {}, {}, {
|
|
|
224
231
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
225
232
|
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
226
233
|
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
227
|
-
|
|
234
|
+
declare namespace __VLS_componentsOption {
|
|
235
|
+
export { InputBase };
|
|
236
|
+
}
|
|
237
|
+
declare function __VLS_template(): {
|
|
238
|
+
__VLS_Slots: {
|
|
239
|
+
before?: (props: {}) => any;
|
|
240
|
+
} & {
|
|
241
|
+
after?: (props: {}) => any;
|
|
242
|
+
};
|
|
243
|
+
};
|
|
228
244
|
//# sourceMappingURL=InputSelect.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputSelect.vue.d.ts","sourceRoot":"","sources":["../../src/components/InputSelect.vue"],"names":[],"mappings":"AAwCA;"}
|
|
1
|
+
{"version":3,"file":"InputSelect.vue.d.ts","sourceRoot":"","sources":["../../src/components/InputSelect.vue"],"names":[],"mappings":"AAwCA;wBAoM0B,OAAO,YAAY;;oCAK/B,OAAO,sBAAsB;qCAC7B,OAAO,KAAK,EAAE,gBAAgB;oCAG9B,EAAE;0BAkHF,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,aAAa,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEAuGG;;;;AAxNH;;iBAuGa,CAAC,KAAK,IAAgB,KAAK,GAAG;;gBAC/B,CAAC,KAAK,IAAiB,KAAK,GAAG;;EAM1C;sBA5HqB,iBAAiB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer nightshade;@layer nightshade-components{.InputText[data-v-fad9b9e3]:not(.InputText-disabled){cursor:text}input[data-v-fad9b9e3],textarea[data-v-fad9b9e3]{-webkit-appearance:none;box-sizing:border-box;-webkit-user-select:text;user-select:text;width:100%;min-width:0;color:inherit;font:inherit;cursor:inherit;background:0 0;border:0;outline:0;flex:1;padding:0}}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import './InputText.css';
|
|
2
|
+
import { collectProps as e, nightshadeMixin as t } from "../helpers/props.js";
|
|
3
|
+
import n from "./InputBase.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import r from "../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
import { createBlock as i, createElementVNode as a, mergeProps as o, openBlock as s, renderSlot as c, resolveComponent as l, withCtx as u } from "vue";
|
|
7
|
+
// src/components/InputText.vue
|
|
8
|
+
var d = {
|
|
9
|
+
components: { InputBase: n },
|
|
10
|
+
mixins: [t],
|
|
11
|
+
props: {
|
|
12
|
+
...n.props,
|
|
13
|
+
tagName: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "label"
|
|
16
|
+
},
|
|
17
|
+
modelValue: { type: [String, Number] },
|
|
18
|
+
type: { type: String },
|
|
19
|
+
placeholder: { type: String },
|
|
20
|
+
min: { type: Number },
|
|
21
|
+
max: { type: Number },
|
|
22
|
+
step: { type: Number },
|
|
23
|
+
autoFocus: { type: Boolean },
|
|
24
|
+
readonly: { type: Boolean }
|
|
25
|
+
},
|
|
26
|
+
emits: [
|
|
27
|
+
"focus",
|
|
28
|
+
"blur",
|
|
29
|
+
"input",
|
|
30
|
+
"update:modelValue"
|
|
31
|
+
],
|
|
32
|
+
computed: { inputBaseProps() {
|
|
33
|
+
return e(this, n);
|
|
34
|
+
} },
|
|
35
|
+
mounted() {
|
|
36
|
+
this.resolvedProps.autoFocus && this.$refs.input?.focus();
|
|
37
|
+
},
|
|
38
|
+
methods: { onInput(e) {
|
|
39
|
+
this.$emit("input", e), this.$emit("update:modelValue", e.target.value);
|
|
40
|
+
} }
|
|
41
|
+
}, f = [
|
|
42
|
+
"value",
|
|
43
|
+
"type",
|
|
44
|
+
"placeholder",
|
|
45
|
+
"readonly",
|
|
46
|
+
"disabled",
|
|
47
|
+
"min",
|
|
48
|
+
"max",
|
|
49
|
+
"step"
|
|
50
|
+
];
|
|
51
|
+
function p(e, t, n, r, d, p) {
|
|
52
|
+
let m = l("InputBase");
|
|
53
|
+
return s(), i(m, o({ class: "InputText" }, p.inputBaseProps), {
|
|
54
|
+
default: u(() => [
|
|
55
|
+
c(e.$slots, "before", {}, void 0, !0),
|
|
56
|
+
a("input", {
|
|
57
|
+
ref: "input",
|
|
58
|
+
value: e.resolvedProps.modelValue,
|
|
59
|
+
type: e.resolvedProps.type,
|
|
60
|
+
placeholder: e.resolvedProps.placeholder,
|
|
61
|
+
readonly: e.resolvedProps.readonly,
|
|
62
|
+
disabled: e.resolvedProps.disabled,
|
|
63
|
+
min: e.resolvedProps.min,
|
|
64
|
+
max: e.resolvedProps.max,
|
|
65
|
+
step: e.resolvedProps.step,
|
|
66
|
+
autocomplete: "off",
|
|
67
|
+
onInput: t[0] ||= (e) => p.onInput(e),
|
|
68
|
+
onFocus: t[1] ||= (t) => e.$emit("focus", t),
|
|
69
|
+
onBlur: t[2] ||= (t) => e.$emit("blur", t)
|
|
70
|
+
}, null, 40, f),
|
|
71
|
+
c(e.$slots, "after", {}, void 0, !0)
|
|
72
|
+
]),
|
|
73
|
+
_: 3
|
|
74
|
+
}, 16);
|
|
75
|
+
}
|
|
76
|
+
var m = /*#__PURE__*/ r(d, [["render", p], ["__scopeId", "data-v-fad9b9e3"]]);
|
|
77
|
+
export { m as default };
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { default as InputBase } from './InputBase.vue';
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
4
|
+
export type __VLS_LocalComponents = typeof __VLS_componentsOption;
|
|
5
|
+
export type __VLS_GlobalComponents = import('vue').GlobalComponents;
|
|
6
|
+
export type __VLS_LocalDirectives = {};
|
|
7
|
+
export type __VLS_Slots = ReturnType<typeof __VLS_template>["__VLS_Slots"];
|
|
8
|
+
declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {
|
|
2
9
|
inputBaseProps(): Record<string, any>;
|
|
3
10
|
}, {
|
|
4
11
|
onInput(ev: any): void;
|
|
@@ -214,5 +221,14 @@ declare const _default: import('vue').DefineComponent<{}, {}, {}, {
|
|
|
214
221
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
215
222
|
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
216
223
|
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
217
|
-
|
|
224
|
+
declare namespace __VLS_componentsOption {
|
|
225
|
+
export { InputBase };
|
|
226
|
+
}
|
|
227
|
+
declare function __VLS_template(): {
|
|
228
|
+
__VLS_Slots: {
|
|
229
|
+
before?: (props: {}) => any;
|
|
230
|
+
} & {
|
|
231
|
+
after?: (props: {}) => any;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
218
234
|
//# sourceMappingURL=InputText.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputText.vue.d.ts","sourceRoot":"","sources":["../../src/components/InputText.vue"],"names":[],"mappings":"AAsBA;"}
|
|
1
|
+
{"version":3,"file":"InputText.vue.d.ts","sourceRoot":"","sources":["../../src/components/InputText.vue"],"names":[],"mappings":"AAsBA;wBAuH0B,OAAO,YAAY;;oCAK/B,OAAO,sBAAsB;qCAC7B,OAAO,KAAK,EAAE,gBAAgB;oCAG9B,EAAE;0BAmEF,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,aAAa,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEAiDG;;;;AAnHH;;iBAwDa,CAAC,KAAK,IAAgB,KAAK,GAAG;;gBAC/B,CAAC,KAAK,IAAgB,KAAK,GAAG;;EAMzC;sBA7EqB,iBAAiB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer nightshade;@layer nightshade-components{.InputTextarea[data-v-571ed164]:not(.InputTextarea-disabled){cursor:text}input[data-v-571ed164],textarea[data-v-571ed164]{-webkit-appearance:none;box-sizing:border-box;-webkit-user-select:text;user-select:text;width:100%;min-width:0;color:inherit;font:inherit;cursor:inherit;resize:none;background:0 0;border:0;outline:0;flex:1;padding:0}.InputBase[data-v-571ed164] .Container{overflow-y:auto}textarea[data-v-571ed164]{align-self:flex-start}}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import './InputTextarea.css';
|
|
2
|
+
import { collectProps as e, nightshadeMixin as t } from "../helpers/props.js";
|
|
3
|
+
import n from "./InputBase.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import r from "../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
import { createBlock as i, createElementVNode as a, mergeProps as o, openBlock as s, renderSlot as c, resolveComponent as l, withCtx as u } from "vue";
|
|
7
|
+
// src/components/InputTextarea.vue
|
|
8
|
+
var d = {
|
|
9
|
+
components: { InputBase: n },
|
|
10
|
+
mixins: [t],
|
|
11
|
+
props: {
|
|
12
|
+
...n.props,
|
|
13
|
+
tagName: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "label"
|
|
16
|
+
},
|
|
17
|
+
modelValue: { type: String },
|
|
18
|
+
placeholder: { type: String },
|
|
19
|
+
rows: { type: Number },
|
|
20
|
+
autoSize: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !0
|
|
23
|
+
},
|
|
24
|
+
autoFocus: { type: Boolean },
|
|
25
|
+
readonly: { type: Boolean }
|
|
26
|
+
},
|
|
27
|
+
emits: [
|
|
28
|
+
"focus",
|
|
29
|
+
"blur",
|
|
30
|
+
"input",
|
|
31
|
+
"update:modelValue"
|
|
32
|
+
],
|
|
33
|
+
computed: { inputBaseProps() {
|
|
34
|
+
return e(this, n);
|
|
35
|
+
} },
|
|
36
|
+
watch: { modelValue: { handler() {
|
|
37
|
+
let e = this.$refs.input;
|
|
38
|
+
this.resolvedProps.autoSize && e && (e.style.height = "auto", e.style.height = e.scrollHeight + "px");
|
|
39
|
+
} } },
|
|
40
|
+
mounted() {
|
|
41
|
+
this.$nextTick(() => {
|
|
42
|
+
let e = this.$refs.input;
|
|
43
|
+
this.resolvedProps.autoFocus && e.focus(), this.resolvedProps.autoSize && (e.style.height = e.scrollHeight + "px", e.style.overflowY = "hidden");
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
methods: { onInput(e) {
|
|
47
|
+
this.$emit("input", e), this.$emit("update:modelValue", e.target.value);
|
|
48
|
+
} }
|
|
49
|
+
}, f = [
|
|
50
|
+
"value",
|
|
51
|
+
"placeholder",
|
|
52
|
+
"readonly",
|
|
53
|
+
"disabled",
|
|
54
|
+
"rows"
|
|
55
|
+
];
|
|
56
|
+
function p(e, t, n, r, d, p) {
|
|
57
|
+
let m = l("InputBase");
|
|
58
|
+
return s(), i(m, o({ class: "InputTextarea" }, p.inputBaseProps, { fixedHeight: !1 }), {
|
|
59
|
+
default: u(() => [
|
|
60
|
+
c(e.$slots, "before", {}, void 0, !0),
|
|
61
|
+
a("textarea", {
|
|
62
|
+
ref: "input",
|
|
63
|
+
value: e.resolvedProps.modelValue,
|
|
64
|
+
placeholder: e.resolvedProps.placeholder,
|
|
65
|
+
readonly: e.resolvedProps.readonly,
|
|
66
|
+
disabled: e.resolvedProps.disabled,
|
|
67
|
+
rows: e.resolvedProps.rows,
|
|
68
|
+
resize: "none",
|
|
69
|
+
autocomplete: "off",
|
|
70
|
+
onInput: t[0] ||= (e) => p.onInput(e),
|
|
71
|
+
onFocus: t[1] ||= (t) => e.$emit("focus", t),
|
|
72
|
+
onBlur: t[2] ||= (t) => e.$emit("blur", t)
|
|
73
|
+
}, null, 40, f),
|
|
74
|
+
c(e.$slots, "after", {}, void 0, !0)
|
|
75
|
+
]),
|
|
76
|
+
_: 3
|
|
77
|
+
}, 16);
|
|
78
|
+
}
|
|
79
|
+
var m = /*#__PURE__*/ r(d, [["render", p], ["__scopeId", "data-v-571ed164"]]);
|
|
80
|
+
export { m as default };
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { default as InputBase } from './InputBase.vue';
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
4
|
+
export type __VLS_LocalComponents = typeof __VLS_componentsOption;
|
|
5
|
+
export type __VLS_GlobalComponents = import('vue').GlobalComponents;
|
|
6
|
+
export type __VLS_LocalDirectives = {};
|
|
7
|
+
export type __VLS_Slots = ReturnType<typeof __VLS_template>["__VLS_Slots"];
|
|
8
|
+
declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {
|
|
2
9
|
inputBaseProps(): Record<string, any>;
|
|
3
10
|
}, {
|
|
4
11
|
onInput(ev: any): void;
|
|
@@ -214,5 +221,14 @@ declare const _default: import('vue').DefineComponent<{}, {}, {}, {
|
|
|
214
221
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
215
222
|
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
216
223
|
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
217
|
-
|
|
224
|
+
declare namespace __VLS_componentsOption {
|
|
225
|
+
export { InputBase };
|
|
226
|
+
}
|
|
227
|
+
declare function __VLS_template(): {
|
|
228
|
+
__VLS_Slots: {
|
|
229
|
+
before?: (props: {}) => any;
|
|
230
|
+
} & {
|
|
231
|
+
after?: (props: {}) => any;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
218
234
|
//# sourceMappingURL=InputTextarea.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputTextarea.vue.d.ts","sourceRoot":"","sources":["../../src/components/InputTextarea.vue"],"names":[],"mappings":"AAqBA;"}
|
|
1
|
+
{"version":3,"file":"InputTextarea.vue.d.ts","sourceRoot":"","sources":["../../src/components/InputTextarea.vue"],"names":[],"mappings":"AAqBA;wBAkJ0B,OAAO,YAAY;;oCAK/B,OAAO,sBAAsB;qCAC7B,OAAO,KAAK,EAAE,gBAAgB;oCAG9B,EAAE;0BAoEF,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,aAAa,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qEAoEG;;;;AAvIH;;iBAyDa,CAAC,KAAK,IAAgB,KAAK,GAAG;;gBAC/B,CAAC,KAAK,IAAgB,KAAK,GAAG;;EAMzC;sBA9EqB,iBAAiB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer nightshade;@layer nightshade-components{.ModalOverlay[data-v-354915e0]{--ModalOverlay-background:var(--surface-overlay);z-index:2000;pointer-events:none;position:fixed;inset:0}.ModalOverlay-enabled[data-v-354915e0]{pointer-events:auto;overscroll-behavior:none;overflow:auto}.ModalOverlay-shown[data-v-354915e0]{background:var(--ModalOverlay-background)}}
|