igniteui-webcomponents 2.1.1 → 2.2.0-beta.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 +6 -0
- package/components/avatar/themes/avatar.base.css.js +1 -1
- package/components/avatar/themes/avatar.base.css.js.map +1 -1
- package/components/badge/themes/light/badge.base.css.js +1 -1
- package/components/badge/themes/light/badge.base.css.js.map +1 -1
- package/components/button/button-base.js +2 -2
- package/components/button/button-base.js.map +1 -1
- package/components/button/themes/button/light/button.base.css.js +1 -1
- package/components/button/themes/button/light/button.base.css.js.map +1 -1
- package/components/button/themes/button/light/button.material.css.js +1 -1
- package/components/button/themes/button/light/button.material.css.js.map +1 -1
- package/components/button/themes/icon-button/light/icon-button.base.css.js +1 -1
- package/components/button/themes/icon-button/light/icon-button.base.css.js.map +1 -1
- package/components/button/themes/icon-button/light/icon-button.fluent.css.js +1 -1
- package/components/button/themes/icon-button/light/icon-button.fluent.css.js.map +1 -1
- package/components/calendar/calendar.js +1 -2
- package/components/calendar/calendar.js.map +1 -1
- package/components/card/card.actions.d.ts +2 -0
- package/components/card/card.actions.js +8 -0
- package/components/card/card.actions.js.map +1 -1
- package/components/card/themes/light/card.actions.bootstrap.css.js +1 -1
- package/components/card/themes/light/card.actions.bootstrap.css.js.map +1 -1
- package/components/card/themes/light/card.actions.material.css.js +1 -1
- package/components/card/themes/light/card.actions.material.css.js.map +1 -1
- package/components/card/themes/light/card.content.bootstrap.css.js +1 -1
- package/components/card/themes/light/card.content.bootstrap.css.js.map +1 -1
- package/components/card/themes/light/card.content.indigo.css.js +1 -1
- package/components/card/themes/light/card.content.indigo.css.js.map +1 -1
- package/components/card/themes/light/card.content.material.css.js +1 -1
- package/components/card/themes/light/card.content.material.css.js.map +1 -1
- package/components/card/themes/light/card.header.bootstrap.css.js +1 -1
- package/components/card/themes/light/card.header.bootstrap.css.js.map +1 -1
- package/components/card/themes/light/card.header.indigo.css.js +1 -1
- package/components/card/themes/light/card.header.indigo.css.js.map +1 -1
- package/components/card/themes/light/card.header.material.css.js +1 -1
- package/components/card/themes/light/card.header.material.css.js.map +1 -1
- package/components/card/themes/light/card.material.css.js +1 -1
- package/components/card/themes/light/card.material.css.js.map +1 -1
- package/components/card/themes/light/card.media.material.css.js +1 -1
- package/components/card/themes/light/card.media.material.css.js.map +1 -1
- package/components/checkbox/checkbox-base.d.ts +5 -1
- package/components/checkbox/checkbox-base.js +20 -2
- package/components/checkbox/checkbox-base.js.map +1 -1
- package/components/checkbox/checkbox.js +8 -2
- package/components/checkbox/checkbox.js.map +1 -1
- package/components/checkbox/switch.js +9 -2
- package/components/checkbox/switch.js.map +1 -1
- package/components/checkbox/themes/light/checkbox.base.css.js +1 -1
- package/components/checkbox/themes/light/checkbox.base.css.js.map +1 -1
- package/components/checkbox/themes/light/checkbox.fluent.css.js +1 -1
- package/components/checkbox/themes/light/checkbox.fluent.css.js.map +1 -1
- package/components/checkbox/themes/light/checkbox.material.css.js +1 -1
- package/components/checkbox/themes/light/checkbox.material.css.js.map +1 -1
- package/components/checkbox/themes/light/switch.base.css.js +1 -1
- package/components/checkbox/themes/light/switch.base.css.js.map +1 -1
- package/components/checkbox/themes/light/switch.fluent.css.js +1 -1
- package/components/checkbox/themes/light/switch.fluent.css.js.map +1 -1
- package/components/chip/chip.js +1 -1
- package/components/chip/chip.js.map +1 -1
- package/components/chip/themes/chip.base.css.js +1 -1
- package/components/chip/themes/chip.base.css.js.map +1 -1
- package/components/chip/themes/chip.bootstrap.css.js +1 -1
- package/components/chip/themes/chip.bootstrap.css.js.map +1 -1
- package/components/chip/themes/chip.fluent.css.js +1 -1
- package/components/chip/themes/chip.fluent.css.js.map +1 -1
- package/components/chip/themes/chip.indigo.css.js +1 -1
- package/components/chip/themes/chip.indigo.css.js.map +1 -1
- package/components/chip/themes/chip.material.css.js +1 -1
- package/components/chip/themes/chip.material.css.js.map +1 -1
- package/components/common/decorators/blazorTypeOverride.d.ts +7 -0
- package/components/common/decorators/blazorTypeOverride.js +4 -0
- package/components/common/decorators/blazorTypeOverride.js.map +1 -0
- package/components/common/decorators/index.d.ts +1 -0
- package/components/common/decorators/index.js +1 -0
- package/components/common/decorators/index.js.map +1 -1
- package/components/common/definitions/defineAllComponents.js +8 -0
- package/components/common/definitions/defineAllComponents.js.map +1 -1
- package/components/dropdown/dropdown-group.d.ts +25 -0
- package/components/dropdown/dropdown-group.js +42 -0
- package/components/dropdown/dropdown-group.js.map +1 -0
- package/components/dropdown/dropdown-header.d.ts +16 -0
- package/components/dropdown/dropdown-header.js +22 -0
- package/components/dropdown/dropdown-header.js.map +1 -0
- package/components/dropdown/dropdown-item.d.ts +46 -0
- package/components/dropdown/dropdown-item.js +78 -0
- package/components/dropdown/dropdown-item.js.map +1 -0
- package/components/dropdown/dropdown.d.ts +117 -0
- package/components/dropdown/dropdown.js +412 -0
- package/components/dropdown/dropdown.js.map +1 -0
- package/components/dropdown/themes/dark/dropdown.bootstrap.css.d.ts +1 -0
- package/components/dropdown/themes/dark/dropdown.bootstrap.css.js +3 -0
- package/components/dropdown/themes/dark/dropdown.bootstrap.css.js.map +1 -0
- package/components/dropdown/themes/dark/dropdown.fluent.css.d.ts +1 -0
- package/components/dropdown/themes/dark/dropdown.fluent.css.js +3 -0
- package/components/dropdown/themes/dark/dropdown.fluent.css.js.map +1 -0
- package/components/dropdown/themes/dark/dropdown.indigo.css.d.ts +1 -0
- package/components/dropdown/themes/dark/dropdown.indigo.css.js +3 -0
- package/components/dropdown/themes/dark/dropdown.indigo.css.js.map +1 -0
- package/components/dropdown/themes/light/dropdown-group.base.css.d.ts +1 -0
- package/components/dropdown/themes/light/dropdown-group.base.css.js +3 -0
- package/components/dropdown/themes/light/dropdown-group.base.css.js.map +1 -0
- package/components/dropdown/themes/light/dropdown-group.fluent.css.d.ts +1 -0
- package/components/dropdown/themes/light/dropdown-group.fluent.css.js +3 -0
- package/components/dropdown/themes/light/dropdown-group.fluent.css.js.map +1 -0
- package/components/dropdown/themes/light/dropdown-header.base.css.d.ts +1 -0
- package/components/dropdown/themes/light/dropdown-header.base.css.js +3 -0
- package/components/dropdown/themes/light/dropdown-header.base.css.js.map +1 -0
- package/components/dropdown/themes/light/dropdown-header.bootstrap.css.d.ts +1 -0
- package/components/dropdown/themes/light/dropdown-header.bootstrap.css.js +3 -0
- package/components/dropdown/themes/light/dropdown-header.bootstrap.css.js.map +1 -0
- package/components/dropdown/themes/light/dropdown-item.base.css.d.ts +1 -0
- package/components/dropdown/themes/light/dropdown-item.base.css.js +3 -0
- package/components/dropdown/themes/light/dropdown-item.base.css.js.map +1 -0
- package/components/dropdown/themes/light/dropdown-item.bootstrap.css.d.ts +1 -0
- package/components/dropdown/themes/light/dropdown-item.bootstrap.css.js +3 -0
- package/components/dropdown/themes/light/dropdown-item.bootstrap.css.js.map +1 -0
- package/components/dropdown/themes/light/dropdown-item.fluent.css.d.ts +1 -0
- package/components/dropdown/themes/light/dropdown-item.fluent.css.js +3 -0
- package/components/dropdown/themes/light/dropdown-item.fluent.css.js.map +1 -0
- package/components/dropdown/themes/light/dropdown-item.indigo.css.d.ts +1 -0
- package/components/dropdown/themes/light/dropdown-item.indigo.css.js +3 -0
- package/components/dropdown/themes/light/dropdown-item.indigo.css.js.map +1 -0
- package/components/dropdown/themes/light/dropdown.base.css.d.ts +1 -0
- package/components/dropdown/themes/light/dropdown.base.css.js +3 -0
- package/components/dropdown/themes/light/dropdown.base.css.js.map +1 -0
- package/components/dropdown/themes/light/dropdown.bootstrap.css.d.ts +1 -0
- package/components/dropdown/themes/light/dropdown.bootstrap.css.js +3 -0
- package/components/dropdown/themes/light/dropdown.bootstrap.css.js.map +1 -0
- package/components/dropdown/themes/light/dropdown.fluent.css.d.ts +1 -0
- package/components/dropdown/themes/light/dropdown.fluent.css.js +3 -0
- package/components/dropdown/themes/light/dropdown.fluent.css.js.map +1 -0
- package/components/dropdown/themes/light/dropdown.indigo.css.d.ts +1 -0
- package/components/dropdown/themes/light/dropdown.indigo.css.js +3 -0
- package/components/dropdown/themes/light/dropdown.indigo.css.js.map +1 -0
- package/components/icon/icon.material.css.js +1 -1
- package/components/icon/icon.material.css.js.map +1 -1
- package/components/input/input-base.js.map +1 -1
- package/components/input/themes/light/input.base.css.js +1 -1
- package/components/input/themes/light/input.base.css.js.map +1 -1
- package/components/list/themes/light/list-header.base.css.js +1 -1
- package/components/list/themes/light/list-header.base.css.js.map +1 -1
- package/components/list/themes/light/list-item.base.css.js +1 -1
- package/components/list/themes/light/list-item.base.css.js.map +1 -1
- package/components/list/themes/light/list.base.css.js +1 -1
- package/components/list/themes/light/list.base.css.js.map +1 -1
- package/components/nav-drawer/styles/nav-drawer-header-item.base.css.js +1 -1
- package/components/nav-drawer/styles/nav-drawer-header-item.base.css.js.map +1 -1
- package/components/nav-drawer/styles/nav-drawer-item.base.css.js +1 -1
- package/components/nav-drawer/styles/nav-drawer-item.base.css.js.map +1 -1
- package/components/nav-drawer/styles/nav-drawer.base.css.js +1 -1
- package/components/nav-drawer/styles/nav-drawer.base.css.js.map +1 -1
- package/components/navbar/themes/light/navbar.base.css.js +1 -1
- package/components/navbar/themes/light/navbar.base.css.js.map +1 -1
- package/components/progress/themes/circular/circular.progress.base.css.js +1 -1
- package/components/progress/themes/circular/circular.progress.base.css.js.map +1 -1
- package/components/progress/themes/linear/linear.progress.base.css.js +1 -1
- package/components/progress/themes/linear/linear.progress.base.css.js.map +1 -1
- package/components/progress/themes/linear/linear.progress.bootstrap.css.js +1 -1
- package/components/progress/themes/linear/linear.progress.bootstrap.css.js.map +1 -1
- package/components/progress/themes/linear/linear.progress.indigo.css.js +1 -1
- package/components/progress/themes/linear/linear.progress.indigo.css.js.map +1 -1
- package/components/radio/radio.d.ts +5 -1
- package/components/radio/radio.js +25 -2
- package/components/radio/radio.js.map +1 -1
- package/components/radio/themes/light/radio.base.css.js +1 -1
- package/components/radio/themes/light/radio.base.css.js.map +1 -1
- package/components/radio/themes/light/radio.fluent.css.js +1 -1
- package/components/radio/themes/light/radio.fluent.css.js.map +1 -1
- package/components/radio-group/radio-group.base.css.js +1 -1
- package/components/radio-group/radio-group.base.css.js.map +1 -1
- package/components/rating/rating.base.css.js +1 -1
- package/components/rating/rating.base.css.js.map +1 -1
- package/components/ripple/ripple.material.css.js +1 -1
- package/components/ripple/ripple.material.css.js.map +1 -1
- package/components/slider/slider-base.js +3 -2
- package/components/slider/slider-base.js.map +1 -1
- package/components/slider/themes/light/slider.base.css.js +1 -1
- package/components/slider/themes/light/slider.base.css.js.map +1 -1
- package/components/snackbar/themes/snackbar.base.css.js +1 -1
- package/components/snackbar/themes/snackbar.base.css.js.map +1 -1
- package/components/toggle/toggle.controller.d.ts +32 -0
- package/components/toggle/toggle.controller.js +85 -0
- package/components/toggle/toggle.controller.js.map +1 -0
- package/components/toggle/toggle.directive.d.ts +14 -0
- package/components/toggle/toggle.directive.js +76 -0
- package/components/toggle/toggle.directive.js.map +1 -0
- package/components/toggle/utilities.d.ts +50 -0
- package/components/toggle/utilities.js +2 -0
- package/components/toggle/utilities.js.map +1 -0
- package/custom-elements.json +366 -0
- package/index.d.ts +4 -0
- package/index.js +4 -0
- package/index.js.map +1 -1
- package/package.json +2 -1
- package/themes/dark/bootstrap.css +1 -1
- package/themes/dark/fluent.css +1 -1
- package/themes/dark/indigo.css +1 -1
- package/vscode-html-custom-data.json +224 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider-base.js","sourceRoot":"","sources":["../../../src/components/slider/slider-base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAC;AACvD,OAAO,EACL,QAAQ,EACR,KAAK,EACL,qBAAqB,EACrB,KAAK,GACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAa,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,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,CAAC;+DACe;AAM3D;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;iEAC7B;AAMjC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,CAAC;mEAC7B;AAMnC;IADC,QAAQ,EAAE;sDACU;AAMrB;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;2DACZ;AAM5B;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;kEACsB;AAMrD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;iEACjC;AAO3C;IALC,KAAK,CAAC,KAAK,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IAC5C,KAAK,CAAC,KAAK,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IAC5C,KAAK,CAAC,YAAY,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IACnD,KAAK,CAAC,YAAY,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IACnD,KAAK,CAAC,MAAM,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;+DAG7C;AAGD;IADC,KAAK,CAAC,QAAQ,CAAC;0DAOf;AA/MU,sBAAsB;IADlC,MAAM,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;GACnC,sBAAsB,CAomBlC;SApmBY,sBAAsB","sourcesContent":["import { html, LitElement, TemplateResult } from 'lit';\nimport {\n property,\n query,\n queryAssignedElements,\n state,\n} from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { StyleInfo, styleMap } from 'lit/directives/style-map.js';\nimport { themes } from '../../theming';\nimport { watch } from '../common/decorators';\nimport { styles } from './themes/light/slider.base.css';\nimport { styles as bootstrap } from './themes/light/slider.bootstrap.css';\nimport { styles as fluent } from './themes/light/slider.fluent.css';\nimport { styles as indigo } from './themes/light/slider.indigo.css';\nimport { styles as material } from './themes/light/slider.material.css';\n\n@themes({ material, bootstrap, fluent, indigo })\nexport class IgcSliderBaseComponent extends LitElement {\n public static override styles = styles;\n\n @query(`[part='thumb']`)\n protected thumb!: HTMLElement;\n\n @queryAssignedElements({ selector: 'igc-slider-label' })\n private labelElements!: HTMLElement[];\n\n private _lowerBound?: number;\n private _upperBound?: number;\n private _min = 0;\n private _max = 100;\n private _step = 1;\n private startValue?: number;\n private pointerCaptured = false;\n private thumbHoverTimer: any;\n protected activeThumb?: HTMLElement;\n\n @state()\n private thumbLabelsVisible = false;\n\n @state()\n private labels?: string[];\n\n public set min(value: number) {\n if (value < this.max) {\n const oldVal = this._min;\n this._min = this.labels ? 0 : value;\n this.requestUpdate('min', oldVal);\n\n if (typeof this.lowerBound === 'number' && this.lowerBound < value) {\n this.lowerBound = value;\n }\n }\n }\n\n /**\n * The minimum value of the slider scale. Defaults to 0.\n */\n @property({ type: Number })\n public get min() {\n return this._min;\n }\n\n public set max(value: number) {\n if (value > this.min) {\n const oldVal = this._max;\n this._max = this.labels ? this.labels.length - 1 : value;\n this.requestUpdate('max', oldVal);\n\n if (typeof this.upperBound === 'number' && this.upperBound > value) {\n this.upperBound = value;\n }\n }\n }\n\n /**\n * The maximum value of the slider scale. Defaults to 100.\n */\n @property({ type: Number })\n public get max() {\n return this._max;\n }\n\n public set lowerBound(value: number | undefined) {\n const oldVal = this._lowerBound;\n\n if (typeof value === 'number') {\n this._lowerBound = this.valueInRange(value, this.min, this.actualMax);\n } else {\n this._lowerBound = value;\n }\n this.requestUpdate('lowerBound', oldVal);\n }\n\n /**\n * The lower bound of the slider value. If not set, the `min` value is applied.\n */\n @property({ type: Number, attribute: 'lower-bound' })\n public get lowerBound(): number | undefined {\n return this._lowerBound;\n }\n\n public set upperBound(value: number | undefined) {\n const oldVal = this._upperBound;\n\n if (typeof value === 'number') {\n this._upperBound = this.valueInRange(value, this.actualMin, this.max);\n } else {\n this._upperBound = value;\n }\n this.requestUpdate('upperBound', oldVal);\n }\n\n /**\n * The upper bound of the slider value. If not set, the `max` value is applied.\n */\n @property({ type: Number, attribute: 'upper-bound' })\n public get upperBound(): number | undefined {\n return this._upperBound;\n }\n\n /**\n * Disables the UI interactions of the slider.\n */\n @property({ type: Boolean, reflect: true })\n public disabled = false;\n\n /**\n * Marks the slider track as discrete so it displays the steps.\n * If the `step` is 0, the slider will remain continuos even if `discreteTrack` is `true`.\n */\n @property({ type: Boolean, attribute: 'discrete-track' })\n public discreteTrack = false;\n\n /**\n * Hides the thumb tooltip.\n */\n @property({ type: Boolean, attribute: 'hide-tooltip' })\n public hideTooltip = false;\n\n public set step(value: number) {\n const oldVal = this._step;\n this._step = this.labels ? 1 : value;\n this.requestUpdate('step', oldVal);\n }\n\n /**\n * Specifies the granularity that the value must adhere to.\n * If set to 0 no stepping is implied and any value in the range is allowed.\n */\n @property({ type: Number })\n public get step() {\n return this._step;\n }\n\n /**\n * The number of primary ticks. It defaults to 0 which means no primary ticks are displayed.\n */\n @property({ type: Number, attribute: 'primary-ticks' })\n public primaryTicks = 0;\n\n /**\n * The number of secondary ticks. It defaults to 0 which means no secondary ticks are displayed.\n */\n @property({ type: Number, attribute: 'secondary-ticks' })\n public secondaryTicks = 0;\n\n /**\n * Changes the orientation of the ticks.\n */\n @property({ attribute: 'tick-orientation' })\n public tickOrientation: 'mirror' | 'start' | 'end' = 'end';\n\n /**\n * Hides the primary tick labels.\n */\n @property({ type: Boolean, attribute: 'hide-primary-labels' })\n public hidePrimaryLabels = false;\n\n /**\n * Hides the secondary tick labels.\n */\n @property({ type: Boolean, attribute: 'hide-secondary-labels' })\n public hideSecondaryLabels = false;\n\n /**\n * The locale used to format the thumb and tick label values in the slider.\n */\n @property()\n public locale = 'en';\n\n /**\n * String format used for the thumb and tick label values in the slider.\n */\n @property({ attribute: 'value-format' })\n public valueFormat?: string;\n\n /**\n * Number format options used for the thumb and tick label values in the slider.\n */\n @property({ attribute: false })\n public valueFormatOptions?: Intl.NumberFormatOptions;\n\n /**\n * The degrees for the rotation of the tick labels. Defaults to 0.\n */\n @property({ type: Number, reflect: true, attribute: 'tick-label-rotation' })\n public tickLabelRotation: 0 | 90 | -90 = 0;\n\n @watch('min', { waitUntilFirstUpdate: true })\n @watch('max', { waitUntilFirstUpdate: true })\n @watch('lowerBound', { waitUntilFirstUpdate: true })\n @watch('upperBound', { waitUntilFirstUpdate: true })\n @watch('step', { waitUntilFirstUpdate: true })\n protected constraintsChange() {\n this.normalizeValue();\n }\n\n @watch('labels')\n protected labelsChange() {\n if (this.labels) {\n this.min = 0;\n this.max = this.labels.length - 1;\n this.step = 1;\n }\n }\n\n constructor() {\n super();\n this.addEventListener('pointerdown', this.pointerDown);\n this.addEventListener('pointermove', this.pointerMove);\n this.addEventListener('lostpointercapture', this.lostPointerCapture);\n this.addEventListener('keydown', this.handleKeydown);\n }\n\n public override connectedCallback() {\n super.connectedCallback();\n this.normalizeValue();\n }\n\n protected handleSlotChange() {\n this.labels =\n this.labelElements && this.labelElements.length\n ? this.labelElements.map((e) => e.textContent as string)\n : undefined;\n }\n\n /* c8 ignore next 3 */\n protected get activeValue() {\n return 0;\n }\n\n /* c8 ignore next */\n protected normalizeValue(): void {}\n\n /* c8 ignore next 3 */\n protected getTrackStyle(): StyleInfo {\n return {};\n }\n\n /* c8 ignore next 3 */\n protected updateValue(_increment: number): boolean {\n return false;\n }\n\n /* c8 ignore next 3 */\n protected renderThumbs(): TemplateResult<1> {\n return html``;\n }\n\n /* c8 ignore next */\n protected emitInputEvent() {}\n\n /* c8 ignore next */\n protected emitChangeEvent() {}\n\n private get actualMin(): number {\n return typeof this.lowerBound === 'number'\n ? (this.lowerBound as number)\n : this.min;\n }\n\n private get actualMax(): number {\n return typeof this.upperBound === 'number'\n ? (this.upperBound as number)\n : this.max;\n }\n\n private get isLTR(): boolean {\n const styles = window.getComputedStyle(this);\n return styles.getPropertyValue('direction') === 'ltr';\n }\n\n protected validateValue(value: number) {\n value = this.valueInRange(value, this.actualMin, this.actualMax);\n value = this.normalizeByStep(value);\n\n return value;\n }\n\n private formatValue(value: number) {\n return this.valueFormat\n ? this.valueFormat.replace(\n '{0}',\n value.toLocaleString(this.locale, this.valueFormatOptions)\n )\n : value.toLocaleString(this.locale, this.valueFormatOptions);\n }\n\n private normalizeByStep(value: number) {\n return this.step ? value - ((value - this.actualMin) % this.step) : value;\n }\n\n protected closestHandle(_event: PointerEvent): HTMLElement {\n return this.thumb;\n }\n\n private totalTickCount() {\n const primaryTicks = this.labels\n ? this.primaryTicks > 0\n ? this.labels.length\n : 0\n : this.primaryTicks === 1\n ? 2\n : this.primaryTicks;\n\n return primaryTicks > 0\n ? (primaryTicks - 1) * this.secondaryTicks + primaryTicks\n : this.secondaryTicks > 0\n ? this.secondaryTicks\n : 0;\n }\n\n private tickValue(idx: number) {\n const tickCount = this.totalTickCount();\n const labelStep =\n tickCount > 1\n ? (this.max - this.min) / (tickCount - 1)\n : this.max - this.min;\n const labelVal = labelStep * idx;\n\n return this.min + labelVal;\n }\n\n private isPrimary(idx: number) {\n return this.primaryTicks <= 0\n ? false\n : idx % (this.secondaryTicks + 1) === 0;\n }\n\n private showThumbLabels() {\n if (this.disabled || this.hideTooltip) {\n return;\n }\n\n if (this.thumbHoverTimer) {\n clearTimeout(this.thumbHoverTimer);\n this.thumbHoverTimer = null;\n }\n\n this.thumbLabelsVisible = true;\n }\n\n private hideThumbLabels() {\n if (this.pointerCaptured || !this.thumbLabelsVisible) {\n return;\n }\n\n this.thumbHoverTimer = setTimeout(() => {\n this.thumbLabelsVisible = false;\n }, 750);\n }\n\n private valueInRange(value: number, min = 0, max = 100) {\n return Math.max(Math.min(value, max), min);\n }\n\n protected valueToFraction(value: number) {\n return (value - this.min) / (this.max - this.min);\n }\n\n private calculateTrackUpdate(mouseX: number): number {\n if (!this.activeThumb) {\n return 0;\n }\n\n const thumbBoundaries = this.activeThumb.getBoundingClientRect();\n const thumbCenter = (thumbBoundaries.right - thumbBoundaries.left) / 2;\n const thumbPositionX = thumbBoundaries.left + thumbCenter;\n\n const scale = this.getBoundingClientRect().width / (this.max - this.min);\n const change = this.isLTR\n ? mouseX - thumbPositionX\n : thumbPositionX - mouseX;\n\n if (this.step) {\n const stepDistance = scale * this.step;\n const stepDistanceCenter = stepDistance / 2;\n\n // If the thumb scale range (slider update) is less than a half step,\n // the position stays the same.\n const scaleXPositive = Math.abs(change);\n if (scaleXPositive < stepDistanceCenter) {\n return 0;\n }\n\n return Math.round(change / stepDistance) * this.step;\n } else {\n return change / scale;\n }\n }\n\n private updateSlider(mouseX: number) {\n if (this.disabled) {\n return;\n }\n\n const increment = this.calculateTrackUpdate(mouseX);\n if (this.activeThumb && increment !== 0) {\n this.updateValue(increment);\n }\n }\n\n private pointerDown = (event: PointerEvent) => {\n const thumb = this.closestHandle(event);\n thumb.focus();\n\n this.startValue = this.activeValue;\n this.updateSlider(event.clientX);\n\n this.setPointerCapture(event.pointerId);\n this.pointerCaptured = true;\n this.showThumbLabels();\n event.preventDefault();\n };\n\n private pointerMove = (event: PointerEvent) => {\n if (this.pointerCaptured) {\n this.updateSlider(event.clientX);\n }\n };\n\n private lostPointerCapture = () => {\n this.pointerCaptured = false;\n this.hideThumbLabels();\n\n if (this.startValue! !== this.activeValue) {\n this.emitChangeEvent();\n }\n this.startValue = undefined;\n };\n\n private handleKeydown = (event: KeyboardEvent) => {\n if (this.disabled) {\n return;\n }\n\n const { key } = event;\n\n let increment = 0;\n const value = this.activeValue;\n const step = this.step ? this.step : 1;\n\n switch (key) {\n case 'ArrowLeft':\n increment += this.isLTR ? -step : step;\n break;\n case 'ArrowRight':\n increment += this.isLTR ? step : -step;\n break;\n case 'ArrowUp':\n increment = step;\n break;\n case 'ArrowDown':\n increment = -step;\n break;\n case 'Home':\n increment = this.actualMin - value;\n break;\n case 'End':\n increment = this.actualMax - value;\n break;\n case 'PageUp':\n increment = Math.max((this.actualMax - this.actualMin) / 10, step);\n break;\n case 'PageDown':\n increment = -Math.max((this.actualMax - this.actualMin) / 10, step);\n break;\n default:\n return;\n }\n\n if (increment) {\n const updated = this.updateValue(increment);\n this.showThumbLabels();\n this.hideThumbLabels();\n\n if (updated) {\n this.emitChangeEvent();\n }\n }\n };\n\n private handleThumbPointerEnter = () => {\n this.showThumbLabels();\n };\n\n private handleThumbPointerLeave = () => {\n this.hideThumbLabels();\n };\n\n protected renderTicks() {\n const groups = [];\n for (let i = 0, totalCount = this.totalTickCount(); i < totalCount; i++) {\n const isPrimary = this.isPrimary(i);\n groups.push(html`\n <div part=\"tick-group\">\n <div part=\"tick\" data-primary=${isPrimary}>\n ${(isPrimary ? this.hidePrimaryLabels : this.hideSecondaryLabels)\n ? html``\n : html`\n <div part=\"tick-label\">\n <span part=\"tick-label-inner\">\n ${this.labels\n ? isPrimary\n ? this.labels[\n Math.round(i / (this.secondaryTicks + 1))\n ]\n : ''\n : this.formatValue(this.tickValue(i))}\n </span>\n </div>\n `}\n </div>\n </div>\n `);\n }\n return groups;\n }\n\n protected renderThumb(value: number, ariaLabel?: string, thumbId?: string) {\n const percent = `${this.valueToFraction(value) * 100}%`;\n\n return html`\n <div\n part=\"thumb\"\n id=${ifDefined(thumbId)}\n tabindex=${this.disabled ? -1 : 0}\n style=${styleMap({ insetInlineStart: percent })}\n role=\"slider\"\n aria-valuemin=${this.actualMin}\n aria-valuemax=${this.actualMax}\n aria-valuenow=${value}\n aria-valuetext=${ifDefined(\n this.labels\n ? this.labels[value]\n : this.valueFormat || this.valueFormatOptions\n ? this.formatValue(value)\n : undefined\n )}\n aria-label=${ifDefined(ariaLabel)}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n @pointerenter=${this.handleThumbPointerEnter}\n @pointerleave=${this.handleThumbPointerLeave}\n @focus=${(ev: Event) => (this.activeThumb = ev.target as HTMLElement)}\n @blur=${() => (this.activeThumb = undefined)}\n ></div>\n ${this.hideTooltip\n ? html``\n : html`\n <div\n part=\"thumb-label\"\n style=${styleMap({\n opacity: this.thumbLabelsVisible ? '1' : '0',\n insetInlineStart: percent,\n })}\n >\n <div part=\"thumb-label-inner\">\n ${this.labels ? this.labels[value] : this.formatValue(value)}\n </div>\n </div>\n `}\n `;\n }\n\n private renderSteps() {\n if (!this.discreteTrack || !this.step) {\n return html``;\n }\n\n const trackRange = this.max - this.min;\n const interval = ((100 / (trackRange / this.step)) * 10) / 10;\n\n return html`\n <div part=\"steps\">\n <svg width=\"100%\" height=\"100%\" style=\"display: flex\">\n <line\n x1=\"0\"\n y1=\"1\"\n x2=\"100%\"\n y2=\"1\"\n stroke=\"currentColor\"\n stroke-dasharray=\"1.5px, calc(${interval * Math.sqrt(2)}% - 1.5px)\"\n stroke-linecap=\"round\"\n stroke-width=\"2px\"\n ></line>\n </svg>\n </div>\n `;\n }\n\n protected override render() {\n return html`\n <div part=\"base\">\n ${this.tickOrientation === 'mirror' || this.tickOrientation === 'start'\n ? html`<div part=\"ticks\">${this.renderTicks()}</div>`\n : html``}\n <div part=\"track\">\n <div part=\"inactive\"></div>\n <div part=\"fill\" style=${styleMap(this.getTrackStyle())}></div>\n ${this.renderSteps()}\n </div>\n ${this.tickOrientation !== 'start'\n ? html`<div part=\"ticks\">${this.renderTicks()}</div>`\n : html``}\n <div part=\"thumbs\">${this.renderThumbs()}</div>\n <slot @slotchange=${this.handleSlotChange}></slot>\n </div>\n `;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"slider-base.js","sourceRoot":"","sources":["../../../src/components/slider/slider-base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAC;AACvD,OAAO,EACL,QAAQ,EACR,KAAK,EACL,qBAAqB,EACrB,KAAK,GACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC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\n queryAssignedElements,\n state,\n} from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { StyleInfo, styleMap } from 'lit/directives/style-map.js';\nimport { themes } from '../../theming';\nimport { blazorTypeOverride, watch } from '../common/decorators';\nimport { styles } from './themes/light/slider.base.css';\nimport { styles as bootstrap } from './themes/light/slider.bootstrap.css';\nimport { styles as fluent } from './themes/light/slider.fluent.css';\nimport { styles as indigo } from './themes/light/slider.indigo.css';\nimport { styles as material } from './themes/light/slider.material.css';\n\n@themes({ material, bootstrap, fluent, indigo })\nexport class IgcSliderBaseComponent extends LitElement {\n public static override styles = styles;\n\n @query(`[part='thumb']`)\n protected thumb!: HTMLElement;\n\n @queryAssignedElements({ selector: 'igc-slider-label' })\n private labelElements!: HTMLElement[];\n\n private _lowerBound?: number;\n private _upperBound?: number;\n private _min = 0;\n private _max = 100;\n private _step = 1;\n private startValue?: number;\n private pointerCaptured = false;\n private thumbHoverTimer: any;\n protected activeThumb?: HTMLElement;\n\n @state()\n private thumbLabelsVisible = false;\n\n @state()\n private labels?: string[];\n\n public set min(value: number) {\n if (value < this.max) {\n const oldVal = this._min;\n this._min = this.labels ? 0 : value;\n this.requestUpdate('min', oldVal);\n\n if (typeof this.lowerBound === 'number' && this.lowerBound < value) {\n this.lowerBound = value;\n }\n }\n }\n\n /**\n * The minimum value of the slider scale. Defaults to 0.\n */\n @property({ type: Number })\n public get min() {\n return this._min;\n }\n\n public set max(value: number) {\n if (value > this.min) {\n const oldVal = this._max;\n this._max = this.labels ? this.labels.length - 1 : value;\n this.requestUpdate('max', oldVal);\n\n if (typeof this.upperBound === 'number' && this.upperBound > value) {\n this.upperBound = value;\n }\n }\n }\n\n /**\n * The maximum value of the slider scale. Defaults to 100.\n */\n @property({ type: Number })\n public get max() {\n return this._max;\n }\n\n public set lowerBound(value: number | undefined) {\n const oldVal = this._lowerBound;\n\n if (typeof value === 'number') {\n this._lowerBound = this.valueInRange(value, this.min, this.actualMax);\n } else {\n this._lowerBound = value;\n }\n this.requestUpdate('lowerBound', oldVal);\n }\n\n /**\n * The lower bound of the slider value. If not set, the `min` value is applied.\n */\n @property({ type: Number, attribute: 'lower-bound' })\n public get lowerBound(): number | undefined {\n return this._lowerBound;\n }\n\n public set upperBound(value: number | undefined) {\n const oldVal = this._upperBound;\n\n if (typeof value === 'number') {\n this._upperBound = this.valueInRange(value, this.actualMin, this.max);\n } else {\n this._upperBound = value;\n }\n this.requestUpdate('upperBound', oldVal);\n }\n\n /**\n * The upper bound of the slider value. If not set, the `max` value is applied.\n */\n @property({ type: Number, attribute: 'upper-bound' })\n public get upperBound(): number | undefined {\n return this._upperBound;\n }\n\n /**\n * Disables the UI interactions of the slider.\n */\n @property({ type: Boolean, reflect: true })\n public disabled = false;\n\n /**\n * Marks the slider track as discrete so it displays the steps.\n * If the `step` is 0, the slider will remain continuos even if `discreteTrack` is `true`.\n */\n @property({ type: Boolean, attribute: 'discrete-track' })\n public discreteTrack = false;\n\n /**\n * Hides the thumb tooltip.\n */\n @property({ type: Boolean, attribute: 'hide-tooltip' })\n public hideTooltip = false;\n\n public set step(value: number) {\n const oldVal = this._step;\n this._step = this.labels ? 1 : value;\n this.requestUpdate('step', oldVal);\n }\n\n /**\n * Specifies the granularity that the value must adhere to.\n * If set to 0 no stepping is implied and any value in the range is allowed.\n */\n @property({ type: Number })\n public get step() {\n return this._step;\n }\n\n /**\n * The number of primary ticks. It defaults to 0 which means no primary ticks are displayed.\n */\n @property({ type: Number, attribute: 'primary-ticks' })\n public primaryTicks = 0;\n\n /**\n * The number of secondary ticks. It defaults to 0 which means no secondary ticks are displayed.\n */\n @property({ type: Number, attribute: 'secondary-ticks' })\n public secondaryTicks = 0;\n\n /**\n * Changes the orientation of the ticks.\n */\n @property({ attribute: 'tick-orientation' })\n public tickOrientation: 'mirror' | 'start' | 'end' = 'end';\n\n /**\n * Hides the primary tick labels.\n */\n @property({ type: Boolean, attribute: 'hide-primary-labels' })\n public hidePrimaryLabels = false;\n\n /**\n * Hides the secondary tick labels.\n */\n @property({ type: Boolean, attribute: 'hide-secondary-labels' })\n public hideSecondaryLabels = false;\n\n /**\n * The locale used to format the thumb and tick label values in the slider.\n */\n @property()\n public locale = 'en';\n\n /**\n * String format used for the thumb and tick label values in the slider.\n */\n @property({ attribute: 'value-format' })\n public valueFormat?: string;\n\n /**\n * Number format options used for the thumb and tick label values in the slider.\n */\n @property({ attribute: false })\n public valueFormatOptions?: Intl.NumberFormatOptions;\n\n /**\n * The degrees for the rotation of the tick labels. Defaults to 0.\n */\n @property({ type: Number, reflect: true, attribute: 'tick-label-rotation' })\n @blazorTypeOverride('TickLabelRotation', true)\n public tickLabelRotation: 0 | 90 | -90 = 0;\n\n @watch('min', { waitUntilFirstUpdate: true })\n @watch('max', { waitUntilFirstUpdate: true })\n @watch('lowerBound', { waitUntilFirstUpdate: true })\n @watch('upperBound', { waitUntilFirstUpdate: true })\n @watch('step', { waitUntilFirstUpdate: true })\n protected constraintsChange() {\n this.normalizeValue();\n }\n\n @watch('labels')\n protected labelsChange() {\n if (this.labels) {\n this.min = 0;\n this.max = this.labels.length - 1;\n this.step = 1;\n }\n }\n\n constructor() {\n super();\n this.addEventListener('pointerdown', this.pointerDown);\n this.addEventListener('pointermove', this.pointerMove);\n this.addEventListener('lostpointercapture', this.lostPointerCapture);\n this.addEventListener('keydown', this.handleKeydown);\n }\n\n public override connectedCallback() {\n super.connectedCallback();\n this.normalizeValue();\n }\n\n protected handleSlotChange() {\n this.labels =\n this.labelElements && this.labelElements.length\n ? this.labelElements.map((e) => e.textContent as string)\n : undefined;\n }\n\n /* c8 ignore next 3 */\n protected get activeValue() {\n return 0;\n }\n\n /* c8 ignore next */\n protected normalizeValue(): void {}\n\n /* c8 ignore next 3 */\n protected getTrackStyle(): StyleInfo {\n return {};\n }\n\n /* c8 ignore next 3 */\n protected updateValue(_increment: number): boolean {\n return false;\n }\n\n /* c8 ignore next 3 */\n protected renderThumbs(): TemplateResult<1> {\n return html``;\n }\n\n /* c8 ignore next */\n protected emitInputEvent() {}\n\n /* c8 ignore next */\n protected emitChangeEvent() {}\n\n private get actualMin(): number {\n return typeof this.lowerBound === 'number'\n ? (this.lowerBound as number)\n : this.min;\n }\n\n private get actualMax(): number {\n return typeof this.upperBound === 'number'\n ? (this.upperBound as number)\n : this.max;\n }\n\n private get isLTR(): boolean {\n const styles = window.getComputedStyle(this);\n return styles.getPropertyValue('direction') === 'ltr';\n }\n\n protected validateValue(value: number) {\n value = this.valueInRange(value, this.actualMin, this.actualMax);\n value = this.normalizeByStep(value);\n\n return value;\n }\n\n private formatValue(value: number) {\n return this.valueFormat\n ? this.valueFormat.replace(\n '{0}',\n value.toLocaleString(this.locale, this.valueFormatOptions)\n )\n : value.toLocaleString(this.locale, this.valueFormatOptions);\n }\n\n private normalizeByStep(value: number) {\n return this.step ? value - ((value - this.actualMin) % this.step) : value;\n }\n\n protected closestHandle(_event: PointerEvent): HTMLElement {\n return this.thumb;\n }\n\n private totalTickCount() {\n const primaryTicks = this.labels\n ? this.primaryTicks > 0\n ? this.labels.length\n : 0\n : this.primaryTicks === 1\n ? 2\n : this.primaryTicks;\n\n return primaryTicks > 0\n ? (primaryTicks - 1) * this.secondaryTicks + primaryTicks\n : this.secondaryTicks > 0\n ? this.secondaryTicks\n : 0;\n }\n\n private tickValue(idx: number) {\n const tickCount = this.totalTickCount();\n const labelStep =\n tickCount > 1\n ? (this.max - this.min) / (tickCount - 1)\n : this.max - this.min;\n const labelVal = labelStep * idx;\n\n return this.min + labelVal;\n }\n\n private isPrimary(idx: number) {\n return this.primaryTicks <= 0\n ? false\n : idx % (this.secondaryTicks + 1) === 0;\n }\n\n private showThumbLabels() {\n if (this.disabled || this.hideTooltip) {\n return;\n }\n\n if (this.thumbHoverTimer) {\n clearTimeout(this.thumbHoverTimer);\n this.thumbHoverTimer = null;\n }\n\n this.thumbLabelsVisible = true;\n }\n\n private hideThumbLabels() {\n if (this.pointerCaptured || !this.thumbLabelsVisible) {\n return;\n }\n\n this.thumbHoverTimer = setTimeout(() => {\n this.thumbLabelsVisible = false;\n }, 750);\n }\n\n private valueInRange(value: number, min = 0, max = 100) {\n return Math.max(Math.min(value, max), min);\n }\n\n protected valueToFraction(value: number) {\n return (value - this.min) / (this.max - this.min);\n }\n\n private calculateTrackUpdate(mouseX: number): number {\n if (!this.activeThumb) {\n return 0;\n }\n\n const thumbBoundaries = this.activeThumb.getBoundingClientRect();\n const thumbCenter = (thumbBoundaries.right - thumbBoundaries.left) / 2;\n const thumbPositionX = thumbBoundaries.left + thumbCenter;\n\n const scale = this.getBoundingClientRect().width / (this.max - this.min);\n const change = this.isLTR\n ? mouseX - thumbPositionX\n : thumbPositionX - mouseX;\n\n if (this.step) {\n const stepDistance = scale * this.step;\n const stepDistanceCenter = stepDistance / 2;\n\n // If the thumb scale range (slider update) is less than a half step,\n // the position stays the same.\n const scaleXPositive = Math.abs(change);\n if (scaleXPositive < stepDistanceCenter) {\n return 0;\n }\n\n return Math.round(change / stepDistance) * this.step;\n } else {\n return change / scale;\n }\n }\n\n private updateSlider(mouseX: number) {\n if (this.disabled) {\n return;\n }\n\n const increment = this.calculateTrackUpdate(mouseX);\n if (this.activeThumb && increment !== 0) {\n this.updateValue(increment);\n }\n }\n\n private pointerDown = (event: PointerEvent) => {\n const thumb = this.closestHandle(event);\n thumb.focus();\n\n this.startValue = this.activeValue;\n this.updateSlider(event.clientX);\n\n this.setPointerCapture(event.pointerId);\n this.pointerCaptured = true;\n this.showThumbLabels();\n event.preventDefault();\n };\n\n private pointerMove = (event: PointerEvent) => {\n if (this.pointerCaptured) {\n this.updateSlider(event.clientX);\n }\n };\n\n private lostPointerCapture = () => {\n this.pointerCaptured = false;\n this.hideThumbLabels();\n\n if (this.startValue! !== this.activeValue) {\n this.emitChangeEvent();\n }\n this.startValue = undefined;\n };\n\n private handleKeydown = (event: KeyboardEvent) => {\n if (this.disabled) {\n return;\n }\n\n const { key } = event;\n\n let increment = 0;\n const value = this.activeValue;\n const step = this.step ? this.step : 1;\n\n switch (key) {\n case 'ArrowLeft':\n increment += this.isLTR ? -step : step;\n break;\n case 'ArrowRight':\n increment += this.isLTR ? step : -step;\n break;\n case 'ArrowUp':\n increment = step;\n break;\n case 'ArrowDown':\n increment = -step;\n break;\n case 'Home':\n increment = this.actualMin - value;\n break;\n case 'End':\n increment = this.actualMax - value;\n break;\n case 'PageUp':\n increment = Math.max((this.actualMax - this.actualMin) / 10, step);\n break;\n case 'PageDown':\n increment = -Math.max((this.actualMax - this.actualMin) / 10, step);\n break;\n default:\n return;\n }\n\n if (increment) {\n const updated = this.updateValue(increment);\n this.showThumbLabels();\n this.hideThumbLabels();\n\n if (updated) {\n this.emitChangeEvent();\n }\n }\n };\n\n private handleThumbPointerEnter = () => {\n this.showThumbLabels();\n };\n\n private handleThumbPointerLeave = () => {\n this.hideThumbLabels();\n };\n\n protected renderTicks() {\n const groups = [];\n for (let i = 0, totalCount = this.totalTickCount(); i < totalCount; i++) {\n const isPrimary = this.isPrimary(i);\n groups.push(html`\n <div part=\"tick-group\">\n <div part=\"tick\" data-primary=${isPrimary}>\n ${(isPrimary ? this.hidePrimaryLabels : this.hideSecondaryLabels)\n ? html``\n : html`\n <div part=\"tick-label\">\n <span part=\"tick-label-inner\">\n ${this.labels\n ? isPrimary\n ? this.labels[\n Math.round(i / (this.secondaryTicks + 1))\n ]\n : ''\n : this.formatValue(this.tickValue(i))}\n </span>\n </div>\n `}\n </div>\n </div>\n `);\n }\n return groups;\n }\n\n protected renderThumb(value: number, ariaLabel?: string, thumbId?: string) {\n const percent = `${this.valueToFraction(value) * 100}%`;\n\n return html`\n <div\n part=\"thumb\"\n id=${ifDefined(thumbId)}\n tabindex=${this.disabled ? -1 : 0}\n style=${styleMap({ insetInlineStart: percent })}\n role=\"slider\"\n aria-valuemin=${this.actualMin}\n aria-valuemax=${this.actualMax}\n aria-valuenow=${value}\n aria-valuetext=${ifDefined(\n this.labels\n ? this.labels[value]\n : this.valueFormat || this.valueFormatOptions\n ? this.formatValue(value)\n : undefined\n )}\n aria-label=${ifDefined(ariaLabel)}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n @pointerenter=${this.handleThumbPointerEnter}\n @pointerleave=${this.handleThumbPointerLeave}\n @focus=${(ev: Event) => (this.activeThumb = ev.target as HTMLElement)}\n @blur=${() => (this.activeThumb = undefined)}\n ></div>\n ${this.hideTooltip\n ? html``\n : html`\n <div\n part=\"thumb-label\"\n style=${styleMap({\n opacity: this.thumbLabelsVisible ? '1' : '0',\n insetInlineStart: percent,\n })}\n >\n <div part=\"thumb-label-inner\">\n ${this.labels ? this.labels[value] : this.formatValue(value)}\n </div>\n </div>\n `}\n `;\n }\n\n private renderSteps() {\n if (!this.discreteTrack || !this.step) {\n return html``;\n }\n\n const trackRange = this.max - this.min;\n const interval = ((100 / (trackRange / this.step)) * 10) / 10;\n\n return html`\n <div part=\"steps\">\n <svg width=\"100%\" height=\"100%\" style=\"display: flex\">\n <line\n x1=\"0\"\n y1=\"1\"\n x2=\"100%\"\n y2=\"1\"\n stroke=\"currentColor\"\n stroke-dasharray=\"1.5px, calc(${interval * Math.sqrt(2)}% - 1.5px)\"\n stroke-linecap=\"round\"\n stroke-width=\"2px\"\n ></line>\n </svg>\n </div>\n `;\n }\n\n protected override render() {\n return html`\n <div part=\"base\">\n ${this.tickOrientation === 'mirror' || this.tickOrientation === 'start'\n ? html`<div part=\"ticks\">${this.renderTicks()}</div>`\n : html``}\n <div part=\"track\">\n <div part=\"inactive\"></div>\n <div part=\"fill\" style=${styleMap(this.getTrackStyle())}></div>\n ${this.renderSteps()}\n </div>\n ${this.tickOrientation !== 'start'\n ? html`<div part=\"ticks\">${this.renderTicks()}</div>`\n : html``}\n <div part=\"thumbs\">${this.renderThumbs()}</div>\n <slot @slotchange=${this.handleSlotChange}></slot>\n </div>\n `;\n }\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `:host{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--scrolbar-size);scrollbar-color:var(--igc-scrollbar-thumb-color) var(--igc-scrollbar-track-color)}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host ::-webkit-scrollbar{width:var(--scrolbar-size);height:var(--scrolbar-size);background:var(--igc-scrollbar-track-color)}:host ::-webkit-scrollbar-thumb{background:var(--igc-scrollbar-thumb-color)}[hidden]{display:none !important}:host{display:block}slot{display:none}[part=base]{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:3rem;-webkit-transition:all .2s ease-out;-o-transition:all .2s ease-out;transition:all .2s ease-out;font-family:var(--igc-font-family)}[part=track]{border-radius:clamp(0rem,var(--igc-radius-factor)*2rem,2rem);position:relative;width:100%;overflow:hidden}[part=fill]{position:absolute;background:hsla(var(--igc-secondary-500), var(--igc-secondary-a));border-radius:inherit}[part=inactive]{position:absolute;width:100%;top:.0625rem;background:hsla(var(--igc-secondary-500), 0.24);-webkit-transition:background .2s ease-out;-o-transition:background .2s ease-out;transition:background .2s ease-out;border-radius:inherit}[part=steps]{position:absolute;width:100%;height:.125rem;color:#fff;opacity:.85;-webkit-transition:opacity .2s ease-out;-o-transition:opacity .2s ease-out;transition:opacity .2s ease-out;top:.125rem}[part=ticks]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;bottom:0;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}[part=ticks]:first-child{bottom:auto;top:0;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}[part=ticks]:first-child [part=tick-label]{top:auto;bottom:1.5rem}[part=tick-group]:first-of-type{-webkit-margin-start:-0.0625rem;margin-inline-start:-0.0625rem}[part=tick-group]:last-of-type{-webkit-margin-start:-0.0625rem;margin-inline-start:-0.0625rem}[part=tick]{background:hsla(var(--igc-gray-500), var(--igc-gray-a));height:.5rem;width:.125rem}[part=tick][data-primary=true]{height:1rem}[part=tick-label]{color:hsla(var(--igc-gray-500), var(--igc-gray-a));position:absolute;top:1.5rem;line-height:.7;opacity:1;-webkit-transition:opacity .2s ease-in-out;-o-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out;font-family:var(--igc-caption-font-family);font-weight:var(--igc-caption-font-weight);font-size:var(--igc-caption-font-size);font-style:var(--igc-caption-font-style);letter-spacing:var(--igc-caption-letter-spacing);text-transform:var(--igc-caption-text-transform);line-height:var(--igc-caption-line-height);margin-top:var(--igc-caption-margin-top);margin-bottom:var(--igc-caption-margin-bottom)}[part=tick-label-inner]{-webkit-margin-start:-50%;margin-inline-start:-50%}[part=thumbs]{position:absolute;width:100%;height:0;cursor:default;inset-inline-start:0}[part=thumb]{border-radius:clamp(0rem,var(--igc-radius-factor)*.625rem,.625rem);position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;outline-style:none;-webkit-transition:border-radius .1s ease-out,-webkit-transform .1s ease-out;transition:border-radius .1s ease-out,-webkit-transform .1s ease-out;-o-transition:transform .1s ease-out,border-radius .1s ease-out;transition:transform .1s ease-out,border-radius .1s ease-out;transition:transform .1s ease-out,border-radius .1s ease-out,-webkit-transform .1s ease-out;background:hsla(var(--igc-secondary-500), var(--igc-secondary-a))}[part=thumb-label]{position:absolute;top:calc((1.875rem + 1.25rem)*-1);pointer-events:none;height:1.875rem;display:-webkit-box;display:-ms-flexbox;display:flex}[part=thumb-label-inner]{font-family:var(--igc-caption-font-family);font-weight:var(--igc-caption-font-weight);font-size:var(--igc-caption-font-size);font-style:var(--igc-caption-font-style);letter-spacing:var(--igc-caption-letter-spacing);text-transform:var(--igc-caption-text-transform);line-height:var(--igc-caption-line-height);margin-top:var(--igc-caption-margin-top);margin-bottom:var(--igc-caption-margin-bottom);border-radius:clamp(0rem,var(--igc-radius-factor)*.125rem,.125rem);display:-webkit-box;display:-ms-flexbox;display:flex;min-width:2.5rem;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;white-space:nowrap;-webkit-margin-start:-50%;margin-inline-start:-50%;padding:0 .125rem;color:var(--igc-gray-700-contrast);background:hsla(var(--igc-gray-700), var(--igc-gray-a))}[part=thumb-label-inner]::after{content:"";position:absolute;top:85%;border-left:.625rem solid transparent;border-right:.625rem solid transparent;border-top:.625rem solid hsla(var(--igc-gray-700), var(--igc-gray-a))}:host(:not([tick-label-rotation="0"])) [part=tick-label-inner]{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;-webkit-margin-start:0;margin-inline-start:0;margin-block:-50%}:host([tick-label-rotation="-90"]) [part=tick-label-inner]{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}:host([disabled]){-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;cursor:initial}:host([disabled]) [part=inactive]{background:hsla(var(--igc-gray-200), var(--igc-gray-a))}:host([disabled]) [part=fill],:host([disabled]) [part=tick]{background:hsla(var(--igc-gray-400), var(--igc-gray-a))}:host([disabled]) [part=tick-label]{color:hsla(var(--igc-gray-400), var(--igc-gray-a))}:host([disabled]) [part=thumb]{background:hsla(var(--igc-gray-400), var(--igc-gray-a))}:host([disabled]) [part=thumb]:focus::after{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}:host([disabled]):hover [part=inactive]{background:hsla(var(--igc-gray-400), var(--igc-gray-a))}:host([disabled]):hover [part=thumb]{border-color:hsla(var(--igc-gray-400), var(--igc-gray-a))}`;
|
|
2
|
+
export const styles = css `:host{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--scrolbar-size, 0.875rem);scrollbar-color:var(--igc-scrollbar-thumb-color, hsla(var(--igc-gray-400), var(--igc-gray-a))) var(--igc-scrollbar-track-color, hsla(var(--igc-gray-200), var(--igc-gray-a)))}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host ::-webkit-scrollbar{width:var(--scrolbar-size, 0.875rem);height:var(--scrolbar-size, 0.875rem);background:var(--igc-scrollbar-track-color, hsla(var(--igc-gray-200), var(--igc-gray-a)))}:host ::-webkit-scrollbar-thumb{background:var(--igc-scrollbar-thumb-color, hsla(var(--igc-gray-400), var(--igc-gray-a)))}[hidden]{display:none !important}:host{display:block}slot{display:none}[part=base]{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:3rem;-webkit-transition:all .2s ease-out;-o-transition:all .2s ease-out;transition:all .2s ease-out;font-family:var(--igc-font-family)}[part=track]{border-radius:clamp(0rem,var(--igc-radius-factor)*2rem,2rem);position:relative;width:100%;overflow:hidden}[part=fill]{position:absolute;background:hsla(var(--igc-secondary-500), var(--igc-secondary-a));border-radius:inherit}[part=inactive]{position:absolute;width:100%;top:.0625rem;background:hsla(var(--igc-secondary-500), 0.24);-webkit-transition:background .2s ease-out;-o-transition:background .2s ease-out;transition:background .2s ease-out;border-radius:inherit}[part=steps]{position:absolute;width:100%;height:.125rem;color:#fff;opacity:.85;-webkit-transition:opacity .2s ease-out;-o-transition:opacity .2s ease-out;transition:opacity .2s ease-out;top:.125rem}[part=ticks]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;bottom:0;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}[part=ticks]:first-child{bottom:auto;top:0;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}[part=ticks]:first-child [part=tick-label]{top:auto;bottom:1.5rem}[part=tick-group]:first-of-type{-webkit-margin-start:-0.0625rem;margin-inline-start:-0.0625rem}[part=tick-group]:last-of-type{-webkit-margin-start:-0.0625rem;margin-inline-start:-0.0625rem}[part=tick]{background:hsla(var(--igc-gray-500), var(--igc-gray-a));height:.5rem;width:.125rem}[part=tick][data-primary=true]{height:1rem}[part=tick-label]{color:hsla(var(--igc-gray-500), var(--igc-gray-a));position:absolute;top:1.5rem;line-height:.7;opacity:1;-webkit-transition:opacity .2s ease-in-out;-o-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out;font-family:var(--igc-caption-font-family);font-weight:var(--igc-caption-font-weight);font-size:var(--igc-caption-font-size);font-style:var(--igc-caption-font-style);letter-spacing:var(--igc-caption-letter-spacing);text-transform:var(--igc-caption-text-transform);line-height:var(--igc-caption-line-height);margin-top:var(--igc-caption-margin-top);margin-bottom:var(--igc-caption-margin-bottom)}[part=tick-label-inner]{-webkit-margin-start:-50%;margin-inline-start:-50%}[part=thumbs]{position:absolute;width:100%;height:0;cursor:default;inset-inline-start:0}[part=thumb]{border-radius:clamp(0rem,var(--igc-radius-factor)*.625rem,.625rem);position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;outline-style:none;-webkit-transition:border-radius .1s ease-out,-webkit-transform .1s ease-out;transition:border-radius .1s ease-out,-webkit-transform .1s ease-out;-o-transition:transform .1s ease-out,border-radius .1s ease-out;transition:transform .1s ease-out,border-radius .1s ease-out;transition:transform .1s ease-out,border-radius .1s ease-out,-webkit-transform .1s ease-out;background:hsla(var(--igc-secondary-500), var(--igc-secondary-a))}[part=thumb-label]{position:absolute;top:calc((1.875rem + 1.25rem)*-1);pointer-events:none;height:1.875rem;display:-webkit-box;display:-ms-flexbox;display:flex}[part=thumb-label-inner]{font-family:var(--igc-caption-font-family);font-weight:var(--igc-caption-font-weight);font-size:var(--igc-caption-font-size);font-style:var(--igc-caption-font-style);letter-spacing:var(--igc-caption-letter-spacing);text-transform:var(--igc-caption-text-transform);line-height:var(--igc-caption-line-height);margin-top:var(--igc-caption-margin-top);margin-bottom:var(--igc-caption-margin-bottom);border-radius:clamp(0rem,var(--igc-radius-factor)*.125rem,.125rem);display:-webkit-box;display:-ms-flexbox;display:flex;min-width:2.5rem;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;white-space:nowrap;-webkit-margin-start:-50%;margin-inline-start:-50%;padding:0 .125rem;color:var(--igc-gray-700-contrast);background:hsla(var(--igc-gray-700), var(--igc-gray-a))}[part=thumb-label-inner]::after{content:"";position:absolute;top:85%;border-left:.625rem solid transparent;border-right:.625rem solid transparent;border-top:.625rem solid hsla(var(--igc-gray-700), var(--igc-gray-a))}:host(:not([tick-label-rotation="0"])) [part=tick-label-inner]{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;-webkit-margin-start:0;margin-inline-start:0;margin-block:-50%}:host([tick-label-rotation="-90"]) [part=tick-label-inner]{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}:host([disabled]){-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;cursor:initial}:host([disabled]) [part=inactive]{background:hsla(var(--igc-gray-200), var(--igc-gray-a))}:host([disabled]) [part=fill],:host([disabled]) [part=tick]{background:hsla(var(--igc-gray-400), var(--igc-gray-a))}:host([disabled]) [part=tick-label]{color:hsla(var(--igc-gray-400), var(--igc-gray-a))}:host([disabled]) [part=thumb]{background:hsla(var(--igc-gray-400), var(--igc-gray-a))}:host([disabled]) [part=thumb]:focus::after{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}:host([disabled]):hover [part=inactive]{background:hsla(var(--igc-gray-400), var(--igc-gray-a))}:host([disabled]):hover [part=thumb]{border-color:hsla(var(--igc-gray-400), var(--igc-gray-a))}`;
|
|
3
3
|
//# sourceMappingURL=slider.base.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.base.css.js","sourceRoot":"","sources":["../../../../../src/components/slider/themes/light/slider.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"slider.base.css.js","sourceRoot":"","sources":["../../../../../src/components/slider/themes/light/slider.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,m4MAAm4M,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`:host{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--scrolbar-size, 0.875rem);scrollbar-color:var(--igc-scrollbar-thumb-color, hsla(var(--igc-gray-400), var(--igc-gray-a))) var(--igc-scrollbar-track-color, hsla(var(--igc-gray-200), var(--igc-gray-a)))}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host ::-webkit-scrollbar{width:var(--scrolbar-size, 0.875rem);height:var(--scrolbar-size, 0.875rem);background:var(--igc-scrollbar-track-color, hsla(var(--igc-gray-200), var(--igc-gray-a)))}:host ::-webkit-scrollbar-thumb{background:var(--igc-scrollbar-thumb-color, hsla(var(--igc-gray-400), var(--igc-gray-a)))}[hidden]{display:none !important}:host{display:block}slot{display:none}[part=base]{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:3rem;-webkit-transition:all .2s ease-out;-o-transition:all .2s ease-out;transition:all .2s ease-out;font-family:var(--igc-font-family)}[part=track]{border-radius:clamp(0rem,var(--igc-radius-factor)*2rem,2rem);position:relative;width:100%;overflow:hidden}[part=fill]{position:absolute;background:hsla(var(--igc-secondary-500), var(--igc-secondary-a));border-radius:inherit}[part=inactive]{position:absolute;width:100%;top:.0625rem;background:hsla(var(--igc-secondary-500), 0.24);-webkit-transition:background .2s ease-out;-o-transition:background .2s ease-out;transition:background .2s ease-out;border-radius:inherit}[part=steps]{position:absolute;width:100%;height:.125rem;color:#fff;opacity:.85;-webkit-transition:opacity .2s ease-out;-o-transition:opacity .2s ease-out;transition:opacity .2s ease-out;top:.125rem}[part=ticks]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;bottom:0;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}[part=ticks]:first-child{bottom:auto;top:0;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}[part=ticks]:first-child [part=tick-label]{top:auto;bottom:1.5rem}[part=tick-group]:first-of-type{-webkit-margin-start:-0.0625rem;margin-inline-start:-0.0625rem}[part=tick-group]:last-of-type{-webkit-margin-start:-0.0625rem;margin-inline-start:-0.0625rem}[part=tick]{background:hsla(var(--igc-gray-500), var(--igc-gray-a));height:.5rem;width:.125rem}[part=tick][data-primary=true]{height:1rem}[part=tick-label]{color:hsla(var(--igc-gray-500), var(--igc-gray-a));position:absolute;top:1.5rem;line-height:.7;opacity:1;-webkit-transition:opacity .2s ease-in-out;-o-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out;font-family:var(--igc-caption-font-family);font-weight:var(--igc-caption-font-weight);font-size:var(--igc-caption-font-size);font-style:var(--igc-caption-font-style);letter-spacing:var(--igc-caption-letter-spacing);text-transform:var(--igc-caption-text-transform);line-height:var(--igc-caption-line-height);margin-top:var(--igc-caption-margin-top);margin-bottom:var(--igc-caption-margin-bottom)}[part=tick-label-inner]{-webkit-margin-start:-50%;margin-inline-start:-50%}[part=thumbs]{position:absolute;width:100%;height:0;cursor:default;inset-inline-start:0}[part=thumb]{border-radius:clamp(0rem,var(--igc-radius-factor)*.625rem,.625rem);position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;outline-style:none;-webkit-transition:border-radius .1s ease-out,-webkit-transform .1s ease-out;transition:border-radius .1s ease-out,-webkit-transform .1s ease-out;-o-transition:transform .1s ease-out,border-radius .1s ease-out;transition:transform .1s ease-out,border-radius .1s ease-out;transition:transform .1s ease-out,border-radius .1s ease-out,-webkit-transform .1s ease-out;background:hsla(var(--igc-secondary-500), var(--igc-secondary-a))}[part=thumb-label]{position:absolute;top:calc((1.875rem + 1.25rem)*-1);pointer-events:none;height:1.875rem;display:-webkit-box;display:-ms-flexbox;display:flex}[part=thumb-label-inner]{font-family:var(--igc-caption-font-family);font-weight:var(--igc-caption-font-weight);font-size:var(--igc-caption-font-size);font-style:var(--igc-caption-font-style);letter-spacing:var(--igc-caption-letter-spacing);text-transform:var(--igc-caption-text-transform);line-height:var(--igc-caption-line-height);margin-top:var(--igc-caption-margin-top);margin-bottom:var(--igc-caption-margin-bottom);border-radius:clamp(0rem,var(--igc-radius-factor)*.125rem,.125rem);display:-webkit-box;display:-ms-flexbox;display:flex;min-width:2.5rem;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;white-space:nowrap;-webkit-margin-start:-50%;margin-inline-start:-50%;padding:0 .125rem;color:var(--igc-gray-700-contrast);background:hsla(var(--igc-gray-700), var(--igc-gray-a))}[part=thumb-label-inner]::after{content:\"\";position:absolute;top:85%;border-left:.625rem solid transparent;border-right:.625rem solid transparent;border-top:.625rem solid hsla(var(--igc-gray-700), var(--igc-gray-a))}:host(:not([tick-label-rotation=\"0\"])) [part=tick-label-inner]{-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;-webkit-margin-start:0;margin-inline-start:0;margin-block:-50%}:host([tick-label-rotation=\"-90\"]) [part=tick-label-inner]{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}:host([disabled]){-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;cursor:initial}:host([disabled]) [part=inactive]{background:hsla(var(--igc-gray-200), var(--igc-gray-a))}:host([disabled]) [part=fill],:host([disabled]) [part=tick]{background:hsla(var(--igc-gray-400), var(--igc-gray-a))}:host([disabled]) [part=tick-label]{color:hsla(var(--igc-gray-400), var(--igc-gray-a))}:host([disabled]) [part=thumb]{background:hsla(var(--igc-gray-400), var(--igc-gray-a))}:host([disabled]) [part=thumb]:focus::after{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}:host([disabled]):hover [part=inactive]{background:hsla(var(--igc-gray-400), var(--igc-gray-a))}:host([disabled]):hover [part=thumb]{border-color:hsla(var(--igc-gray-400), var(--igc-gray-a))}`;\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `:host{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--scrolbar-size);scrollbar-color:var(--igc-scrollbar-thumb-color) var(--igc-scrollbar-track-color)}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host ::-webkit-scrollbar{width:var(--scrolbar-size);height:var(--scrolbar-size);background:var(--igc-scrollbar-track-color)}:host ::-webkit-scrollbar-thumb{background:var(--igc-scrollbar-thumb-color)}[hidden]{display:none !important}:host{font-family:var(--igc-font-family);position:fixed;bottom:0;left:50%;-webkit-transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}[part~=base]{border-radius:clamp(0rem,var(--igc-radius-factor)*.25rem,.25rem);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;min-height:3rem;min-width:21.5rem;padding:.375rem 1rem;color:hsla(var(--igc-surface-500), var(--igc-surface-a));background:hsla(var(--igc-gray-900), var(--igc-gray-a));-webkit-box-shadow:var(--igc-elevation-4);box-shadow:var(--igc-elevation-4)}[part~=message]{display:-webkit-inline-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;-webkit-box-flex:1;-ms-flex:1 1 50%;flex:1 1 50%}:host([action-text]) [part=base]{-webkit-padding-end:.5rem;padding-inline-end:.5rem}:host([action-text]) [part=action]{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}:host(:not([open])) [part=base]{display:none}`;
|
|
2
|
+
export const styles = css `:host{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--scrolbar-size, 0.875rem);scrollbar-color:var(--igc-scrollbar-thumb-color, hsla(var(--igc-gray-400), var(--igc-gray-a))) var(--igc-scrollbar-track-color, hsla(var(--igc-gray-200), var(--igc-gray-a)))}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host ::-webkit-scrollbar{width:var(--scrolbar-size, 0.875rem);height:var(--scrolbar-size, 0.875rem);background:var(--igc-scrollbar-track-color, hsla(var(--igc-gray-200), var(--igc-gray-a)))}:host ::-webkit-scrollbar-thumb{background:var(--igc-scrollbar-thumb-color, hsla(var(--igc-gray-400), var(--igc-gray-a)))}[hidden]{display:none !important}:host{font-family:var(--igc-font-family);position:fixed;bottom:0;left:50%;-webkit-transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}[part~=base]{border-radius:clamp(0rem,var(--igc-radius-factor)*.25rem,.25rem);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;min-height:3rem;min-width:21.5rem;padding:.375rem 1rem;color:hsla(var(--igc-surface-500), var(--igc-surface-a));background:hsla(var(--igc-gray-900), var(--igc-gray-a));-webkit-box-shadow:var(--igc-elevation-4);box-shadow:var(--igc-elevation-4)}[part~=message]{display:-webkit-inline-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;-webkit-box-flex:1;-ms-flex:1 1 50%;flex:1 1 50%}:host([action-text]) [part=base]{-webkit-padding-end:.5rem;padding-inline-end:.5rem}:host([action-text]) [part=action]{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}:host(:not([open])) [part=base]{display:none}`;
|
|
3
3
|
//# sourceMappingURL=snackbar.base.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snackbar.base.css.js","sourceRoot":"","sources":["../../../../src/components/snackbar/themes/snackbar.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"snackbar.base.css.js","sourceRoot":"","sources":["../../../../src/components/snackbar/themes/snackbar.base.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,q2DAAq2D,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`:host{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;scrollbar-width:var(--scrolbar-size, 0.875rem);scrollbar-color:var(--igc-scrollbar-thumb-color, hsla(var(--igc-gray-400), var(--igc-gray-a))) var(--igc-scrollbar-track-color, hsla(var(--igc-gray-200), var(--igc-gray-a)))}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host ::-webkit-scrollbar{width:var(--scrolbar-size, 0.875rem);height:var(--scrolbar-size, 0.875rem);background:var(--igc-scrollbar-track-color, hsla(var(--igc-gray-200), var(--igc-gray-a)))}:host ::-webkit-scrollbar-thumb{background:var(--igc-scrollbar-thumb-color, hsla(var(--igc-gray-400), var(--igc-gray-a)))}[hidden]{display:none !important}:host{font-family:var(--igc-font-family);position:fixed;bottom:0;left:50%;-webkit-transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}[part~=base]{border-radius:clamp(0rem,var(--igc-radius-factor)*.25rem,.25rem);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;min-height:3rem;min-width:21.5rem;padding:.375rem 1rem;color:hsla(var(--igc-surface-500), var(--igc-surface-a));background:hsla(var(--igc-gray-900), var(--igc-gray-a));-webkit-box-shadow:var(--igc-elevation-4);box-shadow:var(--igc-elevation-4)}[part~=message]{display:-webkit-inline-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;-webkit-box-flex:1;-ms-flex:1 1 50%;flex:1 1 50%}:host([action-text]) [part=base]{-webkit-padding-end:.5rem;padding-inline-end:.5rem}:host([action-text]) [part=action]{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}:host(:not([open])) [part=base]{display:none}`;\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
import { IgcToggleDirective } from './toggle.directive';
|
|
3
|
+
import { DirectiveResult } from 'lit/directive';
|
|
4
|
+
import { IgcToggleComponent } from './utilities';
|
|
5
|
+
/**
|
|
6
|
+
* Controller, bundling the creation of a toggle directive and handling global events,
|
|
7
|
+
* related to the configuration of togglable components.
|
|
8
|
+
*/
|
|
9
|
+
export declare class IgcToggleController implements ReactiveController {
|
|
10
|
+
private host;
|
|
11
|
+
private sourceElement?;
|
|
12
|
+
private initialScrollTop;
|
|
13
|
+
private initialScrollLeft;
|
|
14
|
+
private _target;
|
|
15
|
+
/** The directive that marks the toggle. */
|
|
16
|
+
toggleDirective: DirectiveResult<typeof IgcToggleDirective>;
|
|
17
|
+
rendered: Promise<void>;
|
|
18
|
+
set target(value: HTMLElement);
|
|
19
|
+
/** The element, relative to which, the toggle will be positioned. */
|
|
20
|
+
get target(): HTMLElement;
|
|
21
|
+
constructor(host: ReactiveControllerHost & IgcToggleComponent & HTMLElement, target?: HTMLElement);
|
|
22
|
+
hostConnected(): void;
|
|
23
|
+
hostDisconnected(): void;
|
|
24
|
+
updateToggleDir(): void;
|
|
25
|
+
private addEventListeners;
|
|
26
|
+
private removeEventListeners;
|
|
27
|
+
private blockScroll;
|
|
28
|
+
/** The document's click event handler to override in the host component if necessary. */
|
|
29
|
+
private documentClicked;
|
|
30
|
+
/** The document's scroll event handler to override in the host component if necessary. */
|
|
31
|
+
private handleScroll;
|
|
32
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { igcToggle } from './toggle.directive';
|
|
2
|
+
export class IgcToggleController {
|
|
3
|
+
constructor(host, target) {
|
|
4
|
+
this.initialScrollTop = 0;
|
|
5
|
+
this.initialScrollLeft = 0;
|
|
6
|
+
this.blockScroll = (event) => {
|
|
7
|
+
var _a, _b, _c, _d;
|
|
8
|
+
event.preventDefault();
|
|
9
|
+
if (!this.sourceElement || this.sourceElement !== event.target) {
|
|
10
|
+
this.sourceElement = event.target;
|
|
11
|
+
this.initialScrollTop =
|
|
12
|
+
(_a = this.sourceElement.scrollTop) !== null && _a !== void 0 ? _a : (_b = this.sourceElement.firstElementChild) === null || _b === void 0 ? void 0 : _b.scrollTop;
|
|
13
|
+
this.initialScrollLeft =
|
|
14
|
+
(_c = this.sourceElement.scrollLeft) !== null && _c !== void 0 ? _c : (_d = this.sourceElement.firstElementChild) === null || _d === void 0 ? void 0 : _d.scrollLeft;
|
|
15
|
+
}
|
|
16
|
+
this.sourceElement.scrollTop = this.initialScrollTop;
|
|
17
|
+
this.sourceElement.scrollLeft = this.initialScrollLeft;
|
|
18
|
+
if (this.sourceElement.firstElementChild) {
|
|
19
|
+
this.sourceElement.firstElementChild.scrollTop = this.initialScrollTop;
|
|
20
|
+
this.sourceElement.firstElementChild.scrollLeft = this.initialScrollLeft;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
this.documentClicked = (event) => {
|
|
24
|
+
if (!this.host.keepOpenOnOutsideClick) {
|
|
25
|
+
const target = event.composed ? event.composedPath() : [event.target];
|
|
26
|
+
const isInsideClick = target.includes(this.host) ||
|
|
27
|
+
(this.target !== undefined && target.includes(this.target));
|
|
28
|
+
if (isInsideClick) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
this.host.hide();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
this.handleScroll = (event) => {
|
|
37
|
+
switch (this.host.scrollStrategy) {
|
|
38
|
+
case 'scroll':
|
|
39
|
+
break;
|
|
40
|
+
case 'block':
|
|
41
|
+
this.blockScroll(event);
|
|
42
|
+
break;
|
|
43
|
+
case 'close':
|
|
44
|
+
this.host.hide();
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
host.addController(this);
|
|
49
|
+
this.host = host;
|
|
50
|
+
if (target) {
|
|
51
|
+
this._target = target;
|
|
52
|
+
}
|
|
53
|
+
this.updateToggleDir();
|
|
54
|
+
}
|
|
55
|
+
set target(value) {
|
|
56
|
+
this._target = value;
|
|
57
|
+
this.updateToggleDir();
|
|
58
|
+
}
|
|
59
|
+
get target() {
|
|
60
|
+
return this._target;
|
|
61
|
+
}
|
|
62
|
+
hostConnected() {
|
|
63
|
+
this.addEventListeners();
|
|
64
|
+
}
|
|
65
|
+
hostDisconnected() {
|
|
66
|
+
this.removeEventListeners();
|
|
67
|
+
}
|
|
68
|
+
updateToggleDir() {
|
|
69
|
+
this.toggleDirective = igcToggle(this._target, this.host, this);
|
|
70
|
+
this.addEventListeners();
|
|
71
|
+
}
|
|
72
|
+
addEventListeners() {
|
|
73
|
+
if (this.host.open) {
|
|
74
|
+
document.addEventListener('scroll', this.handleScroll, true);
|
|
75
|
+
if (!this.host.keepOpenOnOutsideClick) {
|
|
76
|
+
document.addEventListener('click', this.documentClicked, true);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
removeEventListeners() {
|
|
81
|
+
document.removeEventListener('click', this.documentClicked, true);
|
|
82
|
+
document.removeEventListener('scroll', this.handleScroll, true);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=toggle.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle.controller.js","sourceRoot":"","sources":["../../../src/components/toggle/toggle.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAsB,MAAM,oBAAoB,CAAC;AAQnE,MAAM,OAAO,mBAAmB;IAqB9B,YACE,IAA+D,EAC/D,MAAoB;QApBd,qBAAgB,GAAG,CAAC,CAAC;QACrB,sBAAiB,GAAG,CAAC,CAAC;QA2DtB,gBAAW,GAAG,CAAC,KAAY,EAAE,EAAE;;YACrC,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,MAAM,EAAE;gBAC9D,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,MAAiB,CAAC;gBAC7C,IAAI,CAAC,gBAAgB;oBACnB,MAAA,IAAI,CAAC,aAAa,CAAC,SAAS,mCAC5B,MAAA,IAAI,CAAC,aAAa,CAAC,iBAAiB,0CAAE,SAAS,CAAC;gBAClD,IAAI,CAAC,iBAAiB;oBACpB,MAAA,IAAI,CAAC,aAAa,CAAC,UAAU,mCAC7B,MAAA,IAAI,CAAC,aAAa,CAAC,iBAAiB,0CAAE,UAAU,CAAC;aACpD;YAED,IAAI,CAAC,aAAa,CAAC,SAAS,GAAG,IAAI,CA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'lit';\nimport { igcToggle, IgcToggleDirective } from './toggle.directive';\nimport { DirectiveResult } from 'lit/directive';\nimport { IgcToggleComponent } from './utilities';\n\n/**\n * Controller, bundling the creation of a toggle directive and handling global events,\n * related to the configuration of togglable components.\n */\nexport class IgcToggleController implements ReactiveController {\n private host: IgcToggleComponent & HTMLElement;\n private sourceElement?: Element;\n private initialScrollTop = 0;\n private initialScrollLeft = 0;\n private _target!: HTMLElement;\n\n /** The directive that marks the toggle. */\n public toggleDirective!: DirectiveResult<typeof IgcToggleDirective>;\n public rendered!: Promise<void>;\n\n public set target(value: HTMLElement) {\n this._target = value;\n this.updateToggleDir();\n }\n\n /** The element, relative to which, the toggle will be positioned. */\n public get target() {\n return this._target;\n }\n\n constructor(\n host: ReactiveControllerHost & IgcToggleComponent & HTMLElement,\n target?: HTMLElement\n ) {\n host.addController(this);\n\n this.host = host;\n\n if (target) {\n this._target = target;\n }\n\n this.updateToggleDir();\n }\n\n public hostConnected() {\n this.addEventListeners();\n }\n\n public hostDisconnected() {\n this.removeEventListeners();\n }\n\n public updateToggleDir() {\n this.toggleDirective = igcToggle(this._target, this.host, this);\n this.addEventListeners();\n }\n\n private addEventListeners() {\n if (this.host.open) {\n document.addEventListener('scroll', this.handleScroll, true);\n if (!this.host.keepOpenOnOutsideClick) {\n document.addEventListener('click', this.documentClicked, true);\n }\n }\n }\n\n private removeEventListeners() {\n document.removeEventListener('click', this.documentClicked, true);\n document.removeEventListener('scroll', this.handleScroll, true);\n }\n\n private blockScroll = (event: Event) => {\n event.preventDefault();\n if (!this.sourceElement || this.sourceElement !== event.target) {\n this.sourceElement = event.target as Element;\n this.initialScrollTop =\n this.sourceElement.scrollTop ??\n this.sourceElement.firstElementChild?.scrollTop;\n this.initialScrollLeft =\n this.sourceElement.scrollLeft ??\n this.sourceElement.firstElementChild?.scrollLeft;\n }\n\n this.sourceElement.scrollTop = this.initialScrollTop;\n this.sourceElement.scrollLeft = this.initialScrollLeft;\n if (this.sourceElement.firstElementChild) {\n this.sourceElement.firstElementChild.scrollTop = this.initialScrollTop;\n this.sourceElement.firstElementChild.scrollLeft = this.initialScrollLeft;\n }\n };\n\n /** The document's click event handler to override in the host component if necessary. */\n private documentClicked = (event: MouseEvent) => {\n if (!this.host.keepOpenOnOutsideClick) {\n const target = event.composed ? event.composedPath() : [event.target];\n const isInsideClick: boolean =\n target.includes(this.host) ||\n (this.target !== undefined && target.includes(this.target));\n if (isInsideClick) {\n return;\n } else {\n this.host.hide();\n }\n }\n };\n\n /** The document's scroll event handler to override in the host component if necessary. */\n private handleScroll = (event: Event) => {\n switch (this.host.scrollStrategy) {\n case 'scroll':\n break;\n case 'block':\n this.blockScroll(event);\n break;\n case 'close':\n this.host.hide();\n break;\n }\n };\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Directive, PartInfo } from 'lit/directive.js';
|
|
2
|
+
import { IgcToggleOptions } from './utilities.js';
|
|
3
|
+
import { IgcToggleController } from './toggle.controller.js';
|
|
4
|
+
export declare class IgcToggleDirective extends Directive {
|
|
5
|
+
private part;
|
|
6
|
+
private shiftOptions?;
|
|
7
|
+
private floatingElement;
|
|
8
|
+
private updatePosition;
|
|
9
|
+
private createFloatingElement;
|
|
10
|
+
private createMiddleware;
|
|
11
|
+
constructor(partInfo: PartInfo);
|
|
12
|
+
render(target: HTMLElement, options: IgcToggleOptions, controller?: IgcToggleController): symbol;
|
|
13
|
+
}
|
|
14
|
+
export declare const igcToggle: (target: HTMLElement, options: IgcToggleOptions, controller?: IgcToggleController | undefined) => import("lit-html/directive").DirectiveResult<typeof IgcToggleDirective>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { computePosition, flip, offset, shift, size, } from '@floating-ui/dom';
|
|
2
|
+
import { directive, Directive, PartType, } from 'lit/directive.js';
|
|
3
|
+
import { noChange } from 'lit';
|
|
4
|
+
export class IgcToggleDirective extends Directive {
|
|
5
|
+
constructor(partInfo) {
|
|
6
|
+
super(partInfo);
|
|
7
|
+
this.shiftOptions = {
|
|
8
|
+
mainAxis: true,
|
|
9
|
+
};
|
|
10
|
+
this.part = partInfo;
|
|
11
|
+
if (partInfo.type !== PartType.ELEMENT) {
|
|
12
|
+
throw new Error('The `igcToggle` directive must be attached to an element tag.');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
updatePosition(target, options, controller) {
|
|
16
|
+
var _a, _b;
|
|
17
|
+
this.floatingElement = this.createFloatingElement(options.open);
|
|
18
|
+
if (!target) {
|
|
19
|
+
if (controller) {
|
|
20
|
+
controller.rendered = Promise.resolve();
|
|
21
|
+
}
|
|
22
|
+
return noChange;
|
|
23
|
+
}
|
|
24
|
+
const promise = computePosition(target, this.floatingElement, {
|
|
25
|
+
placement: (_a = options.placement) !== null && _a !== void 0 ? _a : 'bottom-start',
|
|
26
|
+
strategy: (_b = options.positionStrategy) !== null && _b !== void 0 ? _b : 'absolute',
|
|
27
|
+
middleware: this.createMiddleware(options),
|
|
28
|
+
}).then(({ x, y }) => {
|
|
29
|
+
Object.assign(this.floatingElement.style, {
|
|
30
|
+
left: `${x}px`,
|
|
31
|
+
top: `${y}px`,
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
if (controller) {
|
|
35
|
+
controller.rendered = promise;
|
|
36
|
+
}
|
|
37
|
+
return noChange;
|
|
38
|
+
}
|
|
39
|
+
createFloatingElement(open = false) {
|
|
40
|
+
if (!this.floatingElement) {
|
|
41
|
+
this.floatingElement = this.part.element;
|
|
42
|
+
}
|
|
43
|
+
this.floatingElement.style.display = open ? '' : 'none';
|
|
44
|
+
return this.floatingElement;
|
|
45
|
+
}
|
|
46
|
+
createMiddleware(options) {
|
|
47
|
+
const middleware = [];
|
|
48
|
+
if (options.distance) {
|
|
49
|
+
middleware.push(offset({
|
|
50
|
+
mainAxis: options.distance,
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
if (options.flip) {
|
|
54
|
+
middleware.push(flip());
|
|
55
|
+
}
|
|
56
|
+
if (this.shiftOptions) {
|
|
57
|
+
middleware.push(shift(this.shiftOptions));
|
|
58
|
+
}
|
|
59
|
+
if (options.sameWidth) {
|
|
60
|
+
const floatingElement = this.floatingElement;
|
|
61
|
+
middleware.push(size({
|
|
62
|
+
apply({ reference }) {
|
|
63
|
+
Object.assign(floatingElement.style, {
|
|
64
|
+
width: `${reference.width}px`,
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
return middleware;
|
|
70
|
+
}
|
|
71
|
+
render(target, options, controller) {
|
|
72
|
+
return this.updatePosition(target, options, controller);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
export const igcToggle = directive(IgcToggleDirective);
|
|
76
|
+
//# sourceMappingURL=toggle.directive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle.directive.js","sourceRoot":"","sources":["../../../src/components/toggle/toggle.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,IAAI,EACJ,MAAM,EACN,KAAK,EACL,IAAI,GAEL,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,SAAS,EACT,SAAS,EAGT,QAAQ,GACT,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAG/B,MAAM,OAAO,kBAAmB,SAAQ,SAAS;IAqF/C,YAAY,QAAkB;QAC5B,KAAK,CAAC,QAAQ,CAAC,CAAC;QApFV,iBAAY,GAAI;YACtB,QAAQ,EAAE,IAAI;SACf,CAAC;QAmFA,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC;QACrB,IAAI,QAAQ,CAAC,IAAI,KAAK,QAAQ,CAAC,OAAO,EAAE;YACtC,MAAM,IAAI,KAAK,CACb,+DAA+D,CAChE,CAAC;SACH;IACH,CAAC;IArFO,cAAc,CACpB,MAAmB,EACnB,OAAyB,EACzB,UAAgC;;QAEhC,IAAI,CAAC,eAAe,GAAG,IAAI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EAAE;YACpB,UAAU,CAAC,IAAI,CACb,MAAM,CAAC;gBACL,QAAQ,EAAE,OAAO,CAAC,QAAQ;aAC3B,CAAC,CACH,CAAC;SACH;QAED,IAAI,OAAO,CAAC,IAAI,EAAE;YAChB,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;SACzB;QAED,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;SAC3C;QAED,IAAI,OAAO,CAAC,SAAS,EAAE;YACrB,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;YAC7C,UAAU,CAAC,IAAI,CACb,IAAI,CAAC;gBACH,KAAK,CAAC,EAAE,SAAS,EAAE;oBACjB,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE;wBACnC,KAAK,EAAE,GAAG,SAAS,CAAC,KAAK,IAAI;qBAC9B,CAAC,CAAC;gBACL,CAAC;aACF,CAAC,CACH,CAAC;SACH;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;IAYM,MAAM,CACX,MAAmB,EACnB,OAAyB,EACzB,UAAgC;QAEhC,OAAO,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IAC1D,CAAC;CACF;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import {\n computePosition,\n flip,\n offset,\n shift,\n size,\n Middleware,\n} from '@floating-ui/dom';\nimport {\n directive,\n Directive,\n PartInfo,\n ElementPart,\n PartType,\n} from 'lit/directive.js';\nimport { IgcToggleOptions } from './utilities.js';\nimport { noChange } from 'lit';\nimport { IgcToggleController } from './toggle.controller.js';\n\nexport class IgcToggleDirective extends Directive {\n private part: PartInfo;\n private shiftOptions? = {\n mainAxis: true,\n };\n\n private floatingElement!: HTMLElement;\n\n private updatePosition(\n target: HTMLElement,\n options: IgcToggleOptions,\n controller?: IgcToggleController\n ) {\n this.floatingElement = this.createFloatingElement(options.open);\n\n if (!target) {\n if (controller) {\n controller.rendered = Promise.resolve();\n }\n return noChange;\n }\n\n const promise = computePosition(target, this.floatingElement, {\n placement: options.placement ?? 'bottom-start',\n strategy: options.positionStrategy ?? 'absolute',\n middleware: this.createMiddleware(options),\n }).then(({ x, y }) => {\n Object.assign(this.floatingElement.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n });\n\n if (controller) {\n controller.rendered = promise;\n }\n\n return noChange;\n }\n\n private createFloatingElement(open = false) {\n if (!this.floatingElement) {\n this.floatingElement = (this.part as ElementPart).element as HTMLElement;\n }\n\n this.floatingElement.style.display = open ? '' : 'none';\n\n return this.floatingElement;\n }\n\n private createMiddleware(options: IgcToggleOptions) {\n const middleware: Middleware[] = [];\n\n if (options.distance) {\n middleware.push(\n offset({\n mainAxis: options.distance,\n })\n );\n }\n\n if (options.flip) {\n middleware.push(flip());\n }\n\n if (this.shiftOptions) {\n middleware.push(shift(this.shiftOptions));\n }\n\n if (options.sameWidth) {\n const floatingElement = this.floatingElement;\n middleware.push(\n size({\n apply({ reference }) {\n Object.assign(floatingElement.style, {\n width: `${reference.width}px`,\n });\n },\n })\n );\n }\n\n return middleware;\n }\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n this.part = partInfo;\n if (partInfo.type !== PartType.ELEMENT) {\n throw new Error(\n 'The `igcToggle` directive must be attached to an element tag.'\n );\n }\n }\n\n public render(\n target: HTMLElement,\n options: IgcToggleOptions,\n controller?: IgcToggleController\n ) {\n return this.updatePosition(target, options, controller);\n }\n}\n\nexport const igcToggle = directive(IgcToggleDirective);\n"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common events interface for toggle components
|
|
3
|
+
*/
|
|
4
|
+
export interface IgcToggleEventMap {
|
|
5
|
+
igcOpening: CustomEvent<void>;
|
|
6
|
+
igcOpened: CustomEvent<void>;
|
|
7
|
+
igcClosing: CustomEvent<void>;
|
|
8
|
+
igcClosed: CustomEvent<void>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Interface describing the options for toggle components' configuration.
|
|
12
|
+
*/
|
|
13
|
+
export interface IgcToggleOptions {
|
|
14
|
+
/**
|
|
15
|
+
* Whether the toggle is open.
|
|
16
|
+
*/
|
|
17
|
+
open: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The preferred placement of the toggle element around the target element. */
|
|
20
|
+
placement?: IgcPlacement;
|
|
21
|
+
/**
|
|
22
|
+
* The positioning strategy to use.
|
|
23
|
+
* Use the `fixed` strategy when the target element is in a fixed container, otherwise - use `absolute`.
|
|
24
|
+
*/
|
|
25
|
+
positionStrategy?: 'absolute' | 'fixed';
|
|
26
|
+
/**
|
|
27
|
+
* Whether the element should be flipped to the opposite side once it's about to overflow the visible area.
|
|
28
|
+
* Once enough space is detected on its preferred side, it will flip back.
|
|
29
|
+
*/
|
|
30
|
+
flip?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Whether to prevent the element from being cut off by moving it so it stays visible within its boundary area.
|
|
33
|
+
*/
|
|
34
|
+
distance?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Whether to make the toggle the same width as the target.
|
|
37
|
+
*/
|
|
38
|
+
sameWidth?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface IgcToggleComponent extends IgcToggleOptions {
|
|
41
|
+
scrollStrategy?: 'scroll' | 'block' | 'close';
|
|
42
|
+
keepOpenOnOutsideClick?: boolean;
|
|
43
|
+
hide(): void;
|
|
44
|
+
show(): void;
|
|
45
|
+
toggle(): void;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Describes the preferred placement of a toggle component.
|
|
49
|
+
*/
|
|
50
|
+
export declare type IgcPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["../../../src/components/toggle/utilities.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Common events interface for toggle components\n */\nexport interface IgcToggleEventMap {\n igcOpening: CustomEvent<void>;\n igcOpened: CustomEvent<void>;\n igcClosing: CustomEvent<void>;\n igcClosed: CustomEvent<void>;\n}\n/**\n * Interface describing the options for toggle components' configuration.\n */\nexport interface IgcToggleOptions {\n /**\n * Whether the toggle is open.\n */\n open: boolean;\n /**\n * The preferred placement of the toggle element around the target element. */\n placement?: IgcPlacement;\n /**\n * The positioning strategy to use.\n * Use the `fixed` strategy when the target element is in a fixed container, otherwise - use `absolute`.\n */\n positionStrategy?: 'absolute' | 'fixed';\n /**\n * Whether the element should be flipped to the opposite side once it's about to overflow the visible area.\n * Once enough space is detected on its preferred side, it will flip back.\n */\n flip?: boolean;\n /**\n * Whether to prevent the element from being cut off by moving it so it stays visible within its boundary area.\n */\n distance?: number;\n /**\n * Whether to make the toggle the same width as the target.\n */\n sameWidth?: boolean;\n}\n\nexport interface IgcToggleComponent extends IgcToggleOptions {\n scrollStrategy?: 'scroll' | 'block' | 'close';\n keepOpenOnOutsideClick?: boolean;\n\n hide(): void;\n show(): void;\n toggle(): void;\n}\n\n/**\n * Describes the preferred placement of a toggle component.\n */\nexport type IgcPlacement =\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end';\n"]}
|