igniteui-webcomponents 4.3.0-alpha.0 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/CHANGELOG.md +38 -6
  2. package/animations/player.js +10 -6
  3. package/animations/player.js.map +1 -1
  4. package/animations/presets/fade/index.d.ts +3 -0
  5. package/animations/presets/fade/index.js +12 -0
  6. package/animations/presets/fade/index.js.map +1 -0
  7. package/animations/presets/index.d.ts +1 -0
  8. package/animations/presets/index.js +1 -0
  9. package/animations/presets/index.js.map +1 -1
  10. package/components/avatar/themes/dark/avatar.base.bootstrap.css.js +5 -3
  11. package/components/avatar/themes/dark/avatar.base.bootstrap.css.js.map +1 -1
  12. package/components/avatar/themes/light/avatar.base.css.js +5 -3
  13. package/components/avatar/themes/light/avatar.base.css.js.map +1 -1
  14. package/components/avatar/themes/light/avatar.bootstrap.css.js +5 -3
  15. package/components/avatar/themes/light/avatar.bootstrap.css.js.map +1 -1
  16. package/components/button/themes/button/dark/button.bootstrap.css.js +5 -3
  17. package/components/button/themes/button/dark/button.bootstrap.css.js.map +1 -1
  18. package/components/button/themes/button/dark/button.fluent.css.js +5 -3
  19. package/components/button/themes/button/dark/button.fluent.css.js.map +1 -1
  20. package/components/button/themes/button/dark/button.indigo.css.js +5 -3
  21. package/components/button/themes/button/dark/button.indigo.css.js.map +1 -1
  22. package/components/button/themes/button/dark/button.material.css.js +5 -3
  23. package/components/button/themes/button/dark/button.material.css.js.map +1 -1
  24. package/components/button/themes/button/light/button.bootstrap.css.js +5 -3
  25. package/components/button/themes/button/light/button.bootstrap.css.js.map +1 -1
  26. package/components/button/themes/button/light/button.fluent.css.js +5 -3
  27. package/components/button/themes/button/light/button.fluent.css.js.map +1 -1
  28. package/components/button/themes/button/light/button.indigo.css.js +5 -3
  29. package/components/button/themes/button/light/button.indigo.css.js.map +1 -1
  30. package/components/button/themes/button/light/button.material.css.js +5 -3
  31. package/components/button/themes/button/light/button.material.css.js.map +1 -1
  32. package/components/checkbox/themes/dark/checkbox.bootstrap.css.js +5 -3
  33. package/components/checkbox/themes/dark/checkbox.bootstrap.css.js.map +1 -1
  34. package/components/checkbox/themes/dark/checkbox.fluent.css.js +5 -3
  35. package/components/checkbox/themes/dark/checkbox.fluent.css.js.map +1 -1
  36. package/components/checkbox/themes/dark/checkbox.indigo.css.js +5 -3
  37. package/components/checkbox/themes/dark/checkbox.indigo.css.js.map +1 -1
  38. package/components/checkbox/themes/dark/checkbox.material.css.js +5 -3
  39. package/components/checkbox/themes/dark/checkbox.material.css.js.map +1 -1
  40. package/components/checkbox/themes/dark/switch.bootstrap.css.js +5 -3
  41. package/components/checkbox/themes/dark/switch.bootstrap.css.js.map +1 -1
  42. package/components/checkbox/themes/dark/switch.fluent.css.js +5 -3
  43. package/components/checkbox/themes/dark/switch.fluent.css.js.map +1 -1
  44. package/components/checkbox/themes/dark/switch.indigo.css.js +5 -3
  45. package/components/checkbox/themes/dark/switch.indigo.css.js.map +1 -1
  46. package/components/checkbox/themes/dark/switch.material.css.js +5 -3
  47. package/components/checkbox/themes/dark/switch.material.css.js.map +1 -1
  48. package/components/checkbox/themes/light/checkbox.base.css.js +5 -3
  49. package/components/checkbox/themes/light/checkbox.base.css.js.map +1 -1
  50. package/components/checkbox/themes/light/checkbox.bootstrap.css.js +5 -3
  51. package/components/checkbox/themes/light/checkbox.bootstrap.css.js.map +1 -1
  52. package/components/checkbox/themes/light/checkbox.fluent.css.js +5 -3
  53. package/components/checkbox/themes/light/checkbox.fluent.css.js.map +1 -1
  54. package/components/checkbox/themes/light/checkbox.indigo.css.js +5 -3
  55. package/components/checkbox/themes/light/checkbox.indigo.css.js.map +1 -1
  56. package/components/checkbox/themes/light/checkbox.material.css.js +5 -3
  57. package/components/checkbox/themes/light/checkbox.material.css.js.map +1 -1
  58. package/components/checkbox/themes/light/switch.base.css.js +5 -3
  59. package/components/checkbox/themes/light/switch.base.css.js.map +1 -1
  60. package/components/checkbox/themes/light/switch.bootstrap.css.js +5 -3
  61. package/components/checkbox/themes/light/switch.bootstrap.css.js.map +1 -1
  62. package/components/checkbox/themes/light/switch.fluent.css.js +5 -3
  63. package/components/checkbox/themes/light/switch.fluent.css.js.map +1 -1
  64. package/components/checkbox/themes/light/switch.indigo.css.js +5 -3
  65. package/components/checkbox/themes/light/switch.indigo.css.js.map +1 -1
  66. package/components/checkbox/themes/light/switch.material.css.js +5 -3
  67. package/components/checkbox/themes/light/switch.material.css.js.map +1 -1
  68. package/components/combo/combo.d.ts +8 -8
  69. package/components/combo/combo.js +6 -2
  70. package/components/combo/combo.js.map +1 -1
  71. package/components/combo/controllers/selection.d.ts +2 -3
  72. package/components/combo/controllers/selection.js +6 -30
  73. package/components/combo/controllers/selection.js.map +1 -1
  74. package/components/combo/types.d.ts +6 -3
  75. package/components/combo/types.js.map +1 -1
  76. package/components/date-time-input/date-util.js +3 -3
  77. package/components/date-time-input/date-util.js.map +1 -1
  78. package/components/dialog/dialog.d.ts +8 -1
  79. package/components/dialog/dialog.js +34 -7
  80. package/components/dialog/dialog.js.map +1 -1
  81. package/components/dialog/themes/light/dialog.base.css.js +18 -1
  82. package/components/dialog/themes/light/dialog.base.css.js.map +1 -1
  83. package/components/dropdown/dropdown.d.ts +1 -1
  84. package/components/dropdown/dropdown.js.map +1 -1
  85. package/components/expansion-panel/expansion-panel.d.ts +1 -1
  86. package/components/expansion-panel/expansion-panel.js.map +1 -1
  87. package/components/icon/dark/icon.bootstrap.css.js +5 -3
  88. package/components/icon/dark/icon.bootstrap.css.js.map +1 -1
  89. package/components/icon/dark/icon.fluent.css.js +5 -3
  90. package/components/icon/dark/icon.fluent.css.js.map +1 -1
  91. package/components/icon/dark/icon.indigo.css.js +5 -3
  92. package/components/icon/dark/icon.indigo.css.js.map +1 -1
  93. package/components/icon/dark/icon.material.css.js +5 -3
  94. package/components/icon/dark/icon.material.css.js.map +1 -1
  95. package/components/icon/light/icon.bootstrap.css.js +7 -5
  96. package/components/icon/light/icon.bootstrap.css.js.map +1 -1
  97. package/components/icon/light/icon.fluent.css.js +7 -5
  98. package/components/icon/light/icon.fluent.css.js.map +1 -1
  99. package/components/icon/light/icon.indigo.css.js +6 -4
  100. package/components/icon/light/icon.indigo.css.js.map +1 -1
  101. package/components/icon/light/icon.material.css.js +7 -5
  102. package/components/icon/light/icon.material.css.js.map +1 -1
  103. package/components/navbar/themes/dark/navbar.bootstrap.css.js +5 -3
  104. package/components/navbar/themes/dark/navbar.bootstrap.css.js.map +1 -1
  105. package/components/navbar/themes/dark/navbar.fluent.css.js +5 -3
  106. package/components/navbar/themes/dark/navbar.fluent.css.js.map +1 -1
  107. package/components/navbar/themes/dark/navbar.indigo.css.js +5 -3
  108. package/components/navbar/themes/dark/navbar.indigo.css.js.map +1 -1
  109. package/components/navbar/themes/dark/navbar.material.css.js +5 -3
  110. package/components/navbar/themes/dark/navbar.material.css.js.map +1 -1
  111. package/components/navbar/themes/light/navbar.bootstrap.css.js +5 -3
  112. package/components/navbar/themes/light/navbar.bootstrap.css.js.map +1 -1
  113. package/components/navbar/themes/light/navbar.fluent.css.js +5 -3
  114. package/components/navbar/themes/light/navbar.fluent.css.js.map +1 -1
  115. package/components/navbar/themes/light/navbar.indigo.css.js +5 -3
  116. package/components/navbar/themes/light/navbar.indigo.css.js.map +1 -1
  117. package/components/navbar/themes/light/navbar.material.css.js +5 -3
  118. package/components/navbar/themes/light/navbar.material.css.js.map +1 -1
  119. package/components/radio/themes/dark/radio.bootstrap.css.js +5 -3
  120. package/components/radio/themes/dark/radio.bootstrap.css.js.map +1 -1
  121. package/components/radio/themes/dark/radio.fluent.css.js +5 -3
  122. package/components/radio/themes/dark/radio.fluent.css.js.map +1 -1
  123. package/components/radio/themes/dark/radio.indigo.css.js +5 -3
  124. package/components/radio/themes/dark/radio.indigo.css.js.map +1 -1
  125. package/components/radio/themes/dark/radio.material.css.js +5 -3
  126. package/components/radio/themes/dark/radio.material.css.js.map +1 -1
  127. package/components/radio/themes/light/radio.base.css.js +5 -3
  128. package/components/radio/themes/light/radio.base.css.js.map +1 -1
  129. package/components/radio/themes/light/radio.bootstrap.css.js +5 -3
  130. package/components/radio/themes/light/radio.bootstrap.css.js.map +1 -1
  131. package/components/radio/themes/light/radio.fluent.css.js +5 -3
  132. package/components/radio/themes/light/radio.fluent.css.js.map +1 -1
  133. package/components/radio/themes/light/radio.indigo.css.js +5 -3
  134. package/components/radio/themes/light/radio.indigo.css.js.map +1 -1
  135. package/components/radio/themes/light/radio.material.css.js +5 -3
  136. package/components/radio/themes/light/radio.material.css.js.map +1 -1
  137. package/components/select/select.d.ts +16 -1
  138. package/components/select/select.js +6 -0
  139. package/components/select/select.js.map +1 -1
  140. package/components/snackbar/snackbar.d.ts +5 -1
  141. package/components/snackbar/snackbar.js +19 -2
  142. package/components/snackbar/snackbar.js.map +1 -1
  143. package/components/stepper/step.d.ts +1 -0
  144. package/components/stepper/step.js.map +1 -1
  145. package/components/toast/toast.d.ts +4 -1
  146. package/components/toast/toast.js +17 -2
  147. package/components/toast/toast.js.map +1 -1
  148. package/components/toggle/toggle.directive.d.ts +9 -3
  149. package/components/toggle/toggle.directive.js +54 -38
  150. package/components/toggle/toggle.directive.js.map +1 -1
  151. package/custom-elements.json +2 -53
  152. package/package.json +6 -4
  153. package/themes/dark/bootstrap.css +7 -5
  154. package/themes/dark/fluent.css +6 -4
  155. package/themes/dark/indigo.css +6 -4
  156. package/themes/dark/material.css +7 -5
  157. package/vscode-html-custom-data.json +7 -7
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { html, LitElement, nothing } from 'lit';
8
- import { property } from 'lit/decorators.js';
8
+ import { property, query } from 'lit/decorators.js';
9
9
  import { ifDefined } from 'lit/directives/if-defined.js';
10
10
  import { themes } from '../../theming/theming-decorator.js';
11
11
  import { EventEmitterMixin } from '../common/mixins/event-emitter.js';
@@ -15,6 +15,7 @@ import { styles as fluent } from './themes/light/snackbar.fluent.css.js';
15
15
  import { styles as indigo } from './themes/light/snackbar.indigo.css.js';
16
16
  import { defineComponents } from '../common/definitions/defineComponents.js';
17
17
  import IgcButtonComponent from '../button/button.js';
18
+ import { AnimationPlayer, fadeIn, fadeOut } from '../../animations/index.js';
18
19
  defineComponents(IgcButtonComponent);
19
20
  let IgcSnackbarComponent = class IgcSnackbarComponent extends EventEmitterMixin(LitElement) {
20
21
  constructor() {
@@ -23,20 +24,33 @@ let IgcSnackbarComponent = class IgcSnackbarComponent extends EventEmitterMixin(
23
24
  this.displayTime = 4000;
24
25
  this.keepOpen = false;
25
26
  }
27
+ firstUpdated() {
28
+ this.animationPlayer = new AnimationPlayer(this.content);
29
+ }
30
+ async toggleAnimation(dir) {
31
+ const animation = dir === 'open' ? fadeIn : fadeOut;
32
+ const [_, event] = await Promise.all([
33
+ this.animationPlayer.stopAll(),
34
+ this.animationPlayer.play(animation),
35
+ ]);
36
+ return event.type === 'finish';
37
+ }
26
38
  show() {
27
39
  if (this.open) {
28
40
  return;
29
41
  }
42
+ this.toggleAnimation('open');
30
43
  this.open = true;
31
44
  clearTimeout(this.autoHideTimeout);
32
45
  if (this.open && !this.keepOpen) {
33
46
  this.autoHideTimeout = window.setTimeout(() => this.hide(), this.displayTime);
34
47
  }
35
48
  }
36
- hide() {
49
+ async hide() {
37
50
  if (!this.open) {
38
51
  return;
39
52
  }
53
+ await this.toggleAnimation('close');
40
54
  this.open = false;
41
55
  clearTimeout(this.autoHideTimeout);
42
56
  }
@@ -70,6 +84,9 @@ let IgcSnackbarComponent = class IgcSnackbarComponent extends EventEmitterMixin(
70
84
  };
71
85
  IgcSnackbarComponent.tagName = 'igc-snackbar';
72
86
  IgcSnackbarComponent.styles = styles;
87
+ __decorate([
88
+ query('[part~="base"]', true)
89
+ ], IgcSnackbarComponent.prototype, "content", void 0);
73
90
  __decorate([
74
91
  property({ type: Boolean, reflect: true })
75
92
  ], IgcSnackbarComponent.protot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BAAoB,CAiGxC;eAjGoB,oBAAoB","sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { themes } from '../../theming/theming-decorator.js';\n\nimport { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { styles } from './themes/light/snackbar.base.css.js';\nimport { styles as bootstrap } from './themes/light/snackbar.bootstrap.css.js';\nimport { styles as fluent } from './themes/light/snackbar.fluent.css.js';\nimport { styles as indigo } from './themes/light/snackbar.indigo.css.js';\n\nimport { defineComponents } from '../common/definitions/defineComponents.js';\nimport IgcButtonComponent from '../button/button.js';\n\ndefineComponents(IgcButtonComponent);\n\nexport interface IgcSnackbarEventMap {\n igcAction: CustomEvent<void>;\n}\n\n/**\n * A snackbar component is used to provide feedback about an operation\n * by showing a brief message at the bottom of the screen.\n *\n * @element igc-snackbar\n *\n * @slot - Renders the snackbar content.\n *\n * @fires igcAction - Emitted when the snackbar action button is clicked.\n *\n * @csspart base - The base wrapper of the snackbar component.\n * @csspart message - The snackbar message.\n * @csspart action - The snackbar action button.\n */\n@themes({ bootstrap, fluent, indigo })\nexport default class IgcSnackbarComponent extends EventEmitterMixin<\n IgcSnackbarEventMap,\n Constructor<LitElement>\n>(LitElement) {\n /** @private */\n public static tagName = 'igc-snackbar';\n\n /** @private */\n public static styles = styles;\n\n private autoHideTimeout!: number;\n\n /**\n * Determines whether the snackbar is opened.\n * @attr\n */\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n /**\n * Determines the duration in ms in which the snackbar will be visible.\n * @attr display-time\n */\n @property({ type: Number, attribute: 'display-time' })\n public displayTime = 4000;\n\n /**\n * Determines whether the snackbar should close after the displayTime is over.\n * @attr keep-open\n */\n @property({ type: Boolean, attribute: 'keep-open' })\n public keepOpen = false;\n\n /**\n * The snackbar action button.\n * @attr action-text\n */\n @property({ attribute: 'action-text' })\n public actionText!: string;\n\n /** Opens the snackbar. */\n public show() {\n if (this.open) {\n return;\n }\n\n this.open = true;\n\n clearTimeout(this.autoHideTimeout);\n if (this.open && !this.keepOpen) {\n this.autoHideTimeout = window.setTimeout(\n () => this.hide(),\n this.displayTime\n );\n }\n }\n\n /** Closes the snackbar. */\n public hide() {\n if (!this.open) {\n return;\n }\n\n this.open = false;\n clearTimeout(this.autoHideTimeout);\n }\n\n /** Toggles the open state of the component. */\n public toggle() {\n this.open ? this.hide() : this.show();\n }\n\n private handleClick() {\n this.emitEvent('igcAction');\n }\n\n protected override render() {\n return html`\n <div part=\"base\">\n <span part=\"message\">\n <slot></slot>\n </span>\n ${this.actionText\n ? html`\n <igc-button\n variant=\"flat\"\n part=\"action\"\n size=\"small\"\n @click=${this.handleClick}\n >\n ${ifDefined(this.actionText)}\n </igc-button>\n `\n : nothing}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-snackbar': IgcSnackbarComponent;\n }\n}\n"]}
1
+ {"version":3,"file":"snackbar.js","sourceRoot":"","sources":["../../../src/components/snackbar/snackbar.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAG5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAEzE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E,CAAC;wDACZ;AA1CR,oBAAoB;IADxC,MAAM,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;GACjB,oBAAoB,CAsHxC;eAtHoB,oBAAoB","sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { themes } from '../../theming/theming-decorator.js';\n\nimport { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { styles } from './themes/light/snackbar.base.css.js';\nimport { styles as bootstrap } from './themes/light/snackbar.bootstrap.css.js';\nimport { styles as fluent } from './themes/light/snackbar.fluent.css.js';\nimport { styles as indigo } from './themes/light/snackbar.indigo.css.js';\n\nimport { defineComponents } from '../common/definitions/defineComponents.js';\nimport IgcButtonComponent from '../button/button.js';\nimport { AnimationPlayer, fadeIn, fadeOut } from '../../animations/index.js';\n\ndefineComponents(IgcButtonComponent);\n\nexport interface IgcSnackbarEventMap {\n igcAction: CustomEvent<void>;\n}\n\n/**\n * A snackbar component is used to provide feedback about an operation\n * by showing a brief message at the bottom of the screen.\n *\n * @element igc-snackbar\n *\n * @slot - Renders the snackbar content.\n *\n * @fires igcAction - Emitted when the snackbar action button is clicked.\n *\n * @csspart base - The base wrapper of the snackbar component.\n * @csspart message - The snackbar message.\n * @csspart action - The snackbar action button.\n */\n@themes({ bootstrap, fluent, indigo })\nexport default class IgcSnackbarComponent extends EventEmitterMixin<\n IgcSnackbarEventMap,\n Constructor<LitElement>\n>(LitElement) {\n /** @private */\n public static tagName = 'igc-snackbar';\n\n /** @private */\n public static styles = styles;\n\n private autoHideTimeout!: number;\n private animationPlayer!: AnimationPlayer;\n\n @query('[part~=\"base\"]', true)\n protected content!: HTMLElement;\n\n /**\n * Determines whether the snackbar is opened.\n * @attr\n */\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n /**\n * Determines the duration in ms in which the snackbar will be visible.\n * @attr display-time\n */\n @property({ type: Number, attribute: 'display-time' })\n public displayTime = 4000;\n\n /**\n * Determines whether the snackbar should close after the displayTime is over.\n * @attr keep-open\n */\n @property({ type: Boolean, attribute: 'keep-open' })\n public keepOpen = false;\n\n /**\n * The snackbar action button.\n * @attr action-text\n */\n @property({ attribute: 'action-text' })\n public actionText!: string;\n\n protected override firstUpdated() {\n this.animationPlayer = new AnimationPlayer(this.content);\n }\n\n private async toggleAnimation(dir: 'open' | 'close') {\n const animation = dir === 'open' ? fadeIn : fadeOut;\n\n const [_, event] = await Promise.all([\n this.animationPlayer.stopAll(),\n this.animationPlayer.play(animation),\n ]);\n\n return event.type === 'finish';\n }\n\n /** Opens the snackbar. */\n public show() {\n if (this.open) {\n return;\n }\n\n this.toggleAnimation('open');\n this.open = true;\n\n clearTimeout(this.autoHideTimeout);\n if (this.open && !this.keepOpen) {\n this.autoHideTimeout = window.setTimeout(\n () => this.hide(),\n this.displayTime\n );\n }\n }\n\n /** Closes the snackbar. */\n public async hide() {\n if (!this.open) {\n return;\n }\n\n await this.toggleAnimation('close');\n this.open = false;\n clearTimeout(this.autoHideTimeout);\n }\n\n /** Toggles the open state of the component. */\n public toggle() {\n this.open ? this.hide() : this.show();\n }\n\n private handleClick() {\n this.emitEvent('igcAction');\n }\n\n protected override render() {\n return html`\n <div part=\"base\">\n <span part=\"message\">\n <slot></slot>\n </span>\n ${this.actionText\n ? html`\n <igc-button\n variant=\"flat\"\n part=\"action\"\n size=\"small\"\n @click=${this.handleClick}\n >\n ${ifDefined(this.actionText)}\n </igc-button>\n `\n : nothing}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-snackbar': IgcSnackbarComponent;\n }\n}\n"]}
@@ -79,6 +79,7 @@ export default class IgcStepComponent extends LitElement {
79
79
  protected completeChange(): void;
80
80
  private handleClick;
81
81
  private handleKeydown;
82
+ /** @hidden @internal */
82
83
  get isAccessible(): boolean;
83
84
  private get headerContainerParts();
84
85
  private get textParts();
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port { property, query, queryAssignedElements } from 'lit/decorators.js';\nimport { when } from 'lit/directives/when.js';\nimport { watch } from '../common/decorators/watch.js';\nimport { partNameMap } from '../common/util.js';\nimport { themes } from '../../theming/theming-decorator.js';\nimport { styles } from './themes/step/light/step.base.css.js';\nimport { styles as bootstrap } from './themes/step/light/step.bootstrap.css.js';\nimport { styles as indigo } from './themes/step/light/step.indigo.css.js';\nimport { styles as fluent } from './themes/step/light/step.fluent.css.js';\nimport { styles as material } from './themes/step/light/step.material.css.js';\n\n/**\n * The step component is used within the `igc-stepper` element and it holds the content of each step.\n * It also supports custom indicators, title and subtitle.\n *\n * @element igc-step\n *\n * @slot - Renders the content of the step.\n * @slot indicator - Renders the indicator of the step. By default, it displays the step index + 1.\n * @slot title - Renders the title of the step.\n * @slot subtitle - Renders the subtitle of the step.\n *\n * @csspart header-container - Wrapper of the step's `header` and its separators.\n * @csspart disabled - Indicates a disabled state. Applies to `header-container`.\n * @csspart complete-start - Indicates a complete state of the current step. Applies to `header-container`.\n * @csspart complete-end - Indicates a complete state of the previous step. Applies to `header-container`.\n * @csspart optional - Indicates an optional state. Applies to `header-container`.\n * @csspart invalid - Indicates an invalid state. Applies to `header-container`.\n * @csspart top - Indicates that the title should be above the indicator. Applies to `header-container`.\n * @csspart bottom - Indicates that the title should be below the indicator. Applies to `header-container`.\n * @csspart start - Indicates that the title should be before the indicator. Applies to `header-container`.\n * @csspart end - Indicates that the title should be after the indicator. Applies to `header-container`.\n * @csspart header - Wrapper of the step's `indicator` and `text`.\n * @csspart indicator - The indicator of the step.\n * @csspart text - Wrapper of the step's `title` and `subtitle`.\n * @csspart empty - Indicates that no title and subtitle has been provided to the step. Applies to `text`.\n * @csspart title - The title of the step.\n * @csspart subtitle - The subtitle of the step.\n * @csspart body - Wrapper of the step's `content`.\n * @csspart content - The steps `content`.\n */\n@themes({ bootstrap, indigo, fluent, material })\nexport default class IgcStepComponent extends LitElement {\n /** @private */\n public static readonly tagName = 'igc-step';\n /** @private */\n public static override styles = styles;\n\n @queryAssignedElements({ slot: 'title' })\n private _titleChildren!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'subtitle' })\n private _subTitleChildren!: Array<HTMLElement>;\n\n /* blazorSuppress */\n @query('[part~=\"header\"]')\n public header!: HTMLElement;\n\n /* blazorSuppress */\n @query('[part~=\"body\"]')\n public contentBody!: HTMLElement;\n\n /** Gets/sets whether the step is invalid. */\n @property({ reflect: true, type: Boolean })\n public invalid = false;\n\n /** Gets/sets whether the step is activе. */\n @property({ reflect: true, type: Boolean })\n public active = false;\n\n /**\n * Gets/sets whether the step is optional.\n *\n * @remarks\n * Optional steps validity does not affect the default behavior when the stepper is in linear mode i.e.\n * if optional step is invalid the user could still move to the next step.\n */\n @property({ type: Boolean })\n public optional = false;\n\n /** Gets/sets whether the step is interactable. */\n @property({ reflect: true, type: Boolean })\n public disabled = false;\n\n /** Gets/sets whether the step is completed.\n *\n * @remarks\n * When set to `true` the following separator is styled `solid`.\n */\n @property({ reflect: true, type: Boolean })\n public complete = false;\n\n /** @private */\n @property({ attribute: false })\n public previousComplete = false;\n\n /** @private */\n @property({ attribute: false })\n public stepType: 'indicator' | 'title' | 'full' = 'full';\n\n /** @private */\n @property({ attribute: false })\n public titlePosition?: 'bottom' | 'top' | 'end' | 'start';\n\n /** @private */\n @property({ attribute: false })\n public orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /** @private */\n @property({ attribute: false })\n public index = -1;\n\n /** @private */\n @property({ attribute: false })\n public contentTop = false;\n\n /** @private */\n @property({ attribute: false })\n public linearDisabled = false;\n\n /** @private */\n @property({ attribute: false })\n public visited = false;\n\n @watch('active', { waitUntilFirstUpdate: true })\n protected activeChange() {\n if (this.active) {\n this.dispatchEvent(\n new CustomEvent('stepActiveChanged', { bubbles: true, detail: false })\n );\n }\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n @watch('invalid', { waitUntilFirstUpdate: true })\n @watch('optional', { waitUntilFirstUpdate: true })\n protected disabledInvalidOptionalChange() {\n this.dispatchEvent(\n new CustomEvent('stepDisabledInvalidChanged', { bubbles: true })\n );\n }\n\n @watch('complete', { waitUntilFirstUpdate: true })\n protected completeChange() {\n this.dispatchEvent(\n new CustomEvent('stepCompleteChanged', { bubbles: true })\n );\n }\n\n private handleClick(event: MouseEvent): void {\n event.stopPropagation();\n if (this.isAccessible) {\n this.dispatchEvent(\n new CustomEvent('stepActiveChanged', { bubbles: true, detail: true })\n );\n }\n }\n\n private handleKeydown(event: KeyboardEvent): void {\n this.dispatchEvent(\n new CustomEvent('stepHeaderKeydown', {\n bubbles: true,\n detail: { event, focusedStep: this },\n })\n );\n }\n\n public get isAccessible(): boolean {\n return !this.disabled && !this.linearDisabled;\n }\n\n private get headerContainerParts() {\n return {\n 'header-container': true,\n disabled: !this.isAccessible,\n 'complete-start': this.complete,\n 'complete-end': this.previousComplete,\n optional: this.optional,\n invalid:\n this.invalid && this.visited && !this.active && this.isAccessible,\n top: this.titlePosition === 'top',\n bottom:\n this.titlePosition === 'bottom' ||\n (this.orientation === 'horizontal' && !this.titlePosition),\n start: this.titlePosition === 'start',\n end:\n this.titlePosition === 'end' ||\n (this.orientation === 'vertical' && !this.titlePosition),\n };\n }\n\n private get textParts() {\n return {\n text: true,\n empty:\n this.stepType === 'indicator'\n ? true\n : this.stepType === 'full' &&\n !this._titleChildren.length &&\n !this._subTitleChildren.length,\n };\n }\n\n protected renderIndicator() {\n if (this.stepType !== 'title') {\n return html`\n <div part=\"indicator\">\n <slot name=\"indicator\">\n <span>${this.index + 1}</span>\n </slot>\n </div>\n `;\n } else {\n return nothing;\n }\n }\n\n protected renderTitleAndSubtitle() {\n return html`\n <div part=\"${partNameMap(this.textParts)}\">\n <div part=\"title\">\n <slot name=\"title\"></slot>\n </div>\n <div part=\"subtitle\">\n <slot name=\"subtitle\"></slot>\n </div>\n </div>\n `;\n }\n\n protected renderContent() {\n return html`<div\n id=\"igc-step-content-${this.index}\"\n part=\"body\"\n role=\"tabpanel\"\n aria-labelledby=\"igc-step-header-${this.index}\"\n >\n <div part=\"content\">\n <slot></slot>\n </div>\n </div>`;\n }\n\n protected override render() {\n return html`\n ${when(\n this.contentTop && this.orientation === 'horizontal',\n () => this.renderContent(),\n () => nothing\n )}\n <div part=\"${partNameMap(this.headerContainerParts)}\">\n <div\n part=\"header\"\n tabindex=\"${this.active ? '0' : '-1'}\"\n role=\"tab\"\n aria-selected=\"${this.active}\"\n @click=${this.handleClick}\n @keydown=${this.handleKeydown}\n >\n ${this.renderIndicator()} ${this.renderTitleAndSubtitle()}\n </div>\n </div>\n ${when(\n this.orientation === 'vertical' || !this.contentTop,\n () => this.renderContent(),\n () => nothing\n )}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-step': IgcStepComponent;\n }\n}\n"]}
1
+ {"version":3,"file":"step.js","sourceRoot":"","sources":["../../../src/components/stepper/step.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAC9D,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,MAAM,0CAA0C,C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C;oDAO/C;AAKS;IAHT,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IACjD,KAAK,CAAC,SAAS,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IAChD,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;qEAKjD;AAGS;IADT,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;sDAKjD;AAzGkB,gBAAgB;IADpC,MAAM,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;GAC3B,gBAAgB,CAoOpC;eApOoB,gBAAgB","sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { property, query, queryAssignedElements } from 'lit/decorators.js';\nimport { when } from 'lit/directives/when.js';\nimport { watch } from '../common/decorators/watch.js';\nimport { partNameMap } from '../common/util.js';\nimport { themes } from '../../theming/theming-decorator.js';\nimport { styles } from './themes/step/light/step.base.css.js';\nimport { styles as bootstrap } from './themes/step/light/step.bootstrap.css.js';\nimport { styles as indigo } from './themes/step/light/step.indigo.css.js';\nimport { styles as fluent } from './themes/step/light/step.fluent.css.js';\nimport { styles as material } from './themes/step/light/step.material.css.js';\n\n/**\n * The step component is used within the `igc-stepper` element and it holds the content of each step.\n * It also supports custom indicators, title and subtitle.\n *\n * @element igc-step\n *\n * @slot - Renders the content of the step.\n * @slot indicator - Renders the indicator of the step. By default, it displays the step index + 1.\n * @slot title - Renders the title of the step.\n * @slot subtitle - Renders the subtitle of the step.\n *\n * @csspart header-container - Wrapper of the step's `header` and its separators.\n * @csspart disabled - Indicates a disabled state. Applies to `header-container`.\n * @csspart complete-start - Indicates a complete state of the current step. Applies to `header-container`.\n * @csspart complete-end - Indicates a complete state of the previous step. Applies to `header-container`.\n * @csspart optional - Indicates an optional state. Applies to `header-container`.\n * @csspart invalid - Indicates an invalid state. Applies to `header-container`.\n * @csspart top - Indicates that the title should be above the indicator. Applies to `header-container`.\n * @csspart bottom - Indicates that the title should be below the indicator. Applies to `header-container`.\n * @csspart start - Indicates that the title should be before the indicator. Applies to `header-container`.\n * @csspart end - Indicates that the title should be after the indicator. Applies to `header-container`.\n * @csspart header - Wrapper of the step's `indicator` and `text`.\n * @csspart indicator - The indicator of the step.\n * @csspart text - Wrapper of the step's `title` and `subtitle`.\n * @csspart empty - Indicates that no title and subtitle has been provided to the step. Applies to `text`.\n * @csspart title - The title of the step.\n * @csspart subtitle - The subtitle of the step.\n * @csspart body - Wrapper of the step's `content`.\n * @csspart content - The steps `content`.\n */\n@themes({ bootstrap, indigo, fluent, material })\nexport default class IgcStepComponent extends LitElement {\n /** @private */\n public static readonly tagName = 'igc-step';\n /** @private */\n public static override styles = styles;\n\n @queryAssignedElements({ slot: 'title' })\n private _titleChildren!: Array<HTMLElement>;\n\n @queryAssignedElements({ slot: 'subtitle' })\n private _subTitleChildren!: Array<HTMLElement>;\n\n /* blazorSuppress */\n @query('[part~=\"header\"]')\n public header!: HTMLElement;\n\n /* blazorSuppress */\n @query('[part~=\"body\"]')\n public contentBody!: HTMLElement;\n\n /** Gets/sets whether the step is invalid. */\n @property({ reflect: true, type: Boolean })\n public invalid = false;\n\n /** Gets/sets whether the step is activе. */\n @property({ reflect: true, type: Boolean })\n public active = false;\n\n /**\n * Gets/sets whether the step is optional.\n *\n * @remarks\n * Optional steps validity does not affect the default behavior when the stepper is in linear mode i.e.\n * if optional step is invalid the user could still move to the next step.\n */\n @property({ type: Boolean })\n public optional = false;\n\n /** Gets/sets whether the step is interactable. */\n @property({ reflect: true, type: Boolean })\n public disabled = false;\n\n /** Gets/sets whether the step is completed.\n *\n * @remarks\n * When set to `true` the following separator is styled `solid`.\n */\n @property({ reflect: true, type: Boolean })\n public complete = false;\n\n /** @private */\n @property({ attribute: false })\n public previousComplete = false;\n\n /** @private */\n @property({ attribute: false })\n public stepType: 'indicator' | 'title' | 'full' = 'full';\n\n /** @private */\n @property({ attribute: false })\n public titlePosition?: 'bottom' | 'top' | 'end' | 'start';\n\n /** @private */\n @property({ attribute: false })\n public orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /** @private */\n @property({ attribute: false })\n public index = -1;\n\n /** @private */\n @property({ attribute: false })\n public contentTop = false;\n\n /** @private */\n @property({ attribute: false })\n public linearDisabled = false;\n\n /** @private */\n @property({ attribute: false })\n public visited = false;\n\n @watch('active', { waitUntilFirstUpdate: true })\n protected activeChange() {\n if (this.active) {\n this.dispatchEvent(\n new CustomEvent('stepActiveChanged', { bubbles: true, detail: false })\n );\n }\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n @watch('invalid', { waitUntilFirstUpdate: true })\n @watch('optional', { waitUntilFirstUpdate: true })\n protected disabledInvalidOptionalChange() {\n this.dispatchEvent(\n new CustomEvent('stepDisabledInvalidChanged', { bubbles: true })\n );\n }\n\n @watch('complete', { waitUntilFirstUpdate: true })\n protected completeChange() {\n this.dispatchEvent(\n new CustomEvent('stepCompleteChanged', { bubbles: true })\n );\n }\n\n private handleClick(event: MouseEvent): void {\n event.stopPropagation();\n if (this.isAccessible) {\n this.dispatchEvent(\n new CustomEvent('stepActiveChanged', { bubbles: true, detail: true })\n );\n }\n }\n\n private handleKeydown(event: KeyboardEvent): void {\n this.dispatchEvent(\n new CustomEvent('stepHeaderKeydown', {\n bubbles: true,\n detail: { event, focusedStep: this },\n })\n );\n }\n\n /** @hidden @internal */\n public get isAccessible(): boolean {\n return !this.disabled && !this.linearDisabled;\n }\n\n private get headerContainerParts() {\n return {\n 'header-container': true,\n disabled: !this.isAccessible,\n 'complete-start': this.complete,\n 'complete-end': this.previousComplete,\n optional: this.optional,\n invalid:\n this.invalid && this.visited && !this.active && this.isAccessible,\n top: this.titlePosition === 'top',\n bottom:\n this.titlePosition === 'bottom' ||\n (this.orientation === 'horizontal' && !this.titlePosition),\n start: this.titlePosition === 'start',\n end:\n this.titlePosition === 'end' ||\n (this.orientation === 'vertical' && !this.titlePosition),\n };\n }\n\n private get textParts() {\n return {\n text: true,\n empty:\n this.stepType === 'indicator'\n ? true\n : this.stepType === 'full' &&\n !this._titleChildren.length &&\n !this._subTitleChildren.length,\n };\n }\n\n protected renderIndicator() {\n if (this.stepType !== 'title') {\n return html`\n <div part=\"indicator\">\n <slot name=\"indicator\">\n <span>${this.index + 1}</span>\n </slot>\n </div>\n `;\n } else {\n return nothing;\n }\n }\n\n protected renderTitleAndSubtitle() {\n return html`\n <div part=\"${partNameMap(this.textParts)}\">\n <div part=\"title\">\n <slot name=\"title\"></slot>\n </div>\n <div part=\"subtitle\">\n <slot name=\"subtitle\"></slot>\n </div>\n </div>\n `;\n }\n\n protected renderContent() {\n return html`<div\n id=\"igc-step-content-${this.index}\"\n part=\"body\"\n role=\"tabpanel\"\n aria-labelledby=\"igc-step-header-${this.index}\"\n >\n <div part=\"content\">\n <slot></slot>\n </div>\n </div>`;\n }\n\n protected override render() {\n return html`\n ${when(\n this.contentTop && this.orientation === 'horizontal',\n () => this.renderContent(),\n () => nothing\n )}\n <div part=\"${partNameMap(this.headerContainerParts)}\">\n <div\n part=\"header\"\n tabindex=\"${this.active ? '0' : '-1'}\"\n role=\"tab\"\n aria-selected=\"${this.active}\"\n @click=${this.handleClick}\n @keydown=${this.handleKeydown}\n >\n ${this.renderIndicator()} ${this.renderTitleAndSubtitle()}\n </div>\n </div>\n ${when(\n this.orientation === 'vertical' || !this.contentTop,\n () => this.renderContent(),\n () => nothing\n )}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-step': IgcStepComponent;\n }\n}\n"]}
@@ -10,6 +10,7 @@ export default class IgcToastComponent extends LitElement {
10
10
  static readonly tagName = "igc-toast";
11
11
  static styles: import("lit").CSSResult[];
12
12
  private displayTimeout;
13
+ private animationPlayer;
13
14
  /**
14
15
  * Determines whether the toast is opened.
15
16
  * @attr
@@ -25,8 +26,10 @@ export default class IgcToastComponent extends LitElement {
25
26
  * @attr keep-open
26
27
  */
27
28
  keepOpen: boolean;
29
+ protected firstUpdated(): void;
30
+ private toggleAnimation;
28
31
  /** Closes the toast. */
29
- hide(): void;
32
+ hide(): Promise<void>;
30
33
  /** Opens the toast. */
31
34
  show(): void;
32
35
  /** Toggles the open state of the toast. */
@@ -11,6 +11,7 @@ import { styles } from './themes/toast.base.css.js';
11
11
  import { styles as bootstrap } from './themes/toast.bootstrap.css.js';
12
12
  import { styles as fluent } from './themes/toast.fluent.css.js';
13
13
  import { styles as indigo } from './themes/toast.indigo.css.js';
14
+ import { AnimationPlayer, fadeIn, fadeOut } from '../../animations/index.js';
14
15
  let IgcToastComponent = class IgcToastComponent extends LitElement {
15
16
  constructor() {
16
17
  super(...arguments);
@@ -18,18 +19,32 @@ let IgcToastComponent = class IgcToastComponent extends LitElement {
18
19
  this.displayTime = 4000;
19
20
  this.keepOpen = false;
20
21
  }
21
- hide() {
22
+ firstUpdated() {
23
+ this.animationPlayer = new AnimationPlayer(this);
24
+ }
25
+ async toggleAnimation(dir) {
26
+ const animation = dir === 'open' ? fadeIn : fadeOut;
27
+ const [_, event] = await Promise.all([
28
+ this.animationPlayer.stopAll(),
29
+ this.animationPlayer.play(animation),
30
+ ]);
31
+ return event.type === 'finish';
32
+ }
33
+ async hide() {
22
34
  if (this.open) {
35
+ await this.toggleAnimation('close');
23
36
  this.open = false;
24
37
  }
25
38
  }
26
39
  show() {
27
40
  window.clearTimeout(this.displayTimeout);
28
41
  if (!this.open) {
42
+ this.toggleAnimation('open');
29
43
  this.open = true;
30
44
  }
31
45
  if (this.keepOpen === false) {
32
- this.displayTimeout = setTimeout(() => {
46
+ this.displayTimeout = setTimeout(async () => {
47
+ await this.toggleAnimation('close');
33
48
  this.open = false;
34
49
  }, this.displayTime);
35
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"toast.js","sourceRoot":"","sources":["../../../src/components/toast/toast.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KA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AAC,YAAY,CAAC,MAAM,CAAC,EAAE;YAC9B,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;SACpC;QACD,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE;YACnC,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;SAC1C;IACH,CAAC;IAEkB,MAAM;QACvB,OAAO,IAAI,CAAA,eAAe,CAAC;IAC7B,CAAC;;AArEsB,yBAAO,GAAG,WAAW,AAAd,CAAe;AACtB,wBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AASlC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CACvB;AAOb;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;sDAC5C;AAOnB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;mDAC3C;AAzBL,iBAAiB;IADrC,MAAM,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;GACjB,iBAAiB,CAuErC;eAvEoB,iBAAiB","sourcesContent":["import { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { themes } from '../../theming/theming-decorator.js';\nimport { styles } from './themes/toast.base.css.js';\nimport { styles as bootstrap } from './themes/toast.bootstrap.css.js';\nimport { styles as fluent } from './themes/toast.fluent.css.js';\nimport { styles as indigo } from './themes/toast.indigo.css.js';\n\n/**\n * A toast component is used to show a notification\n *\n * @element igc-toast\n *\n * @csspart base - The base wrapper of the toast.\n */\n\n@themes({ bootstrap, fluent, indigo })\nexport default class IgcToastComponent extends LitElement {\n public static readonly tagName = 'igc-toast';\n public static override styles = [styles];\n\n private displayTimeout!: ReturnType<typeof setTimeout>;\n\n /**\n * Determines whether the toast is opened.\n * @attr\n */\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n /**\n * Determines the time after which the toast will close\n * @attr display-time\n */\n @property({ type: Number, reflect: false, attribute: 'display-time' })\n public displayTime = 4000;\n\n /**\n * Determines whether the toast is closed automatically or not.\n * @attr keep-open\n */\n @property({ type: Boolean, reflect: true, attribute: 'keep-open' })\n public keepOpen = false;\n\n /** Closes the toast. */\n public hide() {\n if (this.open) {\n this.open = false;\n }\n }\n\n /** Opens the toast. */\n public show() {\n window.clearTimeout(this.displayTimeout);\n\n if (!this.open) {\n this.open = true;\n }\n\n if (this.keepOpen === false) {\n this.displayTimeout = setTimeout(() => {\n this.open = false;\n }, this.displayTime);\n }\n }\n\n /** Toggles the open state of the toast. */\n public toggle() {\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n public override connectedCallback() {\n super.connectedCallback();\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'alert');\n }\n if (!this.hasAttribute('aria-live')) {\n this.setAttribute('aria-live', 'polite');\n }\n }\n\n protected override render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-toast': IgcToastComponent;\n }\n}\n"]}
1
+ {"version":3,"file":"toast.js","sourceRoot":"","sources":["../../../src/components/toast/toast.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,MAAM,IAAI,MA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FrC;eA1FoB,iBAAiB","sourcesContent":["import { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { themes } from '../../theming/theming-decorator.js';\nimport { styles } from './themes/toast.base.css.js';\nimport { styles as bootstrap } from './themes/toast.bootstrap.css.js';\nimport { styles as fluent } from './themes/toast.fluent.css.js';\nimport { styles as indigo } from './themes/toast.indigo.css.js';\nimport { AnimationPlayer, fadeIn, fadeOut } from '../../animations/index.js';\n\n/**\n * A toast component is used to show a notification\n *\n * @element igc-toast\n *\n * @csspart base - The base wrapper of the toast.\n */\n\n@themes({ bootstrap, fluent, indigo })\nexport default class IgcToastComponent extends LitElement {\n public static readonly tagName = 'igc-toast';\n public static override styles = [styles];\n\n private displayTimeout!: ReturnType<typeof setTimeout>;\n private animationPlayer!: AnimationPlayer;\n\n /**\n * Determines whether the toast is opened.\n * @attr\n */\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n /**\n * Determines the time after which the toast will close\n * @attr display-time\n */\n @property({ type: Number, reflect: false, attribute: 'display-time' })\n public displayTime = 4000;\n\n /**\n * Determines whether the toast is closed automatically or not.\n * @attr keep-open\n */\n @property({ type: Boolean, reflect: true, attribute: 'keep-open' })\n public keepOpen = false;\n\n protected override firstUpdated() {\n this.animationPlayer = new AnimationPlayer(this);\n }\n\n private async toggleAnimation(dir: 'open' | 'close') {\n const animation = dir === 'open' ? fadeIn : fadeOut;\n\n const [_, event] = await Promise.all([\n this.animationPlayer.stopAll(),\n this.animationPlayer.play(animation),\n ]);\n\n return event.type === 'finish';\n }\n\n /** Closes the toast. */\n public async hide() {\n if (this.open) {\n await this.toggleAnimation('close');\n this.open = false;\n }\n }\n\n /** Opens the toast. */\n public show() {\n window.clearTimeout(this.displayTimeout);\n\n if (!this.open) {\n this.toggleAnimation('open');\n this.open = true;\n }\n\n if (this.keepOpen === false) {\n this.displayTimeout = setTimeout(async () => {\n await this.toggleAnimation('close');\n this.open = false;\n }, this.displayTime);\n }\n }\n\n /** Toggles the open state of the toast. */\n public toggle() {\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n public override connectedCallback() {\n super.connectedCallback();\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'alert');\n }\n if (!this.hasAttribute('aria-live')) {\n this.setAttribute('aria-live', 'polite');\n }\n }\n\n protected override render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-toast': IgcToastComponent;\n }\n}\n"]}
@@ -3,10 +3,16 @@ import type { IgcToggleOptions } from './types.js';
3
3
  import type { IgcToggleController } from './toggle.controller.js';
4
4
  export declare class IgcToggleDirective extends Directive {
5
5
  private part;
6
- private shiftOptions?;
7
- private floatingElement;
6
+ private _floatingElement;
7
+ private _dispose;
8
+ private target;
9
+ private options;
10
+ private controller?;
11
+ private get floatingElement();
12
+ private dispose;
13
+ private notifyController;
8
14
  private updatePosition;
9
- private createFloatingElement;
15
+ private reposition;
10
16
  private createMiddleware;
11
17
  constructor(partInfo: PartInfo);
12
18
  render(target: HTMLElement, options: IgcToggleOptions, controller?: IgcToggleController): symbol;
@@ -1,41 +1,37 @@
1
- import { computePosition, flip, offset, shift, size, } from '@floating-ui/dom';
1
+ import { computePosition, flip, offset, shift, size, autoUpdate, } from '@floating-ui/dom';
2
2
  import { directive, Directive, PartType, } from 'lit/directive.js';
3
3
  import { noChange } from 'lit';
4
4
  export class IgcToggleDirective extends Directive {
5
- updatePosition(target, options, controller) {
6
- var _a, _b;
7
- this.floatingElement = this.createFloatingElement(options.open);
8
- if (!target) {
9
- if (controller) {
10
- controller.rendered = Promise.resolve();
11
- }
12
- return noChange;
5
+ get floatingElement() {
6
+ if (!this._floatingElement) {
7
+ this._floatingElement = this.part.element;
13
8
  }
14
- const promise = computePosition(target, this.floatingElement, {
15
- placement: (_a = options.placement) !== null && _a !== void 0 ? _a : 'bottom-start',
16
- strategy: (_b = options.positionStrategy) !== null && _b !== void 0 ? _b : 'absolute',
17
- middleware: this.createMiddleware(options),
18
- }).then(({ x, y }) => {
19
- Object.assign(this.floatingElement.style, {
20
- left: 0,
21
- top: 0,
22
- transform: `translate(${x}px,${y}px)`,
23
- });
9
+ Object.assign(this._floatingElement.style, {
10
+ display: this.options.open ? '' : 'none',
24
11
  });
25
- if (controller) {
26
- controller.rendered = promise;
12
+ return this._floatingElement;
13
+ }
14
+ dispose() {
15
+ if (this._dispose) {
16
+ this._dispose();
17
+ }
18
+ }
19
+ notifyController(promise) {
20
+ if (this.controller) {
21
+ this.controller.rendered = promise;
27
22
  }
28
- return noChange;
29
23
  }
30
- createFloatingElement(open = false) {
31
- if (!this.floatingElement) {
32
- this.floatingElement = this.part.element;
24
+ updatePosition() {
25
+ this.dispose();
26
+ if (!this.floatingElement || !this.target || !this.options.open) {
27
+ return noChange;
33
28
  }
34
- this.floatingElement.style.display = open ? '' : 'none';
35
- return this.floatingElement;
29
+ this._dispose = autoUpdate(this.target, this.floatingElement, this.reposition);
30
+ return noChange;
36
31
  }
37
32
  createMiddleware(options) {
38
33
  const middleware = [];
34
+ const { style: floatingStyles } = this._floatingElement;
39
35
  if (options.distance) {
40
36
  middleware.push(offset({
41
37
  mainAxis: options.distance,
@@ -44,27 +40,46 @@ export class IgcToggleDirective extends Directive {
44
40
  if (options.flip) {
45
41
  middleware.push(flip());
46
42
  }
47
- if (this.shiftOptions) {
48
- middleware.push(shift(this.shiftOptions));
49
- }
50
- Object.assign(this.floatingElement.style, { width: '' });
43
+ middleware.push(shift({
44
+ mainAxis: true,
45
+ }));
51
46
  if (options.sameWidth) {
52
- const floatingElement = this.floatingElement;
53
47
  middleware.push(size({
54
- apply: (args) => {
55
- const { rects } = args;
56
- Object.assign(floatingElement.style, {
48
+ apply: ({ rects }) => {
49
+ Object.assign(floatingStyles, {
57
50
  width: `${rects.reference.width}px`,
58
51
  });
59
52
  },
60
53
  }));
61
54
  }
55
+ else {
56
+ Object.assign(floatingStyles, { width: '' });
57
+ }
62
58
  return middleware;
63
59
  }
64
60
  constructor(partInfo) {
65
61
  super(partInfo);
66
- this.shiftOptions = {
67
- mainAxis: true,
62
+ this.reposition = () => {
63
+ var _a, _b;
64
+ if (!this.target) {
65
+ this.dispose();
66
+ this.notifyController(Promise.resolve());
67
+ return noChange;
68
+ }
69
+ const config = {
70
+ placement: (_a = this.options.placement) !== null && _a !== void 0 ? _a : 'bottom-start',
71
+ strategy: (_b = this.options.positionStrategy) !== null && _b !== void 0 ? _b : 'absolute',
72
+ middleware: this.createMiddleware(this.options),
73
+ };
74
+ const promise = computePosition(this.target, this.floatingElement, config).then(({ x, y }) => {
75
+ Object.assign(this.floatingElement.style, {
76
+ left: 0,
77
+ top: 0,
78
+ transform: `translate(${x}px,${y}px)`,
79
+ });
80
+ });
81
+ this.notifyController(promise);
82
+ return noChange;
68
83
  };
69
84
  this.part = partInfo;
70
85
  if (partInfo.type !== PartType.ELEMENT) {
@@ -72,7 +87,8 @@ export class IgcToggleDirective extends Directive {
72
87
  }
73
88
  }
74
89
  render(target, options, controller) {
75
- return this.updatePosition(target, options, controller);
90
+ Object.assign(this, { target, options, controller });
91
+ return this.updatePosition();
76
92
  }
77
93
  }
78
94
  export const igcToggle = directive(IgcToggleDirective);
@@ -1 +1 @@
1
- {"version":3,"file":"toggle.directive.js","sourceRoot":"","sources":["../../../src/components/toggle/toggle.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,IAAI,EACJ,MAAM,EACN,KAAK,EACL,IAAI,GAEL,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,SAAS,EACT,SAAS,EAGT,QAAQ,GACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAK/B,MAAM,OAAO,kBAAmB,SAAQ,SAAS;IAQvC,cAAc,CACpB,MAAmB,EACnB,OAAyB,EACzB,UAAgC;;QAEhC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAEhE,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U,CAAC,CAAC;IAC1D,CAAC;CACF;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import {\n computePosition,\n flip,\n offset,\n shift,\n size,\n Middleware,\n} from '@floating-ui/dom';\nimport {\n directive,\n Directive,\n PartInfo,\n ElementPart,\n PartType,\n} from 'lit/directive.js';\nimport { noChange } from 'lit';\nimport type { IgcToggleOptions } from './types.js';\nimport type { IgcToggleController } from './toggle.controller.js';\n\n/* blazorSuppressComponent */\nexport class IgcToggleDirective extends Directive {\n private part: PartInfo;\n private shiftOptions? = {\n mainAxis: true,\n };\n\n private floatingElement!: HTMLElement;\n\n private updatePosition(\n target: HTMLElement,\n options: IgcToggleOptions,\n controller?: IgcToggleController\n ) {\n this.floatingElement = this.createFloatingElement(options.open);\n\n if (!target) {\n if (controller) {\n controller.rendered = Promise.resolve();\n }\n return noChange;\n }\n\n const promise = computePosition(target, this.floatingElement, {\n placement: options.placement ?? 'bottom-start',\n strategy: options.positionStrategy ?? 'absolute',\n middleware: this.createMiddleware(options),\n }).then(({ x, y }) => {\n Object.assign(this.floatingElement.style, {\n left: 0,\n top: 0,\n transform: `translate(${x}px,${y}px)`,\n });\n });\n\n if (controller) {\n controller.rendered = promise;\n }\n\n return noChange;\n }\n\n private createFloatingElement(open = false) {\n if (!this.floatingElement) {\n this.floatingElement = (this.part as ElementPart).element as HTMLElement;\n }\n\n this.floatingElement.style.display = open ? '' : 'none';\n\n return this.floatingElement;\n }\n\n private createMiddleware(options: IgcToggleOptions) {\n const middleware: Middleware[] = [];\n\n if (options.distance) {\n middleware.push(\n offset({\n mainAxis: options.distance,\n })\n );\n }\n\n if (options.flip) {\n middleware.push(flip());\n }\n\n if (this.shiftOptions) {\n middleware.push(shift(this.shiftOptions));\n }\n\n // Toggling `sameWidth` does not reset the applied style on the floater element\n Object.assign(this.floatingElement.style, { width: '' });\n\n if (options.sameWidth) {\n const floatingElement = this.floatingElement;\n middleware.push(\n size({\n apply: (args) => {\n const { rects } = args;\n Object.assign(floatingElement.style, {\n width: `${rects.reference.width}px`,\n });\n },\n })\n );\n }\n\n return middleware;\n }\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n this.part = partInfo;\n if (partInfo.type !== PartType.ELEMENT) {\n throw new Error(\n 'The `igcToggle` directive must be attached to an element tag.'\n );\n }\n }\n\n public render(\n target: HTMLElement,\n options: IgcToggleOptions,\n controller?: IgcToggleController\n ) {\n return this.updatePosition(target, options, controller);\n }\n}\n\nexport const igcToggle = directive(IgcToggleDirective);\n"]}
1
+ {"version":3,"file":"toggle.directive.js","sourceRoot":"","sources":["../../../src/components/toggle/toggle.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,IAAI,EACJ,MAAM,EACN,KAAK,EACL,IAAI,EAEJ,UAAU,GAEX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,SAAS,EACT,SAAS,EAGT,QAAQ,GACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAK/B,MAAM,OAAO,kBAAmB,SAAQ,SAAS;IAU/C,IAAY,eAAe;QACzB,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE;YAC1B,IAAI,CAAC,gBAAgB,GAAI,IAAI,CAAC,IAAoB,CAAC,OAAsB,CAAC;SAC3E;QAED,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE;YACzC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM;SACzC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAEO,OAAO;QACb,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,QAAQ,EAAE,CAAC;SACjB;IACH,CAAC;IAEO,gBAAgB,CAAC,OAAsB;QAC7C,IAAI,IA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,CAChE,CAAC;SACH;IACH,CAAC;IAEM,MAAM,CACX,MAAmB,EACnB,OAAyB,EACzB,UAAgC;QAEhC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;QACrD,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;IAC/B,CAAC;CACF;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import {\n computePosition,\n flip,\n offset,\n shift,\n size,\n Middleware,\n autoUpdate,\n ComputePositionConfig,\n} from '@floating-ui/dom';\nimport {\n directive,\n Directive,\n PartInfo,\n ElementPart,\n PartType,\n} from 'lit/directive.js';\nimport { noChange } from 'lit';\nimport type { IgcToggleOptions } from './types.js';\nimport type { IgcToggleController } from './toggle.controller.js';\n\n/* blazorSuppressComponent */\nexport class IgcToggleDirective extends Directive {\n private part: PartInfo;\n\n private _floatingElement!: HTMLElement;\n private _dispose!: Function;\n\n private target!: HTMLElement;\n private options!: IgcToggleOptions;\n private controller?: IgcToggleController;\n\n private get floatingElement() {\n if (!this._floatingElement) {\n this._floatingElement = (this.part as ElementPart).element as HTMLElement;\n }\n\n Object.assign(this._floatingElement.style, {\n display: this.options.open ? '' : 'none',\n });\n\n return this._floatingElement;\n }\n\n private dispose() {\n if (this._dispose) {\n this._dispose();\n }\n }\n\n private notifyController(promise: Promise<void>) {\n if (this.controller) {\n this.controller.rendered = promise;\n }\n }\n\n private updatePosition() {\n this.dispose();\n\n if (!this.floatingElement || !this.target || !this.options.open) {\n return noChange;\n }\n\n this._dispose = autoUpdate(\n this.target,\n this.floatingElement,\n this.reposition\n );\n\n return noChange;\n }\n\n private reposition = () => {\n if (!this.target) {\n this.dispose();\n this.notifyController(Promise.resolve());\n return noChange;\n }\n\n const config: Partial<ComputePositionConfig> = {\n placement: this.options.placement ?? 'bottom-start',\n strategy: this.options.positionStrategy ?? 'absolute',\n middleware: this.createMiddleware(this.options),\n };\n\n const promise = computePosition(\n this.target,\n this.floatingElement,\n config\n ).then(({ x, y }) => {\n Object.assign(this.floatingElement.style, {\n left: 0,\n top: 0,\n transform: `translate(${x}px,${y}px)`,\n });\n });\n\n this.notifyController(promise);\n return noChange;\n };\n\n private createMiddleware(options: IgcToggleOptions) {\n const middleware: Middleware[] = [];\n const { style: floatingStyles } = this._floatingElement;\n\n if (options.distance) {\n middleware.push(\n offset({\n mainAxis: options.distance,\n })\n );\n }\n\n if (options.flip) {\n middleware.push(flip());\n }\n\n middleware.push(\n shift({\n mainAxis: true,\n })\n );\n\n if (options.sameWidth) {\n middleware.push(\n size({\n apply: ({ rects }) => {\n Object.assign(floatingStyles, {\n width: `${rects.reference.width}px`,\n });\n },\n })\n );\n } else {\n // Reset previously applied `same-width` styles\n Object.assign(floatingStyles, { width: '' });\n }\n\n return middleware;\n }\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n this.part = partInfo;\n if (partInfo.type !== PartType.ELEMENT) {\n throw new Error(\n 'The `igcToggle` directive must be attached to an element tag.'\n );\n }\n }\n\n public render(\n target: HTMLElement,\n options: IgcToggleOptions,\n controller?: IgcToggleController\n ) {\n Object.assign(this, { target, options, controller });\n return this.updatePosition();\n }\n}\n\nexport const igcToggle = directive(IgcToggleDirective);\n"]}
@@ -2010,7 +2010,7 @@
2010
2010
  {
2011
2011
  "name": "value",
2012
2012
  "description": "Sets the value (selected items). The passed value must be a valid JSON array.\nIf the data source is an array of complex objects, the `valueKey` attribute must be set.\nNote that when `displayKey` is not explicitly set, it will fall back to the value of `valueKey`.",
2013
- "type": "string[]"
2013
+ "type": "ComboValue<T>[]"
2014
2014
  }
2015
2015
  ],
2016
2016
  "properties": [
@@ -2182,23 +2182,11 @@
2182
2182
  "type": "ComboItemTemplate<T>",
2183
2183
  "default": "\"({ item }) => {\\n return html`${this.groupKey && item[this.groupKey]}`;\\n }\""
2184
2184
  },
2185
- {
2186
- "name": "positionStrategy",
2187
- "description": "Sets the component's positioning strategy.",
2188
- "type": "\"absolute\" | \"fixed\"",
2189
- "default": "\"fixed\""
2190
- },
2191
- {
2192
- "name": "sameWidth",
2193
- "description": "Whether the dropdown's width should be the same as the target's one.",
2194
- "type": "boolean",
2195
- "default": "true"
2196
- },
2197
2185
  {
2198
2186
  "name": "value",
2199
2187
  "attribute": "value",
2200
2188
  "description": "Sets the value (selected items). The passed value must be a valid JSON array.\nIf the data source is an array of complex objects, the `valueKey` attribute must be set.\nNote that when `displayKey` is not explicitly set, it will fall back to the value of `valueKey`.",
2201
- "type": "string[]"
2189
+ "type": "ComboValue<T>[]"
2202
2190
  },
2203
2191
  {
2204
2192
  "name": "selection",
@@ -5381,30 +5369,12 @@
5381
5369
  "type": "\"top\" | \"top-start\" | \"top-end\" | \"bottom\" | \"bottom-start\" | \"bottom-end\" | \"right\" | \"right-start\" | \"right-end\" | \"left\" | \"left-start\" | \"left-end\"",
5382
5370
  "default": "\"bottom-start\""
5383
5371
  },
5384
- {
5385
- "name": "position-strategy",
5386
- "description": "Sets the component's positioning strategy.",
5387
- "type": "\"absolute\" | \"fixed\"",
5388
- "default": "\"absolute\""
5389
- },
5390
- {
5391
- "name": "flip",
5392
- "description": "Whether the component should be flipped to the opposite side of the target once it's about to overflow the visible area.\nWhen true, once enough space is detected on its preferred side, it will flip back.",
5393
- "type": "boolean",
5394
- "default": "false"
5395
- },
5396
5372
  {
5397
5373
  "name": "distance",
5398
5374
  "description": "The distance from the target element.",
5399
5375
  "type": "number",
5400
5376
  "default": "0"
5401
5377
  },
5402
- {
5403
- "name": "same-width",
5404
- "description": "Whether the dropdown's width should be the same as the target's one.",
5405
- "type": "boolean",
5406
- "default": "true"
5407
- },
5408
5378
  {
5409
5379
  "name": "size",
5410
5380
  "description": "Determines the size of the component.",
@@ -5518,20 +5488,6 @@
5518
5488
  "type": "\"top\" | \"top-start\" | \"top-end\" | \"bottom\" | \"bottom-start\" | \"bottom-end\" | \"right\" | \"right-start\" | \"right-end\" | \"left\" | \"left-start\" | \"left-end\"",
5519
5489
  "default": "\"bottom-start\""
5520
5490
  },
5521
- {
5522
- "name": "positionStrategy",
5523
- "attribute": "position-strategy",
5524
- "description": "Sets the component's positioning strategy.",
5525
- "type": "\"absolute\" | \"fixed\"",
5526
- "default": "\"absolute\""
5527
- },
5528
- {
5529
- "name": "flip",
5530
- "attribute": "flip",
5531
- "description": "Whether the component should be flipped to the opposite side of the target once it's about to overflow the visible area.\nWhen true, once enough space is detected on its preferred side, it will flip back.",
5532
- "type": "boolean",
5533
- "default": "false"
5534
- },
5535
5491
  {
5536
5492
  "name": "distance",
5537
5493
  "attribute": "distance",
@@ -5539,13 +5495,6 @@
5539
5495
  "type": "number",
5540
5496
  "default": "0"
5541
5497
  },
5542
- {
5543
- "name": "sameWidth",
5544
- "attribute": "same-width",
5545
- "description": "Whether the dropdown's width should be the same as the target's one.",
5546
- "type": "boolean",
5547
- "default": "true"
5548
- },
5549
5498
  {
5550
5499
  "name": "size",
5551
5500
  "attribute": "size",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "igniteui-webcomponents",
3
- "version": "4.3.0-alpha.0",
3
+ "version": "4.3.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",
@@ -34,6 +34,7 @@
34
34
  "chip",
35
35
  "combo",
36
36
  "date input",
37
+ "dialog",
37
38
  "dropdown",
38
39
  "expansion panel",
39
40
  "form",
@@ -50,6 +51,7 @@
50
51
  "radio",
51
52
  "rating",
52
53
  "snackbar",
54
+ "stepper",
53
55
  "switch",
54
56
  "slider",
55
57
  "tabs",
@@ -57,8 +59,8 @@
57
59
  "tree"
58
60
  ],
59
61
  "dependencies": {
60
- "@floating-ui/dom": "^1.2.7",
61
- "@lit-labs/virtualizer": "^2.0.1",
62
- "lit": "^2.7.4"
62
+ "@floating-ui/dom": "^1.4.1",
63
+ "@lit-labs/virtualizer": "^2.0.3",
64
+ "lit": "^2.7.5"
63
65
  }
64
66
  }