scu-web-components 0.0.46 → 0.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{chunk.6JACVQKT.js → chunk.24CGKD4M.js} +2 -2
- package/dist/chunks/chunk.24CGKD4M.js.gz +0 -0
- package/dist/chunks/chunk.2G75FJJM.js +12 -0
- package/dist/chunks/chunk.2G75FJJM.js.gz +0 -0
- package/dist/chunks/chunk.2G75FJJM.js.map +7 -0
- package/dist/chunks/chunk.2G75FJJM.js.map.gz +0 -0
- package/dist/chunks/{chunk.TLLMTMXY.js → chunk.3SST2ZKP.js} +2 -2
- package/dist/chunks/chunk.3SST2ZKP.js.gz +0 -0
- package/dist/chunks/chunk.4WUXGWWA.js +2 -0
- package/dist/chunks/chunk.4WUXGWWA.js.gz +0 -0
- package/dist/chunks/chunk.4WUXGWWA.js.map +7 -0
- package/dist/chunks/chunk.4WUXGWWA.js.map.gz +0 -0
- package/dist/chunks/chunk.6M4KJF3Y.js +2 -0
- package/dist/chunks/chunk.6M4KJF3Y.js.gz +0 -0
- package/dist/chunks/chunk.6PG6IABX.js +2 -0
- package/dist/chunks/chunk.6PG6IABX.js.gz +0 -0
- package/dist/chunks/{chunk.MKQHB2CE.js → chunk.CATZMLQA.js} +1 -1
- package/dist/chunks/chunk.CATZMLQA.js.gz +0 -0
- package/dist/chunks/chunk.EDCZEEFY.js +2 -0
- package/dist/chunks/chunk.EDCZEEFY.js.gz +0 -0
- package/dist/chunks/chunk.FZ4JXK66.js +2 -0
- package/dist/chunks/chunk.FZ4JXK66.js.gz +0 -0
- package/dist/chunks/chunk.LSDM53VZ.js +2 -0
- package/dist/chunks/chunk.LSDM53VZ.js.gz +0 -0
- package/dist/chunks/chunk.NA2QZFUA.js +49 -0
- package/dist/chunks/chunk.NA2QZFUA.js.gz +0 -0
- package/dist/chunks/chunk.NA2QZFUA.js.map +7 -0
- package/dist/chunks/chunk.NA2QZFUA.js.map.gz +0 -0
- package/dist/chunks/{chunk.J6QOERDS.js → chunk.NHM3COMD.js} +2 -2
- package/dist/chunks/chunk.NHM3COMD.js.gz +0 -0
- package/dist/chunks/{chunk.NU46QA6I.js → chunk.O6LKSGBL.js} +2 -2
- package/dist/chunks/chunk.O6LKSGBL.js.gz +0 -0
- package/dist/chunks/{chunk.X5NS5YBQ.js → chunk.P4Y7QFYU.js} +2 -2
- package/dist/chunks/chunk.P4Y7QFYU.js.gz +0 -0
- package/dist/chunks/{chunk.XO3UZUKH.js → chunk.PEKTPPGZ.js} +2 -2
- package/dist/chunks/chunk.PEKTPPGZ.js.gz +0 -0
- package/dist/chunks/{chunk.XO3UZUKH.js.map → chunk.PEKTPPGZ.js.map} +2 -2
- package/dist/chunks/{chunk.XO3UZUKH.js.map.gz → chunk.PEKTPPGZ.js.map.gz} +0 -0
- package/dist/chunks/{chunk.MQP3LJ22.js → chunk.RSGNS7V4.js} +2 -2
- package/dist/chunks/chunk.RSGNS7V4.js.gz +0 -0
- package/dist/chunks/{chunk.3DNJZ75B.js → chunk.TG2WTNJI.js} +2 -2
- package/dist/chunks/chunk.TG2WTNJI.js.gz +0 -0
- package/dist/chunks/{chunk.3DNJZ75B.js.map → chunk.TG2WTNJI.js.map} +2 -2
- package/dist/chunks/chunk.TG2WTNJI.js.map.gz +0 -0
- package/dist/chunks/chunk.XH4BHYNF.js +2 -0
- package/dist/chunks/chunk.XH4BHYNF.js.gz +0 -0
- package/dist/custom-elements.json +1130 -816
- package/dist/custom-elements.json.gz +0 -0
- package/dist/docs/components/ScwStepper.json +301 -0
- package/dist/docs/components/manifest.json +31 -25
- package/dist/docs/config.json +3 -3
- package/dist/scw-alert/ScwAlert.js +1 -1
- package/dist/scw-alert/ScwAlert.js.gz +0 -0
- package/dist/scw-alert/scw-alert.js +1 -1
- package/dist/scw-alert/scw-alert.js.gz +0 -0
- package/dist/scw-button/ScwButton.js +1 -1
- package/dist/scw-button/ScwButton.js.gz +0 -0
- package/dist/scw-button/scw-button.js +1 -1
- package/dist/scw-button/scw-button.js.gz +0 -0
- package/dist/scw-card/ScwCard.js +1 -1
- package/dist/scw-card/ScwCard.js.gz +0 -0
- package/dist/scw-card/scw-card.js +1 -1
- package/dist/scw-card/scw-card.js.gz +0 -0
- package/dist/scw-center-component/ScwCenterComponent.js +1 -1
- package/dist/scw-center-component/ScwCenterComponent.js.gz +0 -0
- package/dist/scw-center-component/scw-center-component.js +1 -1
- package/dist/scw-center-component/scw-center-component.js.gz +0 -0
- package/dist/scw-component/ScwComponent.js +1 -1
- package/dist/scw-component/ScwComponent.js.gz +0 -0
- package/dist/scw-component/scw-component.js +1 -1
- package/dist/scw-component/scw-component.js.gz +0 -0
- package/dist/scw-components.d.ts +1 -0
- package/dist/scw-components.js +1 -1
- package/dist/scw-components.js.gz +0 -0
- package/dist/scw-element-component/scw-element-component.js +1 -1
- package/dist/scw-element-component/scw-element-component.js.gz +0 -0
- package/dist/scw-flex-h-component/scw-flex-h-component.js +1 -1
- package/dist/scw-flex-h-component/scw-flex-h-component.js.gz +0 -0
- package/dist/scw-flex-v-component/scw-flex-v-component.js +1 -1
- package/dist/scw-flex-v-component/scw-flex-v-component.js.gz +0 -0
- package/dist/scw-float-component/scw-float-component.js +1 -1
- package/dist/scw-float-component/scw-float-component.js.gz +0 -0
- package/dist/scw-form/scw-form.js +1 -1
- package/dist/scw-form/scw-form.js.gz +0 -0
- package/dist/scw-form-component/scw-form-component.js +1 -1
- package/dist/scw-form-component/scw-form-component.js.gz +0 -0
- package/dist/scw-heading/ScwHeading.js +1 -1
- package/dist/scw-heading/ScwHeading.js.gz +0 -0
- package/dist/scw-heading/scw-heading.js +1 -1
- package/dist/scw-heading/scw-heading.js.gz +0 -0
- package/dist/scw-icon/ScwIcon.js +1 -1
- package/dist/scw-icon/ScwIcon.js.gz +0 -0
- package/dist/scw-icon/scw-icon.js +1 -1
- package/dist/scw-icon/scw-icon.js.gz +0 -0
- package/dist/scw-image/ScwImage.js +1 -1
- package/dist/scw-image/ScwImage.js.gz +0 -0
- package/dist/scw-image/scw-image.js +1 -1
- package/dist/scw-image/scw-image.js.gz +0 -0
- package/dist/scw-input/scw-input.js +1 -1
- package/dist/scw-input/scw-input.js.gz +0 -0
- package/dist/scw-input-field/scw-input-field.js +1 -1
- package/dist/scw-input-field/scw-input-field.js.gz +0 -0
- package/dist/scw-input-layout/scw-input-layout.js +1 -1
- package/dist/scw-input-layout/scw-input-layout.js.gz +0 -0
- package/dist/scw-layout-component/scw-layout-component.js +1 -1
- package/dist/scw-layout-component/scw-layout-component.js.gz +0 -0
- package/dist/scw-link/ScwLink.js +1 -1
- package/dist/scw-link/ScwLink.js.gz +0 -0
- package/dist/scw-link/scw-link.js +1 -1
- package/dist/scw-link/scw-link.js.gz +0 -0
- package/dist/scw-link-base/ScwLinkBase.js +1 -1
- package/dist/scw-link-base/ScwLinkBase.js.gz +0 -0
- package/dist/scw-link-base/scw-link-base.js +1 -1
- package/dist/scw-link-base/scw-link-base.js.gz +0 -0
- package/dist/scw-menu/ScwMenu.js +1 -1
- package/dist/scw-menu/ScwMenu.js.gz +0 -0
- package/dist/scw-menu/keyboard/keyboardElements.js +1 -1
- package/dist/scw-menu/keyboard/keyboardElements.js.gz +0 -0
- package/dist/scw-menu/keyboard/scw-menu-keyboard.js +1 -1
- package/dist/scw-menu/keyboard/scw-menu-keyboard.js.gz +0 -0
- package/dist/scw-menu/scw-menu.js +1 -1
- package/dist/scw-menu/scw-menu.js.gz +0 -0
- package/dist/scw-menu-item/ScwMenuItem.js +1 -1
- package/dist/scw-menu-item/ScwMenuItem.js.gz +0 -0
- package/dist/scw-menu-item/scw-menu-item.js +1 -1
- package/dist/scw-menu-item/scw-menu-item.js.gz +0 -0
- package/dist/scw-page-alert/scw-page-alert.js +1 -1
- package/dist/scw-page-alert/scw-page-alert.js.gz +0 -0
- package/dist/scw-pane-component/scw-pane-component.js +1 -1
- package/dist/scw-pane-component/scw-pane-component.js.gz +0 -0
- package/dist/scw-select/scw-select.js +1 -1
- package/dist/scw-select/scw-select.js.gz +0 -0
- package/dist/scw-single-input/scw-single-input.js +6 -16
- package/dist/scw-single-input/scw-single-input.js.gz +0 -0
- package/dist/scw-single-input/scw-single-input.js.map +4 -4
- package/dist/scw-single-input/scw-single-input.js.map.gz +0 -0
- package/dist/scw-single-input-layout/scw-single-input-layout.js +1 -1
- package/dist/scw-single-input-layout/scw-single-input-layout.js.gz +0 -0
- package/dist/scw-stack-component/scw-stack-component.js +1 -1
- package/dist/scw-stack-component/scw-stack-component.js.gz +0 -0
- package/dist/scw-stepper/ScwStepper.d.ts +35 -0
- package/dist/scw-stepper/ScwStepper.js +2 -0
- package/dist/scw-stepper/ScwStepper.js.gz +0 -0
- package/dist/scw-stepper/ScwStepper.js.map +7 -0
- package/dist/scw-stepper/ScwStepper.js.map.gz +0 -0
- package/dist/scw-stepper/scw-stepper.d.ts +1 -0
- package/dist/scw-stepper/scw-stepper.js +2 -0
- package/dist/scw-stepper/scw-stepper.js.gz +0 -0
- package/dist/scw-stepper/scw-stepper.js.map +7 -0
- package/dist/scw-stepper/scw-stepper.js.map.gz +0 -0
- package/dist/scw-test/ScwTest.js +1 -1
- package/dist/scw-test/ScwTest.js.gz +0 -0
- package/dist/scw-test/scw-test.js +1 -1
- package/dist/scw-test/scw-test.js.gz +0 -0
- package/dist/scw-textarea/scw-textarea.js +1 -1
- package/dist/scw-textarea/scw-textarea.js.gz +0 -0
- package/dist/scw-validate/scw-validate.js +1 -1
- package/dist/scw-validate/scw-validate.js.gz +0 -0
- package/dist/scw-validation/scw-validation.js +1 -1
- package/dist/scw-validation/scw-validation.js.gz +0 -0
- package/dist/scw.js +1 -1
- package/dist/scw.js.gz +0 -0
- package/dist/tokens/css.html +2 -2
- package/dist/tokens/css.html.gz +0 -0
- package/dist/tokens/segments/comp-scw-stepper/_default-mixins.scss +72 -0
- package/dist/tokens/segments/comp-scw-stepper/_default-scw-stepper-item-circle-mixins.scss +62 -0
- package/dist/tokens/segments/comp-scw-stepper/_default-scw-stepper-item-circle-vars.scss +30 -0
- package/dist/tokens/segments/comp-scw-stepper/_default-scw-stepper-item-mixins.scss +57 -0
- package/dist/tokens/segments/comp-scw-stepper/_default-scw-stepper-item-vars.scss +27 -0
- package/dist/tokens/segments/comp-scw-stepper/_default-vars.scss +26 -0
- package/dist/tokens/segments/comp-scw-stepper/_focused-page-2-mixins.scss +72 -0
- package/dist/tokens/segments/comp-scw-stepper/_focused-page-2-scw-stepper-item-circle-mixins.scss +62 -0
- package/dist/tokens/segments/comp-scw-stepper/_focused-page-2-scw-stepper-item-circle-vars.scss +30 -0
- package/dist/tokens/segments/comp-scw-stepper/_focused-page-2-scw-stepper-item-mixins.scss +57 -0
- package/dist/tokens/segments/comp-scw-stepper/_focused-page-2-scw-stepper-item-vars.scss +27 -0
- package/dist/tokens/segments/comp-scw-stepper/_focused-page-2-vars.scss +26 -0
- package/dist/tokens/segments/comp-scw-stepper/_focused-page-3-mixins.scss +72 -0
- package/dist/tokens/segments/comp-scw-stepper/_focused-page-3-scw-stepper-item-circle-mixins.scss +62 -0
- package/dist/tokens/segments/comp-scw-stepper/_focused-page-3-scw-stepper-item-circle-vars.scss +30 -0
- package/dist/tokens/segments/comp-scw-stepper/_focused-page-3-scw-stepper-item-mixins.scss +57 -0
- package/dist/tokens/segments/comp-scw-stepper/_focused-page-3-scw-stepper-item-vars.scss +27 -0
- package/dist/tokens/segments/comp-scw-stepper/_focused-page-3-vars.scss +26 -0
- package/dist/tokens/segments/comp-scw-stepper/_focused-page-4-mixins.scss +72 -0
- package/dist/tokens/segments/comp-scw-stepper/_focused-page-4-scw-stepper-item-circle-mixins.scss +62 -0
- package/dist/tokens/segments/comp-scw-stepper/_focused-page-4-scw-stepper-item-circle-vars.scss +30 -0
- package/dist/tokens/segments/comp-scw-stepper/_focused-page-4-scw-stepper-item-mixins.scss +57 -0
- package/dist/tokens/segments/comp-scw-stepper/_focused-page-4-scw-stepper-item-vars.scss +27 -0
- package/dist/tokens/segments/comp-scw-stepper/_focused-page-4-vars.scss +26 -0
- package/dist/tokens/segments/comp-scw-stepper/_index-mixins.scss +65 -0
- package/dist/tokens/segments/comp-scw-stepper/_index-vars.scss +32 -0
- package/dist/tokens/segments/comp-scw-stepper-icon/_default-circle-mixins.scss +62 -0
- package/dist/tokens/segments/comp-scw-stepper-icon/_default-circle-vars.scss +30 -0
- package/dist/tokens/segments/comp-scw-stepper-icon/_default-mixins.scss +61 -0
- package/dist/tokens/segments/comp-scw-stepper-icon/_default-vars.scss +26 -0
- package/dist/tokens/segments/comp-scw-stepper-icon/_index-mixins.scss +65 -0
- package/dist/tokens/segments/comp-scw-stepper-icon/_index-vars.scss +32 -0
- package/dist/tokens/segments/comp-scw-stepper-icon/_state-focused-circle-mixins.scss +62 -0
- package/dist/tokens/segments/comp-scw-stepper-icon/_state-focused-circle-vars.scss +30 -0
- package/dist/tokens/segments/comp-scw-stepper-icon/_state-focused-mixins.scss +61 -0
- package/dist/tokens/segments/comp-scw-stepper-icon/_state-focused-vars.scss +26 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-.json +52 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-.json.gz +0 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-default-.json +52 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-default-.json.gz +0 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-default-scw-stepper-item-.json +52 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-default-scw-stepper-item-.json.gz +0 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-default-scw-stepper-item-circle-.json +52 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-default-scw-stepper-item-circle-.json.gz +0 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-focused-page-2-.json +52 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-focused-page-2-.json.gz +0 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-focused-page-2-scw-stepper-item-.json +52 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-focused-page-2-scw-stepper-item-.json.gz +0 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-focused-page-2-scw-stepper-item-circle-.json +52 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-focused-page-2-scw-stepper-item-circle-.json.gz +0 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-focused-page-3-.json +52 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-focused-page-3-.json.gz +0 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-focused-page-3-scw-stepper-item-.json +52 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-focused-page-3-scw-stepper-item-.json.gz +0 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-focused-page-3-scw-stepper-item-circle-.json +52 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-focused-page-3-scw-stepper-item-circle-.json.gz +0 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-focused-page-4-.json +52 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-focused-page-4-.json.gz +0 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-focused-page-4-scw-stepper-item-.json +52 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-focused-page-4-scw-stepper-item-.json.gz +0 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-focused-page-4-scw-stepper-item-circle-.json +52 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-focused-page-4-scw-stepper-item-circle-.json.gz +0 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-icon-.json +52 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-icon-.json.gz +0 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-icon-default-.json +52 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-icon-default-.json.gz +0 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-icon-default-circle-.json +52 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-icon-default-circle-.json.gz +0 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-icon-state-focused-.json +52 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-icon-state-focused-.json.gz +0 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-icon-state-focused-circle-.json +52 -0
- package/dist/tokens/source/componentScssMixins/components-scw-stepper-icon-state-focused-circle-.json.gz +0 -0
- package/dist/tokens/source/componentScssMixins.json +936 -0
- package/dist/tokens/source/componentScssMixins.json.gz +0 -0
- package/dist/tokens/source/componentScssMixins.scss +1122 -0
- package/dist/tokens/source/cssApi.css +55 -55
- package/dist/tokens/source/cssApi.css.gz +0 -0
- package/dist/tokens/source/cssApi.css.json +66 -66
- package/dist/tokens/source/cssApi.css.json.gz +0 -0
- package/dist/tokens/source/cssApi.scss +44 -44
- package/dist/tokens/source/cssApi.scss.json +66 -66
- package/dist/tokens/source/cssApi.scss.json.gz +0 -0
- package/dist/tokens/source/cssPropertiesApi.ts +12 -12
- package/dist/tokens/source/cssPropertiesApiTypedStyles.ts +2 -1
- package/dist/tokens/source/cssPropertiesApiTypedStylesCssType.ts +2 -1
- package/dist/tokens/source/cssVariables.css +11 -11
- package/dist/tokens/source/cssVariables.css.gz +0 -0
- package/dist/tokens/source/cssVariables.json +66 -66
- package/dist/tokens/source/cssVariables.json.gz +0 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-default-scw-stepper-item-circle.json +10 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-default-scw-stepper-item-circle.json.gz +0 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-default-scw-stepper-item.json +10 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-default-scw-stepper-item.json.gz +0 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-default.json +10 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-default.json.gz +0 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-focused-page-2-scw-stepper-item-circle.json +10 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-focused-page-2-scw-stepper-item-circle.json.gz +0 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-focused-page-2-scw-stepper-item.json +10 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-focused-page-2-scw-stepper-item.json.gz +0 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-focused-page-2.json +10 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-focused-page-2.json.gz +0 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-focused-page-3-scw-stepper-item-circle.json +10 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-focused-page-3-scw-stepper-item-circle.json.gz +0 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-focused-page-3-scw-stepper-item.json +10 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-focused-page-3-scw-stepper-item.json.gz +0 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-focused-page-3.json +10 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-focused-page-3.json.gz +0 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-focused-page-4-scw-stepper-item-circle.json +10 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-focused-page-4-scw-stepper-item-circle.json.gz +0 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-focused-page-4-scw-stepper-item.json +10 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-focused-page-4-scw-stepper-item.json.gz +0 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-focused-page-4.json +10 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-focused-page-4.json.gz +0 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-icon-default-circle.json +10 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-icon-default-circle.json.gz +0 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-icon-default.json +10 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-icon-default.json.gz +0 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-icon-state-focused-circle.json +10 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-icon-state-focused-circle.json.gz +0 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-icon-state-focused.json +10 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-icon-state-focused.json.gz +0 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-icon.json +10 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper-icon.json.gz +0 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper.json +10 -0
- package/dist/tokens/source/htmlStubs/components-scw-stepper.json.gz +0 -0
- package/dist/tokens/source/htmlStubs.json +180 -0
- package/dist/tokens/source/htmlStubs.json.gz +0 -0
- package/dist/tokens/source/jsCss.js +1 -1
- package/dist/tokens/source/jsCss.js.gz +0 -0
- package/dist/tokens/source/jsCssGenerator.js +2 -2
- package/dist/tokens/source/jsCssGenerator.js.gz +0 -0
- package/dist/tokens/source/jsCssGeneratorSansAssets.js +2 -2
- package/dist/tokens/source/jsCssGeneratorSansAssets.js.gz +0 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-.json +157 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-.json.gz +0 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-default-.json +127 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-default-.json.gz +0 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-default-scw-stepper-item-.json +132 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-default-scw-stepper-item-.json.gz +0 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-default-scw-stepper-item-circle-.json +147 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-default-scw-stepper-item-circle-.json.gz +0 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-focused-page-2-.json +127 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-focused-page-2-.json.gz +0 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-focused-page-2-scw-stepper-item-.json +132 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-focused-page-2-scw-stepper-item-.json.gz +0 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-focused-page-2-scw-stepper-item-circle-.json +147 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-focused-page-2-scw-stepper-item-circle-.json.gz +0 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-focused-page-3-.json +127 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-focused-page-3-.json.gz +0 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-focused-page-3-scw-stepper-item-.json +132 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-focused-page-3-scw-stepper-item-.json.gz +0 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-focused-page-3-scw-stepper-item-circle-.json +147 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-focused-page-3-scw-stepper-item-circle-.json.gz +0 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-focused-page-4-.json +127 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-focused-page-4-.json.gz +0 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-focused-page-4-scw-stepper-item-.json +132 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-focused-page-4-scw-stepper-item-.json.gz +0 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-focused-page-4-scw-stepper-item-circle-.json +147 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-focused-page-4-scw-stepper-item-circle-.json.gz +0 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-icon-.json +157 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-icon-.json.gz +0 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-icon-default-.json +127 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-icon-default-.json.gz +0 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-icon-default-circle-.json +147 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-icon-default-circle-.json.gz +0 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-icon-state-focused-.json +127 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-icon-state-focused-.json.gz +0 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-icon-state-focused-circle-.json +147 -0
- package/dist/tokens/source/scssVariables/components-scw-stepper-icon-state-focused-circle-.json.gz +0 -0
- package/dist/tokens/source/scssVariables.json +2486 -0
- package/dist/tokens/source/scssVariables.json.gz +0 -0
- package/dist/tokens/source/scssVariables.scss +488 -0
- package/dist/tokens/source/tokens.json +2420 -172
- package/dist/tokens/source/tokens.json.gz +0 -0
- package/dist/tokens/styles.css +66 -66
- package/dist/tokens/styles.css.gz +0 -0
- package/dist/tokens/styles.scss +44 -44
- package/dist/tokens/stylesEmbedded.css +66 -66
- package/dist/tokens/stylesEmbedded.css.gz +0 -0
- package/dist/tokens/tokens.html +2 -2
- package/dist/tokens/tokens.html.gz +0 -0
- package/dist/utils/enums/Components.d.ts +1 -0
- package/dist/utils/enums/Components.js +1 -1
- package/dist/utils/enums/Components.js.gz +0 -0
- package/dist/utils/getIconSvg.js +1 -1
- package/dist/utils/getIconSvg.js.gz +0 -0
- package/dist/utils/suffix.js +1 -1
- package/dist/utils/suffix.js.gz +0 -0
- package/package.json +2 -2
- package/dist/chunks/chunk.3DNJZ75B.js.gz +0 -0
- package/dist/chunks/chunk.3DNJZ75B.js.map.gz +0 -0
- package/dist/chunks/chunk.3T3AZSZZ.js +0 -2
- package/dist/chunks/chunk.3T3AZSZZ.js.gz +0 -0
- package/dist/chunks/chunk.6JACVQKT.js.gz +0 -0
- package/dist/chunks/chunk.BSXT6VJ5.js +0 -2
- package/dist/chunks/chunk.BSXT6VJ5.js.gz +0 -0
- package/dist/chunks/chunk.FNC5OKC3.js +0 -2
- package/dist/chunks/chunk.FNC5OKC3.js.gz +0 -0
- package/dist/chunks/chunk.J6QOERDS.js.gz +0 -0
- package/dist/chunks/chunk.LONEBJ2H.js +0 -2
- package/dist/chunks/chunk.LONEBJ2H.js.gz +0 -0
- package/dist/chunks/chunk.MKQHB2CE.js.gz +0 -0
- package/dist/chunks/chunk.MQP3LJ22.js.gz +0 -0
- package/dist/chunks/chunk.NU46QA6I.js.gz +0 -0
- package/dist/chunks/chunk.SQW7MXRN.js +0 -2
- package/dist/chunks/chunk.SQW7MXRN.js.gz +0 -0
- package/dist/chunks/chunk.TLLMTMXY.js.gz +0 -0
- package/dist/chunks/chunk.X5NS5YBQ.js.gz +0 -0
- package/dist/chunks/chunk.XO3UZUKH.js.gz +0 -0
- package/dist/chunks/chunk.ZQIHYYIC.js +0 -2
- package/dist/chunks/chunk.ZQIHYYIC.js.gz +0 -0
- /package/dist/chunks/{chunk.6JACVQKT.js.map → chunk.24CGKD4M.js.map} +0 -0
- /package/dist/chunks/{chunk.6JACVQKT.js.map.gz → chunk.24CGKD4M.js.map.gz} +0 -0
- /package/dist/chunks/{chunk.TLLMTMXY.js.map → chunk.3SST2ZKP.js.map} +0 -0
- /package/dist/chunks/{chunk.TLLMTMXY.js.map.gz → chunk.3SST2ZKP.js.map.gz} +0 -0
- /package/dist/chunks/{chunk.FNC5OKC3.js.map → chunk.6M4KJF3Y.js.map} +0 -0
- /package/dist/chunks/{chunk.FNC5OKC3.js.map.gz → chunk.6M4KJF3Y.js.map.gz} +0 -0
- /package/dist/chunks/{chunk.LONEBJ2H.js.map → chunk.6PG6IABX.js.map} +0 -0
- /package/dist/chunks/{chunk.LONEBJ2H.js.map.gz → chunk.6PG6IABX.js.map.gz} +0 -0
- /package/dist/chunks/{chunk.MKQHB2CE.js.map → chunk.CATZMLQA.js.map} +0 -0
- /package/dist/chunks/{chunk.MKQHB2CE.js.map.gz → chunk.CATZMLQA.js.map.gz} +0 -0
- /package/dist/chunks/{chunk.3T3AZSZZ.js.map → chunk.EDCZEEFY.js.map} +0 -0
- /package/dist/chunks/{chunk.3T3AZSZZ.js.map.gz → chunk.EDCZEEFY.js.map.gz} +0 -0
- /package/dist/chunks/{chunk.SQW7MXRN.js.map → chunk.FZ4JXK66.js.map} +0 -0
- /package/dist/chunks/{chunk.SQW7MXRN.js.map.gz → chunk.FZ4JXK66.js.map.gz} +0 -0
- /package/dist/chunks/{chunk.ZQIHYYIC.js.map → chunk.LSDM53VZ.js.map} +0 -0
- /package/dist/chunks/{chunk.ZQIHYYIC.js.map.gz → chunk.LSDM53VZ.js.map.gz} +0 -0
- /package/dist/chunks/{chunk.J6QOERDS.js.map → chunk.NHM3COMD.js.map} +0 -0
- /package/dist/chunks/{chunk.J6QOERDS.js.map.gz → chunk.NHM3COMD.js.map.gz} +0 -0
- /package/dist/chunks/{chunk.NU46QA6I.js.map → chunk.O6LKSGBL.js.map} +0 -0
- /package/dist/chunks/{chunk.NU46QA6I.js.map.gz → chunk.O6LKSGBL.js.map.gz} +0 -0
- /package/dist/chunks/{chunk.X5NS5YBQ.js.map → chunk.P4Y7QFYU.js.map} +0 -0
- /package/dist/chunks/{chunk.X5NS5YBQ.js.map.gz → chunk.P4Y7QFYU.js.map.gz} +0 -0
- /package/dist/chunks/{chunk.MQP3LJ22.js.map → chunk.RSGNS7V4.js.map} +0 -0
- /package/dist/chunks/{chunk.MQP3LJ22.js.map.gz → chunk.RSGNS7V4.js.map.gz} +0 -0
- /package/dist/chunks/{chunk.BSXT6VJ5.js.map → chunk.XH4BHYNF.js.map} +0 -0
- /package/dist/chunks/{chunk.BSXT6VJ5.js.map.gz → chunk.XH4BHYNF.js.map.gz} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as r}from"./chunk.UXHVIMZV.js";import{a as e}from"./chunk.
|
|
1
|
+
import{a as r}from"./chunk.UXHVIMZV.js";import{a as e}from"./chunk.3SST2ZKP.js";import{a as s}from"./chunk.XWFI56OY.js";import{a}from"./chunk.3IG37SCP.js";import{a as l}from"./chunk.PKA6D7UK.js";import{g as c}from"./chunk.5YJY6NT6.js";var n=a`
|
|
2
2
|
:host([design=main]) {
|
|
3
3
|
outline: none;
|
|
4
4
|
background-color: rgba(0, 0, 0, 0);
|
|
@@ -205,4 +205,4 @@ import{a as r}from"./chunk.UXHVIMZV.js";import{a as e}from"./chunk.TLLMTMXY.js";
|
|
|
205
205
|
<div>${super.renderContent()}</div>
|
|
206
206
|
<div class="selected"></div>
|
|
207
207
|
`):(this.removeAttribute("aria-current"),super.renderContent())}render(){return this.renderLink(this.renderContent())}};c([s({type:String,attribute:"aria-selected"})],t.prototype,"ariaSelected",2);export{t as a};
|
|
208
|
-
//# sourceMappingURL=chunk.
|
|
208
|
+
//# sourceMappingURL=chunk.24CGKD4M.js.map
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{c as $}from"./chunk.UXIAMI3F.js";import{a as c,b as a,c as v}from"./chunk.RSR7WC4R.js";import{d}from"./chunk.PKA6D7UK.js";var r=(e,t)=>{var i,s;let o=e._$AN;if(o===void 0)return!1;for(let n of o)(s=(i=n)._$AO)===null||s===void 0||s.call(i,t,!1),r(n,t);return!0},l=e=>{let t,i;do{if((t=e._$AM)===void 0)break;i=t._$AN,i.delete(e),e=t}while((i==null?void 0:i.size)===0)},f=e=>{for(let t;t=e._$AM;e=t){let i=t._$AN;if(i===void 0)t._$AN=i=new Set;else if(i.has(e))break;i.add(e),m(t)}};function A(e){this._$AN!==void 0?(l(this),this._$AM=e,f(this)):this._$AM=e}function p(e,t=!1,i=0){let s=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(s))for(let n=i;n<s.length;n++)r(s[n],!1),l(s[n]);else s!=null&&(r(s,!1),l(s));else r(this,e)}var m=e=>{var t,i,s,o;e.type==c.CHILD&&((t=(s=e)._$AP)!==null&&t!==void 0||(s._$AP=p),(i=(o=e)._$AQ)!==null&&i!==void 0||(o._$AQ=A))},h=class extends v{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,i,s){super._$AT(t,i,s),f(this),this.isConnected=t._$AU}_$AO(t,i=!0){var s,o;t!==this.isConnected&&(this.isConnected=t,t?(s=this.reconnected)===null||s===void 0||s.call(this):(o=this.disconnected)===null||o===void 0||o.call(this)),i&&(r(this,t),l(this))}setValue(t){if($(this._$Ct))this._$Ct._$AI(t,this);else{let i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}};var T=()=>new _,_=class{},u=new WeakMap,w=a(class extends h{render(e){return d}update(e,[t]){var i;let s=t!==this.Y;return s&&this.Y!==void 0&&this.rt(void 0),(s||this.lt!==this.dt)&&(this.Y=t,this.ct=(i=e.options)===null||i===void 0?void 0:i.host,this.rt(this.dt=e.element)),d}rt(e){var t;if(typeof this.Y=="function"){let i=(t=this.ct)!==null&&t!==void 0?t:globalThis,s=u.get(i);s===void 0&&(s=new WeakMap,u.set(i,s)),s.get(this.Y)!==void 0&&this.Y.call(this.ct,void 0),s.set(this.Y,e),e!==void 0&&this.Y.call(this.ct,e)}else this.Y.value=e}get lt(){var e,t,i;return typeof this.Y=="function"?(t=u.get((e=this.ct)!==null&&e!==void 0?e:globalThis))===null||t===void 0?void 0:t.get(this.Y):(i=this.Y)===null||i===void 0?void 0:i.value}disconnected(){this.lt===this.dt&&this.rt(void 0)}reconnected(){this.rt(this.dt)}});export{T as a,w as b};
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2017 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2020 Google LLC
|
|
10
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
+
*/
|
|
12
|
+
//# sourceMappingURL=chunk.2G75FJJM.js.map
|
|
Binary file
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../node_modules/lit-html/src/async-directive.ts", "../../node_modules/lit-html/src/directives/ref.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Overview:\n *\n * This module is designed to add support for an async `setValue` API and\n * `disconnected` callback to directives with the least impact on the core\n * runtime or payload when that feature is not used.\n *\n * The strategy is to introduce a `AsyncDirective` subclass of\n * `Directive` that climbs the \"parent\" tree in its constructor to note which\n * branches of lit-html's \"logical tree\" of data structures contain such\n * directives and thus need to be crawled when a subtree is being cleared (or\n * manually disconnected) in order to run the `disconnected` callback.\n *\n * The \"nodes\" of the logical tree include Parts, TemplateInstances (for when a\n * TemplateResult is committed to a value of a ChildPart), and Directives; these\n * all implement a common interface called `DisconnectableChild`. Each has a\n * `_$parent` reference which is set during construction in the core code, and a\n * `_$disconnectableChildren` field which is initially undefined.\n *\n * The sparse tree created by means of the `AsyncDirective` constructor\n * crawling up the `_$parent` tree and placing a `_$disconnectableChildren` Set\n * on each parent that includes each child that contains a\n * `AsyncDirective` directly or transitively via its children. In order to\n * notify connection state changes and disconnect (or reconnect) a tree, the\n * `_$notifyConnectionChanged` API is patched onto ChildParts as a directive\n * climbs the parent tree, which is called by the core when clearing a part if\n * it exists. When called, that method iterates over the sparse tree of\n * Set<DisconnectableChildren> built up by AsyncDirectives, and calls\n * `_$notifyDirectiveConnectionChanged` on any directives that are encountered\n * in that tree, running the required callbacks.\n *\n * A given \"logical tree\" of lit-html data-structures might look like this:\n *\n * ChildPart(N1) _$dC=[D2,T3]\n * ._directive\n * AsyncDirective(D2)\n * ._value // user value was TemplateResult\n * TemplateInstance(T3) _$dC=[A4,A6,N10,N12]\n * ._parts[]\n * AttributePart(A4) _$dC=[D5]\n * ._directives[]\n * AsyncDirective(D5)\n * AttributePart(A6) _$dC=[D7,D8]\n * ._directives[]\n * AsyncDirective(D7)\n * Directive(D8) _$dC=[D9]\n * ._directive\n * AsyncDirective(D9)\n * ChildPart(N10) _$dC=[D11]\n * ._directive\n * AsyncDirective(D11)\n * ._value\n * string\n * ChildPart(N12) _$dC=[D13,N14,N16]\n * ._directive\n * AsyncDirective(D13)\n * ._value // user value was iterable\n * Array<ChildPart>\n * ChildPart(N14) _$dC=[D15]\n * ._value\n * string\n * ChildPart(N16) _$dC=[D17,T18]\n * ._directive\n * AsyncDirective(D17)\n * ._value // user value was TemplateResult\n * TemplateInstance(T18) _$dC=[A19,A21,N25]\n * ._parts[]\n * AttributePart(A19) _$dC=[D20]\n * ._directives[]\n * AsyncDirective(D20)\n * AttributePart(A21) _$dC=[22,23]\n * ._directives[]\n * AsyncDirective(D22)\n * Directive(D23) _$dC=[D24]\n * ._directive\n * AsyncDirective(D24)\n * ChildPart(N25) _$dC=[D26]\n * ._directive\n * AsyncDirective(D26)\n * ._value\n * string\n *\n * Example 1: The directive in ChildPart(N12) updates and returns `nothing`. The\n * ChildPart will _clear() itself, and so we need to disconnect the \"value\" of\n * the ChildPart (but not its directive). In this case, when `_clear()` calls\n * `_$notifyConnectionChanged()`, we don't iterate all of the\n * _$disconnectableChildren, rather we do a value-specific disconnection: i.e.\n * since the _value was an Array<ChildPart> (because an iterable had been\n * committed), we iterate the array of ChildParts (N14, N16) and run\n * `setConnected` on them (which does recurse down the full tree of\n * `_$disconnectableChildren` below it, and also removes N14 and N16 from N12's\n * `_$disconnectableChildren`). Once the values have been disconnected, we then\n * check whether the ChildPart(N12)'s list of `_$disconnectableChildren` is empty\n * (and would remove it from its parent TemplateInstance(T3) if so), but since\n * it would still contain its directive D13, it stays in the disconnectable\n * tree.\n *\n * Example 2: In the course of Example 1, `setConnected` will reach\n * ChildPart(N16); in this case the entire part is being disconnected, so we\n * simply iterate all of N16's `_$disconnectableChildren` (D17,T18) and\n * recursively run `setConnected` on them. Note that we only remove children\n * from `_$disconnectableChildren` for the top-level values being disconnected\n * on a clear; doing this bookkeeping lower in the tree is wasteful since it's\n * all being thrown away.\n *\n * Example 3: If the LitElement containing the entire tree above becomes\n * disconnected, it will run `childPart.setConnected()` (which calls\n * `childPart._$notifyConnectionChanged()` if it exists); in this case, we\n * recursively run `setConnected()` over the entire tree, without removing any\n * children from `_$disconnectableChildren`, since this tree is required to\n * re-connect the tree, which does the same operation, simply passing\n * `isConnected: true` down the tree, signaling which callback to run.\n */\n\nimport {AttributePart, ChildPart, Disconnectable, Part} from './lit-html.js';\nimport {isSingleExpression} from './directive-helpers.js';\nimport {Directive, PartInfo, PartType} from './directive.js';\nexport * from './directive.js';\n\nconst DEV_MODE = true;\n\n/**\n * Recursively walks down the tree of Parts/TemplateInstances/Directives to set\n * the connected state of directives and run `disconnected`/ `reconnected`\n * callbacks.\n *\n * @return True if there were children to disconnect; false otherwise\n */\nconst notifyChildrenConnectedChanged = (\n parent: Disconnectable,\n isConnected: boolean\n): boolean => {\n const children = parent._$disconnectableChildren;\n if (children === undefined) {\n return false;\n }\n for (const obj of children) {\n // The existence of `_$notifyDirectiveConnectionChanged` is used as a \"brand\" to\n // disambiguate AsyncDirectives from other DisconnectableChildren\n // (as opposed to using an instanceof check to know when to call it); the\n // redundancy of \"Directive\" in the API name is to avoid conflicting with\n // `_$notifyConnectionChanged`, which exists `ChildParts` which are also in\n // this list\n // Disconnect Directive (and any nested directives contained within)\n // This property needs to remain unminified.\n (obj as AsyncDirective)['_$notifyDirectiveConnectionChanged']?.(\n isConnected,\n false\n );\n // Disconnect Part/TemplateInstance\n notifyChildrenConnectedChanged(obj, isConnected);\n }\n return true;\n};\n\n/**\n * Removes the given child from its parent list of disconnectable children, and\n * if the parent list becomes empty as a result, removes the parent from its\n * parent, and so forth up the tree when that causes subsequent parent lists to\n * become empty.\n */\nconst removeDisconnectableFromParent = (obj: Disconnectable) => {\n let parent, children;\n do {\n if ((parent = obj._$parent) === undefined) {\n break;\n }\n children = parent._$disconnectableChildren!;\n children.delete(obj);\n obj = parent;\n } while (children?.size === 0);\n};\n\nconst addDisconnectableToParent = (obj: Disconnectable) => {\n // Climb the parent tree, creating a sparse tree of children needing\n // disconnection\n for (let parent; (parent = obj._$parent); obj = parent) {\n let children = parent._$disconnectableChildren;\n if (children === undefined) {\n parent._$disconnectableChildren = children = new Set();\n } else if (children.has(obj)) {\n // Once we've reached a parent that already contains this child, we\n // can short-circuit\n break;\n }\n children.add(obj);\n installDisconnectAPI(parent);\n }\n};\n\n/**\n * Changes the parent reference of the ChildPart, and updates the sparse tree of\n * Disconnectable children accordingly.\n *\n * Note, this method will be patched onto ChildPart instances and called from\n * the core code when parts are moved between different parents.\n */\nfunction reparentDisconnectables(this: ChildPart, newParent: Disconnectable) {\n if (this._$disconnectableChildren !== undefined) {\n removeDisconnectableFromParent(this);\n this._$parent = newParent;\n addDisconnectableToParent(this);\n } else {\n this._$parent = newParent;\n }\n}\n\n/**\n * Sets the connected state on any directives contained within the committed\n * value of this part (i.e. within a TemplateInstance or iterable of\n * ChildParts) and runs their `disconnected`/`reconnected`s, as well as within\n * any directives stored on the ChildPart (when `valueOnly` is false).\n *\n * `isClearingValue` should be passed as `true` on a top-level part that is\n * clearing itself, and not as a result of recursively disconnecting directives\n * as part of a `clear` operation higher up the tree. This both ensures that any\n * directive on this ChildPart that produced a value that caused the clear\n * operation is not disconnected, and also serves as a performance optimization\n * to avoid needless bookkeeping when a subtree is going away; when clearing a\n * subtree, only the top-most part need to remove itself from the parent.\n *\n * `fromPartIndex` is passed only in the case of a partial `_clear` running as a\n * result of truncating an iterable.\n *\n * Note, this method will be patched onto ChildPart instances and called from the\n * core code when parts are cleared or the connection state is changed by the\n * user.\n */\nfunction notifyChildPartConnectedChanged(\n this: ChildPart,\n isConnected: boolean,\n isClearingValue = false,\n fromPartIndex = 0\n) {\n const value = this._$committedValue;\n const children = this._$disconnectableChildren;\n if (children === undefined || children.size === 0) {\n return;\n }\n if (isClearingValue) {\n if (Array.isArray(value)) {\n // Iterable case: Any ChildParts created by the iterable should be\n // disconnected and removed from this ChildPart's disconnectable\n // children (starting at `fromPartIndex` in the case of truncation)\n for (let i = fromPartIndex; i < value.length; i++) {\n notifyChildrenConnectedChanged(value[i], false);\n removeDisconnectableFromParent(value[i]);\n }\n } else if (value != null) {\n // TemplateInstance case: If the value has disconnectable children (will\n // only be in the case that it is a TemplateInstance), we disconnect it\n // and remove it from this ChildPart's disconnectable children\n notifyChildrenConnectedChanged(value as Disconnectable, false);\n removeDisconnectableFromParent(value as Disconnectable);\n }\n } else {\n notifyChildrenConnectedChanged(this, isConnected);\n }\n}\n\n/**\n * Patches disconnection API onto ChildParts.\n */\nconst installDisconnectAPI = (obj: Disconnectable) => {\n if ((obj as ChildPart).type == PartType.CHILD) {\n (obj as ChildPart)._$notifyConnectionChanged ??=\n notifyChildPartConnectedChanged;\n (obj as ChildPart)._$reparentDisconnectables ??= reparentDisconnectables;\n }\n};\n\n/**\n * An abstract `Directive` base class whose `disconnected` method will be\n * called when the part containing the directive is cleared as a result of\n * re-rendering, or when the user calls `part.setConnected(false)` on\n * a part that was previously rendered containing the directive (as happens\n * when e.g. a LitElement disconnects from the DOM).\n *\n * If `part.setConnected(true)` is subsequently called on a\n * containing part, the directive's `reconnected` method will be called prior\n * to its next `update`/`render` callbacks. When implementing `disconnected`,\n * `reconnected` should also be implemented to be compatible with reconnection.\n *\n * Note that updates may occur while the directive is disconnected. As such,\n * directives should generally check the `this.isConnected` flag during\n * render/update to determine whether it is safe to subscribe to resources\n * that may prevent garbage collection.\n */\nexport abstract class AsyncDirective extends Directive {\n // As opposed to other Disconnectables, AsyncDirectives always get notified\n // when the RootPart connection changes, so the public `isConnected`\n // is a locally stored variable initialized via its part's getter and synced\n // via `_$notifyDirectiveConnectionChanged`. This is cheaper than using\n // the _$isConnected getter, which has to look back up the tree each time.\n /**\n * The connection state for this Directive.\n */\n isConnected!: boolean;\n\n // @internal\n override _$disconnectableChildren?: Set<Disconnectable> = undefined;\n /**\n * Initialize the part with internal fields\n * @param part\n * @param parent\n * @param attributeIndex\n */\n override _$initialize(\n part: Part,\n parent: Disconnectable,\n attributeIndex: number | undefined\n ) {\n super._$initialize(part, parent, attributeIndex);\n addDisconnectableToParent(this);\n this.isConnected = part._$isConnected;\n }\n // This property needs to remain unminified.\n /**\n * Called from the core code when a directive is going away from a part (in\n * which case `shouldRemoveFromParent` should be true), and from the\n * `setChildrenConnected` helper function when recursively changing the\n * connection state of a tree (in which case `shouldRemoveFromParent` should\n * be false).\n *\n * @param isConnected\n * @param isClearingDirective - True when the directive itself is being\n * removed; false when the tree is being disconnected\n * @internal\n */\n override ['_$notifyDirectiveConnectionChanged'](\n isConnected: boolean,\n isClearingDirective = true\n ) {\n if (isConnected !== this.isConnected) {\n this.isConnected = isConnected;\n if (isConnected) {\n this.reconnected?.();\n } else {\n this.disconnected?.();\n }\n }\n if (isClearingDirective) {\n notifyChildrenConnectedChanged(this, isConnected);\n removeDisconnectableFromParent(this);\n }\n }\n\n /**\n * Sets the value of the directive's Part outside the normal `update`/`render`\n * lifecycle of a directive.\n *\n * This method should not be called synchronously from a directive's `update`\n * or `render`.\n *\n * @param directive The directive to update\n * @param value The value to set\n */\n setValue(value: unknown) {\n if (isSingleExpression(this.__part as unknown as PartInfo)) {\n this.__part._$setValue(value, this);\n } else {\n // this.__attributeIndex will be defined in this case, but\n // assert it in dev mode\n if (DEV_MODE && this.__attributeIndex === undefined) {\n throw new Error(`Expected this.__attributeIndex to be a number`);\n }\n const newValues = [...(this.__part._$committedValue as Array<unknown>)];\n newValues[this.__attributeIndex!] = value;\n (this.__part as AttributePart)._$setValue(newValues, this, 0);\n }\n }\n\n /**\n * User callbacks for implementing logic to release any resources/subscriptions\n * that may have been retained by this directive. Since directives may also be\n * re-connected, `reconnected` should also be implemented to restore the\n * working state of the directive prior to the next render.\n */\n protected disconnected() {}\n protected reconnected() {}\n}\n", "/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport {nothing, ElementPart} from '../lit-html.js';\nimport {directive, AsyncDirective} from '../async-directive.js';\n\n/**\n * Creates a new Ref object, which is container for a reference to an element.\n */\nexport const createRef = <T = Element>() => new Ref<T>();\n\n/**\n * An object that holds a ref value.\n */\nclass Ref<T = Element> {\n /**\n * The current Element value of the ref, or else `undefined` if the ref is no\n * longer rendered.\n */\n readonly value?: T;\n}\n\nexport type {Ref};\n\ninterface RefInternal {\n value: Element | undefined;\n}\n\n// When callbacks are used for refs, this map tracks the last value the callback\n// was called with, for ensuring a directive doesn't clear the ref if the ref\n// has already been rendered to a new spot. It is double-keyed on both the\n// context (`options.host`) and the callback, since we auto-bind class methods\n// to `options.host`.\nconst lastElementForContextAndCallback: WeakMap<\n object,\n WeakMap<Function, Element | undefined>\n> = new WeakMap();\n\nexport type RefOrCallback = Ref | ((el: Element | undefined) => void);\n\nclass RefDirective extends AsyncDirective {\n private _element?: Element;\n private _ref?: RefOrCallback;\n private _context?: object;\n\n render(_ref: RefOrCallback) {\n return nothing;\n }\n\n override update(part: ElementPart, [ref]: Parameters<this['render']>) {\n const refChanged = ref !== this._ref;\n if (refChanged && this._ref !== undefined) {\n // The ref passed to the directive has changed;\n // unset the previous ref's value\n this._updateRefValue(undefined);\n }\n if (refChanged || this._lastElementForRef !== this._element) {\n // We either got a new ref or this is the first render;\n // store the ref/element & update the ref value\n this._ref = ref;\n this._context = part.options?.host;\n this._updateRefValue((this._element = part.element));\n }\n return nothing;\n }\n\n private _updateRefValue(element: Element | undefined) {\n if (typeof this._ref === 'function') {\n // If the current ref was called with a previous value, call with\n // `undefined`; We do this to ensure callbacks are called in a consistent\n // way regardless of whether a ref might be moving up in the tree (in\n // which case it would otherwise be called with the new value before the\n // previous one unsets it) and down in the tree (where it would be unset\n // before being set). Note that element lookup is keyed by\n // both the context and the callback, since we allow passing unbound\n // functions that are called on options.host, and we want to treat\n // these as unique \"instances\" of a function.\n const context = this._context ?? globalThis;\n let lastElementForCallback =\n lastElementForContextAndCallback.get(context);\n if (lastElementForCallback === undefined) {\n lastElementForCallback = new WeakMap();\n lastElementForContextAndCallback.set(context, lastElementForCallback);\n }\n if (lastElementForCallback.get(this._ref) !== undefined) {\n this._ref.call(this._context, undefined);\n }\n lastElementForCallback.set(this._ref, element);\n // Call the ref with the new element value\n if (element !== undefined) {\n this._ref.call(this._context, element);\n }\n } else {\n (this._ref as RefInternal)!.value = element;\n }\n }\n\n private get _lastElementForRef() {\n return typeof this._ref === 'function'\n ? lastElementForContextAndCallback\n .get(this._context ?? globalThis)\n ?.get(this._ref)\n : this._ref?.value;\n }\n\n override disconnected() {\n // Only clear the box if our element is still the one in it (i.e. another\n // directive instance hasn't rendered its element to it before us); that\n // only happens in the event of the directive being cleared (not via manual\n // disconnection)\n if (this._lastElementForRef === this._element) {\n this._updateRefValue(undefined);\n }\n }\n\n override reconnected() {\n // If we were manually disconnected, we can safely put our element back in\n // the box, since no rendering could have occurred to change its state\n this._updateRefValue(this._element);\n }\n}\n\n/**\n * Sets the value of a Ref object or calls a ref callback with the element it's\n * bound to.\n *\n * A Ref object acts as a container for a reference to an element. A ref\n * callback is a function that takes an element as its only argument.\n *\n * The ref directive sets the value of the Ref object or calls the ref callback\n * during rendering, if the referenced element changed.\n *\n * Note: If a ref callback is rendered to a different element position or is\n * removed in a subsequent render, it will first be called with `undefined`,\n * followed by another call with the new element it was rendered to (if any).\n *\n * ```js\n * // Using Ref object\n * const inputRef = createRef();\n * render(html`<input ${ref(inputRef)}>`, container);\n * inputRef.value.focus();\n *\n * // Using callback\n * const callback = (inputElement) => inputElement.focus();\n * render(html`<input ${ref(callback)}>`, container);\n * ```\n */\nexport const ref = directive(RefDirective);\n\n/**\n * The type of the class that powers this directive. Necessary for naming the\n * directive's return type.\n */\nexport type {RefDirective};\n"],
|
|
5
|
+
"mappings": "iIAsIA,IAAMA,EAAiC,CACrCC,EACAC,IAAAA,CAAAA,IAAAA,EAAAA,EAEA,IAAMC,EAAWF,EAAOG,KACxB,GAAID,IAAJ,OACE,MAAA,GAEF,QAAWE,KAAOF,GAShBG,GAAAC,EAACF,GAA2D,QAT5CF,MAS4CK,IAAA,QAAAA,EAAA,KAAAC,EAC1DP,EAAAA,E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AAuBH,KAAKI,IACnCJ,KAAKC,GAAAA,MAAgBC,CAExB,CAEQkB,aAAAA,CAGPpB,KAAKC,GAAgBD,KAAKI,EAAAA,CAC3B,CAAA,CAAA",
|
|
6
|
+
"names": ["notifyChildrenConnectedChanged", "parent", "isConnected", "children", "_$disconnectableChildren", "obj", "_b", "_a", "o", "e", "removeDisconnectableFromParent", "_$parent", "delete", "size", "addDisconnectableToParent", "Set", "has", "add", "installDisconnectAPI", "reparentDisconnectables", "newParent", "this", "notifyChildPartConnectedChanged", "isClearingValue", "fromPartIndex", "value", "_$committedValue", "Array", "isArray", "i", "length", "type", "PartType", "CHILD", "_c", "_$notifyConnectionChanged", "_d", "_$reparentDisconnectables", "AsyncDirective", "Directive", "constructor", "_$initialize", "part", "attributeIndex", "super", "_$isConnected", "_$AO", "isClearingDirective", "r", "reconnected", "call", "disconnected", "setValue", "isSingleExpression", "__part", "_$setValue", "newValues", "__attributeIndex", "createRef", "Ref", "lastElementForContextAndCallback", "WeakMap", "ref", "directive", "AsyncDirective", "render", "_ref", "nothing", "update", "part", "refChanged", "this", "_updateRefValue", "undefined", "_lastElementForRef", "_element", "_context", "_a", "options", "host", "element", "context", "globalThis", "lastElementForCallback", "get", "set", "call", "value", "_b", "_c", "disconnected", "reconnected"]
|
|
7
|
+
}
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as r}from"./chunk.I4ZVEUHX.js";import{a as b}from"./chunk.DSSTKNQ5.js";import{a as d}from"./chunk.
|
|
1
|
+
import{b as r}from"./chunk.I4ZVEUHX.js";import{a as b}from"./chunk.DSSTKNQ5.js";import{a as d}from"./chunk.CATZMLQA.js";import{a as l}from"./chunk.WJ7GGTRH.js";import{a as e,b as o}from"./chunk.XWFI56OY.js";import{a as i}from"./chunk.3IG37SCP.js";import{a}from"./chunk.PKA6D7UK.js";import{g as c}from"./chunk.5YJY6NT6.js";var p=i`
|
|
2
2
|
:host .label {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
justify-content: center;
|
|
@@ -258,4 +258,4 @@ import{b as r}from"./chunk.I4ZVEUHX.js";import{a as b}from"./chunk.DSSTKNQ5.js";
|
|
|
258
258
|
<div class="icon">
|
|
259
259
|
${l(this._svgInfo)}
|
|
260
260
|
</div>`:""}`}findStyle(){switch(this.design){case"solid":return g;case"outlined":return u;case"text":return L;case"plain":default:return v}}render(){return this.renderLink(this.renderContent())}};c([e({type:String,reflect:!0})],s.prototype,"icon",1),c([e({type:String,reflect:!0,attribute:"icon-side"})],s.prototype,"iconSide",2),c([e({type:String,reflect:!0})],s.prototype,"design",2),c([o()],s.prototype,"_svgInfo",2);export{s as a};
|
|
261
|
-
//# sourceMappingURL=chunk.
|
|
261
|
+
//# sourceMappingURL=chunk.3SST2ZKP.js.map
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
var t=["icon-placeholder","icon-close","icon-instagram","icon-check","icon-download","icon-menu","icon-tester","icon-linkedin","icon-facebook","icon-tiktok","icon-location","icon-location-dot","icon-search","icon-visible","icon-hidden","icon-lock","icon-edit","icon-envelope","icon-external-link","icon-crosshairs","icon-message","icon-minus","icon-mobile","icon-pdf","icon-plus","icon-chevron-up","icon-chevron-down","icon-chevron-left","icon-chevron-right","icon-clock","icon-info","icon-user","icon-circle","icon-code","icon-print","icon-slider","icon-document","icon-checkbox","icon-radio","icon-checkbox-selected","icon-radio-selected","icon-checkbox-hover","icon-radio-hover","icon-checkbox-selected-hover","icon-radio-selected-hover","icon-checkbox-disabled","icon-radio-disabled","icon-checkbox-selected-disabled","icon-radio-selected-disabled","icon-color-test","graphic-apple-app-store","graphic-logo","graphic-ncua","graphic-ehl","graphic-google-play-store"];async function o(e,i){if(!t.includes(e))return!1;let a;switch(e){case"icon-placeholder":a=(await import("./icon-placeholder.H62WLGDV.js")).default;break;case"icon-close":a=(await import("./icon-close.54SWM4NN.js")).default;break;case"icon-instagram":a=(await import("./icon-instagram.6SNPIITH.js")).default;break;case"icon-check":a=(await import("./icon-check.2J6H24PQ.js")).default;break;case"icon-download":a=(await import("./icon-download.PZAFFQ6X.js")).default;break;case"icon-menu":a=(await import("./icon-menu.YT2VRBVW.js")).default;break;case"icon-tester":a=(await import("./icon-tester.PNAPVVCU.js")).default;break;case"icon-linkedin":a=(await import("./icon-linkedin.MAI4ZPUP.js")).default;break;case"icon-facebook":a=(await import("./icon-facebook.QXY4NSZC.js")).default;break;case"icon-tiktok":a=(await import("./icon-tiktok.GIFGF7PJ.js")).default;break;case"icon-location":a=(await import("./icon-location.QQ2PREBA.js")).default;break;case"icon-location-dot":a=(await import("./icon-location-dot.WO3EZZJ4.js")).default;break;case"icon-search":a=(await import("./icon-search.G6EUFLAB.js")).default;break;case"icon-visible":a=(await import("./icon-visible.6LLG6U2V.js")).default;break;case"icon-hidden":a=(await import("./icon-hidden.XVGOU2XC.js")).default;break;case"icon-lock":a=(await import("./icon-lock.IDEZHIWZ.js")).default;break;case"icon-edit":a=(await import("./icon-edit.CBMWMGRY.js")).default;break;case"icon-envelope":a=(await import("./icon-envelope.VVRENS7E.js")).default;break;case"icon-external-link":a=(await import("./icon-external-link.G55QN337.js")).default;break;case"icon-crosshairs":a=(await import("./icon-crosshairs.XJVZHAJC.js")).default;break;case"icon-message":a=(await import("./icon-message.3DWME3DJ.js")).default;break;case"icon-minus":a=(await import("./icon-minus.Y6J3TBEG.js")).default;break;case"icon-mobile":a=(await import("./icon-mobile.NTHRHOJL.js")).default;break;case"icon-pdf":a=(await import("./icon-pdf.NPPTHMNU.js")).default;break;case"icon-plus":a=(await import("./icon-plus.OWM6ZAXM.js")).default;break;case"icon-chevron-up":a=(await import("./icon-chevron-up.E72GWARZ.js")).default;break;case"icon-chevron-down":a=(await import("./icon-chevron-down.G3D5CS54.js")).default;break;case"icon-chevron-left":a=(await import("./icon-chevron-left.U4KXPC3Z.js")).default;break;case"icon-chevron-right":a=(await import("./icon-chevron-right.Q25FULHU.js")).default;break;case"icon-clock":a=(await import("./icon-clock.U2YNTBDN.js")).default;break;case"icon-info":a=(await import("./icon-info.U2ENHMDH.js")).default;break;case"icon-user":a=(await import("./icon-user.PWD6MXKR.js")).default;break;case"icon-circle":a=(await import("./icon-circle.YMYFOJQF.js")).default;break;case"icon-code":a=(await import("./icon-code.7DGRWN7U.js")).default;break;case"icon-print":a=(await import("./icon-print.U3N7JRFD.js")).default;break;case"icon-slider":a=(await import("./icon-slider.AE5XEGK5.js")).default;break;case"icon-document":a=(await import("./icon-document.ZFL6AULX.js")).default;break;case"icon-checkbox":a=(await import("./icon-checkbox.YH7MMYRP.js")).default;break;case"icon-radio":a=(await import("./icon-radio.I2FI3WCV.js")).default;break;case"icon-checkbox-selected":a=(await import("./icon-checkbox-selected.FED2RUMY.js")).default;break;case"icon-radio-selected":a=(await import("./icon-radio-selected.XXL7SCSC.js")).default;break;case"icon-checkbox-hover":a=(await import("./icon-checkbox-hover.CNYOUMCW.js")).default;break;case"icon-radio-hover":a=(await import("./icon-radio-hover.B5FZHVHA.js")).default;break;case"icon-checkbox-selected-hover":a=(await import("./icon-checkbox-selected-hover.Z2A35DYF.js")).default;break;case"icon-radio-selected-hover":a=(await import("./icon-radio-selected-hover.O6DFK257.js")).default;break;case"icon-checkbox-disabled":a=(await import("./icon-checkbox-disabled.VSUFMT3G.js")).default;break;case"icon-radio-disabled":a=(await import("./icon-radio-disabled.Q5ZGKYKV.js")).default;break;case"icon-checkbox-selected-disabled":a=(await import("./icon-checkbox-selected-disabled.YPIYXSB5.js")).default;break;case"icon-radio-selected-disabled":a=(await import("./icon-radio-selected-disabled.CJWSVALQ.js")).default;break;case"icon-color-test":a=(await import("./icon-color-test.JO6FCNHQ.js")).default;break;case"graphic-apple-app-store":a=(await import("./graphic-apple-app-store.BINYIYOC.js")).default;break;case"graphic-logo":a=(await import("./graphic-logo.ZDB2NNEH.js")).default;break;case"graphic-ncua":a=(await import("./graphic-ncua.AGM6NECM.js")).default;break;case"graphic-ehl":a=(await import("./graphic-ehl.HFHAC6QM.js")).default;break;case"graphic-google-play-store":a=(await import("./graphic-google-play-store.7EJSH2VV.js")).default;break}return i===!0?`url('data:image/svg+xml;utf8,${a.replace(/#/g,"%23")}')`:a}function r(e,i){if(e){let a=e;e.indexOf("icon-")!==0&&(a=`icon-${e}`),o(a).then(c=>{i(c)})}}export{r as a};
|
|
2
|
-
//# sourceMappingURL=chunk.
|
|
2
|
+
//# sourceMappingURL=chunk.CATZMLQA.js.map
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import{a as l,b as d}from"./chunk.2G75FJJM.js";import{a as n,b as o,c as s,d as a}from"./chunk.XWFI56OY.js";import{a as i}from"./chunk.3IG37SCP.js";import{a as c}from"./chunk.PKA6D7UK.js";import{g as r}from"./chunk.5YJY6NT6.js";var p=i`
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.container {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-flow: row nowrap;
|
|
9
|
+
justify-content: flex-start;
|
|
10
|
+
align-items: flex-start;
|
|
11
|
+
padding-left: 0px;
|
|
12
|
+
padding-right: 0px;
|
|
13
|
+
padding-top: 0px;
|
|
14
|
+
padding-bottom: 0px;
|
|
15
|
+
}
|
|
16
|
+
.container > *:not(:last-child) {
|
|
17
|
+
margin-right: calc(var(--scw-spacing-1) * 3.8);
|
|
18
|
+
--margin-right: calc( var( --scw-spacing-1 ) * 3.8 );
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.circle {
|
|
22
|
+
background-color: var(--scw-color-grey-092);
|
|
23
|
+
border-radius: 50% 50% 50% 50%;
|
|
24
|
+
width: 10px;
|
|
25
|
+
height: 10px;
|
|
26
|
+
}
|
|
27
|
+
.circle.focused {
|
|
28
|
+
background-color: var(--scw-color-grey-07);
|
|
29
|
+
border-radius: 50% 50% 50% 50%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.body p {
|
|
33
|
+
font-size: 42px;
|
|
34
|
+
}
|
|
35
|
+
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL1VzZXJzL3Njb3R0cm91c2UvV29ya3NwYWNlL3NjdS13ZWItY29tcG9uZW50cy13ZWJzaXRlcy9zY3Utd2ViLWNvbXBvbmVudHMtd2Vic2l0ZXMvc3JjL3Njdy1zdGVwcGVyL3Njc3MiLCJzb3VyY2VzIjpbInNjdy1zdGVwcGVyLnNjc3MiLCIuLi8uLi8uLi9kaXN0L3Rva2Vucy9zZWdtZW50cy9jb21wLXNjdy1zdGVwcGVyL19kZWZhdWx0LW1peGlucy5zY3NzIiwiLi4vLi4vLi4vZGlzdC90b2tlbnMvc2VnbWVudHMvY29tcC1zY3ctc3RlcHBlci1pY29uL19kZWZhdWx0LWNpcmNsZS1taXhpbnMuc2NzcyIsIi4uLy4uLy4uL2Rpc3QvdG9rZW5zL3NlZ21lbnRzL2NvbXAtc2N3LXN0ZXBwZXItaWNvbi9fc3RhdGUtZm9jdXNlZC1jaXJjbGUtbWl4aW5zLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS0E7RUFDRTs7O0FBR0Y7RUMwQkU7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTs7QUFDQTtFQUNNO0VBQ0E7OztBRGhDUjtFRUhJO0VBRUY7RUFJQTtFQUNBOztBRkFBO0VHUEU7RUFFRjs7O0FIWUE7RUFDRSJ9 */`;var e=class extends a{constructor(){super();this.testThis="dog";this.testState=0;this.contentRef=l();this.example="hello there";this.element="stepper"}static get styles(){return[super.styles,p]}connectedCallback(){super.connectedCallback()}firstUpdated(){this.attachContent()}attachContent(){let t=this.querySelector("#content");this.contentRef.value&&t&&this.contentRef.value.appendChild(t.content.cloneNode(!0))}renderStepItem(t=!1){return c`
|
|
36
|
+
<div class="circle ${t?"focused":""}"></div>
|
|
37
|
+
`}render(){let t;try{t=JSON.parse(this.testThis)}catch(u){console.error(u)}return c`
|
|
38
|
+
<div class="container">
|
|
39
|
+
${this.renderStepItem()}
|
|
40
|
+
${this.renderStepItem(!0)}
|
|
41
|
+
${this.renderStepItem()}
|
|
42
|
+
${(t==null?void 0:t.test)||"no example"}
|
|
43
|
+
<div
|
|
44
|
+
class="body"
|
|
45
|
+
${d(this.contentRef)}>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
`}};r([n({type:String,attribute:"test-this",reflect:!0})],e.prototype,"testThis",2),r([o()],e.prototype,"testState",2),r([s("#myBtn")],e.prototype,"first",2);export{e as a};
|
|
49
|
+
//# sourceMappingURL=chunk.NA2QZFUA.js.map
|
|
Binary file
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/scw-stepper/scss/scw-stepper.scss", "../../src/scw-stepper/ScwStepper.ts"],
|
|
4
|
+
"sourcesContent": ["import {css} from \"lit-element/lit-element.js\";\nexport default css`\n:host {\n display: block;\n}\n\n.container {\n display: flex;\n flex-flow: row nowrap;\n justify-content: flex-start;\n align-items: flex-start;\n padding-left: 0px;\n padding-right: 0px;\n padding-top: 0px;\n padding-bottom: 0px;\n}\n.container > *:not(:last-child) {\n margin-right: calc(var(--scw-spacing-1) * 3.8);\n --margin-right: calc( var( --scw-spacing-1 ) * 3.8 );\n}\n\n.circle {\n background-color: var(--scw-color-grey-092);\n border-radius: 50% 50% 50% 50%;\n width: 10px;\n height: 10px;\n}\n.circle.focused {\n background-color: var(--scw-color-grey-07);\n border-radius: 50% 50% 50% 50%;\n}\n\n.body p {\n font-size: 42px;\n}\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL1VzZXJzL3Njb3R0cm91c2UvV29ya3NwYWNlL3NjdS13ZWItY29tcG9uZW50cy13ZWJzaXRlcy9zY3Utd2ViLWNvbXBvbmVudHMtd2Vic2l0ZXMvc3JjL3Njdy1zdGVwcGVyL3Njc3MiLCJzb3VyY2VzIjpbInNjdy1zdGVwcGVyLnNjc3MiLCIuLi8uLi8uLi9kaXN0L3Rva2Vucy9zZWdtZW50cy9jb21wLXNjdy1zdGVwcGVyL19kZWZhdWx0LW1peGlucy5zY3NzIiwiLi4vLi4vLi4vZGlzdC90b2tlbnMvc2VnbWVudHMvY29tcC1zY3ctc3RlcHBlci1pY29uL19kZWZhdWx0LWNpcmNsZS1taXhpbnMuc2NzcyIsIi4uLy4uLy4uL2Rpc3QvdG9rZW5zL3NlZ21lbnRzL2NvbXAtc2N3LXN0ZXBwZXItaWNvbi9fc3RhdGUtZm9jdXNlZC1jaXJjbGUtbWl4aW5zLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS0E7RUFDRTs7O0FBR0Y7RUMwQkU7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBO0VBQ0E7RUFDQTs7QUFDQTtFQUNNO0VBQ0E7OztBRGhDUjtFRUhJO0VBRUY7RUFJQTtFQUNBOztBRkFBO0VHUEU7RUFFRjs7O0FIWUE7RUFDRSJ9 */`;\n", "import {html} from 'lit';\nimport {property, state, query} from 'lit/decorators.js';\nimport {ref, createRef, Ref} from 'lit/directives/ref.js';\nimport ScwComponent from 'scw-component/ScwComponent';\nimport {Components} from 'utils/enums/Components';\nimport styles from './scss/scw-stepper.scss';\n\n/**\n * ScwStepper\n */\nexport default class ScwStepper extends ScwComponent {\n /**\n * styles\n */\n static get styles() {\n return [\n super.styles,\n styles,\n ];\n }\n\n @property({type: String, attribute: 'test-this', reflect: true})\n testThis = 'dog';\n\n @state()\n testState = 0;\n\n @query('#myBtn')\n first: HTMLDivElement | undefined;\n\n contentRef: Ref<HTMLInputElement> = createRef();\n\n example: string = 'hello there';\n\n /** Constructor */\n constructor() {\n super();\n this.element = Components.stepper;\n }\n\n /** connectedCallback */\n connectedCallback() {\n super.connectedCallback();\n }\n\n /** firstUpdated */\n firstUpdated() {\n this.attachContent();\n }\n\n /** attachContent */\n attachContent() {\n const tmplt = this.querySelector('#content') as HTMLTemplateElement;\n if (this.contentRef.value && tmplt) {\n this.contentRef.value.appendChild(\n tmplt.content.cloneNode(true),\n );\n }\n }\n\n /**\n * renderStepItem\n * @param {boolean} isFocused\n * @return {string}\n */\n renderStepItem(isFocused: boolean = false) {\n return html`\n <div class=\"circle ${isFocused ? 'focused' : ''}\"></div>\n `;\n }\n\n /**\n * render\n * @return {string}\n */\n render() {\n let testThisJSON = undefined;\n try {\n testThisJSON = JSON.parse(this.testThis);\n } catch (err) {\n console.error(err);\n }\n\n return html`\n <div class=\"container\">\n ${this.renderStepItem()}\n ${this.renderStepItem(true)}\n ${this.renderStepItem()}\n ${testThisJSON?.test || 'no example'}\n <div\n class=\"body\"\n ${ref(this.contentRef)}>\n </div>\n </div>\n `;\n }\n}\n"],
|
|
5
|
+
"mappings": "oOACA,IAAOA,EAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;6yBCSf,IAAqBC,EAArB,cAAwCC,CAAa,CAyBnD,aAAc,CACZ,MAAM,EAdN,cAAW,MAGX,eAAY,EAKd,gBAAoCC,EAAU,EAE9C,aAAkB,cAKhB,KAAK,iBACP,CAxBA,WAAW,QAAS,CAClB,MAAO,CACL,MAAM,OACNC,CACF,CACF,CAsBA,mBAAoB,CAClB,MAAM,kBAAkB,CAC1B,CAGA,cAAe,CACb,KAAK,cAAc,CACrB,CAGA,eAAgB,CACd,IAAMC,EAAQ,KAAK,cAAc,UAAU,EACvC,KAAK,WAAW,OAASA,GAC3B,KAAK,WAAW,MAAM,YAClBA,EAAM,QAAQ,UAAU,EAAI,CAChC,CAEJ,CAOA,eAAeC,EAAqB,GAAO,CACzC,OAAOC;AAAA,2BACgBD,EAAY,UAAY;AAAA,KAEjD,CAMA,QAAS,CACP,IAAIE,EACJ,GAAI,CACFA,EAAe,KAAK,MAAM,KAAK,QAAQ,CACzC,OAASC,EAAP,CACA,QAAQ,MAAMA,CAAG,CACnB,CAEA,OAAOF;AAAA;AAAA,UAED,KAAK,eAAe;AAAA,UACpB,KAAK,eAAe,EAAI;AAAA,UACxB,KAAK,eAAe;AAAA,WACpBC,GAAA,YAAAA,EAAc,OAAQ;AAAA;AAAA;AAAA,YAGpBE,EAAI,KAAK,UAAU;AAAA;AAAA;AAAA,KAI7B,CACF,EA1EIC,EAAA,CADDR,EAAS,CAAC,KAAM,OAAQ,UAAW,YAAa,QAAS,EAAI,CAAC,GAX5CF,EAYjB,wBAGAU,EAAA,CADDC,EAAM,GAdYX,EAejB,yBAGAU,EAAA,CADDE,EAAM,QAAQ,GAjBIZ,EAkBjB",
|
|
6
|
+
"names": ["scw_stepper_default", "ScwStepper", "ScwComponent", "e", "scw_stepper_default", "tmplt", "isFocused", "y", "testThisJSON", "err", "n", "__decorateClass", "t", "i"]
|
|
7
|
+
}
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as n}from"./chunk.
|
|
1
|
+
import{a as n}from"./chunk.CATZMLQA.js";import{a as h}from"./chunk.WJ7GGTRH.js";import{a as r,b as c,d as l}from"./chunk.XWFI56OY.js";import{a as e}from"./chunk.3IG37SCP.js";import{a as i}from"./chunk.PKA6D7UK.js";import{b as U,d as v,f as d,g as t}from"./chunk.5YJY6NT6.js";var F={};v(F,{validationWarnings:()=>Q});var Q,g=U(()=>{"use strict";Q={ariaLabelWarning:"link without a label",noIconWarning:"could not find the icon"}});var a=e`
|
|
2
2
|
:host {
|
|
3
3
|
outline: none;
|
|
4
4
|
user-select: none;
|
|
@@ -109,4 +109,4 @@ import{a as n}from"./chunk.MKQHB2CE.js";import{a as h}from"./chunk.WJ7GGTRH.js";
|
|
|
109
109
|
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiL1VzZXJzL3Njb3R0cm91c2UvV29ya3NwYWNlL3NjdS13ZWItY29tcG9uZW50cy13ZWJzaXRlcy9zY3Utd2ViLWNvbXBvbmVudHMtd2Vic2l0ZXMvc3JjL3Njdy1pY29uL3Njc3MiLCJzb3VyY2VzIjpbInNjdy1pY29uLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRTtFQUNBO0VBQ0E7RUFDQTtFQUFhO0VBQ2I7O0FBRUE7RUFDRTtFQUNBO0VBQ0E7RUFDQTs7O0FBSUo7RUFFRTtFQUFhOztBQUViO0VBQ0U7O0FBR0Y7RUFDRTs7QUFFRjtFQUNFOztBQUVGO0VBQ0U7O0FBRUY7RUFDRTs7QUFFRjtBQUFBO0VBRUU7O0FBRUY7RUFDRTs7QUFFRjtFQUNFOztBQUVGO0VBQ0U7O0FBRUY7RUFDRTs7O0FBSUo7RUFDRTs7QUFDQTtFQUNFOzs7QUFJSjtFQUNFO0VBQWE7OztBQUVmO0VBQ0U7RUFBYTs7O0FBRWY7RUFDRTtFQUFhOzs7QUFFZjtFQUNFO0VBQWE7OztBQUVmO0VBQ0U7RUFBYTs7O0FBRWY7RUFDRTtFQUFhOzs7QUFFZjtFQUNFO0VBQWE7OztBQUVmO0VBQ0U7RUFBYTs7O0FBRWY7RUFDRTtFQUFhOzs7QUFFZjtFQUNFO0VBQWMifQ== */`;var{validationWarnings:B}=(g(),d(F)),o=class extends l{constructor(){super();this.size="50";this.colorBackground=!1;this._svgInfo="";this.element="icon"}static get styles(){return[super.styles,a]}set icon(s){let p=this._icon;this._icon=s,this.requestUpdate("icon",p),this.refreshIcon()}get icon(){return this._icon}connectedCallback(){super.connectedCallback()}refreshIcon(){this.clearWarnings(),n(this.icon,s=>{s===!1?this.warn(B.noIconWarning):this._svgInfo=s})}render(){return i`
|
|
110
110
|
${h(this._svgInfo)}
|
|
111
111
|
`}};t([r({type:String,reflect:!0})],o.prototype,"icon",1),t([r({type:String,reflect:!0})],o.prototype,"size",2),t([r({type:Boolean,reflect:!0,attribute:"color-background"})],o.prototype,"colorBackground",2),t([c()],o.prototype,"_svgInfo",2);export{o as a};
|
|
112
|
-
//# sourceMappingURL=chunk.
|
|
112
|
+
//# sourceMappingURL=chunk.NHM3COMD.js.map
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk.
|
|
2
|
-
//# sourceMappingURL=chunk.
|
|
1
|
+
import{a as r}from"./chunk.3SST2ZKP.js";import{a as m}from"./chunk.2T4VPIKP.js";import{a as i}from"./chunk.XWFI56OY.js";import{g as e}from"./chunk.5YJY6NT6.js";var t=class extends r{constructor(){super();this.submitType="submit";this.element="button",this.href="javascript:"}connectedCallback(){super.connectedCallback(),this.addEventListener("click",()=>{this.submitType==="submit"&&m("scw-submit-intent",this)})}};e([i({type:String,reflect:!0,attribute:"submit-type"})],t.prototype,"submitType",2);export{t as a};
|
|
2
|
+
//# sourceMappingURL=chunk.O6LKSGBL.js.map
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as c,b as o}from"./chunk.NBLIIWTN.js";import{a as s}from"./chunk.6JFSOWAB.js";import{a as l}from"./chunk.
|
|
1
|
+
import{a as c,b as o}from"./chunk.NBLIIWTN.js";import{a as s}from"./chunk.6JFSOWAB.js";import{a as l}from"./chunk.XH4BHYNF.js";import{a as e,d as a}from"./chunk.XWFI56OY.js";import{a as r}from"./chunk.3IG37SCP.js";import{g as i}from"./chunk.5YJY6NT6.js";var d=r`
|
|
2
2
|
:host {
|
|
3
3
|
/* scw element */
|
|
4
4
|
position: relative;
|
|
@@ -244,4 +244,4 @@ import{a as c,b as o}from"./chunk.NBLIIWTN.js";import{a as s}from"./chunk.6JFSOW
|
|
|
244
244
|
</div>`:""}`}render(){return this.action==="whole"?this.renderBody():o`
|
|
245
245
|
${this.renderBody()}
|
|
246
246
|
${this.renderButton()}`}};i([e()],t.prototype,"src",2),i([e()],t.prototype,"srcset",2),i([e()],t.prototype,"alt",2),i([e()],t.prototype,"heading",2),i([e()],t.prototype,"superHeading",2),i([e()],t.prototype,"description",2),i([e()],t.prototype,"linkLabel",2),i([e({type:Boolean})],t.prototype,"preload",2),i([e({type:String,reflect:!0})],t.prototype,"size",2),i([e({type:String,reflect:!0})],t.prototype,"action",2);export{t as a};
|
|
247
|
-
//# sourceMappingURL=chunk.
|
|
247
|
+
//# sourceMappingURL=chunk.P4Y7QFYU.js.map
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as y,b as g,c as b}from"./chunk.UXIAMI3F.js";import{a as f}from"./chunk.RSR7WC4R.js";import{c as d,e as w,f as h}from"./chunk.PKA6D7UK.js";var{D:P,V:$,I:x,H:m,W:T}=h,v=(a,s,i={})=>{if(s._$litPart$!==void 0)throw Error("container already contains a live render");let o,r,n=[],e=document.createTreeWalker(s,NodeFilter.SHOW_COMMENT,null,!1),t;for(;(t=e.nextNode())!==null;){let c=t.data;if(c.startsWith("lit-part")){if(n.length===0&&o!==void 0)throw Error("there must be only one root part per container");r=_(a,t,n,i),o!=null||(o=r)}else if(c.startsWith("lit-node"))I(t,n,i);else if(c.startsWith("/lit-part")){if(n.length===1&&r!==o)throw Error("internal error");r=C(t,r,n)}}console.assert(o!==void 0,"there should be exactly one root part in a render container"),s._$litPart$=o},_=(a,s,i,o)=>{let r,n;if(i.length===0)n=new m(s,null,void 0,o),r=a;else{let e=i[i.length-1];if(e.type==="template-instance")n=new m(s,null,e.instance,o),e.instance.v.push(n),r=e.result.values[e.instancePartIndex++],e.templatePartIndex++;else if(e.type==="iterable"){n=new m(s,null,e.part,o);let t=e.iterator.next();if(t.done)throw r=void 0,e.done=!0,Error("Unhandled shorter than expected iterable");r=t.value,e.part._$AH.push(n)}else n=new m(s,null,e.part,o)}if(r=x(n,r),r===d)i.push({part:n,type:"leaf"});else if(y(r))i.push({part:n,type:"leaf"}),n._$AH=r;else if(g(r)){let e="lit-part "+R(r);if(s.data!==e)throw Error("Hydration value mismatch: Unexpected TemplateResult rendered to part");{let t=m.prototype._$AC(r),c=new P(t,n);i.push({type:"template-instance",instance:c,part:n,templatePartIndex:0,instancePartIndex:0,result:r}),n._$AH=c}}else $(r)?(i.push({part:n,type:"iterable",value:r,iterator:r[Symbol.iterator](),done:!1}),n._$AH=[]):(i.push({part:n,type:"leaf"}),n._$AH=r==null?"":r);return n},C=(a,s,i)=>{if(s===void 0)throw Error("unbalanced part marker");s._$AB=a;let o=i.pop();if(o.type==="iterable"&&!o.iterator.next().done)throw Error("unexpected longer than expected iterable");if(i.length>0)return i[i.length-1].part},I=(a,s,i)=>{var o;let r=/lit-node (\d+)/.exec(a.data),n=parseInt(r[1]),e=(o=a.previousElementSibling)!==null&&o!==void 0?o:a.parentElement;if(e===null)throw Error("could not find node for attribute parts");e.removeAttribute("defer-hydration");let t=s[s.length-1];if(t.type!=="template-instance")throw Error("internal error");{let c=t.instance;for(;;){let l=c._$AD.parts[t.templatePartIndex];if(l===void 0||l.type!==f.ATTRIBUTE&&l.type!==f.ELEMENT||l.index!==n)break;if(l.type===f.ATTRIBUTE){let p=new l.ctor(e,l.name,l.strings,t.instance,i),u=b(p)?t.result.values[t.instancePartIndex]:t.result.values,E=!(p.type===f.EVENT||p.type===f.PROPERTY);p._$AI(u,p,t.instancePartIndex,E),t.instancePartIndex+=l.strings.length-1,c.v.push(p)}else{let p=new T(e,t.instance,i);x(p,t.result.values[t.instancePartIndex++]),c.v.push(p)}t.templatePartIndex++}}},R=a=>{let s=new Uint32Array(2).fill(5381);for(let i of a.strings)for(let o=0;o<i.length;o++)s[o%2]=33*s[o%2]^i.charCodeAt(o);return btoa(String.fromCharCode(...new Uint8Array(s.buffer)))};globalThis.litElementHydrateSupport=({LitElement:a})=>{let s=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(a),"observedAttributes").get;Object.defineProperty(a,"observedAttributes",{get(){return[...s.call(this),"defer-hydration"]}});let i=a.prototype.attributeChangedCallback;a.prototype.attributeChangedCallback=function(e,t,c){e==="defer-hydration"&&c===null&&o.call(this),i.call(this,e,t,c)};let o=a.prototype.connectedCallback;a.prototype.connectedCallback=function(){this.hasAttribute("defer-hydration")||o.call(this)};let r=a.prototype.createRenderRoot;a.prototype.createRenderRoot=function(){return this.shadowRoot?(this._$AG=!0,this.shadowRoot):r.call(this)};let n=Object.getPrototypeOf(a.prototype).update;a.prototype.update=function(e){let t=this.render();n.call(this,e),this._$AG?(this._$AG=!1,v(t,this.renderRoot,this.renderOptions)):w(t,this.renderRoot,this.renderOptions)}};var A={},k;async function B(a={}){let{components:s=!1,suffix:i=!1}=a;k={suffix:i};let o=!s,r=i?`-${i}`:"",n=[];function e(c,l){n.push((async()=>{let p=`${c}${r}`;if(!A[p]){A[p]=!0;try{window.customElements.define(p,(await l).default)}catch(u){console.error(p,u)}}})())}function t(c){if(o)return!0;if(Array.isArray(s))return s?s.includes(c):!1}return t("scw-component")&&e("scw-component",import("../scw-component/ScwComponent.js")),t("scw-form-component")&&e("scw-form-component",import("../scw-form-component/scw-form-component.js")),t("scw-card")&&e("scw-card",import("../scw-card/ScwCard.js")),t("scw-input-field")&&e("scw-input-field",import("../scw-input-field/scw-input-field.js")),t("scw-input-layout")&&e("scw-input-layout",import("../scw-input-layout/scw-input-layout.js")),t("scw-link")&&e("scw-link",import("../scw-link/ScwLink.js")),t("scw-button")&&e("scw-button",import("../scw-button/ScwButton.js")),t("scw-menu")&&e("scw-menu",import("../scw-menu/ScwMenu.js")),t("scw-menu-item")&&e("scw-menu-item",import("../scw-menu-item/ScwMenuItem.js")),t("scw-icon")&&e("scw-icon",import("../scw-icon/ScwIcon.js")),t("scw-heading")&&e("scw-heading",import("../scw-heading/ScwHeading.js")),t("scw-image")&&e("scw-image",import("../scw-image/ScwImage.js")),t("scw-input")&&e("scw-input",import("../scw-input/scw-input.js")),t("scw-single-input")&&e("scw-single-input",import("../scw-single-input/scw-single-input.js")),t("scw-single-input-layout")&&e("scw-single-input-layout",import("../scw-single-input-layout/scw-single-input-layout.js")),t("scw-validation")&&e("scw-validation",import("../scw-validation/scw-validation.js")),t("scw-validate")&&e("scw-validate",import("../scw-validate/scw-validate.js")),t("scw-flex-h-component")&&e("scw-flex-h-component",import("../scw-flex-h-component/scw-flex-h-component.js")),t("scw-flex-v-component")&&e("scw-flex-v-component",import("../scw-flex-v-component/scw-flex-v-component.js")),t("scw-stack-component")&&e("scw-stack-component",import("../scw-stack-component/scw-stack-component.js")),t("scw-layout-component")&&e("scw-layout-component",import("../scw-layout-component/scw-layout-component.js")),t("scw-element-component")&&e("scw-element-component",import("../scw-element-component/scw-element-component.js")),t("scw-center-component")&&e("scw-center-component",import("../scw-center-component/ScwCenterComponent.js")),t("scw-float-component")&&e("scw-float-component",import("../scw-float-component/scw-float-component.js")),t("scw-pane-component")&&e("scw-pane-component",import("../scw-pane-component/scw-pane-component.js")),t("scw-form")&&e("scw-form",import("../scw-form/scw-form.js")),t("scw-page-alert")&&e("scw-page-alert",import("../scw-page-alert/scw-page-alert.js")),t("scw-link-base")&&e("scw-link-base",import("../scw-link-base/ScwLinkBase.js")),t("scw-textarea")&&e("scw-textarea",import("../scw-textarea/scw-textarea.js")),t("scw-select")&&e("scw-select",import("../scw-select/scw-select.js")),t("scw-alert")&&e("scw-alert",import("../scw-alert/ScwAlert.js")),Promise.all(n)}export{k as a,B as b};
|
|
1
|
+
import{a as y,b as g,c as b}from"./chunk.UXIAMI3F.js";import{a as f}from"./chunk.RSR7WC4R.js";import{c as d,e as w,f as h}from"./chunk.PKA6D7UK.js";var{D:P,V:$,I:x,H:m,W:T}=h,v=(a,s,i={})=>{if(s._$litPart$!==void 0)throw Error("container already contains a live render");let o,r,n=[],e=document.createTreeWalker(s,NodeFilter.SHOW_COMMENT,null,!1),t;for(;(t=e.nextNode())!==null;){let c=t.data;if(c.startsWith("lit-part")){if(n.length===0&&o!==void 0)throw Error("there must be only one root part per container");r=_(a,t,n,i),o!=null||(o=r)}else if(c.startsWith("lit-node"))I(t,n,i);else if(c.startsWith("/lit-part")){if(n.length===1&&r!==o)throw Error("internal error");r=C(t,r,n)}}console.assert(o!==void 0,"there should be exactly one root part in a render container"),s._$litPart$=o},_=(a,s,i,o)=>{let r,n;if(i.length===0)n=new m(s,null,void 0,o),r=a;else{let e=i[i.length-1];if(e.type==="template-instance")n=new m(s,null,e.instance,o),e.instance.v.push(n),r=e.result.values[e.instancePartIndex++],e.templatePartIndex++;else if(e.type==="iterable"){n=new m(s,null,e.part,o);let t=e.iterator.next();if(t.done)throw r=void 0,e.done=!0,Error("Unhandled shorter than expected iterable");r=t.value,e.part._$AH.push(n)}else n=new m(s,null,e.part,o)}if(r=x(n,r),r===d)i.push({part:n,type:"leaf"});else if(y(r))i.push({part:n,type:"leaf"}),n._$AH=r;else if(g(r)){let e="lit-part "+R(r);if(s.data!==e)throw Error("Hydration value mismatch: Unexpected TemplateResult rendered to part");{let t=m.prototype._$AC(r),c=new P(t,n);i.push({type:"template-instance",instance:c,part:n,templatePartIndex:0,instancePartIndex:0,result:r}),n._$AH=c}}else $(r)?(i.push({part:n,type:"iterable",value:r,iterator:r[Symbol.iterator](),done:!1}),n._$AH=[]):(i.push({part:n,type:"leaf"}),n._$AH=r==null?"":r);return n},C=(a,s,i)=>{if(s===void 0)throw Error("unbalanced part marker");s._$AB=a;let o=i.pop();if(o.type==="iterable"&&!o.iterator.next().done)throw Error("unexpected longer than expected iterable");if(i.length>0)return i[i.length-1].part},I=(a,s,i)=>{var o;let r=/lit-node (\d+)/.exec(a.data),n=parseInt(r[1]),e=(o=a.previousElementSibling)!==null&&o!==void 0?o:a.parentElement;if(e===null)throw Error("could not find node for attribute parts");e.removeAttribute("defer-hydration");let t=s[s.length-1];if(t.type!=="template-instance")throw Error("internal error");{let c=t.instance;for(;;){let l=c._$AD.parts[t.templatePartIndex];if(l===void 0||l.type!==f.ATTRIBUTE&&l.type!==f.ELEMENT||l.index!==n)break;if(l.type===f.ATTRIBUTE){let p=new l.ctor(e,l.name,l.strings,t.instance,i),u=b(p)?t.result.values[t.instancePartIndex]:t.result.values,E=!(p.type===f.EVENT||p.type===f.PROPERTY);p._$AI(u,p,t.instancePartIndex,E),t.instancePartIndex+=l.strings.length-1,c.v.push(p)}else{let p=new T(e,t.instance,i);x(p,t.result.values[t.instancePartIndex++]),c.v.push(p)}t.templatePartIndex++}}},R=a=>{let s=new Uint32Array(2).fill(5381);for(let i of a.strings)for(let o=0;o<i.length;o++)s[o%2]=33*s[o%2]^i.charCodeAt(o);return btoa(String.fromCharCode(...new Uint8Array(s.buffer)))};globalThis.litElementHydrateSupport=({LitElement:a})=>{let s=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(a),"observedAttributes").get;Object.defineProperty(a,"observedAttributes",{get(){return[...s.call(this),"defer-hydration"]}});let i=a.prototype.attributeChangedCallback;a.prototype.attributeChangedCallback=function(e,t,c){e==="defer-hydration"&&c===null&&o.call(this),i.call(this,e,t,c)};let o=a.prototype.connectedCallback;a.prototype.connectedCallback=function(){this.hasAttribute("defer-hydration")||o.call(this)};let r=a.prototype.createRenderRoot;a.prototype.createRenderRoot=function(){return this.shadowRoot?(this._$AG=!0,this.shadowRoot):r.call(this)};let n=Object.getPrototypeOf(a.prototype).update;a.prototype.update=function(e){let t=this.render();n.call(this,e),this._$AG?(this._$AG=!1,v(t,this.renderRoot,this.renderOptions)):w(t,this.renderRoot,this.renderOptions)}};var A={},k;async function B(a={}){let{components:s=!1,suffix:i=!1}=a;k={suffix:i};let o=!s,r=i?`-${i}`:"",n=[];function e(c,l){n.push((async()=>{let p=`${c}${r}`;if(!A[p]){A[p]=!0;try{window.customElements.define(p,(await l).default)}catch(u){console.error(p,u)}}})())}function t(c){if(o)return!0;if(Array.isArray(s))return s?s.includes(c):!1}return t("scw-component")&&e("scw-component",import("../scw-component/ScwComponent.js")),t("scw-form-component")&&e("scw-form-component",import("../scw-form-component/scw-form-component.js")),t("scw-card")&&e("scw-card",import("../scw-card/ScwCard.js")),t("scw-input-field")&&e("scw-input-field",import("../scw-input-field/scw-input-field.js")),t("scw-input-layout")&&e("scw-input-layout",import("../scw-input-layout/scw-input-layout.js")),t("scw-link")&&e("scw-link",import("../scw-link/ScwLink.js")),t("scw-button")&&e("scw-button",import("../scw-button/ScwButton.js")),t("scw-menu")&&e("scw-menu",import("../scw-menu/ScwMenu.js")),t("scw-menu-item")&&e("scw-menu-item",import("../scw-menu-item/ScwMenuItem.js")),t("scw-icon")&&e("scw-icon",import("../scw-icon/ScwIcon.js")),t("scw-heading")&&e("scw-heading",import("../scw-heading/ScwHeading.js")),t("scw-image")&&e("scw-image",import("../scw-image/ScwImage.js")),t("scw-input")&&e("scw-input",import("../scw-input/scw-input.js")),t("scw-single-input")&&e("scw-single-input",import("../scw-single-input/scw-single-input.js")),t("scw-single-input-layout")&&e("scw-single-input-layout",import("../scw-single-input-layout/scw-single-input-layout.js")),t("scw-validation")&&e("scw-validation",import("../scw-validation/scw-validation.js")),t("scw-validate")&&e("scw-validate",import("../scw-validate/scw-validate.js")),t("scw-flex-h-component")&&e("scw-flex-h-component",import("../scw-flex-h-component/scw-flex-h-component.js")),t("scw-flex-v-component")&&e("scw-flex-v-component",import("../scw-flex-v-component/scw-flex-v-component.js")),t("scw-stack-component")&&e("scw-stack-component",import("../scw-stack-component/scw-stack-component.js")),t("scw-layout-component")&&e("scw-layout-component",import("../scw-layout-component/scw-layout-component.js")),t("scw-element-component")&&e("scw-element-component",import("../scw-element-component/scw-element-component.js")),t("scw-center-component")&&e("scw-center-component",import("../scw-center-component/ScwCenterComponent.js")),t("scw-float-component")&&e("scw-float-component",import("../scw-float-component/scw-float-component.js")),t("scw-pane-component")&&e("scw-pane-component",import("../scw-pane-component/scw-pane-component.js")),t("scw-form")&&e("scw-form",import("../scw-form/scw-form.js")),t("scw-page-alert")&&e("scw-page-alert",import("../scw-page-alert/scw-page-alert.js")),t("scw-link-base")&&e("scw-link-base",import("../scw-link-base/ScwLinkBase.js")),t("scw-textarea")&&e("scw-textarea",import("../scw-textarea/scw-textarea.js")),t("scw-select")&&e("scw-select",import("../scw-select/scw-select.js")),t("scw-alert")&&e("scw-alert",import("../scw-alert/ScwAlert.js")),t("scw-stepper")&&e("scw-stepper",import("../scw-stepper/ScwStepper.js")),Promise.all(n)}export{k as a,B as b};
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
@@ -9,4 +9,4 @@ import{a as y,b as g,c as b}from"./chunk.UXIAMI3F.js";import{a as f}from"./chunk
|
|
|
9
9
|
* Copyright 2019 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
11
|
*/
|
|
12
|
-
//# sourceMappingURL=chunk.
|
|
12
|
+
//# sourceMappingURL=chunk.PEKTPPGZ.js.map
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../node_modules/lit-html/src/experimental-hydrate.ts", "../../node_modules/lit-element/src/experimental-hydrate-support.ts", "../../src/scw.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport type {TemplateResult} from './lit-html.js';\n\nimport {noChange, RenderOptions, _$LH} from './lit-html.js';\nimport {AttributePartInfo, PartType} from './directive.js';\nimport {\n isPrimitive,\n isSingleExpression,\n isTemplateResult,\n} from './directive-helpers.js';\n\nconst {\n _TemplateInstance: TemplateInstance,\n _isIterable: isIterable,\n _resolveDirective: resolveDirective,\n _ChildPart: ChildPart,\n _ElementPart: ElementPart,\n} = _$LH;\n\ntype ChildPart = InstanceType<typeof ChildPart>;\ntype TemplateInstance = InstanceType<typeof TemplateInstance>;\n\n/**\n * Information needed to rehydrate a single TemplateResult.\n */\ntype ChildPartState =\n | {\n type: 'leaf';\n /** The ChildPart that the result is rendered to */\n part: ChildPart;\n }\n | {\n type: 'iterable';\n /** The ChildPart that the result is rendered to */\n part: ChildPart;\n value: Iterable<unknown>;\n iterator: Iterator<unknown>;\n done: boolean;\n }\n | {\n type: 'template-instance';\n /** The ChildPart that the result is rendered to */\n part: ChildPart;\n\n result: TemplateResult;\n\n /** The TemplateInstance created from the TemplateResult */\n instance: TemplateInstance;\n\n /**\n * The index of the next Template part to be hydrated. This is mutable and\n * updated as the tree walk discovers new part markers at the right level in\n * the template instance tree. Note there is only one Template part per\n * attribute with (one or more) bindings.\n */\n templatePartIndex: number;\n\n /**\n * The index of the next TemplateInstance part to be hydrated. This is used\n * to retrieve the value from the TemplateResult and initialize the\n * TemplateInstance parts' values for dirty-checking on first render.\n */\n instancePartIndex: number;\n };\n\n/**\n * hydrate() operates on a container with server-side rendered content and\n * restores the client side data structures needed for lit-html updates such as\n * TemplateInstances and Parts. After calling `hydrate`, lit-html will behave as\n * if it initially rendered the DOM, and any subsequent updates will update\n * efficiently, the same as if lit-html had rendered the DOM on the client.\n *\n * hydrate() must be called on DOM that adheres the to lit-ssr structure for\n * parts. ChildParts must be represented with both a start and end comment\n * marker, and ChildParts that contain a TemplateInstance must have the template\n * digest written into the comment data.\n *\n * Since render() encloses its output in a ChildPart, there must always be a root\n * ChildPart.\n *\n * Example (using for # ... for annotations in HTML)\n *\n * Given this input:\n *\n * html`<div class=${x}>${y}</div>`\n *\n * The SSR DOM is:\n *\n * <!--lit-part AEmR7W+R0Ak=--> # Start marker for the root ChildPart created\n * # by render(). Includes the digest of the\n * # template\n * <div class=\"TEST_X\">\n * <!--lit-node 0--> # Indicates there are attribute bindings here\n * # The number is the depth-first index of the parent\n * # node in the template.\n * <!--lit-part--> # Start marker for the ${x} expression\n * TEST_Y\n * <!--/lit-part--> # End marker for the ${x} expression\n * </div>\n *\n * <!--/lit-part--> # End marker for the root ChildPart\n *\n * @param rootValue\n * @param container\n * @param userOptions\n */\nexport const hydrate = (\n rootValue: unknown,\n container: Element | DocumentFragment,\n options: Partial<RenderOptions> = {}\n) => {\n // TODO(kschaaf): Do we need a helper for _$litPart$ (\"part for node\")?\n // This property needs to remain unminified.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if ((container as any)['_$litPart$'] !== undefined) {\n throw new Error('container already contains a live render');\n }\n\n // Since render() creates a ChildPart to render into, we'll always have\n // exactly one root part. We need to hold a reference to it so we can set\n // it in the parts cache.\n let rootPart: ChildPart | undefined = undefined;\n\n // When we are in-between ChildPart markers, this is the current ChildPart.\n // It's needed to be able to set the ChildPart's endNode when we see a\n // close marker\n let currentChildPart: ChildPart | undefined = undefined;\n\n // Used to remember parent template state as we recurse into nested\n // templates\n const stack: Array<ChildPartState> = [];\n\n const walker = document.createTreeWalker(\n container,\n NodeFilter.SHOW_COMMENT,\n null,\n false\n );\n let marker: Comment | null;\n\n // Walk the DOM looking for part marker comments\n while ((marker = walker.nextNode() as Comment | null) !== null) {\n const markerText = marker.data;\n if (markerText.startsWith('lit-part')) {\n if (stack.length === 0 && rootPart !== undefined) {\n throw new Error('there must be only one root part per container');\n }\n // Create a new ChildPart and push it onto the stack\n currentChildPart = openChildPart(rootValue, marker, stack, options);\n rootPart ??= currentChildPart;\n } else if (markerText.startsWith('lit-node')) {\n // Create and hydrate attribute parts into the current ChildPart on the\n // stack\n createAttributeParts(marker, stack, options);\n } else if (markerText.startsWith('/lit-part')) {\n // Close the current ChildPart, and pop the previous one off the stack\n if (stack.length === 1 && currentChildPart !== rootPart) {\n throw new Error('internal error');\n }\n currentChildPart = closeChildPart(marker, currentChildPart, stack);\n }\n }\n console.assert(\n rootPart !== undefined,\n 'there should be exactly one root part in a render container'\n );\n // This property needs to remain unminified.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (container as any)['_$litPart$'] = rootPart;\n};\n\nconst openChildPart = (\n rootValue: unknown,\n marker: Comment,\n stack: Array<ChildPartState>,\n options: RenderOptions\n) => {\n let value: unknown;\n // We know the startNode now. We'll know the endNode when we get to\n // the matching marker and set it in closeChildPart()\n // TODO(kschaaf): Current constructor takes both nodes\n let part;\n if (stack.length === 0) {\n part = new ChildPart(marker, null, undefined, options);\n value = rootValue;\n } else {\n const state = stack[stack.length - 1];\n if (state.type === 'template-instance') {\n part = new ChildPart(marker, null, state.instance, options);\n state.instance._parts.push(part);\n value = state.result.values[state.instancePartIndex++];\n state.templatePartIndex++;\n } else if (state.type === 'iterable') {\n part = new ChildPart(marker, null, state.part, options);\n const result = state.iterator.next();\n if (result.done) {\n value = undefined;\n state.done = true;\n throw new Error('Unhandled shorter than expected iterable');\n } else {\n value = result.value;\n }\n (state.part._$committedValue as Array<ChildPart>).push(part);\n } else {\n // state.type === 'leaf'\n // TODO(kschaaf): This is unexpected, and likely a result of a primitive\n // been rendered on the client when a TemplateResult was rendered on the\n // server; this part will be hydrated but not used. We can detect it, but\n // we need to decide what to do in this case. Note that this part won't be\n // retained by any parent TemplateInstance, since a primitive had been\n // rendered in its place.\n // https://github.com/lit/lit/issues/1434\n // throw new Error('Hydration value mismatch: Found a TemplateInstance' +\n // 'where a leaf value was expected');\n part = new ChildPart(marker, null, state.part, options);\n }\n }\n\n // Initialize the ChildPart state depending on the type of value and push\n // it onto the stack. This logic closely follows the ChildPart commit()\n // cascade order:\n // 1. directive\n // 2. noChange\n // 3. primitive (note strings must be handled before iterables, since they\n // are iterable)\n // 4. TemplateResult\n // 5. Node (not yet implemented, but fallback handling is fine)\n // 6. Iterable\n // 7. nothing (handled in fallback)\n // 8. Fallback for everything else\n value = resolveDirective(part, value);\n if (value === noChange) {\n stack.push({part, type: 'leaf'});\n } else if (isPrimitive(value)) {\n stack.push({part, type: 'leaf'});\n part._$committedValue = value;\n // TODO(kschaaf): We can detect when a primitive is being hydrated on the\n // client where a TemplateResult was rendered on the server, but we need to\n // decide on a strategy for what to do next.\n // https://github.com/lit/lit/issues/1434\n // if (marker.data !== 'lit-part') {\n // throw new Error('Hydration value mismatch: Primitive found where TemplateResult expected');\n // }\n } else if (isTemplateResult(value)) {\n // Check for a template result digest\n const markerWithDigest = `lit-part ${digestForTemplateResult(value)}`;\n if (marker.data === markerWithDigest) {\n const template = ChildPart.prototype._$getTemplate(value);\n const instance = new TemplateInstance(template, part);\n stack.push({\n type: 'template-instance',\n instance,\n part,\n templatePartIndex: 0,\n instancePartIndex: 0,\n result: value,\n });\n // For TemplateResult values, we set the part value to the\n // generated TemplateInstance\n part._$committedValue = instance;\n } else {\n // TODO: if this isn't the server-rendered template, do we\n // need to stop hydrating this subtree? Clear it? Add tests.\n throw new Error(\n 'Hydration value mismatch: Unexpected TemplateResult rendered to part'\n );\n }\n } else if (isIterable(value)) {\n // currentChildPart.value will contain an array of ChildParts\n stack.push({\n part: part,\n type: 'iterable',\n value,\n iterator: value[Symbol.iterator](),\n done: false,\n });\n part._$committedValue = [];\n } else {\n // Fallback for everything else (nothing, Objects, Functions,\n // etc.): we just initialize the part's value\n // Note that `Node` value types are not currently supported during\n // SSR, so that part of the cascade is missing.\n stack.push({part: part, type: 'leaf'});\n part._$committedValue = value == null ? '' : value;\n }\n return part;\n};\n\nconst closeChildPart = (\n marker: Comment,\n part: ChildPart | undefined,\n stack: Array<ChildPartState>\n): ChildPart | undefined => {\n if (part === undefined) {\n throw new Error('unbalanced part marker');\n }\n\n part._$endNode = marker;\n\n const currentState = stack.pop()!;\n\n if (currentState.type === 'iterable') {\n if (!currentState.iterator.next().done) {\n throw new Error('unexpected longer than expected iterable');\n }\n }\n\n if (stack.length > 0) {\n const state = stack[stack.length - 1];\n return state.part;\n } else {\n return undefined;\n }\n};\n\nconst createAttributeParts = (\n comment: Comment,\n stack: Array<ChildPartState>,\n options: RenderOptions\n) => {\n // Get the nodeIndex from DOM. We're only using this for an integrity\n // check right now, we might not need it.\n const match = /lit-node (\\d+)/.exec(comment.data)!;\n const nodeIndex = parseInt(match[1]);\n\n // For void elements, the node the comment was referring to will be\n // the previousSibling; for non-void elements, the comment is guaranteed\n // to be the first child of the element (i.e. it won't have a previousSibling\n // meaning it should use the parentElement)\n const node = comment.previousElementSibling ?? comment.parentElement;\n if (node === null) {\n throw new Error('could not find node for attribute parts');\n }\n // Remove `defer-hydration` attribute, if any\n node.removeAttribute('defer-hydration');\n\n const state = stack[stack.length - 1];\n if (state.type === 'template-instance') {\n const instance = state.instance;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n // If the next template part is in attribute-position on the current node,\n // create the instance part for it and prime its state\n const templatePart = instance._$template.parts[state.templatePartIndex];\n if (\n templatePart === undefined ||\n (templatePart.type !== PartType.ATTRIBUTE &&\n templatePart.type !== PartType.ELEMENT) ||\n templatePart.index !== nodeIndex\n ) {\n break;\n }\n\n if (templatePart.type === PartType.ATTRIBUTE) {\n // The instance part is created based on the constructor saved in the\n // template part\n const instancePart = new templatePart.ctor(\n node as HTMLElement,\n templatePart.name,\n templatePart.strings,\n state.instance,\n options\n );\n\n const value = isSingleExpression(\n instancePart as unknown as AttributePartInfo\n )\n ? state.result.values[state.instancePartIndex]\n : state.result.values;\n\n // Setting the attribute value primes committed value with the resolved\n // directive value; we only then commit that value for event/property\n // parts since those were not serialized, and pass `noCommit` for the\n // others to avoid perf impact of touching the DOM unnecessarily\n const noCommit = !(\n instancePart.type === PartType.EVENT ||\n instancePart.type === PartType.PROPERTY\n );\n instancePart._$setValue(\n value,\n instancePart,\n state.instancePartIndex,\n noCommit\n );\n state.instancePartIndex += templatePart.strings.length - 1;\n instance._parts.push(instancePart);\n } else {\n // templatePart.type === PartType.ELEMENT\n const instancePart = new ElementPart(node, state.instance, options);\n resolveDirective(\n instancePart,\n state.result.values[state.instancePartIndex++]\n );\n instance._parts.push(instancePart);\n }\n state.templatePartIndex++;\n }\n } else {\n throw new Error('internal error');\n }\n};\n\n// Number of 32 bit elements to use to create template digests\nconst digestSize = 2;\n// We need to specify a digest to use across rendering environments. This is a\n// simple digest build from a DJB2-ish hash modified from:\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\n// It has been changed to an array of hashes to add additional bits.\n// Goals:\n// - Extremely low collision rate. We may not be able to detect collisions.\n// - Extremely fast.\n// - Extremely small code size.\n// - Safe to include in HTML comment text or attribute value.\n// - Easily specifiable and implementable in multiple languages.\n// We don't care about cryptographic suitability.\nexport const digestForTemplateResult = (templateResult: TemplateResult) => {\n const hashes = new Uint32Array(digestSize).fill(5381);\n\n for (const s of templateResult.strings) {\n for (let i = 0; i < s.length; i++) {\n hashes[i % digestSize] = (hashes[i % digestSize] * 33) ^ s.charCodeAt(i);\n }\n }\n return btoa(String.fromCharCode(...new Uint8Array(hashes.buffer)));\n};\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * LitElement support for hydration of content rendered using lit-ssr.\n *\n * @packageDocumentation\n */\n\nimport type {PropertyValues} from '@lit/reactive-element';\nimport {render, RenderOptions} from 'lit-html';\nimport {hydrate} from 'lit-html/experimental-hydrate.js';\n\ninterface PatchableLitElement extends HTMLElement {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-misused-new\n new (...args: any[]): PatchableLitElement;\n enableUpdating(requestedUpdate?: boolean): void;\n createRenderRoot(): Element | ShadowRoot;\n renderRoot: HTMLElement | DocumentFragment;\n render(): unknown;\n renderOptions: RenderOptions;\n _$needsHydration: boolean;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nglobalThis.litElementHydrateSupport = ({\n LitElement,\n}: {\n LitElement: PatchableLitElement;\n}) => {\n const observedAttributes = Object.getOwnPropertyDescriptor(\n Object.getPrototypeOf(LitElement),\n 'observedAttributes'\n )!.get!;\n\n // Add `defer-hydration` to observedAttributes\n Object.defineProperty(LitElement, 'observedAttributes', {\n get() {\n return [...observedAttributes.call(this), 'defer-hydration'];\n },\n });\n\n // Enable element when 'defer-hydration' attribute is removed by calling the\n // super.connectedCallback()\n const attributeChangedCallback =\n LitElement.prototype.attributeChangedCallback;\n LitElement.prototype.attributeChangedCallback = function (\n name: string,\n old: string | null,\n value: string | null\n ) {\n if (name === 'defer-hydration' && value === null) {\n connectedCallback.call(this);\n }\n attributeChangedCallback.call(this, name, old, value);\n };\n\n // Override `connectedCallback` to capture whether we need hydration, and\n // defer `super.connectedCallback()` if the 'defer-hydration' attribute is set\n const connectedCallback = LitElement.prototype.connectedCallback;\n LitElement.prototype.connectedCallback = function (\n this: PatchableLitElement\n ) {\n // If the outer scope of this element has not yet been hydrated, wait until\n // 'defer-hydration' attribute has been removed to enable\n if (!this.hasAttribute('defer-hydration')) {\n connectedCallback.call(this);\n }\n };\n\n // If we've been server-side rendered, just return `this.shadowRoot`, don't\n // call the base implementation, which would also adopt styles (for now)\n const createRenderRoot = LitElement.prototype.createRenderRoot;\n LitElement.prototype.createRenderRoot = function (this: PatchableLitElement) {\n if (this.shadowRoot) {\n this._$needsHydration = true;\n return this.shadowRoot;\n } else {\n return createRenderRoot.call(this);\n }\n };\n\n // Hydrate on first update when needed\n const update = Object.getPrototypeOf(LitElement.prototype).update;\n LitElement.prototype.update = function (\n this: PatchableLitElement,\n changedProperties: PropertyValues\n ) {\n const value = this.render();\n // Since this is a patch, we can't call super.update(), so we capture\n // it off the proto chain and call it instead\n update.call(this, changedProperties);\n if (this._$needsHydration) {\n this._$needsHydration = false;\n hydrate(value, this.renderRoot, this.renderOptions);\n } else {\n render(value, this.renderRoot, this.renderOptions);\n }\n };\n};\n", "import 'lit-element/experimental-hydrate-support.js';\n\nconst registeredComponents : {\n [key: string]: true;\n} = {};\n\nexport let config : {\n suffix : string | false,\n};\n\n/**\n * Define Components\n * Gotchas:\n * - can't have two runtimes on same page, so need root to be unversioned and\n * child versioned (from same url)\n * - b/c the comp classes can only be registered once. The child should\n * always be bundled.\n * @param {object} args\n * @return {void}\n */\nexport async function defineComponents(\n args : {\n components?: string[],\n suffix?: string,\n } = {},\n) {\n // defaults to a runtime config w/ all comps, no suffix, and assets runtime.\n const {\n components = false,\n suffix = false,\n } = args;\n\n // Global Config\n config = {\n suffix,\n };\n\n const allComponents = components ? false : true;\n\n const suffixFinal = suffix ? `-${suffix}` : '';\n const promiseArr: Promise<void>[] = [];\n\n /**\n * Add to a promise\n * @param {string} compStr\n * @param {any} importCall\n */\n function addToPromise(compStr: string, importCall: any) {\n promiseArr.push((async () => {\n const compName = `${compStr}${suffixFinal}`;\n // avoid name dups (doesn't catch class dups!!!!)\n if ( !registeredComponents[compName] ) {\n registeredComponents[compName] = true;\n try {\n window.customElements.define(\n compName,\n (await importCall).default,\n );\n } catch (error) {\n console.error( compName, error );\n }\n }\n })());\n }\n\n /**\n * include\n * @argument {string} compStr\n * @return {boolean}\n */\n function include(compStr: string) {\n if (allComponents) return true;\n if (Array.isArray( components) ) {\n return components ? components.includes(compStr) : false;\n }\n }\n\n // need the import to be picked up by esbuild...\n if (include('scw-component')) {\n addToPromise('scw-component',\n import(`./scw-component/ScwComponent`));\n }\n if (include('scw-form-component')) {\n addToPromise('scw-form-component',\n import(`./scw-form-component/scw-form-component`) );\n }\n if (include('scw-card')) {\n addToPromise('scw-card',\n import(`./scw-card/ScwCard`));\n }\n if (include('scw-input-field')) {\n addToPromise('scw-input-field',\n import(`./scw-input-field/scw-input-field`) );\n }\n if (include('scw-input-layout')) {\n addToPromise('scw-input-layout',\n import(`./scw-input-layout/scw-input-layout`) );\n }\n if (include('scw-link')) {\n addToPromise('scw-link',\n import(`./scw-link/ScwLink`) );\n }\n if (include('scw-button')) {\n addToPromise('scw-button',\n import(`./scw-button/ScwButton`) );\n }\n if (include('scw-menu')) {\n addToPromise('scw-menu',\n import(`./scw-menu/ScwMenu`) );\n }\n if (include('scw-menu-item')) {\n addToPromise('scw-menu-item',\n import(`./scw-menu-item/ScwMenuItem`) );\n }\n if (include('scw-icon')) {\n addToPromise('scw-icon',\n import(`./scw-icon/ScwIcon`) );\n }\n if (include('scw-heading')) {\n addToPromise('scw-heading',\n import(`./scw-heading/ScwHeading`) );\n }\n if (include('scw-image')) {\n addToPromise('scw-image',\n import(`./scw-image/ScwImage`) );\n }\n if (include('scw-input')) {\n addToPromise('scw-input',\n import(`./scw-input/scw-input`) );\n }\n if (include('scw-single-input')) {\n addToPromise('scw-single-input',\n import(`./scw-single-input/scw-single-input`) );\n }\n if (include('scw-single-input-layout')) {\n addToPromise('scw-single-input-layout',\n import(`./scw-single-input-layout/scw-single-input-layout`) );\n }\n if (include('scw-validation')) {\n addToPromise('scw-validation',\n import(`./scw-validation/scw-validation`) );\n }\n if (include('scw-validate')) {\n addToPromise('scw-validate',\n import(`./scw-validate/scw-validate`) );\n }\n if (include('scw-flex-h-component')) {\n addToPromise('scw-flex-h-component',\n import(`./scw-flex-h-component/scw-flex-h-component`) );\n }\n if (include('scw-flex-v-component')) {\n addToPromise('scw-flex-v-component',\n import(`./scw-flex-v-component/scw-flex-v-component`) );\n }\n if (include('scw-stack-component')) {\n addToPromise('scw-stack-component',\n import(`./scw-stack-component/scw-stack-component`) );\n }\n if (include('scw-layout-component')) {\n addToPromise('scw-layout-component',\n import(`./scw-layout-component/scw-layout-component`) );\n }\n if (include('scw-element-component')) {\n addToPromise('scw-element-component',\n import(`./scw-element-component/scw-element-component`) );\n }\n if (include('scw-center-component')) {\n addToPromise('scw-center-component',\n import(`./scw-center-component/ScwCenterComponent`) );\n }\n if (include('scw-float-component')) {\n addToPromise('scw-float-component',\n import(`./scw-float-component/scw-float-component`) );\n }\n if (include('scw-pane-component')) {\n addToPromise('scw-pane-component',\n import(`./scw-pane-component/scw-pane-component`) );\n }\n if (include('scw-form')) {\n addToPromise('scw-form',\n import(`./scw-form/scw-form`) );\n }\n if (include('scw-page-alert')) {\n addToPromise('scw-page-alert',\n import(`./scw-page-alert/scw-page-alert`) );\n }\n if (include('scw-link-base')) {\n addToPromise('scw-link-base',\n import(`./scw-link-base/ScwLinkBase`) );\n }\n if (include('scw-textarea')) {\n addToPromise('scw-textarea',\n import(`./scw-textarea/scw-textarea`) );\n }\n if (include('scw-select')) {\n addToPromise('scw-select',\n import(`./scw-select/scw-select`) );\n }\n if (include('scw-alert')) {\n addToPromise('scw-alert',\n import(`./scw-alert/ScwAlert`) );\n }\n\n return Promise.all(promiseArr);\n}\n"],
|
|
5
|
-
"mappings": "oJAgBA,GAAA,CACEA,EAAmBC,EACnBC,EAAaC,EACbC,EAAmBC,EACnBC,EAAYC,EACZC,EAAcC,CAAAA,EACZC,EAyFSC,EAAU,CACrBC,EACAC,EACAC,EAAkC,CAAA,IAAA,CAKlC,GAAKD,EAA8B,aAAnC,OACE,MAAUE,MAAM,0CAAA,EAMlB,IAAIC,EAKAC,EAIEC,EAA+B,CAAA,EAE/BC,EAASC,SAASC,iBACtBR,EACAS,WAAWC,aACX,KAAA,EACA,EAEEC,EAGJ,MAAQA,EAASL,EAAOM,SAAAA,KAAkC,MAAM,CAC9D,IAAMC,EAAaF,EAAOG,KAC1B,GAAID,EAAWE,WAAW,UAAA,EAAa,CACrC,GAAIV,EAAMW,SAAW,GAAKb,IAAhBa,OACR,MAAUd,MAAM,gDAAA,EAGlBE,EAAmBa,EAAclB,EAAWY,EAAQN,EAAOJ,CAAAA,EAC3DE,GAAAA,OAAAA,EAAaC,EACd,SAAUS,EAAWE,WAAW,UAAA,EAG/BG,EAAqBP,EAAQN,EAAOJ,CAAAA,UAC3BY,EAAWE,WAAW,WAAA,EAAc,CAE7C,GAAIV,EAAMW,SAAW,GAAKZ,IAAqBD,EAC7C,MAAUD,MAAM,gBAAA,EAElBE,EAAmBe,EAAeR,EAAQP,EAAkBC,CAAAA,CAC7D,CACF,CACDe,QAAQC,OACNlB,IADMkB,OAEN,6DAAA,EAIDrB,EAA8B,WAAIG,CAAQ,EAGvCc,EAAgB,CACpBlB,EACAY,EACAN,EACAJ,IAAAA,CAEA,IAAIqB,EAIAC,EACJ,GAAIlB,EAAMW,SAAW,EACnBO,EAAO,IAAI7B,EAAUiB,EAAQ,KAAA,OAAiBV,CAAAA,EAC9CqB,EAAQvB,MACH,CACL,IAAMyB,EAAQnB,EAAMA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,cAAc,GACxBL,EAAa,eACT,OAAO,kCAA+B,EAExCK,EAAQ,sBAAsB,GAChCL,EAAa,uBACT,OAAO,kDAA+C,EAExDK,EAAQ,sBAAsB,GAChCL,EAAa,uBACT,OAAO,kDAA+C,EAExDK,EAAQ,qBAAqB,GAC/BL,EAAa,sBACT,OAAO,gDAA6C,EAEtDK,EAAQ,sBAAsB,GAChCL,EAAa,uBACT,OAAO,kDAA+C,EAExDK,EAAQ,uBAAuB,GACjCL,EAAa,wBACT,OAAO,oDAAiD,EAE1DK,EAAQ,sBAAsB,GAChCL,EAAa,uBACT,OAAO,gDAA6C,EAEtDK,EAAQ,qBAAqB,GAC/BL,EAAa,sBACT,OAAO,gDAA6C,EAEtDK,EAAQ,oBAAoB,GAC9BL,EAAa,qBACT,OAAO,8CAA2C,EAEpDK,EAAQ,UAAU,GACpBL,EAAa,WACT,OAAO,0BAAuB,EAEhCK,EAAQ,gBAAgB,GAC1BL,EAAa,iBACT,OAAO,sCAAmC,EAE5CK,EAAQ,eAAe,GACzBL,EAAa,gBACT,OAAO,kCAA+B,EAExCK,EAAQ,cAAc,GACxBL,EAAa,eACT,OAAO,kCAA+B,EAExCK,EAAQ,YAAY,GACtBL,EAAa,aACT,OAAO,8BAA2B,EAEpCK,EAAQ,WAAW,GACrBL,EAAa,YACT,OAAO,2BAAwB,
|
|
4
|
+
"sourcesContent": ["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport type {TemplateResult} from './lit-html.js';\n\nimport {noChange, RenderOptions, _$LH} from './lit-html.js';\nimport {AttributePartInfo, PartType} from './directive.js';\nimport {\n isPrimitive,\n isSingleExpression,\n isTemplateResult,\n} from './directive-helpers.js';\n\nconst {\n _TemplateInstance: TemplateInstance,\n _isIterable: isIterable,\n _resolveDirective: resolveDirective,\n _ChildPart: ChildPart,\n _ElementPart: ElementPart,\n} = _$LH;\n\ntype ChildPart = InstanceType<typeof ChildPart>;\ntype TemplateInstance = InstanceType<typeof TemplateInstance>;\n\n/**\n * Information needed to rehydrate a single TemplateResult.\n */\ntype ChildPartState =\n | {\n type: 'leaf';\n /** The ChildPart that the result is rendered to */\n part: ChildPart;\n }\n | {\n type: 'iterable';\n /** The ChildPart that the result is rendered to */\n part: ChildPart;\n value: Iterable<unknown>;\n iterator: Iterator<unknown>;\n done: boolean;\n }\n | {\n type: 'template-instance';\n /** The ChildPart that the result is rendered to */\n part: ChildPart;\n\n result: TemplateResult;\n\n /** The TemplateInstance created from the TemplateResult */\n instance: TemplateInstance;\n\n /**\n * The index of the next Template part to be hydrated. This is mutable and\n * updated as the tree walk discovers new part markers at the right level in\n * the template instance tree. Note there is only one Template part per\n * attribute with (one or more) bindings.\n */\n templatePartIndex: number;\n\n /**\n * The index of the next TemplateInstance part to be hydrated. This is used\n * to retrieve the value from the TemplateResult and initialize the\n * TemplateInstance parts' values for dirty-checking on first render.\n */\n instancePartIndex: number;\n };\n\n/**\n * hydrate() operates on a container with server-side rendered content and\n * restores the client side data structures needed for lit-html updates such as\n * TemplateInstances and Parts. After calling `hydrate`, lit-html will behave as\n * if it initially rendered the DOM, and any subsequent updates will update\n * efficiently, the same as if lit-html had rendered the DOM on the client.\n *\n * hydrate() must be called on DOM that adheres the to lit-ssr structure for\n * parts. ChildParts must be represented with both a start and end comment\n * marker, and ChildParts that contain a TemplateInstance must have the template\n * digest written into the comment data.\n *\n * Since render() encloses its output in a ChildPart, there must always be a root\n * ChildPart.\n *\n * Example (using for # ... for annotations in HTML)\n *\n * Given this input:\n *\n * html`<div class=${x}>${y}</div>`\n *\n * The SSR DOM is:\n *\n * <!--lit-part AEmR7W+R0Ak=--> # Start marker for the root ChildPart created\n * # by render(). Includes the digest of the\n * # template\n * <div class=\"TEST_X\">\n * <!--lit-node 0--> # Indicates there are attribute bindings here\n * # The number is the depth-first index of the parent\n * # node in the template.\n * <!--lit-part--> # Start marker for the ${x} expression\n * TEST_Y\n * <!--/lit-part--> # End marker for the ${x} expression\n * </div>\n *\n * <!--/lit-part--> # End marker for the root ChildPart\n *\n * @param rootValue\n * @param container\n * @param userOptions\n */\nexport const hydrate = (\n rootValue: unknown,\n container: Element | DocumentFragment,\n options: Partial<RenderOptions> = {}\n) => {\n // TODO(kschaaf): Do we need a helper for _$litPart$ (\"part for node\")?\n // This property needs to remain unminified.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if ((container as any)['_$litPart$'] !== undefined) {\n throw new Error('container already contains a live render');\n }\n\n // Since render() creates a ChildPart to render into, we'll always have\n // exactly one root part. We need to hold a reference to it so we can set\n // it in the parts cache.\n let rootPart: ChildPart | undefined = undefined;\n\n // When we are in-between ChildPart markers, this is the current ChildPart.\n // It's needed to be able to set the ChildPart's endNode when we see a\n // close marker\n let currentChildPart: ChildPart | undefined = undefined;\n\n // Used to remember parent template state as we recurse into nested\n // templates\n const stack: Array<ChildPartState> = [];\n\n const walker = document.createTreeWalker(\n container,\n NodeFilter.SHOW_COMMENT,\n null,\n false\n );\n let marker: Comment | null;\n\n // Walk the DOM looking for part marker comments\n while ((marker = walker.nextNode() as Comment | null) !== null) {\n const markerText = marker.data;\n if (markerText.startsWith('lit-part')) {\n if (stack.length === 0 && rootPart !== undefined) {\n throw new Error('there must be only one root part per container');\n }\n // Create a new ChildPart and push it onto the stack\n currentChildPart = openChildPart(rootValue, marker, stack, options);\n rootPart ??= currentChildPart;\n } else if (markerText.startsWith('lit-node')) {\n // Create and hydrate attribute parts into the current ChildPart on the\n // stack\n createAttributeParts(marker, stack, options);\n } else if (markerText.startsWith('/lit-part')) {\n // Close the current ChildPart, and pop the previous one off the stack\n if (stack.length === 1 && currentChildPart !== rootPart) {\n throw new Error('internal error');\n }\n currentChildPart = closeChildPart(marker, currentChildPart, stack);\n }\n }\n console.assert(\n rootPart !== undefined,\n 'there should be exactly one root part in a render container'\n );\n // This property needs to remain unminified.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (container as any)['_$litPart$'] = rootPart;\n};\n\nconst openChildPart = (\n rootValue: unknown,\n marker: Comment,\n stack: Array<ChildPartState>,\n options: RenderOptions\n) => {\n let value: unknown;\n // We know the startNode now. We'll know the endNode when we get to\n // the matching marker and set it in closeChildPart()\n // TODO(kschaaf): Current constructor takes both nodes\n let part;\n if (stack.length === 0) {\n part = new ChildPart(marker, null, undefined, options);\n value = rootValue;\n } else {\n const state = stack[stack.length - 1];\n if (state.type === 'template-instance') {\n part = new ChildPart(marker, null, state.instance, options);\n state.instance._parts.push(part);\n value = state.result.values[state.instancePartIndex++];\n state.templatePartIndex++;\n } else if (state.type === 'iterable') {\n part = new ChildPart(marker, null, state.part, options);\n const result = state.iterator.next();\n if (result.done) {\n value = undefined;\n state.done = true;\n throw new Error('Unhandled shorter than expected iterable');\n } else {\n value = result.value;\n }\n (state.part._$committedValue as Array<ChildPart>).push(part);\n } else {\n // state.type === 'leaf'\n // TODO(kschaaf): This is unexpected, and likely a result of a primitive\n // been rendered on the client when a TemplateResult was rendered on the\n // server; this part will be hydrated but not used. We can detect it, but\n // we need to decide what to do in this case. Note that this part won't be\n // retained by any parent TemplateInstance, since a primitive had been\n // rendered in its place.\n // https://github.com/lit/lit/issues/1434\n // throw new Error('Hydration value mismatch: Found a TemplateInstance' +\n // 'where a leaf value was expected');\n part = new ChildPart(marker, null, state.part, options);\n }\n }\n\n // Initialize the ChildPart state depending on the type of value and push\n // it onto the stack. This logic closely follows the ChildPart commit()\n // cascade order:\n // 1. directive\n // 2. noChange\n // 3. primitive (note strings must be handled before iterables, since they\n // are iterable)\n // 4. TemplateResult\n // 5. Node (not yet implemented, but fallback handling is fine)\n // 6. Iterable\n // 7. nothing (handled in fallback)\n // 8. Fallback for everything else\n value = resolveDirective(part, value);\n if (value === noChange) {\n stack.push({part, type: 'leaf'});\n } else if (isPrimitive(value)) {\n stack.push({part, type: 'leaf'});\n part._$committedValue = value;\n // TODO(kschaaf): We can detect when a primitive is being hydrated on the\n // client where a TemplateResult was rendered on the server, but we need to\n // decide on a strategy for what to do next.\n // https://github.com/lit/lit/issues/1434\n // if (marker.data !== 'lit-part') {\n // throw new Error('Hydration value mismatch: Primitive found where TemplateResult expected');\n // }\n } else if (isTemplateResult(value)) {\n // Check for a template result digest\n const markerWithDigest = `lit-part ${digestForTemplateResult(value)}`;\n if (marker.data === markerWithDigest) {\n const template = ChildPart.prototype._$getTemplate(value);\n const instance = new TemplateInstance(template, part);\n stack.push({\n type: 'template-instance',\n instance,\n part,\n templatePartIndex: 0,\n instancePartIndex: 0,\n result: value,\n });\n // For TemplateResult values, we set the part value to the\n // generated TemplateInstance\n part._$committedValue = instance;\n } else {\n // TODO: if this isn't the server-rendered template, do we\n // need to stop hydrating this subtree? Clear it? Add tests.\n throw new Error(\n 'Hydration value mismatch: Unexpected TemplateResult rendered to part'\n );\n }\n } else if (isIterable(value)) {\n // currentChildPart.value will contain an array of ChildParts\n stack.push({\n part: part,\n type: 'iterable',\n value,\n iterator: value[Symbol.iterator](),\n done: false,\n });\n part._$committedValue = [];\n } else {\n // Fallback for everything else (nothing, Objects, Functions,\n // etc.): we just initialize the part's value\n // Note that `Node` value types are not currently supported during\n // SSR, so that part of the cascade is missing.\n stack.push({part: part, type: 'leaf'});\n part._$committedValue = value == null ? '' : value;\n }\n return part;\n};\n\nconst closeChildPart = (\n marker: Comment,\n part: ChildPart | undefined,\n stack: Array<ChildPartState>\n): ChildPart | undefined => {\n if (part === undefined) {\n throw new Error('unbalanced part marker');\n }\n\n part._$endNode = marker;\n\n const currentState = stack.pop()!;\n\n if (currentState.type === 'iterable') {\n if (!currentState.iterator.next().done) {\n throw new Error('unexpected longer than expected iterable');\n }\n }\n\n if (stack.length > 0) {\n const state = stack[stack.length - 1];\n return state.part;\n } else {\n return undefined;\n }\n};\n\nconst createAttributeParts = (\n comment: Comment,\n stack: Array<ChildPartState>,\n options: RenderOptions\n) => {\n // Get the nodeIndex from DOM. We're only using this for an integrity\n // check right now, we might not need it.\n const match = /lit-node (\\d+)/.exec(comment.data)!;\n const nodeIndex = parseInt(match[1]);\n\n // For void elements, the node the comment was referring to will be\n // the previousSibling; for non-void elements, the comment is guaranteed\n // to be the first child of the element (i.e. it won't have a previousSibling\n // meaning it should use the parentElement)\n const node = comment.previousElementSibling ?? comment.parentElement;\n if (node === null) {\n throw new Error('could not find node for attribute parts');\n }\n // Remove `defer-hydration` attribute, if any\n node.removeAttribute('defer-hydration');\n\n const state = stack[stack.length - 1];\n if (state.type === 'template-instance') {\n const instance = state.instance;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n // If the next template part is in attribute-position on the current node,\n // create the instance part for it and prime its state\n const templatePart = instance._$template.parts[state.templatePartIndex];\n if (\n templatePart === undefined ||\n (templatePart.type !== PartType.ATTRIBUTE &&\n templatePart.type !== PartType.ELEMENT) ||\n templatePart.index !== nodeIndex\n ) {\n break;\n }\n\n if (templatePart.type === PartType.ATTRIBUTE) {\n // The instance part is created based on the constructor saved in the\n // template part\n const instancePart = new templatePart.ctor(\n node as HTMLElement,\n templatePart.name,\n templatePart.strings,\n state.instance,\n options\n );\n\n const value = isSingleExpression(\n instancePart as unknown as AttributePartInfo\n )\n ? state.result.values[state.instancePartIndex]\n : state.result.values;\n\n // Setting the attribute value primes committed value with the resolved\n // directive value; we only then commit that value for event/property\n // parts since those were not serialized, and pass `noCommit` for the\n // others to avoid perf impact of touching the DOM unnecessarily\n const noCommit = !(\n instancePart.type === PartType.EVENT ||\n instancePart.type === PartType.PROPERTY\n );\n instancePart._$setValue(\n value,\n instancePart,\n state.instancePartIndex,\n noCommit\n );\n state.instancePartIndex += templatePart.strings.length - 1;\n instance._parts.push(instancePart);\n } else {\n // templatePart.type === PartType.ELEMENT\n const instancePart = new ElementPart(node, state.instance, options);\n resolveDirective(\n instancePart,\n state.result.values[state.instancePartIndex++]\n );\n instance._parts.push(instancePart);\n }\n state.templatePartIndex++;\n }\n } else {\n throw new Error('internal error');\n }\n};\n\n// Number of 32 bit elements to use to create template digests\nconst digestSize = 2;\n// We need to specify a digest to use across rendering environments. This is a\n// simple digest build from a DJB2-ish hash modified from:\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\n// It has been changed to an array of hashes to add additional bits.\n// Goals:\n// - Extremely low collision rate. We may not be able to detect collisions.\n// - Extremely fast.\n// - Extremely small code size.\n// - Safe to include in HTML comment text or attribute value.\n// - Easily specifiable and implementable in multiple languages.\n// We don't care about cryptographic suitability.\nexport const digestForTemplateResult = (templateResult: TemplateResult) => {\n const hashes = new Uint32Array(digestSize).fill(5381);\n\n for (const s of templateResult.strings) {\n for (let i = 0; i < s.length; i++) {\n hashes[i % digestSize] = (hashes[i % digestSize] * 33) ^ s.charCodeAt(i);\n }\n }\n return btoa(String.fromCharCode(...new Uint8Array(hashes.buffer)));\n};\n", "/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * LitElement support for hydration of content rendered using lit-ssr.\n *\n * @packageDocumentation\n */\n\nimport type {PropertyValues} from '@lit/reactive-element';\nimport {render, RenderOptions} from 'lit-html';\nimport {hydrate} from 'lit-html/experimental-hydrate.js';\n\ninterface PatchableLitElement extends HTMLElement {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-misused-new\n new (...args: any[]): PatchableLitElement;\n enableUpdating(requestedUpdate?: boolean): void;\n createRenderRoot(): Element | ShadowRoot;\n renderRoot: HTMLElement | DocumentFragment;\n render(): unknown;\n renderOptions: RenderOptions;\n _$needsHydration: boolean;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nglobalThis.litElementHydrateSupport = ({\n LitElement,\n}: {\n LitElement: PatchableLitElement;\n}) => {\n const observedAttributes = Object.getOwnPropertyDescriptor(\n Object.getPrototypeOf(LitElement),\n 'observedAttributes'\n )!.get!;\n\n // Add `defer-hydration` to observedAttributes\n Object.defineProperty(LitElement, 'observedAttributes', {\n get() {\n return [...observedAttributes.call(this), 'defer-hydration'];\n },\n });\n\n // Enable element when 'defer-hydration' attribute is removed by calling the\n // super.connectedCallback()\n const attributeChangedCallback =\n LitElement.prototype.attributeChangedCallback;\n LitElement.prototype.attributeChangedCallback = function (\n name: string,\n old: string | null,\n value: string | null\n ) {\n if (name === 'defer-hydration' && value === null) {\n connectedCallback.call(this);\n }\n attributeChangedCallback.call(this, name, old, value);\n };\n\n // Override `connectedCallback` to capture whether we need hydration, and\n // defer `super.connectedCallback()` if the 'defer-hydration' attribute is set\n const connectedCallback = LitElement.prototype.connectedCallback;\n LitElement.prototype.connectedCallback = function (\n this: PatchableLitElement\n ) {\n // If the outer scope of this element has not yet been hydrated, wait until\n // 'defer-hydration' attribute has been removed to enable\n if (!this.hasAttribute('defer-hydration')) {\n connectedCallback.call(this);\n }\n };\n\n // If we've been server-side rendered, just return `this.shadowRoot`, don't\n // call the base implementation, which would also adopt styles (for now)\n const createRenderRoot = LitElement.prototype.createRenderRoot;\n LitElement.prototype.createRenderRoot = function (this: PatchableLitElement) {\n if (this.shadowRoot) {\n this._$needsHydration = true;\n return this.shadowRoot;\n } else {\n return createRenderRoot.call(this);\n }\n };\n\n // Hydrate on first update when needed\n const update = Object.getPrototypeOf(LitElement.prototype).update;\n LitElement.prototype.update = function (\n this: PatchableLitElement,\n changedProperties: PropertyValues\n ) {\n const value = this.render();\n // Since this is a patch, we can't call super.update(), so we capture\n // it off the proto chain and call it instead\n update.call(this, changedProperties);\n if (this._$needsHydration) {\n this._$needsHydration = false;\n hydrate(value, this.renderRoot, this.renderOptions);\n } else {\n render(value, this.renderRoot, this.renderOptions);\n }\n };\n};\n", "import 'lit-element/experimental-hydrate-support.js';\n\nconst registeredComponents : {\n [key: string]: true;\n} = {};\n\nexport let config : {\n suffix : string | false,\n};\n\n/**\n * Define Components\n * Gotchas:\n * - can't have two runtimes on same page, so need root to be unversioned and\n * child versioned (from same url)\n * - b/c the comp classes can only be registered once. The child should\n * always be bundled.\n * @param {object} args\n * @return {void}\n */\nexport async function defineComponents(\n args : {\n components?: string[],\n suffix?: string,\n } = {},\n) {\n // defaults to a runtime config w/ all comps, no suffix, and assets runtime.\n const {\n components = false,\n suffix = false,\n } = args;\n\n // Global Config\n config = {\n suffix,\n };\n\n const allComponents = components ? false : true;\n\n const suffixFinal = suffix ? `-${suffix}` : '';\n const promiseArr: Promise<void>[] = [];\n\n /**\n * Add to a promise\n * @param {string} compStr\n * @param {any} importCall\n */\n function addToPromise(compStr: string, importCall: any) {\n promiseArr.push((async () => {\n const compName = `${compStr}${suffixFinal}`;\n // avoid name dups (doesn't catch class dups!!!!)\n if ( !registeredComponents[compName] ) {\n registeredComponents[compName] = true;\n try {\n window.customElements.define(\n compName,\n (await importCall).default,\n );\n } catch (error) {\n console.error( compName, error );\n }\n }\n })());\n }\n\n /**\n * include\n * @argument {string} compStr\n * @return {boolean}\n */\n function include(compStr: string) {\n if (allComponents) return true;\n if (Array.isArray( components) ) {\n return components ? components.includes(compStr) : false;\n }\n }\n\n // need the import to be picked up by esbuild...\n if (include('scw-component')) {\n addToPromise('scw-component',\n import(`./scw-component/ScwComponent`));\n }\n if (include('scw-form-component')) {\n addToPromise('scw-form-component',\n import(`./scw-form-component/scw-form-component`) );\n }\n if (include('scw-card')) {\n addToPromise('scw-card',\n import(`./scw-card/ScwCard`));\n }\n if (include('scw-input-field')) {\n addToPromise('scw-input-field',\n import(`./scw-input-field/scw-input-field`) );\n }\n if (include('scw-input-layout')) {\n addToPromise('scw-input-layout',\n import(`./scw-input-layout/scw-input-layout`) );\n }\n if (include('scw-link')) {\n addToPromise('scw-link',\n import(`./scw-link/ScwLink`) );\n }\n if (include('scw-button')) {\n addToPromise('scw-button',\n import(`./scw-button/ScwButton`) );\n }\n if (include('scw-menu')) {\n addToPromise('scw-menu',\n import(`./scw-menu/ScwMenu`) );\n }\n if (include('scw-menu-item')) {\n addToPromise('scw-menu-item',\n import(`./scw-menu-item/ScwMenuItem`) );\n }\n if (include('scw-icon')) {\n addToPromise('scw-icon',\n import(`./scw-icon/ScwIcon`) );\n }\n if (include('scw-heading')) {\n addToPromise('scw-heading',\n import(`./scw-heading/ScwHeading`) );\n }\n if (include('scw-image')) {\n addToPromise('scw-image',\n import(`./scw-image/ScwImage`) );\n }\n if (include('scw-input')) {\n addToPromise('scw-input',\n import(`./scw-input/scw-input`) );\n }\n if (include('scw-single-input')) {\n addToPromise('scw-single-input',\n import(`./scw-single-input/scw-single-input`) );\n }\n if (include('scw-single-input-layout')) {\n addToPromise('scw-single-input-layout',\n import(`./scw-single-input-layout/scw-single-input-layout`) );\n }\n if (include('scw-validation')) {\n addToPromise('scw-validation',\n import(`./scw-validation/scw-validation`) );\n }\n if (include('scw-validate')) {\n addToPromise('scw-validate',\n import(`./scw-validate/scw-validate`) );\n }\n if (include('scw-flex-h-component')) {\n addToPromise('scw-flex-h-component',\n import(`./scw-flex-h-component/scw-flex-h-component`) );\n }\n if (include('scw-flex-v-component')) {\n addToPromise('scw-flex-v-component',\n import(`./scw-flex-v-component/scw-flex-v-component`) );\n }\n if (include('scw-stack-component')) {\n addToPromise('scw-stack-component',\n import(`./scw-stack-component/scw-stack-component`) );\n }\n if (include('scw-layout-component')) {\n addToPromise('scw-layout-component',\n import(`./scw-layout-component/scw-layout-component`) );\n }\n if (include('scw-element-component')) {\n addToPromise('scw-element-component',\n import(`./scw-element-component/scw-element-component`) );\n }\n if (include('scw-center-component')) {\n addToPromise('scw-center-component',\n import(`./scw-center-component/ScwCenterComponent`) );\n }\n if (include('scw-float-component')) {\n addToPromise('scw-float-component',\n import(`./scw-float-component/scw-float-component`) );\n }\n if (include('scw-pane-component')) {\n addToPromise('scw-pane-component',\n import(`./scw-pane-component/scw-pane-component`) );\n }\n if (include('scw-form')) {\n addToPromise('scw-form',\n import(`./scw-form/scw-form`) );\n }\n if (include('scw-page-alert')) {\n addToPromise('scw-page-alert',\n import(`./scw-page-alert/scw-page-alert`) );\n }\n if (include('scw-link-base')) {\n addToPromise('scw-link-base',\n import(`./scw-link-base/ScwLinkBase`) );\n }\n if (include('scw-textarea')) {\n addToPromise('scw-textarea',\n import(`./scw-textarea/scw-textarea`) );\n }\n if (include('scw-select')) {\n addToPromise('scw-select',\n import(`./scw-select/scw-select`) );\n }\n if (include('scw-alert')) {\n addToPromise('scw-alert',\n import(`./scw-alert/ScwAlert`) );\n }\n if (include('scw-stepper')) {\n addToPromise('scw-stepper',\n import(`./scw-stepper/ScwStepper`) );\n }\n\n return Promise.all(promiseArr);\n}\n"],
|
|
5
|
+
"mappings": "oJAgBA,GAAA,CACEA,EAAmBC,EACnBC,EAAaC,EACbC,EAAmBC,EACnBC,EAAYC,EACZC,EAAcC,CAAAA,EACZC,EAyFSC,EAAU,CACrBC,EACAC,EACAC,EAAkC,CAAA,IAAA,CAKlC,GAAKD,EAA8B,aAAnC,OACE,MAAUE,MAAM,0CAAA,EAMlB,IAAIC,EAKAC,EAIEC,EAA+B,CAAA,EAE/BC,EAASC,SAASC,iBACtBR,EACAS,WAAWC,aACX,KAAA,EACA,EAEEC,EAGJ,MAAQA,EAASL,EAAOM,SAAAA,KAAkC,MAAM,CAC9D,IAAMC,EAAaF,EAAOG,KAC1B,GAAID,EAAWE,WAAW,UAAA,EAAa,CACrC,GAAIV,EAAMW,SAAW,GAAKb,IAAhBa,OACR,MAAUd,MAAM,gDAAA,EAGlBE,EAAmBa,EAAclB,EAAWY,EAAQN,EAAOJ,CAAAA,EAC3DE,GAAAA,OAAAA,EAAaC,EACd,SAAUS,EAAWE,WAAW,UAAA,EAG/BG,EAAqBP,EAAQN,EAAOJ,CAAAA,UAC3BY,EAAWE,WAAW,WAAA,EAAc,CAE7C,GAAIV,EAAMW,SAAW,GAAKZ,IAAqBD,EAC7C,MAAUD,MAAM,gBAAA,EAElBE,EAAmBe,EAAeR,EAAQP,EAAkBC,CAAAA,CAC7D,CACF,CACDe,QAAQC,OACNlB,IADMkB,OAEN,6DAAA,EAIDrB,EAA8B,WAAIG,CAAQ,EAGvCc,EAAgB,CACpBlB,EACAY,EACAN,EACAJ,IAAAA,CAEA,IAAIqB,EAIAC,EACJ,GAAIlB,EAAMW,SAA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AyB,GACnCL,EAAa,0BACT,OAAO,wDAAqD,EAE9DK,EAAQ,gBAAgB,GAC1BL,EAAa,iBACT,OAAO,sCAAmC,EAE5CK,EAAQ,cAAc,GACxBL,EAAa,eACT,OAAO,kCAA+B,EAExCK,EAAQ,sBAAsB,GAChCL,EAAa,uBACT,OAAO,kDAA+C,EAExDK,EAAQ,sBAAsB,GAChCL,EAAa,uBACT,OAAO,kDAA+C,EAExDK,EAAQ,qBAAqB,GAC/BL,EAAa,sBACT,OAAO,gDAA6C,EAEtDK,EAAQ,sBAAsB,GAChCL,EAAa,uBACT,OAAO,kDAA+C,EAExDK,EAAQ,uBAAuB,GACjCL,EAAa,wBACT,OAAO,oDAAiD,EAE1DK,EAAQ,sBAAsB,GAChCL,EAAa,uBACT,OAAO,gDAA6C,EAEtDK,EAAQ,qBAAqB,GAC/BL,EAAa,sBACT,OAAO,gDAA6C,EAEtDK,EAAQ,oBAAoB,GAC9BL,EAAa,qBACT,OAAO,8CAA2C,EAEpDK,EAAQ,UAAU,GACpBL,EAAa,WACT,OAAO,0BAAuB,EAEhCK,EAAQ,gBAAgB,GAC1BL,EAAa,iBACT,OAAO,sCAAmC,EAE5CK,EAAQ,eAAe,GACzBL,EAAa,gBACT,OAAO,kCAA+B,EAExCK,EAAQ,cAAc,GACxBL,EAAa,eACT,OAAO,kCAA+B,EAExCK,EAAQ,YAAY,GACtBL,EAAa,aACT,OAAO,8BAA2B,EAEpCK,EAAQ,WAAW,GACrBL,EAAa,YACT,OAAO,2BAAwB,EAEjCK,EAAQ,aAAa,GACvBL,EAAa,cACT,OAAO,+BAA4B,EAGlC,QAAQ,IAAID,CAAU,CAC/B",
|
|
6
6
|
"names": ["_TemplateInstance", "TemplateInstance", "_isIterable", "isIterable", "_resolveDirective", "resolveDirective", "_ChildPart", "ChildPart", "_ElementPart", "ElementPart", "_$LH", "hydrate", "rootValue", "container", "options", "Error", "rootPart", "currentChildPart", "stack", "walker", "document", "createTreeWalker", "NodeFilter", "SHOW_COMMENT", "marker", "nextNode", "markerText", "data", "startsWith", "length", "openChildPart", "createAttributeParts", "closeChildPart", "console", "assert", "value", "part", "state", "type", "instance", "_parts", "push", "result", "values", "instancePartIndex", "templatePartIndex", "iterator", "next", "done", "_$committedValue", "noChange", "isPrimitive", "isTemplateResult", "markerWithDigest", "digestForTemplateResult", "template", "prototype", "_$getTemplate", "Symbol", "_$endNode", "currentState", "pop", "comment", "match", "exec", "nodeIndex", "parseInt", "node", "_a", "previousElementSibling", "parentElement", "removeAttribute", "templatePart", "_$template", "parts", "PartType", "ATTRIBUTE", "ELEMENT", "index", "instancePart", "ctor", "name", "strings", "isSingleExpression", "noCommit", "EVENT", "PROPERTY", "_$setValue", "templateResult", "hashes", "Uint32Array", "fill", "s", "i", "charCodeAt", "btoa", "String", "fromCharCode", "Uint8Array", "buffer", "globalThis", "litElementHydrateSupport", "LitElement", "observedAttributes", "Object", "getOwnPropertyDescriptor", "getPrototypeOf", "get", "defineProperty", "call", "this", "attributeChangedCallback", "prototype", "name", "old", "value", "connectedCallback", "hasAttribute", "createRenderRoot", "shadowRoot", "_$needsHydration", "update", "changedProperties", "render", "hydrate", "renderRoot", "renderOptions", "registeredComponents", "config", "defineComponents", "args", "components", "suffix", "allComponents", "suffixFinal", "promiseArr", "addToPromise", "compStr", "importCall", "compName", "error", "include"]
|
|
7
7
|
}
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as u}from"./chunk.
|
|
1
|
+
import{a as u}from"./chunk.XH4BHYNF.js";import{a as n,b as r,d as o}from"./chunk.XWFI56OY.js";import{a as f}from"./chunk.PKA6D7UK.js";import{g as a}from"./chunk.5YJY6NT6.js";var c=(e=>(e.text="text",e.boolean="boolean",e.submit="submit",e))(c||{}),h=(i=>(i.submit="submit",i.cancel="cancel",i))(h||{}),t=class extends o{constructor(){super(...arguments);this.formType="text";this.value="";this.placeholder="";this.selected=!1;this.readOnly=!1;this.required=!1;this.requiredLabel=" *";this.focused=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.required&&this.createAndAddValidationRule("required",this.requiredFeedback)}decorateValues(i){if(!this.name){this.warn(`${this.element} didn't find a name`);return}this.formType==="boolean"?i[this.name]=this.selected:i[this.name]=this.value}findIfRequired(){let i=this.findValidationRules();return i?i.isRequired():!1}findValidationRules(){return Array.from(this.children).find(d=>d.nodeName.indexOf("SCW-VALIDATION")===0)}validate(){let i=this.findValidationRules(),e=[];return i&&(e=i.validate(this.value)),this.invalid=e.length>0,this.invalid?this.feedback=e[0].feedback:this.feedback="",e}createValidateRule(){return document.createElement(`scw-${"validate"}${u()}`)}addValidationRule(i){let e=this.findValidationRules();e||(e=document.createElement(`scw-${"validation"}${u()}`),this.prepend(e)),Array.from(e.children).find(s=>s.getAttribute("type")===i.type)||e.appendChild(i)}createAndAddValidationRule(i,e){let d=this.createValidateRule();d.setAttribute("type",i),e&&d.setAttribute("feedback",e),this.addValidationRule(d)}removeValidationRule(i){let e=this.findValidationRules();if(!e)return;let l=Array.from(e.children).find(s=>s.type===i);l&&l.parentNode&&l.parentNode.removeChild(l)}render(){return f`
|
|
2
2
|
scw-form-component
|
|
3
3
|
`}};a([n({type:c,reflect:!0,attribute:"form-type"})],t.prototype,"formType",2),a([n({type:String})],t.prototype,"name",2),a([n({type:String})],t.prototype,"value",2),a([n({type:String})],t.prototype,"placeholder",2),a([n({type:String})],t.prototype,"selected",2),a([n({type:Boolean,attribute:"read-only"})],t.prototype,"readOnly",2),a([n({type:Boolean})],t.prototype,"required",2),a([n({type:String,attribute:"required-label"})],t.prototype,"requiredLabel",2),a([n({type:String,attribute:"required-feedback"})],t.prototype,"requiredFeedback",2),a([r()],t.prototype,"feedback",2),a([r()],t.prototype,"focused",2),a([r()],t.prototype,"invalid",2);export{c as a,h as b,t as c};
|
|
4
|
-
//# sourceMappingURL=chunk.
|
|
4
|
+
//# sourceMappingURL=chunk.RSGNS7V4.js.map
|
|
Binary file
|