@keenthemes/ktui 1.0.29 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/README.md +27 -0
  2. package/dist/ktui.js +8780 -6199
  3. package/dist/ktui.min.js +1 -1
  4. package/dist/ktui.min.js.map +1 -1
  5. package/dist/styles.css +2744 -1367
  6. package/lib/cjs/components/alert/alert.js +1025 -0
  7. package/lib/cjs/components/alert/alert.js.map +1 -0
  8. package/lib/cjs/components/alert/index.js +20 -0
  9. package/lib/cjs/components/alert/index.js.map +1 -0
  10. package/lib/cjs/components/alert/templates.js +120 -0
  11. package/lib/cjs/components/alert/templates.js.map +1 -0
  12. package/lib/cjs/components/alert/types.js +7 -0
  13. package/lib/cjs/components/alert/types.js.map +1 -0
  14. package/lib/cjs/components/datepicker/config/config.js +42 -0
  15. package/lib/cjs/components/datepicker/config/config.js.map +1 -0
  16. package/lib/cjs/components/datepicker/config/index.js +24 -0
  17. package/lib/cjs/components/datepicker/config/index.js.map +1 -0
  18. package/lib/cjs/components/datepicker/config/interfaces.js +7 -0
  19. package/lib/cjs/components/datepicker/config/interfaces.js.map +1 -0
  20. package/lib/cjs/components/datepicker/config/types.js +7 -0
  21. package/lib/cjs/components/datepicker/config/types.js.map +1 -0
  22. package/lib/cjs/components/datepicker/core/event-manager.js +135 -0
  23. package/lib/cjs/components/datepicker/core/event-manager.js.map +1 -0
  24. package/lib/cjs/components/datepicker/core/focus-manager.js +167 -0
  25. package/lib/cjs/components/datepicker/core/focus-manager.js.map +1 -0
  26. package/lib/cjs/components/datepicker/core/helpers.js +219 -0
  27. package/lib/cjs/components/datepicker/core/helpers.js.map +1 -0
  28. package/lib/cjs/components/datepicker/core/index.js +25 -0
  29. package/lib/cjs/components/datepicker/core/index.js.map +1 -0
  30. package/lib/cjs/components/datepicker/core/unified-state-manager.js +394 -0
  31. package/lib/cjs/components/datepicker/core/unified-state-manager.js.map +1 -0
  32. package/lib/cjs/components/datepicker/datepicker.js +2066 -763
  33. package/lib/cjs/components/datepicker/datepicker.js.map +1 -1
  34. package/lib/cjs/components/datepicker/index.js +19 -8
  35. package/lib/cjs/components/datepicker/index.js.map +1 -1
  36. package/lib/cjs/components/datepicker/ui/index.js +23 -0
  37. package/lib/cjs/components/datepicker/ui/index.js.map +1 -0
  38. package/lib/cjs/components/datepicker/ui/input/dropdown.js +489 -0
  39. package/lib/cjs/components/datepicker/ui/input/dropdown.js.map +1 -0
  40. package/lib/cjs/components/datepicker/ui/input/index.js +23 -0
  41. package/lib/cjs/components/datepicker/ui/input/index.js.map +1 -0
  42. package/lib/cjs/components/datepicker/ui/input/segmented-input.js +640 -0
  43. package/lib/cjs/components/datepicker/ui/input/segmented-input.js.map +1 -0
  44. package/lib/cjs/components/datepicker/ui/renderers/calendar.js +446 -0
  45. package/lib/cjs/components/datepicker/ui/renderers/calendar.js.map +1 -0
  46. package/lib/cjs/components/datepicker/ui/renderers/footer.js +42 -0
  47. package/lib/cjs/components/datepicker/ui/renderers/footer.js.map +1 -0
  48. package/lib/cjs/components/datepicker/ui/renderers/header.js +32 -0
  49. package/lib/cjs/components/datepicker/ui/renderers/header.js.map +1 -0
  50. package/lib/cjs/components/datepicker/ui/renderers/index.js +25 -0
  51. package/lib/cjs/components/datepicker/ui/renderers/index.js.map +1 -0
  52. package/lib/cjs/components/datepicker/ui/renderers/time-picker.js +384 -0
  53. package/lib/cjs/components/datepicker/ui/renderers/time-picker.js.map +1 -0
  54. package/lib/cjs/components/datepicker/ui/templates/index.js +22 -0
  55. package/lib/cjs/components/datepicker/ui/templates/index.js.map +1 -0
  56. package/lib/cjs/components/datepicker/ui/templates/templates.js +253 -0
  57. package/lib/cjs/components/datepicker/ui/templates/templates.js.map +1 -0
  58. package/lib/cjs/components/datepicker/utils/date-formatters.js +88 -0
  59. package/lib/cjs/components/datepicker/utils/date-formatters.js.map +1 -0
  60. package/lib/cjs/components/datepicker/utils/date-utils.js +194 -0
  61. package/lib/cjs/components/datepicker/utils/date-utils.js.map +1 -0
  62. package/lib/cjs/components/datepicker/utils/index.js +24 -0
  63. package/lib/cjs/components/datepicker/utils/index.js.map +1 -0
  64. package/lib/cjs/components/datepicker/utils/time-utils.js +213 -0
  65. package/lib/cjs/components/datepicker/utils/time-utils.js.map +1 -0
  66. package/lib/cjs/index.js +6 -1
  67. package/lib/cjs/index.js.map +1 -1
  68. package/lib/esm/components/alert/alert.js +1022 -0
  69. package/lib/esm/components/alert/alert.js.map +1 -0
  70. package/lib/esm/components/alert/index.js +4 -0
  71. package/lib/esm/components/alert/index.js.map +1 -0
  72. package/lib/esm/components/alert/templates.js +112 -0
  73. package/lib/esm/components/alert/templates.js.map +1 -0
  74. package/lib/esm/components/alert/types.js +6 -0
  75. package/lib/esm/components/alert/types.js.map +1 -0
  76. package/lib/esm/components/datepicker/config/config.js +39 -0
  77. package/lib/esm/components/datepicker/config/config.js.map +1 -0
  78. package/lib/esm/components/datepicker/config/index.js +8 -0
  79. package/lib/esm/components/datepicker/config/index.js.map +1 -0
  80. package/lib/esm/components/datepicker/config/interfaces.js +6 -0
  81. package/lib/esm/components/datepicker/config/interfaces.js.map +1 -0
  82. package/lib/esm/components/datepicker/config/types.js +6 -0
  83. package/lib/esm/components/datepicker/config/types.js.map +1 -0
  84. package/lib/esm/components/datepicker/core/event-manager.js +133 -0
  85. package/lib/esm/components/datepicker/core/event-manager.js.map +1 -0
  86. package/lib/esm/components/datepicker/core/focus-manager.js +164 -0
  87. package/lib/esm/components/datepicker/core/focus-manager.js.map +1 -0
  88. package/lib/esm/components/datepicker/core/helpers.js +211 -0
  89. package/lib/esm/components/datepicker/core/helpers.js.map +1 -0
  90. package/lib/esm/components/datepicker/core/index.js +9 -0
  91. package/lib/esm/components/datepicker/core/index.js.map +1 -0
  92. package/lib/esm/components/datepicker/core/unified-state-manager.js +391 -0
  93. package/lib/esm/components/datepicker/core/unified-state-manager.js.map +1 -0
  94. package/lib/esm/components/datepicker/datepicker.js +2065 -763
  95. package/lib/esm/components/datepicker/datepicker.js.map +1 -1
  96. package/lib/esm/components/datepicker/index.js +6 -8
  97. package/lib/esm/components/datepicker/index.js.map +1 -1
  98. package/lib/esm/components/datepicker/ui/index.js +7 -0
  99. package/lib/esm/components/datepicker/ui/index.js.map +1 -0
  100. package/lib/esm/components/datepicker/ui/input/dropdown.js +486 -0
  101. package/lib/esm/components/datepicker/ui/input/dropdown.js.map +1 -0
  102. package/lib/esm/components/datepicker/ui/input/index.js +7 -0
  103. package/lib/esm/components/datepicker/ui/input/index.js.map +1 -0
  104. package/lib/esm/components/datepicker/ui/input/segmented-input.js +637 -0
  105. package/lib/esm/components/datepicker/ui/input/segmented-input.js.map +1 -0
  106. package/lib/esm/components/datepicker/ui/renderers/calendar.js +443 -0
  107. package/lib/esm/components/datepicker/ui/renderers/calendar.js.map +1 -0
  108. package/lib/esm/components/datepicker/ui/renderers/footer.js +39 -0
  109. package/lib/esm/components/datepicker/ui/renderers/footer.js.map +1 -0
  110. package/lib/esm/components/datepicker/ui/renderers/header.js +29 -0
  111. package/lib/esm/components/datepicker/ui/renderers/header.js.map +1 -0
  112. package/lib/esm/components/datepicker/ui/renderers/index.js +9 -0
  113. package/lib/esm/components/datepicker/ui/renderers/index.js.map +1 -0
  114. package/lib/esm/components/datepicker/ui/renderers/time-picker.js +381 -0
  115. package/lib/esm/components/datepicker/ui/renderers/time-picker.js.map +1 -0
  116. package/lib/esm/components/datepicker/ui/templates/index.js +6 -0
  117. package/lib/esm/components/datepicker/ui/templates/index.js.map +1 -0
  118. package/lib/esm/components/datepicker/ui/templates/templates.js +242 -0
  119. package/lib/esm/components/datepicker/ui/templates/templates.js.map +1 -0
  120. package/lib/esm/components/datepicker/utils/date-formatters.js +83 -0
  121. package/lib/esm/components/datepicker/utils/date-formatters.js.map +1 -0
  122. package/lib/esm/components/datepicker/utils/date-utils.js +184 -0
  123. package/lib/esm/components/datepicker/utils/date-utils.js.map +1 -0
  124. package/lib/esm/components/datepicker/utils/index.js +8 -0
  125. package/lib/esm/components/datepicker/utils/index.js.map +1 -0
  126. package/lib/esm/components/datepicker/utils/time-utils.js +201 -0
  127. package/lib/esm/components/datepicker/utils/time-utils.js.map +1 -0
  128. package/lib/esm/index.js +4 -0
  129. package/lib/esm/index.js.map +1 -1
  130. package/package.json +12 -3
  131. package/src/components/alert/alert.css +429 -188
  132. package/src/components/alert/alert.ts +990 -0
  133. package/src/components/alert/index.ts +4 -0
  134. package/src/components/alert/templates.ts +110 -0
  135. package/src/components/alert/tests/accessibility/aria-roles.test.ts +19 -0
  136. package/src/components/alert/tests/accessibility/focus-management.test.ts +19 -0
  137. package/src/components/alert/tests/accessibility/keyboard-nav.test.ts +22 -0
  138. package/src/components/alert/tests/actions/confirm-cancel.test.ts +122 -0
  139. package/src/components/alert/tests/actions/input-field.test.ts +180 -0
  140. package/src/components/alert/tests/alert.basic.test.ts +126 -0
  141. package/src/components/alert/tests/alert.config.test.ts +75 -0
  142. package/src/components/alert/tests/alert.templates.test.ts +17 -0
  143. package/src/components/alert/tests/config/attribute-config.test.ts +94 -0
  144. package/src/components/alert/tests/config/json-config.test.ts +119 -0
  145. package/src/components/alert/tests/config/merging.test.ts +89 -0
  146. package/src/components/alert/tests/dismissal/auto-dismiss.test.ts +96 -0
  147. package/src/components/alert/tests/dismissal/escape-key-dismiss.test.ts +105 -0
  148. package/src/components/alert/tests/dismissal/manual-dismiss.test.ts +90 -0
  149. package/src/components/alert/tests/dismissal/outside-click-dismiss.test.ts +91 -0
  150. package/src/components/alert/tests/edge-cases/invalid-config.test.ts +19 -0
  151. package/src/components/alert/tests/edge-cases/multiple-alerts.test.ts +19 -0
  152. package/src/components/alert/tests/rendering/custom-content.test.ts +81 -0
  153. package/src/components/alert/tests/rendering/info-alert.test.ts +84 -0
  154. package/src/components/alert/tests/rendering/success-alert.test.ts +100 -0
  155. package/src/components/alert/tests/templates/default-templates.test.ts +16 -0
  156. package/src/components/alert/tests/templates/user-templates.test.ts +16 -0
  157. package/src/components/alert/types.ts +145 -0
  158. package/src/components/datepicker/__tests__/datepicker-events.test.ts +356 -0
  159. package/src/components/datepicker/__tests__/datepicker-init.test.ts +343 -0
  160. package/src/components/datepicker/__tests__/datepicker-integration.test.ts +435 -0
  161. package/src/components/datepicker/__tests__/datepicker-timezone.test.ts +220 -0
  162. package/src/components/datepicker/__tests__/segmented-input-focus.test.ts +380 -0
  163. package/src/components/datepicker/__tests__/selective-state-updates.test.ts +400 -0
  164. package/src/components/datepicker/__tests__/state-manager.test.ts +421 -0
  165. package/src/components/datepicker/__tests__/time-preservation.test.ts +387 -0
  166. package/src/components/datepicker/config/config.ts +40 -0
  167. package/src/components/datepicker/config/index.ts +8 -0
  168. package/src/components/datepicker/config/interfaces.ts +82 -0
  169. package/src/components/datepicker/config/types.ts +188 -0
  170. package/src/components/datepicker/core/event-manager.ts +159 -0
  171. package/src/components/datepicker/core/focus-manager.ts +201 -0
  172. package/src/components/datepicker/core/helpers.ts +231 -0
  173. package/src/components/datepicker/core/index.ts +9 -0
  174. package/src/components/datepicker/core/unified-state-manager.ts +459 -0
  175. package/src/components/datepicker/datepicker.css +429 -1
  176. package/src/components/datepicker/datepicker.ts +2538 -1277
  177. package/src/components/datepicker/index.ts +6 -8
  178. package/src/components/datepicker/ui/index.ts +7 -0
  179. package/src/components/datepicker/ui/input/dropdown.ts +552 -0
  180. package/src/components/datepicker/ui/input/index.ts +7 -0
  181. package/src/components/datepicker/ui/input/segmented-input.ts +638 -0
  182. package/src/components/datepicker/ui/renderers/__tests__/calendar-optimizations.test.ts +611 -0
  183. package/src/components/datepicker/ui/renderers/calendar.ts +530 -0
  184. package/src/components/datepicker/ui/renderers/footer.ts +43 -0
  185. package/src/components/datepicker/ui/renderers/header.ts +33 -0
  186. package/src/components/datepicker/ui/renderers/index.ts +9 -0
  187. package/src/components/datepicker/ui/renderers/time-picker.ts +438 -0
  188. package/src/components/datepicker/ui/templates/index.ts +6 -0
  189. package/src/components/datepicker/ui/templates/templates.ts +306 -0
  190. package/src/components/datepicker/utils/__tests__/date-formatters.test.ts +160 -0
  191. package/src/components/datepicker/utils/__tests__/date-utils-keys.test.ts +86 -0
  192. package/src/components/datepicker/utils/__tests__/date-utils-timezone.test.ts +215 -0
  193. package/src/components/datepicker/utils/date-formatters.ts +85 -0
  194. package/src/components/datepicker/utils/date-utils.ts +172 -0
  195. package/src/components/datepicker/utils/index.ts +8 -0
  196. package/src/components/datepicker/utils/time-utils.ts +221 -0
  197. package/src/index.ts +7 -1
  198. package/lib/cjs/components/datepicker/calendar.js +0 -1061
  199. package/lib/cjs/components/datepicker/calendar.js.map +0 -1
  200. package/lib/cjs/components/datepicker/config.js +0 -332
  201. package/lib/cjs/components/datepicker/config.js.map +0 -1
  202. package/lib/cjs/components/datepicker/dropdown.js +0 -635
  203. package/lib/cjs/components/datepicker/dropdown.js.map +0 -1
  204. package/lib/cjs/components/datepicker/events.js +0 -129
  205. package/lib/cjs/components/datepicker/events.js.map +0 -1
  206. package/lib/cjs/components/datepicker/keyboard.js +0 -536
  207. package/lib/cjs/components/datepicker/keyboard.js.map +0 -1
  208. package/lib/cjs/components/datepicker/locales.js +0 -78
  209. package/lib/cjs/components/datepicker/locales.js.map +0 -1
  210. package/lib/cjs/components/datepicker/templates.js +0 -403
  211. package/lib/cjs/components/datepicker/templates.js.map +0 -1
  212. package/lib/cjs/components/datepicker/types.js +0 -23
  213. package/lib/cjs/components/datepicker/types.js.map +0 -1
  214. package/lib/cjs/components/datepicker/utils.js +0 -524
  215. package/lib/cjs/components/datepicker/utils.js.map +0 -1
  216. package/lib/esm/components/datepicker/calendar.js +0 -1058
  217. package/lib/esm/components/datepicker/calendar.js.map +0 -1
  218. package/lib/esm/components/datepicker/config.js +0 -329
  219. package/lib/esm/components/datepicker/config.js.map +0 -1
  220. package/lib/esm/components/datepicker/dropdown.js +0 -632
  221. package/lib/esm/components/datepicker/dropdown.js.map +0 -1
  222. package/lib/esm/components/datepicker/events.js +0 -126
  223. package/lib/esm/components/datepicker/events.js.map +0 -1
  224. package/lib/esm/components/datepicker/keyboard.js +0 -533
  225. package/lib/esm/components/datepicker/keyboard.js.map +0 -1
  226. package/lib/esm/components/datepicker/locales.js +0 -74
  227. package/lib/esm/components/datepicker/locales.js.map +0 -1
  228. package/lib/esm/components/datepicker/templates.js +0 -390
  229. package/lib/esm/components/datepicker/templates.js.map +0 -1
  230. package/lib/esm/components/datepicker/types.js +0 -20
  231. package/lib/esm/components/datepicker/types.js.map +0 -1
  232. package/lib/esm/components/datepicker/utils.js +0 -508
  233. package/lib/esm/components/datepicker/utils.js.map +0 -1
  234. package/src/components/datepicker/calendar.ts +0 -1397
  235. package/src/components/datepicker/config.ts +0 -368
  236. package/src/components/datepicker/dropdown.ts +0 -757
  237. package/src/components/datepicker/events.ts +0 -149
  238. package/src/components/datepicker/keyboard.ts +0 -646
  239. package/src/components/datepicker/locales.ts +0 -80
  240. package/src/components/datepicker/templates.ts +0 -792
  241. package/src/components/datepicker/types.ts +0 -154
  242. package/src/components/datepicker/utils.ts +0 -631
  243. package/src/components/select/variants.css +0 -4
@@ -0,0 +1,489 @@
1
+ "use strict";
2
+ /*
3
+ * dropdown.ts - Datepicker dropdown management
4
+ * Provides dropdown functionality for KTDatepicker following select component patterns.
5
+ * Handles positioning, transitions, and event management.
6
+ */
7
+ var __extends = (this && this.__extends) || (function () {
8
+ var extendStatics = function (d, b) {
9
+ extendStatics = Object.setPrototypeOf ||
10
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
12
+ return extendStatics(d, b);
13
+ };
14
+ return function (d, b) {
15
+ if (typeof b !== "function" && b !== null)
16
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
17
+ extendStatics(d, b);
18
+ function __() { this.constructor = d; }
19
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20
+ };
21
+ })();
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ exports.KTDatepickerDropdown = void 0;
24
+ var core_1 = require("@popperjs/core");
25
+ var dom_1 = require("../../../../helpers/dom");
26
+ var component_1 = require("../../../component");
27
+ var event_manager_1 = require("../../core/event-manager");
28
+ /**
29
+ * KTDatepickerDropdown
30
+ *
31
+ * A specialized dropdown implementation for the KTDatepicker component.
32
+ * This module handles the dropdown functionality for the datepicker component,
33
+ * including positioning and showing/hiding.
34
+ */
35
+ var KTDatepickerDropdown = /** @class */ (function (_super) {
36
+ __extends(KTDatepickerDropdown, _super);
37
+ /**
38
+ * Constructor
39
+ * @param element The parent element (datepicker wrapper)
40
+ * @param toggleElement The element that triggers the dropdown
41
+ * @param dropdownElement The dropdown content element
42
+ * @param config The configuration options
43
+ */
44
+ function KTDatepickerDropdown(element, toggleElement, dropdownElement, config) {
45
+ var _this = _super.call(this) || this;
46
+ _this._name = 'datepicker-dropdown';
47
+ // State (will be managed by unified state manager)
48
+ _this._isOpen = false;
49
+ _this._isTransitioning = false;
50
+ _this._popperInstance = null;
51
+ // Unified state manager reference
52
+ _this._unifiedStateManager = null;
53
+ _this._element = element;
54
+ _this._toggleElement = toggleElement;
55
+ _this._dropdownElement = dropdownElement;
56
+ _this._config = config;
57
+ var container = _this._resolveDropdownContainer();
58
+ if (container) {
59
+ if (container !== _this._dropdownElement.parentElement) {
60
+ container.appendChild(_this._dropdownElement);
61
+ }
62
+ }
63
+ _this._eventManager = new event_manager_1.EventManager();
64
+ _this._setupEventListeners();
65
+ return _this;
66
+ }
67
+ /**
68
+ * Set up event listeners for the dropdown
69
+ */
70
+ KTDatepickerDropdown.prototype._setupEventListeners = function () {
71
+ // Event listeners are managed by the main datepicker class
72
+ };
73
+ /**
74
+ * StateObserver implementation
75
+ */
76
+ KTDatepickerDropdown.prototype.onStateChange = function (newState, oldState) {
77
+ // React to dropdown state changes from unified state manager
78
+ if (newState.dropdownState.isOpen !== oldState.dropdownState.isOpen) {
79
+ if (newState.dropdownState.isOpen) {
80
+ this._handleOpenFromState();
81
+ }
82
+ else {
83
+ this._handleCloseFromState();
84
+ }
85
+ }
86
+ if (newState.dropdownState.isTransitioning !== oldState.dropdownState.isTransitioning) {
87
+ this._isTransitioning = newState.dropdownState.isTransitioning;
88
+ }
89
+ };
90
+ KTDatepickerDropdown.prototype.getUpdatePriority = function () {
91
+ return 10; // Medium priority for dropdown updates
92
+ };
93
+ /**
94
+ * Set unified state manager reference
95
+ */
96
+ KTDatepickerDropdown.prototype.setUnifiedStateManager = function (stateManager) {
97
+ this._unifiedStateManager = stateManager;
98
+ };
99
+ /**
100
+ * Handle open state change from unified state manager
101
+ */
102
+ KTDatepickerDropdown.prototype._handleOpenFromState = function () {
103
+ this._isOpen = true;
104
+ this._performOpenTransition();
105
+ };
106
+ /**
107
+ * Handle close state change from unified state manager
108
+ */
109
+ KTDatepickerDropdown.prototype._handleCloseFromState = function () {
110
+ this._performCloseTransition();
111
+ };
112
+ /**
113
+ * Perform the actual open transition
114
+ */
115
+ KTDatepickerDropdown.prototype._performOpenTransition = function () {
116
+ var _this = this;
117
+ if (this._isTransitioning)
118
+ return;
119
+ // Begin opening transition
120
+ this._isTransitioning = true;
121
+ // Set initial styles
122
+ this._dropdownElement.classList.remove('hidden');
123
+ this._dropdownElement.style.opacity = '0';
124
+ // Set dropdown width
125
+ this._setDropdownWidth();
126
+ // Reflow
127
+ dom_1.default.reflow(this._dropdownElement);
128
+ // Apply z-index
129
+ var zIndexToApply = null;
130
+ if (this._config.dropdownZindex) {
131
+ zIndexToApply = this._config.dropdownZindex;
132
+ }
133
+ // Consider the dropdown's current z-index if it's already set and higher
134
+ var currentDropdownZIndexStr = dom_1.default.getCssProp(this._dropdownElement, 'z-index');
135
+ if (currentDropdownZIndexStr && currentDropdownZIndexStr !== 'auto') {
136
+ var currentDropdownZIndex = parseInt(currentDropdownZIndexStr);
137
+ if (!isNaN(currentDropdownZIndex) && currentDropdownZIndex > (zIndexToApply || 0)) {
138
+ zIndexToApply = currentDropdownZIndex;
139
+ }
140
+ }
141
+ // Ensure dropdown is above elements within its original toggle's parent context
142
+ var toggleParentContextZindex = dom_1.default.getHighestZindex(this._element);
143
+ if (toggleParentContextZindex !== null && toggleParentContextZindex >= (zIndexToApply || 0)) {
144
+ zIndexToApply = toggleParentContextZindex + 1;
145
+ }
146
+ if (zIndexToApply !== null) {
147
+ this._dropdownElement.style.zIndex = zIndexToApply.toString();
148
+ }
149
+ // Initialize popper
150
+ this._initPopper();
151
+ // Add active classes for visual state
152
+ this._dropdownElement.classList.add('open');
153
+ this._toggleElement.classList.add('active');
154
+ // Start transition
155
+ this._dropdownElement.style.opacity = '1';
156
+ // Handle transition end
157
+ dom_1.default.transitionEnd(this._dropdownElement, function () {
158
+ _this._isTransitioning = false;
159
+ // Notify unified state manager that transition is complete
160
+ if (_this._unifiedStateManager) {
161
+ _this._unifiedStateManager.setDropdownTransitioning(false, 'dropdown-transition-complete');
162
+ }
163
+ });
164
+ };
165
+ /**
166
+ * Perform the actual close transition
167
+ */
168
+ KTDatepickerDropdown.prototype._performCloseTransition = function () {
169
+ var _this = this;
170
+ if (this._isTransitioning)
171
+ return;
172
+ this._isTransitioning = true;
173
+ this._dropdownElement.style.opacity = '0';
174
+ var transitionComplete = false;
175
+ var fallbackTimer = setTimeout(function () {
176
+ if (!transitionComplete) {
177
+ transitionComplete = true;
178
+ _this._completeCloseTransition();
179
+ }
180
+ }, 300); // Fallback timeout
181
+ var completeTransition = function () {
182
+ if (!transitionComplete) {
183
+ transitionComplete = true;
184
+ clearTimeout(fallbackTimer);
185
+ _this._completeCloseTransition();
186
+ }
187
+ };
188
+ dom_1.default.transitionEnd(this._dropdownElement, completeTransition);
189
+ };
190
+ /**
191
+ * Complete the close transition
192
+ */
193
+ KTDatepickerDropdown.prototype._completeCloseTransition = function () {
194
+ this._isTransitioning = false;
195
+ this._isOpen = false;
196
+ // Remove active classes
197
+ this._dropdownElement.classList.remove('open');
198
+ this._toggleElement.classList.remove('active');
199
+ // Hide dropdown
200
+ this._dropdownElement.classList.add('hidden');
201
+ // Clean up popper
202
+ this._destroyPopper();
203
+ // Notify unified state manager that transition is complete
204
+ if (this._unifiedStateManager) {
205
+ this._unifiedStateManager.setDropdownTransitioning(false, 'dropdown-transition-complete');
206
+ }
207
+ };
208
+ /**
209
+ * Set dropdown width to match input wrapper element (matching ktselect behavior)
210
+ * Dynamically calculates width based on visibleMonths for multi-month view
211
+ */
212
+ KTDatepickerDropdown.prototype._setDropdownWidth = function () {
213
+ var _a;
214
+ if (!this._dropdownElement || !this._element)
215
+ return;
216
+ // Find the input wrapper element to match its width
217
+ var inputWrapper = this._element.querySelector('[data-kt-datepicker-input-wrapper]');
218
+ if (!inputWrapper)
219
+ return;
220
+ // Get visible months count
221
+ var visibleMonths = (_a = this._config.visibleMonths) !== null && _a !== void 0 ? _a : 1;
222
+ // Check if width is configured
223
+ if (this._config.dropdownWidth) {
224
+ // If custom width is set, use that
225
+ if (this._config.dropdownWidth === 'auto') {
226
+ // Try to measure the actual content width first (if already rendered)
227
+ var multiMonthContainer = this._dropdownElement.querySelector('[data-kt-datepicker-multimonth-container]');
228
+ if (multiMonthContainer && visibleMonths > 1) {
229
+ // Content is already rendered, measure it
230
+ // Force a reflow to ensure accurate measurement
231
+ dom_1.default.reflow(multiMonthContainer);
232
+ // Measure content width including gaps
233
+ var contentWidth = multiMonthContainer.scrollWidth;
234
+ // Add dropdown padding (px-3 = 12px on each side = 24px total)
235
+ var padding = 24;
236
+ var totalWidth = contentWidth + padding;
237
+ this._dropdownElement.style.width = "".concat(totalWidth, "px");
238
+ this._dropdownElement.style.minWidth = "".concat(totalWidth, "px");
239
+ }
240
+ else if (visibleMonths > 1) {
241
+ // Content not yet rendered, calculate expected width
242
+ // Base month width: 20rem (320px) per month
243
+ // Gap between months: 1rem (16px) per gap (gap-4)
244
+ // Padding: 0.75rem (12px) on each side = 1.5rem (24px) total
245
+ var monthWidth = 320; // 20rem = 320px
246
+ var gapWidth = 16; // 1rem = 16px (gap-4)
247
+ var paddingWidth = 24; // 1.5rem = 24px (px-3 on each side)
248
+ // Calculate total width: (n months * 320px) + ((n-1) gaps * 16px) + padding
249
+ var totalWidth = (visibleMonths * monthWidth) + ((visibleMonths - 1) * gapWidth) + paddingWidth;
250
+ this._dropdownElement.style.width = "".concat(totalWidth, "px");
251
+ this._dropdownElement.style.minWidth = "".concat(totalWidth, "px");
252
+ }
253
+ else {
254
+ // Single month: use auto (CSS default applies)
255
+ this._dropdownElement.style.width = 'auto';
256
+ this._dropdownElement.style.minWidth = 'auto';
257
+ }
258
+ }
259
+ else if (typeof this._config.dropdownWidth === 'string') {
260
+ this._dropdownElement.style.width = this._config.dropdownWidth;
261
+ // Clear min-width when custom width is set
262
+ this._dropdownElement.style.minWidth = '';
263
+ }
264
+ }
265
+ else {
266
+ // Otherwise, match input wrapper width for a cleaner appearance (like ktselect)
267
+ var inputWrapperWidth = inputWrapper.offsetWidth;
268
+ this._dropdownElement.style.width = "".concat(inputWrapperWidth, "px");
269
+ // Clear min-width to ensure input wrapper width takes precedence
270
+ this._dropdownElement.style.minWidth = '';
271
+ }
272
+ };
273
+ /**
274
+ * Detect if the datepicker is inside a modal container
275
+ * @returns The modal element if found, null otherwise
276
+ */
277
+ KTDatepickerDropdown.prototype._getModalContainer = function () {
278
+ return this._element.closest('[data-kt-modal], .kt-modal, .kt-modal-center');
279
+ };
280
+ /**
281
+ * Get the appropriate boundary element for Popper positioning
282
+ * For centered modals, use .kt-modal-content to avoid transform calculation issues
283
+ * @returns The boundary element, or null if no modal found
284
+ */
285
+ KTDatepickerDropdown.prototype._getModalBoundary = function () {
286
+ var modalParent = this._getModalContainer();
287
+ if (!modalParent) {
288
+ return null;
289
+ }
290
+ // For centered modals, use .kt-modal-content as boundary to avoid transform issues
291
+ if (modalParent.classList.contains('kt-modal-center')) {
292
+ var modalContent = modalParent.querySelector('.kt-modal-content');
293
+ return modalContent || modalParent;
294
+ }
295
+ // For non-centered modals, use the modal element itself
296
+ return modalParent;
297
+ };
298
+ /**
299
+ * Get the appropriate positioning strategy based on context
300
+ * @returns 'fixed' if inside non-centered modal, 'absolute' for centered modals or no modal
301
+ */
302
+ KTDatepickerDropdown.prototype._getPositioningStrategy = function () {
303
+ // Check if config explicitly sets strategy
304
+ if (this._config.dropdownStrategy) {
305
+ return this._config.dropdownStrategy;
306
+ }
307
+ // For centered modals, use absolute positioning to avoid transform calculation issues
308
+ // For non-centered modals, use fixed positioning
309
+ var modalParent = this._getModalContainer();
310
+ if (modalParent && modalParent.classList.contains('kt-modal-center')) {
311
+ return 'absolute';
312
+ }
313
+ // Use fixed positioning for non-centered modals
314
+ return modalParent ? 'fixed' : 'absolute';
315
+ };
316
+ /**
317
+ * Get the reference element for Popper positioning (calendar button/icon)
318
+ */
319
+ KTDatepickerDropdown.prototype._getPopperReferenceElement = function () {
320
+ // Use calendar button (toggle element) for positioning - dropdown sticks under the icon
321
+ return this._toggleElement;
322
+ };
323
+ /**
324
+ * Initialize Popper.js for positioning
325
+ */
326
+ KTDatepickerDropdown.prototype._initPopper = function () {
327
+ var _this = this;
328
+ if (this._popperInstance) {
329
+ this._popperInstance.destroy();
330
+ }
331
+ // Default offset - matching ktselect
332
+ var offsetValue = this._config.dropdownOffset || '0, 5';
333
+ // Get configuration options
334
+ var placement = this._config.dropdownPlacement || 'bottom-start';
335
+ var strategy = this._getPositioningStrategy();
336
+ var preventOverflow = this._config.dropdownPreventOverflow !== false;
337
+ var flip = this._config.dropdownFlip !== false;
338
+ // Get appropriate boundary element for modal context
339
+ var boundary = this._getModalBoundary() || this._config.dropdownBoundary || 'clippingParents';
340
+ // Get reference element for positioning (input wrapper, not the calendar button)
341
+ var referenceElement = this._getPopperReferenceElement();
342
+ // Create new popper instance
343
+ this._popperInstance = (0, core_1.createPopper)(referenceElement, this._dropdownElement, {
344
+ placement: placement,
345
+ strategy: strategy,
346
+ modifiers: [
347
+ {
348
+ name: 'offset',
349
+ options: {
350
+ offset: this._parseOffset(offsetValue),
351
+ },
352
+ },
353
+ {
354
+ name: 'preventOverflow',
355
+ options: {
356
+ boundary: boundary,
357
+ altAxis: preventOverflow,
358
+ },
359
+ },
360
+ {
361
+ name: 'flip',
362
+ options: {
363
+ enabled: flip,
364
+ fallbackPlacements: ['top-start', 'bottom-end', 'top-end'],
365
+ },
366
+ },
367
+ {
368
+ name: 'sameWidth',
369
+ enabled: !this._config.dropdownWidth, // Enable when dropdownWidth is null/undefined (matching ktselect)
370
+ phase: 'beforeWrite',
371
+ requires: ['computeStyles'],
372
+ fn: function (_a) {
373
+ var state = _a.state;
374
+ // Use input wrapper width instead of toggle element width
375
+ var inputWrapper = _this._element.querySelector('[data-kt-datepicker-input-wrapper]');
376
+ if (inputWrapper) {
377
+ state.styles.popper.width = "".concat(inputWrapper.offsetWidth, "px");
378
+ }
379
+ else {
380
+ // Fallback to reference width if input wrapper not found
381
+ state.styles.popper.width = "".concat(state.rects.reference.width, "px");
382
+ }
383
+ },
384
+ effect: function (_a) {
385
+ var state = _a.state;
386
+ // Use input wrapper width instead of toggle element width
387
+ var inputWrapper = _this._element.querySelector('[data-kt-datepicker-input-wrapper]');
388
+ if (inputWrapper && 'offsetWidth' in inputWrapper) {
389
+ state.elements.popper.style.width = "".concat(inputWrapper.offsetWidth, "px");
390
+ }
391
+ else {
392
+ // Fallback to reference width if input wrapper not found
393
+ var reference = state.elements.reference;
394
+ if (reference && 'offsetWidth' in reference) {
395
+ state.elements.popper.style.width = "".concat(reference.offsetWidth, "px");
396
+ }
397
+ }
398
+ },
399
+ },
400
+ ],
401
+ });
402
+ };
403
+ /**
404
+ * Parse offset string to array
405
+ */
406
+ KTDatepickerDropdown.prototype._parseOffset = function (offset) {
407
+ return offset.split(',').map(function (val) { return parseInt(val.trim(), 10); });
408
+ };
409
+ /**
410
+ * Destroy Popper instance
411
+ */
412
+ KTDatepickerDropdown.prototype._destroyPopper = function () {
413
+ if (this._popperInstance) {
414
+ this._popperInstance.destroy();
415
+ this._popperInstance = null;
416
+ }
417
+ };
418
+ /**
419
+ * Update dropdown position
420
+ */
421
+ KTDatepickerDropdown.prototype.updatePosition = function () {
422
+ if (this._popperInstance) {
423
+ this._popperInstance.update();
424
+ }
425
+ };
426
+ /**
427
+ * Update dropdown width (useful after content is rendered)
428
+ */
429
+ KTDatepickerDropdown.prototype.updateWidth = function () {
430
+ this._setDropdownWidth();
431
+ // Also update popper position after width change
432
+ if (this._popperInstance) {
433
+ this._popperInstance.update();
434
+ }
435
+ };
436
+ /**
437
+ * Open the dropdown (legacy method - now handled by observer pattern)
438
+ */
439
+ KTDatepickerDropdown.prototype.open = function () {
440
+ // This method is now deprecated - use unified state manager instead
441
+ if (this._unifiedStateManager) {
442
+ this._unifiedStateManager.setDropdownOpen(true, 'legacy-open-method');
443
+ }
444
+ };
445
+ /**
446
+ * Close the dropdown (legacy method - now handled by observer pattern)
447
+ */
448
+ KTDatepickerDropdown.prototype.close = function () {
449
+ // This method is now deprecated - use unified state manager instead
450
+ if (this._unifiedStateManager) {
451
+ this._unifiedStateManager.setDropdownOpen(false, 'legacy-close-method');
452
+ }
453
+ };
454
+ /**
455
+ * Check if dropdown is open
456
+ */
457
+ KTDatepickerDropdown.prototype.isOpen = function () {
458
+ return this._isOpen;
459
+ };
460
+ /**
461
+ * Dispose of the dropdown
462
+ */
463
+ KTDatepickerDropdown.prototype.dispose = function () {
464
+ // Clean up event listeners
465
+ this._eventManager.removeAllListeners(document);
466
+ this._destroyPopper();
467
+ // Remove dropdown from DOM
468
+ if (this._dropdownElement && this._dropdownElement.parentElement) {
469
+ this._dropdownElement.parentElement.removeChild(this._dropdownElement);
470
+ }
471
+ };
472
+ /**
473
+ * Resolve the container for the dropdown
474
+ */
475
+ KTDatepickerDropdown.prototype._resolveDropdownContainer = function () {
476
+ // Check if dropdown should be rendered in a specific container
477
+ if (this._config.dropdownContainer) {
478
+ var container = document.querySelector(this._config.dropdownContainer);
479
+ if (container instanceof HTMLElement) {
480
+ return container;
481
+ }
482
+ }
483
+ // Default to body for better positioning
484
+ return document.body;
485
+ };
486
+ return KTDatepickerDropdown;
487
+ }(component_1.default));
488
+ exports.KTDatepickerDropdown = KTDatepickerDropdown;
489
+ //# sourceMappingURL=dropdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../../../../../src/components/datepicker/ui/input/dropdown.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;AAEH,uCAIwB;AACxB,+CAA4C;AAE5C,gDAA6C;AAE7C,0DAAwD;AAIxD;;;;;;GAMG;AACH;IAA0C,wCAAW;IAkBnD;;;;;;OAMG;IACH,8BACE,OAAoB,EACpB,aAA0B,EAC1B,eAA4B,EAC5B,MAA0B;QAE1B,YAAA,MAAK,WAAE,SAAC;QA9BkB,WAAK,GAAW,qBAAqB,CAAC;QAQlE,mDAAmD;QAC3C,aAAO,GAAY,KAAK,CAAC;QACzB,sBAAgB,GAAY,KAAK,CAAC;QAClC,qBAAe,GAA0B,IAAI,CAAC;QAGtD,kCAAkC;QAC1B,0BAAoB,GAA2C,IAAI,CAAC;QAiB1E,KAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,KAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,KAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;QACxC,KAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QAEtB,IAAM,SAAS,GAAG,KAAI,CAAC,yBAAyB,EAAE,CAAC;QACnD,IAAI,SAAS,EAAE,CAAC;YACd,IAAI,SAAS,KAAK,KAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,CAAC;gBACtD,SAAS,CAAC,WAAW,CAAC,KAAI,CAAC,gBAAgB,CAAC,CAAC;YAC/C,CAAC;QACH,CAAC;QAED,KAAI,CAAC,aAAa,GAAG,IAAI,4BAAY,EAAE,CAAC;QACxC,KAAI,CAAC,oBAAoB,EAAE,CAAC;;IAC9B,CAAC;IAED;;OAEG;IACK,mDAAoB,GAA5B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vB,CAAC;IACH,2BAAC;AAAD,CAAC,AA7gBD,CAA0C,mBAAW,GA6gBpD;AA7gBY,oDAAoB"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ /*
3
+ * ui/input/index.ts - Input module exports
4
+ * Provides input-related components for KTDatepicker
5
+ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ __exportStar(require("./segmented-input"), exports);
22
+ __exportStar(require("./dropdown"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/datepicker/ui/input/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;AAEH,oDAAkC;AAClC,6CAA2B"}