@synergy-design-system/components 1.7.0 → 1.9.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/README.md +8 -0
- package/dist/chunks/{chunk.23HTU3YE.js → chunk.2EI3TNL7.js} +1 -16
- package/dist/chunks/chunk.2EI3TNL7.js.map +7 -0
- package/dist/chunks/{chunk.RSONAU45.js → chunk.2RF7KO5I.js} +1 -12
- package/dist/chunks/chunk.2RF7KO5I.js.map +7 -0
- package/dist/chunks/{chunk.GHMKOVA3.js → chunk.3DE5ARIC.js} +23 -3
- package/dist/chunks/chunk.3DE5ARIC.js.map +7 -0
- package/dist/chunks/chunk.3O5WTWSN.js +12 -0
- package/dist/chunks/chunk.3O5WTWSN.js.map +7 -0
- package/dist/chunks/{chunk.MFFJYORB.js → chunk.3STW62TA.js} +1 -12
- package/dist/chunks/chunk.3STW62TA.js.map +7 -0
- package/dist/chunks/{chunk.EKOK7YPB.js → chunk.4QS5IWYB.js} +1 -16
- package/dist/chunks/chunk.4QS5IWYB.js.map +7 -0
- package/dist/chunks/{chunk.ULMZHWWW.js → chunk.5BMNRZ7L.js} +2 -2
- package/dist/chunks/{chunk.SMSP5C6C.js → chunk.5CB3CVZ7.js} +2 -2
- package/dist/chunks/{chunk.GMUVD5B2.js → chunk.5R3OVMH2.js} +25 -10
- package/dist/chunks/chunk.5R3OVMH2.js.map +7 -0
- package/dist/chunks/{chunk.EI34C7LC.js → chunk.6MS3WNDW.js} +8 -7
- package/dist/chunks/chunk.6MS3WNDW.js.map +7 -0
- package/dist/chunks/{chunk.4ZURABYO.js → chunk.A7IIJ2LL.js} +1 -7
- package/dist/chunks/{chunk.O7USYXBT.js.map → chunk.A7IIJ2LL.js.map} +3 -3
- package/dist/chunks/{chunk.PGCXJ2PT.js → chunk.ACTJFDNK.js} +1 -12
- package/dist/chunks/chunk.ACTJFDNK.js.map +7 -0
- package/dist/chunks/{chunk.MNMITYTH.js → chunk.ADRKUQGR.js} +1 -12
- package/dist/chunks/chunk.ADRKUQGR.js.map +7 -0
- package/dist/chunks/{chunk.5OPODPPZ.js → chunk.AJU6C4KC.js} +2 -2
- package/dist/chunks/{chunk.VZ7S7YYN.js → chunk.AVTU2BGE.js} +2 -2
- package/dist/chunks/{chunk.QHFGD6WW.js → chunk.BGHK4NQA.js} +1 -12
- package/dist/chunks/chunk.BGHK4NQA.js.map +7 -0
- package/dist/chunks/{chunk.LWXCBEHD.js → chunk.BGKFRWWO.js} +5 -5
- package/dist/chunks/{chunk.3ZHSSMBL.js → chunk.BJYVLDYR.js} +84 -6
- package/dist/chunks/chunk.BJYVLDYR.js.map +7 -0
- package/dist/chunks/chunk.BLOH2ZNU.js +636 -0
- package/dist/chunks/chunk.BLOH2ZNU.js.map +7 -0
- package/dist/chunks/{chunk.USYR7G7Z.js → chunk.BTZX6ZFZ.js} +2 -2
- package/dist/chunks/{chunk.W6V7TPGK.js → chunk.CFIQXXMW.js} +1 -12
- package/dist/chunks/chunk.CFIQXXMW.js.map +7 -0
- package/dist/chunks/{chunk.RA2WSKQT.js → chunk.F4THECWA.js} +2 -2
- package/dist/chunks/{chunk.Z4NKFCKY.js → chunk.FSONLJTT.js} +19 -15
- package/dist/chunks/chunk.FSONLJTT.js.map +7 -0
- package/dist/chunks/{chunk.PMTVLWNZ.js → chunk.FUNZW7ES.js} +2 -2
- package/dist/chunks/{chunk.OJREQD2D.js → chunk.GAPQVJGQ.js} +22 -14
- package/dist/chunks/chunk.GAPQVJGQ.js.map +7 -0
- package/dist/chunks/{chunk.NAX6WP3D.js → chunk.GBOII6N4.js} +11 -7
- package/dist/chunks/chunk.GBOII6N4.js.map +7 -0
- package/dist/chunks/chunk.GTSRMEPE.js +108 -0
- package/dist/chunks/chunk.GTSRMEPE.js.map +7 -0
- package/dist/chunks/{chunk.JAKJHV44.js → chunk.HF75YRVS.js} +22 -15
- package/dist/chunks/chunk.HF75YRVS.js.map +7 -0
- package/dist/chunks/{chunk.7VOPIPHW.js → chunk.IOPUYG6Q.js} +2 -2
- package/dist/chunks/{chunk.5THN2K5Q.js → chunk.IR2PZHC7.js} +2 -2
- package/dist/chunks/{chunk.SBEIXLRW.js → chunk.K3O2PP7X.js} +6 -5
- package/dist/chunks/chunk.K3O2PP7X.js.map +7 -0
- package/dist/chunks/{chunk.TUYEX4KP.js → chunk.KDDTDU4B.js} +73 -35
- package/dist/chunks/chunk.KDDTDU4B.js.map +7 -0
- package/dist/chunks/{chunk.5BOEKFIJ.js → chunk.KNXO2FGQ.js} +86 -48
- package/dist/chunks/chunk.KNXO2FGQ.js.map +7 -0
- package/dist/chunks/{chunk.HG5QC5EW.js → chunk.KUO3KJOC.js} +2 -2
- package/dist/chunks/{chunk.B6AKFQJS.js → chunk.LF2XSSHD.js} +2 -2
- package/dist/chunks/{chunk.2FN5DTS6.js → chunk.LJQ7LEPV.js} +1 -12
- package/dist/chunks/chunk.LJQ7LEPV.js.map +7 -0
- package/dist/chunks/{chunk.KP7SYG4K.js → chunk.LZE7OXKV.js} +2 -2
- package/dist/chunks/{chunk.CYN675Z6.js → chunk.MDZ22YWD.js} +12 -8
- package/dist/chunks/chunk.MDZ22YWD.js.map +7 -0
- package/dist/chunks/{chunk.JN7CLMQZ.js → chunk.MIMALEWP.js} +21 -7
- package/dist/chunks/chunk.MIMALEWP.js.map +7 -0
- package/dist/chunks/{chunk.XSXBQCWN.js → chunk.O6AXKVFJ.js} +11 -7
- package/dist/chunks/chunk.O6AXKVFJ.js.map +7 -0
- package/dist/chunks/{chunk.N2I6HVX3.js → chunk.OSBC36KQ.js} +4 -9
- package/dist/chunks/chunk.OSBC36KQ.js.map +7 -0
- package/dist/chunks/chunk.PHSJD47V.js +162 -0
- package/dist/chunks/chunk.PHSJD47V.js.map +7 -0
- package/dist/chunks/{chunk.JBYBQ5TQ.js → chunk.PKO6FEOM.js} +1 -12
- package/dist/chunks/chunk.PKO6FEOM.js.map +7 -0
- package/dist/chunks/{chunk.7KSU2SUD.js → chunk.PRZRH7SN.js} +2 -2
- package/dist/chunks/{chunk.4MYR27GF.js → chunk.PWMSNMDF.js} +13 -9
- package/dist/chunks/chunk.PWMSNMDF.js.map +7 -0
- package/dist/chunks/{chunk.BQG5LF7J.js → chunk.QAUTITK3.js} +2 -2
- package/dist/chunks/{chunk.DJOAQ4JU.js → chunk.QNDC5KWA.js} +43 -2
- package/dist/chunks/{chunk.6XU6OLZ3.js → chunk.QNQNR3RY.js} +1 -16
- package/dist/chunks/chunk.QNQNR3RY.js.map +7 -0
- package/dist/chunks/{chunk.Q7X5NOPZ.js → chunk.QY6MKIMK.js} +2 -2
- package/dist/chunks/{chunk.VQWUZKDS.js → chunk.RMQZMRVP.js} +2 -2
- package/dist/chunks/{chunk.XXF35USM.js → chunk.RMZBSKRR.js} +59 -109
- package/dist/chunks/chunk.RMZBSKRR.js.map +7 -0
- package/dist/chunks/{chunk.OJ4KOC7R.js → chunk.SJMMPKWP.js} +1 -12
- package/dist/chunks/chunk.SJMMPKWP.js.map +7 -0
- package/dist/chunks/{chunk.AMTCNRDE.js → chunk.SZCGMXW5.js} +3 -3
- package/dist/chunks/chunk.SZCGMXW5.js.map +7 -0
- package/dist/chunks/{chunk.JHXCBOUD.js → chunk.TTL762VF.js} +57 -60
- package/dist/chunks/chunk.TTL762VF.js.map +7 -0
- package/dist/chunks/chunk.UYD2OVFV.js +83 -0
- package/dist/chunks/chunk.UYD2OVFV.js.map +7 -0
- package/dist/chunks/{chunk.7EGCXNF2.js → chunk.UZFPGR6M.js} +8 -7
- package/dist/chunks/chunk.UZFPGR6M.js.map +7 -0
- package/dist/chunks/{chunk.SXW2KV3B.js → chunk.VATYXV2O.js} +2 -2
- package/dist/chunks/{chunk.AFEABUNX.js → chunk.W5JK7V7K.js} +6 -1
- package/dist/chunks/chunk.W5JK7V7K.js.map +7 -0
- package/dist/chunks/{chunk.IRT2DA6R.js → chunk.WC5SV4TV.js} +28 -18
- package/dist/chunks/chunk.WC5SV4TV.js.map +7 -0
- package/dist/chunks/{chunk.HKCTVD3U.js → chunk.XEI5ZP7Y.js} +11 -7
- package/dist/chunks/chunk.XEI5ZP7Y.js.map +7 -0
- package/dist/chunks/{chunk.4I6M5V6O.js → chunk.XIUSSERX.js} +1 -16
- package/dist/chunks/chunk.XIUSSERX.js.map +7 -0
- package/dist/chunks/{chunk.6V3HOZNE.js → chunk.Y72MIUNI.js} +2 -2
- package/dist/chunks/{chunk.IKKMWFWH.js → chunk.ZIQXX272.js} +2 -2
- package/dist/chunks/{chunk.GOVLCQY5.js → chunk.ZT5DUKVA.js} +2 -2
- package/dist/components/button/button.component.js +13 -14
- package/dist/components/button/button.custom.styles.js +1 -1
- package/dist/components/button/button.js +14 -15
- package/dist/components/button/button.styles.js +2 -4
- package/dist/components/button-group/button-group.component.js +4 -5
- package/dist/components/button-group/button-group.js +5 -6
- package/dist/components/button-group/button-group.styles.js +2 -3
- package/dist/components/checkbox/checkbox.component.d.ts +5 -0
- package/dist/components/checkbox/checkbox.component.js +12 -11
- package/dist/components/checkbox/checkbox.custom.styles.js +1 -1
- package/dist/components/checkbox/checkbox.js +13 -12
- package/dist/components/checkbox/checkbox.styles.js +2 -4
- package/dist/components/divider/divider.component.js +5 -6
- package/dist/components/divider/divider.custom.styles.js +1 -1
- package/dist/components/divider/divider.js +6 -7
- package/dist/components/divider/divider.styles.js +2 -4
- package/dist/components/drawer/drawer.component.d.ts +110 -0
- package/dist/components/drawer/drawer.component.js +27 -0
- package/dist/components/drawer/drawer.component.js.map +7 -0
- package/dist/components/drawer/drawer.custom.styles.d.ts +2 -0
- package/dist/components/drawer/drawer.custom.styles.js +8 -0
- package/dist/components/drawer/drawer.custom.styles.js.map +7 -0
- package/dist/components/drawer/drawer.d.ts +8 -0
- package/dist/components/drawer/drawer.js +28 -0
- package/dist/components/drawer/drawer.js.map +7 -0
- package/dist/components/drawer/drawer.styles.d.ts +2 -0
- package/dist/components/drawer/drawer.styles.js +8 -0
- package/dist/components/drawer/drawer.styles.js.map +7 -0
- package/dist/components/icon/icon.component.js +6 -7
- package/dist/components/icon/icon.custom.styles.js +1 -1
- package/dist/components/icon/icon.js +7 -8
- package/dist/components/icon/icon.styles.js +2 -4
- package/dist/components/icon/library.default.js +1 -1
- package/dist/components/icon/library.js +1 -1
- package/dist/components/icon/library.system.js +1 -1
- package/dist/components/icon-button/icon-button.component.js +8 -9
- package/dist/components/icon-button/icon-button.custom.styles.js +1 -1
- package/dist/components/icon-button/icon-button.js +9 -10
- package/dist/components/icon-button/icon-button.styles.js +2 -4
- package/dist/components/input/input.component.js +14 -15
- package/dist/components/input/input.custom.styles.js +1 -1
- package/dist/components/input/input.js +15 -16
- package/dist/components/input/input.styles.js +2 -5
- package/dist/components/optgroup/optgroup.component.js +6 -7
- package/dist/components/optgroup/optgroup.js +7 -8
- package/dist/components/optgroup/optgroup.styles.js +1 -1
- package/dist/components/option/option.component.js +8 -9
- package/dist/components/option/option.custom.styles.js +1 -1
- package/dist/components/option/option.js +9 -10
- package/dist/components/option/option.styles.js +2 -4
- package/dist/components/popup/popup.component.d.ts +9 -0
- package/dist/components/popup/popup.component.js +4 -5
- package/dist/components/popup/popup.styles.js +2 -3
- package/dist/components/radio/radio.component.js +8 -9
- package/dist/components/radio/radio.custom.styles.js +1 -1
- package/dist/components/radio/radio.js +9 -10
- package/dist/components/radio/radio.styles.js +2 -4
- package/dist/components/radio-button/radio-button.component.js +6 -8
- package/dist/components/radio-button/radio-button.js +7 -9
- package/dist/components/radio-button/radio-button.styles.js +3 -5
- package/dist/components/radio-group/radio-group.component.d.ts +1 -0
- package/dist/components/radio-group/radio-group.component.js +9 -10
- package/dist/components/radio-group/radio-group.custom.styles.js +1 -1
- package/dist/components/radio-group/radio-group.js +10 -11
- package/dist/components/radio-group/radio-group.styles.js +2 -5
- package/dist/components/select/select.component.d.ts +1 -0
- package/dist/components/select/select.component.js +20 -20
- package/dist/components/select/select.custom.styles.js +1 -1
- package/dist/components/select/select.js +21 -21
- package/dist/components/select/select.styles.js +2 -5
- package/dist/components/spinner/spinner.component.js +4 -5
- package/dist/components/spinner/spinner.styles.js +2 -3
- package/dist/components/switch/switch.component.d.ts +5 -0
- package/dist/components/switch/switch.component.js +9 -8
- package/dist/components/switch/switch.custom.styles.js +2 -2
- package/dist/components/switch/switch.js +10 -9
- package/dist/components/switch/switch.styles.js +2 -4
- package/dist/components/tag/tag.component.js +10 -11
- package/dist/components/tag/tag.custom.styles.js +1 -1
- package/dist/components/tag/tag.js +11 -12
- package/dist/components/tag/tag.styles.js +2 -4
- package/dist/components/textarea/textarea.component.js +8 -9
- package/dist/components/textarea/textarea.custom.styles.js +1 -1
- package/dist/components/textarea/textarea.js +9 -10
- package/dist/components/textarea/textarea.styles.js +2 -5
- package/dist/custom-elements.json +877 -351
- package/dist/events/events.d.ts +2 -0
- package/dist/events/syn-initial-focus.d.ts +6 -0
- package/dist/events/syn-request-close.d.ts +8 -0
- package/dist/internal/active-elements.d.ts +15 -0
- package/dist/internal/longpress.d.ts +2 -2
- package/dist/internal/modal.d.ts +24 -0
- package/dist/internal/string.d.ts +2 -0
- package/dist/internal/tabbable.d.ts +9 -0
- package/dist/synergy-autoloader.js +1 -1
- package/dist/synergy.d.ts +1 -0
- package/dist/synergy.js +88 -81
- package/dist/themes/utility.css +29 -0
- package/dist/translations/de.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/utilities/animation-registry.js +2 -2
- package/dist/utilities/base-path.js +1 -1
- package/dist/utilities/form.js +3 -3
- package/dist/utilities/icon-library.js +1 -1
- package/dist/utilities/localize.js +1 -1
- package/dist/vscode.html-custom-data.json +78 -21
- package/package.json +4 -5
- package/dist/chunks/chunk.23HTU3YE.js.map +0 -7
- package/dist/chunks/chunk.2FN5DTS6.js.map +0 -7
- package/dist/chunks/chunk.3ZHSSMBL.js.map +0 -7
- package/dist/chunks/chunk.4I6M5V6O.js.map +0 -7
- package/dist/chunks/chunk.4MYR27GF.js.map +0 -7
- package/dist/chunks/chunk.4ZURABYO.js.map +0 -7
- package/dist/chunks/chunk.5BOEKFIJ.js.map +0 -7
- package/dist/chunks/chunk.6XU6OLZ3.js.map +0 -7
- package/dist/chunks/chunk.7EGCXNF2.js.map +0 -7
- package/dist/chunks/chunk.AFEABUNX.js.map +0 -7
- package/dist/chunks/chunk.AMTCNRDE.js.map +0 -7
- package/dist/chunks/chunk.CYN675Z6.js.map +0 -7
- package/dist/chunks/chunk.EI34C7LC.js.map +0 -7
- package/dist/chunks/chunk.EKOK7YPB.js.map +0 -7
- package/dist/chunks/chunk.GHMKOVA3.js.map +0 -7
- package/dist/chunks/chunk.GMUVD5B2.js.map +0 -7
- package/dist/chunks/chunk.HKCTVD3U.js.map +0 -7
- package/dist/chunks/chunk.IRT2DA6R.js.map +0 -7
- package/dist/chunks/chunk.JAKJHV44.js.map +0 -7
- package/dist/chunks/chunk.JBYBQ5TQ.js.map +0 -7
- package/dist/chunks/chunk.JHXCBOUD.js.map +0 -7
- package/dist/chunks/chunk.JN7CLMQZ.js.map +0 -7
- package/dist/chunks/chunk.MFFJYORB.js.map +0 -7
- package/dist/chunks/chunk.MNMITYTH.js.map +0 -7
- package/dist/chunks/chunk.N2I6HVX3.js.map +0 -7
- package/dist/chunks/chunk.NAX6WP3D.js.map +0 -7
- package/dist/chunks/chunk.O7USYXBT.js +0 -23
- package/dist/chunks/chunk.OJ4KOC7R.js.map +0 -7
- package/dist/chunks/chunk.OJREQD2D.js.map +0 -7
- package/dist/chunks/chunk.PGCXJ2PT.js.map +0 -7
- package/dist/chunks/chunk.QHFGD6WW.js.map +0 -7
- package/dist/chunks/chunk.RSONAU45.js.map +0 -7
- package/dist/chunks/chunk.SBEIXLRW.js.map +0 -7
- package/dist/chunks/chunk.TUYEX4KP.js.map +0 -7
- package/dist/chunks/chunk.W6V7TPGK.js.map +0 -7
- package/dist/chunks/chunk.XSXBQCWN.js.map +0 -7
- package/dist/chunks/chunk.XXF35USM.js.map +0 -7
- package/dist/chunks/chunk.Z4NKFCKY.js.map +0 -7
- package/dist/web-types.json +0 -2449
- /package/dist/chunks/{chunk.ULMZHWWW.js.map → chunk.5BMNRZ7L.js.map} +0 -0
- /package/dist/chunks/{chunk.SMSP5C6C.js.map → chunk.5CB3CVZ7.js.map} +0 -0
- /package/dist/chunks/{chunk.5OPODPPZ.js.map → chunk.AJU6C4KC.js.map} +0 -0
- /package/dist/chunks/{chunk.VZ7S7YYN.js.map → chunk.AVTU2BGE.js.map} +0 -0
- /package/dist/chunks/{chunk.LWXCBEHD.js.map → chunk.BGKFRWWO.js.map} +0 -0
- /package/dist/chunks/{chunk.USYR7G7Z.js.map → chunk.BTZX6ZFZ.js.map} +0 -0
- /package/dist/chunks/{chunk.RA2WSKQT.js.map → chunk.F4THECWA.js.map} +0 -0
- /package/dist/chunks/{chunk.PMTVLWNZ.js.map → chunk.FUNZW7ES.js.map} +0 -0
- /package/dist/chunks/{chunk.7VOPIPHW.js.map → chunk.IOPUYG6Q.js.map} +0 -0
- /package/dist/chunks/{chunk.5THN2K5Q.js.map → chunk.IR2PZHC7.js.map} +0 -0
- /package/dist/chunks/{chunk.HG5QC5EW.js.map → chunk.KUO3KJOC.js.map} +0 -0
- /package/dist/chunks/{chunk.B6AKFQJS.js.map → chunk.LF2XSSHD.js.map} +0 -0
- /package/dist/chunks/{chunk.KP7SYG4K.js.map → chunk.LZE7OXKV.js.map} +0 -0
- /package/dist/chunks/{chunk.7KSU2SUD.js.map → chunk.PRZRH7SN.js.map} +0 -0
- /package/dist/chunks/{chunk.BQG5LF7J.js.map → chunk.QAUTITK3.js.map} +0 -0
- /package/dist/chunks/{chunk.DJOAQ4JU.js.map → chunk.QNDC5KWA.js.map} +0 -0
- /package/dist/chunks/{chunk.Q7X5NOPZ.js.map → chunk.QY6MKIMK.js.map} +0 -0
- /package/dist/chunks/{chunk.VQWUZKDS.js.map → chunk.RMQZMRVP.js.map} +0 -0
- /package/dist/chunks/{chunk.SXW2KV3B.js.map → chunk.VATYXV2O.js.map} +0 -0
- /package/dist/chunks/{chunk.6V3HOZNE.js.map → chunk.Y72MIUNI.js.map} +0 -0
- /package/dist/chunks/{chunk.IKKMWFWH.js.map → chunk.ZIQXX272.js.map} +0 -0
- /package/dist/chunks/{chunk.GOVLCQY5.js.map → chunk.ZT5DUKVA.js.map} +0 -0
|
@@ -0,0 +1,636 @@
|
|
|
1
|
+
import {
|
|
2
|
+
animateTo,
|
|
3
|
+
lockBodyScrolling,
|
|
4
|
+
stopAnimations,
|
|
5
|
+
unlockBodyScrolling,
|
|
6
|
+
waitForEvent
|
|
7
|
+
} from "./chunk.GTSRMEPE.js";
|
|
8
|
+
import {
|
|
9
|
+
getAnimation,
|
|
10
|
+
setDefaultAnimation
|
|
11
|
+
} from "./chunk.QAUTITK3.js";
|
|
12
|
+
import {
|
|
13
|
+
SynIconButton
|
|
14
|
+
} from "./chunk.O6AXKVFJ.js";
|
|
15
|
+
import {
|
|
16
|
+
drawer_custom_styles_default
|
|
17
|
+
} from "./chunk.UYD2OVFV.js";
|
|
18
|
+
import {
|
|
19
|
+
drawer_styles_default
|
|
20
|
+
} from "./chunk.PHSJD47V.js";
|
|
21
|
+
import {
|
|
22
|
+
LocalizeController
|
|
23
|
+
} from "./chunk.LAB4YJYE.js";
|
|
24
|
+
import {
|
|
25
|
+
HasSlotController
|
|
26
|
+
} from "./chunk.XGXFE6IF.js";
|
|
27
|
+
import {
|
|
28
|
+
watch
|
|
29
|
+
} from "./chunk.AVTU2BGE.js";
|
|
30
|
+
import {
|
|
31
|
+
SynergyElement,
|
|
32
|
+
component_styles_default
|
|
33
|
+
} from "./chunk.3DE5ARIC.js";
|
|
34
|
+
import {
|
|
35
|
+
__decorateClass,
|
|
36
|
+
__yieldStar
|
|
37
|
+
} from "./chunk.QNDC5KWA.js";
|
|
38
|
+
|
|
39
|
+
// src/components/drawer/drawer.component.ts
|
|
40
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
41
|
+
import { html } from "lit";
|
|
42
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
43
|
+
import { property, query } from "lit/decorators.js";
|
|
44
|
+
|
|
45
|
+
// src/internal/string.ts
|
|
46
|
+
function uppercaseFirstLetter(string) {
|
|
47
|
+
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// src/internal/active-elements.ts
|
|
51
|
+
function* activeElements(activeElement = document.activeElement) {
|
|
52
|
+
if (activeElement === null || activeElement === void 0)
|
|
53
|
+
return;
|
|
54
|
+
yield activeElement;
|
|
55
|
+
if ("shadowRoot" in activeElement && activeElement.shadowRoot && activeElement.shadowRoot.mode !== "closed") {
|
|
56
|
+
yield* __yieldStar(activeElements(activeElement.shadowRoot.activeElement));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function getDeepestActiveElement() {
|
|
60
|
+
return [...activeElements()].pop();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// src/internal/tabbable.ts
|
|
64
|
+
var computedStyleMap = /* @__PURE__ */ new WeakMap();
|
|
65
|
+
function getCachedComputedStyle(el) {
|
|
66
|
+
let computedStyle = computedStyleMap.get(el);
|
|
67
|
+
if (!computedStyle) {
|
|
68
|
+
computedStyle = window.getComputedStyle(el, null);
|
|
69
|
+
computedStyleMap.set(el, computedStyle);
|
|
70
|
+
}
|
|
71
|
+
return computedStyle;
|
|
72
|
+
}
|
|
73
|
+
function isVisible(el) {
|
|
74
|
+
if (typeof el.checkVisibility === "function") {
|
|
75
|
+
return el.checkVisibility({ checkOpacity: false, checkVisibilityCSS: true });
|
|
76
|
+
}
|
|
77
|
+
const computedStyle = getCachedComputedStyle(el);
|
|
78
|
+
return computedStyle.visibility !== "hidden" && computedStyle.display !== "none";
|
|
79
|
+
}
|
|
80
|
+
function isOverflowingAndTabbable(el) {
|
|
81
|
+
const computedStyle = getCachedComputedStyle(el);
|
|
82
|
+
const { overflowY, overflowX } = computedStyle;
|
|
83
|
+
if (overflowY === "scroll" || overflowX === "scroll") {
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
if (overflowY !== "auto" || overflowX !== "auto") {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
const isOverflowingY = el.scrollHeight > el.clientHeight;
|
|
90
|
+
if (isOverflowingY && overflowY === "auto") {
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
const isOverflowingX = el.scrollWidth > el.clientWidth;
|
|
94
|
+
if (isOverflowingX && overflowX === "auto") {
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
function isTabbable(el) {
|
|
100
|
+
const tag = el.tagName.toLowerCase();
|
|
101
|
+
const tabindex = Number(el.getAttribute("tabindex"));
|
|
102
|
+
const hasTabindex = el.hasAttribute("tabindex");
|
|
103
|
+
if (hasTabindex && (isNaN(tabindex) || tabindex <= -1)) {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
if (el.hasAttribute("disabled")) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
if (el.closest("[inert]")) {
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
if (tag === "input" && el.getAttribute("type") === "radio" && !el.hasAttribute("checked")) {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
if (!isVisible(el)) {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
if ((tag === "audio" || tag === "video") && el.hasAttribute("controls")) {
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
if (el.hasAttribute("tabindex")) {
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
if (el.hasAttribute("contenteditable") && el.getAttribute("contenteditable") !== "false") {
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
const isNativelyTabbable = [
|
|
128
|
+
"button",
|
|
129
|
+
"input",
|
|
130
|
+
"select",
|
|
131
|
+
"textarea",
|
|
132
|
+
"a",
|
|
133
|
+
"audio",
|
|
134
|
+
"video",
|
|
135
|
+
"summary",
|
|
136
|
+
"iframe"
|
|
137
|
+
].includes(tag);
|
|
138
|
+
if (isNativelyTabbable) {
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
return isOverflowingAndTabbable(el);
|
|
142
|
+
}
|
|
143
|
+
function getSlottedChildrenOutsideRootElement(slotElement, root) {
|
|
144
|
+
var _a;
|
|
145
|
+
return ((_a = slotElement.getRootNode({ composed: true })) == null ? void 0 : _a.host) !== root;
|
|
146
|
+
}
|
|
147
|
+
function getTabbableElements(root) {
|
|
148
|
+
const walkedEls = /* @__PURE__ */ new WeakMap();
|
|
149
|
+
const tabbableElements = [];
|
|
150
|
+
function walk(el) {
|
|
151
|
+
if (el instanceof Element) {
|
|
152
|
+
if (el.hasAttribute("inert") || el.closest("[inert]")) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
if (walkedEls.has(el)) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
walkedEls.set(el, true);
|
|
159
|
+
if (!tabbableElements.includes(el) && isTabbable(el)) {
|
|
160
|
+
tabbableElements.push(el);
|
|
161
|
+
}
|
|
162
|
+
if (el instanceof HTMLSlotElement && getSlottedChildrenOutsideRootElement(el, root)) {
|
|
163
|
+
el.assignedElements({ flatten: true }).forEach((assignedEl) => {
|
|
164
|
+
walk(assignedEl);
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
if (el.shadowRoot !== null && el.shadowRoot.mode === "open") {
|
|
168
|
+
walk(el.shadowRoot);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
for (const e of el.children) {
|
|
172
|
+
walk(e);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
walk(root);
|
|
176
|
+
return tabbableElements.sort((a, b) => {
|
|
177
|
+
const aTabindex = Number(a.getAttribute("tabindex")) || 0;
|
|
178
|
+
const bTabindex = Number(b.getAttribute("tabindex")) || 0;
|
|
179
|
+
return bTabindex - aTabindex;
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// src/internal/modal.ts
|
|
184
|
+
var activeModals = [];
|
|
185
|
+
var Modal = class {
|
|
186
|
+
constructor(element) {
|
|
187
|
+
this.tabDirection = "forward";
|
|
188
|
+
this.handleFocusIn = () => {
|
|
189
|
+
if (!this.isActive())
|
|
190
|
+
return;
|
|
191
|
+
this.checkFocus();
|
|
192
|
+
};
|
|
193
|
+
this.handleKeyDown = (event) => {
|
|
194
|
+
var _a;
|
|
195
|
+
if (event.key !== "Tab" || this.isExternalActivated)
|
|
196
|
+
return;
|
|
197
|
+
if (!this.isActive())
|
|
198
|
+
return;
|
|
199
|
+
const currentActiveElement = getDeepestActiveElement();
|
|
200
|
+
this.previousFocus = currentActiveElement;
|
|
201
|
+
if (this.previousFocus && this.possiblyHasTabbableChildren(this.previousFocus)) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
if (event.shiftKey) {
|
|
205
|
+
this.tabDirection = "backward";
|
|
206
|
+
} else {
|
|
207
|
+
this.tabDirection = "forward";
|
|
208
|
+
}
|
|
209
|
+
const tabbableElements = getTabbableElements(this.element);
|
|
210
|
+
let currentFocusIndex = tabbableElements.findIndex((el) => el === currentActiveElement);
|
|
211
|
+
this.previousFocus = this.currentFocus;
|
|
212
|
+
const addition = this.tabDirection === "forward" ? 1 : -1;
|
|
213
|
+
while (true) {
|
|
214
|
+
if (currentFocusIndex + addition >= tabbableElements.length) {
|
|
215
|
+
currentFocusIndex = 0;
|
|
216
|
+
} else if (currentFocusIndex + addition < 0) {
|
|
217
|
+
currentFocusIndex = tabbableElements.length - 1;
|
|
218
|
+
} else {
|
|
219
|
+
currentFocusIndex += addition;
|
|
220
|
+
}
|
|
221
|
+
this.previousFocus = this.currentFocus;
|
|
222
|
+
const nextFocus = (
|
|
223
|
+
/** @type {HTMLElement} */
|
|
224
|
+
tabbableElements[currentFocusIndex]
|
|
225
|
+
);
|
|
226
|
+
if (this.tabDirection === "backward") {
|
|
227
|
+
if (this.previousFocus && this.possiblyHasTabbableChildren(this.previousFocus)) {
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
if (nextFocus && this.possiblyHasTabbableChildren(nextFocus)) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
event.preventDefault();
|
|
235
|
+
this.currentFocus = nextFocus;
|
|
236
|
+
(_a = this.currentFocus) == null ? void 0 : _a.focus({ preventScroll: false });
|
|
237
|
+
const allActiveElements = [...activeElements()];
|
|
238
|
+
if (allActiveElements.includes(this.currentFocus) || !allActiveElements.includes(this.previousFocus)) {
|
|
239
|
+
break;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
setTimeout(() => this.checkFocus());
|
|
243
|
+
};
|
|
244
|
+
this.handleKeyUp = () => {
|
|
245
|
+
this.tabDirection = "forward";
|
|
246
|
+
};
|
|
247
|
+
this.element = element;
|
|
248
|
+
this.elementsWithTabbableControls = ["iframe"];
|
|
249
|
+
}
|
|
250
|
+
/** Activates focus trapping. */
|
|
251
|
+
activate() {
|
|
252
|
+
activeModals.push(this.element);
|
|
253
|
+
document.addEventListener("focusin", this.handleFocusIn);
|
|
254
|
+
document.addEventListener("keydown", this.handleKeyDown);
|
|
255
|
+
document.addEventListener("keyup", this.handleKeyUp);
|
|
256
|
+
}
|
|
257
|
+
/** Deactivates focus trapping. */
|
|
258
|
+
deactivate() {
|
|
259
|
+
activeModals = activeModals.filter((modal) => modal !== this.element);
|
|
260
|
+
this.currentFocus = null;
|
|
261
|
+
document.removeEventListener("focusin", this.handleFocusIn);
|
|
262
|
+
document.removeEventListener("keydown", this.handleKeyDown);
|
|
263
|
+
document.removeEventListener("keyup", this.handleKeyUp);
|
|
264
|
+
}
|
|
265
|
+
/** Determines if this modal element is currently active or not. */
|
|
266
|
+
isActive() {
|
|
267
|
+
return activeModals[activeModals.length - 1] === this.element;
|
|
268
|
+
}
|
|
269
|
+
/** Activates external modal behavior and temporarily disables focus trapping. */
|
|
270
|
+
activateExternal() {
|
|
271
|
+
this.isExternalActivated = true;
|
|
272
|
+
}
|
|
273
|
+
/** Deactivates external modal behavior and re-enables focus trapping. */
|
|
274
|
+
deactivateExternal() {
|
|
275
|
+
this.isExternalActivated = false;
|
|
276
|
+
}
|
|
277
|
+
checkFocus() {
|
|
278
|
+
if (this.isActive() && !this.isExternalActivated) {
|
|
279
|
+
const tabbableElements = getTabbableElements(this.element);
|
|
280
|
+
if (!this.element.matches(":focus-within")) {
|
|
281
|
+
const start = tabbableElements[0];
|
|
282
|
+
const end = tabbableElements[tabbableElements.length - 1];
|
|
283
|
+
const target = this.tabDirection === "forward" ? start : end;
|
|
284
|
+
if (typeof (target == null ? void 0 : target.focus) === "function") {
|
|
285
|
+
this.currentFocus = target;
|
|
286
|
+
target.focus({ preventScroll: false });
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
possiblyHasTabbableChildren(element) {
|
|
292
|
+
return this.elementsWithTabbableControls.includes(element.tagName.toLowerCase()) || element.hasAttribute("controls");
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
// src/components/drawer/drawer.component.ts
|
|
297
|
+
var SynDrawer = class extends SynergyElement {
|
|
298
|
+
constructor() {
|
|
299
|
+
super(...arguments);
|
|
300
|
+
this.hasSlotController = new HasSlotController(this, "footer");
|
|
301
|
+
this.localize = new LocalizeController(this);
|
|
302
|
+
this.modal = new Modal(this);
|
|
303
|
+
this.open = false;
|
|
304
|
+
this.label = "";
|
|
305
|
+
this.placement = "end";
|
|
306
|
+
this.contained = false;
|
|
307
|
+
this.noHeader = false;
|
|
308
|
+
this.handleDocumentKeyDown = (event) => {
|
|
309
|
+
if (this.contained) {
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
if (event.key === "Escape" && this.modal.isActive() && this.open) {
|
|
313
|
+
event.stopImmediatePropagation();
|
|
314
|
+
this.requestClose("keyboard");
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
firstUpdated() {
|
|
319
|
+
this.drawer.hidden = !this.open;
|
|
320
|
+
if (this.open) {
|
|
321
|
+
this.addOpenListeners();
|
|
322
|
+
if (!this.contained) {
|
|
323
|
+
this.modal.activate();
|
|
324
|
+
lockBodyScrolling(this);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
disconnectedCallback() {
|
|
329
|
+
var _a;
|
|
330
|
+
super.disconnectedCallback();
|
|
331
|
+
unlockBodyScrolling(this);
|
|
332
|
+
(_a = this.closeWatcher) == null ? void 0 : _a.destroy();
|
|
333
|
+
}
|
|
334
|
+
requestClose(source) {
|
|
335
|
+
const slRequestClose = this.emit("syn-request-close", {
|
|
336
|
+
cancelable: true,
|
|
337
|
+
detail: { source }
|
|
338
|
+
});
|
|
339
|
+
if (slRequestClose.defaultPrevented) {
|
|
340
|
+
const animation = getAnimation(this, "drawer.denyClose", { dir: this.localize.dir() });
|
|
341
|
+
animateTo(this.panel, animation.keyframes, animation.options);
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
this.hide();
|
|
345
|
+
}
|
|
346
|
+
addOpenListeners() {
|
|
347
|
+
var _a;
|
|
348
|
+
if ("CloseWatcher" in window) {
|
|
349
|
+
(_a = this.closeWatcher) == null ? void 0 : _a.destroy();
|
|
350
|
+
if (!this.contained) {
|
|
351
|
+
this.closeWatcher = new CloseWatcher();
|
|
352
|
+
this.closeWatcher.onclose = () => this.requestClose("keyboard");
|
|
353
|
+
}
|
|
354
|
+
} else {
|
|
355
|
+
document.addEventListener("keydown", this.handleDocumentKeyDown);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
removeOpenListeners() {
|
|
359
|
+
var _a;
|
|
360
|
+
document.removeEventListener("keydown", this.handleDocumentKeyDown);
|
|
361
|
+
(_a = this.closeWatcher) == null ? void 0 : _a.destroy();
|
|
362
|
+
}
|
|
363
|
+
async handleOpenChange() {
|
|
364
|
+
if (this.open) {
|
|
365
|
+
this.emit("syn-show");
|
|
366
|
+
this.addOpenListeners();
|
|
367
|
+
this.originalTrigger = document.activeElement;
|
|
368
|
+
if (!this.contained) {
|
|
369
|
+
this.modal.activate();
|
|
370
|
+
lockBodyScrolling(this);
|
|
371
|
+
}
|
|
372
|
+
const autoFocusTarget = this.querySelector("[autofocus]");
|
|
373
|
+
if (autoFocusTarget) {
|
|
374
|
+
autoFocusTarget.removeAttribute("autofocus");
|
|
375
|
+
}
|
|
376
|
+
await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);
|
|
377
|
+
this.drawer.hidden = false;
|
|
378
|
+
requestAnimationFrame(() => {
|
|
379
|
+
const slInitialFocus = this.emit("syn-initial-focus", { cancelable: true });
|
|
380
|
+
if (!slInitialFocus.defaultPrevented) {
|
|
381
|
+
if (autoFocusTarget) {
|
|
382
|
+
autoFocusTarget.focus({ preventScroll: true });
|
|
383
|
+
} else {
|
|
384
|
+
this.panel.focus({ preventScroll: true });
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
if (autoFocusTarget) {
|
|
388
|
+
autoFocusTarget.setAttribute("autofocus", "");
|
|
389
|
+
}
|
|
390
|
+
});
|
|
391
|
+
const panelAnimation = getAnimation(this, `drawer.show${uppercaseFirstLetter(this.placement)}`, {
|
|
392
|
+
dir: this.localize.dir()
|
|
393
|
+
});
|
|
394
|
+
const overlayAnimation = getAnimation(this, "drawer.overlay.show", { dir: this.localize.dir() });
|
|
395
|
+
await Promise.all([
|
|
396
|
+
animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),
|
|
397
|
+
animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options)
|
|
398
|
+
]);
|
|
399
|
+
this.emit("syn-after-show");
|
|
400
|
+
} else {
|
|
401
|
+
this.emit("syn-hide");
|
|
402
|
+
this.removeOpenListeners();
|
|
403
|
+
if (!this.contained) {
|
|
404
|
+
this.modal.deactivate();
|
|
405
|
+
unlockBodyScrolling(this);
|
|
406
|
+
}
|
|
407
|
+
await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);
|
|
408
|
+
const panelAnimation = getAnimation(this, `drawer.hide${uppercaseFirstLetter(this.placement)}`, {
|
|
409
|
+
dir: this.localize.dir()
|
|
410
|
+
});
|
|
411
|
+
const overlayAnimation = getAnimation(this, "drawer.overlay.hide", { dir: this.localize.dir() });
|
|
412
|
+
await Promise.all([
|
|
413
|
+
animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options).then(() => {
|
|
414
|
+
this.overlay.hidden = true;
|
|
415
|
+
}),
|
|
416
|
+
animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options).then(() => {
|
|
417
|
+
this.panel.hidden = true;
|
|
418
|
+
})
|
|
419
|
+
]);
|
|
420
|
+
this.drawer.hidden = true;
|
|
421
|
+
this.overlay.hidden = false;
|
|
422
|
+
this.panel.hidden = false;
|
|
423
|
+
const trigger = this.originalTrigger;
|
|
424
|
+
if (typeof (trigger == null ? void 0 : trigger.focus) === "function") {
|
|
425
|
+
setTimeout(() => trigger.focus());
|
|
426
|
+
}
|
|
427
|
+
this.emit("syn-after-hide");
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
handleNoModalChange() {
|
|
431
|
+
if (this.open && !this.contained) {
|
|
432
|
+
this.modal.activate();
|
|
433
|
+
lockBodyScrolling(this);
|
|
434
|
+
}
|
|
435
|
+
if (this.open && this.contained) {
|
|
436
|
+
this.modal.deactivate();
|
|
437
|
+
unlockBodyScrolling(this);
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
/** Shows the drawer. */
|
|
441
|
+
async show() {
|
|
442
|
+
if (this.open) {
|
|
443
|
+
return void 0;
|
|
444
|
+
}
|
|
445
|
+
this.open = true;
|
|
446
|
+
return waitForEvent(this, "syn-after-show");
|
|
447
|
+
}
|
|
448
|
+
/** Hides the drawer */
|
|
449
|
+
async hide() {
|
|
450
|
+
if (!this.open) {
|
|
451
|
+
return void 0;
|
|
452
|
+
}
|
|
453
|
+
this.open = false;
|
|
454
|
+
return waitForEvent(this, "syn-after-hide");
|
|
455
|
+
}
|
|
456
|
+
render() {
|
|
457
|
+
return html`
|
|
458
|
+
<div
|
|
459
|
+
part="base"
|
|
460
|
+
class=${classMap({
|
|
461
|
+
drawer: true,
|
|
462
|
+
"drawer--open": this.open,
|
|
463
|
+
"drawer--top": this.placement === "top",
|
|
464
|
+
"drawer--end": this.placement === "end",
|
|
465
|
+
"drawer--bottom": this.placement === "bottom",
|
|
466
|
+
"drawer--start": this.placement === "start",
|
|
467
|
+
"drawer--contained": this.contained,
|
|
468
|
+
"drawer--fixed": !this.contained,
|
|
469
|
+
"drawer--rtl": this.localize.dir() === "rtl",
|
|
470
|
+
"drawer--has-footer": this.hasSlotController.test("footer")
|
|
471
|
+
})}
|
|
472
|
+
>
|
|
473
|
+
<div part="overlay" class="drawer__overlay" @click=${() => this.requestClose("overlay")} tabindex="-1"></div>
|
|
474
|
+
|
|
475
|
+
<div
|
|
476
|
+
part="panel"
|
|
477
|
+
class="drawer__panel"
|
|
478
|
+
role="dialog"
|
|
479
|
+
aria-modal="true"
|
|
480
|
+
aria-hidden=${this.open ? "false" : "true"}
|
|
481
|
+
aria-label=${ifDefined(this.noHeader ? this.label : void 0)}
|
|
482
|
+
aria-labelledby=${ifDefined(!this.noHeader ? "title" : void 0)}
|
|
483
|
+
tabindex="0"
|
|
484
|
+
>
|
|
485
|
+
${!this.noHeader ? html`
|
|
486
|
+
<header part="header" class="drawer__header">
|
|
487
|
+
<h2 part="title" class="drawer__title" id="title">
|
|
488
|
+
<!-- If there's no label, use an invisible character to prevent the header from collapsing -->
|
|
489
|
+
<slot name="label"> ${this.label.length > 0 ? this.label : String.fromCharCode(65279)} </slot>
|
|
490
|
+
</h2>
|
|
491
|
+
<div part="header-actions" class="drawer__header-actions">
|
|
492
|
+
<slot name="header-actions"></slot>
|
|
493
|
+
<syn-icon-button
|
|
494
|
+
part="close-button"
|
|
495
|
+
exportparts="base:close-button__base"
|
|
496
|
+
class="drawer__close"
|
|
497
|
+
name="x-lg"
|
|
498
|
+
label=${this.localize.term("close")}
|
|
499
|
+
library="system"
|
|
500
|
+
@click=${() => this.requestClose("close-button")}
|
|
501
|
+
></syn-icon-button>
|
|
502
|
+
</div>
|
|
503
|
+
</header>
|
|
504
|
+
` : ""}
|
|
505
|
+
|
|
506
|
+
<slot part="body" class="drawer__body"></slot>
|
|
507
|
+
|
|
508
|
+
<footer part="footer" class="drawer__footer">
|
|
509
|
+
<slot name="footer"></slot>
|
|
510
|
+
</footer>
|
|
511
|
+
</div>
|
|
512
|
+
</div>
|
|
513
|
+
`;
|
|
514
|
+
}
|
|
515
|
+
};
|
|
516
|
+
SynDrawer.styles = [component_styles_default, drawer_styles_default, drawer_custom_styles_default];
|
|
517
|
+
SynDrawer.dependencies = { "syn-icon-button": SynIconButton };
|
|
518
|
+
__decorateClass([
|
|
519
|
+
query(".drawer")
|
|
520
|
+
], SynDrawer.prototype, "drawer", 2);
|
|
521
|
+
__decorateClass([
|
|
522
|
+
query(".drawer__panel")
|
|
523
|
+
], SynDrawer.prototype, "panel", 2);
|
|
524
|
+
__decorateClass([
|
|
525
|
+
query(".drawer__overlay")
|
|
526
|
+
], SynDrawer.prototype, "overlay", 2);
|
|
527
|
+
__decorateClass([
|
|
528
|
+
property({ type: Boolean, reflect: true })
|
|
529
|
+
], SynDrawer.prototype, "open", 2);
|
|
530
|
+
__decorateClass([
|
|
531
|
+
property({ reflect: true })
|
|
532
|
+
], SynDrawer.prototype, "label", 2);
|
|
533
|
+
__decorateClass([
|
|
534
|
+
property({ reflect: true })
|
|
535
|
+
], SynDrawer.prototype, "placement", 2);
|
|
536
|
+
__decorateClass([
|
|
537
|
+
property({ type: Boolean, reflect: true })
|
|
538
|
+
], SynDrawer.prototype, "contained", 2);
|
|
539
|
+
__decorateClass([
|
|
540
|
+
property({ attribute: "no-header", type: Boolean, reflect: true })
|
|
541
|
+
], SynDrawer.prototype, "noHeader", 2);
|
|
542
|
+
__decorateClass([
|
|
543
|
+
watch("open", { waitUntilFirstUpdate: true })
|
|
544
|
+
], SynDrawer.prototype, "handleOpenChange", 1);
|
|
545
|
+
__decorateClass([
|
|
546
|
+
watch("contained", { waitUntilFirstUpdate: true })
|
|
547
|
+
], SynDrawer.prototype, "handleNoModalChange", 1);
|
|
548
|
+
setDefaultAnimation("drawer.showTop", {
|
|
549
|
+
keyframes: [
|
|
550
|
+
{ opacity: 0, translate: "0 -100%" },
|
|
551
|
+
{ opacity: 1, translate: "0 0" }
|
|
552
|
+
],
|
|
553
|
+
options: { duration: 250, easing: "ease" }
|
|
554
|
+
});
|
|
555
|
+
setDefaultAnimation("drawer.hideTop", {
|
|
556
|
+
keyframes: [
|
|
557
|
+
{ opacity: 1, translate: "0 0" },
|
|
558
|
+
{ opacity: 0, translate: "0 -100%" }
|
|
559
|
+
],
|
|
560
|
+
options: { duration: 250, easing: "ease" }
|
|
561
|
+
});
|
|
562
|
+
setDefaultAnimation("drawer.showEnd", {
|
|
563
|
+
keyframes: [
|
|
564
|
+
{ opacity: 0, translate: "100%" },
|
|
565
|
+
{ opacity: 1, translate: "0" }
|
|
566
|
+
],
|
|
567
|
+
rtlKeyframes: [
|
|
568
|
+
{ opacity: 0, translate: "-100%" },
|
|
569
|
+
{ opacity: 1, translate: "0" }
|
|
570
|
+
],
|
|
571
|
+
options: { duration: 250, easing: "ease" }
|
|
572
|
+
});
|
|
573
|
+
setDefaultAnimation("drawer.hideEnd", {
|
|
574
|
+
keyframes: [
|
|
575
|
+
{ opacity: 1, translate: "0" },
|
|
576
|
+
{ opacity: 0, translate: "100%" }
|
|
577
|
+
],
|
|
578
|
+
rtlKeyframes: [
|
|
579
|
+
{ opacity: 1, translate: "0" },
|
|
580
|
+
{ opacity: 0, translate: "-100%" }
|
|
581
|
+
],
|
|
582
|
+
options: { duration: 250, easing: "ease" }
|
|
583
|
+
});
|
|
584
|
+
setDefaultAnimation("drawer.showBottom", {
|
|
585
|
+
keyframes: [
|
|
586
|
+
{ opacity: 0, translate: "0 100%" },
|
|
587
|
+
{ opacity: 1, translate: "0 0" }
|
|
588
|
+
],
|
|
589
|
+
options: { duration: 250, easing: "ease" }
|
|
590
|
+
});
|
|
591
|
+
setDefaultAnimation("drawer.hideBottom", {
|
|
592
|
+
keyframes: [
|
|
593
|
+
{ opacity: 1, translate: "0 0" },
|
|
594
|
+
{ opacity: 0, translate: "0 100%" }
|
|
595
|
+
],
|
|
596
|
+
options: { duration: 250, easing: "ease" }
|
|
597
|
+
});
|
|
598
|
+
setDefaultAnimation("drawer.showStart", {
|
|
599
|
+
keyframes: [
|
|
600
|
+
{ opacity: 0, translate: "-100%" },
|
|
601
|
+
{ opacity: 1, translate: "0" }
|
|
602
|
+
],
|
|
603
|
+
rtlKeyframes: [
|
|
604
|
+
{ opacity: 0, translate: "100%" },
|
|
605
|
+
{ opacity: 1, translate: "0" }
|
|
606
|
+
],
|
|
607
|
+
options: { duration: 250, easing: "ease" }
|
|
608
|
+
});
|
|
609
|
+
setDefaultAnimation("drawer.hideStart", {
|
|
610
|
+
keyframes: [
|
|
611
|
+
{ opacity: 1, translate: "0" },
|
|
612
|
+
{ opacity: 0, translate: "-100%" }
|
|
613
|
+
],
|
|
614
|
+
rtlKeyframes: [
|
|
615
|
+
{ opacity: 1, translate: "0" },
|
|
616
|
+
{ opacity: 0, translate: "100%" }
|
|
617
|
+
],
|
|
618
|
+
options: { duration: 250, easing: "ease" }
|
|
619
|
+
});
|
|
620
|
+
setDefaultAnimation("drawer.denyClose", {
|
|
621
|
+
keyframes: [{ scale: 1 }, { scale: 1.01 }, { scale: 1 }],
|
|
622
|
+
options: { duration: 250 }
|
|
623
|
+
});
|
|
624
|
+
setDefaultAnimation("drawer.overlay.show", {
|
|
625
|
+
keyframes: [{ opacity: 0 }, { opacity: 1 }],
|
|
626
|
+
options: { duration: 250 }
|
|
627
|
+
});
|
|
628
|
+
setDefaultAnimation("drawer.overlay.hide", {
|
|
629
|
+
keyframes: [{ opacity: 1 }, { opacity: 0 }],
|
|
630
|
+
options: { duration: 250 }
|
|
631
|
+
});
|
|
632
|
+
|
|
633
|
+
export {
|
|
634
|
+
SynDrawer
|
|
635
|
+
};
|
|
636
|
+
//# sourceMappingURL=chunk.BLOH2ZNU.js.map
|