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
package/components/chip/chip.js
CHANGED
|
@@ -10,15 +10,13 @@ import { property } from 'lit/decorators.js';
|
|
|
10
10
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
11
11
|
import { themes } from '../../theming/theming-decorator.js';
|
|
12
12
|
import { addKeybindings } from '../common/controllers/key-bindings.js';
|
|
13
|
-
import { blazorTwoWayBind } from '../common/decorators/blazorTwoWayBind.js';
|
|
14
13
|
import { registerComponent } from '../common/definitions/register.js';
|
|
15
14
|
import { EventEmitterMixin } from '../common/mixins/event-emitter.js';
|
|
16
|
-
import { SizableMixin } from '../common/mixins/sizable.js';
|
|
17
15
|
import IgcIconComponent from '../icon/icon.js';
|
|
18
16
|
import { styles } from './themes/chip.base.css.js';
|
|
19
17
|
import { styles as shared } from './themes/shared/chip.common.css.js';
|
|
20
18
|
import { all } from './themes/themes.js';
|
|
21
|
-
let IgcChipComponent = IgcChipComponent_1 = class IgcChipComponent extends
|
|
19
|
+
let IgcChipComponent = IgcChipComponent_1 = class IgcChipComponent extends EventEmitterMixin(LitElement) {
|
|
22
20
|
static register() {
|
|
23
21
|
registerComponent(IgcChipComponent_1, IgcIconComponent);
|
|
24
22
|
}
|
|
@@ -29,12 +27,16 @@ let IgcChipComponent = IgcChipComponent_1 = class IgcChipComponent extends Sizab
|
|
|
29
27
|
this.removable = false;
|
|
30
28
|
this.selectable = false;
|
|
31
29
|
this.selected = false;
|
|
32
|
-
this.size = 'medium';
|
|
33
30
|
addKeybindings(this, {
|
|
34
31
|
ref: this._removePartRef,
|
|
35
32
|
bindingDefaults: { triggers: ['keyup'] },
|
|
36
33
|
}).setActivateHandler(this.handleRemove);
|
|
37
34
|
}
|
|
35
|
+
createRenderRoot() {
|
|
36
|
+
const root = super.createRenderRoot();
|
|
37
|
+
root.addEventListener('slotchange', () => this.requestUpdate());
|
|
38
|
+
return root;
|
|
39
|
+
}
|
|
38
40
|
handleSelect() {
|
|
39
41
|
if (this.selectable) {
|
|
40
42
|
this.selected = !this.selected;
|
|
@@ -56,12 +58,8 @@ let IgcChipComponent = IgcChipComponent_1 = class IgcChipComponent extends Sizab
|
|
|
56
58
|
>
|
|
57
59
|
<span part="prefix">
|
|
58
60
|
${this.selectable && this.selected
|
|
59
|
-
? html `<slot
|
|
60
|
-
<igc-icon
|
|
61
|
-
size=${this.size}
|
|
62
|
-
name="chip_select"
|
|
63
|
-
collection="internal"
|
|
64
|
-
></igc-icon>
|
|
61
|
+
? html `<slot name="select">
|
|
62
|
+
<igc-icon name="selected" collection="default"></igc-icon>
|
|
65
63
|
</slot>`
|
|
66
64
|
: nothing}
|
|
67
65
|
<slot name="start"></slot>
|
|
@@ -74,14 +72,12 @@ let IgcChipComponent = IgcChipComponent_1 = class IgcChipComponent extends Sizab
|
|
|
74
72
|
${this.removable && !this.disabled
|
|
75
73
|
? html `<slot
|
|
76
74
|
${ref(this._removePartRef)}
|
|
77
|
-
@slotchange=${this.slotChanges}
|
|
78
75
|
@click=${this.handleRemove}
|
|
79
76
|
name="remove"
|
|
80
77
|
>
|
|
81
78
|
<igc-icon
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
collection="internal"
|
|
79
|
+
name="remove"
|
|
80
|
+
collection="default"
|
|
85
81
|
tabindex="0"
|
|
86
82
|
role="button"
|
|
87
83
|
aria-label="remove"
|
|
@@ -92,9 +88,6 @@ let IgcChipComponent = IgcChipComponent_1 = class IgcChipComponent extends Sizab
|
|
|
92
88
|
</button>
|
|
93
89
|
`;
|
|
94
90
|
}
|
|
95
|
-
slotChanges() {
|
|
96
|
-
this.requestUpdate();
|
|
97
|
-
}
|
|
98
91
|
};
|
|
99
92
|
IgcChipComponent.tagName = 'igc-chip';
|
|
100
93
|
IgcChipComponent.styles = [styles, shared];
|
|
@@ -108,8 +101,7 @@ __decorate([
|
|
|
108
101
|
property({ type: Boolean, reflect: true })
|
|
109
102
|
], IgcChipComponent.prototype, "selectable", void 0);
|
|
110
103
|
__decorate([
|
|
111
|
-
property({ type: Boolean, reflect: true })
|
|
112
|
-
blazorTwoWayBind('igcSelect', 'detail')
|
|
104
|
+
property({ type: Boolean, reflect: true })
|
|
113
105
|
], IgcChipComponent.prototype, "selected", void 0);
|
|
114
106
|
__decorate([
|
|
115
107
|
property({ reflect: true })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.js","sourceRoot":"","sources":["../../../src/components/chip/chip.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAY,SAAS,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"chip.js","sourceRoot":"","sources":["../../../src/components/chip/chip.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAY,SAAS,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,gBAAgB,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAuB1B,IAAM,gBAAgB,wBAAtB,MAAM,gBAAiB,SAAQ,iBAAiB,CAG7D,UAAU,CAAC;IAKJ,MAAM,CAAC,QAAQ;QACpB,iBAAiB,CAAC,kBAAgB,EAAE,gBAAgB,CAAC,CAAC;IACxD,CAAC;IAwCD;QACE,KAAK,EAAE,CAAC;QAvCF,mBAAc,GAAyB,SAAS,EAAE,CAAC;QAOpD,aAAQ,GAAG,KAAK,CAAC;QAOjB,cAAS,GAAG,KAAK,CAAC;QAOlB,eAAU,GAAG,KAAK,CAAC;QAQnB,aAAQ,GAAG,KAAK,CAAC;QAYtB,cAAc,CAAC,IAAI,EAAE;YACnB,GAAG,EAAE,IAAI,CAAC,cAAc;YACxB,eAAe,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE;SACzC,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC3C,CAAC;IAEkB,gBAAgB;QACjC,MAAM,IAAI,GAAG,KAAK,CAAC,gBAAgB,EAAE,CAAC;QACtC,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QAChE,OAAO,IAAI,CAAC;IACd,CAAC;IAES,YAAY;QACpB,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC/B,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;IAES,YAAY,CAAC,CAAQ;QAC7B,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAC5B,CAAC,CAAC,eAAe,EAAE,CAAC;IACtB,CAAC;IAEkB,MAAM;QACvB,OAAO,IAAI,CAAA;;;qBAGM,IAAI,CAAC,QAAQ;yBACT,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;yBAChC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;iBACxC,IAAI,CAAC,YAAY;;;YAGtB,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ;YAChC,CAAC,CAAC,IAAI,CAAA;;sBAEI;YACV,CAAC,CAAC,OAAO;;;;;;;;YAQT,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,QAAQ;YAChC,CAAC,CAAC,IAAI,CAAA;kBACA,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC;yBACjB,IAAI,CAAC,YAAY;;;;;;;;;;sBAUpB;YACV,CAAC,CAAC,OAAO;;;KAGhB,CAAC;IACJ,CAAC;;AAjHsB,wBAAO,GAAG,UAAU,AAAb,CAAc;AAC9B,uBAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,AAAnB,CAAoB;AAcjC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDACnB;AAOjB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;mDAClB;AAOlB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDACjB;AAQnB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDACnB;AAOjB;IADN,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDACE;AAhDX,gBAAgB;IADpC,MAAM,CAAC,GAAG,CAAC;GACS,gBAAgB,CAsHpC;eAtHoB,gBAAgB","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { type Ref, createRef, ref } from 'lit/directives/ref.js';\n\nimport { themes } from '../../theming/theming-decorator.js';\nimport { addKeybindings } from '../common/controllers/key-bindings.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport IgcIconComponent from '../icon/icon.js';\nimport type { StyleVariant } from '../types.js';\nimport { styles } from './themes/chip.base.css.js';\nimport { styles as shared } from './themes/shared/chip.common.css.js';\nimport { all } from './themes/themes.js';\n\nexport interface IgcChipEventMap {\n igcRemove: CustomEvent<boolean>;\n igcSelect: CustomEvent<boolean>;\n}\n/**\n * Chips help people enter information, make selections, filter content, or trigger actions.\n *\n * @element igc-chip\n *\n * @slot - Renders the chip data.\n * @slot prefix - Renders content before the data of the chip.\n * @slot suffix - Renders content after the data of the chip.\n *\n * @fires igcRemove - Emits an event when the chip component is removed. Returns the removed chip component.\n * @fires igcSelect - Emits event when the chip component is selected/deselected and any related animations and transitions also end.\n *\n * @csspart base - The base wrapper of the chip.\n * @csspart prefix - The prefix container of the chip.\n * @csspart suffix - The suffix container of the chip.\n */\n@themes(all)\nexport default class IgcChipComponent extends EventEmitterMixin<\n IgcChipEventMap,\n Constructor<LitElement>\n>(LitElement) {\n public static readonly tagName = 'igc-chip';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcChipComponent, IgcIconComponent);\n }\n\n private _removePartRef: Ref<HTMLSlotElement> = createRef();\n\n /**\n * Sets the disabled state for the chip.\n * @attr\n */\n @property({ type: Boolean, reflect: true })\n public disabled = false;\n\n /**\n * Defines if the chip is removable or not.\n * @attr\n */\n @property({ type: Boolean, reflect: true })\n public removable = false;\n\n /**\n * Defines if the chip is selectable or not.\n * @attr\n */\n @property({ type: Boolean, reflect: true })\n public selectable = false;\n\n /* @tsTwoWayProperty(true, \"igcSelect\", \"detail\", false) */\n /**\n * Defines if the chip is selected or not.\n * @attr\n */\n @property({ type: Boolean, reflect: true })\n public selected = false;\n\n /**\n * A property that sets the color variant of the chip component.\n * @attr\n */\n @property({ reflect: true })\n public variant!: StyleVariant;\n\n constructor() {\n super();\n\n addKeybindings(this, {\n ref: this._removePartRef,\n bindingDefaults: { triggers: ['keyup'] },\n }).setActivateHandler(this.handleRemove);\n }\n\n protected override createRenderRoot() {\n const root = super.createRenderRoot();\n root.addEventListener('slotchange', () => this.requestUpdate());\n return root;\n }\n\n protected handleSelect() {\n if (this.selectable) {\n this.selected = !this.selected;\n this.emitEvent('igcSelect', { detail: this.selected });\n }\n }\n\n protected handleRemove(e: Event) {\n this.emitEvent('igcRemove');\n e.stopPropagation();\n }\n\n protected override render() {\n return html`\n <button\n part=\"base\"\n .disabled=\"${this.disabled}\"\n aria-selected=\"${this.selected ? 'true' : 'false'}\"\n aria-disabled=\"${this.disabled ? 'true' : 'false'}\"\n @click=${this.handleSelect}\n >\n <span part=\"prefix\">\n ${this.selectable && this.selected\n ? html`<slot name=\"select\">\n <igc-icon name=\"selected\" collection=\"default\"></igc-icon>\n </slot>`\n : nothing}\n <slot name=\"start\"></slot>\n <slot name=\"prefix\"></slot>\n </span>\n <slot></slot>\n <span part=\"suffix\">\n <slot name=\"end\"></slot>\n <slot name=\"suffix\"></slot>\n ${this.removable && !this.disabled\n ? html`<slot\n ${ref(this._removePartRef)}\n @click=${this.handleRemove}\n name=\"remove\"\n >\n <igc-icon\n name=\"remove\"\n collection=\"default\"\n tabindex=\"0\"\n role=\"button\"\n aria-label=\"remove\"\n ></igc-icon>\n </slot>`\n : nothing}\n </span>\n </button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-chip': IgcChipComponent;\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:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;vertical-align:top}:host button{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);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;font-family:var(--ig-font-family);border-style:none;-webkit-box-shadow:none;box-shadow:none;cursor:pointer;padding:max(var(--is-large, 1)*max(12px, -1 * 12px)*var(--ig-spacing-large, var(--ig-spacing, --ig-spacing)),var(--is-medium, 1)*max(6px, -1 * 6px)*var(--ig-spacing-medium, var(--ig-spacing, --ig-spacing)),var(--is-small, 1)*max(2px, -1 * 2px)*var(--ig-spacing-small, var(--ig-spacing, --ig-spacing)))}:host button[disabled]{pointer-events:none}:host([variant=primary]) button,:host([selected][variant=primary]) button:not([disabled]){background:hsla(var(--ig-primary-500), var(--ig-primary-a));color:color-mix(in oklch, var(--ig-primary-500-contrast) 100%, transparent)}:host([variant=primary]) button:hover,:host([selected][variant=primary]) button:not([disabled]):hover{background:hsla(var(--ig-primary-600), var(--ig-primary-a));color:color-mix(in oklch, var(--ig-primary-600-contrast) 100%, transparent)}:host([variant=primary]) button:focus,:host([selected][variant=primary]) button:not([disabled]):focus{background:hsla(var(--ig-primary-800), var(--ig-primary-a));color:color-mix(in oklch, var(--ig-primary-800-contrast) 100%, transparent)}:host([variant=info]) button,:host([selected][variant=info]) button:not([disabled]){background:hsla(var(--ig-info-500), var(--ig-info-a));color:color-mix(in oklch, var(--ig-info-500-contrast) 100%, transparent)}:host([variant=info]) button:hover,:host([selected][variant=info]) button:not([disabled]):hover{background:hsla(var(--ig-info-600), var(--ig-info-a));color:color-mix(in oklch, var(--ig-info-600-contrast) 100%, transparent)}:host([variant=info]) button:focus,:host([selected][variant=info]) button:not([disabled]):focus{background:hsla(var(--ig-info-800), var(--ig-info-a));color:color-mix(in oklch, var(--ig-info-800-contrast) 100%, transparent)}:host([variant=success]) button,:host([selected][variant=success]) button:not([disabled]){background:hsla(var(--ig-success-500), var(--ig-success-a));color:color-mix(in oklch, var(--ig-success-500-contrast) 100%, transparent)}:host([variant=success]) button:hover,:host([selected][variant=success]) button:not([disabled]):hover{background:hsla(var(--ig-success-600), var(--ig-success-a));color:color-mix(in oklch, var(--ig-success-600-contrast) 100%, transparent)}:host([variant=success]) button:focus,:host([selected][variant=success]) button:not([disabled]):focus{background:hsla(var(--ig-success-800), var(--ig-success-a));color:color-mix(in oklch, var(--ig-success-800-contrast) 100%, transparent)}:host([variant=warning]) button,:host([selected][variant=warning]) button:not([disabled]){background:hsla(var(--ig-warn-500), var(--ig-warn-a));color:color-mix(in oklch, var(--ig-warn-500-contrast) 100%, transparent)}:host([variant=warning]) button:hover,:host([selected][variant=warning]) button:not([disabled]):hover{background:hsla(var(--ig-warn-600), var(--ig-warn-a));color:color-mix(in oklch, var(--ig-warn-600-contrast) 100%, transparent)}:host([variant=warning]) button:focus,:host([selected][variant=warning]) button:not([disabled]):focus{background:hsla(var(--ig-warn-800), var(--ig-warn-a));color:color-mix(in oklch, var(--ig-warn-800-contrast) 100%, transparent)}:host([variant=danger]) button,:host([selected][variant=danger]) button:not([disabled]){background:hsla(var(--ig-error-500), var(--ig-error-a));color:color-mix(in oklch, var(--ig-error-500-contrast) 100%, transparent)}:host([variant=danger]) button:hover,:host([selected][variant=danger]) button:not([disabled]):hover{background:hsla(var(--ig-error-600), var(--ig-error-a));color:color-mix(in oklch, var(--ig-error-600-contrast) 100%, transparent)}:host([variant=danger]) button:focus,:host([selected][variant=danger]) button:not([disabled]):focus{background:hsla(var(--ig-error-800), var(--ig-error-a));color:color-mix(in oklch, var(--ig-error-800-contrast) 100%, transparent)}[part=prefix],[part=suffix]{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}[part=prefix]{-webkit-margin-end:max(var(--is-large, 1)*max(0.5rem, -1 * 0.5rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(0.375rem, -1 * 0.375rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.1875rem, -1 * 0.1875rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)));margin-inline-end:max(var(--is-large, 1)*max(0.5rem, -1 * 0.5rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(0.375rem, -1 * 0.375rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.1875rem, -1 * 0.1875rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)))}[part=suffix]{-webkit-margin-start:max(var(--is-large, 1)*max(0.5rem, -1 * 0.5rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(0.375rem, -1 * 0.375rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.1875rem, -1 * 0.1875rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)));margin-inline-start:max(var(--is-large, 1)*max(0.5rem, -1 * 0.5rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(0.375rem, -1 * 0.375rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.1875rem, -1 * 0.1875rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)))}::slotted(*){display:-webkit-box;display:-ms-flexbox;display:flex}`;
|
|
3
3
|
//# sourceMappingURL=chip.base.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.base.css.js","sourceRoot":"","sources":["../../../../src/components/chip/themes/chip.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,8mOAA8mO,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":"chip.base.css.js","sourceRoot":"","sources":["../../../../src/components/chip/themes/chip.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,8mOAA8mO,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:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;vertical-align:top}:host button{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);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;font-family:var(--ig-font-family);border-style:none;-webkit-box-shadow:none;box-shadow:none;cursor:pointer;padding:max(var(--is-large, 1)*max(12px, -1 * 12px)*var(--ig-spacing-large, var(--ig-spacing, --ig-spacing)),var(--is-medium, 1)*max(6px, -1 * 6px)*var(--ig-spacing-medium, var(--ig-spacing, --ig-spacing)),var(--is-small, 1)*max(2px, -1 * 2px)*var(--ig-spacing-small, var(--ig-spacing, --ig-spacing)))}:host button[disabled]{pointer-events:none}:host([variant=primary]) button,:host([selected][variant=primary]) button:not([disabled]){background:hsla(var(--ig-primary-500), var(--ig-primary-a));color:color-mix(in oklch, var(--ig-primary-500-contrast) 100%, transparent)}:host([variant=primary]) button:hover,:host([selected][variant=primary]) button:not([disabled]):hover{background:hsla(var(--ig-primary-600), var(--ig-primary-a));color:color-mix(in oklch, var(--ig-primary-600-contrast) 100%, transparent)}:host([variant=primary]) button:focus,:host([selected][variant=primary]) button:not([disabled]):focus{background:hsla(var(--ig-primary-800), var(--ig-primary-a));color:color-mix(in oklch, var(--ig-primary-800-contrast) 100%, transparent)}:host([variant=info]) button,:host([selected][variant=info]) button:not([disabled]){background:hsla(var(--ig-info-500), var(--ig-info-a));color:color-mix(in oklch, var(--ig-info-500-contrast) 100%, transparent)}:host([variant=info]) button:hover,:host([selected][variant=info]) button:not([disabled]):hover{background:hsla(var(--ig-info-600), var(--ig-info-a));color:color-mix(in oklch, var(--ig-info-600-contrast) 100%, transparent)}:host([variant=info]) button:focus,:host([selected][variant=info]) button:not([disabled]):focus{background:hsla(var(--ig-info-800), var(--ig-info-a));color:color-mix(in oklch, var(--ig-info-800-contrast) 100%, transparent)}:host([variant=success]) button,:host([selected][variant=success]) button:not([disabled]){background:hsla(var(--ig-success-500), var(--ig-success-a));color:color-mix(in oklch, var(--ig-success-500-contrast) 100%, transparent)}:host([variant=success]) button:hover,:host([selected][variant=success]) button:not([disabled]):hover{background:hsla(var(--ig-success-600), var(--ig-success-a));color:color-mix(in oklch, var(--ig-success-600-contrast) 100%, transparent)}:host([variant=success]) button:focus,:host([selected][variant=success]) button:not([disabled]):focus{background:hsla(var(--ig-success-800), var(--ig-success-a));color:color-mix(in oklch, var(--ig-success-800-contrast) 100%, transparent)}:host([variant=warning]) button,:host([selected][variant=warning]) button:not([disabled]){background:hsla(var(--ig-warn-500), var(--ig-warn-a));color:color-mix(in oklch, var(--ig-warn-500-contrast) 100%, transparent)}:host([variant=warning]) button:hover,:host([selected][variant=warning]) button:not([disabled]):hover{background:hsla(var(--ig-warn-600), var(--ig-warn-a));color:color-mix(in oklch, var(--ig-warn-600-contrast) 100%, transparent)}:host([variant=warning]) button:focus,:host([selected][variant=warning]) button:not([disabled]):focus{background:hsla(var(--ig-warn-800), var(--ig-warn-a));color:color-mix(in oklch, var(--ig-warn-800-contrast) 100%, transparent)}:host([variant=danger]) button,:host([selected][variant=danger]) button:not([disabled]){background:hsla(var(--ig-error-500), var(--ig-error-a));color:color-mix(in oklch, var(--ig-error-500-contrast) 100%, transparent)}:host([variant=danger]) button:hover,:host([selected][variant=danger]) button:not([disabled]):hover{background:hsla(var(--ig-error-600), var(--ig-error-a));color:color-mix(in oklch, var(--ig-error-600-contrast) 100%, transparent)}:host([variant=danger]) button:focus,:host([selected][variant=danger]) button:not([disabled]):focus{background:hsla(var(--ig-error-800), var(--ig-error-a));color:color-mix(in oklch, var(--ig-error-800-contrast) 100%, transparent)}[part=prefix],[part=suffix]{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}[part=prefix]{-webkit-margin-end:max(var(--is-large, 1)*max(0.5rem, -1 * 0.5rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(0.375rem, -1 * 0.375rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.1875rem, -1 * 0.1875rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)));margin-inline-end:max(var(--is-large, 1)*max(0.5rem, -1 * 0.5rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(0.375rem, -1 * 0.375rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.1875rem, -1 * 0.1875rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)))}[part=suffix]{-webkit-margin-start:max(var(--is-large, 1)*max(0.5rem, -1 * 0.5rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(0.375rem, -1 * 0.375rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.1875rem, -1 * 0.1875rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)));margin-inline-start:max(var(--is-large, 1)*max(0.5rem, -1 * 0.5rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(0.375rem, -1 * 0.375rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.1875rem, -1 * 0.1875rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)))}::slotted(*){display:-webkit-box;display:-ms-flexbox;display:flex}`;\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `:host{--component-size: var(--ig-size, var(--default-size))}:host button{border-radius:var(--border-radius);background:var(--background);color:var(--text-color);outline:none;height:var(--size)}:host button:hover{background:var(--hover-background);color:var(--hover-text-color)}:host button:focus{background:var(--focus-background);color:var(--focus-text-color)}:host button[disabled]{background:var(--disabled-background);color:var(--disabled-text-color)}`;
|
|
2
|
+
export const styles = css `:host{--component-size: var(--ig-size, var(--default-size));--chip-size: var(--component-size)}:host button{border-radius:var(--border-radius);background:var(--background);color:var(--text-color);outline:none;height:var(--size)}:host button:hover{background:var(--hover-background);color:var(--hover-text-color)}:host button:focus{background:var(--focus-background);color:var(--focus-text-color)}:host button[disabled]{background:var(--disabled-background);color:var(--disabled-text-color)}:host button igc-icon{--component-size: var(--chip-size)}`;
|
|
3
3
|
//# sourceMappingURL=chip.common.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.common.css.js","sourceRoot":"","sources":["../../../../../src/components/chip/themes/shared/chip.common.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"chip.common.css.js","sourceRoot":"","sources":["../../../../../src/components/chip/themes/shared/chip.common.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,qiBAAqiB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`:host{--component-size: var(--ig-size, var(--default-size));--chip-size: var(--component-size)}:host button{border-radius:var(--border-radius);background:var(--background);color:var(--text-color);outline:none;height:var(--size)}:host button:hover{background:var(--hover-background);color:var(--hover-text-color)}:host button:focus{background:var(--focus-background);color:var(--focus-text-color)}:host button[disabled]{background:var(--disabled-background);color:var(--disabled-text-color)}:host button igc-icon{--component-size: var(--chip-size)}`;\n"]}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { LitElement, type TemplateResult } from 'lit';
|
|
2
|
-
import { themeSymbol } from '../../theming/theming-decorator.js';
|
|
3
2
|
import type { Constructor } from '../common/mixins/constructor.js';
|
|
4
|
-
import type { Validator } from '../common/validators.js';
|
|
5
3
|
import IgcInputComponent from '../input/input.js';
|
|
6
4
|
import { DataController } from './controllers/data.js';
|
|
7
5
|
import { NavigationController } from './controllers/navigation.js';
|
|
@@ -17,44 +15,42 @@ declare const IgcComboComponent_base: Constructor<import("../common/mixins/form-
|
|
|
17
15
|
*
|
|
18
16
|
* @element igc-combo
|
|
19
17
|
*
|
|
20
|
-
* @slot prefix - Renders content before the input.
|
|
21
|
-
* @slot suffix - Renders content after input.
|
|
22
|
-
* @slot header - Renders a container before the list of options.
|
|
23
|
-
* @slot footer - Renders a container after the list of options.
|
|
24
|
-
* @slot helper-text - Renders content below the input.
|
|
25
|
-
* @slot toggle-icon - Renders content inside the suffix container.
|
|
26
|
-
* @slot clear-icon - Renders content inside the suffix container.
|
|
18
|
+
* @slot prefix - Renders content before the input of the combo.
|
|
19
|
+
* @slot suffix - Renders content after the input of the combo.
|
|
20
|
+
* @slot header - Renders a container before the list of options of the combo.
|
|
21
|
+
* @slot footer - Renders a container after the list of options of the combo.
|
|
22
|
+
* @slot helper-text - Renders content below the input of the combo.
|
|
23
|
+
* @slot toggle-icon - Renders content inside the suffix container of the combo.
|
|
24
|
+
* @slot clear-icon - Renders content inside the suffix container of the combo.
|
|
27
25
|
*
|
|
28
|
-
* @fires igcFocus - Emitted when the select gains focus.
|
|
29
|
-
* @fires igcBlur - Emitted when the select loses focus.
|
|
30
26
|
* @fires igcChange - Emitted when the control's selection has changed.
|
|
31
27
|
* @fires igcOpening - Emitted just before the list of options is opened.
|
|
32
28
|
* @fires igcOpened - Emitted after the list of options is opened.
|
|
33
29
|
* @fires igcClosing - Emitter just before the list of options is closed.
|
|
34
30
|
* @fires igcClosed - Emitted after the list of options is closed.
|
|
35
31
|
*
|
|
36
|
-
* @csspart label - The encapsulated text label.
|
|
37
|
-
* @csspart input - The main input field.
|
|
38
|
-
* @csspart native-input - The native input of the main input field.
|
|
39
|
-
* @csspart prefix - The prefix wrapper.
|
|
40
|
-
* @csspart suffix - The suffix wrapper.
|
|
41
|
-
* @csspart toggle-icon - The toggle icon wrapper.
|
|
42
|
-
* @csspart clear-icon - The clear icon wrapper.
|
|
43
|
-
* @csspart case-icon - The case icon wrapper.
|
|
44
|
-
* @csspart helper-text - The helper text wrapper.
|
|
45
|
-
* @csspart search-input - The search input field.
|
|
46
|
-
* @csspart list-wrapper - The list of options wrapper.
|
|
47
|
-
* @csspart list - The list of options box.
|
|
48
|
-
* @csspart item - Represents each item in the list of options.
|
|
49
|
-
* @csspart group-header - Represents each header in the list of options.
|
|
50
|
-
* @csspart active - Appended to the item parts list when the item is active.
|
|
51
|
-
* @csspart selected - Appended to the item parts list when the item is selected.
|
|
52
|
-
* @csspart checkbox - Represents each checkbox of each list item.
|
|
53
|
-
* @csspart checkbox-indicator - Represents the checkbox indicator of each list item.
|
|
54
|
-
* @csspart checked - Appended to checkbox parts list when checkbox is checked.
|
|
55
|
-
* @csspart header - The container holding the header content.
|
|
56
|
-
* @csspart footer - The container holding the footer content.
|
|
57
|
-
* @csspart empty - The container holding the empty content.
|
|
32
|
+
* @csspart label - The encapsulated text label of the combo.
|
|
33
|
+
* @csspart input - The main input field of the combo.
|
|
34
|
+
* @csspart native-input - The native input of the main input field of the combo.
|
|
35
|
+
* @csspart prefix - The prefix wrapper of the combo.
|
|
36
|
+
* @csspart suffix - The suffix wrapper of the combo.
|
|
37
|
+
* @csspart toggle-icon - The toggle icon wrapper of the combo.
|
|
38
|
+
* @csspart clear-icon - The clear icon wrapper of the combo.
|
|
39
|
+
* @csspart case-icon - The case icon wrapper of the combo.
|
|
40
|
+
* @csspart helper-text - The helper text wrapper of the combo.
|
|
41
|
+
* @csspart search-input - The search input field of the combo.
|
|
42
|
+
* @csspart list-wrapper - The list of options wrapper of the combo.
|
|
43
|
+
* @csspart list - The list of options box of the combo.
|
|
44
|
+
* @csspart item - Represents each item in the list of options of the combo.
|
|
45
|
+
* @csspart group-header - Represents each header in the list of options of the combo.
|
|
46
|
+
* @csspart active - Appended to the item parts list when the item is active of the combo.
|
|
47
|
+
* @csspart selected - Appended to the item parts list when the item is selected of the combo.
|
|
48
|
+
* @csspart checkbox - Represents each checkbox of each list item of the combo.
|
|
49
|
+
* @csspart checkbox-indicator - Represents the checkbox indicator of each list item of the combo.
|
|
50
|
+
* @csspart checked - Appended to checkbox parts list when checkbox is checked in the combo.
|
|
51
|
+
* @csspart header - The container holding the header content of the combo.
|
|
52
|
+
* @csspart footer - The container holding the footer content of the combo.
|
|
53
|
+
* @csspart empty - The container holding the empty content of the combo.
|
|
58
54
|
*/
|
|
59
55
|
export default class IgcComboComponent<T extends object = any> extends IgcComboComponent_base {
|
|
60
56
|
static readonly tagName = "igc-combo";
|
|
@@ -64,11 +60,10 @@ export default class IgcComboComponent<T extends object = any> extends IgcComboC
|
|
|
64
60
|
private _activeDescendant;
|
|
65
61
|
private _displayValue;
|
|
66
62
|
private _filteringOptions;
|
|
67
|
-
protected
|
|
63
|
+
protected get __validators(): import("../common/validators.js").Validator<IgcComboComponent<any>>[];
|
|
68
64
|
protected navigationController: NavigationController<T>;
|
|
69
65
|
protected selectionController: SelectionController<T>;
|
|
70
66
|
protected dataController: DataController<T>;
|
|
71
|
-
private readonly [themeSymbol];
|
|
72
67
|
protected helperText: Array<HTMLElement>;
|
|
73
68
|
protected inputSuffix: Array<HTMLElement>;
|
|
74
69
|
protected inputPrefix: Array<HTMLElement>;
|
|
@@ -117,8 +112,6 @@ export default class IgcComboComponent<T extends object = any> extends IgcComboC
|
|
|
117
112
|
* @attr open
|
|
118
113
|
*/
|
|
119
114
|
open: boolean;
|
|
120
|
-
/** @hidden @internal */
|
|
121
|
-
flip: boolean;
|
|
122
115
|
/**
|
|
123
116
|
* The key in the data source used when selecting items.
|
|
124
117
|
* @attr value-key
|
|
@@ -170,16 +163,6 @@ export default class IgcComboComponent<T extends object = any> extends IgcComboC
|
|
|
170
163
|
* @type {ComboItemTemplate<T>}
|
|
171
164
|
*/
|
|
172
165
|
groupHeaderTemplate: ComboItemTemplate<T>;
|
|
173
|
-
/**
|
|
174
|
-
* Sets the component's positioning strategy.
|
|
175
|
-
* @hidden @internal @private
|
|
176
|
-
*/
|
|
177
|
-
positionStrategy: 'absolute' | 'fixed';
|
|
178
|
-
/**
|
|
179
|
-
* Whether the dropdown's width should be the same as the target's one.
|
|
180
|
-
* @hidden @internal @private
|
|
181
|
-
*/
|
|
182
|
-
sameWidth: boolean;
|
|
183
166
|
protected dataState: Array<ComboRecord<T>>;
|
|
184
167
|
protected dataChanged(): void;
|
|
185
168
|
protected updateDisplayKey(): void;
|
|
@@ -287,16 +270,15 @@ export default class IgcComboComponent<T extends object = any> extends IgcComboC
|
|
|
287
270
|
protected handleSearchInput(e: CustomEvent): void;
|
|
288
271
|
protected handleOpening(): boolean;
|
|
289
272
|
protected handleClosing(): boolean;
|
|
290
|
-
protected _show(
|
|
273
|
+
protected _show(emitEvent?: boolean): Promise<boolean>;
|
|
291
274
|
/** Shows the list of options. */
|
|
292
|
-
show():
|
|
293
|
-
protected _hide(
|
|
275
|
+
show(): Promise<boolean>;
|
|
276
|
+
protected _hide(emitEvent?: boolean): Promise<boolean>;
|
|
294
277
|
/** Hides the list of options. */
|
|
295
|
-
hide():
|
|
296
|
-
|
|
297
|
-
_toggle(emit?: boolean): void;
|
|
278
|
+
hide(): Promise<boolean>;
|
|
279
|
+
protected _toggle(emit?: boolean): Promise<boolean>;
|
|
298
280
|
/** Toggles the list of options. */
|
|
299
|
-
toggle():
|
|
281
|
+
toggle(): Promise<boolean>;
|
|
300
282
|
protected itemRenderer: ComboRenderFunction<T>;
|
|
301
283
|
protected listKeydownHandler(event: KeyboardEvent): void;
|
|
302
284
|
protected itemClickHandler(event: MouseEvent): void;
|
|
@@ -9,13 +9,12 @@ import { LitElement, html } from 'lit';
|
|
|
9
9
|
import { property, query, queryAssignedElements, state, } from 'lit/decorators.js';
|
|
10
10
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
11
11
|
import { live } from 'lit/directives/live.js';
|
|
12
|
-
import {
|
|
12
|
+
import { themes } from '../../theming/theming-decorator.js';
|
|
13
13
|
import { addRootClickHandler } from '../common/controllers/root-click.js';
|
|
14
14
|
import { blazorAdditionalDependencies } from '../common/decorators/blazorAdditionalDependencies.js';
|
|
15
15
|
import { blazorIndirectRender } from '../common/decorators/blazorIndirectRender.js';
|
|
16
16
|
import { watch } from '../common/decorators/watch.js';
|
|
17
17
|
import { registerComponent } from '../common/definitions/register.js';
|
|
18
|
-
import messages from '../common/localization/validation-en.js';
|
|
19
18
|
import { EventEmitterMixin } from '../common/mixins/event-emitter.js';
|
|
20
19
|
import { FormAssociatedRequiredMixin } from '../common/mixins/form-associated-required.js';
|
|
21
20
|
import { partNameMap } from '../common/util.js';
|
|
@@ -31,10 +30,14 @@ import { SelectionController } from './controllers/selection.js';
|
|
|
31
30
|
import { styles } from './themes/combo.base.css.js';
|
|
32
31
|
import { styles as shared } from './themes/shared/combo.common.css.js';
|
|
33
32
|
import { all } from './themes/themes.js';
|
|
33
|
+
import { comboValidators } from './validators.js';
|
|
34
34
|
let IgcComboComponent = IgcComboComponent_1 = class IgcComboComponent extends FormAssociatedRequiredMixin(EventEmitterMixin(LitElement)) {
|
|
35
35
|
static register() {
|
|
36
36
|
registerComponent(IgcComboComponent_1, IgcIconComponent, IgcComboListComponent, IgcComboItemComponent, IgcComboHeaderComponent, IgcInputComponent, IgcPopoverComponent);
|
|
37
37
|
}
|
|
38
|
+
get __validators() {
|
|
39
|
+
return comboValidators;
|
|
40
|
+
}
|
|
38
41
|
get filteringOptions() {
|
|
39
42
|
return this._filteringOptions;
|
|
40
43
|
}
|
|
@@ -78,15 +81,6 @@ let IgcComboComponent = IgcComboComponent_1 = class IgcComboComponent extends Fo
|
|
|
78
81
|
caseSensitive: false,
|
|
79
82
|
matchDiacritics: false,
|
|
80
83
|
};
|
|
81
|
-
this.validators = [
|
|
82
|
-
{
|
|
83
|
-
key: 'valueMissing',
|
|
84
|
-
message: messages.required,
|
|
85
|
-
isValid: () => this.required
|
|
86
|
-
? Array.isArray(this.value) && this.value.length > 0
|
|
87
|
-
: true,
|
|
88
|
-
},
|
|
89
|
-
];
|
|
90
84
|
this.navigationController = new NavigationController(this);
|
|
91
85
|
this.selectionController = new SelectionController(this);
|
|
92
86
|
this.dataController = new DataController(this);
|
|
@@ -96,7 +90,6 @@ let IgcComboComponent = IgcComboComponent_1 = class IgcComboComponent extends Fo
|
|
|
96
90
|
this.autofocusList = false;
|
|
97
91
|
this.placeholderSearch = 'Search';
|
|
98
92
|
this.open = false;
|
|
99
|
-
this.flip = true;
|
|
100
93
|
this.displayKey = this.valueKey;
|
|
101
94
|
this.groupKey = this.displayKey;
|
|
102
95
|
this.groupSorting = 'asc';
|
|
@@ -109,8 +102,6 @@ let IgcComboComponent = IgcComboComponent_1 = class IgcComboComponent extends Fo
|
|
|
109
102
|
this.groupHeaderTemplate = ({ item }) => {
|
|
110
103
|
return html `${this.groupKey && item[this.groupKey]}`;
|
|
111
104
|
};
|
|
112
|
-
this.positionStrategy = 'fixed';
|
|
113
|
-
this.sameWidth = true;
|
|
114
105
|
this.dataState = [];
|
|
115
106
|
this._rootClickController = addRootClickHandler(this, {
|
|
116
107
|
hideCallback: async () => {
|
|
@@ -153,9 +144,6 @@ let IgcComboComponent = IgcComboComponent_1 = class IgcComboComponent extends Fo
|
|
|
153
144
|
? headerTemplate
|
|
154
145
|
: itemTemplate}`;
|
|
155
146
|
};
|
|
156
|
-
this.addEventListener('focus', () => {
|
|
157
|
-
this.emitEvent('igcFocus');
|
|
158
|
-
});
|
|
159
147
|
this.addEventListener('blur', () => {
|
|
160
148
|
const { selected } = this.selectionController;
|
|
161
149
|
if (selected.size === 0) {
|
|
@@ -163,7 +151,6 @@ let IgcComboComponent = IgcComboComponent_1 = class IgcComboComponent extends Fo
|
|
|
163
151
|
this.resetSearchTerm();
|
|
164
152
|
}
|
|
165
153
|
this.invalid = !this.checkValidity();
|
|
166
|
-
this.emitEvent('igcBlur');
|
|
167
154
|
});
|
|
168
155
|
this.addEventListener('keydown', this.navigationController.navigateHost.bind(this.navigationController));
|
|
169
156
|
}
|
|
@@ -276,49 +263,51 @@ let IgcComboComponent = IgcComboComponent_1 = class IgcComboComponent extends Fo
|
|
|
276
263
|
this.dataController.searchTerm = e.detail;
|
|
277
264
|
}
|
|
278
265
|
handleOpening() {
|
|
279
|
-
|
|
280
|
-
return this.emitEvent('igcOpening', args);
|
|
266
|
+
return this.emitEvent('igcOpening', { cancelable: true });
|
|
281
267
|
}
|
|
282
268
|
handleClosing() {
|
|
283
|
-
|
|
284
|
-
return this.emitEvent('igcClosing', args);
|
|
269
|
+
return this.emitEvent('igcClosing', { cancelable: true });
|
|
285
270
|
}
|
|
286
|
-
async _show(
|
|
287
|
-
if (this.open)
|
|
288
|
-
return;
|
|
289
|
-
|
|
290
|
-
return;
|
|
271
|
+
async _show(emitEvent = true) {
|
|
272
|
+
if (this.open || (emitEvent && !this.handleOpening())) {
|
|
273
|
+
return false;
|
|
274
|
+
}
|
|
291
275
|
this.open = true;
|
|
292
276
|
await this.updateComplete;
|
|
293
|
-
|
|
277
|
+
if (emitEvent) {
|
|
278
|
+
this.emitEvent('igcOpened');
|
|
279
|
+
}
|
|
294
280
|
if (!this.singleSelect) {
|
|
295
281
|
this.list.focus();
|
|
296
282
|
}
|
|
297
283
|
if (!this.autofocusList) {
|
|
298
284
|
this.input.focus();
|
|
299
285
|
}
|
|
286
|
+
return true;
|
|
300
287
|
}
|
|
301
|
-
show() {
|
|
302
|
-
this._show(false);
|
|
288
|
+
async show() {
|
|
289
|
+
return this._show(false);
|
|
303
290
|
}
|
|
304
|
-
async _hide(
|
|
305
|
-
if (!this.open)
|
|
306
|
-
return;
|
|
307
|
-
|
|
308
|
-
return;
|
|
291
|
+
async _hide(emitEvent = true) {
|
|
292
|
+
if (!this.open || (emitEvent && !this.handleClosing())) {
|
|
293
|
+
return false;
|
|
294
|
+
}
|
|
309
295
|
this.open = false;
|
|
310
296
|
await this.updateComplete;
|
|
311
|
-
|
|
297
|
+
if (emitEvent) {
|
|
298
|
+
this.emitEvent('igcClosed');
|
|
299
|
+
}
|
|
312
300
|
this.navigationController.active = -1;
|
|
301
|
+
return true;
|
|
313
302
|
}
|
|
314
|
-
hide() {
|
|
315
|
-
this._hide(false);
|
|
303
|
+
async hide() {
|
|
304
|
+
return this._hide(false);
|
|
316
305
|
}
|
|
317
306
|
_toggle(emit = true) {
|
|
318
|
-
this.open ? this._hide(emit) : this._show(emit);
|
|
307
|
+
return this.open ? this._hide(emit) : this._show(emit);
|
|
319
308
|
}
|
|
320
|
-
toggle() {
|
|
321
|
-
this._toggle(false);
|
|
309
|
+
async toggle() {
|
|
310
|
+
return this._toggle(false);
|
|
322
311
|
}
|
|
323
312
|
listKeydownHandler(event) {
|
|
324
313
|
const target = event
|
|
@@ -396,10 +385,6 @@ let IgcComboComponent = IgcComboComponent_1 = class IgcComboComponent extends Fo
|
|
|
396
385
|
e.stopPropagation();
|
|
397
386
|
}
|
|
398
387
|
renderToggleIcon() {
|
|
399
|
-
const openIcon = this[themeSymbol] === 'material' ? 'keyboard_arrow_up' : 'arrow_drop_up';
|
|
400
|
-
const closeIcon = this[themeSymbol] === 'material'
|
|
401
|
-
? 'keyboard_arrow_down'
|
|
402
|
-
: 'arrow_drop_down';
|
|
403
388
|
return html `
|
|
404
389
|
<span
|
|
405
390
|
slot="suffix"
|
|
@@ -410,8 +395,8 @@ let IgcComboComponent = IgcComboComponent_1 = class IgcComboComponent extends Fo
|
|
|
410
395
|
>
|
|
411
396
|
<slot name="toggle-icon">
|
|
412
397
|
<igc-icon
|
|
413
|
-
name=${this.open ?
|
|
414
|
-
collection="
|
|
398
|
+
name=${this.open ? 'input_collapse' : 'input_expand'}
|
|
399
|
+
collection="default"
|
|
415
400
|
aria-hidden="true"
|
|
416
401
|
></igc-icon>
|
|
417
402
|
</slot>
|
|
@@ -420,7 +405,6 @@ let IgcComboComponent = IgcComboComponent_1 = class IgcComboComponent extends Fo
|
|
|
420
405
|
}
|
|
421
406
|
renderClearIcon() {
|
|
422
407
|
const { selected } = this.selectionController;
|
|
423
|
-
const icon = this[themeSymbol] === 'material' ? 'chip_cancel' : 'clear';
|
|
424
408
|
return html `<span
|
|
425
409
|
slot="suffix"
|
|
426
410
|
part="clear-icon"
|
|
@@ -429,8 +413,8 @@ let IgcComboComponent = IgcComboComponent_1 = class IgcComboComponent extends Fo
|
|
|
429
413
|
>
|
|
430
414
|
<slot name="clear-icon">
|
|
431
415
|
<igc-icon
|
|
432
|
-
name="
|
|
433
|
-
collection="
|
|
416
|
+
name="input_clear"
|
|
417
|
+
collection="default"
|
|
434
418
|
aria-hidden="true"
|
|
435
419
|
></igc-icon>
|
|
436
420
|
</slot>
|
|
@@ -454,13 +438,11 @@ let IgcComboComponent = IgcComboComponent_1 = class IgcComboComponent extends Fo
|
|
|
454
438
|
placeholder=${ifDefined(this.placeholder)}
|
|
455
439
|
label=${ifDefined(this.label)}
|
|
456
440
|
@igcChange=${this._stopPropagation}
|
|
457
|
-
@
|
|
458
|
-
e.stopPropagation();
|
|
441
|
+
@focus=${() => {
|
|
459
442
|
requestAnimationFrame(() => {
|
|
460
443
|
this.target.select();
|
|
461
444
|
});
|
|
462
445
|
}}
|
|
463
|
-
@igcBlur=${this._stopPropagation}
|
|
464
446
|
@igcInput=${this.handleMainInput}
|
|
465
447
|
@keydown=${this.handleMainInputKeydown}
|
|
466
448
|
.value=${this._displayValue}
|
|
@@ -491,15 +473,13 @@ let IgcComboComponent = IgcComboComponent_1 = class IgcComboComponent extends Fo
|
|
|
491
473
|
part="search-input"
|
|
492
474
|
placeholder=${this.placeholderSearch}
|
|
493
475
|
exportparts="input: search-input"
|
|
494
|
-
@igcFocus=${this._stopPropagation}
|
|
495
|
-
@igcBlur=${this._stopPropagation}
|
|
496
476
|
@igcInput=${this.handleSearchInput}
|
|
497
477
|
@keydown=${this.handleSearchInputKeydown}
|
|
498
478
|
>
|
|
499
479
|
<igc-icon
|
|
500
480
|
slot=${this.caseSensitiveIcon && 'suffix'}
|
|
501
481
|
name="case_sensitive"
|
|
502
|
-
collection="
|
|
482
|
+
collection="default"
|
|
503
483
|
part=${partNameMap({
|
|
504
484
|
'case-icon': true,
|
|
505
485
|
active: this.filteringOptions.caseSensitive ?? false,
|
|
@@ -615,9 +595,6 @@ __decorate([
|
|
|
615
595
|
__decorate([
|
|
616
596
|
property({ type: Boolean })
|
|
617
597
|
], IgcComboComponent.prototype, "open", void 0);
|
|
618
|
-
__decorate([
|
|
619
|
-
property({ type: Boolean })
|
|
620
|
-
], IgcComboComponent.prototype, "flip", void 0);
|
|
621
598
|
__decorate([
|
|
622
599
|
property({ attribute: 'value-key', reflect: false })
|
|
623
600
|
], IgcComboComponent.prototype, "valueKey", void 0);
|