igniteui-webcomponents 4.11.0 → 5.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +79 -0
- package/README.md +168 -110
- package/components/accordion/accordion.d.ts +2 -2
- package/components/accordion/accordion.js +25 -35
- package/components/accordion/accordion.js.map +1 -1
- package/components/avatar/avatar.d.ts +1 -3
- package/components/avatar/avatar.js +1 -3
- package/components/avatar/avatar.js.map +1 -1
- package/components/avatar/themes/avatar.base.css.js +1 -1
- package/components/avatar/themes/avatar.base.css.js.map +1 -1
- package/components/badge/badge.d.ts +2 -1
- package/components/badge/badge.js.map +1 -1
- package/components/badge/themes/badge.base.css.js +1 -1
- package/components/badge/themes/badge.base.css.js.map +1 -1
- package/components/button/button-base.d.ts +3 -4
- package/components/button/button-base.js +1 -9
- package/components/button/button-base.js.map +1 -1
- package/components/button/button.d.ts +3 -7
- package/components/button/button.js +4 -5
- package/components/button/button.js.map +1 -1
- package/components/button/icon-button.d.ts +2 -2
- package/components/button/icon-button.js +0 -3
- package/components/button/icon-button.js.map +1 -1
- package/components/button/themes/button/button.base.css.js +1 -1
- package/components/button/themes/button/button.base.css.js.map +1 -1
- package/components/button/themes/icon-button/icon-button.base.css.js +1 -1
- package/components/button/themes/icon-button/icon-button.base.css.js.map +1 -1
- package/components/button-group/themes/button.base.css.js +1 -1
- package/components/button-group/themes/button.base.css.js.map +1 -1
- package/components/button-group/themes/group.base.css.js +1 -1
- package/components/button-group/themes/group.base.css.js.map +1 -1
- package/components/calendar/base.d.ts +65 -0
- package/components/calendar/base.js +150 -0
- package/components/calendar/base.js.map +1 -0
- package/components/calendar/calendar.d.ts +113 -61
- package/components/calendar/calendar.js +417 -514
- package/components/calendar/calendar.js.map +1 -1
- package/components/calendar/days-view/days-view.d.ts +43 -46
- package/components/calendar/days-view/days-view.js +269 -340
- package/components/calendar/days-view/days-view.js.map +1 -1
- package/components/calendar/helpers.d.ts +30 -0
- package/components/calendar/helpers.js +99 -0
- package/components/calendar/helpers.js.map +1 -0
- package/components/calendar/model.d.ts +55 -0
- package/components/calendar/model.js +94 -0
- package/components/calendar/model.js.map +1 -0
- package/components/calendar/months-view/months-view.d.ts +12 -12
- package/components/calendar/months-view/months-view.js +72 -79
- package/components/calendar/months-view/months-view.js.map +1 -1
- package/components/calendar/themes/calendar.base.css.js +1 -1
- package/components/calendar/themes/calendar.base.css.js.map +1 -1
- package/components/calendar/types.d.ts +16 -0
- package/components/calendar/types.js +10 -0
- package/components/calendar/types.js.map +1 -0
- package/components/calendar/years-view/years-view.d.ts +13 -12
- package/components/calendar/years-view/years-view.js +58 -73
- package/components/calendar/years-view/years-view.js.map +1 -1
- package/components/card/themes/card.actions.base.css.js +1 -1
- package/components/card/themes/card.actions.base.css.js.map +1 -1
- package/components/card/themes/card.content.base.css.js +1 -1
- package/components/card/themes/card.content.base.css.js.map +1 -1
- package/components/card/themes/card.header.base.css.js +1 -1
- package/components/card/themes/card.header.base.css.js.map +1 -1
- package/components/card/themes/card.media.base.css.js +1 -1
- package/components/card/themes/card.media.base.css.js.map +1 -1
- package/components/card/themes/container.base.css.js +1 -1
- package/components/card/themes/container.base.css.js.map +1 -1
- package/components/checkbox/checkbox-base.d.ts +8 -5
- package/components/checkbox/checkbox-base.js +8 -15
- package/components/checkbox/checkbox-base.js.map +1 -1
- package/components/checkbox/checkbox.d.ts +2 -4
- package/components/checkbox/checkbox.js.map +1 -1
- package/components/checkbox/switch.d.ts +1 -3
- package/components/checkbox/switch.js.map +1 -1
- package/components/checkbox/themes/checkbox.base.css.js +1 -1
- package/components/checkbox/themes/checkbox.base.css.js.map +1 -1
- package/components/checkbox/themes/switch.base.css.js +1 -1
- package/components/checkbox/themes/switch.base.css.js.map +1 -1
- package/components/checkbox/validators.d.ts +3 -0
- package/components/checkbox/validators.js +5 -0
- package/components/checkbox/validators.js.map +1 -0
- package/components/chip/chip.d.ts +4 -3
- package/components/chip/chip.js +11 -19
- package/components/chip/chip.js.map +1 -1
- package/components/chip/themes/chip.base.css.js +1 -1
- package/components/chip/themes/chip.base.css.js.map +1 -1
- package/components/chip/themes/shared/chip.common.css.js +1 -1
- package/components/chip/themes/shared/chip.common.css.js.map +1 -1
- package/components/combo/combo.d.ts +36 -54
- package/components/combo/combo.js +36 -59
- package/components/combo/combo.js.map +1 -1
- package/components/combo/themes/combo-header.base.css.js +1 -1
- package/components/combo/themes/combo-header.base.css.js.map +1 -1
- package/components/combo/themes/combo-item.base.css.js +1 -1
- package/components/combo/themes/combo-item.base.css.js.map +1 -1
- package/components/combo/themes/combo.base.css.js +1 -1
- package/components/combo/themes/combo.base.css.js.map +1 -1
- package/components/combo/types.d.ts +2 -2
- package/components/combo/types.js.map +1 -1
- package/components/combo/validators.d.ts +3 -0
- package/components/combo/validators.js +9 -0
- package/components/combo/validators.js.map +1 -0
- package/components/common/controllers/key-bindings.d.ts +1 -0
- package/components/common/controllers/key-bindings.js.map +1 -1
- package/components/common/controllers/mutation-observer.d.ts +1 -0
- package/components/common/controllers/mutation-observer.js.map +1 -1
- package/components/common/controllers/root-click.d.ts +4 -2
- package/components/common/controllers/root-click.js +13 -7
- package/components/common/controllers/root-click.js.map +1 -1
- package/components/common/definitions/defineAllComponents.js +0 -2
- package/components/common/definitions/defineAllComponents.js.map +1 -1
- package/components/common/localization/intl-formatters.d.ts +17 -0
- package/components/common/localization/intl-formatters.js +46 -0
- package/components/common/localization/intl-formatters.js.map +1 -0
- package/components/common/mixins/alert.d.ts +3 -3
- package/components/common/mixins/alert.js +6 -4
- package/components/common/mixins/alert.js.map +1 -1
- package/components/common/mixins/combo-box.d.ts +4 -3
- package/components/common/mixins/combo-box.js +16 -10
- package/components/common/mixins/combo-box.js.map +1 -1
- package/components/common/mixins/form-associated.d.ts +1 -1
- package/components/common/mixins/form-associated.js +4 -2
- package/components/common/mixins/form-associated.js.map +1 -1
- package/components/common/util.d.ts +26 -0
- package/components/common/util.js +34 -0
- package/components/common/util.js.map +1 -1
- package/components/date-picker/date-picker.d.ts +7 -10
- package/components/date-picker/date-picker.js +16 -33
- package/components/date-picker/date-picker.js.map +1 -1
- package/components/date-picker/themes/date-picker.base.css.js +1 -1
- package/components/date-picker/themes/date-picker.base.css.js.map +1 -1
- package/components/date-picker/themes/shared/date-picker.common.css.js +1 -1
- package/components/date-picker/themes/shared/date-picker.common.css.js.map +1 -1
- package/components/date-picker/validators.d.ts +3 -0
- package/components/date-picker/validators.js +15 -0
- package/components/date-picker/validators.js.map +1 -0
- package/components/date-time-input/date-time-input.d.ts +3 -22
- package/components/date-time-input/date-time-input.js +8 -36
- package/components/date-time-input/date-time-input.js.map +1 -1
- package/components/date-time-input/date-util.js +3 -1
- package/components/date-time-input/date-util.js.map +1 -1
- package/components/date-time-input/validators.d.ts +3 -0
- package/components/date-time-input/validators.js +18 -0
- package/components/date-time-input/validators.js.map +1 -0
- package/components/dialog/dialog.d.ts +12 -25
- package/components/dialog/dialog.js +55 -77
- package/components/dialog/dialog.js.map +1 -1
- package/components/dialog/themes/dialog.base.css.js +1 -1
- package/components/dialog/themes/dialog.base.css.js.map +1 -1
- package/components/dialog/themes/shared/dialog.common.css.js +1 -1
- package/components/dialog/themes/shared/dialog.common.css.js.map +1 -1
- package/components/divider/divider.js.map +1 -1
- package/components/divider/themes/divider.base.css.js +1 -1
- package/components/divider/themes/divider.base.css.js.map +1 -1
- package/components/dropdown/dropdown-group.d.ts +1 -1
- package/components/dropdown/dropdown-group.js +5 -3
- package/components/dropdown/dropdown-group.js.map +1 -1
- package/components/dropdown/dropdown.d.ts +4 -11
- package/components/dropdown/dropdown.js +10 -23
- package/components/dropdown/dropdown.js.map +1 -1
- package/components/dropdown/themes/dropdown-group.base.css.js +1 -1
- package/components/dropdown/themes/dropdown-group.base.css.js.map +1 -1
- package/components/dropdown/themes/dropdown-header.base.css.js +1 -1
- package/components/dropdown/themes/dropdown-header.base.css.js.map +1 -1
- package/components/dropdown/themes/dropdown-item.base.css.js +1 -1
- package/components/dropdown/themes/dropdown-item.base.css.js.map +1 -1
- package/components/dropdown/themes/dropdown.base.css.js +1 -1
- package/components/dropdown/themes/dropdown.base.css.js.map +1 -1
- package/components/expansion-panel/expansion-panel.d.ts +10 -10
- package/components/expansion-panel/expansion-panel.js +39 -39
- package/components/expansion-panel/expansion-panel.js.map +1 -1
- package/components/expansion-panel/themes/expansion-panel.base.css.js +1 -1
- package/components/expansion-panel/themes/expansion-panel.base.css.js.map +1 -1
- package/components/icon/icon-references.d.ts +28 -0
- package/components/icon/icon-references.js +151 -0
- package/components/icon/icon-references.js.map +1 -0
- package/components/icon/icon-state.broadcast.d.ts +10 -0
- package/components/icon/icon-state.broadcast.js +36 -0
- package/components/icon/icon-state.broadcast.js.map +1 -0
- package/components/icon/icon.d.ts +3 -3
- package/components/icon/icon.js +13 -7
- package/components/icon/icon.js.map +1 -1
- package/components/icon/icon.registry.d.ts +14 -14
- package/components/icon/icon.registry.js +70 -26
- package/components/icon/icon.registry.js.map +1 -1
- package/components/icon/internal-icons-lib.d.ts +2 -2
- package/components/icon/internal-icons-lib.js +2 -2
- package/components/icon/internal-icons-lib.js.map +1 -1
- package/components/icon/registry/default-map.d.ts +12 -0
- package/components/icon/registry/default-map.js +31 -0
- package/components/icon/registry/default-map.js.map +1 -0
- package/components/icon/registry/parser.d.ts +6 -0
- package/components/icon/registry/parser.js +21 -0
- package/components/icon/registry/parser.js.map +1 -0
- package/components/icon/registry/types.d.ts +34 -0
- package/components/icon/registry/types.js +7 -0
- package/components/icon/registry/types.js.map +1 -0
- package/components/icon/themes/icon.base.css.js +1 -1
- package/components/icon/themes/icon.base.css.js.map +1 -1
- package/components/input/input-base.d.ts +8 -21
- package/components/input/input-base.js +12 -41
- package/components/input/input-base.js.map +1 -1
- package/components/input/input.d.ts +3 -29
- package/components/input/input.js +4 -78
- package/components/input/input.js.map +1 -1
- package/components/input/themes/input.base.css.js +1 -1
- package/components/input/themes/input.base.css.js.map +1 -1
- package/components/input/validators.d.ts +4 -0
- package/components/input/validators.js +30 -0
- package/components/input/validators.js.map +1 -0
- package/components/list/list.d.ts +1 -3
- package/components/list/list.js +1 -2
- package/components/list/list.js.map +1 -1
- package/components/list/themes/container.base.css.js +1 -1
- package/components/list/themes/container.base.css.js.map +1 -1
- package/components/mask-input/mask-input-base.d.ts +3 -2
- package/components/mask-input/mask-input-base.js.map +1 -1
- package/components/mask-input/mask-input.d.ts +1 -4
- package/components/mask-input/mask-input.js +7 -17
- package/components/mask-input/mask-input.js.map +1 -1
- package/components/mask-input/validators.d.ts +3 -0
- package/components/mask-input/validators.js +11 -0
- package/components/mask-input/validators.js.map +1 -0
- package/components/nav-drawer/nav-drawer-item.d.ts +1 -5
- package/components/nav-drawer/nav-drawer-item.js +9 -10
- package/components/nav-drawer/nav-drawer-item.js.map +1 -1
- package/components/nav-drawer/nav-drawer.d.ts +4 -3
- package/components/nav-drawer/nav-drawer.js +18 -7
- package/components/nav-drawer/nav-drawer.js.map +1 -1
- package/components/nav-drawer/themes/container.base.css.js +1 -1
- package/components/nav-drawer/themes/container.base.css.js.map +1 -1
- package/components/nav-drawer/themes/header-item.base.css.js +1 -1
- package/components/nav-drawer/themes/header-item.base.css.js.map +1 -1
- package/components/nav-drawer/themes/item.base.css.js +1 -1
- package/components/nav-drawer/themes/item.base.css.js.map +1 -1
- package/components/navbar/themes/navbar.base.css.js +1 -1
- package/components/navbar/themes/navbar.base.css.js.map +1 -1
- package/components/popover/themes/light/popover.base.css.js +1 -1
- package/components/popover/themes/light/popover.base.css.js.map +1 -1
- package/components/progress/base.d.ts +2 -1
- package/components/progress/base.js.map +1 -1
- package/components/progress/themes/circular/circular.progress.base.css.js +1 -1
- package/components/progress/themes/circular/circular.progress.base.css.js.map +1 -1
- package/components/progress/themes/linear/linear.progress.base.css.js +1 -1
- package/components/progress/themes/linear/linear.progress.base.css.js.map +1 -1
- package/components/radio/radio.d.ts +9 -9
- package/components/radio/radio.js +17 -31
- package/components/radio/radio.js.map +1 -1
- package/components/radio/themes/radio.base.css.js +1 -1
- package/components/radio/themes/radio.base.css.js.map +1 -1
- package/components/radio/validators.d.ts +3 -0
- package/components/radio/validators.js +13 -0
- package/components/radio/validators.js.map +1 -0
- package/components/radio-group/radio-group.base.css.js +1 -1
- package/components/radio-group/radio-group.base.css.js.map +1 -1
- package/components/radio-group/radio-group.js.map +1 -1
- package/components/rating/rating.d.ts +1 -9
- package/components/rating/rating.js +6 -16
- package/components/rating/rating.js.map +1 -1
- package/components/rating/themes/rating-symbol.base.css.js +1 -1
- package/components/rating/themes/rating-symbol.base.css.js.map +1 -1
- package/components/rating/themes/rating.base.css.js +1 -1
- package/components/rating/themes/rating.base.css.js.map +1 -1
- package/components/ripple/ripple.material.css.js +1 -1
- package/components/ripple/ripple.material.css.js.map +1 -1
- package/components/select/select.d.ts +5 -33
- package/components/select/select.js +23 -66
- package/components/select/select.js.map +1 -1
- package/components/select/themes/select.base.css.js +1 -1
- package/components/select/themes/select.base.css.js.map +1 -1
- package/components/select/validators.d.ts +3 -0
- package/components/select/validators.js +5 -0
- package/components/select/validators.js.map +1 -0
- package/components/slider/range-slider.d.ts +0 -16
- package/components/slider/range-slider.js +0 -18
- package/components/slider/range-slider.js.map +1 -1
- package/components/slider/themes/slider.base.css.js +1 -1
- package/components/slider/themes/slider.base.css.js.map +1 -1
- package/components/snackbar/snackbar.js +3 -7
- package/components/snackbar/snackbar.js.map +1 -1
- package/components/snackbar/themes/snackbar.base.css.js +1 -1
- package/components/snackbar/themes/snackbar.base.css.js.map +1 -1
- package/components/stepper/animations.d.ts +7 -1
- package/components/stepper/animations.js +63 -15
- package/components/stepper/animations.js.map +1 -1
- package/components/stepper/step.d.ts +3 -1
- package/components/stepper/step.js +17 -6
- package/components/stepper/step.js.map +1 -1
- package/components/stepper/themes/step/step.base.css.js +1 -1
- package/components/stepper/themes/step/step.base.css.js.map +1 -1
- package/components/stepper/themes/stepper/stepper.base.css.js +1 -1
- package/components/stepper/themes/stepper/stepper.base.css.js.map +1 -1
- package/components/stepper/themes/stepper/stepper.bootstrap.css.js +1 -1
- package/components/stepper/themes/stepper/stepper.bootstrap.css.js.map +1 -1
- package/components/stepper/themes/stepper/stepper.fluent.css.js +1 -1
- package/components/stepper/themes/stepper/stepper.fluent.css.js.map +1 -1
- package/components/stepper/themes/stepper/stepper.indigo.css.js +1 -1
- package/components/stepper/themes/stepper/stepper.indigo.css.js.map +1 -1
- package/components/tabs/tabs.js +2 -3
- package/components/tabs/tabs.js.map +1 -1
- package/components/tabs/themes/tab.base.css.js +1 -1
- package/components/tabs/themes/tab.base.css.js.map +1 -1
- package/components/tabs/themes/tabs.base.css.js +1 -1
- package/components/tabs/themes/tabs.base.css.js.map +1 -1
- package/components/textarea/textarea.d.ts +13 -16
- package/components/textarea/textarea.js +10 -12
- package/components/textarea/textarea.js.map +1 -1
- package/components/textarea/themes/textarea.base.css.js +1 -1
- package/components/textarea/themes/textarea.base.css.js.map +1 -1
- package/components/textarea/validators.d.ts +3 -0
- package/components/textarea/validators.js +7 -0
- package/components/textarea/validators.js.map +1 -0
- package/components/toast/themes/toast.base.css.js +1 -1
- package/components/toast/themes/toast.base.css.js.map +1 -1
- package/components/tree/themes/container.base.css.js +1 -1
- package/components/tree/themes/container.base.css.js.map +1 -1
- package/components/tree/themes/item.base.css.js +1 -1
- package/components/tree/themes/item.base.css.js.map +1 -1
- package/components/tree/tree-item.d.ts +4 -4
- package/components/tree/tree-item.js +11 -23
- package/components/tree/tree-item.js.map +1 -1
- package/components/tree/tree.d.ts +3 -4
- package/components/tree/tree.js +1 -37
- package/components/tree/tree.js.map +1 -1
- package/components/types.d.ts +3 -0
- package/components/types.js +2 -0
- package/components/types.js.map +1 -0
- package/custom-elements.json +30656 -31315
- package/igniteui-webcomponents.css-data.json +5 -928
- package/igniteui-webcomponents.html-data.json +4 -2699
- package/index.d.ts +5 -4
- package/index.js +2 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/theming/config.js +3 -3
- package/theming/config.js.map +1 -1
- package/theming/theming-controller.d.ts +4 -6
- package/theming/theming-controller.js +30 -34
- package/theming/theming-controller.js.map +1 -1
- package/theming/theming-decorator.d.ts +29 -11
- package/theming/theming-decorator.js +21 -7
- package/theming/theming-decorator.js.map +1 -1
- package/theming/theming-event.js.map +1 -1
- package/theming/types.d.ts +5 -0
- package/theming/types.js.map +1 -1
- package/theming/utils.d.ts +1 -1
- package/theming/utils.js +8 -8
- package/theming/utils.js.map +1 -1
- package/web-types.json +12 -7621
- package/components/calendar/common/calendar-base.d.ts +0 -40
- package/components/calendar/common/calendar-base.js +0 -118
- package/components/calendar/common/calendar-base.js.map +0 -1
- package/components/calendar/common/calendar.model.d.ts +0 -128
- package/components/calendar/common/calendar.model.js +0 -246
- package/components/calendar/common/calendar.model.js.map +0 -1
- package/components/calendar/common/utils.d.ts +0 -12
- package/components/calendar/common/utils.js +0 -54
- package/components/calendar/common/utils.js.map +0 -1
- package/components/common/decorators/alternateName.d.ts +0 -7
- package/components/common/decorators/alternateName.js +0 -4
- package/components/common/decorators/alternateName.js.map +0 -1
- package/components/common/decorators/blazorSuppress.d.ts +0 -5
- package/components/common/decorators/blazorSuppress.js +0 -4
- package/components/common/decorators/blazorSuppress.js.map +0 -1
- package/components/common/decorators/blazorTwoWayBind.d.ts +0 -7
- package/components/common/decorators/blazorTwoWayBind.js +0 -4
- package/components/common/decorators/blazorTwoWayBind.js.map +0 -1
- package/components/common/mixins/sizable.d.ts +0 -13
- package/components/common/mixins/sizable.js +0 -27
- package/components/common/mixins/sizable.js.map +0 -1
- package/components/form/form.d.ts +0 -48
- package/components/form/form.js +0 -158
- package/components/form/form.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range-slider.js","sourceRoot":"","sources":["../../../src/components/slider/range-slider.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAm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;gEACb;AAOzB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;gEACb;AAShC;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;6DAG3C;AAaD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;6DAG3C","sourcesContent":["import { html, nothing } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { styleMap } from 'lit/directives/style-map.js';\n\nimport { registerComponent } from '../common/definitions/register.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { asNumber, asPercent } from '../common/util.js';\nimport { IgcSliderBaseComponent } from './slider-base.js';\nimport IgcSliderLabelComponent from './slider-label.js';\n\n/* blazorSuppress */\nexport interface IgcRangeSliderValue {\n lower: number;\n upper: number;\n}\n\nexport interface IgcRangeSliderEventMap {\n /**\n * Emitted when a value is changed via thumb drag or keyboard interaction.\n */\n igcInput: CustomEvent<IgcRangeSliderValue>;\n /**\n * Emitted when a value change is committed on a thumb drag end or keyboard interaction.\n */\n igcChange: CustomEvent<IgcRangeSliderValue>;\n}\n\n/**\n * A range slider component used to select two numeric values within a range.\n *\n * @element igc-range-slider\n *\n * @fires igcInput - Emitted when a value is changed via thumb drag or keyboard interaction.\n * @fires igcChange - Emitted when a value change is committed on a thumb drag end or keyboard interaction.\n *\n * @csspart base - The base wrapper of the slider.\n * @csspart ticks - The ticks container.\n * @csspart tick-group - The tick group container.\n * @csspart tick - The tick element.\n * @csspart tick-label - The tick label element.\n * @csspart tick-label-inner - The inner element of the tick label.\n * @csspart thumbs - The thumbs container.\n * @csspart thumb - The thumb element.\n * @csspart thumb-label - The thumb tooltip label container.\n * @csspart thumb-label-inner - The thumb tooltip label inner element.\n * @csspart track - The track container.\n * @csspart steps - The track steps element.\n * @csspart inactive - The inactive element of the track.\n * @csspart fill - The filled part of the track.\n */\nexport default class IgcRangeSliderComponent extends EventEmitterMixin<\n IgcRangeSliderEventMap,\n Constructor<IgcSliderBaseComponent>\n>(IgcSliderBaseComponent) {\n public static readonly tagName = 'igc-range-slider';\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcRangeSliderComponent, IgcSliderLabelComponent);\n }\n\n @query('#thumbFrom')\n private thumbFrom!: HTMLElement;\n\n @query('#thumbTo')\n private thumbTo!: HTMLElement;\n\n private _lower = 0;\n private _upper = 0;\n\n /**\n * The current value of the lower thumb.\n * @attr\n */\n @property({ type: Number })\n public set lower(val: number) {\n this._lower = this.validateValue(asNumber(val, this._lower));\n }\n\n public get lower(): number {\n return this._lower;\n }\n\n /**\n * The current value of the upper thumb.\n * @attr\n */\n @property({ type: Number })\n public set upper(val: number) {\n this._upper = this.validateValue(asNumber(val, this._upper));\n }\n\n public get upper(): number {\n return this._upper;\n }\n\n /**\n * The aria label for the lower thumb.\n * @attr thumb-label-lower\n */\n @property({ attribute: 'thumb-label-lower' })\n public thumbLabelLower!: string;\n\n /**\n * The aria label for the upper thumb.\n * @attr thumb-label-upper\n */\n @property({ attribute: 'thumb-label-upper' })\n public thumbLabelUpper!: string;\n\n /**\n * The aria label of the lower thumb.\n * @attr aria-label-lower\n *\n * @deprecated since v4.8.0. Use the `thumbLabelLower` property instead.\n */\n @property({ attribute: 'aria-label-lower' })\n public set ariaLabelLower(value: string) {\n this.thumbLabelLower = value;\n }\n\n public get ariaLabelLower() {\n return this.thumbLabelLower;\n }\n\n /**\n * The aria label of the upper thumb.\n * @attr aria-label-upper\n *\n * @deprecated since v4.8.0. Use the `thumbLabelUpper` property instead.\n */\n @property({ attribute: 'aria-label-upper' })\n public set ariaLabelUpper(value: string) {\n this.thumbLabelUpper = value;\n }\n\n public get ariaLabelUpper() {\n return this.thumbLabelUpper;\n }\n\n protected override get activeValue(): number {\n return this.activeThumb === this.thumbFrom ? this.lower : this.upper;\n }\n\n protected override normalizeValue(): void {\n this._lower = this.validateValue(this._lower);\n this._upper = this.validateValue(this._upper);\n }\n\n protected override getTrackStyle() {\n const start = asPercent(this.lower - this.min, this.distance);\n return {\n insetInlineStart: `${start}%`,\n width: `${asPercent(this.upper - this.min, this.distance) - start}%`,\n };\n }\n\n private closestTo(goal: number, positions: number[]): number {\n return positions.reduce((previous, current) =>\n Math.abs(goal - current) < Math.abs(goal - previous) ? current : previous\n );\n }\n\n protected override closestHandle(event: PointerEvent): HTMLElement {\n const fromOffset =\n this.thumbFrom.offsetLeft + this.thumbFrom.offsetWidth / 2;\n const toOffset = this.thumbTo.offsetLeft + this.thumbTo.offsetWidth / 2;\n const xPointer = event.clientX - this.getBoundingClientRect().left;\n const match = this.closestTo(xPointer, [fromOffset, toOffset]);\n\n if (fromOffset === toOffset && toOffset < xPointer) {\n return this.thumbTo;\n }\n if (fromOffset === toOffset && toOffset > xPointer) {\n return this.thumbFrom;\n }\n if (match === fromOffset) {\n return this.thumbFrom;\n }\n return this.thumbTo;\n }\n\n protected override updateValue(increment: number) {\n const oldValue = this.activeValue;\n let [lower, upper] = [this.lower, this.upper];\n\n if (this.activeThumb === this.thumbFrom) {\n lower += increment;\n } else {\n upper += increment;\n }\n\n if (lower >= upper) {\n [this.lower, this.upper] = [upper, lower];\n this.toggleActiveThumb();\n } else {\n [this.lower, this.upper] = [lower, upper];\n }\n\n if (oldValue === this.activeValue) {\n return false;\n }\n\n this.emitInputEvent();\n return true;\n }\n\n protected override emitInputEvent() {\n this.emitEvent('igcInput', {\n detail: { lower: this.lower, upper: this.upper },\n });\n }\n\n protected override emitChangeEvent() {\n this.emitEvent('igcChange', {\n detail: { lower: this.lower, upper: this.upper },\n });\n }\n\n private toggleActiveThumb() {\n const thumb =\n this.activeThumb === this.thumbFrom ? this.thumbTo : this.thumbFrom;\n thumb.focus();\n }\n\n private handleFocus(event: FocusEvent) {\n this.activeThumb = event.target as HTMLElement;\n const id = this.activeThumb.id;\n\n for (const thumb of [this.thumbFrom, this.thumbTo]) {\n if (thumb.id === id) continue;\n const [activeValue, thumbVal] = [\n asNumber(this.activeThumb.ariaValueNow),\n asNumber(thumb.ariaValueNow),\n ];\n\n this.activeThumb.ariaValueText = `${this.formatValue(Math.min(activeValue, thumbVal))} - ${this.formatValue(Math.max(activeValue, thumbVal))}`;\n }\n }\n\n protected override renderThumb(\n value: number,\n ariaLabel?: string,\n thumbId?: string\n ) {\n const percent = `${asPercent(value - this.min, this.distance)}%`;\n const thumbStyles = { insetInlineStart: percent };\n const tooltipStyles = {\n insetInlineStart: percent,\n opacity: this.thumbLabelsVisible ? 1 : 0,\n };\n const ariaValueText =\n thumbId === 'thumbFrom' ? `min ${this.lower}` : `max ${this.upper}`;\n\n const textValue = this.hasLabels\n ? this.labels[value]\n : this.valueFormat || this.valueFormatOptions\n ? this.formatValue(value)\n : ariaValueText;\n\n return html`\n <div\n part=\"thumb\"\n id=${ifDefined(thumbId)}\n tabindex=${this.disabled ? -1 : 0}\n style=${styleMap(thumbStyles)}\n role=\"slider\"\n aria-valuemin=${this.lowerBound}\n aria-valuemax=${this.upperBound}\n aria-valuenow=${value}\n aria-valuetext=${ifDefined(textValue)}\n aria-label=${ifDefined(ariaLabel)}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n @pointerenter=${this.showThumbLabels}\n @pointerleave=${this.hideThumbLabels}\n @focus=${this.handleFocus}\n @blur=${this.handleThumbBlur}\n ></div>\n ${this.hideTooltip\n ? nothing\n : html`\n <div part=\"thumb-label\" style=${styleMap(tooltipStyles)}>\n <div part=\"thumb-label-inner\">\n ${this.hasLabels ? this.labels[value] : this.formatValue(value)}\n </div>\n </div>\n `}\n `;\n }\n\n protected override renderThumbs() {\n return html`${this.renderThumb(\n this.lower,\n this.thumbLabelLower,\n 'thumbFrom'\n )}\n ${this.renderThumb(this.upper, this.thumbLabelUpper, 'thumbTo')}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-range-slider': IgcRangeSliderComponent;\n }\n}\n"]}
|
|
1
|
+
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{ property, query } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { styleMap } from 'lit/directives/style-map.js';\n\nimport { registerComponent } from '../common/definitions/register.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { asNumber, asPercent } from '../common/util.js';\nimport { IgcSliderBaseComponent } from './slider-base.js';\nimport IgcSliderLabelComponent from './slider-label.js';\n\n/* blazorSuppress */\nexport interface IgcRangeSliderValue {\n lower: number;\n upper: number;\n}\n\nexport interface IgcRangeSliderEventMap {\n /**\n * Emitted when a value is changed via thumb drag or keyboard interaction.\n */\n igcInput: CustomEvent<IgcRangeSliderValue>;\n /**\n * Emitted when a value change is committed on a thumb drag end or keyboard interaction.\n */\n igcChange: CustomEvent<IgcRangeSliderValue>;\n}\n\n/**\n * A range slider component used to select two numeric values within a range.\n *\n * @element igc-range-slider\n *\n * @fires igcInput - Emitted when a value is changed via thumb drag or keyboard interaction.\n * @fires igcChange - Emitted when a value change is committed on a thumb drag end or keyboard interaction.\n *\n * @csspart base - The base wrapper of the slider.\n * @csspart ticks - The ticks container.\n * @csspart tick-group - The tick group container.\n * @csspart tick - The tick element.\n * @csspart tick-label - The tick label element.\n * @csspart tick-label-inner - The inner element of the tick label.\n * @csspart thumbs - The thumbs container.\n * @csspart thumb - The thumb element.\n * @csspart thumb-label - The thumb tooltip label container.\n * @csspart thumb-label-inner - The thumb tooltip label inner element.\n * @csspart track - The track container.\n * @csspart steps - The track steps element.\n * @csspart inactive - The inactive element of the track.\n * @csspart fill - The filled part of the track.\n */\nexport default class IgcRangeSliderComponent extends EventEmitterMixin<\n IgcRangeSliderEventMap,\n Constructor<IgcSliderBaseComponent>\n>(IgcSliderBaseComponent) {\n public static readonly tagName = 'igc-range-slider';\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcRangeSliderComponent, IgcSliderLabelComponent);\n }\n\n @query('#thumbFrom')\n private thumbFrom!: HTMLElement;\n\n @query('#thumbTo')\n private thumbTo!: HTMLElement;\n\n private _lower = 0;\n private _upper = 0;\n\n /**\n * The current value of the lower thumb.\n * @attr\n */\n @property({ type: Number })\n public set lower(val: number) {\n this._lower = this.validateValue(asNumber(val, this._lower));\n }\n\n public get lower(): number {\n return this._lower;\n }\n\n /**\n * The current value of the upper thumb.\n * @attr\n */\n @property({ type: Number })\n public set upper(val: number) {\n this._upper = this.validateValue(asNumber(val, this._upper));\n }\n\n public get upper(): number {\n return this._upper;\n }\n\n /**\n * The aria label for the lower thumb.\n * @attr thumb-label-lower\n */\n @property({ attribute: 'thumb-label-lower' })\n public thumbLabelLower!: string;\n\n /**\n * The aria label for the upper thumb.\n * @attr thumb-label-upper\n */\n @property({ attribute: 'thumb-label-upper' })\n public thumbLabelUpper!: string;\n\n protected override get activeValue(): number {\n return this.activeThumb === this.thumbFrom ? this.lower : this.upper;\n }\n\n protected override normalizeValue(): void {\n this._lower = this.validateValue(this._lower);\n this._upper = this.validateValue(this._upper);\n }\n\n protected override getTrackStyle() {\n const start = asPercent(this.lower - this.min, this.distance);\n return {\n insetInlineStart: `${start}%`,\n width: `${asPercent(this.upper - this.min, this.distance) - start}%`,\n };\n }\n\n private closestTo(goal: number, positions: number[]): number {\n return positions.reduce((previous, current) =>\n Math.abs(goal - current) < Math.abs(goal - previous) ? current : previous\n );\n }\n\n protected override closestHandle(event: PointerEvent): HTMLElement {\n const fromOffset =\n this.thumbFrom.offsetLeft + this.thumbFrom.offsetWidth / 2;\n const toOffset = this.thumbTo.offsetLeft + this.thumbTo.offsetWidth / 2;\n const xPointer = event.clientX - this.getBoundingClientRect().left;\n const match = this.closestTo(xPointer, [fromOffset, toOffset]);\n\n if (fromOffset === toOffset && toOffset < xPointer) {\n return this.thumbTo;\n }\n if (fromOffset === toOffset && toOffset > xPointer) {\n return this.thumbFrom;\n }\n if (match === fromOffset) {\n return this.thumbFrom;\n }\n return this.thumbTo;\n }\n\n protected override updateValue(increment: number) {\n const oldValue = this.activeValue;\n let [lower, upper] = [this.lower, this.upper];\n\n if (this.activeThumb === this.thumbFrom) {\n lower += increment;\n } else {\n upper += increment;\n }\n\n if (lower >= upper) {\n [this.lower, this.upper] = [upper, lower];\n this.toggleActiveThumb();\n } else {\n [this.lower, this.upper] = [lower, upper];\n }\n\n if (oldValue === this.activeValue) {\n return false;\n }\n\n this.emitInputEvent();\n return true;\n }\n\n protected override emitInputEvent() {\n this.emitEvent('igcInput', {\n detail: { lower: this.lower, upper: this.upper },\n });\n }\n\n protected override emitChangeEvent() {\n this.emitEvent('igcChange', {\n detail: { lower: this.lower, upper: this.upper },\n });\n }\n\n private toggleActiveThumb() {\n const thumb =\n this.activeThumb === this.thumbFrom ? this.thumbTo : this.thumbFrom;\n thumb.focus();\n }\n\n private handleFocus(event: FocusEvent) {\n this.activeThumb = event.target as HTMLElement;\n const id = this.activeThumb.id;\n\n for (const thumb of [this.thumbFrom, this.thumbTo]) {\n if (thumb.id === id) continue;\n const [activeValue, thumbVal] = [\n asNumber(this.activeThumb.ariaValueNow),\n asNumber(thumb.ariaValueNow),\n ];\n\n this.activeThumb.ariaValueText = `${this.formatValue(Math.min(activeValue, thumbVal))} - ${this.formatValue(Math.max(activeValue, thumbVal))}`;\n }\n }\n\n protected override renderThumb(\n value: number,\n ariaLabel?: string,\n thumbId?: string\n ) {\n const percent = `${asPercent(value - this.min, this.distance)}%`;\n const thumbStyles = { insetInlineStart: percent };\n const tooltipStyles = {\n insetInlineStart: percent,\n opacity: this.thumbLabelsVisible ? 1 : 0,\n };\n const ariaValueText =\n thumbId === 'thumbFrom' ? `min ${this.lower}` : `max ${this.upper}`;\n\n const textValue = this.hasLabels\n ? this.labels[value]\n : this.valueFormat || this.valueFormatOptions\n ? this.formatValue(value)\n : ariaValueText;\n\n return html`\n <div\n part=\"thumb\"\n id=${ifDefined(thumbId)}\n tabindex=${this.disabled ? -1 : 0}\n style=${styleMap(thumbStyles)}\n role=\"slider\"\n aria-valuemin=${this.lowerBound}\n aria-valuemax=${this.upperBound}\n aria-valuenow=${value}\n aria-valuetext=${ifDefined(textValue)}\n aria-label=${ifDefined(ariaLabel)}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n @pointerenter=${this.showThumbLabels}\n @pointerleave=${this.hideThumbLabels}\n @focus=${this.handleFocus}\n @blur=${this.handleThumbBlur}\n ></div>\n ${this.hideTooltip\n ? nothing\n : html`\n <div part=\"thumb-label\" style=${styleMap(tooltipStyles)}>\n <div part=\"thumb-label-inner\">\n ${this.hasLabels ? this.labels[value] : this.formatValue(value)}\n </div>\n </div>\n `}\n `;\n }\n\n protected override renderThumbs() {\n return html`${this.renderThumb(\n this.lower,\n this.thumbLabelLower,\n 'thumbFrom'\n )}\n ${this.renderThumb(this.upper, this.thumbLabelUpper, 'thumbTo')}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-range-slider': IgcRangeSliderComponent;\n }\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size);scrollbar-color:var(--ig-scrollbar-thumb-background) var(--ig-scrollbar-track-background)}:host
|
|
2
|
+
export const styles = css `:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size);scrollbar-color:var(--ig-scrollbar-thumb-background) var(--ig-scrollbar-track-background)}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size);height:var(--ig-scrollbar-size);background:var(--ig-scrollbar-track-background)}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background)}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{display:block}slot{display:none}[part~=base]{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:3rem;-webkit-transition:all .2s ease-out;transition:all .2s ease-out;font-family:var(--ig-font-family);-ms-touch-action:pan-y pinch-zoom;touch-action:pan-y pinch-zoom}[part=track]{border-radius:clamp(0rem,calc(var(--ig-radius-factor, 1) * 2rem),2rem);position:relative;width:100%;overflow:hidden}[part=fill]{position:absolute;border-radius:inherit}[part=inactive]{position:absolute;width:100%;top:.0625rem;-webkit-transition:background .2s ease-out;transition:background .2s ease-out;border-radius:inherit}[part=steps]{position:absolute;width:100%;height:.25rem;opacity:.85;-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}[part=steps] svg{clip-path:inset(0 0.1875rem 0 0.1875rem)}[part=steps] line{-webkit-transform:translateY(25%);-ms-transform:translateY(25%);transform:translateY(25%);stroke:currentcolor;stroke-width:.1875rem;stroke-linecap:round}[part=ticks]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;bottom:0;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}[part=ticks]:first-child{bottom:auto;top:0;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}[part=ticks]:first-child [part=tick-label]{top:auto;bottom:1.5rem}[part=tick-group]:first-of-type{-webkit-margin-start:-0.0625rem;margin-inline-start:-0.0625rem}[part=tick-group]:last-of-type{-webkit-margin-end:-0.0625rem;margin-inline-end:-0.0625rem}[part=tick]{height:.5rem;width:.125rem}[part=tick][data-primary=true]{height:1rem}[part=tick-label]{position:absolute;top:1.5rem;line-height:.7;opacity:1;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out;font-family:var(--ig-caption-font-family, var(--ig-font-family));font-size:var(--ig-caption-font-size);font-weight:var(--ig-caption-font-weight);font-style:var(--ig-caption-font-style);line-height:var(--ig-caption-line-height);letter-spacing:var(--ig-caption-letter-spacing);text-transform:var(--ig-caption-text-transform);margin-top:var(--ig-caption-margin-top);margin-bottom:var(--ig-caption-margin-bottom)}[part=tick-label-inner]{-webkit-margin-start:-50%;margin-inline-start:-50%}[part=thumbs]{position:absolute;width:100%;height:0;cursor:default;inset-inline-start:0}[part~=thumb]{border-radius:clamp(0rem,calc(var(--ig-radius-factor, 1) * 0.625rem),0.625rem);position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;outline-style:none;-webkit-transition:border-radius .1s ease-out,-webkit-transform .1s ease-out;transition:border-radius .1s ease-out,-webkit-transform .1s ease-out;transition:transform .1s ease-out,border-radius .1s ease-out;transition:transform .1s ease-out,border-radius .1s ease-out,-webkit-transform .1s ease-out}[part=thumb-label]{position:absolute;top:calc((1.875rem + 1.25rem)*-1);pointer-events:none;height:1.875rem;display:-webkit-box;display:-ms-flexbox;display:flex}[part=thumb-label-inner]{font-family:var(--ig-caption-font-family, var(--ig-font-family));font-size:var(--ig-caption-font-size);font-weight:var(--ig-caption-font-weight);font-style:var(--ig-caption-font-style);line-height:var(--ig-caption-line-height);letter-spacing:var(--ig-caption-letter-spacing);text-transform:var(--ig-caption-text-transform);margin-top:var(--ig-caption-margin-top);margin-bottom:var(--ig-caption-margin-bottom);border-radius:clamp(0rem,calc(var(--ig-radius-factor, 1) * 0.125rem),0.125rem);display:-webkit-box;display:-ms-flexbox;display:flex;min-width:2.5rem;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;white-space:nowrap;-webkit-margin-start:-50%;margin-inline-start:-50%;padding:0 .125rem}[part=thumb-label-inner]::after{content:"";position:absolute;top:85%;border-left:.625rem solid rgba(0,0,0,0);border-right:.625rem solid rgba(0,0,0,0)}:host(:not([tick-label-rotation="0"])) [part=tick-label-inner]{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;-webkit-margin-start:0;margin-inline-start:0;margin-block:-50%}:host([tick-label-rotation="-90"]) [part=tick-label-inner]{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}:host([disabled]),:host(:disabled){-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;cursor:initial}`;
|
|
3
3
|
//# sourceMappingURL=slider.base.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.base.css.js","sourceRoot":"","sources":["../../../../src/components/slider/themes/slider.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,ypLAAypL,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size);scrollbar-color:var(--ig-scrollbar-thumb-background) var(--ig-scrollbar-track-background)}:host
|
|
1
|
+
{"version":3,"file":"slider.base.css.js","sourceRoot":"","sources":["../../../../src/components/slider/themes/slider.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,ypLAAypL,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size);scrollbar-color:var(--ig-scrollbar-thumb-background) var(--ig-scrollbar-track-background)}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size);height:var(--ig-scrollbar-size);background:var(--ig-scrollbar-track-background)}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background)}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{display:block}slot{display:none}[part~=base]{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:3rem;-webkit-transition:all .2s ease-out;transition:all .2s ease-out;font-family:var(--ig-font-family);-ms-touch-action:pan-y pinch-zoom;touch-action:pan-y pinch-zoom}[part=track]{border-radius:clamp(0rem,calc(var(--ig-radius-factor, 1) * 2rem),2rem);position:relative;width:100%;overflow:hidden}[part=fill]{position:absolute;border-radius:inherit}[part=inactive]{position:absolute;width:100%;top:.0625rem;-webkit-transition:background .2s ease-out;transition:background .2s ease-out;border-radius:inherit}[part=steps]{position:absolute;width:100%;height:.25rem;opacity:.85;-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}[part=steps] svg{clip-path:inset(0 0.1875rem 0 0.1875rem)}[part=steps] line{-webkit-transform:translateY(25%);-ms-transform:translateY(25%);transform:translateY(25%);stroke:currentcolor;stroke-width:.1875rem;stroke-linecap:round}[part=ticks]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;bottom:0;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}[part=ticks]:first-child{bottom:auto;top:0;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}[part=ticks]:first-child [part=tick-label]{top:auto;bottom:1.5rem}[part=tick-group]:first-of-type{-webkit-margin-start:-0.0625rem;margin-inline-start:-0.0625rem}[part=tick-group]:last-of-type{-webkit-margin-end:-0.0625rem;margin-inline-end:-0.0625rem}[part=tick]{height:.5rem;width:.125rem}[part=tick][data-primary=true]{height:1rem}[part=tick-label]{position:absolute;top:1.5rem;line-height:.7;opacity:1;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out;font-family:var(--ig-caption-font-family, var(--ig-font-family));font-size:var(--ig-caption-font-size);font-weight:var(--ig-caption-font-weight);font-style:var(--ig-caption-font-style);line-height:var(--ig-caption-line-height);letter-spacing:var(--ig-caption-letter-spacing);text-transform:var(--ig-caption-text-transform);margin-top:var(--ig-caption-margin-top);margin-bottom:var(--ig-caption-margin-bottom)}[part=tick-label-inner]{-webkit-margin-start:-50%;margin-inline-start:-50%}[part=thumbs]{position:absolute;width:100%;height:0;cursor:default;inset-inline-start:0}[part~=thumb]{border-radius:clamp(0rem,calc(var(--ig-radius-factor, 1) * 0.625rem),0.625rem);position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;outline-style:none;-webkit-transition:border-radius .1s ease-out,-webkit-transform .1s ease-out;transition:border-radius .1s ease-out,-webkit-transform .1s ease-out;transition:transform .1s ease-out,border-radius .1s ease-out;transition:transform .1s ease-out,border-radius .1s ease-out,-webkit-transform .1s ease-out}[part=thumb-label]{position:absolute;top:calc((1.875rem + 1.25rem)*-1);pointer-events:none;height:1.875rem;display:-webkit-box;display:-ms-flexbox;display:flex}[part=thumb-label-inner]{font-family:var(--ig-caption-font-family, var(--ig-font-family));font-size:var(--ig-caption-font-size);font-weight:var(--ig-caption-font-weight);font-style:var(--ig-caption-font-style);line-height:var(--ig-caption-line-height);letter-spacing:var(--ig-caption-letter-spacing);text-transform:var(--ig-caption-text-transform);margin-top:var(--ig-caption-margin-top);margin-bottom:var(--ig-caption-margin-bottom);border-radius:clamp(0rem,calc(var(--ig-radius-factor, 1) * 0.125rem),0.125rem);display:-webkit-box;display:-ms-flexbox;display:flex;min-width:2.5rem;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;white-space:nowrap;-webkit-margin-start:-50%;margin-inline-start:-50%;padding:0 .125rem}[part=thumb-label-inner]::after{content:\"\";position:absolute;top:85%;border-left:.625rem solid rgba(0,0,0,0);border-right:.625rem solid rgba(0,0,0,0)}:host(:not([tick-label-rotation=\"0\"])) [part=tick-label-inner]{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;-webkit-margin-start:0;margin-inline-start:0;margin-block:-50%}:host([tick-label-rotation=\"-90\"]) [part=tick-label-inner]{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}:host([disabled]),:host(:disabled){-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;cursor:initial}`;\n"]}
|
|
@@ -38,13 +38,9 @@ let IgcSnackbarComponent = IgcSnackbarComponent_1 = class IgcSnackbarComponent e
|
|
|
38
38
|
|
|
39
39
|
<slot name="action" part="action-container" @click=${this.handleClick}>
|
|
40
40
|
${this.actionText
|
|
41
|
-
? html `<igc-button
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
variant="flat"
|
|
45
|
-
size="small"
|
|
46
|
-
>${this.actionText}</igc-button
|
|
47
|
-
>`
|
|
41
|
+
? html `<igc-button type="button" part="action" variant="flat">
|
|
42
|
+
${this.actionText}
|
|
43
|
+
</igc-button>`
|
|
48
44
|
: nothing}
|
|
49
45
|
</slot>
|
|
50
46
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snackbar.js","sourceRoot":"","sources":["../../../src/components/snackbar/snackbar.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAY,SAAS,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,kBAAkB,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAuB1B,IAAM,oBAAoB,4BAA1B,MAAM,oBAAqB,SAAQ,iBAAiB,CAGjE,yBAAyB,CAAC;IAHb;;QAYH,eAAU,GAAqB,SAAS,EAAE,CAAC;QAClC,qBAAgB,GAE/B,sBAAsB,CAAC,IAAI,EAAE,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,CAAC,uBAAuB,CAAC,IAAI,CAAC,IAAI;;;;;6DAKL,IAAI,CAAC,WAAW;YACjE,IAAI,CAAC,UAAU;YACf,CAAC,CAAC,IAAI,CAAA;kBACA,IAAI,CAAC,UAAU;4BACL;YAChB,CAAC,CAAC,OAAO;;;KAGhB,CAAC;IACJ,CAAC;;AAxCsB,4BAAO,GAAG,cAAc,AAAjB,CAAkB;AAClC,2BAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,AAAnB,CAAoB;AAiBjC;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;wDACZ;AAtBR,oBAAoB;IADxC,MAAM,CAAC,GAAG,CAAC;GACS,oBAAoB,CA6CxC;eA7CoB,oBAAoB","sourcesContent":["import { html, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { type Ref, createRef, ref } from 'lit/directives/ref.js';\n\nimport { addAnimationController } from '../../animations/player.js';\nimport { themes } from '../../theming/theming-decorator.js';\nimport IgcButtonComponent from '../button/button.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport { IgcBaseAlertLikeComponent } from '../common/mixins/alert.js';\nimport type { AbstractConstructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { styles as shared } from './themes/shared/snackbar.common.css.js';\nimport { styles } from './themes/snackbar.base.css.js';\nimport { all } from './themes/themes.js';\n\nexport interface IgcSnackbarEventMap {\n igcAction: CustomEvent<void>;\n}\n\n/**\n * A snackbar component is used to provide feedback about an operation\n * by showing a brief message at the bottom of the screen.\n *\n * @element igc-snackbar\n *\n * @slot - Default slot to render the snackbar content.\n * @slot action - Renders the action part of the snackbar. Usually an interactive element (button)\n *\n * @fires igcAction - Emitted when the snackbar action button is clicked.\n *\n * @csspart base - The base wrapper of the snackbar component.\n * @csspart message - The snackbar message.\n * @csspart action - The default snackbar action button.\n * @csspart action-container - The area holding the actions.\n */\n@themes(all)\nexport default class IgcSnackbarComponent extends EventEmitterMixin<\n IgcSnackbarEventMap,\n AbstractConstructor<IgcBaseAlertLikeComponent>\n>(IgcBaseAlertLikeComponent) {\n public static readonly tagName = 'igc-snackbar';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcSnackbarComponent, IgcButtonComponent);\n }\n\n protected contentRef: Ref<HTMLElement> = createRef();\n protected override _animationPlayer: ReturnType<\n typeof addAnimationController\n > = addAnimationController(this, this.contentRef);\n\n /**\n * The snackbar action button.\n * @attr action-text\n */\n @property({ attribute: 'action-text' })\n public actionText!: string;\n\n private handleClick() {\n this.emitEvent('igcAction');\n }\n\n protected override render() {\n return html`\n <div ${ref(this.contentRef)} part=\"base\" .inert=${!this.open}>\n <span part=\"message\">\n <slot></slot>\n </span>\n\n <slot name=\"action\" part=\"action-container\" @click=${this.handleClick}>\n ${this.actionText\n ? html`<igc-button type=\"button\" part=\"action\" variant=\"flat\">\n ${this.actionText}\n </igc-button>`\n : nothing}\n </slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-snackbar': IgcSnackbarComponent;\n }\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size);scrollbar-color:var(--ig-scrollbar-thumb-background) var(--ig-scrollbar-track-background)}:host
|
|
2
|
+
export const styles = css `:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size);scrollbar-color:var(--ig-scrollbar-thumb-background) var(--ig-scrollbar-track-background)}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size);height:var(--ig-scrollbar-size);background:var(--ig-scrollbar-track-background)}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background)}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{position:fixed;font-family:var(--ig-font-family);inset-inline:50% auto;-webkit-transform:translateX(calc(-50% + 0.5px));-ms-transform:translateX(calc(-50% + 0.5px));transform:translateX(calc(-50% + 0.5px))}:host([position=bottom]){inset-block:auto 0}:host([position=middle]){inset-block:50% auto;-webkit-transform:translate(calc(-50% + 0.5px), calc(-50% + 0.5px));-ms-transform:translate(calc(-50% + 0.5px), calc(-50% + 0.5px));transform:translate(calc(-50% + 0.5px), calc(-50% + 0.5px));margin:auto}:host([position=top]){inset-block:0 auto}[part~=base]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:row nowrap;flex-wrap:row nowrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;min-height:3rem;padding:.4375rem 1.5rem;margin:.5rem;gap:1.5rem;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}[part~=message]{font-family:var(--ig-body-2-font-family, var(--ig-font-family));font-size:var(--ig-body-2-font-size);font-weight:var(--ig-body-2-font-weight);font-style:var(--ig-body-2-font-style);line-height:var(--ig-body-2-line-height);letter-spacing:var(--ig-body-2-letter-spacing);text-transform:var(--ig-body-2-text-transform);margin-top:var(--ig-body-2-margin-top);margin-bottom:var(--ig-body-2-margin-bottom);-webkit-box-flex:1;-ms-flex:1 1 50%;flex:1 1 50%}:host([action-text]) igc-button::part(base):hover{background:rgba(0,0,0,0)}:host([action-text]) igc-button::part(base):focus{-webkit-box-shadow:none;box-shadow:none}:host(:not([open])) [part=base]{display:none}`;
|
|
3
3
|
//# sourceMappingURL=snackbar.base.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snackbar.base.css.js","sourceRoot":"","sources":["../../../../src/components/snackbar/themes/snackbar.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,6+EAA6+E,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size);scrollbar-color:var(--ig-scrollbar-thumb-background) var(--ig-scrollbar-track-background)}:host
|
|
1
|
+
{"version":3,"file":"snackbar.base.css.js","sourceRoot":"","sources":["../../../../src/components/snackbar/themes/snackbar.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,6+EAA6+E,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size);scrollbar-color:var(--ig-scrollbar-thumb-background) var(--ig-scrollbar-track-background)}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size);height:var(--ig-scrollbar-size);background:var(--ig-scrollbar-track-background)}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background)}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{position:fixed;font-family:var(--ig-font-family);inset-inline:50% auto;-webkit-transform:translateX(calc(-50% + 0.5px));-ms-transform:translateX(calc(-50% + 0.5px));transform:translateX(calc(-50% + 0.5px))}:host([position=bottom]){inset-block:auto 0}:host([position=middle]){inset-block:50% auto;-webkit-transform:translate(calc(-50% + 0.5px), calc(-50% + 0.5px));-ms-transform:translate(calc(-50% + 0.5px), calc(-50% + 0.5px));transform:translate(calc(-50% + 0.5px), calc(-50% + 0.5px));margin:auto}:host([position=top]){inset-block:0 auto}[part~=base]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:row nowrap;flex-wrap:row nowrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;min-height:3rem;padding:.4375rem 1.5rem;margin:.5rem;gap:1.5rem;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}[part~=message]{font-family:var(--ig-body-2-font-family, var(--ig-font-family));font-size:var(--ig-body-2-font-size);font-weight:var(--ig-body-2-font-weight);font-style:var(--ig-body-2-font-style);line-height:var(--ig-body-2-line-height);letter-spacing:var(--ig-body-2-letter-spacing);text-transform:var(--ig-body-2-text-transform);margin-top:var(--ig-body-2-margin-top);margin-bottom:var(--ig-body-2-margin-bottom);-webkit-box-flex:1;-ms-flex:1 1 50%;flex:1 1 50%}:host([action-text]) igc-button::part(base):hover{background:rgba(0,0,0,0)}:host([action-text]) igc-button::part(base):focus{-webkit-box-shadow:none;box-shadow:none}:host(:not([open])) [part=base]{display:none}`;\n"]}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
+
import { type AnimationReferenceMetadata } from '../../animations/types.js';
|
|
1
2
|
export type Animation = 'grow' | 'fade' | 'slide' | 'none';
|
|
2
|
-
export
|
|
3
|
+
export type AnimationOptions = {
|
|
4
|
+
keyframe: KeyframeAnimationOptions;
|
|
5
|
+
step?: object;
|
|
6
|
+
};
|
|
7
|
+
export declare const bodyAnimations: Map<string, Map<string, ((options: AnimationOptions) => AnimationReferenceMetadata) | ((options: AnimationOptions) => AnimationReferenceMetadata)>>;
|
|
8
|
+
export declare const contentAnimations: Map<string, Map<string, ((options: AnimationOptions) => AnimationReferenceMetadata) | ((options: AnimationOptions) => AnimationReferenceMetadata)>>;
|
|
@@ -1,24 +1,72 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { EaseOut } from '../../animations/easings.js';
|
|
2
|
+
import { animation, } from '../../animations/types.js';
|
|
3
|
+
const baseOptions = {
|
|
4
|
+
duration: 320,
|
|
5
|
+
easing: EaseOut.Quad,
|
|
6
|
+
};
|
|
7
|
+
const fadeIn = (options = { keyframe: baseOptions }) => animation([{ opacity: 0 }, { opacity: 1 }], options.keyframe);
|
|
8
|
+
const fadeOut = (options = { keyframe: baseOptions }) => animation([{ opacity: 1 }, { opacity: 0 }], options.keyframe);
|
|
9
|
+
const slideInHor = (options = {
|
|
10
|
+
keyframe: baseOptions,
|
|
11
|
+
}) => animation([{ transform: 'translateX(100%)' }, { transform: 'translateX(0)' }], options.keyframe);
|
|
12
|
+
const slideOutHor = (options = {
|
|
13
|
+
keyframe: baseOptions,
|
|
14
|
+
}) => animation([{ transform: 'translateX(0)' }, { transform: 'translateX(-100%)' }], options.keyframe);
|
|
15
|
+
const growVerIn = (options = {
|
|
16
|
+
keyframe: baseOptions,
|
|
17
|
+
step: {},
|
|
18
|
+
}) => animation([
|
|
19
|
+
{ opacity: 1, ...options.step },
|
|
20
|
+
{ opacity: 1, height: 'auto' },
|
|
21
|
+
], options.keyframe);
|
|
22
|
+
const growVerOut = (options = {
|
|
23
|
+
keyframe: baseOptions,
|
|
24
|
+
step: {},
|
|
25
|
+
}) => animation([
|
|
26
|
+
{ opacity: 1, height: 'auto' },
|
|
27
|
+
{ opacity: 1, ...options.step },
|
|
28
|
+
], options.keyframe);
|
|
5
29
|
const noopAnimation = () => animation([], {});
|
|
6
|
-
|
|
7
|
-
|
|
30
|
+
const animationPair = (animations) => {
|
|
31
|
+
return new Map(Object.entries({
|
|
32
|
+
in: animations.in,
|
|
33
|
+
out: animations.out,
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
36
|
+
export const bodyAnimations = new Map(Object.entries({
|
|
37
|
+
grow: animationPair({
|
|
8
38
|
in: growVerIn,
|
|
9
39
|
out: growVerOut,
|
|
10
|
-
})
|
|
11
|
-
fade:
|
|
12
|
-
in:
|
|
13
|
-
out:
|
|
14
|
-
})
|
|
15
|
-
slide:
|
|
40
|
+
}),
|
|
41
|
+
fade: animationPair({
|
|
42
|
+
in: noopAnimation,
|
|
43
|
+
out: noopAnimation,
|
|
44
|
+
}),
|
|
45
|
+
slide: animationPair({
|
|
16
46
|
in: slideInHor,
|
|
17
47
|
out: slideOutHor,
|
|
18
|
-
})
|
|
19
|
-
none:
|
|
48
|
+
}),
|
|
49
|
+
none: animationPair({
|
|
50
|
+
in: noopAnimation,
|
|
51
|
+
out: noopAnimation,
|
|
52
|
+
}),
|
|
53
|
+
}));
|
|
54
|
+
export const contentAnimations = new Map(Object.entries({
|
|
55
|
+
grow: animationPair({
|
|
56
|
+
in: fadeIn,
|
|
57
|
+
out: fadeOut,
|
|
58
|
+
}),
|
|
59
|
+
fade: animationPair({
|
|
60
|
+
in: fadeIn,
|
|
61
|
+
out: fadeOut,
|
|
62
|
+
}),
|
|
63
|
+
slide: animationPair({
|
|
64
|
+
in: fadeIn,
|
|
65
|
+
out: fadeOut,
|
|
66
|
+
}),
|
|
67
|
+
none: animationPair({
|
|
20
68
|
in: noopAnimation,
|
|
21
69
|
out: noopAnimation,
|
|
22
|
-
})
|
|
70
|
+
}),
|
|
23
71
|
}));
|
|
24
72
|
//# sourceMappingURL=animations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animations.js","sourceRoot":"","sources":["../../../src/components/stepper/animations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"animations.js","sourceRoot":"","sources":["../../../src/components/stepper/animations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAEL,SAAS,GACV,MAAM,2BAA2B,CAAC;AAEnC,MAAM,WAAW,GAA6B;IAC5C,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,OAAO,CAAC,IAAI;CACrB,CAAC;AASF,MAAM,MAAM,GAAG,CAAC,UAA4B,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,EAAE,CACvE,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEhE,MAAM,OAAO,GAAG,CAAC,UAA4B,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,EAAE,CACxE,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEhE,MAAM,UAAU,GAAG,CACjB,UAA4B;IAC1B,QAAQ,EAAE,WAAW;CACtB,EACD,EAAE,CACF,SAAS,CACP,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,EACnE,OAAO,CAAC,QAAQ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E,SAAS;QACb,GAAG,EAAE,UAAU;KAChB,CAAC;IACF,IAAI,EAAE,aAAa,CAAC;QAClB,EAAE,EAAE,aAAa;QACjB,GAAG,EAAE,aAAa;KACnB,CAAC;IACF,KAAK,EAAE,aAAa,CAAC;QACnB,EAAE,EAAE,UAAU;QACd,GAAG,EAAE,WAAW;KACjB,CAAC;IACF,IAAI,EAAE,aAAa,CAAC;QAClB,EAAE,EAAE,aAAa;QACjB,GAAG,EAAE,aAAa;KACnB,CAAC;CACH,CAAC,CACH,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,GAAG,CACtC,MAAM,CAAC,OAAO,CAAC;IACb,IAAI,EAAE,aAAa,CAAC;QAClB,EAAE,EAAE,MAAM;QACV,GAAG,EAAE,OAAO;KACb,CAAC;IACF,IAAI,EAAE,aAAa,CAAC;QAClB,EAAE,EAAE,MAAM;QACV,GAAG,EAAE,OAAO;KACb,CAAC;IACF,KAAK,EAAE,aAAa,CAAC;QACnB,EAAE,EAAE,MAAM;QACV,GAAG,EAAE,OAAO;KACb,CAAC;IACF,IAAI,EAAE,aAAa,CAAC;QAClB,EAAE,EAAE,aAAa;QACjB,GAAG,EAAE,aAAa;KACnB,CAAC;CACH,CAAC,CACH,CAAC","sourcesContent":["import { EaseOut } from '../../animations/easings.js';\nimport {\n type AnimationReferenceMetadata,\n animation,\n} from '../../animations/types.js';\n\nconst baseOptions: KeyframeAnimationOptions = {\n duration: 320,\n easing: EaseOut.Quad,\n};\n\nexport type Animation = 'grow' | 'fade' | 'slide' | 'none';\n\nexport type AnimationOptions = {\n keyframe: KeyframeAnimationOptions;\n step?: object;\n};\n\nconst fadeIn = (options: AnimationOptions = { keyframe: baseOptions }) =>\n animation([{ opacity: 0 }, { opacity: 1 }], options.keyframe);\n\nconst fadeOut = (options: AnimationOptions = { keyframe: baseOptions }) =>\n animation([{ opacity: 1 }, { opacity: 0 }], options.keyframe);\n\nconst slideInHor = (\n options: AnimationOptions = {\n keyframe: baseOptions,\n }\n) =>\n animation(\n [{ transform: 'translateX(100%)' }, { transform: 'translateX(0)' }],\n options.keyframe\n );\n\nconst slideOutHor = (\n options: AnimationOptions = {\n keyframe: baseOptions,\n }\n) =>\n animation(\n [{ transform: 'translateX(0)' }, { transform: 'translateX(-100%)' }],\n options.keyframe\n );\n\nconst growVerIn = (\n options: AnimationOptions = {\n keyframe: baseOptions,\n step: {},\n }\n) =>\n animation(\n [\n { opacity: 1, ...options.step },\n { opacity: 1, height: 'auto' },\n ],\n options.keyframe\n );\n\nconst growVerOut = (\n options: AnimationOptions = {\n keyframe: baseOptions,\n step: {},\n }\n) =>\n animation(\n [\n { opacity: 1, height: 'auto' },\n { opacity: 1, ...options.step },\n ],\n options.keyframe\n );\n\nconst noopAnimation = () => animation([], {});\n\nconst animationPair = (animations: {\n in: (options: AnimationOptions) => AnimationReferenceMetadata;\n out: (options: AnimationOptions) => AnimationReferenceMetadata;\n}) => {\n return new Map(\n Object.entries({\n in: animations.in,\n out: animations.out,\n })\n );\n};\n\nexport const bodyAnimations = new Map(\n Object.entries({\n grow: animationPair({\n in: growVerIn,\n out: growVerOut,\n }),\n fade: animationPair({\n in: noopAnimation,\n out: noopAnimation,\n }),\n slide: animationPair({\n in: slideInHor,\n out: slideOutHor,\n }),\n none: animationPair({\n in: noopAnimation,\n out: noopAnimation,\n }),\n })\n);\n\nexport const contentAnimations = new Map(\n Object.entries({\n grow: animationPair({\n in: fadeIn,\n out: fadeOut,\n }),\n fade: animationPair({\n in: fadeIn,\n out: fadeOut,\n }),\n slide: animationPair({\n in: fadeIn,\n out: fadeOut,\n }),\n none: animationPair({\n in: noopAnimation,\n out: noopAnimation,\n }),\n })\n);\n"]}
|
|
@@ -35,7 +35,9 @@ export default class IgcStepComponent extends LitElement {
|
|
|
35
35
|
static styles: import("lit").CSSResult[];
|
|
36
36
|
static register(): void;
|
|
37
37
|
private bodyRef;
|
|
38
|
-
private
|
|
38
|
+
private contentRef;
|
|
39
|
+
private bodyAnimationPlayer;
|
|
40
|
+
private contentAnimationPlayer;
|
|
39
41
|
private _titleChildren;
|
|
40
42
|
private _subTitleChildren;
|
|
41
43
|
header: HTMLElement;
|
|
@@ -15,7 +15,7 @@ import { themes } from '../../theming/theming-decorator.js';
|
|
|
15
15
|
import { watch } from '../common/decorators/watch.js';
|
|
16
16
|
import { registerComponent } from '../common/definitions/register.js';
|
|
17
17
|
import { partNameMap } from '../common/util.js';
|
|
18
|
-
import {
|
|
18
|
+
import { bodyAnimations, contentAnimations, } from './animations.js';
|
|
19
19
|
import { styles as shared } from './themes/step/shared/step.common.css.js';
|
|
20
20
|
import { styles } from './themes/step/step.base.css.js';
|
|
21
21
|
import { all } from './themes/step/themes.js';
|
|
@@ -23,7 +23,9 @@ let IgcStepComponent = IgcStepComponent_1 = class IgcStepComponent extends LitEl
|
|
|
23
23
|
constructor() {
|
|
24
24
|
super(...arguments);
|
|
25
25
|
this.bodyRef = createRef();
|
|
26
|
-
this.
|
|
26
|
+
this.contentRef = createRef();
|
|
27
|
+
this.bodyAnimationPlayer = addAnimationController(this, this.bodyRef);
|
|
28
|
+
this.contentAnimationPlayer = addAnimationController(this, this.contentRef);
|
|
27
29
|
this.invalid = false;
|
|
28
30
|
this.active = false;
|
|
29
31
|
this.optional = false;
|
|
@@ -43,15 +45,24 @@ let IgcStepComponent = IgcStepComponent_1 = class IgcStepComponent extends LitEl
|
|
|
43
45
|
registerComponent(IgcStepComponent_1);
|
|
44
46
|
}
|
|
45
47
|
async toggleAnimation(type, direction = 'normal') {
|
|
46
|
-
const
|
|
48
|
+
const bodyAnimation = bodyAnimations.get(this.animation).get(type);
|
|
49
|
+
const contentAnimation = contentAnimations.get(this.animation).get(type);
|
|
50
|
+
const bodyHeight = window
|
|
51
|
+
.getComputedStyle(this)
|
|
52
|
+
.getPropertyValue('--vertical-body-height');
|
|
47
53
|
const options = {
|
|
48
54
|
duration: this.animationDuration,
|
|
49
55
|
easing: EaseInOut.Quad,
|
|
50
56
|
direction,
|
|
51
57
|
};
|
|
58
|
+
const step = {
|
|
59
|
+
height: bodyHeight,
|
|
60
|
+
};
|
|
52
61
|
const [_, event] = await Promise.all([
|
|
53
|
-
this.
|
|
54
|
-
this.
|
|
62
|
+
this.bodyAnimationPlayer.stopAll(),
|
|
63
|
+
this.bodyAnimationPlayer.play(bodyAnimation({ keyframe: options, step })),
|
|
64
|
+
this.contentAnimationPlayer.stopAll(),
|
|
65
|
+
this.contentAnimationPlayer.play(contentAnimation({ keyframe: options, step })),
|
|
55
66
|
]);
|
|
56
67
|
return event.type;
|
|
57
68
|
}
|
|
@@ -139,7 +150,7 @@ let IgcStepComponent = IgcStepComponent_1 = class IgcStepComponent extends LitEl
|
|
|
139
150
|
role="tabpanel"
|
|
140
151
|
aria-labelledby="igc-step-header-${this.index}"
|
|
141
152
|
>
|
|
142
|
-
<div part="content">
|
|
153
|
+
<div part="content" ${ref(this.contentRef)}>
|
|
143
154
|
<slot></slot>
|
|
144
155
|
</div>
|
|
145
156
|
</div>`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.js","sourceRoot":"","sources":["../../../src/components/stepper/step.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAY,SAAS,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,iBAAiB,E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AAE,KAAK,EAAE,CAAC;2DACA;AAuBrB;IADT,KAAK,CAAC,QAAQ,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;oDAO/C;AAKS;IAHT,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IACjD,KAAK,CAAC,SAAS,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IAChD,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;qEAKjD;AAGS;IADT,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;sDAKjD;AA5IkB,gBAAgB;IADpC,MAAM,CAAC,GAAG,CAAC;GACS,gBAAgB,CAuQpC;eAvQoB,gBAAgB","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property, query, queryAssignedElements } from 'lit/decorators.js';\nimport { type Ref, createRef, ref } from 'lit/directives/ref.js';\nimport { when } from 'lit/directives/when.js';\n\nimport { EaseInOut } from '../../animations/easings.js';\nimport { addAnimationController } from '../../animations/player.js';\nimport { themes } from '../../theming/theming-decorator.js';\nimport { watch } from '../common/decorators/watch.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport { partNameMap } from '../common/util.js';\nimport { type Animation, animations } from './animations.js';\nimport { styles as shared } from './themes/step/shared/step.common.css.js';\nimport { styles } from './themes/step/step.base.css.js';\nimport { all } from './themes/step/themes.js';\n\n/**\n * The step component is used within the `igc-stepper` element and it holds the content of each step.\n * It also supports custom indicators, title and subtitle.\n *\n * @element igc-step\n *\n * @slot - Renders the content of the step.\n * @slot indicator - Renders the indicator of the step. By default, it displays the step index + 1.\n * @slot title - Renders the title of the step.\n * @slot subtitle - Renders the subtitle of the step.\n *\n * @csspart header-container - Wrapper of the step's `header` and its separators.\n * @csspart disabled - Indicates a disabled state. Applies to `header-container`.\n * @csspart complete-start - Indicates a complete state of the current step. Applies to `header-container`.\n * @csspart complete-end - Indicates a complete state of the previous step. Applies to `header-container`.\n * @csspart optional - Indicates an optional state. Applies to `header-container`.\n * @csspart invalid - Indicates an invalid state. Applies to `header-container`.\n * @csspart top - Indicates that the title should be above the indicator. Applies to `header-container`.\n * @csspart bottom - Indicates that the title should be below the indicator. Applies to `header-container`.\n * @csspart start - Indicates that the title should be before the indicator. Applies to `header-container`.\n * @csspart end - Indicates that the title should be after the indicator. Applies to `header-container`.\n * @csspart header - Wrapper of the step's `indicator` and `text`.\n * @csspart indicator - The indicator of the step.\n * @csspart text - Wrapper of the step's `title` and `subtitle`.\n * @csspart empty - Indicates that no title and subtitle has been provided to the step. Applies to `text`.\n * @csspart title - The title of the step.\n * @csspart subtitle - The subtitle of the step.\n * @csspart body - Wrapper of the step's `content`.\n * @csspart content - The steps `content`.\n */\n@themes(all)\nexport default class IgcStepComponent extends LitElement {\n public static readonly tagName = 'igc-step';\n public static override styles = [styles, shared];\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcStepComponent);\n }\n\n private bodyRef: Ref<HTMLElement> = createRef();\n\n private animationPlayer = addAnimationController(this, this.bodyRef);\n\n @queryAssignedElements({ slot: 'title' })\n private _titleChildren!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'subtitle' })\n private _subTitleChildren!: Array<HTMLElement>;\n\n /* blazorSuppress */\n @query('[part~=\"header\"]')\n public header!: HTMLElement;\n\n /* blazorSuppress */\n @query('[part~=\"body\"]')\n public contentBody!: HTMLElement;\n\n /** Gets/sets whether the step is invalid. */\n @property({ reflect: true, type: Boolean })\n public invalid = false;\n\n /** Gets/sets whether the step is activе. */\n @property({ reflect: true, type: Boolean })\n public active = false;\n\n /**\n * Gets/sets whether the step is optional.\n *\n * @remarks\n * Optional steps validity does not affect the default behavior when the stepper is in linear mode i.e.\n * if optional step is invalid the user could still move to the next step.\n */\n @property({ type: Boolean })\n public optional = false;\n\n /** Gets/sets whether the step is interactable. */\n @property({ reflect: true, type: Boolean })\n public disabled = false;\n\n /** Gets/sets whether the step is completed.\n *\n * @remarks\n * When set to `true` the following separator is styled `solid`.\n */\n @property({ reflect: true, type: Boolean })\n public complete = false;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public previousComplete = false;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public stepType: 'indicator' | 'title' | 'full' = 'full';\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public titlePosition?: 'bottom' | 'top' | 'end' | 'start';\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public index = -1;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public contentTop = false;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public linearDisabled = false;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public visited = false;\n\n /** @hidden @intrnal @private */\n @property({ attribute: false })\n public animation: Animation = 'fade';\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public animationDuration = 350;\n\n public async toggleAnimation(\n type: 'in' | 'out',\n direction: 'normal' | 'reverse' = 'normal'\n ) {\n const animation = animations.get(this.animation)!.get(type)!;\n\n const options: KeyframeAnimationOptions = {\n duration: this.animationDuration,\n easing: EaseInOut.Quad,\n direction,\n };\n\n const [_, event] = await Promise.all([\n this.animationPlayer.stopAll(),\n this.animationPlayer.play(animation(options)),\n ]);\n\n return event.type;\n }\n\n @watch('active', { waitUntilFirstUpdate: true })\n protected activeChange() {\n if (this.active) {\n this.dispatchEvent(\n new CustomEvent('stepActiveChanged', { bubbles: true, detail: false })\n );\n }\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n @watch('invalid', { waitUntilFirstUpdate: true })\n @watch('optional', { waitUntilFirstUpdate: true })\n protected disabledInvalidOptionalChange() {\n this.dispatchEvent(\n new CustomEvent('stepDisabledInvalidChanged', { bubbles: true })\n );\n }\n\n @watch('complete', { waitUntilFirstUpdate: true })\n protected completeChange() {\n this.dispatchEvent(\n new CustomEvent('stepCompleteChanged', { bubbles: true })\n );\n }\n\n private handleClick(event: MouseEvent): void {\n event.stopPropagation();\n if (this.isAccessible) {\n this.dispatchEvent(\n new CustomEvent('stepActiveChanged', { bubbles: true, detail: true })\n );\n }\n }\n\n private handleKeydown(event: KeyboardEvent): void {\n this.dispatchEvent(\n new CustomEvent('stepHeaderKeydown', {\n bubbles: true,\n detail: { event, focusedStep: this },\n })\n );\n }\n\n /** @hidden @internal */\n public get isAccessible(): boolean {\n return !this.disabled && !this.linearDisabled;\n }\n\n private get headerContainerParts() {\n return {\n 'header-container': true,\n disabled: !this.isAccessible,\n 'complete-start': this.complete,\n 'complete-end': this.previousComplete,\n optional: this.optional,\n invalid:\n this.invalid && this.visited && !this.active && this.isAccessible,\n top: this.titlePosition === 'top',\n bottom:\n this.titlePosition === 'bottom' ||\n (this.orientation === 'horizontal' && !this.titlePosition),\n start: this.titlePosition === 'start',\n end:\n this.titlePosition === 'end' ||\n (this.orientation === 'vertical' && !this.titlePosition),\n };\n }\n\n private get textParts() {\n return {\n text: true,\n empty:\n this.stepType === 'indicator'\n ? true\n : this.stepType === 'full' &&\n !this._titleChildren.length &&\n !this._subTitleChildren.length,\n };\n }\n\n protected renderIndicator() {\n if (this.stepType !== 'title') {\n return html`\n <div part=\"indicator\">\n <slot name=\"indicator\">\n <span>${this.index + 1}</span>\n </slot>\n </div>\n `;\n }\n return nothing;\n }\n\n protected renderTitleAndSubtitle() {\n return html`\n <div part=\"${partNameMap(this.textParts)}\">\n <div part=\"title\">\n <slot name=\"title\"></slot>\n </div>\n <div part=\"subtitle\">\n <slot name=\"subtitle\"></slot>\n </div>\n </div>\n `;\n }\n\n protected renderContent() {\n return html`<div\n ${ref(this.bodyRef)}\n id=\"igc-step-content-${this.index}\"\n part=\"body\"\n role=\"tabpanel\"\n aria-labelledby=\"igc-step-header-${this.index}\"\n >\n <div part=\"content\">\n <slot></slot>\n </div>\n </div>`;\n }\n\n protected override render() {\n return html`\n ${when(\n this.contentTop && this.orientation === 'horizontal',\n () => this.renderContent(),\n () => nothing\n )}\n <div part=\"${partNameMap(this.headerContainerParts)}\">\n <div\n part=\"header\"\n tabindex=\"${this.active ? '0' : '-1'}\"\n role=\"tab\"\n aria-selected=\"${this.active}\"\n @click=${this.handleClick}\n @keydown=${this.handleKeydown}\n >\n ${this.renderIndicator()} ${this.renderTitleAndSubtitle()}\n </div>\n </div>\n ${when(\n this.orientation === 'vertical' || !this.contentTop,\n () => this.renderContent(),\n () => nothing\n )}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-step': IgcStepComponent;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"step.js","sourceRoot":"","sources":["../../../src/components/stepper/step.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAY,SAAS,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAEL,cAAc,EACd,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;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K,EAAE,CAAC;qDAC8B;AAItD;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;+CACb;AAIX;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;oDACL;AAInB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;wDACD;AAIvB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;iDACR;AAIhB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;mDACM;AAI9B;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;2DACA;AAmCrB;IADT,KAAK,CAAC,QAAQ,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;oDAO/C;AAKS;IAHT,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IACjD,KAAK,CAAC,SAAS,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IAChD,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;qEAKjD;AAGS;IADT,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;sDAKjD;AA7JkB,gBAAgB;IADpC,MAAM,CAAC,GAAG,CAAC;GACS,gBAAgB,CAwRpC;eAxRoB,gBAAgB","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property, query, queryAssignedElements } from 'lit/decorators.js';\nimport { type Ref, createRef, ref } from 'lit/directives/ref.js';\nimport { when } from 'lit/directives/when.js';\n\nimport { EaseInOut } from '../../animations/easings.js';\nimport { addAnimationController } from '../../animations/player.js';\nimport { themes } from '../../theming/theming-decorator.js';\nimport { watch } from '../common/decorators/watch.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport { partNameMap } from '../common/util.js';\nimport {\n type Animation,\n bodyAnimations,\n contentAnimations,\n} from './animations.js';\nimport { styles as shared } from './themes/step/shared/step.common.css.js';\nimport { styles } from './themes/step/step.base.css.js';\nimport { all } from './themes/step/themes.js';\n\n/**\n * The step component is used within the `igc-stepper` element and it holds the content of each step.\n * It also supports custom indicators, title and subtitle.\n *\n * @element igc-step\n *\n * @slot - Renders the content of the step.\n * @slot indicator - Renders the indicator of the step. By default, it displays the step index + 1.\n * @slot title - Renders the title of the step.\n * @slot subtitle - Renders the subtitle of the step.\n *\n * @csspart header-container - Wrapper of the step's `header` and its separators.\n * @csspart disabled - Indicates a disabled state. Applies to `header-container`.\n * @csspart complete-start - Indicates a complete state of the current step. Applies to `header-container`.\n * @csspart complete-end - Indicates a complete state of the previous step. Applies to `header-container`.\n * @csspart optional - Indicates an optional state. Applies to `header-container`.\n * @csspart invalid - Indicates an invalid state. Applies to `header-container`.\n * @csspart top - Indicates that the title should be above the indicator. Applies to `header-container`.\n * @csspart bottom - Indicates that the title should be below the indicator. Applies to `header-container`.\n * @csspart start - Indicates that the title should be before the indicator. Applies to `header-container`.\n * @csspart end - Indicates that the title should be after the indicator. Applies to `header-container`.\n * @csspart header - Wrapper of the step's `indicator` and `text`.\n * @csspart indicator - The indicator of the step.\n * @csspart text - Wrapper of the step's `title` and `subtitle`.\n * @csspart empty - Indicates that no title and subtitle has been provided to the step. Applies to `text`.\n * @csspart title - The title of the step.\n * @csspart subtitle - The subtitle of the step.\n * @csspart body - Wrapper of the step's `content`.\n * @csspart content - The steps `content`.\n */\n@themes(all)\nexport default class IgcStepComponent extends LitElement {\n public static readonly tagName = 'igc-step';\n public static override styles = [styles, shared];\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcStepComponent);\n }\n\n private bodyRef: Ref<HTMLElement> = createRef();\n private contentRef: Ref<HTMLElement> = createRef();\n\n private bodyAnimationPlayer = addAnimationController(this, this.bodyRef);\n private contentAnimationPlayer = addAnimationController(\n this,\n this.contentRef\n );\n\n @queryAssignedElements({ slot: 'title' })\n private _titleChildren!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'subtitle' })\n private _subTitleChildren!: Array<HTMLElement>;\n\n /* blazorSuppress */\n @query('[part~=\"header\"]')\n public header!: HTMLElement;\n\n /* blazorSuppress */\n @query('[part~=\"body\"]')\n public contentBody!: HTMLElement;\n\n /** Gets/sets whether the step is invalid. */\n @property({ reflect: true, type: Boolean })\n public invalid = false;\n\n /** Gets/sets whether the step is activе. */\n @property({ reflect: true, type: Boolean })\n public active = false;\n\n /**\n * Gets/sets whether the step is optional.\n *\n * @remarks\n * Optional steps validity does not affect the default behavior when the stepper is in linear mode i.e.\n * if optional step is invalid the user could still move to the next step.\n */\n @property({ type: Boolean })\n public optional = false;\n\n /** Gets/sets whether the step is interactable. */\n @property({ reflect: true, type: Boolean })\n public disabled = false;\n\n /** Gets/sets whether the step is completed.\n *\n * @remarks\n * When set to `true` the following separator is styled `solid`.\n */\n @property({ reflect: true, type: Boolean })\n public complete = false;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public previousComplete = false;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public stepType: 'indicator' | 'title' | 'full' = 'full';\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public titlePosition?: 'bottom' | 'top' | 'end' | 'start';\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public index = -1;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public contentTop = false;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public linearDisabled = false;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public visited = false;\n\n /** @hidden @intrnal @private */\n @property({ attribute: false })\n public animation: Animation = 'fade';\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public animationDuration = 350;\n\n public async toggleAnimation(\n type: 'in' | 'out',\n direction: 'normal' | 'reverse' = 'normal'\n ) {\n const bodyAnimation = bodyAnimations.get(this.animation)!.get(type)!;\n const contentAnimation = contentAnimations.get(this.animation)!.get(type)!;\n const bodyHeight = window\n .getComputedStyle(this)\n .getPropertyValue('--vertical-body-height');\n\n const options: KeyframeAnimationOptions = {\n duration: this.animationDuration,\n easing: EaseInOut.Quad,\n direction,\n };\n\n const step = {\n height: bodyHeight,\n };\n\n const [_, event] = await Promise.all([\n this.bodyAnimationPlayer.stopAll(),\n this.bodyAnimationPlayer.play(bodyAnimation({ keyframe: options, step })),\n this.contentAnimationPlayer.stopAll(),\n this.contentAnimationPlayer.play(\n contentAnimation({ keyframe: options, step })\n ),\n ]);\n\n return event.type;\n }\n\n @watch('active', { waitUntilFirstUpdate: true })\n protected activeChange() {\n if (this.active) {\n this.dispatchEvent(\n new CustomEvent('stepActiveChanged', { bubbles: true, detail: false })\n );\n }\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n @watch('invalid', { waitUntilFirstUpdate: true })\n @watch('optional', { waitUntilFirstUpdate: true })\n protected disabledInvalidOptionalChange() {\n this.dispatchEvent(\n new CustomEvent('stepDisabledInvalidChanged', { bubbles: true })\n );\n }\n\n @watch('complete', { waitUntilFirstUpdate: true })\n protected completeChange() {\n this.dispatchEvent(\n new CustomEvent('stepCompleteChanged', { bubbles: true })\n );\n }\n\n private handleClick(event: MouseEvent): void {\n event.stopPropagation();\n if (this.isAccessible) {\n this.dispatchEvent(\n new CustomEvent('stepActiveChanged', { bubbles: true, detail: true })\n );\n }\n }\n\n private handleKeydown(event: KeyboardEvent): void {\n this.dispatchEvent(\n new CustomEvent('stepHeaderKeydown', {\n bubbles: true,\n detail: { event, focusedStep: this },\n })\n );\n }\n\n /** @hidden @internal */\n public get isAccessible(): boolean {\n return !this.disabled && !this.linearDisabled;\n }\n\n private get headerContainerParts() {\n return {\n 'header-container': true,\n disabled: !this.isAccessible,\n 'complete-start': this.complete,\n 'complete-end': this.previousComplete,\n optional: this.optional,\n invalid:\n this.invalid && this.visited && !this.active && this.isAccessible,\n top: this.titlePosition === 'top',\n bottom:\n this.titlePosition === 'bottom' ||\n (this.orientation === 'horizontal' && !this.titlePosition),\n start: this.titlePosition === 'start',\n end:\n this.titlePosition === 'end' ||\n (this.orientation === 'vertical' && !this.titlePosition),\n };\n }\n\n private get textParts() {\n return {\n text: true,\n empty:\n this.stepType === 'indicator'\n ? true\n : this.stepType === 'full' &&\n !this._titleChildren.length &&\n !this._subTitleChildren.length,\n };\n }\n\n protected renderIndicator() {\n if (this.stepType !== 'title') {\n return html`\n <div part=\"indicator\">\n <slot name=\"indicator\">\n <span>${this.index + 1}</span>\n </slot>\n </div>\n `;\n }\n return nothing;\n }\n\n protected renderTitleAndSubtitle() {\n return html`\n <div part=\"${partNameMap(this.textParts)}\">\n <div part=\"title\">\n <slot name=\"title\"></slot>\n </div>\n <div part=\"subtitle\">\n <slot name=\"subtitle\"></slot>\n </div>\n </div>\n `;\n }\n\n protected renderContent() {\n return html`<div\n ${ref(this.bodyRef)}\n id=\"igc-step-content-${this.index}\"\n part=\"body\"\n role=\"tabpanel\"\n aria-labelledby=\"igc-step-header-${this.index}\"\n >\n <div part=\"content\" ${ref(this.contentRef)}>\n <slot></slot>\n </div>\n </div>`;\n }\n\n protected override render() {\n return html`\n ${when(\n this.contentTop && this.orientation === 'horizontal',\n () => this.renderContent(),\n () => nothing\n )}\n <div part=\"${partNameMap(this.headerContainerParts)}\">\n <div\n part=\"header\"\n tabindex=\"${this.active ? '0' : '-1'}\"\n role=\"tab\"\n aria-selected=\"${this.active}\"\n @click=${this.handleClick}\n @keydown=${this.handleKeydown}\n >\n ${this.renderIndicator()} ${this.renderTitleAndSubtitle()}\n </div>\n </div>\n ${when(\n this.orientation === 'vertical' || !this.contentTop,\n () => this.renderContent(),\n () => nothing\n )}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-step': IgcStepComponent;\n }\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size);scrollbar-color:var(--ig-scrollbar-thumb-background) var(--ig-scrollbar-track-background)}:host
|
|
2
|
+
export const styles = css `:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size);scrollbar-color:var(--ig-scrollbar-thumb-background) var(--ig-scrollbar-track-background)}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size);height:var(--ig-scrollbar-size);background:var(--ig-scrollbar-track-background)}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background)}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}[part~=header-container],[part~=header]{width:var(--header-width-vertical, auto)}[part~=header-container]::before,[part~=header]::before{content:"";width:auto;-webkit-box-flex:1;-ms-flex:1;flex:1;border-block-start-width:var(--separator-size);height:var(--separator-size);position:relative}[part~=header-container]{display:-webkit-box;display:-ms-flexbox;display:flex;pointer-events:none;position:relative;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;z-index:0}[part~=header-container] [part~=header]{pointer-events:all;-webkit-box-align:center;-ms-flex-align:center;align-items:center}[part~=header-container] [part=indicator],[part~=header-container] [part=title],[part~=header-container] [part=subtitle]{pointer-events:none}[part~=header-container]::before{min-width:var(--separator-min-width);display:var(--hide-horizontal-separator, var(--horizontal-separator-display--first-of-type))}[part~=header]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:var(--align-items, flex-start);-ms-flex-align:var(--align-items, flex-start);align-items:var(--align-items, flex-start);grid-row:var(--header-bottom, 1);position:relative;overflow:hidden;padding:var(--header-padding);-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;gap:var(--header-gap);z-index:var(--vertical-header-z-index)}[part~=header]::before,[part~=header]::after{content:"";-webkit-box-flex:1;-ms-flex:1;flex:1;border-block-start-width:var(--separator-size);height:var(--separator-size);min-width:var(--separator-min-width--header);width:calc(50% - var(--indicator-size)/2 - var(--header-padding));position:absolute;z-index:-1}[part~=header]::before{inset-inline-start:0;display:var(--hide-horizontal-separator, var(--separator-disply-not-full, var(--horizontal-separator-display--first-of-type)))}[part~=header]::after{inset-inline-end:0;display:var(--hide-horizontal-separator, var(--separator-disply-not-full, var(--horizontal-separator-display--last-of-type)))}[part~=header]:focus,[part~=header]:hover{cursor:pointer;outline:none}[part~=header]:hover::before,[part~=header]:hover::after{visibility:var(--header-separator-visibility--hover)}[part~=header]:focus::before,[part~=header]:focus::after,[part~=header]:focus-within::before,[part~=header]:focus-within::after,[part~=header]:active::before,[part~=header]:active::after{visibility:var(--header-separator-visibility--hover)}[part~=body]{display:block;grid-row-start:var(--body-top, 2);grid-column:1/span var(--steps-count);-webkit-padding-start:calc(var(--body-indent--vertical)/2);padding-inline-start:calc(var(--body-indent--vertical)/2);z-index:1;position:relative;overflow:hidden;width:0;height:var(--vertical-body-height, auto);min-width:100%}[part~=body]::before{display:var(--hide-last-separator, var(--hide-first-separator, var(--vertical-separator-visibility)));content:"";position:absolute;inset-inline-start:calc(var(--body-indent--vertical)/2 - var(--separator-size)/2);height:100%;inset-block-start:0 !important;border-inline-start-style:var(--separator-type);border-inline-start-width:var(--separator-size)}[part=content]{display:block;height:auto;overflow:auto;opacity:0}[part=content]>slot{display:block;padding-inline:var(--horizontal-body-padding, calc(var(--body-indent--vertical) / 2)) var(--horizontal-body-padding, var(--vertical-body-padding));padding-block:var(--horizontal-body-padding, var(--vertical-body-padding)) var(--horizontal-body-padding, var(--vertical-body-padding))}[part~=top]{-webkit-box-align:var(--step-not-full-header-aligmnet, flex-end);-ms-flex-align:var(--step-not-full-header-aligmnet, flex-end);align-items:var(--step-not-full-header-aligmnet, flex-end)}[part~=top]::before,[part~=top]::after{inset-block-end:var(--step-separator-position)}[part~=top] [part~=header]{-webkit-box-align:var(--align-items, flex-start);-ms-flex-align:var(--align-items, flex-start);align-items:var(--align-items, flex-start);-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}[part~=top] [part~=header]::before,[part~=top] [part~=header]::after{inset-block-end:var(--step-separator-position)}[part~=bottom]{-webkit-box-align:var(--step-not-full-header-aligmnet, start);-ms-flex-align:var(--step-not-full-header-aligmnet, start);align-items:var(--step-not-full-header-aligmnet, start)}[part~=bottom]::before,[part~=bottom]::after{inset-block-start:var(--step-separator-position)}[part~=bottom] [part~=header]{-webkit-box-align:var(--align-items, flex-start);-ms-flex-align:var(--align-items, flex-start);align-items:var(--align-items, flex-start);-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}[part~=bottom] [part~=header]::before,[part~=bottom] [part~=header]::after{inset-block-start:var(--step-separator-position)}[part~=top] [part~=text],[part~=bottom] [part~=text]{width:100%}[part~=start] [part=text]{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}[part~=start],[part~=end]{-webkit-box-align:center;-ms-flex-align:center;align-items:center}[part~=start] [part~=text],[part~=end] [part~=text]{overflow:hidden}[part~=start] [part~=header]::before,[part~=start] [part~=header]::after,[part~=end] [part~=header]::before,[part~=end] [part~=header]::after{display:none}[part~=indicator]{font-family:var(--ig-caption-font-family, var(--ig-font-family));font-size:var(--ig-caption-font-size);font-weight:var(--ig-caption-font-weight);font-style:var(--ig-caption-font-style);line-height:var(--ig-caption-line-height);letter-spacing:var(--ig-caption-letter-spacing);text-transform:var(--ig-caption-text-transform);margin-top:var(--ig-caption-margin-top);margin-bottom:var(--ig-caption-margin-bottom);width:var(--indicator-size);min-width:var(--indicator-size);height:var(--indicator-size);position:relative}[part~=indicator],::slotted([slot=indicator]){display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}::slotted([slot=indicator]){--diameter: calc(var(--indicator-size) - 0.125rem);--ig-icon-size: 1.125rem}[part~=text]{text-align:var(--align-text, initial);min-width:var(--indicator-size)}[part~=subtitle],[part~=title]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[part~=title]{font-family:var(--ig-body-2-font-family, var(--ig-font-family));font-size:var(--ig-body-2-font-size);font-weight:var(--ig-body-2-font-weight);font-style:var(--ig-body-2-font-style);line-height:var(--ig-body-2-line-height);letter-spacing:var(--ig-body-2-letter-spacing);text-transform:var(--ig-body-2-text-transform);margin-top:var(--ig-body-2-margin-top);margin-bottom:var(--ig-body-2-margin-bottom)}[part~=subtitle]{font-family:var(--ig-caption-font-family, var(--ig-font-family));font-size:var(--ig-caption-font-size);font-weight:var(--ig-caption-font-weight);font-style:var(--ig-caption-font-style);line-height:var(--ig-caption-line-height);letter-spacing:var(--ig-caption-letter-spacing);text-transform:var(--ig-caption-text-transform);margin-top:var(--ig-caption-margin-top);margin-bottom:var(--ig-caption-margin-bottom)}[part~=empty]{display:none}:host([active]) [part~=body]{height:100%}:host([active]) [part~="body bottom"]::before{inset-block-start:0}:host([active]) [part=content]{pointer-events:all;opacity:1}[part~=disabled] [part=header]{cursor:default}`;
|
|
3
3
|
//# sourceMappingURL=step.base.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.base.css.js","sourceRoot":"","sources":["../../../../../src/components/stepper/themes/step/step.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,8sQAA8sQ,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size);scrollbar-color:var(--ig-scrollbar-thumb-background) var(--ig-scrollbar-track-background)}:host
|
|
1
|
+
{"version":3,"file":"step.base.css.js","sourceRoot":"","sources":["../../../../../src/components/stepper/themes/step/step.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,8sQAA8sQ,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size);scrollbar-color:var(--ig-scrollbar-thumb-background) var(--ig-scrollbar-track-background)}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size);height:var(--ig-scrollbar-size);background:var(--ig-scrollbar-track-background)}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background)}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}[part~=header-container],[part~=header]{width:var(--header-width-vertical, auto)}[part~=header-container]::before,[part~=header]::before{content:\"\";width:auto;-webkit-box-flex:1;-ms-flex:1;flex:1;border-block-start-width:var(--separator-size);height:var(--separator-size);position:relative}[part~=header-container]{display:-webkit-box;display:-ms-flexbox;display:flex;pointer-events:none;position:relative;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;z-index:0}[part~=header-container] [part~=header]{pointer-events:all;-webkit-box-align:center;-ms-flex-align:center;align-items:center}[part~=header-container] [part=indicator],[part~=header-container] [part=title],[part~=header-container] [part=subtitle]{pointer-events:none}[part~=header-container]::before{min-width:var(--separator-min-width);display:var(--hide-horizontal-separator, var(--horizontal-separator-display--first-of-type))}[part~=header]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:var(--align-items, flex-start);-ms-flex-align:var(--align-items, flex-start);align-items:var(--align-items, flex-start);grid-row:var(--header-bottom, 1);position:relative;overflow:hidden;padding:var(--header-padding);-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;gap:var(--header-gap);z-index:var(--vertical-header-z-index)}[part~=header]::before,[part~=header]::after{content:\"\";-webkit-box-flex:1;-ms-flex:1;flex:1;border-block-start-width:var(--separator-size);height:var(--separator-size);min-width:var(--separator-min-width--header);width:calc(50% - var(--indicator-size)/2 - var(--header-padding));position:absolute;z-index:-1}[part~=header]::before{inset-inline-start:0;display:var(--hide-horizontal-separator, var(--separator-disply-not-full, var(--horizontal-separator-display--first-of-type)))}[part~=header]::after{inset-inline-end:0;display:var(--hide-horizontal-separator, var(--separator-disply-not-full, var(--horizontal-separator-display--last-of-type)))}[part~=header]:focus,[part~=header]:hover{cursor:pointer;outline:none}[part~=header]:hover::before,[part~=header]:hover::after{visibility:var(--header-separator-visibility--hover)}[part~=header]:focus::before,[part~=header]:focus::after,[part~=header]:focus-within::before,[part~=header]:focus-within::after,[part~=header]:active::before,[part~=header]:active::after{visibility:var(--header-separator-visibility--hover)}[part~=body]{display:block;grid-row-start:var(--body-top, 2);grid-column:1/span var(--steps-count);-webkit-padding-start:calc(var(--body-indent--vertical)/2);padding-inline-start:calc(var(--body-indent--vertical)/2);z-index:1;position:relative;overflow:hidden;width:0;height:var(--vertical-body-height, auto);min-width:100%}[part~=body]::before{display:var(--hide-last-separator, var(--hide-first-separator, var(--vertical-separator-visibility)));content:\"\";position:absolute;inset-inline-start:calc(var(--body-indent--vertical)/2 - var(--separator-size)/2);height:100%;inset-block-start:0 !important;border-inline-start-style:var(--separator-type);border-inline-start-width:var(--separator-size)}[part=content]{display:block;height:auto;overflow:auto;opacity:0}[part=content]>slot{display:block;padding-inline:var(--horizontal-body-padding, calc(var(--body-indent--vertical) / 2)) var(--horizontal-body-padding, var(--vertical-body-padding));padding-block:var(--horizontal-body-padding, var(--vertical-body-padding)) var(--horizontal-body-padding, var(--vertical-body-padding))}[part~=top]{-webkit-box-align:var(--step-not-full-header-aligmnet, flex-end);-ms-flex-align:var(--step-not-full-header-aligmnet, flex-end);align-items:var(--step-not-full-header-aligmnet, flex-end)}[part~=top]::before,[part~=top]::after{inset-block-end:var(--step-separator-position)}[part~=top] [part~=header]{-webkit-box-align:var(--align-items, flex-start);-ms-flex-align:var(--align-items, flex-start);align-items:var(--align-items, flex-start);-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}[part~=top] [part~=header]::before,[part~=top] [part~=header]::after{inset-block-end:var(--step-separator-position)}[part~=bottom]{-webkit-box-align:var(--step-not-full-header-aligmnet, start);-ms-flex-align:var(--step-not-full-header-aligmnet, start);align-items:var(--step-not-full-header-aligmnet, start)}[part~=bottom]::before,[part~=bottom]::after{inset-block-start:var(--step-separator-position)}[part~=bottom] [part~=header]{-webkit-box-align:var(--align-items, flex-start);-ms-flex-align:var(--align-items, flex-start);align-items:var(--align-items, flex-start);-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}[part~=bottom] [part~=header]::before,[part~=bottom] [part~=header]::after{inset-block-start:var(--step-separator-position)}[part~=top] [part~=text],[part~=bottom] [part~=text]{width:100%}[part~=start] [part=text]{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}[part~=start],[part~=end]{-webkit-box-align:center;-ms-flex-align:center;align-items:center}[part~=start] [part~=text],[part~=end] [part~=text]{overflow:hidden}[part~=start] [part~=header]::before,[part~=start] [part~=header]::after,[part~=end] [part~=header]::before,[part~=end] [part~=header]::after{display:none}[part~=indicator]{font-family:var(--ig-caption-font-family, var(--ig-font-family));font-size:var(--ig-caption-font-size);font-weight:var(--ig-caption-font-weight);font-style:var(--ig-caption-font-style);line-height:var(--ig-caption-line-height);letter-spacing:var(--ig-caption-letter-spacing);text-transform:var(--ig-caption-text-transform);margin-top:var(--ig-caption-margin-top);margin-bottom:var(--ig-caption-margin-bottom);width:var(--indicator-size);min-width:var(--indicator-size);height:var(--indicator-size);position:relative}[part~=indicator],::slotted([slot=indicator]){display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}::slotted([slot=indicator]){--diameter: calc(var(--indicator-size) - 0.125rem);--ig-icon-size: 1.125rem}[part~=text]{text-align:var(--align-text, initial);min-width:var(--indicator-size)}[part~=subtitle],[part~=title]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[part~=title]{font-family:var(--ig-body-2-font-family, var(--ig-font-family));font-size:var(--ig-body-2-font-size);font-weight:var(--ig-body-2-font-weight);font-style:var(--ig-body-2-font-style);line-height:var(--ig-body-2-line-height);letter-spacing:var(--ig-body-2-letter-spacing);text-transform:var(--ig-body-2-text-transform);margin-top:var(--ig-body-2-margin-top);margin-bottom:var(--ig-body-2-margin-bottom)}[part~=subtitle]{font-family:var(--ig-caption-font-family, var(--ig-font-family));font-size:var(--ig-caption-font-size);font-weight:var(--ig-caption-font-weight);font-style:var(--ig-caption-font-style);line-height:var(--ig-caption-line-height);letter-spacing:var(--ig-caption-letter-spacing);text-transform:var(--ig-caption-text-transform);margin-top:var(--ig-caption-margin-top);margin-bottom:var(--ig-caption-margin-bottom)}[part~=empty]{display:none}:host([active]) [part~=body]{height:100%}:host([active]) [part~=\"body bottom\"]::before{inset-block-start:0}:host([active]) [part=content]{pointer-events:all;opacity:1}[part~=disabled] [part=header]{cursor:default}`;\n"]}
|