@solid-design-system/components 1.3.13 → 1.5.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/accordion-group.js +1 -0
- package/dist/components/es/accordion.js +1 -0
- package/dist/components/es/brandshape.js +1 -0
- package/dist/components/es/button.js +2 -121
- package/dist/components/es/divider.js +1 -0
- package/dist/components/es/icon.js +3 -3
- package/dist/components/es/if-defined.js +2 -7
- package/dist/components/es/link.js +1 -1
- package/dist/components/es/query.js +6 -0
- package/dist/components/es/slot.js +1 -0
- package/dist/components/es/solid-components.js +1 -1
- package/dist/components/es/solid-components2.js +1 -0
- package/dist/components/es/solid-element.js +1 -1
- package/dist/components/es/spinner.js +1 -1
- package/dist/components/es/teaser.js +1 -0
- package/dist/components/umd/solid-components.js +21 -140
- package/dist/custom-elements.json +1 -1
- package/dist/package/components/accordion/accordion.d.ts +23 -0
- package/dist/package/components/accordion/accordion.js +152 -0
- package/dist/package/components/accordion-group/accordion-group.d.ts +16 -0
- package/dist/package/components/accordion-group/accordion-group.js +63 -0
- package/dist/package/components/brandshape/brandshape.d.ts +26 -0
- package/dist/package/components/brandshape/brandshape.js +115 -0
- package/dist/package/components/button/button.d.ts +1 -1
- package/dist/package/components/button/button.js +8 -127
- package/dist/package/components/divider/divider.d.ts +13 -0
- package/dist/package/components/divider/divider.js +50 -0
- package/dist/package/components/icon/icon.d.ts +1 -1
- package/dist/package/components/icon/icon.js +1 -1
- package/dist/package/components/icon/library.js +18 -0
- package/dist/package/components/include/include.d.ts +1 -1
- package/dist/package/components/link/link.d.ts +1 -1
- package/dist/package/components/spinner/spinner.d.ts +1 -1
- package/dist/package/components/spinner/spinner.js +1 -1
- package/dist/package/components/teaser/teaser.d.ts +17 -0
- package/dist/package/components/teaser/teaser.js +104 -0
- package/dist/package/internal/animate.d.ts +10 -0
- package/dist/package/internal/animate.js +41 -0
- package/dist/package/internal/event.d.ts +1 -0
- package/dist/package/internal/event.js +14 -0
- package/dist/package/solid-components.d.ts +6 -0
- package/dist/package/solid-components.js +23 -10
- package/dist/package/styles/tailwind.css.js +1 -1
- package/dist/package/utilities/animation-registry.d.ts +14 -0
- package/dist/package/utilities/animation-registry.js +35 -0
- package/dist/versioned-components/es/accordion-group.js +1 -0
- package/dist/versioned-components/es/accordion.js +1 -0
- package/dist/versioned-components/es/brandshape.js +1 -0
- package/dist/versioned-components/es/button.js +2 -121
- package/dist/versioned-components/es/divider.js +1 -0
- package/dist/versioned-components/es/icon.js +3 -3
- package/dist/versioned-components/es/if-defined.js +2 -7
- package/dist/versioned-components/es/include.js +1 -1
- package/dist/versioned-components/es/link.js +1 -1
- package/dist/versioned-components/es/query.js +6 -0
- package/dist/versioned-components/es/slot.js +1 -0
- package/dist/versioned-components/es/solid-components.js +1 -1
- package/dist/versioned-components/es/solid-components2.js +1 -0
- package/dist/versioned-components/es/solid-element.js +1 -1
- package/dist/versioned-components/es/spinner.js +1 -1
- package/dist/versioned-components/es/teaser.js +1 -0
- package/dist/versioned-package/components/accordion/accordion.d.ts +23 -0
- package/dist/versioned-package/components/accordion/accordion.js +152 -0
- package/dist/versioned-package/components/accordion-group/accordion-group.d.ts +16 -0
- package/dist/versioned-package/components/accordion-group/accordion-group.js +63 -0
- package/dist/versioned-package/components/brandshape/brandshape.d.ts +26 -0
- package/dist/versioned-package/components/brandshape/brandshape.js +115 -0
- package/dist/versioned-package/components/button/button.d.ts +2 -2
- package/dist/versioned-package/components/button/button.js +10 -129
- package/dist/versioned-package/components/divider/divider.d.ts +13 -0
- package/dist/versioned-package/components/divider/divider.js +50 -0
- package/dist/versioned-package/components/icon/icon.d.ts +2 -2
- package/dist/versioned-package/components/icon/icon.js +2 -2
- package/dist/versioned-package/components/icon/library.js +18 -0
- package/dist/versioned-package/components/include/include.d.ts +2 -2
- package/dist/versioned-package/components/include/include.js +1 -1
- package/dist/versioned-package/components/link/link.d.ts +2 -2
- package/dist/versioned-package/components/link/link.js +2 -2
- package/dist/versioned-package/components/spinner/spinner.d.ts +2 -2
- package/dist/versioned-package/components/spinner/spinner.js +2 -2
- package/dist/versioned-package/components/teaser/teaser.d.ts +17 -0
- package/dist/versioned-package/components/teaser/teaser.js +104 -0
- package/dist/versioned-package/internal/animate.d.ts +10 -0
- package/dist/versioned-package/internal/animate.js +41 -0
- package/dist/versioned-package/internal/event.d.ts +1 -0
- package/dist/versioned-package/internal/event.js +14 -0
- package/dist/versioned-package/internal/form.js +1 -1
- package/dist/versioned-package/solid-components.d.ts +6 -0
- package/dist/versioned-package/solid-components.js +23 -10
- package/dist/versioned-package/styles/tailwind.css.js +1 -1
- package/dist/versioned-package/utilities/animation-registry.d.ts +14 -0
- package/dist/versioned-package/utilities/animation-registry.js +35 -0
- package/dist/vscode.html-custom-data.json +259 -5
- package/dist/web-types.json +624 -6
- package/package.json +22 -27
- package/dist/components/es/library.js +0 -1
- package/dist/components/es/library.system.js +0 -1
- package/dist/versioned-components/es/library.js +0 -1
- package/dist/versioned-components/es/library.system.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{x as e,i as
|
|
1
|
+
import{x as e,i as r}from"./lit-element.js";import{S as t,n as s,e as l}from"./solid-element.js";import{L as o}from"./solid-components2.js";import{t as i}from"./classix.js";var a=Object.defineProperty,n=Object.getOwnPropertyDescriptor,p=(e,r,t,s)=>{for(var l,o=s>1?void 0:s?n(r,t):r,i=e.length-1;i>=0;i--)(l=e[i])&&(o=(s?l(r,t,o):l(o))||o);return s&&o&&a(r,t,o),o};let c=class extends t{constructor(){super(...arguments),this.color="currentColor",this.localize=new o(this)}render(){return e`<svg role="progressbar" viewBox="0 0 24 24" class="${i("animate-spin",{primary:"text-primary",white:"text-white",currentColor:""}[this.color])}" aria-label="${this.localize.term("loading")}"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" class="opacity-20" fill="currentColor"/><mask id="mask0_5273_25391" style="mask-type:alpha" maskUnits="userSpaceOnUse"><path d="M24 12C24 5.37258 18.6274 0 12 0V12H24Z" fill="currentColor"/></mask><g mask="url(#mask0_5273_25391)"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" fill="currentColor"/></g></svg>`}};c.styles=[t.styles,r`:host{display:inline-block;width:1em;height:1em}`],p([s({reflect:!0})],c.prototype,"color",2),c=p([l("sd-1-5-0-spinner")],c);export{c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{x as t,i as e}from"./lit-element.js";import{S as i,n as r,e as s}from"./solid-element.js";import{t as a}from"./state.js";import{i as o}from"./query.js";import{H as n}from"./slot.js";import{t as l}from"./classix.js";var h=Object.defineProperty,d=Object.getOwnPropertyDescriptor,p=(t,e,i,r)=>{for(var s,a=r>1?void 0:r?d(e,i):e,o=t.length-1;o>=0;o--)(s=t[o])&&(a=(r?s(e,i,a):s(a))||a);return r&&a&&h(e,i,a),a};let c=class extends i{constructor(){super(...arguments),this.variant="white",this.breakpoint=448,this.inset=!1,this.hasSlotController=new n(this,"[default]","media","meta","headline")}connectedCallback(){super.connectedCallback(),0===this.breakpoint?this._orientation="horizontal":9999===this.breakpoint?this._orientation="vertical":window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>this.updateOrientation())),this.resizeObserver.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver&&this.resizeObserver.disconnect()}updated(t){super.updated(t),t.has("breakpoint")&&this.updateOrientation()}updateOrientation(){this._orientation=this.offsetWidth>=this.breakpoint?"horizontal":"vertical"}render(){"white border-neutral-300"===this.variant&&(this.inset=!0);const e=this.hasSlotController.test("[default]"),i=this.hasSlotController.test("media"),r=this.hasSlotController.test("meta");return this.hasSlotController.test("headline"),t`<div class="${l("flex",{white:"bg-white","white border-neutral-300":"bg-white border border-neutral-300","neutral-100":"bg-neutral-100",primary:"bg-primary text-white","primary-100":"bg-primary-100"}[this.variant],"vertical"===this._orientation&&"flex-col","horizontal"===this._orientation&&"flex-row gap-8","horizontal"===this._orientation&&this.inset&&"py-8 px-10")}" part="base"><div style="${"horizontal"===this._orientation?"width: var(--distribution-media, 100%);":""}" class="${l(!this.inset&&"vertical"===this._orientation&&"mb-4",!i&&"hidden")}" part="media"><slot name="media"></slot></div><div style="${"horizontal"===this._orientation?"width: var(--distribution-content, 100%); "+(this.inset?"width: var(--distribution-content, calc(100% - 2rem));":""):""}" class="${l("flex flex-col text-left","horizontal"===this._orientation&&"flex flex-col","vertical"===this._orientation&&this.inset&&"m-4")}" part="content"><div part="meta" class="${l("gap-2 mb-4",!r&&"hidden")}"><slot name="meta"></slot></div><div part="headline" class="${l("text-lg font-bold m-0","primary"===this.variant?"text-white":"text-black")}"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div part="main" class="${l(!e&&"hidden")}"><slot></slot></div></div></div>`}};c.styles=[i.styles,e`:host{display:block}::slotted(*){margin:0}::slotted([slot=headline]){font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700;margin:0!important}`],p([r({reflect:!0})],c.prototype,"variant",2),p([r({reflect:!0,type:Number})],c.prototype,"breakpoint",2),p([r({type:Boolean,reflect:!0})],c.prototype,"inset",2),p([o('[part="base"]')],c.prototype,"teaser",2),p([a()],c.prototype,"_orientation",2),c=p([s("sd-1-5-0-teaser")],c);export{c as default};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import '../icon/icon';
|
|
2
|
+
import SolidElement from '../../internal/solid-element';
|
|
3
|
+
export default class SdAccordion extends SolidElement {
|
|
4
|
+
private readonly localize;
|
|
5
|
+
accordion: HTMLElement;
|
|
6
|
+
header: HTMLElement;
|
|
7
|
+
body: HTMLElement;
|
|
8
|
+
open: boolean;
|
|
9
|
+
summary: string;
|
|
10
|
+
firstUpdated(): void;
|
|
11
|
+
private handleSummaryClick;
|
|
12
|
+
private handleSummaryKeyDown;
|
|
13
|
+
handleOpenChange(): Promise<void>;
|
|
14
|
+
show(): Promise<void>;
|
|
15
|
+
hide(): Promise<void>;
|
|
16
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
17
|
+
static styles: import("lit").CSSResultGroup[];
|
|
18
|
+
}
|
|
19
|
+
declare global {
|
|
20
|
+
interface HTMLElementTagNameMap {
|
|
21
|
+
'sd-1-5-0-accordion': SdAccordion;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import "../icon/icon.js";
|
|
2
|
+
import { stopAnimations, animateTo, shimKeyframesHeightAuto } from "../../internal/animate.js";
|
|
3
|
+
import { css, html } from "lit";
|
|
4
|
+
import { query, property, customElement } from "lit/decorators.js";
|
|
5
|
+
import { setDefaultAnimation, getAnimation } from "../../utilities/animation-registry.js";
|
|
6
|
+
import { LocalizeController } from "../../utilities/localize.js";
|
|
7
|
+
import { waitForEvent } from "../../internal/event.js";
|
|
8
|
+
import { watch } from "../../internal/watch.js";
|
|
9
|
+
import cx from "classix";
|
|
10
|
+
import SolidElement from "../../internal/solid-element.js";
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
14
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
15
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
16
|
+
if (decorator = decorators[i])
|
|
17
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
18
|
+
if (kind && result)
|
|
19
|
+
__defProp(target, key, result);
|
|
20
|
+
return result;
|
|
21
|
+
};
|
|
22
|
+
let SdAccordion = class extends SolidElement {
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments);
|
|
25
|
+
this.localize = new LocalizeController(this);
|
|
26
|
+
this.open = false;
|
|
27
|
+
}
|
|
28
|
+
firstUpdated() {
|
|
29
|
+
this.body.hidden = !this.open;
|
|
30
|
+
this.body.style.height = this.open ? "auto" : "0";
|
|
31
|
+
}
|
|
32
|
+
handleSummaryClick() {
|
|
33
|
+
this.header.focus();
|
|
34
|
+
if (this.open) {
|
|
35
|
+
this.hide();
|
|
36
|
+
} else {
|
|
37
|
+
this.show();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
handleSummaryKeyDown(event) {
|
|
41
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
42
|
+
event.preventDefault();
|
|
43
|
+
if (this.open) {
|
|
44
|
+
this.hide();
|
|
45
|
+
} else {
|
|
46
|
+
this.show();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (event.key === "ArrowUp" || event.key === "ArrowLeft") {
|
|
50
|
+
event.preventDefault();
|
|
51
|
+
this.hide();
|
|
52
|
+
}
|
|
53
|
+
if (event.key === "ArrowDown" || event.key === "ArrowRight") {
|
|
54
|
+
event.preventDefault();
|
|
55
|
+
this.show();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async handleOpenChange() {
|
|
59
|
+
if (this.open) {
|
|
60
|
+
const slShow = this.emit("sd-show", { cancelable: true });
|
|
61
|
+
if (slShow.defaultPrevented) {
|
|
62
|
+
this.open = false;
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
await stopAnimations(this.body);
|
|
66
|
+
this.body.hidden = false;
|
|
67
|
+
const { keyframes, options } = getAnimation(this, "accordion.show", { dir: this.localize.dir() });
|
|
68
|
+
await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);
|
|
69
|
+
this.body.style.height = "auto";
|
|
70
|
+
this.emit("sd-after-show");
|
|
71
|
+
} else {
|
|
72
|
+
const slHide = this.emit("sd-hide", { cancelable: true });
|
|
73
|
+
if (slHide.defaultPrevented) {
|
|
74
|
+
this.open = true;
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
await stopAnimations(this.body);
|
|
78
|
+
const { keyframes, options } = getAnimation(this, "accordion.hide", { dir: this.localize.dir() });
|
|
79
|
+
await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);
|
|
80
|
+
this.body.hidden = true;
|
|
81
|
+
this.body.style.height = "auto";
|
|
82
|
+
this.emit("sd-after-hide");
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/** Shows the accordion. */
|
|
86
|
+
async show() {
|
|
87
|
+
if (this.open) {
|
|
88
|
+
return void 0;
|
|
89
|
+
}
|
|
90
|
+
this.open = true;
|
|
91
|
+
return waitForEvent(this, "sd-after-show");
|
|
92
|
+
}
|
|
93
|
+
/** Hides the accordion */
|
|
94
|
+
async hide() {
|
|
95
|
+
if (!this.open) {
|
|
96
|
+
return void 0;
|
|
97
|
+
}
|
|
98
|
+
this.open = false;
|
|
99
|
+
return waitForEvent(this, "sd-after-hide");
|
|
100
|
+
}
|
|
101
|
+
render() {
|
|
102
|
+
return html`<div part="base" class="outline outline-1 outline-neutral-400 -outline-offset-1"><header part="header" id="header" class="${cx(
|
|
103
|
+
"flex text-base gap-4 font-bold items-center cursor-pointer select-none px-4 py-3 focus:outline focus:outline-primary focus:outline-2 focus:outline-offset-2 focus-visible:focus",
|
|
104
|
+
this.open ? "bg-white text-accent hover:bg-neutral-200" : "text-primary bg-neutral-100 hover:bg-neutral-200"
|
|
105
|
+
)}" role="button" aria-expanded="${this.open ? "true" : "false"}" aria-controls="content" tabindex="0" @click="${this.handleSummaryClick}" @keydown="${this.handleSummaryKeyDown}"><slot name="summary" part="summary" class="flex flex-auto items-center text-left">${this.summary}</slot><span part="summary-icon" class="${cx(
|
|
106
|
+
"flex flex-grow-0 flex-shrink-0 flex-auto items-center transition-all ease-in-out duration-300 text-xl",
|
|
107
|
+
this.open && "rotate-180"
|
|
108
|
+
)}"><slot name="expand-icon" class="${cx(this.open && "hidden")}"><sd-1-5-0-icon library="system" name="chevron-down"></sd-1-5-0-icon></slot><slot name="collapse-icon" class="${cx(!this.open && "hidden")}"><sd-1-5-0-icon library="system" name="chevron-down"></sd-1-5-0-icon></slot></span></header><div part="content" id="content" class="overflow-hidden"><slot class="block px-4 py-6" role="region" aria-labelledby="header"></slot></div></div>`;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
SdAccordion.styles = [
|
|
112
|
+
SolidElement.styles,
|
|
113
|
+
css`:host{display:block}`
|
|
114
|
+
];
|
|
115
|
+
__decorateClass([
|
|
116
|
+
query('[part="base"]')
|
|
117
|
+
], SdAccordion.prototype, "accordion", 2);
|
|
118
|
+
__decorateClass([
|
|
119
|
+
query('[part="header"]')
|
|
120
|
+
], SdAccordion.prototype, "header", 2);
|
|
121
|
+
__decorateClass([
|
|
122
|
+
query('[part="content"]')
|
|
123
|
+
], SdAccordion.prototype, "body", 2);
|
|
124
|
+
__decorateClass([
|
|
125
|
+
property({ type: Boolean, reflect: true })
|
|
126
|
+
], SdAccordion.prototype, "open", 2);
|
|
127
|
+
__decorateClass([
|
|
128
|
+
property()
|
|
129
|
+
], SdAccordion.prototype, "summary", 2);
|
|
130
|
+
__decorateClass([
|
|
131
|
+
watch("open", { waitUntilFirstUpdate: true })
|
|
132
|
+
], SdAccordion.prototype, "handleOpenChange", 1);
|
|
133
|
+
SdAccordion = __decorateClass([
|
|
134
|
+
customElement("sd-1-5-0-accordion")
|
|
135
|
+
], SdAccordion);
|
|
136
|
+
setDefaultAnimation("accordion.show", {
|
|
137
|
+
keyframes: [
|
|
138
|
+
{ height: "0", opacity: "0" },
|
|
139
|
+
{ height: "auto", opacity: "1" }
|
|
140
|
+
],
|
|
141
|
+
options: { duration: 300, easing: "ease" }
|
|
142
|
+
});
|
|
143
|
+
setDefaultAnimation("accordion.hide", {
|
|
144
|
+
keyframes: [
|
|
145
|
+
{ height: "auto", opacity: "1" },
|
|
146
|
+
{ height: "0", opacity: "0" }
|
|
147
|
+
],
|
|
148
|
+
options: { duration: 300, easing: "ease" }
|
|
149
|
+
});
|
|
150
|
+
export {
|
|
151
|
+
SdAccordion as default
|
|
152
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import '../accordion/accordion';
|
|
2
|
+
import SolidElement from '../../internal/solid-element';
|
|
3
|
+
export default class SdAccordionGroup extends SolidElement {
|
|
4
|
+
_accordionsInDefaultSlot: HTMLElement[];
|
|
5
|
+
closeOthers: boolean;
|
|
6
|
+
connectedCallback(): void;
|
|
7
|
+
disconnectedCallback(): void;
|
|
8
|
+
private handleAccordionShow;
|
|
9
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
10
|
+
static styles: import("lit").CSSResultGroup[];
|
|
11
|
+
}
|
|
12
|
+
declare global {
|
|
13
|
+
interface HTMLElementTagNameMap {
|
|
14
|
+
'sd-1-5-0-accordion-group': SdAccordionGroup;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import "../accordion/accordion.js";
|
|
2
|
+
import { css, html } from "lit";
|
|
3
|
+
import { queryAssignedElements, property, customElement } from "lit/decorators.js";
|
|
4
|
+
import componentStyles from "../../styles/component.styles.js";
|
|
5
|
+
import SolidElement from "../../internal/solid-element.js";
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
9
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
10
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11
|
+
if (decorator = decorators[i])
|
|
12
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
13
|
+
if (kind && result)
|
|
14
|
+
__defProp(target, key, result);
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
17
|
+
let SdAccordionGroup = class extends SolidElement {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.closeOthers = false;
|
|
21
|
+
this.handleAccordionShow = (event) => {
|
|
22
|
+
if (this.closeOthers) {
|
|
23
|
+
this._accordionsInDefaultSlot.forEach((accordionElement) => {
|
|
24
|
+
if (accordionElement === event.target) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (accordionElement.parentNode !== event.target.parentNode) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
accordionElement.removeAttribute("open");
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
connectedCallback() {
|
|
36
|
+
super.connectedCallback();
|
|
37
|
+
this.addEventListener("sd-show", this.handleAccordionShow);
|
|
38
|
+
}
|
|
39
|
+
disconnectedCallback() {
|
|
40
|
+
super.disconnectedCallback();
|
|
41
|
+
this.removeEventListener("sd-show", this.handleAccordionShow);
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
return html`<div part="base"><slot></slot></div>`;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
SdAccordionGroup.styles = [
|
|
48
|
+
componentStyles,
|
|
49
|
+
SolidElement.styles,
|
|
50
|
+
css`:host{display:block}::slotted(sd-1-5-0-accordion:not(:first-of-type)){margin-top:-1px}`
|
|
51
|
+
];
|
|
52
|
+
__decorateClass([
|
|
53
|
+
queryAssignedElements({ selector: "sd-1-5-0-accordion" })
|
|
54
|
+
], SdAccordionGroup.prototype, "_accordionsInDefaultSlot", 2);
|
|
55
|
+
__decorateClass([
|
|
56
|
+
property({ attribute: "close-others", type: Boolean })
|
|
57
|
+
], SdAccordionGroup.prototype, "closeOthers", 2);
|
|
58
|
+
SdAccordionGroup = __decorateClass([
|
|
59
|
+
customElement("sd-1-5-0-accordion-group")
|
|
60
|
+
], SdAccordionGroup);
|
|
61
|
+
export {
|
|
62
|
+
SdAccordionGroup as default
|
|
63
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import SolidElement from '../../internal/solid-element';
|
|
2
|
+
import type { TemplateResult } from 'lit-html';
|
|
3
|
+
export default class SdBrandshape extends SolidElement {
|
|
4
|
+
containerElem: HTMLElement;
|
|
5
|
+
variant: 'neutral-100' | 'primary' | 'white';
|
|
6
|
+
shapes: ('top' | 'middle' | 'bottom')[];
|
|
7
|
+
private componentBreakpoint;
|
|
8
|
+
private resizeObserver;
|
|
9
|
+
private getSvg;
|
|
10
|
+
private largeSvg;
|
|
11
|
+
private mediumSvg;
|
|
12
|
+
private smallSvg;
|
|
13
|
+
private setBreakpoint;
|
|
14
|
+
connectedCallback(): void;
|
|
15
|
+
disconnectedCallback(): void;
|
|
16
|
+
private renderTopBrandshape;
|
|
17
|
+
private renderMiddleBrandshape;
|
|
18
|
+
private renderBottomBrandshape;
|
|
19
|
+
render(): TemplateResult<1>;
|
|
20
|
+
static styles: import("lit").CSSResultGroup[];
|
|
21
|
+
}
|
|
22
|
+
declare global {
|
|
23
|
+
interface HTMLElementTagNameMap {
|
|
24
|
+
'sd-1-5-0-brandshape': SdBrandshape;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { css, html } from "lit";
|
|
2
|
+
import { query, property, state, customElement } from "lit/decorators.js";
|
|
3
|
+
import componentStyles from "../../styles/component.styles.js";
|
|
4
|
+
import cx from "classix";
|
|
5
|
+
import SolidElement from "../../internal/solid-element.js";
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
9
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
10
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11
|
+
if (decorator = decorators[i])
|
|
12
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
13
|
+
if (kind && result)
|
|
14
|
+
__defProp(target, key, result);
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
17
|
+
let SdBrandshape = class extends SolidElement {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.variant = "primary";
|
|
21
|
+
this.shapes = ["top", "middle", "bottom"];
|
|
22
|
+
this.componentBreakpoint = 0;
|
|
23
|
+
}
|
|
24
|
+
getSvg(breakpoint, shape) {
|
|
25
|
+
return {
|
|
26
|
+
0: this.smallSvg(shape),
|
|
27
|
+
414: this.mediumSvg(shape),
|
|
28
|
+
640: this.largeSvg(shape)
|
|
29
|
+
}[breakpoint];
|
|
30
|
+
}
|
|
31
|
+
largeSvg(shape) {
|
|
32
|
+
return shape === "top" ? html`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121" part="shape-top"><path d="M610.777 1.393.001 120.146 0 123h700.001V74.79c0-4.797-.462-9.585-1.381-14.294-7.909-40.537-47.237-66.998-87.843-59.103Z"/></svg>` : html`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 123" part="shape-bottom"><path d="M89.224 121.607 700 2.854 700.001 0h-700L0 48.21c0 4.797.463 9.584 1.381 14.294 7.909 40.537 47.237 66.998 87.843 59.103Z"/></svg>`;
|
|
33
|
+
}
|
|
34
|
+
mediumSvg(shape) {
|
|
35
|
+
return shape === "top" ? html`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 119" part="shape-top"><path d="M597.75 1.6 0 118.046V121h700V85.872c0-5.509-.53-11.006-1.583-16.413-9.063-46.543-54.133-76.924-100.667-67.86Z"/></svg>` : html`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121" part="shape-bottom"><path d="M102.25 119.4 700 2.954V0H0v35.128c0 5.509.53 11.006 1.583 16.413 9.063 46.543 54.134 76.924 100.667 67.859Z"/></svg>`;
|
|
36
|
+
}
|
|
37
|
+
smallSvg(shape) {
|
|
38
|
+
return shape === "top" ? html`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 113" part="shape-top"><path d="M566.951 2.08 0 112.466v2.934h700v-3.672c0-7.166-.689-14.314-2.059-21.348-11.789-60.557-70.436-100.09-130.99-88.3Z"/></svg>` : html`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 116" part="shape-bottom"><path d="M133.049 113.32 700 2.934V0H0v3.672c0 7.165.69 14.314 2.059 21.348 11.79 60.557 70.436 100.09 130.99 88.3Z"/></svg>`;
|
|
39
|
+
}
|
|
40
|
+
setBreakpoint() {
|
|
41
|
+
switch (true) {
|
|
42
|
+
case this.containerElem.clientWidth <= 414:
|
|
43
|
+
this.componentBreakpoint = 0;
|
|
44
|
+
break;
|
|
45
|
+
case this.containerElem.clientWidth < 640:
|
|
46
|
+
this.componentBreakpoint = 414;
|
|
47
|
+
break;
|
|
48
|
+
default:
|
|
49
|
+
this.componentBreakpoint = 640;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
connectedCallback() {
|
|
53
|
+
super.connectedCallback();
|
|
54
|
+
this.resizeObserver = new ResizeObserver(() => this.setBreakpoint());
|
|
55
|
+
this.updateComplete.then(() => {
|
|
56
|
+
this.setBreakpoint();
|
|
57
|
+
this.resizeObserver.observe(this.containerElem);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
disconnectedCallback() {
|
|
61
|
+
super.disconnectedCallback();
|
|
62
|
+
this.resizeObserver.unobserve(this.containerElem);
|
|
63
|
+
}
|
|
64
|
+
renderTopBrandshape() {
|
|
65
|
+
return this.shapes.length === 1 ? html`<div class="relative">${this.getSvg(this.componentBreakpoint, "top")}<div part="content" class="absolute bottom-0 right-0 flex items-end w-2/5 h-2/3 px-6 py-4"><slot></slot></div></div>` : this.getSvg(this.componentBreakpoint, "top");
|
|
66
|
+
}
|
|
67
|
+
renderMiddleBrandshape() {
|
|
68
|
+
return html`<div class="${cx(
|
|
69
|
+
{ 0: "px-6 py-4", 414: "px-10 py-8", 640: "px-10 py-8" }[this.componentBreakpoint],
|
|
70
|
+
"w-full block relative"
|
|
71
|
+
)}"><div part="shape-middle" class="${cx(
|
|
72
|
+
{
|
|
73
|
+
"neutral-100": "bg-neutral-100",
|
|
74
|
+
primary: "bg-primary",
|
|
75
|
+
white: "bg-white"
|
|
76
|
+
}[this.variant],
|
|
77
|
+
"w-full block absolute h-full top-0 left-0 z-0"
|
|
78
|
+
)}"></div><div class="z-10 relative" part="content"><slot></slot></div></div>`;
|
|
79
|
+
}
|
|
80
|
+
renderBottomBrandshape() {
|
|
81
|
+
return this.getSvg(this.componentBreakpoint, "bottom");
|
|
82
|
+
}
|
|
83
|
+
render() {
|
|
84
|
+
return html`<div class="${cx(
|
|
85
|
+
{
|
|
86
|
+
"neutral-100": "fill-neutral-100",
|
|
87
|
+
primary: "fill-primary",
|
|
88
|
+
white: "fill-white"
|
|
89
|
+
}[this.variant]
|
|
90
|
+
)}" part="base">${this.shapes.includes("top") ? this.renderTopBrandshape() : null} ${this.shapes.includes("middle") ? this.renderMiddleBrandshape() : null} ${this.shapes.includes("bottom") ? this.renderBottomBrandshape() : null}</div>`;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
SdBrandshape.styles = [
|
|
94
|
+
componentStyles,
|
|
95
|
+
SolidElement.styles,
|
|
96
|
+
css`:host{display:block}`
|
|
97
|
+
];
|
|
98
|
+
__decorateClass([
|
|
99
|
+
query("[part=base]")
|
|
100
|
+
], SdBrandshape.prototype, "containerElem", 2);
|
|
101
|
+
__decorateClass([
|
|
102
|
+
property({ type: String })
|
|
103
|
+
], SdBrandshape.prototype, "variant", 2);
|
|
104
|
+
__decorateClass([
|
|
105
|
+
property({ type: Array })
|
|
106
|
+
], SdBrandshape.prototype, "shapes", 2);
|
|
107
|
+
__decorateClass([
|
|
108
|
+
state()
|
|
109
|
+
], SdBrandshape.prototype, "componentBreakpoint", 2);
|
|
110
|
+
SdBrandshape = __decorateClass([
|
|
111
|
+
customElement("sd-1-5-0-brandshape")
|
|
112
|
+
], SdBrandshape);
|
|
113
|
+
export {
|
|
114
|
+
SdBrandshape as default
|
|
115
|
+
};
|
|
@@ -38,11 +38,11 @@ export default class SdButton extends SolidElement implements SolidFormControl {
|
|
|
38
38
|
checkValidity(): boolean;
|
|
39
39
|
reportValidity(): boolean;
|
|
40
40
|
setCustomValidity(message: string): void;
|
|
41
|
-
render(): import("lit").TemplateResult;
|
|
41
|
+
render(): import("lit-html").TemplateResult;
|
|
42
42
|
static styles: import("lit").CSSResultGroup[];
|
|
43
43
|
}
|
|
44
44
|
declare global {
|
|
45
45
|
interface HTMLElementTagNameMap {
|
|
46
|
-
'sd-1-
|
|
46
|
+
'sd-1-5-0-button': SdButton;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -123,10 +123,7 @@ let SdButton = class extends SolidElement {
|
|
|
123
123
|
"icon-right": this.hasSlotController.test("icon-right"),
|
|
124
124
|
"icon-only": this._iconsInDefaultSlot.length > 0
|
|
125
125
|
};
|
|
126
|
-
return html
|
|
127
|
-
<${tag}
|
|
128
|
-
part="base"
|
|
129
|
-
class=${cx(
|
|
126
|
+
return html`<${tag} part="base" class="${cx(
|
|
130
127
|
`font-md leading-[calc(var(--tw-varspacing)-2px)] no-underline
|
|
131
128
|
w-full h-varspacing whitespace-nowrap align-middle inline-flex items-stretch justify-center
|
|
132
129
|
border transition-colors duration-200 ease-in-out rounded-md
|
|
@@ -168,28 +165,11 @@ let SdButton = class extends SolidElement {
|
|
|
168
165
|
active:text-primary-200 active:bg-primary-800
|
|
169
166
|
disabled:text-neutral-600`,
|
|
170
167
|
cta: `text-white bg-accent border-transparent
|
|
171
|
-
hover:bg-accent-
|
|
172
|
-
active:bg-accent-
|
|
168
|
+
hover:bg-accent-550
|
|
169
|
+
active:bg-accent-700
|
|
173
170
|
${!this.inverted ? "disabled:bg-neutral-500" : "disabled:bg-neutral-600"} disabled:text-white`
|
|
174
171
|
}[this.variant]
|
|
175
|
-
)}
|
|
176
|
-
?disabled=${ifDefined(isLink ? void 0 : this.disabled)}
|
|
177
|
-
type=${ifDefined(isLink ? void 0 : this.type)}
|
|
178
|
-
title=${this.title}
|
|
179
|
-
name=${ifDefined(isLink ? void 0 : this.name)}
|
|
180
|
-
value=${ifDefined(isLink ? void 0 : this.value)}
|
|
181
|
-
href=${ifDefined(isLink ? this.href : void 0)}
|
|
182
|
-
target=${ifDefined(isLink ? this.target : void 0)}
|
|
183
|
-
download=${ifDefined(isLink ? this.download : void 0)}
|
|
184
|
-
rel=${ifDefined(isLink && this.target ? "noreferrer noopener" : void 0)}
|
|
185
|
-
role=${ifDefined(isLink ? void 0 : "button")}
|
|
186
|
-
aria-disabled=${this.disabled ? "true" : "false"}
|
|
187
|
-
tabindex=${this.disabled ? "-1" : "0"}
|
|
188
|
-
@blur=${this.handleBlur}
|
|
189
|
-
@focus=${this.handleFocus}
|
|
190
|
-
@click=${this.handleClick}
|
|
191
|
-
>
|
|
192
|
-
<slot name="icon-left" part="icon-left" class=${cx(
|
|
172
|
+
)}" ?disabled="${ifDefined(isLink ? void 0 : this.disabled)}" type="${ifDefined(isLink ? void 0 : this.type)}" title="${this.title}" name="${ifDefined(isLink ? void 0 : this.name)}" value="${ifDefined(isLink ? void 0 : this.value)}" href="${ifDefined(isLink ? this.href : void 0)}" target="${ifDefined(isLink ? this.target : void 0)}" download="${ifDefined(isLink ? this.download : void 0)}" rel="${ifDefined(isLink && this.target ? "noreferrer noopener" : void 0)}" role="${ifDefined(isLink ? void 0 : "button")}" aria-disabled="${this.disabled ? "true" : "false"}" tabindex="${this.disabled ? "-1" : "0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon-left" part="icon-left" class="${cx(
|
|
193
173
|
"flex flex-auto items-center pointer-events-none",
|
|
194
174
|
slots["icon-only"] && "hidden",
|
|
195
175
|
this.loading && "invisible",
|
|
@@ -198,14 +178,10 @@ let SdButton = class extends SolidElement {
|
|
|
198
178
|
md: "mr-2",
|
|
199
179
|
lg: "mr-2"
|
|
200
180
|
}[this.size]
|
|
201
|
-
)}></slot
|
|
202
|
-
<slot part="label" class=${cx(
|
|
181
|
+
)}"></slot><slot part="label" class="${cx(
|
|
203
182
|
slots["icon-only"] ? "flex flex-auto items-center pointer-events-none" : "inline-block",
|
|
204
183
|
this.loading && "invisible"
|
|
205
|
-
)}></slot
|
|
206
|
-
<slot name="icon-right"
|
|
207
|
-
part="icon-right"
|
|
208
|
-
class=${cx(
|
|
184
|
+
)}"></slot><slot name="icon-right" part="icon-right" class="${cx(
|
|
209
185
|
"flex flex-auto items-center pointer-events-none",
|
|
210
186
|
this.loading && "invisible",
|
|
211
187
|
slots["icon-only"] && "hidden",
|
|
@@ -214,114 +190,19 @@ let SdButton = class extends SolidElement {
|
|
|
214
190
|
md: "ml-2",
|
|
215
191
|
lg: "ml-2"
|
|
216
192
|
}[this.size]
|
|
217
|
-
)}
|
|
218
|
-
</slot>
|
|
219
|
-
${this.loading ? html`<sd-1-3-13-spinner
|
|
220
|
-
class="${cx("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"
|
|
221
|
-
></sd-1-3-13-spinner>` : ""}
|
|
222
|
-
</${tag}>
|
|
223
|
-
`;
|
|
193
|
+
)}"></slot>${this.loading ? html`<sd-1-5-0-spinner class="${cx("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-1-5-0-spinner>` : ""}</${tag}>`;
|
|
224
194
|
}
|
|
225
195
|
};
|
|
226
196
|
SdButton.styles = [
|
|
227
197
|
componentStyles,
|
|
228
198
|
SolidElement.styles,
|
|
229
|
-
css`
|
|
230
|
-
:host {
|
|
231
|
-
display: inline-block;
|
|
232
|
-
position: relative;
|
|
233
|
-
width: auto;
|
|
234
|
-
cursor: pointer;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
sd-1-3-13-spinner {
|
|
238
|
-
--indicator-color: currentColor;
|
|
239
|
-
--track-color: var(--tw-varcolor-200);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/*
|
|
243
|
-
* Badges:
|
|
244
|
-
* Slotted badges are positioned absolutely in the top right corner of the button.
|
|
245
|
-
*/
|
|
246
|
-
|
|
247
|
-
::slotted(sd-badge) {
|
|
248
|
-
position: absolute;
|
|
249
|
-
top: 0;
|
|
250
|
-
right: 0;
|
|
251
|
-
translate: 50% -50%;
|
|
252
|
-
pointer-events: none;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* sd-1-3-13-icons should automatically resize correctly based on the button size.
|
|
257
|
-
*/
|
|
258
|
-
|
|
259
|
-
::slotted(sd-1-3-13-icon),
|
|
260
|
-
sd-1-3-13-spinner {
|
|
261
|
-
font-size: calc(var(--tw-varspacing) / 2);
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
///*
|
|
265
|
-
// * Button groups support a variety of button types (e.g. buttons with tooltips, buttons as dropdown triggers, etc.).
|
|
266
|
-
// * This means buttons aren't always direct descendants of the button group, thus we can't target them with the
|
|
267
|
-
// * ::slotted selector. To work around this, the button group component does some magic to add these special classes to
|
|
268
|
-
// * buttons and we style them here instead.
|
|
269
|
-
// */
|
|
270
|
-
|
|
271
|
-
// :host(.sd-1-3-13-button-group__button--first:not(.sd-1-3-13-button-group__button--last)) .button {
|
|
272
|
-
// border-start-end-radius: 0;
|
|
273
|
-
// border-end-end-radius: 0;
|
|
274
|
-
// }
|
|
275
|
-
|
|
276
|
-
// :host(.sd-1-3-13-button-group__button--inner) .button {
|
|
277
|
-
// border-radius: 0;
|
|
278
|
-
// }
|
|
279
|
-
|
|
280
|
-
// :host(.sd-1-3-13-button-group__button--last:not(.sd-1-3-13-button-group__button--first)) .button {
|
|
281
|
-
// border-start-start-radius: 0;
|
|
282
|
-
// border-end-start-radius: 0;
|
|
283
|
-
// }
|
|
284
|
-
|
|
285
|
-
// /* All except the first */
|
|
286
|
-
// :host(.sd-1-3-13-button-group__button:not(.sd-1-3-13-button-group__button--first)) {
|
|
287
|
-
// margin-inline-start: calc(-1 * var(--sd-input-border-width));
|
|
288
|
-
// }
|
|
289
|
-
|
|
290
|
-
// /* Add a visual separator between solid buttons */
|
|
291
|
-
// :host(
|
|
292
|
-
// .sd-1-3-13-button-group__button:not(
|
|
293
|
-
// .sd-1-3-13-button-group__button--first,
|
|
294
|
-
// .sd-1-3-13-button-group__button--radio,
|
|
295
|
-
// [variant='default']
|
|
296
|
-
// ):not(:hover)
|
|
297
|
-
// )
|
|
298
|
-
// .button:after {
|
|
299
|
-
// content: '';
|
|
300
|
-
// position: absolute;
|
|
301
|
-
// top: 0;
|
|
302
|
-
// inset-inline-start: 0;
|
|
303
|
-
// bottom: 0;
|
|
304
|
-
// border-left: solid 1px rgb(128 128 128 / 33%);
|
|
305
|
-
// mix-blend-mode: multiply;
|
|
306
|
-
// }
|
|
307
|
-
|
|
308
|
-
// /* Bump hovered, focused, and checked buttons up so their focus ring isn't clipped */
|
|
309
|
-
// :host(.sd-1-3-13-button-group__button--hover) {
|
|
310
|
-
// z-index: 1;
|
|
311
|
-
// }
|
|
312
|
-
|
|
313
|
-
// /* Focus and checked are always on top */
|
|
314
|
-
// :host(.sd-1-3-13-button-group__button--focus),
|
|
315
|
-
// :host(.sd-1-3-13-button-group__button[checked]) {
|
|
316
|
-
// z-index: 2;
|
|
317
|
-
// }
|
|
318
|
-
`
|
|
199
|
+
css`:host{display:inline-block;position:relative;width:auto;cursor:pointer}sd-1-5-0-spinner{--indicator-color:currentColor;--track-color:var(--tw-varcolor-200)}::slotted(sd-badge){position:absolute;top:0;right:0;translate:50% -50%;pointer-events:none}::slotted(sd-1-5-0-icon),sd-1-5-0-spinner{font-size:calc(var(--tw-varspacing)/ 2)}`
|
|
319
200
|
];
|
|
320
201
|
__decorateClass([
|
|
321
202
|
query("a, button")
|
|
322
203
|
], SdButton.prototype, "button", 2);
|
|
323
204
|
__decorateClass([
|
|
324
|
-
queryAssignedElements({ selector: "sd-1-
|
|
205
|
+
queryAssignedElements({ selector: "sd-1-5-0-icon" })
|
|
325
206
|
], SdButton.prototype, "_iconsInDefaultSlot", 2);
|
|
326
207
|
__decorateClass([
|
|
327
208
|
state()
|
|
@@ -384,7 +265,7 @@ __decorateClass([
|
|
|
384
265
|
watch("disabled", { waitUntilFirstUpdate: true })
|
|
385
266
|
], SdButton.prototype, "handleDisabledChange", 1);
|
|
386
267
|
SdButton = __decorateClass([
|
|
387
|
-
customElement("sd-1-
|
|
268
|
+
customElement("sd-1-5-0-button")
|
|
388
269
|
], SdButton);
|
|
389
270
|
export {
|
|
390
271
|
SdButton as default
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import SolidElement from '../../internal/solid-element';
|
|
2
|
+
export default class SdDivider extends SolidElement {
|
|
3
|
+
orientation: 'horizontal' | 'vertical';
|
|
4
|
+
inverted: boolean;
|
|
5
|
+
connectedCallback(): void;
|
|
6
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
7
|
+
static styles: import("lit").CSSResultGroup[];
|
|
8
|
+
}
|
|
9
|
+
declare global {
|
|
10
|
+
interface HTMLElementTagNameMap {
|
|
11
|
+
'sd-1-5-0-divider': SdDivider;
|
|
12
|
+
}
|
|
13
|
+
}
|