@ds-autonomie/web-components 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +318 -0
- package/LICENSE +8 -0
- package/README.md +3 -0
- package/dist/chunks/chunk.23TOS4ZE.js +29 -0
- package/dist/chunks/chunk.2FK6USFR.js +63 -0
- package/dist/chunks/chunk.2HUORR44.js +76 -0
- package/dist/chunks/chunk.3BL7JA77.js +59 -0
- package/dist/chunks/chunk.3RBCYA4F.js +147 -0
- package/dist/chunks/chunk.3XRQRY25.js +25 -0
- package/dist/chunks/chunk.42W4S2HN.js +145 -0
- package/dist/chunks/chunk.4A3WMGMZ.js +79 -0
- package/dist/chunks/chunk.4A57I2HX.js +241 -0
- package/dist/chunks/chunk.4XT2OJD2.js +75 -0
- package/dist/chunks/chunk.5LT3B7MI.js +372 -0
- package/dist/chunks/chunk.5WAZTHII.js +37 -0
- package/dist/chunks/chunk.5XL2LZLC.js +100 -0
- package/dist/chunks/chunk.5XUV3SRW.js +420 -0
- package/dist/chunks/chunk.6FAUBLR3.js +84 -0
- package/dist/chunks/chunk.6M63UXML.js +35 -0
- package/dist/chunks/chunk.6PS5KB3O.js +53 -0
- package/dist/chunks/chunk.6ZQ4OQ2C.js +51 -0
- package/dist/chunks/chunk.73T7TU6S.js +24 -0
- package/dist/chunks/chunk.7J7CS3BK.js +43 -0
- package/dist/chunks/chunk.7NWAYDYI.js +168 -0
- package/dist/chunks/chunk.7ZCCXTFG.js +301 -0
- package/dist/chunks/chunk.A2PAK6VF.js +206 -0
- package/dist/chunks/chunk.ABGBXXKA.js +164 -0
- package/dist/chunks/chunk.AQRNB4GJ.js +33 -0
- package/dist/chunks/chunk.AR5HJD7F.js +111 -0
- package/dist/chunks/chunk.B4BZKR24.js +16 -0
- package/dist/chunks/chunk.BD63GRU5.js +132 -0
- package/dist/chunks/chunk.BEB47LM2.js +278 -0
- package/dist/chunks/chunk.BLPP3Q5H.js +555 -0
- package/dist/chunks/chunk.CJIL3BLA.js +45 -0
- package/dist/chunks/chunk.CPXD6UYZ.js +34 -0
- package/dist/chunks/chunk.D7CATJYB.js +36 -0
- package/dist/chunks/chunk.DC6CT5PU.js +109 -0
- package/dist/chunks/chunk.DRGGQ4WL.js +9 -0
- package/dist/chunks/chunk.DSGUQNN4.js +26 -0
- package/dist/chunks/chunk.DURVPB6M.js +391 -0
- package/dist/chunks/chunk.DXVNWE2M.js +166 -0
- package/dist/chunks/chunk.EFQHAGXP.js +26 -0
- package/dist/chunks/chunk.EHVJT7BH.js +215 -0
- package/dist/chunks/chunk.EKWYMXQO.js +166 -0
- package/dist/chunks/chunk.EMIT7S33.js +71 -0
- package/dist/chunks/chunk.EMJZLQCL.js +60 -0
- package/dist/chunks/chunk.ENKP2IFW.js +361 -0
- package/dist/chunks/chunk.EU56EW33.js +91 -0
- package/dist/chunks/chunk.EYZGEU3G.js +45 -0
- package/dist/chunks/chunk.FDYFSRSX.js +33 -0
- package/dist/chunks/chunk.FIGO7UV2.js +77 -0
- package/dist/chunks/chunk.G7AELPSO.js +131 -0
- package/dist/chunks/chunk.GI7VDIWX.js +24 -0
- package/dist/chunks/chunk.GYTA2LJC.js +145 -0
- package/dist/chunks/chunk.HAL7R4WT.js +0 -0
- package/dist/chunks/chunk.HC5BO5YV.js +405 -0
- package/dist/chunks/chunk.HH63FIEF.js +122 -0
- package/dist/chunks/chunk.HLYGKGDG.js +308 -0
- package/dist/chunks/chunk.I33L3NO6.js +122 -0
- package/dist/chunks/chunk.IGYXUK7A.js +19 -0
- package/dist/chunks/chunk.INCGVIAQ.js +61 -0
- package/dist/chunks/chunk.IOFPPNUO.js +25 -0
- package/dist/chunks/chunk.IRQOFNJE.js +317 -0
- package/dist/chunks/chunk.ISAFRNR2.js +112 -0
- package/dist/chunks/chunk.J2XNYTTZ.js +715 -0
- package/dist/chunks/chunk.JETXIC4F.js +150 -0
- package/dist/chunks/chunk.JT7UJED5.js +33 -0
- package/dist/chunks/chunk.K6WCEYZI.js +52 -0
- package/dist/chunks/chunk.KBT2EKLF.js +25 -0
- package/dist/chunks/chunk.KDAK2GXX.js +58 -0
- package/dist/chunks/chunk.KHIMMW3T.js +33 -0
- package/dist/chunks/chunk.KIFBWPW5.js +298 -0
- package/dist/chunks/chunk.KOH5V4C6.js +552 -0
- package/dist/chunks/chunk.LC54322H.js +99 -0
- package/dist/chunks/chunk.LMJPQPQT.js +26 -0
- package/dist/chunks/chunk.LT7JMZ3T.js +371 -0
- package/dist/chunks/chunk.M245ZGRR.js +80 -0
- package/dist/chunks/chunk.MOWTZFON.js +63 -0
- package/dist/chunks/chunk.MY434P47.js +125 -0
- package/dist/chunks/chunk.N6VVY6XD.js +91 -0
- package/dist/chunks/chunk.NDEZEB3Z.js +402 -0
- package/dist/chunks/chunk.NHRDZGLI.js +81 -0
- package/dist/chunks/chunk.NKKVGICB.js +114 -0
- package/dist/chunks/chunk.NNBOLKWI.js +17 -0
- package/dist/chunks/chunk.O73OYTYJ.js +319 -0
- package/dist/chunks/chunk.OBU65KDL.js +29 -0
- package/dist/chunks/chunk.ODSCDJDO.js +91 -0
- package/dist/chunks/chunk.OVK7QCA7.js +441 -0
- package/dist/chunks/chunk.PQWQ42E2.js +150 -0
- package/dist/chunks/chunk.PULHNCDM.js +98 -0
- package/dist/chunks/chunk.PWWER3ZK.js +806 -0
- package/dist/chunks/chunk.QFJA3MTV.js +66 -0
- package/dist/chunks/chunk.QKNNLZ2M.js +361 -0
- package/dist/chunks/chunk.QL5C2XOW.js +0 -0
- package/dist/chunks/chunk.RDGMZ5XB.js +24 -0
- package/dist/chunks/chunk.RIJQGADY.js +108 -0
- package/dist/chunks/chunk.RMCOWJOW.js +17 -0
- package/dist/chunks/chunk.RY4QCT3T.js +29 -0
- package/dist/chunks/chunk.S4ATPBQN.js +89 -0
- package/dist/chunks/chunk.SGIGGO5M.js +86 -0
- package/dist/chunks/chunk.SQMWMSBA.js +207 -0
- package/dist/chunks/chunk.TJOP7HQP.js +14 -0
- package/dist/chunks/chunk.TUVJKY7S.js +21 -0
- package/dist/chunks/chunk.UA32LJYW.js +230 -0
- package/dist/chunks/chunk.UEUTSYIH.js +60 -0
- package/dist/chunks/chunk.UPYCV66H.js +111 -0
- package/dist/chunks/chunk.UV53JTE3.js +128 -0
- package/dist/chunks/chunk.UZLQVFDR.js +386 -0
- package/dist/chunks/chunk.V7RJROLH.js +48 -0
- package/dist/chunks/chunk.VFYKLPN2.js +144 -0
- package/dist/chunks/chunk.VRY3E2XG.js +196 -0
- package/dist/chunks/chunk.WE6IG5XG.js +164 -0
- package/dist/chunks/chunk.WFHOSUOX.js +263 -0
- package/dist/chunks/chunk.WHK7EFIM.js +264 -0
- package/dist/chunks/chunk.WIEJJS3W.js +88 -0
- package/dist/chunks/chunk.WK7RWLAK.js +54 -0
- package/dist/chunks/chunk.WNHQYL5W.js +298 -0
- package/dist/chunks/chunk.WSVP75MH.js +102 -0
- package/dist/chunks/chunk.XNEONNEJ.js +23 -0
- package/dist/chunks/chunk.XSCX6TC5.js +127 -0
- package/dist/chunks/chunk.XWUQFDIN.js +15 -0
- package/dist/chunks/chunk.Y3ZUFLVS.js +90 -0
- package/dist/chunks/chunk.YCXTCVAZ.js +30 -0
- package/dist/chunks/chunk.YIY5RM53.js +66 -0
- package/dist/chunks/chunk.YL3TSWVM.js +17 -0
- package/dist/chunks/chunk.YS7MY5CH.js +512 -0
- package/dist/chunks/chunk.YY6AEXJK.js +33 -0
- package/dist/chunks/chunk.YZHDFJWJ.js +17 -0
- package/dist/chunks/chunk.Z6TBD2AC.js +125 -0
- package/dist/chunks/chunk.ZKYSHEVZ.js +22 -0
- package/dist/chunks/chunk.ZVGZDTBF.js +104 -0
- package/dist/components/accordion/accordion.d.ts +49 -0
- package/dist/components/accordion/accordion.js +23 -0
- package/dist/components/accordion/accordion.styles.d.ts +2 -0
- package/dist/components/accordion/accordion.styles.js +8 -0
- package/dist/components/alert/alert.d.ts +52 -0
- package/dist/components/alert/alert.js +25 -0
- package/dist/components/alert/alert.styles.d.ts +2 -0
- package/dist/components/alert/alert.styles.js +8 -0
- package/dist/components/animation/animation.d.ts +81 -0
- package/dist/components/animation/animation.js +12 -0
- package/dist/components/animation/animation.styles.d.ts +2 -0
- package/dist/components/animation/animation.styles.js +8 -0
- package/dist/components/animation/animations.d.ts +6 -0
- package/dist/components/animation/animations.js +11 -0
- package/dist/components/avatar/avatar.d.ts +42 -0
- package/dist/components/avatar/avatar.js +19 -0
- package/dist/components/avatar/avatar.styles.d.ts +2 -0
- package/dist/components/avatar/avatar.styles.js +8 -0
- package/dist/components/avatar-group/avatar-group.d.ts +21 -0
- package/dist/components/avatar-group/avatar-group.js +9 -0
- package/dist/components/avatar-group/avatar-group.styles.d.ts +2 -0
- package/dist/components/avatar-group/avatar-group.styles.js +7 -0
- package/dist/components/badge/badge.d.ts +23 -0
- package/dist/components/badge/badge.js +10 -0
- package/dist/components/badge/badge.styles.d.ts +2 -0
- package/dist/components/badge/badge.styles.js +8 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +23 -0
- package/dist/components/breadcrumb/breadcrumb.js +20 -0
- package/dist/components/breadcrumb/breadcrumb.styles.d.ts +2 -0
- package/dist/components/breadcrumb/breadcrumb.styles.js +8 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.d.ts +30 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.js +12 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.styles.d.ts +2 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.styles.js +8 -0
- package/dist/components/button/button.d.ts +120 -0
- package/dist/components/button/button.js +24 -0
- package/dist/components/button/button.styles.d.ts +2 -0
- package/dist/components/button/button.styles.js +8 -0
- package/dist/components/card/card.d.ts +22 -0
- package/dist/components/card/card.js +11 -0
- package/dist/components/card/card.styles.d.ts +2 -0
- package/dist/components/card/card.styles.js +8 -0
- package/dist/components/checkbox/checkbox.d.ts +93 -0
- package/dist/components/checkbox/checkbox.js +24 -0
- package/dist/components/checkbox/checkbox.styles.d.ts +2 -0
- package/dist/components/checkbox/checkbox.styles.js +9 -0
- package/dist/components/checkbox-button/checkbox-button.d.ts +48 -0
- package/dist/components/checkbox-button/checkbox-button.js +21 -0
- package/dist/components/checkbox-button/checkbox-button.styles.d.ts +2 -0
- package/dist/components/checkbox-button/checkbox-button.styles.js +9 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts +85 -0
- package/dist/components/checkbox-group/checkbox-group.js +16 -0
- package/dist/components/checkbox-group/checkbox-group.styles.d.ts +2 -0
- package/dist/components/checkbox-group/checkbox-group.styles.js +9 -0
- package/dist/components/dialog/dialog.d.ts +70 -0
- package/dist/components/dialog/dialog.js +28 -0
- package/dist/components/dialog/dialog.styles.d.ts +2 -0
- package/dist/components/dialog/dialog.styles.js +8 -0
- package/dist/components/divider/divider.d.ts +17 -0
- package/dist/components/divider/divider.js +10 -0
- package/dist/components/divider/divider.styles.d.ts +2 -0
- package/dist/components/divider/divider.styles.js +8 -0
- package/dist/components/drawer/drawer.d.ts +77 -0
- package/dist/components/drawer/drawer.js +28 -0
- package/dist/components/drawer/drawer.styles.d.ts +2 -0
- package/dist/components/drawer/drawer.styles.js +8 -0
- package/dist/components/dropdown/dropdown.d.ts +87 -0
- package/dist/components/dropdown/dropdown.js +15 -0
- package/dist/components/dropdown/dropdown.styles.d.ts +2 -0
- package/dist/components/dropdown/dropdown.styles.js +8 -0
- package/dist/components/error-text/error-text.d.ts +18 -0
- package/dist/components/error-text/error-text.js +9 -0
- package/dist/components/error-text/error-text.styles.d.ts +2 -0
- package/dist/components/error-text/error-text.styles.js +7 -0
- package/dist/components/format-bytes/format-bytes.d.ts +22 -0
- package/dist/components/format-bytes/format-bytes.js +9 -0
- package/dist/components/format-date/format-date.d.ts +42 -0
- package/dist/components/format-date/format-date.js +9 -0
- package/dist/components/format-number/format-number.d.ts +36 -0
- package/dist/components/format-number/format-number.js +9 -0
- package/dist/components/icon/icon.d.ts +40 -0
- package/dist/components/icon/icon.js +17 -0
- package/dist/components/icon/icon.styles.d.ts +2 -0
- package/dist/components/icon/icon.styles.js +8 -0
- package/dist/components/icon/library.d.ts +21 -0
- package/dist/components/icon/library.default.d.ts +3 -0
- package/dist/components/icon/library.default.js +8 -0
- package/dist/components/icon/library.js +18 -0
- package/dist/components/icon/library.system.d.ts +3 -0
- package/dist/components/icon/library.system.js +7 -0
- package/dist/components/icon/request.d.ts +11 -0
- package/dist/components/icon/request.js +8 -0
- package/dist/components/icon-button/icon-button.d.ts +59 -0
- package/dist/components/icon-button/icon-button.js +19 -0
- package/dist/components/icon-button/icon-button.styles.d.ts +2 -0
- package/dist/components/icon-button/icon-button.styles.js +8 -0
- package/dist/components/include/include.d.ts +32 -0
- package/dist/components/include/include.js +12 -0
- package/dist/components/include/include.styles.d.ts +2 -0
- package/dist/components/include/include.styles.js +8 -0
- package/dist/components/include/request.d.ts +8 -0
- package/dist/components/include/request.js +7 -0
- package/dist/components/input/input.d.ts +165 -0
- package/dist/components/input/input.js +27 -0
- package/dist/components/input/input.styles.d.ts +2 -0
- package/dist/components/input/input.styles.js +9 -0
- package/dist/components/input/input.utils.d.ts +4 -0
- package/dist/components/input/input.utils.js +9 -0
- package/dist/components/input-mask/input-mask.configs.d.ts +42 -0
- package/dist/components/input-mask/input-mask.configs.js +11 -0
- package/dist/components/input-mask/input-mask.d.ts +127 -0
- package/dist/components/input-mask/input-mask.js +19 -0
- package/dist/components/input-mask/input-mask.styles.d.ts +2 -0
- package/dist/components/input-mask/input-mask.styles.js +9 -0
- package/dist/components/input-mask/input-mask.utils.d.ts +7 -0
- package/dist/components/input-mask/input-mask.utils.js +19 -0
- package/dist/components/input-phone/input-phone.configs.d.ts +14 -0
- package/dist/components/input-phone/input-phone.configs.js +7 -0
- package/dist/components/input-phone/input-phone.d.ts +138 -0
- package/dist/components/input-phone/input-phone.js +49 -0
- package/dist/components/input-phone/input-phone.styles.d.ts +2 -0
- package/dist/components/input-phone/input-phone.styles.js +9 -0
- package/dist/components/input-phone/input-phone.utils.d.ts +9 -0
- package/dist/components/input-phone/input-phone.utils.js +13 -0
- package/dist/components/menu/menu.d.ts +43 -0
- package/dist/components/menu/menu.js +10 -0
- package/dist/components/menu/menu.styles.d.ts +2 -0
- package/dist/components/menu/menu.styles.js +8 -0
- package/dist/components/menu-item/menu-item.d.ts +44 -0
- package/dist/components/menu-item/menu-item.js +20 -0
- package/dist/components/menu-item/menu-item.styles.d.ts +2 -0
- package/dist/components/menu-item/menu-item.styles.js +8 -0
- package/dist/components/menu-label/menu-label.d.ts +17 -0
- package/dist/components/menu-label/menu-label.js +10 -0
- package/dist/components/menu-label/menu-label.styles.d.ts +2 -0
- package/dist/components/menu-label/menu-label.styles.js +8 -0
- package/dist/components/mutation-observer/mutation-observer.d.ts +44 -0
- package/dist/components/mutation-observer/mutation-observer.js +11 -0
- package/dist/components/mutation-observer/mutation-observer.styles.d.ts +2 -0
- package/dist/components/mutation-observer/mutation-observer.styles.js +8 -0
- package/dist/components/option/option.d.ts +50 -0
- package/dist/components/option/option.js +20 -0
- package/dist/components/option/option.styles.d.ts +2 -0
- package/dist/components/option/option.styles.js +8 -0
- package/dist/components/popup/popup.d.ts +123 -0
- package/dist/components/popup/popup.js +10 -0
- package/dist/components/popup/popup.styles.d.ts +2 -0
- package/dist/components/popup/popup.styles.js +8 -0
- package/dist/components/progress-bar/progress-bar.d.ts +23 -0
- package/dist/components/progress-bar/progress-bar.js +11 -0
- package/dist/components/progress-bar/progress-bar.styles.d.ts +2 -0
- package/dist/components/progress-bar/progress-bar.styles.js +8 -0
- package/dist/components/progress-ring/progress-ring.d.ts +25 -0
- package/dist/components/progress-ring/progress-ring.js +11 -0
- package/dist/components/progress-ring/progress-ring.styles.d.ts +2 -0
- package/dist/components/progress-ring/progress-ring.styles.js +8 -0
- package/dist/components/radio/radio.d.ts +46 -0
- package/dist/components/radio/radio.js +19 -0
- package/dist/components/radio/radio.styles.d.ts +2 -0
- package/dist/components/radio/radio.styles.js +8 -0
- package/dist/components/radio-button/radio-button.d.ts +47 -0
- package/dist/components/radio-button/radio-button.js +13 -0
- package/dist/components/radio-button/radio-button.styles.d.ts +2 -0
- package/dist/components/radio-button/radio-button.styles.js +9 -0
- package/dist/components/radio-group/radio-group.d.ts +91 -0
- package/dist/components/radio-group/radio-group.js +16 -0
- package/dist/components/radio-group/radio-group.styles.d.ts +2 -0
- package/dist/components/radio-group/radio-group.styles.js +9 -0
- package/dist/components/relative-time/relative-time.d.ts +34 -0
- package/dist/components/relative-time/relative-time.js +9 -0
- package/dist/components/resize-observer/resize-observer.d.ts +31 -0
- package/dist/components/resize-observer/resize-observer.js +11 -0
- package/dist/components/resize-observer/resize-observer.styles.d.ts +2 -0
- package/dist/components/resize-observer/resize-observer.styles.js +8 -0
- package/dist/components/select/select.d.ts +166 -0
- package/dist/components/select/select.js +36 -0
- package/dist/components/select/select.styles.d.ts +2 -0
- package/dist/components/select/select.styles.js +9 -0
- package/dist/components/skeleton/skeleton.d.ts +21 -0
- package/dist/components/skeleton/skeleton.js +10 -0
- package/dist/components/skeleton/skeleton.styles.d.ts +2 -0
- package/dist/components/skeleton/skeleton.styles.js +8 -0
- package/dist/components/spinner/spinner.d.ts +21 -0
- package/dist/components/spinner/spinner.js +11 -0
- package/dist/components/spinner/spinner.styles.d.ts +2 -0
- package/dist/components/spinner/spinner.styles.js +8 -0
- package/dist/components/tab/tab.d.ts +44 -0
- package/dist/components/tab/tab.js +12 -0
- package/dist/components/tab/tab.styles.d.ts +2 -0
- package/dist/components/tab/tab.styles.js +8 -0
- package/dist/components/tab-group/tab-group.d.ts +61 -0
- package/dist/components/tab-group/tab-group.js +13 -0
- package/dist/components/tab-group/tab-group.styles.d.ts +2 -0
- package/dist/components/tab-group/tab-group.styles.js +8 -0
- package/dist/components/tab-panel/tab-panel.d.ts +25 -0
- package/dist/components/tab-panel/tab-panel.js +11 -0
- package/dist/components/tab-panel/tab-panel.styles.d.ts +2 -0
- package/dist/components/tab-panel/tab-panel.styles.js +8 -0
- package/dist/components/tag/tag.d.ts +34 -0
- package/dist/components/tag/tag.js +22 -0
- package/dist/components/tag/tag.styles.d.ts +2 -0
- package/dist/components/tag/tag.styles.js +8 -0
- package/dist/components/textarea/textarea.d.ts +137 -0
- package/dist/components/textarea/textarea.js +17 -0
- package/dist/components/textarea/textarea.styles.d.ts +2 -0
- package/dist/components/textarea/textarea.styles.js +9 -0
- package/dist/components/tooltip/tooltip.d.ts +80 -0
- package/dist/components/tooltip/tooltip.js +17 -0
- package/dist/components/tooltip/tooltip.styles.d.ts +2 -0
- package/dist/components/tooltip/tooltip.styles.js +8 -0
- package/dist/components/tree/tree.d.ts +53 -0
- package/dist/components/tree/tree.js +33 -0
- package/dist/components/tree/tree.styles.d.ts +2 -0
- package/dist/components/tree/tree.styles.js +8 -0
- package/dist/components/tree-item/tree-item.d.ts +69 -0
- package/dist/components/tree-item/tree-item.js +31 -0
- package/dist/components/tree-item/tree-item.styles.d.ts +2 -0
- package/dist/components/tree-item/tree-item.styles.js +8 -0
- package/dist/components/visually-hidden/visually-hidden.d.ts +17 -0
- package/dist/components/visually-hidden/visually-hidden.js +10 -0
- package/dist/components/visually-hidden/visually-hidden.styles.d.ts +2 -0
- package/dist/components/visually-hidden/visually-hidden.styles.js +8 -0
- package/dist/custom-elements.json +14628 -0
- package/dist/design-system-autoloader.d.ts +4 -0
- package/dist/design-system-autoloader.js +46 -0
- package/dist/design-system.d.ts +58 -0
- package/dist/design-system.js +309 -0
- package/dist/events/dsa-after-collapse.d.ts +7 -0
- package/dist/events/dsa-after-collapse.js +1 -0
- package/dist/events/dsa-after-expand.d.ts +7 -0
- package/dist/events/dsa-after-expand.js +1 -0
- package/dist/events/dsa-after-hide.d.ts +7 -0
- package/dist/events/dsa-after-hide.js +1 -0
- package/dist/events/dsa-after-show.d.ts +7 -0
- package/dist/events/dsa-after-show.js +1 -0
- package/dist/events/dsa-blur.d.ts +7 -0
- package/dist/events/dsa-blur.js +1 -0
- package/dist/events/dsa-cancel.d.ts +7 -0
- package/dist/events/dsa-cancel.js +1 -0
- package/dist/events/dsa-change.d.ts +7 -0
- package/dist/events/dsa-change.js +1 -0
- package/dist/events/dsa-clear.d.ts +7 -0
- package/dist/events/dsa-clear.js +1 -0
- package/dist/events/dsa-close.d.ts +7 -0
- package/dist/events/dsa-close.js +1 -0
- package/dist/events/dsa-collapse.d.ts +7 -0
- package/dist/events/dsa-collapse.js +1 -0
- package/dist/events/dsa-error.d.ts +9 -0
- package/dist/events/dsa-error.js +1 -0
- package/dist/events/dsa-expand.d.ts +7 -0
- package/dist/events/dsa-expand.js +1 -0
- package/dist/events/dsa-finish.d.ts +7 -0
- package/dist/events/dsa-finish.js +1 -0
- package/dist/events/dsa-focus.d.ts +7 -0
- package/dist/events/dsa-focus.js +1 -0
- package/dist/events/dsa-hide.d.ts +7 -0
- package/dist/events/dsa-hide.js +1 -0
- package/dist/events/dsa-hover.d.ts +10 -0
- package/dist/events/dsa-hover.js +1 -0
- package/dist/events/dsa-initial-focus.d.ts +7 -0
- package/dist/events/dsa-initial-focus.js +1 -0
- package/dist/events/dsa-input.d.ts +7 -0
- package/dist/events/dsa-input.js +1 -0
- package/dist/events/dsa-invalid.d.ts +7 -0
- package/dist/events/dsa-invalid.js +1 -0
- package/dist/events/dsa-lazy-change.d.ts +7 -0
- package/dist/events/dsa-lazy-change.js +1 -0
- package/dist/events/dsa-lazy-load.d.ts +7 -0
- package/dist/events/dsa-lazy-load.js +1 -0
- package/dist/events/dsa-load.d.ts +7 -0
- package/dist/events/dsa-load.js +1 -0
- package/dist/events/dsa-mutation.d.ts +9 -0
- package/dist/events/dsa-mutation.js +1 -0
- package/dist/events/dsa-remove.d.ts +7 -0
- package/dist/events/dsa-remove.js +1 -0
- package/dist/events/dsa-reposition.d.ts +7 -0
- package/dist/events/dsa-reposition.js +1 -0
- package/dist/events/dsa-request-close.d.ts +9 -0
- package/dist/events/dsa-request-close.js +1 -0
- package/dist/events/dsa-resize.d.ts +9 -0
- package/dist/events/dsa-resize.js +1 -0
- package/dist/events/dsa-select.d.ts +10 -0
- package/dist/events/dsa-select.js +1 -0
- package/dist/events/dsa-selection-change.d.ts +10 -0
- package/dist/events/dsa-selection-change.js +1 -0
- package/dist/events/dsa-show.d.ts +7 -0
- package/dist/events/dsa-show.js +1 -0
- package/dist/events/dsa-start.d.ts +7 -0
- package/dist/events/dsa-start.js +1 -0
- package/dist/events/dsa-tab-hide.d.ts +9 -0
- package/dist/events/dsa-tab-hide.js +1 -0
- package/dist/events/dsa-tab-show.d.ts +9 -0
- package/dist/events/dsa-tab-show.js +1 -0
- package/dist/events/events.d.ts +32 -0
- package/dist/events/events.js +1 -0
- package/dist/internal/animate.d.ts +22 -0
- package/dist/internal/animate.js +56 -0
- package/dist/internal/components/button-group/button-group.d.ts +34 -0
- package/dist/internal/components/button-group/button-group.js +110 -0
- package/dist/internal/components/button-group/button-group.styles.d.ts +2 -0
- package/dist/internal/components/button-group/button-group.styles.js +19 -0
- package/dist/internal/debounce.d.ts +1 -0
- package/dist/internal/debounce.js +26 -0
- package/dist/internal/default-value.d.ts +2 -0
- package/dist/internal/default-value.js +38 -0
- package/dist/internal/drag.d.ts +15 -0
- package/dist/internal/drag.js +27 -0
- package/dist/internal/event.d.ts +2 -0
- package/dist/internal/event.js +12 -0
- package/dist/internal/form.d.ts +73 -0
- package/dist/internal/form.js +328 -0
- package/dist/internal/math.d.ts +2 -0
- package/dist/internal/math.js +11 -0
- package/dist/internal/modal.d.ts +12 -0
- package/dist/internal/modal.js +51 -0
- package/dist/internal/offset.d.ts +11 -0
- package/dist/internal/offset.js +13 -0
- package/dist/internal/scroll.d.ts +11 -0
- package/dist/internal/scroll.js +63 -0
- package/dist/internal/shoelace-element.d.ts +43 -0
- package/dist/internal/shoelace-element.js +21 -0
- package/dist/internal/slot.d.ts +23 -0
- package/dist/internal/slot.js +84 -0
- package/dist/internal/string.d.ts +2 -0
- package/dist/internal/string.js +4 -0
- package/dist/internal/tabbable.d.ts +8 -0
- package/dist/internal/tabbable.js +79 -0
- package/dist/internal/test/data-testid-helpers.d.ts +12 -0
- package/dist/internal/test/data-testid-helpers.js +14 -0
- package/dist/internal/test/element-visible-overflow.d.ts +11 -0
- package/dist/internal/test/element-visible-overflow.js +18 -0
- package/dist/internal/test/form-control-base-tests.d.ts +7 -0
- package/dist/internal/test/form-control-base-tests.js +262 -0
- package/dist/internal/test/wait-for-scrolling.d.ts +9 -0
- package/dist/internal/test/wait-for-scrolling.js +34 -0
- package/dist/internal/test.d.ts +20 -0
- package/dist/internal/test.js +71 -0
- package/dist/internal/watch.d.ts +26 -0
- package/dist/internal/watch.js +38 -0
- package/dist/styles/component.styles.d.ts +2 -0
- package/dist/styles/component.styles.js +16 -0
- package/dist/styles/form-control.styles.d.ts +2 -0
- package/dist/styles/form-control.styles.js +142 -0
- package/dist/themes/dsa-wc-theme.css +1218 -0
- package/dist/themes/dsa-wc-theme.min.css +1 -0
- package/dist/themes/dsa-wc-theme.styles.js +1229 -0
- package/dist/translations/en-gb.d.ts +3 -0
- package/dist/translations/en-gb.js +21 -0
- package/dist/translations/en.d.ts +3 -0
- package/dist/translations/en.js +7 -0
- package/dist/translations/fr.d.ts +3 -0
- package/dist/translations/fr.js +7 -0
- package/dist/utilities/animation-registry.d.ts +24 -0
- package/dist/utilities/animation-registry.js +11 -0
- package/dist/utilities/animation.d.ts +1 -0
- package/dist/utilities/animation.js +10 -0
- package/dist/utilities/base-path.d.ts +18 -0
- package/dist/utilities/base-path.js +9 -0
- package/dist/utilities/form.d.ts +11 -0
- package/dist/utilities/form.js +43 -0
- package/dist/utilities/icon-library.d.ts +1 -0
- package/dist/utilities/icon-library.js +13 -0
- package/dist/utilities/localize.d.ts +39 -0
- package/dist/utilities/localize.js +9 -0
- package/dist/utilities/storybook.d.ts +46 -0
- package/dist/utilities/storybook.js +54 -0
- package/dist/vscode.html-custom-data.json +2392 -0
- package/dist/web-types.json +8687 -0
- package/package.json +109 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import {
|
|
2
|
+
component_styles_default
|
|
3
|
+
} from "./chunk.TUVJKY7S.js";
|
|
4
|
+
|
|
5
|
+
// src/components/icon-button/icon-button.styles.ts
|
|
6
|
+
import { css } from "lit";
|
|
7
|
+
var icon_button_styles_default = css`
|
|
8
|
+
${component_styles_default}
|
|
9
|
+
|
|
10
|
+
:host {
|
|
11
|
+
--padding: var(
|
|
12
|
+
--dsa-wc-internal-icon-button-padding,
|
|
13
|
+
--dsa-wc-icon-button-padding
|
|
14
|
+
);
|
|
15
|
+
display: inline-block;
|
|
16
|
+
color: var(--dsa-wc-icon-button-color);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.icon-button {
|
|
20
|
+
flex: 0 0 auto;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
background: none;
|
|
24
|
+
border: none;
|
|
25
|
+
border-radius: var(--dsa-wc-icon-button-border-radius);
|
|
26
|
+
font-size: inherit;
|
|
27
|
+
color: inherit;
|
|
28
|
+
padding: var(--padding);
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
transition: var(--dsa-wc-transition-x-fast) color;
|
|
31
|
+
-webkit-appearance: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.icon-button--focused:hover,
|
|
35
|
+
.icon-button:hover:not(.icon-button--disabled),
|
|
36
|
+
.icon-button:focus-visible:not(.icon-button--disabled) {
|
|
37
|
+
color: var(--dsa-wc-icon-button-color-hover);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.icon-button:active:not(.icon-button--disabled) {
|
|
41
|
+
color: var(--dsa-wc-icon-button-color-active);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.icon-button:focus {
|
|
45
|
+
outline: none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.icon-button--disabled {
|
|
49
|
+
color: var(--dsa-wc-icon-button-color-disabled);
|
|
50
|
+
cursor: not-allowed;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.icon-button:focus-visible {
|
|
54
|
+
outline: var(--dsa-wc-focus-ring);
|
|
55
|
+
outline-offset: var(--dsa-wc-focus-ring-offset);
|
|
56
|
+
border-radius: var(--dsa-wc-focus-ring-radius);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.icon-button__icon {
|
|
60
|
+
pointer-events: none;
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
63
|
+
|
|
64
|
+
export {
|
|
65
|
+
icon_button_styles_default
|
|
66
|
+
};
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import {
|
|
2
|
+
tree_styles_default
|
|
3
|
+
} from "./chunk.73T7TU6S.js";
|
|
4
|
+
import {
|
|
5
|
+
DSATreeItem
|
|
6
|
+
} from "./chunk.7ZCCXTFG.js";
|
|
7
|
+
import {
|
|
8
|
+
LocalizeController
|
|
9
|
+
} from "./chunk.5XL2LZLC.js";
|
|
10
|
+
import {
|
|
11
|
+
watch
|
|
12
|
+
} from "./chunk.D7CATJYB.js";
|
|
13
|
+
import {
|
|
14
|
+
ShoelaceElement
|
|
15
|
+
} from "./chunk.YCXTCVAZ.js";
|
|
16
|
+
import {
|
|
17
|
+
__decorateClass
|
|
18
|
+
} from "./chunk.6M63UXML.js";
|
|
19
|
+
|
|
20
|
+
// src/components/tree/tree.ts
|
|
21
|
+
import { html } from "lit";
|
|
22
|
+
import { customElement, property, query } from "lit/decorators.js";
|
|
23
|
+
|
|
24
|
+
// src/internal/math.ts
|
|
25
|
+
function clamp(value, min, max) {
|
|
26
|
+
const noNegativeZero = (n) => Object.is(n, -0) ? 0 : n;
|
|
27
|
+
if (value < min) {
|
|
28
|
+
return noNegativeZero(min);
|
|
29
|
+
}
|
|
30
|
+
if (value > max) {
|
|
31
|
+
return noNegativeZero(max);
|
|
32
|
+
}
|
|
33
|
+
return noNegativeZero(value);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// src/components/tree/tree.ts
|
|
37
|
+
function syncCheckboxes(changedTreeItem, initialSync = false) {
|
|
38
|
+
function syncParentItem(treeItem) {
|
|
39
|
+
const children = treeItem.getChildrenItems({ includeDisabled: false });
|
|
40
|
+
if (children.length) {
|
|
41
|
+
const allChecked = children.every((item) => item.selected);
|
|
42
|
+
const allUnchecked = children.every(
|
|
43
|
+
(item) => !item.selected && !item.indeterminate
|
|
44
|
+
);
|
|
45
|
+
treeItem.selected = allChecked;
|
|
46
|
+
treeItem.indeterminate = !allChecked && !allUnchecked;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function syncAncestors(treeItem) {
|
|
50
|
+
const parentItem = treeItem.parentElement;
|
|
51
|
+
if (DSATreeItem.isTreeItem(parentItem)) {
|
|
52
|
+
syncParentItem(parentItem);
|
|
53
|
+
syncAncestors(parentItem);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function syncDescendants(treeItem) {
|
|
57
|
+
for (const childItem of treeItem.getChildrenItems()) {
|
|
58
|
+
childItem.selected = initialSync ? treeItem.selected || childItem.selected : !childItem.disabled && treeItem.selected;
|
|
59
|
+
syncDescendants(childItem);
|
|
60
|
+
}
|
|
61
|
+
if (initialSync) {
|
|
62
|
+
syncParentItem(treeItem);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
syncDescendants(changedTreeItem);
|
|
66
|
+
syncAncestors(changedTreeItem);
|
|
67
|
+
}
|
|
68
|
+
var DSATree = class extends ShoelaceElement {
|
|
69
|
+
constructor() {
|
|
70
|
+
super(...arguments);
|
|
71
|
+
this.selection = "single";
|
|
72
|
+
this.localize = new LocalizeController(this);
|
|
73
|
+
this.clickTarget = null;
|
|
74
|
+
// Initializes new items by setting the `selectable` property and the expanded/collapsed icons if any
|
|
75
|
+
this.initTreeItem = (item) => {
|
|
76
|
+
item.selectable = this.selection === "multiple";
|
|
77
|
+
["expand", "collapse"].filter((status) => !!this.querySelector(`[slot="${status}-icon"]`)).forEach((status) => {
|
|
78
|
+
const existingIcon = item.querySelector(`[slot="${status}-icon"]`);
|
|
79
|
+
if (existingIcon === null) {
|
|
80
|
+
item.append(
|
|
81
|
+
this.getExpandButtonIcon(status)
|
|
82
|
+
);
|
|
83
|
+
} else if (existingIcon.hasAttribute("data-default")) {
|
|
84
|
+
existingIcon.replaceWith(
|
|
85
|
+
this.getExpandButtonIcon(status)
|
|
86
|
+
);
|
|
87
|
+
} else {
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
async connectedCallback() {
|
|
93
|
+
super.connectedCallback();
|
|
94
|
+
this.handleTreeChanged = this.handleTreeChanged.bind(this);
|
|
95
|
+
this.handleFocusIn = this.handleFocusIn.bind(this);
|
|
96
|
+
this.handleFocusOut = this.handleFocusOut.bind(this);
|
|
97
|
+
this.setAttribute("role", "tree");
|
|
98
|
+
this.setAttribute("tabindex", "0");
|
|
99
|
+
this.addEventListener("focusin", this.handleFocusIn);
|
|
100
|
+
this.addEventListener("focusout", this.handleFocusOut);
|
|
101
|
+
this.addEventListener("dsa-lazy-change", this.handleSlotChange);
|
|
102
|
+
await this.updateComplete;
|
|
103
|
+
this.mutationObserver = new MutationObserver(this.handleTreeChanged);
|
|
104
|
+
this.mutationObserver.observe(this, { childList: true, subtree: true });
|
|
105
|
+
}
|
|
106
|
+
disconnectedCallback() {
|
|
107
|
+
super.disconnectedCallback();
|
|
108
|
+
this.mutationObserver.disconnect();
|
|
109
|
+
this.removeEventListener("focusin", this.handleFocusIn);
|
|
110
|
+
this.removeEventListener("focusout", this.handleFocusOut);
|
|
111
|
+
this.removeEventListener("dsa-lazy-change", this.handleSlotChange);
|
|
112
|
+
}
|
|
113
|
+
// Generates a clone of the expand icon element to use for each tree item
|
|
114
|
+
getExpandButtonIcon(status) {
|
|
115
|
+
const slot = status === "expand" ? this.expandedIconSlot : this.collapsedIconSlot;
|
|
116
|
+
const icon = slot.assignedElements({ flatten: true })[0];
|
|
117
|
+
if (icon) {
|
|
118
|
+
const clone = icon.cloneNode(true);
|
|
119
|
+
[clone, ...clone.querySelectorAll("[id]")].forEach(
|
|
120
|
+
(el) => el.removeAttribute("id")
|
|
121
|
+
);
|
|
122
|
+
clone.setAttribute("data-default", "");
|
|
123
|
+
clone.slot = `${status}-icon`;
|
|
124
|
+
return clone;
|
|
125
|
+
}
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
handleTreeChanged(mutations) {
|
|
129
|
+
for (const mutation of mutations) {
|
|
130
|
+
const addedNodes = [...mutation.addedNodes].filter(
|
|
131
|
+
DSATreeItem.isTreeItem
|
|
132
|
+
);
|
|
133
|
+
const removedNodes = [...mutation.removedNodes].filter(
|
|
134
|
+
DSATreeItem.isTreeItem
|
|
135
|
+
);
|
|
136
|
+
addedNodes.forEach(this.initTreeItem);
|
|
137
|
+
if (removedNodes.includes(this.lastFocusedItem)) {
|
|
138
|
+
this.focusItem(this.getFocusableItems()[0]);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
syncTreeItems(selectedItem) {
|
|
143
|
+
const items = this.getAllTreeItems();
|
|
144
|
+
if (this.selection === "multiple") {
|
|
145
|
+
syncCheckboxes(selectedItem);
|
|
146
|
+
} else {
|
|
147
|
+
for (const item of items) {
|
|
148
|
+
if (item !== selectedItem) {
|
|
149
|
+
item.selected = false;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
selectItem(selectedItem) {
|
|
155
|
+
const previousSelection = [...this.selectedItems];
|
|
156
|
+
if (this.selection === "multiple") {
|
|
157
|
+
selectedItem.selected = !selectedItem.selected;
|
|
158
|
+
if (selectedItem.lazy) {
|
|
159
|
+
selectedItem.expanded = true;
|
|
160
|
+
}
|
|
161
|
+
this.syncTreeItems(selectedItem);
|
|
162
|
+
} else if (this.selection === "single" || selectedItem.isLeaf) {
|
|
163
|
+
selectedItem.expanded = !selectedItem.expanded;
|
|
164
|
+
selectedItem.selected = true;
|
|
165
|
+
this.syncTreeItems(selectedItem);
|
|
166
|
+
} else if (this.selection === "leaf") {
|
|
167
|
+
selectedItem.expanded = !selectedItem.expanded;
|
|
168
|
+
}
|
|
169
|
+
const nextSelection = this.selectedItems;
|
|
170
|
+
if (previousSelection.length !== nextSelection.length || nextSelection.some((item) => !previousSelection.includes(item))) {
|
|
171
|
+
Promise.all(nextSelection.map((el) => el.updateComplete)).then(() => {
|
|
172
|
+
this.emit("dsa-selection-change", {
|
|
173
|
+
detail: { selection: nextSelection }
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
getAllTreeItems() {
|
|
179
|
+
return [...this.querySelectorAll("dsa-tree-item")];
|
|
180
|
+
}
|
|
181
|
+
focusItem(item) {
|
|
182
|
+
item == null ? void 0 : item.focus();
|
|
183
|
+
}
|
|
184
|
+
handleKeyDown(event) {
|
|
185
|
+
if (![
|
|
186
|
+
"ArrowDown",
|
|
187
|
+
"ArrowUp",
|
|
188
|
+
"ArrowRight",
|
|
189
|
+
"ArrowLeft",
|
|
190
|
+
"Home",
|
|
191
|
+
"End",
|
|
192
|
+
"Enter",
|
|
193
|
+
" "
|
|
194
|
+
].includes(event.key)) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
const items = this.getFocusableItems();
|
|
198
|
+
const isLtr = this.localize.dir() === "ltr";
|
|
199
|
+
const isRtl = this.localize.dir() === "rtl";
|
|
200
|
+
if (items.length > 0) {
|
|
201
|
+
event.preventDefault();
|
|
202
|
+
const activeItemIndex = items.findIndex((item) => item.matches(":focus"));
|
|
203
|
+
const activeItem = items[activeItemIndex];
|
|
204
|
+
const focusItemAt = (index) => {
|
|
205
|
+
const item = items[clamp(index, 0, items.length - 1)];
|
|
206
|
+
this.focusItem(item);
|
|
207
|
+
};
|
|
208
|
+
const toggleExpand = (expanded) => {
|
|
209
|
+
activeItem.expanded = expanded;
|
|
210
|
+
};
|
|
211
|
+
if (event.key === "ArrowDown") {
|
|
212
|
+
focusItemAt(activeItemIndex + 1);
|
|
213
|
+
} else if (event.key === "ArrowUp") {
|
|
214
|
+
focusItemAt(activeItemIndex - 1);
|
|
215
|
+
} else if (isLtr && event.key === "ArrowRight" || isRtl && event.key === "ArrowLeft") {
|
|
216
|
+
if (!activeItem || activeItem.disabled || activeItem.expanded || activeItem.isLeaf && !activeItem.lazy) {
|
|
217
|
+
focusItemAt(activeItemIndex + 1);
|
|
218
|
+
} else {
|
|
219
|
+
toggleExpand(true);
|
|
220
|
+
}
|
|
221
|
+
} else if (isLtr && event.key === "ArrowLeft" || isRtl && event.key === "ArrowRight") {
|
|
222
|
+
if (!activeItem || activeItem.disabled || activeItem.isLeaf || !activeItem.expanded) {
|
|
223
|
+
focusItemAt(activeItemIndex - 1);
|
|
224
|
+
} else {
|
|
225
|
+
toggleExpand(false);
|
|
226
|
+
}
|
|
227
|
+
} else if (event.key === "Home") {
|
|
228
|
+
focusItemAt(0);
|
|
229
|
+
} else if (event.key === "End") {
|
|
230
|
+
focusItemAt(items.length - 1);
|
|
231
|
+
} else if (event.key === "Enter" || event.key === " ") {
|
|
232
|
+
if (!activeItem.disabled) {
|
|
233
|
+
this.selectItem(activeItem);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
handleClick(event) {
|
|
239
|
+
const target = event.target;
|
|
240
|
+
const treeItem = target.closest("dsa-tree-item");
|
|
241
|
+
const isExpandButton = event.composedPath().some(
|
|
242
|
+
(el) => {
|
|
243
|
+
var _a;
|
|
244
|
+
return (_a = el == null ? void 0 : el.classList) == null ? void 0 : _a.contains("tree-item__expand-button");
|
|
245
|
+
}
|
|
246
|
+
);
|
|
247
|
+
if (!treeItem || treeItem.disabled || target !== this.clickTarget) {
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
if (this.selection === "multiple" && isExpandButton) {
|
|
251
|
+
treeItem.expanded = !treeItem.expanded;
|
|
252
|
+
} else {
|
|
253
|
+
this.selectItem(treeItem);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
handleMouseDown(event) {
|
|
257
|
+
this.clickTarget = event.target;
|
|
258
|
+
}
|
|
259
|
+
handleFocusOut(event) {
|
|
260
|
+
const relatedTarget = event.relatedTarget;
|
|
261
|
+
if (!relatedTarget || !this.contains(relatedTarget)) {
|
|
262
|
+
this.tabIndex = 0;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
handleFocusIn(event) {
|
|
266
|
+
const target = event.target;
|
|
267
|
+
if (event.target === this) {
|
|
268
|
+
this.focusItem(this.lastFocusedItem || this.getAllTreeItems()[0]);
|
|
269
|
+
}
|
|
270
|
+
if (DSATreeItem.isTreeItem(target) && !target.disabled) {
|
|
271
|
+
if (this.lastFocusedItem) {
|
|
272
|
+
this.lastFocusedItem.tabIndex = -1;
|
|
273
|
+
}
|
|
274
|
+
this.lastFocusedItem = target;
|
|
275
|
+
this.tabIndex = -1;
|
|
276
|
+
target.tabIndex = 0;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
handleSlotChange() {
|
|
280
|
+
const items = this.getAllTreeItems();
|
|
281
|
+
items.forEach(this.initTreeItem);
|
|
282
|
+
}
|
|
283
|
+
async handleSelectionChange() {
|
|
284
|
+
const isSelectionMultiple = this.selection === "multiple";
|
|
285
|
+
const items = this.getAllTreeItems();
|
|
286
|
+
this.setAttribute(
|
|
287
|
+
"aria-multiselectable",
|
|
288
|
+
isSelectionMultiple ? "true" : "false"
|
|
289
|
+
);
|
|
290
|
+
for (const item of items) {
|
|
291
|
+
item.selectable = isSelectionMultiple;
|
|
292
|
+
}
|
|
293
|
+
if (isSelectionMultiple) {
|
|
294
|
+
await this.updateComplete;
|
|
295
|
+
[...this.querySelectorAll(":scope > dsa-tree-item")].forEach(
|
|
296
|
+
(treeItem) => {
|
|
297
|
+
if (treeItem instanceof DSATreeItem) {
|
|
298
|
+
syncCheckboxes(treeItem, true);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
/** @internal Returns the list of tree items that are selected in the tree. */
|
|
305
|
+
get selectedItems() {
|
|
306
|
+
const items = this.getAllTreeItems();
|
|
307
|
+
const isSelected = (item) => item.selected;
|
|
308
|
+
return items.filter(isSelected);
|
|
309
|
+
}
|
|
310
|
+
/** @internal Gets focusable tree items in the tree. */
|
|
311
|
+
getFocusableItems() {
|
|
312
|
+
const items = this.getAllTreeItems();
|
|
313
|
+
const collapsedItems = /* @__PURE__ */ new Set();
|
|
314
|
+
return items.filter((item) => {
|
|
315
|
+
var _a;
|
|
316
|
+
if (item.disabled)
|
|
317
|
+
return false;
|
|
318
|
+
const parent = (_a = item.parentElement) == null ? void 0 : _a.closest("[role=treeitem]");
|
|
319
|
+
if (parent && (!parent.expanded || parent.loading || collapsedItems.has(parent))) {
|
|
320
|
+
collapsedItems.add(item);
|
|
321
|
+
}
|
|
322
|
+
return !collapsedItems.has(item);
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
render() {
|
|
326
|
+
return html`
|
|
327
|
+
<div
|
|
328
|
+
part="base"
|
|
329
|
+
class="tree"
|
|
330
|
+
@click=${this.handleClick}
|
|
331
|
+
@keydown=${this.handleKeyDown}
|
|
332
|
+
@mousedown=${this.handleMouseDown}
|
|
333
|
+
>
|
|
334
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
335
|
+
</div>
|
|
336
|
+
`;
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
DSATree.styles = tree_styles_default;
|
|
340
|
+
__decorateClass([
|
|
341
|
+
query("slot:not([name])")
|
|
342
|
+
], DSATree.prototype, "defaultSlot", 2);
|
|
343
|
+
__decorateClass([
|
|
344
|
+
query("slot[name=expand-icon]")
|
|
345
|
+
], DSATree.prototype, "expandedIconSlot", 2);
|
|
346
|
+
__decorateClass([
|
|
347
|
+
query("slot[name=collapse-icon]")
|
|
348
|
+
], DSATree.prototype, "collapsedIconSlot", 2);
|
|
349
|
+
__decorateClass([
|
|
350
|
+
property()
|
|
351
|
+
], DSATree.prototype, "selection", 2);
|
|
352
|
+
__decorateClass([
|
|
353
|
+
watch("selection")
|
|
354
|
+
], DSATree.prototype, "handleSelectionChange", 1);
|
|
355
|
+
DSATree = __decorateClass([
|
|
356
|
+
customElement("dsa-tree")
|
|
357
|
+
], DSATree);
|
|
358
|
+
|
|
359
|
+
export {
|
|
360
|
+
DSATree
|
|
361
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getBasePath
|
|
3
|
+
} from "./chunk.FDYFSRSX.js";
|
|
4
|
+
|
|
5
|
+
// src/components/icon/library.default.ts
|
|
6
|
+
var materialPattern = /^(.*?)(_(outlined|filled))?$/;
|
|
7
|
+
var library = {
|
|
8
|
+
name: "default",
|
|
9
|
+
resolver: (name) => {
|
|
10
|
+
const match = name.match(materialPattern);
|
|
11
|
+
if (match !== null) {
|
|
12
|
+
const [, icon, , style = "outlined"] = match;
|
|
13
|
+
return getBasePath(`assets/icons/web/${style}/${icon}.svg`);
|
|
14
|
+
} else {
|
|
15
|
+
return "";
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
mutator: (svg) => svg.setAttribute("fill", "currentColor")
|
|
19
|
+
};
|
|
20
|
+
var library_default_default = library;
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
library_default_default
|
|
24
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {
|
|
2
|
+
avatar_styles_default
|
|
3
|
+
} from "./chunk.NHRDZGLI.js";
|
|
4
|
+
import {
|
|
5
|
+
DSAIcon
|
|
6
|
+
} from "./chunk.G7AELPSO.js";
|
|
7
|
+
import {
|
|
8
|
+
watch
|
|
9
|
+
} from "./chunk.D7CATJYB.js";
|
|
10
|
+
import {
|
|
11
|
+
ShoelaceElement
|
|
12
|
+
} from "./chunk.YCXTCVAZ.js";
|
|
13
|
+
import {
|
|
14
|
+
__decorateClass
|
|
15
|
+
} from "./chunk.6M63UXML.js";
|
|
16
|
+
|
|
17
|
+
// src/components/avatar/avatar.ts
|
|
18
|
+
import { html } from "lit";
|
|
19
|
+
import { property, state, customElement } from "lit/decorators.js";
|
|
20
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
21
|
+
var DSAAvatar = class extends ShoelaceElement {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.hasError = false;
|
|
25
|
+
this.image = "";
|
|
26
|
+
this.label = "";
|
|
27
|
+
this.initials = "";
|
|
28
|
+
this.loading = "eager";
|
|
29
|
+
this.size = "medium";
|
|
30
|
+
}
|
|
31
|
+
handleImageChange() {
|
|
32
|
+
this.hasError = false;
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
const avatarWithImage = html`
|
|
36
|
+
<img
|
|
37
|
+
part="image"
|
|
38
|
+
class="avatar__image"
|
|
39
|
+
src="${this.image}"
|
|
40
|
+
loading="${this.loading}"
|
|
41
|
+
alt=""
|
|
42
|
+
@error="${() => this.hasError = true}"
|
|
43
|
+
/>
|
|
44
|
+
`;
|
|
45
|
+
let avatarWithoutImage = html``;
|
|
46
|
+
if (this.initials) {
|
|
47
|
+
avatarWithoutImage = html`<div part="initials" class="avatar__initials">
|
|
48
|
+
${this.initials}
|
|
49
|
+
</div>`;
|
|
50
|
+
} else {
|
|
51
|
+
avatarWithoutImage = html`
|
|
52
|
+
<div part="icon" class="avatar__icon" aria-hidden="true">
|
|
53
|
+
<slot name="icon">
|
|
54
|
+
<dsa-icon name="person_filled"></dsa-icon>
|
|
55
|
+
</slot>
|
|
56
|
+
</div>
|
|
57
|
+
`;
|
|
58
|
+
}
|
|
59
|
+
return html`
|
|
60
|
+
<div
|
|
61
|
+
part="base"
|
|
62
|
+
class=${classMap({
|
|
63
|
+
avatar: true,
|
|
64
|
+
"avatar--small": this.size === "small",
|
|
65
|
+
"avatar--medium": this.size === "medium",
|
|
66
|
+
"avatar--large": this.size === "large",
|
|
67
|
+
"avatar--x-large": this.size === "x-large"
|
|
68
|
+
})}
|
|
69
|
+
role="img"
|
|
70
|
+
aria-label=${this.label}
|
|
71
|
+
>
|
|
72
|
+
${this.image && !this.hasError ? avatarWithImage : avatarWithoutImage}
|
|
73
|
+
</div>
|
|
74
|
+
`;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
DSAAvatar.styles = avatar_styles_default;
|
|
78
|
+
DSAAvatar.dependencies = {
|
|
79
|
+
"dsa-icon": DSAIcon
|
|
80
|
+
};
|
|
81
|
+
__decorateClass([
|
|
82
|
+
state()
|
|
83
|
+
], DSAAvatar.prototype, "hasError", 2);
|
|
84
|
+
__decorateClass([
|
|
85
|
+
property()
|
|
86
|
+
], DSAAvatar.prototype, "image", 2);
|
|
87
|
+
__decorateClass([
|
|
88
|
+
property()
|
|
89
|
+
], DSAAvatar.prototype, "label", 2);
|
|
90
|
+
__decorateClass([
|
|
91
|
+
property()
|
|
92
|
+
], DSAAvatar.prototype, "initials", 2);
|
|
93
|
+
__decorateClass([
|
|
94
|
+
property()
|
|
95
|
+
], DSAAvatar.prototype, "loading", 2);
|
|
96
|
+
__decorateClass([
|
|
97
|
+
property({ reflect: true })
|
|
98
|
+
], DSAAvatar.prototype, "size", 2);
|
|
99
|
+
__decorateClass([
|
|
100
|
+
watch("image")
|
|
101
|
+
], DSAAvatar.prototype, "handleImageChange", 1);
|
|
102
|
+
DSAAvatar = __decorateClass([
|
|
103
|
+
customElement("dsa-avatar")
|
|
104
|
+
], DSAAvatar);
|
|
105
|
+
|
|
106
|
+
export {
|
|
107
|
+
DSAAvatar
|
|
108
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
component_styles_default
|
|
3
|
+
} from "./chunk.TUVJKY7S.js";
|
|
4
|
+
|
|
5
|
+
// src/components/resize-observer/resize-observer.styles.ts
|
|
6
|
+
import { css } from "lit";
|
|
7
|
+
var resize_observer_styles_default = css`
|
|
8
|
+
${component_styles_default}
|
|
9
|
+
|
|
10
|
+
:host {
|
|
11
|
+
display: contents;
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
resize_observer_styles_default
|
|
17
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
component_styles_default
|
|
3
|
+
} from "./chunk.TUVJKY7S.js";
|
|
4
|
+
|
|
5
|
+
// src/components/divider/divider.styles.ts
|
|
6
|
+
import { css } from "lit";
|
|
7
|
+
var divider_styles_default = css`
|
|
8
|
+
${component_styles_default}
|
|
9
|
+
:host {
|
|
10
|
+
--spacing-start: var(--dsa-wc-divider-spacing);
|
|
11
|
+
--spacing-end: var(--dsa-wc-divider-spacing);
|
|
12
|
+
}
|
|
13
|
+
:host(:not([vertical])) {
|
|
14
|
+
display: block;
|
|
15
|
+
border-top: solid var(--dsa-wc-divider-width) var(--dsa-wc-divider-color);
|
|
16
|
+
margin: var(--spacing-start) 0 var(--spacing-end) 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:host([vertical]) {
|
|
20
|
+
display: inline-block;
|
|
21
|
+
height: 100%;
|
|
22
|
+
border-left: solid var(--dsa-wc-divider-width) var(--dsa-wc-divider-color);
|
|
23
|
+
margin: 0 var(--spacing-start) 0 var(--spacing-end);
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
divider_styles_default
|
|
29
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import {
|
|
2
|
+
component_styles_default
|
|
3
|
+
} from "./chunk.TUVJKY7S.js";
|
|
4
|
+
|
|
5
|
+
// src/components/spinner/spinner.styles.ts
|
|
6
|
+
import { css } from "lit";
|
|
7
|
+
var spinner_styles_default = css`
|
|
8
|
+
${component_styles_default}
|
|
9
|
+
|
|
10
|
+
:host {
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
width: 1em;
|
|
13
|
+
height: 1em;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.spinner {
|
|
17
|
+
flex: 1 1 auto;
|
|
18
|
+
height: 100%;
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.spinner__track,
|
|
23
|
+
.spinner__indicator {
|
|
24
|
+
fill: none;
|
|
25
|
+
stroke-width: var(--dsa-wc-spinner-track-width);
|
|
26
|
+
r: calc(0.5em - var(--dsa-wc-spinner-track-width) / 2);
|
|
27
|
+
cx: 0.5em;
|
|
28
|
+
cy: 0.5em;
|
|
29
|
+
transform-origin: 50% 50%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.spinner__track {
|
|
33
|
+
transform-origin: 0% 0%;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.spinner__indicator {
|
|
37
|
+
stroke-dasharray: 150% 75%;
|
|
38
|
+
animation: spin 2s linear var(--dsa-wc-no-animations-duration, infinite);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.spinner--on-base .spinner__track {
|
|
42
|
+
stroke: var(
|
|
43
|
+
--dsa-wc-internal-spinner-on-base-track-color,
|
|
44
|
+
var(--dsa-wc-spinner-on-base-track-color)
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.spinner--on-floating .spinner__track {
|
|
49
|
+
stroke: var(
|
|
50
|
+
--dsa-wc-internal-spinner-on-floating-track-color,
|
|
51
|
+
var(--dsa-wc-spinner-on-floating-menu-track-color)
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.spinner--on-base .spinner__indicator {
|
|
56
|
+
stroke: var(
|
|
57
|
+
--dsa-wc-internal-spinner-on-base-indicator-color,
|
|
58
|
+
var(--dsa-wc-spinner-on-base-indicator-color)
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.spinner--on-floating .spinner__indicator {
|
|
63
|
+
stroke: var(
|
|
64
|
+
--dsa-wc-internal-spinner-on-floating-indicator-color,
|
|
65
|
+
var(--dsa-wc-spinner-on-floating-menu-indicator-color)
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@keyframes spin {
|
|
70
|
+
0% {
|
|
71
|
+
transform: rotate(0deg);
|
|
72
|
+
stroke-dasharray: 0.01em, 2.75em;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
50% {
|
|
76
|
+
transform: rotate(450deg);
|
|
77
|
+
stroke-dasharray: 1.375em, 1.375em;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
100% {
|
|
81
|
+
transform: rotate(1080deg);
|
|
82
|
+
stroke-dasharray: 0.01em, 2.75em;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
`;
|
|
86
|
+
|
|
87
|
+
export {
|
|
88
|
+
spinner_styles_default
|
|
89
|
+
};
|