igniteui-webcomponents 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/components/avatar/avatar.js +2 -2
- package/components/avatar/avatar.js.map +1 -1
- package/components/badge/badge.js +3 -3
- package/components/badge/badge.js.map +1 -1
- package/components/button/button-base.js +1 -1
- package/components/button/button-base.js.map +1 -1
- package/components/button/button.js +6 -6
- package/components/button/button.js.map +1 -1
- package/components/button/icon-button.d.ts +1 -1
- package/components/button/icon-button.js +9 -8
- package/components/button/icon-button.js.map +1 -1
- package/components/calendar/calendar.d.ts +8 -8
- package/components/calendar/calendar.js +16 -16
- package/components/calendar/calendar.js.map +1 -1
- package/components/calendar/common/calendar-base.d.ts +1 -1
- package/components/calendar/common/calendar-base.js +5 -3
- package/components/calendar/common/calendar-base.js.map +1 -1
- package/components/calendar/common/utils.d.ts +1 -1
- package/components/calendar/common/utils.js.map +1 -1
- package/components/calendar/days-view/days-view.d.ts +5 -5
- package/components/calendar/days-view/days-view.js +13 -11
- package/components/calendar/days-view/days-view.js.map +1 -1
- package/components/calendar/months-view/months-view.d.ts +3 -3
- package/components/calendar/months-view/months-view.js +12 -10
- package/components/calendar/months-view/months-view.js.map +1 -1
- package/components/calendar/years-view/years-view.d.ts +3 -3
- package/components/calendar/years-view/years-view.js +11 -9
- package/components/calendar/years-view/years-view.js.map +1 -1
- package/components/card/card.actions.js +3 -3
- package/components/card/card.actions.js.map +1 -1
- package/components/card/card.content.js +3 -3
- package/components/card/card.content.js.map +1 -1
- package/components/card/card.header.js +4 -4
- package/components/card/card.header.js.map +1 -1
- package/components/card/card.js +4 -4
- package/components/card/card.js.map +1 -1
- package/components/card/card.media.js +1 -1
- package/components/card/card.media.js.map +1 -1
- package/components/checkbox/checkbox-base.js +2 -1
- package/components/checkbox/checkbox-base.js.map +1 -1
- package/components/checkbox/checkbox.js +6 -7
- package/components/checkbox/checkbox.js.map +1 -1
- package/components/checkbox/switch.js +6 -7
- package/components/checkbox/switch.js.map +1 -1
- package/components/chip/chip.d.ts +1 -0
- package/components/chip/chip.js +20 -9
- package/components/chip/chip.js.map +1 -1
- package/components/chip/themes/chip.base.css.js +1 -1
- package/components/chip/themes/chip.base.css.js.map +1 -1
- package/components/chip/themes/chip.bootstrap.css.js +1 -1
- package/components/chip/themes/chip.bootstrap.css.js.map +1 -1
- package/components/chip/themes/chip.fluent.css.js +1 -1
- package/components/chip/themes/chip.fluent.css.js.map +1 -1
- package/components/chip/themes/chip.indigo.css.js +1 -1
- package/components/chip/themes/chip.indigo.css.js.map +1 -1
- package/components/chip/themes/chip.material.css.js +1 -1
- package/components/chip/themes/chip.material.css.js.map +1 -1
- package/components/common/definitions/defineAllComponents.js +41 -41
- package/components/common/definitions/defineAllComponents.js.map +1 -1
- package/components/dropdown/dropdown-group.d.ts +1 -1
- package/components/dropdown/dropdown-group.js +3 -3
- package/components/dropdown/dropdown-group.js.map +1 -1
- package/components/dropdown/dropdown-header.d.ts +1 -1
- package/components/dropdown/dropdown-header.js +3 -3
- package/components/dropdown/dropdown-header.js.map +1 -1
- package/components/dropdown/dropdown-item.js +6 -6
- package/components/dropdown/dropdown-item.js.map +1 -1
- package/components/dropdown/dropdown.d.ts +5 -5
- package/components/dropdown/dropdown.js +11 -10
- package/components/dropdown/dropdown.js.map +1 -1
- package/components/form/form.d.ts +2 -2
- package/components/form/form.js +3 -2
- package/components/form/form.js.map +1 -1
- package/components/icon/icon.d.ts +1 -1
- package/components/icon/icon.js +3 -2
- package/components/icon/icon.js.map +1 -1
- package/components/icon/icon.registry.js +2 -0
- package/components/icon/icon.registry.js.map +1 -1
- package/components/input/input-base.d.ts +1 -1
- package/components/input/input-base.js +10 -6
- package/components/input/input-base.js.map +1 -1
- package/components/input/input.d.ts +1 -1
- package/components/input/input.js +5 -3
- package/components/input/input.js.map +1 -1
- package/components/list/list-header.js +3 -3
- package/components/list/list-header.js.map +1 -1
- package/components/list/list-item.js +5 -5
- package/components/list/list-item.js.map +1 -1
- package/components/list/list.d.ts +1 -1
- package/components/list/list.js +4 -4
- package/components/list/list.js.map +1 -1
- package/components/nav-drawer/nav-drawer-header-item.js +3 -3
- package/components/nav-drawer/nav-drawer-header-item.js.map +1 -1
- package/components/nav-drawer/nav-drawer-item.js +4 -4
- package/components/nav-drawer/nav-drawer-item.js.map +1 -1
- package/components/nav-drawer/nav-drawer.js +4 -4
- package/components/nav-drawer/nav-drawer.js.map +1 -1
- package/components/navbar/navbar.js +4 -4
- package/components/navbar/navbar.js.map +1 -1
- package/components/progress/base.js +2 -2
- package/components/progress/base.js.map +1 -1
- package/components/progress/circular-progress.d.ts +2 -2
- package/components/progress/circular-progress.js +6 -6
- package/components/progress/circular-progress.js.map +1 -1
- package/components/progress/linear-progress.d.ts +1 -1
- package/components/progress/linear-progress.js +7 -7
- package/components/progress/linear-progress.js.map +1 -1
- package/components/radio/radio.js +9 -9
- package/components/radio/radio.js.map +1 -1
- package/components/radio-group/radio-group.js +1 -1
- package/components/radio-group/radio-group.js.map +1 -1
- package/components/rating/rating.d.ts +2 -2
- package/components/rating/rating.js +9 -9
- package/components/rating/rating.js.map +1 -1
- package/components/ripple/ripple.js +1 -1
- package/components/ripple/ripple.js.map +1 -1
- package/components/slider/range-slider.d.ts +3 -3
- package/components/slider/range-slider.js +2 -2
- package/components/slider/range-slider.js.map +1 -1
- package/components/slider/slider-base.js +8 -7
- package/components/slider/slider-base.js.map +1 -1
- package/components/slider/slider.d.ts +3 -3
- package/components/slider/slider.js +2 -2
- package/components/slider/slider.js.map +1 -1
- package/components/snackbar/snackbar.d.ts +2 -0
- package/components/snackbar/snackbar.js +8 -5
- package/components/snackbar/snackbar.js.map +1 -1
- package/components/toast/toast.js +5 -5
- package/components/toast/toast.js.map +1 -1
- package/components/toggle/toggle.controller.d.ts +3 -3
- package/components/toggle/toggle.controller.js +1 -1
- package/components/toggle/toggle.controller.js.map +1 -1
- package/components/toggle/toggle.directive.d.ts +1 -1
- package/components/toggle/toggle.directive.js.map +1 -1
- package/components/toggle/{utilities.d.ts → types.d.ts} +0 -0
- package/components/toggle/types.js +2 -0
- package/components/toggle/types.js.map +1 -0
- package/index.d.ts +53 -52
- package/index.js +51 -51
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/theming/config.d.ts +1 -1
- package/theming/config.js +2 -2
- package/theming/config.js.map +1 -1
- package/theming/index.d.ts +3 -3
- package/theming/index.js +3 -3
- package/theming/index.js.map +1 -1
- package/theming/{theming-controlller.d.ts → theming-controller.d.ts} +1 -1
- package/theming/{theming-controlller.js → theming-controller.js} +3 -3
- package/theming/theming-controller.js.map +1 -0
- package/theming/theming-decorator.js +1 -1
- package/theming/theming-decorator.js.map +1 -1
- package/theming/theming-event.d.ts +1 -1
- package/theming/theming-event.js.map +1 -1
- package/components/toggle/utilities.js +0 -2
- package/components/toggle/utilities.js.map +0 -1
- package/theming/theming-controlller.js.map +0 -1
package/index.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
export { default as IgcAvatarComponent } from './components/avatar/avatar';
|
|
2
|
-
export { default as IgcBadgeComponent } from './components/badge/badge';
|
|
3
|
-
export { default as IgcButtonComponent } from './components/button/button';
|
|
4
|
-
export {
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export { default as
|
|
10
|
-
export { default as
|
|
11
|
-
export { default as
|
|
12
|
-
export { default as
|
|
13
|
-
export { default as
|
|
14
|
-
export { default as
|
|
15
|
-
export {
|
|
16
|
-
export { default as
|
|
17
|
-
export { default as
|
|
18
|
-
export { default as
|
|
19
|
-
export { default as
|
|
20
|
-
export { default as
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export { default as
|
|
25
|
-
export { default as
|
|
26
|
-
export { default as
|
|
27
|
-
export { default as
|
|
28
|
-
export { default as
|
|
29
|
-
export {
|
|
30
|
-
export { default as
|
|
31
|
-
export {
|
|
32
|
-
export { default as
|
|
33
|
-
export { default as
|
|
34
|
-
export { default as
|
|
35
|
-
export { default as
|
|
36
|
-
export { default as
|
|
37
|
-
export { default as
|
|
38
|
-
export { default as
|
|
39
|
-
export { default as
|
|
40
|
-
export { default as
|
|
41
|
-
export {
|
|
42
|
-
export {
|
|
43
|
-
export {
|
|
44
|
-
export {
|
|
45
|
-
export {
|
|
46
|
-
export {
|
|
47
|
-
export {
|
|
48
|
-
export {
|
|
49
|
-
export {
|
|
50
|
-
export {
|
|
51
|
-
export {
|
|
1
|
+
export { default as IgcAvatarComponent } from './components/avatar/avatar.js';
|
|
2
|
+
export { default as IgcBadgeComponent } from './components/badge/badge.js';
|
|
3
|
+
export { default as IgcButtonComponent } from './components/button/button.js';
|
|
4
|
+
export { default as IgcCalendarComponent } from './components/calendar/calendar.js';
|
|
5
|
+
export { default as IgcCardComponent } from './components/card/card.js';
|
|
6
|
+
export { default as IgcCardActionsComponent } from './components/card/card.actions.js';
|
|
7
|
+
export { default as IgcCardContentComponent } from './components/card/card.content.js';
|
|
8
|
+
export { default as IgcCardHeaderComponent } from './components/card/card.header.js';
|
|
9
|
+
export { default as IgcCardMediaComponent } from './components/card/card.media.js';
|
|
10
|
+
export { default as IgcCheckboxComponent } from './components/checkbox/checkbox.js';
|
|
11
|
+
export { default as IgcCircularProgressComponent } from './components/progress/circular-progress.js';
|
|
12
|
+
export { default as IgcCircularGradientComponent } from './components/progress/circular-gradient.js';
|
|
13
|
+
export { default as IgcChipComponent } from './components/chip/chip.js';
|
|
14
|
+
export { default as IgcDropdownComponent } from './components/dropdown/dropdown.js';
|
|
15
|
+
export { default as IgcDropdownGroupComponent } from './components/dropdown/dropdown-group.js';
|
|
16
|
+
export { default as IgcDropdownHeaderComponent } from './components/dropdown/dropdown-header.js';
|
|
17
|
+
export { default as IgcDropdownItemComponent } from './components/dropdown/dropdown-item.js';
|
|
18
|
+
export { default as IgcIconComponent } from './components/icon/icon.js';
|
|
19
|
+
export { default as IgcIconButtonComponent } from './components/button/icon-button.js';
|
|
20
|
+
export { default as IgcInputComponent } from './components/input/input.js';
|
|
21
|
+
export { default as IgcFormComponent } from './components/form/form.js';
|
|
22
|
+
export { default as IgcLinearProgressComponent } from './components/progress/linear-progress.js';
|
|
23
|
+
export { default as IgcListComponent } from './components/list/list.js';
|
|
24
|
+
export { default as IgcListHeaderComponent } from './components/list/list-header.js';
|
|
25
|
+
export { default as IgcListItemComponent } from './components/list/list-item.js';
|
|
26
|
+
export { default as IgcNavDrawerComponent } from './components/nav-drawer/nav-drawer.js';
|
|
27
|
+
export { default as IgcNavDrawerHeaderItemComponent } from './components/nav-drawer/nav-drawer-header-item.js';
|
|
28
|
+
export { default as IgcNavDrawerItemComponent } from './components/nav-drawer/nav-drawer-item.js';
|
|
29
|
+
export { default as IgcNavbarComponent } from './components/navbar/navbar.js';
|
|
30
|
+
export { default as IgcRadioGroupComponent } from './components/radio-group/radio-group.js';
|
|
31
|
+
export { default as IgcRadioComponent } from './components/radio/radio.js';
|
|
32
|
+
export { default as IgcRatingComponent } from './components/rating/rating.js';
|
|
33
|
+
export { default as IgcRatingSymbolComponent } from './components/rating/rating-symbol.js';
|
|
34
|
+
export { default as IgcRippleComponent } from './components/ripple/ripple.js';
|
|
35
|
+
export { default as IgcRangeSliderComponent } from './components/slider/range-slider.js';
|
|
36
|
+
export { default as IgcSnackbarComponent } from './components/snackbar/snackbar.js';
|
|
37
|
+
export { default as IgcSliderComponent } from './components/slider/slider.js';
|
|
38
|
+
export { default as IgcSliderLabelComponent } from './components/slider/slider-label.js';
|
|
39
|
+
export { default as IgcToastComponent } from './components/toast/toast.js';
|
|
40
|
+
export { default as IgcSwitchComponent } from './components/checkbox/switch.js';
|
|
41
|
+
export { defineComponents } from './components/common/definitions/defineComponents.js';
|
|
42
|
+
export { defineAllComponents } from './components/common/definitions/defineAllComponents.js';
|
|
43
|
+
export { registerIcon, registerIconFromText, } from './components/icon/icon.registry.js';
|
|
44
|
+
export { configureTheme } from './theming/config.js';
|
|
45
|
+
export { DateRangeType, } from './components/calendar/common/calendar.model.js';
|
|
46
|
+
export { SizableMixin } from './components/common/mixins/sizable.js';
|
|
47
|
+
export { IgcCheckboxBaseComponent } from './components/checkbox/checkbox-base.js';
|
|
48
|
+
export { IgcInputBaseComponent } from './components/input/input-base.js';
|
|
49
|
+
export { IgcSliderBaseComponent } from './components/slider/slider-base.js';
|
|
50
|
+
export { IgcButtonBaseComponent } from './components/button/button-base.js';
|
|
51
|
+
export { IgcCalendarBaseComponent } from './components/calendar/common/calendar-base.js';
|
|
52
52
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,E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AAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAC","sourcesContent":["// Components\nexport { default as IgcAvatarComponent } from './components/avatar/avatar.js';\nexport { default as IgcBadgeComponent } from './components/badge/badge.js';\nexport { default as IgcButtonComponent } from './components/button/button.js';\nexport { default as IgcCalendarComponent } from './components/calendar/calendar.js';\nexport { default as IgcCardComponent } from './components/card/card.js';\nexport { default as IgcCardActionsComponent } from './components/card/card.actions.js';\nexport { default as IgcCardContentComponent } from './components/card/card.content.js';\nexport { default as IgcCardHeaderComponent } from './components/card/card.header.js';\nexport { default as IgcCardMediaComponent } from './components/card/card.media.js';\nexport { default as IgcCheckboxComponent } from './components/checkbox/checkbox.js';\nexport { default as IgcCircularProgressComponent } from './components/progress/circular-progress.js';\nexport { default as IgcCircularGradientComponent } from './components/progress/circular-gradient.js';\nexport { default as IgcChipComponent } from './components/chip/chip.js';\nexport { default as IgcDropdownComponent } from './components/dropdown/dropdown.js';\nexport { default as IgcDropdownGroupComponent } from './components/dropdown/dropdown-group.js';\nexport { default as IgcDropdownHeaderComponent } from './components/dropdown/dropdown-header.js';\nexport { default as IgcDropdownItemComponent } from './components/dropdown/dropdown-item.js';\nexport { default as IgcIconComponent } from './components/icon/icon.js';\nexport { default as IgcIconButtonComponent } from './components/button/icon-button.js';\nexport { default as IgcInputComponent } from './components/input/input.js';\nexport { default as IgcFormComponent } from './components/form/form.js';\nexport { default as IgcLinearProgressComponent } from './components/progress/linear-progress.js';\nexport { default as IgcListComponent } from './components/list/list.js';\nexport { default as IgcListHeaderComponent } from './components/list/list-header.js';\nexport { default as IgcListItemComponent } from './components/list/list-item.js';\nexport { default as IgcNavDrawerComponent } from './components/nav-drawer/nav-drawer.js';\nexport { default as IgcNavDrawerHeaderItemComponent } from './components/nav-drawer/nav-drawer-header-item.js';\nexport { default as IgcNavDrawerItemComponent } from './components/nav-drawer/nav-drawer-item.js';\nexport { default as IgcNavbarComponent } from './components/navbar/navbar.js';\nexport { default as IgcRadioGroupComponent } from './components/radio-group/radio-group.js';\nexport { default as IgcRadioComponent } from './components/radio/radio.js';\nexport { default as IgcRatingComponent } from './components/rating/rating.js';\nexport { default as IgcRatingSymbolComponent } from './components/rating/rating-symbol.js';\nexport { default as IgcRippleComponent } from './components/ripple/ripple.js';\nexport { default as IgcRangeSliderComponent } from './components/slider/range-slider.js';\nexport { default as IgcSnackbarComponent } from './components/snackbar/snackbar.js';\nexport { default as IgcSliderComponent } from './components/slider/slider.js';\nexport { default as IgcSliderLabelComponent } from './components/slider/slider-label.js';\nexport { default as IgcToastComponent } from './components/toast/toast.js';\nexport { default as IgcSwitchComponent } from './components/checkbox/switch.js';\n\n// definitions\nexport { defineComponents } from './components/common/definitions/defineComponents.js';\nexport { defineAllComponents } from './components/common/definitions/defineAllComponents.js';\n\n// icon registration\nexport {\n registerIcon,\n registerIconFromText,\n} from './components/icon/icon.registry.js';\n\n// theming configuration\nexport { configureTheme } from './theming/config.js';\n\n// localization objects\nexport { IgcCalendarResourceStrings } from './components/common/i18n/calendar.resources.js';\n\n// Types\nexport {\n DateRangeDescriptor,\n DateRangeType,\n} from './components/calendar/common/calendar.model.js';\nexport { IgcRangeSliderValue } from './components/slider/range-slider.js';\n\n// Base classes\n// TODO(rkaraivanov): Revise these exports\nexport { SizableMixin } from './components/common/mixins/sizable.js';\nexport { IgcCheckboxBaseComponent } from './components/checkbox/checkbox-base.js';\nexport { IgcInputBaseComponent } from './components/input/input-base.js';\nexport { IgcSliderBaseComponent } from './components/slider/slider-base.js';\nexport { IgcButtonBaseComponent } from './components/button/button-base.js';\nexport { IgcCalendarBaseComponent } from './components/calendar/common/calendar-base.js';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "igniteui-webcomponents",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.",
|
|
5
5
|
"author": "Infragistics",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
package/theming/config.d.ts
CHANGED
package/theming/config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CHANGE_THEME_EVENT } from './theming-event';
|
|
2
|
-
import { getAllCSSVariables } from './utils';
|
|
1
|
+
import { CHANGE_THEME_EVENT } from './theming-event.js';
|
|
2
|
+
import { getAllCSSVariables } from './utils.js';
|
|
3
3
|
let theme;
|
|
4
4
|
function dispatchThemingEvent(detail) {
|
|
5
5
|
window.dispatchEvent(new CustomEvent(CHANGE_THEME_EVENT, { detail }));
|
package/theming/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/theming/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/theming/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEhF,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,IAAI,KAAY,CAAC;AAKjB,SAAS,oBAAoB,CAAC,MAA8B;IAC1D,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,kBAAkB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AACxE,CAAC;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,CAAC,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAgB,GAAG,EAAE;IACxC,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GACV,MAAM,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,UAAU,CAAC;YACpE,EAAE,CAAC;QAEL,KAAK,GAAG,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAAW,CAAC,CAAC,CAAC,WAAW,CAAC;KAC5D;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAY,EAAE,EAAE;IACvC,KAAK,GAAG,KAAK,CAAC;AAChB,CAAC,CAAC;AAYF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAQ,EAAE,EAAE;IACzC,IAAI,aAAa,CAAC,CAAC,CAAC,EAAE;QACpB,QAAQ,CAAC,CAAC,CAAC,CAAC;KACb;IAED,oBAAoB,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAClC,CAAC,CAAC","sourcesContent":["import { ChangeThemeEventDetail, CHANGE_THEME_EVENT } from './theming-event.js';\nimport type { Theme } from './types';\nimport { getAllCSSVariables } from './utils.js';\n\nlet theme: Theme;\n\n/**\n * Dispatch an \"igc-change-theme\" event to `window` with the given detail.\n */\nfunction dispatchThemingEvent(detail: ChangeThemeEventDetail) {\n window.dispatchEvent(new CustomEvent(CHANGE_THEME_EVENT, { detail }));\n}\n\nfunction isOfTypeTheme(theme: string): theme is Theme {\n return ['bootstrap', 'material', 'indigo', 'fluent'].includes(theme);\n}\n\nexport const getTheme: () => Theme = () => {\n if (!theme) {\n const [_, t] =\n Object.entries(getAllCSSVariables()).find(([v]) => v === 'igcTheme') ||\n [];\n\n theme = t && isOfTypeTheme(t) ? (t as Theme) : 'bootstrap';\n }\n\n return theme;\n};\n\nexport const setTheme = (value: Theme) => {\n theme = value;\n};\n\n/**\n * Allows the global configuration of the active theme.\n *\n * Usage:\n * ```ts\n * import { configureTheme } from 'igniteui-webcomponents';\n *\n * configureTheme({ theme: 'material' });\n * ```\n */\nexport const configureTheme = (t: Theme) => {\n if (isOfTypeTheme(t)) {\n setTheme(t);\n }\n\n dispatchThemingEvent({ theme });\n};\n"]}
|
package/theming/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './config';
|
|
2
|
-
export * from './theming-
|
|
3
|
-
export * from './theming-decorator';
|
|
1
|
+
export * from './config.js';
|
|
2
|
+
export * from './theming-controller.js';
|
|
3
|
+
export * from './theming-decorator.js';
|
|
4
4
|
export * from './types';
|
package/theming/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './config';
|
|
2
|
-
export * from './theming-
|
|
3
|
-
export * from './theming-decorator';
|
|
1
|
+
export * from './config.js';
|
|
2
|
+
export * from './theming-controller.js';
|
|
3
|
+
export * from './theming-decorator.js';
|
|
4
4
|
export * from './types';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/theming/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/theming/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/theming/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,SAAS,CAAC","sourcesContent":["export * from './config.js';\nexport * from './theming-controller.js';\nexport * from './theming-decorator.js';\nexport * from './types';\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactiveController, ReactiveControllerHost, ReactiveElement } from 'lit';
|
|
2
|
-
import { Theme, ThemeController, Themes } from './types';
|
|
2
|
+
import type { Theme, ThemeController, Themes } from './types';
|
|
3
3
|
declare class ThemingController implements ReactiveController, ThemeController {
|
|
4
4
|
private themes;
|
|
5
5
|
private host;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { adoptStyles, css, } from 'lit';
|
|
2
|
-
import { getTheme } from './config';
|
|
3
|
-
import { CHANGE_THEME_EVENT } from './theming-event';
|
|
2
|
+
import { getTheme } from './config.js';
|
|
3
|
+
import { CHANGE_THEME_EVENT } from './theming-event.js';
|
|
4
4
|
class ThemingController {
|
|
5
5
|
constructor(host, themes) {
|
|
6
6
|
this.__themingEventHandler = () => {
|
|
@@ -46,4 +46,4 @@ const _updateWhenThemeChanges = (host, themes) => {
|
|
|
46
46
|
return controller;
|
|
47
47
|
};
|
|
48
48
|
export const updateWhenThemeChanges = _updateWhenThemeChanges;
|
|
49
|
-
//# sourceMappingURL=theming-
|
|
49
|
+
//# sourceMappingURL=theming-controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theming-controller.js","sourceRoot":"","sources":["../../src/theming/theming-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,GAAG,GAKJ,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxD,MAAM,iBAAiB;IAKrB,YAAY,IAA8C,EAAE,MAAc;QAKzD,0BAAqB,GAAG,GAAG,EAAE;YAC5C,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;QAC5B,CAAC,CAAC;QAPA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAOM,aAAa;QAClB,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,MAAM,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IAC1E,CAAC;IAEM,gBAAgB;QACrB,MAAM,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IA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AC,MAAM,sBAAsB,GAE/B,uBAAuB,CAAC","sourcesContent":["import {\n adoptStyles,\n css,\n LitElement,\n ReactiveController,\n ReactiveControllerHost,\n ReactiveElement,\n} from 'lit';\nimport { getTheme } from './config.js';\nimport { CHANGE_THEME_EVENT } from './theming-event.js';\nimport type { Theme, ThemeController, Themes } from './types';\n\nclass ThemingController implements ReactiveController, ThemeController {\n private themes: Themes;\n private host: ReactiveControllerHost & ReactiveElement;\n public theme!: Theme;\n\n constructor(host: ReactiveControllerHost & ReactiveElement, themes: Themes) {\n this.host = host;\n this.themes = themes;\n }\n\n private readonly __themingEventHandler = () => {\n this.adoptStyles();\n this.host.requestUpdate();\n };\n\n public hostConnected() {\n this.adoptStyles();\n window.addEventListener(CHANGE_THEME_EVENT, this.__themingEventHandler);\n }\n\n public hostDisconnected() {\n window.removeEventListener(CHANGE_THEME_EVENT, this.__themingEventHandler);\n }\n\n protected adoptStyles() {\n this.theme = getTheme();\n const ctor = this.host.constructor as typeof LitElement;\n const supportsAdoptingStyleSheets =\n window.ShadowRoot &&\n 'adoptedStyleSheets' in Document.prototype &&\n 'replace' in CSSStyleSheet.prototype;\n\n let styleSheet = css``;\n\n const [theme] = Object.entries(this.themes).filter(\n ([name]) => name === this.theme\n );\n\n if (theme) {\n const [_, cssResult] = theme;\n styleSheet = cssResult;\n }\n\n // Firefox and Safari don't support the adoptedStyleSheets API yet,\n // and the lit framework appends the resolved stylesheets indiscriminately\n // when using the adoptStyles API below. Hence, we need to remove all previously\n // defined style tags in the shadow root as changing the themes at runtime just\n // keeps stacking the resolved styles one over the other, resulting in broken themes.\n if (!supportsAdoptingStyleSheets) {\n [...this.host!.renderRoot.querySelectorAll('style')]\n .slice(1)\n .forEach((tag) => tag.remove());\n }\n\n adoptStyles(this.host.shadowRoot as ShadowRoot, [\n ...ctor.elementStyles,\n styleSheet,\n ]);\n }\n}\n\nconst _updateWhenThemeChanges = (\n host: ReactiveControllerHost & ReactiveElement,\n themes: Themes\n) => {\n const controller = new ThemingController(host, themes);\n host.addController(controller);\n return controller;\n};\n\nexport const updateWhenThemeChanges: typeof _updateWhenThemeChanges & {\n _THEMING_CONTROLLER_FN_?: never;\n} = _updateWhenThemeChanges;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theming-decorator.js","sourceRoot":"","sources":["../../src/theming/theming-decorator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"theming-decorator.js","sourceRoot":"","sources":["../../src/theming/theming-decorator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAyBjE,MAAM,UAAU,MAAM,CAAC,MAAc;IACnC,OAAO,CAAC,KAAU,EAAE,EAAE;QACpB,KAAK,CAAC,cAAc,CAAC,CAAC,QAAyC,EAAE,EAAE;YACjE,MAAM,UAAU,GAAG,sBAAsB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAE5D,IAAI,cAAc,IAAI,QAAQ,EAAE;gBAC9B,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;aACnC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import { ReactiveElement } from 'lit';\nimport { updateWhenThemeChanges } from './theming-controller.js';\nimport { ReactiveTheme, Themes } from './types';\n\n/**\n * Class decorator to enable multiple theme support for a component.\n * The component will re-render on theme changes.\n *\n * See also {@link updateWhenThemeChanges} for the same functionallity\n * without the use of this decorator.\n *\n * Usage:\n * ```ts\n * import { LitElement, html } from 'lit';\n * import { themes } from 'igniteui-webcomponents/themes';\n * import { styles } from './themes/my-element.base.css';\n * import { styles as material } from './themes/my-element.material.css';\n * import { styles as bootstrap } from './themes/my-element.bootstrap.css';\n * import { styles as indigo } from './themes/my-element.indigo.css';\n *\n * @themes({ material, bootstrap, indigo })\n * class MyElement extends LitElement {\n * public static styles = styles;\n * }\n * ```\n */\nexport function themes(themes: Themes) {\n return (clazz: any) => {\n clazz.addInitializer((instance: ReactiveElement & ReactiveTheme) => {\n const controller = updateWhenThemeChanges(instance, themes);\n\n if ('themeAdopted' in instance) {\n instance.themeAdopted(controller);\n }\n });\n return clazz;\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theming-event.js","sourceRoot":"","sources":["../../src/theming/theming-event.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC","sourcesContent":["import { Theme } from './types';\n\nexport const CHANGE_THEME_EVENT = 'igc-change-theme';\n\n// Misfiring eslint rule\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ndeclare global {\n interface WindowEventMap {\n [CHANGE_THEME_EVENT]: CustomEvent<ChangeThemeEventDetail>;\n }\n}\n\n/**\n * The possible details of the \"igc-change-theme\" event.\n */\nexport type ChangeThemeEventDetail = {\n theme: Theme;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"theming-event.js","sourceRoot":"","sources":["../../src/theming/theming-event.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC","sourcesContent":["import type { Theme } from './types';\n\nexport const CHANGE_THEME_EVENT = 'igc-change-theme';\n\n// Misfiring eslint rule\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ndeclare global {\n interface WindowEventMap {\n [CHANGE_THEME_EVENT]: CustomEvent<ChangeThemeEventDetail>;\n }\n}\n\n/**\n * The possible details of the \"igc-change-theme\" event.\n */\nexport type ChangeThemeEventDetail = {\n theme: Theme;\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["../../../src/components/toggle/utilities.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Common events interface for toggle components\n */\nexport interface IgcToggleEventMap {\n igcOpening: CustomEvent<void>;\n igcOpened: CustomEvent<void>;\n igcClosing: CustomEvent<void>;\n igcClosed: CustomEvent<void>;\n}\n/**\n * Interface describing the options for toggle components' configuration.\n */\nexport interface IgcToggleOptions {\n /**\n * Whether the toggle is open.\n */\n open: boolean;\n /**\n * The preferred placement of the toggle element around the target element. */\n placement?: IgcPlacement;\n /**\n * The positioning strategy to use.\n * Use the `fixed` strategy when the target element is in a fixed container, otherwise - use `absolute`.\n */\n positionStrategy?: 'absolute' | 'fixed';\n /**\n * Whether the element should be flipped to the opposite side once it's about to overflow the visible area.\n * Once enough space is detected on its preferred side, it will flip back.\n */\n flip?: boolean;\n /**\n * Whether to prevent the element from being cut off by moving it so it stays visible within its boundary area.\n */\n distance?: number;\n /**\n * Whether to make the toggle the same width as the target.\n */\n sameWidth?: boolean;\n}\n\nexport interface IgcToggleComponent extends IgcToggleOptions {\n scrollStrategy?: 'scroll' | 'block' | 'close';\n keepOpenOnOutsideClick?: boolean;\n\n hide(): void;\n show(): void;\n toggle(): void;\n}\n\n/**\n * Describes the preferred placement of a toggle component.\n */\nexport type IgcPlacement =\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end';\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theming-controlller.js","sourceRoot":"","sources":["../../src/theming/theming-controlller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,GAAG,GAKJ,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAGrD,MAAM,iBAAiB;IAKrB,YAAY,IAA8C,EAAE,MAAc;QAKzD,0BAAqB,GAAG,GAAG,EAAE;YAC5C,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;QA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CAAC,IAAI,CAAC,UAAwB,EAAE;YAC9C,GAAG,IAAI,CAAC,aAAa;YACrB,UAAU;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,uBAAuB,GAAG,CAC9B,IAA8C,EAC9C,MAAc,EACd,EAAE;IACF,MAAM,UAAU,GAAG,IAAI,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACvD,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAC/B,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAE/B,uBAAuB,CAAC","sourcesContent":["import {\n adoptStyles,\n css,\n LitElement,\n ReactiveController,\n ReactiveControllerHost,\n ReactiveElement,\n} from 'lit';\nimport { getTheme } from './config';\nimport { CHANGE_THEME_EVENT } from './theming-event';\nimport { Theme, ThemeController, Themes } from './types';\n\nclass ThemingController implements ReactiveController, ThemeController {\n private themes: Themes;\n private host: ReactiveControllerHost & ReactiveElement;\n public theme!: Theme;\n\n constructor(host: ReactiveControllerHost & ReactiveElement, themes: Themes) {\n this.host = host;\n this.themes = themes;\n }\n\n private readonly __themingEventHandler = () => {\n this.adoptStyles();\n this.host.requestUpdate();\n };\n\n public hostConnected() {\n this.adoptStyles();\n window.addEventListener(CHANGE_THEME_EVENT, this.__themingEventHandler);\n }\n\n public hostDisconnected() {\n window.removeEventListener(CHANGE_THEME_EVENT, this.__themingEventHandler);\n }\n\n protected adoptStyles() {\n this.theme = getTheme();\n const ctor = this.host.constructor as typeof LitElement;\n const supportsAdoptingStyleSheets =\n window.ShadowRoot &&\n 'adoptedStyleSheets' in Document.prototype &&\n 'replace' in CSSStyleSheet.prototype;\n\n let styleSheet = css``;\n\n const [theme] = Object.entries(this.themes).filter(\n ([name]) => name === this.theme\n );\n\n if (theme) {\n const [_, cssResult] = theme;\n styleSheet = cssResult;\n }\n\n // Firefox and Safari don't support the adoptedStyleSheets API yet,\n // and the lit framework appends the resolved stylesheets indiscriminately\n // when using the adoptStyles API below. Hence, we need to remove all previously\n // defined style tags in the shadow root as changing the themes at runtime just\n // keeps stacking the resolved styles one over the other, resulting in broken themes.\n if (!supportsAdoptingStyleSheets) {\n [...this.host!.renderRoot.querySelectorAll('style')]\n .slice(1)\n .forEach((tag) => tag.remove());\n }\n\n adoptStyles(this.host.shadowRoot as ShadowRoot, [\n ...ctor.elementStyles,\n styleSheet,\n ]);\n }\n}\n\nconst _updateWhenThemeChanges = (\n host: ReactiveControllerHost & ReactiveElement,\n themes: Themes\n) => {\n const controller = new ThemingController(host, themes);\n host.addController(controller);\n return controller;\n};\n\nexport const updateWhenThemeChanges: typeof _updateWhenThemeChanges & {\n _THEMING_CONTROLLER_FN_?: never;\n} = _updateWhenThemeChanges;\n"]}
|