igniteui-webcomponents 7.3.0 → 7.3.1

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 (149) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +30 -0
  3. package/components/avatar/avatar.d.ts +1 -2
  4. package/components/avatar/avatar.js +4 -8
  5. package/components/avatar/avatar.js.map +1 -1
  6. package/components/badge/badge.d.ts +6 -1
  7. package/components/badge/badge.js +8 -5
  8. package/components/badge/badge.js.map +1 -1
  9. package/components/badge/themes/badge.base.css.js +1 -1
  10. package/components/badge/themes/badge.base.css.js.map +1 -1
  11. package/components/chip/chip.d.ts +30 -14
  12. package/components/chip/chip.js +54 -48
  13. package/components/chip/chip.js.map +1 -1
  14. package/components/chip/themes/chip.base.css.js +1 -1
  15. package/components/chip/themes/chip.base.css.js.map +1 -1
  16. package/components/chip/themes/dark/chip.bootstrap.css.js +1 -1
  17. package/components/chip/themes/dark/chip.bootstrap.css.js.map +1 -1
  18. package/components/chip/themes/dark/chip.fluent.css.js +1 -1
  19. package/components/chip/themes/dark/chip.fluent.css.js.map +1 -1
  20. package/components/chip/themes/dark/chip.indigo.css.js +1 -1
  21. package/components/chip/themes/dark/chip.indigo.css.js.map +1 -1
  22. package/components/chip/themes/dark/chip.material.css.js +1 -1
  23. package/components/chip/themes/dark/chip.material.css.js.map +1 -1
  24. package/components/chip/themes/light/chip.bootstrap.css.js +1 -1
  25. package/components/chip/themes/light/chip.bootstrap.css.js.map +1 -1
  26. package/components/chip/themes/light/chip.fluent.css.js +1 -1
  27. package/components/chip/themes/light/chip.fluent.css.js.map +1 -1
  28. package/components/chip/themes/light/chip.indigo.css.js +1 -1
  29. package/components/chip/themes/light/chip.indigo.css.js.map +1 -1
  30. package/components/chip/themes/light/chip.material.css.js +1 -1
  31. package/components/chip/themes/light/chip.material.css.js.map +1 -1
  32. package/components/chip/themes/shared/chip.bootstrap.css.js +1 -1
  33. package/components/chip/themes/shared/chip.bootstrap.css.js.map +1 -1
  34. package/components/chip/themes/shared/chip.common.css.js +1 -1
  35. package/components/chip/themes/shared/chip.common.css.js.map +1 -1
  36. package/components/chip/themes/shared/chip.fluent.css.js +1 -1
  37. package/components/chip/themes/shared/chip.fluent.css.js.map +1 -1
  38. package/components/chip/themes/shared/chip.indigo.css.js +1 -1
  39. package/components/chip/themes/shared/chip.indigo.css.js.map +1 -1
  40. package/components/color-picker/color-picker.d.ts +2 -2
  41. package/components/color-picker/color-picker.js.map +1 -1
  42. package/components/color-picker/picker-canvas.js +2 -1
  43. package/components/color-picker/picker-canvas.js.map +1 -1
  44. package/components/textarea/textarea.d.ts +2 -15
  45. package/components/textarea/textarea.js +48 -93
  46. package/components/textarea/textarea.js.map +1 -1
  47. package/components/tile-manager/position.d.ts +2 -9
  48. package/components/tile-manager/position.js +27 -42
  49. package/components/tile-manager/position.js.map +1 -1
  50. package/components/tile-manager/resize-state.d.ts +11 -22
  51. package/components/tile-manager/resize-state.js +60 -119
  52. package/components/tile-manager/resize-state.js.map +1 -1
  53. package/components/tile-manager/resize-util.d.ts +3 -7
  54. package/components/tile-manager/resize-util.js +65 -72
  55. package/components/tile-manager/resize-util.js.map +1 -1
  56. package/components/tile-manager/serializer.d.ts +1 -1
  57. package/components/tile-manager/serializer.js +9 -10
  58. package/components/tile-manager/serializer.js.map +1 -1
  59. package/components/tile-manager/themes/shared/tile/tile.common.css.js +1 -1
  60. package/components/tile-manager/themes/shared/tile/tile.common.css.js.map +1 -1
  61. package/components/tile-manager/themes/tile.base.css.js +1 -1
  62. package/components/tile-manager/themes/tile.base.css.js.map +1 -1
  63. package/components/tile-manager/tile-ghost-util.js +16 -20
  64. package/components/tile-manager/tile-ghost-util.js.map +1 -1
  65. package/components/tile-manager/tile-manager.d.ts +5 -2
  66. package/components/tile-manager/tile-manager.js +27 -23
  67. package/components/tile-manager/tile-manager.js.map +1 -1
  68. package/components/tile-manager/tile.d.ts +32 -18
  69. package/components/tile-manager/tile.js +181 -161
  70. package/components/tile-manager/tile.js.map +1 -1
  71. package/components/tile-manager/types.d.ts +1 -5
  72. package/components/tile-manager/types.js.map +1 -1
  73. package/custom-elements.json +498 -853
  74. package/igniteui-webcomponents.css-data.json +1 -1
  75. package/igniteui-webcomponents.html-data.json +1 -1
  76. package/index.d.ts +1 -0
  77. package/index.js.map +1 -1
  78. package/internals/directives/drag.d.ts +144 -0
  79. package/internals/directives/drag.js +278 -0
  80. package/internals/directives/drag.js.map +1 -0
  81. package/internals/directives/resize.d.ts +109 -0
  82. package/internals/directives/resize.js +214 -0
  83. package/internals/directives/resize.js.map +1 -0
  84. package/internals/templates/input-shell.d.ts +12 -1
  85. package/internals/templates/input-shell.js +17 -10
  86. package/internals/templates/input-shell.js.map +1 -1
  87. package/internals/utils/dom.d.ts +2 -0
  88. package/internals/utils/dom.js +3 -0
  89. package/internals/utils/dom.js.map +1 -1
  90. package/internals/utils/events.d.ts +2 -0
  91. package/internals/utils/events.js +3 -0
  92. package/internals/utils/events.js.map +1 -1
  93. package/package.json +1 -1
  94. package/skills/README.md +1 -0
  95. package/web-types.json +2 -2
  96. package/components/resize-container/default-ghost.d.ts +0 -5
  97. package/components/resize-container/default-ghost.js +0 -20
  98. package/components/resize-container/default-ghost.js.map +0 -1
  99. package/components/resize-container/resize-container.d.ts +0 -60
  100. package/components/resize-container/resize-container.js +0 -156
  101. package/components/resize-container/resize-container.js.map +0 -1
  102. package/components/resize-container/resize-controller.d.ts +0 -46
  103. package/components/resize-container/resize-controller.js +0 -195
  104. package/components/resize-container/resize-controller.js.map +0 -1
  105. package/components/resize-container/themes/dark/resize-indicator.bootstrap.css.d.ts +0 -1
  106. package/components/resize-container/themes/dark/resize-indicator.bootstrap.css.js +0 -3
  107. package/components/resize-container/themes/dark/resize-indicator.bootstrap.css.js.map +0 -1
  108. package/components/resize-container/themes/dark/resize-indicator.fluent.css.d.ts +0 -1
  109. package/components/resize-container/themes/dark/resize-indicator.fluent.css.js +0 -3
  110. package/components/resize-container/themes/dark/resize-indicator.fluent.css.js.map +0 -1
  111. package/components/resize-container/themes/dark/resize-indicator.indigo.css.d.ts +0 -1
  112. package/components/resize-container/themes/dark/resize-indicator.indigo.css.js +0 -3
  113. package/components/resize-container/themes/dark/resize-indicator.indigo.css.js.map +0 -1
  114. package/components/resize-container/themes/dark/resize-indicator.material.css.d.ts +0 -1
  115. package/components/resize-container/themes/dark/resize-indicator.material.css.js +0 -3
  116. package/components/resize-container/themes/dark/resize-indicator.material.css.js.map +0 -1
  117. package/components/resize-container/themes/dark/resize-indicator.shared.css.d.ts +0 -1
  118. package/components/resize-container/themes/dark/resize-indicator.shared.css.js +0 -3
  119. package/components/resize-container/themes/dark/resize-indicator.shared.css.js.map +0 -1
  120. package/components/resize-container/themes/light/resize-indicator.bootstrap.css.d.ts +0 -1
  121. package/components/resize-container/themes/light/resize-indicator.bootstrap.css.js +0 -3
  122. package/components/resize-container/themes/light/resize-indicator.bootstrap.css.js.map +0 -1
  123. package/components/resize-container/themes/light/resize-indicator.fluent.css.d.ts +0 -1
  124. package/components/resize-container/themes/light/resize-indicator.fluent.css.js +0 -3
  125. package/components/resize-container/themes/light/resize-indicator.fluent.css.js.map +0 -1
  126. package/components/resize-container/themes/light/resize-indicator.indigo.css.d.ts +0 -1
  127. package/components/resize-container/themes/light/resize-indicator.indigo.css.js +0 -3
  128. package/components/resize-container/themes/light/resize-indicator.indigo.css.js.map +0 -1
  129. package/components/resize-container/themes/light/resize-indicator.material.css.d.ts +0 -1
  130. package/components/resize-container/themes/light/resize-indicator.material.css.js +0 -3
  131. package/components/resize-container/themes/light/resize-indicator.material.css.js.map +0 -1
  132. package/components/resize-container/themes/light/resize-indicator.shared.css.d.ts +0 -1
  133. package/components/resize-container/themes/light/resize-indicator.shared.css.js +0 -3
  134. package/components/resize-container/themes/light/resize-indicator.shared.css.js.map +0 -1
  135. package/components/resize-container/themes/resize-container.base.css.d.ts +0 -1
  136. package/components/resize-container/themes/resize-container.base.css.js +0 -3
  137. package/components/resize-container/themes/resize-container.base.css.js.map +0 -1
  138. package/components/resize-container/themes/shared/resize-container.common.css.d.ts +0 -1
  139. package/components/resize-container/themes/shared/resize-container.common.css.js +0 -3
  140. package/components/resize-container/themes/shared/resize-container.common.css.js.map +0 -1
  141. package/components/resize-container/themes/themes.d.ts +0 -2
  142. package/components/resize-container/themes/themes.js +0 -47
  143. package/components/resize-container/themes/themes.js.map +0 -1
  144. package/components/resize-container/types.d.ts +0 -40
  145. package/components/resize-container/types.js +0 -2
  146. package/components/resize-container/types.js.map +0 -1
  147. package/internals/controllers/drag.d.ts +0 -166
  148. package/internals/controllers/drag.js +0 -283
  149. package/internals/controllers/drag.js.map +0 -1
package/index.d.ts CHANGED
@@ -94,6 +94,7 @@ export type { IgcCheckboxComponentEventMap } from './components/checkbox/checkbo
94
94
  export type { IgcCheckboxComponentEventMap as IgcSwitchComponentEventMap } from './components/checkbox/checkbox-base.js';
95
95
  export type { IgcChipComponentEventMap } from './components/chip/chip.js';
96
96
  export type { IgcComboComponentEventMap } from './components/combo/types.js';
97
+ export type { IgcColorPickerComponentEventMap } from './components/color-picker/color-picker.js';
97
98
  export type { IgcDatePickerComponentEventMap } from './components/date-picker/date-picker.js';
98
99
  export type { IgcDateRangePickerComponentEventMap } from './components/date-range-picker/date-range-picker.js';
99
100
  export type { IgcDateTimeInputComponentEventMap } from './components/date-time-input/date-time-input.js';
package/index.js.map CHANGED
@@ -1 +1 @@
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,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,OA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AAO,EACL,2BAA2B,GAE5B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,mCAAmC,GAEpC,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EACL,uBAAuB,GAExB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAUL,yBAAyB,EACzB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAC3B,gCAAgC,EAChC,0BAA0B,EAC1B,qBAAqB,EACrB,YAAY,EACZ,cAAc,GACf,MAAM,oBAAoB,CAAC;AA8C5B,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAuCrE,OAAO,EAAE,oBAAoB,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAG/F,OAAO,EAAE,0BAA0B,IAAI,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AAGnH,OAAO,EAAE,iBAAiB,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC","sourcesContent":["// Components\nexport { default as IgcAvatarComponent } from './components/avatar/avatar.js';\nexport { default as IgcAccordionComponent } from './components/accordion/accordion.js';\nexport { default as IgcBadgeComponent } from './components/badge/badge.js';\nexport { default as IgcBannerComponent } from './components/banner/banner.js';\nexport { default as IgcButtonComponent } from './components/button/button.js';\nexport { default as IgcButtonGroupComponent } from './components/button-group/button-group.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 IgcCarouselComponent } from './components/carousel/carousel.js';\nexport { default as IgcCarouselIndicatorComponent } from './components/carousel/carousel-indicator.js';\nexport { default as IgcCarouselSlideComponent } from './components/carousel/carousel-slide.js';\nexport { default as IgcChatComponent } from './components/chat/chat.js';\nexport { default as IgcColorPickerComponent } from './components/color-picker/color-picker.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 IgcComboComponent } from './components/combo/combo.js';\nexport { default as IgcDatePickerComponent } from './components/date-picker/date-picker.js';\nexport { default as IgcDateRangePickerComponent } from './components/date-range-picker/date-range-picker.js';\nexport { default as IgcDateTimeInputComponent } from './components/date-time-input/date-time-input.js';\nexport { default as IgcDialogComponent } from './components/dialog/dialog.js';\nexport { default as IgcDividerComponent } from './components/divider/divider.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 IgcFileInputComponent } from './components/file-input/file-input.js';\nexport { default as IgcSelectComponent } from './components/select/select.js';\nexport { default as IgcSelectGroupComponent } from './components/select/select-group.js';\nexport { default as IgcSelectHeaderComponent } from './components/select/select-header.js';\nexport { default as IgcSelectItemComponent } from './components/select/select-item.js';\nexport { default as IgcExpansionPanelComponent } from './components/expansion-panel/expansion-panel.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 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 IgcMaskInputComponent } from './components/mask-input/mask-input.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 IgcTabsComponent } from './components/tabs/tabs.js';\nexport { default as IgcTabComponent } from './components/tabs/tab.js';\nexport { default as IgcTileComponent } from './components/tile-manager/tile.js';\nexport { default as IgcTileManagerComponent } from './components/tile-manager/tile-manager.js';\nexport { default as IgcToastComponent } from './components/toast/toast.js';\nexport { default as IgcToggleButtonComponent } from './components/button-group/toggle-button.js';\nexport { default as IgcSwitchComponent } from './components/checkbox/switch.js';\nexport { default as IgcTextareaComponent } from './components/textarea/textarea.js';\nexport { default as IgcTreeComponent } from './components/tree/tree.js';\nexport { default as IgcTreeItemComponent } from './components/tree/tree-item.js';\nexport { default as IgcSplitterComponent } from './components/splitter/splitter.js';\nexport { default as IgcStepperComponent } from './components/stepper/stepper.js';\nexport { default as IgcStepComponent } from './components/stepper/step.js';\nexport { default as IgcHighlightComponent } from './components/highlight/highlight.js';\nexport { default as IgcTooltipComponent } from './components/tooltip/tooltip.js';\nexport { default as IgcThemeProviderComponent } from './components/theme-provider/theme-provider.js';\nexport { default as IgcQrCodeComponent } from './components/qr-code/qr-code.js';\nexport { default as IgcVirtualScrollComponent } from './components/virtualization/virtualization.js';\nexport type {\n IgcVirtualScrollComponentEventMap,\n VirtualScrollItemTemplate,\n} from './components/virtualization/virtualization.js';\nexport type {\n VirtualScrollItemContext,\n VirtualScrollState,\n VirtualScrollDataRequest,\n} from './components/virtualization/types.js';\n\n// definitions\nexport { defineComponents } from '#internals/definitions/defineComponents.js';\nexport { defineAllComponents } from '#internals/definitions/defineAllComponents.js';\n\n// icon registration\nexport {\n registerIcon,\n registerIconFromText,\n setIconRef,\n} from './components/icon/icon.registry.js';\n\n// theming configuration\nexport { configureTheme } from '#theming/config.js';\nexport type { Theme, ThemeVariant } from '#theming/types.js';\n\n// localization objects\nexport {\n IgcCalendarResourceStringEN,\n type IgcCalendarResourceStrings,\n} from '#internals/i18n/EN/calendar.resources.js';\nexport {\n IgcDateRangePickerResourceStringsEN,\n type IgcDateRangePickerResourceStrings,\n} from '#internals/i18n/EN/date-range-picker.resources.js';\nexport {\n IgcChatResourceStringEN,\n type IgcChatResourceStrings,\n} from '#internals/i18n/EN/chat.resources.js';\nexport {\n type ICalendarResourceStrings,\n type ICarouselResourceStrings,\n type IChatResourceStrings,\n type IChipResourceStrings,\n type IComboResourceStrings,\n type IDatePickerResourceStrings,\n type IDateRangePickerResourceStrings,\n type IFileInputResourceStrings,\n type ITreeResourceStrings,\n CalendarResourceStringsEN,\n CarouselResourceStringsEN,\n ChatResourceStringsEN,\n ChipResourceStringsEN,\n ComboResourceStringsEN,\n DatePickerResourceStringsEN,\n DateRangePickerResourceStringsEN,\n FileInputResourceStringsEN,\n TreeResourceStringsEN,\n registerI18n,\n setCurrentI18n,\n} from 'igniteui-i18n-core';\n\n// Event maps\nexport type { IgcBannerComponentEventMap } from './components/banner/banner.js';\nexport type { IgcButtonGroupComponentEventMap } from './components/button-group/button-group.js';\nexport type { IgcCalendarComponentEventMap } from './components/calendar/types.js';\nexport type { IgcCarouselComponentEventMap } from './components/carousel/carousel.js';\nexport type { IgcChatComponentEventMap } from './components/chat/chat.js';\nexport type { IgcCheckboxComponentEventMap } from './components/checkbox/checkbox-base.js';\nexport type { IgcCheckboxComponentEventMap as IgcSwitchComponentEventMap } from './components/checkbox/checkbox-base.js';\nexport type { IgcChipComponentEventMap } from './components/chip/chip.js';\nexport type { IgcComboComponentEventMap } from './components/combo/types.js';\nexport type { IgcDatePickerComponentEventMap } from './components/date-picker/date-picker.js';\nexport type { IgcDateRangePickerComponentEventMap } from './components/date-range-picker/date-range-picker.js';\nexport type { IgcDateTimeInputComponentEventMap } from './components/date-time-input/date-time-input.js';\nexport type { IgcDialogComponentEventMap } from './components/dialog/dialog.js';\nexport type { IgcDropdownComponentEventMap } from './components/dropdown/dropdown.js';\nexport type { IgcExpansionPanelComponentEventMap } from './components/expansion-panel/expansion-panel.js';\nexport type { IgcInputComponentEventMap } from './components/input/input-base.js';\nexport type { IgcInputComponentEventMap as IgcMaskInputComponentEventMap } from './components/input/input-base.js';\nexport type { IgcNavDrawerComponentEventMap } from './components/nav-drawer/nav-drawer.js';\nexport type { IgcFileInputComponentEventMap } from './components/file-input/file-input.js';\nexport type { IgcRadioComponentEventMap } from './components/radio/radio.js';\nexport type { IgcRatingComponentEventMap } from './components/rating/rating.js';\nexport type { IgcSelectComponentEventMap } from './components/select/select.js';\nexport type { IgcSliderComponentEventMap } from './components/slider/slider.js';\nexport type { IgcRangeSliderComponentEventMap } from './components/slider/range-slider.js';\nexport type { IgcSnackbarComponentEventMap } from './components/snackbar/snackbar.js';\nexport type { IgcSplitterComponentEventMap } from './components/splitter/splitter.js';\nexport type { IgcStepperComponentEventMap } from './components/stepper/common/types.js';\nexport type { IgcTabsComponentEventMap } from './components/tabs/tabs.js';\nexport type { IgcTextareaComponentEventMap } from './components/textarea/textarea.js';\nexport type { IgcTileComponentEventMap } from './components/tile-manager/tile.js';\nexport type { IgcTreeComponentEventMap } from './components/tree/tree.common.js';\nexport type { IgcTooltipComponentEventMap } from './components/tooltip/tooltip.js';\n\n// Public types\nexport type * from './components/types.js';\nexport type { IgcTileChangeStateEventArgs } from './components/tile-manager/tile.js';\nexport type {\n CalendarActiveView,\n CalendarHeaderOrientation,\n CalendarSelection,\n DateRangeDescriptor,\n WeekDays,\n} from './components/calendar/types.js';\nexport { DateRangeType } from './components/calendar/types.js';\nexport type { IgcCheckboxChangeEventArgs } from './components/checkbox/checkbox-base.js';\nexport { DatePart } from './components/date-time-input/date-part.js';\nexport type { DatePartDeltas } from './components/date-time-input/date-part.js';\nexport type {\n CustomDateRange,\n DateRangeValue,\n} from './components/date-range-picker/date-range-picker.js';\nexport type { PopoverPlacement } from './components/popover/popover.js';\nexport type { IgcRadioChangeEventArgs } from './components/radio/radio.js';\nexport type { IgcRangeSliderValueEventArgs } from './components/slider/range-slider.js';\nexport type {\n IgcSplitterResizeEventArgs,\n IgcSplitterResizeEventDetail,\n IgcSplitterLayoutChangedEventArgs,\n} from './components/splitter/splitter.js';\nexport type {\n IgcActiveStepChangingEventArgs,\n IgcActiveStepChangedEventArgs,\n} from './components/stepper/common/types.js';\nexport type { IgcTreeSelectionEventArgs } from './components/tree/tree.common.js';\nexport type {\n ComboItemTemplate,\n ComboTemplateProps,\n FilteringOptions,\n GroupingDirection,\n IgcComboChangeEventArgs,\n} from './components/combo/types.js';\nexport type {\n IconMeta,\n RegisterIconOptions,\n} from './components/icon/registry/types.js';\nexport type * from './components/chat/types.js';\nexport type {\n QrErrorCorrectionLevel,\n QrDotStyle,\n QrCornerSquareStyle,\n} from './components/qr-code/types.js';\n\n// Internal exports for other packages\n/** @hidden @internal */\nexport { addThemingController as θaddThemingController } from '#theming/theming-controller.js';\n\n/** @hidden @internal */\nexport { addAdoptedStylesController as θaddAdoptedStylesController } from '#internals/controllers/adopt-styles.js';\n\n/** @hidden @internal */\nexport { createAbortHandle as θcreateAbortHandle } from '#internals/abort-handler.js';\n"]}
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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M,4CAA4C,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAGpF,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,UAAU,GACX,MAAM,oCAAoC,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpD,OAAO,EACL,2BAA2B,GAE5B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,mCAAmC,GAEpC,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EACL,uBAAuB,GAExB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAUL,yBAAyB,EACzB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAC3B,gCAAgC,EAChC,0BAA0B,EAC1B,qBAAqB,EACrB,YAAY,EACZ,cAAc,GACf,MAAM,oBAAoB,CAAC;AA+C5B,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAuCrE,OAAO,EAAE,oBAAoB,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAG/F,OAAO,EAAE,0BAA0B,IAAI,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AAGnH,OAAO,EAAE,iBAAiB,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC","sourcesContent":["// Components\nexport { default as IgcAvatarComponent } from './components/avatar/avatar.js';\nexport { default as IgcAccordionComponent } from './components/accordion/accordion.js';\nexport { default as IgcBadgeComponent } from './components/badge/badge.js';\nexport { default as IgcBannerComponent } from './components/banner/banner.js';\nexport { default as IgcButtonComponent } from './components/button/button.js';\nexport { default as IgcButtonGroupComponent } from './components/button-group/button-group.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 IgcCarouselComponent } from './components/carousel/carousel.js';\nexport { default as IgcCarouselIndicatorComponent } from './components/carousel/carousel-indicator.js';\nexport { default as IgcCarouselSlideComponent } from './components/carousel/carousel-slide.js';\nexport { default as IgcChatComponent } from './components/chat/chat.js';\nexport { default as IgcColorPickerComponent } from './components/color-picker/color-picker.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 IgcComboComponent } from './components/combo/combo.js';\nexport { default as IgcDatePickerComponent } from './components/date-picker/date-picker.js';\nexport { default as IgcDateRangePickerComponent } from './components/date-range-picker/date-range-picker.js';\nexport { default as IgcDateTimeInputComponent } from './components/date-time-input/date-time-input.js';\nexport { default as IgcDialogComponent } from './components/dialog/dialog.js';\nexport { default as IgcDividerComponent } from './components/divider/divider.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 IgcFileInputComponent } from './components/file-input/file-input.js';\nexport { default as IgcSelectComponent } from './components/select/select.js';\nexport { default as IgcSelectGroupComponent } from './components/select/select-group.js';\nexport { default as IgcSelectHeaderComponent } from './components/select/select-header.js';\nexport { default as IgcSelectItemComponent } from './components/select/select-item.js';\nexport { default as IgcExpansionPanelComponent } from './components/expansion-panel/expansion-panel.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 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 IgcMaskInputComponent } from './components/mask-input/mask-input.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 IgcTabsComponent } from './components/tabs/tabs.js';\nexport { default as IgcTabComponent } from './components/tabs/tab.js';\nexport { default as IgcTileComponent } from './components/tile-manager/tile.js';\nexport { default as IgcTileManagerComponent } from './components/tile-manager/tile-manager.js';\nexport { default as IgcToastComponent } from './components/toast/toast.js';\nexport { default as IgcToggleButtonComponent } from './components/button-group/toggle-button.js';\nexport { default as IgcSwitchComponent } from './components/checkbox/switch.js';\nexport { default as IgcTextareaComponent } from './components/textarea/textarea.js';\nexport { default as IgcTreeComponent } from './components/tree/tree.js';\nexport { default as IgcTreeItemComponent } from './components/tree/tree-item.js';\nexport { default as IgcSplitterComponent } from './components/splitter/splitter.js';\nexport { default as IgcStepperComponent } from './components/stepper/stepper.js';\nexport { default as IgcStepComponent } from './components/stepper/step.js';\nexport { default as IgcHighlightComponent } from './components/highlight/highlight.js';\nexport { default as IgcTooltipComponent } from './components/tooltip/tooltip.js';\nexport { default as IgcThemeProviderComponent } from './components/theme-provider/theme-provider.js';\nexport { default as IgcQrCodeComponent } from './components/qr-code/qr-code.js';\nexport { default as IgcVirtualScrollComponent } from './components/virtualization/virtualization.js';\nexport type {\n IgcVirtualScrollComponentEventMap,\n VirtualScrollItemTemplate,\n} from './components/virtualization/virtualization.js';\nexport type {\n VirtualScrollItemContext,\n VirtualScrollState,\n VirtualScrollDataRequest,\n} from './components/virtualization/types.js';\n\n// definitions\nexport { defineComponents } from '#internals/definitions/defineComponents.js';\nexport { defineAllComponents } from '#internals/definitions/defineAllComponents.js';\n\n// icon registration\nexport {\n registerIcon,\n registerIconFromText,\n setIconRef,\n} from './components/icon/icon.registry.js';\n\n// theming configuration\nexport { configureTheme } from '#theming/config.js';\nexport type { Theme, ThemeVariant } from '#theming/types.js';\n\n// localization objects\nexport {\n IgcCalendarResourceStringEN,\n type IgcCalendarResourceStrings,\n} from '#internals/i18n/EN/calendar.resources.js';\nexport {\n IgcDateRangePickerResourceStringsEN,\n type IgcDateRangePickerResourceStrings,\n} from '#internals/i18n/EN/date-range-picker.resources.js';\nexport {\n IgcChatResourceStringEN,\n type IgcChatResourceStrings,\n} from '#internals/i18n/EN/chat.resources.js';\nexport {\n type ICalendarResourceStrings,\n type ICarouselResourceStrings,\n type IChatResourceStrings,\n type IChipResourceStrings,\n type IComboResourceStrings,\n type IDatePickerResourceStrings,\n type IDateRangePickerResourceStrings,\n type IFileInputResourceStrings,\n type ITreeResourceStrings,\n CalendarResourceStringsEN,\n CarouselResourceStringsEN,\n ChatResourceStringsEN,\n ChipResourceStringsEN,\n ComboResourceStringsEN,\n DatePickerResourceStringsEN,\n DateRangePickerResourceStringsEN,\n FileInputResourceStringsEN,\n TreeResourceStringsEN,\n registerI18n,\n setCurrentI18n,\n} from 'igniteui-i18n-core';\n\n// Event maps\nexport type { IgcBannerComponentEventMap } from './components/banner/banner.js';\nexport type { IgcButtonGroupComponentEventMap } from './components/button-group/button-group.js';\nexport type { IgcCalendarComponentEventMap } from './components/calendar/types.js';\nexport type { IgcCarouselComponentEventMap } from './components/carousel/carousel.js';\nexport type { IgcChatComponentEventMap } from './components/chat/chat.js';\nexport type { IgcCheckboxComponentEventMap } from './components/checkbox/checkbox-base.js';\nexport type { IgcCheckboxComponentEventMap as IgcSwitchComponentEventMap } from './components/checkbox/checkbox-base.js';\nexport type { IgcChipComponentEventMap } from './components/chip/chip.js';\nexport type { IgcComboComponentEventMap } from './components/combo/types.js';\nexport type { IgcColorPickerComponentEventMap } from './components/color-picker/color-picker.js';\nexport type { IgcDatePickerComponentEventMap } from './components/date-picker/date-picker.js';\nexport type { IgcDateRangePickerComponentEventMap } from './components/date-range-picker/date-range-picker.js';\nexport type { IgcDateTimeInputComponentEventMap } from './components/date-time-input/date-time-input.js';\nexport type { IgcDialogComponentEventMap } from './components/dialog/dialog.js';\nexport type { IgcDropdownComponentEventMap } from './components/dropdown/dropdown.js';\nexport type { IgcExpansionPanelComponentEventMap } from './components/expansion-panel/expansion-panel.js';\nexport type { IgcInputComponentEventMap } from './components/input/input-base.js';\nexport type { IgcInputComponentEventMap as IgcMaskInputComponentEventMap } from './components/input/input-base.js';\nexport type { IgcNavDrawerComponentEventMap } from './components/nav-drawer/nav-drawer.js';\nexport type { IgcFileInputComponentEventMap } from './components/file-input/file-input.js';\nexport type { IgcRadioComponentEventMap } from './components/radio/radio.js';\nexport type { IgcRatingComponentEventMap } from './components/rating/rating.js';\nexport type { IgcSelectComponentEventMap } from './components/select/select.js';\nexport type { IgcSliderComponentEventMap } from './components/slider/slider.js';\nexport type { IgcRangeSliderComponentEventMap } from './components/slider/range-slider.js';\nexport type { IgcSnackbarComponentEventMap } from './components/snackbar/snackbar.js';\nexport type { IgcSplitterComponentEventMap } from './components/splitter/splitter.js';\nexport type { IgcStepperComponentEventMap } from './components/stepper/common/types.js';\nexport type { IgcTabsComponentEventMap } from './components/tabs/tabs.js';\nexport type { IgcTextareaComponentEventMap } from './components/textarea/textarea.js';\nexport type { IgcTileComponentEventMap } from './components/tile-manager/tile.js';\nexport type { IgcTreeComponentEventMap } from './components/tree/tree.common.js';\nexport type { IgcTooltipComponentEventMap } from './components/tooltip/tooltip.js';\n\n// Public types\nexport type * from './components/types.js';\nexport type { IgcTileChangeStateEventArgs } from './components/tile-manager/tile.js';\nexport type {\n CalendarActiveView,\n CalendarHeaderOrientation,\n CalendarSelection,\n DateRangeDescriptor,\n WeekDays,\n} from './components/calendar/types.js';\nexport { DateRangeType } from './components/calendar/types.js';\nexport type { IgcCheckboxChangeEventArgs } from './components/checkbox/checkbox-base.js';\nexport { DatePart } from './components/date-time-input/date-part.js';\nexport type { DatePartDeltas } from './components/date-time-input/date-part.js';\nexport type {\n CustomDateRange,\n DateRangeValue,\n} from './components/date-range-picker/date-range-picker.js';\nexport type { PopoverPlacement } from './components/popover/popover.js';\nexport type { IgcRadioChangeEventArgs } from './components/radio/radio.js';\nexport type { IgcRangeSliderValueEventArgs } from './components/slider/range-slider.js';\nexport type {\n IgcSplitterResizeEventArgs,\n IgcSplitterResizeEventDetail,\n IgcSplitterLayoutChangedEventArgs,\n} from './components/splitter/splitter.js';\nexport type {\n IgcActiveStepChangingEventArgs,\n IgcActiveStepChangedEventArgs,\n} from './components/stepper/common/types.js';\nexport type { IgcTreeSelectionEventArgs } from './components/tree/tree.common.js';\nexport type {\n ComboItemTemplate,\n ComboTemplateProps,\n FilteringOptions,\n GroupingDirection,\n IgcComboChangeEventArgs,\n} from './components/combo/types.js';\nexport type {\n IconMeta,\n RegisterIconOptions,\n} from './components/icon/registry/types.js';\nexport type * from './components/chat/types.js';\nexport type {\n QrErrorCorrectionLevel,\n QrDotStyle,\n QrCornerSquareStyle,\n} from './components/qr-code/types.js';\n\n// Internal exports for other packages\n/** @hidden @internal */\nexport { addThemingController as θaddThemingController } from '#theming/theming-controller.js';\n\n/** @hidden @internal */\nexport { addAdoptedStylesController as θaddAdoptedStylesController } from '#internals/controllers/adopt-styles.js';\n\n/** @hidden @internal */\nexport { createAbortHandle as θcreateAbortHandle } from '#internals/abort-handler.js';\n"]}
@@ -0,0 +1,144 @@
1
+ import { AsyncDirective, type DirectiveParameters, type ElementPart, type PartInfo } from 'lit/async-directive.js';
2
+ export type DragMode = 'immediate' | 'deferred';
3
+ export type DragPointerDirection = 'start' | 'end' | 'top' | 'bottom';
4
+ export type DragGhostFactory = (initial: DOMRect) => HTMLElement;
5
+ export type DragCallback = (params: DragCallbackParams) => unknown;
6
+ export type DragCancelCallback = (state: DragState) => unknown;
7
+ type Point = {
8
+ x: number;
9
+ y: number;
10
+ };
11
+ export type DragState = {
12
+ /** The bounding rectangle of the drag target at the start of the operation. */
13
+ initial: DOMRect;
14
+ /** The current bounding rectangle of the drag target. */
15
+ current: DOMRect;
16
+ /** The current position of the dragged element relative to its containing layer. */
17
+ position: Point;
18
+ /** Offset between the drag target origin and the pointer position at the start of the operation. */
19
+ offset: Point;
20
+ /** Pointer positions and movement direction for the current operation. */
21
+ pointerState: {
22
+ previous: Point;
23
+ current: Point;
24
+ direction: DragPointerDirection;
25
+ };
26
+ /** The ghost element when in deferred mode. */
27
+ ghost: HTMLElement | null;
28
+ /** The current element matched through the `matchTarget` callback, if any. */
29
+ element: Element | null;
30
+ };
31
+ export type DragCallbackParams = {
32
+ event: PointerEvent;
33
+ state: DragState;
34
+ };
35
+ /** Options for the draggable directive. */
36
+ export interface DraggableOptions {
37
+ /** Whether the directive will listen for and initiate drag operations. Defaults to `true`. */
38
+ enabled?: boolean;
39
+ /**
40
+ * The mode of the drag operation.
41
+ *
42
+ * In `immediate` mode the target element is moved in place as the pointer moves.
43
+ * In `deferred` mode a ghost element is created and moved instead, keeping the
44
+ * target element at its place until the operation completes.
45
+ *
46
+ * Defaults to `deferred`.
47
+ */
48
+ mode?: DragMode;
49
+ /** Whether the dragged element's top left corner snaps to the cursor position at the start of the operation. */
50
+ snapToCursor?: boolean;
51
+ /**
52
+ * The element being dragged. It captures the pointer events for the operation.
53
+ * Defaults to the element the directive is applied to.
54
+ *
55
+ * Accepts either an element or a function returning one, resolved when
56
+ * the directive options are applied.
57
+ */
58
+ target?: HTMLElement | (() => HTMLElement | null | undefined);
59
+ /**
60
+ * When provided, a drag operation only starts if the returned element is in the
61
+ * composed path of the initiating pointer event.
62
+ */
63
+ trigger?: () => HTMLElement | null | undefined;
64
+ /** Guard invoked on the initiating pointer event. Returning `true` skips the drag operation. */
65
+ skip?: (event: PointerEvent) => boolean;
66
+ /**
67
+ * Predicate invoked with the elements under the pointer while dragging.
68
+ * The first matching element is exposed as `state.element` and drives the
69
+ * `enter`, `leave` and `over` callbacks.
70
+ */
71
+ matchTarget?: (element: Element) => boolean;
72
+ /** Factory function for the ghost element in deferred mode. */
73
+ ghostFactory?: DragGhostFactory;
74
+ /** The container in which the deferred ghost element is rendered. Defaults to the document body. */
75
+ layer?: () => HTMLElement;
76
+ /** Called when a drag operation starts. Return `false` to abort the operation. */
77
+ start?: DragCallback;
78
+ /** Called on each pointer move during a drag operation. */
79
+ move?: DragCallback;
80
+ /** Called when the pointer enters an element matched through `matchTarget`. */
81
+ enter?: DragCallback;
82
+ /** Called when the pointer leaves the currently matched element. */
83
+ leave?: DragCallback;
84
+ /** Called while the pointer moves over the currently matched element. */
85
+ over?: DragCallback;
86
+ /** Called when a drag operation completes. */
87
+ end?: DragCallback;
88
+ /** Called when a drag operation is cancelled with the Escape key. */
89
+ cancel?: DragCancelCallback;
90
+ }
91
+ declare class DraggableDirective extends AsyncDirective {
92
+ private readonly _triggerAbort;
93
+ private readonly _dragAbort;
94
+ private _options;
95
+ private _host?;
96
+ private _target;
97
+ private _operation;
98
+ constructor(partInfo: PartInfo);
99
+ private get _enabled();
100
+ private get _isDeferred();
101
+ /** The element being moved around - the ghost in deferred mode, otherwise the drag target. */
102
+ private get _dragItem();
103
+ private readonly _handlePointerDown;
104
+ private readonly _handlePointerMove;
105
+ private readonly _handlePointerEnd;
106
+ private readonly _handleKeydown;
107
+ /** Prevents native drag and touch interactions from interfering with an enabled directive. */
108
+ private readonly _preventNativeBehavior;
109
+ private _attachTriggerListeners;
110
+ private _startOperation;
111
+ private _resolveTarget;
112
+ private _resolveLayer;
113
+ private _shouldSkip;
114
+ private _createGhost;
115
+ private _createState;
116
+ private _createParams;
117
+ private _updatePosition;
118
+ private _updatePointerState;
119
+ private _updateMatcher;
120
+ private _assignPosition;
121
+ /**
122
+ * Toggles touch action, user and text selection for the duration of a drag operation.
123
+ *
124
+ * @remarks
125
+ * Disabling `user-select` only on the dragged element is not enough, since browsers
126
+ * (notably Safari) will still create a text selection in whatever elements sit under
127
+ * the pointer while dragging. Applying it to the owner document's body prevents that
128
+ * across the page for the active drag and is reverted once the operation completes.
129
+ */
130
+ private _setDragStyles;
131
+ /** Stops the current drag operation, cleaning up the ghost element and event listeners. */
132
+ private _dispose;
133
+ protected reconnected(): void;
134
+ protected disconnected(): void;
135
+ update(part: ElementPart, [options]: DirectiveParameters<this>): symbol;
136
+ render(_options?: DraggableOptions): symbol;
137
+ }
138
+ /**
139
+ * A directive that makes an element draggable, either in place or through
140
+ * a deferred ghost element, with optional hit-testing against other elements
141
+ * while dragging.
142
+ */
143
+ export declare const draggable: (_options?: DraggableOptions | undefined) => import("lit-html/directive.js").DirectiveResult<typeof DraggableDirective>;
144
+ export {};
@@ -0,0 +1,278 @@
1
+ import { noChange } from 'lit';
2
+ import { AsyncDirective, directive, PartType, } from 'lit/async-directive.js';
3
+ import { createAbortHandle } from '../abort-handler.js';
4
+ import { escapeKey, isKey } from '../controllers/key-bindings.js';
5
+ import { getDefaultLayer, getRoot, isLTR, roundByDPR, setStyles, } from '../utils/dom.js';
6
+ import { getElementFromPath, preventDefault } from '../utils/events.js';
7
+ function createDefaultGhost({ width, height }) {
8
+ const element = document.createElement('div');
9
+ setStyles(element, {
10
+ position: 'absolute',
11
+ left: '0',
12
+ top: '0',
13
+ width: `${width}px`,
14
+ height: `${height}px`,
15
+ zIndex: '1000',
16
+ background: 'gold',
17
+ });
18
+ return element;
19
+ }
20
+ class DraggableDirective extends AsyncDirective {
21
+ constructor(partInfo) {
22
+ super(partInfo);
23
+ this._triggerAbort = createAbortHandle();
24
+ this._dragAbort = createAbortHandle();
25
+ this._options = {};
26
+ this._target = null;
27
+ this._operation = null;
28
+ this._handlePointerDown = (event) => {
29
+ if (!this._enabled ||
30
+ event.button !== 0 ||
31
+ this._operation ||
32
+ this._shouldSkip(event)) {
33
+ return;
34
+ }
35
+ const target = this._target;
36
+ const initial = target.getBoundingClientRect();
37
+ const { pointerId, clientX, clientY } = event;
38
+ this._operation = {
39
+ pointerId,
40
+ target,
41
+ initial,
42
+ current: structuredClone(initial),
43
+ position: { x: initial.x, y: initial.y },
44
+ offset: { x: initial.x - clientX, y: initial.y - clientY },
45
+ pointerState: {
46
+ previous: { x: clientX, y: clientY },
47
+ current: { x: clientX, y: clientY },
48
+ direction: 'end',
49
+ },
50
+ ghost: this._isDeferred ? this._createGhost(initial) : null,
51
+ matchedElement: null,
52
+ targetTransform: target.style.transform,
53
+ };
54
+ this._updatePosition(event);
55
+ if (this._options.start?.(this._createParams(event)) === false) {
56
+ this._dispose();
57
+ return;
58
+ }
59
+ this._assignPosition(this._dragItem);
60
+ this._startOperation(event);
61
+ };
62
+ this._handlePointerMove = (event) => {
63
+ if (!this._operation) {
64
+ return;
65
+ }
66
+ this._updatePosition(event);
67
+ this._updatePointerState(event);
68
+ this._updateMatcher(event);
69
+ this._options.move?.(this._createParams(event));
70
+ this._assignPosition(this._dragItem);
71
+ };
72
+ this._handlePointerEnd = (event) => {
73
+ if (!this._operation) {
74
+ return;
75
+ }
76
+ this._options.end?.(this._createParams(event));
77
+ this._dispose();
78
+ };
79
+ this._handleKeydown = (event) => {
80
+ if (!this._operation || !isKey(event, escapeKey)) {
81
+ return;
82
+ }
83
+ this._options.cancel?.(this._createState());
84
+ if (!this._isDeferred) {
85
+ this._operation.target.style.transform = this._operation.targetTransform;
86
+ }
87
+ this._dispose();
88
+ };
89
+ this._preventNativeBehavior = (event) => {
90
+ if (this._enabled) {
91
+ event.preventDefault();
92
+ }
93
+ };
94
+ if (partInfo.type !== PartType.ELEMENT) {
95
+ throw new Error('The `draggable` directive can only be used on elements.');
96
+ }
97
+ }
98
+ get _enabled() {
99
+ return this._options.enabled ?? true;
100
+ }
101
+ get _isDeferred() {
102
+ return (this._options.mode ?? 'deferred') === 'deferred';
103
+ }
104
+ get _dragItem() {
105
+ return this._isDeferred ? this._operation.ghost : this._operation.target;
106
+ }
107
+ _attachTriggerListeners() {
108
+ const target = this._resolveTarget();
109
+ if (!target) {
110
+ return;
111
+ }
112
+ if (target !== this._target) {
113
+ this._triggerAbort.abort();
114
+ this._target = target;
115
+ }
116
+ const { signal } = this._triggerAbort;
117
+ target.addEventListener('pointerdown', this._handlePointerDown, {
118
+ signal,
119
+ });
120
+ target.addEventListener('dragstart', this._preventNativeBehavior, {
121
+ signal,
122
+ });
123
+ target.addEventListener('touchstart', this._preventNativeBehavior, {
124
+ passive: false,
125
+ signal,
126
+ });
127
+ }
128
+ _startOperation({ pointerId }) {
129
+ const { target } = this._operation;
130
+ const { signal } = this._dragAbort;
131
+ this._setDragStyles(true);
132
+ target.setPointerCapture(pointerId);
133
+ target.addEventListener('pointermove', this._handlePointerMove, {
134
+ signal,
135
+ });
136
+ target.addEventListener('lostpointercapture', this._handlePointerEnd, {
137
+ signal,
138
+ });
139
+ target.addEventListener('contextmenu', preventDefault, { signal });
140
+ globalThis.addEventListener('keydown', this._handleKeydown, { signal });
141
+ }
142
+ _resolveTarget() {
143
+ const { target } = this._options;
144
+ return ((typeof target === 'function' ? target() : target) ?? this._host ?? null);
145
+ }
146
+ _resolveLayer() {
147
+ return this._options.layer?.() ?? getDefaultLayer();
148
+ }
149
+ _shouldSkip(event) {
150
+ if (this._options.skip?.(event)) {
151
+ return true;
152
+ }
153
+ const trigger = this._options.trigger?.();
154
+ return trigger ? !getElementFromPath((e) => e === trigger, event) : false;
155
+ }
156
+ _createGhost(initial) {
157
+ const ghost = this._options.ghostFactory?.(initial) ?? createDefaultGhost(initial);
158
+ ghost.setAttribute('data-drag-ghost', '');
159
+ this._resolveLayer().append(ghost);
160
+ return ghost;
161
+ }
162
+ _createState() {
163
+ const { initial, current, position, offset, pointerState, ghost, matchedElement, } = this._operation;
164
+ return {
165
+ initial,
166
+ current,
167
+ position,
168
+ offset,
169
+ pointerState,
170
+ ghost,
171
+ element: matchedElement,
172
+ };
173
+ }
174
+ _createParams(event) {
175
+ return { event, state: this._createState() };
176
+ }
177
+ _updatePosition({ clientX, clientY }) {
178
+ const operation = this._operation;
179
+ const { x: layerX, y: layerY } = this._isDeferred
180
+ ? this._resolveLayer().getBoundingClientRect()
181
+ : operation.initial;
182
+ const { x, y } = this._options.snapToCursor
183
+ ? { x: 0, y: 0 }
184
+ : operation.offset;
185
+ operation.position = {
186
+ x: clientX - layerX + x,
187
+ y: clientY - layerY + y,
188
+ };
189
+ }
190
+ _updatePointerState({ clientX, clientY }) {
191
+ const state = this._operation.pointerState;
192
+ state.previous = { ...state.current };
193
+ state.current = { x: clientX, y: clientY };
194
+ const dx = state.current.x - state.previous.x;
195
+ const dy = state.current.y - state.previous.y;
196
+ if (Math.abs(dx) >= Math.abs(dy)) {
197
+ const swapHorizontal = isLTR(this._operation.target) ? dx >= 0 : dx <= 0;
198
+ state.direction = swapHorizontal ? 'end' : 'start';
199
+ }
200
+ else {
201
+ state.direction = dy >= 0 ? 'bottom' : 'top';
202
+ }
203
+ }
204
+ _updateMatcher(event) {
205
+ const { matchTarget } = this._options;
206
+ if (!matchTarget) {
207
+ return;
208
+ }
209
+ const operation = this._operation;
210
+ const match = getRoot(operation.target)
211
+ .elementsFromPoint(event.clientX, event.clientY)
212
+ .find((element) => matchTarget(element));
213
+ if (match && !operation.matchedElement) {
214
+ operation.matchedElement = match;
215
+ this._options.enter?.(this._createParams(event));
216
+ return;
217
+ }
218
+ if (!match && operation.matchedElement) {
219
+ this._options.leave?.(this._createParams(event));
220
+ operation.matchedElement = null;
221
+ return;
222
+ }
223
+ if (match && match === operation.matchedElement) {
224
+ this._options.over?.(this._createParams(event));
225
+ }
226
+ }
227
+ _assignPosition(element) {
228
+ const { x, y } = this._operation.position;
229
+ element.style.transform = `translate3d(${roundByDPR(x)}px,${roundByDPR(y)}px,0)`;
230
+ }
231
+ _setDragStyles(active) {
232
+ const value = active ? 'none' : '';
233
+ const { target } = this._operation;
234
+ const doc = target.ownerDocument;
235
+ setStyles(target, {
236
+ touchAction: value,
237
+ userSelect: value,
238
+ webkitUserSelect: value,
239
+ });
240
+ setStyles(doc.body, { userSelect: value, webkitUserSelect: value });
241
+ if (active) {
242
+ doc.getSelection()?.removeAllRanges();
243
+ }
244
+ }
245
+ _dispose() {
246
+ this._dragAbort.abort();
247
+ if (this._operation) {
248
+ const { pointerId, target, ghost } = this._operation;
249
+ this._setDragStyles(false);
250
+ if (target.hasPointerCapture(pointerId)) {
251
+ target.releasePointerCapture(pointerId);
252
+ }
253
+ ghost?.remove();
254
+ this._operation = null;
255
+ }
256
+ }
257
+ reconnected() {
258
+ this._attachTriggerListeners();
259
+ }
260
+ disconnected() {
261
+ this._dispose();
262
+ this._triggerAbort.abort();
263
+ this._target = null;
264
+ }
265
+ update(part, [options]) {
266
+ if (this.isConnected) {
267
+ this._host = part.element;
268
+ this._options = options ?? {};
269
+ this._attachTriggerListeners();
270
+ }
271
+ return noChange;
272
+ }
273
+ render(_options) {
274
+ return noChange;
275
+ }
276
+ }
277
+ export const draggable = directive(DraggableDirective);
278
+ //# sourceMappingURL=drag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drag.js","sourceRoot":"","sources":["../../../src/internals/directives/drag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,EACL,cAAc,EACd,SAAS,EAIT,QAAQ,GACT,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,iBAAiB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AAC;QAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC;IAEe,MAAM,CACpB,IAAiB,EACjB,CAAC,OAAO,CAA4B;QAEpC,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAsB,CAAC;YACzC,IAAI,CAAC,QAAQ,GAAG,OAAO,IAAI,EAAE,CAAC;YAC9B,IAAI,CAAC,uBAAuB,EAAE,CAAC;QACjC,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAEM,MAAM,CAAC,QAA2B;QACvC,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAOD,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import { noChange } from 'lit';\nimport {\n AsyncDirective,\n directive,\n type DirectiveParameters,\n type ElementPart,\n type PartInfo,\n PartType,\n} from 'lit/async-directive.js';\nimport { createAbortHandle } from '../abort-handler.js';\nimport { escapeKey, isKey } from '../controllers/key-bindings.js';\nimport {\n getDefaultLayer,\n getRoot,\n isLTR,\n roundByDPR,\n setStyles,\n} from '../utils/dom.js';\nimport { getElementFromPath, preventDefault } from '../utils/events.js';\n\nexport type DragMode = 'immediate' | 'deferred';\nexport type DragPointerDirection = 'start' | 'end' | 'top' | 'bottom';\nexport type DragGhostFactory = (initial: DOMRect) => HTMLElement;\nexport type DragCallback = (params: DragCallbackParams) => unknown;\nexport type DragCancelCallback = (state: DragState) => unknown;\n\ntype Point = { x: number; y: number };\n\nexport type DragState = {\n /** The bounding rectangle of the drag target at the start of the operation. */\n initial: DOMRect;\n /** The current bounding rectangle of the drag target. */\n current: DOMRect;\n /** The current position of the dragged element relative to its containing layer. */\n position: Point;\n /** Offset between the drag target origin and the pointer position at the start of the operation. */\n offset: Point;\n /** Pointer positions and movement direction for the current operation. */\n pointerState: {\n previous: Point;\n current: Point;\n direction: DragPointerDirection;\n };\n /** The ghost element when in deferred mode. */\n ghost: HTMLElement | null;\n /** The current element matched through the `matchTarget` callback, if any. */\n element: Element | null;\n};\n\nexport type DragCallbackParams = {\n event: PointerEvent;\n state: DragState;\n};\n\n/** Options for the draggable directive. */\nexport interface DraggableOptions {\n /** Whether the directive will listen for and initiate drag operations. Defaults to `true`. */\n enabled?: boolean;\n /**\n * The mode of the drag operation.\n *\n * In `immediate` mode the target element is moved in place as the pointer moves.\n * In `deferred` mode a ghost element is created and moved instead, keeping the\n * target element at its place until the operation completes.\n *\n * Defaults to `deferred`.\n */\n mode?: DragMode;\n /** Whether the dragged element's top left corner snaps to the cursor position at the start of the operation. */\n snapToCursor?: boolean;\n /**\n * The element being dragged. It captures the pointer events for the operation.\n * Defaults to the element the directive is applied to.\n *\n * Accepts either an element or a function returning one, resolved when\n * the directive options are applied.\n */\n target?: HTMLElement | (() => HTMLElement | null | undefined);\n /**\n * When provided, a drag operation only starts if the returned element is in the\n * composed path of the initiating pointer event.\n */\n trigger?: () => HTMLElement | null | undefined;\n /** Guard invoked on the initiating pointer event. Returning `true` skips the drag operation. */\n skip?: (event: PointerEvent) => boolean;\n /**\n * Predicate invoked with the elements under the pointer while dragging.\n * The first matching element is exposed as `state.element` and drives the\n * `enter`, `leave` and `over` callbacks.\n */\n matchTarget?: (element: Element) => boolean;\n /** Factory function for the ghost element in deferred mode. */\n ghostFactory?: DragGhostFactory;\n /** The container in which the deferred ghost element is rendered. Defaults to the document body. */\n layer?: () => HTMLElement;\n /** Called when a drag operation starts. Return `false` to abort the operation. */\n start?: DragCallback;\n /** Called on each pointer move during a drag operation. */\n move?: DragCallback;\n /** Called when the pointer enters an element matched through `matchTarget`. */\n enter?: DragCallback;\n /** Called when the pointer leaves the currently matched element. */\n leave?: DragCallback;\n /** Called while the pointer moves over the currently matched element. */\n over?: DragCallback;\n /** Called when a drag operation completes. */\n end?: DragCallback;\n /** Called when a drag operation is cancelled with the Escape key. */\n cancel?: DragCancelCallback;\n}\n\ntype DragOperation = {\n pointerId: number;\n target: HTMLElement;\n initial: DOMRect;\n current: DOMRect;\n position: Point;\n offset: Point;\n pointerState: DragState['pointerState'];\n ghost: HTMLElement | null;\n matchedElement: Element | null;\n /** Inline transform of the target before the operation, restored on cancel. */\n targetTransform: string;\n};\n\nfunction createDefaultGhost({ width, height }: DOMRect): HTMLElement {\n const element = document.createElement('div');\n\n // Anchored at the layer origin; the directive positions it via `translate3d`.\n setStyles(element, {\n position: 'absolute',\n left: '0',\n top: '0',\n width: `${width}px`,\n height: `${height}px`,\n zIndex: '1000',\n background: 'gold',\n });\n\n return element;\n}\n\nclass DraggableDirective extends AsyncDirective {\n private readonly _triggerAbort = createAbortHandle();\n private readonly _dragAbort = createAbortHandle();\n\n private _options: DraggableOptions = {};\n private _host?: HTMLElement;\n private _target: HTMLElement | null = null;\n private _operation: DragOperation | null = null;\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n\n if (partInfo.type !== PartType.ELEMENT) {\n throw new Error(\n 'The `draggable` directive can only be used on elements.'\n );\n }\n }\n\n private get _enabled(): boolean {\n return this._options.enabled ?? true;\n }\n\n private get _isDeferred(): boolean {\n return (this._options.mode ?? 'deferred') === 'deferred';\n }\n\n /** The element being moved around - the ghost in deferred mode, otherwise the drag target. */\n private get _dragItem(): HTMLElement {\n return this._isDeferred ? this._operation!.ghost! : this._operation!.target;\n }\n\n // #region Event handlers\n\n private readonly _handlePointerDown = (event: PointerEvent): void => {\n if (\n !this._enabled ||\n event.button !== 0 ||\n this._operation ||\n this._shouldSkip(event)\n ) {\n return;\n }\n\n const target = this._target!;\n const initial = target.getBoundingClientRect();\n const { pointerId, clientX, clientY } = event;\n\n this._operation = {\n pointerId,\n target,\n initial,\n current: structuredClone(initial),\n position: { x: initial.x, y: initial.y },\n offset: { x: initial.x - clientX, y: initial.y - clientY },\n pointerState: {\n previous: { x: clientX, y: clientY },\n current: { x: clientX, y: clientY },\n direction: 'end',\n },\n ghost: this._isDeferred ? this._createGhost(initial) : null,\n matchedElement: null,\n targetTransform: target.style.transform,\n };\n\n this._updatePosition(event);\n\n if (this._options.start?.(this._createParams(event)) === false) {\n this._dispose();\n return;\n }\n\n this._assignPosition(this._dragItem);\n this._startOperation(event);\n };\n\n private readonly _handlePointerMove = (event: PointerEvent): void => {\n if (!this._operation) {\n return;\n }\n\n this._updatePosition(event);\n this._updatePointerState(event);\n this._updateMatcher(event);\n\n this._options.move?.(this._createParams(event));\n\n this._assignPosition(this._dragItem);\n };\n\n private readonly _handlePointerEnd = (event: PointerEvent): void => {\n if (!this._operation) {\n return;\n }\n\n this._options.end?.(this._createParams(event));\n this._dispose();\n };\n\n private readonly _handleKeydown = (event: KeyboardEvent): void => {\n if (!this._operation || !isKey(event, escapeKey)) {\n return;\n }\n\n this._options.cancel?.(this._createState());\n\n if (!this._isDeferred) {\n this._operation.target.style.transform = this._operation.targetTransform;\n }\n\n this._dispose();\n };\n\n /** Prevents native drag and touch interactions from interfering with an enabled directive. */\n private readonly _preventNativeBehavior = (event: Event): void => {\n if (this._enabled) {\n event.preventDefault();\n }\n };\n\n // #endregion\n\n // #region Internal API\n\n private _attachTriggerListeners(): void {\n const target = this._resolveTarget();\n if (!target) {\n return;\n }\n\n if (target !== this._target) {\n this._triggerAbort.abort();\n this._target = target;\n }\n\n const { signal } = this._triggerAbort;\n\n target.addEventListener('pointerdown', this._handlePointerDown, {\n signal,\n });\n target.addEventListener('dragstart', this._preventNativeBehavior, {\n signal,\n });\n target.addEventListener('touchstart', this._preventNativeBehavior, {\n passive: false,\n signal,\n });\n }\n\n private _startOperation({ pointerId }: PointerEvent): void {\n const { target } = this._operation!;\n const { signal } = this._dragAbort;\n\n this._setDragStyles(true);\n\n target.setPointerCapture(pointerId);\n target.addEventListener('pointermove', this._handlePointerMove, {\n signal,\n });\n target.addEventListener('lostpointercapture', this._handlePointerEnd, {\n signal,\n });\n target.addEventListener('contextmenu', preventDefault, { signal });\n globalThis.addEventListener('keydown', this._handleKeydown, { signal });\n }\n\n private _resolveTarget(): HTMLElement | null {\n const { target } = this._options;\n return (\n (typeof target === 'function' ? target() : target) ?? this._host ?? null\n );\n }\n\n private _resolveLayer(): HTMLElement {\n return this._options.layer?.() ?? getDefaultLayer();\n }\n\n private _shouldSkip(event: PointerEvent): boolean {\n if (this._options.skip?.(event)) {\n return true;\n }\n\n const trigger = this._options.trigger?.();\n return trigger ? !getElementFromPath((e) => e === trigger, event) : false;\n }\n\n private _createGhost(initial: DOMRect): HTMLElement {\n const ghost =\n this._options.ghostFactory?.(initial) ?? createDefaultGhost(initial);\n\n ghost.setAttribute('data-drag-ghost', '');\n this._resolveLayer().append(ghost);\n return ghost;\n }\n\n private _createState(): DragState {\n const {\n initial,\n current,\n position,\n offset,\n pointerState,\n ghost,\n matchedElement,\n } = this._operation!;\n\n return {\n initial,\n current,\n position,\n offset,\n pointerState,\n ghost,\n element: matchedElement,\n };\n }\n\n private _createParams(event: PointerEvent): DragCallbackParams {\n return { event, state: this._createState() };\n }\n\n private _updatePosition({ clientX, clientY }: PointerEvent): void {\n const operation = this._operation!;\n const { x: layerX, y: layerY } = this._isDeferred\n ? this._resolveLayer().getBoundingClientRect()\n : operation.initial;\n const { x, y } = this._options.snapToCursor\n ? { x: 0, y: 0 }\n : operation.offset;\n\n operation.position = {\n x: clientX - layerX + x,\n y: clientY - layerY + y,\n };\n }\n\n private _updatePointerState({ clientX, clientY }: PointerEvent): void {\n const state = this._operation!.pointerState;\n\n state.previous = { ...state.current };\n state.current = { x: clientX, y: clientY };\n\n const dx = state.current.x - state.previous.x;\n const dy = state.current.y - state.previous.y;\n\n if (Math.abs(dx) >= Math.abs(dy)) {\n const swapHorizontal = isLTR(this._operation!.target) ? dx >= 0 : dx <= 0;\n state.direction = swapHorizontal ? 'end' : 'start';\n } else {\n state.direction = dy >= 0 ? 'bottom' : 'top';\n }\n }\n\n private _updateMatcher(event: PointerEvent): void {\n const { matchTarget } = this._options;\n if (!matchTarget) {\n return;\n }\n\n const operation = this._operation!;\n const match = getRoot(operation.target)\n .elementsFromPoint(event.clientX, event.clientY)\n .find((element) => matchTarget(element));\n\n if (match && !operation.matchedElement) {\n operation.matchedElement = match;\n this._options.enter?.(this._createParams(event));\n return;\n }\n\n if (!match && operation.matchedElement) {\n this._options.leave?.(this._createParams(event));\n operation.matchedElement = null;\n return;\n }\n\n if (match && match === operation.matchedElement) {\n this._options.over?.(this._createParams(event));\n }\n }\n\n private _assignPosition(element: HTMLElement): void {\n const { x, y } = this._operation!.position;\n element.style.transform = `translate3d(${roundByDPR(x)}px,${roundByDPR(y)}px,0)`;\n }\n\n /**\n * Toggles touch action, user and text selection for the duration of a drag operation.\n *\n * @remarks\n * Disabling `user-select` only on the dragged element is not enough, since browsers\n * (notably Safari) will still create a text selection in whatever elements sit under\n * the pointer while dragging. Applying it to the owner document's body prevents that\n * across the page for the active drag and is reverted once the operation completes.\n */\n private _setDragStyles(active: boolean): void {\n const value = active ? 'none' : '';\n const { target } = this._operation!;\n const doc = target.ownerDocument;\n\n setStyles(target, {\n touchAction: value,\n userSelect: value,\n webkitUserSelect: value,\n });\n setStyles(doc.body, { userSelect: value, webkitUserSelect: value });\n\n if (active) {\n doc.getSelection()?.removeAllRanges();\n }\n }\n\n /** Stops the current drag operation, cleaning up the ghost element and event listeners. */\n private _dispose(): void {\n this._dragAbort.abort();\n\n if (this._operation) {\n const { pointerId, target, ghost } = this._operation;\n\n this._setDragStyles(false);\n\n if (target.hasPointerCapture(pointerId)) {\n target.releasePointerCapture(pointerId);\n }\n\n ghost?.remove();\n this._operation = null;\n }\n }\n\n // #endregion\n\n protected override reconnected(): void {\n this._attachTriggerListeners();\n }\n\n protected override disconnected(): void {\n this._dispose();\n this._triggerAbort.abort();\n this._target = null;\n }\n\n public override update(\n part: ElementPart,\n [options]: DirectiveParameters<this>\n ) {\n if (this.isConnected) {\n this._host = part.element as HTMLElement;\n this._options = options ?? {};\n this._attachTriggerListeners();\n }\n return noChange;\n }\n\n public render(_options?: DraggableOptions) {\n return noChange;\n }\n}\n\n/**\n * A directive that makes an element draggable, either in place or through\n * a deferred ghost element, with optional hit-testing against other elements\n * while dragging.\n */\nexport const draggable = directive(DraggableDirective);\n"]}