igniteui-webcomponents 5.4.1 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/components/checkbox/checkbox-base.d.ts +0 -2
  3. package/components/checkbox/checkbox-base.js.map +1 -1
  4. package/components/common/controllers/resize-observer.d.ts +37 -0
  5. package/components/common/controllers/resize-observer.js +37 -0
  6. package/components/common/controllers/resize-observer.js.map +1 -0
  7. package/components/common/definitions/defineAllComponents.js +0 -2
  8. package/components/common/definitions/defineAllComponents.js.map +1 -1
  9. package/components/common/util.d.ts +1 -17
  10. package/components/common/util.js +10 -10
  11. package/components/common/util.js.map +1 -1
  12. package/components/popover/popover.js +1 -1
  13. package/components/popover/popover.js.map +1 -1
  14. package/components/popover/themes/light/popover.base.css.js +1 -1
  15. package/components/popover/themes/light/popover.base.css.js.map +1 -1
  16. package/components/radio/radio.d.ts +0 -2
  17. package/components/radio/radio.js.map +1 -1
  18. package/components/slider/range-slider.d.ts +0 -2
  19. package/components/slider/range-slider.js.map +1 -1
  20. package/components/stepper/step.d.ts +1 -1
  21. package/components/stepper/step.js +3 -2
  22. package/components/stepper/step.js.map +1 -1
  23. package/components/stepper/stepper.common.d.ts +0 -4
  24. package/components/stepper/stepper.common.js.map +1 -1
  25. package/components/stepper/stepper.d.ts +2 -2
  26. package/components/stepper/stepper.js +2 -9
  27. package/components/stepper/stepper.js.map +1 -1
  28. package/components/tabs/tab-dom.d.ts +66 -0
  29. package/components/tabs/tab-dom.js +93 -0
  30. package/components/tabs/tab-dom.js.map +1 -0
  31. package/components/tabs/tab.d.ts +14 -15
  32. package/components/tabs/tab.js +27 -22
  33. package/components/tabs/tab.js.map +1 -1
  34. package/components/tabs/tabs.d.ts +42 -49
  35. package/components/tabs/tabs.js +178 -231
  36. package/components/tabs/tabs.js.map +1 -1
  37. package/components/tabs/themes/shared/tab/tab.bootstrap.css.js +1 -1
  38. package/components/tabs/themes/shared/tab/tab.bootstrap.css.js.map +1 -1
  39. package/components/tabs/themes/shared/tab/tab.common.css.js +1 -1
  40. package/components/tabs/themes/shared/tab/tab.common.css.js.map +1 -1
  41. package/components/tabs/themes/shared/tab/tab.fluent.css.js +1 -1
  42. package/components/tabs/themes/shared/tab/tab.fluent.css.js.map +1 -1
  43. package/components/tabs/themes/shared/tab/tab.indigo.css.js +1 -1
  44. package/components/tabs/themes/shared/tab/tab.indigo.css.js.map +1 -1
  45. package/components/tabs/themes/shared/tab/tab.material.css.js +3 -0
  46. package/components/tabs/themes/shared/tab/tab.material.css.js.map +1 -0
  47. package/components/tabs/themes/shared/tabs/tabs.bootstrap.css.js +1 -1
  48. package/components/tabs/themes/shared/tabs/tabs.bootstrap.css.js.map +1 -1
  49. package/components/tabs/themes/shared/tabs/tabs.common.css.js +1 -1
  50. package/components/tabs/themes/shared/tabs/tabs.common.css.js.map +1 -1
  51. package/components/tabs/themes/shared/tabs/tabs.fluent.css.js +1 -1
  52. package/components/tabs/themes/shared/tabs/tabs.fluent.css.js.map +1 -1
  53. package/components/tabs/themes/shared/tabs/tabs.indigo.css.js +1 -1
  54. package/components/tabs/themes/shared/tabs/tabs.indigo.css.js.map +1 -1
  55. package/components/tabs/themes/shared/tabs/tabs.material.css.d.ts +1 -0
  56. package/components/tabs/themes/shared/tabs/tabs.material.css.js +3 -0
  57. package/components/tabs/themes/shared/tabs/tabs.material.css.js.map +1 -0
  58. package/components/tabs/themes/tab-themes.js +7 -0
  59. package/components/tabs/themes/tab-themes.js.map +1 -1
  60. package/components/tabs/themes/tab.base.css.js +1 -1
  61. package/components/tabs/themes/tab.base.css.js.map +1 -1
  62. package/components/tabs/themes/tabs-themes.js +3 -2
  63. package/components/tabs/themes/tabs-themes.js.map +1 -1
  64. package/components/tabs/themes/tabs.base.css.js +1 -1
  65. package/components/tabs/themes/tabs.base.css.js.map +1 -1
  66. package/components/tabs/themes/tabs.common.css.d.ts +1 -0
  67. package/components/tabs/themes/tabs.common.css.js +3 -0
  68. package/components/tabs/themes/tabs.common.css.js.map +1 -0
  69. package/components/textarea/textarea.d.ts +2 -2
  70. package/components/textarea/textarea.js.map +1 -1
  71. package/components/types.d.ts +1 -1
  72. package/components/types.js.map +1 -1
  73. package/custom-elements.json +390 -360
  74. package/igniteui-webcomponents.css-data.json +1 -1
  75. package/igniteui-webcomponents.html-data.json +1 -1
  76. package/index.d.ts +0 -5
  77. package/index.js +0 -1
  78. package/index.js.map +1 -1
  79. package/package.json +4 -3
  80. package/web-types.json +2 -2
  81. package/components/tabs/tab-panel.d.ts +0 -21
  82. package/components/tabs/tab-panel.js +0 -26
  83. package/components/tabs/tab-panel.js.map +0 -1
  84. package/components/tabs/themes/tab-panel.base.css.js +0 -3
  85. package/components/tabs/themes/tab-panel.base.css.js.map +0 -1
  86. /package/components/tabs/themes/{tab-panel.base.css.d.ts → shared/tab/tab.material.css.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"radio.js","sourceRoot":"","sources":["../../../src/components/radio/radio.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAuB,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EACL,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,OAAO,EACP,MAAM,GACP,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mC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,EAAE;8CAMV;AAYD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAQ3B;AAWM;IADN,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;wDACL;AAlHjC,iBAAiB;IADrC,MAAM,CAAC,GAAG,CAAC;GACS,iBAAiB,CAuUrC;eAvUoB,iBAAiB","sourcesContent":["import { LitElement, type TemplateResult, html } from 'lit';\nimport { property, query, queryAssignedNodes, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\n\nimport { themes } from '../../theming/theming-decorator.js';\nimport { addKeyboardFocusRing } from '../common/controllers/focus-ring.js';\nimport {\n addKeybindings,\n arrowDown,\n arrowLeft,\n arrowRight,\n arrowUp,\n tabKey,\n} from '../common/controllers/key-bindings.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { FormAssociatedCheckboxRequiredMixin } from '../common/mixins/forms/associated-required.js';\nimport {\n type FormValue,\n createFormValueState,\n defaultBooleanTransformers,\n} from '../common/mixins/forms/form-value.js';\nimport {\n createCounter,\n isDefined,\n isEmpty,\n isLTR,\n last,\n noop,\n partNameMap,\n wrap,\n} from '../common/util.js';\nimport type { ToggleLabelPosition } from '../types.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport { styles } from './themes/radio.base.css.js';\nimport { styles as shared } from './themes/shared/radio.common.css.js';\nimport { all } from './themes/themes.js';\nimport { getGroup } from './utils.js';\nimport { radioValidators } from './validators.js';\n\nexport interface IgcRadioChangeEventArgs {\n checked: boolean;\n value?: string;\n}\n\n/** @deprecated since 5.4.0. Use IgcRadioChangeEventArgs instead */\nexport type RadioChangeEventArgs = IgcRadioChangeEventArgs;\n\nexport interface IgcRadioComponentEventMap {\n igcChange: CustomEvent<IgcRadioChangeEventArgs>;\n // For analyzer meta only:\n /* skipWCPrefix */\n focus: FocusEvent;\n /* skipWCPrefix */\n blur: FocusEvent;\n}\n\n/**\n * @element igc-radio\n *\n * @slot - The radio label.\n * @slot helper-text - Renders content below the input.\n * @slot value-missing - Renders content when the required 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 igcChange - Emitted when the control's checked state changes.\n *\n * @csspart base - The radio control base wrapper.\n * @csspart control - The radio input control.\n * @csspart label - The radio control label.\n */\n@themes(all)\nexport default class IgcRadioComponent extends FormAssociatedCheckboxRequiredMixin(\n EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>(\n LitElement\n )\n) {\n public static readonly tagName = 'igc-radio';\n protected static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcRadioComponent, IgcValidationContainerComponent);\n }\n\n private static readonly increment = createCounter();\n\n protected override get __validators() {\n return radioValidators;\n }\n\n protected override _formValue: FormValue<boolean>;\n\n private inputId = `radio-${IgcRadioComponent.increment()}`;\n private labelId = `radio-label-${this.inputId}`;\n private _kbFocus = addKeyboardFocusRing(this);\n\n protected _value!: string;\n\n @query('input', true)\n protected input!: HTMLInputElement;\n\n @queryAssignedNodes({ flatten: true })\n protected label!: Array<Node>;\n\n @state()\n protected hideLabel = false;\n\n @state()\n private _tabIndex = 0;\n\n /** Returns all radio elements from the group, that is having the same name property. */\n private get _radios() {\n return getGroup(this).radios;\n }\n\n /** All sibling radio elements of the one invoking the getter. */\n private get _siblings() {\n return getGroup(this).siblings;\n }\n\n /** All non-disabled radio elements from the group. */\n private get _active() {\n return getGroup(this).active;\n }\n\n /** All checked radio elements from the group. */\n private get _checkedRadios() {\n return getGroup(this).checked;\n }\n\n @property({ type: Boolean, reflect: true })\n public override set required(value: boolean) {\n super.required = value;\n\n if (this.hasUpdated) {\n for (const radio of this._siblings) {\n radio._validate();\n }\n }\n }\n\n public override get required(): boolean {\n return this._required;\n }\n\n /**\n * The value attribute of the control.\n * @attr\n */\n @property()\n public set value(value: string) {\n this._value = value;\n if (this.checked) {\n this._setFormValue(this._value || 'on');\n }\n }\n\n public get value(): string {\n return this._value;\n }\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail.checked\", false) */\n /**\n * The checked state of the control.\n * @attr\n */\n @property({ type: Boolean })\n public set checked(value: boolean) {\n this._formValue.setValueAndFormState(value);\n this._tabIndex = this.checked ? 0 : -1;\n this._validate();\n if (this.hasUpdated && this.checked) {\n this._updateCheckedState();\n }\n }\n\n public get checked(): boolean {\n return this._formValue.value;\n }\n\n /**\n * The label position of the radio control.\n * @attr label-position\n */\n @property({ reflect: true, attribute: 'label-position' })\n public labelPosition: ToggleLabelPosition = 'after';\n\n constructor() {\n super();\n\n this._formValue = createFormValueState(this, {\n initialValue: false,\n transformers: defaultBooleanTransformers,\n });\n\n addKeybindings(this, {\n skip: () => this.disabled,\n bindingDefaults: { preventDefault: true, triggers: ['keydownRepeat'] },\n })\n .set(tabKey, noop, { preventDefault: false })\n .set(arrowLeft, () => this.navigate(isLTR(this) ? -1 : 1))\n .set(arrowRight, () => this.navigate(isLTR(this) ? 1 : -1))\n .set(arrowUp, () => this.navigate(-1))\n .set(arrowDown, () => this.navigate(1));\n }\n\n protected override createRenderRoot() {\n const root = super.createRenderRoot();\n this.hideLabel = isEmpty(this.label);\n\n root.addEventListener('slotchange', () => {\n this.hideLabel = isEmpty(this.label);\n });\n return root;\n }\n\n protected override async firstUpdated() {\n await this.updateComplete;\n\n if (this.checked && this === last(this._checkedRadios)) {\n for (const radio of this._siblings) {\n radio.checked = false;\n radio.defaultChecked = false;\n }\n } else {\n this._updateValidity();\n }\n }\n\n protected override _setDefaultValue(current: string | null): void {\n this._formValue.defaultValue = isDefined(current);\n for (const radio of this._siblings) {\n radio.defaultChecked = false;\n }\n }\n\n /** Simulates a click on the radio control. */\n public override click() {\n this.input.click();\n }\n\n /* alternateName: focusComponent */\n /** Sets focus on the radio control. */\n public override focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /* alternateName: blurComponent */\n /** Removes focus from the radio control. */\n public override blur() {\n this.input.blur();\n }\n\n private _checkValidity() {\n return super.checkValidity();\n }\n\n private _reportValidity() {\n return super.reportValidity();\n }\n\n /** Checks for validity of the control and emits the invalid event if it invalid. */\n public override checkValidity(): boolean {\n for (const radio of this._siblings) {\n radio._checkValidity();\n }\n\n return this._checkValidity();\n }\n\n /** Checks for validity of the control and shows the browser message if it invalid. */\n public override reportValidity(): boolean {\n for (const radio of this._siblings) {\n radio._reportValidity();\n }\n\n return this._reportValidity();\n }\n\n /**\n * Sets a custom validation message for the control.\n * As long as `message` is not empty, the control is considered invalid.\n */\n public override setCustomValidity(message: string): void {\n for (const radio of this._radios) {\n radio._validate(message);\n }\n }\n\n private _updateCheckedState() {\n for (const radio of this._siblings) {\n radio.checked = false;\n }\n }\n\n protected override formResetCallback() {\n super.formResetCallback();\n this._resetTabIndexes();\n }\n\n /** Called after a form reset callback to restore default keyboard navigation. */\n private _resetTabIndexes() {\n const radios = this._radios;\n\n if (isEmpty(this._checkedRadios)) {\n for (const radio of radios) {\n radio._tabIndex = 0;\n }\n } else {\n for (const radio of radios) {\n radio._tabIndex = radio.checked ? 0 : -1;\n }\n }\n }\n\n protected handleClick(event: PointerEvent) {\n event.stopPropagation();\n\n if (this.checked) {\n return;\n }\n\n this.checked = true;\n this.input.focus();\n this.emitEvent('igcChange', {\n detail: {\n checked: this.checked,\n value: this.value,\n },\n });\n }\n\n protected handleBlur() {\n this._kbFocus.reset();\n }\n\n protected navigate(idx: number) {\n const active = this._active;\n const next = wrap(0, active.length - 1, active.indexOf(this) + idx);\n const radio = active[next];\n\n radio.focus();\n radio.checked = true;\n radio.emitEvent('igcChange', {\n detail: { checked: radio.checked, value: radio.value },\n });\n }\n\n protected renderValidatorContainer(): TemplateResult {\n return IgcValidationContainerComponent.create(this);\n }\n\n protected override render() {\n const labelledBy = this.getAttribute('aria-labelledby');\n const checked = this.checked;\n\n return html`\n <label\n part=${partNameMap({\n base: true,\n checked,\n focused: this._kbFocus.focused,\n })}\n for=${this.inputId}\n @pointerdown=${this._kbFocus.reset}\n >\n <input\n id=${this.inputId}\n type=\"radio\"\n name=${ifDefined(this.name)}\n value=${ifDefined(this.value)}\n .required=${this.required}\n .disabled=${this.disabled}\n .checked=${live(checked)}\n tabindex=${this._tabIndex}\n aria-checked=${checked ? 'true' : 'false'}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n aria-labelledby=${labelledBy ? labelledBy : this.labelId}\n @click=${this.handleClick}\n @blur=${this.handleBlur}\n />\n <span part=${partNameMap({ control: true, checked })}>\n <span\n .hidden=${this.disabled}\n part=${partNameMap({ ripple: true, checked })}\n ></span>\n </span>\n <span\n .hidden=${this.hideLabel}\n part=${partNameMap({ label: true, checked })}\n id=${this.labelId}\n >\n <slot></slot>\n </span>\n </label>\n ${this.renderValidatorContainer()}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-radio': IgcRadioComponent;\n }\n}\n"]}
1
+ {"version":3,"file":"radio.js","sourceRoot":"","sources":["../../../src/components/radio/radio.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAuB,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EACL,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,OAAO,EACP,MAAM,GACP,MAAM,uCAAuC,CAAC;AAC/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,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAS1C;AAWD;IADC,QAAQ,EAAE;8CAMV;AAYD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAQ3B;AAWM;IADN,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;wDACL;AAlHjC,iBAAiB;IADrC,MAAM,CAAC,GAAG,CAAC;GACS,iBAAiB,CAuUrC;eAvUoB,iBAAiB","sourcesContent":["import { LitElement, type TemplateResult, html } from 'lit';\nimport { property, query, queryAssignedNodes, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\n\nimport { themes } from '../../theming/theming-decorator.js';\nimport { addKeyboardFocusRing } from '../common/controllers/focus-ring.js';\nimport {\n addKeybindings,\n arrowDown,\n arrowLeft,\n arrowRight,\n arrowUp,\n tabKey,\n} from '../common/controllers/key-bindings.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { FormAssociatedCheckboxRequiredMixin } from '../common/mixins/forms/associated-required.js';\nimport {\n type FormValue,\n createFormValueState,\n defaultBooleanTransformers,\n} from '../common/mixins/forms/form-value.js';\nimport {\n createCounter,\n isDefined,\n isEmpty,\n isLTR,\n last,\n noop,\n partNameMap,\n wrap,\n} from '../common/util.js';\nimport type { ToggleLabelPosition } from '../types.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport { styles } from './themes/radio.base.css.js';\nimport { styles as shared } from './themes/shared/radio.common.css.js';\nimport { all } from './themes/themes.js';\nimport { getGroup } from './utils.js';\nimport { radioValidators } from './validators.js';\n\nexport interface IgcRadioChangeEventArgs {\n checked: boolean;\n value?: string;\n}\n\nexport interface IgcRadioComponentEventMap {\n igcChange: CustomEvent<IgcRadioChangeEventArgs>;\n // For analyzer meta only:\n /* skipWCPrefix */\n focus: FocusEvent;\n /* skipWCPrefix */\n blur: FocusEvent;\n}\n\n/**\n * @element igc-radio\n *\n * @slot - The radio label.\n * @slot helper-text - Renders content below the input.\n * @slot value-missing - Renders content when the required 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 igcChange - Emitted when the control's checked state changes.\n *\n * @csspart base - The radio control base wrapper.\n * @csspart control - The radio input control.\n * @csspart label - The radio control label.\n */\n@themes(all)\nexport default class IgcRadioComponent extends FormAssociatedCheckboxRequiredMixin(\n EventEmitterMixin<IgcRadioComponentEventMap, Constructor<LitElement>>(\n LitElement\n )\n) {\n public static readonly tagName = 'igc-radio';\n protected static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcRadioComponent, IgcValidationContainerComponent);\n }\n\n private static readonly increment = createCounter();\n\n protected override get __validators() {\n return radioValidators;\n }\n\n protected override _formValue: FormValue<boolean>;\n\n private inputId = `radio-${IgcRadioComponent.increment()}`;\n private labelId = `radio-label-${this.inputId}`;\n private _kbFocus = addKeyboardFocusRing(this);\n\n protected _value!: string;\n\n @query('input', true)\n protected input!: HTMLInputElement;\n\n @queryAssignedNodes({ flatten: true })\n protected label!: Array<Node>;\n\n @state()\n protected hideLabel = false;\n\n @state()\n private _tabIndex = 0;\n\n /** Returns all radio elements from the group, that is having the same name property. */\n private get _radios() {\n return getGroup(this).radios;\n }\n\n /** All sibling radio elements of the one invoking the getter. */\n private get _siblings() {\n return getGroup(this).siblings;\n }\n\n /** All non-disabled radio elements from the group. */\n private get _active() {\n return getGroup(this).active;\n }\n\n /** All checked radio elements from the group. */\n private get _checkedRadios() {\n return getGroup(this).checked;\n }\n\n @property({ type: Boolean, reflect: true })\n public override set required(value: boolean) {\n super.required = value;\n\n if (this.hasUpdated) {\n for (const radio of this._siblings) {\n radio._validate();\n }\n }\n }\n\n public override get required(): boolean {\n return this._required;\n }\n\n /**\n * The value attribute of the control.\n * @attr\n */\n @property()\n public set value(value: string) {\n this._value = value;\n if (this.checked) {\n this._setFormValue(this._value || 'on');\n }\n }\n\n public get value(): string {\n return this._value;\n }\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail.checked\", false) */\n /**\n * The checked state of the control.\n * @attr\n */\n @property({ type: Boolean })\n public set checked(value: boolean) {\n this._formValue.setValueAndFormState(value);\n this._tabIndex = this.checked ? 0 : -1;\n this._validate();\n if (this.hasUpdated && this.checked) {\n this._updateCheckedState();\n }\n }\n\n public get checked(): boolean {\n return this._formValue.value;\n }\n\n /**\n * The label position of the radio control.\n * @attr label-position\n */\n @property({ reflect: true, attribute: 'label-position' })\n public labelPosition: ToggleLabelPosition = 'after';\n\n constructor() {\n super();\n\n this._formValue = createFormValueState(this, {\n initialValue: false,\n transformers: defaultBooleanTransformers,\n });\n\n addKeybindings(this, {\n skip: () => this.disabled,\n bindingDefaults: { preventDefault: true, triggers: ['keydownRepeat'] },\n })\n .set(tabKey, noop, { preventDefault: false })\n .set(arrowLeft, () => this.navigate(isLTR(this) ? -1 : 1))\n .set(arrowRight, () => this.navigate(isLTR(this) ? 1 : -1))\n .set(arrowUp, () => this.navigate(-1))\n .set(arrowDown, () => this.navigate(1));\n }\n\n protected override createRenderRoot() {\n const root = super.createRenderRoot();\n this.hideLabel = isEmpty(this.label);\n\n root.addEventListener('slotchange', () => {\n this.hideLabel = isEmpty(this.label);\n });\n return root;\n }\n\n protected override async firstUpdated() {\n await this.updateComplete;\n\n if (this.checked && this === last(this._checkedRadios)) {\n for (const radio of this._siblings) {\n radio.checked = false;\n radio.defaultChecked = false;\n }\n } else {\n this._updateValidity();\n }\n }\n\n protected override _setDefaultValue(current: string | null): void {\n this._formValue.defaultValue = isDefined(current);\n for (const radio of this._siblings) {\n radio.defaultChecked = false;\n }\n }\n\n /** Simulates a click on the radio control. */\n public override click() {\n this.input.click();\n }\n\n /* alternateName: focusComponent */\n /** Sets focus on the radio control. */\n public override focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /* alternateName: blurComponent */\n /** Removes focus from the radio control. */\n public override blur() {\n this.input.blur();\n }\n\n private _checkValidity() {\n return super.checkValidity();\n }\n\n private _reportValidity() {\n return super.reportValidity();\n }\n\n /** Checks for validity of the control and emits the invalid event if it invalid. */\n public override checkValidity(): boolean {\n for (const radio of this._siblings) {\n radio._checkValidity();\n }\n\n return this._checkValidity();\n }\n\n /** Checks for validity of the control and shows the browser message if it invalid. */\n public override reportValidity(): boolean {\n for (const radio of this._siblings) {\n radio._reportValidity();\n }\n\n return this._reportValidity();\n }\n\n /**\n * Sets a custom validation message for the control.\n * As long as `message` is not empty, the control is considered invalid.\n */\n public override setCustomValidity(message: string): void {\n for (const radio of this._radios) {\n radio._validate(message);\n }\n }\n\n private _updateCheckedState() {\n for (const radio of this._siblings) {\n radio.checked = false;\n }\n }\n\n protected override formResetCallback() {\n super.formResetCallback();\n this._resetTabIndexes();\n }\n\n /** Called after a form reset callback to restore default keyboard navigation. */\n private _resetTabIndexes() {\n const radios = this._radios;\n\n if (isEmpty(this._checkedRadios)) {\n for (const radio of radios) {\n radio._tabIndex = 0;\n }\n } else {\n for (const radio of radios) {\n radio._tabIndex = radio.checked ? 0 : -1;\n }\n }\n }\n\n protected handleClick(event: PointerEvent) {\n event.stopPropagation();\n\n if (this.checked) {\n return;\n }\n\n this.checked = true;\n this.input.focus();\n this.emitEvent('igcChange', {\n detail: {\n checked: this.checked,\n value: this.value,\n },\n });\n }\n\n protected handleBlur() {\n this._kbFocus.reset();\n }\n\n protected navigate(idx: number) {\n const active = this._active;\n const next = wrap(0, active.length - 1, active.indexOf(this) + idx);\n const radio = active[next];\n\n radio.focus();\n radio.checked = true;\n radio.emitEvent('igcChange', {\n detail: { checked: radio.checked, value: radio.value },\n });\n }\n\n protected renderValidatorContainer(): TemplateResult {\n return IgcValidationContainerComponent.create(this);\n }\n\n protected override render() {\n const labelledBy = this.getAttribute('aria-labelledby');\n const checked = this.checked;\n\n return html`\n <label\n part=${partNameMap({\n base: true,\n checked,\n focused: this._kbFocus.focused,\n })}\n for=${this.inputId}\n @pointerdown=${this._kbFocus.reset}\n >\n <input\n id=${this.inputId}\n type=\"radio\"\n name=${ifDefined(this.name)}\n value=${ifDefined(this.value)}\n .required=${this.required}\n .disabled=${this.disabled}\n .checked=${live(checked)}\n tabindex=${this._tabIndex}\n aria-checked=${checked ? 'true' : 'false'}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n aria-labelledby=${labelledBy ? labelledBy : this.labelId}\n @click=${this.handleClick}\n @blur=${this.handleBlur}\n />\n <span part=${partNameMap({ control: true, checked })}>\n <span\n .hidden=${this.disabled}\n part=${partNameMap({ ripple: true, checked })}\n ></span>\n </span>\n <span\n .hidden=${this.hideLabel}\n part=${partNameMap({ label: true, checked })}\n id=${this.labelId}\n >\n <slot></slot>\n </span>\n </label>\n ${this.renderValidatorContainer()}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-radio': IgcRadioComponent;\n }\n}\n"]}
@@ -4,8 +4,6 @@ export interface IgcRangeSliderValueEventArgs {
4
4
  lower: number;
5
5
  upper: number;
6
6
  }
7
- /** @deprecated since 5.4.0. Use IgcRangeSliderValueEventArgs instead */
8
- export type IgcRangeSliderValue = IgcRangeSliderValueEventArgs;
9
7
  export interface IgcRangeSliderComponentEventMap {
10
8
  /**
11
9
  * Emitted when a value is changed via thumb drag or keyboard interaction.
@@ -1 +1 @@
1
- {"version":3,"file":"range-slider.js","sourceRoot":"","sources":["../../../src/components/slider/range-slider.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,QAA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AC,WAAW;YAChB,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,IAAI,CAAA;4CAC8B,QAAQ,CAAC,aAAa,CAAC;;kBAEjD,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;;;WAGpE;KACN,CAAC;IACJ,CAAC;IAEkB,YAAY;QAC7B,OAAO,IAAI,CAAA,GAAG,IAAI,CAAC,WAAW,CAC5B,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,eAAe,EACpB,WAAW,CACZ;MACC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,EAAE,CAAC;IACpE,CAAC;;AArNsB,+BAAO,GAAG,kBAAkB,AAArB,CAAsB;eAJjC,uBAAuB;AAYlC;IADP,KAAK,CAAC,YAAY,CAAC;0DACY;AAGxB;IADP,KAAK,CAAC,UAAU,CAAC;wDACY;AAU9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDAG1B;AAWD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDAG1B;AAWM;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;gEACb;AAOzB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;gEACb","sourcesContent":["import { html, nothing } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { styleMap } from 'lit/directives/style-map.js';\n\nimport { registerComponent } from '../common/definitions/register.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { asNumber, asPercent } from '../common/util.js';\nimport { IgcSliderBaseComponent } from './slider-base.js';\nimport IgcSliderLabelComponent from './slider-label.js';\n\n/* blazorSuppress */\nexport interface IgcRangeSliderValueEventArgs {\n lower: number;\n upper: number;\n}\n\n/** @deprecated since 5.4.0. Use IgcRangeSliderValueEventArgs instead */\nexport type IgcRangeSliderValue = IgcRangeSliderValueEventArgs;\n\nexport interface IgcRangeSliderComponentEventMap {\n /**\n * Emitted when a value is changed via thumb drag or keyboard interaction.\n */\n igcInput: CustomEvent<IgcRangeSliderValueEventArgs>;\n /**\n * Emitted when a value change is committed on a thumb drag end or keyboard interaction.\n */\n igcChange: CustomEvent<IgcRangeSliderValueEventArgs>;\n}\n\n/**\n * A range slider component used to select two numeric values within a range.\n *\n * @element igc-range-slider\n *\n * @fires igcInput - Emitted when a value is changed via thumb drag or keyboard interaction.\n * @fires igcChange - Emitted when a value change is committed on a thumb drag end or keyboard interaction.\n *\n * @csspart base - The base wrapper of the slider.\n * @csspart ticks - The ticks container.\n * @csspart tick-group - The tick group container.\n * @csspart tick - The tick element.\n * @csspart tick-label - The tick label element.\n * @csspart tick-label-inner - The inner element of the tick label.\n * @csspart thumbs - The thumbs container.\n * @csspart thumb - The thumb element.\n * @csspart thumb-label - The thumb tooltip label container.\n * @csspart thumb-label-inner - The thumb tooltip label inner element.\n * @csspart track - The track container.\n * @csspart steps - The track steps element.\n * @csspart inactive - The inactive element of the track.\n * @csspart fill - The filled part of the track.\n */\nexport default class IgcRangeSliderComponent extends EventEmitterMixin<\n IgcRangeSliderComponentEventMap,\n Constructor<IgcSliderBaseComponent>\n>(IgcSliderBaseComponent) {\n public static readonly tagName = 'igc-range-slider';\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcRangeSliderComponent, IgcSliderLabelComponent);\n }\n\n @query('#thumbFrom')\n private thumbFrom!: HTMLElement;\n\n @query('#thumbTo')\n private thumbTo!: HTMLElement;\n\n private _lower = 0;\n private _upper = 0;\n\n /**\n * The current value of the lower thumb.\n * @attr\n */\n @property({ type: Number })\n public set lower(val: number) {\n this._lower = this.validateValue(asNumber(val, this._lower));\n }\n\n public get lower(): number {\n return this._lower;\n }\n\n /**\n * The current value of the upper thumb.\n * @attr\n */\n @property({ type: Number })\n public set upper(val: number) {\n this._upper = this.validateValue(asNumber(val, this._upper));\n }\n\n public get upper(): number {\n return this._upper;\n }\n\n /**\n * The aria label for the lower thumb.\n * @attr thumb-label-lower\n */\n @property({ attribute: 'thumb-label-lower' })\n public thumbLabelLower!: string;\n\n /**\n * The aria label for the upper thumb.\n * @attr thumb-label-upper\n */\n @property({ attribute: 'thumb-label-upper' })\n public thumbLabelUpper!: string;\n\n protected override get activeValue(): number {\n return this.activeThumb === this.thumbFrom ? this.lower : this.upper;\n }\n\n protected override normalizeValue(): void {\n this._lower = this.validateValue(this._lower);\n this._upper = this.validateValue(this._upper);\n }\n\n protected override getTrackStyle() {\n const start = asPercent(this.lower - this.min, this.distance);\n return {\n insetInlineStart: `${start}%`,\n width: `${asPercent(this.upper - this.min, this.distance) - start}%`,\n };\n }\n\n private closestTo(goal: number, positions: number[]): number {\n return positions.reduce((previous, current) =>\n Math.abs(goal - current) < Math.abs(goal - previous) ? current : previous\n );\n }\n\n protected override closestHandle(event: PointerEvent): HTMLElement {\n const fromOffset =\n this.thumbFrom.offsetLeft + this.thumbFrom.offsetWidth / 2;\n const toOffset = this.thumbTo.offsetLeft + this.thumbTo.offsetWidth / 2;\n const xPointer = event.clientX - this.getBoundingClientRect().left;\n const match = this.closestTo(xPointer, [fromOffset, toOffset]);\n\n if (fromOffset === toOffset && toOffset < xPointer) {\n return this.thumbTo;\n }\n if (fromOffset === toOffset && toOffset > xPointer) {\n return this.thumbFrom;\n }\n if (match === fromOffset) {\n return this.thumbFrom;\n }\n return this.thumbTo;\n }\n\n protected override updateValue(increment: number) {\n const oldValue = this.activeValue;\n let [lower, upper] = [this.lower, this.upper];\n\n if (this.activeThumb === this.thumbFrom) {\n lower += increment;\n } else {\n upper += increment;\n }\n\n if (lower >= upper) {\n [this.lower, this.upper] = [upper, lower];\n this.toggleActiveThumb();\n } else {\n [this.lower, this.upper] = [lower, upper];\n }\n\n if (oldValue === this.activeValue) {\n return false;\n }\n\n this.emitInputEvent();\n return true;\n }\n\n protected override emitInputEvent() {\n this.emitEvent('igcInput', {\n detail: { lower: this.lower, upper: this.upper },\n });\n }\n\n protected override emitChangeEvent() {\n this.emitEvent('igcChange', {\n detail: { lower: this.lower, upper: this.upper },\n });\n }\n\n private toggleActiveThumb() {\n const thumb =\n this.activeThumb === this.thumbFrom ? this.thumbTo : this.thumbFrom;\n thumb.focus();\n }\n\n private handleFocus(event: FocusEvent) {\n this.activeThumb = event.target as HTMLElement;\n const id = this.activeThumb.id;\n\n for (const thumb of [this.thumbFrom, this.thumbTo]) {\n if (thumb.id === id) continue;\n const [activeValue, thumbVal] = [\n asNumber(this.activeThumb.ariaValueNow),\n asNumber(thumb.ariaValueNow),\n ];\n\n this.activeThumb.ariaValueText = `${this.formatValue(Math.min(activeValue, thumbVal))} - ${this.formatValue(Math.max(activeValue, thumbVal))}`;\n }\n }\n\n protected override renderThumb(\n value: number,\n ariaLabel?: string,\n thumbId?: string\n ) {\n const percent = `${asPercent(value - this.min, this.distance)}%`;\n const thumbStyles = { insetInlineStart: percent };\n const tooltipStyles = {\n insetInlineStart: percent,\n opacity: this.thumbLabelsVisible ? 1 : 0,\n };\n const ariaValueText =\n thumbId === 'thumbFrom' ? `min ${this.lower}` : `max ${this.upper}`;\n\n const textValue = this.hasLabels\n ? this.labels[value]\n : this.valueFormat || this.valueFormatOptions\n ? this.formatValue(value)\n : ariaValueText;\n\n return html`\n <div\n part=\"thumb\"\n id=${ifDefined(thumbId)}\n tabindex=${this.disabled ? -1 : 0}\n style=${styleMap(thumbStyles)}\n role=\"slider\"\n aria-valuemin=${this.lowerBound}\n aria-valuemax=${this.upperBound}\n aria-valuenow=${value}\n aria-valuetext=${ifDefined(textValue)}\n aria-label=${ifDefined(ariaLabel)}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n @pointerenter=${this.showThumbLabels}\n @pointerleave=${this.hideThumbLabels}\n @focus=${this.handleFocus}\n @blur=${this.handleThumbBlur}\n ></div>\n ${this.hideTooltip\n ? nothing\n : html`\n <div part=\"thumb-label\" style=${styleMap(tooltipStyles)}>\n <div part=\"thumb-label-inner\">\n ${this.hasLabels ? this.labels[value] : this.formatValue(value)}\n </div>\n </div>\n `}\n `;\n }\n\n protected override renderThumbs() {\n return html`${this.renderThumb(\n this.lower,\n this.thumbLabelLower,\n 'thumbFrom'\n )}\n ${this.renderThumb(this.upper, this.thumbLabelUpper, 'thumbTo')}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-range-slider': IgcRangeSliderComponent;\n }\n}\n"]}
1
+ {"version":3,"file":"range-slider.js","sourceRoot":"","sources":["../../../src/components/slider/range-slider.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,uBAAuB,MAAM,mBAAmB,CAAC;AA0CxD,MAAqB,uBAAwB,SAAQ,iBAAiB,CAGpE,sBAAsB,CAAC;IAHzB;;QAiBU,WAAM,GAAG,CAAC,CAAC;QACX,WAAM,GAAG,CAAC,CAAC;IAwMrB,CAAC;IAnNQ,MAAM,CAAC,QAAQ;QACpB,iBAAiB,CAAC,uBAAuB,EAAE,uBAAuB,CAAC,CAAC;IACtE,CAAC;IAgB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,CAAsB;eAJjC,uBAAuB;AAYlC;IADP,KAAK,CAAC,YAAY,CAAC;0DACY;AAGxB;IADP,KAAK,CAAC,UAAU,CAAC;wDACY;AAU9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDAG1B;AAWD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDAG1B;AAWM;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;gEACb;AAOzB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;gEACb","sourcesContent":["import { html, nothing } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { styleMap } from 'lit/directives/style-map.js';\n\nimport { registerComponent } from '../common/definitions/register.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { asNumber, asPercent } from '../common/util.js';\nimport { IgcSliderBaseComponent } from './slider-base.js';\nimport IgcSliderLabelComponent from './slider-label.js';\n\n/* blazorSuppress */\nexport interface IgcRangeSliderValueEventArgs {\n lower: number;\n upper: number;\n}\n\nexport interface IgcRangeSliderComponentEventMap {\n /**\n * Emitted when a value is changed via thumb drag or keyboard interaction.\n */\n igcInput: CustomEvent<IgcRangeSliderValueEventArgs>;\n /**\n * Emitted when a value change is committed on a thumb drag end or keyboard interaction.\n */\n igcChange: CustomEvent<IgcRangeSliderValueEventArgs>;\n}\n\n/**\n * A range slider component used to select two numeric values within a range.\n *\n * @element igc-range-slider\n *\n * @fires igcInput - Emitted when a value is changed via thumb drag or keyboard interaction.\n * @fires igcChange - Emitted when a value change is committed on a thumb drag end or keyboard interaction.\n *\n * @csspart base - The base wrapper of the slider.\n * @csspart ticks - The ticks container.\n * @csspart tick-group - The tick group container.\n * @csspart tick - The tick element.\n * @csspart tick-label - The tick label element.\n * @csspart tick-label-inner - The inner element of the tick label.\n * @csspart thumbs - The thumbs container.\n * @csspart thumb - The thumb element.\n * @csspart thumb-label - The thumb tooltip label container.\n * @csspart thumb-label-inner - The thumb tooltip label inner element.\n * @csspart track - The track container.\n * @csspart steps - The track steps element.\n * @csspart inactive - The inactive element of the track.\n * @csspart fill - The filled part of the track.\n */\nexport default class IgcRangeSliderComponent extends EventEmitterMixin<\n IgcRangeSliderComponentEventMap,\n Constructor<IgcSliderBaseComponent>\n>(IgcSliderBaseComponent) {\n public static readonly tagName = 'igc-range-slider';\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcRangeSliderComponent, IgcSliderLabelComponent);\n }\n\n @query('#thumbFrom')\n private thumbFrom!: HTMLElement;\n\n @query('#thumbTo')\n private thumbTo!: HTMLElement;\n\n private _lower = 0;\n private _upper = 0;\n\n /**\n * The current value of the lower thumb.\n * @attr\n */\n @property({ type: Number })\n public set lower(val: number) {\n this._lower = this.validateValue(asNumber(val, this._lower));\n }\n\n public get lower(): number {\n return this._lower;\n }\n\n /**\n * The current value of the upper thumb.\n * @attr\n */\n @property({ type: Number })\n public set upper(val: number) {\n this._upper = this.validateValue(asNumber(val, this._upper));\n }\n\n public get upper(): number {\n return this._upper;\n }\n\n /**\n * The aria label for the lower thumb.\n * @attr thumb-label-lower\n */\n @property({ attribute: 'thumb-label-lower' })\n public thumbLabelLower!: string;\n\n /**\n * The aria label for the upper thumb.\n * @attr thumb-label-upper\n */\n @property({ attribute: 'thumb-label-upper' })\n public thumbLabelUpper!: string;\n\n protected override get activeValue(): number {\n return this.activeThumb === this.thumbFrom ? this.lower : this.upper;\n }\n\n protected override normalizeValue(): void {\n this._lower = this.validateValue(this._lower);\n this._upper = this.validateValue(this._upper);\n }\n\n protected override getTrackStyle() {\n const start = asPercent(this.lower - this.min, this.distance);\n return {\n insetInlineStart: `${start}%`,\n width: `${asPercent(this.upper - this.min, this.distance) - start}%`,\n };\n }\n\n private closestTo(goal: number, positions: number[]): number {\n return positions.reduce((previous, current) =>\n Math.abs(goal - current) < Math.abs(goal - previous) ? current : previous\n );\n }\n\n protected override closestHandle(event: PointerEvent): HTMLElement {\n const fromOffset =\n this.thumbFrom.offsetLeft + this.thumbFrom.offsetWidth / 2;\n const toOffset = this.thumbTo.offsetLeft + this.thumbTo.offsetWidth / 2;\n const xPointer = event.clientX - this.getBoundingClientRect().left;\n const match = this.closestTo(xPointer, [fromOffset, toOffset]);\n\n if (fromOffset === toOffset && toOffset < xPointer) {\n return this.thumbTo;\n }\n if (fromOffset === toOffset && toOffset > xPointer) {\n return this.thumbFrom;\n }\n if (match === fromOffset) {\n return this.thumbFrom;\n }\n return this.thumbTo;\n }\n\n protected override updateValue(increment: number) {\n const oldValue = this.activeValue;\n let [lower, upper] = [this.lower, this.upper];\n\n if (this.activeThumb === this.thumbFrom) {\n lower += increment;\n } else {\n upper += increment;\n }\n\n if (lower >= upper) {\n [this.lower, this.upper] = [upper, lower];\n this.toggleActiveThumb();\n } else {\n [this.lower, this.upper] = [lower, upper];\n }\n\n if (oldValue === this.activeValue) {\n return false;\n }\n\n this.emitInputEvent();\n return true;\n }\n\n protected override emitInputEvent() {\n this.emitEvent('igcInput', {\n detail: { lower: this.lower, upper: this.upper },\n });\n }\n\n protected override emitChangeEvent() {\n this.emitEvent('igcChange', {\n detail: { lower: this.lower, upper: this.upper },\n });\n }\n\n private toggleActiveThumb() {\n const thumb =\n this.activeThumb === this.thumbFrom ? this.thumbTo : this.thumbFrom;\n thumb.focus();\n }\n\n private handleFocus(event: FocusEvent) {\n this.activeThumb = event.target as HTMLElement;\n const id = this.activeThumb.id;\n\n for (const thumb of [this.thumbFrom, this.thumbTo]) {\n if (thumb.id === id) continue;\n const [activeValue, thumbVal] = [\n asNumber(this.activeThumb.ariaValueNow),\n asNumber(thumb.ariaValueNow),\n ];\n\n this.activeThumb.ariaValueText = `${this.formatValue(Math.min(activeValue, thumbVal))} - ${this.formatValue(Math.max(activeValue, thumbVal))}`;\n }\n }\n\n protected override renderThumb(\n value: number,\n ariaLabel?: string,\n thumbId?: string\n ) {\n const percent = `${asPercent(value - this.min, this.distance)}%`;\n const thumbStyles = { insetInlineStart: percent };\n const tooltipStyles = {\n insetInlineStart: percent,\n opacity: this.thumbLabelsVisible ? 1 : 0,\n };\n const ariaValueText =\n thumbId === 'thumbFrom' ? `min ${this.lower}` : `max ${this.upper}`;\n\n const textValue = this.hasLabels\n ? this.labels[value]\n : this.valueFormat || this.valueFormatOptions\n ? this.formatValue(value)\n : ariaValueText;\n\n return html`\n <div\n part=\"thumb\"\n id=${ifDefined(thumbId)}\n tabindex=${this.disabled ? -1 : 0}\n style=${styleMap(thumbStyles)}\n role=\"slider\"\n aria-valuemin=${this.lowerBound}\n aria-valuemax=${this.upperBound}\n aria-valuenow=${value}\n aria-valuetext=${ifDefined(textValue)}\n aria-label=${ifDefined(ariaLabel)}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n @pointerenter=${this.showThumbLabels}\n @pointerleave=${this.hideThumbLabels}\n @focus=${this.handleFocus}\n @blur=${this.handleThumbBlur}\n ></div>\n ${this.hideTooltip\n ? nothing\n : html`\n <div part=\"thumb-label\" style=${styleMap(tooltipStyles)}>\n <div part=\"thumb-label-inner\">\n ${this.hasLabels ? this.labels[value] : this.formatValue(value)}\n </div>\n </div>\n `}\n `;\n }\n\n protected override renderThumbs() {\n return html`${this.renderThumb(\n this.lower,\n this.thumbLabelLower,\n 'thumbFrom'\n )}\n ${this.renderThumb(this.upper, this.thumbLabelUpper, 'thumbTo')}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-range-slider': IgcRangeSliderComponent;\n }\n}\n"]}
@@ -68,7 +68,7 @@ export default class IgcStepComponent extends LitElement {
68
68
  /** @hidden @internal @private */
69
69
  stepType: StepperStepType;
70
70
  /** @hidden @internal @private */
71
- titlePosition?: StepperTitlePosition;
71
+ titlePosition: StepperTitlePosition;
72
72
  /** @hidden @internal @private */
73
73
  orientation: StepperOrientation;
74
74
  /** @hidden @internal @private */
@@ -33,6 +33,7 @@ let IgcStepComponent = IgcStepComponent_1 = class IgcStepComponent extends LitEl
33
33
  this.complete = false;
34
34
  this.previousComplete = false;
35
35
  this.stepType = 'full';
36
+ this.titlePosition = 'auto';
36
37
  this.orientation = 'horizontal';
37
38
  this.index = -1;
38
39
  this.contentTop = false;
@@ -102,10 +103,10 @@ let IgcStepComponent = IgcStepComponent_1 = class IgcStepComponent extends LitEl
102
103
  invalid: this.invalid && this.visited && !this.active && this.isAccessible,
103
104
  top: this.titlePosition === 'top',
104
105
  bottom: this.titlePosition === 'bottom' ||
105
- (this.orientation === 'horizontal' && !this.titlePosition),
106
+ (this.orientation === 'horizontal' && this.titlePosition === 'auto'),
106
107
  start: this.titlePosition === 'start',
107
108
  end: this.titlePosition === 'end' ||
108
- (this.orientation === 'vertical' && !this.titlePosition),
109
+ (this.orientation === 'vertical' && this.titlePosition === 'auto'),
109
110
  };
110
111
  }
111
112
  get textParts() {
@@ -1 +1 @@
1
- {"version":3,"file":"step.js","sourceRoot":"","sources":["../../../src/components/stepper/step.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAY,SAAS,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,WAAW,EA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,EAAE,CAAC;0DACC;AAIzB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;kDACW;AAInC;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;uDACa;AAIrC;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;qDACuB;AAI/C;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;+CACb;AAIX;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;oDACL;AAInB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;wDACD;AAIvB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;iDACR;AAIhB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;mDACM;AAI9B;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;2DACA;AAuCrB;IADT,KAAK,CAAC,QAAQ,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;oDAO/C;AAKS;IAHT,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IACjD,KAAK,CAAC,SAAS,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IAChD,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;qEAKjD;AAGS;IADT,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;sDAKjD;AAjKkB,gBAAgB;IADpC,MAAM,CAAC,GAAG,CAAC;GACS,gBAAgB,CA4RpC;eA5RoB,gBAAgB","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property, query, queryAssignedElements } from 'lit/decorators.js';\nimport { type Ref, createRef, ref } from 'lit/directives/ref.js';\nimport { when } from 'lit/directives/when.js';\n\nimport { EaseInOut } from '../../animations/easings.js';\nimport { addAnimationController } from '../../animations/player.js';\nimport { themes } from '../../theming/theming-decorator.js';\nimport { watch } from '../common/decorators/watch.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport { partNameMap } from '../common/util.js';\nimport type {\n StepperOrientation,\n StepperStepType,\n StepperTitlePosition,\n} from '../types.js';\nimport {\n type Animation,\n bodyAnimations,\n contentAnimations,\n} from './animations.js';\nimport { styles as shared } from './themes/step/shared/step.common.css.js';\nimport { styles } from './themes/step/step.base.css.js';\nimport { all } from './themes/step/themes.js';\n\n/**\n * The step component is used within the `igc-stepper` element and it holds the content of each step.\n * It also supports custom indicators, title and subtitle.\n *\n * @element igc-step\n *\n * @slot - Renders the content of the step.\n * @slot indicator - Renders the indicator of the step. By default, it displays the step index + 1.\n * @slot title - Renders the title of the step.\n * @slot subtitle - Renders the subtitle of the step.\n *\n * @csspart header-container - Wrapper of the step's `header` and its separators.\n * @csspart disabled - Indicates a disabled state. Applies to `header-container`.\n * @csspart complete-start - Indicates a complete state of the current step. Applies to `header-container`.\n * @csspart complete-end - Indicates a complete state of the previous step. Applies to `header-container`.\n * @csspart optional - Indicates an optional state. Applies to `header-container`.\n * @csspart invalid - Indicates an invalid state. Applies to `header-container`.\n * @csspart top - Indicates that the title should be above the indicator. Applies to `header-container`.\n * @csspart bottom - Indicates that the title should be below the indicator. Applies to `header-container`.\n * @csspart start - Indicates that the title should be before the indicator. Applies to `header-container`.\n * @csspart end - Indicates that the title should be after the indicator. Applies to `header-container`.\n * @csspart header - Wrapper of the step's `indicator` and `text`.\n * @csspart indicator - The indicator of the step.\n * @csspart text - Wrapper of the step's `title` and `subtitle`.\n * @csspart empty - Indicates that no title and subtitle has been provided to the step. Applies to `text`.\n * @csspart title - The title of the step.\n * @csspart subtitle - The subtitle of the step.\n * @csspart body - Wrapper of the step's `content`.\n * @csspart content - The steps `content`.\n */\n@themes(all)\nexport default class IgcStepComponent extends LitElement {\n public static readonly tagName = 'igc-step';\n public static override styles = [styles, shared];\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcStepComponent);\n }\n\n private bodyRef: Ref<HTMLElement> = createRef();\n private contentRef: Ref<HTMLElement> = createRef();\n\n private bodyAnimationPlayer = addAnimationController(this, this.bodyRef);\n private contentAnimationPlayer = addAnimationController(\n this,\n this.contentRef\n );\n\n @queryAssignedElements({ slot: 'title' })\n private _titleChildren!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'subtitle' })\n private _subTitleChildren!: Array<HTMLElement>;\n\n /* blazorSuppress */\n @query('[part~=\"header\"]')\n public header!: HTMLElement;\n\n /* blazorSuppress */\n @query('[part~=\"body\"]')\n public contentBody!: HTMLElement;\n\n /** Gets/sets whether the step is invalid. */\n @property({ reflect: true, type: Boolean })\n public invalid = false;\n\n /** Gets/sets whether the step is activе. */\n @property({ reflect: true, type: Boolean })\n public active = false;\n\n /**\n * Gets/sets whether the step is optional.\n *\n * @remarks\n * Optional steps validity does not affect the default behavior when the stepper is in linear mode i.e.\n * if optional step is invalid the user could still move to the next step.\n */\n @property({ type: Boolean })\n public optional = false;\n\n /** Gets/sets whether the step is interactable. */\n @property({ reflect: true, type: Boolean })\n public disabled = false;\n\n /** Gets/sets whether the step is completed.\n *\n * @remarks\n * When set to `true` the following separator is styled `solid`.\n */\n @property({ reflect: true, type: Boolean })\n public complete = false;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public previousComplete = false;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public stepType: StepperStepType = 'full';\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public titlePosition?: StepperTitlePosition;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public orientation: StepperOrientation = 'horizontal';\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public index = -1;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public contentTop = false;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public linearDisabled = false;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public visited = false;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public animation: Animation = 'fade';\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public animationDuration = 350;\n\n /**\n * @hidden @internal\n * @deprecated since 5.4.0. Use the Stepper's `navigateTo` method instead.\n */\n public async toggleAnimation(\n type: 'in' | 'out',\n direction: 'normal' | 'reverse' = 'normal'\n ) {\n const bodyAnimation = bodyAnimations.get(this.animation)!.get(type)!;\n const contentAnimation = contentAnimations.get(this.animation)!.get(type)!;\n const bodyHeight = window\n .getComputedStyle(this)\n .getPropertyValue('--vertical-body-height');\n\n const options: KeyframeAnimationOptions = {\n duration: this.animationDuration,\n easing: EaseInOut.Quad,\n direction,\n };\n\n const step = {\n height: bodyHeight,\n };\n\n const [_, event] = await Promise.all([\n this.bodyAnimationPlayer.stopAll(),\n this.bodyAnimationPlayer.play(bodyAnimation({ keyframe: options, step })),\n this.contentAnimationPlayer.stopAll(),\n this.contentAnimationPlayer.play(\n contentAnimation({ keyframe: options, step })\n ),\n ]);\n\n return event.type;\n }\n\n @watch('active', { waitUntilFirstUpdate: true })\n protected activeChange() {\n if (this.active) {\n this.dispatchEvent(\n new CustomEvent('stepActiveChanged', { bubbles: true, detail: false })\n );\n }\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n @watch('invalid', { waitUntilFirstUpdate: true })\n @watch('optional', { waitUntilFirstUpdate: true })\n protected disabledInvalidOptionalChange() {\n this.dispatchEvent(\n new CustomEvent('stepDisabledInvalidChanged', { bubbles: true })\n );\n }\n\n @watch('complete', { waitUntilFirstUpdate: true })\n protected completeChange() {\n this.dispatchEvent(\n new CustomEvent('stepCompleteChanged', { bubbles: true })\n );\n }\n\n private handleClick(event: MouseEvent): void {\n event.stopPropagation();\n if (this.isAccessible) {\n this.dispatchEvent(\n new CustomEvent('stepActiveChanged', { bubbles: true, detail: true })\n );\n }\n }\n\n private handleKeydown(event: KeyboardEvent): void {\n this.dispatchEvent(\n new CustomEvent('stepHeaderKeydown', {\n bubbles: true,\n detail: { event, focusedStep: this },\n })\n );\n }\n\n /** @hidden @internal */\n public get isAccessible(): boolean {\n return !this.disabled && !this.linearDisabled;\n }\n\n private get headerContainerParts() {\n return {\n 'header-container': true,\n disabled: !this.isAccessible,\n 'complete-start': this.complete,\n 'complete-end': this.previousComplete,\n optional: this.optional,\n invalid:\n this.invalid && this.visited && !this.active && this.isAccessible,\n top: this.titlePosition === 'top',\n bottom:\n this.titlePosition === 'bottom' ||\n (this.orientation === 'horizontal' && !this.titlePosition),\n start: this.titlePosition === 'start',\n end:\n this.titlePosition === 'end' ||\n (this.orientation === 'vertical' && !this.titlePosition),\n };\n }\n\n private get textParts() {\n return {\n text: true,\n empty:\n this.stepType === 'indicator'\n ? true\n : this.stepType === 'full' &&\n !this._titleChildren.length &&\n !this._subTitleChildren.length,\n };\n }\n\n protected renderIndicator() {\n if (this.stepType !== 'title') {\n return html`\n <div part=\"indicator\">\n <slot name=\"indicator\">\n <span>${this.index + 1}</span>\n </slot>\n </div>\n `;\n }\n return nothing;\n }\n\n protected renderTitleAndSubtitle() {\n return html`\n <div part=\"${partNameMap(this.textParts)}\">\n <div part=\"title\">\n <slot name=\"title\"></slot>\n </div>\n <div part=\"subtitle\">\n <slot name=\"subtitle\"></slot>\n </div>\n </div>\n `;\n }\n\n protected renderContent() {\n return html`<div\n ${ref(this.bodyRef)}\n id=\"igc-step-content-${this.index}\"\n part=\"body\"\n role=\"tabpanel\"\n aria-labelledby=\"igc-step-header-${this.index}\"\n >\n <div part=\"content\" ${ref(this.contentRef)}>\n <slot></slot>\n </div>\n </div>`;\n }\n\n protected override render() {\n return html`\n ${when(\n this.contentTop && this.orientation === 'horizontal',\n () => this.renderContent(),\n () => nothing\n )}\n <div part=\"${partNameMap(this.headerContainerParts)}\">\n <div\n part=\"header\"\n tabindex=\"${this.active ? '0' : '-1'}\"\n role=\"tab\"\n aria-selected=\"${this.active}\"\n @click=${this.handleClick}\n @keydown=${this.handleKeydown}\n >\n ${this.renderIndicator()} ${this.renderTitleAndSubtitle()}\n </div>\n </div>\n ${when(\n this.orientation === 'vertical' || !this.contentTop,\n () => this.renderContent(),\n () => nothing\n )}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-step': IgcStepComponent;\n }\n}\n"]}
1
+ {"version":3,"file":"step.js","sourceRoot":"","sources":["../../../src/components/stepper/step.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAY,SAAS,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMhD,OAAO,EAEL,cAAc,EACd,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAiC/B,IAAM,gBAAgB,wBAAtB,MAAM,gBAAiB,SAAQ,UAAU;IAAzC;;QASL,YAAO,GAAqB,SAAS,EAAE,CAAC;QACxC,eAAU,GAAqB,SAAS,EAAE,CAAC;QAE3C,wBAAmB,GA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Q,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;wDACD;AAIvB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;iDACR;AAIhB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;mDACM;AAI9B;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;2DACA;AAuCrB;IADT,KAAK,CAAC,QAAQ,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;oDAO/C;AAKS;IAHT,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IACjD,KAAK,CAAC,SAAS,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IAChD,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;qEAKjD;AAGS;IADT,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;sDAKjD;AAjKkB,gBAAgB;IADpC,MAAM,CAAC,GAAG,CAAC;GACS,gBAAgB,CA4RpC;eA5RoB,gBAAgB","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property, query, queryAssignedElements } from 'lit/decorators.js';\nimport { type Ref, createRef, ref } from 'lit/directives/ref.js';\nimport { when } from 'lit/directives/when.js';\n\nimport { EaseInOut } from '../../animations/easings.js';\nimport { addAnimationController } from '../../animations/player.js';\nimport { themes } from '../../theming/theming-decorator.js';\nimport { watch } from '../common/decorators/watch.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport { partNameMap } from '../common/util.js';\nimport type {\n StepperOrientation,\n StepperStepType,\n StepperTitlePosition,\n} from '../types.js';\nimport {\n type Animation,\n bodyAnimations,\n contentAnimations,\n} from './animations.js';\nimport { styles as shared } from './themes/step/shared/step.common.css.js';\nimport { styles } from './themes/step/step.base.css.js';\nimport { all } from './themes/step/themes.js';\n\n/**\n * The step component is used within the `igc-stepper` element and it holds the content of each step.\n * It also supports custom indicators, title and subtitle.\n *\n * @element igc-step\n *\n * @slot - Renders the content of the step.\n * @slot indicator - Renders the indicator of the step. By default, it displays the step index + 1.\n * @slot title - Renders the title of the step.\n * @slot subtitle - Renders the subtitle of the step.\n *\n * @csspart header-container - Wrapper of the step's `header` and its separators.\n * @csspart disabled - Indicates a disabled state. Applies to `header-container`.\n * @csspart complete-start - Indicates a complete state of the current step. Applies to `header-container`.\n * @csspart complete-end - Indicates a complete state of the previous step. Applies to `header-container`.\n * @csspart optional - Indicates an optional state. Applies to `header-container`.\n * @csspart invalid - Indicates an invalid state. Applies to `header-container`.\n * @csspart top - Indicates that the title should be above the indicator. Applies to `header-container`.\n * @csspart bottom - Indicates that the title should be below the indicator. Applies to `header-container`.\n * @csspart start - Indicates that the title should be before the indicator. Applies to `header-container`.\n * @csspart end - Indicates that the title should be after the indicator. Applies to `header-container`.\n * @csspart header - Wrapper of the step's `indicator` and `text`.\n * @csspart indicator - The indicator of the step.\n * @csspart text - Wrapper of the step's `title` and `subtitle`.\n * @csspart empty - Indicates that no title and subtitle has been provided to the step. Applies to `text`.\n * @csspart title - The title of the step.\n * @csspart subtitle - The subtitle of the step.\n * @csspart body - Wrapper of the step's `content`.\n * @csspart content - The steps `content`.\n */\n@themes(all)\nexport default class IgcStepComponent extends LitElement {\n public static readonly tagName = 'igc-step';\n public static override styles = [styles, shared];\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcStepComponent);\n }\n\n private bodyRef: Ref<HTMLElement> = createRef();\n private contentRef: Ref<HTMLElement> = createRef();\n\n private bodyAnimationPlayer = addAnimationController(this, this.bodyRef);\n private contentAnimationPlayer = addAnimationController(\n this,\n this.contentRef\n );\n\n @queryAssignedElements({ slot: 'title' })\n private _titleChildren!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'subtitle' })\n private _subTitleChildren!: Array<HTMLElement>;\n\n /* blazorSuppress */\n @query('[part~=\"header\"]')\n public header!: HTMLElement;\n\n /* blazorSuppress */\n @query('[part~=\"body\"]')\n public contentBody!: HTMLElement;\n\n /** Gets/sets whether the step is invalid. */\n @property({ reflect: true, type: Boolean })\n public invalid = false;\n\n /** Gets/sets whether the step is activе. */\n @property({ reflect: true, type: Boolean })\n public active = false;\n\n /**\n * Gets/sets whether the step is optional.\n *\n * @remarks\n * Optional steps validity does not affect the default behavior when the stepper is in linear mode i.e.\n * if optional step is invalid the user could still move to the next step.\n */\n @property({ type: Boolean })\n public optional = false;\n\n /** Gets/sets whether the step is interactable. */\n @property({ reflect: true, type: Boolean })\n public disabled = false;\n\n /** Gets/sets whether the step is completed.\n *\n * @remarks\n * When set to `true` the following separator is styled `solid`.\n */\n @property({ reflect: true, type: Boolean })\n public complete = false;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public previousComplete = false;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public stepType: StepperStepType = 'full';\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public titlePosition: StepperTitlePosition = 'auto';\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public orientation: StepperOrientation = 'horizontal';\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public index = -1;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public contentTop = false;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public linearDisabled = false;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public visited = false;\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public animation: Animation = 'fade';\n\n /** @hidden @internal @private */\n @property({ attribute: false })\n public animationDuration = 350;\n\n /**\n * @hidden @internal\n * @deprecated since 5.4.0. Use the Stepper's `navigateTo` method instead.\n */\n public async toggleAnimation(\n type: 'in' | 'out',\n direction: 'normal' | 'reverse' = 'normal'\n ) {\n const bodyAnimation = bodyAnimations.get(this.animation)!.get(type)!;\n const contentAnimation = contentAnimations.get(this.animation)!.get(type)!;\n const bodyHeight = window\n .getComputedStyle(this)\n .getPropertyValue('--vertical-body-height');\n\n const options: KeyframeAnimationOptions = {\n duration: this.animationDuration,\n easing: EaseInOut.Quad,\n direction,\n };\n\n const step = {\n height: bodyHeight,\n };\n\n const [_, event] = await Promise.all([\n this.bodyAnimationPlayer.stopAll(),\n this.bodyAnimationPlayer.play(bodyAnimation({ keyframe: options, step })),\n this.contentAnimationPlayer.stopAll(),\n this.contentAnimationPlayer.play(\n contentAnimation({ keyframe: options, step })\n ),\n ]);\n\n return event.type;\n }\n\n @watch('active', { waitUntilFirstUpdate: true })\n protected activeChange() {\n if (this.active) {\n this.dispatchEvent(\n new CustomEvent('stepActiveChanged', { bubbles: true, detail: false })\n );\n }\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n @watch('invalid', { waitUntilFirstUpdate: true })\n @watch('optional', { waitUntilFirstUpdate: true })\n protected disabledInvalidOptionalChange() {\n this.dispatchEvent(\n new CustomEvent('stepDisabledInvalidChanged', { bubbles: true })\n );\n }\n\n @watch('complete', { waitUntilFirstUpdate: true })\n protected completeChange() {\n this.dispatchEvent(\n new CustomEvent('stepCompleteChanged', { bubbles: true })\n );\n }\n\n private handleClick(event: MouseEvent): void {\n event.stopPropagation();\n if (this.isAccessible) {\n this.dispatchEvent(\n new CustomEvent('stepActiveChanged', { bubbles: true, detail: true })\n );\n }\n }\n\n private handleKeydown(event: KeyboardEvent): void {\n this.dispatchEvent(\n new CustomEvent('stepHeaderKeydown', {\n bubbles: true,\n detail: { event, focusedStep: this },\n })\n );\n }\n\n /** @hidden @internal */\n public get isAccessible(): boolean {\n return !this.disabled && !this.linearDisabled;\n }\n\n private get headerContainerParts() {\n return {\n 'header-container': true,\n disabled: !this.isAccessible,\n 'complete-start': this.complete,\n 'complete-end': this.previousComplete,\n optional: this.optional,\n invalid:\n this.invalid && this.visited && !this.active && this.isAccessible,\n top: this.titlePosition === 'top',\n bottom:\n this.titlePosition === 'bottom' ||\n (this.orientation === 'horizontal' && this.titlePosition === 'auto'),\n start: this.titlePosition === 'start',\n end:\n this.titlePosition === 'end' ||\n (this.orientation === 'vertical' && this.titlePosition === 'auto'),\n };\n }\n\n private get textParts() {\n return {\n text: true,\n empty:\n this.stepType === 'indicator'\n ? true\n : this.stepType === 'full' &&\n !this._titleChildren.length &&\n !this._subTitleChildren.length,\n };\n }\n\n protected renderIndicator() {\n if (this.stepType !== 'title') {\n return html`\n <div part=\"indicator\">\n <slot name=\"indicator\">\n <span>${this.index + 1}</span>\n </slot>\n </div>\n `;\n }\n return nothing;\n }\n\n protected renderTitleAndSubtitle() {\n return html`\n <div part=\"${partNameMap(this.textParts)}\">\n <div part=\"title\">\n <slot name=\"title\"></slot>\n </div>\n <div part=\"subtitle\">\n <slot name=\"subtitle\"></slot>\n </div>\n </div>\n `;\n }\n\n protected renderContent() {\n return html`<div\n ${ref(this.bodyRef)}\n id=\"igc-step-content-${this.index}\"\n part=\"body\"\n role=\"tabpanel\"\n aria-labelledby=\"igc-step-header-${this.index}\"\n >\n <div part=\"content\" ${ref(this.contentRef)}>\n <slot></slot>\n </div>\n </div>`;\n }\n\n protected override render() {\n return html`\n ${when(\n this.contentTop && this.orientation === 'horizontal',\n () => this.renderContent(),\n () => nothing\n )}\n <div part=\"${partNameMap(this.headerContainerParts)}\">\n <div\n part=\"header\"\n tabindex=\"${this.active ? '0' : '-1'}\"\n role=\"tab\"\n aria-selected=\"${this.active}\"\n @click=${this.handleClick}\n @keydown=${this.handleKeydown}\n >\n ${this.renderIndicator()} ${this.renderTitleAndSubtitle()}\n </div>\n </div>\n ${when(\n this.orientation === 'vertical' || !this.contentTop,\n () => this.renderContent(),\n () => nothing\n )}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-step': IgcStepComponent;\n }\n}\n"]}
@@ -5,10 +5,6 @@ export interface IgcActiveStepChangingEventArgs {
5
5
  export interface IgcActiveStepChangedEventArgs {
6
6
  index: number;
7
7
  }
8
- /** @deprecated since 5.4.0. Use IgcActiveStepChangingEventArgs instead */
9
- export type IgcActiveStepChangingArgs = IgcActiveStepChangingEventArgs;
10
- /** @deprecated since 5.4.0. Use IgcActiveStepChangedEventArgs instead */
11
- export type IgcActiveStepChangedArgs = IgcActiveStepChangedEventArgs;
12
8
  export interface IgcStepperComponentEventMap {
13
9
  igcActiveStepChanging: CustomEvent<IgcActiveStepChangingEventArgs>;
14
10
  igcActiveStepChanged: CustomEvent<IgcActiveStepChangedEventArgs>;
@@ -1 +1 @@
1
- {"version":3,"file":"stepper.common.js","sourceRoot":"","sources":["../../../src/components/stepper/stepper.common.ts"],"names":[],"mappings":"","sourcesContent":["export interface IgcActiveStepChangingEventArgs {\n oldIndex: number;\n newIndex: number;\n}\n\nexport interface IgcActiveStepChangedEventArgs {\n index: number;\n}\n\n/** @deprecated since 5.4.0. Use IgcActiveStepChangingEventArgs instead */\nexport type IgcActiveStepChangingArgs = IgcActiveStepChangingEventArgs;\n/** @deprecated since 5.4.0. Use IgcActiveStepChangedEventArgs instead */\nexport type IgcActiveStepChangedArgs = IgcActiveStepChangedEventArgs;\n\nexport interface IgcStepperComponentEventMap {\n igcActiveStepChanging: CustomEvent<IgcActiveStepChangingEventArgs>;\n igcActiveStepChanged: CustomEvent<IgcActiveStepChangedEventArgs>;\n}\n"]}
1
+ {"version":3,"file":"stepper.common.js","sourceRoot":"","sources":["../../../src/components/stepper/stepper.common.ts"],"names":[],"mappings":"","sourcesContent":["export interface IgcActiveStepChangingEventArgs {\n oldIndex: number;\n newIndex: number;\n}\n\nexport interface IgcActiveStepChangedEventArgs {\n index: number;\n}\n\nexport interface IgcStepperComponentEventMap {\n igcActiveStepChanging: CustomEvent<IgcActiveStepChangingEventArgs>;\n igcActiveStepChanged: CustomEvent<IgcActiveStepChangedEventArgs>;\n}\n"]}
@@ -71,11 +71,11 @@ export default class IgcStepperComponent extends IgcStepperComponent_base {
71
71
  * Get/Set the position of the steps title.
72
72
  *
73
73
  * @remarks
74
- * The default value is undefined.
74
+ * The default value is auto.
75
75
  * When the stepper is horizontally orientated the title is positioned below the indicator.
76
76
  * When the stepper is horizontally orientated the title is positioned on the right side of the indicator.
77
77
  */
78
- titlePosition?: StepperTitlePosition;
78
+ titlePosition: StepperTitlePosition;
79
79
  protected orientationChange(): void;
80
80
  protected stepTypeChange(): void;
81
81
  protected titlePositionChange(): void;
@@ -35,15 +35,7 @@ let IgcStepperComponent = IgcStepperComponent_1 = class IgcStepperComponent exte
35
35
  }
36
36
  titlePositionChange() {
37
37
  this.steps.forEach((step) => {
38
- if (this.titlePosition !== 'bottom' &&
39
- this.titlePosition !== 'top' &&
40
- this.titlePosition !== 'end' &&
41
- this.titlePosition !== 'start') {
42
- step.titlePosition = undefined;
43
- }
44
- else {
45
- step.titlePosition = this.titlePosition;
46
- }
38
+ step.titlePosition = this.titlePosition;
47
39
  });
48
40
  }
49
41
  contentTopChange() {
@@ -96,6 +88,7 @@ let IgcStepperComponent = IgcStepperComponent_1 = class IgcStepperComponent exte
96
88
  this.verticalAnimation = 'grow';
97
89
  this.horizontalAnimation = 'slide';
98
90
  this.animationDuration = 320;
91
+ this.titlePosition = 'auto';
99
92
  this.addEventListener('stepActiveChanged', (event) => {
100
93
  event.stopPropagation();
101
94
  this.activateStep(event.target, event.detail);
@@ -1 +1 @@
1
- {"version":3,"file":"stepper.js","sourceRoot":"","sources":["../../../src/components/stepper/stepper.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,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,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAQ1C,O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EAAE,CAAC;IAC1D,KAAK,CAAC,qBAAqB,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;8DAK5D;AAGS;IADT,KAAK,CAAC,mBAAmB,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;kEAK1D;AAvKkB,mBAAmB;IAJvC,MAAM,CAAC;QACN,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE;QACpC,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE;KACpC,CAAC;GACmB,mBAAmB,CA0evC;eA1eoB,mBAAmB","sourcesContent":["import { LitElement, html } from 'lit';\nimport { property, queryAssignedElements } from 'lit/decorators.js';\n\nimport { themes } from '../../theming/theming-decorator.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 { isLTR } from '../common/util.js';\nimport type {\n HorizontalTransitionAnimation,\n StepperOrientation,\n StepperStepType,\n StepperTitlePosition,\n StepperVerticalAnimation,\n} from '../types.js';\nimport IgcStepComponent from './step.js';\nimport type { IgcStepperComponentEventMap } from './stepper.common.js';\nimport { styles } from './themes/stepper/stepper.base.css.js';\nimport { styles as bootstrap } from './themes/stepper/stepper.bootstrap.css.js';\nimport { styles as fluent } from './themes/stepper/stepper.fluent.css.js';\nimport { styles as indigo } from './themes/stepper/stepper.indigo.css.js';\n\n/**\n * IgxStepper provides a wizard-like workflow by dividing content into logical steps.\n *\n * @remarks\n * The stepper component allows the user to navigate between multiple steps.\n * It supports horizontal and vertical orientation as well as keyboard navigation and provides API methods to control the active step.\n *\n * @element igc-stepper\n *\n * @slot - Renders the step components inside default slot.\n *\n * @fires igcActiveStepChanging - Emitted when the active step is about to change.\n * @fires igcActiveStepChanged - Emitted when the active step is changed.\n */\n@themes({\n light: { bootstrap, fluent, indigo },\n dark: { bootstrap, fluent, indigo },\n})\nexport default class IgcStepperComponent extends EventEmitterMixin<\n IgcStepperComponentEventMap,\n Constructor<LitElement>\n>(LitElement) {\n public static readonly tagName = 'igc-stepper';\n protected static styles = styles;\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcStepperComponent, IgcStepComponent);\n }\n\n // biome-ignore lint/complexity/noBannedTypes: No easy fix as the callback shapes are wildly different\n private readonly keyDownHandlers: Map<string, Function> = new Map(\n Object.entries({\n Enter: this.activateStep,\n Space: this.activateStep,\n SpaceBar: this.activateStep,\n ' ': this.activateStep,\n ArrowUp: this.onArrowUpKeyDown,\n ArrowDown: this.onArrowDownKeyDown,\n ArrowLeft: this.onArrowLeftKeyDown,\n ArrowRight: this.onArrowRightKeyDown,\n Home: this.onHomeKey,\n End: this.onEndKey,\n })\n );\n\n private activeStep!: IgcStepComponent;\n\n /** Returns all of the stepper's steps. */\n @queryAssignedElements({ selector: 'igc-step' })\n public steps!: Array<IgcStepComponent>;\n\n /** Gets/Sets the orientation of the stepper.\n *\n * @remarks\n * Default value is `horizontal`.\n */\n @property({ reflect: true })\n public orientation: StepperOrientation = 'horizontal';\n\n /** Get/Set the type of the steps.\n *\n * @remarks\n * Default value is `full`.\n */\n @property({ reflect: true, attribute: 'step-type' })\n public stepType: StepperStepType = 'full';\n\n /**\n * Get/Set whether the stepper is linear.\n *\n * @remarks\n * If the stepper is in linear mode and if the active step is valid only then the user is able to move forward.\n */\n @property({ type: Boolean })\n public linear = false;\n\n /**\n * Get/Set whether the content is displayed above the steps.\n *\n * @remarks\n * Default value is `false` and the content is below the steps.\n */\n @property({ reflect: true, type: Boolean, attribute: 'content-top' })\n public contentTop = false;\n\n /**\n * The animation type when in vertical mode.\n * @attr vertical-animation\n */\n @property({ attribute: 'vertical-animation' })\n public verticalAnimation: StepperVerticalAnimation = 'grow';\n\n /**\n * The animation type when in horizontal mode.\n * @attr horizontal-animation\n */\n @property({ attribute: 'horizontal-animation' })\n public horizontalAnimation: HorizontalTransitionAnimation = 'slide';\n\n /**\n * The animation duration in either vertical or horizontal mode.\n * @attr animation-duration\n */\n @property({ attribute: 'animation-duration', type: Number })\n public animationDuration = 320;\n\n /**\n * Get/Set the position of the steps title.\n *\n * @remarks\n * The default value is undefined.\n * When the stepper is horizontally orientated the title is positioned below the indicator.\n * When the stepper is horizontally orientated the title is positioned on the right side of the indicator.\n */\n @property({ reflect: false, attribute: 'title-position' })\n public titlePosition?: StepperTitlePosition;\n\n @watch('orientation', { waitUntilFirstUpdate: true })\n protected orientationChange(): void {\n this.setAttribute('aria-orientation', this.orientation);\n this.steps.forEach((step: IgcStepComponent) => {\n step.orientation = this.orientation;\n this.updateAnimation(step);\n });\n }\n\n @watch('stepType', { waitUntilFirstUpdate: true })\n protected stepTypeChange(): void {\n this.steps.forEach((step: IgcStepComponent) => {\n step.stepType = this.stepType;\n });\n }\n\n @watch('titlePosition', { waitUntilFirstUpdate: true })\n protected titlePositionChange(): void {\n this.steps.forEach((step: IgcStepComponent) => {\n if (\n this.titlePosition !== 'bottom' &&\n this.titlePosition !== 'top' &&\n this.titlePosition !== 'end' &&\n this.titlePosition !== 'start'\n ) {\n step.titlePosition = undefined;\n } else {\n step.titlePosition = this.titlePosition;\n }\n });\n }\n\n @watch('contentTop', { waitUntilFirstUpdate: true })\n protected contentTopChange(): void {\n this.steps.forEach((step: IgcStepComponent) => {\n step.contentTop = this.contentTop;\n });\n }\n\n @watch('linear', { waitUntilFirstUpdate: true })\n protected linearChange(): void {\n this.steps.forEach((step: IgcStepComponent) => {\n step.linearDisabled = this.linear;\n if (step.index <= this.activeStep.index) {\n step.visited = true;\n } else {\n step.visited = false;\n }\n });\n if (this.linear) {\n this.updateStepsLinearDisabled();\n }\n }\n\n @watch('verticalAnimation', { waitUntilFirstUpdate: true })\n @watch('horizontalAnimation', { waitUntilFirstUpdate: true })\n protected animationTypeChange() {\n this.steps.forEach((step: IgcStepComponent) => {\n this.updateAnimation(step);\n });\n }\n\n @watch('animationDuration', { waitUntilFirstUpdate: true })\n protected animationDurationChange() {\n this.steps.forEach((step: IgcStepComponent) => {\n step.animationDuration = this.animationDuration;\n });\n }\n\n constructor() {\n super();\n\n this.addEventListener('stepActiveChanged', (event: any) => {\n event.stopPropagation();\n this.activateStep(event.target, event.detail);\n });\n\n this.addEventListener('stepDisabledInvalidChanged', (event: any) => {\n event.stopPropagation();\n if (this.linear) {\n this.updateStepsLinearDisabled();\n }\n });\n\n this.addEventListener('stepCompleteChanged', (event: any) => {\n event.stopPropagation();\n const nextStep = this.steps[event.target.index + 1];\n if (nextStep) {\n nextStep.previousComplete = event.target.complete;\n }\n });\n\n this.addEventListener('stepHeaderKeydown', (event: any) => {\n event.stopPropagation();\n this.handleKeydown(event.detail.event, event.detail.focusedStep);\n });\n }\n\n public override connectedCallback(): void {\n super.connectedCallback();\n this.setAttribute('role', 'tablist');\n this.setAttribute('aria-orientation', this.orientation);\n }\n\n private activateFirstStep() {\n const firstEnabledStep = this.steps.find(\n (s: IgcStepComponent) => !s.disabled\n );\n if (firstEnabledStep) {\n this.activateStep(firstEnabledStep, false);\n }\n }\n\n private animateSteps(\n nextStep: IgcStepComponent,\n currentStep: IgcStepComponent\n ) {\n if (nextStep.index > currentStep.index) {\n // Animate steps in ascending/next direction\n currentStep.toggleAnimation('out');\n nextStep.toggleAnimation('in');\n } else {\n // Animate steps in descending/previous direction\n currentStep.toggleAnimation('in', 'reverse');\n nextStep.toggleAnimation('out', 'reverse');\n }\n }\n\n private async activateStep(step: IgcStepComponent, shouldEmit = true) {\n if (step === this.activeStep) {\n return;\n }\n\n if (shouldEmit) {\n const args = {\n detail: {\n owner: this,\n oldIndex: this.activeStep.index,\n newIndex: step.index,\n },\n cancelable: true,\n };\n\n this.animateSteps(step, this.activeStep);\n\n const allowed = this.emitEvent('igcActiveStepChanging', args);\n\n if (!allowed) {\n return;\n }\n this.changeActiveStep(step);\n this.emitEvent('igcActiveStepChanged', {\n detail: { owner: this, index: step.index },\n });\n } else {\n this.changeActiveStep(step);\n }\n }\n\n private changeActiveStep(step: IgcStepComponent) {\n if (this.activeStep) {\n this.activeStep.active = false;\n }\n step.active = true;\n step.visited = true;\n this.activeStep = step;\n }\n\n private moveToNextStep(next = true) {\n let steps = this.steps;\n let activeStepIndex = this.activeStep.index;\n if (!next) {\n steps = this.steps.reverse();\n activeStepIndex = steps.findIndex(\n (step: IgcStepComponent) => step === this.activeStep\n );\n }\n\n const nextStep = steps.find(\n (step: IgcStepComponent, i: number) =>\n i > activeStepIndex && step.isAccessible\n );\n\n if (nextStep) {\n this.animateSteps(nextStep, this.activeStep);\n this.activateStep(nextStep, false);\n }\n }\n\n private handleKeydown(event: KeyboardEvent, focusedStep: IgcStepComponent) {\n const key = event.key.toLowerCase();\n\n if (this.keyDownHandlers.has(event.key)) {\n event.preventDefault();\n this.keyDownHandlers.get(event.key)?.call(this, focusedStep);\n }\n if (key === 'tab' && this.orientation === 'vertical') {\n return;\n }\n if (key === 'tab' && this.activeStep.index !== focusedStep.index) {\n this.activeStep.header.focus();\n }\n }\n\n private onHomeKey() {\n this.steps\n .filter((step: IgcStepComponent) => step.isAccessible)[0]\n ?.header?.focus();\n }\n\n private onEndKey() {\n this.steps\n .filter((step: IgcStepComponent) => step.isAccessible)\n .pop()\n ?.header?.focus();\n }\n\n private onArrowDownKeyDown(focusedStep: IgcStepComponent) {\n if (this.orientation === 'horizontal') {\n return;\n }\n this.getNextStep(focusedStep)?.header?.focus();\n }\n\n private onArrowUpKeyDown(focusedStep: IgcStepComponent) {\n if (this.orientation === 'horizontal') {\n return;\n }\n this.getPreviousStep(focusedStep)?.header?.focus();\n }\n\n private onArrowRightKeyDown(focusedStep: IgcStepComponent) {\n if (!isLTR(this) && this.orientation === 'horizontal') {\n this.getPreviousStep(focusedStep)?.header?.focus();\n } else {\n this.getNextStep(focusedStep)?.header?.focus();\n }\n }\n\n private onArrowLeftKeyDown(focusedStep: IgcStepComponent) {\n if (!isLTR(this) && this.orientation === 'horizontal') {\n this.getNextStep(focusedStep)?.header?.focus();\n } else {\n this.getPreviousStep(focusedStep)?.header?.focus();\n }\n }\n\n private getNextStep(\n focusedStep: IgcStepComponent\n ): IgcStepComponent | undefined {\n if (focusedStep.index === this.steps.length - 1) {\n return this.steps.find((step: IgcStepComponent) => step.isAccessible);\n }\n\n const nextAccessible = this.steps.find(\n (step: IgcStepComponent, i: number) =>\n i > focusedStep.index && step.isAccessible\n );\n return nextAccessible\n ? nextAccessible\n : this.steps.find((step: IgcStepComponent) => step.isAccessible);\n }\n\n private getPreviousStep(\n focusedStep: IgcStepComponent\n ): IgcStepComponent | undefined {\n if (focusedStep.index === 0) {\n return this.steps\n .filter((step: IgcStepComponent) => step.isAccessible)\n .pop();\n }\n\n let prevStep: IgcStepComponent | undefined;\n for (let i = focusedStep.index - 1; i >= 0; i--) {\n const step = this.steps[i];\n if (step.isAccessible) {\n prevStep = step;\n break;\n }\n }\n\n return prevStep\n ? prevStep\n : this.steps.filter((step: IgcStepComponent) => step.isAccessible).pop();\n }\n\n private updateStepsLinearDisabled(): void {\n const firstInvalidStep = this.steps\n .filter((step: IgcStepComponent) => !step.disabled && !step.optional)\n .find((step: IgcStepComponent) => step.invalid);\n if (firstInvalidStep) {\n this.steps.forEach((step: IgcStepComponent) => {\n if (step.index <= firstInvalidStep.index) {\n step.linearDisabled = false;\n } else {\n step.linearDisabled = true;\n }\n });\n } else {\n this.steps.forEach((step: IgcStepComponent) => {\n step.linearDisabled = false;\n });\n }\n }\n\n private updateAnimation(step: IgcStepComponent) {\n if (this.orientation === 'horizontal') {\n step.animation = this.horizontalAnimation;\n }\n\n if (this.orientation === 'vertical') {\n step.animation = this.verticalAnimation;\n }\n }\n\n private syncProperties(): void {\n this.steps.forEach((step: IgcStepComponent, index: number) => {\n step.orientation = this.orientation;\n step.stepType = this.stepType;\n step.titlePosition = this.titlePosition;\n step.contentTop = this.contentTop;\n step.index = index;\n step.active = this.activeStep === step;\n step.header?.setAttribute('aria-posinset', (index + 1).toString());\n step.header?.setAttribute('aria-setsize', this.steps.length.toString());\n step.header?.setAttribute('id', `igc-step-header-${index}`);\n step.header?.setAttribute('aria-controls', `igc-step-content-${index}`);\n if (index > 0) {\n step.previousComplete = this.steps[index - 1].complete;\n }\n step.animationDuration = this.animationDuration;\n this.updateAnimation(step);\n });\n }\n\n private stepsChanged(): void {\n this.style.setProperty('--steps-count', this.steps.length.toString());\n\n const lastActiveStep = this.steps\n .reverse()\n .find((step: IgcStepComponent) => step.active);\n if (!lastActiveStep) {\n // initially when there isn't a predefined active step or when the active step is removed\n this.activateFirstStep();\n } else {\n // activate the last step marked as active\n this.activateStep(lastActiveStep, false);\n }\n\n this.syncProperties();\n if (this.linear) {\n this.updateStepsLinearDisabled();\n }\n }\n\n /** Activates the step at a given index. */\n public navigateTo(index: number) {\n const step = this.steps[index];\n if (!step) {\n return;\n }\n this.activateStep(step, false);\n }\n\n /** Activates the next enabled step. */\n public next(): void {\n this.moveToNextStep();\n }\n\n /** Activates the previous enabled step. */\n public prev(): void {\n this.moveToNextStep(false);\n }\n\n /**\n * Resets the stepper to its initial state i.e. activates the first step.\n *\n * @remarks\n * The steps' content will not be automatically reset.\n */\n public reset(): void {\n this.steps.forEach((step) => {\n step.visited = false;\n });\n this.activateFirstStep();\n }\n\n protected override render() {\n return html`<slot @slotchange=${this.stepsChanged}></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-stepper': IgcStepperComponent;\n }\n}\n"]}
1
+ {"version":3,"file":"stepper.js","sourceRoot":"","sources":["../../../src/components/stepper/stepper.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,iBAAiB,E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AAE,CAAC;8DAK5D;AAGS;IADT,KAAK,CAAC,mBAAmB,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;kEAK1D;AA9JkB,mBAAmB;IAJvC,MAAM,CAAC;QACN,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE;QACpC,IAAI,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE;KACpC,CAAC;GACmB,mBAAmB,CAievC;eAjeoB,mBAAmB","sourcesContent":["import { LitElement, html } from 'lit';\nimport { property, queryAssignedElements } from 'lit/decorators.js';\n\nimport { themes } from '../../theming/theming-decorator.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 { isLTR } from '../common/util.js';\nimport type {\n HorizontalTransitionAnimation,\n StepperOrientation,\n StepperStepType,\n StepperTitlePosition,\n StepperVerticalAnimation,\n} from '../types.js';\nimport IgcStepComponent from './step.js';\nimport type { IgcStepperComponentEventMap } from './stepper.common.js';\nimport { styles } from './themes/stepper/stepper.base.css.js';\nimport { styles as bootstrap } from './themes/stepper/stepper.bootstrap.css.js';\nimport { styles as fluent } from './themes/stepper/stepper.fluent.css.js';\nimport { styles as indigo } from './themes/stepper/stepper.indigo.css.js';\n\n/**\n * IgxStepper provides a wizard-like workflow by dividing content into logical steps.\n *\n * @remarks\n * The stepper component allows the user to navigate between multiple steps.\n * It supports horizontal and vertical orientation as well as keyboard navigation and provides API methods to control the active step.\n *\n * @element igc-stepper\n *\n * @slot - Renders the step components inside default slot.\n *\n * @fires igcActiveStepChanging - Emitted when the active step is about to change.\n * @fires igcActiveStepChanged - Emitted when the active step is changed.\n */\n@themes({\n light: { bootstrap, fluent, indigo },\n dark: { bootstrap, fluent, indigo },\n})\nexport default class IgcStepperComponent extends EventEmitterMixin<\n IgcStepperComponentEventMap,\n Constructor<LitElement>\n>(LitElement) {\n public static readonly tagName = 'igc-stepper';\n protected static styles = styles;\n\n /* blazorSuppress */\n public static register() {\n registerComponent(IgcStepperComponent, IgcStepComponent);\n }\n\n // biome-ignore lint/complexity/noBannedTypes: No easy fix as the callback shapes are wildly different\n private readonly keyDownHandlers: Map<string, Function> = new Map(\n Object.entries({\n Enter: this.activateStep,\n Space: this.activateStep,\n SpaceBar: this.activateStep,\n ' ': this.activateStep,\n ArrowUp: this.onArrowUpKeyDown,\n ArrowDown: this.onArrowDownKeyDown,\n ArrowLeft: this.onArrowLeftKeyDown,\n ArrowRight: this.onArrowRightKeyDown,\n Home: this.onHomeKey,\n End: this.onEndKey,\n })\n );\n\n private activeStep!: IgcStepComponent;\n\n /** Returns all of the stepper's steps. */\n @queryAssignedElements({ selector: 'igc-step' })\n public steps!: Array<IgcStepComponent>;\n\n /** Gets/Sets the orientation of the stepper.\n *\n * @remarks\n * Default value is `horizontal`.\n */\n @property({ reflect: true })\n public orientation: StepperOrientation = 'horizontal';\n\n /** Get/Set the type of the steps.\n *\n * @remarks\n * Default value is `full`.\n */\n @property({ reflect: true, attribute: 'step-type' })\n public stepType: StepperStepType = 'full';\n\n /**\n * Get/Set whether the stepper is linear.\n *\n * @remarks\n * If the stepper is in linear mode and if the active step is valid only then the user is able to move forward.\n */\n @property({ type: Boolean })\n public linear = false;\n\n /**\n * Get/Set whether the content is displayed above the steps.\n *\n * @remarks\n * Default value is `false` and the content is below the steps.\n */\n @property({ reflect: true, type: Boolean, attribute: 'content-top' })\n public contentTop = false;\n\n /**\n * The animation type when in vertical mode.\n * @attr vertical-animation\n */\n @property({ attribute: 'vertical-animation' })\n public verticalAnimation: StepperVerticalAnimation = 'grow';\n\n /**\n * The animation type when in horizontal mode.\n * @attr horizontal-animation\n */\n @property({ attribute: 'horizontal-animation' })\n public horizontalAnimation: HorizontalTransitionAnimation = 'slide';\n\n /**\n * The animation duration in either vertical or horizontal mode.\n * @attr animation-duration\n */\n @property({ attribute: 'animation-duration', type: Number })\n public animationDuration = 320;\n\n /**\n * Get/Set the position of the steps title.\n *\n * @remarks\n * The default value is auto.\n * When the stepper is horizontally orientated the title is positioned below the indicator.\n * When the stepper is horizontally orientated the title is positioned on the right side of the indicator.\n */\n @property({ reflect: false, attribute: 'title-position' })\n public titlePosition: StepperTitlePosition = 'auto';\n\n @watch('orientation', { waitUntilFirstUpdate: true })\n protected orientationChange(): void {\n this.setAttribute('aria-orientation', this.orientation);\n this.steps.forEach((step: IgcStepComponent) => {\n step.orientation = this.orientation;\n this.updateAnimation(step);\n });\n }\n\n @watch('stepType', { waitUntilFirstUpdate: true })\n protected stepTypeChange(): void {\n this.steps.forEach((step: IgcStepComponent) => {\n step.stepType = this.stepType;\n });\n }\n\n @watch('titlePosition', { waitUntilFirstUpdate: true })\n protected titlePositionChange(): void {\n this.steps.forEach((step: IgcStepComponent) => {\n step.titlePosition = this.titlePosition;\n });\n }\n\n @watch('contentTop', { waitUntilFirstUpdate: true })\n protected contentTopChange(): void {\n this.steps.forEach((step: IgcStepComponent) => {\n step.contentTop = this.contentTop;\n });\n }\n\n @watch('linear', { waitUntilFirstUpdate: true })\n protected linearChange(): void {\n this.steps.forEach((step: IgcStepComponent) => {\n step.linearDisabled = this.linear;\n if (step.index <= this.activeStep.index) {\n step.visited = true;\n } else {\n step.visited = false;\n }\n });\n if (this.linear) {\n this.updateStepsLinearDisabled();\n }\n }\n\n @watch('verticalAnimation', { waitUntilFirstUpdate: true })\n @watch('horizontalAnimation', { waitUntilFirstUpdate: true })\n protected animationTypeChange() {\n this.steps.forEach((step: IgcStepComponent) => {\n this.updateAnimation(step);\n });\n }\n\n @watch('animationDuration', { waitUntilFirstUpdate: true })\n protected animationDurationChange() {\n this.steps.forEach((step: IgcStepComponent) => {\n step.animationDuration = this.animationDuration;\n });\n }\n\n constructor() {\n super();\n\n this.addEventListener('stepActiveChanged', (event: any) => {\n event.stopPropagation();\n this.activateStep(event.target, event.detail);\n });\n\n this.addEventListener('stepDisabledInvalidChanged', (event: any) => {\n event.stopPropagation();\n if (this.linear) {\n this.updateStepsLinearDisabled();\n }\n });\n\n this.addEventListener('stepCompleteChanged', (event: any) => {\n event.stopPropagation();\n const nextStep = this.steps[event.target.index + 1];\n if (nextStep) {\n nextStep.previousComplete = event.target.complete;\n }\n });\n\n this.addEventListener('stepHeaderKeydown', (event: any) => {\n event.stopPropagation();\n this.handleKeydown(event.detail.event, event.detail.focusedStep);\n });\n }\n\n public override connectedCallback(): void {\n super.connectedCallback();\n this.setAttribute('role', 'tablist');\n this.setAttribute('aria-orientation', this.orientation);\n }\n\n private activateFirstStep() {\n const firstEnabledStep = this.steps.find(\n (s: IgcStepComponent) => !s.disabled\n );\n if (firstEnabledStep) {\n this.activateStep(firstEnabledStep, false);\n }\n }\n\n private animateSteps(\n nextStep: IgcStepComponent,\n currentStep: IgcStepComponent\n ) {\n if (nextStep.index > currentStep.index) {\n // Animate steps in ascending/next direction\n currentStep.toggleAnimation('out');\n nextStep.toggleAnimation('in');\n } else {\n // Animate steps in descending/previous direction\n currentStep.toggleAnimation('in', 'reverse');\n nextStep.toggleAnimation('out', 'reverse');\n }\n }\n\n private async activateStep(step: IgcStepComponent, shouldEmit = true) {\n if (step === this.activeStep) {\n return;\n }\n\n if (shouldEmit) {\n const args = {\n detail: {\n owner: this,\n oldIndex: this.activeStep.index,\n newIndex: step.index,\n },\n cancelable: true,\n };\n\n this.animateSteps(step, this.activeStep);\n\n const allowed = this.emitEvent('igcActiveStepChanging', args);\n\n if (!allowed) {\n return;\n }\n this.changeActiveStep(step);\n this.emitEvent('igcActiveStepChanged', {\n detail: { owner: this, index: step.index },\n });\n } else {\n this.changeActiveStep(step);\n }\n }\n\n private changeActiveStep(step: IgcStepComponent) {\n if (this.activeStep) {\n this.activeStep.active = false;\n }\n step.active = true;\n step.visited = true;\n this.activeStep = step;\n }\n\n private moveToNextStep(next = true) {\n let steps = this.steps;\n let activeStepIndex = this.activeStep.index;\n if (!next) {\n steps = this.steps.reverse();\n activeStepIndex = steps.findIndex(\n (step: IgcStepComponent) => step === this.activeStep\n );\n }\n\n const nextStep = steps.find(\n (step: IgcStepComponent, i: number) =>\n i > activeStepIndex && step.isAccessible\n );\n\n if (nextStep) {\n this.animateSteps(nextStep, this.activeStep);\n this.activateStep(nextStep, false);\n }\n }\n\n private handleKeydown(event: KeyboardEvent, focusedStep: IgcStepComponent) {\n const key = event.key.toLowerCase();\n\n if (this.keyDownHandlers.has(event.key)) {\n event.preventDefault();\n this.keyDownHandlers.get(event.key)?.call(this, focusedStep);\n }\n if (key === 'tab' && this.orientation === 'vertical') {\n return;\n }\n if (key === 'tab' && this.activeStep.index !== focusedStep.index) {\n this.activeStep.header.focus();\n }\n }\n\n private onHomeKey() {\n this.steps\n .filter((step: IgcStepComponent) => step.isAccessible)[0]\n ?.header?.focus();\n }\n\n private onEndKey() {\n this.steps\n .filter((step: IgcStepComponent) => step.isAccessible)\n .pop()\n ?.header?.focus();\n }\n\n private onArrowDownKeyDown(focusedStep: IgcStepComponent) {\n if (this.orientation === 'horizontal') {\n return;\n }\n this.getNextStep(focusedStep)?.header?.focus();\n }\n\n private onArrowUpKeyDown(focusedStep: IgcStepComponent) {\n if (this.orientation === 'horizontal') {\n return;\n }\n this.getPreviousStep(focusedStep)?.header?.focus();\n }\n\n private onArrowRightKeyDown(focusedStep: IgcStepComponent) {\n if (!isLTR(this) && this.orientation === 'horizontal') {\n this.getPreviousStep(focusedStep)?.header?.focus();\n } else {\n this.getNextStep(focusedStep)?.header?.focus();\n }\n }\n\n private onArrowLeftKeyDown(focusedStep: IgcStepComponent) {\n if (!isLTR(this) && this.orientation === 'horizontal') {\n this.getNextStep(focusedStep)?.header?.focus();\n } else {\n this.getPreviousStep(focusedStep)?.header?.focus();\n }\n }\n\n private getNextStep(\n focusedStep: IgcStepComponent\n ): IgcStepComponent | undefined {\n if (focusedStep.index === this.steps.length - 1) {\n return this.steps.find((step: IgcStepComponent) => step.isAccessible);\n }\n\n const nextAccessible = this.steps.find(\n (step: IgcStepComponent, i: number) =>\n i > focusedStep.index && step.isAccessible\n );\n return nextAccessible\n ? nextAccessible\n : this.steps.find((step: IgcStepComponent) => step.isAccessible);\n }\n\n private getPreviousStep(\n focusedStep: IgcStepComponent\n ): IgcStepComponent | undefined {\n if (focusedStep.index === 0) {\n return this.steps\n .filter((step: IgcStepComponent) => step.isAccessible)\n .pop();\n }\n\n let prevStep: IgcStepComponent | undefined;\n for (let i = focusedStep.index - 1; i >= 0; i--) {\n const step = this.steps[i];\n if (step.isAccessible) {\n prevStep = step;\n break;\n }\n }\n\n return prevStep\n ? prevStep\n : this.steps.filter((step: IgcStepComponent) => step.isAccessible).pop();\n }\n\n private updateStepsLinearDisabled(): void {\n const firstInvalidStep = this.steps\n .filter((step: IgcStepComponent) => !step.disabled && !step.optional)\n .find((step: IgcStepComponent) => step.invalid);\n if (firstInvalidStep) {\n this.steps.forEach((step: IgcStepComponent) => {\n if (step.index <= firstInvalidStep.index) {\n step.linearDisabled = false;\n } else {\n step.linearDisabled = true;\n }\n });\n } else {\n this.steps.forEach((step: IgcStepComponent) => {\n step.linearDisabled = false;\n });\n }\n }\n\n private updateAnimation(step: IgcStepComponent) {\n if (this.orientation === 'horizontal') {\n step.animation = this.horizontalAnimation;\n }\n\n if (this.orientation === 'vertical') {\n step.animation = this.verticalAnimation;\n }\n }\n\n private syncProperties(): void {\n this.steps.forEach((step: IgcStepComponent, index: number) => {\n step.orientation = this.orientation;\n step.stepType = this.stepType;\n step.titlePosition = this.titlePosition;\n step.contentTop = this.contentTop;\n step.index = index;\n step.active = this.activeStep === step;\n step.header?.setAttribute('aria-posinset', (index + 1).toString());\n step.header?.setAttribute('aria-setsize', this.steps.length.toString());\n step.header?.setAttribute('id', `igc-step-header-${index}`);\n step.header?.setAttribute('aria-controls', `igc-step-content-${index}`);\n if (index > 0) {\n step.previousComplete = this.steps[index - 1].complete;\n }\n step.animationDuration = this.animationDuration;\n this.updateAnimation(step);\n });\n }\n\n private stepsChanged(): void {\n this.style.setProperty('--steps-count', this.steps.length.toString());\n\n const lastActiveStep = this.steps\n .reverse()\n .find((step: IgcStepComponent) => step.active);\n if (!lastActiveStep) {\n // initially when there isn't a predefined active step or when the active step is removed\n this.activateFirstStep();\n } else {\n // activate the last step marked as active\n this.activateStep(lastActiveStep, false);\n }\n\n this.syncProperties();\n if (this.linear) {\n this.updateStepsLinearDisabled();\n }\n }\n\n /** Activates the step at a given index. */\n public navigateTo(index: number) {\n const step = this.steps[index];\n if (!step) {\n return;\n }\n this.activateStep(step, false);\n }\n\n /** Activates the next enabled step. */\n public next(): void {\n this.moveToNextStep();\n }\n\n /** Activates the previous enabled step. */\n public prev(): void {\n this.moveToNextStep(false);\n }\n\n /**\n * Resets the stepper to its initial state i.e. activates the first step.\n *\n * @remarks\n * The steps' content will not be automatically reset.\n */\n public reset(): void {\n this.steps.forEach((step) => {\n step.visited = false;\n });\n this.activateFirstStep();\n }\n\n protected override render() {\n return html`<slot @slotchange=${this.stepsChanged}></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-stepper': IgcStepperComponent;\n }\n}\n"]}
@@ -0,0 +1,66 @@
1
+ import type { Ref } from 'lit/directives/ref.js';
2
+ import type IgcTabComponent from './tab.js';
3
+ import type IgcTabsComponent from './tabs.js';
4
+ declare class TabsHelpers {
5
+ private static readonly SCROLL_AMOUNT;
6
+ private readonly _host;
7
+ private readonly _container;
8
+ private readonly _indicator;
9
+ private _styleProperties;
10
+ private _hasScrollButtons;
11
+ private _scrollButtonsDisabled;
12
+ private _isLeftToRight;
13
+ /**
14
+ * Returns the DOM container holding the tabs headers.
15
+ */
16
+ get container(): HTMLElement;
17
+ /**
18
+ * Returns the selected indicator DOM element.
19
+ */
20
+ get indicator(): HTMLElement;
21
+ /**
22
+ * Returns the internal CSS variables used for the layout of the tabs component.
23
+ */
24
+ get styleProperties(): {
25
+ '--_tabs-count': string;
26
+ '--_ig-tabs-width': string;
27
+ };
28
+ /**
29
+ * Whether the scroll buttons of the tabs header strip should be shown.
30
+ */
31
+ get hasScrollButtons(): boolean;
32
+ /**
33
+ * Returns the disabled state of the tabs header strip scroll buttons.
34
+ */
35
+ get scrollButtonsDisabled(): {
36
+ start: boolean;
37
+ end: boolean;
38
+ };
39
+ get isLeftToRightChanged(): boolean;
40
+ constructor(host: IgcTabsComponent, container: Ref<HTMLElement>, indicator: Ref<HTMLElement>);
41
+ /**
42
+ * Sets the internal CSS variables used for the layout of the tabs component.
43
+ * Triggers an update cycle (rerender) of the `igc-tabs` component.
44
+ */
45
+ setStyleProperties(): void;
46
+ /**
47
+ * Sets the type of the `scroll-snap-align` CSS property for the tabs header strip.
48
+ */
49
+ setScrollSnap(type?: 'start' | 'end'): void;
50
+ /**
51
+ * Scrolls the tabs header strip in the given direction with `scroll-snap-align` set.
52
+ */
53
+ scrollTabs(direction: 'start' | 'end'): void;
54
+ /**
55
+ * Updates the state of the tabs header strip scroll buttons - visibility and active state.
56
+ * Triggers an update cycle (rerender) of the `igc-tabs` component.
57
+ */
58
+ setScrollButtonState(): void;
59
+ /**
60
+ * Updates the indicator DOM element styles based on the current "active" tab.
61
+ */
62
+ setIndicator(active?: IgcTabComponent): Promise<void>;
63
+ }
64
+ export declare function createTabHelpers(host: IgcTabsComponent, container: Ref<HTMLElement>, indicator: Ref<HTMLElement>): TabsHelpers;
65
+ export declare function getTabHeader(tab: IgcTabComponent): HTMLElement;
66
+ export {};