@solid-design-system/components 1.23.0 → 1.25.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/dist/components/es/carousel.js +1 -1
- package/dist/components/es/checkbox.js +1 -11
- package/dist/components/es/debounce.js +1 -0
- package/dist/components/es/header.js +1 -0
- package/dist/components/es/input.js +1 -0
- package/dist/components/es/live.js +11 -0
- package/dist/components/es/scroll-controller.js +1 -1
- package/dist/components/es/solid-components2.js +1 -1
- package/dist/components/es/solid-element.js +1 -1
- package/dist/components/umd/solid-components.js +21 -21
- package/dist/custom-elements.json +1 -1
- package/dist/package/components/header/header.d.ts +23 -0
- package/dist/package/components/header/header.js +101 -0
- package/dist/package/components/icon/library.system.d.ts +8 -1
- package/dist/package/components/icon/library.system.js +52 -10
- package/dist/package/components/input/input.d.ts +76 -0
- package/dist/package/components/input/input.js +390 -0
- package/dist/package/solid-components.d.ts +2 -0
- package/dist/package/solid-components.js +28 -24
- package/dist/package/styles/form-control.styles.d.ts +2 -0
- package/dist/package/styles/form-control.styles.js +5 -0
- package/dist/package/styles/tailwind.css.js +1 -1
- package/dist/versioned-components/es/accordion-group.js +1 -1
- package/dist/versioned-components/es/accordion.js +1 -1
- package/dist/versioned-components/es/badge.js +1 -1
- package/dist/versioned-components/es/brandshape.js +1 -1
- package/dist/versioned-components/es/button.js +1 -1
- package/dist/versioned-components/es/carousel-item.js +1 -1
- package/dist/versioned-components/es/carousel.js +3 -3
- package/dist/versioned-components/es/checkbox-group.js +1 -1
- package/dist/versioned-components/es/checkbox.js +1 -11
- package/dist/versioned-components/es/debounce.js +1 -0
- package/dist/versioned-components/es/divider.js +1 -1
- package/dist/versioned-components/es/drawer.js +1 -1
- package/dist/versioned-components/es/dropdown.js +1 -1
- package/dist/versioned-components/es/form.js +1 -1
- package/dist/versioned-components/es/header.js +1 -0
- package/dist/versioned-components/es/icon.js +1 -1
- package/dist/versioned-components/es/include.js +1 -1
- package/dist/versioned-components/es/input.js +1 -0
- package/dist/versioned-components/es/link.js +1 -1
- package/dist/versioned-components/es/live.js +11 -0
- package/dist/versioned-components/es/navigation-item.js +1 -1
- package/dist/versioned-components/es/popup.js +1 -1
- package/dist/versioned-components/es/radio-group.js +1 -1
- package/dist/versioned-components/es/radio.js +1 -1
- package/dist/versioned-components/es/scroll-controller.js +1 -1
- package/dist/versioned-components/es/solid-components2.js +1 -1
- package/dist/versioned-components/es/solid-element.js +1 -1
- package/dist/versioned-components/es/spinner.js +1 -1
- package/dist/versioned-components/es/tag.js +1 -1
- package/dist/versioned-components/es/teaser.js +1 -1
- package/dist/versioned-components/es/tooltip.js +2 -2
- package/dist/versioned-components/es/video.js +1 -1
- package/dist/versioned-package/_components/button-group/button-group.d.ts +1 -1
- package/dist/versioned-package/_components/button-group/button-group.js +11 -11
- package/dist/versioned-package/components/accordion/accordion.d.ts +1 -1
- package/dist/versioned-package/components/accordion/accordion.js +2 -2
- package/dist/versioned-package/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist/versioned-package/components/accordion-group/accordion-group.js +3 -3
- package/dist/versioned-package/components/badge/badge.d.ts +1 -1
- package/dist/versioned-package/components/badge/badge.js +1 -1
- package/dist/versioned-package/components/brandshape/brandshape.d.ts +1 -1
- package/dist/versioned-package/components/brandshape/brandshape.js +1 -1
- package/dist/versioned-package/components/button/button.d.ts +1 -1
- package/dist/versioned-package/components/button/button.js +4 -4
- package/dist/versioned-package/components/carousel/carousel.d.ts +1 -1
- package/dist/versioned-package/components/carousel/carousel.js +6 -6
- package/dist/versioned-package/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist/versioned-package/components/carousel-item/carousel-item.js +1 -1
- package/dist/versioned-package/components/checkbox/checkbox.d.ts +1 -1
- package/dist/versioned-package/components/checkbox/checkbox.js +4 -4
- package/dist/versioned-package/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist/versioned-package/components/checkbox-group/checkbox-group.js +5 -5
- package/dist/versioned-package/components/divider/divider.d.ts +1 -1
- package/dist/versioned-package/components/divider/divider.js +2 -2
- package/dist/versioned-package/components/drawer/drawer.d.ts +1 -1
- package/dist/versioned-package/components/drawer/drawer.js +2 -2
- package/dist/versioned-package/components/dropdown/dropdown.d.ts +1 -1
- package/dist/versioned-package/components/dropdown/dropdown.js +6 -6
- package/dist/versioned-package/components/header/header.d.ts +23 -0
- package/dist/versioned-package/components/header/header.js +101 -0
- package/dist/versioned-package/components/icon/icon.d.ts +1 -1
- package/dist/versioned-package/components/icon/icon.js +1 -1
- package/dist/versioned-package/components/icon/library.system.d.ts +8 -1
- package/dist/versioned-package/components/icon/library.system.js +52 -10
- package/dist/versioned-package/components/include/include.d.ts +1 -1
- package/dist/versioned-package/components/include/include.js +1 -1
- package/dist/versioned-package/components/input/input.d.ts +76 -0
- package/dist/versioned-package/components/input/input.js +390 -0
- package/dist/versioned-package/components/link/link.d.ts +1 -1
- package/dist/versioned-package/components/link/link.js +2 -2
- package/dist/versioned-package/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist/versioned-package/components/navigation-item/navigation-item.js +3 -3
- package/dist/versioned-package/components/popup/popup.d.ts +1 -1
- package/dist/versioned-package/components/popup/popup.js +1 -1
- package/dist/versioned-package/components/radio/radio.d.ts +1 -1
- package/dist/versioned-package/components/radio/radio.js +2 -2
- package/dist/versioned-package/components/radio-group/radio-group.d.ts +2 -2
- package/dist/versioned-package/components/radio-group/radio-group.js +14 -14
- package/dist/versioned-package/components/spinner/spinner.d.ts +1 -1
- package/dist/versioned-package/components/spinner/spinner.js +1 -1
- package/dist/versioned-package/components/tag/tag.d.ts +1 -1
- package/dist/versioned-package/components/tag/tag.js +2 -2
- package/dist/versioned-package/components/teaser/teaser.js +1 -1
- package/dist/versioned-package/components/tooltip/tooltip.d.ts +1 -1
- package/dist/versioned-package/components/tooltip/tooltip.js +5 -5
- package/dist/versioned-package/components/video/video.d.ts +1 -1
- package/dist/versioned-package/components/video/video.js +2 -2
- package/dist/versioned-package/internal/form.js +2 -2
- package/dist/versioned-package/solid-components.d.ts +2 -0
- package/dist/versioned-package/solid-components.js +28 -24
- package/dist/versioned-package/styles/form-control.styles.d.ts +2 -0
- package/dist/versioned-package/styles/form-control.styles.js +5 -0
- package/dist/versioned-package/styles/tailwind.css.js +1 -1
- package/dist/versioned-styles/solid-styles.css +1 -1
- package/dist/vscode.html-custom-data.json +594 -24
- package/dist/web-types.json +631 -1
- package/package.json +5 -5
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import SolidElement from '../../internal/solid-element';
|
|
2
|
+
import type { PropertyValues } from 'lit';
|
|
3
|
+
export default class SdHeader extends SolidElement {
|
|
4
|
+
fixed: boolean;
|
|
5
|
+
private refHeaderElement?;
|
|
6
|
+
private resizeObserver?;
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
firstUpdated(): void;
|
|
9
|
+
toggleHeightCalculation(): void;
|
|
10
|
+
disconnectedCallback(): void;
|
|
11
|
+
updated(changedProperties: PropertyValues): void;
|
|
12
|
+
private onResize;
|
|
13
|
+
private addResizeObserver;
|
|
14
|
+
private setCalculatedHeightProperty;
|
|
15
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
16
|
+
private handleSlotChange;
|
|
17
|
+
static styles: import("lit").CSSResultGroup[];
|
|
18
|
+
}
|
|
19
|
+
declare global {
|
|
20
|
+
interface HTMLElementTagNameMap {
|
|
21
|
+
'sd-header': SdHeader;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { css, html } from "lit";
|
|
2
|
+
import { customElement } from "../../internal/register-custom-element.js";
|
|
3
|
+
import { debounce } from "../../internal/debounce.js";
|
|
4
|
+
import { property } from "lit/decorators.js";
|
|
5
|
+
import componentStyles from "../../styles/component.styles.js";
|
|
6
|
+
import SolidElement from "../../internal/solid-element.js";
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
10
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
11
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
12
|
+
if (decorator = decorators[i])
|
|
13
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
14
|
+
if (kind && result)
|
|
15
|
+
__defProp(target, key, result);
|
|
16
|
+
return result;
|
|
17
|
+
};
|
|
18
|
+
let SdHeader = class extends SolidElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.fixed = false;
|
|
22
|
+
}
|
|
23
|
+
connectedCallback() {
|
|
24
|
+
super.connectedCallback();
|
|
25
|
+
this.setCalculatedHeightProperty = this.setCalculatedHeightProperty.bind(this);
|
|
26
|
+
this.addResizeObserver = this.addResizeObserver.bind(this);
|
|
27
|
+
}
|
|
28
|
+
firstUpdated() {
|
|
29
|
+
this.toggleHeightCalculation();
|
|
30
|
+
}
|
|
31
|
+
toggleHeightCalculation() {
|
|
32
|
+
var _a;
|
|
33
|
+
if (this.fixed) {
|
|
34
|
+
this.setCalculatedHeightProperty();
|
|
35
|
+
this.addResizeObserver();
|
|
36
|
+
} else {
|
|
37
|
+
this.setCalculatedHeightProperty();
|
|
38
|
+
(_a = this.resizeObserver) == null ? void 0 : _a.disconnect();
|
|
39
|
+
this.resizeObserver = void 0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
disconnectedCallback() {
|
|
43
|
+
super.disconnectedCallback();
|
|
44
|
+
}
|
|
45
|
+
updated(changedProperties) {
|
|
46
|
+
super.updated(changedProperties);
|
|
47
|
+
if (changedProperties.has("fixed")) {
|
|
48
|
+
this.toggleHeightCalculation();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
onResize() {
|
|
52
|
+
if (this.fixed) {
|
|
53
|
+
this.setCalculatedHeightProperty();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
addResizeObserver() {
|
|
57
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
58
|
+
this.onResize();
|
|
59
|
+
});
|
|
60
|
+
if (this.refHeaderElement) {
|
|
61
|
+
this.resizeObserver.observe(this.refHeaderElement);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
setCalculatedHeightProperty() {
|
|
65
|
+
if (this.fixed && this.refHeaderElement) {
|
|
66
|
+
document.documentElement.style.setProperty(
|
|
67
|
+
"--sd-header-calculated-height",
|
|
68
|
+
`${this.refHeaderElement.clientHeight}px`
|
|
69
|
+
);
|
|
70
|
+
} else {
|
|
71
|
+
document.documentElement.style.removeProperty("--sd-header-calculated-height");
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
render() {
|
|
75
|
+
return html`<header class="w-full bg-white relative" role="banner" @slotchange="${this.handleSlotChange}"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`;
|
|
76
|
+
}
|
|
77
|
+
handleSlotChange(event) {
|
|
78
|
+
const slot = event.target;
|
|
79
|
+
if (slot.assignedElements().length > 0) {
|
|
80
|
+
this.refHeaderElement = event.currentTarget;
|
|
81
|
+
this.setCalculatedHeightProperty();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
SdHeader.styles = [
|
|
86
|
+
SolidElement.styles,
|
|
87
|
+
componentStyles,
|
|
88
|
+
css`:host{display:block}:host([fixed]){position:fixed;top:0;left:0;width:100%}:host([fixed]) header::after{content:'';position:absolute;left:0;right:0;top:100%;height:8px;background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%))}[part=main]{width:var(--sd-header-inner-width);max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px)}`
|
|
89
|
+
];
|
|
90
|
+
__decorateClass([
|
|
91
|
+
property({ reflect: true, type: Boolean })
|
|
92
|
+
], SdHeader.prototype, "fixed", 2);
|
|
93
|
+
__decorateClass([
|
|
94
|
+
debounce(100)
|
|
95
|
+
], SdHeader.prototype, "onResize", 1);
|
|
96
|
+
SdHeader = __decorateClass([
|
|
97
|
+
customElement("sd-header")
|
|
98
|
+
], SdHeader);
|
|
99
|
+
export {
|
|
100
|
+
SdHeader as default
|
|
101
|
+
};
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import type { IconLibrary } from './library';
|
|
2
2
|
export declare const icons: {
|
|
3
|
+
calendar: string;
|
|
3
4
|
'chevron-down': string;
|
|
4
5
|
'chevron-up': string;
|
|
6
|
+
clock: string;
|
|
5
7
|
close: string;
|
|
8
|
+
'closing-round': string;
|
|
9
|
+
confirm: string;
|
|
10
|
+
eye: string;
|
|
11
|
+
'eye-crossed-out': string;
|
|
6
12
|
'info-circle': string;
|
|
7
13
|
'status-hook': string;
|
|
8
14
|
'status-minus': string;
|
|
9
|
-
start: string;
|
|
10
15
|
pause: string;
|
|
16
|
+
risk: string;
|
|
17
|
+
start: string;
|
|
11
18
|
};
|
|
12
19
|
declare const systemLibrary: IconLibrary;
|
|
13
20
|
export default systemLibrary;
|
|
@@ -1,19 +1,54 @@
|
|
|
1
1
|
const icons = {
|
|
2
|
+
calendar: `
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
4
|
+
<path d="M21 2H3a1 1 0 0 0-1 1v18a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1ZM6 4v1.667a1 1 0 0 0 2 0V4h8v1.667a1 1 0 0 0 2 0V4h2v4H4V4h2ZM4 20V10h16v10H4Z"/>
|
|
5
|
+
<path d="m7.603 13.263.597.81.31-.25c.31-.25.593-.49.733-.63h.017c-.017.333-.033 1.14-.033 1.647V18h1.223v-6.03H9.353l-1.75 1.293ZM14.667 11.867c-1.543 0-2.26 1-2.26 3.163 0 1.9.667 3.063 2.217 3.063s2.193-1.18 2.193-3.13c-.017-2.063-.743-3.097-2.15-3.097v.001Zm-.044 5.333c-.647 0-1-.76-1-2.28 0-1.44.353-2.173 1-2.173s1 .743 1 2.233c0 1.49-.387 2.227-1.017 2.227l.017-.007Z"/>
|
|
6
|
+
</svg>
|
|
7
|
+
`,
|
|
2
8
|
"chevron-down": `
|
|
3
|
-
<svg
|
|
9
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
4
10
|
<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>
|
|
5
11
|
</svg>
|
|
6
12
|
`,
|
|
7
13
|
"chevron-up": `
|
|
8
|
-
<svg
|
|
14
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
9
15
|
<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>
|
|
10
16
|
</svg>
|
|
11
17
|
`,
|
|
18
|
+
clock: `
|
|
19
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
20
|
+
<path d="M13 11.587V8a1 1 0 0 0-2 0v4c0 .07.007.138.021.203l-.001-.006a.855.855 0 0 0 .029.093l-.002-.006c0 .033 0 .067.03.1a.709.709 0 0 0 .055.103l-.002-.003.037.07c.04.057.081.107.127.153l2.827 2.83a1.002 1.002 0 0 0 1.417-1.417L13 11.587Z"/>
|
|
21
|
+
<path d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2Zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16Z"/>
|
|
22
|
+
</svg>
|
|
23
|
+
`,
|
|
12
24
|
close: `
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
`,
|
|
25
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
26
|
+
<path d="M21.707 2.293a1 1 0 0 0-1.414 0L12 10.586 3.707 2.293a1 1 0 0 0-1.413 1.414l-.001-.001 8.293 8.293-8.293 8.293a1 1 0 0 0 0 1.414 1 1 0 0 0 1.414 0L12 13.413l8.293 8.293a1 1 0 0 0 1.414 0 1 1 0 0 0 0-1.414l-8.293-8.293 8.293-8.293a1 1 0 0 0 0-1.414z"/></svg>
|
|
27
|
+
</svg>
|
|
28
|
+
`,
|
|
29
|
+
"closing-round": `
|
|
30
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
31
|
+
<path d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2Zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16Z"/>
|
|
32
|
+
<path d="M16.373 7.627a1 1 0 0 0-1.414 0l-2.96 2.96-2.96-2.96a1 1 0 0 0-1.413 1.414l-.001-.001 2.96 2.96-2.96 2.96a1 1 0 0 0 1.414 1.414l2.96-2.96 2.96 2.96a1 1 0 0 0 1.414-1.414L13.413 12l2.96-2.96a1 1 0 0 0 0-1.414v.001Z"/>
|
|
33
|
+
</svg>`,
|
|
34
|
+
confirm: `
|
|
35
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
36
|
+
<path d="M21.528 2.167a1 1 0 0 0-1.384.277l-.002.004-11.333 17-5.127-5.153a1 1 0 0 0-1.413 1.414l-.001-.001 6 6a.997.997 0 0 0 .707.293h.1c.307-.032.57-.199.731-.44l.002-.004 12-18a1 1 0 0 0-.276-1.388l-.004-.002Z"/>
|
|
37
|
+
</svg>
|
|
38
|
+
`,
|
|
39
|
+
eye: `
|
|
40
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
41
|
+
<path d="M12 18.96c-5.263 0-10-5.68-10-6.96 0-1.28 4.737-6.96 10-6.96S22 10.72 22 12c0 1.28-4.737 6.96-10 6.96ZM4.1 12c.76 1.197 4.07 4.96 7.9 4.96s7.14-3.767 7.9-4.96c-.76-1.197-4.07-4.96-7.9-4.96S4.86 10.807 4.1 12Z"/>
|
|
42
|
+
<path d="M12 16.107A4.11 4.11 0 0 1 7.893 12 4.11 4.11 0 0 1 12 7.893 4.11 4.11 0 0 1 16.107 12 4.11 4.11 0 0 1 12 16.107Zm0-6.21a2.107 2.107 0 1 0 0 4.213 2.107 2.107 0 0 0 0-4.213Z"/>
|
|
43
|
+
</svg>
|
|
44
|
+
`,
|
|
45
|
+
"eye-crossed-out": `
|
|
46
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
47
|
+
<path d="M12 16.107A4.11 4.11 0 0 1 7.893 12 4.11 4.11 0 0 1 12 7.893 4.11 4.11 0 0 1 16.107 12 4.11 4.11 0 0 1 12 16.107Zm0-6.21a2.107 2.107 0 1 0 0 4.213 2.107 2.107 0 0 0 0-4.213Z"/>
|
|
48
|
+
<path d="M12 18.96c-5.263 0-10-5.68-10-6.96 0-1.28 4.737-6.96 10-6.96S22 10.72 22 12c0 1.28-4.737 6.96-10 6.96ZM4.1 12c.76 1.197 4.07 4.96 7.9 4.96s7.14-3.767 7.9-4.96c-.76-1.197-4.07-4.96-7.9-4.96S4.86 10.807 4.1 12Z"/>
|
|
49
|
+
<path d="M3 22a1 1 0 0 1-.707-1.707l18-18a1 1 0 0 1 1.414 1.414l-18 18A.991.991 0 0 1 3 22Z"/>
|
|
50
|
+
</svg>
|
|
51
|
+
`,
|
|
17
52
|
"info-circle": `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2Zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16Z"/><path d="M13.333 7.833a1.5 1.5 0 1 1-3.001-.001 1.5 1.5 0 0 1 3.001.001ZM13 11.667a1 1 0 0 0-1-1h-1a1 1 0 0 0 0 2v2.667h2v-3.667Z"/><path d="M11 16.333v-1h-1a1 1 0 0 0 0 2h2a1 1 0 0 1-1-1Zm3-1h-1v1a1 1 0 0 1-1 1h2a1 1 0 0 0 0-2Z"/><path d="M13 16.333v-1h-2v1a1 1 0 0 0 2 0Z"/></svg>`,
|
|
18
53
|
"status-hook": `
|
|
19
54
|
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none">
|
|
@@ -25,14 +60,21 @@ const icons = {
|
|
|
25
60
|
<path d="M10 5.375H2C1.65496 5.375 1.375 5.65496 1.375 6C1.375 6.34504 1.65496 6.625 2 6.625H10C10.345 6.625 10.625 6.34504 10.625 6C10.625 5.65496 10.345 5.375 10 5.375Z" fill="currentColor"/>
|
|
26
61
|
</svg>
|
|
27
62
|
`,
|
|
28
|
-
start: `
|
|
29
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
30
|
-
<path d="m57.44 29.76-37.333-24A2.667 2.667 0 0 0 16 8v48a2.668 2.668 0 0 0 2.667 2.666 2.672 2.672 0 0 0 1.45-.431l-.01.005 37.333-24a2.67 2.67 0 0 0 1.192-2.221c0-.923-.47-1.74-1.184-2.216l-.01-.006.002-.037ZM21.333 51.112V12.89l29.734 19.112-29.734 19.11Z"/>
|
|
31
|
-
</svg>`,
|
|
32
63
|
pause: `
|
|
33
64
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
34
65
|
<path d="M9 22a.99997.99997 0 0 0 1-1V3a1.00003 1.00003 0 0 0-1-1H5a1.00003 1.00003 0 0 0-1 1v18a.99997.99997 0 0 0 1 1h4ZM6 4h2v16H6V4ZM19 22c.2652 0 .5196-.1054.7071-.2929A1.0001 1.0001 0 0 0 20 21V3a.99997.99997 0 0 0-1-1h-4a.99997.99997 0 0 0-1 1v18c0 .2652.1054.5196.2929.7071S14.7348 22 15 22h4ZM16 4h2v16h-2V4Z"/>
|
|
35
66
|
</svg>
|
|
67
|
+
`,
|
|
68
|
+
risk: `
|
|
69
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
70
|
+
<path d="M12.893 2.553a1.002 1.002 0 0 0-1.784-.006L2.106 20.553A1 1 0 0 0 3 22h18a1 1 0 0 0 .891-1.452l.003.006-9.001-18.001ZM4.617 20 12 5.237 19.383 20H4.617Z"/>
|
|
71
|
+
<path d="M11 10.667V15a1 1 0 0 0 2 0v-4.333a1 1 0 0 0-2 0ZM13 18a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"/>
|
|
72
|
+
</svg>
|
|
73
|
+
`,
|
|
74
|
+
start: `
|
|
75
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
76
|
+
<path d="m57.44 29.76-37.333-24A2.667 2.667 0 0 0 16 8v48a2.668 2.668 0 0 0 2.667 2.666 2.672 2.672 0 0 0 1.45-.431l-.01.005 37.333-24a2.67 2.67 0 0 0 1.192-2.221c0-.923-.47-1.74-1.184-2.216l-.01-.006.002-.037ZM21.333 51.112V12.89l29.734 19.112-29.734 19.11Z"/>
|
|
77
|
+
</svg>
|
|
36
78
|
`
|
|
37
79
|
};
|
|
38
80
|
const systemLibrary = {
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import '../icon/icon';
|
|
2
|
+
import { FormControlController } from '../../internal/form';
|
|
3
|
+
import SolidElement from '../../internal/solid-element';
|
|
4
|
+
import type { SolidFormControl } from '../../internal/solid-element';
|
|
5
|
+
export default class SdInput extends SolidElement implements SolidFormControl {
|
|
6
|
+
protected readonly formControlController: FormControlController;
|
|
7
|
+
private readonly hasSlotController;
|
|
8
|
+
private readonly localize;
|
|
9
|
+
input: HTMLInputElement;
|
|
10
|
+
private hasFocus;
|
|
11
|
+
type: 'date' | 'datetime-local' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'time' | 'url';
|
|
12
|
+
size: 'lg' | 'md' | 'sm';
|
|
13
|
+
inputmode: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
|
|
14
|
+
value: string;
|
|
15
|
+
defaultValue: string;
|
|
16
|
+
placeholder: string;
|
|
17
|
+
label: string;
|
|
18
|
+
helpText: string;
|
|
19
|
+
clearable: boolean;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
readonly: boolean;
|
|
22
|
+
passwordToggle: boolean;
|
|
23
|
+
passwordVisible: boolean;
|
|
24
|
+
noSpinButtons: boolean;
|
|
25
|
+
minlength: number;
|
|
26
|
+
maxlength: number;
|
|
27
|
+
min: number;
|
|
28
|
+
max: number;
|
|
29
|
+
form: string;
|
|
30
|
+
name: string;
|
|
31
|
+
title: string;
|
|
32
|
+
required: boolean;
|
|
33
|
+
pattern: string;
|
|
34
|
+
step: number | 'any';
|
|
35
|
+
autocapitalize: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';
|
|
36
|
+
autocorrect: 'off' | 'on';
|
|
37
|
+
autocomplete: string;
|
|
38
|
+
autofocus: boolean;
|
|
39
|
+
enterkeyhint: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
|
|
40
|
+
spellcheck: boolean;
|
|
41
|
+
get valueAsDate(): Date | null;
|
|
42
|
+
set valueAsDate(newValue: Date | null);
|
|
43
|
+
get valueAsNumber(): number;
|
|
44
|
+
set valueAsNumber(newValue: number);
|
|
45
|
+
get validity(): ValidityState;
|
|
46
|
+
firstUpdated(): void;
|
|
47
|
+
private handleBlur;
|
|
48
|
+
private handleChange;
|
|
49
|
+
private handleClearClick;
|
|
50
|
+
private handleFocus;
|
|
51
|
+
private handleInput;
|
|
52
|
+
private handleInvalid;
|
|
53
|
+
private handleKeyDown;
|
|
54
|
+
private handlePasswordToggle;
|
|
55
|
+
handleDisabledChange(): void;
|
|
56
|
+
handleStepChange(): void;
|
|
57
|
+
handleValueChange(): Promise<void>;
|
|
58
|
+
focus(options?: FocusOptions): void;
|
|
59
|
+
blur(): void;
|
|
60
|
+
select(): void;
|
|
61
|
+
setSelectionRange(selectionStart: number, selectionEnd: number, selectionDirection?: 'forward' | 'backward' | 'none'): void;
|
|
62
|
+
setRangeText(replacement: string, start?: number, end?: number, selectMode?: 'select' | 'start' | 'end' | 'preserve'): void;
|
|
63
|
+
showPicker(): void;
|
|
64
|
+
stepUp(): void;
|
|
65
|
+
stepDown(): void;
|
|
66
|
+
checkValidity(): boolean;
|
|
67
|
+
reportValidity(): boolean;
|
|
68
|
+
setCustomValidity(message: string): void;
|
|
69
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
70
|
+
static styles: import("lit").CSSResultGroup[];
|
|
71
|
+
}
|
|
72
|
+
declare global {
|
|
73
|
+
interface HTMLElementTagNameMap {
|
|
74
|
+
'sd-input': SdInput;
|
|
75
|
+
}
|
|
76
|
+
}
|