igniteui-webcomponents 6.1.0 → 6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/components/accordion/accordion.js +3 -3
- package/components/accordion/accordion.js.map +1 -1
- package/components/avatar/avatar.d.ts +8 -9
- package/components/avatar/avatar.js +29 -32
- package/components/avatar/avatar.js.map +1 -1
- package/components/badge/badge.d.ts +3 -3
- package/components/badge/badge.js +15 -18
- package/components/badge/badge.js.map +1 -1
- package/components/banner/banner.d.ts +2 -3
- package/components/banner/banner.js +14 -13
- package/components/banner/banner.js.map +1 -1
- package/components/button/button-base.d.ts +4 -11
- package/components/button/button-base.js +14 -15
- package/components/button/button-base.js.map +1 -1
- package/components/button/button.d.ts +1 -0
- package/components/button/button.js +9 -12
- package/components/button/button.js.map +1 -1
- package/components/button/icon-button.d.ts +3 -2
- package/components/button/icon-button.js +10 -13
- package/components/button/icon-button.js.map +1 -1
- package/components/button-group/button-group.js +8 -11
- package/components/button-group/button-group.js.map +1 -1
- package/components/button-group/toggle-button.d.ts +1 -6
- package/components/button-group/toggle-button.js +9 -11
- package/components/button-group/toggle-button.js.map +1 -1
- package/components/calendar/calendar.js +7 -10
- package/components/calendar/calendar.js.map +1 -1
- package/components/calendar/days-view/days-view.js +6 -6
- package/components/calendar/days-view/days-view.js.map +1 -1
- package/components/calendar/months-view/months-view.js +8 -8
- package/components/calendar/months-view/months-view.js.map +1 -1
- package/components/calendar/years-view/years-view.js +8 -8
- package/components/calendar/years-view/years-view.js.map +1 -1
- package/components/card/card.actions.d.ts +1 -0
- package/components/card/card.actions.js +10 -13
- package/components/card/card.actions.js.map +1 -1
- package/components/card/card.content.d.ts +1 -0
- package/components/card/card.content.js +9 -15
- package/components/card/card.content.js.map +1 -1
- package/components/card/card.d.ts +1 -0
- package/components/card/card.header.d.ts +1 -0
- package/components/card/card.header.js +9 -15
- package/components/card/card.header.js.map +1 -1
- package/components/card/card.js +11 -14
- package/components/card/card.js.map +1 -1
- package/components/card/card.media.js +1 -1
- package/components/card/card.media.js.map +1 -1
- package/components/carousel/carousel-indicator-container.d.ts +1 -0
- package/components/carousel/carousel-indicator-container.js +9 -18
- package/components/carousel/carousel-indicator-container.js.map +1 -1
- package/components/carousel/carousel-indicator.d.ts +5 -7
- package/components/carousel/carousel-indicator.js +19 -19
- package/components/carousel/carousel-indicator.js.map +1 -1
- package/components/carousel/carousel-slide.d.ts +2 -3
- package/components/carousel/carousel-slide.js +17 -11
- package/components/carousel/carousel-slide.js.map +1 -1
- package/components/carousel/carousel.d.ts +0 -1
- package/components/carousel/carousel.js +22 -21
- package/components/carousel/carousel.js.map +1 -1
- package/components/checkbox/checkbox-base.js.map +1 -1
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/checkbox/checkbox.js +11 -15
- package/components/checkbox/checkbox.js.map +1 -1
- package/components/checkbox/switch.d.ts +1 -0
- package/components/checkbox/switch.js +10 -19
- package/components/checkbox/switch.js.map +1 -1
- package/components/checkbox/validators.js.map +1 -1
- package/components/chip/chip.js +7 -10
- package/components/chip/chip.js.map +1 -1
- package/components/combo/combo-header.d.ts +1 -0
- package/components/combo/combo-header.js +9 -15
- package/components/combo/combo-header.js.map +1 -1
- package/components/combo/combo-item.d.ts +4 -5
- package/components/combo/combo-item.js +22 -23
- package/components/combo/combo-item.js.map +1 -1
- package/components/combo/combo.d.ts +1 -1
- package/components/combo/combo.js +16 -16
- package/components/combo/combo.js.map +1 -1
- package/components/common/abort-handler.d.ts +39 -0
- package/components/common/abort-handler.js +19 -0
- package/components/common/abort-handler.js.map +1 -0
- package/components/common/controllers/drag.d.ts +3 -2
- package/components/common/controllers/drag.js +7 -6
- package/components/common/controllers/drag.js.map +1 -1
- package/components/common/controllers/focus-ring.d.ts +1 -0
- package/components/common/controllers/focus-ring.js +5 -4
- package/components/common/controllers/focus-ring.js.map +1 -1
- package/components/common/controllers/gestures.d.ts +6 -2
- package/components/common/controllers/gestures.js +15 -11
- package/components/common/controllers/gestures.js.map +1 -1
- package/components/common/controllers/internals.d.ts +33 -0
- package/components/common/controllers/internals.js +25 -0
- package/components/common/controllers/internals.js.map +1 -0
- package/components/common/controllers/key-bindings.d.ts +1 -0
- package/components/common/controllers/key-bindings.js +6 -4
- package/components/common/controllers/key-bindings.js.map +1 -1
- package/components/common/controllers/mutation-observer.d.ts +25 -15
- package/components/common/controllers/mutation-observer.js +23 -12
- package/components/common/controllers/mutation-observer.js.map +1 -1
- package/components/common/controllers/resize-observer.js.map +1 -1
- package/components/common/controllers/root-click.d.ts +58 -13
- package/components/common/controllers/root-click.js +47 -35
- package/components/common/controllers/root-click.js.map +1 -1
- package/components/common/decorators/shadow-options.d.ts +10 -0
- package/components/common/decorators/shadow-options.js +10 -0
- package/components/common/decorators/shadow-options.js.map +1 -0
- package/components/common/definitions/defineAllComponents.js +12 -12
- package/components/common/definitions/defineAllComponents.js.map +1 -1
- package/components/common/mixins/alert.d.ts +1 -2
- package/components/common/mixins/alert.js +13 -9
- package/components/common/mixins/alert.js.map +1 -1
- package/components/common/mixins/combo-box.d.ts +2 -1
- package/components/common/mixins/combo-box.js +0 -2
- package/components/common/mixins/combo-box.js.map +1 -1
- package/components/common/mixins/forms/associated.js +2 -2
- package/components/common/mixins/forms/associated.js.map +1 -1
- package/components/common/mixins/option.d.ts +1 -2
- package/components/common/mixins/option.js +13 -11
- package/components/common/mixins/option.js.map +1 -1
- package/components/common/part-map.js +1 -1
- package/components/common/part-map.js.map +1 -1
- package/components/common/util.d.ts +9 -0
- package/components/common/util.js +9 -1
- package/components/common/util.js.map +1 -1
- package/components/date-picker/date-picker.d.ts +2 -7
- package/components/date-picker/date-picker.js +18 -19
- package/components/date-picker/date-picker.js.map +1 -1
- package/components/date-picker/validators.js.map +1 -1
- package/components/date-range-picker/date-range-picker.d.ts +3 -8
- package/components/date-range-picker/date-range-picker.js +16 -17
- package/components/date-range-picker/date-range-picker.js.map +1 -1
- package/components/date-range-picker/predefined-ranges-area.d.ts +1 -0
- package/components/date-range-picker/predefined-ranges-area.js +10 -13
- package/components/date-range-picker/predefined-ranges-area.js.map +1 -1
- package/components/date-time-input/date-time-input.js.map +1 -1
- package/components/date-time-input/validators.js.map +1 -1
- package/components/dialog/dialog.d.ts +1 -0
- package/components/dialog/dialog.js +13 -13
- package/components/dialog/dialog.js.map +1 -1
- package/components/divider/divider.d.ts +5 -2
- package/components/divider/divider.js +17 -18
- package/components/divider/divider.js.map +1 -1
- package/components/dropdown/dropdown-group.d.ts +0 -1
- package/components/dropdown/dropdown-group.js +13 -12
- package/components/dropdown/dropdown-group.js.map +1 -1
- package/components/dropdown/dropdown-header.d.ts +1 -0
- package/components/dropdown/dropdown-header.js +9 -15
- package/components/dropdown/dropdown-header.js.map +1 -1
- package/components/dropdown/dropdown-item.d.ts +1 -0
- package/components/dropdown/dropdown-item.js +8 -14
- package/components/dropdown/dropdown-item.js.map +1 -1
- package/components/dropdown/dropdown.d.ts +2 -1
- package/components/dropdown/dropdown.js +7 -4
- package/components/dropdown/dropdown.js.map +1 -1
- package/components/dropdown/themes/item.js +7 -0
- package/components/dropdown/themes/item.js.map +1 -1
- package/components/dropdown/themes/shared/item/dropdown-item.bootstrap.css.d.ts +1 -0
- package/components/dropdown/themes/shared/item/dropdown-item.bootstrap.css.js +3 -0
- package/components/dropdown/themes/shared/item/dropdown-item.bootstrap.css.js.map +1 -0
- package/components/expansion-panel/expansion-panel.js +8 -11
- package/components/expansion-panel/expansion-panel.js.map +1 -1
- package/components/file-input/file-input.d.ts +1 -1
- package/components/file-input/file-input.js +18 -21
- package/components/file-input/file-input.js.map +1 -1
- package/components/file-input/themes/shared/file-input.material.css.js +1 -1
- package/components/file-input/themes/shared/file-input.material.css.js.map +1 -1
- package/components/file-input/validators.js.map +1 -1
- package/components/focus-trap/focus-trap.js +4 -4
- package/components/focus-trap/focus-trap.js.map +1 -1
- package/components/icon/icon.d.ts +2 -1
- package/components/icon/icon.js +18 -15
- package/components/icon/icon.js.map +1 -1
- package/components/input/input-base.d.ts +2 -8
- package/components/input/input-base.js +8 -11
- package/components/input/input-base.js.map +1 -1
- package/components/input/input.js.map +1 -1
- package/components/input/themes/shared/input.material.css.js +1 -1
- package/components/input/themes/shared/input.material.css.js.map +1 -1
- package/components/input/validators.js.map +1 -1
- package/components/list/list-header.d.ts +0 -1
- package/components/list/list-header.js +10 -17
- package/components/list/list-header.js.map +1 -1
- package/components/list/list-item.d.ts +0 -1
- package/components/list/list-item.js +13 -12
- package/components/list/list-item.js.map +1 -1
- package/components/list/list.d.ts +0 -1
- package/components/list/list.js +12 -17
- package/components/list/list.js.map +1 -1
- package/components/mask-input/mask-input.js.map +1 -1
- package/components/mask-input/validators.js.map +1 -1
- package/components/nav-drawer/nav-drawer-header-item.d.ts +1 -0
- package/components/nav-drawer/nav-drawer-header-item.js +9 -15
- package/components/nav-drawer/nav-drawer-header-item.js.map +1 -1
- package/components/nav-drawer/nav-drawer-item.d.ts +1 -0
- package/components/nav-drawer/nav-drawer-item.js +10 -13
- package/components/nav-drawer/nav-drawer-item.js.map +1 -1
- package/components/nav-drawer/nav-drawer.d.ts +1 -0
- package/components/nav-drawer/nav-drawer.js +10 -13
- package/components/nav-drawer/nav-drawer.js.map +1 -1
- package/components/navbar/navbar.d.ts +1 -0
- package/components/navbar/navbar.js +9 -15
- package/components/navbar/navbar.js.map +1 -1
- package/components/popover/popover.js +1 -1
- package/components/popover/popover.js.map +1 -1
- package/components/progress/base.d.ts +1 -2
- package/components/progress/base.js +28 -26
- package/components/progress/base.js.map +1 -1
- package/components/progress/circular-progress.d.ts +1 -0
- package/components/progress/circular-progress.js +10 -13
- package/components/progress/circular-progress.js.map +1 -1
- package/components/progress/linear-progress.d.ts +1 -0
- package/components/progress/linear-progress.js +9 -12
- package/components/progress/linear-progress.js.map +1 -1
- package/components/radio/radio.js +8 -11
- package/components/radio/radio.js.map +1 -1
- package/components/radio/utils.js.map +1 -1
- package/components/radio-group/radio-group.d.ts +1 -1
- package/components/radio-group/radio-group.js +15 -17
- package/components/radio-group/radio-group.js.map +1 -1
- package/components/rating/rating-symbol.js +1 -1
- package/components/rating/rating-symbol.js.map +1 -1
- package/components/rating/rating.js +7 -10
- package/components/rating/rating.js.map +1 -1
- package/components/resize-container/resize-container.js +7 -10
- package/components/resize-container/resize-container.js.map +1 -1
- package/components/resize-container/resize-controller.d.ts +3 -2
- package/components/resize-container/resize-controller.js +6 -4
- package/components/resize-container/resize-controller.js.map +1 -1
- package/components/ripple/ripple.js +3 -2
- package/components/ripple/ripple.js.map +1 -1
- package/components/select/select-group.d.ts +1 -1
- package/components/select/select-group.js +15 -14
- package/components/select/select-group.js.map +1 -1
- package/components/select/select-header.d.ts +1 -0
- package/components/select/select-header.js +9 -15
- package/components/select/select-header.js.map +1 -1
- package/components/select/select-item.d.ts +1 -0
- package/components/select/select-item.js +9 -9
- package/components/select/select-item.js.map +1 -1
- package/components/select/select.d.ts +1 -0
- package/components/select/select.js +11 -8
- package/components/select/select.js.map +1 -1
- package/components/select/validators.js.map +1 -1
- package/components/slider/slider-base.js +8 -8
- package/components/slider/slider-base.js.map +1 -1
- package/components/slider/slider-label.js +1 -1
- package/components/slider/slider-label.js.map +1 -1
- package/components/slider/slider.js.map +1 -1
- package/components/snackbar/snackbar.d.ts +1 -0
- package/components/snackbar/snackbar.js +9 -12
- package/components/snackbar/snackbar.js.map +1 -1
- package/components/stepper/step.d.ts +1 -0
- package/components/stepper/step.js +10 -13
- package/components/stepper/step.js.map +1 -1
- package/components/stepper/stepper.js +10 -13
- package/components/stepper/stepper.js.map +1 -1
- package/components/tabs/tab.d.ts +1 -0
- package/components/tabs/tab.js +12 -15
- package/components/tabs/tab.js.map +1 -1
- package/components/tabs/tabs.js +10 -13
- package/components/tabs/tabs.js.map +1 -1
- package/components/textarea/textarea.d.ts +2 -8
- package/components/textarea/textarea.js +11 -14
- package/components/textarea/textarea.js.map +1 -1
- package/components/textarea/themes/shared/textarea.material.css.js +1 -1
- package/components/textarea/themes/shared/textarea.material.css.js.map +1 -1
- package/components/textarea/validators.js.map +1 -1
- package/components/tile-manager/position.d.ts +1 -1
- package/components/tile-manager/position.js.map +1 -1
- package/components/tile-manager/themes/container.js.map +1 -1
- package/components/tile-manager/tile-manager.d.ts +0 -1
- package/components/tile-manager/tile-manager.js +5 -7
- package/components/tile-manager/tile-manager.js.map +1 -1
- package/components/tile-manager/tile.d.ts +1 -0
- package/components/tile-manager/tile.js +54 -57
- package/components/tile-manager/tile.js.map +1 -1
- package/components/toast/toast.d.ts +1 -0
- package/components/toast/toast.js +8 -17
- package/components/toast/toast.js.map +1 -1
- package/components/tooltip/controller.d.ts +2 -4
- package/components/tooltip/controller.js +11 -20
- package/components/tooltip/controller.js.map +1 -1
- package/components/tooltip/themes/themes.js +1 -1
- package/components/tooltip/themes/themes.js.map +1 -1
- package/components/tooltip/tooltip.js +17 -16
- package/components/tooltip/tooltip.js.map +1 -1
- package/components/tree/tree-item.d.ts +1 -0
- package/components/tree/tree-item.js +30 -33
- package/components/tree/tree-item.js.map +1 -1
- package/components/tree/tree.d.ts +1 -1
- package/components/tree/tree.js +6 -5
- package/components/tree/tree.js.map +1 -1
- package/components/tree/tree.navigation.d.ts +1 -1
- package/components/tree/tree.navigation.js.map +1 -1
- package/components/tree/tree.selection.d.ts +1 -1
- package/components/tree/tree.selection.js.map +1 -1
- package/components/validation-container/themes/themes.js.map +1 -1
- package/components/validation-container/validation-container.d.ts +2 -1
- package/components/validation-container/validation-container.js +13 -16
- package/components/validation-container/validation-container.js.map +1 -1
- package/custom-elements.json +1641 -1753
- package/igniteui-webcomponents.html-data.json +1 -1
- package/package.json +1 -1
- package/theming/config.d.ts +3 -3
- package/theming/config.js +14 -18
- package/theming/config.js.map +1 -1
- package/theming/theming-controller.d.ts +17 -13
- package/theming/theming-controller.js +29 -23
- package/theming/theming-controller.js.map +1 -1
- package/theming/theming-event.d.ts +1 -0
- package/theming/theming-event.js.map +1 -1
- package/theming/types.d.ts +3 -14
- package/theming/types.js.map +1 -1
- package/theming/utils.js +24 -23
- package/theming/utils.js.map +1 -1
- package/web-types.json +1 -1
- package/theming/theming-decorator.d.ts +0 -43
- package/theming/theming-decorator.js +0 -25
- package/theming/theming-decorator.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/components/textarea/textarea.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAuB,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrE,OAAO,EACL,QAAQ,EACR,KAAK,EACL,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAkB,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAC5F,OAAO,EAEL,oBAAoB,GACrB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAMrE,OAAO,+BAA+B,MAAM,iDAAiD,CAAC;AAC9F,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,+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,IAAI,EAAE,CAAC;GACnB,oBAAoB,CAicxC;eAjcoB,oBAAoB","sourcesContent":["import { LitElement, type TemplateResult, html, nothing } from 'lit';\nimport {\n property,\n query,\n queryAssignedElements,\n queryAssignedNodes,\n} from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { type StyleInfo, styleMap } from 'lit/directives/style-map.js';\n\nimport { getThemeController, themes } from '../../theming/theming-decorator.js';\nimport { createResizeObserverController } from '../common/controllers/resize-observer.js';\nimport { watch } from '../common/decorators/watch.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 { FormAssociatedRequiredMixin } from '../common/mixins/forms/associated-required.js';\nimport {\n type FormValueOf,\n createFormValueState,\n} from '../common/mixins/forms/form-value.js';\nimport { partMap } from '../common/part-map.js';\nimport { asNumber, createCounter, isEmpty } from '../common/util.js';\nimport type {\n RangeTextSelectMode,\n SelectionRangeDirection,\n TextareaResize,\n} from '../types.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport { styles as shared } from './themes/shared/textarea.common.css.js';\nimport { styles } from './themes/textarea.base.css.js';\nimport { all } from './themes/themes.js';\nimport { textAreaValidators } from './validators.js';\n\nexport interface IgcTextareaComponentEventMap {\n igcInput: CustomEvent<string>;\n igcChange: CustomEvent<string>;\n // For analyzer meta only:\n /* skipWCPrefix */\n focus: FocusEvent;\n /* skipWCPrefix */\n blur: FocusEvent;\n}\n\n/**\n * This element represents a multi-line plain-text editing control,\n * useful when you want to allow users to enter a sizeable amount of free-form text,\n * for example a comment on a review or feedback form.\n *\n * @element igc-textarea\n *\n * @slot - Text content from the default slot will be used as the value of the component.\n * @slot prefix - Renders content before the input.\n * @slot suffix - Renders content after input.\n * @slot helper-text - Renders content below the input.\n * @slot value-missing - Renders content when the required validation fails.\n * @slot too-long - Renders content when the maxlength validation fails.\n * @slot too-short - Renders content when the minlength validation fails.\n * @slot custom-error - Renders content when setCustomValidity(message) is set.\n * @slot invalid - Renders content when the component is in invalid state (validity.valid = false).\n *\n * @fires igcInput - Emitted when the control receives user input.\n * @fires igcChange - Emitted when the a change to the control value is committed by the user.\n *\n * @csspart container - The main wrapper that holds all main input elements of the textarea.\n * @csspart input - The native input element of the igc-textarea.\n * @csspart label - The native label element of the igc-textarea.\n * @csspart prefix - The prefix wrapper of the igc-textarea.\n * @csspart suffix - The suffix wrapper of the igc-textarea.\n * @csspart helper-text - The helper text wrapper of the igc-textarea.\n */\n@themes(all, { exposeController: true })\nexport default class IgcTextareaComponent extends FormAssociatedRequiredMixin(\n EventEmitterMixin<IgcTextareaComponentEventMap, Constructor<LitElement>>(\n LitElement\n )\n) {\n public static readonly tagName = 'igc-textarea';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(IgcTextareaComponent, IgcValidationContainerComponent);\n }\n\n protected static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n //#region Private properties and state\n\n private static readonly increment = createCounter();\n\n protected override get __validators() {\n return textAreaValidators;\n }\n\n protected override readonly _formValue: FormValueOf<string> =\n createFormValueState(this, { initialValue: '' });\n\n protected readonly _inputId = `textarea-${IgcTextareaComponent.increment()}`;\n\n @queryAssignedNodes({ flatten: true })\n private readonly _projected!: Node[];\n\n @queryAssignedElements({\n slot: 'prefix',\n selector: '[slot=\"prefix\"]:not([hidden])',\n })\n protected readonly _prefixes!: HTMLElement[];\n\n @queryAssignedElements({\n slot: 'suffix',\n selector: '[slot=\"suffix\"]:not([hidden])',\n })\n protected readonly _suffixes!: HTMLElement[];\n\n @query('textarea', true)\n private readonly _input!: HTMLTextAreaElement;\n\n private get _resizeStyles(): StyleInfo {\n return {\n resize: this.resize === 'auto' ? 'none' : this.resize,\n };\n }\n\n protected get _isMaterial(): boolean {\n return getThemeController(this)?.theme === 'material';\n }\n\n //#endregion\n\n //#region Public properties and attributes\n\n /**\n * Specifies what if any permission the browser has to provide for automated assistance in filling out form field values,\n * as well as guidance to the browser as to the type of information expected in the field.\n * Refer to [this page](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for additional information.\n *\n * @attr\n */\n @property()\n public autocomplete!: string;\n\n /**\n * Controls whether and how text input is automatically capitalized as it is entered/edited by the user.\n *\n * [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize).\n *\n * @attr\n */\n @property()\n public override autocapitalize!: string;\n\n /**\n * Hints at the type of data that might be entered by the user while editing the element or its contents.\n * This allows a browser to display an appropriate virtual keyboard.\n *\n * [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode)\n *\n * @attr inputmode\n */\n @property({ attribute: 'inputmode' })\n public override inputMode!: string;\n\n /**\n * The label for the control.\n *\n * @attr\n */\n @property()\n public label!: string;\n\n /**\n * The maximum number of characters (UTF-16 code units) that the user can enter.\n * If this value isn't specified, the user can enter an unlimited number of characters.\n *\n * @attr maxlength\n */\n @property({ type: Number, attribute: 'maxlength' })\n public maxLength!: number;\n\n /**\n * The minimum number of characters (UTF-16 code units) required that the user should enter.\n *\n * @attr minlength\n */\n @property({ type: Number, attribute: 'minlength' })\n public minLength!: number;\n\n /**\n * Whether the control will have outlined appearance.\n * @attr\n */\n @property({ reflect: true, type: Boolean })\n public outlined = false;\n\n /**\n * The placeholder attribute of the control.\n *\n * @attr\n */\n @property()\n public placeholder!: string;\n\n /**\n * Makes the control a readonly field.\n *\n * @attr readonly\n */\n @property({ type: Boolean, reflect: true, attribute: 'readonly' })\n public readOnly = false;\n\n /**\n * Controls whether the control can be resized.\n * When `auto` is set, the control will try to expand and fit its content.\n *\n * @attr\n */\n @property()\n public resize: TextareaResize = 'vertical';\n\n /**\n * The number of visible text lines for the control. If it is specified, it must be a positive integer.\n * If it is not specified, the default value is 2.\n *\n * @attr\n */\n @property({ type: Number })\n public rows = 2;\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail\", false) */\n /**\n * The value of the component\n *\n * @attr\n */\n @property()\n public set value(value: string) {\n this._formValue.setValueAndFormState(value);\n this._validate();\n }\n\n public get value(): string {\n return this._formValue.value;\n }\n\n /**\n * Controls whether the element may be checked for spelling errors.\n *\n * @attr\n */\n @property({\n type: Boolean,\n converter: {\n fromAttribute: (value) => !(!value || value === 'false'),\n toAttribute: (value) => (value ? 'true' : 'false'),\n },\n })\n public override spellcheck = true;\n\n /**\n * Indicates how the control should wrap the value for form submission.\n * Refer to [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attributes)\n * for explanation of the available values.\n *\n * @attr\n */\n @property()\n public wrap: 'hard' | 'soft' | 'off' = 'soft';\n\n /**\n * Enables validation rules to be evaluated without restricting user input. This applies to the `maxLength` property\n * when it is defined.\n *\n * @attr validate-only\n */\n @property({ type: Boolean, reflect: true, attribute: 'validate-only' })\n public validateOnly = false;\n\n //#endregion\n\n //#region Watchers\n\n @watch('value')\n protected async _valueChanged(): Promise<void> {\n await this.updateComplete;\n this._setAreaHeight();\n }\n\n @watch('rows', { waitUntilFirstUpdate: true })\n @watch('resize', { waitUntilFirstUpdate: true })\n protected _setAreaHeight(): void {\n if (this.resize === 'auto') {\n this._input.style.height = 'auto';\n this._input.style.height = `${this._setAutoHeight()}px`;\n } else {\n Object.assign(this._input.style, { height: undefined });\n }\n }\n\n //#endregion\n\n //#region Life-cycle hooks\n\n constructor() {\n super();\n\n createResizeObserverController(this, {\n callback: this._setAreaHeight,\n });\n\n this.addEventListener('focus', this._handleFocus);\n this.addEventListener('blur', this._handleBlur);\n }\n\n protected override createRenderRoot(): HTMLElement | DocumentFragment {\n const root = super.createRenderRoot();\n root.addEventListener('slotchange', (event) =>\n this._handleSlotChange(event)\n );\n return root;\n }\n\n //#endregion\n\n //#region Internal methods\n\n protected _resolvePartNames() {\n return {\n container: true,\n prefixed: this._prefixes.length > 0,\n suffixed: this._suffixes.length > 0,\n filled: !!this.value,\n };\n }\n\n private _setAutoHeight(): number {\n const { borderTopWidth, borderBottomWidth } = getComputedStyle(this._input);\n return (\n this._input.scrollHeight +\n asNumber(borderTopWidth) +\n asNumber(borderBottomWidth)\n );\n }\n\n //#endregion\n\n //#region Event handlers\n\n protected _handleSlotChange({ target }: Event): void {\n const slot = target as HTMLSlotElement;\n\n // Default slot used for declarative value projection\n if (!slot.name) {\n const value = this._projected\n .map((node) => node.textContent?.trim())\n .filter((node) => Boolean(node))\n .join('\\r\\n');\n\n if (value !== this.value) {\n this.value = value;\n }\n }\n\n this.requestUpdate();\n }\n\n protected _handleInput(): void {\n this.value = this._input.value;\n this.emitEvent('igcInput', { detail: this.value });\n }\n\n protected _handleChange(): void {\n this.value = this._input.value;\n this.emitEvent('igcChange', { detail: this.value });\n }\n\n protected _handleFocus(): void {\n this._dirty = true;\n }\n\n protected _handleBlur(): void {\n this._validate();\n }\n\n //#endregion\n\n //#region Public methods\n\n /** Selects all text within the control. */\n public select(): void {\n this._input.select();\n }\n\n /** Sets the text selection range of the control */\n public setSelectionRange(\n start: number,\n end: number,\n direction: SelectionRangeDirection = 'none'\n ): void {\n this._input.setSelectionRange(start, end, direction);\n }\n\n /** Replaces the selected text in the control. */\n public setRangeText(\n replacement: string,\n start: number,\n end: number,\n selectMode: RangeTextSelectMode = 'preserve'\n ): void {\n this._input.setRangeText(replacement, start, end, selectMode);\n this.value = this._input.value;\n }\n\n /* blazorSuppress */\n public override scrollTo(options?: ScrollToOptions | undefined): void;\n /* blazorSuppress */\n public override scrollTo(x: number, y: number): void;\n public override scrollTo(x?: unknown, y?: unknown): void {\n x != null && y != null\n ? this._input.scrollTo(x as number, y as number)\n : this._input.scrollTo(x as ScrollToOptions);\n }\n\n //#endregion\n\n //#region Renderers\n\n protected _renderPrefix() {\n return html`\n <div part=\"prefix\" .hidden=${isEmpty(this._prefixes)}>\n <slot name=\"prefix\"></slot>\n </div>\n `;\n }\n\n protected _renderSuffix() {\n return html`\n <div part=\"suffix\" .hidden=${isEmpty(this._suffixes)}>\n <slot name=\"suffix\"></slot>\n </div>\n `;\n }\n\n protected _renderLabel() {\n return this.label\n ? html`\n <label part=\"label\" for=${this.id || this._inputId}>\n ${this.label}\n </label>\n `\n : nothing;\n }\n\n protected _renderStandard() {\n return html`\n ${this._renderLabel()}\n <div part=${partMap(this._resolvePartNames())}>\n ${this._renderPrefix()} ${this._renderInput()} ${this._renderSuffix()}\n </div>\n ${this._renderValidationContainer()}\n `;\n }\n\n protected _renderMaterial() {\n return html`\n <div\n part=${partMap({\n ...this._resolvePartNames(),\n labelled: !!this.label,\n placeholder: !!this.placeholder,\n })}\n >\n <div part=\"start\">${this._renderPrefix()}</div>\n ${this._renderInput()}\n <div part=\"notch\">${this._renderLabel()}</div>\n <div part=\"filler\"></div>\n <div part=\"end\">${this._renderSuffix()}</div>\n </div>\n ${this._renderValidationContainer()}\n `;\n }\n\n protected _renderInput() {\n return html`\n <slot style=\"display: none\"></slot>\n <textarea\n id=${this.id || this._inputId}\n part=\"input\"\n style=${styleMap(this._resizeStyles)}\n @input=${this._handleInput}\n @change=${this._handleChange}\n placeholder=${ifDefined(this.placeholder)}\n .rows=${this.rows}\n .value=${live(this.value)}\n .wrap=${this.wrap}\n autocomplete=${ifDefined(this.autocomplete as any)}\n autocapitalize=${ifDefined(this.autocapitalize as any)}\n inputmode=${ifDefined(this.inputMode)}\n spellcheck=${ifDefined(this.spellcheck)}\n minlength=${ifDefined(this.minLength)}\n maxlength=${ifDefined(this.validateOnly ? undefined : this.maxLength)}\n ?disabled=${this.disabled}\n ?required=${this.required}\n ?readonly=${this.readOnly}\n aria-invalid=${this.invalid ? 'true' : 'false'}\n ></textarea>\n `;\n }\n\n protected _renderValidationContainer(): TemplateResult {\n return IgcValidationContainerComponent.create(this);\n }\n\n protected override render() {\n return this._isMaterial ? this._renderMaterial() : this._renderStandard();\n }\n\n //#endregion\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-textarea':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,EAAE,OAAO,EAAE,CAAC;sDACnB;AAQjB;IADN,QAAQ,EAAE;yDACiB;AAQrB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;sDAC1C;AASjB;IADN,QAAQ,EAAE;oDACgC;AASpC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDACX;AAShB;IADC,QAAQ,EAAE;iDAIV;AAkBe;IAPf,QAAQ,CAAC;QACR,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACT,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,KAAK,OAAO,CAAC;YACxD,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;SACnD;KACF,CAAC;wDACgC;AAU3B;IADN,QAAQ,EAAE;kDACmC;AASvC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;0DAC3C;AAOZ;IADf,KAAK,CAAC,OAAO,CAAC;yDAId;AAIS;IAFT,KAAK,CAAC,MAAM,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IAC7C,KAAK,CAAC,QAAQ,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;0DAQ/C;AA7NkB,oBAAoB;IADxC,aAAa,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;GACnB,oBAAoB,CA4bxC;eA5boB,oBAAoB","sourcesContent":["import { html, LitElement, nothing, type TemplateResult } from 'lit';\nimport {\n property,\n query,\n queryAssignedElements,\n queryAssignedNodes,\n} from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { type StyleInfo, styleMap } from 'lit/directives/style-map.js';\n\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport { createResizeObserverController } from '../common/controllers/resize-observer.js';\nimport { shadowOptions } from '../common/decorators/shadow-options.js';\nimport { watch } from '../common/decorators/watch.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 { FormAssociatedRequiredMixin } from '../common/mixins/forms/associated-required.js';\nimport {\n createFormValueState,\n type FormValueOf,\n} from '../common/mixins/forms/form-value.js';\nimport { partMap } from '../common/part-map.js';\nimport {\n addSafeEventListener,\n asNumber,\n createCounter,\n isEmpty,\n} from '../common/util.js';\nimport type {\n RangeTextSelectMode,\n SelectionRangeDirection,\n TextareaResize,\n} from '../types.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport { styles as shared } from './themes/shared/textarea.common.css.js';\nimport { styles } from './themes/textarea.base.css.js';\nimport { all } from './themes/themes.js';\nimport { textAreaValidators } from './validators.js';\n\nexport interface IgcTextareaComponentEventMap {\n igcInput: CustomEvent<string>;\n igcChange: CustomEvent<string>;\n // For analyzer meta only:\n /* skipWCPrefix */\n focus: FocusEvent;\n /* skipWCPrefix */\n blur: FocusEvent;\n}\n\n/**\n * This element represents a multi-line plain-text editing control,\n * useful when you want to allow users to enter a sizeable amount of free-form text,\n * for example a comment on a review or feedback form.\n *\n * @element igc-textarea\n *\n * @slot - Text content from the default slot will be used as the value of the component.\n * @slot prefix - Renders content before the input.\n * @slot suffix - Renders content after input.\n * @slot helper-text - Renders content below the input.\n * @slot value-missing - Renders content when the required validation fails.\n * @slot too-long - Renders content when the maxlength validation fails.\n * @slot too-short - Renders content when the minlength validation fails.\n * @slot custom-error - Renders content when setCustomValidity(message) is set.\n * @slot invalid - Renders content when the component is in invalid state (validity.valid = false).\n *\n * @fires igcInput - Emitted when the control receives user input.\n * @fires igcChange - Emitted when the a change to the control value is committed by the user.\n *\n * @csspart container - The main wrapper that holds all main input elements of the textarea.\n * @csspart input - The native input element of the igc-textarea.\n * @csspart label - The native label element of the igc-textarea.\n * @csspart prefix - The prefix wrapper of the igc-textarea.\n * @csspart suffix - The suffix wrapper of the igc-textarea.\n * @csspart helper-text - The helper text wrapper of the igc-textarea.\n */\n@shadowOptions({ delegatesFocus: true })\nexport default class IgcTextareaComponent extends FormAssociatedRequiredMixin(\n EventEmitterMixin<IgcTextareaComponentEventMap, Constructor<LitElement>>(\n LitElement\n )\n) {\n public static readonly tagName = 'igc-textarea';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(IgcTextareaComponent, IgcValidationContainerComponent);\n }\n\n //#region Private properties and state\n\n private static readonly increment = createCounter();\n\n private readonly _themes = addThemingController(this, all);\n\n protected override get __validators() {\n return textAreaValidators;\n }\n\n protected override readonly _formValue: FormValueOf<string> =\n createFormValueState(this, { initialValue: '' });\n\n protected readonly _inputId = `textarea-${IgcTextareaComponent.increment()}`;\n\n @queryAssignedNodes({ flatten: true })\n private readonly _projected!: Node[];\n\n @queryAssignedElements({\n slot: 'prefix',\n selector: '[slot=\"prefix\"]:not([hidden])',\n })\n protected readonly _prefixes!: HTMLElement[];\n\n @queryAssignedElements({\n slot: 'suffix',\n selector: '[slot=\"suffix\"]:not([hidden])',\n })\n protected readonly _suffixes!: HTMLElement[];\n\n @query('textarea', true)\n private readonly _input!: HTMLTextAreaElement;\n\n private get _resizeStyles(): StyleInfo {\n return {\n resize: this.resize === 'auto' ? 'none' : this.resize,\n };\n }\n\n //#endregion\n\n //#region Public properties and attributes\n\n /**\n * Specifies what if any permission the browser has to provide for automated assistance in filling out form field values,\n * as well as guidance to the browser as to the type of information expected in the field.\n * Refer to [this page](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for additional information.\n *\n * @attr\n */\n @property()\n public autocomplete!: string;\n\n /**\n * Controls whether and how text input is automatically capitalized as it is entered/edited by the user.\n *\n * [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize).\n *\n * @attr\n */\n @property()\n public override autocapitalize!: string;\n\n /**\n * Hints at the type of data that might be entered by the user while editing the element or its contents.\n * This allows a browser to display an appropriate virtual keyboard.\n *\n * [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode)\n *\n * @attr inputmode\n */\n @property({ attribute: 'inputmode' })\n public override inputMode!: string;\n\n /**\n * The label for the control.\n *\n * @attr\n */\n @property()\n public label!: string;\n\n /**\n * The maximum number of characters (UTF-16 code units) that the user can enter.\n * If this value isn't specified, the user can enter an unlimited number of characters.\n *\n * @attr maxlength\n */\n @property({ type: Number, attribute: 'maxlength' })\n public maxLength!: number;\n\n /**\n * The minimum number of characters (UTF-16 code units) required that the user should enter.\n *\n * @attr minlength\n */\n @property({ type: Number, attribute: 'minlength' })\n public minLength!: number;\n\n /**\n * Whether the control will have outlined appearance.\n * @attr\n */\n @property({ reflect: true, type: Boolean })\n public outlined = false;\n\n /**\n * The placeholder attribute of the control.\n *\n * @attr\n */\n @property()\n public placeholder!: string;\n\n /**\n * Makes the control a readonly field.\n *\n * @attr readonly\n */\n @property({ type: Boolean, reflect: true, attribute: 'readonly' })\n public readOnly = false;\n\n /**\n * Controls whether the control can be resized.\n * When `auto` is set, the control will try to expand and fit its content.\n *\n * @attr\n */\n @property()\n public resize: TextareaResize = 'vertical';\n\n /**\n * The number of visible text lines for the control. If it is specified, it must be a positive integer.\n * If it is not specified, the default value is 2.\n *\n * @attr\n */\n @property({ type: Number })\n public rows = 2;\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail\", false) */\n /**\n * The value of the component\n *\n * @attr\n */\n @property()\n public set value(value: string) {\n this._formValue.setValueAndFormState(value);\n this._validate();\n }\n\n public get value(): string {\n return this._formValue.value;\n }\n\n /**\n * Controls whether the element may be checked for spelling errors.\n *\n * @attr\n */\n @property({\n type: Boolean,\n converter: {\n fromAttribute: (value) => !(!value || value === 'false'),\n toAttribute: (value) => (value ? 'true' : 'false'),\n },\n })\n public override spellcheck = true;\n\n /**\n * Indicates how the control should wrap the value for form submission.\n * Refer to [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attributes)\n * for explanation of the available values.\n *\n * @attr\n */\n @property()\n public wrap: 'hard' | 'soft' | 'off' = 'soft';\n\n /**\n * Enables validation rules to be evaluated without restricting user input. This applies to the `maxLength` property\n * when it is defined.\n *\n * @attr validate-only\n */\n @property({ type: Boolean, reflect: true, attribute: 'validate-only' })\n public validateOnly = false;\n\n //#endregion\n\n //#region Watchers\n\n @watch('value')\n protected async _valueChanged(): Promise<void> {\n await this.updateComplete;\n this._setAreaHeight();\n }\n\n @watch('rows', { waitUntilFirstUpdate: true })\n @watch('resize', { waitUntilFirstUpdate: true })\n protected _setAreaHeight(): void {\n if (this.resize === 'auto') {\n this._input.style.height = 'auto';\n this._input.style.height = `${this._setAutoHeight()}px`;\n } else {\n Object.assign(this._input.style, { height: undefined });\n }\n }\n\n //#endregion\n\n //#region Life-cycle hooks\n\n constructor() {\n super();\n\n createResizeObserverController(this, {\n callback: this._setAreaHeight,\n });\n\n addSafeEventListener(this, 'focus', this._handleFocus);\n addSafeEventListener(this, 'blur', this._handleBlur);\n }\n\n protected override createRenderRoot(): HTMLElement | DocumentFragment {\n const root = super.createRenderRoot();\n root.addEventListener('slotchange', (event) =>\n this._handleSlotChange(event)\n );\n return root;\n }\n\n //#endregion\n\n //#region Internal methods\n\n protected _resolvePartNames() {\n return {\n container: true,\n prefixed: this._prefixes.length > 0,\n suffixed: this._suffixes.length > 0,\n filled: !!this.value,\n };\n }\n\n private _setAutoHeight(): number {\n const { borderTopWidth, borderBottomWidth } = getComputedStyle(this._input);\n return (\n this._input.scrollHeight +\n asNumber(borderTopWidth) +\n asNumber(borderBottomWidth)\n );\n }\n\n //#endregion\n\n //#region Event handlers\n\n protected _handleSlotChange({ target }: Event): void {\n const slot = target as HTMLSlotElement;\n\n // Default slot used for declarative value projection\n if (!slot.name) {\n const value = this._projected\n .map((node) => node.textContent?.trim())\n .filter((node) => Boolean(node))\n .join('\\r\\n');\n\n if (value !== this.value) {\n this.value = value;\n }\n }\n\n this.requestUpdate();\n }\n\n protected _handleInput(): void {\n this.value = this._input.value;\n this.emitEvent('igcInput', { detail: this.value });\n }\n\n protected _handleChange(): void {\n this.value = this._input.value;\n this.emitEvent('igcChange', { detail: this.value });\n }\n\n protected _handleFocus(): void {\n this._dirty = true;\n }\n\n protected _handleBlur(): void {\n this._validate();\n }\n\n //#endregion\n\n //#region Public methods\n\n /** Selects all text within the control. */\n public select(): void {\n this._input.select();\n }\n\n /** Sets the text selection range of the control */\n public setSelectionRange(\n start: number,\n end: number,\n direction: SelectionRangeDirection = 'none'\n ): void {\n this._input.setSelectionRange(start, end, direction);\n }\n\n /** Replaces the selected text in the control. */\n public setRangeText(\n replacement: string,\n start: number,\n end: number,\n selectMode: RangeTextSelectMode = 'preserve'\n ): void {\n this._input.setRangeText(replacement, start, end, selectMode);\n this.value = this._input.value;\n }\n\n /* blazorSuppress */\n public override scrollTo(options?: ScrollToOptions | undefined): void;\n /* blazorSuppress */\n public override scrollTo(x: number, y: number): void;\n public override scrollTo(x?: unknown, y?: unknown): void {\n x != null && y != null\n ? this._input.scrollTo(x as number, y as number)\n : this._input.scrollTo(x as ScrollToOptions);\n }\n\n //#endregion\n\n //#region Renderers\n\n protected _renderPrefix() {\n return html`\n <div part=\"prefix\" .hidden=${isEmpty(this._prefixes)}>\n <slot name=\"prefix\"></slot>\n </div>\n `;\n }\n\n protected _renderSuffix() {\n return html`\n <div part=\"suffix\" .hidden=${isEmpty(this._suffixes)}>\n <slot name=\"suffix\"></slot>\n </div>\n `;\n }\n\n protected _renderLabel() {\n return this.label\n ? html`\n <label part=\"label\" for=${this.id || this._inputId}>\n ${this.label}\n </label>\n `\n : nothing;\n }\n\n protected _renderStandard() {\n return html`\n ${this._renderLabel()}\n <div part=${partMap(this._resolvePartNames())}>\n ${this._renderPrefix()} ${this._renderInput()} ${this._renderSuffix()}\n </div>\n ${this._renderValidationContainer()}\n `;\n }\n\n protected _renderMaterial() {\n return html`\n <div\n part=${partMap({\n ...this._resolvePartNames(),\n labelled: !!this.label,\n placeholder: !!this.placeholder,\n })}\n >\n <div part=\"start\">${this._renderPrefix()}</div>\n ${this._renderInput()}\n <div part=\"notch\">${this._renderLabel()}</div>\n <div part=\"filler\"></div>\n <div part=\"end\">${this._renderSuffix()}</div>\n </div>\n ${this._renderValidationContainer()}\n `;\n }\n\n protected _renderInput() {\n return html`\n <slot style=\"display: none\"></slot>\n <textarea\n id=${this.id || this._inputId}\n part=\"input\"\n style=${styleMap(this._resizeStyles)}\n @input=${this._handleInput}\n @change=${this._handleChange}\n placeholder=${ifDefined(this.placeholder)}\n .rows=${this.rows}\n .value=${live(this.value)}\n .wrap=${this.wrap}\n autocomplete=${ifDefined(this.autocomplete as any)}\n autocapitalize=${ifDefined(this.autocapitalize as any)}\n inputmode=${ifDefined(this.inputMode)}\n spellcheck=${ifDefined(this.spellcheck)}\n minlength=${ifDefined(this.minLength)}\n maxlength=${ifDefined(this.validateOnly ? undefined : this.maxLength)}\n ?disabled=${this.disabled}\n ?required=${this.required}\n ?readonly=${this.readOnly}\n aria-invalid=${this.invalid ? 'true' : 'false'}\n ></textarea>\n `;\n }\n\n protected _renderValidationContainer(): TemplateResult {\n return IgcValidationContainerComponent.create(this);\n }\n\n protected override render() {\n return this._themes.theme === 'material'\n ? this._renderMaterial()\n : this._renderStandard();\n }\n\n //#endregion\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-textarea': IgcTextareaComponent;\n }\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `:host{font-family:var(--ig-subtitle-1-font-family, var(--ig-font-family));font-size:var(--ig-subtitle-1-font-size);font-weight:var(--ig-subtitle-1-font-weight);font-style:var(--ig-subtitle-1-font-style);line-height:var(--ig-subtitle-1-line-height);letter-spacing:var(--ig-subtitle-1-letter-spacing);text-transform:var(--ig-subtitle-1-text-transform);margin-top:var(--ig-subtitle-1-margin-top);margin-bottom:var(--ig-subtitle-1-margin-bottom);--component-size: var(--ig-size, var(--default-size))}:host ::part(helper-text){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);color:var(--helper-text-color);grid-auto-rows:minmax(1.125rem, auto);margin-block-start:.25rem;padding-inline:max(var(--is-large, 1)*max(1.125rem, -1 * 1.125rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.875rem, -1 * 0.875rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)))}textarea{border:none;padding:0;overflow:auto;margin-block-start:1.25rem;grid-area:1/2/span 1/span 2;flex-grow:1;position:relative;max-width:inherit;padding-inline:.25rem}[part=label]{position:absolute;transform-origin:top left;inset-block-start:calc(1.25rem - 0.125rem);padding-inline-end:.25rem;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1),font-size 150ms cubic-bezier(0.4, 0, 0.2, 1);will-change:transform}:host(:focus-within) [part~=label],:host(:not([outlined])) [part~=placeholder] [part=label],:host(:not([outlined])) [part~=filled] [part=label]{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);transform:translateY(0);inset-block-start:calc(1.25rem/4)}:host([outlined]:focus-within) [part=label],:host([outlined]) [part~=placeholder] [part=label],:host([outlined]) [part~=filled] [part=label]{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);margin-block-end:auto;display:inline-block;position:relative;inset-block:0;transform:translateY(-50%);padding-inline-end:0}:host(:not([outlined])) [part~=container]{overflow:hidden;border-start-start-radius:var(--box-border-radius);border-start-end-radius:var(--box-border-radius);background:var(--box-background);padding-inline-end:.0625rem}:host(:not([outlined])) [part~=container]::after{content:"";position:absolute;bottom:0%;width:100%;border-block-end:.0625rem solid var(--idle-bottom-line-color);transition:all .25s cubic-bezier(0.215, 0.61, 0.355, 1)}:host(:not([outlined])) [part~=container]:not([part~=suffixed]) textarea{margin-block-end:.125rem;grid-area:1/2/span 1/span 3}:host(:not([outlined]):hover) [part~=container]{background:var(--box-background-hover)}:host(:not([outlined]):hover) [part~=container]::after{border-block-end-width:.0625rem;border-block-end-color:var(--hover-bottom-line-color)}:host(:disabled:not([outlined])) [part~=container],:host([disabled]:not([outlined])) [part~=container]{background:var(--box-disabled-background)}:host(:disabled:not([outlined])) [part~=container]::after,:host([disabled]:not([outlined])) [part~=container]::after{border-block-end-color:var(--disabled-bottom-line-color);border-block-end-style:dashed}:host([invalid]:not(:disabled)) [part~=container]::after,:host([invalid]:not([disabled])) [part~=container]::after{border-block-end-color:var(--error-secondary-color)}:host([invalid]:not(:disabled)) [part~=label],:host([invalid]:not([disabled])) [part~=label]{color:var(--error-secondary-color)}:host([invalid]:not(:disabled)) ::part(helper-text),:host([invalid]:not([disabled])) ::part(helper-text){color:var(--error-secondary-color)}:host(:focus-within) [part~=label]{color:var(--focused-secondary-color)}:host(:not([outlined]):focus-within){color:var(--input-prefix-color--focused)}:host(:not([outlined]):focus-within) [part~=container]{background:var(--box-background-focus)}:host(:not([outlined]):focus-within) [part~=container]::after{border-block-end-width:.125rem;border-block-end-color:var(--focused-bottom-line-color)}:host(:not([outlined]):focus-within) [part~=prefix]{color:var(--input-prefix-color--focused);background:var(--input-prefix-background--focused)}:host(:not([outlined]):focus-within) [part~=suffix]{color:var(--input-suffix-color--focused);background:var(--input-suffix-background--focused)}:host([invalid]:not([outlined]):focus-within) [part~=container]::after{border-block-end-color:var(--error-secondary-color)}[part=start],[part=end]{display:flex;align-items:center;min-width:max(var(--is-large, 1)*max(0.875rem, -1 * 0.875rem)*var(--ig-spacing-large, var(--ig-spacing, --ig-spacing)),var(--is-medium, 1)*max(0.75rem, -1 * 0.75rem)*var(--ig-spacing-medium, var(--ig-spacing, --ig-spacing)),var(--is-small, 1)*max(0.625rem, -1 * 0.625rem)*var(--ig-spacing-small, var(--ig-spacing, --ig-spacing)));min-height:100%;overflow:hidden}[part=start]{grid-area:1/1}[part=notch]{display:flex;align-items:center;width:auto;min-width:0;height:100%;position:relative;grid-area:1/2;padding-inline:.25rem}[part=filler]{grid-area:1/3}[part=end]{grid-area:1/4}[part~=prefixed] [part~=prefix]{padding-inline:max(var(--is-large, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(0.875rem, -1 * 0.875rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.75rem, -1 * 0.75rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)))}[part~=suffixed] [part~=suffix]{padding-inline:max(var(--is-large, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(0.875rem, -1 * 0.875rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.75rem, -1 * 0.75rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)))}[part~=filled]{color:var(--input-prefix-color--filled)}:host([outlined]){align-items:initial;padding:0;box-shadow:none;border-radius:var(--border-border-radius);background:var(--border-background);overflow:initial}:host([outlined]) [part~=container]{grid-template-columns:auto auto 1fr auto;display:grid}:host([outlined]) [part~=container]:not([part~=suffixed]) textarea{grid-column:2/-1;max-width:calc(100% - 0.125rem)}:host([outlined]) [part~=container][part~=filled] [part=notch],:host([outlined]) [part~=container][part~=placeholder] [part=notch]{border-block-start:.125rem solid rgba(0,0,0,0)}:host([outlined]) [part=start]{width:auto;border-color:var(--border-color);border-style:solid;border-inline-start-width:.0625rem;border-inline-end-width:0;border-block-start-width:.0625rem;border-block-end-width:.0625rem;border-start-start-radius:var(--border-border-radius);border-end-start-radius:var(--border-border-radius)}:host([outlined]) [part=filler]{border-width:.0625rem;border-style:solid;border-color:var(--border-color);border-left:none;border-right:none}:host([outlined]) [part=notch]{border-block:.0625rem solid var(--border-color);padding:0 .25rem}:host([outlined]) [part=notch]:empty{display:none}:host([outlined]) [part=end]{display:flex;justify-content:flex-end;flex-grow:1;height:100%;grid-area:1/4;border-color:var(--border-color);border-style:solid;border-inline-start-width:0;border-inline-end-width:.0625rem;border-block-start-width:.0625rem;border-block-end-width:.0625rem;border-start-end-radius:var(--border-border-radius);border-end-end-radius:var(--border-border-radius)}:host([outlined]) textarea{bottom:.125rem}:host([outlined]:hover) [part=notch],:host([outlined]:hover) [part=start],:host([outlined]:hover) [part=end],:host([outlined]:hover) [part=filler]{border-color:var(--hover-border-color)}:host([outlined]:hover) [part~=container][part~=filled] [part=notch],:host([outlined]:hover) [part~=container][part~=placeholder] [part=notch]{border-block-start-color:rgba(0,0,0,0)}:host([outlined]:focus-within) [part=filler],:host([outlined]:focus-within) [part=notch]{border-block-width:.125rem}:host([outlined]:focus-within) [part=filler]{border-block-color:var(--focused-border-color)}:host([outlined]:focus-within) [part=notch]{border-block-start-color:rgba(0,0,0,0);border-block-end-color:var(--focused-border-color)}:host([outlined]:focus-within) [part=start]{border-color:var(--focused-border-color);border-inline-start-width:.125rem;border-inline-end-width:0;border-block-start-width:.125rem;border-block-end-width:.125rem}:host([outlined]:focus-within) [part=end]{border-color:var(--focused-border-color);border-inline-start-width:0;border-inline-end-width:.125rem;border-block-start-width:.125rem;border-block-end-width:.125rem}:host([outlined]:focus-within) [part~=prefix]{margin-inline-start:-0.0625rem}:host([outlined]:focus-within) [part~=suffix]{margin-inline-end:-0.0625rem}:host([invalid][outlined]:not(:disabled)) [part=start],:host([invalid][outlined]:not(:disabled)) [part=filler],:host([invalid][outlined]:not(:disabled)) [part=end],:host([invalid][outlined]:not(:disabled)) [part=notch],:host([invalid][outlined]:not(:disabled):focus-within) [part=start],:host([invalid][outlined]:not(:disabled):focus-within) [part=filler],:host([invalid][outlined]:not(:disabled):focus-within) [part=end],:host([invalid][outlined]:not(:disabled):focus-within) [part=notch],:host([invalid][outlined]:not([disabled])) [part=start],:host([invalid][outlined]:not([disabled])) [part=filler],:host([invalid][outlined]:not([disabled])) [part=end],:host([invalid][outlined]:not([disabled])) [part=notch],:host([invalid][outlined]:not([disabled]):focus-within) [part=start],:host([invalid][outlined]:not([disabled]):focus-within) [part=filler],:host([invalid][outlined]:not([disabled]):focus-within) [part=end],:host([invalid][outlined]:not([disabled]):focus-within) [part=notch]{border-color:var(--error-secondary-color)}:host([invalid][outlined]:not([disabled]):focus-within) [part=notch],:host([invalid][outlined]:not([disabled])) [part~=placeholder] [part=notch]{border-block-start-color:rgba(0,0,0,0)}:host(:disabled[outlined]) [part~=container],:host([disabled][outlined]) [part~=container]{background:var(--border-disabled-background)}:host(:disabled[outlined]) [part=start],:host(:disabled[outlined]) [part=filler],:host(:disabled[outlined]) [part=notch],:host(:disabled[outlined]) [part=end],:host([disabled][outlined]) [part=start],:host([disabled][outlined]) [part=filler],:host([disabled][outlined]) [part=notch],:host([disabled][outlined]) [part=end]{border-color:var(--disabled-border-color)}`;
|
|
2
|
+
export const styles = css `:host{font-family:var(--ig-subtitle-1-font-family, var(--ig-font-family));font-size:var(--ig-subtitle-1-font-size);font-weight:var(--ig-subtitle-1-font-weight);font-style:var(--ig-subtitle-1-font-style);line-height:var(--ig-subtitle-1-line-height);letter-spacing:var(--ig-subtitle-1-letter-spacing);text-transform:var(--ig-subtitle-1-text-transform);margin-top:var(--ig-subtitle-1-margin-top);margin-bottom:var(--ig-subtitle-1-margin-bottom);--component-size: var(--ig-size, var(--default-size))}:host ::part(helper-text){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);color:var(--helper-text-color);grid-auto-rows:minmax(1.125rem, auto);margin-block-start:.25rem;padding-inline:max(var(--is-large, 1)*max(1.125rem, -1 * 1.125rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.875rem, -1 * 0.875rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)))}textarea{border:none;padding:0;overflow:auto;margin-block-start:1.25rem;grid-area:1/2/span 1/span 2;flex-grow:1;position:relative;max-width:inherit;padding-inline:.25rem}[part=label]{position:absolute;transform-origin:top left;inset-block-start:calc(1.25rem - 0.125rem);padding-inline-end:.25rem;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1),font-size 150ms cubic-bezier(0.4, 0, 0.2, 1);will-change:transform,translate}:host(:focus-within) [part~=label],:host(:not([outlined])) [part~=placeholder] [part=label],:host(:not([outlined])) [part~=filled] [part=label]{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);translate:0;inset-block-start:calc(1.25rem/4)}:host([outlined]:focus-within) [part=label],:host([outlined]) [part~=placeholder] [part=label],:host([outlined]) [part~=filled] [part=label]{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);margin-block-end:0;display:inline-block;position:relative;inset-block:0;translate:0 calc(var(--textarea-label-position)*-1);padding-inline-end:0}:host(:not([outlined])) [part~=container]{overflow:hidden;border-start-start-radius:var(--box-border-radius);border-start-end-radius:var(--box-border-radius);background:var(--box-background);padding-inline-end:.0625rem}:host(:not([outlined])) [part~=container]::after{content:"";position:absolute;bottom:0%;width:100%;border-block-end:.0625rem solid var(--idle-bottom-line-color);transition:all .25s cubic-bezier(0.215, 0.61, 0.355, 1)}:host(:not([outlined])) [part~=container]:not([part~=suffixed]) textarea{margin-block-end:.125rem;grid-area:1/2/span 1/span 3}:host(:not([outlined]):hover) [part~=container]{background:var(--box-background-hover)}:host(:not([outlined]):hover) [part~=container]::after{border-block-end-width:.0625rem;border-block-end-color:var(--hover-bottom-line-color)}:host(:disabled:not([outlined])) [part~=container],:host([disabled]:not([outlined])) [part~=container]{background:var(--box-disabled-background)}:host(:disabled:not([outlined])) [part~=container]::after,:host([disabled]:not([outlined])) [part~=container]::after{border-block-end-color:var(--disabled-bottom-line-color);border-block-end-style:dashed}:host([invalid]:not(:disabled)) [part~=container]::after,:host([invalid]:not([disabled])) [part~=container]::after{border-block-end-color:var(--error-secondary-color)}:host([invalid]:not(:disabled)) [part~=label],:host([invalid]:not([disabled])) [part~=label]{color:var(--error-secondary-color)}:host([invalid]:not(:disabled)) ::part(helper-text),:host([invalid]:not([disabled])) ::part(helper-text){color:var(--error-secondary-color)}:host(:focus-within) [part~=label]{color:var(--focused-secondary-color)}:host(:not([outlined]):focus-within){color:var(--input-prefix-color--focused)}:host(:not([outlined]):focus-within) [part~=container]{background:var(--box-background-focus)}:host(:not([outlined]):focus-within) [part~=container]::after{border-block-end-width:.125rem;border-block-end-color:var(--focused-bottom-line-color)}:host(:not([outlined]):focus-within) [part~=prefix]{color:var(--input-prefix-color--focused);background:var(--input-prefix-background--focused)}:host(:not([outlined]):focus-within) [part~=suffix]{color:var(--input-suffix-color--focused);background:var(--input-suffix-background--focused)}:host([invalid]:not([outlined]):focus-within) [part~=container]::after{border-block-end-color:var(--error-secondary-color)}[part=start],[part=end]{display:flex;align-items:center;min-width:max(var(--is-large, 1)*max(0.875rem, -1 * 0.875rem)*var(--ig-spacing-large, var(--ig-spacing, --ig-spacing)),var(--is-medium, 1)*max(0.75rem, -1 * 0.75rem)*var(--ig-spacing-medium, var(--ig-spacing, --ig-spacing)),var(--is-small, 1)*max(0.625rem, -1 * 0.625rem)*var(--ig-spacing-small, var(--ig-spacing, --ig-spacing)));min-height:100%;overflow:hidden}[part=start]{grid-area:1/1}[part=notch]{display:flex;align-items:flex-start;width:auto;min-width:0;height:100%;position:relative;grid-area:1/2;padding-inline:.25rem}[part=filler]{grid-area:1/3}[part=end]{grid-area:1/4}[part~=prefixed] [part~=prefix]{padding-inline:max(var(--is-large, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(0.875rem, -1 * 0.875rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.75rem, -1 * 0.75rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)))}[part~=suffixed] [part~=suffix]{padding-inline:max(var(--is-large, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(0.875rem, -1 * 0.875rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.75rem, -1 * 0.75rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)))}[part~=filled]{color:var(--input-prefix-color--filled)}:host([outlined]){--textarea-label-position: calc(50% + (0.0625rem));align-items:initial;padding:0;box-shadow:none;border-radius:var(--border-border-radius);background:var(--border-background);overflow:initial}:host([outlined]) [part~=container]{grid-template-columns:auto auto 1fr auto;display:grid}:host([outlined]) [part~=container]:not([part~=suffixed]) textarea{grid-column:2/-1;max-width:calc(100% - 0.125rem)}:host([outlined]) [part~=container][part~=filled] [part=notch],:host([outlined]) [part~=container][part~=placeholder] [part=notch]{border-block-start:.125rem solid rgba(0,0,0,0)}:host([outlined]) [part=start]{width:auto;border-color:var(--border-color);border-style:solid;border-inline-start-width:.0625rem;border-inline-end-width:0;border-block-start-width:.0625rem;border-block-end-width:.0625rem;border-start-start-radius:var(--border-border-radius);border-end-start-radius:var(--border-border-radius)}:host([outlined]) [part=filler]{border-width:.0625rem;border-style:solid;border-color:var(--border-color);border-left:none;border-right:none}:host([outlined]) [part=notch]{border-block:.0625rem solid var(--border-color);padding:0 .25rem}:host([outlined]) [part=notch]:empty{display:none}:host([outlined]) [part=end]{display:flex;justify-content:flex-end;flex-grow:1;height:100%;grid-area:1/4;border-color:var(--border-color);border-style:solid;border-inline-start-width:0;border-inline-end-width:.0625rem;border-block-start-width:.0625rem;border-block-end-width:.0625rem;border-start-end-radius:var(--border-border-radius);border-end-end-radius:var(--border-border-radius)}:host([outlined]) textarea{bottom:.125rem}:host([outlined]:hover) [part=notch],:host([outlined]:hover) [part=start],:host([outlined]:hover) [part=end],:host([outlined]:hover) [part=filler]{border-color:var(--hover-border-color)}:host([outlined]:hover) [part~=container][part~=filled] [part=notch],:host([outlined]:hover) [part~=container][part~=placeholder] [part=notch]{border-block-start-color:rgba(0,0,0,0)}:host([outlined]:focus-within) [part=filler],:host([outlined]:focus-within) [part=notch]{border-block-width:.125rem}:host([outlined]:focus-within) [part=filler]{border-block-color:var(--focused-border-color)}:host([outlined]:focus-within) [part=notch]{border-block-start-color:rgba(0,0,0,0);border-block-end-color:var(--focused-border-color)}:host([outlined]:focus-within) [part=start]{border-color:var(--focused-border-color);border-inline-start-width:.125rem;border-inline-end-width:0;border-block-start-width:.125rem;border-block-end-width:.125rem}:host([outlined]:focus-within) [part=end]{border-color:var(--focused-border-color);border-inline-start-width:0;border-inline-end-width:.125rem;border-block-start-width:.125rem;border-block-end-width:.125rem}:host([outlined]:focus-within) [part~=prefix]{margin-inline-start:-0.0625rem}:host([outlined]:focus-within) [part~=suffix]{margin-inline-end:-0.0625rem}:host([invalid][outlined]:not(:disabled)) [part=start],:host([invalid][outlined]:not(:disabled)) [part=filler],:host([invalid][outlined]:not(:disabled)) [part=end],:host([invalid][outlined]:not(:disabled)) [part=notch],:host([invalid][outlined]:not(:disabled):focus-within) [part=start],:host([invalid][outlined]:not(:disabled):focus-within) [part=filler],:host([invalid][outlined]:not(:disabled):focus-within) [part=end],:host([invalid][outlined]:not(:disabled):focus-within) [part=notch],:host([invalid][outlined]:not([disabled])) [part=start],:host([invalid][outlined]:not([disabled])) [part=filler],:host([invalid][outlined]:not([disabled])) [part=end],:host([invalid][outlined]:not([disabled])) [part=notch],:host([invalid][outlined]:not([disabled]):focus-within) [part=start],:host([invalid][outlined]:not([disabled]):focus-within) [part=filler],:host([invalid][outlined]:not([disabled]):focus-within) [part=end],:host([invalid][outlined]:not([disabled]):focus-within) [part=notch]{border-color:var(--error-secondary-color)}:host([invalid][outlined]:not([disabled]):focus-within) [part=notch],:host([invalid][outlined]:not([disabled])) [part~=placeholder] [part=notch]{border-block-start-color:rgba(0,0,0,0)}:host(:disabled[outlined]) [part~=container],:host([disabled][outlined]) [part~=container]{background:var(--border-disabled-background)}:host(:disabled[outlined]) [part=start],:host(:disabled[outlined]) [part=filler],:host(:disabled[outlined]) [part=notch],:host(:disabled[outlined]) [part=end],:host([disabled][outlined]) [part=start],:host([disabled][outlined]) [part=filler],:host([disabled][outlined]) [part=notch],:host([disabled][outlined]) [part=end]{border-color:var(--disabled-border-color)}`;
|
|
3
3
|
//# sourceMappingURL=textarea.material.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.material.css.js","sourceRoot":"","sources":["../../../../../src/components/textarea/themes/shared/textarea.material.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,m0WAAm0W,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`:host{font-family:var(--ig-subtitle-1-font-family, var(--ig-font-family));font-size:var(--ig-subtitle-1-font-size);font-weight:var(--ig-subtitle-1-font-weight);font-style:var(--ig-subtitle-1-font-style);line-height:var(--ig-subtitle-1-line-height);letter-spacing:var(--ig-subtitle-1-letter-spacing);text-transform:var(--ig-subtitle-1-text-transform);margin-top:var(--ig-subtitle-1-margin-top);margin-bottom:var(--ig-subtitle-1-margin-bottom);--component-size: var(--ig-size, var(--default-size))}:host ::part(helper-text){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);color:var(--helper-text-color);grid-auto-rows:minmax(1.125rem, auto);margin-block-start:.25rem;padding-inline:max(var(--is-large, 1)*max(1.125rem, -1 * 1.125rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.875rem, -1 * 0.875rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)))}textarea{border:none;padding:0;overflow:auto;margin-block-start:1.25rem;grid-area:1/2/span 1/span 2;flex-grow:1;position:relative;max-width:inherit;padding-inline:.25rem}[part=label]{position:absolute;transform-origin:top left;inset-block-start:calc(1.25rem - 0.125rem);padding-inline-end:.25rem;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1),font-size 150ms cubic-bezier(0.4, 0, 0.2, 1);will-change:transform}:host(:focus-within) [part~=label],:host(:not([outlined])) [part~=placeholder] [part=label],:host(:not([outlined])) [part~=filled] [part=label]{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);transform:translateY(0);inset-block-start:calc(1.25rem/4)}:host([outlined]:focus-within) [part=label],:host([outlined]) [part~=placeholder] [part=label],:host([outlined]) [part~=filled] [part=label]{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);margin-block-end:auto;display:inline-block;position:relative;inset-block:0;transform:translateY(-50%);padding-inline-end:0}:host(:not([outlined])) [part~=container]{overflow:hidden;border-start-start-radius:var(--box-border-radius);border-start-end-radius:var(--box-border-radius);background:var(--box-background);padding-inline-end:.0625rem}:host(:not([outlined])) [part~=container]::after{content:\"\";position:absolute;bottom:0%;width:100%;border-block-end:.0625rem solid var(--idle-bottom-line-color);transition:all .25s cubic-bezier(0.215, 0.61, 0.355, 1)}:host(:not([outlined])) [part~=container]:not([part~=suffixed]) textarea{margin-block-end:.125rem;grid-area:1/2/span 1/span 3}:host(:not([outlined]):hover) [part~=container]{background:var(--box-background-hover)}:host(:not([outlined]):hover) [part~=container]::after{border-block-end-width:.0625rem;border-block-end-color:var(--hover-bottom-line-color)}:host(:disabled:not([outlined])) [part~=container],:host([disabled]:not([outlined])) [part~=container]{background:var(--box-disabled-background)}:host(:disabled:not([outlined])) [part~=container]::after,:host([disabled]:not([outlined])) [part~=container]::after{border-block-end-color:var(--disabled-bottom-line-color);border-block-end-style:dashed}:host([invalid]:not(:disabled)) [part~=container]::after,:host([invalid]:not([disabled])) [part~=container]::after{border-block-end-color:var(--error-secondary-color)}:host([invalid]:not(:disabled)) [part~=label],:host([invalid]:not([disabled])) [part~=label]{color:var(--error-secondary-color)}:host([invalid]:not(:disabled)) ::part(helper-text),:host([invalid]:not([disabled])) ::part(helper-text){color:var(--error-secondary-color)}:host(:focus-within) [part~=label]{color:var(--focused-secondary-color)}:host(:not([outlined]):focus-within){color:var(--input-prefix-color--focused)}:host(:not([outlined]):focus-within) [part~=container]{background:var(--box-background-focus)}:host(:not([outlined]):focus-within) [part~=container]::after{border-block-end-width:.125rem;border-block-end-color:var(--focused-bottom-line-color)}:host(:not([outlined]):focus-within) [part~=prefix]{color:var(--input-prefix-color--focused);background:var(--input-prefix-background--focused)}:host(:not([outlined]):focus-within) [part~=suffix]{color:var(--input-suffix-color--focused);background:var(--input-suffix-background--focused)}:host([invalid]:not([outlined]):focus-within) [part~=container]::after{border-block-end-color:var(--error-secondary-color)}[part=start],[part=end]{display:flex;align-items:center;min-width:max(var(--is-large, 1)*max(0.875rem, -1 * 0.875rem)*var(--ig-spacing-large, var(--ig-spacing, --ig-spacing)),var(--is-medium, 1)*max(0.75rem, -1 * 0.75rem)*var(--ig-spacing-medium, var(--ig-spacing, --ig-spacing)),var(--is-small, 1)*max(0.625rem, -1 * 0.625rem)*var(--ig-spacing-small, var(--ig-spacing, --ig-spacing)));min-height:100%;overflow:hidden}[part=start]{grid-area:1/1}[part=notch]{display:flex;align-items:center;width:auto;min-width:0;height:100%;position:relative;grid-area:1/2;padding-inline:.25rem}[part=filler]{grid-area:1/3}[part=end]{grid-area:1/4}[part~=prefixed] [part~=prefix]{padding-inline:max(var(--is-large, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(0.875rem, -1 * 0.875rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.75rem, -1 * 0.75rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)))}[part~=suffixed] [part~=suffix]{padding-inline:max(var(--is-large, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(0.875rem, -1 * 0.875rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.75rem, -1 * 0.75rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)))}[part~=filled]{color:var(--input-prefix-color--filled)}:host([outlined]){align-items:initial;padding:0;box-shadow:none;border-radius:var(--border-border-radius);background:var(--border-background);overflow:initial}:host([outlined]) [part~=container]{grid-template-columns:auto auto 1fr auto;display:grid}:host([outlined]) [part~=container]:not([part~=suffixed]) textarea{grid-column:2/-1;max-width:calc(100% - 0.125rem)}:host([outlined]) [part~=container][part~=filled] [part=notch],:host([outlined]) [part~=container][part~=placeholder] [part=notch]{border-block-start:.125rem solid rgba(0,0,0,0)}:host([outlined]) [part=start]{width:auto;border-color:var(--border-color);border-style:solid;border-inline-start-width:.0625rem;border-inline-end-width:0;border-block-start-width:.0625rem;border-block-end-width:.0625rem;border-start-start-radius:var(--border-border-radius);border-end-start-radius:var(--border-border-radius)}:host([outlined]) [part=filler]{border-width:.0625rem;border-style:solid;border-color:var(--border-color);border-left:none;border-right:none}:host([outlined]) [part=notch]{border-block:.0625rem solid var(--border-color);padding:0 .25rem}:host([outlined]) [part=notch]:empty{display:none}:host([outlined]) [part=end]{display:flex;justify-content:flex-end;flex-grow:1;height:100%;grid-area:1/4;border-color:var(--border-color);border-style:solid;border-inline-start-width:0;border-inline-end-width:.0625rem;border-block-start-width:.0625rem;border-block-end-width:.0625rem;border-start-end-radius:var(--border-border-radius);border-end-end-radius:var(--border-border-radius)}:host([outlined]) textarea{bottom:.125rem}:host([outlined]:hover) [part=notch],:host([outlined]:hover) [part=start],:host([outlined]:hover) [part=end],:host([outlined]:hover) [part=filler]{border-color:var(--hover-border-color)}:host([outlined]:hover) [part~=container][part~=filled] [part=notch],:host([outlined]:hover) [part~=container][part~=placeholder] [part=notch]{border-block-start-color:rgba(0,0,0,0)}:host([outlined]:focus-within) [part=filler],:host([outlined]:focus-within) [part=notch]{border-block-width:.125rem}:host([outlined]:focus-within) [part=filler]{border-block-color:var(--focused-border-color)}:host([outlined]:focus-within) [part=notch]{border-block-start-color:rgba(0,0,0,0);border-block-end-color:var(--focused-border-color)}:host([outlined]:focus-within) [part=start]{border-color:var(--focused-border-color);border-inline-start-width:.125rem;border-inline-end-width:0;border-block-start-width:.125rem;border-block-end-width:.125rem}:host([outlined]:focus-within) [part=end]{border-color:var(--focused-border-color);border-inline-start-width:0;border-inline-end-width:.125rem;border-block-start-width:.125rem;border-block-end-width:.125rem}:host([outlined]:focus-within) [part~=prefix]{margin-inline-start:-0.0625rem}:host([outlined]:focus-within) [part~=suffix]{margin-inline-end:-0.0625rem}:host([invalid][outlined]:not(:disabled)) [part=start],:host([invalid][outlined]:not(:disabled)) [part=filler],:host([invalid][outlined]:not(:disabled)) [part=end],:host([invalid][outlined]:not(:disabled)) [part=notch],:host([invalid][outlined]:not(:disabled):focus-within) [part=start],:host([invalid][outlined]:not(:disabled):focus-within) [part=filler],:host([invalid][outlined]:not(:disabled):focus-within) [part=end],:host([invalid][outlined]:not(:disabled):focus-within) [part=notch],:host([invalid][outlined]:not([disabled])) [part=start],:host([invalid][outlined]:not([disabled])) [part=filler],:host([invalid][outlined]:not([disabled])) [part=end],:host([invalid][outlined]:not([disabled])) [part=notch],:host([invalid][outlined]:not([disabled]):focus-within) [part=start],:host([invalid][outlined]:not([disabled]):focus-within) [part=filler],:host([invalid][outlined]:not([disabled]):focus-within) [part=end],:host([invalid][outlined]:not([disabled]):focus-within) [part=notch]{border-color:var(--error-secondary-color)}:host([invalid][outlined]:not([disabled]):focus-within) [part=notch],:host([invalid][outlined]:not([disabled])) [part~=placeholder] [part=notch]{border-block-start-color:rgba(0,0,0,0)}:host(:disabled[outlined]) [part~=container],:host([disabled][outlined]) [part~=container]{background:var(--border-disabled-background)}:host(:disabled[outlined]) [part=start],:host(:disabled[outlined]) [part=filler],:host(:disabled[outlined]) [part=notch],:host(:disabled[outlined]) [part=end],:host([disabled][outlined]) [part=start],:host([disabled][outlined]) [part=filler],:host([disabled][outlined]) [part=notch],:host([disabled][outlined]) [part=end]{border-color:var(--disabled-border-color)}`;\n"]}
|
|
1
|
+
{"version":3,"file":"textarea.material.css.js","sourceRoot":"","sources":["../../../../../src/components/textarea/themes/shared/textarea.material.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,84WAA84W,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`:host{font-family:var(--ig-subtitle-1-font-family, var(--ig-font-family));font-size:var(--ig-subtitle-1-font-size);font-weight:var(--ig-subtitle-1-font-weight);font-style:var(--ig-subtitle-1-font-style);line-height:var(--ig-subtitle-1-line-height);letter-spacing:var(--ig-subtitle-1-letter-spacing);text-transform:var(--ig-subtitle-1-text-transform);margin-top:var(--ig-subtitle-1-margin-top);margin-bottom:var(--ig-subtitle-1-margin-bottom);--component-size: var(--ig-size, var(--default-size))}:host ::part(helper-text){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);color:var(--helper-text-color);grid-auto-rows:minmax(1.125rem, auto);margin-block-start:.25rem;padding-inline:max(var(--is-large, 1)*max(1.125rem, -1 * 1.125rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.875rem, -1 * 0.875rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)))}textarea{border:none;padding:0;overflow:auto;margin-block-start:1.25rem;grid-area:1/2/span 1/span 2;flex-grow:1;position:relative;max-width:inherit;padding-inline:.25rem}[part=label]{position:absolute;transform-origin:top left;inset-block-start:calc(1.25rem - 0.125rem);padding-inline-end:.25rem;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1),font-size 150ms cubic-bezier(0.4, 0, 0.2, 1);will-change:transform,translate}:host(:focus-within) [part~=label],:host(:not([outlined])) [part~=placeholder] [part=label],:host(:not([outlined])) [part~=filled] [part=label]{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);translate:0;inset-block-start:calc(1.25rem/4)}:host([outlined]:focus-within) [part=label],:host([outlined]) [part~=placeholder] [part=label],:host([outlined]) [part~=filled] [part=label]{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);margin-block-end:0;display:inline-block;position:relative;inset-block:0;translate:0 calc(var(--textarea-label-position)*-1);padding-inline-end:0}:host(:not([outlined])) [part~=container]{overflow:hidden;border-start-start-radius:var(--box-border-radius);border-start-end-radius:var(--box-border-radius);background:var(--box-background);padding-inline-end:.0625rem}:host(:not([outlined])) [part~=container]::after{content:\"\";position:absolute;bottom:0%;width:100%;border-block-end:.0625rem solid var(--idle-bottom-line-color);transition:all .25s cubic-bezier(0.215, 0.61, 0.355, 1)}:host(:not([outlined])) [part~=container]:not([part~=suffixed]) textarea{margin-block-end:.125rem;grid-area:1/2/span 1/span 3}:host(:not([outlined]):hover) [part~=container]{background:var(--box-background-hover)}:host(:not([outlined]):hover) [part~=container]::after{border-block-end-width:.0625rem;border-block-end-color:var(--hover-bottom-line-color)}:host(:disabled:not([outlined])) [part~=container],:host([disabled]:not([outlined])) [part~=container]{background:var(--box-disabled-background)}:host(:disabled:not([outlined])) [part~=container]::after,:host([disabled]:not([outlined])) [part~=container]::after{border-block-end-color:var(--disabled-bottom-line-color);border-block-end-style:dashed}:host([invalid]:not(:disabled)) [part~=container]::after,:host([invalid]:not([disabled])) [part~=container]::after{border-block-end-color:var(--error-secondary-color)}:host([invalid]:not(:disabled)) [part~=label],:host([invalid]:not([disabled])) [part~=label]{color:var(--error-secondary-color)}:host([invalid]:not(:disabled)) ::part(helper-text),:host([invalid]:not([disabled])) ::part(helper-text){color:var(--error-secondary-color)}:host(:focus-within) [part~=label]{color:var(--focused-secondary-color)}:host(:not([outlined]):focus-within){color:var(--input-prefix-color--focused)}:host(:not([outlined]):focus-within) [part~=container]{background:var(--box-background-focus)}:host(:not([outlined]):focus-within) [part~=container]::after{border-block-end-width:.125rem;border-block-end-color:var(--focused-bottom-line-color)}:host(:not([outlined]):focus-within) [part~=prefix]{color:var(--input-prefix-color--focused);background:var(--input-prefix-background--focused)}:host(:not([outlined]):focus-within) [part~=suffix]{color:var(--input-suffix-color--focused);background:var(--input-suffix-background--focused)}:host([invalid]:not([outlined]):focus-within) [part~=container]::after{border-block-end-color:var(--error-secondary-color)}[part=start],[part=end]{display:flex;align-items:center;min-width:max(var(--is-large, 1)*max(0.875rem, -1 * 0.875rem)*var(--ig-spacing-large, var(--ig-spacing, --ig-spacing)),var(--is-medium, 1)*max(0.75rem, -1 * 0.75rem)*var(--ig-spacing-medium, var(--ig-spacing, --ig-spacing)),var(--is-small, 1)*max(0.625rem, -1 * 0.625rem)*var(--ig-spacing-small, var(--ig-spacing, --ig-spacing)));min-height:100%;overflow:hidden}[part=start]{grid-area:1/1}[part=notch]{display:flex;align-items:flex-start;width:auto;min-width:0;height:100%;position:relative;grid-area:1/2;padding-inline:.25rem}[part=filler]{grid-area:1/3}[part=end]{grid-area:1/4}[part~=prefixed] [part~=prefix]{padding-inline:max(var(--is-large, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(0.875rem, -1 * 0.875rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.75rem, -1 * 0.75rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)))}[part~=suffixed] [part~=suffix]{padding-inline:max(var(--is-large, 1)*max(1rem, -1 * 1rem)*var(--ig-spacing-inline-large, var(--ig-spacing-inline, --ig-spacing)),var(--is-medium, 1)*max(0.875rem, -1 * 0.875rem)*var(--ig-spacing-inline-medium, var(--ig-spacing-inline, --ig-spacing)),var(--is-small, 1)*max(0.75rem, -1 * 0.75rem)*var(--ig-spacing-inline-small, var(--ig-spacing-inline, --ig-spacing)))}[part~=filled]{color:var(--input-prefix-color--filled)}:host([outlined]){--textarea-label-position: calc(50% + (0.0625rem));align-items:initial;padding:0;box-shadow:none;border-radius:var(--border-border-radius);background:var(--border-background);overflow:initial}:host([outlined]) [part~=container]{grid-template-columns:auto auto 1fr auto;display:grid}:host([outlined]) [part~=container]:not([part~=suffixed]) textarea{grid-column:2/-1;max-width:calc(100% - 0.125rem)}:host([outlined]) [part~=container][part~=filled] [part=notch],:host([outlined]) [part~=container][part~=placeholder] [part=notch]{border-block-start:.125rem solid rgba(0,0,0,0)}:host([outlined]) [part=start]{width:auto;border-color:var(--border-color);border-style:solid;border-inline-start-width:.0625rem;border-inline-end-width:0;border-block-start-width:.0625rem;border-block-end-width:.0625rem;border-start-start-radius:var(--border-border-radius);border-end-start-radius:var(--border-border-radius)}:host([outlined]) [part=filler]{border-width:.0625rem;border-style:solid;border-color:var(--border-color);border-left:none;border-right:none}:host([outlined]) [part=notch]{border-block:.0625rem solid var(--border-color);padding:0 .25rem}:host([outlined]) [part=notch]:empty{display:none}:host([outlined]) [part=end]{display:flex;justify-content:flex-end;flex-grow:1;height:100%;grid-area:1/4;border-color:var(--border-color);border-style:solid;border-inline-start-width:0;border-inline-end-width:.0625rem;border-block-start-width:.0625rem;border-block-end-width:.0625rem;border-start-end-radius:var(--border-border-radius);border-end-end-radius:var(--border-border-radius)}:host([outlined]) textarea{bottom:.125rem}:host([outlined]:hover) [part=notch],:host([outlined]:hover) [part=start],:host([outlined]:hover) [part=end],:host([outlined]:hover) [part=filler]{border-color:var(--hover-border-color)}:host([outlined]:hover) [part~=container][part~=filled] [part=notch],:host([outlined]:hover) [part~=container][part~=placeholder] [part=notch]{border-block-start-color:rgba(0,0,0,0)}:host([outlined]:focus-within) [part=filler],:host([outlined]:focus-within) [part=notch]{border-block-width:.125rem}:host([outlined]:focus-within) [part=filler]{border-block-color:var(--focused-border-color)}:host([outlined]:focus-within) [part=notch]{border-block-start-color:rgba(0,0,0,0);border-block-end-color:var(--focused-border-color)}:host([outlined]:focus-within) [part=start]{border-color:var(--focused-border-color);border-inline-start-width:.125rem;border-inline-end-width:0;border-block-start-width:.125rem;border-block-end-width:.125rem}:host([outlined]:focus-within) [part=end]{border-color:var(--focused-border-color);border-inline-start-width:0;border-inline-end-width:.125rem;border-block-start-width:.125rem;border-block-end-width:.125rem}:host([outlined]:focus-within) [part~=prefix]{margin-inline-start:-0.0625rem}:host([outlined]:focus-within) [part~=suffix]{margin-inline-end:-0.0625rem}:host([invalid][outlined]:not(:disabled)) [part=start],:host([invalid][outlined]:not(:disabled)) [part=filler],:host([invalid][outlined]:not(:disabled)) [part=end],:host([invalid][outlined]:not(:disabled)) [part=notch],:host([invalid][outlined]:not(:disabled):focus-within) [part=start],:host([invalid][outlined]:not(:disabled):focus-within) [part=filler],:host([invalid][outlined]:not(:disabled):focus-within) [part=end],:host([invalid][outlined]:not(:disabled):focus-within) [part=notch],:host([invalid][outlined]:not([disabled])) [part=start],:host([invalid][outlined]:not([disabled])) [part=filler],:host([invalid][outlined]:not([disabled])) [part=end],:host([invalid][outlined]:not([disabled])) [part=notch],:host([invalid][outlined]:not([disabled]):focus-within) [part=start],:host([invalid][outlined]:not([disabled]):focus-within) [part=filler],:host([invalid][outlined]:not([disabled]):focus-within) [part=end],:host([invalid][outlined]:not([disabled]):focus-within) [part=notch]{border-color:var(--error-secondary-color)}:host([invalid][outlined]:not([disabled]):focus-within) [part=notch],:host([invalid][outlined]:not([disabled])) [part~=placeholder] [part=notch]{border-block-start-color:rgba(0,0,0,0)}:host(:disabled[outlined]) [part~=container],:host([disabled][outlined]) [part~=container]{background:var(--border-disabled-background)}:host(:disabled[outlined]) [part=start],:host(:disabled[outlined]) [part=filler],:host(:disabled[outlined]) [part=notch],:host(:disabled[outlined]) [part=end],:host([disabled][outlined]) [part=start],:host([disabled][outlined]) [part=filler],:host([disabled][outlined]) [part=notch],:host([disabled][outlined]) [part=end]{border-color:var(--disabled-border-color)}`;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../src/components/textarea/validators.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../src/components/textarea/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAElB,MAAM,yBAAyB,CAAC;AAGjC,MAAM,CAAC,MAAM,kBAAkB,GAAsC;IACnE,iBAAiB;IACjB,kBAAkB;IAClB,kBAAkB;CACnB,CAAC","sourcesContent":["import {\n maxLengthValidator,\n minLengthValidator,\n requiredValidator,\n type Validator,\n} from '../common/validators.js';\nimport type IgcTextareaComponent from './textarea.js';\n\nexport const textAreaValidators: Validator<IgcTextareaComponent>[] = [\n requiredValidator,\n minLengthValidator,\n maxLengthValidator,\n];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"position.js","sourceRoot":"","sources":["../../../src/components/tile-manager/position.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAIpD,MAAM,UAAU;IAKd,IAAY,MAAM;QAChB,OAAO,KAAK,CAAC,IAAI,CACf,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAmB,mBAAmB,CAAC,CACrE,CAAC;IACJ,CAAC;IAKD,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;IAED,YAAY,OAAgC;QAjBpC,u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AAI,UAAU,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,mBAAmB;IACjC,OAAO,IAAI,aAAa,EAAE,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,CAAmB,EAAE,CAAmB;IAChE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;AACtD,CAAC","sourcesContent":["import { last, partition } from '../common/util.js';\nimport type
|
|
1
|
+
{"version":3,"file":"position.js","sourceRoot":"","sources":["../../../src/components/tile-manager/position.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAIpD,MAAM,UAAU;IAKd,IAAY,MAAM;QAChB,OAAO,KAAK,CAAC,IAAI,CACf,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAmB,mBAAmB,CAAC,CACrE,CAAC;IACJ,CAAC;IAKD,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;IAED,YAAY,OAAgC;QAjBpC,uBAAkB,GAAG,CAAC,CAAC;QAkB7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEM,eAAe;QACpB,IAAI,YAAY,GAAG,CAA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AAED,MAAM,UAAU,SAAS,CAAC,CAAmB,EAAE,CAAmB;IAChE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;AACtD,CAAC","sourcesContent":["import { last, partition } from '../common/util.js';\nimport type IgcTileComponent from './tile.js';\nimport type IgcTileManagerComponent from './tile-manager.js';\n\nclass TilesState {\n private _nextEmptyPosition = 0;\n\n public manager: IgcTileManagerComponent;\n\n private get _tiles(): IgcTileComponent[] {\n return Array.from(\n this.manager.querySelectorAll<IgcTileComponent>(':scope > igc-tile')\n );\n }\n\n /**\n * Returns the current tiles of the tile manager sorted by their position.\n */\n public get tiles(): IgcTileComponent[] {\n return this._tiles.toSorted((a, b) => a.position - b.position);\n }\n\n constructor(manager: IgcTileManagerComponent) {\n this.manager = manager;\n }\n\n public assignPositions(): void {\n let nextPosition = 0;\n const [positionedTiles, nonPositionedTiles] = partition(\n this._tiles,\n (tile) => tile.position !== -1\n );\n\n positionedTiles.sort((a, b) => a.position - b.position);\n\n for (const tile of positionedTiles) {\n // Fill any unassigned slots before the next assigned tile's position\n while (nextPosition < tile.position && nonPositionedTiles.length > 0) {\n const nonPositionedTile = nonPositionedTiles.shift()!;\n nonPositionedTile.position = nextPosition++;\n }\n\n tile.position = nextPosition;\n nextPosition = tile.position + 1;\n }\n\n for (const tile of nonPositionedTiles) {\n tile.position = nextPosition++;\n }\n }\n\n /** Updates the default (manual) slot of the tile manager with the current tiles. */\n public assignTiles(): void {\n this.manager.renderRoot.querySelector('slot')!.assign(...this._tiles);\n }\n\n public add(tile: IgcTileComponent): void {\n const tiles = this.tiles;\n\n if (tile.position > -1) {\n for (const each of tiles) {\n if (each !== tile && each.position >= tile.position) {\n each.position++;\n }\n }\n } else {\n const positionedTiles = this._tiles.filter((tile) => tile.position > -1);\n tile.position =\n positionedTiles.length > 1\n ? Math.max(...positionedTiles.map((tile) => tile.position)) + 1\n : this._nextEmptyPosition++;\n }\n }\n\n /**\n * Checks and adjusts tile spans based on the column count of the tile manager.\n */\n public adjustTileGridPosition(): void {\n const columnCount = this.manager.columnCount;\n\n if (columnCount > 0) {\n for (const tile of this.tiles) {\n let colStart = tile.colStart || 0;\n let colStartDelta = colStart > 0 ? 1 : 0;\n const colSpan = tile.colSpan || 0;\n\n if (colStart > columnCount) {\n colStart = 0;\n colStartDelta = 0;\n tile.colStart = 0;\n }\n\n if (colStart + colSpan > columnCount) {\n tile.colSpan = columnCount - colStart + colStartDelta;\n }\n }\n }\n }\n\n public remove(tile: IgcTileComponent): void {\n for (const each of this.tiles) {\n if (each.position >= tile.position) {\n each.position--;\n }\n }\n }\n}\n\ntype TileDragStackEntry = {\n tile: IgcTileComponent;\n position: number;\n column?: number | null;\n row?: number | null;\n};\n\nclass TileDragStack {\n private _stack: TileDragStackEntry[] = [];\n\n public peek(): IgcTileComponent {\n return last(this._stack).tile;\n }\n\n public pop(): TileDragStackEntry | undefined {\n return this._stack.pop();\n }\n\n public push(tile: IgcTileComponent): void {\n this._stack.push({\n tile,\n position: tile.position,\n column: tile.colStart,\n row: tile.rowStart,\n });\n }\n\n public restore(): void {\n for (const {\n tile,\n position,\n column: colStart,\n row: rowStart,\n } of this._stack.toReversed()) {\n Object.assign(tile, {\n position,\n colStart,\n rowStart,\n });\n }\n }\n\n public reset(): void {\n this._stack = [];\n }\n}\n\nexport function createTilesState(manager: IgcTileManagerComponent) {\n return new TilesState(manager);\n}\n\nexport function createTileDragStack(): TileDragStack {\n return new TileDragStack();\n}\n\nexport function swapTiles(a: IgcTileComponent, b: IgcTileComponent): void {\n [a.colStart, b.colStart] = [b.colStart, a.colStart];\n [a.rowStart, b.rowStart] = [b.rowStart, a.colStart];\n [a.position, b.position] = [b.position, a.position];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../../src/components/tile-manager/themes/container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAI1B,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAEzE,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../../src/components/tile-manager/themes/container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAI1B,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAEzE,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAI3E,MAAM,KAAK,GAAG;IACZ,MAAM,EAAE,GAAG,CAAA;MACP,WAAW;GACd;IACD,SAAS,EAAE,GAAG,CAAA;MACV,cAAc;GACjB;IACD,QAAQ,EAAE,GAAG,CAAA;MACT,aAAa;GAChB;IACD,MAAM,EAAE,GAAG,CAAA;MACP,WAAW;GACd;IACD,MAAM,EAAE,GAAG,CAAA;MACP,WAAW;GACd;CACF,CAAC;AAEF,MAAM,IAAI,GAAG;IACX,MAAM,EAAE,GAAG,CAAA;MACP,UAAU;GACb;IACD,SAAS,EAAE,GAAG,CAAA;MACV,aAAa;GAChB;IACD,QAAQ,EAAE,GAAG,CAAA;MACT,YAAY;GACf;IACD,MAAM,EAAE,GAAG,CAAA;MACP,UAAU;GACb;IACD,MAAM,EAAE,GAAG,CAAA;MACP,UAAU;GACb;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAW,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC","sourcesContent":["import { css } from 'lit';\n\nimport type { Themes } from '../../../theming/types.js';\n// Dark Overrides\nimport { styles as bootstrapDark } from './dark/tile-manager.bootstrap.css.js';\nimport { styles as fluentDark } from './dark/tile-manager.fluent.css.js';\nimport { styles as indigoDark } from './dark/tile-manager.indigo.css.js';\nimport { styles as materialDark } from './dark/tile-manager.material.css.js';\nimport { styles as sharedDark } from './dark/tile-manager.shared.css.js';\n// Light Overrides\nimport { styles as bootstrapLight } from './light/tile-manager.bootstrap.css.js';\nimport { styles as fluentLight } from './light/tile-manager.fluent.css.js';\nimport { styles as indigoLight } from './light/tile-manager.indigo.css.js';\nimport { styles as materialLight } from './light/tile-manager.material.css.js';\nimport { styles as sharedLight } from './light/tile-manager.shared.css.js';\n\n// Shared Styles\n\nconst light = {\n shared: css`\n ${sharedLight}\n `,\n bootstrap: css`\n ${bootstrapLight}\n `,\n material: css`\n ${materialLight}\n `,\n fluent: css`\n ${fluentLight}\n `,\n indigo: css`\n ${indigoLight}\n `,\n};\n\nconst dark = {\n shared: css`\n ${sharedDark}\n `,\n bootstrap: css`\n ${bootstrapDark}\n `,\n material: css`\n ${materialDark}\n `,\n fluent: css`\n ${fluentDark}\n `,\n indigo: css`\n ${indigoDark}\n `,\n};\n\nexport const all: Themes = { light, dark };\n"]}
|
|
@@ -19,7 +19,6 @@ import IgcTileComponent from './tile.js';
|
|
|
19
19
|
export default class IgcTileManagerComponent extends LitElement {
|
|
20
20
|
static readonly tagName = "igc-tile-manager";
|
|
21
21
|
static styles: import("lit").CSSResult[];
|
|
22
|
-
static shadowRootOptions: ShadowRootInit;
|
|
23
22
|
static register(): void;
|
|
24
23
|
private _internalStyles;
|
|
25
24
|
private _dragMode;
|
|
@@ -6,13 +6,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
var IgcTileManagerComponent_1;
|
|
8
8
|
import { ContextProvider } from '@lit/context';
|
|
9
|
-
import {
|
|
9
|
+
import { html, LitElement } from 'lit';
|
|
10
10
|
import { property } from 'lit/decorators.js';
|
|
11
11
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
12
12
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
13
|
-
import {
|
|
13
|
+
import { addThemingController } from '../../theming/theming-controller.js';
|
|
14
14
|
import { tileManagerContext, } from '../common/context.js';
|
|
15
15
|
import { createMutationController, } from '../common/controllers/mutation-observer.js';
|
|
16
|
+
import { shadowOptions } from '../common/decorators/shadow-options.js';
|
|
16
17
|
import { registerComponent } from '../common/definitions/register.js';
|
|
17
18
|
import { partMap } from '../common/part-map.js';
|
|
18
19
|
import { asNumber } from '../common/util.js';
|
|
@@ -101,6 +102,7 @@ let IgcTileManagerComponent = IgcTileManagerComponent_1 = class IgcTileManagerCo
|
|
|
101
102
|
context: tileManagerContext,
|
|
102
103
|
initialValue: this._createContext(),
|
|
103
104
|
});
|
|
105
|
+
addThemingController(this, all);
|
|
104
106
|
createMutationController(this, {
|
|
105
107
|
callback: this._observerCallback,
|
|
106
108
|
filter: [IgcTileComponent.tagName],
|
|
@@ -152,10 +154,6 @@ let IgcTileManagerComponent = IgcTileManagerComponent_1 = class IgcTileManagerCo
|
|
|
152
154
|
};
|
|
153
155
|
IgcTileManagerComponent.tagName = 'igc-tile-manager';
|
|
154
156
|
IgcTileManagerComponent.styles = [styles, shared];
|
|
155
|
-
IgcTileManagerComponent.shadowRootOptions = {
|
|
156
|
-
mode: 'open',
|
|
157
|
-
slotAssignment: 'manual',
|
|
158
|
-
};
|
|
159
157
|
__decorate([
|
|
160
158
|
property({ attribute: 'resize-mode' })
|
|
161
159
|
], IgcTileManagerComponent.prototype, "resizeMode", null);
|
|
@@ -175,7 +173,7 @@ __decorate([
|
|
|
175
173
|
property()
|
|
176
174
|
], IgcTileManagerComponent.prototype, "gap", null);
|
|
177
175
|
IgcTileManagerComponent = IgcTileManagerComponent_1 = __decorate([
|
|
178
|
-
|
|
176
|
+
shadowOptions({ slotAssignment: 'manual' })
|
|
179
177
|
], IgcTileManagerComponent);
|
|
180
178
|
export default IgcTileManagerComponent;
|
|
181
179
|
//# sourceMappingURL=tile-manager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tile-man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;QAEF,OAAO,IAAI,CAAA;;UAEL,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;gBACT,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC;eAC/B,OAAO,CAAC,KAAK,CAAC;;;;KAIxB,CAAC;IACJ,CAAC;;AAxPsB,+BAAO,GAAG,kBAAkB,AAArB,CAAsB;AAC7B,8BAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,AAAnB,CAAoB;AAE1B,yCAAiB,GAAmB;IACzD,IAAI,EAAE,MAAM;IACZ,cAAc,EAAE,QAAQ;CACzB,AAHuC,CAGtC;AAqDF;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;yDAItC;AAaD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;uDAIpC;AAcD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;0DAMrD;AAWD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;6DAM3C;AAWD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;2DAMzC;AAYD;IADC,QAAQ,EAAE;kDAMV;AAnJkB,uBAAuB;IAD3C,MAAM,CAAC,GAAG,CAAC;GACS,uBAAuB,CA4P3C;eA5PoB,uBAAuB","sourcesContent":["import { ContextProvider } from '@lit/context';\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\nimport { type StyleInfo, styleMap } from 'lit/directives/style-map.js';\nimport { themes } from '../../theming/theming-decorator.js';\nimport {\n type TileManagerContext,\n tileManagerContext,\n} from '../common/context.js';\nimport {\n type MutationControllerParams,\n createMutationController,\n} from '../common/controllers/mutation-observer.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport { partMap } from '../common/part-map.js';\nimport { asNumber } from '../common/util.js';\nimport type { TileManagerDragMode, TileManagerResizeMode } from '../types.js';\nimport { createTilesState } from './position.js';\nimport { createSerializer } from './serializer.js';\nimport { all } from './themes/container.js';\nimport { styles as shared } from './themes/shared/tile-manager.common.css.js';\nimport { styles } from './themes/tile-manager.base.css.js';\nimport IgcTileComponent from './tile.js';\n\n/* blazorAdditionalDependency: IgcTileComponent */\n/**\n * The tile manager component enables the dynamic arrangement, resizing, and interaction of tiles.\n *\n * @element igc-tile-manager\n *\n * @slot - Default slot for the tile manager. Only `igc-tile` elements will be projected inside the CSS grid container.\n *\n * @csspart base - The tile manager CSS Grid container.\n *\n * @cssproperty --column-count - The number of columns for the tile manager. The `column-count` attribute sets this variable.\n * @cssproperty --min-col-width - The minimum size of the columns in the tile-manager. The `min-column-width` attribute sets this variable.\n * @cssproperty --min-row-height - The minimum size of the rows in the tile-manager. The `min-row-height` attribute sets this variable.\n * @cssproperty --grid-gap - The gap size of the underlying CSS grid container. The `gap` attributes sts this variable.\n *\n */\n@themes(all)\nexport default class IgcTileManagerComponent extends LitElement {\n public static readonly tagName = 'igc-tile-manager';\n public static override styles = [styles, shared];\n\n public static override shadowRootOptions: ShadowRootInit = {\n mode: 'open',\n slotAssignment: 'manual',\n };\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcTileManagerComponent, IgcTileComponent);\n }\n\n // #region Internal state\n\n private _internalStyles: StyleInfo = {};\n private _dragMode: TileManagerDragMode = 'none';\n private _resizeMode: TileManagerResizeMode = 'none';\n private _columnCount = 0;\n private _gap?: string;\n private _minColWidth?: string;\n private _minRowHeight?: string;\n\n private _serializer = createSerializer(this);\n private _tilesState = createTilesState(this);\n\n private _grid = createRef<HTMLElement>();\n\n // #endregion\n\n // #region Context helpers\n\n private _context = new ContextProvider(this, {\n context: tileManagerContext,\n initialValue: this._createContext(),\n });\n\n private _createContext(): TileManagerContext {\n return {\n instance: this,\n grid: this._grid,\n };\n }\n\n private _setManagerContext(): void {\n this._context.setValue(this._createContext(), true);\n }\n\n // #endregion\n\n // #region Properties and Attributes\n\n /**\n * Whether resize operations are enabled.\n *\n * @attr resize-mode\n * @default none\n */\n @property({ attribute: 'resize-mode' })\n public set resizeMode(value: TileManagerResizeMode) {\n this._resizeMode = value;\n this._setManagerContext();\n }\n\n public get resizeMode(): TileManagerResizeMode {\n return this._resizeMode;\n }\n\n /**\n * Whether drag and drop operations are enabled.\n *\n * @attr drag-mode\n * @default none\n */\n @property({ attribute: 'drag-mode' })\n public set dragMode(value: TileManagerDragMode) {\n this._dragMode = value;\n this._setManagerContext();\n }\n\n public get dragMode(): TileManagerDragMode {\n return this._dragMode;\n }\n\n /**\n * Sets the number of columns for the tile manager.\n * Setting value <= than zero will trigger a responsive layout.\n *\n * @attr column-count\n * @default 0\n */\n @property({ type: Number, attribute: 'column-count' })\n public set columnCount(value: number) {\n this._columnCount = Math.max(0, asNumber(value));\n Object.assign(this._internalStyles, {\n '--column-count': this._columnCount || undefined,\n });\n }\n\n public get columnCount(): number {\n return this._columnCount;\n }\n\n /**\n * Sets the minimum width for a column unit in the tile manager.\n * @attr min-column-width\n */\n @property({ attribute: 'min-column-width' })\n public set minColumnWidth(value: string | undefined) {\n this._minColWidth = value ?? undefined;\n Object.assign(this._internalStyles, {\n '--min-col-width': this._minColWidth,\n });\n }\n\n public get minColumnWidth(): string | undefined {\n return this._minColWidth;\n }\n\n /**\n * Sets the minimum height for a row unit in the tile manager.\n * @attr min-row-height\n */\n @property({ attribute: 'min-row-height' })\n public set minRowHeight(value: string | undefined) {\n this._minRowHeight = value ?? undefined;\n Object.assign(this._internalStyles, {\n '--min-row-height': this._minRowHeight,\n });\n }\n\n public get minRowHeight(): string | undefined {\n return this._minRowHeight;\n }\n\n /**\n * Sets the gap size between tiles in the tile manager.\n *\n * @attr gap\n */\n @property()\n public set gap(value: string | undefined) {\n this._gap = value ?? undefined;\n Object.assign(this._internalStyles, {\n '--grid-gap': this._gap,\n });\n }\n\n public get gap(): string | undefined {\n return this._gap;\n }\n\n /**\n * Gets the tiles sorted by their position in the layout.\n * @property\n */\n public get tiles() {\n return this._tilesState.tiles;\n }\n\n // #endregion\n\n // #region Internal API\n\n constructor() {\n super();\n\n createMutationController(this, {\n callback: this._observerCallback,\n filter: [IgcTileComponent.tagName],\n config: {\n childList: true,\n },\n });\n }\n\n protected override updated() {\n this._tilesState.adjustTileGridPosition();\n }\n\n protected override firstUpdated() {\n this._tilesState.assignPositions();\n this._tilesState.assignTiles();\n this._setManagerContext();\n }\n\n private _observerCallback({\n changes: { added, removed },\n }: MutationControllerParams<IgcTileComponent>) {\n const ownAdded = added.filter(\n ({ target }) => target.closest(this.tagName) === this\n );\n const ownRemoved = removed.filter(\n ({ target }) => target.closest(this.tagName) === this\n );\n\n for (const remove of ownRemoved) {\n this._tilesState.remove(remove.node);\n }\n\n for (const added of ownAdded) {\n this._tilesState.add(added.node);\n }\n\n this._tilesState.assignTiles();\n }\n\n // #endregion\n\n // #region Public API\n\n /**\n * Returns the properties of the current tile collections as a JSON payload.\n *\n * @remarks\n * The content of the tiles is not serialized or saved. Only tile properties\n * are serialized.\n */\n public saveLayout(): string {\n return this._serializer.saveAsJSON();\n }\n\n /**\n * Restores a previously serialized state produced by `saveLayout`.\n */\n public loadLayout(data: string): void {\n this._serializer.loadFromJSON(data);\n }\n\n // #endregion\n\n // #region Rendering\n\n protected override render() {\n const parts = {\n base: true,\n 'maximized-tile': this.tiles.some((tile) => tile.maximized),\n };\n\n return html`\n <div\n ${ref(this._grid)}\n style=${styleMap(this._internalStyles)}\n part=${partMap(parts)}\n >\n <slot></slot>\n </div>\n `;\n }\n\n // #endregion\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-tile-manager': IgcTileManagerComponent;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"tile-manager.js","sourceRoot":"","sources":["../../../src/components/tile-manager/tile-manager.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,U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IAAI,CAAC,KAAK,CAAC;gBACT,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC;eAC/B,OAAO,CAAC,KAAK,CAAC;;;;KAIxB,CAAC;IACJ,CAAC;;AArPsB,+BAAO,GAAG,kBAAkB,AAArB,CAAsB;AAC7B,8BAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,AAAnB,CAAoB;AAqDjD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;yDAItC;AAaD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;uDAIpC;AAcD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;0DAMrD;AAWD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;6DAM3C;AAWD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;2DAMzC;AAYD;IADC,QAAQ,EAAE;kDAMV;AA9IkB,uBAAuB;IAD3C,aAAa,CAAC,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC;GACvB,uBAAuB,CAyP3C;eAzPoB,uBAAuB","sourcesContent":["import { ContextProvider } from '@lit/context';\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\nimport { type StyleInfo, styleMap } from 'lit/directives/style-map.js';\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport {\n type TileManagerContext,\n tileManagerContext,\n} from '../common/context.js';\nimport {\n createMutationController,\n type MutationControllerParams,\n} from '../common/controllers/mutation-observer.js';\nimport { shadowOptions } from '../common/decorators/shadow-options.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport { partMap } from '../common/part-map.js';\nimport { asNumber } from '../common/util.js';\nimport type { TileManagerDragMode, TileManagerResizeMode } from '../types.js';\nimport { createTilesState } from './position.js';\nimport { createSerializer } from './serializer.js';\nimport { all } from './themes/container.js';\nimport { styles as shared } from './themes/shared/tile-manager.common.css.js';\nimport { styles } from './themes/tile-manager.base.css.js';\nimport IgcTileComponent from './tile.js';\n\n/* blazorAdditionalDependency: IgcTileComponent */\n/**\n * The tile manager component enables the dynamic arrangement, resizing, and interaction of tiles.\n *\n * @element igc-tile-manager\n *\n * @slot - Default slot for the tile manager. Only `igc-tile` elements will be projected inside the CSS grid container.\n *\n * @csspart base - The tile manager CSS Grid container.\n *\n * @cssproperty --column-count - The number of columns for the tile manager. The `column-count` attribute sets this variable.\n * @cssproperty --min-col-width - The minimum size of the columns in the tile-manager. The `min-column-width` attribute sets this variable.\n * @cssproperty --min-row-height - The minimum size of the rows in the tile-manager. The `min-row-height` attribute sets this variable.\n * @cssproperty --grid-gap - The gap size of the underlying CSS grid container. The `gap` attributes sts this variable.\n *\n */\n@shadowOptions({ slotAssignment: 'manual' })\nexport default class IgcTileManagerComponent extends LitElement {\n public static readonly tagName = 'igc-tile-manager';\n public static override styles = [styles, shared];\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcTileManagerComponent, IgcTileComponent);\n }\n\n // #region Internal state\n\n private _internalStyles: StyleInfo = {};\n private _dragMode: TileManagerDragMode = 'none';\n private _resizeMode: TileManagerResizeMode = 'none';\n private _columnCount = 0;\n private _gap?: string;\n private _minColWidth?: string;\n private _minRowHeight?: string;\n\n private _serializer = createSerializer(this);\n private _tilesState = createTilesState(this);\n\n private _grid = createRef<HTMLElement>();\n\n // #endregion\n\n // #region Context helpers\n\n private _context = new ContextProvider(this, {\n context: tileManagerContext,\n initialValue: this._createContext(),\n });\n\n private _createContext(): TileManagerContext {\n return {\n instance: this,\n grid: this._grid,\n };\n }\n\n private _setManagerContext(): void {\n this._context.setValue(this._createContext(), true);\n }\n\n // #endregion\n\n // #region Properties and Attributes\n\n /**\n * Whether resize operations are enabled.\n *\n * @attr resize-mode\n * @default none\n */\n @property({ attribute: 'resize-mode' })\n public set resizeMode(value: TileManagerResizeMode) {\n this._resizeMode = value;\n this._setManagerContext();\n }\n\n public get resizeMode(): TileManagerResizeMode {\n return this._resizeMode;\n }\n\n /**\n * Whether drag and drop operations are enabled.\n *\n * @attr drag-mode\n * @default none\n */\n @property({ attribute: 'drag-mode' })\n public set dragMode(value: TileManagerDragMode) {\n this._dragMode = value;\n this._setManagerContext();\n }\n\n public get dragMode(): TileManagerDragMode {\n return this._dragMode;\n }\n\n /**\n * Sets the number of columns for the tile manager.\n * Setting value <= than zero will trigger a responsive layout.\n *\n * @attr column-count\n * @default 0\n */\n @property({ type: Number, attribute: 'column-count' })\n public set columnCount(value: number) {\n this._columnCount = Math.max(0, asNumber(value));\n Object.assign(this._internalStyles, {\n '--column-count': this._columnCount || undefined,\n });\n }\n\n public get columnCount(): number {\n return this._columnCount;\n }\n\n /**\n * Sets the minimum width for a column unit in the tile manager.\n * @attr min-column-width\n */\n @property({ attribute: 'min-column-width' })\n public set minColumnWidth(value: string | undefined) {\n this._minColWidth = value ?? undefined;\n Object.assign(this._internalStyles, {\n '--min-col-width': this._minColWidth,\n });\n }\n\n public get minColumnWidth(): string | undefined {\n return this._minColWidth;\n }\n\n /**\n * Sets the minimum height for a row unit in the tile manager.\n * @attr min-row-height\n */\n @property({ attribute: 'min-row-height' })\n public set minRowHeight(value: string | undefined) {\n this._minRowHeight = value ?? undefined;\n Object.assign(this._internalStyles, {\n '--min-row-height': this._minRowHeight,\n });\n }\n\n public get minRowHeight(): string | undefined {\n return this._minRowHeight;\n }\n\n /**\n * Sets the gap size between tiles in the tile manager.\n *\n * @attr gap\n */\n @property()\n public set gap(value: string | undefined) {\n this._gap = value ?? undefined;\n Object.assign(this._internalStyles, {\n '--grid-gap': this._gap,\n });\n }\n\n public get gap(): string | undefined {\n return this._gap;\n }\n\n /**\n * Gets the tiles sorted by their position in the layout.\n * @property\n */\n public get tiles() {\n return this._tilesState.tiles;\n }\n\n // #endregion\n\n // #region Internal API\n\n constructor() {\n super();\n\n addThemingController(this, all);\n\n createMutationController(this, {\n callback: this._observerCallback,\n filter: [IgcTileComponent.tagName],\n config: {\n childList: true,\n },\n });\n }\n\n protected override updated() {\n this._tilesState.adjustTileGridPosition();\n }\n\n protected override firstUpdated() {\n this._tilesState.assignPositions();\n this._tilesState.assignTiles();\n this._setManagerContext();\n }\n\n private _observerCallback({\n changes: { added, removed },\n }: MutationControllerParams<IgcTileComponent>) {\n const ownAdded = added.filter(\n ({ target }) => target.closest(this.tagName) === this\n );\n const ownRemoved = removed.filter(\n ({ target }) => target.closest(this.tagName) === this\n );\n\n for (const remove of ownRemoved) {\n this._tilesState.remove(remove.node);\n }\n\n for (const added of ownAdded) {\n this._tilesState.add(added.node);\n }\n\n this._tilesState.assignTiles();\n }\n\n // #endregion\n\n // #region Public API\n\n /**\n * Returns the properties of the current tile collections as a JSON payload.\n *\n * @remarks\n * The content of the tiles is not serialized or saved. Only tile properties\n * are serialized.\n */\n public saveLayout(): string {\n return this._serializer.saveAsJSON();\n }\n\n /**\n * Restores a previously serialized state produced by `saveLayout`.\n */\n public loadLayout(data: string): void {\n this._serializer.loadFromJSON(data);\n }\n\n // #endregion\n\n // #region Rendering\n\n protected override render() {\n const parts = {\n base: true,\n 'maximized-tile': this.tiles.some((tile) => tile.maximized),\n };\n\n return html`\n <div\n ${ref(this._grid)}\n style=${styleMap(this._internalStyles)}\n part=${partMap(parts)}\n >\n <slot></slot>\n </div>\n `;\n }\n\n // #endregion\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-tile-manager': IgcTileManagerComponent;\n }\n}\n"]}
|
|
@@ -170,6 +170,7 @@ export default class IgcTileComponent extends IgcTileComponent_base {
|
|
|
170
170
|
*/
|
|
171
171
|
set position(value: number);
|
|
172
172
|
get position(): number;
|
|
173
|
+
constructor();
|
|
173
174
|
/** @internal */
|
|
174
175
|
connectedCallback(): void;
|
|
175
176
|
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
@@ -4,12 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
import { LitElement, html, nothing } from 'lit';
|
|
7
|
+
import { html, LitElement, nothing } from 'lit';
|
|
9
8
|
import { property, query, queryAssignedElements, state, } from 'lit/decorators.js';
|
|
10
9
|
import { createRef, ref } from 'lit/directives/ref.js';
|
|
11
10
|
import { startViewTransition } from '../../animations/player.js';
|
|
12
|
-
import {
|
|
11
|
+
import { addThemingController } from '../../theming/theming-controller.js';
|
|
13
12
|
import IgcIconButtonComponent from '../button/icon-button.js';
|
|
14
13
|
import { tileManagerContext, } from '../common/context.js';
|
|
15
14
|
import { createAsyncContext } from '../common/controllers/async-consumer.js';
|
|
@@ -27,54 +26,9 @@ import { styles as shared } from './themes/shared/tile/tile.common.css.js';
|
|
|
27
26
|
import { styles } from './themes/tile.base.css.js';
|
|
28
27
|
import { all } from './themes/tile.js';
|
|
29
28
|
import { createTileDragGhost, createTileGhost } from './tile-ghost-util.js';
|
|
30
|
-
|
|
31
|
-
constructor() {
|
|
32
|
-
super(...arguments);
|
|
33
|
-
this._dragController = addDragController(this, {
|
|
34
|
-
skip: this._skipDrag,
|
|
35
|
-
matchTarget: this._match,
|
|
36
|
-
ghost: this._createDragGhost,
|
|
37
|
-
start: this._handleDragStart,
|
|
38
|
-
over: this._handleDragOver,
|
|
39
|
-
end: this._handleDragEnd,
|
|
40
|
-
cancel: this._handleDragCancel,
|
|
41
|
-
});
|
|
42
|
-
this._fullscreenController = addFullscreenController(this, {
|
|
43
|
-
enter: this._emitFullScreenEvent,
|
|
44
|
-
exit: this._emitFullScreenEvent,
|
|
45
|
-
});
|
|
46
|
-
this._colSpan = 1;
|
|
47
|
-
this._rowSpan = 1;
|
|
48
|
-
this._colStart = null;
|
|
49
|
-
this._rowStart = null;
|
|
50
|
-
this._position = -1;
|
|
51
|
-
this._resizeState = createTileResizeState();
|
|
52
|
-
this._dragStack = createTileDragStack();
|
|
53
|
-
this._customAdorners = new Map(Object.entries({
|
|
54
|
-
side: false,
|
|
55
|
-
corner: false,
|
|
56
|
-
bottom: false,
|
|
57
|
-
}));
|
|
58
|
-
this._setDragConfiguration = ({ instance: { dragMode }, }) => {
|
|
59
|
-
this._dragController.set({
|
|
60
|
-
enabled: dragMode !== 'none',
|
|
61
|
-
trigger: dragMode === 'tile-header' ? () => this._headerRef.value : undefined,
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
this._context = createAsyncContext(this, tileManagerContext, this._setDragConfiguration);
|
|
65
|
-
this._headerRef = createRef();
|
|
66
|
-
this._maximized = false;
|
|
67
|
-
this._isDragging = false;
|
|
68
|
-
this._isResizing = false;
|
|
69
|
-
this.disableResize = false;
|
|
70
|
-
this.disableFullscreen = false;
|
|
71
|
-
this.disableMaximize = false;
|
|
72
|
-
this._createResizeGhost = () => {
|
|
73
|
-
return createTileGhost(this);
|
|
74
|
-
};
|
|
75
|
-
}
|
|
29
|
+
class IgcTileComponent extends EventEmitterMixin(LitElement) {
|
|
76
30
|
static register() {
|
|
77
|
-
registerComponent(
|
|
31
|
+
registerComponent(IgcTileComponent, IgcIconButtonComponent, IgcDividerComponent, IgcResizeContainerComponent);
|
|
78
32
|
}
|
|
79
33
|
get _tileManagerCtx() {
|
|
80
34
|
return this._context.value;
|
|
@@ -141,9 +95,55 @@ let IgcTileComponent = IgcTileComponent_1 = class IgcTileComponent extends Event
|
|
|
141
95
|
get position() {
|
|
142
96
|
return this._position;
|
|
143
97
|
}
|
|
98
|
+
constructor() {
|
|
99
|
+
super();
|
|
100
|
+
this._dragController = addDragController(this, {
|
|
101
|
+
skip: this._skipDrag,
|
|
102
|
+
matchTarget: this._match,
|
|
103
|
+
ghost: this._createDragGhost,
|
|
104
|
+
start: this._handleDragStart,
|
|
105
|
+
over: this._handleDragOver,
|
|
106
|
+
end: this._handleDragEnd,
|
|
107
|
+
cancel: this._handleDragCancel,
|
|
108
|
+
});
|
|
109
|
+
this._fullscreenController = addFullscreenController(this, {
|
|
110
|
+
enter: this._emitFullScreenEvent,
|
|
111
|
+
exit: this._emitFullScreenEvent,
|
|
112
|
+
});
|
|
113
|
+
this._colSpan = 1;
|
|
114
|
+
this._rowSpan = 1;
|
|
115
|
+
this._colStart = null;
|
|
116
|
+
this._rowStart = null;
|
|
117
|
+
this._position = -1;
|
|
118
|
+
this._resizeState = createTileResizeState();
|
|
119
|
+
this._dragStack = createTileDragStack();
|
|
120
|
+
this._customAdorners = new Map(Object.entries({
|
|
121
|
+
side: false,
|
|
122
|
+
corner: false,
|
|
123
|
+
bottom: false,
|
|
124
|
+
}));
|
|
125
|
+
this._setDragConfiguration = ({ instance: { dragMode }, }) => {
|
|
126
|
+
this._dragController.set({
|
|
127
|
+
enabled: dragMode !== 'none',
|
|
128
|
+
trigger: dragMode === 'tile-header' ? () => this._headerRef.value : undefined,
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
this._context = createAsyncContext(this, tileManagerContext, this._setDragConfiguration);
|
|
132
|
+
this._headerRef = createRef();
|
|
133
|
+
this._maximized = false;
|
|
134
|
+
this._isDragging = false;
|
|
135
|
+
this._isResizing = false;
|
|
136
|
+
this.disableResize = false;
|
|
137
|
+
this.disableFullscreen = false;
|
|
138
|
+
this.disableMaximize = false;
|
|
139
|
+
this._createResizeGhost = () => {
|
|
140
|
+
return createTileGhost(this);
|
|
141
|
+
};
|
|
142
|
+
addThemingController(this, all);
|
|
143
|
+
}
|
|
144
144
|
connectedCallback() {
|
|
145
145
|
super.connectedCallback();
|
|
146
|
-
this.id = this.id || `tile-${
|
|
146
|
+
this.id = this.id || `tile-${IgcTileComponent.increment()}`;
|
|
147
147
|
this.style.viewTransitionName =
|
|
148
148
|
this.style.viewTransitionName || `tile-transition-${this.id}`;
|
|
149
149
|
}
|
|
@@ -224,7 +224,7 @@ let IgcTileComponent = IgcTileComponent_1 = class IgcTileComponent extends Event
|
|
|
224
224
|
return Boolean(findElementFromEventPath((e) => e.matches('[part*=trigger]') || e.matches('#tile-actions'), event));
|
|
225
225
|
}
|
|
226
226
|
_match(element) {
|
|
227
|
-
return element !== this &&
|
|
227
|
+
return element !== this && IgcTileComponent.tagName === element.localName;
|
|
228
228
|
}
|
|
229
229
|
_createDragGhost() {
|
|
230
230
|
return createTileDragGhost(this);
|
|
@@ -417,10 +417,11 @@ let IgcTileComponent = IgcTileComponent_1 = class IgcTileComponent extends Event
|
|
|
417
417
|
</igc-resize>
|
|
418
418
|
`;
|
|
419
419
|
}
|
|
420
|
-
}
|
|
420
|
+
}
|
|
421
421
|
IgcTileComponent.tagName = 'igc-tile';
|
|
422
422
|
IgcTileComponent.styles = [styles, shared];
|
|
423
423
|
IgcTileComponent.increment = createCounter();
|
|
424
|
+
export default IgcTileComponent;
|
|
424
425
|
__decorate([
|
|
425
426
|
queryAssignedElements({ slot: 'title' })
|
|
426
427
|
], IgcTileComponent.prototype, "_titleElements", void 0);
|
|
@@ -469,8 +470,4 @@ __decorate([
|
|
|
469
470
|
__decorate([
|
|
470
471
|
property({ type: Number })
|
|
471
472
|
], IgcTileComponent.prototype, "position", null);
|
|
472
|
-
IgcTileComponent = IgcTileComponent_1 = __decorate([
|
|
473
|
-
themes(all)
|
|
474
|
-
], IgcTileComponent);
|
|
475
|
-
export default IgcTileComponent;
|
|
476
473
|
//# sourceMappingURL=tile.js.map
|