igniteui-webcomponents 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -2
- package/components/avatar/avatar.d.ts +1 -1
- package/components/avatar/avatar.js +10 -4
- package/components/avatar/avatar.js.map +1 -1
- package/components/avatar/{avatar.material.css.d.ts → themes/avatar.base.css.d.ts} +0 -0
- package/components/avatar/{avatar.material.css.js → themes/avatar.base.css.js} +2 -2
- package/components/avatar/themes/avatar.base.css.js.map +1 -0
- package/components/{badge/badge.material.css.d.ts → avatar/themes/avatar.bootstrap.css.d.ts} +0 -0
- package/components/avatar/themes/avatar.bootstrap.css.js +3 -0
- package/components/avatar/themes/avatar.bootstrap.css.js.map +1 -0
- package/components/badge/badge.js +9 -3
- package/components/badge/badge.js.map +1 -1
- package/components/{button/button.material.css.d.ts → badge/themes/light/badge.base.css.d.ts} +0 -0
- package/components/badge/themes/light/badge.base.css.js +3 -0
- package/components/badge/themes/light/badge.base.css.js.map +1 -0
- package/components/{button/icon-button.material.css.d.ts → badge/themes/light/badge.bootstrap.css.d.ts} +0 -0
- package/components/badge/themes/light/badge.bootstrap.css.js +3 -0
- package/components/badge/themes/light/badge.bootstrap.css.js.map +1 -0
- package/components/button/button.d.ts +1 -1
- package/components/button/button.js +13 -4
- package/components/button/button.js.map +1 -1
- package/components/button/icon-button.d.ts +2 -2
- package/components/button/icon-button.js +15 -6
- package/components/button/icon-button.js.map +1 -1
- package/components/{calendar/calendar.material.css.d.ts → button/themes/button/dark/button.fluent.css.d.ts} +0 -0
- package/components/button/themes/button/dark/button.fluent.css.js +3 -0
- package/components/button/themes/button/dark/button.fluent.css.js.map +1 -0
- package/components/{calendar/days-view/days-view.material.css.d.ts → button/themes/button/light/button.base.css.d.ts} +0 -0
- package/components/button/themes/button/light/button.base.css.js +3 -0
- package/components/button/themes/button/light/button.base.css.js.map +1 -0
- package/components/{calendar/months-view/months-view.material.css.d.ts → button/themes/button/light/button.bootstrap.css.d.ts} +0 -0
- package/components/button/themes/button/light/button.bootstrap.css.js +3 -0
- package/components/button/themes/button/light/button.bootstrap.css.js.map +1 -0
- package/components/{calendar/years-view/years-view.material.css.d.ts → button/themes/button/light/button.fluent.css.d.ts} +0 -0
- package/components/button/themes/button/light/button.fluent.css.js +3 -0
- package/components/button/themes/button/light/button.fluent.css.js.map +1 -0
- package/components/{card/card.actions.material.css.d.ts → button/themes/button/light/button.indigo.css.d.ts} +0 -0
- package/components/button/themes/button/light/button.indigo.css.js +3 -0
- package/components/button/themes/button/light/button.indigo.css.js.map +1 -0
- package/components/{card/card.content.material.css.d.ts → button/themes/button/light/button.material.css.d.ts} +0 -0
- package/components/button/themes/button/light/button.material.css.js +3 -0
- package/components/button/themes/button/light/button.material.css.js.map +1 -0
- package/components/{card/card.header.material.css.d.ts → button/themes/icon-button/dark/icon-button.fluent.css.d.ts} +0 -0
- package/components/button/themes/icon-button/dark/icon-button.fluent.css.js +3 -0
- package/components/button/themes/icon-button/dark/icon-button.fluent.css.js.map +1 -0
- package/components/{card/card.material.css.d.ts → button/themes/icon-button/light/icon-button.base.css.d.ts} +0 -0
- package/components/button/themes/icon-button/light/icon-button.base.css.js +3 -0
- package/components/button/themes/icon-button/light/icon-button.base.css.js.map +1 -0
- package/components/{card/card.media.material.css.d.ts → button/themes/icon-button/light/icon-button.bootstrap.css.d.ts} +0 -0
- package/components/button/themes/icon-button/light/icon-button.bootstrap.css.js +3 -0
- package/components/button/themes/icon-button/light/icon-button.bootstrap.css.js.map +1 -0
- package/components/{checkbox/checkbox.material.css.d.ts → button/themes/icon-button/light/icon-button.fluent.css.d.ts} +0 -0
- package/components/button/themes/icon-button/light/icon-button.fluent.css.js +3 -0
- package/components/button/themes/icon-button/light/icon-button.fluent.css.js.map +1 -0
- package/components/{checkbox/switch.material.css.d.ts → button/themes/icon-button/light/icon-button.indigo.css.d.ts} +0 -0
- package/components/button/themes/icon-button/light/icon-button.indigo.css.js +3 -0
- package/components/button/themes/icon-button/light/icon-button.indigo.css.js.map +1 -0
- package/components/{input/input.dark.material.css.d.ts → button/themes/icon-button/light/icon-button.material.css.d.ts} +0 -0
- package/components/button/themes/icon-button/light/icon-button.material.css.js +3 -0
- package/components/button/themes/icon-button/light/icon-button.material.css.js.map +1 -0
- package/components/calendar/calendar.d.ts +4 -4
- package/components/calendar/calendar.js +16 -9
- package/components/calendar/calendar.js.map +1 -1
- package/components/calendar/days-view/days-view.d.ts +4 -4
- package/components/calendar/days-view/days-view.js +15 -8
- package/components/calendar/days-view/days-view.js.map +1 -1
- package/components/calendar/months-view/months-view.d.ts +1 -1
- package/components/calendar/months-view/months-view.js +12 -5
- package/components/calendar/months-view/months-view.js.map +1 -1
- package/components/{input/input.material.css.d.ts → calendar/themes/bootstrap/calendar.bootstrap.css.d.ts} +0 -0
- package/components/calendar/themes/bootstrap/calendar.bootstrap.css.js +3 -0
- package/components/calendar/themes/bootstrap/calendar.bootstrap.css.js.map +1 -0
- package/components/{list/list-header.material.css.d.ts → calendar/themes/bootstrap/days-view.bootstrap.css.d.ts} +0 -0
- package/components/calendar/themes/bootstrap/days-view.bootstrap.css.js +3 -0
- package/components/calendar/themes/bootstrap/days-view.bootstrap.css.js.map +1 -0
- package/components/{list/list-item.material.css.d.ts → calendar/themes/bootstrap/year-month-view.bootstrap.css.d.ts} +0 -0
- package/components/calendar/themes/bootstrap/year-month-view.bootstrap.css.js +3 -0
- package/components/calendar/themes/bootstrap/year-month-view.bootstrap.css.js.map +1 -0
- package/components/{list/list.material.css.d.ts → calendar/themes/calendar.base.css.d.ts} +0 -0
- package/components/calendar/themes/calendar.base.css.js +3 -0
- package/components/calendar/themes/calendar.base.css.js.map +1 -0
- package/components/{nav-drawer/nav-drawer-header-item.material.css.d.ts → calendar/themes/days-view.base.css.d.ts} +0 -0
- package/components/calendar/themes/days-view.base.css.js +3 -0
- package/components/calendar/themes/days-view.base.css.js.map +1 -0
- package/components/{nav-drawer/nav-drawer-item.material.css.d.ts → calendar/themes/fluent/calendar.fluent.css.d.ts} +0 -0
- package/components/calendar/themes/fluent/calendar.fluent.css.js +3 -0
- package/components/calendar/themes/fluent/calendar.fluent.css.js.map +1 -0
- package/components/{nav-drawer/nav-drawer.material.css.d.ts → calendar/themes/fluent/days-view.fluent.css.d.ts} +0 -0
- package/components/calendar/themes/fluent/days-view.fluent.css.js +3 -0
- package/components/calendar/themes/fluent/days-view.fluent.css.js.map +1 -0
- package/components/{navbar/navbar.material.css.d.ts → calendar/themes/fluent/year-month-view.fluent.css.d.ts} +0 -0
- package/components/calendar/themes/fluent/year-month-view.fluent.css.js +3 -0
- package/components/calendar/themes/fluent/year-month-view.fluent.css.js.map +1 -0
- package/components/{radio-group/radio-group.material.css.d.ts → calendar/themes/year-month-view.base.css.d.ts} +0 -0
- package/components/calendar/themes/year-month-view.base.css.js +3 -0
- package/components/calendar/themes/year-month-view.base.css.js.map +1 -0
- package/components/calendar/years-view/years-view.d.ts +1 -1
- package/components/calendar/years-view/years-view.js +11 -4
- package/components/calendar/years-view/years-view.js.map +1 -1
- package/components/card/card.actions.js +16 -4
- package/components/card/card.actions.js.map +1 -1
- package/components/card/card.content.js +17 -5
- package/components/card/card.content.js.map +1 -1
- package/components/card/card.header.js +20 -4
- package/components/card/card.header.js.map +1 -1
- package/components/card/card.js +15 -5
- package/components/card/card.js.map +1 -1
- package/components/card/card.media.js +3 -3
- package/components/card/card.media.js.map +1 -1
- package/components/{radio/radio.material.css.d.ts → card/themes/light/card.actions.bootstrap.css.d.ts} +0 -0
- package/components/card/themes/light/card.actions.bootstrap.css.js +3 -0
- package/components/card/themes/light/card.actions.bootstrap.css.js.map +1 -0
- package/components/{slider/slider.material.css.d.ts → card/themes/light/card.actions.material.css.d.ts} +0 -0
- package/components/card/{card.actions.material.css.js → themes/light/card.actions.material.css.js} +0 -0
- package/components/card/themes/light/card.actions.material.css.js.map +1 -0
- package/components/card/themes/light/card.bootstrap.css.d.ts +1 -0
- package/components/card/themes/light/card.bootstrap.css.js +3 -0
- package/components/card/themes/light/card.bootstrap.css.js.map +1 -0
- package/components/card/themes/light/card.content.bootstrap.css.d.ts +1 -0
- package/components/card/themes/light/card.content.bootstrap.css.js +3 -0
- package/components/card/themes/light/card.content.bootstrap.css.js.map +1 -0
- package/components/card/themes/light/card.content.indigo.css.d.ts +1 -0
- package/components/card/themes/light/card.content.indigo.css.js +3 -0
- package/components/card/themes/light/card.content.indigo.css.js.map +1 -0
- package/components/card/themes/light/card.content.material.css.d.ts +1 -0
- package/components/card/{card.content.material.css.js → themes/light/card.content.material.css.js} +0 -0
- package/components/card/themes/light/card.content.material.css.js.map +1 -0
- package/components/card/themes/light/card.fluent.css.d.ts +1 -0
- package/components/card/themes/light/card.fluent.css.js +3 -0
- package/components/card/themes/light/card.fluent.css.js.map +1 -0
- package/components/card/themes/light/card.header.bootstrap.css.d.ts +1 -0
- package/components/card/themes/light/card.header.bootstrap.css.js +3 -0
- package/components/card/themes/light/card.header.bootstrap.css.js.map +1 -0
- package/components/card/themes/light/card.header.indigo.css.d.ts +1 -0
- package/components/card/themes/light/card.header.indigo.css.js +3 -0
- package/components/card/themes/light/card.header.indigo.css.js.map +1 -0
- package/components/card/themes/light/card.header.material.css.d.ts +1 -0
- package/components/card/themes/light/card.header.material.css.js +3 -0
- package/components/card/themes/light/card.header.material.css.js.map +1 -0
- package/components/card/themes/light/card.material.css.d.ts +1 -0
- package/components/card/themes/light/card.material.css.js +3 -0
- package/components/card/themes/light/card.material.css.js.map +1 -0
- package/components/card/themes/light/card.media.material.css.d.ts +1 -0
- package/components/card/{card.media.material.css.js → themes/light/card.media.material.css.js} +0 -0
- package/components/card/themes/light/card.media.material.css.js.map +1 -0
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/checkbox/checkbox.js +13 -4
- package/components/checkbox/checkbox.js.map +1 -1
- package/components/checkbox/switch.js +13 -4
- package/components/checkbox/switch.js.map +1 -1
- package/components/checkbox/themes/dark/checkbox.fluent.css.d.ts +1 -0
- package/components/checkbox/themes/dark/checkbox.fluent.css.js +3 -0
- package/components/checkbox/themes/dark/checkbox.fluent.css.js.map +1 -0
- package/components/checkbox/themes/dark/checkbox.indigo.css.d.ts +1 -0
- package/components/checkbox/themes/dark/checkbox.indigo.css.js +3 -0
- package/components/checkbox/themes/dark/checkbox.indigo.css.js.map +1 -0
- package/components/checkbox/themes/dark/switch.fluent.css.d.ts +1 -0
- package/components/checkbox/themes/dark/switch.fluent.css.js +3 -0
- package/components/checkbox/themes/dark/switch.fluent.css.js.map +1 -0
- package/components/checkbox/themes/dark/switch.indigo.css.d.ts +1 -0
- package/components/checkbox/themes/dark/switch.indigo.css.js +3 -0
- package/components/checkbox/themes/dark/switch.indigo.css.js.map +1 -0
- package/components/checkbox/themes/light/checkbox.base.css.d.ts +1 -0
- package/components/checkbox/themes/light/checkbox.base.css.js +3 -0
- package/components/checkbox/themes/light/checkbox.base.css.js.map +1 -0
- package/components/checkbox/themes/light/checkbox.bootstrap.css.d.ts +1 -0
- package/components/checkbox/themes/light/checkbox.bootstrap.css.js +3 -0
- package/components/checkbox/themes/light/checkbox.bootstrap.css.js.map +1 -0
- package/components/checkbox/themes/light/checkbox.fluent.css.d.ts +1 -0
- package/components/checkbox/themes/light/checkbox.fluent.css.js +3 -0
- package/components/checkbox/themes/light/checkbox.fluent.css.js.map +1 -0
- package/components/checkbox/themes/light/checkbox.indigo.css.d.ts +1 -0
- package/components/checkbox/themes/light/checkbox.indigo.css.js +3 -0
- package/components/checkbox/themes/light/checkbox.indigo.css.js.map +1 -0
- package/components/checkbox/themes/light/checkbox.material.css.d.ts +1 -0
- package/components/checkbox/themes/light/checkbox.material.css.js +3 -0
- package/components/checkbox/themes/light/checkbox.material.css.js.map +1 -0
- package/components/checkbox/themes/light/switch.base.css.d.ts +1 -0
- package/components/checkbox/themes/light/switch.base.css.js +3 -0
- package/components/checkbox/themes/light/switch.base.css.js.map +1 -0
- package/components/checkbox/themes/light/switch.bootstrap.css.d.ts +1 -0
- package/components/checkbox/themes/light/switch.bootstrap.css.js +3 -0
- package/components/checkbox/themes/light/switch.bootstrap.css.js.map +1 -0
- package/components/checkbox/themes/light/switch.fluent.css.d.ts +1 -0
- package/components/checkbox/themes/light/switch.fluent.css.js +3 -0
- package/components/checkbox/themes/light/switch.fluent.css.js.map +1 -0
- package/components/checkbox/themes/light/switch.indigo.css.d.ts +1 -0
- package/components/checkbox/themes/light/switch.indigo.css.js +3 -0
- package/components/checkbox/themes/light/switch.indigo.css.js.map +1 -0
- package/components/checkbox/themes/light/switch.material.css.d.ts +1 -0
- package/components/checkbox/themes/light/switch.material.css.js +3 -0
- package/components/checkbox/themes/light/switch.material.css.js.map +1 -0
- package/components/chip/chip.d.ts +48 -0
- package/components/chip/chip.js +96 -0
- package/components/chip/chip.js.map +1 -0
- package/components/chip/themes/chip.base.css.d.ts +1 -0
- package/components/chip/themes/chip.base.css.js +3 -0
- package/components/chip/themes/chip.base.css.js.map +1 -0
- package/components/chip/themes/chip.bootstrap.css.d.ts +1 -0
- package/components/chip/themes/chip.bootstrap.css.js +3 -0
- package/components/chip/themes/chip.bootstrap.css.js.map +1 -0
- package/components/chip/themes/chip.fluent.css.d.ts +1 -0
- package/components/chip/themes/chip.fluent.css.js +3 -0
- package/components/chip/themes/chip.fluent.css.js.map +1 -0
- package/components/chip/themes/chip.indigo.css.d.ts +1 -0
- package/components/chip/themes/chip.indigo.css.js +3 -0
- package/components/chip/themes/chip.indigo.css.js.map +1 -0
- package/components/chip/themes/chip.material.css.d.ts +1 -0
- package/components/chip/themes/chip.material.css.js +3 -0
- package/components/chip/themes/chip.material.css.js.map +1 -0
- package/components/common/definitions/defineAllComponents.js +16 -0
- package/components/common/definitions/defineAllComponents.js.map +1 -1
- package/components/common/util.d.ts +2 -0
- package/components/common/util.js +2 -0
- package/components/common/util.js.map +1 -1
- package/components/form/form.js +2 -2
- package/components/form/form.js.map +1 -1
- package/components/input/input-base.d.ts +65 -0
- package/components/input/input-base.js +160 -0
- package/components/input/input-base.js.map +1 -0
- package/components/input/input.d.ts +6 -62
- package/components/input/input.js +15 -165
- package/components/input/input.js.map +1 -1
- package/components/input/themes/dark/input.dark.bootstrap.css.d.ts +1 -0
- package/components/input/themes/dark/input.dark.bootstrap.css.js +3 -0
- package/components/input/themes/dark/input.dark.bootstrap.css.js.map +1 -0
- package/components/input/themes/dark/input.dark.fluent.css.d.ts +1 -0
- package/components/input/themes/dark/input.dark.fluent.css.js +3 -0
- package/components/input/themes/dark/input.dark.fluent.css.js.map +1 -0
- package/components/input/themes/dark/input.dark.indigo.css.d.ts +1 -0
- package/components/input/themes/dark/input.dark.indigo.css.js +3 -0
- package/components/input/themes/dark/input.dark.indigo.css.js.map +1 -0
- package/components/input/themes/dark/input.dark.material.css.d.ts +1 -0
- package/components/input/{input.dark.material.css.js → themes/dark/input.dark.material.css.js} +0 -0
- package/components/input/themes/dark/input.dark.material.css.js.map +1 -0
- package/components/input/themes/light/input.base.css.d.ts +1 -0
- package/components/input/themes/light/input.base.css.js +3 -0
- package/components/input/themes/light/input.base.css.js.map +1 -0
- package/components/input/themes/light/input.bootstrap.css.d.ts +1 -0
- package/components/input/themes/light/input.bootstrap.css.js +3 -0
- package/components/input/themes/light/input.bootstrap.css.js.map +1 -0
- package/components/input/themes/light/input.fluent.css.d.ts +1 -0
- package/components/input/themes/light/input.fluent.css.js +3 -0
- package/components/input/themes/light/input.fluent.css.js.map +1 -0
- package/components/input/themes/light/input.indigo.css.d.ts +1 -0
- package/components/input/themes/light/input.indigo.css.js +3 -0
- package/components/input/themes/light/input.indigo.css.js.map +1 -0
- package/components/input/themes/light/input.material.css.d.ts +1 -0
- package/components/input/themes/light/input.material.css.js +3 -0
- package/components/input/themes/light/input.material.css.js.map +1 -0
- package/components/list/list-header.js +15 -3
- package/components/list/list-header.js.map +1 -1
- package/components/list/list-item.js +17 -3
- package/components/list/list-item.js.map +1 -1
- package/components/list/list.js +15 -3
- package/components/list/list.js.map +1 -1
- package/components/list/themes/dark/list.bootstrap.css.d.ts +1 -0
- package/components/list/themes/dark/list.bootstrap.css.js +3 -0
- package/components/list/themes/dark/list.bootstrap.css.js.map +1 -0
- package/components/list/themes/dark/list.fluent.css.d.ts +1 -0
- package/components/list/themes/dark/list.fluent.css.js +3 -0
- package/components/list/themes/dark/list.fluent.css.js.map +1 -0
- package/components/list/themes/dark/list.indigo.css.d.ts +1 -0
- package/components/list/themes/dark/list.indigo.css.js +3 -0
- package/components/list/themes/dark/list.indigo.css.js.map +1 -0
- package/components/list/themes/light/list-header.base.css.d.ts +1 -0
- package/components/list/{list-header.material.css.js → themes/light/list-header.base.css.js} +1 -1
- package/components/list/themes/light/list-header.base.css.js.map +1 -0
- package/components/list/themes/light/list-header.indigo.css.d.ts +1 -0
- package/components/list/themes/light/list-header.indigo.css.js +3 -0
- package/components/list/themes/light/list-header.indigo.css.js.map +1 -0
- package/components/list/themes/light/list-item.base.css.d.ts +1 -0
- package/components/list/{list-item.material.css.js → themes/light/list-item.base.css.js} +1 -1
- package/components/list/themes/light/list-item.base.css.js.map +1 -0
- package/components/list/themes/light/list-item.bootstrap.css.d.ts +1 -0
- package/components/list/themes/light/list-item.bootstrap.css.js +3 -0
- package/components/list/themes/light/list-item.bootstrap.css.js.map +1 -0
- package/components/list/themes/light/list-item.fluent.css.d.ts +1 -0
- package/components/list/themes/light/list-item.fluent.css.js +3 -0
- package/components/list/themes/light/list-item.fluent.css.js.map +1 -0
- package/components/list/themes/light/list-item.indigo.css.d.ts +1 -0
- package/components/list/themes/light/list-item.indigo.css.js +3 -0
- package/components/list/themes/light/list-item.indigo.css.js.map +1 -0
- package/components/list/themes/light/list.base.css.d.ts +1 -0
- package/components/list/{list.material.css.js → themes/light/list.base.css.js} +1 -1
- package/components/list/themes/light/list.base.css.js.map +1 -0
- package/components/list/themes/light/list.bootstrap.css.d.ts +1 -0
- package/components/list/themes/light/list.bootstrap.css.js +3 -0
- package/components/list/themes/light/list.bootstrap.css.js.map +1 -0
- package/components/nav-drawer/nav-drawer-header-item.d.ts +1 -1
- package/components/nav-drawer/nav-drawer-header-item.js +16 -4
- package/components/nav-drawer/nav-drawer-header-item.js.map +1 -1
- package/components/nav-drawer/nav-drawer-item.d.ts +1 -1
- package/components/nav-drawer/nav-drawer-item.js +10 -4
- package/components/nav-drawer/nav-drawer-item.js.map +1 -1
- package/components/nav-drawer/nav-drawer.d.ts +1 -1
- package/components/nav-drawer/nav-drawer.js +10 -4
- package/components/nav-drawer/nav-drawer.js.map +1 -1
- package/components/nav-drawer/styles/indigo/nav-drawer-header-item.indigo.css.d.ts +1 -0
- package/components/nav-drawer/styles/indigo/nav-drawer-header-item.indigo.css.js +3 -0
- package/components/nav-drawer/styles/indigo/nav-drawer-header-item.indigo.css.js.map +1 -0
- package/components/nav-drawer/styles/indigo/nav-drawer-item.indigo.css.d.ts +1 -0
- package/components/nav-drawer/styles/indigo/nav-drawer-item.indigo.css.js +3 -0
- package/components/nav-drawer/styles/indigo/nav-drawer-item.indigo.css.js.map +1 -0
- package/components/nav-drawer/styles/indigo/nav-drawer.indigo.css.d.ts +1 -0
- package/components/nav-drawer/styles/indigo/nav-drawer.indigo.css.js +3 -0
- package/components/nav-drawer/styles/indigo/nav-drawer.indigo.css.js.map +1 -0
- package/components/nav-drawer/styles/nav-drawer-header-item.base.css.d.ts +1 -0
- package/components/nav-drawer/{nav-drawer-header-item.material.css.js → styles/nav-drawer-header-item.base.css.js} +1 -1
- package/components/nav-drawer/styles/nav-drawer-header-item.base.css.js.map +1 -0
- package/components/nav-drawer/styles/nav-drawer-item.base.css.d.ts +1 -0
- package/components/nav-drawer/styles/nav-drawer-item.base.css.js +3 -0
- package/components/nav-drawer/styles/nav-drawer-item.base.css.js.map +1 -0
- package/components/nav-drawer/styles/nav-drawer.base.css.d.ts +1 -0
- package/components/nav-drawer/{nav-drawer.material.css.js → styles/nav-drawer.base.css.js} +1 -1
- package/components/nav-drawer/styles/nav-drawer.base.css.js.map +1 -0
- package/components/navbar/navbar.d.ts +1 -1
- package/components/navbar/navbar.js +17 -4
- package/components/navbar/navbar.js.map +1 -1
- package/components/navbar/themes/light/navbar.base.css.d.ts +1 -0
- package/components/navbar/{navbar.material.css.js → themes/light/navbar.base.css.js} +2 -2
- package/components/navbar/themes/light/navbar.base.css.js.map +1 -0
- package/components/navbar/themes/light/navbar.bootstrap.css.d.ts +1 -0
- package/components/navbar/themes/light/navbar.bootstrap.css.js +3 -0
- package/components/navbar/themes/light/navbar.bootstrap.css.js.map +1 -0
- package/components/navbar/themes/light/navbar.indigo.css.d.ts +1 -0
- package/components/navbar/themes/light/navbar.indigo.css.js +3 -0
- package/components/navbar/themes/light/navbar.indigo.css.js.map +1 -0
- package/components/progress/base.d.ts +39 -0
- package/components/progress/base.js +142 -0
- package/components/progress/base.js.map +1 -0
- package/components/progress/circular-gradient.d.ts +25 -0
- package/components/progress/circular-gradient.js +30 -0
- package/components/progress/circular-gradient.js.map +1 -0
- package/components/progress/circular-progress.d.ts +48 -0
- package/components/progress/circular-progress.js +82 -0
- package/components/progress/circular-progress.js.map +1 -0
- package/components/progress/linear-progress.d.ts +49 -0
- package/components/progress/linear-progress.js +71 -0
- package/components/progress/linear-progress.js.map +1 -0
- package/components/progress/themes/circular/circular.progress.base.css.d.ts +1 -0
- package/components/progress/themes/circular/circular.progress.base.css.js +3 -0
- package/components/progress/themes/circular/circular.progress.base.css.js.map +1 -0
- package/components/progress/themes/circular/circular.progress.bootstrap.css.d.ts +1 -0
- package/components/progress/themes/circular/circular.progress.bootstrap.css.js +3 -0
- package/components/progress/themes/circular/circular.progress.bootstrap.css.js.map +1 -0
- package/components/progress/themes/circular/circular.progress.fluent.css.d.ts +1 -0
- package/components/progress/themes/circular/circular.progress.fluent.css.js +3 -0
- package/components/progress/themes/circular/circular.progress.fluent.css.js.map +1 -0
- package/components/progress/themes/linear/linear.progress.base.css.d.ts +1 -0
- package/components/progress/themes/linear/linear.progress.base.css.js +3 -0
- package/components/progress/themes/linear/linear.progress.base.css.js.map +1 -0
- package/components/progress/themes/linear/linear.progress.bootstrap.css.d.ts +1 -0
- package/components/progress/themes/linear/linear.progress.bootstrap.css.js +3 -0
- package/components/progress/themes/linear/linear.progress.bootstrap.css.js.map +1 -0
- package/components/progress/themes/linear/linear.progress.fluent.css.d.ts +1 -0
- package/components/progress/themes/linear/linear.progress.fluent.css.js +3 -0
- package/components/progress/themes/linear/linear.progress.fluent.css.js.map +1 -0
- package/components/progress/themes/linear/linear.progress.indigo.css.d.ts +1 -0
- package/components/progress/themes/linear/linear.progress.indigo.css.js +3 -0
- package/components/progress/themes/linear/linear.progress.indigo.css.js.map +1 -0
- package/components/radio/radio.d.ts +1 -1
- package/components/radio/radio.js +15 -5
- package/components/radio/radio.js.map +1 -1
- package/components/radio/themes/dark/radio.fluent.css.d.ts +1 -0
- package/components/radio/themes/dark/radio.fluent.css.js +3 -0
- package/components/radio/themes/dark/radio.fluent.css.js.map +1 -0
- package/components/radio/themes/dark/radio.indigo.css.d.ts +1 -0
- package/components/radio/themes/dark/radio.indigo.css.js +3 -0
- package/components/radio/themes/dark/radio.indigo.css.js.map +1 -0
- package/components/radio/themes/light/radio.base.css.d.ts +1 -0
- package/components/radio/themes/light/radio.base.css.js +3 -0
- package/components/radio/themes/light/radio.base.css.js.map +1 -0
- package/components/radio/themes/light/radio.bootstrap.css.d.ts +1 -0
- package/components/radio/themes/light/radio.bootstrap.css.js +3 -0
- package/components/radio/themes/light/radio.bootstrap.css.js.map +1 -0
- package/components/radio/themes/light/radio.fluent.css.d.ts +1 -0
- package/components/radio/themes/light/radio.fluent.css.js +3 -0
- package/components/radio/themes/light/radio.fluent.css.js.map +1 -0
- package/components/radio/themes/light/radio.indigo.css.d.ts +1 -0
- package/components/radio/themes/light/radio.indigo.css.js +3 -0
- package/components/radio/themes/light/radio.indigo.css.js.map +1 -0
- package/components/radio/themes/light/radio.material.css.d.ts +1 -0
- package/components/radio/themes/light/radio.material.css.js +3 -0
- package/components/radio/themes/light/radio.material.css.js.map +1 -0
- package/components/radio-group/radio-group.base.css.d.ts +1 -0
- package/components/radio-group/{radio-group.material.css.js → radio-group.base.css.js} +1 -1
- package/components/radio-group/radio-group.base.css.js.map +1 -0
- package/components/radio-group/radio-group.js +1 -1
- package/components/radio-group/radio-group.js.map +1 -1
- package/components/rating/rating-symbol.d.ts +18 -0
- package/components/rating/rating-symbol.js +8 -0
- package/components/rating/rating-symbol.js.map +1 -0
- package/components/rating/rating.base.css.d.ts +1 -0
- package/components/rating/rating.base.css.js +3 -0
- package/components/rating/rating.base.css.js.map +1 -0
- package/components/rating/rating.bootstrap.css.d.ts +1 -0
- package/components/rating/rating.bootstrap.css.js +3 -0
- package/components/rating/rating.bootstrap.css.js.map +1 -0
- package/components/rating/rating.d.ts +97 -0
- package/components/rating/rating.fluent.css.d.ts +1 -0
- package/components/rating/rating.fluent.css.js +3 -0
- package/components/rating/rating.fluent.css.js.map +1 -0
- package/components/rating/rating.indigo.css.d.ts +1 -0
- package/components/rating/rating.indigo.css.js +3 -0
- package/components/rating/rating.indigo.css.js.map +1 -0
- package/components/rating/rating.js +257 -0
- package/components/rating/rating.js.map +1 -0
- package/components/slider/slider-base.d.ts +1 -1
- package/components/slider/slider-base.js +13 -4
- package/components/slider/slider-base.js.map +1 -1
- package/components/slider/slider-label.d.ts +5 -0
- package/components/slider/slider-label.js.map +1 -1
- package/components/slider/themes/dark/slider.bootstrap.css.d.ts +1 -0
- package/components/slider/themes/dark/slider.bootstrap.css.js +3 -0
- package/components/slider/themes/dark/slider.bootstrap.css.js.map +1 -0
- package/components/slider/themes/dark/slider.fluent.css.d.ts +1 -0
- package/components/slider/themes/dark/slider.fluent.css.js +3 -0
- package/components/slider/themes/dark/slider.fluent.css.js.map +1 -0
- package/components/slider/themes/dark/slider.indigo.css.d.ts +1 -0
- package/components/slider/themes/dark/slider.indigo.css.js +3 -0
- package/components/slider/themes/dark/slider.indigo.css.js.map +1 -0
- package/components/slider/themes/light/slider.base.css.d.ts +1 -0
- package/components/slider/themes/light/slider.base.css.js +3 -0
- package/components/slider/themes/light/slider.base.css.js.map +1 -0
- package/components/slider/themes/light/slider.bootstrap.css.d.ts +1 -0
- package/components/slider/themes/light/slider.bootstrap.css.js +3 -0
- package/components/slider/themes/light/slider.bootstrap.css.js.map +1 -0
- package/components/slider/themes/light/slider.fluent.css.d.ts +1 -0
- package/components/slider/themes/light/slider.fluent.css.js +3 -0
- package/components/slider/themes/light/slider.fluent.css.js.map +1 -0
- package/components/slider/themes/light/slider.indigo.css.d.ts +1 -0
- package/components/slider/themes/light/slider.indigo.css.js +3 -0
- package/components/slider/themes/light/slider.indigo.css.js.map +1 -0
- package/components/slider/themes/light/slider.material.css.d.ts +1 -0
- package/components/slider/themes/light/slider.material.css.js +3 -0
- package/components/slider/themes/light/slider.material.css.js.map +1 -0
- package/components/snackbar/snackbar.d.ts +47 -0
- package/components/snackbar/snackbar.js +82 -0
- package/components/snackbar/snackbar.js.map +1 -0
- package/components/snackbar/themes/snackbar.base.css.d.ts +1 -0
- package/components/snackbar/themes/snackbar.base.css.js +3 -0
- package/components/snackbar/themes/snackbar.base.css.js.map +1 -0
- package/components/snackbar/themes/snackbar.bootstrap.css.d.ts +1 -0
- package/components/snackbar/themes/snackbar.bootstrap.css.js +3 -0
- package/components/snackbar/themes/snackbar.bootstrap.css.js.map +1 -0
- package/components/snackbar/themes/snackbar.fluent.css.d.ts +1 -0
- package/components/snackbar/themes/snackbar.fluent.css.js +3 -0
- package/components/snackbar/themes/snackbar.fluent.css.js.map +1 -0
- package/components/snackbar/themes/snackbar.indigo.css.d.ts +1 -0
- package/components/snackbar/themes/snackbar.indigo.css.js +3 -0
- package/components/snackbar/themes/snackbar.indigo.css.js.map +1 -0
- package/components/toast/themes/toast.base.css.d.ts +1 -0
- package/components/toast/themes/toast.base.css.js +3 -0
- package/components/toast/themes/toast.base.css.js.map +1 -0
- package/components/toast/themes/toast.bootstrap.css.d.ts +1 -0
- package/components/toast/themes/toast.bootstrap.css.js +3 -0
- package/components/toast/themes/toast.bootstrap.css.js.map +1 -0
- package/components/toast/themes/toast.fluent.css.d.ts +1 -0
- package/components/toast/themes/toast.fluent.css.js +3 -0
- package/components/toast/themes/toast.fluent.css.js.map +1 -0
- package/components/toast/themes/toast.indigo.css.d.ts +1 -0
- package/components/toast/themes/toast.indigo.css.js +3 -0
- package/components/toast/themes/toast.indigo.css.js.map +1 -0
- package/components/toast/toast.d.ts +33 -0
- package/components/toast/toast.js +64 -0
- package/components/toast/toast.js.map +1 -0
- package/custom-elements.json +1086 -215
- package/index.d.ts +26 -17
- package/index.js +25 -15
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/themes/dark/bootstrap.css +1 -1
- package/themes/dark/fluent.css +1 -1
- package/themes/dark/indigo.css +1 -1
- package/themes/dark/material.css +1 -1
- package/themes/light/bootstrap.css +1 -1
- package/themes/light/fluent.css +1 -1
- package/themes/light/indigo.css +1 -1
- package/themes/light/material.css +1 -1
- package/theming/config.d.ts +14 -0
- package/theming/config.js +27 -0
- package/theming/config.js.map +1 -0
- package/theming/index.d.ts +4 -0
- package/theming/index.js +5 -0
- package/theming/index.js.map +1 -0
- package/theming/theming-controlller.d.ts +17 -0
- package/theming/theming-controlller.js +49 -0
- package/theming/theming-controlller.js.map +1 -0
- package/theming/theming-decorator.d.ts +24 -0
- package/theming/theming-decorator.js +13 -0
- package/theming/theming-decorator.js.map +1 -0
- package/theming/theming-event.d.ts +13 -0
- package/theming/theming-event.js +2 -0
- package/theming/theming-event.js.map +1 -0
- package/theming/types.d.ts +23 -0
- package/theming/types.js +2 -0
- package/theming/types.js.map +1 -0
- package/theming/utils.d.ts +1 -0
- package/theming/utils.js +36 -0
- package/theming/utils.js.map +1 -0
- package/vscode-html-custom-data.json +392 -50
- package/components/avatar/avatar.material.css.js.map +0 -1
- package/components/badge/badge.material.css.js +0 -3
- package/components/badge/badge.material.css.js.map +0 -1
- package/components/button/button.material.css.js +0 -3
- package/components/button/button.material.css.js.map +0 -1
- package/components/button/icon-button.material.css.js +0 -3
- package/components/button/icon-button.material.css.js.map +0 -1
- package/components/calendar/calendar.material.css.js +0 -3
- package/components/calendar/calendar.material.css.js.map +0 -1
- package/components/calendar/days-view/days-view.material.css.js +0 -3
- package/components/calendar/days-view/days-view.material.css.js.map +0 -1
- package/components/calendar/months-view/months-view.material.css.js +0 -3
- package/components/calendar/months-view/months-view.material.css.js.map +0 -1
- package/components/calendar/years-view/years-view.material.css.js +0 -3
- package/components/calendar/years-view/years-view.material.css.js.map +0 -1
- package/components/card/card.actions.material.css.js.map +0 -1
- package/components/card/card.content.material.css.js.map +0 -1
- package/components/card/card.header.material.css.js +0 -3
- package/components/card/card.header.material.css.js.map +0 -1
- package/components/card/card.material.css.js +0 -3
- package/components/card/card.material.css.js.map +0 -1
- package/components/card/card.media.material.css.js.map +0 -1
- package/components/checkbox/checkbox.material.css.js +0 -3
- package/components/checkbox/checkbox.material.css.js.map +0 -1
- package/components/checkbox/switch.material.css.js +0 -3
- package/components/checkbox/switch.material.css.js.map +0 -1
- package/components/input/input.dark.material.css.js.map +0 -1
- package/components/input/input.material.css.js +0 -3
- package/components/input/input.material.css.js.map +0 -1
- package/components/list/list-header.material.css.js.map +0 -1
- package/components/list/list-item.material.css.js.map +0 -1
- package/components/list/list.material.css.js.map +0 -1
- package/components/nav-drawer/nav-drawer-header-item.material.css.js.map +0 -1
- package/components/nav-drawer/nav-drawer-item.material.css.js +0 -3
- package/components/nav-drawer/nav-drawer-item.material.css.js.map +0 -1
- package/components/nav-drawer/nav-drawer.material.css.js.map +0 -1
- package/components/navbar/navbar.material.css.js.map +0 -1
- package/components/radio/radio.material.css.js +0 -3
- package/components/radio/radio.material.css.js.map +0 -1
- package/components/radio-group/radio-group.material.css.js.map +0 -1
- package/components/slider/slider.material.css.js +0 -3
- package/components/slider/slider.material.css.js.map +0 -1
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, LitElement, nothing } from 'lit';
|
|
8
|
+
import { property, query, queryAssignedElements, state, } from 'lit/decorators.js';
|
|
9
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
10
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
11
|
+
import { watch } from '../common/decorators/watch';
|
|
12
|
+
import { EventEmitterMixin } from '../common/mixins/event-emitter';
|
|
13
|
+
import { SizableMixin } from '../common/mixins/sizable';
|
|
14
|
+
import { styles } from './rating.base.css';
|
|
15
|
+
import { styles as bootstrap } from './rating.bootstrap.css';
|
|
16
|
+
import { styles as fluent } from './rating.fluent.css';
|
|
17
|
+
import { styles as indigo } from './rating.indigo.css';
|
|
18
|
+
import { clamp } from '../common/util';
|
|
19
|
+
import { themes } from '../../theming';
|
|
20
|
+
let IgcRatingComponent = class IgcRatingComponent extends SizableMixin(EventEmitterMixin(LitElement)) {
|
|
21
|
+
constructor() {
|
|
22
|
+
super();
|
|
23
|
+
this.hoverValue = -1;
|
|
24
|
+
this.hoverState = false;
|
|
25
|
+
this.max = 5;
|
|
26
|
+
this.step = 1;
|
|
27
|
+
this.symbol = '⭐';
|
|
28
|
+
this.value = 0;
|
|
29
|
+
this.disabled = false;
|
|
30
|
+
this.hoverPreview = false;
|
|
31
|
+
this.readonly = false;
|
|
32
|
+
this.addEventListener('keydown', this.handleKeyDown);
|
|
33
|
+
}
|
|
34
|
+
get isInteractive() {
|
|
35
|
+
return !(this.readonly || this.disabled);
|
|
36
|
+
}
|
|
37
|
+
get hasProjectedSymbols() {
|
|
38
|
+
return this.ratingSymbols.length > 0;
|
|
39
|
+
}
|
|
40
|
+
get isLTR() {
|
|
41
|
+
return (window.getComputedStyle(this).getPropertyValue('direction') === 'ltr');
|
|
42
|
+
}
|
|
43
|
+
get valueText() {
|
|
44
|
+
return this.valueFormat
|
|
45
|
+
? this.valueFormat.replace(/\{0\}/gm, `${this.value}`)
|
|
46
|
+
: this.value;
|
|
47
|
+
}
|
|
48
|
+
handleMaxChange() {
|
|
49
|
+
this.hasProjectedSymbols
|
|
50
|
+
? (this.max = this.ratingSymbols.length)
|
|
51
|
+
: (this.max = Math.max(0, this.max));
|
|
52
|
+
if (this.max < this.value) {
|
|
53
|
+
this.value = this.max;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
handleValueChange() {
|
|
57
|
+
this.value = clamp(this.value, 0, this.max);
|
|
58
|
+
}
|
|
59
|
+
handlePrecisionChange() {
|
|
60
|
+
this.step = clamp(this.step, 0.001, 1);
|
|
61
|
+
}
|
|
62
|
+
handleClick({ clientX }) {
|
|
63
|
+
if (!this.isInteractive) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const value = this.calcNewValue(clientX);
|
|
67
|
+
this.value === value ? (this.value = 0) : (this.value = value);
|
|
68
|
+
this.emitEvent('igcChange', { detail: this.value });
|
|
69
|
+
}
|
|
70
|
+
handleMouseMove({ clientX }) {
|
|
71
|
+
if (!this.isInteractive) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const value = this.calcNewValue(clientX);
|
|
75
|
+
if (this.hoverValue !== value) {
|
|
76
|
+
this.hoverValue = value;
|
|
77
|
+
this.emitEvent('igcHover', { detail: this.hoverValue });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
handleMouseEnter() {
|
|
81
|
+
if (this.isInteractive) {
|
|
82
|
+
this.hoverState = true;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
handleMouseLeave() {
|
|
86
|
+
if (this.isInteractive) {
|
|
87
|
+
this.hoverState = false;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
handleKeyDown({ key }) {
|
|
91
|
+
if (!this.isInteractive) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
let result = this.value;
|
|
95
|
+
switch (key) {
|
|
96
|
+
case 'ArrowUp':
|
|
97
|
+
case 'ArrowRight':
|
|
98
|
+
result += this.isLTR ? this.step : -this.step;
|
|
99
|
+
break;
|
|
100
|
+
case 'ArrowDown':
|
|
101
|
+
case 'ArrowLeft':
|
|
102
|
+
result -= this.isLTR ? this.step : -this.step;
|
|
103
|
+
break;
|
|
104
|
+
case 'Home':
|
|
105
|
+
result = this.step;
|
|
106
|
+
break;
|
|
107
|
+
case 'End':
|
|
108
|
+
result = this.max;
|
|
109
|
+
break;
|
|
110
|
+
default:
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
this.value = clamp(result, 0, this.max);
|
|
114
|
+
if (result === this.value) {
|
|
115
|
+
this.emitEvent('igcChange', { detail: this.value });
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
handleSlotChange() {
|
|
119
|
+
if (this.hasProjectedSymbols) {
|
|
120
|
+
this.max = this.ratingSymbols.length;
|
|
121
|
+
}
|
|
122
|
+
this.requestUpdate();
|
|
123
|
+
}
|
|
124
|
+
calcNewValue(x) {
|
|
125
|
+
const { width, left, right } = this.container.getBoundingClientRect();
|
|
126
|
+
const percent = this.isLTR ? (x - left) / width : (right - x) / width;
|
|
127
|
+
const value = this.round(this.max * percent + this.step / 2);
|
|
128
|
+
return clamp(value, this.step, this.max);
|
|
129
|
+
}
|
|
130
|
+
getPrecision(num) {
|
|
131
|
+
const [_, decimal] = num.toString().split('.');
|
|
132
|
+
return decimal ? decimal.length : 0;
|
|
133
|
+
}
|
|
134
|
+
round(value) {
|
|
135
|
+
value = Math.round(value / this.step) * this.step;
|
|
136
|
+
return Number(value.toFixed(this.getPrecision(this.step)));
|
|
137
|
+
}
|
|
138
|
+
stepUp(n = 1) {
|
|
139
|
+
this.value += this.round(n * this.step);
|
|
140
|
+
}
|
|
141
|
+
stepDown(n = 1) {
|
|
142
|
+
this.value -= this.round(n * this.step);
|
|
143
|
+
}
|
|
144
|
+
*renderSymbols() {
|
|
145
|
+
for (let i = 0; i < this.max; i++) {
|
|
146
|
+
yield html `<span part="symbol ${this.size}">${this.symbol}</span>`;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
renderProjected() {
|
|
150
|
+
return html `${this.ratingSymbols.map((each) => {
|
|
151
|
+
const clone = each.cloneNode(true);
|
|
152
|
+
clone.setAttribute('part', `symbol ${this.size}`);
|
|
153
|
+
return clone;
|
|
154
|
+
})}`;
|
|
155
|
+
}
|
|
156
|
+
renderFractionWrapper(styles) {
|
|
157
|
+
return html `<div
|
|
158
|
+
@click=${this.handleClick}
|
|
159
|
+
@mouseenter=${this.hoverPreview ? this.handleMouseEnter : nothing}
|
|
160
|
+
@mouseleave=${this.hoverPreview ? this.handleMouseLeave : nothing}
|
|
161
|
+
@mousemove=${this.hoverPreview ? this.handleMouseMove : nothing}
|
|
162
|
+
>
|
|
163
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
164
|
+
|
|
165
|
+
<div style=${styleMap(styles)} part="fraction ${this.size}">
|
|
166
|
+
<div part="symbols-wrapper">
|
|
167
|
+
${this.hasProjectedSymbols
|
|
168
|
+
? this.renderProjected()
|
|
169
|
+
: this.renderSymbols()}
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
<div part="symbols-wrapper">
|
|
173
|
+
${this.hasProjectedSymbols
|
|
174
|
+
? this.renderProjected()
|
|
175
|
+
: this.renderSymbols()}
|
|
176
|
+
</div>
|
|
177
|
+
</div>`;
|
|
178
|
+
}
|
|
179
|
+
render() {
|
|
180
|
+
var _a;
|
|
181
|
+
const value = this.hoverState ? this.hoverValue : this.value;
|
|
182
|
+
const styles = { width: `${Math.round((value / this.max) * 100)}%` };
|
|
183
|
+
return html `
|
|
184
|
+
<label part="label ${this.size}">${this.label}</label>
|
|
185
|
+
<div
|
|
186
|
+
part="base"
|
|
187
|
+
role="slider"
|
|
188
|
+
tabindex=${ifDefined(this.disabled ? undefined : 0)}
|
|
189
|
+
aria-label=${(_a = this.label) !== null && _a !== void 0 ? _a : nothing}
|
|
190
|
+
aria-valuemin="0"
|
|
191
|
+
aria-valuenow=${this.value}
|
|
192
|
+
aria-valuemax=${this.max}
|
|
193
|
+
aria-valuetext=${this.valueText}
|
|
194
|
+
>
|
|
195
|
+
${this.renderFractionWrapper(styles)}
|
|
196
|
+
</div>
|
|
197
|
+
`;
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
IgcRatingComponent.tagName = 'igc-rating';
|
|
201
|
+
IgcRatingComponent.styles = [styles];
|
|
202
|
+
__decorate([
|
|
203
|
+
query('[part="base"]', true)
|
|
204
|
+
], IgcRatingComponent.prototype, "container", void 0);
|
|
205
|
+
__decorate([
|
|
206
|
+
queryAssignedElements({ selector: 'igc-rating-symbol' })
|
|
207
|
+
], IgcRatingComponent.prototype, "ratingSymbols", void 0);
|
|
208
|
+
__decorate([
|
|
209
|
+
state()
|
|
210
|
+
], IgcRatingComponent.prototype, "hoverValue", void 0);
|
|
211
|
+
__decorate([
|
|
212
|
+
state()
|
|
213
|
+
], IgcRatingComponent.prototype, "hoverState", void 0);
|
|
214
|
+
__decorate([
|
|
215
|
+
property({ type: Number })
|
|
216
|
+
], IgcRatingComponent.prototype, "max", void 0);
|
|
217
|
+
__decorate([
|
|
218
|
+
property({ type: Number })
|
|
219
|
+
], IgcRatingComponent.prototype, "step", void 0);
|
|
220
|
+
__decorate([
|
|
221
|
+
property()
|
|
222
|
+
], IgcRatingComponent.prototype, "symbol", void 0);
|
|
223
|
+
__decorate([
|
|
224
|
+
property()
|
|
225
|
+
], IgcRatingComponent.prototype, "name", void 0);
|
|
226
|
+
__decorate([
|
|
227
|
+
property()
|
|
228
|
+
], IgcRatingComponent.prototype, "label", void 0);
|
|
229
|
+
__decorate([
|
|
230
|
+
property({ attribute: 'value-format' })
|
|
231
|
+
], IgcRatingComponent.prototype, "valueFormat", void 0);
|
|
232
|
+
__decorate([
|
|
233
|
+
property({ type: Number })
|
|
234
|
+
], IgcRatingComponent.prototype, "value", void 0);
|
|
235
|
+
__decorate([
|
|
236
|
+
property({ type: Boolean, reflect: true })
|
|
237
|
+
], IgcRatingComponent.prototype, "disabled", void 0);
|
|
238
|
+
__decorate([
|
|
239
|
+
property({ type: Boolean, reflect: true, attribute: 'hover-preview' })
|
|
240
|
+
], IgcRatingComponent.prototype, "hoverPreview", void 0);
|
|
241
|
+
__decorate([
|
|
242
|
+
property({ type: Boolean, reflect: true })
|
|
243
|
+
], IgcRatingComponent.prototype, "readonly", void 0);
|
|
244
|
+
__decorate([
|
|
245
|
+
watch('max')
|
|
246
|
+
], IgcRatingComponent.prototype, "handleMaxChange", null);
|
|
247
|
+
__decorate([
|
|
248
|
+
watch('value')
|
|
249
|
+
], IgcRatingComponent.prototype, "handleValueChange", null);
|
|
250
|
+
__decorate([
|
|
251
|
+
watch('step')
|
|
252
|
+
], IgcRatingComponent.prototype, "handlePrecisionChange", null);
|
|
253
|
+
IgcRatingComponent = __decorate([
|
|
254
|
+
themes({ fluent, bootstrap, indigo })
|
|
255
|
+
], IgcRatingComponent);
|
|
256
|
+
export default IgcRatingComponent;
|
|
257
|
+
//# sourceMappingURL=rating.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rating.js","sourceRoot":"","sources":["../../../src/components/rating/rating.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EACL,QAAQ,EACR,KAAK,EACL,qBAAqB,EACrB,KAAK,GACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,SA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,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;GACjB,kBAAkB,CAqRtC;eArRoB,kBAAkB","sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport {\n property,\n query,\n queryAssignedElements,\n state,\n} from 'lit/decorators.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { watch } from '../common/decorators/watch';\nimport { Constructor } from '../common/mixins/constructor';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter';\nimport { SizableMixin } from '../common/mixins/sizable';\nimport { styles } from './rating.base.css';\nimport { styles as bootstrap } from './rating.bootstrap.css';\nimport { styles as fluent } from './rating.fluent.css';\nimport { styles as indigo } from './rating.indigo.css';\nimport { clamp } from '../common/util';\nimport type IgcRatingSymbolComponent from './rating-symbol';\nimport { themes } from '../../theming';\n\nexport interface IgcRatingEventMap {\n igcChange: CustomEvent<number>;\n igcHover: CustomEvent<number>;\n}\n\n/**\n * Rating provides insight regarding others' opinions and experiences,\n * and can allow the user to submit a rating of their own\n *\n * @element igc-rating\n *\n * @fires igcChange - Emitted when the value of the control changes.\n * @fires igcHover - Emitted when hover is enabled and the user mouses over a symbol of the rating.\n *\n * @csspart base - The main wrapper which holds all of the rating elements.\n * @csspart label - The label part.\n * @csspart symbol - The part for a single symbol.\n * @csspart fraction -The part for the selected symbols.\n * @csspart symbols-wrapper - The wrapper that holds all symbols.\n * @csspart large - A part responsible for the symbols size.\n * @csspart medium - A part responsible for the symbols size.\n * @csspart small- A part responsible for the symbols size.\n */\n@themes({ fluent, bootstrap, indigo })\nexport default class IgcRatingComponent extends SizableMixin(\n EventEmitterMixin<IgcRatingEventMap, Constructor<LitElement>>(LitElement)\n) {\n public static readonly tagName = 'igc-rating';\n\n public static styles = [styles];\n\n @query('[part=\"base\"]', true)\n protected container!: HTMLElement;\n\n @queryAssignedElements({ selector: 'igc-rating-symbol' })\n protected ratingSymbols!: Array<IgcRatingSymbolComponent>;\n\n @state()\n protected hoverValue = -1;\n\n @state()\n protected hoverState = false;\n\n protected get isInteractive() {\n return !(this.readonly || this.disabled);\n }\n\n protected get hasProjectedSymbols() {\n return this.ratingSymbols.length > 0;\n }\n\n protected get isLTR() {\n return (\n window.getComputedStyle(this).getPropertyValue('direction') === 'ltr'\n );\n }\n\n protected get valueText() {\n return this.valueFormat\n ? this.valueFormat.replace(/\\{0\\}/gm, `${this.value}`)\n : this.value;\n }\n\n /** The maximum value for the rating */\n @property({ type: Number })\n public max = 5;\n\n /** The minimum value change allowed. */\n @property({ type: Number })\n public step = 1;\n\n /** The symbol which the rating will display. */\n @property()\n public symbol = '⭐';\n\n /** The name attribute of the control */\n @property()\n public name!: string;\n\n /** The label of the control. */\n @property()\n public label!: string;\n\n /**\n * A format string which sets aria-valuetext. All instances of '{0}' will be replaced\n * with the current value of the control.\n * Important for screen-readers and useful for localization.\n */\n @property({ attribute: 'value-format' })\n public valueFormat!: string;\n\n /** The current value of the component */\n @property({ type: Number })\n public value = 0;\n\n /** Sets the disabled state of the component */\n @property({ type: Boolean, reflect: true })\n public disabled = false;\n\n /** Sets hover preview behavior for the component */\n @property({ type: Boolean, reflect: true, attribute: 'hover-preview' })\n public hoverPreview = false;\n\n /** Sets the readonly state of the component */\n @property({ type: Boolean, reflect: true })\n public readonly = false;\n\n @watch('max')\n protected handleMaxChange() {\n this.hasProjectedSymbols\n ? (this.max = this.ratingSymbols.length)\n : (this.max = Math.max(0, this.max));\n if (this.max < this.value) {\n this.value = this.max;\n }\n }\n\n @watch('value')\n protected handleValueChange() {\n this.value = clamp(this.value, 0, this.max);\n }\n\n @watch('step')\n protected handlePrecisionChange() {\n this.step = clamp(this.step, 0.001, 1);\n }\n\n constructor() {\n super();\n this.addEventListener('keydown', this.handleKeyDown);\n }\n\n protected handleClick({ clientX }: MouseEvent) {\n if (!this.isInteractive) {\n return;\n }\n\n const value = this.calcNewValue(clientX);\n this.value === value ? (this.value = 0) : (this.value = value);\n this.emitEvent('igcChange', { detail: this.value });\n }\n\n protected handleMouseMove({ clientX }: MouseEvent) {\n if (!this.isInteractive) {\n return;\n }\n\n const value = this.calcNewValue(clientX);\n\n if (this.hoverValue !== value) {\n // Since mousemove spams a lot, only emit on a value change\n this.hoverValue = value;\n this.emitEvent('igcHover', { detail: this.hoverValue });\n }\n }\n\n protected handleMouseEnter() {\n if (this.isInteractive) {\n this.hoverState = true;\n }\n }\n\n protected handleMouseLeave() {\n if (this.isInteractive) {\n this.hoverState = false;\n }\n }\n\n protected handleKeyDown({ key }: KeyboardEvent) {\n if (!this.isInteractive) {\n return;\n }\n\n let result = this.value;\n\n switch (key) {\n case 'ArrowUp':\n case 'ArrowRight':\n result += this.isLTR ? this.step : -this.step;\n break;\n case 'ArrowDown':\n case 'ArrowLeft':\n result -= this.isLTR ? this.step : -this.step;\n break;\n case 'Home':\n result = this.step;\n break;\n case 'End':\n result = this.max;\n break;\n default:\n return;\n }\n\n // Verify new value is in bounds and emit\n this.value = clamp(result, 0, this.max);\n\n if (result === this.value) {\n this.emitEvent('igcChange', { detail: this.value });\n }\n }\n\n protected handleSlotChange() {\n if (this.hasProjectedSymbols) {\n this.max = this.ratingSymbols.length;\n }\n this.requestUpdate();\n }\n\n protected calcNewValue(x: number) {\n const { width, left, right } = this.container.getBoundingClientRect();\n const percent = this.isLTR ? (x - left) / width : (right - x) / width;\n const value = this.round(this.max * percent + this.step / 2);\n\n return clamp(value, this.step, this.max);\n }\n\n protected getPrecision(num: number) {\n const [_, decimal] = num.toString().split('.');\n return decimal ? decimal.length : 0;\n }\n\n protected round(value: number) {\n value = Math.round(value / this.step) * this.step;\n return Number(value.toFixed(this.getPrecision(this.step)));\n }\n\n /**\n * Increments the value of the control by `n` steps multiplied by the\n * step factor.\n */\n public stepUp(n = 1) {\n this.value += this.round(n * this.step);\n }\n\n /**\n * Decrements the value of the control by `n` steps multiplied by\n * the step factor.\n */\n public stepDown(n = 1) {\n this.value -= this.round(n * this.step);\n }\n\n protected *renderSymbols() {\n for (let i = 0; i < this.max; i++) {\n yield html`<span part=\"symbol ${this.size}\">${this.symbol}</span>`;\n }\n }\n\n protected renderProjected() {\n return html`${this.ratingSymbols.map((each) => {\n const clone = each.cloneNode(true) as IgcRatingSymbolComponent;\n clone.setAttribute('part', `symbol ${this.size}`);\n return clone;\n })}`;\n }\n\n protected renderFractionWrapper(styles: { width: string }) {\n return html`<div\n @click=${this.handleClick}\n @mouseenter=${this.hoverPreview ? this.handleMouseEnter : nothing}\n @mouseleave=${this.hoverPreview ? this.handleMouseLeave : nothing}\n @mousemove=${this.hoverPreview ? this.handleMouseMove : nothing}\n >\n <slot @slotchange=${this.handleSlotChange}></slot>\n\n <div style=${styleMap(styles)} part=\"fraction ${this.size}\">\n <div part=\"symbols-wrapper\">\n ${this.hasProjectedSymbols\n ? this.renderProjected()\n : this.renderSymbols()}\n </div>\n </div>\n <div part=\"symbols-wrapper\">\n ${this.hasProjectedSymbols\n ? this.renderProjected()\n : this.renderSymbols()}\n </div>\n </div>`;\n }\n\n protected override render() {\n const value = this.hoverState ? this.hoverValue : this.value;\n const styles = { width: `${Math.round((value / this.max) * 100)}%` };\n\n return html`\n <label part=\"label ${this.size}\">${this.label}</label>\n <div\n part=\"base\"\n role=\"slider\"\n tabindex=${ifDefined(this.disabled ? undefined : 0)}\n aria-label=${this.label ?? nothing}\n aria-valuemin=\"0\"\n aria-valuenow=${this.value}\n aria-valuemax=${this.max}\n aria-valuetext=${this.valueText}\n >\n ${this.renderFractionWrapper(styles)}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-rating': IgcRatingComponent;\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement, TemplateResult } from 'lit';
|
|
2
2
|
import { StyleInfo } from 'lit/directives/style-map.js';
|
|
3
3
|
export declare class IgcSliderBaseComponent extends LitElement {
|
|
4
|
-
static styles: import("lit").CSSResult
|
|
4
|
+
static styles: import("lit").CSSResult;
|
|
5
5
|
protected thumb: HTMLElement;
|
|
6
6
|
private labelElements;
|
|
7
7
|
private _lowerBound?;
|
|
@@ -8,9 +8,14 @@ import { html, LitElement } from 'lit';
|
|
|
8
8
|
import { property, query, queryAssignedElements, state, } from 'lit/decorators.js';
|
|
9
9
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
10
10
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
11
|
+
import { themes } from '../../theming';
|
|
11
12
|
import { watch } from '../common/decorators';
|
|
12
|
-
import { styles } from './slider.
|
|
13
|
-
|
|
13
|
+
import { styles } from './themes/light/slider.base.css';
|
|
14
|
+
import { styles as bootstrap } from './themes/light/slider.bootstrap.css';
|
|
15
|
+
import { styles as fluent } from './themes/light/slider.fluent.css';
|
|
16
|
+
import { styles as indigo } from './themes/light/slider.indigo.css';
|
|
17
|
+
import { styles as material } from './themes/light/slider.material.css';
|
|
18
|
+
let IgcSliderBaseComponent = class IgcSliderBaseComponent extends LitElement {
|
|
14
19
|
constructor() {
|
|
15
20
|
super();
|
|
16
21
|
this._min = 0;
|
|
@@ -425,8 +430,8 @@ export class IgcSliderBaseComponent extends LitElement {
|
|
|
425
430
|
</div>
|
|
426
431
|
`;
|
|
427
432
|
}
|
|
428
|
-
}
|
|
429
|
-
IgcSliderBaseComponent.styles =
|
|
433
|
+
};
|
|
434
|
+
IgcSliderBaseComponent.styles = styles;
|
|
430
435
|
__decorate([
|
|
431
436
|
query(`[part='thumb']`)
|
|
432
437
|
], IgcSliderBaseComponent.prototype, "thumb", void 0);
|
|
@@ -500,4 +505,8 @@ __decorate([
|
|
|
500
505
|
__decorate([
|
|
501
506
|
watch('labels')
|
|
502
507
|
], IgcSliderBaseComponent.prototype, "labelsChange", null);
|
|
508
|
+
IgcSliderBaseComponent = __decorate([
|
|
509
|
+
themes({ material, bootstrap, fluent, indigo })
|
|
510
|
+
], IgcSliderBaseComponent);
|
|
511
|
+
export { IgcSliderBaseComponent };
|
|
503
512
|
//# sourceMappingURL=slider-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EAAE,iBAAiB,EAAE,CAAC;8DAC/B;AAM1B;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,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","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 { watch } from '../common/decorators';\nimport { styles } from './slider.material.css';\n\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;AACzD,OAAO,EAAa,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,MAAM,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E,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider-label.js","sourceRoot":"","sources":["../../../src/components/slider/slider-label.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEtC,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,UAAU;IAS1C,gBAAgB;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;;AAVsB,8BAAM,GAAG,GAAG,CAAA;;;;GAIlC,CAAC;AAEqB,+BAAO,GAAG,kBAAkB,CAAC","sourcesContent":["import { css, LitElement } from 'lit';\n\nexport default class IgcSliderLabelComponent extends LitElement {\n public static override styles = css`\n :host {\n display: none;\n }\n `;\n\n public static readonly tagName = 'igc-slider-label';\n\n protected override createRenderRoot() {\n return this;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"slider-label.js","sourceRoot":"","sources":["../../../src/components/slider/slider-label.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEtC,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,UAAU;IAS1C,gBAAgB;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;;AAVsB,8BAAM,GAAG,GAAG,CAAA;;;;GAIlC,CAAC;AAEqB,+BAAO,GAAG,kBAAkB,CAAC","sourcesContent":["import { css, LitElement } from 'lit';\n\nexport default class IgcSliderLabelComponent extends LitElement {\n public static override styles = css`\n :host {\n display: none;\n }\n `;\n\n public static readonly tagName = 'igc-slider-label';\n\n protected override createRenderRoot() {\n return this;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-slider-label': IgcSliderLabelComponent;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.bootstrap.css.js","sourceRoot":"","sources":["../../../../../src/components/slider/themes/dark/slider.bootstrap.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,EAAE,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css``;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.fluent.css.js","sourceRoot":"","sources":["../../../../../src/components/slider/themes/dark/slider.fluent.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,EAAE,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css``;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.indigo.css.js","sourceRoot":"","sources":["../../../../../src/components/slider/themes/dark/slider.indigo.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,EAAE,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css``;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,3 @@
|
|
|
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))}`;
|
|
3
|
+
//# sourceMappingURL=slider.base.css.js.map
|
|
@@ -0,0 +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,6qMAA6qM,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);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))}`;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const styles = css `[part=track],[part=inactive]{height:.5rem}[part=fill]{display:none}[part=inactive]{background:var(--inactive-background, hsla(var(--igc-secondary-500), 0.24))}[part=steps]{top:.1875rem}[part=thumb]{width:1rem;height:1rem;background:hsla(var(--igc-primary-500), var(--igc-primary-a));top:calc((1rem - calc(1rem / 2))*-1);-webkit-margin-start:calc((1rem - calc(1rem / 2))*-1);margin-inline-start:calc((1rem - calc(1rem / 2))*-1)}[part=thumb]:focus{border:.0625rem solid hsla(var(--igc-surface-500), var(--igc-surface-a));-webkit-box-shadow:0 0 0 .1875rem hsla(var(--igc-primary-200), var(--igc-primary-a));box-shadow:0 0 0 .1875rem hsla(var(--igc-primary-200), var(--igc-primary-a))}`;
|
|
3
|
+
//# sourceMappingURL=slider.bootstrap.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.bootstrap.css.js","sourceRoot":"","sources":["../../../../../src/components/slider/themes/light/slider.bootstrap.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,2qBAA2qB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`[part=track],[part=inactive]{height:.5rem}[part=fill]{display:none}[part=inactive]{background:var(--inactive-background, hsla(var(--igc-secondary-500), 0.24))}[part=steps]{top:.1875rem}[part=thumb]{width:1rem;height:1rem;background:hsla(var(--igc-primary-500), var(--igc-primary-a));top:calc((1rem - calc(1rem / 2))*-1);-webkit-margin-start:calc((1rem - calc(1rem / 2))*-1);margin-inline-start:calc((1rem - calc(1rem / 2))*-1)}[part=thumb]:focus{border:.0625rem solid hsla(var(--igc-surface-500), var(--igc-surface-a));-webkit-box-shadow:0 0 0 .1875rem hsla(var(--igc-primary-200), var(--igc-primary-a));box-shadow:0 0 0 .1875rem hsla(var(--igc-primary-200), var(--igc-primary-a))}`;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const styles = css `:host(:hover) [part=inactive]{background:hsla(var(--igc-primary-500), 0.32)}:host(:hover) [part=fill]{background:var(--fill-hover-background, hsla(var(--igc-primary-500), var(--igc-primary-a)))}:host(:hover) [part=thumb]{border-color:var(--thumb-hover-border, hsla(var(--igc-primary-500), var(--igc-primary-a)))}[part=track],[part=fill],[part=inactive]{height:.25rem}[part=inactive]{background:var(--inactive-background, hsla(var(--igc-gray-400), var(--igc-gray-a)));top:initial}[part=fill]{background:var(--fill-background, hsla(var(--igc-gray-700), var(--igc-gray-a)))}[part=steps]{top:.0625rem}[part=thumb]{background:hsla(var(--igc-surface-500), var(--igc-surface-a));border:.125rem solid var(--thumb-border, hsla(var(--igc-gray-700), var(--igc-gray-a)));width:1rem;height:1rem;top:calc((1rem - 0.5rem)*-1);-webkit-margin-start:calc((1rem - 0.5rem)*-1);margin-inline-start:calc((1rem - 0.5rem)*-1)}:host([disabled]) [part=inactive]{background:var(--inactive-disabled-background, hsla(var(--igc-gray-200), var(--igc-gray-a)))}:host([disabled]) [part=fill]{background:var(--fill-disabled-background, hsla(var(--igc-gray-400), var(--igc-gray-a)))}:host([disabled]) [part=thumb]{background:hsla(var(--igc-surface-500), var(--igc-surface-a));border-color:var(--thumb-disabled-border, hsla(var(--igc-gray-400), var(--igc-gray-a)))}`;
|
|
3
|
+
//# sourceMappingURL=slider.fluent.css.js.map
|