igniteui-webcomponents 7.0.1 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/components/combo/themes/shared/combo.common.css.js +1 -1
- package/components/combo/themes/shared/combo.common.css.js.map +1 -1
- package/components/combo/types.js.map +1 -1
- package/components/common/definitions/defineAllComponents.js +4 -0
- package/components/common/definitions/defineAllComponents.js.map +1 -1
- package/components/common/mixins/forms/form-transformers.js.map +1 -1
- package/components/common/util.d.ts +11 -1
- package/components/common/util.js +3 -0
- package/components/common/util.js.map +1 -1
- package/components/date-picker/date-picker.js.map +1 -1
- package/components/file-input/file-input.js.map +1 -1
- package/components/highlight/highlight.d.ts +130 -0
- package/components/highlight/highlight.js +77 -0
- package/components/highlight/highlight.js.map +1 -0
- package/components/highlight/service.d.ts +58 -0
- package/components/highlight/service.js +132 -0
- package/components/highlight/service.js.map +1 -0
- package/components/highlight/themes/dark/highlight.bootstrap.css.js +3 -0
- package/components/highlight/themes/dark/highlight.bootstrap.css.js.map +1 -0
- package/components/highlight/themes/dark/highlight.fluent.css.d.ts +1 -0
- package/components/highlight/themes/dark/highlight.fluent.css.js +3 -0
- package/components/highlight/themes/dark/highlight.fluent.css.js.map +1 -0
- package/components/highlight/themes/dark/highlight.indigo.css.d.ts +1 -0
- package/components/highlight/themes/dark/highlight.indigo.css.js +3 -0
- package/components/highlight/themes/dark/highlight.indigo.css.js.map +1 -0
- package/components/highlight/themes/dark/highlight.material.css.d.ts +1 -0
- package/components/highlight/themes/dark/highlight.material.css.js +3 -0
- package/components/highlight/themes/dark/highlight.material.css.js.map +1 -0
- package/components/highlight/themes/dark/highlight.shared.css.d.ts +1 -0
- package/components/highlight/themes/dark/highlight.shared.css.js +3 -0
- package/components/highlight/themes/dark/highlight.shared.css.js.map +1 -0
- package/components/highlight/themes/light/highlight.bootstrap.css.d.ts +1 -0
- package/components/highlight/themes/light/highlight.bootstrap.css.js +3 -0
- package/components/highlight/themes/light/highlight.bootstrap.css.js.map +1 -0
- package/components/highlight/themes/light/highlight.fluent.css.d.ts +1 -0
- package/components/highlight/themes/light/highlight.fluent.css.js +3 -0
- package/components/highlight/themes/light/highlight.fluent.css.js.map +1 -0
- package/components/highlight/themes/light/highlight.indigo.css.d.ts +1 -0
- package/components/highlight/themes/light/highlight.indigo.css.js +3 -0
- package/components/highlight/themes/light/highlight.indigo.css.js.map +1 -0
- package/components/highlight/themes/light/highlight.material.css.d.ts +1 -0
- package/components/highlight/themes/light/highlight.material.css.js +3 -0
- package/components/highlight/themes/light/highlight.material.css.js.map +1 -0
- package/components/highlight/themes/light/highlight.shared.css.d.ts +1 -0
- package/components/highlight/themes/light/highlight.shared.css.js +3 -0
- package/components/highlight/themes/light/highlight.shared.css.js.map +1 -0
- package/components/highlight/themes/shared/highlight.common.css.d.ts +1 -0
- package/components/highlight/themes/shared/highlight.common.css.js +3 -0
- package/components/highlight/themes/shared/highlight.common.css.js.map +1 -0
- package/components/highlight/themes/themes.d.ts +2 -0
- package/components/highlight/themes/themes.js +47 -0
- package/components/highlight/themes/themes.js.map +1 -0
- package/components/splitter/splitter.d.ts +240 -0
- package/components/splitter/splitter.js +608 -0
- package/components/splitter/splitter.js.map +1 -0
- package/components/splitter/themes/dark/splitter.bootstrap.css.d.ts +1 -0
- package/components/splitter/themes/dark/splitter.bootstrap.css.js +3 -0
- package/components/splitter/themes/dark/splitter.bootstrap.css.js.map +1 -0
- package/components/splitter/themes/dark/splitter.fluent.css.d.ts +1 -0
- package/components/splitter/themes/dark/splitter.fluent.css.js +3 -0
- package/components/splitter/themes/dark/splitter.fluent.css.js.map +1 -0
- package/components/splitter/themes/dark/splitter.indigo.css.d.ts +1 -0
- package/components/splitter/themes/dark/splitter.indigo.css.js +3 -0
- package/components/splitter/themes/dark/splitter.indigo.css.js.map +1 -0
- package/components/splitter/themes/dark/splitter.material.css.d.ts +1 -0
- package/components/splitter/themes/dark/splitter.material.css.js +3 -0
- package/components/splitter/themes/dark/splitter.material.css.js.map +1 -0
- package/components/splitter/themes/dark/splitter.shared.css.d.ts +1 -0
- package/components/splitter/themes/dark/splitter.shared.css.js +3 -0
- package/components/splitter/themes/dark/splitter.shared.css.js.map +1 -0
- package/components/splitter/themes/light/splitter.bootstrap.css.d.ts +1 -0
- package/components/splitter/themes/light/splitter.bootstrap.css.js +3 -0
- package/components/splitter/themes/light/splitter.bootstrap.css.js.map +1 -0
- package/components/splitter/themes/light/splitter.fluent.css.d.ts +1 -0
- package/components/splitter/themes/light/splitter.fluent.css.js +3 -0
- package/components/splitter/themes/light/splitter.fluent.css.js.map +1 -0
- package/components/splitter/themes/light/splitter.indigo.css.d.ts +1 -0
- package/components/splitter/themes/light/splitter.indigo.css.js +3 -0
- package/components/splitter/themes/light/splitter.indigo.css.js.map +1 -0
- package/components/splitter/themes/light/splitter.material.css.d.ts +1 -0
- package/components/splitter/themes/light/splitter.material.css.js +3 -0
- package/components/splitter/themes/light/splitter.material.css.js.map +1 -0
- package/components/splitter/themes/light/splitter.shared.css.d.ts +1 -0
- package/components/splitter/themes/light/splitter.shared.css.js +3 -0
- package/components/splitter/themes/light/splitter.shared.css.js.map +1 -0
- package/components/splitter/themes/shared/splitter.common.css.d.ts +1 -0
- package/components/splitter/themes/shared/splitter.common.css.js +3 -0
- package/components/splitter/themes/shared/splitter.common.css.js.map +1 -0
- package/components/splitter/themes/shared/splitter.indigo.css.d.ts +1 -0
- package/components/splitter/themes/shared/splitter.indigo.css.js +3 -0
- package/components/splitter/themes/shared/splitter.indigo.css.js.map +1 -0
- package/components/splitter/themes/splitter.base.css.d.ts +1 -0
- package/components/splitter/themes/splitter.base.css.js +3 -0
- package/components/splitter/themes/splitter.base.css.js.map +1 -0
- package/components/splitter/themes/themes.d.ts +2 -0
- package/components/splitter/themes/themes.js +48 -0
- package/components/splitter/themes/themes.js.map +1 -0
- package/components/splitter/types.d.ts +39 -0
- package/components/splitter/types.js +2 -0
- package/components/splitter/types.js.map +1 -0
- package/components/stepper/{animations.d.ts → common/animations.d.ts} +2 -2
- package/components/stepper/{animations.js → common/animations.js} +2 -2
- package/components/stepper/common/animations.js.map +1 -0
- package/components/stepper/common/context.d.ts +9 -0
- package/components/stepper/common/context.js +3 -0
- package/components/stepper/common/context.js.map +1 -0
- package/components/stepper/common/state.d.ts +67 -0
- package/components/stepper/common/state.js +134 -0
- package/components/stepper/common/state.js.map +1 -0
- package/components/stepper/common/types.js +2 -0
- package/components/stepper/common/types.js.map +1 -0
- package/components/stepper/step.d.ts +101 -55
- package/components/stepper/step.js +145 -160
- package/components/stepper/step.js.map +1 -1
- package/components/stepper/stepper.d.ts +98 -53
- package/components/stepper/stepper.js +168 -308
- package/components/stepper/stepper.js.map +1 -1
- package/components/stepper/themes/step/shared/step.bootstrap.css.js +1 -1
- package/components/stepper/themes/step/shared/step.bootstrap.css.js.map +1 -1
- package/components/stepper/themes/step/shared/step.common.css.js +1 -1
- package/components/stepper/themes/step/shared/step.common.css.js.map +1 -1
- package/components/stepper/themes/step/shared/step.indigo.css.js +1 -1
- package/components/stepper/themes/step/shared/step.indigo.css.js.map +1 -1
- package/components/stepper/themes/step/themes.js +2 -3
- package/components/stepper/themes/step/themes.js.map +1 -1
- package/components/tabs/themes/tabs.base.css.js +1 -1
- package/components/tabs/themes/tabs.base.css.js.map +1 -1
- package/components/textarea/textarea.js.map +1 -1
- package/components/types.d.ts +1 -0
- package/components/types.js.map +1 -1
- package/components/visually-hidden/visually-hidden.d.ts +49 -0
- package/components/visually-hidden/visually-hidden.js +26 -0
- package/components/visually-hidden/visually-hidden.js.map +1 -0
- package/custom-elements.json +2681 -379
- package/igniteui-webcomponents.css-data.json +2 -2
- package/igniteui-webcomponents.html-data.json +1 -1
- package/index.d.ts +6 -2
- package/index.js +2 -0
- package/index.js.map +1 -1
- package/package.json +3 -1
- package/web-types.json +3 -3
- package/components/stepper/animations.js.map +0 -1
- package/components/stepper/stepper.common.js +0 -2
- package/components/stepper/stepper.common.js.map +0 -1
- package/components/stepper/themes/step/shared/step.fluent.css.js +0 -3
- package/components/stepper/themes/step/shared/step.fluent.css.js.map +0 -1
- /package/components/{stepper/themes/step/shared/step.fluent.css.d.ts → highlight/themes/dark/highlight.bootstrap.css.d.ts} +0 -0
- /package/components/stepper/{stepper.common.d.ts → common/types.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stepper.js","sourceRoot":"","sources":["../../../src/components/stepper/stepper.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,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,OAAO,gBAAgB,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAC9D,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,wCAAwC,CAAC;AAiB1E,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,iBAAiB,CAGhE,UAAU,CAAC;aACY,YAAO,GAAG,aAAa,AAAhB,CAAiB;aAC9B,WAAM,GAAG,MAAM,AAAT,CAAU;IAG1B,MAAM,CAAC,QAAQ;QACpB,iBAAiB,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,CAAC;IAC3D,C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E,OAAO,EAAE,CAAC;mDACN;AASf;IADN,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;uDAC3C;AAOnB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC;8DACc;AAOrD;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,sBAAsB,EAAE,CAAC;gEACoB;AAO7D;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,oBAAoB,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8DAC7B;AAWxB;IADN,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;0DACN;AAG1C;IADT,KAAK,CAAC,aAAa,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;4DAOpD;AAGS;IADT,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;yDAKjD;AAGS;IADT,KAAK,CAAC,eAAe,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;8DAKtD;AAGS;IADT,KAAK,CAAC,YAAY,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;2DAKnD;AAGS;IADT,KAAK,CAAC,QAAQ,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;uDAiB/C;AAIS;IAFT,KAAK,CAAC,mBAAmB,EAAE,EAAE,oBAAoB,EAAE,IAAI,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","sourcesContent":["import { html, LitElement } from 'lit';\nimport { property, queryAssignedElements } from 'lit/decorators.js';\n\nimport { addThemingController } from '../../theming/theming-controller.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\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 private _shouldUpdateLinearState = false;\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 if (!this.activeStep) {\n this._shouldUpdateLinearState = true;\n return;\n }\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 addThemingController(this, {\n light: { bootstrap, fluent, indigo },\n dark: { bootstrap, fluent, indigo },\n });\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._shouldUpdateLinearState) {\n this.linearChange();\n this._shouldUpdateLinearState = false;\n }\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,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EACL,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,OAAO,EACP,MAAM,EACN,OAAO,GACR,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,KAAK,EACL,OAAO,EACP,KAAK,EACL,IAAI,EACJ,IAAI,GACL,MAAM,mBAAmB,CAAC;AAQ3B,OAAO,EAAE,eAAe,EAAE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AAC,CAAC;IAC9B,CAAC;IAQM,KAAK;QACV,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;IAIkB,MAAM;QACvB,OAAO,IAAI,CAAA,eAAe,CAAC;IAC7B,CAAC;;AAjVM;IADN,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wDAC0B;AAS/C;IADN,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;qDACV;AAYnC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;mDACrB;AASf;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;uDAC3C;AASnB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC;8DACc;AASrD;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,sBAAsB,EAAE,CAAC;gEACoB;AAS7D;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC;8DAC7B;AAaxB;IADN,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;0DACN","sourcesContent":["import { ContextProvider } from '@lit/context';\nimport { html, LitElement, type PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport { addInternalsController } from '../common/controllers/internals.js';\nimport {\n addKeybindings,\n arrowDown,\n arrowLeft,\n arrowRight,\n arrowUp,\n endKey,\n homeKey,\n} from '../common/controllers/key-bindings.js';\nimport { addSlotController, setSlots } from '../common/controllers/slot.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 {\n addSafeEventListener,\n findElementFromEventPath,\n first,\n getRoot,\n isLTR,\n last,\n wrap,\n} from '../common/util.js';\nimport type {\n HorizontalTransitionAnimation,\n StepperOrientation,\n StepperStepType,\n StepperTitlePosition,\n StepperVerticalAnimation,\n} from '../types.js';\nimport { STEPPER_CONTEXT } from './common/context.js';\nimport { createStepperState } from './common/state.js';\nimport type {\n IgcActiveStepChangedEventArgs,\n IgcActiveStepChangingEventArgs,\n IgcStepperComponentEventMap,\n} from './common/types.js';\nimport IgcStepComponent from './step.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\nconst STEPPER_SYNC_PROPERTIES: (keyof IgcStepperComponent)[] = [\n 'orientation',\n 'stepType',\n 'contentTop',\n 'verticalAnimation',\n 'horizontalAnimation',\n 'animationDuration',\n 'titlePosition',\n];\n\n/**\n * A stepper component that 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 `igc-step` elements.\n * It supports horizontal and vertical orientation, linear and non-linear navigation,\n * keyboard navigation, and provides API methods to control the active step.\n *\n * In linear mode, the user can only advance to the next step if the current step is valid\n * (not marked as `invalid`).\n *\n * @element igc-stepper\n *\n * @slot - Renders `igc-step` components inside the default slot.\n *\n * @fires igcActiveStepChanging - Emitted when the active step is about to change. Cancelable.\n * @fires igcActiveStepChanged - Emitted after the active step has changed.\n *\n * @example\n * ```html\n * <igc-stepper>\n * <igc-step>\n * <span slot=\"title\">Step 1</span>\n * <p>Step 1 content</p>\n * </igc-step>\n * <igc-step>\n * <span slot=\"title\">Step 2</span>\n * <p>Step 2 content</p>\n * </igc-step>\n * </igc-stepper>\n * ```\n *\n * @example Linear stepper with vertical orientation\n * ```html\n * <igc-stepper orientation=\"vertical\" linear>\n * <igc-step complete>\n * <span slot=\"title\">Completed step</span>\n * <p>This step is already complete.</p>\n * </igc-step>\n * <igc-step active>\n * <span slot=\"title\">Current step</span>\n * <p>Fill in the details to proceed.</p>\n * </igc-step>\n * <igc-step>\n * <span slot=\"title\">Next step</span>\n * <p>Upcoming content.</p>\n * </igc-step>\n * </igc-stepper>\n * ```\n */\nexport default class IgcStepperComponent extends EventEmitterMixin<\n IgcStepperComponentEventMap,\n Constructor<LitElement>\n>(LitElement) {\n public static readonly tagName = 'igc-stepper';\n public static styles = styles;\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(IgcStepperComponent, IgcStepComponent);\n }\n\n //#region Internal state and properties\n\n private readonly _state = createStepperState();\n\n private readonly _contextProvider = new ContextProvider(this, {\n context: STEPPER_CONTEXT,\n initialValue: {\n stepper: this,\n state: this._state,\n },\n });\n\n private readonly _internals = addInternalsController(this, {\n initialARIA: {\n role: 'tablist',\n },\n });\n\n private readonly _slots = addSlotController(this, {\n slots: setSlots(),\n onChange: this._handleSlotChange,\n });\n\n private get _isHorizontal(): boolean {\n return this.orientation === 'horizontal';\n }\n\n //#endregion\n\n //#region Public attributes and properties\n\n /** Returns all of the stepper's steps. */\n public get steps(): readonly IgcStepComponent[] {\n return this._state.steps;\n }\n\n /**\n * The orientation of the stepper.\n *\n * @attr orientation\n * @default 'horizontal'\n */\n @property({ reflect: true })\n public orientation: StepperOrientation = 'horizontal';\n\n /**\n * The visual type of the steps.\n *\n * @attr step-type\n * @default 'full'\n */\n @property({ reflect: true, attribute: 'step-type' })\n public stepType: StepperStepType = 'full';\n\n /**\n * 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 * @attr linear\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public linear = false;\n\n /**\n * Whether the content is displayed above the steps.\n *\n * @attr content-top\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'content-top' })\n public contentTop = false;\n\n /**\n * The animation type when in vertical mode.\n *\n * @attr vertical-animation\n * @default 'grow'\n */\n @property({ attribute: 'vertical-animation' })\n public verticalAnimation: StepperVerticalAnimation = 'grow';\n\n /**\n * The animation type when in horizontal mode.\n *\n * @attr horizontal-animation\n * @default 'slide'\n */\n @property({ attribute: 'horizontal-animation' })\n public horizontalAnimation: HorizontalTransitionAnimation = 'slide';\n\n /**\n * The animation duration in either vertical or horizontal mode in milliseconds.\n *\n * @attr animation-duration\n * @default 320\n */\n @property({ type: Number, attribute: 'animation-duration' })\n public animationDuration = 320;\n\n /**\n * The position of the steps title.\n *\n * @remarks\n * When the stepper is horizontally orientated the title is positioned below the indicator.\n * When the stepper is vertically orientated the title is positioned on the right side of the indicator.\n *\n * @attr title-position\n * @default 'auto'\n */\n @property({ reflect: false, attribute: 'title-position' })\n public titlePosition: StepperTitlePosition = 'auto';\n\n //#endregion\n\n constructor() {\n super();\n\n addSafeEventListener(this, 'click', this._handleInteraction);\n\n addThemingController(this, {\n light: { bootstrap, fluent, indigo },\n dark: { bootstrap, fluent, indigo },\n });\n\n addKeybindings(this, {\n skip: this._skipKeyboard,\n })\n .set(arrowUp, this._handleArrowUp)\n .set(arrowDown, this._handleArrowDown)\n .set(arrowLeft, this._handleArrowLeft)\n .set(arrowRight, this._handleArrowRight)\n .set(homeKey, this._handleHomeKey)\n .set(endKey, this._handleEndKey)\n .setActivateHandler(this._handleInteraction);\n }\n\n //#region Lifecycle hooks\n\n protected override update(properties: PropertyValues<this>): void {\n this._syncStepperAttributes(properties);\n\n if (properties.has('orientation')) {\n this._internals.setARIA({ ariaOrientation: this.orientation });\n }\n\n if (properties.has('linear')) {\n this._state.setVisitedState(this.linear);\n }\n\n super.update(properties);\n }\n\n //#endregion\n\n //#region Keyboard navigation handlers\n\n private _skipKeyboard(_: Element, event: KeyboardEvent): boolean {\n return !findElementFromEventPath('[data-step-header]', event);\n }\n\n private _handleHomeKey(): void {\n this._getStepHeader(first(this._state.accessibleSteps))?.focus();\n }\n\n private _handleEndKey(): void {\n this._getStepHeader(last(this._state.accessibleSteps))?.focus();\n }\n\n private _handleArrowDown(): void {\n if (!this._isHorizontal) {\n const step = this._getActiveStepComponent();\n\n if (step) {\n this._getStepHeader(this._getNextStep(step))?.focus();\n }\n }\n }\n\n private _handleArrowUp(): void {\n if (!this._isHorizontal) {\n const step = this._getActiveStepComponent();\n\n if (step) {\n this._getStepHeader(this._getPreviousStep(step))?.focus();\n }\n }\n }\n\n private _handleArrowLeft(): void {\n const step = this._getActiveStepComponent();\n\n if (step) {\n const next = isLTR(this)\n ? this._getPreviousStep(step)\n : this._getNextStep(step);\n\n this._getStepHeader(next)?.focus();\n }\n }\n\n private _handleArrowRight(): void {\n const step = this._getActiveStepComponent();\n\n if (step) {\n const next = isLTR(this)\n ? this._getNextStep(step)\n : this._getPreviousStep(step);\n\n this._getStepHeader(next)?.focus();\n }\n }\n\n //#endregion\n\n //#region Event handlers\n\n private _handleInteraction(event: Event): void {\n const step = findElementFromEventPath<IgcStepComponent>(\n IgcStepComponent.tagName,\n event\n );\n\n if (step && this._state.isAccessible(step)) {\n this._activateStep(step);\n }\n }\n\n private _handleSlotChange(): void {\n this._state.setSteps(\n this._slots.getAssignedElements('[default]', {\n selector: IgcStepComponent.tagName,\n })\n );\n\n this._state.stepsChanged();\n this.style.setProperty('--steps-count', this.steps.length.toString());\n }\n\n //#endregion\n\n //#region Internal methods\n\n private _syncStepperAttributes(properties: PropertyValues<this>): void {\n if (STEPPER_SYNC_PROPERTIES.some((p) => properties.has(p))) {\n this._contextProvider.updateObservers();\n }\n }\n\n private _animateSteps(\n nextStep: IgcStepComponent,\n currentStep: IgcStepComponent\n ): void {\n const steps = this._state.steps;\n\n if (steps.indexOf(nextStep) > steps.indexOf(currentStep)) {\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 _emitChanging(args: IgcActiveStepChangingEventArgs): boolean {\n return this.emitEvent('igcActiveStepChanging', {\n detail: args,\n cancelable: true,\n });\n }\n\n private _emitChanged(args: IgcActiveStepChangedEventArgs): void {\n this.emitEvent('igcActiveStepChanged', {\n detail: args,\n });\n }\n\n private _activateStep(step: IgcStepComponent, shouldEmit = true): void {\n if (step === this._state.activeStep) {\n return;\n }\n\n if (!shouldEmit) {\n this._state.changeActiveStep(step);\n return;\n }\n\n const steps = this._state.steps;\n const activeIndex = steps.indexOf(this._state.activeStep!);\n const index = steps.indexOf(step);\n\n const args = { oldIndex: activeIndex, newIndex: index };\n\n if (!this._emitChanging(args)) {\n return;\n }\n\n if (this._state.activeStep) {\n this._animateSteps(step, this._state.activeStep);\n }\n\n this._state.changeActiveStep(step);\n this._emitChanged({ index });\n }\n\n private _moveToNextStep(next = true): void {\n const step = this._state.getAdjacentStep(next);\n\n if (step) {\n if (this._state.activeStep) {\n this._animateSteps(step, this._state.activeStep);\n }\n this._state.changeActiveStep(step);\n }\n }\n\n private _getNextStep(step: IgcStepComponent): IgcStepComponent {\n const steps = this._state.accessibleSteps;\n const next = wrap(0, steps.length - 1, steps.indexOf(step) + 1);\n\n return steps[next];\n }\n\n private _getPreviousStep(step: IgcStepComponent): IgcStepComponent {\n const steps = this._state.accessibleSteps;\n const previous = wrap(0, steps.length - 1, steps.indexOf(step) - 1);\n\n return steps[previous];\n }\n\n private _getActiveStepComponent(): IgcStepComponent | null {\n const active = getRoot(this).activeElement;\n return active ? active.closest(IgcStepComponent.tagName) : null;\n }\n\n private _getStepHeader(step?: IgcStepComponent): HTMLElement | null {\n return step?.renderRoot.querySelector('[data-step-header]') ?? null;\n }\n\n //#endregion\n\n //#region Public API\n\n /** Activates the step at a given index. */\n public navigateTo(index: number): void {\n const step = this._state.steps[index];\n\n if (step) {\n this._activateStep(step, false);\n }\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._state.reset();\n }\n\n //#endregion\n\n protected override render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-stepper': IgcStepperComponent;\n }\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `[part~=header]:focus,[part~=header]:focus-within,[part~=header]:active{box-shadow:inset 0 0 0 .0625rem var(--indicator-outline)}[part~=
|
|
2
|
+
export const styles = css `[part~=header]:focus,[part~=header]:focus-within,[part~=header]:active{box-shadow:inset 0 0 0 .0625rem var(--indicator-outline)}[part~=disabled]:focus [part=header],[part~=disabled]:focus-visible [part=header],[part~=disabled]:focus-within [part=header],[part~=disabled]:active [part=header],[part~=disabled]:hover [part=header]{box-shadow:none}`;
|
|
3
3
|
//# sourceMappingURL=step.bootstrap.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.bootstrap.css.js","sourceRoot":"","sources":["../../../../../../src/components/stepper/themes/step/shared/step.bootstrap.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"step.bootstrap.css.js","sourceRoot":"","sources":["../../../../../../src/components/stepper/themes/step/shared/step.bootstrap.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,2VAA2V,CAAC","sourcesContent":["\n import { css } from 'lit';\n export const styles = css`[part~=header]:focus,[part~=header]:focus-within,[part~=header]:active{box-shadow:inset 0 0 0 .0625rem var(--indicator-outline)}[part~=disabled]:focus [part=header],[part~=disabled]:focus-visible [part=header],[part~=disabled]:focus-within [part=header],[part~=disabled]:active [part=header],[part~=disabled]:hover [part=header]{box-shadow:none}`;\n "]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `[part~=title]{color:var(--title-color)}[part~=subtitle]{color:var(--subtitle-color)}[part~=header]{background:var(--step-background);border-radius:var(--border-radius-step-header)}[part~=header]::before,[part~=header]::after{border-block-start-style:var(--step-separator-style);border-block-start-color:var(--step-separator-color)}[part~=header]:hover{background:var(--step-hover-background);color:var(--title-hover-color)}[part~=header]:hover [part~=title]{color:var(--title-hover-color)}[part~=header]:hover [part~=subtitle]{color:var(--subtitle-hover-color)}[part~=header]:focus,[part~=header]:focus-within,[part~=header]:active{background:var(--step-focus-background);color:var(--title-focus-color)}[part~=header]:focus [part~=title],[part~=header]:focus-within [part~=title],[part~=header]:active [part~=title]{color:var(--title-focus-color)}[part~=header]:focus [part~=subtitle],[part~=header]:focus-within [part~=subtitle],[part~=header]:active [part~=subtitle]{color:var(--subtitle-focus-color)}[part~=header-container]::before,[part~=header]::before{border-block-start-color:var(--step-separator-color);border-block-start-style:var(--step-separator-style)}[part~=body]::before{border-inline-start-color:var(--step-separator-color)}[part~=indicator]{border-radius:var(--border-radius-indicator);background:var(--indicator-background);color:var(--indicator-color);box-shadow:0 0 0
|
|
2
|
+
export const styles = css `[part~=title]{color:var(--title-color)}[part~=subtitle]{color:var(--subtitle-color)}[part~=header]{background:var(--step-background);border-radius:var(--border-radius-step-header)}[part~=header]::before,[part~=header]::after{border-block-start-style:var(--step-separator-style);border-block-start-color:var(--step-separator-color)}[part~=header]:hover{background:var(--step-hover-background);color:var(--title-hover-color)}[part~=header]:hover [part~=title]{color:var(--title-hover-color)}[part~=header]:hover [part~=subtitle]{color:var(--subtitle-hover-color)}[part~=header]:focus,[part~=header]:focus-within,[part~=header]:active{background:var(--step-focus-background);color:var(--title-focus-color)}[part~=header]:focus [part~=title],[part~=header]:focus-within [part~=title],[part~=header]:active [part~=title]{color:var(--title-focus-color)}[part~=header]:focus [part~=subtitle],[part~=header]:focus-within [part~=subtitle],[part~=header]:active [part~=subtitle]{color:var(--subtitle-focus-color)}[part~=header-container]::before,[part~=header]::before{border-block-start-color:var(--step-separator-color);border-block-start-style:var(--step-separator-style)}[part~=body]::before{border-inline-start-color:var(--step-separator-color)}[part~=indicator]{border-radius:var(--border-radius-indicator);background:var(--indicator-background);color:var(--indicator-color);box-shadow:0 0 0 var(--indicator-box-shadow-size) var(--indicator-outline)}[part~=complete-start]::after{border-block-start-style:var(--complete-step-separator-style);border-block-start-color:var(--complete-step-separator-color)}[part~=complete-start] [part~=header]::after{border-block-start-style:var(--complete-step-separator-style);border-block-start-color:var(--complete-step-separator-color)}[part~=complete-start] [part~=indicator]{background:var(--complete-indicator-background);color:var(--complete-indicator-color);box-shadow:0 0 0 var(--indicator-box-shadow-size) var(--complete-indicator-outline)}[part~=complete-start] [part~=title]{color:var(--complete-title-color)}[part~=complete-start] [part~=subtitle]{color:var(--complete-subtitle-color)}[part~=complete-end]::before{border-block-start-style:var(--complete-step-separator-style);border-block-start-color:var(--complete-step-separator-color)}[part~=complete-end] [part~=header]::before{border-block-start-style:var(--complete-step-separator-style);border-block-start-color:var(--complete-step-separator-color)}[part~=invalid] [part~=indicator]{color:var(--invalid-indicator-color);background:var(--invalid-indicator-background);box-shadow:0 0 0 var(--indicator-box-shadow-size) var(--invalid-indicator-outline)}[part~=invalid] [part~=title]{color:var(--invalid-title-color)}[part~=invalid] [part~=subtitle]{color:var(--invalid-subtitle-color)}[part~=invalid] [part~=header]{background:var(--invalid-step-background)}[part~=invalid] [part~=header]:hover{background:var(--invalid-step-hover-background)}[part~=invalid] [part~=header]:hover [part~=title]{color:var(--invalid-title-hover-color)}[part~=invalid] [part~=header]:hover [part~=subtitle]{color:var(--invalid-subtitle-hover-color)}[part~=invalid] [part~=header]:focus,[part~=invalid] [part~=header]:focus-within,[part~=invalid] [part~=header]:active{background:var(--invalid-step-focus-background)}[part~=invalid] [part~=header]:focus [part~=title],[part~=invalid] [part~=header]:focus-within [part~=title],[part~=invalid] [part~=header]:active [part~=title]{color:var(--invalid-title-focus-color)}[part~=invalid] [part~=header]:focus [part~=subtitle],[part~=invalid] [part~=header]:focus-within [part~=subtitle],[part~=invalid] [part~=header]:active [part~=subtitle]{color:var(--invalid-subtitle-focus-color)}:host([complete]:not([active])) [part~=header]{background:var(--complete-step-background)}:host([complete]:not([active])) [part~=header]:hover{background:var(--complete-step-hover-background)}:host([complete]:not([active])) [part~=header]:hover [part~=title]{color:var(--complete-title-hover-color)}:host([complete]:not([active])) [part~=header]:hover [part~=subtitle]{color:var(--complete-subtitle-hover-color)}:host([complete]:not([active])) [part~=header]:focus,:host([complete]:not([active])) [part~=header]:focus-within,:host([complete]:not([active])) [part~=header]:active{background:var(--complete-step-focus-background)}:host([complete]:not([active])) [part~=header]:focus [part~=title],:host([complete]:not([active])) [part~=header]:focus-within [part~=title],:host([complete]:not([active])) [part~=header]:active [part~=title]{color:var(--complete-title-focus-color)}:host([complete]:not([active])) [part~=header]:focus [part~=subtitle],:host([complete]:not([active])) [part~=header]:focus-within [part~=subtitle],:host([complete]:not([active])) [part~=header]:active [part~=subtitle]{color:var(--complete-subtitle-focus-color)}:host([complete]:not([active])) [part~=body]::before{border-inline-start-style:var(--complete-step-separator-style);border-inline-start-color:var(--complete-step-separator-color)}:host([active]) [part~=header]{background:var(--current-step-background)}:host([active]) [part~=header]:hover{background:var(--current-step-hover-background)}:host([active]) [part~=header]:hover [part~=title]{color:var(--current-title-hover-color)}:host([active]) [part~=header]:hover [part~=subtitle]{color:var(--current-subtitle-hover-color)}:host([active]) [part~=header]:focus,:host([active]) [part~=header]:focus-within,:host([active]) [part~=header]:active{background:var(--current-step-focus-background)}:host([active]) [part~=header]:focus [part~=title],:host([active]) [part~=header]:focus-within [part~=title],:host([active]) [part~=header]:active [part~=title]{color:var(--current-title-focus-color)}:host([active]) [part~=header]:focus [part~=subtitle],:host([active]) [part~=header]:focus-within [part~=subtitle],:host([active]) [part~=header]:active [part~=subtitle]{color:var(--current-subtitle-focus-color)}:host([active]) [part~=indicator]{background:var(--current-indicator-background);color:var(--current-indicator-color);box-shadow:0 0 0 var(--indicator-box-shadow-size) var(--current-indicator-outline)}:host([active]) [part~=title]{color:var(--current-title-color);font-weight:600}:host([active]) [part~=subtitle]{color:var(--current-subtitle-color)}[part~=content]{font-family:var(--ig-body-2-font-family, var(--ig-font-family));font-size:var(--ig-body-2-font-size);font-weight:var(--ig-body-2-font-weight);font-style:var(--ig-body-2-font-style);line-height:var(--ig-body-2-line-height);letter-spacing:var(--ig-body-2-letter-spacing);text-transform:var(--ig-body-2-text-transform);margin-top:var(--ig-body-2-margin-top);margin-bottom:var(--ig-body-2-margin-bottom);color:var(--content-foreground)}[part~=disabled]:focus [part=header],[part~=disabled]:focus-visible [part=header],[part~=disabled]:focus-within [part=header],[part~=disabled]:active [part=header],[part~=disabled]:hover [part=header]{background:var(--step-background)}[part~=disabled]:focus [part~=title],[part~=disabled]:focus-visible [part~=title],[part~=disabled]:focus-within [part~=title],[part~=disabled]:active [part~=title],[part~=disabled]:hover [part~=title]{color:var(--disabled-title-color)}[part~=disabled]:focus [part~=subtitle],[part~=disabled]:focus-visible [part~=subtitle],[part~=disabled]:focus-within [part~=subtitle],[part~=disabled]:active [part~=subtitle],[part~=disabled]:hover [part~=subtitle]{color:var(--disabled-subtitle-color)}[part~=disabled] [part~=indicator]{color:var(--disabled-indicator-color);background:var(--disabled-indicator-background);box-shadow:0 0 0 var(--indicator-box-shadow-size) var(--disabled-indicator-outline)}[part~=disabled] [part~=title]{color:var(--disabled-title-color)}[part~=disabled] [part~=subtitle]{color:var(--disabled-subtitle-color)}`;
|
|
3
3
|
//# sourceMappingURL=step.common.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.common.css.js","sourceRoot":"","sources":["../../../../../../src/components/stepper/themes/step/shared/step.common.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"step.common.css.js","sourceRoot":"","sources":["../../../../../../src/components/stepper/themes/step/shared/step.common.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,goPAAgoP,CAAC","sourcesContent":["\n import { css } from 'lit';\n export const styles = css`[part~=title]{color:var(--title-color)}[part~=subtitle]{color:var(--subtitle-color)}[part~=header]{background:var(--step-background);border-radius:var(--border-radius-step-header)}[part~=header]::before,[part~=header]::after{border-block-start-style:var(--step-separator-style);border-block-start-color:var(--step-separator-color)}[part~=header]:hover{background:var(--step-hover-background);color:var(--title-hover-color)}[part~=header]:hover [part~=title]{color:var(--title-hover-color)}[part~=header]:hover [part~=subtitle]{color:var(--subtitle-hover-color)}[part~=header]:focus,[part~=header]:focus-within,[part~=header]:active{background:var(--step-focus-background);color:var(--title-focus-color)}[part~=header]:focus [part~=title],[part~=header]:focus-within [part~=title],[part~=header]:active [part~=title]{color:var(--title-focus-color)}[part~=header]:focus [part~=subtitle],[part~=header]:focus-within [part~=subtitle],[part~=header]:active [part~=subtitle]{color:var(--subtitle-focus-color)}[part~=header-container]::before,[part~=header]::before{border-block-start-color:var(--step-separator-color);border-block-start-style:var(--step-separator-style)}[part~=body]::before{border-inline-start-color:var(--step-separator-color)}[part~=indicator]{border-radius:var(--border-radius-indicator);background:var(--indicator-background);color:var(--indicator-color);box-shadow:0 0 0 var(--indicator-box-shadow-size) var(--indicator-outline)}[part~=complete-start]::after{border-block-start-style:var(--complete-step-separator-style);border-block-start-color:var(--complete-step-separator-color)}[part~=complete-start] [part~=header]::after{border-block-start-style:var(--complete-step-separator-style);border-block-start-color:var(--complete-step-separator-color)}[part~=complete-start] [part~=indicator]{background:var(--complete-indicator-background);color:var(--complete-indicator-color);box-shadow:0 0 0 var(--indicator-box-shadow-size) var(--complete-indicator-outline)}[part~=complete-start] [part~=title]{color:var(--complete-title-color)}[part~=complete-start] [part~=subtitle]{color:var(--complete-subtitle-color)}[part~=complete-end]::before{border-block-start-style:var(--complete-step-separator-style);border-block-start-color:var(--complete-step-separator-color)}[part~=complete-end] [part~=header]::before{border-block-start-style:var(--complete-step-separator-style);border-block-start-color:var(--complete-step-separator-color)}[part~=invalid] [part~=indicator]{color:var(--invalid-indicator-color);background:var(--invalid-indicator-background);box-shadow:0 0 0 var(--indicator-box-shadow-size) var(--invalid-indicator-outline)}[part~=invalid] [part~=title]{color:var(--invalid-title-color)}[part~=invalid] [part~=subtitle]{color:var(--invalid-subtitle-color)}[part~=invalid] [part~=header]{background:var(--invalid-step-background)}[part~=invalid] [part~=header]:hover{background:var(--invalid-step-hover-background)}[part~=invalid] [part~=header]:hover [part~=title]{color:var(--invalid-title-hover-color)}[part~=invalid] [part~=header]:hover [part~=subtitle]{color:var(--invalid-subtitle-hover-color)}[part~=invalid] [part~=header]:focus,[part~=invalid] [part~=header]:focus-within,[part~=invalid] [part~=header]:active{background:var(--invalid-step-focus-background)}[part~=invalid] [part~=header]:focus [part~=title],[part~=invalid] [part~=header]:focus-within [part~=title],[part~=invalid] [part~=header]:active [part~=title]{color:var(--invalid-title-focus-color)}[part~=invalid] [part~=header]:focus [part~=subtitle],[part~=invalid] [part~=header]:focus-within [part~=subtitle],[part~=invalid] [part~=header]:active [part~=subtitle]{color:var(--invalid-subtitle-focus-color)}:host([complete]:not([active])) [part~=header]{background:var(--complete-step-background)}:host([complete]:not([active])) [part~=header]:hover{background:var(--complete-step-hover-background)}:host([complete]:not([active])) [part~=header]:hover [part~=title]{color:var(--complete-title-hover-color)}:host([complete]:not([active])) [part~=header]:hover [part~=subtitle]{color:var(--complete-subtitle-hover-color)}:host([complete]:not([active])) [part~=header]:focus,:host([complete]:not([active])) [part~=header]:focus-within,:host([complete]:not([active])) [part~=header]:active{background:var(--complete-step-focus-background)}:host([complete]:not([active])) [part~=header]:focus [part~=title],:host([complete]:not([active])) [part~=header]:focus-within [part~=title],:host([complete]:not([active])) [part~=header]:active [part~=title]{color:var(--complete-title-focus-color)}:host([complete]:not([active])) [part~=header]:focus [part~=subtitle],:host([complete]:not([active])) [part~=header]:focus-within [part~=subtitle],:host([complete]:not([active])) [part~=header]:active [part~=subtitle]{color:var(--complete-subtitle-focus-color)}:host([complete]:not([active])) [part~=body]::before{border-inline-start-style:var(--complete-step-separator-style);border-inline-start-color:var(--complete-step-separator-color)}:host([active]) [part~=header]{background:var(--current-step-background)}:host([active]) [part~=header]:hover{background:var(--current-step-hover-background)}:host([active]) [part~=header]:hover [part~=title]{color:var(--current-title-hover-color)}:host([active]) [part~=header]:hover [part~=subtitle]{color:var(--current-subtitle-hover-color)}:host([active]) [part~=header]:focus,:host([active]) [part~=header]:focus-within,:host([active]) [part~=header]:active{background:var(--current-step-focus-background)}:host([active]) [part~=header]:focus [part~=title],:host([active]) [part~=header]:focus-within [part~=title],:host([active]) [part~=header]:active [part~=title]{color:var(--current-title-focus-color)}:host([active]) [part~=header]:focus [part~=subtitle],:host([active]) [part~=header]:focus-within [part~=subtitle],:host([active]) [part~=header]:active [part~=subtitle]{color:var(--current-subtitle-focus-color)}:host([active]) [part~=indicator]{background:var(--current-indicator-background);color:var(--current-indicator-color);box-shadow:0 0 0 var(--indicator-box-shadow-size) var(--current-indicator-outline)}:host([active]) [part~=title]{color:var(--current-title-color);font-weight:600}:host([active]) [part~=subtitle]{color:var(--current-subtitle-color)}[part~=content]{font-family:var(--ig-body-2-font-family, var(--ig-font-family));font-size:var(--ig-body-2-font-size);font-weight:var(--ig-body-2-font-weight);font-style:var(--ig-body-2-font-style);line-height:var(--ig-body-2-line-height);letter-spacing:var(--ig-body-2-letter-spacing);text-transform:var(--ig-body-2-text-transform);margin-top:var(--ig-body-2-margin-top);margin-bottom:var(--ig-body-2-margin-bottom);color:var(--content-foreground)}[part~=disabled]:focus [part=header],[part~=disabled]:focus-visible [part=header],[part~=disabled]:focus-within [part=header],[part~=disabled]:active [part=header],[part~=disabled]:hover [part=header]{background:var(--step-background)}[part~=disabled]:focus [part~=title],[part~=disabled]:focus-visible [part~=title],[part~=disabled]:focus-within [part~=title],[part~=disabled]:active [part~=title],[part~=disabled]:hover [part~=title]{color:var(--disabled-title-color)}[part~=disabled]:focus [part~=subtitle],[part~=disabled]:focus-visible [part~=subtitle],[part~=disabled]:focus-within [part~=subtitle],[part~=disabled]:active [part~=subtitle],[part~=disabled]:hover [part~=subtitle]{color:var(--disabled-subtitle-color)}[part~=disabled] [part~=indicator]{color:var(--disabled-indicator-color);background:var(--disabled-indicator-background);box-shadow:0 0 0 var(--indicator-box-shadow-size) var(--disabled-indicator-outline)}[part~=disabled] [part~=title]{color:var(--disabled-title-color)}[part~=disabled] [part~=subtitle]{color:var(--disabled-subtitle-color)}`;\n "]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `[part~=indicator]{font-family:var(--ig-button-font-family, var(--ig-font-family));font-size:var(--ig-button-font-size);font-weight:var(--ig-button-font-weight);font-style:var(--ig-button-font-style);line-height:var(--ig-button-line-height);letter-spacing:var(--ig-button-letter-spacing);text-transform:var(--ig-button-text-transform);margin-top:var(--ig-button-margin-top);margin-bottom:var(--ig-button-margin-bottom)
|
|
2
|
+
export const styles = css `[part~=indicator]{font-family:var(--ig-button-font-family, var(--ig-font-family));font-size:var(--ig-button-font-size);font-weight:var(--ig-button-font-weight);font-style:var(--ig-button-font-style);line-height:var(--ig-button-line-height);letter-spacing:var(--ig-button-letter-spacing);text-transform:var(--ig-button-text-transform);margin-top:var(--ig-button-margin-top);margin-bottom:var(--ig-button-margin-bottom)}:host([active]) [part~=title]{font-family:var(--ig-subtitle-2-font-family, var(--ig-font-family));font-size:var(--ig-subtitle-2-font-size);font-weight:var(--ig-subtitle-2-font-weight);font-style:var(--ig-subtitle-2-font-style);line-height:var(--ig-subtitle-2-line-height);letter-spacing:var(--ig-subtitle-2-letter-spacing);text-transform:var(--ig-subtitle-2-text-transform);margin-top:var(--ig-subtitle-2-margin-top);margin-bottom:var(--ig-subtitle-2-margin-bottom)}`;
|
|
3
3
|
//# sourceMappingURL=step.indigo.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.indigo.css.js","sourceRoot":"","sources":["../../../../../../src/components/stepper/themes/step/shared/step.indigo.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"step.indigo.css.js","sourceRoot":"","sources":["../../../../../../src/components/stepper/themes/step/shared/step.indigo.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,s3BAAs3B,CAAC","sourcesContent":["\n import { css } from 'lit';\n export const styles = css`[part~=indicator]{font-family:var(--ig-button-font-family, var(--ig-font-family));font-size:var(--ig-button-font-size);font-weight:var(--ig-button-font-weight);font-style:var(--ig-button-font-style);line-height:var(--ig-button-line-height);letter-spacing:var(--ig-button-letter-spacing);text-transform:var(--ig-button-text-transform);margin-top:var(--ig-button-margin-top);margin-bottom:var(--ig-button-margin-bottom)}:host([active]) [part~=title]{font-family:var(--ig-subtitle-2-font-family, var(--ig-font-family));font-size:var(--ig-subtitle-2-font-size);font-weight:var(--ig-subtitle-2-font-weight);font-style:var(--ig-subtitle-2-font-style);line-height:var(--ig-subtitle-2-line-height);letter-spacing:var(--ig-subtitle-2-letter-spacing);text-transform:var(--ig-subtitle-2-text-transform);margin-top:var(--ig-subtitle-2-margin-top);margin-bottom:var(--ig-subtitle-2-margin-bottom)}`;\n "]}
|
|
@@ -10,7 +10,6 @@ import { styles as indigoLight } from './light/step.indigo.css.js';
|
|
|
10
10
|
import { styles as materialLight } from './light/step.material.css.js';
|
|
11
11
|
import { styles as sharedLight } from './light/step.shared.css.js';
|
|
12
12
|
import { styles as bootstrap } from './shared/step.bootstrap.css.js';
|
|
13
|
-
import { styles as fluent } from './shared/step.fluent.css.js';
|
|
14
13
|
import { styles as indigo } from './shared/step.indigo.css.js';
|
|
15
14
|
const light = {
|
|
16
15
|
shared: css `
|
|
@@ -23,7 +22,7 @@ const light = {
|
|
|
23
22
|
${materialLight}
|
|
24
23
|
`,
|
|
25
24
|
fluent: css `
|
|
26
|
-
${
|
|
25
|
+
${fluentLight}
|
|
27
26
|
`,
|
|
28
27
|
indigo: css `
|
|
29
28
|
${indigo} ${indigoLight}
|
|
@@ -40,7 +39,7 @@ const dark = {
|
|
|
40
39
|
${materialDark}
|
|
41
40
|
`,
|
|
42
41
|
fluent: css `
|
|
43
|
-
${
|
|
42
|
+
${fluentDark}
|
|
44
43
|
`,
|
|
45
44
|
indigo: css `
|
|
46
45
|
${indigo} ${indigoDark}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.js","sourceRoot":"","sources":["../../../../../src/components/stepper/themes/step/themes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAI1B,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,4BAA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AK,GAAG;IACZ,MAAM,EAAE,GAAG,CAAA;MACP,WAAW;GACd;IACD,SAAS,EAAE,GAAG,CAAA;MACV,SAAS,IAAI,cAAc;GAC9B;IACD,QAAQ,EAAE,GAAG,CAAA;MACT,aAAa;GAChB;IACD,MAAM,EAAE,GAAG,CAAA;MACP,WAAW;GACd;IACD,MAAM,EAAE,GAAG,CAAA;MACP,MAAM,IAAI,WAAW;GACxB;CACF,CAAC;AAEF,MAAM,IAAI,GAAG;IACX,MAAM,EAAE,GAAG,CAAA;MACP,UAAU;GACb;IACD,SAAS,EAAE,GAAG,CAAA;MACV,SAAS,IAAI,aAAa;GAC7B;IACD,QAAQ,EAAE,GAAG,CAAA;MACT,YAAY;GACf;IACD,MAAM,EAAE,GAAG,CAAA;MACP,UAAU;GACb;IACD,MAAM,EAAE,GAAG,CAAA;MACP,MAAM,IAAI,UAAU;GACvB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAW,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC","sourcesContent":["import { css } from 'lit';\n\nimport type { Themes } from '../../../../theming/types.js';\n// Dark Overrides\nimport { styles as bootstrapDark } from './dark/step.bootstrap.css.js';\nimport { styles as fluentDark } from './dark/step.fluent.css.js';\nimport { styles as indigoDark } from './dark/step.indigo.css.js';\nimport { styles as materialDark } from './dark/step.material.css.js';\nimport { styles as sharedDark } from './dark/step.shared.css.js';\n// Light Overrides\nimport { styles as bootstrapLight } from './light/step.bootstrap.css.js';\nimport { styles as fluentLight } from './light/step.fluent.css.js';\nimport { styles as indigoLight } from './light/step.indigo.css.js';\nimport { styles as materialLight } from './light/step.material.css.js';\nimport { styles as sharedLight } from './light/step.shared.css.js';\n// Shared Styles\nimport { styles as bootstrap } from './shared/step.bootstrap.css.js';\nimport { styles as indigo } from './shared/step.indigo.css.js';\n\nconst light = {\n shared: css`\n ${sharedLight}\n `,\n bootstrap: css`\n ${bootstrap} ${bootstrapLight}\n `,\n material: css`\n ${materialLight}\n `,\n fluent: css`\n ${fluentLight}\n `,\n indigo: css`\n ${indigo} ${indigoLight}\n `,\n};\n\nconst dark = {\n shared: css`\n ${sharedDark}\n `,\n bootstrap: css`\n ${bootstrap} ${bootstrapDark}\n `,\n material: css`\n ${materialDark}\n `,\n fluent: css`\n ${fluentDark}\n `,\n indigo: css`\n ${indigo} ${indigoDark}\n `,\n};\n\nexport const all: Themes = { light, dark };\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size, var(--sb-size));scrollbar-color:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color)) var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size, var(--sb-size));height:var(--ig-scrollbar-size, var(--sb-size));background:var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color))}:host *,:host *::before,:host *::after{box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{--scroll-btn-size: 3rem;--_border-size: 0.0625rem;display:block;overflow:hidden;position:relative;height:100%;text-align:initial}:host([alignment=end]) [part~=inner]:not([part~=scrollable])::before,:host([alignment=center]) [part~=inner]:not([part~=scrollable])::before,:host([alignment=center]) [part~=inner]:not([part~=scrollable])::after,:host([alignment=start]) [part~=inner]:not([part~=scrollable])::after{content:"";width:100%;height:100%;grid-row:1}[part~=tabs]{display:flex;height:100%;scroll-padding-inline:var(--scroll-btn-size);scroll-behavior:smooth;overflow:scroll hidden;scroll-snap-type:both proximity;scrollbar-width:none
|
|
2
|
+
export const styles = css `:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size, var(--sb-size));scrollbar-color:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color)) var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size, var(--sb-size));height:var(--ig-scrollbar-size, var(--sb-size));background:var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color))}:host *,:host *::before,:host *::after{box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{--scroll-btn-size: 3rem;--_border-size: 0.0625rem;display:block;overflow:hidden;position:relative;height:100%;text-align:initial}:host([alignment=end]) [part~=inner]:not([part~=scrollable])::before,:host([alignment=center]) [part~=inner]:not([part~=scrollable])::before,:host([alignment=center]) [part~=inner]:not([part~=scrollable])::after,:host([alignment=start]) [part~=inner]:not([part~=scrollable])::after{content:"";width:100%;height:100%;grid-row:1}[part~=tabs]{display:flex;height:100%;scroll-padding-inline:var(--scroll-btn-size);scroll-behavior:smooth;overflow:scroll hidden;scroll-snap-type:both proximity;scrollbar-width:none}[part~=tabs]::-webkit-scrollbar{display:none}[part~=inner]{display:grid;grid-template-rows:minmax(var(--header-min-height), auto) auto 1fr;align-items:center;position:relative}[part~=inner] ::slotted(igc-tab){display:contents}[part~=scrollable]{grid-template-columns:var(--scroll-btn-size) repeat(var(--_tabs-count), minmax(max-content, auto)) var(--scroll-btn-size)}[part~=inner]:not([part~=scrollable]){grid-template-columns:repeat(var(--_tabs-count), minmax(auto, min-content));min-width:5.625rem}:host([alignment=start]) [part~=inner]:not([part~=scrollable]){grid-template-columns:repeat(var(--_tabs-count), minmax(max-content, auto)) 1fr}:host([alignment=center]) [part~=inner]:not([part~=scrollable]){grid-template-columns:1fr repeat(var(--_tabs-count), minmax(max-content, auto)) 1fr}:host([alignment=end]) [part~=inner]:not([part~=scrollable]){grid-template-columns:1fr repeat(var(--_tabs-count), minmax(max-content, auto))}:host([alignment=justify]){--tab-max-width--justify: 100%}:host([alignment=justify]) [part~=scrollable]{grid-template-columns:var(--scroll-btn-size) repeat(var(--_tabs-count), minmax(5.625rem, 1fr)) var(--scroll-btn-size)}:host([alignment=justify]) [part~=inner]:not([part~=scrollable]){grid-template-columns:repeat(var(--_tabs-count), minmax(5.625rem, auto))}[part~=start-scroll-button],[part~=end-scroll-button]{grid-row:1;position:sticky;top:0;height:100%;min-width:var(--scroll-btn-size);width:var(--scroll-btn-size);z-index:2;transform:scaleX(calc(var(--ig-dir, 1) * 1));touch-action:none}[part~=start-scroll-button]{inset-inline-start:0}[part~=end-scroll-button]{inset-inline-end:0}igc-icon-button::part(base){border-radius:0;padding:0;height:100%;width:100%;transition:none}[part=selected-indicator]{position:relative;grid-row:2;grid-column:1/-1;text-align:initial}[part=selected-indicator] span{position:absolute;display:inline-block;transition:transform .3s cubic-bezier(0.35, 0, 0.25, 1),width .2s cubic-bezier(0.35, 0, 0.25, 1);z-index:1}`;
|
|
3
3
|
//# sourceMappingURL=tabs.base.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.base.css.js","sourceRoot":"","sources":["../../../../src/components/tabs/themes/tabs.base.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"tabs.base.css.js","sourceRoot":"","sources":["../../../../src/components/tabs/themes/tabs.base.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,2gHAA2gH,CAAC","sourcesContent":["\n import { css } from 'lit';\n export const styles = css`:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size, var(--sb-size));scrollbar-color:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color)) var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size, var(--sb-size));height:var(--ig-scrollbar-size, var(--sb-size));background:var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color))}:host *,:host *::before,:host *::after{box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{--scroll-btn-size: 3rem;--_border-size: 0.0625rem;display:block;overflow:hidden;position:relative;height:100%;text-align:initial}:host([alignment=end]) [part~=inner]:not([part~=scrollable])::before,:host([alignment=center]) [part~=inner]:not([part~=scrollable])::before,:host([alignment=center]) [part~=inner]:not([part~=scrollable])::after,:host([alignment=start]) [part~=inner]:not([part~=scrollable])::after{content:\"\";width:100%;height:100%;grid-row:1}[part~=tabs]{display:flex;height:100%;scroll-padding-inline:var(--scroll-btn-size);scroll-behavior:smooth;overflow:scroll hidden;scroll-snap-type:both proximity;scrollbar-width:none}[part~=tabs]::-webkit-scrollbar{display:none}[part~=inner]{display:grid;grid-template-rows:minmax(var(--header-min-height), auto) auto 1fr;align-items:center;position:relative}[part~=inner] ::slotted(igc-tab){display:contents}[part~=scrollable]{grid-template-columns:var(--scroll-btn-size) repeat(var(--_tabs-count), minmax(max-content, auto)) var(--scroll-btn-size)}[part~=inner]:not([part~=scrollable]){grid-template-columns:repeat(var(--_tabs-count), minmax(auto, min-content));min-width:5.625rem}:host([alignment=start]) [part~=inner]:not([part~=scrollable]){grid-template-columns:repeat(var(--_tabs-count), minmax(max-content, auto)) 1fr}:host([alignment=center]) [part~=inner]:not([part~=scrollable]){grid-template-columns:1fr repeat(var(--_tabs-count), minmax(max-content, auto)) 1fr}:host([alignment=end]) [part~=inner]:not([part~=scrollable]){grid-template-columns:1fr repeat(var(--_tabs-count), minmax(max-content, auto))}:host([alignment=justify]){--tab-max-width--justify: 100%}:host([alignment=justify]) [part~=scrollable]{grid-template-columns:var(--scroll-btn-size) repeat(var(--_tabs-count), minmax(5.625rem, 1fr)) var(--scroll-btn-size)}:host([alignment=justify]) [part~=inner]:not([part~=scrollable]){grid-template-columns:repeat(var(--_tabs-count), minmax(5.625rem, auto))}[part~=start-scroll-button],[part~=end-scroll-button]{grid-row:1;position:sticky;top:0;height:100%;min-width:var(--scroll-btn-size);width:var(--scroll-btn-size);z-index:2;transform:scaleX(calc(var(--ig-dir, 1) * 1));touch-action:none}[part~=start-scroll-button]{inset-inline-start:0}[part~=end-scroll-button]{inset-inline-end:0}igc-icon-button::part(base){border-radius:0;padding:0;height:100%;width:100%;transition:none}[part=selected-indicator]{position:relative;grid-row:2;grid-column:1/-1;text-align:initial}[part=selected-indicator] span{position:absolute;display:inline-block;transition:transform .3s cubic-bezier(0.35, 0, 0.25, 1),width .2s cubic-bezier(0.35, 0, 0.25, 1);z-index:1}`;\n "]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/components/textarea/textarea.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EACL,IAAI,EACJ,UAAU,EACV,OAAO,GAGR,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB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AE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,KAAK,OAAO,CAAC;YACxD,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;SACnD;KACF,CAAC;wDACgC;AAU3B;IADN,QAAQ,EAAE;kDACmC;AASvC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;0DAC3C;AAtLT,oBAAoB;IADxC,aAAa,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;GACnB,oBAAoB,CA4ZxC;eA5ZoB,oBAAoB","sourcesContent":["import {\n html,\n LitElement,\n nothing,\n type PropertyValues,\n type TemplateResult,\n} from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { cache } from 'lit/directives/cache.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport { createResizeObserverController } from '../common/controllers/resize-observer.js';\nimport {\n addSlotController,\n type InferSlotNames,\n type SlotChangeCallbackParameters,\n setSlots,\n} from '../common/controllers/slot.js';\nimport { shadowOptions } from '../common/decorators/shadow-options.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { FormAssociatedRequiredMixin } from '../common/mixins/forms/associated-required.js';\nimport { createFormValueState } from '../common/mixins/forms/form-value.js';\nimport { partMap } from '../common/part-map.js';\nimport { addSafeEventListener, asNumber } from '../common/util.js';\nimport type {\n RangeTextSelectMode,\n SelectionRangeDirection,\n TextareaResize,\n} from '../types.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport { styles as shared } from './themes/shared/textarea.common.css.js';\nimport { styles } from './themes/textarea.base.css.js';\nimport { all } from './themes/themes.js';\nimport { textAreaValidators } from './validators.js';\n\nexport interface IgcTextareaComponentEventMap {\n igcInput: CustomEvent<string>;\n igcChange: CustomEvent<string>;\n // For analyzer meta only:\n /* skipWCPrefix */\n focus: FocusEvent;\n /* skipWCPrefix */\n blur: FocusEvent;\n}\n\nlet nextId = 1;\nconst Slots = setSlots(\n 'prefix',\n 'suffix',\n 'helper-text',\n 'value-missing',\n 'too-long',\n 'too-short',\n 'custom-error',\n 'invalid'\n);\n\n/**\n * This element represents a multi-line plain-text editing control,\n * useful when you want to allow users to enter a sizeable amount of free-form text,\n * for example a comment on a review or feedback form.\n *\n * @element igc-textarea\n *\n * @slot - Text content from the default slot will be used as the value of the component.\n * @slot prefix - Renders content before the input.\n * @slot suffix - Renders content after input.\n * @slot helper-text - Renders content below the input.\n * @slot value-missing - Renders content when the required validation fails.\n * @slot too-long - Renders content when the maxlength validation fails.\n * @slot too-short - Renders content when the minlength validation fails.\n * @slot custom-error - Renders content when setCustomValidity(message) is set.\n * @slot invalid - Renders content when the component is in invalid state (validity.valid = false).\n *\n * @fires igcInput - Emitted when the control receives user input.\n * @fires igcChange - Emitted when the a change to the control value is committed by the user.\n *\n * @csspart container - The main wrapper that holds all main input elements of the textarea.\n * @csspart input - The native input element of the igc-textarea.\n * @csspart label - The native label element of the igc-textarea.\n * @csspart prefix - The prefix wrapper of the igc-textarea.\n * @csspart suffix - The suffix wrapper of the igc-textarea.\n * @csspart helper-text - The helper text wrapper of the igc-textarea.\n */\n@shadowOptions({ delegatesFocus: true })\nexport default class IgcTextareaComponent extends FormAssociatedRequiredMixin(\n EventEmitterMixin<IgcTextareaComponentEventMap, Constructor<LitElement>>(\n LitElement\n )\n) {\n public static readonly tagName = 'igc-textarea';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(IgcTextareaComponent, IgcValidationContainerComponent);\n }\n\n //#region Private properties and state\n\n private readonly _inputId = `textarea-${nextId++}`;\n\n private readonly _themes = addThemingController(this, all);\n\n private readonly _slots = addSlotController(this, {\n slots: Slots,\n onChange: this._handleSlotChange,\n });\n\n @query('textarea')\n private readonly _input!: HTMLTextAreaElement;\n\n protected override get __validators() {\n return textAreaValidators;\n }\n\n protected override readonly _formValue = createFormValueState(this, {\n initialValue: '',\n });\n\n //#endregion\n\n //#region Public properties and attributes\n\n /**\n * Specifies what if any permission the browser has to provide for automated assistance in filling out form field values,\n * as well as guidance to the browser as to the type of information expected in the field.\n * Refer to [this page](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for additional information.\n *\n * @attr\n */\n @property()\n public autocomplete!: string;\n\n /**\n * Controls whether and how text input is automatically capitalized as it is entered/edited by the user.\n *\n * [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize).\n *\n * @attr\n */\n @property()\n public override autocapitalize!: string;\n\n /**\n * Hints at the type of data that might be entered by the user while editing the element or its contents.\n * This allows a browser to display an appropriate virtual keyboard.\n *\n * [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode)\n *\n * @attr inputmode\n */\n @property({ attribute: 'inputmode' })\n public override inputMode!: string;\n\n /**\n * The label for the control.\n *\n * @attr\n */\n @property()\n public label!: string;\n\n /**\n * The maximum number of characters (UTF-16 code units) that the user can enter.\n * If this value isn't specified, the user can enter an unlimited number of characters.\n *\n * @attr maxlength\n */\n @property({ type: Number, attribute: 'maxlength' })\n public maxLength!: number;\n\n /**\n * The minimum number of characters (UTF-16 code units) required that the user should enter.\n *\n * @attr minlength\n */\n @property({ type: Number, attribute: 'minlength' })\n public minLength!: number;\n\n /**\n * Whether the control will have outlined appearance.\n * @attr\n */\n @property({ reflect: true, type: Boolean })\n public outlined = false;\n\n /**\n * The placeholder attribute of the control.\n *\n * @attr\n */\n @property()\n public placeholder!: string;\n\n /**\n * Makes the control a readonly field.\n *\n * @attr readonly\n */\n @property({ type: Boolean, reflect: true, attribute: 'readonly' })\n public readOnly = false;\n\n /**\n * Controls whether the control can be resized.\n * When `auto` is set, the control will try to expand and fit its content.\n *\n * @attr\n */\n @property()\n public resize: TextareaResize = 'vertical';\n\n /**\n * The number of visible text lines for the control. If it is specified, it must be a positive integer.\n * If it is not specified, the default value is 3.\n *\n * @attr\n */\n @property({ type: Number })\n public rows = 3;\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail\", false) */\n /**\n * The value of the component\n *\n * @attr\n */\n @property()\n public set value(value: string) {\n this._formValue.setValueAndFormState(value);\n }\n\n public get value(): string {\n return this._formValue.value;\n }\n\n /**\n * Controls whether the element may be checked for spelling errors.\n *\n * @attr\n */\n @property({\n type: Boolean,\n converter: {\n fromAttribute: (value) => !(!value || value === 'false'),\n toAttribute: (value) => (value ? 'true' : 'false'),\n },\n })\n public override spellcheck = true;\n\n /**\n * Indicates how the control should wrap the value for form submission.\n * Refer to [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attributes)\n * for explanation of the available values.\n *\n * @attr\n */\n @property()\n public wrap: 'hard' | 'soft' | 'off' = 'soft';\n\n /**\n * Enables validation rules to be evaluated without restricting user input. This applies to the `maxLength` property\n * when it is defined.\n *\n * @attr validate-only\n */\n @property({ type: Boolean, reflect: true, attribute: 'validate-only' })\n public validateOnly = false;\n\n //#endregion\n\n //#region Life-cycle hooks\n\n constructor() {\n super();\n\n createResizeObserverController(this, {\n callback: this._setAreaHeight,\n });\n\n addSafeEventListener(this, 'blur', this._handleBlur);\n }\n\n protected override updated(props: PropertyValues<this>): void {\n if (props.has('rows') || props.has('resize') || props.has('value')) {\n this._setAreaHeight();\n }\n }\n\n //#endregion\n\n //#region Internal methods\n\n private _setAutoHeight(): number {\n const { borderTopWidth, borderBottomWidth } = getComputedStyle(this._input);\n return (\n this._input.scrollHeight +\n asNumber(borderTopWidth) +\n asNumber(borderBottomWidth)\n );\n }\n\n protected _setAreaHeight(): void {\n if (this.resize === 'auto') {\n this._input.style.height = 'auto';\n this._input.style.height = `${this._setAutoHeight()}px`;\n } else {\n Object.assign(this._input.style, { height: undefined });\n }\n }\n\n protected _resolvePartNames() {\n return {\n container: true,\n prefixed: this._slots.hasAssignedElements('prefix', {\n selector: ':not([hidden])',\n }),\n suffixed: this._slots.hasAssignedElements('suffix', {\n selector: ':not([hidden])',\n }),\n filled: !!this.value,\n };\n }\n\n //#endregion\n\n //#region Event handlers\n\n private _handleSlotChange({\n isDefault,\n }: SlotChangeCallbackParameters<InferSlotNames<typeof Slots>>): void {\n if (isDefault) {\n const value = this._slots\n .getAssignedNodes('[default]', true)\n .map((node) => node.textContent?.trim())\n .filter((node) => Boolean(node))\n .join('\\r\\n');\n\n if (value !== this.value) {\n this.value = value;\n }\n }\n }\n\n protected _handleInput(): void {\n this._setTouchedState();\n this.value = this._input.value;\n this.emitEvent('igcInput', { detail: this.value });\n }\n\n protected _handleChange(): void {\n this._setTouchedState();\n this.value = this._input.value;\n this.emitEvent('igcChange', { detail: this.value });\n }\n\n //#endregion\n\n //#region Public methods\n\n /** Selects all text within the control. */\n public select(): void {\n this._input.select();\n }\n\n /** Sets the text selection range of the control */\n public setSelectionRange(\n start: number,\n end: number,\n direction: SelectionRangeDirection = 'none'\n ): void {\n this._input.setSelectionRange(start, end, direction);\n }\n\n /** Replaces the selected text in the control. */\n public setRangeText(\n replacement: string,\n start: number,\n end: number,\n selectMode: RangeTextSelectMode = 'preserve'\n ): void {\n this._input.setRangeText(replacement, start, end, selectMode);\n this.value = this._input.value;\n }\n\n /* blazorSuppress */\n public override scrollTo(options?: ScrollToOptions | undefined): void;\n /* blazorSuppress */\n public override scrollTo(x: number, y: number): void;\n public override scrollTo(x?: unknown, y?: unknown): void {\n x != null && y != null\n ? this._input.scrollTo(x as number, y as number)\n : this._input.scrollTo(x as ScrollToOptions);\n }\n\n //#endregion\n\n //#region Renderers\n\n protected _renderSlot(name: InferSlotNames<typeof Slots>) {\n const isHidden = !this._slots.hasAssignedElements(name, {\n selector: ':not([hidden])',\n });\n\n return html`\n <div part=${name} ?hidden=${isHidden}>\n <slot name=${name}></slot>\n </div>\n `;\n }\n\n protected _renderLabel() {\n return this.label\n ? html`\n <label part=\"label\" for=${this.id || this._inputId}>\n ${this.label}\n </label>\n `\n : nothing;\n }\n\n protected _renderStandard() {\n return html`\n ${this._renderLabel()}\n <div part=${partMap(this._resolvePartNames())}>\n ${this._renderSlot('prefix')} ${this._renderInput()}\n ${this._renderSlot('suffix')}\n </div>\n ${this._renderValidationContainer()}\n `;\n }\n\n protected _renderMaterial() {\n return html`\n <div\n part=${partMap({\n ...this._resolvePartNames(),\n labelled: !!this.label,\n placeholder: !!this.placeholder,\n })}\n >\n <div part=\"start\">${this._renderSlot('prefix')}</div>\n ${this._renderInput()}\n <div part=\"notch\">${this._renderLabel()}</div>\n <div part=\"filler\"></div>\n <div part=\"end\">${this._renderSlot('suffix')}</div>\n </div>\n ${this._renderValidationContainer()}\n `;\n }\n\n protected _renderInput() {\n const describedBy = this._slots.hasAssignedElements('helper-text')\n ? 'helper-text'\n : nothing;\n\n return html`\n <slot style=\"display: none\"></slot>\n <textarea\n id=${this.id || this._inputId}\n part=\"input\"\n style=${styleMap({\n resize: this.resize === 'auto' ? 'none' : this.resize,\n })}\n @input=${this._handleInput}\n @change=${this._handleChange}\n placeholder=${ifDefined(this.placeholder)}\n .rows=${this.rows}\n .value=${live(this.value)}\n .wrap=${this.wrap}\n autocomplete=${ifDefined(this.autocomplete as any)}\n autocapitalize=${ifDefined(this.autocapitalize as any)}\n inputmode=${ifDefined(this.inputMode)}\n spellcheck=${ifDefined(this.spellcheck)}\n minlength=${ifDefined(this.minLength)}\n maxlength=${ifDefined(this.validateOnly ? undefined : this.maxLength)}\n ?disabled=${this.disabled}\n ?required=${this.required}\n ?readonly=${this.readOnly}\n aria-describedby=${describedBy}\n ></textarea>\n `;\n }\n\n protected _renderValidationContainer(): TemplateResult {\n return IgcValidationContainerComponent.create(this);\n }\n\n protected override render() {\n return cache(\n this._themes.theme === 'material'\n ? this._renderMaterial()\n : this._renderStandard()\n );\n }\n\n //#endregion\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-textarea': IgcTextareaComponent;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/components/textarea/textarea.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EACL,IAAI,EACJ,UAAU,EACV,OAAO,GAGR,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EACL,iBAAiB,EAGjB,QAAQ,GACT,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAMnE,OAAO,+BAA+B,MAAM,iDAAiD,CAAC;AAC9F,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,wCAAwC,CAAC;AAC1E,O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DACiB;AAQrB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;sDAC1C;AASjB;IADN,QAAQ,EAAE;oDACgC;AASpC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDACX;AAShB;IADC,QAAQ,EAAE;iDAGV;AAkBe;IAPf,QAAQ,CAAC;QACR,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACT,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,KAAK,OAAO,CAAC;YACxD,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;SACnD;KACF,CAAC;wDACgC;AAU3B;IADN,QAAQ,EAAE;kDACmC;AASvC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;0DAC3C;AAtLT,oBAAoB;IADxC,aAAa,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;GACnB,oBAAoB,CA8ZxC;eA9ZoB,oBAAoB","sourcesContent":["import {\n html,\n LitElement,\n nothing,\n type PropertyValues,\n type TemplateResult,\n} from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { cache } from 'lit/directives/cache.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport { createResizeObserverController } from '../common/controllers/resize-observer.js';\nimport {\n addSlotController,\n type InferSlotNames,\n type SlotChangeCallbackParameters,\n setSlots,\n} from '../common/controllers/slot.js';\nimport { shadowOptions } from '../common/decorators/shadow-options.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { FormAssociatedRequiredMixin } from '../common/mixins/forms/associated-required.js';\nimport { createFormValueState } from '../common/mixins/forms/form-value.js';\nimport { partMap } from '../common/part-map.js';\nimport { addSafeEventListener, asNumber } from '../common/util.js';\nimport type {\n RangeTextSelectMode,\n SelectionRangeDirection,\n TextareaResize,\n} from '../types.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport { styles as shared } from './themes/shared/textarea.common.css.js';\nimport { styles } from './themes/textarea.base.css.js';\nimport { all } from './themes/themes.js';\nimport { textAreaValidators } from './validators.js';\n\nexport interface IgcTextareaComponentEventMap {\n igcInput: CustomEvent<string>;\n igcChange: CustomEvent<string>;\n // For analyzer meta only:\n /* skipWCPrefix */\n focus: FocusEvent;\n /* skipWCPrefix */\n blur: FocusEvent;\n}\n\nlet nextId = 1;\nconst Slots = setSlots(\n 'prefix',\n 'suffix',\n 'helper-text',\n 'value-missing',\n 'too-long',\n 'too-short',\n 'custom-error',\n 'invalid'\n);\n\n/**\n * This element represents a multi-line plain-text editing control,\n * useful when you want to allow users to enter a sizeable amount of free-form text,\n * for example a comment on a review or feedback form.\n *\n * @element igc-textarea\n *\n * @slot - Text content from the default slot will be used as the value of the component.\n * @slot prefix - Renders content before the input.\n * @slot suffix - Renders content after input.\n * @slot helper-text - Renders content below the input.\n * @slot value-missing - Renders content when the required validation fails.\n * @slot too-long - Renders content when the maxlength validation fails.\n * @slot too-short - Renders content when the minlength validation fails.\n * @slot custom-error - Renders content when setCustomValidity(message) is set.\n * @slot invalid - Renders content when the component is in invalid state (validity.valid = false).\n *\n * @fires igcInput - Emitted when the control receives user input.\n * @fires igcChange - Emitted when the a change to the control value is committed by the user.\n *\n * @csspart container - The main wrapper that holds all main input elements of the textarea.\n * @csspart input - The native input element of the igc-textarea.\n * @csspart label - The native label element of the igc-textarea.\n * @csspart prefix - The prefix wrapper of the igc-textarea.\n * @csspart suffix - The suffix wrapper of the igc-textarea.\n * @csspart helper-text - The helper text wrapper of the igc-textarea.\n */\n@shadowOptions({ delegatesFocus: true })\nexport default class IgcTextareaComponent extends FormAssociatedRequiredMixin(\n EventEmitterMixin<IgcTextareaComponentEventMap, Constructor<LitElement>>(\n LitElement\n )\n) {\n public static readonly tagName = 'igc-textarea';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(IgcTextareaComponent, IgcValidationContainerComponent);\n }\n\n //#region Private properties and state\n\n private readonly _inputId = `textarea-${nextId++}`;\n\n private readonly _themes = addThemingController(this, all);\n\n private readonly _slots = addSlotController(this, {\n slots: Slots,\n onChange: this._handleSlotChange,\n });\n\n @query('textarea')\n private readonly _input!: HTMLTextAreaElement;\n\n protected override get __validators() {\n return textAreaValidators;\n }\n\n protected override readonly _formValue = createFormValueState(this, {\n initialValue: '',\n });\n\n //#endregion\n\n //#region Public properties and attributes\n\n /**\n * Specifies what if any permission the browser has to provide for automated assistance in filling out form field values,\n * as well as guidance to the browser as to the type of information expected in the field.\n * Refer to [this page](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for additional information.\n *\n * @attr\n */\n @property()\n public autocomplete!: string;\n\n /**\n * Controls whether and how text input is automatically capitalized as it is entered/edited by the user.\n *\n * [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize).\n *\n * @attr\n */\n @property()\n public override autocapitalize!: string;\n\n /**\n * Hints at the type of data that might be entered by the user while editing the element or its contents.\n * This allows a browser to display an appropriate virtual keyboard.\n *\n * [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode)\n *\n * @attr inputmode\n */\n @property({ attribute: 'inputmode' })\n public override inputMode!: string;\n\n /**\n * The label for the control.\n *\n * @attr\n */\n @property()\n public label!: string;\n\n /**\n * The maximum number of characters (UTF-16 code units) that the user can enter.\n * If this value isn't specified, the user can enter an unlimited number of characters.\n *\n * @attr maxlength\n */\n @property({ type: Number, attribute: 'maxlength' })\n public maxLength!: number;\n\n /**\n * The minimum number of characters (UTF-16 code units) required that the user should enter.\n *\n * @attr minlength\n */\n @property({ type: Number, attribute: 'minlength' })\n public minLength!: number;\n\n /**\n * Whether the control will have outlined appearance.\n * @attr\n */\n @property({ reflect: true, type: Boolean })\n public outlined = false;\n\n /**\n * The placeholder attribute of the control.\n *\n * @attr\n */\n @property()\n public placeholder!: string;\n\n /**\n * Makes the control a readonly field.\n *\n * @attr readonly\n */\n @property({ type: Boolean, reflect: true, attribute: 'readonly' })\n public readOnly = false;\n\n /**\n * Controls whether the control can be resized.\n * When `auto` is set, the control will try to expand and fit its content.\n *\n * @attr\n */\n @property()\n public resize: TextareaResize = 'vertical';\n\n /**\n * The number of visible text lines for the control. If it is specified, it must be a positive integer.\n * If it is not specified, the default value is 3.\n *\n * @attr\n */\n @property({ type: Number })\n public rows = 3;\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail\", false) */\n /**\n * The value of the component\n *\n * @attr\n */\n @property()\n public set value(value: string) {\n this._formValue.setValueAndFormState(value);\n }\n\n public get value(): string {\n return this._formValue.value;\n }\n\n /**\n * Controls whether the element may be checked for spelling errors.\n *\n * @attr\n */\n @property({\n type: Boolean,\n converter: {\n fromAttribute: (value) => !(!value || value === 'false'),\n toAttribute: (value) => (value ? 'true' : 'false'),\n },\n })\n public override spellcheck = true;\n\n /**\n * Indicates how the control should wrap the value for form submission.\n * Refer to [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attributes)\n * for explanation of the available values.\n *\n * @attr\n */\n @property()\n public wrap: 'hard' | 'soft' | 'off' = 'soft';\n\n /**\n * Enables validation rules to be evaluated without restricting user input. This applies to the `maxLength` property\n * when it is defined.\n *\n * @attr validate-only\n */\n @property({ type: Boolean, reflect: true, attribute: 'validate-only' })\n public validateOnly = false;\n\n //#endregion\n\n //#region Life-cycle hooks\n\n constructor() {\n super();\n\n createResizeObserverController(this, {\n callback: this._setAreaHeight,\n });\n\n addSafeEventListener(this, 'blur', this._handleBlur);\n }\n\n protected override updated(props: PropertyValues<this>): void {\n if (props.has('rows') || props.has('resize') || props.has('value')) {\n this._setAreaHeight();\n }\n }\n\n //#endregion\n\n //#region Internal methods\n\n private _setAutoHeight(): number {\n const { borderTopWidth, borderBottomWidth } = getComputedStyle(this._input);\n return (\n this._input.scrollHeight +\n asNumber(borderTopWidth) +\n asNumber(borderBottomWidth)\n );\n }\n\n protected _setAreaHeight(): void {\n if (this.resize === 'auto') {\n this._input.style.height = 'auto';\n this._input.style.height = `${this._setAutoHeight()}px`;\n } else {\n Object.assign(this._input.style, { height: undefined });\n }\n }\n\n protected _resolvePartNames() {\n return {\n container: true,\n prefixed: this._slots.hasAssignedElements('prefix', {\n selector: ':not([hidden])',\n }),\n suffixed: this._slots.hasAssignedElements('suffix', {\n selector: ':not([hidden])',\n }),\n filled: !!this.value,\n };\n }\n\n //#endregion\n\n //#region Event handlers\n\n private _handleSlotChange({\n isDefault,\n }: SlotChangeCallbackParameters<InferSlotNames<typeof Slots>>): void {\n if (isDefault) {\n const value = this._slots\n .getAssignedNodes('[default]', true)\n .map((node) => node.textContent?.trim())\n .filter((node) => Boolean(node))\n .join('\\r\\n');\n\n if (value !== this.value) {\n this.value = value;\n }\n }\n }\n\n protected _handleInput(): void {\n this._setTouchedState();\n this.value = this._input.value;\n this.emitEvent('igcInput', { detail: this.value });\n }\n\n protected _handleChange(): void {\n this._setTouchedState();\n this.value = this._input.value;\n this.emitEvent('igcChange', { detail: this.value });\n }\n\n //#endregion\n\n //#region Public methods\n\n /** Selects all text within the control. */\n public select(): void {\n this._input.select();\n }\n\n /* blazorSuppress */\n /** Sets the text selection range of the control */\n public setSelectionRange(\n start: number,\n end: number,\n direction: SelectionRangeDirection = 'none'\n ): void {\n this._input.setSelectionRange(start, end, direction);\n }\n\n /* blazorSuppress */\n /** Replaces the selected text in the control. */\n public setRangeText(\n replacement: string,\n start: number,\n end: number,\n selectMode: RangeTextSelectMode = 'preserve'\n ): void {\n this._input.setRangeText(replacement, start, end, selectMode);\n this.value = this._input.value;\n }\n\n /* blazorSuppress */\n public override scrollTo(options?: ScrollToOptions | undefined): void;\n /* blazorSuppress */\n public override scrollTo(x: number, y: number): void;\n public override scrollTo(x?: unknown, y?: unknown): void {\n x != null && y != null\n ? this._input.scrollTo(x as number, y as number)\n : this._input.scrollTo(x as ScrollToOptions);\n }\n\n //#endregion\n\n //#region Renderers\n\n protected _renderSlot(name: InferSlotNames<typeof Slots>) {\n const isHidden = !this._slots.hasAssignedElements(name, {\n selector: ':not([hidden])',\n });\n\n return html`\n <div part=${name} ?hidden=${isHidden}>\n <slot name=${name}></slot>\n </div>\n `;\n }\n\n protected _renderLabel() {\n return this.label\n ? html`\n <label part=\"label\" for=${this.id || this._inputId}>\n ${this.label}\n </label>\n `\n : nothing;\n }\n\n protected _renderStandard() {\n return html`\n ${this._renderLabel()}\n <div part=${partMap(this._resolvePartNames())}>\n ${this._renderSlot('prefix')} ${this._renderInput()}\n ${this._renderSlot('suffix')}\n </div>\n ${this._renderValidationContainer()}\n `;\n }\n\n protected _renderMaterial() {\n return html`\n <div\n part=${partMap({\n ...this._resolvePartNames(),\n labelled: !!this.label,\n placeholder: !!this.placeholder,\n })}\n >\n <div part=\"start\">${this._renderSlot('prefix')}</div>\n ${this._renderInput()}\n <div part=\"notch\">${this._renderLabel()}</div>\n <div part=\"filler\"></div>\n <div part=\"end\">${this._renderSlot('suffix')}</div>\n </div>\n ${this._renderValidationContainer()}\n `;\n }\n\n protected _renderInput() {\n const describedBy = this._slots.hasAssignedElements('helper-text')\n ? 'helper-text'\n : nothing;\n\n return html`\n <slot style=\"display: none\"></slot>\n <textarea\n id=${this.id || this._inputId}\n part=\"input\"\n style=${styleMap({\n resize: this.resize === 'auto' ? 'none' : this.resize,\n })}\n @input=${this._handleInput}\n @change=${this._handleChange}\n placeholder=${ifDefined(this.placeholder)}\n .rows=${this.rows}\n .value=${live(this.value)}\n .wrap=${this.wrap}\n autocomplete=${ifDefined(this.autocomplete as any)}\n autocapitalize=${ifDefined(this.autocapitalize as any)}\n inputmode=${ifDefined(this.inputMode)}\n spellcheck=${ifDefined(this.spellcheck)}\n minlength=${ifDefined(this.minLength)}\n maxlength=${ifDefined(this.validateOnly ? undefined : this.maxLength)}\n ?disabled=${this.disabled}\n ?required=${this.required}\n ?readonly=${this.readOnly}\n aria-describedby=${describedBy}\n ></textarea>\n `;\n }\n\n protected _renderValidationContainer(): TemplateResult {\n return IgcValidationContainerComponent.create(this);\n }\n\n protected override render() {\n return cache(\n this._themes.theme === 'material'\n ? this._renderMaterial()\n : this._renderStandard()\n );\n }\n\n //#endregion\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-textarea': IgcTextareaComponent;\n }\n}\n"]}
|
package/components/types.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export type MaskInputValueMode = 'raw' | 'withFormatting';
|
|
|
22
22
|
export type NavDrawerPosition = 'start' | 'end' | 'top' | 'bottom' | 'relative';
|
|
23
23
|
export type SliderTickLabelRotation = 0 | 90 | -90;
|
|
24
24
|
export type SliderTickOrientation = 'end' | 'mirror' | 'start';
|
|
25
|
+
export type SplitterOrientation = 'horizontal' | 'vertical';
|
|
25
26
|
export type StepperOrientation = 'horizontal' | 'vertical';
|
|
26
27
|
export type StepperStepType = 'full' | 'indicator' | 'title';
|
|
27
28
|
export type StepperTitlePosition = 'auto' | 'bottom' | 'top' | 'end' | 'start';
|
package/components/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":"","sourcesContent":["// Public API types\n// NOTE: use default value as first in order where possible for union types\n\n//#region shared types\nexport type AbsolutePosition = 'bottom' | 'middle' | 'top';\nexport type ContentOrientation = 'horizontal' | 'vertical';\nexport type HorizontalTransitionAnimation = 'slide' | 'fade' | 'none';\nexport type PickerMode = 'dropdown' | 'dialog';\nexport type PopoverScrollStrategy = 'scroll' | 'block' | 'close';\nexport type RangeTextSelectMode = 'preserve' | 'select' | 'start' | 'end';\nexport type SelectionRangeDirection = 'none' | 'backward' | 'forward';\nexport type StyleVariant =\n | 'primary'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger';\nexport type ToggleLabelPosition = 'after' | 'before';\nexport type TreeSelection = 'none' | 'multiple' | 'cascade';\n//#endregion\n\n//#region component-specific\nexport type AvatarShape = 'square' | 'circle' | 'rounded';\nexport type BadgeShape = 'rounded' | 'square';\nexport type ButtonGroupSelection = 'single' | 'single-required' | 'multiple';\nexport type ButtonVariant = 'contained' | 'flat' | 'outlined' | 'fab';\nexport type CarouselIndicatorsOrientation = 'end' | 'start';\nexport type DividerType = 'solid' | 'dashed';\nexport type ExpansionPanelIndicatorPosition = 'start' | 'end' | 'none';\nexport type IconButtonVariant = 'contained' | 'flat' | 'outlined';\nexport type InputType =\n | 'text'\n | 'email'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'url';\nexport type LinearProgressLabelAlign =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'bottom-start'\n | 'bottom'\n | 'bottom-end';\nexport type MaskInputValueMode = 'raw' | 'withFormatting';\nexport type NavDrawerPosition = 'start' | 'end' | 'top' | 'bottom' | 'relative';\nexport type SliderTickLabelRotation = 0 | 90 | -90;\nexport type SliderTickOrientation = 'end' | 'mirror' | 'start';\nexport type StepperOrientation = 'horizontal' | 'vertical';\nexport type StepperStepType = 'full' | 'indicator' | 'title';\nexport type StepperTitlePosition = 'auto' | 'bottom' | 'top' | 'end' | 'start';\nexport type StepperVerticalAnimation = 'grow' | 'fade' | 'none';\nexport type TabsActivation = 'auto' | 'manual';\nexport type TabsAlignment = 'start' | 'end' | 'center' | 'justify';\nexport type TextareaResize = 'vertical' | 'auto' | 'none';\nexport type TileManagerDragMode = 'none' | 'tile-header' | 'tile';\nexport type TileManagerResizeMode = 'none' | 'hover' | 'always';\n//#endregion\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":"","sourcesContent":["// Public API types\n// NOTE: use default value as first in order where possible for union types\n\n//#region shared types\nexport type AbsolutePosition = 'bottom' | 'middle' | 'top';\nexport type ContentOrientation = 'horizontal' | 'vertical';\nexport type HorizontalTransitionAnimation = 'slide' | 'fade' | 'none';\nexport type PickerMode = 'dropdown' | 'dialog';\nexport type PopoverScrollStrategy = 'scroll' | 'block' | 'close';\nexport type RangeTextSelectMode = 'preserve' | 'select' | 'start' | 'end';\nexport type SelectionRangeDirection = 'none' | 'backward' | 'forward';\nexport type StyleVariant =\n | 'primary'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger';\nexport type ToggleLabelPosition = 'after' | 'before';\nexport type TreeSelection = 'none' | 'multiple' | 'cascade';\n//#endregion\n\n//#region component-specific\nexport type AvatarShape = 'square' | 'circle' | 'rounded';\nexport type BadgeShape = 'rounded' | 'square';\nexport type ButtonGroupSelection = 'single' | 'single-required' | 'multiple';\nexport type ButtonVariant = 'contained' | 'flat' | 'outlined' | 'fab';\nexport type CarouselIndicatorsOrientation = 'end' | 'start';\nexport type DividerType = 'solid' | 'dashed';\nexport type ExpansionPanelIndicatorPosition = 'start' | 'end' | 'none';\nexport type IconButtonVariant = 'contained' | 'flat' | 'outlined';\nexport type InputType =\n | 'text'\n | 'email'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'url';\nexport type LinearProgressLabelAlign =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'bottom-start'\n | 'bottom'\n | 'bottom-end';\nexport type MaskInputValueMode = 'raw' | 'withFormatting';\nexport type NavDrawerPosition = 'start' | 'end' | 'top' | 'bottom' | 'relative';\nexport type SliderTickLabelRotation = 0 | 90 | -90;\nexport type SliderTickOrientation = 'end' | 'mirror' | 'start';\nexport type SplitterOrientation = 'horizontal' | 'vertical';\nexport type StepperOrientation = 'horizontal' | 'vertical';\nexport type StepperStepType = 'full' | 'indicator' | 'title';\nexport type StepperTitlePosition = 'auto' | 'bottom' | 'top' | 'end' | 'start';\nexport type StepperVerticalAnimation = 'grow' | 'fade' | 'none';\nexport type TabsActivation = 'auto' | 'manual';\nexport type TabsAlignment = 'start' | 'end' | 'center' | 'justify';\nexport type TextareaResize = 'vertical' | 'auto' | 'none';\nexport type TileManagerDragMode = 'none' | 'tile-header' | 'tile';\nexport type TileManagerResizeMode = 'none' | 'hover' | 'always';\n//#endregion\n"]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* A utility component that visually hides its content while keeping it
|
|
4
|
+
* accessible to screen readers and other assistive technologies.
|
|
5
|
+
*
|
|
6
|
+
* The content is only visible when it receives focus, making it ideal for
|
|
7
|
+
* skip navigation links and other focus-based accessibility patterns.
|
|
8
|
+
*
|
|
9
|
+
* @element igc-visually-hidden
|
|
10
|
+
*
|
|
11
|
+
* @slot - Default slot for the visually hidden content.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```html
|
|
15
|
+
* <!-- Hide a label visually while keeping it accessible -->
|
|
16
|
+
* <igc-visually-hidden>
|
|
17
|
+
* <label for="search">Search</label>
|
|
18
|
+
* </igc-visually-hidden>
|
|
19
|
+
* <input id="search" type="search" placeholder="Search..." />
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```html
|
|
24
|
+
* <!-- Skip navigation link that becomes visible on focus -->
|
|
25
|
+
* <igc-visually-hidden>
|
|
26
|
+
* <a href="#main-content">Skip to main content</a>
|
|
27
|
+
* </igc-visually-hidden>
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```html
|
|
32
|
+
* <!-- Provide additional context for icon-only buttons -->
|
|
33
|
+
* <button>
|
|
34
|
+
* <igc-icon name="close"></igc-icon>
|
|
35
|
+
* <igc-visually-hidden>Close dialog</igc-visually-hidden>
|
|
36
|
+
* </button>
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export default class IgcVisuallyHiddenComponent extends LitElement {
|
|
40
|
+
static readonly tagName = "igc-visually-hidden";
|
|
41
|
+
static styles: import("lit").CSSResult;
|
|
42
|
+
static register(): void;
|
|
43
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
44
|
+
}
|
|
45
|
+
declare global {
|
|
46
|
+
interface HTMLElementTagNameMap {
|
|
47
|
+
'igc-visually-hidden': IgcVisuallyHiddenComponent;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { css, html, LitElement } from 'lit';
|
|
2
|
+
import { registerComponent } from '../common/definitions/register.js';
|
|
3
|
+
export default class IgcVisuallyHiddenComponent extends LitElement {
|
|
4
|
+
static { this.tagName = 'igc-visually-hidden'; }
|
|
5
|
+
static { this.styles = css `
|
|
6
|
+
:host(:not(:focus-within)) {
|
|
7
|
+
position: absolute;
|
|
8
|
+
width: 1px;
|
|
9
|
+
height: 1px;
|
|
10
|
+
border: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
margin: -1px;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
clip: rect(0, 0, 0, 0);
|
|
16
|
+
clip-path: inset(50%);
|
|
17
|
+
}
|
|
18
|
+
`; }
|
|
19
|
+
static register() {
|
|
20
|
+
registerComponent(IgcVisuallyHiddenComponent);
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
return html `<slot></slot>`;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=visually-hidden.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visually-hidden.js","sourceRoot":"","sources":["../../../src/components/visually-hidden/visually-hidden.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAwCtE,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,UAAU;aACzC,YAAO,GAAG,qBAAqB,CAAC;aAEhC,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;GAalC,CAAC;IAGK,MAAM,CAAC,QAAQ;QACpB,iBAAiB,CAAC,0BAA0B,CAAC,CAAC;IAChD,CAAC;IAEkB,MAAM;QACvB,OAAO,IAAI,CAAA,eAAe,CAAC;IAC7B,CAAC","sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { registerComponent } from '../common/definitions/register.js';\n\n/* blazorSuppress */\n/**\n * A utility component that visually hides its content while keeping it\n * accessible to screen readers and other assistive technologies.\n *\n * The content is only visible when it receives focus, making it ideal for\n * skip navigation links and other focus-based accessibility patterns.\n *\n * @element igc-visually-hidden\n *\n * @slot - Default slot for the visually hidden content.\n *\n * @example\n * ```html\n * <!-- Hide a label visually while keeping it accessible -->\n * <igc-visually-hidden>\n * <label for=\"search\">Search</label>\n * </igc-visually-hidden>\n * <input id=\"search\" type=\"search\" placeholder=\"Search...\" />\n * ```\n *\n * @example\n * ```html\n * <!-- Skip navigation link that becomes visible on focus -->\n * <igc-visually-hidden>\n * <a href=\"#main-content\">Skip to main content</a>\n * </igc-visually-hidden>\n * ```\n *\n * @example\n * ```html\n * <!-- Provide additional context for icon-only buttons -->\n * <button>\n * <igc-icon name=\"close\"></igc-icon>\n * <igc-visually-hidden>Close dialog</igc-visually-hidden>\n * </button>\n * ```\n */\nexport default class IgcVisuallyHiddenComponent extends LitElement {\n public static readonly tagName = 'igc-visually-hidden';\n\n public static override styles = css`\n :host(:not(:focus-within)) {\n position: absolute;\n width: 1px;\n height: 1px;\n border: 0;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n white-space: nowrap;\n clip: rect(0, 0, 0, 0);\n clip-path: inset(50%);\n }\n `;\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(IgcVisuallyHiddenComponent);\n }\n\n protected override render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-visually-hidden': IgcVisuallyHiddenComponent;\n }\n}\n"]}
|