@solid-design-system/components 1.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/LICENSE.md +20 -0
- package/README.md +15 -0
- package/dist/components/es/button.js +125 -0
- package/dist/components/es/classix.js +1 -0
- package/dist/components/es/component.styles.js +1 -0
- package/dist/components/es/icon.js +17 -0
- package/dist/components/es/if-defined.js +11 -0
- package/dist/components/es/include.js +1 -0
- package/dist/components/es/include.styles.js +1 -0
- package/dist/components/es/library.js +1 -0
- package/dist/components/es/library.system.js +1 -0
- package/dist/components/es/link.js +1 -0
- package/dist/components/es/lit-element.js +23 -0
- package/dist/components/es/request.js +1 -0
- package/dist/components/es/request2.js +1 -0
- package/dist/components/es/solid-components.js +1 -0
- package/dist/components/es/solid-element.js +21 -0
- package/dist/components/es/spinner.js +1 -0
- package/dist/components/es/state.js +6 -0
- package/dist/components/es/watch.js +1 -0
- package/dist/components/umd/solid-components.js +200 -0
- package/dist/custom-elements.json +1 -0
- package/dist/package/components/button/button.d.ts +48 -0
- package/dist/package/components/button/button.js +391 -0
- package/dist/package/components/icon/icon.d.ts +22 -0
- package/dist/package/components/icon/icon.js +129 -0
- package/dist/package/components/icon/library.d.ts +16 -0
- package/dist/package/components/icon/library.js +17 -0
- package/dist/package/components/icon/library.system.d.ts +7 -0
- package/dist/package/components/icon/library.system.js +26 -0
- package/dist/package/components/icon/request.d.ts +11 -0
- package/dist/package/components/icon/request.js +24 -0
- package/dist/package/components/include/include.d.ts +16 -0
- package/dist/package/components/include/include.js +72 -0
- package/dist/package/components/include/include.styles.d.ts +2 -0
- package/dist/package/components/include/include.styles.js +6 -0
- package/dist/package/components/include/request.d.ts +7 -0
- package/dist/package/components/include/request.js +18 -0
- package/dist/package/components/link/link.d.ts +22 -0
- package/dist/package/components/link/link.js +107 -0
- package/dist/package/components/spinner/spinner.d.ts +12 -0
- package/dist/package/components/spinner/spinner.js +46 -0
- package/dist/package/internal/form.d.ts +35 -0
- package/dist/package/internal/form.js +212 -0
- package/dist/package/internal/slot.d.ts +14 -0
- package/dist/package/internal/slot.js +47 -0
- package/dist/package/internal/solid-element.d.ts +26 -0
- package/dist/package/internal/solid-element.js +38 -0
- package/dist/package/internal/watch.d.ts +11 -0
- package/dist/package/internal/watch.js +28 -0
- package/dist/package/node_modules/.pnpm/@shoelace-style_localize@3.1.0/node_modules/@shoelace-style/localize/dist/index.js +103 -0
- package/dist/package/solid-components.d.ts +6 -0
- package/dist/package/solid-components.js +14 -0
- package/dist/package/styles/component.styles.d.ts +2 -0
- package/dist/package/styles/component.styles.js +5 -0
- package/dist/package/styles/tailwind.css.js +4 -0
- package/dist/package/translations/en.d.ts +3 -0
- package/dist/package/translations/en.js +31 -0
- package/dist/package/utilities/localize.d.ts +25 -0
- package/dist/package/utilities/localize.js +7 -0
- package/dist/versioned-components/es/button.js +125 -0
- package/dist/versioned-components/es/classix.js +1 -0
- package/dist/versioned-components/es/component.styles.js +1 -0
- package/dist/versioned-components/es/icon.js +17 -0
- package/dist/versioned-components/es/if-defined.js +11 -0
- package/dist/versioned-components/es/include.js +1 -0
- package/dist/versioned-components/es/include.styles.js +1 -0
- package/dist/versioned-components/es/library.js +1 -0
- package/dist/versioned-components/es/library.system.js +1 -0
- package/dist/versioned-components/es/link.js +1 -0
- package/dist/versioned-components/es/lit-element.js +23 -0
- package/dist/versioned-components/es/request.js +1 -0
- package/dist/versioned-components/es/request2.js +1 -0
- package/dist/versioned-components/es/solid-components.js +1 -0
- package/dist/versioned-components/es/solid-element.js +21 -0
- package/dist/versioned-components/es/spinner.js +1 -0
- package/dist/versioned-components/es/state.js +6 -0
- package/dist/versioned-components/es/watch.js +1 -0
- package/dist/versioned-package/components/button/button.d.ts +48 -0
- package/dist/versioned-package/components/button/button.js +391 -0
- package/dist/versioned-package/components/icon/icon.d.ts +22 -0
- package/dist/versioned-package/components/icon/icon.js +129 -0
- package/dist/versioned-package/components/icon/library.d.ts +16 -0
- package/dist/versioned-package/components/icon/library.js +17 -0
- package/dist/versioned-package/components/icon/library.system.d.ts +7 -0
- package/dist/versioned-package/components/icon/library.system.js +26 -0
- package/dist/versioned-package/components/icon/request.d.ts +11 -0
- package/dist/versioned-package/components/icon/request.js +24 -0
- package/dist/versioned-package/components/include/include.d.ts +16 -0
- package/dist/versioned-package/components/include/include.js +72 -0
- package/dist/versioned-package/components/include/include.styles.d.ts +2 -0
- package/dist/versioned-package/components/include/include.styles.js +6 -0
- package/dist/versioned-package/components/include/request.d.ts +7 -0
- package/dist/versioned-package/components/include/request.js +18 -0
- package/dist/versioned-package/components/link/link.d.ts +22 -0
- package/dist/versioned-package/components/link/link.js +107 -0
- package/dist/versioned-package/components/spinner/spinner.d.ts +12 -0
- package/dist/versioned-package/components/spinner/spinner.js +46 -0
- package/dist/versioned-package/internal/form.d.ts +35 -0
- package/dist/versioned-package/internal/form.js +212 -0
- package/dist/versioned-package/internal/slot.d.ts +14 -0
- package/dist/versioned-package/internal/slot.js +47 -0
- package/dist/versioned-package/internal/solid-element.d.ts +26 -0
- package/dist/versioned-package/internal/solid-element.js +38 -0
- package/dist/versioned-package/internal/watch.d.ts +11 -0
- package/dist/versioned-package/internal/watch.js +28 -0
- package/dist/versioned-package/node_modules/.pnpm/@shoelace-style_localize@3.1.0/node_modules/@shoelace-style/localize/dist/index.js +103 -0
- package/dist/versioned-package/solid-components.d.ts +6 -0
- package/dist/versioned-package/solid-components.js +14 -0
- package/dist/versioned-package/styles/component.styles.d.ts +2 -0
- package/dist/versioned-package/styles/component.styles.js +5 -0
- package/dist/versioned-package/styles/tailwind.css.js +4 -0
- package/dist/versioned-package/translations/en.d.ts +3 -0
- package/dist/versioned-package/translations/en.js +31 -0
- package/dist/versioned-package/utilities/localize.d.ts +25 -0
- package/dist/versioned-package/utilities/localize.js +7 -0
- package/dist/vscode.html-custom-data.json +661 -0
- package/dist/web-types.json +1449 -0
- package/package.json +185 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { LitElement } from 'lit';
|
|
2
|
+
type UpdateHandler = (prev?: unknown, next?: unknown) => void;
|
|
3
|
+
type NonUndefined<A> = A extends undefined ? never : A;
|
|
4
|
+
type UpdateHandlerFunctionKeys<T extends object> = {
|
|
5
|
+
[K in keyof T]-?: NonUndefined<T[K]> extends UpdateHandler ? K : never;
|
|
6
|
+
}[keyof T];
|
|
7
|
+
interface WatchOptions {
|
|
8
|
+
waitUntilFirstUpdate?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function watch(propertyName: string | string[], options?: WatchOptions): <ElemClass extends LitElement>(proto: ElemClass, decoratedFnName: UpdateHandlerFunctionKeys<ElemClass>) => void;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function watch(propertyName, options) {
|
|
2
|
+
const resolvedOptions = {
|
|
3
|
+
waitUntilFirstUpdate: false,
|
|
4
|
+
...options
|
|
5
|
+
};
|
|
6
|
+
return (proto, decoratedFnName) => {
|
|
7
|
+
const { update } = proto;
|
|
8
|
+
const watchedProperties = Array.isArray(propertyName) ? propertyName : [propertyName];
|
|
9
|
+
proto.update = function(changedProps) {
|
|
10
|
+
watchedProperties.forEach((property) => {
|
|
11
|
+
const key = property;
|
|
12
|
+
if (changedProps.has(key)) {
|
|
13
|
+
const oldValue = changedProps.get(key);
|
|
14
|
+
const newValue = this[key];
|
|
15
|
+
if (oldValue !== newValue) {
|
|
16
|
+
if (!resolvedOptions.waitUntilFirstUpdate || this.hasUpdated) {
|
|
17
|
+
this[decoratedFnName](oldValue, newValue);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
update.call(this, changedProps);
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
watch
|
|
28
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
const connectedElements = /* @__PURE__ */ new Set();
|
|
2
|
+
const documentElementObserver = new MutationObserver(update);
|
|
3
|
+
const translations = /* @__PURE__ */ new Map();
|
|
4
|
+
let documentDirection = document.documentElement.dir || "ltr";
|
|
5
|
+
let documentLanguage = document.documentElement.lang || navigator.language;
|
|
6
|
+
let fallback;
|
|
7
|
+
documentElementObserver.observe(document.documentElement, {
|
|
8
|
+
attributes: true,
|
|
9
|
+
attributeFilter: ["dir", "lang"]
|
|
10
|
+
});
|
|
11
|
+
function registerTranslation(...translation) {
|
|
12
|
+
translation.map((t) => {
|
|
13
|
+
const code = t.$code.toLowerCase();
|
|
14
|
+
if (translations.has(code)) {
|
|
15
|
+
translations.set(code, Object.assign(Object.assign({}, translations.get(code)), t));
|
|
16
|
+
} else {
|
|
17
|
+
translations.set(code, t);
|
|
18
|
+
}
|
|
19
|
+
if (!fallback) {
|
|
20
|
+
fallback = t;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
update();
|
|
24
|
+
}
|
|
25
|
+
function update() {
|
|
26
|
+
documentDirection = document.documentElement.dir || "ltr";
|
|
27
|
+
documentLanguage = document.documentElement.lang || navigator.language;
|
|
28
|
+
[...connectedElements.keys()].map((el) => {
|
|
29
|
+
if (typeof el.requestUpdate === "function") {
|
|
30
|
+
el.requestUpdate();
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
let LocalizeController$1 = class LocalizeController {
|
|
35
|
+
constructor(host) {
|
|
36
|
+
this.host = host;
|
|
37
|
+
this.host.addController(this);
|
|
38
|
+
}
|
|
39
|
+
hostConnected() {
|
|
40
|
+
connectedElements.add(this.host);
|
|
41
|
+
}
|
|
42
|
+
hostDisconnected() {
|
|
43
|
+
connectedElements.delete(this.host);
|
|
44
|
+
}
|
|
45
|
+
dir() {
|
|
46
|
+
return `${this.host.dir || documentDirection}`.toLowerCase();
|
|
47
|
+
}
|
|
48
|
+
lang() {
|
|
49
|
+
return `${this.host.lang || documentLanguage}`.toLowerCase();
|
|
50
|
+
}
|
|
51
|
+
getTranslationData(lang) {
|
|
52
|
+
var _a, _b;
|
|
53
|
+
const locale = new Intl.Locale(lang);
|
|
54
|
+
const language = locale === null || locale === void 0 ? void 0 : locale.language.toLowerCase();
|
|
55
|
+
const region = (_b = (_a = locale === null || locale === void 0 ? void 0 : locale.region) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== null && _b !== void 0 ? _b : "";
|
|
56
|
+
const primary = translations.get(`${language}-${region}`);
|
|
57
|
+
const secondary = translations.get(language);
|
|
58
|
+
return { locale, language, region, primary, secondary };
|
|
59
|
+
}
|
|
60
|
+
exists(key, options) {
|
|
61
|
+
var _a;
|
|
62
|
+
const { primary, secondary } = this.getTranslationData((_a = options.lang) !== null && _a !== void 0 ? _a : this.lang());
|
|
63
|
+
options = Object.assign({ includeFallback: false }, options);
|
|
64
|
+
if (primary && primary[key] || secondary && secondary[key] || options.includeFallback && fallback && fallback[key]) {
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
term(key, ...args) {
|
|
70
|
+
const { primary, secondary } = this.getTranslationData(this.lang());
|
|
71
|
+
let term;
|
|
72
|
+
if (primary && primary[key]) {
|
|
73
|
+
term = primary[key];
|
|
74
|
+
} else if (secondary && secondary[key]) {
|
|
75
|
+
term = secondary[key];
|
|
76
|
+
} else if (fallback && fallback[key]) {
|
|
77
|
+
term = fallback[key];
|
|
78
|
+
} else {
|
|
79
|
+
console.error(`No translation found for: ${String(key)}`);
|
|
80
|
+
return String(key);
|
|
81
|
+
}
|
|
82
|
+
if (typeof term === "function") {
|
|
83
|
+
return term(...args);
|
|
84
|
+
}
|
|
85
|
+
return term;
|
|
86
|
+
}
|
|
87
|
+
date(dateToFormat, options) {
|
|
88
|
+
dateToFormat = new Date(dateToFormat);
|
|
89
|
+
return new Intl.DateTimeFormat(this.lang(), options).format(dateToFormat);
|
|
90
|
+
}
|
|
91
|
+
number(numberToFormat, options) {
|
|
92
|
+
numberToFormat = Number(numberToFormat);
|
|
93
|
+
return isNaN(numberToFormat) ? "" : new Intl.NumberFormat(this.lang(), options).format(numberToFormat);
|
|
94
|
+
}
|
|
95
|
+
relativeTime(value, unit, options) {
|
|
96
|
+
return new Intl.RelativeTimeFormat(this.lang(), options).format(value, unit);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
export {
|
|
100
|
+
LocalizeController$1 as LocalizeController,
|
|
101
|
+
registerTranslation,
|
|
102
|
+
update
|
|
103
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as SdButton } from './components/button/button';
|
|
2
|
+
export { default as SdIcon } from './components/icon/icon';
|
|
3
|
+
export { default as SdInclude } from './components/include/include';
|
|
4
|
+
export { default as SdLink } from './components/link/link';
|
|
5
|
+
export { default as SdSpinner } from './components/spinner/spinner';
|
|
6
|
+
export * from './utilities/localize';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as default2 } from "./components/button/button.js";
|
|
2
|
+
import { default as default3 } from "./components/icon/icon.js";
|
|
3
|
+
import { default as default4 } from "./components/include/include.js";
|
|
4
|
+
import { default as default5 } from "./components/link/link.js";
|
|
5
|
+
import { default as default6 } from "./components/spinner/spinner.js";
|
|
6
|
+
import { LocalizeController } from "./utilities/localize.js";
|
|
7
|
+
export {
|
|
8
|
+
LocalizeController,
|
|
9
|
+
default2 as SdButton,
|
|
10
|
+
default3 as SdIcon,
|
|
11
|
+
default4 as SdInclude,
|
|
12
|
+
default5 as SdLink,
|
|
13
|
+
default6 as SdSpinner
|
|
14
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const tailwind = '/*! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.left-1\\/2{left:50%}.top-1\\/2{top:50%}.ml-1{margin-left:var(--sd-spacing-1,.25rem)}.ml-2{margin-left:var(--sd-spacing-2,.5rem)}.ml-\\[0\\.25em\\]{margin-left:.25em}.ml-\\[0\\.5em\\]{margin-left:.5em}.mr-1{margin-right:var(--sd-spacing-1,.25rem)}.mr-2{margin-right:var(--sd-spacing-2,.5rem)}.mr-\\[0\\.25em\\]{margin-right:.25em}.mr-\\[0\\.5em\\]{margin-right:.5em}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.h-varspacing{height:var(--tw-varspacing)}.w-full{width:100%}.w-varspacing{width:var(--tw-varspacing)}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-\\[inherit\\]{cursor:inherit}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-wait{cursor:wait}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.items-start{align-items:flex-start}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-center{justify-content:center}.whitespace-nowrap{white-space:nowrap}.rounded-md{border-radius:var(--sd-border-radius-md,.375rem)}.border{border-width:1px}.border-primary{--tw-border-opacity:1;border-color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity:1;border-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-border-opacity))}.bg-accent{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-accent,67 176 42)/var(--tw-bg-opacity))}.bg-primary{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity))}.px-0{padding-left:var(--sd-spacing-0,0);padding-right:var(--sd-spacing-0,0)}.px-4{padding-left:var(--sd-spacing-4,1rem);padding-right:var(--sd-spacing-4,1rem)}.align-middle{vertical-align:middle}.text-base{font-size:var(--sd-font-size-base,1rem)}.text-sm{font-size:var(--sd-font-size-sm,.875rem)}.leading-\\[calc\\(var\\(--tw-varspacing\\)-2px\\)\\]{line-height:calc(var(--tw-varspacing) - 2px)}.text-neutral-500{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity))}.text-neutral-600{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-600,136 136 136)/var(--tw-text-opacity))}.text-primary{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(var(--sd-color-white,255 255 255)/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.underline-offset-2{text-underline-offset:2px}.opacity-20{opacity:var(--sd-opacity-20,.2)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.varspacing-10{--tw-varspacing:var(--sd-spacing-10,2.5rem)}.varspacing-12{--tw-varspacing:var(--sd-spacing-12,3rem)}.varspacing-8{--tw-varspacing:var(--sd-spacing-8,2rem)}.focus-visible\\:focus-outline:focus-visible{outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}.focus-visible\\:focus-outline-inverted:focus-visible{outline-color:rgb(var(--sd-color-white,255 255 255)/1);outline-offset:2px;outline-style:solid;outline-width:2px}.disabled\\:border-neutral-500:disabled{--tw-border-opacity:1;border-color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-border-opacity))}.disabled\\:border-neutral-600:disabled{--tw-border-opacity:1;border-color:rgb(var(--sd-color-neutral-600,136 136 136)/var(--tw-border-opacity))}.disabled\\:bg-neutral-500:disabled{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-bg-opacity))}.disabled\\:bg-neutral-600:disabled{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-600,136 136 136)/var(--tw-bg-opacity))}.disabled\\:text-neutral-500:disabled{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity))}.disabled\\:text-neutral-600:disabled{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-600,136 136 136)/var(--tw-text-opacity))}.disabled\\:text-white:disabled{--tw-text-opacity:1;color:rgb(var(--sd-color-white,255 255 255)/var(--tw-text-opacity))}.hover\\:border-primary-100:hover:not([disabled]){--tw-border-opacity:1;border-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-border-opacity))}.hover\\:border-primary-500:hover:not([disabled]){--tw-border-opacity:1;border-color:rgb(var(--sd-color-primary-500,70 109 175)/var(--tw-border-opacity))}.hover\\:bg-accent-300:hover:not([disabled]){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-accent-300,108 194 84)/var(--tw-bg-opacity))}.hover\\:bg-primary-100:hover:not([disabled]){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity))}.hover\\:bg-primary-500:hover:not([disabled]){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-500,70 109 175)/var(--tw-bg-opacity))}.hover\\:text-primary-100:hover:not([disabled]){--tw-text-opacity:1;color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-text-opacity))}.hover\\:text-primary-200:hover:not([disabled]){--tw-text-opacity:1;color:rgb(var(--sd-color-primary-200,224 233 243)/var(--tw-text-opacity))}.hover\\:text-primary-500:hover:not([disabled]){--tw-text-opacity:1;color:rgb(var(--sd-color-primary-500,70 109 175)/var(--tw-text-opacity))}.active\\:border-primary-200:active:not([disabled]){--tw-border-opacity:1;border-color:rgb(var(--sd-color-primary-200,224 233 243)/var(--tw-border-opacity))}.active\\:border-primary-800:active:not([disabled]){--tw-border-opacity:1;border-color:rgb(var(--sd-color-primary-800,5 21 48)/var(--tw-border-opacity))}.active\\:bg-accent-500:active:not([disabled]){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-accent-500,66 147 50)/var(--tw-bg-opacity))}.active\\:bg-primary-200:active:not([disabled]){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-200,224 233 243)/var(--tw-bg-opacity))}.active\\:bg-primary-800:active:not([disabled]){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-800,5 21 48)/var(--tw-bg-opacity))}.active\\:text-primary-200:active:not([disabled]){--tw-text-opacity:1;color:rgb(var(--sd-color-primary-200,224 233 243)/var(--tw-text-opacity))}.active\\:text-primary-400:active:not([disabled]){--tw-text-opacity:1;color:rgb(var(--sd-color-primary-400,153 171 208)/var(--tw-text-opacity))}.active\\:text-primary-800:active:not([disabled]){--tw-text-opacity:1;color:rgb(var(--sd-color-primary-800,5 21 48)/var(--tw-text-opacity))}';
|
|
2
|
+
export {
|
|
3
|
+
tailwind as default
|
|
4
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { registerTranslation } from "../node_modules/.pnpm/@shoelace-style_localize@3.1.0/node_modules/@shoelace-style/localize/dist/index.js";
|
|
2
|
+
const translation = {
|
|
3
|
+
$code: "en",
|
|
4
|
+
$name: "English",
|
|
5
|
+
$dir: "ltr",
|
|
6
|
+
clearEntry: "Clear entry",
|
|
7
|
+
close: "Close",
|
|
8
|
+
copy: "Copy",
|
|
9
|
+
numOptionsSelected: (num) => {
|
|
10
|
+
if (num === 0)
|
|
11
|
+
return "No options selected";
|
|
12
|
+
if (num === 1)
|
|
13
|
+
return "1 option selected";
|
|
14
|
+
return `${num} options selected`;
|
|
15
|
+
},
|
|
16
|
+
currentValue: "Current value",
|
|
17
|
+
hidePassword: "Hide password",
|
|
18
|
+
loading: "Loading",
|
|
19
|
+
progress: "Progress",
|
|
20
|
+
remove: "Remove",
|
|
21
|
+
resize: "Resize",
|
|
22
|
+
scrollToEnd: "Scroll to end",
|
|
23
|
+
scrollToStart: "Scroll to start",
|
|
24
|
+
selectAColorFromTheScreen: "Select a color from the screen",
|
|
25
|
+
showPassword: "Show password",
|
|
26
|
+
toggleColorFormat: "Toggle color format"
|
|
27
|
+
};
|
|
28
|
+
registerTranslation(translation);
|
|
29
|
+
export {
|
|
30
|
+
translation as default
|
|
31
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import '../translations/en';
|
|
2
|
+
import { LocalizeController as DefaultLocalizationController } from '@shoelace-style/localize';
|
|
3
|
+
import type { Translation as DefaultTranslation } from '@shoelace-style/localize';
|
|
4
|
+
export declare class LocalizeController extends DefaultLocalizationController<Translation> {
|
|
5
|
+
}
|
|
6
|
+
export interface Translation extends DefaultTranslation {
|
|
7
|
+
$code: string;
|
|
8
|
+
$name: string;
|
|
9
|
+
$dir: 'ltr' | 'rtl';
|
|
10
|
+
clearEntry: string;
|
|
11
|
+
close: string;
|
|
12
|
+
copy: string;
|
|
13
|
+
numOptionsSelected: (num: number) => string;
|
|
14
|
+
currentValue: string;
|
|
15
|
+
hidePassword: string;
|
|
16
|
+
loading: string;
|
|
17
|
+
progress: string;
|
|
18
|
+
remove: string;
|
|
19
|
+
resize: string;
|
|
20
|
+
scrollToEnd: string;
|
|
21
|
+
scrollToStart: string;
|
|
22
|
+
selectAColorFromTheScreen: string;
|
|
23
|
+
showPassword: string;
|
|
24
|
+
toggleColorFormat: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../translations/en.js";
|
|
2
|
+
import { LocalizeController as LocalizeController$1 } from "../node_modules/.pnpm/@shoelace-style_localize@3.1.0/node_modules/@shoelace-style/localize/dist/index.js";
|
|
3
|
+
class LocalizeController extends LocalizeController$1 {
|
|
4
|
+
}
|
|
5
|
+
export {
|
|
6
|
+
LocalizeController
|
|
7
|
+
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import"./spinner.js";import{x as t,i as e}from"./lit-element.js";import{S as o,l as i,n as r,e as s}from"./solid-element.js";import{t as a}from"./state.js";import{H as n,l,i as d}from"./if-defined.js";import{w as h}from"./watch.js";import{c as u}from"./component.styles.js";import{t as p}from"./classix.js";const m=new WeakMap,c=new WeakMap,b=new WeakMap;class f{constructor(t,e){(this.host=t).addController(this),this.options={form:t=>{if(t.hasAttribute("form")&&""!==t.getAttribute("form")){const e=t.getRootNode(),o=t.getAttribute("form");if(o)return e.getElementById(o)}return t.closest("form")},name:t=>t.name,value:t=>t.value,defaultValue:t=>t.defaultValue,disabled:t=>t.disabled??!1,reportValidity:t=>"function"!=typeof t.reportValidity||t.reportValidity(),setValue:(t,e)=>t.value=e,...e},this.handleFormData=this.handleFormData.bind(this),this.handleFormSubmit=this.handleFormSubmit.bind(this),this.handleFormReset=this.handleFormReset.bind(this),this.reportFormValidity=this.reportFormValidity.bind(this),this.handleUserInput=this.handleUserInput.bind(this)}hostConnected(){const t=this.options.form(this.host);t&&this.attachForm(t),this.host.addEventListener("sd-input",this.handleUserInput)}hostDisconnected(){this.detachForm(),this.host.removeEventListener("sd-input",this.handleUserInput)}hostUpdated(){const t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&this.setValidity(this.host.checkValidity())}attachForm(t){t?(this.form=t,m.has(this.form)?m.get(this.form).add(this.host):m.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),b.has(this.form)||(b.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())):this.form=void 0}detachForm(){var t;this.form&&(null==(t=m.get(this.form))||t.delete(this.host),this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),b.has(this.form)&&(this.form.reportValidity=b.get(this.form),b.delete(this.form))),this.form=void 0}handleFormData(t){const e=this.options.disabled(this.host),o=this.options.name(this.host),i=this.options.value(this.host),r="sd-1-0-0-button"===this.host.tagName.toLowerCase();!e&&!r&&"string"==typeof o&&o.length>0&&typeof i<"u"&&(Array.isArray(i)?i.forEach((e=>{t.formData.append(o,e.toString())})):t.formData.append(o,i.toString()))}handleFormSubmit(t){var e;const o=this.options.disabled(this.host),i=this.options.reportValidity;this.form&&!this.form.noValidate&&(null==(e=m.get(this.form))||e.forEach((t=>{this.setUserInteracted(t,!0)}))),this.form&&!this.form.noValidate&&!o&&!i(this.host)&&(t.preventDefault(),t.stopImmediatePropagation())}handleFormReset(){this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1)}async handleUserInput(){await this.host.updateComplete,this.setUserInteracted(this.host,!0)}reportFormValidity(){if(this.form&&!this.form.noValidate){const t=this.form.querySelectorAll("*");for(const e of t)if("function"==typeof e.reportValidity&&!e.reportValidity())return!1}return!0}setUserInteracted(t,e){c.set(t,e),t.requestUpdate()}doAction(t,e){if(this.form){const o=document.createElement("button");o.type=t,o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",e&&(o.name=e.name,o.value=e.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach((t=>{e.hasAttribute(t)&&o.setAttribute(t,e.getAttribute(t))}))),this.form.append(o),o.click(),o.remove()}}reset(t){this.doAction("reset",t)}submit(t){this.doAction("submit",t)}setValidity(t){var e;const o=this.host,i=!!c.get(o),r=!!o.required;null!=(e=this.form)&&e.noValidate?(o.removeAttribute("data-required"),o.removeAttribute("data-optional"),o.removeAttribute("data-invalid"),o.removeAttribute("data-valid"),o.removeAttribute("data-user-invalid"),o.removeAttribute("data-user-valid")):(o.toggleAttribute("data-required",r),o.toggleAttribute("data-optional",!r),o.toggleAttribute("data-invalid",!t),o.toggleAttribute("data-valid",t),o.toggleAttribute("data-user-invalid",!t&&i),o.toggleAttribute("data-user-valid",t&&i))}updateValidity(){const t=this.host;this.setValidity(t.checkValidity())}}
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2020 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
*/const y=Symbol.for(""),v=t=>{if((null==t?void 0:t.r)===y)return null==t?void 0:t._$litStatic$},g=(t,...e)=>({_$litStatic$:e.reduce(((e,o,i)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(o)+t[i+1]),t[0]),r:y}),x=new Map,w=(V=t,(t,...e)=>{const o=e.length;let i,r;const s=[],a=[];let n,l=0,d=!1;for(;l<o;){for(n=t[l];l<o&&(r=e[l],void 0!==(i=v(r)));)n+=i+t[++l],d=!0;l!==o&&a.push(r),s.push(n),l++}if(l===o&&s.push(t[o]),d){const o=s.join("$$lit$$");void 0===(t=x.get(o))&&(s.raw=s,x.set(o,t=s)),e=a}return V(t,...e)});var V,$=Object.defineProperty,_=Object.getOwnPropertyDescriptor,F=(t,e,o,i)=>{for(var r,s=i>1?void 0:i?_(e,o):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i?r(e,o,s):r(s))||s);return i&&s&&$(e,o,s),s};let A=class extends o{constructor(){super(...arguments),this.formControlController=new f(this,{form:t=>{if(t.hasAttribute("form")){const e=t.getRootNode(),o=t.getAttribute("form");return e.getElementById(o)}return t.closest("form")}}),this.hasSlotController=new n(this,"[default]","icon-left","icon-right"),this.invalid=!1,this.title="",this.variant="primary",this.inverted=!1,this.size="lg",this.disabled=!1,this.loading=!1,this.type="button",this.name="",this.value="",this.href=""}firstUpdated(){this.isButton()&&this.formControlController.updateValidity()}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleClick(t){if(this.disabled||this.loading)return t.preventDefault(),void t.stopPropagation();"submit"===this.type&&this.formControlController.submit(this),"reset"===this.type&&this.formControlController.reset(this)}isButton(){return!this.href}isLink(){return!!this.href}handleDisabledChange(){this.isButton()&&this.formControlController.setValidity(this.disabled)}click(){this.button.click()}focus(t){this.button.focus(t)}blur(){this.button.blur()}checkValidity(){return!this.isButton()||this.button.checkValidity()}reportValidity(){return!this.isButton()||this.button.reportValidity()}setCustomValidity(t){this.isButton()&&(this.button.setCustomValidity(t),this.formControlController.updateValidity())}render(){const t=this.isLink(),e=t?g`a`:g`button`,o={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right"),"icon-only":this._iconsInDefaultSlot.length>0};return w`
|
|
7
|
+
<${e}
|
|
8
|
+
part="base"
|
|
9
|
+
class=${p("font-md leading-[calc(var(--tw-varspacing)-2px)] no-underline\n w-full h-varspacing whitespace-nowrap align-middle inline-flex items-stretch justify-center\n border transition-colors duration-200 ease-in-out rounded-md\n select-none cursor-[inherit]",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.loading&&"relative cursor-wait",this.disabled&&"cursor-not-allowed",o["icon-only"]&&"px-0 w-varspacing",{sm:"text-sm varspacing-8 px-4",md:"text-base varspacing-10 px-4",lg:"text-base varspacing-12 px-4"}[this.size],{primary:this.inverted?"text-primary bg-white border-transparent\n hover:text-primary-500 hover:bg-primary-100\n active:text-primary-800 active:bg-primary-200\n disabled:bg-neutral-600 disabled:text-white":"text-white bg-primary border-transparent\n hover:text-primary-100 hover:bg-primary-500\n active:text-primary-200 active:bg-primary-800\n disabled:bg-neutral-500",secondary:this.inverted?"text-white border-white\n hover:text-primary-100 hover:bg-primary-500 hover:border-primary-100\n active:text-primary-200 active:bg-primary-800 active:border-primary-200\n disabled:text-neutral-600 disabled:border-neutral-600":"text-primary border-primary\n hover:text-primary-500 hover:border-primary-500 hover:bg-primary-100\n active:text-primary-800 active:border-primary-800 active:bg-primary-200\n disabled:text-neutral-500 disabled:border-neutral-500",tertiary:this.inverted?"text-white border-transparent\n hover:text-primary-100 hover:bg-primary-500\n active:text-primary-200 active:bg-primary-800\n disabled:text-neutral-600":"text-primary border-transparent\n hover:text-primary-500 hover:bg-primary-100\n active:text-primary-800 active:bg-primary-200\n disabled:text-neutral-500",cta:`text-white bg-accent border-transparent\n hover:bg-accent-300\n active:bg-accent-500\n ${this.inverted?"disabled:bg-neutral-600":"disabled:bg-neutral-500"} disabled:text-white`}[this.variant])}
|
|
10
|
+
?disabled=${l(t?void 0:this.disabled)}
|
|
11
|
+
type=${l(t?void 0:this.type)}
|
|
12
|
+
title=${this.title}
|
|
13
|
+
name=${l(t?void 0:this.name)}
|
|
14
|
+
value=${l(t?void 0:this.value)}
|
|
15
|
+
href=${l(t?this.href:void 0)}
|
|
16
|
+
target=${l(t?this.target:void 0)}
|
|
17
|
+
download=${l(t?this.download:void 0)}
|
|
18
|
+
rel=${l(t&&this.target?"noreferrer noopener":void 0)}
|
|
19
|
+
role=${l(t?void 0:"button")}
|
|
20
|
+
aria-disabled=${this.disabled?"true":"false"}
|
|
21
|
+
tabindex=${this.disabled?"-1":"0"}
|
|
22
|
+
@blur=${this.handleBlur}
|
|
23
|
+
@focus=${this.handleFocus}
|
|
24
|
+
@click=${this.handleClick}
|
|
25
|
+
>
|
|
26
|
+
<slot name="icon-left" part="icon-left" class=${p("flex flex-auto items-center pointer-events-none",o["icon-only"]&&"hidden",this.loading&&"invisible",o["icon-left"]&&{sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size])}></slot>
|
|
27
|
+
<slot part="label" class=${p(o["icon-only"]?"flex flex-auto items-center pointer-events-none":"inline-block",this.loading&&"invisible")}></slot>
|
|
28
|
+
<slot name="icon-right"
|
|
29
|
+
part="icon-right"
|
|
30
|
+
class=${p("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",o["icon-only"]&&"hidden",o["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}>
|
|
31
|
+
</slot>
|
|
32
|
+
${this.loading?w`<sd-1-0-0-spinner
|
|
33
|
+
class="${p("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"
|
|
34
|
+
></sd-1-0-0-spinner>`:""}
|
|
35
|
+
</${e}>
|
|
36
|
+
`}};A.styles=[u,o.styles,e`
|
|
37
|
+
:host {
|
|
38
|
+
display: inline-block;
|
|
39
|
+
position: relative;
|
|
40
|
+
width: auto;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
sd-1-0-0-spinner {
|
|
45
|
+
--indicator-color: currentColor;
|
|
46
|
+
--track-color: var(--tw-varcolor-200);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/*
|
|
50
|
+
* Badges:
|
|
51
|
+
* Slotted badges are positioned absolutely in the top right corner of the button.
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
::slotted(sd-badge) {
|
|
55
|
+
position: absolute;
|
|
56
|
+
top: 0;
|
|
57
|
+
right: 0;
|
|
58
|
+
translate: 50% -50%;
|
|
59
|
+
pointer-events: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* sd-1-0-0-icons should automatically resize correctly based on the button size.
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
::slotted(sd-1-0-0-icon),
|
|
67
|
+
sd-1-0-0-spinner {
|
|
68
|
+
font-size: calc(var(--tw-varspacing) / 2);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
///*
|
|
72
|
+
// * Button groups support a variety of button types (e.g. buttons with tooltips, buttons as dropdown triggers, etc.).
|
|
73
|
+
// * This means buttons aren't always direct descendants of the button group, thus we can't target them with the
|
|
74
|
+
// * ::slotted selector. To work around this, the button group component does some magic to add these special classes to
|
|
75
|
+
// * buttons and we style them here instead.
|
|
76
|
+
// */
|
|
77
|
+
|
|
78
|
+
// :host(.sd-1-0-0-button-group__button--first:not(.sd-1-0-0-button-group__button--last)) .button {
|
|
79
|
+
// border-start-end-radius: 0;
|
|
80
|
+
// border-end-end-radius: 0;
|
|
81
|
+
// }
|
|
82
|
+
|
|
83
|
+
// :host(.sd-1-0-0-button-group__button--inner) .button {
|
|
84
|
+
// border-radius: 0;
|
|
85
|
+
// }
|
|
86
|
+
|
|
87
|
+
// :host(.sd-1-0-0-button-group__button--last:not(.sd-1-0-0-button-group__button--first)) .button {
|
|
88
|
+
// border-start-start-radius: 0;
|
|
89
|
+
// border-end-start-radius: 0;
|
|
90
|
+
// }
|
|
91
|
+
|
|
92
|
+
// /* All except the first */
|
|
93
|
+
// :host(.sd-1-0-0-button-group__button:not(.sd-1-0-0-button-group__button--first)) {
|
|
94
|
+
// margin-inline-start: calc(-1 * var(--sd-input-border-width));
|
|
95
|
+
// }
|
|
96
|
+
|
|
97
|
+
// /* Add a visual separator between solid buttons */
|
|
98
|
+
// :host(
|
|
99
|
+
// .sd-1-0-0-button-group__button:not(
|
|
100
|
+
// .sd-1-0-0-button-group__button--first,
|
|
101
|
+
// .sd-1-0-0-button-group__button--radio,
|
|
102
|
+
// [variant='default']
|
|
103
|
+
// ):not(:hover)
|
|
104
|
+
// )
|
|
105
|
+
// .button:after {
|
|
106
|
+
// content: '';
|
|
107
|
+
// position: absolute;
|
|
108
|
+
// top: 0;
|
|
109
|
+
// inset-inline-start: 0;
|
|
110
|
+
// bottom: 0;
|
|
111
|
+
// border-left: solid 1px rgb(128 128 128 / 33%);
|
|
112
|
+
// mix-blend-mode: multiply;
|
|
113
|
+
// }
|
|
114
|
+
|
|
115
|
+
// /* Bump hovered, focused, and checked buttons up so their focus ring isn't clipped */
|
|
116
|
+
// :host(.sd-1-0-0-button-group__button--hover) {
|
|
117
|
+
// z-index: 1;
|
|
118
|
+
// }
|
|
119
|
+
|
|
120
|
+
// /* Focus and checked are always on top */
|
|
121
|
+
// :host(.sd-1-0-0-button-group__button--focus),
|
|
122
|
+
// :host(.sd-1-0-0-button-group__button[checked]) {
|
|
123
|
+
// z-index: 2;
|
|
124
|
+
// }
|
|
125
|
+
`],F([d("a, button")],A.prototype,"button",2),F([i({selector:"sd-1-0-0-icon"})],A.prototype,"_iconsInDefaultSlot",2),F([a()],A.prototype,"invalid",2),F([r()],A.prototype,"title",2),F([r({reflect:!0})],A.prototype,"variant",2),F([r({type:Boolean,reflect:!0})],A.prototype,"inverted",2),F([r({reflect:!0})],A.prototype,"size",2),F([r({type:Boolean,reflect:!0})],A.prototype,"disabled",2),F([r({type:Boolean,reflect:!0})],A.prototype,"loading",2),F([r()],A.prototype,"type",2),F([r()],A.prototype,"name",2),F([r()],A.prototype,"value",2),F([r()],A.prototype,"href",2),F([r()],A.prototype,"target",2),F([r()],A.prototype,"download",2),F([r()],A.prototype,"form",2),F([r({attribute:"formaction"})],A.prototype,"formAction",2),F([r({attribute:"formenctype"})],A.prototype,"formEnctype",2),F([r({attribute:"formmethod"})],A.prototype,"formMethod",2),F([r({attribute:"formnovalidate",type:Boolean})],A.prototype,"formNoValidate",2),F([r({attribute:"formtarget"})],A.prototype,"formTarget",2),F([h("disabled",{waitUntilFirstUpdate:!0})],A.prototype,"handleDisabledChange",1),A=F([s("sd-1-0-0-button")],A);export{A as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(){let t,e="",n=0;for(;n<arguments.length;)(t=arguments[n++])&&"string"==typeof t&&(e&&(e+=" "),e+=t);return e}export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as o}from"./lit-element.js";const t=o`:host{box-sizing:border-box}:host *,:host ::after,:host ::before{box-sizing:inherit}[hidden]{display:none!important}`;export{t as c};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{A as t,T as e,x as r,i as s}from"./lit-element.js";import{S as i,n as o,e as a}from"./solid-element.js";import{t as l}from"./state.js";import{watchIcon as n,unwatchIcon as c,getIconLibrary as h}from"./library.js";import{requestIcon as p}from"./request.js";import{w as u}from"./watch.js";import{c as d}from"./component.styles.js";import"./library.system.js";import"./request2.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2017 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
*/class m{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2017 Google LLC
|
|
10
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
+
*/class y extends m{constructor(e){if(super(e),this.et=t,2!==e.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(r){if(r===t||null==r)return this.ft=void 0,this.et=r;if(r===e)return r;if("string"!=typeof r)throw Error(this.constructor.directiveName+"() called with a non-string value");if(r===this.et)return this.ft;this.et=r;const s=[r];return s.raw=s,this.ft={_$litType$:this.constructor.resultType,strings:s,values:[]}}}y.directiveName="unsafeHTML",y.resultType=1;
|
|
12
|
+
/**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright 2017 Google LLC
|
|
15
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
+
*/
|
|
17
|
+
class b extends y{}b.directiveName="unsafeSVG",b.resultType=2;const g=(v=b,(...t)=>({_$litDirective$:v,values:t}));var v,f=Object.defineProperty,w=Object.getOwnPropertyDescriptor,A=(t,e,r,s)=>{for(var i,o=s>1?void 0:s?w(e,r):e,a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s?i(e,r,o):i(o))||o);return s&&o&&f(e,r,o),o};let $,j=class extends i{constructor(){super(...arguments),this.svg="",this.label="",this.library="default",this.color="currentColor"}connectedCallback(){super.connectedCallback(),n(this)}firstUpdated(){this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),c(this)}getUrl(){const t=h(this.library);return this.name&&t?t.resolver(this.name):this.src}handleLabelChange(){"string"==typeof this.label&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var t;const e=h(this.library),r=this.getUrl();if($||($=new DOMParser),r)try{const s=await p(r);if(r===this.getUrl())if(s.ok){const r=$.parseFromString(s.svg,"text/html").body.querySelector("svg");null!==r?(null==(t=null==e?void 0:e.mutator)||t.call(e,r),this.svg=r.outerHTML,this.emit("sd-load")):(this.svg="",this.emit("sd-error"))}else this.svg="",this.emit("sd-error")}catch{this.emit("sd-error")}else this.svg.length>0&&(this.svg="")}render(){return r`${g(this.svg)}`}};j.styles=[d,s`:host{display:inline-block;width:1em;height:1em;box-sizing:content-box!important}svg{display:block;height:100%;width:100%}:host([color=primary]) svg{color:rgb(var(--sd-color-primary,0 53 142) / var(--tw-text-opacity,1))}// text-primary :host([color=white]) svg{color:rgb(var(--sd-color-white,255 255 255) / var(--tw-text-opacity,1))}`],A([l()],j.prototype,"svg",2),A([o({reflect:!0})],j.prototype,"name",2),A([o()],j.prototype,"src",2),A([o()],j.prototype,"label",2),A([o({reflect:!0})],j.prototype,"library",2),A([o({reflect:!0})],j.prototype,"color",2),A([u("label")],j.prototype,"handleLabelChange",1),A([u(["name","src","library"])],j.prototype,"setIcon",1),j=A([a("sd-1-0-0-icon")],j);export{j as default};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{o as t}from"./solid-element.js";import{A as e}from"./lit-element.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2017 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
*/function s(e,s){return t({descriptor:t=>{const o={get(){var t,s;return null!==(s=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e))&&void 0!==s?s:null},enumerable:!0,configurable:!0};if(s){const s="symbol"==typeof t?Symbol():"__"+t;o.get=function(){var t,o;return void 0===this[s]&&(this[s]=null!==(o=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e))&&void 0!==o?o:null),this[s]}}return o}})}class o{constructor(t,...e){this.slotNames=[],(this.host=t).addController(this),this.slotNames=e,this.handleSlotChange=this.handleSlotChange.bind(this)}hasDefaultSlot(){return[...this.host.childNodes].some((t=>{if(t.nodeType===t.TEXT_NODE&&""!==t.textContent.trim())return!0;if(t.nodeType===t.ELEMENT_NODE){const e=t;if("sd-visually-hidden"===e.tagName.toLowerCase())return!1;if(!e.hasAttribute("slot"))return!0}return!1}))}hasNamedSlot(t){return null!==this.host.querySelector(`:scope > [slot="${t}"]`)}test(t){return"[default]"===t?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}handleSlotChange(t){const e=t.target;(this.slotNames.includes("[default]")&&!e.name||e.name&&this.slotNames.includes(e.name))&&this.host.requestUpdate()}}
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2018 Google LLC
|
|
10
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
+
*/const n=t=>t??e;export{o as H,s as i,n as l};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as t,n as e,e as r}from"./solid-element.js";import{x as s}from"./lit-element.js";import{requestInclude as o}from"./request2.js";import{w as i}from"./watch.js";import a from"./include.styles.js";import"./component.styles.js";var c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,n=(t,e,r,s)=>{for(var o,i=s>1?void 0:s?l(e,r):e,a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s?o(e,r,i):o(i))||i);return s&&i&&c(e,r,i),i};let p=class extends t{constructor(){super(...arguments),this.mode="cors",this.allowScripts=!1}executeScript(t){const e=document.createElement("script");[...t.attributes].forEach((t=>e.setAttribute(t.name,t.value))),e.textContent=t.textContent,t.parentNode.replaceChild(e,t)}async handleSrcChange(){try{const t=this.src,e=await o(t,this.mode);if(t!==this.src)return;if(!e.ok)return void this.emit("sd-error",{detail:{status:e.status}});this.innerHTML=e.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach((t=>this.executeScript(t))),this.emit("sd-load")}catch{this.emit("sd-error",{detail:{status:-1}})}}render(){return s`<slot></slot>`}};p.styles=a,n([e()],p.prototype,"src",2),n([e()],p.prototype,"mode",2),n([e({attribute:"allow-scripts",type:Boolean})],p.prototype,"allowScripts",2),n([i("src")],p.prototype,"handleSrcChange",1),p=n([r("sd-1-0-0-include")],p);export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as o}from"./lit-element.js";import{c as s}from"./component.styles.js";const t=o`${s}:host{display:block}`;export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"./library.system.js";let n=[r],t=[];function e(r){t.push(r)}function o(r){t=t.filter((n=>n!==r))}function a(r){return n.find((n=>n.name===r))}function i(r,e){s(r),n.push({name:r,resolver:e.resolver,mutator:e.mutator}),t.forEach((n=>{n.library===r&&n.setIcon()}))}function s(r){n=n.filter((n=>n.name!==r))}export{a as getIconLibrary,i as registerIconLibrary,s as unregisterIconLibrary,o as unwatchIcon,e as watchIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const n={"chevron-down":'\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M20.257 6.333l-8.257 9.173-8.257-9.173c-0.181-0.181-0.431-0.292-0.707-0.292-0.552 0-1 0.448-1 1 0 0.238 0.083 0.456 0.222 0.628l-0.001-0.002 9 10c0.184 0.204 0.449 0.331 0.743 0.331s0.56-0.127 0.743-0.33l0.001-0.001 9-10c0.137-0.17 0.22-0.388 0.22-0.626 0-0.552-0.448-1-1-1-0.276 0-0.526 0.112-0.707 0.293v0z"></path>\n </svg>\n ',"chevron-up":'\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M12.743 6.333c-0.188-0.195-0.452-0.316-0.743-0.316s-0.555 0.121-0.743 0.315l-0 0-9 10c-0.137 0.17-0.22 0.388-0.22 0.626 0 0.552 0.448 1 1 1 0.276 0 0.526-0.112 0.707-0.293v0l8.257-9.173 8.257 9.173c0.181 0.181 0.431 0.292 0.707 0.292 0.552 0 1-0.448 1-1 0-0.238-0.083-0.456-0.222-0.628l0.001 0.002z"></path>\n </svg>\n '},s={name:"system",resolver:s=>s in n?`data:image/svg+xml,${encodeURIComponent(n[s])}`:"",mutator:n=>n.setAttribute("fill","currentColor")};export{s as default,n as icons};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{x as t,i as e}from"./lit-element.js";import{S as s,n as i,e as o}from"./solid-element.js";import{H as r,l,i as n}from"./if-defined.js";import{t as a}from"./classix.js";var h=Object.defineProperty,d=Object.getOwnPropertyDescriptor,f=(t,e,s,i)=>{for(var o,r=i>1?void 0:i?d(e,s):e,l=t.length-1;l>=0;l--)(o=t[l])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&h(e,s,r),r};let c=class extends s{constructor(){super(...arguments),this.hasSlotController=new r(this,"[default]","icon-left","icon-right"),this.size="inherit",this.inverted=!1,this.standalone=!1,this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){const e={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return t`<a part="base" class="${a("inline",this.href?"cursor-pointer":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":" text-primary hover:text-primary-500 active:text-primary-800 focus-visible:focus-outline"}[this.href?"enabled":"disabled"],this.standalone&&"flex items-start")}" href="${l(this.href||void 0)}" target="${l(this.target||void 0)}" download="${l(this.download||void 0)}" rel="${l(this.target?"noreferrer noopener":void 0)}" aria-disabled="${this.href?"false":"true"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"><slot name="icon-left" part="icon-left" class="${a("inline",e["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${a("inline",e["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};c.styles=[s.styles,e`::slotted(sd-1-0-0-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-1-0-0-icon){font-size:1rem}:host([size=lg][standalone]) ::slotted(sd-1-0-0-icon){font-size:1.5rem}`],f([n("a")],c.prototype,"button",2),f([i({reflect:!0})],c.prototype,"size",2),f([i({type:Boolean,reflect:!0})],c.prototype,"inverted",2),f([i({type:Boolean,reflect:!0})],c.prototype,"standalone",2),f([i()],c.prototype,"href",2),f([i()],c.prototype,"target",2),f([i()],c.prototype,"download",2),c=f([o("sd-1-0-0-link")],c);export{c as default};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
const t=window,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),i=new WeakMap;let n=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=i.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&i.set(s,t))}return t}toString(){return this.cssText}};const o=t=>new n("string"==typeof t?t:t+"",void 0,s),r=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1]),t[0]);return new n(i,t,s)},l=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return o(e)})(t):t
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2017 Google LLC
|
|
10
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
+
*/;var h;const a=window,d=a.trustedTypes,c=d?d.emptyScript:"",u=a.reactiveElementPolyfillSupport,p={toAttribute(t,e){switch(e){case Boolean:t=t?c:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch{s=null}}return s}},$=(t,e)=>e!==t&&(e==e||t==t),v={attribute:!0,type:String,converter:p,reflect:!1,hasChanged:$},_="finalized";let A=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,s)=>{const i=this._$Ep(s,e);void 0!==i&&(this._$Ev.set(i,s),t.push(i))})),t}static createProperty(t,e=v){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){const n=this[t];this[e]=i,this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||v}static finalize(){if(this.hasOwnProperty(_))return!1;this[_]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of e)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static _$Ep(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,s;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var s;const i=null!==(s=this.shadowRoot)&&void 0!==s?s:this.attachShadow(this.constructor.shadowRootOptions);return((s,i)=>{e?s.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((e=>{const i=document.createElement("style"),n=t.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,s.appendChild(i)}))})(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=v){var i;const n=this.constructor._$Ep(t,s);if(void 0!==n&&!0===s.reflect){const o=(void 0!==(null===(i=s.converter)||void 0===i?void 0:i.toAttribute)?s.converter:p).toAttribute(e,s.type);this._$El=t,null==o?this.removeAttribute(n):this.setAttribute(n,o),this._$El=null}}_$AK(t,e){var s;const i=this.constructor,n=i._$Ev.get(t);if(void 0!==n&&this._$El!==n){const t=i.getPropertyOptions(n),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:p;this._$El=n,this[n]=o.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,s){let i=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||$)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(s)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};
|
|
12
|
+
/**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright 2017 Google LLC
|
|
15
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
+
*/
|
|
17
|
+
var f;A[_]=!0,A.elementProperties=new Map,A.elementStyles=[],A.shadowRootOptions={mode:"open"},null==u||u({ReactiveElement:A}),(null!==(h=a.reactiveElementVersions)&&void 0!==h?h:a.reactiveElementVersions=[]).push("1.6.2");const y=window,g=y.trustedTypes,m=g?g.createPolicy("lit-html",{createHTML:t=>t}):void 0,E="$lit$",S=`lit$${(Math.random()+"").slice(9)}$`,b="?"+S,C=`<${b}>`,w=document,x=()=>w.createComment(""),U=t=>null===t||"object"!=typeof t&&"function"!=typeof t,P=Array.isArray,H="[ \t\n\f\r]",N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,T=/-->/g,O=/>/g,R=RegExp(`>|${H}(?:([^\\s"'>=/]+)(${H}*=${H}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),M=/'/g,k=/"/g,L=/^(?:script|style|textarea|title)$/i,j=(1,(t,...e)=>({_$litType$:1,strings:t,values:e})),B=Symbol.for("lit-noChange"),z=Symbol.for("lit-nothing"),D=new WeakMap,I=w.createTreeWalker(w,129,null,!1);class V{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const r=t.length-1,l=this.parts,[h,a]=((t,e)=>{const s=t.length-1,i=[];let n,o=2===e?"<svg>":"",r=N;for(let e=0;e<s;e++){const s=t[e];let l,h,a=-1,d=0;for(;d<s.length&&(r.lastIndex=d,h=r.exec(s),null!==h);)d=r.lastIndex,r===N?"!--"===h[1]?r=T:void 0!==h[1]?r=O:void 0!==h[2]?(L.test(h[2])&&(n=RegExp("</"+h[2],"g")),r=R):void 0!==h[3]&&(r=R):r===R?">"===h[0]?(r=n??N,a=-1):void 0===h[1]?a=-2:(a=r.lastIndex-h[2].length,l=h[1],r=void 0===h[3]?R:'"'===h[3]?k:M):r===k||r===M?r=R:r===T||r===O?r=N:(r=R,n=void 0);const c=r===R&&t[e+1].startsWith("/>")?" ":"";o+=r===N?s+C:a>=0?(i.push(l),s.slice(0,a)+E+s.slice(a)+S+c):s+S+(-2===a?(i.push(void 0),e):c)}const l=o+(t[s]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==m?m.createHTML(l):l,i]})(t,e);if(this.el=V.createElement(h,s),I.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=I.nextNode())&&l.length<r;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const e of i.getAttributeNames())if(e.endsWith(E)||e.startsWith(S)){const s=a[o++];if(t.push(e),void 0!==s){const t=i.getAttribute(s.toLowerCase()+E).split(S),e=/([.?@])?(.*)/.exec(s);l.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?Z:"?"===e[1]?G:"@"===e[1]?Q:K})}else l.push({type:6,index:n})}for(const e of t)i.removeAttribute(e)}if(L.test(i.tagName)){const t=i.textContent.split(S),e=t.length-1;if(e>0){i.textContent=g?g.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],x()),I.nextNode(),l.push({type:2,index:++n});i.append(t[e],x())}}}else if(8===i.nodeType)if(i.data===b)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=i.data.indexOf(S,t+1));)l.push({type:7,index:n}),t+=S.length-1}n++}}static createElement(t,e){const s=w.createElement("template");return s.innerHTML=t,s}}function W(t,e,s=t,i){var n,o,r,l;if(e===B)return e;let h=void 0!==i?null===(n=s._$Co)||void 0===n?void 0:n[i]:s._$Cl;const a=U(e)?void 0:e._$litDirective$;return(null==h?void 0:h.constructor)!==a&&(null===(o=null==h?void 0:h._$AO)||void 0===o||o.call(h,!1),void 0===a?h=void 0:(h=new a(t),h._$AT(t,s,i)),void 0!==i?(null!==(r=(l=s)._$Co)&&void 0!==r?r:l._$Co=[])[i]=h:s._$Cl=h),void 0!==h&&(e=W(t,h._$AS(t,e.values),h,i)),e}class q{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:s},parts:i}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:w).importNode(s,!0);I.currentNode=n;let o=I.nextNode(),r=0,l=0,h=i[0];for(;void 0!==h;){if(r===h.index){let e;2===h.type?e=new J(o,o.nextSibling,this,t):1===h.type?e=new h.ctor(o,h.name,h.strings,this,t):6===h.type&&(e=new X(o,this,t)),this._$AV.push(e),h=i[++l]}r!==(null==h?void 0:h.index)&&(o=I.nextNode(),r++)}return I.currentNode=w,n}v(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class J{constructor(t,e,s,i){var n;this.type=2,this._$AH=z,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cp=null===(n=null==i?void 0:i.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=W(this,t,e),U(t)?t===z||null==t||""===t?(this._$AH!==z&&this._$AR(),this._$AH=z):t!==this._$AH&&t!==B&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>P(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==z&&U(this._$AH)?this._$AA.nextSibling.data=t:this.$(w.createTextNode(t)),this._$AH=t}g(t){var e;const{values:s,_$litType$:i}=t,n="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=V.createElement(i.h,this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.v(s);else{const t=new q(n,this),e=t.u(this.options);t.v(s),this.$(e),this._$AH=t}}_$AC(t){let e=D.get(t.strings);return void 0===e&&D.set(t.strings,e=new V(t)),e}T(t){P(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new J(this.k(x()),this.k(x()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class K{constructor(t,e,s,i,n){this.type=1,this._$AH=z,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(void 0===n)t=W(this,t,e,0),o=!U(t)||t!==this._$AH&&t!==B,o&&(this._$AH=t);else{const i=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=W(this,i[s+r],e,r),l===B&&(l=this._$AH[r]),o||(o=!U(l)||l!==this._$AH[r]),l===z?t=z:t!==z&&(t+=(l??"")+n[r+1]),this._$AH[r]=l}o&&!i&&this.j(t)}j(t){t===z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Z extends K{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===z?void 0:t}}const F=g?g.emptyScript:"";class G extends K{constructor(){super(...arguments),this.type=4}j(t){t&&t!==z?this.element.setAttribute(this.name,F):this.element.removeAttribute(this.name)}}class Q extends K{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){var s;if((t=null!==(s=W(this,t,e,0))&&void 0!==s?s:z)===B)return;const i=this._$AH,n=t===z&&i!==z||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==z&&(i===z||n);n&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class X{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){W(this,t)}}const Y=y.litHtmlPolyfillSupport;
|
|
18
|
+
/**
|
|
19
|
+
* @license
|
|
20
|
+
* Copyright 2017 Google LLC
|
|
21
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
+
*/
|
|
23
|
+
var tt,et;null==Y||Y(V,J),(null!==(f=y.litHtmlVersions)&&void 0!==f?f:y.litHtmlVersions=[]).push("2.7.4");class st extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,s)=>{var i,n;const o=null!==(i=null==s?void 0:s.renderBefore)&&void 0!==i?i:e;let r=o._$litPart$;if(void 0===r){const t=null!==(n=null==s?void 0:s.renderBefore)&&void 0!==n?n:null;o._$litPart$=r=new J(e.insertBefore(x(),t),t,void 0,s??{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return B}}st.finalized=!0,st._$litElement$=!0,null===(tt=globalThis.litElementHydrateSupport)||void 0===tt||tt.call(globalThis,{LitElement:st});const it=globalThis.litElementPolyfillSupport;null==it||it({LitElement:st}),(null!==(et=globalThis.litElementVersions)&&void 0!==et?et:globalThis.litElementVersions=[]).push("3.3.2");export{z as A,B as T,r as i,o as r,st as s,j as x};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{requestInclude as t}from"./request2.js";const e=new Map;async function s(s){if(e.has(s))return e.get(s);const n=await t(s),o={ok:n.ok,status:n.status,svg:null};if(n.ok){const t=document.createElement("div");t.innerHTML=n.html;const e=t.firstElementChild;o.svg="svg"===(null==e?void 0:e.tagName.toLowerCase())?e.outerHTML:""}return e.set(s,o),o}export{s as requestIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=new Map;function e(e,s="cors"){if(t.has(e))return t.get(e);const n=fetch(e,{mode:s}).then((async t=>({ok:t.ok,status:t.status,html:await t.text()})));return t.set(e,n),n}export{e as requestInclude};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const s=Object.assign({"./components/button/button.ts":()=>import("./button.js"),"./components/icon/icon.ts":()=>import("./icon.js"),"./components/icon/library.system.ts":()=>import("./library.system.js"),"./components/icon/library.ts":()=>import("./library.js"),"./components/icon/request.ts":()=>import("./request.js"),"./components/include/include.styles.ts":()=>import("./include.styles.js"),"./components/include/include.ts":()=>import("./include.js"),"./components/include/request.ts":()=>import("./request2.js"),"./components/link/link.ts":()=>import("./link.js"),"./components/spinner/spinner.ts":()=>import("./spinner.js")});Object.keys(s).forEach((n=>{s[n]()}));
|