@gospore/theme 1.0.72
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/LICENSE +0 -0
- package/README.md +22 -0
- package/dist/style.css +1 -0
- package/dist/theme.es.js +453 -0
- package/dist/theme.umd.js +6 -0
- package/package.json +29 -0
package/LICENSE
ADDED
|
File without changes
|
package/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# gospore-ui-library
|
|
2
|
+
|
|
3
|
+
## Voraussetzungen
|
|
4
|
+
Dependency style-resources-loader in der konsumierenden Applikation installieren:
|
|
5
|
+
|
|
6
|
+
`vue add style-resources-loader`
|
|
7
|
+
|
|
8
|
+
## Verwendung
|
|
9
|
+
In der vue.config.js aktivieren:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
module.exports = {
|
|
13
|
+
pluginOptions: {
|
|
14
|
+
"style-resources-loader": {
|
|
15
|
+
preProcessor: "less",
|
|
16
|
+
patterns: [
|
|
17
|
+
"./node_modules/@gospore/gospore-web-ui-library-theme/src/component-bundle.less"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
```
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
html,body,p,div,h1,h2,h3,h4,h5,h6,ul,ol,dl,img,pre,form,fieldset{margin:0;padding:0}img,fieldset{border:0}body,html,#app{height:100%;width:100%}body{background-color:#fff;color:#091e42;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:23px}input,select,textarea,button{font-family:inherit;font-size:inherit;font-weight:inherit;line-height:25px}p,ul,ol,dl,h1,h2,h3,h4,h5,h6,blockquote,pre,form,table{margin:16px 0 0}a{color:#0052cc;text-decoration:none;border-radius:2px;cursor:pointer}a:hover{color:#0065ff;text-decoration:underline}a:active{color:#052fad}h1{font-size:2.07142857em;font-style:normal;line-height:32 / 29;color:#172b4d;font-weight:600;letter-spacing:-.01em;margin-top:40px}[dark-mode=true] h1{color:#b8c7e0}h1:first-child{margin-top:0}h2{font-size:1.71428571em;font-style:normal;line-height:28 / 24;color:#172b4d;font-weight:500;letter-spacing:-.01em;margin-top:40px}[dark-mode=true] h2{color:#b8c7e0}h2:first-child{margin-top:0}h3{font-size:1.42857143em;font-style:normal;line-height:24 / 20;color:#172b4d;font-weight:500;letter-spacing:-.008em;margin-top:28px}[dark-mode=true] h3{color:#b8c7e0}h3:first-child{margin-top:0}h4{font-size:1.14285714em;font-style:normal;line-height:20 / 16;color:#172b4d;font-weight:600;letter-spacing:-.006em;margin-top:24px}[dark-mode=true] h4{color:#b8c7e0}h4:first-child{margin-top:0}h5{font-size:1em;font-style:normal;line-height:16 / 14;color:#172b4d;font-weight:600;letter-spacing:-.003em;margin-top:16px}[dark-mode=true] h5{color:#b8c7e0}h5:first-child{margin-top:0}h6{font-size:.85714286em;font-style:normal;line-height:16 / 12;color:#172b4d;font-weight:600;margin-top:20px;text-transform:uppercase}[dark-mode=true] h6{color:#b8c7e0}h6:first-child{margin-top:0}hr{background-color:#dfe1e6;height:2px;border-style:none;margin:40px 0}ul,ol,dl{padding-left:40px}dd,dd+dt,li+li{margin-top:4px}ul ul:not(:first-child),ol ul:not(:first-child),ul ol:not(:first-child),ol ol:not(:first-child){margin-top:4px}p:first-child,ul:first-child,ol:first-child,dl:first-child,h1:first-child,h2:first-child,h3:first-child,h4:first-child,h5:first-child,h6:first-child,blockquote:first-child,pre:first-child,form:first-child,table:first-child{margin-top:0}:focus{outline:none;box-shadow:0 0 0 2px #4c9aff}[data-whatintent=mouse] :focus{outline:none;box-shadow:none}pre{font-family:SFMono-Medium,SF Mono,Segoe UI Mono,Roboto Mono,Ubuntu Mono,Menlo,Consolas,Courier,monospace;white-space:pre-wrap;padding:8px 16px;border-radius:5px;background:#f4f5f7;font-size:.8rem;overflow-x:auto}blockquote{white-space:pre-wrap;border-left:3px solid #dfe1e6;padding-left:8px;font-style:italic}p code{font-family:SFMono-Medium,SF Mono,Segoe UI Mono,Roboto Mono,Ubuntu Mono,Menlo,Consolas,Courier,monospace;padding:0 8px;border-radius:3px;background:#dfe1e6}table{border-collapse:collapse;width:100%}thead,tbody,tfoot{border-bottom:2px solid #dfe1e6}td,th{border:none;padding:4px 8px;text-align:left}th{font-size:.78571429em;font-style:normal;line-height:16 / 11;color:#6b778c;font-weight:700;margin-top:16px;line-height:inherit}[dark-mode=true] th{color:#8c9cb8}th:first-child{margin-top:0}td:first-child,th:first-child{padding-left:0}td:last-child,th:last-child{padding-right:0}tr{transition:background .1s ease-out,box-shadow .15s cubic-bezier(.47,.03,.49,1.38)}tbody tr:hover{background-color:#f4f5f7}caption{font-size:1.42857143em;font-style:normal;line-height:24 / 20;color:#172b4d;font-weight:500;letter-spacing:-.008em;margin-top:28px;margin-bottom:8px;text-align:left}[dark-mode=true] caption{color:#b8c7e0}caption:first-child{margin-top:0}[dark-mode=true] body{background-color:#1b2638;color:#b8c7e0}[dark-mode=true] h1,[dark-mode=true] h2,[dark-mode=true] h3,[dark-mode=true] h4,[dark-mode=true] h5{color:#b8c7e0}[dark-mode=true] h6{color:#8c9cb8}[dark-mode=true] a{color:#4c9aff}[dark-mode=true] a:hover{color:#2684ff}[dark-mode=true] a:active{color:#4c9aff}[dark-mode=true] hr{background-color:#3b475c}[dark-mode=true] pre{background:#283447}[dark-mode=true] p code{background:#3b475c}[dark-mode=true] blockquote{border-left:3px solid #3b475c}[dark-mode=true] thead,[dark-mode=true] tbody,[dark-mode=true] tfoot{border-bottom:2px solid #3b475c}[dark-mode=true] tbody tr:hover{background-color:#283447}.heading-900{font-size:2.5em;font-style:normal;line-height:40 / 35;color:#172b4d;font-weight:500;letter-spacing:-.01em;margin-top:52px}[dark-mode=true] .heading-900{color:#b8c7e0}.heading-900:first-child{margin-top:0}.heading-800{font-size:2.07142857em;font-style:normal;line-height:32 / 29;color:#172b4d;font-weight:600;letter-spacing:-.01em;margin-top:40px}[dark-mode=true] .heading-800{color:#b8c7e0}.heading-800:first-child{margin-top:0}.heading-700{font-size:1.71428571em;font-style:normal;line-height:28 / 24;color:#172b4d;font-weight:500;letter-spacing:-.01em;margin-top:40px}[dark-mode=true] .heading-700{color:#b8c7e0}.heading-700:first-child{margin-top:0}.heading-600{font-size:1.42857143em;font-style:normal;line-height:24 / 20;color:#172b4d;font-weight:500;letter-spacing:-.008em;margin-top:28px}[dark-mode=true] .heading-600{color:#b8c7e0}.heading-600:first-child{margin-top:0}.heading-500{font-size:1.14285714em;font-style:normal;line-height:20 / 16;color:#172b4d;font-weight:600;letter-spacing:-.006em;margin-top:24px}[dark-mode=true] .heading-500{color:#b8c7e0}.heading-500:first-child{margin-top:0}.heading-400{font-size:1em;font-style:normal;line-height:16 / 14;color:#172b4d;font-weight:600;letter-spacing:-.003em;margin-top:16px}[dark-mode=true] .heading-400{color:#b8c7e0}.heading-400:first-child{margin-top:0}.heading-300{font-size:.85714286em;font-style:normal;line-height:16 / 12;color:#172b4d;font-weight:600;margin-top:20px;text-transform:uppercase}[dark-mode=true] .heading-300{color:#b8c7e0}.heading-300:first-child{margin-top:0}.heading-200{font-size:.85714286em;font-style:normal;line-height:16 / 12;color:#6b778c;font-weight:600;margin-top:16px}[dark-mode=true] .heading-200{color:#8c9cb8}.heading-200:first-child{margin-top:0}.heading-100{font-size:.78571429em;font-style:normal;line-height:16 / 11;color:#6b778c;font-weight:700;margin-top:16px}[dark-mode=true] .heading-100{color:#8c9cb8}.heading-100:first-child{margin-top:0}.text-caption{font-size:12px;font-weight:400;color:#7a869a}.text-caption-bold{font-size:12px;font-weight:600;color:#091e42}.text-prominent{font-size:14px;font-weight:600;color:#091e42}.error{color:#ff5630}[dark-mode=true] .text-caption{color:#7988a3}[dark-mode=true] .text-caption-bold,[dark-mode=true] .text-prominent{color:#b8c7e0}[dark-mode=true] .error{color:#ff5630}
|
package/dist/theme.es.js
ADDED
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
2
|
+
var whatInput = { exports: {} };
|
|
3
|
+
/**
|
|
4
|
+
* what-input - A global utility for tracking the current input method (mouse, keyboard or touch).
|
|
5
|
+
* @version v5.2.10
|
|
6
|
+
* @link https://github.com/ten1seven/what-input
|
|
7
|
+
* @license MIT
|
|
8
|
+
*/
|
|
9
|
+
(function(module, exports) {
|
|
10
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
11
|
+
module.exports = factory();
|
|
12
|
+
})(commonjsGlobal, function() {
|
|
13
|
+
return function(modules) {
|
|
14
|
+
var installedModules = {};
|
|
15
|
+
function __webpack_require__(moduleId) {
|
|
16
|
+
if (installedModules[moduleId])
|
|
17
|
+
return installedModules[moduleId].exports;
|
|
18
|
+
var module2 = installedModules[moduleId] = {
|
|
19
|
+
exports: {},
|
|
20
|
+
id: moduleId,
|
|
21
|
+
loaded: false
|
|
22
|
+
};
|
|
23
|
+
modules[moduleId].call(module2.exports, module2, module2.exports, __webpack_require__);
|
|
24
|
+
module2.loaded = true;
|
|
25
|
+
return module2.exports;
|
|
26
|
+
}
|
|
27
|
+
__webpack_require__.m = modules;
|
|
28
|
+
__webpack_require__.c = installedModules;
|
|
29
|
+
__webpack_require__.p = "";
|
|
30
|
+
return __webpack_require__(0);
|
|
31
|
+
}([
|
|
32
|
+
function(module2, exports2) {
|
|
33
|
+
module2.exports = function() {
|
|
34
|
+
if (typeof document === "undefined" || typeof window === "undefined") {
|
|
35
|
+
return {
|
|
36
|
+
ask: function ask() {
|
|
37
|
+
return "initial";
|
|
38
|
+
},
|
|
39
|
+
element: function element() {
|
|
40
|
+
return null;
|
|
41
|
+
},
|
|
42
|
+
ignoreKeys: function ignoreKeys() {
|
|
43
|
+
},
|
|
44
|
+
specificKeys: function specificKeys() {
|
|
45
|
+
},
|
|
46
|
+
registerOnChange: function registerOnChange() {
|
|
47
|
+
},
|
|
48
|
+
unRegisterOnChange: function unRegisterOnChange() {
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
var docElem = document.documentElement;
|
|
53
|
+
var currentElement = null;
|
|
54
|
+
var currentInput = "initial";
|
|
55
|
+
var currentIntent = currentInput;
|
|
56
|
+
var currentTimestamp = Date.now();
|
|
57
|
+
var shouldPersist = "false";
|
|
58
|
+
var formInputs = ["button", "input", "select", "textarea"];
|
|
59
|
+
var functionList = [];
|
|
60
|
+
var ignoreMap = [
|
|
61
|
+
16,
|
|
62
|
+
17,
|
|
63
|
+
18,
|
|
64
|
+
91,
|
|
65
|
+
93
|
|
66
|
+
];
|
|
67
|
+
var specificMap = [];
|
|
68
|
+
var inputMap = {
|
|
69
|
+
keydown: "keyboard",
|
|
70
|
+
keyup: "keyboard",
|
|
71
|
+
mousedown: "mouse",
|
|
72
|
+
mousemove: "mouse",
|
|
73
|
+
MSPointerDown: "pointer",
|
|
74
|
+
MSPointerMove: "pointer",
|
|
75
|
+
pointerdown: "pointer",
|
|
76
|
+
pointermove: "pointer",
|
|
77
|
+
touchstart: "touch",
|
|
78
|
+
touchend: "touch"
|
|
79
|
+
};
|
|
80
|
+
var isScrolling = false;
|
|
81
|
+
var mousePos = {
|
|
82
|
+
x: null,
|
|
83
|
+
y: null
|
|
84
|
+
};
|
|
85
|
+
var pointerMap = {
|
|
86
|
+
2: "touch",
|
|
87
|
+
3: "touch",
|
|
88
|
+
4: "mouse"
|
|
89
|
+
};
|
|
90
|
+
var supportsPassive = false;
|
|
91
|
+
try {
|
|
92
|
+
var opts = Object.defineProperty({}, "passive", {
|
|
93
|
+
get: function get() {
|
|
94
|
+
supportsPassive = true;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
window.addEventListener("test", null, opts);
|
|
98
|
+
} catch (e) {
|
|
99
|
+
}
|
|
100
|
+
var setUp = function setUp2() {
|
|
101
|
+
inputMap[detectWheel()] = "mouse";
|
|
102
|
+
addListeners();
|
|
103
|
+
};
|
|
104
|
+
var addListeners = function addListeners2() {
|
|
105
|
+
var options = supportsPassive ? { passive: true } : false;
|
|
106
|
+
document.addEventListener("DOMContentLoaded", setPersist);
|
|
107
|
+
if (window.PointerEvent) {
|
|
108
|
+
window.addEventListener("pointerdown", setInput);
|
|
109
|
+
window.addEventListener("pointermove", setIntent);
|
|
110
|
+
} else if (window.MSPointerEvent) {
|
|
111
|
+
window.addEventListener("MSPointerDown", setInput);
|
|
112
|
+
window.addEventListener("MSPointerMove", setIntent);
|
|
113
|
+
} else {
|
|
114
|
+
window.addEventListener("mousedown", setInput);
|
|
115
|
+
window.addEventListener("mousemove", setIntent);
|
|
116
|
+
if ("ontouchstart" in window) {
|
|
117
|
+
window.addEventListener("touchstart", setInput, options);
|
|
118
|
+
window.addEventListener("touchend", setInput);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
window.addEventListener(detectWheel(), setIntent, options);
|
|
122
|
+
window.addEventListener("keydown", setInput);
|
|
123
|
+
window.addEventListener("keyup", setInput);
|
|
124
|
+
window.addEventListener("focusin", setElement);
|
|
125
|
+
window.addEventListener("focusout", clearElement);
|
|
126
|
+
};
|
|
127
|
+
var setPersist = function setPersist2() {
|
|
128
|
+
shouldPersist = !(docElem.getAttribute("data-whatpersist") || document.body.getAttribute("data-whatpersist") === "false");
|
|
129
|
+
if (shouldPersist) {
|
|
130
|
+
try {
|
|
131
|
+
if (window.sessionStorage.getItem("what-input")) {
|
|
132
|
+
currentInput = window.sessionStorage.getItem("what-input");
|
|
133
|
+
}
|
|
134
|
+
if (window.sessionStorage.getItem("what-intent")) {
|
|
135
|
+
currentIntent = window.sessionStorage.getItem("what-intent");
|
|
136
|
+
}
|
|
137
|
+
} catch (e) {
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
doUpdate("input");
|
|
141
|
+
doUpdate("intent");
|
|
142
|
+
};
|
|
143
|
+
var setInput = function setInput2(event) {
|
|
144
|
+
var eventKey = event.which;
|
|
145
|
+
var value = inputMap[event.type];
|
|
146
|
+
if (value === "pointer") {
|
|
147
|
+
value = pointerType(event);
|
|
148
|
+
}
|
|
149
|
+
var ignoreMatch = !specificMap.length && ignoreMap.indexOf(eventKey) === -1;
|
|
150
|
+
var specificMatch = specificMap.length && specificMap.indexOf(eventKey) !== -1;
|
|
151
|
+
var shouldUpdate = value === "keyboard" && eventKey && (ignoreMatch || specificMatch) || value === "mouse" || value === "touch";
|
|
152
|
+
if (validateTouch(value)) {
|
|
153
|
+
shouldUpdate = false;
|
|
154
|
+
}
|
|
155
|
+
if (shouldUpdate && currentInput !== value) {
|
|
156
|
+
currentInput = value;
|
|
157
|
+
persistInput("input", currentInput);
|
|
158
|
+
doUpdate("input");
|
|
159
|
+
}
|
|
160
|
+
if (shouldUpdate && currentIntent !== value) {
|
|
161
|
+
var activeElem = document.activeElement;
|
|
162
|
+
var notFormInput = activeElem && activeElem.nodeName && (formInputs.indexOf(activeElem.nodeName.toLowerCase()) === -1 || activeElem.nodeName.toLowerCase() === "button" && !checkClosest(activeElem, "form"));
|
|
163
|
+
if (notFormInput) {
|
|
164
|
+
currentIntent = value;
|
|
165
|
+
persistInput("intent", currentIntent);
|
|
166
|
+
doUpdate("intent");
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
var doUpdate = function doUpdate2(which) {
|
|
171
|
+
docElem.setAttribute("data-what" + which, which === "input" ? currentInput : currentIntent);
|
|
172
|
+
fireFunctions(which);
|
|
173
|
+
};
|
|
174
|
+
var setIntent = function setIntent2(event) {
|
|
175
|
+
var value = inputMap[event.type];
|
|
176
|
+
if (value === "pointer") {
|
|
177
|
+
value = pointerType(event);
|
|
178
|
+
}
|
|
179
|
+
detectScrolling(event);
|
|
180
|
+
if ((!isScrolling && !validateTouch(value) || isScrolling && event.type === "wheel" || event.type === "mousewheel" || event.type === "DOMMouseScroll") && currentIntent !== value) {
|
|
181
|
+
currentIntent = value;
|
|
182
|
+
persistInput("intent", currentIntent);
|
|
183
|
+
doUpdate("intent");
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
var setElement = function setElement2(event) {
|
|
187
|
+
if (!event.target.nodeName) {
|
|
188
|
+
clearElement();
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
currentElement = event.target.nodeName.toLowerCase();
|
|
192
|
+
docElem.setAttribute("data-whatelement", currentElement);
|
|
193
|
+
if (event.target.classList && event.target.classList.length) {
|
|
194
|
+
docElem.setAttribute("data-whatclasses", event.target.classList.toString().replace(" ", ","));
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
var clearElement = function clearElement2() {
|
|
198
|
+
currentElement = null;
|
|
199
|
+
docElem.removeAttribute("data-whatelement");
|
|
200
|
+
docElem.removeAttribute("data-whatclasses");
|
|
201
|
+
};
|
|
202
|
+
var persistInput = function persistInput2(which, value) {
|
|
203
|
+
if (shouldPersist) {
|
|
204
|
+
try {
|
|
205
|
+
window.sessionStorage.setItem("what-" + which, value);
|
|
206
|
+
} catch (e) {
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
var pointerType = function pointerType2(event) {
|
|
211
|
+
if (typeof event.pointerType === "number") {
|
|
212
|
+
return pointerMap[event.pointerType];
|
|
213
|
+
} else {
|
|
214
|
+
return event.pointerType === "pen" ? "touch" : event.pointerType;
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
var validateTouch = function validateTouch2(value) {
|
|
218
|
+
var timestamp = Date.now();
|
|
219
|
+
var touchIsValid = value === "mouse" && currentInput === "touch" && timestamp - currentTimestamp < 200;
|
|
220
|
+
currentTimestamp = timestamp;
|
|
221
|
+
return touchIsValid;
|
|
222
|
+
};
|
|
223
|
+
var detectWheel = function detectWheel2() {
|
|
224
|
+
var wheelType = null;
|
|
225
|
+
if ("onwheel" in document.createElement("div")) {
|
|
226
|
+
wheelType = "wheel";
|
|
227
|
+
} else {
|
|
228
|
+
wheelType = document.onmousewheel !== void 0 ? "mousewheel" : "DOMMouseScroll";
|
|
229
|
+
}
|
|
230
|
+
return wheelType;
|
|
231
|
+
};
|
|
232
|
+
var fireFunctions = function fireFunctions2(type) {
|
|
233
|
+
for (var i = 0, len = functionList.length; i < len; i++) {
|
|
234
|
+
if (functionList[i].type === type) {
|
|
235
|
+
functionList[i].fn.call(void 0, type === "input" ? currentInput : currentIntent);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
var objPos = function objPos2(match) {
|
|
240
|
+
for (var i = 0, len = functionList.length; i < len; i++) {
|
|
241
|
+
if (functionList[i].fn === match) {
|
|
242
|
+
return i;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
var detectScrolling = function detectScrolling2(event) {
|
|
247
|
+
if (mousePos.x !== event.screenX || mousePos.y !== event.screenY) {
|
|
248
|
+
isScrolling = false;
|
|
249
|
+
mousePos.x = event.screenX;
|
|
250
|
+
mousePos.y = event.screenY;
|
|
251
|
+
} else {
|
|
252
|
+
isScrolling = true;
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
var checkClosest = function checkClosest2(elem, tag) {
|
|
256
|
+
var ElementPrototype = window.Element.prototype;
|
|
257
|
+
if (!ElementPrototype.matches) {
|
|
258
|
+
ElementPrototype.matches = ElementPrototype.msMatchesSelector || ElementPrototype.webkitMatchesSelector;
|
|
259
|
+
}
|
|
260
|
+
if (!ElementPrototype.closest) {
|
|
261
|
+
do {
|
|
262
|
+
if (elem.matches(tag)) {
|
|
263
|
+
return elem;
|
|
264
|
+
}
|
|
265
|
+
elem = elem.parentElement || elem.parentNode;
|
|
266
|
+
} while (elem !== null && elem.nodeType === 1);
|
|
267
|
+
return null;
|
|
268
|
+
} else {
|
|
269
|
+
return elem.closest(tag);
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
if ("addEventListener" in window && Array.prototype.indexOf) {
|
|
273
|
+
setUp();
|
|
274
|
+
}
|
|
275
|
+
return {
|
|
276
|
+
ask: function ask(opt) {
|
|
277
|
+
return opt === "intent" ? currentIntent : currentInput;
|
|
278
|
+
},
|
|
279
|
+
element: function element() {
|
|
280
|
+
return currentElement;
|
|
281
|
+
},
|
|
282
|
+
ignoreKeys: function ignoreKeys(arr) {
|
|
283
|
+
ignoreMap = arr;
|
|
284
|
+
},
|
|
285
|
+
specificKeys: function specificKeys(arr) {
|
|
286
|
+
specificMap = arr;
|
|
287
|
+
},
|
|
288
|
+
registerOnChange: function registerOnChange(fn, eventType) {
|
|
289
|
+
functionList.push({
|
|
290
|
+
fn,
|
|
291
|
+
type: eventType || "input"
|
|
292
|
+
});
|
|
293
|
+
},
|
|
294
|
+
unRegisterOnChange: function unRegisterOnChange(fn) {
|
|
295
|
+
var position = objPos(fn);
|
|
296
|
+
if (position || position === 0) {
|
|
297
|
+
functionList.splice(position, 1);
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
clearStorage: function clearStorage() {
|
|
301
|
+
window.sessionStorage.clear();
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
}();
|
|
305
|
+
}
|
|
306
|
+
]);
|
|
307
|
+
});
|
|
308
|
+
})(whatInput);
|
|
309
|
+
var index = "";
|
|
310
|
+
var render = function() {
|
|
311
|
+
var _vm = this;
|
|
312
|
+
var _h = _vm.$createElement;
|
|
313
|
+
var _c = _vm._self._c || _h;
|
|
314
|
+
return _c("div", { staticClass: "theme" }, [_vm._t("default")], 2);
|
|
315
|
+
};
|
|
316
|
+
var staticRenderFns = [];
|
|
317
|
+
function normalizeComponent(scriptExports, render2, staticRenderFns2, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
318
|
+
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
319
|
+
if (render2) {
|
|
320
|
+
options.render = render2;
|
|
321
|
+
options.staticRenderFns = staticRenderFns2;
|
|
322
|
+
options._compiled = true;
|
|
323
|
+
}
|
|
324
|
+
if (functionalTemplate) {
|
|
325
|
+
options.functional = true;
|
|
326
|
+
}
|
|
327
|
+
if (scopeId) {
|
|
328
|
+
options._scopeId = "data-v-" + scopeId;
|
|
329
|
+
}
|
|
330
|
+
var hook;
|
|
331
|
+
if (moduleIdentifier) {
|
|
332
|
+
hook = function(context) {
|
|
333
|
+
context = context || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
|
|
334
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") {
|
|
335
|
+
context = __VUE_SSR_CONTEXT__;
|
|
336
|
+
}
|
|
337
|
+
if (injectStyles) {
|
|
338
|
+
injectStyles.call(this, context);
|
|
339
|
+
}
|
|
340
|
+
if (context && context._registeredComponents) {
|
|
341
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
options._ssrRegister = hook;
|
|
345
|
+
} else if (injectStyles) {
|
|
346
|
+
hook = shadowMode ? function() {
|
|
347
|
+
injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot);
|
|
348
|
+
} : injectStyles;
|
|
349
|
+
}
|
|
350
|
+
if (hook) {
|
|
351
|
+
if (options.functional) {
|
|
352
|
+
options._injectStyles = hook;
|
|
353
|
+
var originalRender = options.render;
|
|
354
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
355
|
+
hook.call(context);
|
|
356
|
+
return originalRender(h, context);
|
|
357
|
+
};
|
|
358
|
+
} else {
|
|
359
|
+
var existing = options.beforeCreate;
|
|
360
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
return {
|
|
364
|
+
exports: scriptExports,
|
|
365
|
+
options
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
const __vue2_script = {
|
|
369
|
+
name: "Theme",
|
|
370
|
+
provide() {
|
|
371
|
+
return {
|
|
372
|
+
theme: this.theme
|
|
373
|
+
};
|
|
374
|
+
},
|
|
375
|
+
data() {
|
|
376
|
+
return {
|
|
377
|
+
theme: {
|
|
378
|
+
darkMode: window.matchMedia("(prefers-color-scheme: dark)").matches
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
},
|
|
382
|
+
watch: {
|
|
383
|
+
theme: {
|
|
384
|
+
handler() {
|
|
385
|
+
document.documentElement.setAttribute("dark-mode", this.theme.darkMode);
|
|
386
|
+
},
|
|
387
|
+
deep: true,
|
|
388
|
+
immediate: true
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
created() {
|
|
392
|
+
window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", this.updateDarkMode);
|
|
393
|
+
var colorSchemeMeta = document.createElement("meta");
|
|
394
|
+
colorSchemeMeta.name = "color-scheme";
|
|
395
|
+
colorSchemeMeta.setAttribute("content", "light dark");
|
|
396
|
+
document.getElementsByTagName("head")[0].appendChild(colorSchemeMeta);
|
|
397
|
+
},
|
|
398
|
+
beforeDestroy() {
|
|
399
|
+
window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change", this.updateDarkMode);
|
|
400
|
+
},
|
|
401
|
+
methods: {
|
|
402
|
+
updateDarkMode(event) {
|
|
403
|
+
if (!event) {
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
this.theme.darkMode = event.matches;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
const __cssModules = {};
|
|
411
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles, null, null, null);
|
|
412
|
+
function __vue2_injectStyles(context) {
|
|
413
|
+
for (let o in __cssModules) {
|
|
414
|
+
this[o] = __cssModules[o];
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
var Theme = /* @__PURE__ */ function() {
|
|
418
|
+
return __component__.exports;
|
|
419
|
+
}();
|
|
420
|
+
const B900 = "hsl(225, 90%, 16%)";
|
|
421
|
+
const B600 = "#061f80";
|
|
422
|
+
const B500 = "hsl(225, 94%, 35%)";
|
|
423
|
+
const B400 = "#06c";
|
|
424
|
+
const B300 = "hsl(210, 100%, 50%)";
|
|
425
|
+
const B200 = "hsl(210, 100%, 93%)";
|
|
426
|
+
const B100 = "hsl(225, 100%, 96%)";
|
|
427
|
+
const R400 = "hsl(12, 91%, 46%)";
|
|
428
|
+
const R300 = "hsl(11, 100%, 59%)";
|
|
429
|
+
const Y300 = "hsl(40, 100%, 50%)";
|
|
430
|
+
const Y200 = "hsl(46, 100%, 50%)";
|
|
431
|
+
const G500 = "hsl(120, 100%, 25%)";
|
|
432
|
+
const N1000 = "hsl(0, 0%, 0%)";
|
|
433
|
+
const N900 = "hsl(218, 76%, 15%)";
|
|
434
|
+
const N800 = "hsla(0,0%,10%,.9)";
|
|
435
|
+
const N500 = "hsla(0,0%,10%,.6)";
|
|
436
|
+
const N400 = "hsl(218, 20%, 39%)";
|
|
437
|
+
const N300 = "hsl(218, 17%, 44%)";
|
|
438
|
+
const N200 = "hsl(218, 14%, 49%)";
|
|
439
|
+
const N100 = "hsl(218, 14%, 54%)";
|
|
440
|
+
const N90 = "hsl(218, 13%, 59%)";
|
|
441
|
+
const N80 = "hsl(218, 13%, 64%)";
|
|
442
|
+
const N70 = "hsl(217, 13%, 69%)";
|
|
443
|
+
const N40 = "hsl(223, 12%, 89%)";
|
|
444
|
+
const N30 = "hsl(228, 14%, 93%)";
|
|
445
|
+
const N25 = "hsl(210, 7%, 95%)";
|
|
446
|
+
const N20 = "hsl(220, 16%, 96%)";
|
|
447
|
+
const N10 = "hsl(210, 25%, 98%)";
|
|
448
|
+
const N5 = "hsl(0, 0%, 98%)";
|
|
449
|
+
const N0 = "hsl(0, 0%, 100%)";
|
|
450
|
+
const primary1 = B500;
|
|
451
|
+
const primary2 = B500;
|
|
452
|
+
const primary3 = N0;
|
|
453
|
+
export { B100, B200, B300, B400, B500, B600, B900, G500, N0, N10, N100, N1000, N20, N200, N25, N30, N300, N40, N400, N5, N500, N70, N80, N800, N90, N900, R300, R400, Y200, Y300, Theme as default, primary1, primary2, primary3 };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
(function(t,N){typeof exports=="object"&&typeof module!="undefined"?N(exports):typeof define=="function"&&define.amd?define(["exports"],N):(t=typeof globalThis!="undefined"?globalThis:t||self,N(t.theme={}))})(this,function(t){"use strict";var N=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},K={exports:{}};/**
|
|
2
|
+
* what-input - A global utility for tracking the current input method (mouse, keyboard or touch).
|
|
3
|
+
* @version v5.2.10
|
|
4
|
+
* @link https://github.com/ten1seven/what-input
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/(function(s,m){(function(w,r){s.exports=r()})(N,function(){return function(p){var w={};function r(c){if(w[c])return w[c].exports;var a=w[c]={exports:{},id:c,loaded:!1};return p[c].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}return r.m=p,r.c=w,r.p="",r(0)}([function(p,w){p.exports=function(){if(typeof document=="undefined"||typeof window=="undefined")return{ask:function(){return"initial"},element:function(){return null},ignoreKeys:function(){},specificKeys:function(){},registerOnChange:function(){},unRegisterOnChange:function(){}};var r=document.documentElement,c=null,a="initial",d=a,u=Date.now(),l="false",S=["button","input","select","textarea"],h=[],f=[16,17,18,91,93],g=[],y={keydown:"keyboard",keyup:"keyboard",mousedown:"mouse",mousemove:"mouse",MSPointerDown:"pointer",MSPointerMove:"pointer",pointerdown:"pointer",pointermove:"pointer",touchstart:"touch",touchend:"touch"},b=!1,E={x:null,y:null},Me={2:"touch",3:"touch",4:"mouse"},B=!1;try{var be=Object.defineProperty({},"passive",{get:function(){B=!0}});window.addEventListener("test",null,be)}catch{}var Ee=function(){y[A()]="mouse",ke()},ke=function(){var e=B?{passive:!0}:!1;document.addEventListener("DOMContentLoaded",Le),window.PointerEvent?(window.addEventListener("pointerdown",v),window.addEventListener("pointermove",k)):window.MSPointerEvent?(window.addEventListener("MSPointerDown",v),window.addEventListener("MSPointerMove",k)):(window.addEventListener("mousedown",v),window.addEventListener("mousemove",k),"ontouchstart"in window&&(window.addEventListener("touchstart",v,e),window.addEventListener("touchend",v))),window.addEventListener(A(),k,e),window.addEventListener("keydown",v),window.addEventListener("keyup",v),window.addEventListener("focusin",Se),window.addEventListener("focusout",R)},Le=function(){if(l=!(r.getAttribute("data-whatpersist")||document.body.getAttribute("data-whatpersist")==="false"),l)try{window.sessionStorage.getItem("what-input")&&(a=window.sessionStorage.getItem("what-input")),window.sessionStorage.getItem("what-intent")&&(d=window.sessionStorage.getItem("what-intent"))}catch{}_("input"),_("intent")},v=function(e){var n=e.which,i=y[e.type];i==="pointer"&&(i=D(e));var Be=!g.length&&f.indexOf(n)===-1,Re=g.length&&g.indexOf(n)!==-1,T=i==="keyboard"&&n&&(Be||Re)||i==="mouse"||i==="touch";if(I(i)&&(T=!1),T&&a!==i&&(a=i,C("input",a),_("input")),T&&d!==i){var M=document.activeElement,De=M&&M.nodeName&&(S.indexOf(M.nodeName.toLowerCase())===-1||M.nodeName.toLowerCase()==="button"&&!Pe(M,"form"));De&&(d=i,C("intent",d),_("intent"))}},_=function(e){r.setAttribute("data-what"+e,e==="input"?a:d),Ce(e)},k=function(e){var n=y[e.type];n==="pointer"&&(n=D(e)),Oe(e),(!b&&!I(n)||b&&e.type==="wheel"||e.type==="mousewheel"||e.type==="DOMMouseScroll")&&d!==n&&(d=n,C("intent",d),_("intent"))},Se=function(e){if(!e.target.nodeName){R();return}c=e.target.nodeName.toLowerCase(),r.setAttribute("data-whatelement",c),e.target.classList&&e.target.classList.length&&r.setAttribute("data-whatclasses",e.target.classList.toString().replace(" ",","))},R=function(){c=null,r.removeAttribute("data-whatelement"),r.removeAttribute("data-whatclasses")},C=function(e,n){if(l)try{window.sessionStorage.setItem("what-"+e,n)}catch{}},D=function(e){return typeof e.pointerType=="number"?Me[e.pointerType]:e.pointerType==="pen"?"touch":e.pointerType},I=function(e){var n=Date.now(),i=e==="mouse"&&a==="touch"&&n-u<200;return u=n,i},A=function(){var e=null;return"onwheel"in document.createElement("div")?e="wheel":e=document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",e},Ce=function(e){for(var n=0,i=h.length;n<i;n++)h[n].type===e&&h[n].fn.call(void 0,e==="input"?a:d)},Te=function(e){for(var n=0,i=h.length;n<i;n++)if(h[n].fn===e)return n},Oe=function(e){E.x!==e.screenX||E.y!==e.screenY?(b=!1,E.x=e.screenX,E.y=e.screenY):b=!0},Pe=function(e,n){var i=window.Element.prototype;if(i.matches||(i.matches=i.msMatchesSelector||i.webkitMatchesSelector),i.closest)return e.closest(n);do{if(e.matches(n))return e;e=e.parentElement||e.parentNode}while(e!==null&&e.nodeType===1);return null};return"addEventListener"in window&&Array.prototype.indexOf&&Ee(),{ask:function(e){return e==="intent"?d:a},element:function(){return c},ignoreKeys:function(e){f=e},specificKeys:function(e){g=e},registerOnChange:function(e,n){h.push({fn:e,type:n||"input"})},unRegisterOnChange:function(e){var n=Te(e);(n||n===0)&&h.splice(n,1)},clearStorage:function(){window.sessionStorage.clear()}}}()}])})})(K);var Ie="",U=function(){var s=this,m=s.$createElement,p=s._self._c||m;return p("div",{staticClass:"theme"},[s._t("default")],2)},$=[];function Y(s,m,p,w,r,c,a,d){var u=typeof s=="function"?s.options:s;m&&(u.render=m,u.staticRenderFns=p,u._compiled=!0),w&&(u.functional=!0),c&&(u._scopeId="data-v-"+c);var l;if(a?(l=function(f){f=f||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!f&&typeof __VUE_SSR_CONTEXT__!="undefined"&&(f=__VUE_SSR_CONTEXT__),r&&r.call(this,f),f&&f._registeredComponents&&f._registeredComponents.add(a)},u._ssrRegister=l):r&&(l=d?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(u.functional){u._injectStyles=l;var S=u.render;u.render=function(g,y){return l.call(y),S(g,y)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,l):[l]}return{exports:s,options:u}}const j={name:"Theme",provide(){return{theme:this.theme}},data(){return{theme:{darkMode:window.matchMedia("(prefers-color-scheme: dark)").matches}}},watch:{theme:{handler(){document.documentElement.setAttribute("dark-mode",this.theme.darkMode)},deep:!0,immediate:!0}},created(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",this.updateDarkMode);var s=document.createElement("meta");s.name="color-scheme",s.setAttribute("content","light dark"),document.getElementsByTagName("head")[0].appendChild(s)},beforeDestroy(){window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",this.updateDarkMode)},methods:{updateDarkMode(s){!s||(this.theme.darkMode=s.matches)}}},O={};var F=Y(j,U,$,!1,X,null,null,null);function X(s){for(let m in O)this[m]=O[m]}var G=function(){return F.exports}();const V="hsl(225, 90%, 16%)",W="#061f80",L="hsl(225, 94%, 35%)",q="#06c",z="hsl(210, 100%, 50%)",H="hsl(210, 100%, 93%)",J="hsl(225, 100%, 96%)",Q="hsl(12, 91%, 46%)",Z="hsl(11, 100%, 59%)",x="hsl(40, 100%, 50%)",ee="hsl(46, 100%, 50%)",te="hsl(120, 100%, 25%)",ne="hsl(0, 0%, 0%)",oe="hsl(218, 76%, 15%)",ie="hsla(0,0%,10%,.9)",re="hsla(0,0%,10%,.6)",se="hsl(218, 20%, 39%)",ae="hsl(218, 17%, 44%)",ue="hsl(218, 14%, 49%)",ce="hsl(218, 14%, 54%)",de="hsl(218, 13%, 59%)",le="hsl(218, 13%, 64%)",fe="hsl(217, 13%, 69%)",he="hsl(223, 12%, 89%)",pe="hsl(228, 14%, 93%)",me="hsl(210, 7%, 95%)",we="hsl(220, 16%, 96%)",ve="hsl(210, 25%, 98%)",ge="hsl(0, 0%, 98%)",P="hsl(0, 0%, 100%)",ye=L,Ne=L,_e=P;t.B100=J,t.B200=H,t.B300=z,t.B400=q,t.B500=L,t.B600=W,t.B900=V,t.G500=te,t.N0=P,t.N10=ve,t.N100=ce,t.N1000=ne,t.N20=we,t.N200=ue,t.N25=me,t.N30=pe,t.N300=ae,t.N40=he,t.N400=se,t.N5=ge,t.N500=re,t.N70=fe,t.N80=le,t.N800=ie,t.N90=de,t.N900=oe,t.R300=Z,t.R400=Q,t.Y200=ee,t.Y300=x,t.default=G,t.primary1=ye,t.primary2=Ne,t.primary3=_e,Object.defineProperty(t,"__esModule",{value:!0}),t[Symbol.toStringTag]="Module"});
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gospore/theme",
|
|
3
|
+
"version": "1.0.72",
|
|
4
|
+
"description": "",
|
|
5
|
+
"author": "Gospore",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"main": "./dist/theme.umd.js",
|
|
10
|
+
"module": "./dist/theme.es.js",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/theme.es.js",
|
|
14
|
+
"require": "./dist/theme.umd.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "vite build"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"what-input": "^5.2.10"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@vitejs/plugin-vue": "^1.10.2",
|
|
25
|
+
"vite": "^2.7.13",
|
|
26
|
+
"vite-plugin-vue2": "^1.9.3"
|
|
27
|
+
},
|
|
28
|
+
"gitHead": "1f65c1dc8db832baabb5fbc2e70f17b4ab016a15"
|
|
29
|
+
}
|