@synergy-design-system/components 1.0.0-main.3 → 1.0.0-main.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/chunk.54FCEBNA.js +63 -0
- package/dist/chunks/chunk.54FCEBNA.js.map +7 -0
- package/dist/chunks/chunk.5OIEI73E.js +45 -0
- package/dist/chunks/chunk.5OIEI73E.js.map +7 -0
- package/dist/chunks/chunk.6C4JXZZN.js +15 -0
- package/dist/chunks/chunk.6C4JXZZN.js.map +7 -0
- package/dist/chunks/chunk.A3SKDWCT.js +42 -0
- package/dist/chunks/chunk.A3SKDWCT.js.map +7 -0
- package/dist/chunks/chunk.AWMJNMQS.js +12 -0
- package/dist/chunks/chunk.AWMJNMQS.js.map +7 -0
- package/dist/chunks/chunk.BREU4ILT.js +28 -0
- package/dist/chunks/chunk.BREU4ILT.js.map +7 -0
- package/dist/chunks/chunk.C7624ITA.js +30 -0
- package/dist/chunks/chunk.C7624ITA.js.map +7 -0
- package/dist/chunks/chunk.CV726VL5.js +498 -0
- package/dist/chunks/chunk.CV726VL5.js.map +7 -0
- package/dist/chunks/chunk.DJOAQ4JU.js +36 -0
- package/dist/chunks/chunk.DJOAQ4JU.js.map +7 -0
- package/dist/chunks/chunk.DREO4ZTN.js +10 -0
- package/dist/chunks/chunk.DREO4ZTN.js.map +7 -0
- package/dist/chunks/chunk.GK7WWJOJ.js +12 -0
- package/dist/chunks/chunk.GK7WWJOJ.js.map +7 -0
- package/dist/chunks/chunk.HRC6YF27.js +32 -0
- package/dist/chunks/chunk.HRC6YF27.js.map +7 -0
- package/dist/chunks/chunk.ILONRPL4.js +10 -0
- package/dist/chunks/chunk.ILONRPL4.js.map +7 -0
- package/dist/chunks/chunk.N2I6HVX3.js +71 -0
- package/dist/chunks/chunk.N2I6HVX3.js.map +7 -0
- package/dist/chunks/chunk.O7USYXBT.js +23 -0
- package/dist/chunks/chunk.O7USYXBT.js.map +7 -0
- package/dist/chunks/chunk.P22LQI5J.js +376 -0
- package/dist/chunks/chunk.P22LQI5J.js.map +7 -0
- package/dist/chunks/chunk.P44HUIHR.js +278 -0
- package/dist/chunks/chunk.P44HUIHR.js.map +7 -0
- package/dist/chunks/chunk.Q77OTWF2.js +378 -0
- package/dist/chunks/chunk.Q77OTWF2.js.map +7 -0
- package/dist/chunks/chunk.R6VNLE6N.js +11 -0
- package/dist/chunks/chunk.R6VNLE6N.js.map +7 -0
- package/dist/chunks/chunk.U7ZJ22QM.js +128 -0
- package/dist/chunks/chunk.U7ZJ22QM.js.map +7 -0
- package/dist/chunks/chunk.WDCAHRYG.js +273 -0
- package/dist/chunks/chunk.WDCAHRYG.js.map +7 -0
- package/dist/chunks/chunk.WTCUSH7V.js +42 -0
- package/dist/chunks/chunk.WTCUSH7V.js.map +7 -0
- package/dist/chunks/chunk.XGXFE6IF.js +49 -0
- package/dist/chunks/chunk.XGXFE6IF.js.map +7 -0
- package/dist/chunks/chunk.ZC2SKYJO.js +202 -0
- package/dist/chunks/chunk.ZC2SKYJO.js.map +7 -0
- package/dist/components/button/button.component.d.ts +123 -0
- package/dist/components/button/button.component.js +24 -0
- package/dist/components/button/button.component.js.map +7 -0
- package/dist/components/button/button.custom.styles.d.ts +2 -0
- package/dist/components/button/button.custom.styles.js +8 -0
- package/dist/components/button/button.custom.styles.js.map +7 -0
- package/dist/components/button/button.d.ts +8 -0
- package/dist/components/button/button.js +25 -0
- package/dist/components/button/button.js.map +7 -0
- package/dist/components/button/button.styles.d.ts +2 -0
- package/dist/components/button/button.styles.js +10 -0
- package/dist/components/button/button.styles.js.map +7 -0
- package/dist/components/checkbox/checkbox.custom.styles.d.ts +2 -0
- package/dist/components/checkbox/checkbox.custom.styles.js +11 -0
- package/dist/components/checkbox/checkbox.custom.styles.js.map +7 -0
- package/dist/components/icon/icon.component.d.ts +42 -0
- package/dist/components/icon/icon.component.js +15 -0
- package/dist/components/icon/icon.component.js.map +7 -0
- package/dist/components/icon/icon.d.ts +8 -0
- package/dist/components/icon/icon.js +19 -0
- package/dist/components/icon/icon.js.map +7 -0
- package/dist/components/icon/icon.styles.d.ts +2 -0
- package/dist/components/icon/icon.styles.js +9 -0
- package/dist/components/icon/icon.styles.js.map +7 -0
- package/dist/components/icon/library.d.ts +19 -0
- package/dist/components/icon/library.default.d.ts +3 -0
- package/dist/components/icon/library.default.js +9 -0
- package/dist/components/icon/library.default.js.map +7 -0
- package/dist/components/icon/library.js +19 -0
- package/dist/components/icon/library.js.map +7 -0
- package/dist/components/icon/library.system.d.ts +3 -0
- package/dist/components/icon/library.system.js +8 -0
- package/dist/components/icon/library.system.js.map +7 -0
- package/dist/components/input/input.component.d.ts +175 -0
- package/dist/components/input/input.component.js +22 -0
- package/dist/components/input/input.component.js.map +7 -0
- package/dist/components/input/input.custom.styles.d.ts +2 -0
- package/dist/components/input/input.custom.styles.js +8 -0
- package/dist/components/input/input.custom.styles.js.map +7 -0
- package/dist/components/input/input.d.ts +8 -0
- package/dist/components/input/input.js +23 -0
- package/dist/components/input/input.js.map +7 -0
- package/dist/components/input/input.styles.d.ts +2 -0
- package/dist/components/input/input.styles.js +10 -0
- package/dist/components/input/input.styles.js.map +7 -0
- package/dist/components/spinner/spinner.component.d.ts +20 -0
- package/dist/components/spinner/spinner.component.js +13 -0
- package/dist/components/spinner/spinner.component.js.map +7 -0
- package/dist/components/spinner/spinner.styles.d.ts +2 -0
- package/dist/components/spinner/spinner.styles.js +9 -0
- package/dist/components/spinner/spinner.styles.js.map +7 -0
- package/dist/components/textarea/textarea.custom.styles.d.ts +2 -0
- package/dist/components/textarea/textarea.custom.styles.js +11 -0
- package/dist/components/textarea/textarea.custom.styles.js.map +7 -0
- package/dist/custom-elements.json +1870 -0
- package/dist/events/events.d.ts +8 -0
- package/dist/events/syn-blur.d.ts +6 -0
- package/dist/events/syn-change.d.ts +6 -0
- package/dist/events/syn-clear.d.ts +6 -0
- package/dist/events/syn-error.d.ts +8 -0
- package/dist/events/syn-focus.d.ts +6 -0
- package/dist/events/syn-input.d.ts +6 -0
- package/dist/events/syn-invalid.d.ts +6 -0
- package/dist/events/syn-load.d.ts +6 -0
- package/dist/internal/default-value.d.ts +2 -0
- package/dist/internal/form.d.ts +73 -0
- package/dist/internal/slot.d.ts +23 -0
- package/dist/internal/synergy-element.d.ts +47 -0
- package/dist/internal/test/form-control-base-tests.d.ts +7 -0
- package/dist/internal/watch.d.ts +26 -0
- package/dist/styles/component.styles.d.ts +2 -0
- package/dist/styles/form-control.styles.d.ts +2 -0
- package/dist/synergy-autoloader.d.ts +4 -0
- package/dist/synergy-autoloader.js +41 -0
- package/dist/synergy-autoloader.js.map +7 -0
- package/dist/synergy.d.ts +4 -0
- package/dist/synergy.js +38 -0
- package/dist/synergy.js.map +7 -0
- package/dist/translations/de.d.ts +3 -0
- package/dist/translations/de.js +46 -0
- package/dist/translations/de.js.map +7 -0
- package/dist/translations/en.d.ts +3 -0
- package/dist/translations/en.js +8 -0
- package/dist/translations/en.js.map +7 -0
- package/dist/utilities/base-path.d.ts +18 -0
- package/dist/utilities/base-path.js +10 -0
- package/dist/utilities/base-path.js.map +7 -0
- package/dist/utilities/form.d.ts +11 -0
- package/dist/utilities/form.js +11 -0
- package/dist/utilities/form.js.map +7 -0
- package/dist/utilities/localize.d.ts +33 -0
- package/dist/utilities/localize.js +11 -0
- package/dist/utilities/localize.js.map +7 -0
- package/dist/vscode.html-custom-data.json +371 -0
- package/dist/web-types.json +738 -0
- package/package.json +6 -7
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__decorateClass,
|
|
3
|
+
__spreadValues
|
|
4
|
+
} from "./chunk.DJOAQ4JU.js";
|
|
5
|
+
|
|
6
|
+
// src/internal/synergy-element.ts
|
|
7
|
+
import { LitElement } from "lit";
|
|
8
|
+
import { property } from "lit/decorators.js";
|
|
9
|
+
var SynergyElement = class extends LitElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
Object.entries(this.constructor.dependencies).forEach(([name, component]) => {
|
|
13
|
+
this.constructor.define(name, component);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
emit(name, options) {
|
|
17
|
+
const event = new CustomEvent(name, __spreadValues({
|
|
18
|
+
bubbles: true,
|
|
19
|
+
cancelable: false,
|
|
20
|
+
composed: true,
|
|
21
|
+
detail: {}
|
|
22
|
+
}, options));
|
|
23
|
+
this.dispatchEvent(event);
|
|
24
|
+
return event;
|
|
25
|
+
}
|
|
26
|
+
static define(name, elementConstructor = this, options = {}) {
|
|
27
|
+
const currentlyRegisteredConstructor = customElements.get(name);
|
|
28
|
+
if (!currentlyRegisteredConstructor) {
|
|
29
|
+
customElements.define(name, class extends elementConstructor {
|
|
30
|
+
}, options);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
let newVersion = " (unknown version)";
|
|
34
|
+
let existingVersion = newVersion;
|
|
35
|
+
if ("version" in elementConstructor && elementConstructor.version) {
|
|
36
|
+
newVersion = " v" + elementConstructor.version;
|
|
37
|
+
}
|
|
38
|
+
if ("version" in currentlyRegisteredConstructor && currentlyRegisteredConstructor.version) {
|
|
39
|
+
existingVersion = " v" + currentlyRegisteredConstructor.version;
|
|
40
|
+
}
|
|
41
|
+
if (newVersion && existingVersion && newVersion === existingVersion) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
console.warn(
|
|
45
|
+
`Attempted to register <${name}>${newVersion}, but <${name}>${existingVersion} has already been registered.`
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
/* eslint-disable */
|
|
50
|
+
// @ts-expect-error This is auto-injected at build time.
|
|
51
|
+
SynergyElement.version = "1.0.0-main.5";
|
|
52
|
+
SynergyElement.dependencies = {};
|
|
53
|
+
__decorateClass([
|
|
54
|
+
property()
|
|
55
|
+
], SynergyElement.prototype, "dir", 2);
|
|
56
|
+
__decorateClass([
|
|
57
|
+
property()
|
|
58
|
+
], SynergyElement.prototype, "lang", 2);
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
SynergyElement
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=chunk.54FCEBNA.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/internal/synergy-element.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\n\n// Match event type name strings that are registered on GlobalEventHandlersEventMap...\ntype EventTypeRequiresDetail<T> = T extends keyof GlobalEventHandlersEventMap\n ? // ...where the event detail is an object...\n GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, unknown>>\n ? // ...that is non-empty...\n GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, never>>\n ? never\n : // ...and has at least one non-optional property\n Partial<GlobalEventHandlersEventMap[T]['detail']> extends GlobalEventHandlersEventMap[T]['detail']\n ? never\n : T\n : never\n : never;\n\n// The inverse of the above (match any type that doesn't match EventTypeRequiresDetail)\ntype EventTypeDoesNotRequireDetail<T> = T extends keyof GlobalEventHandlersEventMap\n ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, unknown>>\n ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, never>>\n ? T\n : Partial<GlobalEventHandlersEventMap[T]['detail']> extends GlobalEventHandlersEventMap[T]['detail']\n ? T\n : never\n : T\n : T;\n\n// `keyof EventTypesWithRequiredDetail` lists all registered event types that require detail\ntype EventTypesWithRequiredDetail = {\n [EventType in keyof GlobalEventHandlersEventMap as EventTypeRequiresDetail<EventType>]: true;\n};\n\n// `keyof EventTypesWithoutRequiredDetail` lists all registered event types that do NOT require detail\ntype EventTypesWithoutRequiredDetail = {\n [EventType in keyof GlobalEventHandlersEventMap as EventTypeDoesNotRequireDetail<EventType>]: true;\n};\n\n// Helper to make a specific property of an object non-optional\ntype WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };\n\n// Given an event name string, get a valid type for the options to initialize the event that is more restrictive than\n// just CustomEventInit when appropriate (validate the type of the event detail, and require it to be provided if the\n// event requires it)\ntype SynEventInit<T> = T extends keyof GlobalEventHandlersEventMap\n ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, unknown>>\n ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, never>>\n ? CustomEventInit<GlobalEventHandlersEventMap[T]['detail']>\n : Partial<GlobalEventHandlersEventMap[T]['detail']> extends GlobalEventHandlersEventMap[T]['detail']\n ? CustomEventInit<GlobalEventHandlersEventMap[T]['detail']>\n : WithRequired<CustomEventInit<GlobalEventHandlersEventMap[T]['detail']>, 'detail'>\n : CustomEventInit\n : CustomEventInit;\n\n// Given an event name string, get the type of the event\ntype GetCustomEventType<T> = T extends keyof GlobalEventHandlersEventMap\n ? GlobalEventHandlersEventMap[T] extends CustomEvent<unknown>\n ? GlobalEventHandlersEventMap[T]\n : CustomEvent<unknown>\n : CustomEvent<unknown>;\n\n// `keyof ValidEventTypeMap` is equivalent to `keyof GlobalEventHandlersEventMap` but gives a nicer error message\ntype ValidEventTypeMap = EventTypesWithRequiredDetail | EventTypesWithoutRequiredDetail;\n\nexport default class SynergyElement extends LitElement {\n // Make localization attributes reactive\n @property() dir: string;\n @property() lang: string;\n\n /** Emits a custom event with more convenient defaults. */\n emit<T extends string & keyof EventTypesWithoutRequiredDetail>(\n name: EventTypeDoesNotRequireDetail<T>,\n options?: SynEventInit<T> | undefined\n ): GetCustomEventType<T>;\n emit<T extends string & keyof EventTypesWithRequiredDetail>(\n name: EventTypeRequiresDetail<T>,\n options: SynEventInit<T>\n ): GetCustomEventType<T>;\n emit<T extends string & keyof ValidEventTypeMap>(\n name: T,\n options?: SynEventInit<T> | undefined\n ): GetCustomEventType<T> {\n const event = new CustomEvent(name, {\n bubbles: true,\n cancelable: false,\n composed: true,\n detail: {},\n ...options\n });\n\n this.dispatchEvent(event);\n\n return event as GetCustomEventType<T>;\n }\n\n /* eslint-disable */\n // @ts-expect-error This is auto-injected at build time.\n static version = \"1.0.0-main.5\";\n \n\n static define(name: string, elementConstructor = this, options: ElementDefinitionOptions = {}) {\n const currentlyRegisteredConstructor = customElements.get(name) as\n | CustomElementConstructor\n | typeof SynergyElement;\n\n if (!currentlyRegisteredConstructor) {\n customElements.define(name, class extends elementConstructor {} as unknown as CustomElementConstructor, options);\n return;\n }\n\n let newVersion = ' (unknown version)';\n let existingVersion = newVersion;\n\n if ('version' in elementConstructor && elementConstructor.version) {\n newVersion = ' v' + elementConstructor.version;\n }\n\n if ('version' in currentlyRegisteredConstructor && currentlyRegisteredConstructor.version) {\n existingVersion = ' v' + currentlyRegisteredConstructor.version;\n }\n\n // Need to make sure we're not working with null or empty strings before doing version comparisons.\n if (newVersion && existingVersion && newVersion === existingVersion) {\n // If versions match, we don't need to warn anyone. Carry on.\n return;\n }\n\n console.warn(\n `Attempted to register <${name}>${newVersion}, but <${name}>${existingVersion} has already been registered.`\n );\n }\n\n static dependencies: Record<string, typeof SynergyElement> = {};\n\n constructor() {\n super();\n Object.entries((this.constructor as typeof SynergyElement).dependencies).forEach(([name, component]) => {\n (this.constructor as typeof SynergyElement).define(name, component);\n });\n }\n}\n\nexport interface SynergyFormControl extends SynergyElement {\n // Form attributes\n name: string;\n value: unknown;\n disabled?: boolean;\n defaultValue?: unknown;\n defaultChecked?: boolean;\n form?: string;\n\n // Constraint validation attributes\n pattern?: string;\n min?: number | string | Date;\n max?: number | string | Date;\n step?: number | 'any';\n required?: boolean;\n minlength?: number;\n maxlength?: number;\n\n // Form validation properties\n readonly validity: ValidityState;\n readonly validationMessage: string;\n\n // Form validation methods\n checkValidity: () => boolean;\n getForm: () => HTMLFormElement | null;\n reportValidity: () => boolean;\n setCustomValidity: (message: string) => void;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;AAMA,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AA+DzB,IAAqB,iBAArB,cAA4C,WAAW;AAAA,EAsErD,cAAc;AACZ,UAAM;AACN,WAAO,QAAS,KAAK,YAAsC,YAAY,EAAE,QAAQ,CAAC,CAAC,MAAM,SAAS,MAAM;AACtG,MAAC,KAAK,YAAsC,OAAO,MAAM,SAAS;AAAA,IACpE,CAAC;AAAA,EACH;AAAA,EA7DA,KACE,MACA,SACuB;AACvB,UAAM,QAAQ,IAAI,YAAY,MAAM;AAAA,MAClC,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,QAAQ,CAAC;AAAA,OACN,QACJ;AAED,SAAK,cAAc,KAAK;AAExB,WAAO;AAAA,EACT;AAAA,EAOA,OAAO,OAAO,MAAc,qBAAqB,MAAM,UAAoC,CAAC,GAAG;AAC7F,UAAM,iCAAiC,eAAe,IAAI,IAAI;AAI9D,QAAI,CAAC,gCAAgC;AACnC,qBAAe,OAAO,MAAM,cAAc,mBAAmB;AAAA,MAAC,GAA0C,OAAO;AAC/G;AAAA,IACF;AAEA,QAAI,aAAa;AACjB,QAAI,kBAAkB;AAEtB,QAAI,aAAa,sBAAsB,mBAAmB,SAAS;AACjE,mBAAa,OAAO,mBAAmB;AAAA,IACzC;AAEA,QAAI,aAAa,kCAAkC,+BAA+B,SAAS;AACzF,wBAAkB,OAAO,+BAA+B;AAAA,IAC1D;AAGA,QAAI,cAAc,mBAAmB,eAAe,iBAAiB;AAEnE;AAAA,IACF;AAEA,YAAQ;AAAA,MACN,0BAA0B,IAAI,IAAI,UAAU,UAAU,IAAI,IAAI,eAAe;AAAA,IAC/E;AAAA,EACF;AAUF;AAAA;AAAA;AA5EqB,eAiCZ,UAAU;AAjCE,eAoEZ,eAAsD,CAAC;AAlElD;AAAA,EAAX,SAAS;AAAA,GAFS,eAEP;AACA;AAAA,EAAX,SAAS;AAAA,GAHS,eAGP;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {
|
|
2
|
+
library_default_default
|
|
3
|
+
} from "./chunk.6C4JXZZN.js";
|
|
4
|
+
import {
|
|
5
|
+
library_system_default
|
|
6
|
+
} from "./chunk.U7ZJ22QM.js";
|
|
7
|
+
|
|
8
|
+
// src/components/icon/library.ts
|
|
9
|
+
var registry = [library_default_default, library_system_default];
|
|
10
|
+
var watchedIcons = [];
|
|
11
|
+
function watchIcon(icon) {
|
|
12
|
+
watchedIcons.push(icon);
|
|
13
|
+
}
|
|
14
|
+
function unwatchIcon(icon) {
|
|
15
|
+
watchedIcons = watchedIcons.filter((el) => el !== icon);
|
|
16
|
+
}
|
|
17
|
+
function getIconLibrary(name) {
|
|
18
|
+
return registry.find((lib) => lib.name === name);
|
|
19
|
+
}
|
|
20
|
+
function registerIconLibrary(name, options) {
|
|
21
|
+
unregisterIconLibrary(name);
|
|
22
|
+
registry.push({
|
|
23
|
+
name,
|
|
24
|
+
resolver: options.resolver,
|
|
25
|
+
mutator: options.mutator,
|
|
26
|
+
spriteSheet: options.spriteSheet
|
|
27
|
+
});
|
|
28
|
+
watchedIcons.forEach((icon) => {
|
|
29
|
+
if (icon.library === name) {
|
|
30
|
+
icon.setIcon();
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function unregisterIconLibrary(name) {
|
|
35
|
+
registry = registry.filter((lib) => lib.name !== name);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
watchIcon,
|
|
40
|
+
unwatchIcon,
|
|
41
|
+
getIconLibrary,
|
|
42
|
+
registerIconLibrary,
|
|
43
|
+
unregisterIconLibrary
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=chunk.5OIEI73E.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/icon/library.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport defaultLibrary from './library.default.js';\nimport systemLibrary from './library.system.js';\nimport type SynIcon from '../icon/icon.js';\n\nexport type IconLibraryResolver = (name: string) => string;\nexport type IconLibraryMutator = (svg: SVGElement) => void;\nexport interface IconLibrary {\n name: string;\n resolver: IconLibraryResolver;\n mutator?: IconLibraryMutator;\n spriteSheet?: boolean;\n}\n\nlet registry: IconLibrary[] = [defaultLibrary, systemLibrary];\nlet watchedIcons: SynIcon[] = [];\n\n/** Adds an icon to the list of watched icons. */\nexport function watchIcon(icon: SynIcon) {\n watchedIcons.push(icon);\n}\n\n/** Removes an icon from the list of watched icons. */\nexport function unwatchIcon(icon: SynIcon) {\n watchedIcons = watchedIcons.filter(el => el !== icon);\n}\n\n/** Returns a library from the registry. */\nexport function getIconLibrary(name?: string) {\n return registry.find(lib => lib.name === name);\n}\n\n/** Adds an icon library to the registry, or overrides an existing one. */\nexport function registerIconLibrary(name: string, options: Omit<IconLibrary, 'name'>) {\n unregisterIconLibrary(name);\n registry.push({\n name,\n resolver: options.resolver,\n mutator: options.mutator,\n spriteSheet: options.spriteSheet\n });\n\n // Redraw watched icons\n watchedIcons.forEach(icon => {\n if (icon.library === name) {\n icon.setIcon();\n }\n });\n}\n\n/** Removes an icon library from the registry. */\nexport function unregisterIconLibrary(name: string) {\n registry = registry.filter(lib => lib.name !== name);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAmBA,IAAI,WAA0B,CAAC,yBAAgB,sBAAa;AAC5D,IAAI,eAA0B,CAAC;AAGxB,SAAS,UAAU,MAAe;AACvC,eAAa,KAAK,IAAI;AACxB;AAGO,SAAS,YAAY,MAAe;AACzC,iBAAe,aAAa,OAAO,QAAM,OAAO,IAAI;AACtD;AAGO,SAAS,eAAe,MAAe;AAC5C,SAAO,SAAS,KAAK,SAAO,IAAI,SAAS,IAAI;AAC/C;AAGO,SAAS,oBAAoB,MAAc,SAAoC;AACpF,wBAAsB,IAAI;AAC1B,WAAS,KAAK;AAAA,IACZ;AAAA,IACA,UAAU,QAAQ;AAAA,IAClB,SAAS,QAAQ;AAAA,IACjB,aAAa,QAAQ;AAAA,EACvB,CAAC;AAGD,eAAa,QAAQ,UAAQ;AAC3B,QAAI,KAAK,YAAY,MAAM;AACzB,WAAK,QAAQ;AAAA,IACf;AAAA,EACF,CAAC;AACH;AAGO,SAAS,sBAAsB,MAAc;AAClD,aAAW,SAAS,OAAO,SAAO,IAAI,SAAS,IAAI;AACrD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getBasePath
|
|
3
|
+
} from "./chunk.C7624ITA.js";
|
|
4
|
+
|
|
5
|
+
// src/components/icon/library.default.ts
|
|
6
|
+
var library = {
|
|
7
|
+
name: "default",
|
|
8
|
+
resolver: (name) => getBasePath(`assets/icons/${name}.svg`)
|
|
9
|
+
};
|
|
10
|
+
var library_default_default = library;
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
library_default_default
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=chunk.6C4JXZZN.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/icon/library.default.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { getBasePath } from '../../utilities/base-path.js';\nimport type { IconLibrary } from './library.js';\n\nconst library: IconLibrary = {\n name: 'default',\n resolver: name => getBasePath(`assets/icons/${name}.svg`)\n};\n\nexport default library;\n"],
|
|
5
|
+
"mappings": ";;;;;AASA,IAAM,UAAuB;AAAA,EAC3B,MAAM;AAAA,EACN,UAAU,UAAQ,YAAY,gBAAgB,IAAI,MAAM;AAC1D;AAEA,IAAO,0BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// src/translations/en.ts
|
|
2
|
+
import { registerTranslation } from "@shoelace-style/localize";
|
|
3
|
+
var translation = {
|
|
4
|
+
$code: "en",
|
|
5
|
+
$name: "English",
|
|
6
|
+
$dir: "ltr",
|
|
7
|
+
carousel: "Carousel",
|
|
8
|
+
clearEntry: "Clear entry",
|
|
9
|
+
close: "Close",
|
|
10
|
+
copied: "Copied",
|
|
11
|
+
copy: "Copy",
|
|
12
|
+
currentValue: "Current value",
|
|
13
|
+
error: "Error",
|
|
14
|
+
goToSlide: (slide, count) => `Go to slide ${slide} of ${count}`,
|
|
15
|
+
hidePassword: "Hide password",
|
|
16
|
+
loading: "Loading",
|
|
17
|
+
nextSlide: "Next slide",
|
|
18
|
+
numOptionsSelected: (num) => {
|
|
19
|
+
if (num === 0)
|
|
20
|
+
return "No options selected";
|
|
21
|
+
if (num === 1)
|
|
22
|
+
return "1 option selected";
|
|
23
|
+
return `${num} options selected`;
|
|
24
|
+
},
|
|
25
|
+
previousSlide: "Previous slide",
|
|
26
|
+
progress: "Progress",
|
|
27
|
+
remove: "Remove",
|
|
28
|
+
resize: "Resize",
|
|
29
|
+
scrollToEnd: "Scroll to end",
|
|
30
|
+
scrollToStart: "Scroll to start",
|
|
31
|
+
selectAColorFromTheScreen: "Select a color from the screen",
|
|
32
|
+
showPassword: "Show password",
|
|
33
|
+
slideNum: (slide) => `Slide ${slide}`,
|
|
34
|
+
toggleColorFormat: "Toggle color format"
|
|
35
|
+
};
|
|
36
|
+
registerTranslation(translation);
|
|
37
|
+
var en_default = translation;
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
en_default
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=chunk.A3SKDWCT.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/translations/en.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { registerTranslation } from '@shoelace-style/localize';\nimport type { Translation } from '../utilities/localize.js';\n\nconst translation: Translation = {\n $code: 'en',\n $name: 'English',\n $dir: 'ltr',\n\n carousel: 'Carousel',\n clearEntry: 'Clear entry',\n close: 'Close',\n copied: 'Copied',\n copy: 'Copy',\n currentValue: 'Current value',\n error: 'Error',\n goToSlide: (slide, count) => `Go to slide ${slide} of ${count}`,\n hidePassword: 'Hide password',\n loading: 'Loading',\n nextSlide: 'Next slide',\n numOptionsSelected: num => {\n if (num === 0) return 'No options selected';\n if (num === 1) return '1 option selected';\n return `${num} options selected`;\n },\n previousSlide: 'Previous slide',\n progress: 'Progress',\n remove: 'Remove',\n resize: 'Resize',\n scrollToEnd: 'Scroll to end',\n scrollToStart: 'Scroll to start',\n selectAColorFromTheScreen: 'Select a color from the screen',\n showPassword: 'Show password',\n slideNum: slide => `Slide ${slide}`,\n toggleColorFormat: 'Toggle color format'\n};\n\nregisterTranslation(translation);\n\nexport default translation;\n"],
|
|
5
|
+
"mappings": ";AAMA,SAAS,2BAA2B;AAGpC,IAAM,cAA2B;AAAA,EAC/B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM;AAAA,EAEN,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,cAAc;AAAA,EACd,OAAO;AAAA,EACP,WAAW,CAAC,OAAO,UAAU,eAAe,KAAK,OAAO,KAAK;AAAA,EAC7D,cAAc;AAAA,EACd,SAAS;AAAA,EACT,WAAW;AAAA,EACX,oBAAoB,SAAO;AACzB,QAAI,QAAQ;AAAG,aAAO;AACtB,QAAI,QAAQ;AAAG,aAAO;AACtB,WAAO,GAAG,GAAG;AAAA,EACf;AAAA,EACA,eAAe;AAAA,EACf,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,eAAe;AAAA,EACf,2BAA2B;AAAA,EAC3B,cAAc;AAAA,EACd,UAAU,WAAS,SAAS,KAAK;AAAA,EACjC,mBAAmB;AACrB;AAEA,oBAAoB,WAAW;AAE/B,IAAO,aAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/button/button.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport SynButton from './button.component.js';\n\nexport * from './button.component.js';\nexport default SynButton;\n\nSynButton.define('syn-button');\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'syn-button': SynButton;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AASA,IAAO,iBAAQ;AAEf,UAAU,OAAO,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
component_styles_default
|
|
3
|
+
} from "./chunk.O7USYXBT.js";
|
|
4
|
+
|
|
5
|
+
// src/components/icon/icon.styles.ts
|
|
6
|
+
import { css } from "lit";
|
|
7
|
+
var icon_styles_default = css`
|
|
8
|
+
/* stylelint-disable */
|
|
9
|
+
${component_styles_default}
|
|
10
|
+
|
|
11
|
+
:host {
|
|
12
|
+
display: inline-block;
|
|
13
|
+
width: 1em;
|
|
14
|
+
height: 1em;
|
|
15
|
+
box-sizing: content-box !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
svg {
|
|
19
|
+
display: block;
|
|
20
|
+
height: 100%;
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
icon_styles_default
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=chunk.BREU4ILT.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/icon/icon.styles.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { css } from 'lit';\nimport componentStyles from '../../styles/component.styles.js';\n\nexport default css`\n\t/* stylelint-disable */\n ${componentStyles}\n\n :host {\n display: inline-block;\n width: 1em;\n height: 1em;\n box-sizing: content-box !important;\n }\n\n svg {\n display: block;\n height: 100%;\n width: 100%;\n }\n`;\n"],
|
|
5
|
+
"mappings": ";;;;;AAMA,SAAS,WAAW;AAGpB,IAAO,sBAAQ;AAAA;AAAA,IAEX,wBAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// src/utilities/base-path.ts
|
|
2
|
+
var basePath = "";
|
|
3
|
+
function setBasePath(path) {
|
|
4
|
+
basePath = path;
|
|
5
|
+
}
|
|
6
|
+
function getBasePath(subpath = "") {
|
|
7
|
+
if (!basePath) {
|
|
8
|
+
const scripts = [...document.getElementsByTagName("script")];
|
|
9
|
+
const configScript = scripts.find((script) => script.hasAttribute("data-synergy"));
|
|
10
|
+
if (configScript) {
|
|
11
|
+
setBasePath(configScript.getAttribute("data-synergy"));
|
|
12
|
+
} else {
|
|
13
|
+
const fallbackScript = scripts.find((s) => {
|
|
14
|
+
return /synergy(\.min)?\.js($|\?)/.test(s.src) || /synergy-autoloader(\.min)?\.js($|\?)/.test(s.src);
|
|
15
|
+
});
|
|
16
|
+
let path = "";
|
|
17
|
+
if (fallbackScript) {
|
|
18
|
+
path = fallbackScript.getAttribute("src");
|
|
19
|
+
}
|
|
20
|
+
setBasePath(path.split("/").slice(0, -1).join("/"));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return basePath.replace(/\/$/, "") + (subpath ? `/${subpath.replace(/^\//, "")}` : ``);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
setBasePath,
|
|
28
|
+
getBasePath
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=chunk.C7624ITA.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utilities/base-path.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nlet basePath = '';\n\n/** Sets the library's base path to the specified directory. */\nexport function setBasePath(path: string) {\n basePath = path;\n}\n\n/**\n * Gets the library's base path.\n *\n * The base path is used to load assets such as icons and images, so it needs to be set for components to work properly.\n * By default, this script will look for a script ending in synergy.js or synergy-autoloader.js and set the base path\n * to the directory that contains that file. To override this behavior, you can add the data-synergy attribute to any\n * script on the page (it probably makes the most sense to attach it to the Synergy script, but it could also be on a\n * bundle). The value can be a local folder or it can point to a CORS-enabled endpoint such as a CDN.\n *\n * <script src=\"bundle.js\" data-synergy=\"/custom/base/path\"></script>\n *\n * Alternatively, you can set the base path manually using the exported setBasePath() function.\n *\n * @param subpath - An optional path to append to the base path.\n */\nexport function getBasePath(subpath = '') {\n if (!basePath) {\n const scripts = [...document.getElementsByTagName('script')] as HTMLScriptElement[];\n const configScript = scripts.find(script => script.hasAttribute('data-synergy'));\n\n if (configScript) {\n // Use the data-synergy attribute\n setBasePath(configScript.getAttribute('data-synergy')!);\n } else {\n const fallbackScript = scripts.find(s => {\n return /synergy(\\.min)?\\.js($|\\?)/.test(s.src) || /synergy-autoloader(\\.min)?\\.js($|\\?)/.test(s.src);\n });\n let path = '';\n\n if (fallbackScript) {\n path = fallbackScript.getAttribute('src')!;\n }\n\n setBasePath(path.split('/').slice(0, -1).join('/'));\n }\n }\n\n // Return the base path without a trailing slash. If one exists, append the subpath separated by a slash.\n return basePath.replace(/\\/$/, '') + (subpath ? `/${subpath.replace(/^\\//, '')}` : ``);\n}\n"],
|
|
5
|
+
"mappings": ";AAMA,IAAI,WAAW;AAGR,SAAS,YAAY,MAAc;AACxC,aAAW;AACb;AAiBO,SAAS,YAAY,UAAU,IAAI;AACxC,MAAI,CAAC,UAAU;AACb,UAAM,UAAU,CAAC,GAAG,SAAS,qBAAqB,QAAQ,CAAC;AAC3D,UAAM,eAAe,QAAQ,KAAK,YAAU,OAAO,aAAa,cAAc,CAAC;AAE/E,QAAI,cAAc;AAEhB,kBAAY,aAAa,aAAa,cAAc,CAAE;AAAA,IACxD,OAAO;AACL,YAAM,iBAAiB,QAAQ,KAAK,OAAK;AACvC,eAAO,4BAA4B,KAAK,EAAE,GAAG,KAAK,uCAAuC,KAAK,EAAE,GAAG;AAAA,MACrG,CAAC;AACD,UAAI,OAAO;AAEX,UAAI,gBAAgB;AAClB,eAAO,eAAe,aAAa,KAAK;AAAA,MAC1C;AAEA,kBAAY,KAAK,MAAM,GAAG,EAAE,MAAM,GAAG,EAAE,EAAE,KAAK,GAAG,CAAC;AAAA,IACpD;AAAA,EACF;AAGA,SAAO,SAAS,QAAQ,OAAO,EAAE,KAAK,UAAU,IAAI,QAAQ,QAAQ,OAAO,EAAE,CAAC,KAAK;AACrF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|