@solid-design-system/components 4.0.0-next.2 → 4.0.0-next.4
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/cdn/chunks/chunk.3ATYVOO4.js +1 -0
- package/cdn/chunks/chunk.4HIKTDIM.js +40 -0
- package/cdn/chunks/chunk.C2PA7CKF.js +1 -0
- package/cdn/chunks/{chunk.IVXFAQNG.js → chunk.DEX5VJGX.js} +1 -1
- package/cdn/chunks/{chunk.BTRVMAGL.js → chunk.DMLGBWCL.js} +1 -1
- package/cdn/chunks/{chunk.GUOHZTA7.js → chunk.F7J6HN76.js} +1 -1
- package/cdn/chunks/chunk.ITRQVXFY.js +1 -0
- package/cdn/chunks/{chunk.E7HNNYP6.js → chunk.MX22EZXK.js} +1 -1
- package/cdn/chunks/{chunk.5BROLR6V.js → chunk.ROBLMI7Q.js} +1 -1
- package/cdn/chunks/{chunk.WMRFVNYU.js → chunk.ZRIABVVM.js} +1 -1
- package/cdn/components/accordion/accordion.d.ts +5 -3
- package/cdn/components/accordion/accordion.js +1 -1
- package/cdn/components/accordion-group/accordion-group.js +1 -1
- package/cdn/components/button/button.js +1 -1
- package/cdn/components/combobox/combobox.js +1 -1
- package/cdn/components/dialog/dialog.js +1 -1
- package/cdn/components/drawer/drawer.js +1 -1
- package/cdn/components/flipcard/flipcard.js +1 -1
- package/cdn/components/map-marker/map-marker.js +1 -1
- package/cdn/components/navigation-item/navigation-item.js +1 -1
- package/cdn/components/quickfact/quickfact.d.ts +1 -1
- package/cdn/components/quickfact/quickfact.js +1 -1
- package/cdn/components/select/select.js +1 -1
- package/cdn/components/step/step.js +1 -1
- package/cdn/components/tab/tab.d.ts +1 -0
- package/cdn/components/tab/tab.js +1 -1
- package/cdn/components/tag/tag.js +1 -1
- package/cdn/custom-elements.json +19 -1
- package/cdn/solid-components.bundle.js +52 -13
- package/cdn/solid-components.iife.js +52 -13
- package/cdn/solid-components.js +1 -1
- package/cdn/web-types.json +3 -1
- package/cdn-versioned/_components/menu/menu.js +1 -1
- package/cdn-versioned/_components/menu/menu.styles.js +1 -1
- package/cdn-versioned/_components/menu-item/menu-item.js +2 -2
- package/cdn-versioned/chunks/chunk.24SF73MY.js +1 -1
- package/cdn-versioned/chunks/chunk.36Z2VDHI.js +1 -1
- package/cdn-versioned/chunks/chunk.3ATYVOO4.js +1 -0
- package/cdn-versioned/chunks/chunk.4HIKTDIM.js +40 -0
- package/cdn-versioned/chunks/chunk.4W3WLVGR.js +1 -1
- package/cdn-versioned/chunks/chunk.5ZDWEJDB.js +1 -1
- package/cdn-versioned/chunks/chunk.65NSSTJE.js +1 -1
- package/cdn-versioned/chunks/chunk.6JBTCFHE.js +2 -2
- package/cdn-versioned/chunks/chunk.7M7VCE7R.js +1 -1
- package/cdn-versioned/chunks/chunk.7RJ3O2FV.js +1 -1
- package/cdn-versioned/chunks/chunk.APMDRZQD.js +1 -1
- package/cdn-versioned/chunks/chunk.C2PA7CKF.js +1 -0
- package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
- package/cdn-versioned/chunks/{chunk.IVXFAQNG.js → chunk.DEX5VJGX.js} +4 -4
- package/cdn-versioned/chunks/{chunk.BTRVMAGL.js → chunk.DMLGBWCL.js} +1 -1
- package/cdn-versioned/chunks/chunk.DVHKKAVM.js +1 -1
- package/cdn-versioned/chunks/chunk.EWWGLHC5.js +1 -1
- package/cdn-versioned/chunks/{chunk.GUOHZTA7.js → chunk.F7J6HN76.js} +1 -1
- package/cdn-versioned/chunks/chunk.FD54463O.js +1 -1
- package/cdn-versioned/chunks/chunk.FFNTXFC3.js +1 -1
- package/cdn-versioned/chunks/chunk.FX3ED655.js +1 -1
- package/cdn-versioned/chunks/chunk.GOVNZSCO.js +1 -1
- package/cdn-versioned/chunks/chunk.GQSLHWQC.js +1 -1
- package/cdn-versioned/chunks/chunk.ISEQUO4U.js +1 -1
- package/cdn-versioned/chunks/chunk.ITRQVXFY.js +1 -0
- package/cdn-versioned/chunks/chunk.IZKUI5WK.js +1 -1
- package/cdn-versioned/chunks/chunk.KMLMMBY4.js +1 -1
- package/cdn-versioned/chunks/chunk.LLXTYJXF.js +1 -1
- package/cdn-versioned/chunks/chunk.LZEFLOSA.js +1 -1
- package/cdn-versioned/chunks/chunk.MPP7HYX7.js +1 -1
- package/cdn-versioned/chunks/{chunk.E7HNNYP6.js → chunk.MX22EZXK.js} +1 -1
- package/cdn-versioned/chunks/chunk.ND7BT52X.js +1 -1
- package/cdn-versioned/chunks/chunk.NUB5WHGD.js +1 -1
- package/cdn-versioned/chunks/chunk.O4UXOQEI.js +1 -1
- package/cdn-versioned/chunks/chunk.OVV7TNT2.js +1 -1
- package/cdn-versioned/chunks/chunk.PBPFKJKV.js +1 -1
- package/cdn-versioned/chunks/chunk.QFNCQQ6S.js +1 -1
- package/cdn-versioned/chunks/chunk.QNZWJACC.js +2 -2
- package/cdn-versioned/chunks/chunk.R354E6ZD.js +1 -1
- package/cdn-versioned/chunks/{chunk.5BROLR6V.js → chunk.ROBLMI7Q.js} +4 -4
- package/cdn-versioned/chunks/chunk.SNUMAAEG.js +1 -1
- package/cdn-versioned/chunks/chunk.TA7CZCP3.js +1 -1
- package/cdn-versioned/chunks/chunk.U443X4TI.js +1 -1
- package/cdn-versioned/chunks/chunk.UBFU6D5B.js +1 -1
- package/cdn-versioned/chunks/chunk.URB2K7JQ.js +1 -1
- package/cdn-versioned/chunks/chunk.VNKUGTKM.js +1 -1
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WENTMXB2.js +1 -1
- package/cdn-versioned/chunks/chunk.WGNXYONB.js +1 -1
- package/cdn-versioned/chunks/chunk.WQAPHFVM.js +1 -1
- package/cdn-versioned/chunks/chunk.YF5WEC4R.js +2 -2
- package/cdn-versioned/chunks/chunk.ZFA2VPUT.js +1 -1
- package/cdn-versioned/chunks/{chunk.WMRFVNYU.js → chunk.ZRIABVVM.js} +2 -2
- package/cdn-versioned/components/accordion/accordion.d.ts +6 -4
- package/cdn-versioned/components/accordion/accordion.js +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.js +1 -1
- package/cdn-versioned/components/animation/animation.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.d.ts +1 -1
- package/cdn-versioned/components/badge/badge.d.ts +1 -1
- package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/cdn-versioned/components/button/button.d.ts +1 -1
- package/cdn-versioned/components/button/button.js +1 -1
- package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.d.ts +4 -4
- package/cdn-versioned/components/combobox/combobox.js +1 -1
- package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
- package/cdn-versioned/components/dialog/dialog.js +1 -1
- package/cdn-versioned/components/divider/divider.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.js +1 -1
- package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
- package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/cdn-versioned/components/flipcard/flipcard.js +1 -1
- package/cdn-versioned/components/header/header.d.ts +1 -1
- package/cdn-versioned/components/icon/icon.d.ts +1 -1
- package/cdn-versioned/components/include/include.d.ts +1 -1
- package/cdn-versioned/components/input/input.d.ts +1 -1
- package/cdn-versioned/components/link/link.d.ts +1 -1
- package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/cdn-versioned/components/map-marker/map-marker.js +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.js +1 -1
- package/cdn-versioned/components/notification/notification.d.ts +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +2 -2
- package/cdn-versioned/components/option/option.d.ts +1 -1
- package/cdn-versioned/components/popup/popup.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.d.ts +2 -2
- package/cdn-versioned/components/quickfact/quickfact.js +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +2 -2
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/select/select.d.ts +4 -4
- package/cdn-versioned/components/select/select.js +1 -1
- package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
- package/cdn-versioned/components/step/step.d.ts +1 -1
- package/cdn-versioned/components/step/step.js +1 -1
- package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
- package/cdn-versioned/components/switch/switch.d.ts +1 -1
- package/cdn-versioned/components/tab/tab.d.ts +2 -1
- package/cdn-versioned/components/tab/tab.js +1 -1
- package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/cdn-versioned/components/tag/tag.d.ts +1 -1
- package/cdn-versioned/components/tag/tag.js +1 -1
- package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
- package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/cdn-versioned/components/video/video.d.ts +1 -1
- package/cdn-versioned/custom-elements.json +220 -202
- package/cdn-versioned/internal/form.js +3 -3
- package/cdn-versioned/solid-components.bundle.js +54 -15
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +54 -15
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +80 -80
- package/cdn-versioned/web-types.json +139 -137
- package/dist/chunks/{chunk.6JI7NL3E.js → chunk.4JZQQD4L.js} +48 -6
- package/dist/chunks/{chunk.7BEDTYS7.js → chunk.743FPQRN.js} +8 -1
- package/dist/chunks/{chunk.DAM3ICHP.js → chunk.TWXYFPBS.js} +31 -5
- package/dist/components/accordion/accordion.d.ts +5 -3
- package/dist/components/accordion/accordion.js +1 -1
- package/dist/components/accordion-group/accordion-group.js +1 -1
- package/dist/components/quickfact/quickfact.d.ts +1 -1
- package/dist/components/quickfact/quickfact.js +2 -2
- package/dist/components/tab/tab.d.ts +1 -0
- package/dist/components/tab/tab.js +2 -1
- package/dist/custom-elements.json +19 -1
- package/dist/solid-components.js +3 -3
- package/dist/web-types.json +3 -1
- package/dist-versioned/_components/menu/menu.js +1 -1
- package/dist-versioned/_components/menu/menu.styles.js +1 -1
- package/dist-versioned/_components/menu-item/menu-item.js +2 -2
- package/dist-versioned/chunks/chunk.2IBVAXOX.js +1 -1
- package/dist-versioned/chunks/chunk.3IT4HBTI.js +1 -1
- package/dist-versioned/chunks/chunk.3LGDUVS4.js +2 -2
- package/dist-versioned/chunks/chunk.4JZQQD4L.js +107 -0
- package/dist-versioned/chunks/chunk.4QKRGAOL.js +4 -4
- package/dist-versioned/chunks/chunk.4RGGPCD5.js +2 -2
- package/dist-versioned/chunks/chunk.56SNEGI4.js +13 -13
- package/dist-versioned/chunks/chunk.65BWRJEA.js +5 -5
- package/dist-versioned/chunks/chunk.6CUAQSFA.js +2 -2
- package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
- package/dist-versioned/chunks/chunk.727ERQ4F.js +2 -2
- package/dist-versioned/chunks/{chunk.7BEDTYS7.js → chunk.743FPQRN.js} +10 -3
- package/dist-versioned/chunks/chunk.76ZNNLGN.js +1 -1
- package/dist-versioned/chunks/chunk.7OHSCBBX.js +1 -1
- package/dist-versioned/chunks/chunk.BVC5FY4L.js +13 -13
- package/dist-versioned/chunks/chunk.BXB5WF23.js +5 -5
- package/dist-versioned/chunks/chunk.D6JZ4IKM.js +1 -1
- package/dist-versioned/chunks/chunk.DQPVSTUQ.js +3 -3
- package/dist-versioned/chunks/chunk.EFEBQQHC.js +26 -26
- package/dist-versioned/chunks/chunk.EKFRFDTB.js +5 -5
- package/dist-versioned/chunks/chunk.H655M7FD.js +1 -1
- package/dist-versioned/chunks/chunk.HPR3PWAE.js +3 -3
- package/dist-versioned/chunks/chunk.I3PY3VYP.js +29 -29
- package/dist-versioned/chunks/chunk.IN3GJ5QL.js +3 -3
- package/dist-versioned/chunks/chunk.J2XBUIBC.js +2 -2
- package/dist-versioned/chunks/chunk.J7MMF6WJ.js +2 -2
- package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
- package/dist-versioned/chunks/chunk.MTSAWJLV.js +2 -2
- package/dist-versioned/chunks/chunk.NM6QP6RJ.js +2 -2
- package/dist-versioned/chunks/chunk.PDRECIYA.js +1 -1
- package/dist-versioned/chunks/chunk.PGZ5AWZ2.js +9 -9
- package/dist-versioned/chunks/chunk.PIR4YJUS.js +2 -2
- package/dist-versioned/chunks/chunk.QAZYUCBK.js +6 -6
- package/dist-versioned/chunks/chunk.QCICV36Z.js +6 -6
- package/dist-versioned/chunks/chunk.QP3SM2LZ.js +3 -3
- package/dist-versioned/chunks/chunk.R4BETATX.js +1 -1
- package/dist-versioned/chunks/chunk.RNSJAVQE.js +1 -1
- package/dist-versioned/chunks/chunk.RZRTIYXA.js +1 -1
- package/dist-versioned/chunks/chunk.SPBPHTSS.js +2 -2
- package/dist-versioned/chunks/chunk.SSH6ATRK.js +2 -2
- package/dist-versioned/chunks/{chunk.DAM3ICHP.js → chunk.TWXYFPBS.js} +32 -6
- package/dist-versioned/chunks/chunk.U5NFPAOX.js +2 -2
- package/dist-versioned/chunks/chunk.U6RY25TF.js +2 -2
- package/dist-versioned/chunks/chunk.UC5E3AEF.js +1 -1
- package/dist-versioned/chunks/chunk.UDZYWRPT.js +1 -1
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.V7TQ6VJU.js +1 -1
- package/dist-versioned/chunks/chunk.VHGHICFG.js +2 -2
- package/dist-versioned/chunks/chunk.WWS3CQ2Z.js +5 -5
- package/dist-versioned/chunks/chunk.XVFJS7VS.js +5 -5
- package/dist-versioned/chunks/chunk.Z2UY62T2.js +1 -1
- package/dist-versioned/chunks/chunk.ZGPGFEVP.js +5 -5
- package/dist-versioned/chunks/chunk.ZWJI7SLE.js +11 -11
- package/dist-versioned/components/accordion/accordion.d.ts +6 -4
- package/dist-versioned/components/accordion/accordion.js +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.js +1 -1
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.d.ts +4 -4
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/optgroup/optgroup.d.ts +2 -2
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.d.ts +2 -2
- package/dist-versioned/components/quickfact/quickfact.js +2 -2
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-group/radio-group.d.ts +2 -2
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/select/select.d.ts +4 -4
- package/dist-versioned/components/spinner/spinner.d.ts +1 -1
- package/dist-versioned/components/step/step.d.ts +1 -1
- package/dist-versioned/components/step-group/step-group.d.ts +1 -1
- package/dist-versioned/components/switch/switch.d.ts +1 -1
- package/dist-versioned/components/tab/tab.d.ts +2 -1
- package/dist-versioned/components/tab/tab.js +2 -1
- package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist-versioned/components/tag/tag.d.ts +1 -1
- package/dist-versioned/components/textarea/textarea.d.ts +1 -1
- package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/custom-elements.json +220 -202
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +3 -3
- package/dist-versioned/vscode.html-custom-data.json +80 -80
- package/dist-versioned/web-types.json +139 -137
- package/package.json +2 -2
- package/cdn/chunks/chunk.2UHPWLJE.js +0 -1
- package/cdn/chunks/chunk.FREYGZDJ.js +0 -1
- package/cdn/chunks/chunk.KFW32Q4Q.js +0 -1
- package/cdn/chunks/chunk.MMRILMYU.js +0 -1
- package/cdn-versioned/chunks/chunk.2UHPWLJE.js +0 -1
- package/cdn-versioned/chunks/chunk.FREYGZDJ.js +0 -1
- package/cdn-versioned/chunks/chunk.KFW32Q4Q.js +0 -1
- package/cdn-versioned/chunks/chunk.MMRILMYU.js +0 -1
- package/dist-versioned/chunks/chunk.6JI7NL3E.js +0 -65
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SdAccordion
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.TWXYFPBS.js";
|
|
4
4
|
import {
|
|
5
5
|
setDefaultAnimation
|
|
6
6
|
} from "./chunk.N4LHE3QK.js";
|
|
@@ -12,7 +12,8 @@ import {
|
|
|
12
12
|
} from "./chunk.S3NI7NKU.js";
|
|
13
13
|
|
|
14
14
|
// src/components/quickfact/quickfact.ts
|
|
15
|
-
import { css
|
|
15
|
+
import { css } from "lit";
|
|
16
|
+
import { html, literal } from "lit/static-html.js";
|
|
16
17
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
17
18
|
import { property } from "lit/decorators.js";
|
|
18
19
|
import cx from "classix";
|
|
@@ -22,17 +23,58 @@ var SdQuickfact = class extends SdAccordion {
|
|
|
22
23
|
this.expandable = false;
|
|
23
24
|
}
|
|
24
25
|
render() {
|
|
25
|
-
|
|
26
|
+
const base = this.expandable ? literal`details` : literal`div`;
|
|
27
|
+
const header = this.expandable ? literal`summary` : literal`div`;
|
|
28
|
+
return html`
|
|
29
|
+
<${base} part="base" class="sm:p-6">
|
|
30
|
+
<${header}
|
|
31
|
+
part="header"
|
|
32
|
+
id="header"
|
|
33
|
+
class=${cx(
|
|
26
34
|
"text-base font-bold items-center focus-visible:focus-outline text-primary relative group flex flex-row hover:bg-transparent gap-3 pb-3 pt-0 px-0 sm:flex-col sm:gap-4 sm:pb-8",
|
|
27
35
|
this.expandable && "cursor-pointer select-none"
|
|
28
|
-
)}
|
|
36
|
+
)}
|
|
37
|
+
role=${ifDefined(this.expandable ? "button" : void 0)}
|
|
38
|
+
aria-expanded=${ifDefined(this.expandable ? this.open ? "true" : "false" : void 0)}
|
|
39
|
+
aria-controls=${ifDefined(this.expandable ? "content" : void 0)}
|
|
40
|
+
tabindex=${this.expandable ? "0" : "-1"}
|
|
41
|
+
@click=${this.expandable ? this.handleSummaryClick : null}
|
|
42
|
+
@keydown=${this.expandable ? this.handleSummaryKeyDown : null}
|
|
43
|
+
>
|
|
44
|
+
<div
|
|
45
|
+
part="icon"
|
|
46
|
+
class=${cx("flex flex-grow-0 flex-shrink-0 flex-auto items-center", !this.expandable && "cursor-default")}
|
|
47
|
+
>
|
|
48
|
+
<slot name="icon"></slot>
|
|
49
|
+
</div>
|
|
50
|
+
<slot
|
|
51
|
+
name="summary"
|
|
52
|
+
part="summary"
|
|
53
|
+
class=${cx(
|
|
29
54
|
"flex flex-auto items-start text-left text-base leading-normal font-normal sm:leading-tight sm:text-3xl sm:text-center",
|
|
30
55
|
this.expandable ? "text-primary" : "text-black cursor-default"
|
|
31
|
-
)}
|
|
56
|
+
)}>
|
|
57
|
+
${this.summary}
|
|
58
|
+
</slot>
|
|
59
|
+
<span
|
|
60
|
+
part="summary-icon"
|
|
61
|
+
class=${cx(
|
|
32
62
|
"flex flex-grow-0 flex-shrink-0 flex-auto self-start sm:self-center transition-all ease-in-out duration-300 text-xl sm:text-4xl sm:mt-2",
|
|
33
63
|
this.open && "rotate-180",
|
|
34
64
|
!this.expandable && "hidden"
|
|
35
|
-
)}
|
|
65
|
+
)}
|
|
66
|
+
><slot name="expand-icon" class=${cx(this.open && "hidden")}>
|
|
67
|
+
<sd-icon library="system" name="chevron-down"></sd-icon>
|
|
68
|
+
</slot>
|
|
69
|
+
<slot name="collapse-icon" class=${cx(!this.open && "hidden")}>
|
|
70
|
+
<sd-icon library="system" name="chevron-down"></sd-icon> </slot
|
|
71
|
+
></span>
|
|
72
|
+
</${header}>
|
|
73
|
+
<div part="content" id="content" class=${cx("overflow-hidden", !this.expandable && "hidden")}>
|
|
74
|
+
<slot part="content__slot" class="block" role="region" aria-labelledby="header"></slot>
|
|
75
|
+
</div>
|
|
76
|
+
</${base}>
|
|
77
|
+
`;
|
|
36
78
|
}
|
|
37
79
|
};
|
|
38
80
|
SdQuickfact.styles = [
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
watch
|
|
3
3
|
} from "./chunk.X2OQMWGY.js";
|
|
4
|
+
import {
|
|
5
|
+
HasSlotController
|
|
6
|
+
} from "./chunk.YEZS5ZR2.js";
|
|
4
7
|
import {
|
|
5
8
|
SolidElement,
|
|
6
9
|
customElement
|
|
@@ -19,6 +22,7 @@ var SdTab = class extends SolidElement {
|
|
|
19
22
|
super(...arguments);
|
|
20
23
|
this.attrId = ++id;
|
|
21
24
|
this.componentId = `sd-tab-${this.attrId}`;
|
|
25
|
+
this.hasSlotController = new HasSlotController(this, "left");
|
|
22
26
|
this.variant = "default";
|
|
23
27
|
this.active = false;
|
|
24
28
|
this.disabled = false;
|
|
@@ -44,12 +48,15 @@ var SdTab = class extends SolidElement {
|
|
|
44
48
|
}
|
|
45
49
|
render() {
|
|
46
50
|
this.id = this.id.length > 0 ? this.id : this.componentId;
|
|
51
|
+
const slots = {
|
|
52
|
+
left: this.hasSlotController.test("left")
|
|
53
|
+
};
|
|
47
54
|
return html`<div part="base" class="${cx(
|
|
48
55
|
"inline-flex min-w-max h-12 px-3 leading-none items-center justify-center whitespace-nowrap select-none cursor-pointer group relative focus-visible:focus-outline outline-2 !-outline-offset-2",
|
|
49
56
|
this.variant === "container" && " rounded-[4px_4px_0_0]",
|
|
50
57
|
this.variant === "container" && this.active && "tab--active-container-border bg-white",
|
|
51
58
|
this.disabled ? "opacity-50 !cursor-not-allowed" : "hover:bg-neutral-200"
|
|
52
|
-
)}" tabindex="${this.disabled ? "-1" :
|
|
59
|
+
)}" tabindex="${!this.active || this.disabled ? "-1" : "0"}"><slot name="left" class="${cx(slots.left && "block pr-2", this.disabled ? "text-neutral-500" : "text-primary")}"></slot><slot class="${cx(this.disabled ? "text-neutral-500" : "text-primary")}"></slot><div part="active-tab-indicator" class="${cx(
|
|
53
60
|
(!this.active || this.disabled) && "hidden",
|
|
54
61
|
"absolute bottom-0 h-1 bg-accent",
|
|
55
62
|
this.variant === "default" ? "w-full" : "w-3/4 group-hover:w-full transition-all duration-200 ease-in-out"
|
|
@@ -25,7 +25,8 @@ import {
|
|
|
25
25
|
} from "./chunk.S3NI7NKU.js";
|
|
26
26
|
|
|
27
27
|
// src/components/accordion/accordion.ts
|
|
28
|
-
import { css
|
|
28
|
+
import { css } from "lit";
|
|
29
|
+
import { html } from "lit/static-html.js";
|
|
29
30
|
import { property, query } from "lit/decorators.js";
|
|
30
31
|
import cx from "classix";
|
|
31
32
|
var SdAccordion = class extends SolidElement {
|
|
@@ -38,8 +39,29 @@ var SdAccordion = class extends SolidElement {
|
|
|
38
39
|
firstUpdated() {
|
|
39
40
|
this.body.hidden = !this.open;
|
|
40
41
|
this.body.style.height = this.open ? "auto" : "0";
|
|
42
|
+
if (this.open) {
|
|
43
|
+
this.accordion.open = true;
|
|
44
|
+
}
|
|
45
|
+
this.accordionObserver = new MutationObserver((changes) => {
|
|
46
|
+
for (const change of changes) {
|
|
47
|
+
if (change.type === "attributes" && change.attributeName === "open") {
|
|
48
|
+
if (this.accordion.open) {
|
|
49
|
+
this.show();
|
|
50
|
+
} else {
|
|
51
|
+
this.hide();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
this.accordionObserver.observe(this.accordion, { attributes: true });
|
|
57
|
+
}
|
|
58
|
+
disconnectedCallback() {
|
|
59
|
+
var _a;
|
|
60
|
+
super.disconnectedCallback();
|
|
61
|
+
(_a = this.accordionObserver) == null ? void 0 : _a.disconnect();
|
|
41
62
|
}
|
|
42
|
-
handleSummaryClick() {
|
|
63
|
+
handleSummaryClick(event) {
|
|
64
|
+
event.preventDefault();
|
|
43
65
|
if (this.open) {
|
|
44
66
|
this.hide();
|
|
45
67
|
} else {
|
|
@@ -66,9 +88,11 @@ var SdAccordion = class extends SolidElement {
|
|
|
66
88
|
}
|
|
67
89
|
async handleOpenChange() {
|
|
68
90
|
if (this.open) {
|
|
91
|
+
this.accordion.open = true;
|
|
69
92
|
const slShow = this.emit("sd-show", { cancelable: true });
|
|
70
93
|
if (slShow.defaultPrevented) {
|
|
71
94
|
this.open = false;
|
|
95
|
+
this.accordion.open = false;
|
|
72
96
|
return;
|
|
73
97
|
}
|
|
74
98
|
await stopAnimations(this.body);
|
|
@@ -80,6 +104,7 @@ var SdAccordion = class extends SolidElement {
|
|
|
80
104
|
} else {
|
|
81
105
|
const slHide = this.emit("sd-hide", { cancelable: true });
|
|
82
106
|
if (slHide.defaultPrevented) {
|
|
107
|
+
this.accordion.open = true;
|
|
83
108
|
this.open = true;
|
|
84
109
|
return;
|
|
85
110
|
}
|
|
@@ -88,6 +113,7 @@ var SdAccordion = class extends SolidElement {
|
|
|
88
113
|
await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);
|
|
89
114
|
this.body.hidden = true;
|
|
90
115
|
this.body.style.height = "auto";
|
|
116
|
+
this.accordion.open = false;
|
|
91
117
|
this.emit("sd-after-hide");
|
|
92
118
|
}
|
|
93
119
|
}
|
|
@@ -108,15 +134,15 @@ var SdAccordion = class extends SolidElement {
|
|
|
108
134
|
return waitForEvent(this, "sd-after-hide");
|
|
109
135
|
}
|
|
110
136
|
render() {
|
|
111
|
-
return html`<
|
|
137
|
+
return html`<details part="base" class="border-y border-neutral-400"><summary part="header" id="header" class="${cx(
|
|
112
138
|
"flex text-base gap-4 font-bold items-center cursor-pointer select-none px-4 py-3 focus-visible:focus-outline text-primary hover:bg-neutral-200 relative group"
|
|
113
|
-
)}"
|
|
139
|
+
)}" aria-expanded="${this.open ? "true" : "false"}" aria-controls="content" tabindex="0" @click="${this.handleSummaryClick}" @keydown="${this.handleSummaryKeyDown}"><div part="summary-border" class="${cx(
|
|
114
140
|
!this.open && "opacity-0",
|
|
115
141
|
"w-1 bg-accent absolute left-0 transition-all h-[calc(100%-16px)] group-hover:h-full"
|
|
116
142
|
)}"></div><slot name="summary" part="summary" class="flex flex-auto items-center text-left">${this.summary}</slot><span part="summary-icon" class="${cx(
|
|
117
143
|
"flex flex-grow-0 flex-shrink-0 flex-auto items-center transition-all ease-in-out duration-300 text-xl",
|
|
118
144
|
this.open && "rotate-180"
|
|
119
|
-
)}"><slot name="expand-icon" class="${cx(this.open && "hidden")}"><sd-icon library="system" name="chevron-down"></sd-icon></slot><slot name="collapse-icon" class="${cx(!this.open && "hidden")}"><sd-icon library="system" name="chevron-down"></sd-icon></slot></span></
|
|
145
|
+
)}"><slot name="expand-icon" class="${cx(this.open && "hidden")}"><sd-icon library="system" name="chevron-down"></sd-icon></slot><slot name="collapse-icon" class="${cx(!this.open && "hidden")}"><sd-icon library="system" name="chevron-down"></sd-icon></slot></span></summary><div part="content" id="content" class="overflow-hidden"><slot part="content__slot" class="block px-4 py-6" role="region" aria-labelledby="header"></slot></div></details>`;
|
|
120
146
|
}
|
|
121
147
|
};
|
|
122
148
|
SdAccordion.styles = [
|
|
@@ -3,18 +3,20 @@ import { LocalizeController } from '../../utilities/localize';
|
|
|
3
3
|
import SolidElement from '../../internal/solid-element';
|
|
4
4
|
export default class SdAccordion extends SolidElement {
|
|
5
5
|
localize: LocalizeController;
|
|
6
|
-
accordion:
|
|
6
|
+
accordion: HTMLDetailsElement;
|
|
7
7
|
header: HTMLElement;
|
|
8
8
|
body: HTMLElement;
|
|
9
|
+
accordionObserver: MutationObserver;
|
|
9
10
|
open: boolean;
|
|
10
11
|
summary: string;
|
|
11
12
|
firstUpdated(): void;
|
|
12
|
-
|
|
13
|
+
disconnectedCallback(): void;
|
|
14
|
+
protected handleSummaryClick(event: MouseEvent): void;
|
|
13
15
|
protected handleSummaryKeyDown(event: KeyboardEvent): void;
|
|
14
16
|
handleOpenChange(): Promise<void>;
|
|
15
17
|
show(): Promise<void>;
|
|
16
18
|
hide(): Promise<void>;
|
|
17
|
-
render(): import("lit").TemplateResult
|
|
19
|
+
render(): import("lit").TemplateResult;
|
|
18
20
|
static styles: import("lit").CSSResult[];
|
|
19
21
|
}
|
|
20
22
|
declare global {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SdAccordionGroup
|
|
3
3
|
} from "../../chunks/chunk.IN3GJ5QL.js";
|
|
4
|
-
import "../../chunks/chunk.
|
|
4
|
+
import "../../chunks/chunk.TWXYFPBS.js";
|
|
5
5
|
import "../../chunks/chunk.N4LHE3QK.js";
|
|
6
6
|
import "../../chunks/chunk.3IT4HBTI.js";
|
|
7
7
|
import "../../chunks/chunk.P52GZVKG.js";
|
|
@@ -2,7 +2,7 @@ import '../icon/icon';
|
|
|
2
2
|
import SdAccordion from '../accordion/accordion';
|
|
3
3
|
export default class SdQuickfact extends SdAccordion {
|
|
4
4
|
expandable: boolean;
|
|
5
|
-
render(): import("lit").TemplateResult
|
|
5
|
+
render(): import("lit").TemplateResult;
|
|
6
6
|
static styles: import("lit").CSSResult[];
|
|
7
7
|
}
|
|
8
8
|
declare global {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SdQuickfact
|
|
3
|
-
} from "../../chunks/chunk.
|
|
4
|
-
import "../../chunks/chunk.
|
|
3
|
+
} from "../../chunks/chunk.4JZQQD4L.js";
|
|
4
|
+
import "../../chunks/chunk.TWXYFPBS.js";
|
|
5
5
|
import "../../chunks/chunk.N4LHE3QK.js";
|
|
6
6
|
import "../../chunks/chunk.3IT4HBTI.js";
|
|
7
7
|
import "../../chunks/chunk.P52GZVKG.js";
|
|
@@ -2,6 +2,7 @@ import SolidElement from '../../internal/solid-element';
|
|
|
2
2
|
export default class SdTab extends SolidElement {
|
|
3
3
|
private readonly attrId;
|
|
4
4
|
private readonly componentId;
|
|
5
|
+
private readonly hasSlotController;
|
|
5
6
|
tab: HTMLElement;
|
|
6
7
|
variant: 'default' | 'container';
|
|
7
8
|
active: boolean;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SdTab
|
|
3
|
-
} from "../../chunks/chunk.
|
|
3
|
+
} from "../../chunks/chunk.743FPQRN.js";
|
|
4
4
|
import "../../chunks/chunk.X2OQMWGY.js";
|
|
5
|
+
import "../../chunks/chunk.YEZS5ZR2.js";
|
|
5
6
|
import "../../chunks/chunk.UDZYWRPT.js";
|
|
6
7
|
import "../../chunks/chunk.S3NI7NKU.js";
|
|
7
8
|
export {
|
|
@@ -65,6 +65,13 @@
|
|
|
65
65
|
"privacy": "public",
|
|
66
66
|
"default": "new LocalizeController(this)"
|
|
67
67
|
},
|
|
68
|
+
{
|
|
69
|
+
"kind": "field",
|
|
70
|
+
"name": "accordionObserver",
|
|
71
|
+
"type": {
|
|
72
|
+
"text": "MutationObserver"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
68
75
|
{
|
|
69
76
|
"kind": "field",
|
|
70
77
|
"name": "open",
|
|
@@ -10689,6 +10696,17 @@
|
|
|
10689
10696
|
"module": "components/accordion/accordion.js"
|
|
10690
10697
|
}
|
|
10691
10698
|
},
|
|
10699
|
+
{
|
|
10700
|
+
"kind": "field",
|
|
10701
|
+
"name": "accordionObserver",
|
|
10702
|
+
"type": {
|
|
10703
|
+
"text": "MutationObserver"
|
|
10704
|
+
},
|
|
10705
|
+
"inheritedFrom": {
|
|
10706
|
+
"name": "SdAccordion",
|
|
10707
|
+
"module": "components/accordion/accordion.js"
|
|
10708
|
+
}
|
|
10709
|
+
},
|
|
10692
10710
|
{
|
|
10693
10711
|
"kind": "field",
|
|
10694
10712
|
"name": "open",
|
|
@@ -16642,7 +16660,7 @@
|
|
|
16642
16660
|
"package": {
|
|
16643
16661
|
"name": "@solid-design-system/components",
|
|
16644
16662
|
"description": "Solid Design System: Components",
|
|
16645
|
-
"version": "4.0.0-next.
|
|
16663
|
+
"version": "4.0.0-next.4",
|
|
16646
16664
|
"author": "Union Investment",
|
|
16647
16665
|
"homepage": "https://solid-design-system.fe.union-investment.de/docs/",
|
|
16648
16666
|
"license": "MIT"
|
package/dist/solid-components.js
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
} from "./chunks/chunk.2IBVAXOX.js";
|
|
32
32
|
import {
|
|
33
33
|
SdTab
|
|
34
|
-
} from "./chunks/chunk.
|
|
34
|
+
} from "./chunks/chunk.743FPQRN.js";
|
|
35
35
|
import {
|
|
36
36
|
SdTabGroup
|
|
37
37
|
} from "./chunks/chunk.56SNEGI4.js";
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
} from "./chunks/chunk.SSH6ATRK.js";
|
|
47
47
|
import {
|
|
48
48
|
SdQuickfact
|
|
49
|
-
} from "./chunks/chunk.
|
|
49
|
+
} from "./chunks/chunk.4JZQQD4L.js";
|
|
50
50
|
import {
|
|
51
51
|
SdRadioButton
|
|
52
52
|
} from "./chunks/chunk.MTSAWJLV.js";
|
|
@@ -147,7 +147,7 @@ import {
|
|
|
147
147
|
} from "./chunks/chunk.IN3GJ5QL.js";
|
|
148
148
|
import {
|
|
149
149
|
SdAccordion
|
|
150
|
-
} from "./chunks/chunk.
|
|
150
|
+
} from "./chunks/chunk.TWXYFPBS.js";
|
|
151
151
|
import "./chunks/chunk.N4LHE3QK.js";
|
|
152
152
|
import {
|
|
153
153
|
SdIcon
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@solid-design-system/components",
|
|
4
|
-
"version": "4.0.0-next.
|
|
4
|
+
"version": "4.0.0-next.4",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
"js": {
|
|
69
69
|
"properties": [
|
|
70
70
|
{ "name": "localize" },
|
|
71
|
+
{ "name": "accordionObserver", "type": "MutationObserver" },
|
|
71
72
|
{
|
|
72
73
|
"name": "open",
|
|
73
74
|
"description": "Indicates whether or not the accordion is open. You can toggle this attribute to show and hide the accordion, or you\ncan use the `show()` and `hide()` methods and this attribute will reflect the accordion' open state.",
|
|
@@ -4194,6 +4195,7 @@
|
|
|
4194
4195
|
"type": "boolean"
|
|
4195
4196
|
},
|
|
4196
4197
|
{ "name": "localize" },
|
|
4198
|
+
{ "name": "accordionObserver", "type": "MutationObserver" },
|
|
4197
4199
|
{
|
|
4198
4200
|
"name": "open",
|
|
4199
4201
|
"description": "Indicates whether or not the accordion is open. You can toggle this attribute to show and hide the accordion, or you\ncan use the `show()` and `hide()` methods and this attribute will reflect the accordion' open state.",
|
|
@@ -32,7 +32,7 @@ let SdMenu = class SdMenu extends SolidElement {
|
|
|
32
32
|
if (item.type === 'checkbox') {
|
|
33
33
|
item.checked = !item.checked;
|
|
34
34
|
}
|
|
35
|
-
this.emit('sd-4-0-0-next-
|
|
35
|
+
this.emit('sd-4-0-0-next-4-select', { detail: { item } });
|
|
36
36
|
}
|
|
37
37
|
handleKeyDown(event) {
|
|
38
38
|
if (event.key === 'Enter') {
|
|
@@ -74,7 +74,7 @@ let SdMenuItem = class SdMenuItem extends SolidElement {
|
|
|
74
74
|
})}
|
|
75
75
|
>
|
|
76
76
|
<span part="checked-icon" class="menu-item__check">
|
|
77
|
-
<sd-4-0-0-next-
|
|
77
|
+
<sd-4-0-0-next-4-icon name="check" library="system" aria-hidden="true"></sd-4-0-0-next-4-icon>
|
|
78
78
|
</span>
|
|
79
79
|
|
|
80
80
|
<slot name="prefix" part="prefix" class="menu-item__prefix"></slot>
|
|
@@ -84,7 +84,7 @@ let SdMenuItem = class SdMenuItem extends SolidElement {
|
|
|
84
84
|
<slot name="suffix" part="suffix" class="menu-item__suffix"></slot>
|
|
85
85
|
|
|
86
86
|
<span class="menu-item__chevron">
|
|
87
|
-
<sd-4-0-0-next-
|
|
87
|
+
<sd-4-0-0-next-4-icon name="chevron-right" library="system" aria-hidden="true"></sd-4-0-0-next-4-icon>
|
|
88
88
|
</span>
|
|
89
89
|
</div>
|
|
90
90
|
`;
|
|
@@ -168,7 +168,7 @@ __decorateClass([
|
|
|
168
168
|
watch(["checked"], { waitUntilFirstUpdate: true })
|
|
169
169
|
], SdSwitch.prototype, "handleStateChange", 1);
|
|
170
170
|
SdSwitch = __decorateClass([
|
|
171
|
-
customElement("sd-4-0-0-next-
|
|
171
|
+
customElement("sd-4-0-0-next-4-switch")
|
|
172
172
|
], SdSwitch);
|
|
173
173
|
|
|
174
174
|
export {
|
|
@@ -81,7 +81,7 @@ var SdStep = class extends SolidElement {
|
|
|
81
81
|
!this.disabled && !this.current && !this.notInteractive && "text-primary group-hover:text-primary-500 group-hover:fill-primary-500",
|
|
82
82
|
this.notInteractive && "text-primary",
|
|
83
83
|
this.size === "lg" ? "text-lg" : "text-sm"
|
|
84
|
-
)}">${!this.disabled && !this.current && !this.notInteractive ? html`<sd-4-0-0-next-
|
|
84
|
+
)}">${!this.disabled && !this.current && !this.notInteractive ? html`<sd-4-0-0-next-4-icon name="status-check" library="system"></sd-4-0-0-next-4-icon>` : html`${this.index}`}</slot></${tag}>${this.noTail ? "" : html`<div part="tail" class="${cx(
|
|
85
85
|
this.orientation === "horizontal" ? "border-t w-full my-auto mr-2" : "border-l flex-grow flex-shrink-0 basis-auto h-full w-[1px] mx-auto",
|
|
86
86
|
!this.disabled && !this.current && !this.notInteractive ? " border-primary group-hover:border-primary-500" : "border-neutral-400"
|
|
87
87
|
)}"></div>`}</div><div part="text-container" class="${cx("mt-4 break-words flex flex-col gap-2", this.orientation === "horizontal" ? "text-center w-40" : "w-max text-left", this.disabled && "!text-neutral-700", this.notInteractive ? "ml-3" : "mr-4")}"><div part="label" id="label" class="${cx("!font-bold sd-paragraph", this.disabled && "!text-neutral-700", !this.disabled && !this.current && !this.notInteractive ? "!text-primary group-hover:!text-primary-500 group-hover:cursor-pointer" : "text-black")}"><slot name="label">${this.label}</slot></div><div part="description" id="description" class="${cx("sd-paragraph sd-paragraph--size-sm", this.disabled && "!text-neutral-700")}">${this.description || html`<slot></slot>`}</div></div></div>`;
|
|
@@ -131,7 +131,7 @@ __decorateClass([
|
|
|
131
131
|
watch("notInteractive")
|
|
132
132
|
], SdStep.prototype, "handleInteractivityChange", 1);
|
|
133
133
|
SdStep = __decorateClass([
|
|
134
|
-
customElement("sd-4-0-0-next-
|
|
134
|
+
customElement("sd-4-0-0-next-4-step")
|
|
135
135
|
], SdStep);
|
|
136
136
|
|
|
137
137
|
export {
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SdAccordion
|
|
3
|
+
} from "./chunk.TWXYFPBS.js";
|
|
4
|
+
import {
|
|
5
|
+
setDefaultAnimation
|
|
6
|
+
} from "./chunk.N4LHE3QK.js";
|
|
7
|
+
import {
|
|
8
|
+
customElement
|
|
9
|
+
} from "./chunk.UDZYWRPT.js";
|
|
10
|
+
import {
|
|
11
|
+
__decorateClass
|
|
12
|
+
} from "./chunk.S3NI7NKU.js";
|
|
13
|
+
|
|
14
|
+
// src/components/quickfact/quickfact.ts
|
|
15
|
+
import { css } from "lit";
|
|
16
|
+
import { html, literal } from "lit/static-html.js";
|
|
17
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
18
|
+
import { property } from "lit/decorators.js";
|
|
19
|
+
import cx from "classix";
|
|
20
|
+
var SdQuickfact = class extends SdAccordion {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments);
|
|
23
|
+
this.expandable = false;
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
const base = this.expandable ? literal`details` : literal`div`;
|
|
27
|
+
const header = this.expandable ? literal`summary` : literal`div`;
|
|
28
|
+
return html`
|
|
29
|
+
<${base} part="base" class="sm:p-6">
|
|
30
|
+
<${header}
|
|
31
|
+
part="header"
|
|
32
|
+
id="header"
|
|
33
|
+
class=${cx(
|
|
34
|
+
"text-base font-bold items-center focus-visible:focus-outline text-primary relative group flex flex-row hover:bg-transparent gap-3 pb-3 pt-0 px-0 sm:flex-col sm:gap-4 sm:pb-8",
|
|
35
|
+
this.expandable && "cursor-pointer select-none"
|
|
36
|
+
)}
|
|
37
|
+
role=${ifDefined(this.expandable ? "button" : void 0)}
|
|
38
|
+
aria-expanded=${ifDefined(this.expandable ? this.open ? "true" : "false" : void 0)}
|
|
39
|
+
aria-controls=${ifDefined(this.expandable ? "content" : void 0)}
|
|
40
|
+
tabindex=${this.expandable ? "0" : "-1"}
|
|
41
|
+
@click=${this.expandable ? this.handleSummaryClick : null}
|
|
42
|
+
@keydown=${this.expandable ? this.handleSummaryKeyDown : null}
|
|
43
|
+
>
|
|
44
|
+
<div
|
|
45
|
+
part="icon"
|
|
46
|
+
class=${cx("flex flex-grow-0 flex-shrink-0 flex-auto items-center", !this.expandable && "cursor-default")}
|
|
47
|
+
>
|
|
48
|
+
<slot name="icon"></slot>
|
|
49
|
+
</div>
|
|
50
|
+
<slot
|
|
51
|
+
name="summary"
|
|
52
|
+
part="summary"
|
|
53
|
+
class=${cx(
|
|
54
|
+
"flex flex-auto items-start text-left text-base leading-normal font-normal sm:leading-tight sm:text-3xl sm:text-center",
|
|
55
|
+
this.expandable ? "text-primary" : "text-black cursor-default"
|
|
56
|
+
)}>
|
|
57
|
+
${this.summary}
|
|
58
|
+
</slot>
|
|
59
|
+
<span
|
|
60
|
+
part="summary-icon"
|
|
61
|
+
class=${cx(
|
|
62
|
+
"flex flex-grow-0 flex-shrink-0 flex-auto self-start sm:self-center transition-all ease-in-out duration-300 text-xl sm:text-4xl sm:mt-2",
|
|
63
|
+
this.open && "rotate-180",
|
|
64
|
+
!this.expandable && "hidden"
|
|
65
|
+
)}
|
|
66
|
+
><slot name="expand-icon" class=${cx(this.open && "hidden")}>
|
|
67
|
+
<sd-4-0-0-next-4-icon library="system" name="chevron-down"></sd-4-0-0-next-4-icon>
|
|
68
|
+
</slot>
|
|
69
|
+
<slot name="collapse-icon" class=${cx(!this.open && "hidden")}>
|
|
70
|
+
<sd-4-0-0-next-4-icon library="system" name="chevron-down"></sd-4-0-0-next-4-icon> </slot
|
|
71
|
+
></span>
|
|
72
|
+
</${header}>
|
|
73
|
+
<div part="content" id="content" class=${cx("overflow-hidden", !this.expandable && "hidden")}>
|
|
74
|
+
<slot part="content__slot" class="block" role="region" aria-labelledby="header"></slot>
|
|
75
|
+
</div>
|
|
76
|
+
</${base}>
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
SdQuickfact.styles = [
|
|
81
|
+
...SdAccordion.styles,
|
|
82
|
+
css`:host{display:block}@media (min-width:640px){[part=summary-icon]{font-size:var(--sd-spacing-12,3rem)}}[part=icon]{font-size:var(--sd-spacing-12,3rem)}@media (min-width:640px){[part=icon]{font-size:var(--sd-spacing-24,6rem)}}`
|
|
83
|
+
];
|
|
84
|
+
__decorateClass([
|
|
85
|
+
property({ type: Boolean, reflect: true })
|
|
86
|
+
], SdQuickfact.prototype, "expandable", 2);
|
|
87
|
+
SdQuickfact = __decorateClass([
|
|
88
|
+
customElement("sd-4-0-0-next-4-quickfact")
|
|
89
|
+
], SdQuickfact);
|
|
90
|
+
setDefaultAnimation("quickfact.show", {
|
|
91
|
+
keyframes: [
|
|
92
|
+
{ height: "0", opacity: "0" },
|
|
93
|
+
{ height: "auto", opacity: "1" }
|
|
94
|
+
],
|
|
95
|
+
options: { duration: 300, easing: "ease" }
|
|
96
|
+
});
|
|
97
|
+
setDefaultAnimation("quickfact.hide", {
|
|
98
|
+
keyframes: [
|
|
99
|
+
{ height: "auto", opacity: "1" },
|
|
100
|
+
{ height: "0", opacity: "0" }
|
|
101
|
+
],
|
|
102
|
+
options: { duration: 300, easing: "ease" }
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
export {
|
|
106
|
+
SdQuickfact
|
|
107
|
+
};
|
|
@@ -214,7 +214,7 @@ var SdButton = class extends SolidElement {
|
|
|
214
214
|
md: "ml-2",
|
|
215
215
|
lg: "ml-2"
|
|
216
216
|
}[this.size]
|
|
217
|
-
)}"></slot>${this.loading ? html`<sd-4-0-0-next-
|
|
217
|
+
)}"></slot>${this.loading ? html`<sd-4-0-0-next-4-spinner class="${cx("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-4-0-0-next-4-spinner>` : ""}</${tag}>`;
|
|
218
218
|
}
|
|
219
219
|
};
|
|
220
220
|
/**
|
|
@@ -222,13 +222,13 @@ var SdButton = class extends SolidElement {
|
|
|
222
222
|
*/
|
|
223
223
|
SdButton.styles = [
|
|
224
224
|
...SolidElement.styles,
|
|
225
|
-
css`:host{cursor:pointer;display:inline-block;position:relative;width:var(--sd-spacing-auto,auto)}sd-4-0-0-next-
|
|
225
|
+
css`:host{cursor:pointer;display:inline-block;position:relative;width:var(--sd-spacing-auto,auto)}sd-4-0-0-next-4-spinner{--indicator-color:currentColor;--track-color:var(--tw-varcolor-200)}::slotted(sd-4-0-0-next-4-badge){pointer-events:none;position:absolute;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);--tw-translate-x:50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}::slotted(sd-4-0-0-next-4-icon),sd-4-0-0-next-4-spinner{font-size:calc(var(--tw-varspacing)/2)}`
|
|
226
226
|
];
|
|
227
227
|
__decorateClass([
|
|
228
228
|
query("a, button")
|
|
229
229
|
], SdButton.prototype, "button", 2);
|
|
230
230
|
__decorateClass([
|
|
231
|
-
queryAssignedElements({ selector: "sd-4-0-0-next-
|
|
231
|
+
queryAssignedElements({ selector: "sd-4-0-0-next-4-icon" })
|
|
232
232
|
], SdButton.prototype, "_iconsInDefaultSlot", 2);
|
|
233
233
|
__decorateClass([
|
|
234
234
|
state()
|
|
@@ -291,7 +291,7 @@ __decorateClass([
|
|
|
291
291
|
watch("disabled", { waitUntilFirstUpdate: true })
|
|
292
292
|
], SdButton.prototype, "handleDisabledChange", 1);
|
|
293
293
|
SdButton = __decorateClass([
|
|
294
|
-
customElement("sd-4-0-0-next-
|
|
294
|
+
customElement("sd-4-0-0-next-4-button")
|
|
295
295
|
], SdButton);
|
|
296
296
|
|
|
297
297
|
export {
|
|
@@ -32,7 +32,7 @@ var SdDivider = class extends SolidElement {
|
|
|
32
32
|
*/
|
|
33
33
|
SdDivider.styles = [
|
|
34
34
|
...SolidElement.styles,
|
|
35
|
-
css`:host{margin:var(--sd-spacing-0,0)}:host(sd-4-0-0-next-
|
|
35
|
+
css`:host{margin:var(--sd-spacing-0,0)}:host(sd-4-0-0-next-4-divider[orientation=horizontal]){display:block}:host(sd-4-0-0-next-4-divider[orientation=vertical]){display:inline-block}`
|
|
36
36
|
];
|
|
37
37
|
__decorateClass([
|
|
38
38
|
property({ reflect: true })
|
|
@@ -41,7 +41,7 @@ __decorateClass([
|
|
|
41
41
|
property({ type: Boolean, reflect: true })
|
|
42
42
|
], SdDivider.prototype, "inverted", 2);
|
|
43
43
|
SdDivider = __decorateClass([
|
|
44
|
-
customElement("sd-4-0-0-next-
|
|
44
|
+
customElement("sd-4-0-0-next-4-divider")
|
|
45
45
|
], SdDivider);
|
|
46
46
|
|
|
47
47
|
export {
|