ds-one 0.2.5-alpha.8 → 0.3.0-alpha.1
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/DS1/0-face/device.ts +138 -0
- package/DS1/0-face/i18n.ts +36 -89
- package/DS1/0-face/scaling.ts +152 -0
- package/DS1/1-root/fonts/Iosevka-Regular.woff2 +0 -0
- package/DS1/1-root/one.css +124 -77
- package/DS1/2-core/ds-banner.ts +120 -1
- package/DS1/2-core/ds-button.ts +16 -96
- package/DS1/2-core/ds-card.ts +137 -0
- package/DS1/2-core/ds-cycle.ts +82 -184
- package/DS1/2-core/ds-date.ts +3 -10
- package/DS1/2-core/ds-gap.ts +38 -0
- package/DS1/2-core/ds-icon.ts +6 -35
- package/DS1/2-core/ds-input.ts +306 -1
- package/DS1/2-core/ds-pagedots.ts +52 -0
- package/DS1/2-core/ds-text.ts +55 -28
- package/DS1/2-core/ds-tooltip.ts +14 -66
- package/DS1/2-core/styles/ds-banner.css +77 -0
- package/DS1/2-core/styles/ds-button.css +67 -0
- package/DS1/2-core/styles/ds-cycle.css +21 -0
- package/DS1/2-core/styles/ds-date.css +9 -0
- package/DS1/2-core/styles/ds-gap.css +93 -0
- package/DS1/2-core/styles/ds-icon.css +30 -0
- package/DS1/2-core/styles/ds-input.css +46 -0
- package/DS1/2-core/styles/ds-pagedots.css +31 -0
- package/DS1/2-core/styles/ds-text.css +29 -0
- package/DS1/2-core/styles/ds-tooltip.css +49 -0
- package/DS1/3-unit/ds-accordion.ts +95 -0
- package/DS1/3-unit/ds-form.ts +304 -0
- package/DS1/3-unit/ds-list.ts +5 -14
- package/DS1/3-unit/ds-row.ts +3 -19
- package/DS1/3-unit/ds-table.ts +3 -86
- package/DS1/3-unit/styles/ds-accordion.css +46 -0
- package/DS1/3-unit/styles/ds-list.css +9 -0
- package/DS1/3-unit/styles/ds-row.css +19 -0
- package/DS1/3-unit/styles/ds-table.css +80 -0
- package/DS1/4-page/ds-container.ts +28 -0
- package/DS1/4-page/ds-grid.ts +37 -50
- package/DS1/4-page/ds-layout.ts +652 -163
- package/DS1/4-page/styles/ds-container.css +35 -0
- package/DS1/4-page/styles/ds-grid.css +56 -0
- package/DS1/4-page/styles/ds-layout.css +246 -0
- package/DS1/index.ts +9 -1
- package/DS1/vite-env.d.ts +13 -0
- package/DS1/x-icon/2x.svg +4 -0
- package/DS1/x-icon/2xdots.svg +18 -0
- package/DS1/x-icon/2xgrid.svg +6 -0
- package/DS1/x-icon/2xlines.svg +6 -0
- package/DS1/x-icon/4x4.svg +18 -0
- package/DS1/x-icon/apple.svg +4 -0
- package/DS1/x-icon/avatar.svg +4 -0
- package/DS1/x-icon/big.svg +4 -0
- package/DS1/x-icon/blank.svg +3 -0
- package/DS1/x-icon/check.svg +3 -0
- package/DS1/x-icon/close.svg +3 -0
- package/DS1/x-icon/collapse.svg +3 -0
- package/DS1/x-icon/color.svg +4 -0
- package/DS1/x-icon/column.svg +5 -0
- package/DS1/x-icon/default.svg +3 -0
- package/DS1/x-icon/delete.svg +5 -0
- package/DS1/x-icon/dictate.svg +6 -0
- package/DS1/x-icon/do.svg +3 -0
- package/DS1/x-icon/down.svg +3 -0
- package/DS1/x-icon/duplicate.svg +4 -0
- package/DS1/x-icon/gallery.svg +5 -0
- package/DS1/x-icon/google.svg +6 -0
- package/DS1/x-icon/head.svg +5 -0
- package/DS1/x-icon/home.svg +3 -0
- package/DS1/x-icon/icon.svg +4 -0
- package/DS1/x-icon/in.svg +4 -0
- package/DS1/x-icon/lock.svg +5 -0
- package/DS1/x-icon/loop.svg +5 -0
- package/DS1/x-icon/mic.svg +5 -0
- package/DS1/x-icon/minimize.svg +3 -0
- package/DS1/x-icon/more.svg +5 -0
- package/DS1/x-icon/neutral.svg +6 -0
- package/DS1/x-icon/note.svg +6 -0
- package/DS1/x-icon/page.svg +4 -0
- package/DS1/x-icon/plus.svg +3 -0
- package/DS1/x-icon/rewind.svg +4 -0
- package/DS1/x-icon/row.svg +5 -0
- package/DS1/x-icon/sdown.svg +3 -0
- package/DS1/x-icon/search.svg +4 -0
- package/DS1/x-icon/see.svg +4 -0
- package/DS1/x-icon/ship.svg +5 -0
- package/DS1/x-icon/star.svg +3 -0
- package/DS1/x-icon/status.svg +4 -0
- package/DS1/x-icon/sup.svg +3 -0
- package/DS1/x-icon/title.svg +3 -0
- package/DS1/x-icon/undo.svg +3 -0
- package/DS1/x-icon/ungroup.svg +4 -0
- package/DS1/x-icon/unhead.svg +3 -0
- package/DS1/x-icon/unicon.svg +3 -0
- package/DS1/x-icon/unlock.svg +5 -0
- package/DS1/x-icon/unmic.svg +6 -0
- package/DS1/x-icon/unsee.svg +5 -0
- package/DS1/x-icon/unstar.svg +3 -0
- package/DS1/x-icon/untitle.svg +3 -0
- package/DS1/x-icon/up.svg +3 -0
- package/LICENSE +1 -1
- package/README.md +4 -4
- package/dist/0-face/device.d.ts +5 -0
- package/dist/0-face/device.d.ts.map +1 -1
- package/dist/0-face/device.js +111 -0
- package/dist/0-face/i18n.d.ts +0 -2
- package/dist/0-face/i18n.d.ts.map +1 -1
- package/dist/0-face/i18n.js +36 -73
- package/dist/0-face/scaling.d.ts +48 -0
- package/dist/0-face/scaling.d.ts.map +1 -0
- package/dist/0-face/scaling.js +114 -0
- package/dist/2-core/ds-banner.d.ts +67 -0
- package/dist/2-core/ds-banner.d.ts.map +1 -1
- package/dist/2-core/ds-banner.js +97 -1
- package/dist/2-core/ds-button.d.ts +4 -20
- package/dist/2-core/ds-button.d.ts.map +1 -1
- package/dist/2-core/ds-button.js +14 -88
- package/dist/2-core/ds-card.d.ts +39 -0
- package/dist/2-core/ds-card.d.ts.map +1 -0
- package/dist/2-core/ds-card.js +119 -0
- package/dist/2-core/ds-cycle.d.ts +1 -5
- package/dist/2-core/ds-cycle.d.ts.map +1 -1
- package/dist/2-core/ds-cycle.js +79 -166
- package/dist/2-core/ds-date.d.ts.map +1 -1
- package/dist/2-core/ds-date.js +3 -9
- package/dist/2-core/ds-gap.d.ts +28 -0
- package/dist/2-core/ds-gap.d.ts.map +1 -0
- package/dist/2-core/ds-gap.js +25 -0
- package/dist/2-core/ds-icon.d.ts.map +1 -1
- package/dist/2-core/ds-icon.js +6 -35
- package/dist/2-core/ds-input.d.ts +127 -0
- package/dist/2-core/ds-input.d.ts.map +1 -1
- package/dist/2-core/ds-input.js +252 -1
- package/dist/2-core/ds-pagedots.d.ts +32 -0
- package/dist/2-core/ds-pagedots.d.ts.map +1 -0
- package/dist/2-core/ds-pagedots.js +36 -0
- package/dist/2-core/ds-text.d.ts +5 -3
- package/dist/2-core/ds-text.d.ts.map +1 -1
- package/dist/2-core/ds-text.js +49 -27
- package/dist/2-core/ds-tooltip.d.ts +3 -3
- package/dist/2-core/ds-tooltip.d.ts.map +1 -1
- package/dist/2-core/ds-tooltip.js +13 -65
- package/dist/2-core/styles/ds-banner.css +77 -0
- package/dist/2-core/styles/ds-button.css +67 -0
- package/dist/2-core/styles/ds-cycle.css +21 -0
- package/dist/2-core/styles/ds-date.css +9 -0
- package/dist/2-core/styles/ds-gap.css +93 -0
- package/dist/2-core/styles/ds-icon.css +30 -0
- package/dist/2-core/styles/ds-input.css +46 -0
- package/dist/2-core/styles/ds-pagedots.css +26 -0
- package/dist/2-core/styles/ds-text.css +29 -0
- package/dist/2-core/styles/ds-tooltip.css +49 -0
- package/dist/3-unit/ds-accordion.d.ts +47 -0
- package/dist/3-unit/ds-accordion.d.ts.map +1 -0
- package/dist/3-unit/ds-accordion.js +75 -0
- package/dist/3-unit/ds-form.d.ts +70 -0
- package/dist/3-unit/ds-form.d.ts.map +1 -0
- package/dist/3-unit/ds-form.js +232 -0
- package/dist/3-unit/ds-list.d.ts.map +1 -1
- package/dist/3-unit/ds-list.js +5 -11
- package/dist/3-unit/ds-row.d.ts.map +1 -1
- package/dist/3-unit/ds-row.js +3 -19
- package/dist/3-unit/ds-table.d.ts.map +1 -1
- package/dist/3-unit/ds-table.js +3 -86
- package/dist/3-unit/styles/ds-accordion.css +46 -0
- package/dist/3-unit/styles/ds-list.css +9 -0
- package/dist/3-unit/styles/ds-row.css +19 -0
- package/dist/3-unit/styles/ds-table.css +80 -0
- package/dist/{3-unit/row-v1.d.ts → 4-page/ds-container.d.ts} +3 -11
- package/dist/4-page/ds-container.d.ts.map +1 -0
- package/dist/4-page/ds-container.js +11 -0
- package/dist/4-page/ds-grid.d.ts +5 -0
- package/dist/4-page/ds-grid.d.ts.map +1 -1
- package/dist/4-page/ds-grid.js +38 -56
- package/dist/4-page/ds-layout.d.ts +3 -3
- package/dist/4-page/ds-layout.d.ts.map +1 -1
- package/dist/4-page/ds-layout.js +651 -162
- package/dist/4-page/styles/ds-container.css +35 -0
- package/dist/4-page/styles/ds-grid.css +56 -0
- package/dist/4-page/styles/ds-layout.css +251 -0
- package/dist/ds-one.bundle.css +700 -0
- package/dist/ds-one.bundle.css.map +7 -0
- package/dist/ds-one.bundle.js +2728 -1597
- package/dist/ds-one.bundle.js.map +1 -7
- package/dist/ds-one.bundle.min.css +2 -0
- package/dist/ds-one.bundle.min.css.map +7 -0
- package/dist/ds-one.bundle.min.js +3850 -546
- package/dist/ds-one.bundle.min.js.map +1 -7
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -1
- package/package.json +4 -3
- package/dist/3-unit/doublenav-v1.d.ts +0 -51
- package/dist/3-unit/doublenav-v1.d.ts.map +0 -1
- package/dist/3-unit/doublenav-v1.js +0 -88
- package/dist/3-unit/ds-portfolio-doublenav.d.ts +0 -51
- package/dist/3-unit/ds-portfolio-doublenav.d.ts.map +0 -1
- package/dist/3-unit/ds-portfolio-doublenav.js +0 -88
- package/dist/3-unit/ds-portfolio-panel.d.ts +0 -11
- package/dist/3-unit/ds-portfolio-panel.d.ts.map +0 -1
- package/dist/3-unit/ds-portfolio-panel.js +0 -16
- package/dist/3-unit/ds-portfolio-singlenav.d.ts +0 -32
- package/dist/3-unit/ds-portfolio-singlenav.d.ts.map +0 -1
- package/dist/3-unit/ds-portfolio-singlenav.js +0 -62
- package/dist/3-unit/list-v1.d.ts +0 -11
- package/dist/3-unit/list-v1.d.ts.map +0 -1
- package/dist/3-unit/list-v1.js +0 -15
- package/dist/3-unit/panel-v1.d.ts +0 -11
- package/dist/3-unit/panel-v1.d.ts.map +0 -1
- package/dist/3-unit/panel-v1.js +0 -16
- package/dist/3-unit/row-v1.d.ts.map +0 -1
- package/dist/3-unit/row-v1.js +0 -32
- package/dist/3-unit/singlenav-v1.d.ts +0 -32
- package/dist/3-unit/singlenav-v1.d.ts.map +0 -1
- package/dist/3-unit/singlenav-v1.js +0 -62
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
export interface FormData {
|
|
3
|
+
[key: string]: string | number | boolean | null;
|
|
4
|
+
}
|
|
5
|
+
export interface FormValidationResult {
|
|
6
|
+
valid: boolean;
|
|
7
|
+
errors: {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export declare class Form extends LitElement {
|
|
12
|
+
static properties: {
|
|
13
|
+
action: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
};
|
|
16
|
+
method: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
};
|
|
19
|
+
name: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
};
|
|
22
|
+
novalidate: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
reflect: boolean;
|
|
25
|
+
};
|
|
26
|
+
autocomplete: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
};
|
|
29
|
+
_isSubmitting: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
state: boolean;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
action: string;
|
|
35
|
+
method: "get" | "post";
|
|
36
|
+
name: string;
|
|
37
|
+
novalidate: boolean;
|
|
38
|
+
autocomplete: "on" | "off";
|
|
39
|
+
_isSubmitting: boolean;
|
|
40
|
+
constructor();
|
|
41
|
+
static styles: import("lit").CSSResult;
|
|
42
|
+
/**
|
|
43
|
+
* Get all form data as an object
|
|
44
|
+
*/
|
|
45
|
+
getFormData(): FormData;
|
|
46
|
+
private _collectFormData;
|
|
47
|
+
/**
|
|
48
|
+
* Validate the form
|
|
49
|
+
*/
|
|
50
|
+
validate(): FormValidationResult;
|
|
51
|
+
private _validateElement;
|
|
52
|
+
/**
|
|
53
|
+
* Reset the form
|
|
54
|
+
*/
|
|
55
|
+
reset(): void;
|
|
56
|
+
private _resetElement;
|
|
57
|
+
/**
|
|
58
|
+
* Submit the form
|
|
59
|
+
*/
|
|
60
|
+
submit(): Promise<void>;
|
|
61
|
+
private _handleSubmit;
|
|
62
|
+
private _handleKeydown;
|
|
63
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
64
|
+
}
|
|
65
|
+
declare global {
|
|
66
|
+
interface HTMLElementTagNameMap {
|
|
67
|
+
"ds-form": Form;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=ds-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ds-form.d.ts","sourceRoot":"","sources":["../../DS1/3-unit/ds-form.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,MAAM,WAAW,QAAQ;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;CACjD;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACnC;AAED,qBAAa,IAAK,SAAQ,UAAU;IAClC,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;MAOf;IAEM,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,KAAK,GAAG,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,IAAI,GAAG,KAAK,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;;IAY/B,MAAM,CAAC,MAAM,0BAqBX;IAEF;;OAEG;IACH,WAAW,IAAI,QAAQ;IAYvB,OAAO,CAAC,gBAAgB;IA8BxB;;OAEG;IACH,QAAQ,IAAI,oBAAoB;IAoBhC,OAAO,CAAC,gBAAgB;IAmCxB;;OAEG;IACH,KAAK,IAAI,IAAI;IAWb,OAAO,CAAC,aAAa;IA0BrB;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAsD7B,OAAO,CAAC,aAAa;IAKrB,OAAO,CAAC,cAAc;IAWtB,MAAM;CAeP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,IAAI,CAAC;KACjB;CACF"}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
// ds-form.ts
|
|
2
|
+
// Form component for handling form submissions and validation
|
|
3
|
+
import { LitElement, html, css } from "lit";
|
|
4
|
+
export class Form extends LitElement {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
this.action = "";
|
|
8
|
+
this.method = "post";
|
|
9
|
+
this.name = "";
|
|
10
|
+
this.novalidate = false;
|
|
11
|
+
this.autocomplete = "on";
|
|
12
|
+
this._isSubmitting = false;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Get all form data as an object
|
|
16
|
+
*/
|
|
17
|
+
getFormData() {
|
|
18
|
+
const data = {};
|
|
19
|
+
const slot = this.shadowRoot?.querySelector("slot");
|
|
20
|
+
const elements = slot?.assignedElements({ flatten: true }) || [];
|
|
21
|
+
for (const element of elements) {
|
|
22
|
+
this._collectFormData(element, data);
|
|
23
|
+
}
|
|
24
|
+
return data;
|
|
25
|
+
}
|
|
26
|
+
_collectFormData(element, data) {
|
|
27
|
+
// Check if element has name and value properties
|
|
28
|
+
const name = element.getAttribute("name") || element.name;
|
|
29
|
+
if (name) {
|
|
30
|
+
const value = element.value;
|
|
31
|
+
if (value !== undefined) {
|
|
32
|
+
// Handle checkboxes and radio buttons
|
|
33
|
+
if (element instanceof HTMLInputElement &&
|
|
34
|
+
(element.type === "checkbox" || element.type === "radio")) {
|
|
35
|
+
if (element.type === "checkbox") {
|
|
36
|
+
data[name] = element.checked;
|
|
37
|
+
}
|
|
38
|
+
else if (element.type === "radio" && element.checked) {
|
|
39
|
+
data[name] = value;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
data[name] = value;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
// Recursively check children
|
|
48
|
+
const children = element.shadowRoot?.querySelectorAll("*") || element.querySelectorAll("*");
|
|
49
|
+
children.forEach((child) => {
|
|
50
|
+
this._collectFormData(child, data);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Validate the form
|
|
55
|
+
*/
|
|
56
|
+
validate() {
|
|
57
|
+
const result = {
|
|
58
|
+
valid: true,
|
|
59
|
+
errors: {},
|
|
60
|
+
};
|
|
61
|
+
if (this.novalidate) {
|
|
62
|
+
return result;
|
|
63
|
+
}
|
|
64
|
+
const slot = this.shadowRoot?.querySelector("slot");
|
|
65
|
+
const elements = slot?.assignedElements({ flatten: true }) || [];
|
|
66
|
+
for (const element of elements) {
|
|
67
|
+
this._validateElement(element, result);
|
|
68
|
+
}
|
|
69
|
+
return result;
|
|
70
|
+
}
|
|
71
|
+
_validateElement(element, result) {
|
|
72
|
+
const name = element.getAttribute("name") || element.name;
|
|
73
|
+
// Check for custom validation on ds-input elements
|
|
74
|
+
if (element.tagName.toLowerCase() === "ds-input") {
|
|
75
|
+
const input = element;
|
|
76
|
+
if (input.required && !input.value) {
|
|
77
|
+
result.valid = false;
|
|
78
|
+
result.errors[name || "unknown"] = "This field is required";
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
// Check native form elements
|
|
82
|
+
if (element instanceof HTMLInputElement ||
|
|
83
|
+
element instanceof HTMLTextAreaElement ||
|
|
84
|
+
element instanceof HTMLSelectElement) {
|
|
85
|
+
if (!element.checkValidity()) {
|
|
86
|
+
result.valid = false;
|
|
87
|
+
result.errors[name || "unknown"] = element.validationMessage;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// Recursively check children
|
|
91
|
+
const children = element.shadowRoot?.querySelectorAll("*") || element.querySelectorAll("*");
|
|
92
|
+
children.forEach((child) => {
|
|
93
|
+
this._validateElement(child, result);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Reset the form
|
|
98
|
+
*/
|
|
99
|
+
reset() {
|
|
100
|
+
const slot = this.shadowRoot?.querySelector("slot");
|
|
101
|
+
const elements = slot?.assignedElements({ flatten: true }) || [];
|
|
102
|
+
for (const element of elements) {
|
|
103
|
+
this._resetElement(element);
|
|
104
|
+
}
|
|
105
|
+
this.dispatchEvent(new CustomEvent("form-reset", { bubbles: true }));
|
|
106
|
+
}
|
|
107
|
+
_resetElement(element) {
|
|
108
|
+
if (element instanceof HTMLInputElement ||
|
|
109
|
+
element instanceof HTMLTextAreaElement ||
|
|
110
|
+
element instanceof HTMLSelectElement) {
|
|
111
|
+
if (element instanceof HTMLInputElement && element.type === "checkbox") {
|
|
112
|
+
element.checked = false;
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
element.value = "";
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
// Handle ds-input elements
|
|
119
|
+
if (element.tagName.toLowerCase() === "ds-input") {
|
|
120
|
+
element.value = "";
|
|
121
|
+
}
|
|
122
|
+
// Recursively reset children
|
|
123
|
+
const children = element.shadowRoot?.querySelectorAll("*") || element.querySelectorAll("*");
|
|
124
|
+
children.forEach((child) => {
|
|
125
|
+
this._resetElement(child);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Submit the form
|
|
130
|
+
*/
|
|
131
|
+
async submit() {
|
|
132
|
+
if (this._isSubmitting)
|
|
133
|
+
return;
|
|
134
|
+
const validationResult = this.validate();
|
|
135
|
+
if (!validationResult.valid) {
|
|
136
|
+
this.dispatchEvent(new CustomEvent("form-invalid", {
|
|
137
|
+
detail: validationResult.errors,
|
|
138
|
+
bubbles: true,
|
|
139
|
+
}));
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
this._isSubmitting = true;
|
|
143
|
+
const formData = this.getFormData();
|
|
144
|
+
this.dispatchEvent(new CustomEvent("form-submit", {
|
|
145
|
+
detail: { data: formData },
|
|
146
|
+
bubbles: true,
|
|
147
|
+
}));
|
|
148
|
+
// If action is provided, submit to the server
|
|
149
|
+
if (this.action) {
|
|
150
|
+
try {
|
|
151
|
+
const response = await fetch(this.action, {
|
|
152
|
+
method: this.method.toUpperCase(),
|
|
153
|
+
headers: {
|
|
154
|
+
"Content-Type": "application/json",
|
|
155
|
+
},
|
|
156
|
+
body: JSON.stringify(formData),
|
|
157
|
+
});
|
|
158
|
+
this.dispatchEvent(new CustomEvent("form-response", {
|
|
159
|
+
detail: { response, data: formData },
|
|
160
|
+
bubbles: true,
|
|
161
|
+
}));
|
|
162
|
+
}
|
|
163
|
+
catch (error) {
|
|
164
|
+
this.dispatchEvent(new CustomEvent("form-error", {
|
|
165
|
+
detail: { error, data: formData },
|
|
166
|
+
bubbles: true,
|
|
167
|
+
}));
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
this._isSubmitting = false;
|
|
171
|
+
}
|
|
172
|
+
_handleSubmit(e) {
|
|
173
|
+
e.preventDefault();
|
|
174
|
+
this.submit();
|
|
175
|
+
}
|
|
176
|
+
_handleKeydown(e) {
|
|
177
|
+
if (e.key === "Enter" && !e.shiftKey) {
|
|
178
|
+
const target = e.target;
|
|
179
|
+
// Don't submit if in a textarea
|
|
180
|
+
if (target.tagName.toLowerCase() !== "textarea") {
|
|
181
|
+
e.preventDefault();
|
|
182
|
+
this.submit();
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
render() {
|
|
187
|
+
return html `
|
|
188
|
+
<form
|
|
189
|
+
.action=${this.action}
|
|
190
|
+
.method=${this.method}
|
|
191
|
+
.name=${this.name}
|
|
192
|
+
?novalidate=${this.novalidate}
|
|
193
|
+
autocomplete=${this.autocomplete}
|
|
194
|
+
@submit=${this._handleSubmit}
|
|
195
|
+
@keydown=${this._handleKeydown}
|
|
196
|
+
>
|
|
197
|
+
<slot></slot>
|
|
198
|
+
</form>
|
|
199
|
+
`;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
Form.properties = {
|
|
203
|
+
action: { type: String },
|
|
204
|
+
method: { type: String },
|
|
205
|
+
name: { type: String },
|
|
206
|
+
novalidate: { type: Boolean, reflect: true },
|
|
207
|
+
autocomplete: { type: String },
|
|
208
|
+
_isSubmitting: { type: Boolean, state: true },
|
|
209
|
+
};
|
|
210
|
+
Form.styles = css `
|
|
211
|
+
:host {
|
|
212
|
+
display: block;
|
|
213
|
+
width: 100%;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
form {
|
|
217
|
+
display: flex;
|
|
218
|
+
flex-direction: column;
|
|
219
|
+
gap: calc(var(--05) * var(--sf, 1));
|
|
220
|
+
width: 100%;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
::slotted(*) {
|
|
224
|
+
width: 100%;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
:host([disabled]) {
|
|
228
|
+
opacity: 0.6;
|
|
229
|
+
pointer-events: none;
|
|
230
|
+
}
|
|
231
|
+
`;
|
|
232
|
+
customElements.define("ds-form", Form);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-list.d.ts","sourceRoot":"","sources":["../../DS1/3-unit/ds-list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ds-list.d.ts","sourceRoot":"","sources":["../../DS1/3-unit/ds-list.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAGlD,qBAAa,IAAK,SAAQ,UAAU;IAClC,MAAM,CAAC,MAAM,0BAAqB;IAElC,MAAM;CAGP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,IAAI,CAAC;KACjB;CACF"}
|
package/dist/3-unit/ds-list.js
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
// ds-
|
|
1
|
+
// ds-list.ts
|
|
2
2
|
// Unit component that
|
|
3
|
-
// can be used to show a list of items
|
|
4
|
-
import { LitElement, html,
|
|
3
|
+
// can be used to show a list of items consisting of components from core
|
|
4
|
+
import { LitElement, html, unsafeCSS } from "lit";
|
|
5
|
+
import styles from "./styles/ds-list.css?inline";
|
|
5
6
|
export class List extends LitElement {
|
|
6
7
|
render() {
|
|
7
8
|
return html `<slot></slot>`;
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
|
-
List.styles =
|
|
11
|
-
:host {
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-direction: column;
|
|
14
|
-
gap: 0;
|
|
15
|
-
width: 100%;
|
|
16
|
-
}
|
|
17
|
-
`;
|
|
11
|
+
List.styles = unsafeCSS(styles);
|
|
18
12
|
customElements.define("ds-list", List);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-row.d.ts","sourceRoot":"","sources":["../../DS1/3-unit/ds-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"ds-row.d.ts","sourceRoot":"","sources":["../../DS1/3-unit/ds-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAGlD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,UAAU,GAAG,IAAI,CAAC;KAC5D;IACD,IAAI,cAAc,EAAE,qBAAqB,CAAC;CAC3C;AAED,qBAAa,GAAI,SAAQ,UAAU;IACjC,MAAM,CAAC,UAAU;;;;;MAEf;IAEM,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC;;IAOlC,MAAM,CAAC,MAAM,0BAAqB;IAElC,MAAM;CAGP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,QAAQ,EAAE,GAAG,CAAC;KACf;CACF"}
|
package/dist/3-unit/ds-row.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { LitElement, html,
|
|
1
|
+
import { LitElement, html, unsafeCSS } from "lit";
|
|
2
|
+
import styles from "./styles/ds-row.css?inline";
|
|
2
3
|
export class Row extends LitElement {
|
|
3
4
|
constructor() {
|
|
4
5
|
super();
|
|
@@ -11,22 +12,5 @@ export class Row extends LitElement {
|
|
|
11
12
|
Row.properties = {
|
|
12
13
|
type: { type: String, reflect: true },
|
|
13
14
|
};
|
|
14
|
-
Row.styles =
|
|
15
|
-
:host {
|
|
16
|
-
display: flex;
|
|
17
|
-
align-items: end;
|
|
18
|
-
width: calc(240px * var(--sf));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
:host([type="fill"]) {
|
|
22
|
-
justify-content: space-between;
|
|
23
|
-
height: calc(var(--1) * var(--sf));
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
:host([type="centered"]) {
|
|
27
|
-
justify-content: center;
|
|
28
|
-
height: calc(var(--1) * var(--sf));
|
|
29
|
-
gap: calc(var(--025) * var(--sf));
|
|
30
|
-
}
|
|
31
|
-
`;
|
|
15
|
+
Row.styles = unsafeCSS(styles);
|
|
32
16
|
customElements.define("ds-row", Row);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-table.d.ts","sourceRoot":"","sources":["../../DS1/3-unit/ds-table.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"ds-table.d.ts","sourceRoot":"","sources":["../../DS1/3-unit/ds-table.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAGlD,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,OAAQ,SAAQ,UAAU;IACrC,MAAM,CAAC,UAAU;;;;;;;;;;;MAIf;IAEM,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;;IAS5B,MAAM,CAAC,MAAM,0BAAqB;IAElC,MAAM;CA0BP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
|
package/dist/3-unit/ds-table.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// ds-table.ts
|
|
2
2
|
// Data table component
|
|
3
|
-
import { LitElement, html,
|
|
3
|
+
import { LitElement, html, unsafeCSS } from "lit";
|
|
4
|
+
import styles from "./styles/ds-table.css?inline";
|
|
4
5
|
export class DsTable extends LitElement {
|
|
5
6
|
constructor() {
|
|
6
7
|
super();
|
|
@@ -12,7 +13,6 @@ export class DsTable extends LitElement {
|
|
|
12
13
|
return html `
|
|
13
14
|
<div class="table-container">
|
|
14
15
|
<div class="table-header">
|
|
15
|
-
|
|
16
16
|
<div class="header-cell product-cell">Product</div>
|
|
17
17
|
<div class="header-cell users-cell">Users</div>
|
|
18
18
|
<div class="header-cell retention-cell">Retention</div>
|
|
@@ -39,88 +39,5 @@ DsTable.properties = {
|
|
|
39
39
|
columns: { type: Array },
|
|
40
40
|
showStatus: { type: Boolean, attribute: "show-status" },
|
|
41
41
|
};
|
|
42
|
-
DsTable.styles =
|
|
43
|
-
:host {
|
|
44
|
-
display: block;
|
|
45
|
-
width: 100%;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.table-container {
|
|
49
|
-
display: flex;
|
|
50
|
-
flex-direction: column;
|
|
51
|
-
width: 100%;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.table-header {
|
|
55
|
-
display: grid;
|
|
56
|
-
grid-template-columns: 160px 80px 80px 80px;
|
|
57
|
-
height: 20px;
|
|
58
|
-
width: 400px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.table-body {
|
|
62
|
-
display: grid;
|
|
63
|
-
grid-template-columns: 160px 80px 80px 80px;
|
|
64
|
-
border: 1px solid var(--black);
|
|
65
|
-
width: 400px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.header-cell {
|
|
69
|
-
height: 20px;
|
|
70
|
-
display: flex;
|
|
71
|
-
align-items: center;
|
|
72
|
-
justify-content: left;
|
|
73
|
-
padding: 0 2px;
|
|
74
|
-
font-family: var(--typeface);
|
|
75
|
-
font-size: var(--type-size-default);
|
|
76
|
-
font-weight: var(--type-weight-default);
|
|
77
|
-
line-height: var(--type-lineheight-default);
|
|
78
|
-
color: var(--black);
|
|
79
|
-
letter-spacing: -0.26px;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.data-cell {
|
|
83
|
-
height: 20px;
|
|
84
|
-
margin-top: -1px;
|
|
85
|
-
display: flex;
|
|
86
|
-
align-items: center;
|
|
87
|
-
justify-content: left;
|
|
88
|
-
|
|
89
|
-
outline: 1px solid var(--black);
|
|
90
|
-
|
|
91
|
-
font-family: var(--typeface);
|
|
92
|
-
font-size: var(--type-size-default);
|
|
93
|
-
font-weight: var(--type-weight-default);
|
|
94
|
-
line-height: var(--type-lineheight-default);
|
|
95
|
-
color: var(--black);
|
|
96
|
-
letter-spacing: -0.26px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.status-cell {
|
|
100
|
-
background-color: var(--light-green);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.product-cell {
|
|
104
|
-
text-align: left;
|
|
105
|
-
justify-content: flex-start;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.users-cell,
|
|
109
|
-
.retention-cell {
|
|
110
|
-
text-align: center;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.status-cell {
|
|
114
|
-
text-align: center;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/* Responsive adjustments */
|
|
118
|
-
@media (max-width: 480px) {
|
|
119
|
-
.table-header,
|
|
120
|
-
.table-body {
|
|
121
|
-
width: 100%;
|
|
122
|
-
grid-template-columns: 1fr 60px 60px 60px;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
`;
|
|
42
|
+
DsTable.styles = unsafeCSS(styles);
|
|
126
43
|
customElements.define("ds-table", DsTable);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* ds-accordion.css */
|
|
2
|
+
/* Accordion component styles using native <details>/<summary> */
|
|
3
|
+
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
width: calc(240px * var(--sf));
|
|
7
|
+
color: var(--text-color-primary);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
details {
|
|
11
|
+
width: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
summary {
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
user-select: none;
|
|
17
|
+
list-style: none;
|
|
18
|
+
outline: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
summary::-webkit-details-marker {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.summaryRow {
|
|
26
|
+
width: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
ds-icon.chevron {
|
|
30
|
+
transform: rotate(0deg);
|
|
31
|
+
transition: transform 140ms ease;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
details[open] ds-icon.chevron {
|
|
35
|
+
transform: rotate(180deg);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.detailsBody {
|
|
39
|
+
padding-top: calc(var(--half) * var(--sf));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.detailsText {
|
|
43
|
+
display: block;
|
|
44
|
+
white-space: normal;
|
|
45
|
+
text-align: left;
|
|
46
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* ds-row.css */
|
|
2
|
+
/* Row component styles */
|
|
3
|
+
|
|
4
|
+
:host {
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: end;
|
|
7
|
+
width: calc(240px * var(--sf));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:host([type="fill"]) {
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
height: calc(var(--1) * var(--sf));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host([type="centered"]) {
|
|
16
|
+
justify-content: center;
|
|
17
|
+
height: calc(var(--1) * var(--sf));
|
|
18
|
+
gap: calc(var(--025) * var(--sf));
|
|
19
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/* ds-table.css */
|
|
2
|
+
/* Data table component styles */
|
|
3
|
+
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
width: 100%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.table-container {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
width: 100%;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.table-header {
|
|
16
|
+
display: grid;
|
|
17
|
+
grid-template-columns: 160px 80px 80px 80px;
|
|
18
|
+
height: 20px;
|
|
19
|
+
width: 400px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.table-body {
|
|
23
|
+
display: grid;
|
|
24
|
+
grid-template-columns: 160px 80px 80px 80px;
|
|
25
|
+
border: 1px solid var(--black);
|
|
26
|
+
width: 400px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.header-cell {
|
|
30
|
+
height: 20px;
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: left;
|
|
34
|
+
padding: 0 2px;
|
|
35
|
+
font-family: var(--typeface-regular);
|
|
36
|
+
font-size: var(--type-size-default);
|
|
37
|
+
font-weight: var(--type-weight-default);
|
|
38
|
+
line-height: var(--type-lineheight-default);
|
|
39
|
+
color: var(--black);
|
|
40
|
+
letter-spacing: -0.26px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.data-cell {
|
|
44
|
+
height: 20px;
|
|
45
|
+
margin-top: -1px;
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: left;
|
|
49
|
+
outline: 1px solid var(--black);
|
|
50
|
+
font-family: var(--typeface-regular);
|
|
51
|
+
font-size: var(--type-size-default);
|
|
52
|
+
font-weight: var(--type-weight-default);
|
|
53
|
+
line-height: var(--type-lineheight-default);
|
|
54
|
+
color: var(--black);
|
|
55
|
+
letter-spacing: -0.26px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.status-cell {
|
|
59
|
+
background-color: var(--apple-green);
|
|
60
|
+
text-align: center;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.product-cell {
|
|
64
|
+
text-align: left;
|
|
65
|
+
justify-content: flex-start;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.users-cell,
|
|
69
|
+
.retention-cell {
|
|
70
|
+
text-align: center;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Responsive adjustments */
|
|
74
|
+
@media (max-width: 480px) {
|
|
75
|
+
.table-header,
|
|
76
|
+
.table-body {
|
|
77
|
+
width: 100%;
|
|
78
|
+
grid-template-columns: 1fr 60px 60px 60px;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -5,21 +5,13 @@ declare global {
|
|
|
5
5
|
}
|
|
6
6
|
var customElements: CustomElementRegistry;
|
|
7
7
|
}
|
|
8
|
-
export declare class
|
|
9
|
-
static properties: {
|
|
10
|
-
type: {
|
|
11
|
-
type: StringConstructor;
|
|
12
|
-
reflect: boolean;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
type: "fill" | "centered";
|
|
16
|
-
constructor();
|
|
8
|
+
export declare class Container extends LitElement {
|
|
17
9
|
static styles: import("lit").CSSResult;
|
|
18
10
|
render(): import("lit-html").TemplateResult<1>;
|
|
19
11
|
}
|
|
20
12
|
declare global {
|
|
21
13
|
interface HTMLElementTagNameMap {
|
|
22
|
-
"
|
|
14
|
+
"ds-container": Container;
|
|
23
15
|
}
|
|
24
16
|
}
|
|
25
|
-
//# sourceMappingURL=
|
|
17
|
+
//# sourceMappingURL=ds-container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ds-container.d.ts","sourceRoot":"","sources":["../../DS1/4-page/ds-container.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAGlD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,UAAU,GAAG,IAAI,CAAC;KAC5D;IACD,IAAI,cAAc,EAAE,qBAAqB,CAAC;CAC3C;AAED,qBAAa,SAAU,SAAQ,UAAU;IACvC,MAAM,CAAC,MAAM,0BAAqB;IAElC,MAAM;CAGP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,SAAS,CAAC;KAC3B;CACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// ds-container.ts
|
|
2
|
+
// Container component with responsive width constraints
|
|
3
|
+
import { LitElement, html, unsafeCSS } from "lit";
|
|
4
|
+
import styles from "./styles/ds-container.css?inline";
|
|
5
|
+
export class Container extends LitElement {
|
|
6
|
+
render() {
|
|
7
|
+
return html `<slot></slot>`;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
Container.styles = unsafeCSS(styles);
|
|
11
|
+
customElements.define("ds-container", Container);
|