@startinblox/core 2.0.0-beta.9 → 2.0.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 +10 -4
- package/dist/helpers-4GFJ8HI8.js +2106 -0
- package/dist/helpers.js +10 -6
- package/dist/index.js +410 -11351
- package/dist/store-D1e5vOG_.js +9902 -0
- package/dist/store.js +5 -0
- package/package.json +3 -2
- package/dist/helpers-DH22C8s9.js +0 -364
- package/dist/slimselect-Bx1deYT1.js +0 -4
package/dist/store.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startinblox/core",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "This is a series of web component respecting both the web components standards and the Linked Data Platform convention.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"doc"
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
|
+
"dev": "vite",
|
|
16
17
|
"build": "vite build",
|
|
17
18
|
"watch": "vite build --watch --sourcemap 'inline'",
|
|
18
19
|
"serve": "node --watch server.js",
|
|
@@ -83,7 +84,7 @@
|
|
|
83
84
|
"express": "^4.21.2",
|
|
84
85
|
"find-free-port": "^2.0.0",
|
|
85
86
|
"jsonld": "^8.3.3",
|
|
86
|
-
"jsonld-context-parser": "^
|
|
87
|
+
"jsonld-context-parser": "^3.0.0",
|
|
87
88
|
"markdown-it": "^14.1.0",
|
|
88
89
|
"markdown-it-link-attributes": "4.0.1",
|
|
89
90
|
"pubsub-js": "^1.9.5",
|
package/dist/helpers-DH22C8s9.js
DELETED
|
@@ -1,364 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __typeError = (msg) => {
|
|
3
|
-
throw TypeError(msg);
|
|
4
|
-
};
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
|
-
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
8
|
-
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
9
|
-
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
|
-
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
11
|
-
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
12
|
-
var _values, _resolve, _AsyncIterableBuilder_instances, createIterable_fn, next_fn, nextPromise_fn;
|
|
13
|
-
function uniqID() {
|
|
14
|
-
return `_${(Math.random() * 36 ** 20).toString(36).slice(0, 10)}`;
|
|
15
|
-
}
|
|
16
|
-
function stringToDom(html) {
|
|
17
|
-
const template = document.createElement("template");
|
|
18
|
-
template.innerHTML = html;
|
|
19
|
-
return template.content;
|
|
20
|
-
}
|
|
21
|
-
const AsyncFunction = Object.getPrototypeOf(async () => {
|
|
22
|
-
}).constructor;
|
|
23
|
-
async function evalTemplateString(str, variables = {}) {
|
|
24
|
-
const keys = Object.keys(variables);
|
|
25
|
-
const values = keys.map((key) => variables[key]);
|
|
26
|
-
try {
|
|
27
|
-
const func = AsyncFunction.call(null, ...keys, `return \`${str}\``);
|
|
28
|
-
return await func(...values);
|
|
29
|
-
} catch (e) {
|
|
30
|
-
console.log(e);
|
|
31
|
-
throw new SyntaxError(`\`${str}\``);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
function importCSS(...stylesheets) {
|
|
35
|
-
const linksElements = [];
|
|
36
|
-
for (let url of stylesheets) {
|
|
37
|
-
url = relativeSource(url);
|
|
38
|
-
let link = Array.from(document.head.querySelectorAll("link")).find(
|
|
39
|
-
(link2) => link2.href === url
|
|
40
|
-
);
|
|
41
|
-
if (link) return link;
|
|
42
|
-
link = document.createElement("link");
|
|
43
|
-
link.rel = "stylesheet";
|
|
44
|
-
link.href = url;
|
|
45
|
-
document.head.appendChild(link);
|
|
46
|
-
linksElements.push(link);
|
|
47
|
-
}
|
|
48
|
-
return linksElements;
|
|
49
|
-
}
|
|
50
|
-
function importInlineCSS(id, importer) {
|
|
51
|
-
id = `sib-inline-css-${id}`;
|
|
52
|
-
let style = document.head.querySelector(`style#${id}`);
|
|
53
|
-
if (style) return style;
|
|
54
|
-
style = document.createElement("style");
|
|
55
|
-
style.id = id;
|
|
56
|
-
document.head.appendChild(style);
|
|
57
|
-
(async () => {
|
|
58
|
-
let textContent;
|
|
59
|
-
if (typeof importer === "string") textContent = importer;
|
|
60
|
-
else {
|
|
61
|
-
const imported = await importer();
|
|
62
|
-
if (typeof imported === "string") textContent = imported;
|
|
63
|
-
else textContent = imported.default || "";
|
|
64
|
-
}
|
|
65
|
-
style.textContent = textContent;
|
|
66
|
-
})();
|
|
67
|
-
return style;
|
|
68
|
-
}
|
|
69
|
-
function importJS(...plugins) {
|
|
70
|
-
return plugins.map((url) => {
|
|
71
|
-
url = new URL(url, document.baseURI).href;
|
|
72
|
-
let script = Array.from(document.querySelectorAll("script")).find(
|
|
73
|
-
(script2) => script2.src === url
|
|
74
|
-
);
|
|
75
|
-
if (script) return script;
|
|
76
|
-
script = document.createElement("script");
|
|
77
|
-
script.src = url;
|
|
78
|
-
document.head.appendChild(script);
|
|
79
|
-
return script;
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
function relativeSource(source) {
|
|
83
|
-
if (!source.match(/^\..?\//)) return new URL(source, document.baseURI).href;
|
|
84
|
-
const e = new Error();
|
|
85
|
-
if (!e.stack) return source;
|
|
86
|
-
const f2 = e.stack.split("\n").filter((l) => l.includes(":"))[2];
|
|
87
|
-
const line = f2.match(/[a-z]+:.*$/);
|
|
88
|
-
if (!line) return source;
|
|
89
|
-
const calledFile = line[0].replace(/(\:[0-9]+){2}\)?$/, "");
|
|
90
|
-
source = new URL(source, calledFile).href;
|
|
91
|
-
return source;
|
|
92
|
-
}
|
|
93
|
-
function loadScript(source) {
|
|
94
|
-
source = relativeSource(source);
|
|
95
|
-
return new Promise((resolve) => {
|
|
96
|
-
const script = document.createElement("script");
|
|
97
|
-
const head = document.querySelector("head");
|
|
98
|
-
script.async = true;
|
|
99
|
-
script.onload = () => setTimeout(resolve, 0);
|
|
100
|
-
script.src = source;
|
|
101
|
-
if (head) head.appendChild(script);
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
function domIsReady() {
|
|
105
|
-
return new Promise((resolve) => {
|
|
106
|
-
if (document.readyState === "complete") {
|
|
107
|
-
resolve();
|
|
108
|
-
} else {
|
|
109
|
-
document.addEventListener("DOMContentLoaded", () => resolve());
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
function setDeepProperty(obj, path, value) {
|
|
114
|
-
const name = path.shift();
|
|
115
|
-
if (name) {
|
|
116
|
-
if (!(name in obj)) obj[name] = {};
|
|
117
|
-
if (path.length > 0) setDeepProperty(obj[name], path, value);
|
|
118
|
-
else obj[name] = value;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
function parseFieldsString(fields) {
|
|
122
|
-
if (!fields) return [];
|
|
123
|
-
while (fields.indexOf("(") > 0) {
|
|
124
|
-
const firstBracket = fields.indexOf("(");
|
|
125
|
-
const noset = fields.substring(
|
|
126
|
-
firstBracket,
|
|
127
|
-
findClosingBracketMatchIndex(fields, firstBracket) + 1
|
|
128
|
-
);
|
|
129
|
-
fields = fields.replace(noset, "");
|
|
130
|
-
}
|
|
131
|
-
const re = /((^\s*|,)\s*)(("(\\"|[^"])*")|('(\\'|[^'])*')|[^,]*)/gm;
|
|
132
|
-
const fieldsArray = fields.match(re) || [];
|
|
133
|
-
if (!fieldsArray) return [];
|
|
134
|
-
return fieldsArray.map((a) => a.replace(/^[\s,]+/, ""));
|
|
135
|
-
}
|
|
136
|
-
function findClosingBracketMatchIndex(str, pos) {
|
|
137
|
-
if (str[pos] !== "(") throw new Error(`No '(' at index ${pos}`);
|
|
138
|
-
let depth = 1;
|
|
139
|
-
for (let i = pos + 1; i < str.length; i++) {
|
|
140
|
-
switch (str[i]) {
|
|
141
|
-
case "(":
|
|
142
|
-
depth++;
|
|
143
|
-
break;
|
|
144
|
-
case ")":
|
|
145
|
-
if (--depth === 0) return i;
|
|
146
|
-
break;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
return -1;
|
|
150
|
-
}
|
|
151
|
-
function defineComponent(tagName, componentClass) {
|
|
152
|
-
if (!customElements.get(tagName)) {
|
|
153
|
-
customElements.define(tagName, componentClass);
|
|
154
|
-
} else {
|
|
155
|
-
console.warn(
|
|
156
|
-
`Warning: the component "${tagName}" has already been loaded in another version of sib-core.`
|
|
157
|
-
);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
function fuzzyCompare(subject, search) {
|
|
161
|
-
return compareTransform(subject).includes(compareTransform(String(search)));
|
|
162
|
-
}
|
|
163
|
-
function compareTransform(str) {
|
|
164
|
-
return str.normalize("NFD").replaceAll(new RegExp("\\p{Diacritic}", "gu"), "").toLowerCase().replaceAll("œ", "oe").replaceAll("æ", "ae").replaceAll(/[ ,.!?;:-`"]+/g, " ").trim();
|
|
165
|
-
}
|
|
166
|
-
const compare = {
|
|
167
|
-
string(subject, query) {
|
|
168
|
-
if (typeof subject !== "string" || typeof query !== "string")
|
|
169
|
-
throw new TypeError("not a string");
|
|
170
|
-
if (query === "") return true;
|
|
171
|
-
return fuzzyCompare(subject, String(query));
|
|
172
|
-
},
|
|
173
|
-
boolean(subject, query) {
|
|
174
|
-
if (!query) return true;
|
|
175
|
-
return subject;
|
|
176
|
-
},
|
|
177
|
-
number(subject, query) {
|
|
178
|
-
return subject === query;
|
|
179
|
-
},
|
|
180
|
-
list(subject, list) {
|
|
181
|
-
return list.includes(subject);
|
|
182
|
-
},
|
|
183
|
-
range(subject, range) {
|
|
184
|
-
return (range[0] == null || range[0] === "" || subject >= range[0]) && (range[1] == null || range[1] === "" || subject <= range[1]);
|
|
185
|
-
},
|
|
186
|
-
resource(subject, query) {
|
|
187
|
-
if (query === "") return true;
|
|
188
|
-
if (!query["@id"]) return false;
|
|
189
|
-
const ret = subject["@id"] === query["@id"];
|
|
190
|
-
return ret;
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
function generalComparator(a, b, order = "asc") {
|
|
194
|
-
if (order === "desc") return generalComparator(b, a);
|
|
195
|
-
if (a == null && b == null) return 0;
|
|
196
|
-
if (a === b || Object.is(a, b)) return 0;
|
|
197
|
-
if (typeof a === "boolean" && typeof b === "boolean") {
|
|
198
|
-
return a === b ? 0 : a ? 1 : -1;
|
|
199
|
-
}
|
|
200
|
-
if (!Number.isNaN(Number(a)) && !Number.isNaN(Number(b))) {
|
|
201
|
-
return Number(a) - Number(b);
|
|
202
|
-
}
|
|
203
|
-
if (Array.isArray(a) && Array.isArray(b)) {
|
|
204
|
-
return a.length - b.length;
|
|
205
|
-
}
|
|
206
|
-
const dateA = Date.parse(String(a));
|
|
207
|
-
const dateB = Date.parse(String(b));
|
|
208
|
-
if (!Number.isNaN(dateA) && !Number.isNaN(dateB)) {
|
|
209
|
-
return dateA - dateB;
|
|
210
|
-
}
|
|
211
|
-
if (a && b && typeof a === "object" && typeof b === "object") {
|
|
212
|
-
const aKeys = Object.keys(a);
|
|
213
|
-
const bKeys = Object.keys(b);
|
|
214
|
-
return aKeys.length - bKeys.length;
|
|
215
|
-
}
|
|
216
|
-
if (a == null) return -1;
|
|
217
|
-
if (b == null) return 1;
|
|
218
|
-
return String(a).localeCompare(String(b));
|
|
219
|
-
}
|
|
220
|
-
function transformArrayToContainer(resource) {
|
|
221
|
-
const newValue = { ...resource };
|
|
222
|
-
for (const predicate of Object.keys(newValue)) {
|
|
223
|
-
const predicateValue = newValue[predicate];
|
|
224
|
-
if (!predicateValue || typeof predicateValue !== "object") continue;
|
|
225
|
-
if (["permissions", "@context"].includes(predicate)) continue;
|
|
226
|
-
if (!Array.isArray(predicateValue) && predicateValue["@id"]) {
|
|
227
|
-
newValue[predicate] = transformArrayToContainer(resource[predicate]);
|
|
228
|
-
}
|
|
229
|
-
if (Array.isArray(predicateValue) && predicateValue["@id"]) {
|
|
230
|
-
newValue[predicate] = {
|
|
231
|
-
"@id": predicateValue["@id"],
|
|
232
|
-
"ldp:contains": [...predicateValue]
|
|
233
|
-
// ???? why only ldp:contains?
|
|
234
|
-
};
|
|
235
|
-
newValue[predicate]["ldp:contains"].forEach(
|
|
236
|
-
(childPredicate, index) => {
|
|
237
|
-
newValue[predicate]["ldp:contains"][index] = transformArrayToContainer(childPredicate);
|
|
238
|
-
}
|
|
239
|
-
);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
return newValue;
|
|
243
|
-
}
|
|
244
|
-
function doesResourceContainList(resource) {
|
|
245
|
-
const predicates = ["ldp:contains", "dcat:dataset"];
|
|
246
|
-
return predicates.some(
|
|
247
|
-
(predicate) => typeof resource === "object" ? predicate in resource : typeof resource === "string" && resource.includes(predicate)
|
|
248
|
-
);
|
|
249
|
-
}
|
|
250
|
-
class AsyncIterableBuilder {
|
|
251
|
-
constructor() {
|
|
252
|
-
__privateAdd(this, _AsyncIterableBuilder_instances);
|
|
253
|
-
__privateAdd(this, _values, []);
|
|
254
|
-
__privateAdd(this, _resolve);
|
|
255
|
-
__publicField(this, "iterable");
|
|
256
|
-
__publicField(this, "next");
|
|
257
|
-
__privateMethod(this, _AsyncIterableBuilder_instances, nextPromise_fn).call(this);
|
|
258
|
-
this.iterable = __privateMethod(this, _AsyncIterableBuilder_instances, createIterable_fn).call(this);
|
|
259
|
-
this.next = __privateMethod(this, _AsyncIterableBuilder_instances, next_fn).bind(this);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
_values = new WeakMap();
|
|
263
|
-
_resolve = new WeakMap();
|
|
264
|
-
_AsyncIterableBuilder_instances = new WeakSet();
|
|
265
|
-
createIterable_fn = async function* () {
|
|
266
|
-
for (let index = 0; ; index++) {
|
|
267
|
-
const { value, done } = await __privateGet(this, _values)[index];
|
|
268
|
-
delete __privateGet(this, _values)[index];
|
|
269
|
-
yield value;
|
|
270
|
-
if (done) return;
|
|
271
|
-
}
|
|
272
|
-
};
|
|
273
|
-
next_fn = function(value, done = false) {
|
|
274
|
-
__privateGet(this, _resolve).call(this, { value, done });
|
|
275
|
-
__privateMethod(this, _AsyncIterableBuilder_instances, nextPromise_fn).call(this);
|
|
276
|
-
};
|
|
277
|
-
nextPromise_fn = function() {
|
|
278
|
-
__privateGet(this, _values).push(
|
|
279
|
-
new Promise((resolve) => {
|
|
280
|
-
__privateSet(this, _resolve, resolve);
|
|
281
|
-
})
|
|
282
|
-
);
|
|
283
|
-
};
|
|
284
|
-
const asyncQuerySelector = (selector, parent = document) => new Promise((resolve) => {
|
|
285
|
-
const element = parent.querySelector(selector);
|
|
286
|
-
if (element) return resolve(element);
|
|
287
|
-
const observer = new MutationObserver(() => {
|
|
288
|
-
const element2 = parent.querySelector(selector);
|
|
289
|
-
if (!element2) return;
|
|
290
|
-
observer.disconnect();
|
|
291
|
-
return resolve(element2);
|
|
292
|
-
});
|
|
293
|
-
observer.observe(parent, {
|
|
294
|
-
subtree: true,
|
|
295
|
-
childList: true,
|
|
296
|
-
attributes: true
|
|
297
|
-
});
|
|
298
|
-
});
|
|
299
|
-
const asyncQuerySelectorAll = (selector, parent = document) => {
|
|
300
|
-
const delivered = /* @__PURE__ */ new WeakSet();
|
|
301
|
-
const { next, iterable } = new AsyncIterableBuilder();
|
|
302
|
-
function checkNewElement() {
|
|
303
|
-
for (const element of parent.querySelectorAll(selector)) {
|
|
304
|
-
if (delivered.has(element)) continue;
|
|
305
|
-
delivered.add(element);
|
|
306
|
-
next(element);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
checkNewElement();
|
|
310
|
-
const observer = new MutationObserver(checkNewElement);
|
|
311
|
-
observer.observe(parent, {
|
|
312
|
-
subtree: true,
|
|
313
|
-
childList: true,
|
|
314
|
-
attributes: true
|
|
315
|
-
});
|
|
316
|
-
return iterable;
|
|
317
|
-
};
|
|
318
|
-
const helpers = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
319
|
-
__proto__: null,
|
|
320
|
-
AsyncIterableBuilder,
|
|
321
|
-
asyncQuerySelector,
|
|
322
|
-
asyncQuerySelectorAll,
|
|
323
|
-
compare,
|
|
324
|
-
default: AsyncIterableBuilder,
|
|
325
|
-
defineComponent,
|
|
326
|
-
doesResourceContainList,
|
|
327
|
-
domIsReady,
|
|
328
|
-
evalTemplateString,
|
|
329
|
-
findClosingBracketMatchIndex,
|
|
330
|
-
fuzzyCompare,
|
|
331
|
-
generalComparator,
|
|
332
|
-
importCSS,
|
|
333
|
-
importInlineCSS,
|
|
334
|
-
importJS,
|
|
335
|
-
loadScript,
|
|
336
|
-
parseFieldsString,
|
|
337
|
-
setDeepProperty,
|
|
338
|
-
stringToDom,
|
|
339
|
-
transformArrayToContainer,
|
|
340
|
-
uniqID
|
|
341
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
342
|
-
export {
|
|
343
|
-
AsyncIterableBuilder as A,
|
|
344
|
-
doesResourceContainList as a,
|
|
345
|
-
fuzzyCompare as b,
|
|
346
|
-
compare as c,
|
|
347
|
-
defineComponent as d,
|
|
348
|
-
evalTemplateString as e,
|
|
349
|
-
findClosingBracketMatchIndex as f,
|
|
350
|
-
generalComparator as g,
|
|
351
|
-
asyncQuerySelector as h,
|
|
352
|
-
importInlineCSS as i,
|
|
353
|
-
importCSS as j,
|
|
354
|
-
helpers as k,
|
|
355
|
-
stringToDom as l,
|
|
356
|
-
importJS as m,
|
|
357
|
-
loadScript as n,
|
|
358
|
-
domIsReady as o,
|
|
359
|
-
parseFieldsString as p,
|
|
360
|
-
asyncQuerySelectorAll as q,
|
|
361
|
-
setDeepProperty as s,
|
|
362
|
-
transformArrayToContainer as t,
|
|
363
|
-
uniqID as u
|
|
364
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const slimselect = '.ss-main {\n position: relative;\n display: flex;\n user-select: none;\n color: #666;\n width: 100%;\n}\n.ss-main .ss-single-selected {\n display: flex;\n cursor: pointer;\n width: 100%;\n height: 30px;\n padding: 6px;\n border: 1px solid #dcdee2;\n border-radius: 4px;\n background-color: #fff;\n outline: 0;\n box-sizing: border-box;\n transition: background-color .2s;\n}\n.ss-main .ss-single-selected.ss-disabled {\n background-color: #dcdee2;\n cursor: not-allowed;\n}\n.ss-main .ss-single-selected.ss-open-above {\n border-top-left-radius: 0px;\n border-top-right-radius: 0px;\n}\n.ss-main .ss-single-selected.ss-open-below {\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n}\n.ss-main .ss-single-selected .placeholder {\n display: flex;\n flex: 1 1 100%;\n align-items: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n width: calc(100% - 30px);\n line-height: 1em;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.ss-main .ss-single-selected .placeholder * {\n display: flex;\n align-items: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: auto;\n}\n.ss-main .ss-single-selected .placeholder .ss-disabled {\n color: #dedede;\n}\n.ss-main .ss-single-selected .ss-deselect {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex: 0 1 auto;\n margin: 0 6px 0 6px;\n font-weight: bold;\n}\n.ss-main .ss-single-selected .ss-deselect.ss-hide {\n display: none;\n}\n.ss-main .ss-single-selected .ss-arrow {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex: 0 1 auto;\n margin: 0 6px 0 6px;\n}\n.ss-main .ss-single-selected .ss-arrow span {\n border: solid #666;\n border-width: 0 2px 2px 0;\n display: inline-block;\n padding: 3px;\n transition: transform .2s, margin .2s;\n}\n.ss-main .ss-single-selected .ss-arrow span.arrow-up {\n transform: rotate(-135deg);\n margin: 3px 0 0 0;\n}\n.ss-main .ss-single-selected .ss-arrow span.arrow-down {\n transform: rotate(45deg);\n margin: -3px 0 0 0;\n}\n.ss-main .ss-multi-selected {\n display: flex;\n flex-direction: row;\n cursor: pointer;\n min-height: 30px;\n width: 100%;\n padding: 0 0 0 3px;\n border: 1px solid #dcdee2;\n border-radius: 4px;\n background-color: #fff;\n outline: 0;\n box-sizing: border-box;\n transition: background-color .2s;\n}\n.ss-main .ss-multi-selected.ss-disabled {\n background-color: #dcdee2;\n cursor: not-allowed;\n}\n.ss-main .ss-multi-selected.ss-disabled .ss-values .ss-disabled {\n color: #666;\n}\n.ss-main .ss-multi-selected.ss-disabled .ss-values .ss-value .ss-value-delete {\n cursor: not-allowed;\n}\n.ss-main .ss-multi-selected.ss-open-above {\n border-top-left-radius: 0px;\n border-top-right-radius: 0px;\n}\n.ss-main .ss-multi-selected.ss-open-below {\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n}\n.ss-main .ss-multi-selected .ss-values {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n flex: 1 1 100%;\n width: calc(100% - 30px);\n}\n.ss-main .ss-multi-selected .ss-values .ss-disabled {\n display: flex;\n padding: 4px 5px;\n margin: 2px 0px;\n line-height: 1em;\n align-items: center;\n width: 100%;\n color: #dedede;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n@keyframes scaleIn {\n 0% {\n transform: scale(0);\n opacity: 0;\n }\n 100% {\n transform: scale(1);\n opacity: 1;\n }\n}\n@keyframes scaleOut {\n 0% {\n transform: scale(1);\n opacity: 1;\n }\n 100% {\n transform: scale(0);\n opacity: 0;\n }\n}\n.ss-main .ss-multi-selected .ss-values .ss-value {\n display: flex;\n user-select: none;\n align-items: center;\n font-size: 12px;\n padding: 3px 5px;\n margin: 3px 5px 3px 0px;\n color: #fff;\n background-color: #5897fb;\n border-radius: 4px;\n animation-name: scaleIn;\n animation-duration: .2s;\n animation-timing-function: ease-out;\n animation-fill-mode: both;\n}\n.ss-main .ss-multi-selected .ss-values .ss-value.ss-out {\n animation-name: scaleOut;\n animation-duration: .2s;\n animation-timing-function: ease-out;\n}\n.ss-main .ss-multi-selected .ss-values .ss-value .ss-value-delete {\n margin: 0 0 0 5px;\n cursor: pointer;\n}\n.ss-main .ss-multi-selected .ss-add {\n display: flex;\n flex: 0 1 3px;\n margin: 9px 12px 0 5px;\n}\n.ss-main .ss-multi-selected .ss-add .ss-plus {\n display: flex;\n justify-content: center;\n align-items: center;\n background: #666;\n position: relative;\n height: 10px;\n width: 2px;\n transition: transform .2s;\n}\n.ss-main .ss-multi-selected .ss-add .ss-plus:after {\n background: #666;\n content: "";\n position: absolute;\n height: 2px;\n width: 10px;\n left: -4px;\n top: 4px;\n}\n.ss-main .ss-multi-selected .ss-add .ss-plus.ss-cross {\n transform: rotate(45deg);\n}\n.ss-content {\n position: absolute;\n width: 100%;\n margin: -1px 0 0 0;\n box-sizing: border-box;\n border: solid 1px #dcdee2;\n z-index: 1010;\n background-color: #fff;\n transform-origin: center top;\n transition: transform .2s, opacity .2s;\n opacity: 0;\n transform: scaleY(0);\n}\n.ss-content.ss-open {\n display: block;\n opacity: 1;\n transform: scaleY(1);\n}\n.ss-content .ss-search {\n display: flex;\n flex-direction: row;\n padding: 8px 8px 6px 8px;\n}\n.ss-content .ss-search.ss-hide {\n height: 0px;\n opacity: 0;\n padding: 0px 0px 0px 0px;\n margin: 0px 0px 0px 0px;\n}\n.ss-content .ss-search.ss-hide input {\n height: 0px;\n opacity: 0;\n padding: 0px 0px 0px 0px;\n margin: 0px 0px 0px 0px;\n}\n.ss-content .ss-search input {\n display: inline-flex;\n font-size: inherit;\n line-height: inherit;\n flex: 1 1 auto;\n width: 100%;\n min-width: 0px;\n height: 30px;\n padding: 6px 8px;\n margin: 0;\n border: 1px solid #dcdee2;\n border-radius: 4px;\n background-color: #fff;\n outline: 0;\n text-align: left;\n box-sizing: border-box;\n -webkit-box-sizing: border-box;\n -webkit-appearance: textfield;\n}\n.ss-content .ss-search input::placeholder {\n color: #8a8a8a;\n vertical-align: middle;\n}\n.ss-content .ss-search input:focus {\n box-shadow: 0 0 5px #5897fb;\n}\n.ss-content .ss-search .ss-addable {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n font-size: 22px;\n font-weight: bold;\n flex: 0 0 30px;\n height: 30px;\n margin: 0 0 0 8px;\n border: 1px solid #dcdee2;\n border-radius: 4px;\n box-sizing: border-box;\n}\n.ss-content .ss-addable {\n padding-top: 0px;\n}\n.ss-content .ss-list {\n max-height: 200px;\n overflow-x: hidden;\n overflow-y: auto;\n text-align: left;\n}\n.ss-content .ss-list .ss-optgroup .ss-optgroup-label {\n padding: 6px 10px 6px 10px;\n font-weight: bold;\n}\n.ss-content .ss-list .ss-optgroup .ss-option {\n padding: 6px 6px 6px 25px;\n}\n.ss-content .ss-list .ss-optgroup-label-selectable {\n cursor: pointer;\n}\n.ss-content .ss-list .ss-optgroup-label-selectable:hover {\n color: #fff;\n background-color: #5897fb;\n}\n.ss-content .ss-list .ss-option {\n padding: 6px 10px 6px 10px;\n cursor: pointer;\n user-select: none;\n}\n.ss-content .ss-list .ss-option * {\n display: inline-block;\n}\n.ss-content .ss-list .ss-option:hover,\n.ss-content .ss-list .ss-option.ss-highlighted {\n color: #fff;\n background-color: #5897fb;\n}\n.ss-content .ss-list .ss-option.ss-disabled {\n cursor: not-allowed;\n color: #dedede;\n background-color: #fff;\n}\n.ss-content .ss-list .ss-option:not(.ss-disabled).ss-option-selected {\n color: #666;\n background-color: rgba(88, 151, 251, 0.1);\n}\n.ss-content .ss-list .ss-option.ss-hide {\n display: none;\n}\n.ss-content .ss-list .ss-option .ss-search-highlight {\n background-color: #fffb8c;\n}\n';
|
|
2
|
-
export {
|
|
3
|
-
slimselect as default
|
|
4
|
-
};
|