@keenthemes/ktui 1.0.29 → 1.1.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 (90) hide show
  1. package/dist/ktui.js +3942 -8634
  2. package/dist/ktui.min.js +1 -1
  3. package/dist/ktui.min.js.map +1 -1
  4. package/dist/styles.css +0 -196
  5. package/lib/cjs/components/datatable/__tests__/pagination-reset.test.js +596 -0
  6. package/lib/cjs/components/datatable/__tests__/pagination-reset.test.js.map +1 -0
  7. package/lib/cjs/components/datatable/__tests__/race-conditions.test.js +548 -0
  8. package/lib/cjs/components/datatable/__tests__/race-conditions.test.js.map +1 -0
  9. package/lib/cjs/components/datatable/__tests__/setup.js +63 -0
  10. package/lib/cjs/components/datatable/__tests__/setup.js.map +1 -0
  11. package/lib/cjs/components/datatable/datatable.js +92 -30
  12. package/lib/cjs/components/datatable/datatable.js.map +1 -1
  13. package/lib/cjs/index.js +1 -5
  14. package/lib/cjs/index.js.map +1 -1
  15. package/lib/esm/components/datatable/__tests__/pagination-reset.test.js +594 -0
  16. package/lib/esm/components/datatable/__tests__/pagination-reset.test.js.map +1 -0
  17. package/lib/esm/components/datatable/__tests__/race-conditions.test.js +546 -0
  18. package/lib/esm/components/datatable/__tests__/race-conditions.test.js.map +1 -0
  19. package/lib/esm/components/datatable/__tests__/setup.js +58 -0
  20. package/lib/esm/components/datatable/__tests__/setup.js.map +1 -0
  21. package/lib/esm/components/datatable/datatable.js +92 -30
  22. package/lib/esm/components/datatable/datatable.js.map +1 -1
  23. package/lib/esm/index.js +0 -3
  24. package/lib/esm/index.js.map +1 -1
  25. package/package.json +9 -2
  26. package/src/components/datatable/__tests__/pagination-reset.test.ts +657 -0
  27. package/src/components/datatable/__tests__/race-conditions.test.ts +455 -0
  28. package/src/components/datatable/__tests__/setup.ts +67 -0
  29. package/src/components/datatable/datatable.ts +66 -11
  30. package/src/components/input/input.css +0 -1
  31. package/src/components/select/select.css +0 -1
  32. package/src/components/textarea/textarea.css +0 -1
  33. package/src/index.ts +0 -4
  34. package/styles.css +0 -1
  35. package/lib/cjs/components/datepicker/calendar.js +0 -1061
  36. package/lib/cjs/components/datepicker/calendar.js.map +0 -1
  37. package/lib/cjs/components/datepicker/config.js +0 -332
  38. package/lib/cjs/components/datepicker/config.js.map +0 -1
  39. package/lib/cjs/components/datepicker/datepicker.js +0 -949
  40. package/lib/cjs/components/datepicker/datepicker.js.map +0 -1
  41. package/lib/cjs/components/datepicker/dropdown.js +0 -635
  42. package/lib/cjs/components/datepicker/dropdown.js.map +0 -1
  43. package/lib/cjs/components/datepicker/events.js +0 -129
  44. package/lib/cjs/components/datepicker/events.js.map +0 -1
  45. package/lib/cjs/components/datepicker/index.js +0 -13
  46. package/lib/cjs/components/datepicker/index.js.map +0 -1
  47. package/lib/cjs/components/datepicker/keyboard.js +0 -536
  48. package/lib/cjs/components/datepicker/keyboard.js.map +0 -1
  49. package/lib/cjs/components/datepicker/locales.js +0 -78
  50. package/lib/cjs/components/datepicker/locales.js.map +0 -1
  51. package/lib/cjs/components/datepicker/templates.js +0 -403
  52. package/lib/cjs/components/datepicker/templates.js.map +0 -1
  53. package/lib/cjs/components/datepicker/types.js +0 -23
  54. package/lib/cjs/components/datepicker/types.js.map +0 -1
  55. package/lib/cjs/components/datepicker/utils.js +0 -524
  56. package/lib/cjs/components/datepicker/utils.js.map +0 -1
  57. package/lib/esm/components/datepicker/calendar.js +0 -1058
  58. package/lib/esm/components/datepicker/calendar.js.map +0 -1
  59. package/lib/esm/components/datepicker/config.js +0 -329
  60. package/lib/esm/components/datepicker/config.js.map +0 -1
  61. package/lib/esm/components/datepicker/datepicker.js +0 -946
  62. package/lib/esm/components/datepicker/datepicker.js.map +0 -1
  63. package/lib/esm/components/datepicker/dropdown.js +0 -632
  64. package/lib/esm/components/datepicker/dropdown.js.map +0 -1
  65. package/lib/esm/components/datepicker/events.js +0 -126
  66. package/lib/esm/components/datepicker/events.js.map +0 -1
  67. package/lib/esm/components/datepicker/index.js +0 -9
  68. package/lib/esm/components/datepicker/index.js.map +0 -1
  69. package/lib/esm/components/datepicker/keyboard.js +0 -533
  70. package/lib/esm/components/datepicker/keyboard.js.map +0 -1
  71. package/lib/esm/components/datepicker/locales.js +0 -74
  72. package/lib/esm/components/datepicker/locales.js.map +0 -1
  73. package/lib/esm/components/datepicker/templates.js +0 -390
  74. package/lib/esm/components/datepicker/templates.js.map +0 -1
  75. package/lib/esm/components/datepicker/types.js +0 -20
  76. package/lib/esm/components/datepicker/types.js.map +0 -1
  77. package/lib/esm/components/datepicker/utils.js +0 -508
  78. package/lib/esm/components/datepicker/utils.js.map +0 -1
  79. package/src/components/datepicker/calendar.ts +0 -1397
  80. package/src/components/datepicker/config.ts +0 -368
  81. package/src/components/datepicker/datepicker.css +0 -7
  82. package/src/components/datepicker/datepicker.ts +0 -1287
  83. package/src/components/datepicker/dropdown.ts +0 -757
  84. package/src/components/datepicker/events.ts +0 -149
  85. package/src/components/datepicker/index.ts +0 -10
  86. package/src/components/datepicker/keyboard.ts +0 -646
  87. package/src/components/datepicker/locales.ts +0 -80
  88. package/src/components/datepicker/templates.ts +0 -792
  89. package/src/components/datepicker/types.ts +0 -154
  90. package/src/components/datepicker/utils.ts +0 -631
@@ -1,632 +0,0 @@
1
- /**
2
- * KTUI - Free & Open-Source Tailwind UI Components by Keenthemes
3
- * Copyright 2025 by Keenthemes Inc
4
- */
5
- var __extends = (this && this.__extends) || (function () {
6
- var extendStatics = function (d, b) {
7
- extendStatics = Object.setPrototypeOf ||
8
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
9
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
10
- return extendStatics(d, b);
11
- };
12
- return function (d, b) {
13
- if (typeof b !== "function" && b !== null)
14
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
15
- extendStatics(d, b);
16
- function __() { this.constructor = d; }
17
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18
- };
19
- })();
20
- import { createPopper, } from '@popperjs/core';
21
- import KTDom from '../../helpers/dom';
22
- import KTData from '../../helpers/data';
23
- import KTComponent from '../component';
24
- /**
25
- * Class to manage focus within the dropdown
26
- */
27
- var FocusManager = /** @class */ (function () {
28
- function FocusManager(element) {
29
- this._focusableSelector = 'button:not([disabled]), [tabindex]:not([tabindex="-1"])';
30
- this._element = element;
31
- }
32
- /**
33
- * Get all visible focusable options
34
- */
35
- FocusManager.prototype.getVisibleOptions = function () {
36
- return Array.from(this._element.querySelectorAll(this._focusableSelector)).filter(function (el) {
37
- var element = el;
38
- return element.offsetParent !== null; // Only visible elements
39
- });
40
- };
41
- /**
42
- * Apply focus to an element
43
- */
44
- FocusManager.prototype.applyFocus = function (element) {
45
- if (element && typeof element.focus === 'function') {
46
- element.focus();
47
- }
48
- };
49
- /**
50
- * Focus next element
51
- */
52
- FocusManager.prototype.focusNext = function () {
53
- var options = this.getVisibleOptions();
54
- var currentFocused = document.activeElement;
55
- var nextIndex = 0;
56
- if (currentFocused) {
57
- var currentIndex = options.indexOf(currentFocused);
58
- nextIndex = currentIndex >= 0 ? (currentIndex + 1) % options.length : 0;
59
- }
60
- if (options.length > 0) {
61
- this.applyFocus(options[nextIndex]);
62
- }
63
- };
64
- /**
65
- * Focus previous element
66
- */
67
- FocusManager.prototype.focusPrevious = function () {
68
- var options = this.getVisibleOptions();
69
- var currentFocused = document.activeElement;
70
- var prevIndex = options.length - 1;
71
- if (currentFocused) {
72
- var currentIndex = options.indexOf(currentFocused);
73
- prevIndex =
74
- currentIndex >= 0
75
- ? (currentIndex - 1 + options.length) % options.length
76
- : prevIndex;
77
- }
78
- if (options.length > 0) {
79
- this.applyFocus(options[prevIndex]);
80
- }
81
- };
82
- /**
83
- * Scroll element into view
84
- */
85
- FocusManager.prototype.scrollIntoView = function (element) {
86
- if (element && typeof element.scrollIntoView === 'function') {
87
- element.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
88
- }
89
- };
90
- /**
91
- * Clean up resources
92
- */
93
- FocusManager.prototype.dispose = function () {
94
- // Nothing to clean up yet
95
- };
96
- return FocusManager;
97
- }());
98
- /**
99
- * Class to manage event listeners
100
- */
101
- var EventManager = /** @class */ (function () {
102
- function EventManager() {
103
- this._listeners = new Map();
104
- }
105
- /**
106
- * Add event listener and track it
107
- */
108
- EventManager.prototype.addListener = function (element, eventType, handler) {
109
- if (!this._listeners.has(element)) {
110
- this._listeners.set(element, new Map());
111
- }
112
- var elementListeners = this._listeners.get(element);
113
- if (!elementListeners.has(eventType)) {
114
- elementListeners.set(eventType, []);
115
- }
116
- var handlers = elementListeners.get(eventType);
117
- element.addEventListener(eventType, handler);
118
- handlers.push(handler);
119
- };
120
- /**
121
- * Remove all listeners for an element
122
- */
123
- EventManager.prototype.removeAllListeners = function (element) {
124
- if (this._listeners.has(element)) {
125
- var elementListeners = this._listeners.get(element);
126
- elementListeners.forEach(function (handlers, eventType) {
127
- handlers.forEach(function (handler) {
128
- element.removeEventListener(eventType, handler);
129
- });
130
- });
131
- this._listeners.delete(element);
132
- }
133
- };
134
- return EventManager;
135
- }());
136
- /**
137
- * Focus trap class to manage keyboard focus within the dropdown
138
- */
139
- var FocusTrap = /** @class */ (function () {
140
- /**
141
- * Constructor
142
- *
143
- * @param element - Element to trap focus within
144
- */
145
- function FocusTrap(element) {
146
- this._focusableElements = [];
147
- this._firstFocusableElement = null;
148
- this._lastFocusableElement = null;
149
- this._element = element;
150
- this._update();
151
- }
152
- /**
153
- * Update the focusable elements
154
- */
155
- FocusTrap.prototype.update = function () {
156
- this._update();
157
- };
158
- /**
159
- * Update the list of focusable elements
160
- */
161
- FocusTrap.prototype._update = function () {
162
- // Get all focusable elements
163
- var focusableElements = this._element.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
164
- // Convert to array and filter out disabled elements
165
- this._focusableElements = Array.from(focusableElements).filter(function (el) { return !el.hasAttribute('disabled'); });
166
- // Get first and last focusable elements
167
- this._firstFocusableElement = this._focusableElements[0] || null;
168
- this._lastFocusableElement =
169
- this._focusableElements[this._focusableElements.length - 1] || null;
170
- };
171
- /**
172
- * Handle tab key press to trap focus
173
- *
174
- * @param event - Keyboard event
175
- */
176
- FocusTrap.prototype.handleTab = function (event) {
177
- // If no focusable elements, do nothing
178
- if (!this._firstFocusableElement || !this._lastFocusableElement) {
179
- event.preventDefault();
180
- return;
181
- }
182
- var isTabPressed = event.key === 'Tab' || event.keyCode === 9;
183
- if (!isTabPressed)
184
- return;
185
- // Handle Shift+Tab to focus last element when on first
186
- if (event.shiftKey) {
187
- if (document.activeElement === this._firstFocusableElement) {
188
- this._lastFocusableElement.focus();
189
- event.preventDefault();
190
- }
191
- }
192
- else {
193
- // Handle Tab to focus first element when on last
194
- if (document.activeElement === this._lastFocusableElement) {
195
- this._firstFocusableElement.focus();
196
- event.preventDefault();
197
- }
198
- }
199
- };
200
- /**
201
- * Focus the first interactive element
202
- */
203
- FocusTrap.prototype.focusFirstElement = function () {
204
- if (this._firstFocusableElement) {
205
- this._firstFocusableElement.focus();
206
- }
207
- };
208
- return FocusTrap;
209
- }());
210
- /**
211
- * KTDatepickerDropdown
212
- *
213
- * A specialized dropdown implementation for the KTDatepicker component.
214
- * This module handles the dropdown functionality for the datepicker component,
215
- * including positioning, showing/hiding, and keyboard navigation.
216
- */
217
- var KTDatepickerDropdown = /** @class */ (function (_super) {
218
- __extends(KTDatepickerDropdown, _super);
219
- /**
220
- * Constructor
221
- * @param element The parent element (datepicker wrapper)
222
- * @param toggleElement The element that triggers the dropdown
223
- * @param dropdownElement The dropdown content element
224
- * @param config The configuration options
225
- */
226
- function KTDatepickerDropdown(element, toggleElement, dropdownElement, config) {
227
- var _this = _super.call(this) || this;
228
- _this._name = 'datepicker-dropdown';
229
- // State
230
- _this._isOpen = false;
231
- _this._isTransitioning = false;
232
- _this._popperInstance = null;
233
- _this._focusTrap = null;
234
- _this._activeElement = null;
235
- _this._element = element;
236
- _this._toggleElement = toggleElement;
237
- _this._dropdownElement = dropdownElement;
238
- _this._config = config;
239
- _this._eventManager = new EventManager();
240
- _this._focusManager = new FocusManager(dropdownElement);
241
- _this._setupEventListeners();
242
- return _this;
243
- }
244
- /**
245
- * Set up event listeners for the dropdown
246
- */
247
- KTDatepickerDropdown.prototype._setupEventListeners = function () {
248
- // Toggle click
249
- this._eventManager.addListener(this._toggleElement, 'click', this._handleToggleClick.bind(this));
250
- // Keyboard navigation
251
- this._eventManager.addListener(this._element, 'keydown', this._handleKeyDown.bind(this));
252
- // Close on outside click
253
- this._eventManager.addListener(document, 'click', this._handleOutsideClick.bind(this));
254
- };
255
- /**
256
- * Handle toggle element click
257
- */
258
- KTDatepickerDropdown.prototype._handleToggleClick = function (event) {
259
- event.preventDefault();
260
- event.stopPropagation();
261
- this.toggle();
262
- };
263
- /**
264
- * Handle keyboard events
265
- */
266
- KTDatepickerDropdown.prototype._handleKeyDown = function (event) {
267
- if (!this._isOpen)
268
- return;
269
- switch (event.key) {
270
- case 'Escape':
271
- event.preventDefault();
272
- this.close();
273
- this._toggleElement.focus();
274
- break;
275
- case 'ArrowDown':
276
- event.preventDefault();
277
- this._focusManager.focusNext();
278
- break;
279
- case 'ArrowUp':
280
- event.preventDefault();
281
- this._focusManager.focusPrevious();
282
- break;
283
- case 'Home':
284
- event.preventDefault();
285
- // Focus first visible option
286
- var firstOption = this._focusManager.getVisibleOptions()[0];
287
- if (firstOption) {
288
- this._focusManager.applyFocus(firstOption);
289
- this._focusManager.scrollIntoView(firstOption);
290
- }
291
- break;
292
- case 'End':
293
- event.preventDefault();
294
- // Focus last visible option
295
- var visibleOptions = this._focusManager.getVisibleOptions();
296
- var lastOption = visibleOptions[visibleOptions.length - 1];
297
- if (lastOption) {
298
- this._focusManager.applyFocus(lastOption);
299
- this._focusManager.scrollIntoView(lastOption);
300
- }
301
- break;
302
- }
303
- };
304
- /**
305
- * Handle clicks outside the dropdown
306
- */
307
- KTDatepickerDropdown.prototype._handleOutsideClick = function (event) {
308
- var _a;
309
- if (!this._isOpen)
310
- return;
311
- var target = event.target;
312
- if (!this._element.contains(target) &&
313
- !this._dropdownElement.contains(target)) {
314
- // Before closing, check if a range selection is in progress
315
- var datepickerElement = this._element.closest('[data-kt-datepicker]');
316
- if (datepickerElement) {
317
- // Get the state manager through the calendar instance or directly
318
- var stateManager = (_a = datepickerElement.instance) === null || _a === void 0 ? void 0 : _a._state;
319
- if (stateManager) {
320
- var state = stateManager.getState();
321
- var config = stateManager.getConfig();
322
- // If we're in range mode and range selection is in progress, don't close
323
- if (config.range && state.isRangeSelectionInProgress) {
324
- console.log('Outside click detected but range selection in progress - keeping dropdown open');
325
- return;
326
- }
327
- }
328
- }
329
- this.close();
330
- }
331
- };
332
- /**
333
- * Set width of dropdown based on toggle element
334
- */
335
- KTDatepickerDropdown.prototype._setDropdownWidth = function () {
336
- if (!this._dropdownElement || !this._toggleElement)
337
- return;
338
- // Get the datepicker configuration
339
- var datepickerElement = this._element.closest('[data-kt-datepicker]');
340
- var visibleMonths = 1;
341
- if (datepickerElement) {
342
- // Get visible months from config
343
- var instance = datepickerElement.instance;
344
- if (instance && instance._config) {
345
- visibleMonths = instance._config.visibleMonths || 1;
346
- }
347
- }
348
- // Calculate appropriate width based on number of visible months
349
- if (visibleMonths > 1) {
350
- // For multiple months, calculate a fixed width per month plus padding and gaps
351
- var monthWidth = 280; // Fixed width for each month
352
- var padding = 24; // Left/right padding (p-3 = 0.75rem × 2 × 16px = 24px)
353
- var spacing = 16 * (visibleMonths - 1); // Gap between months (gap-4 = 1rem × 16px)
354
- // Limit to showing max 3 months at once for UX (user can scroll to see more)
355
- var visibleWidth = Math.min(visibleMonths, 3);
356
- var totalWidth = monthWidth * visibleWidth + spacing + padding;
357
- // Set fixed width for the dropdown
358
- this._dropdownElement.style.width = "".concat(totalWidth, "px");
359
- this._dropdownElement.style.minWidth = "".concat(totalWidth, "px");
360
- }
361
- else {
362
- // For single month, use a fixed width that works well for most calendars
363
- this._dropdownElement.style.width = '332px'; // 280px calendar width + 24px padding + border
364
- this._dropdownElement.style.minWidth = '332px';
365
- }
366
- };
367
- /**
368
- * Initialize the Popper instance for dropdown positioning
369
- */
370
- KTDatepickerDropdown.prototype._initPopper = function () {
371
- // Destroy existing popper instance if it exists
372
- this._destroyPopper();
373
- // Default offset
374
- var offsetValue = '0, 5';
375
- // Get configuration options
376
- var placement = 'bottom-start';
377
- var strategy = 'absolute';
378
- var preventOverflow = true;
379
- var flip = true;
380
- // Create new popper instance
381
- this._popperInstance = createPopper(this._toggleElement, this._dropdownElement, {
382
- placement: placement,
383
- strategy: strategy,
384
- modifiers: [
385
- {
386
- name: 'offset',
387
- options: {
388
- offset: this._parseOffset(offsetValue),
389
- },
390
- },
391
- {
392
- name: 'preventOverflow',
393
- options: {
394
- boundary: 'viewport',
395
- altAxis: preventOverflow,
396
- },
397
- },
398
- {
399
- name: 'flip',
400
- options: {
401
- enabled: flip,
402
- fallbackPlacements: ['top-start', 'bottom-end', 'top-end'],
403
- },
404
- },
405
- ],
406
- });
407
- };
408
- /**
409
- * Parse offset string into an array of numbers
410
- */
411
- KTDatepickerDropdown.prototype._parseOffset = function (offset) {
412
- return offset.split(',').map(function (value) { return parseInt(value.trim(), 10); });
413
- };
414
- /**
415
- * Destroy the Popper instance
416
- */
417
- KTDatepickerDropdown.prototype._destroyPopper = function () {
418
- if (this._popperInstance) {
419
- this._popperInstance.destroy();
420
- this._popperInstance = null;
421
- }
422
- };
423
- /**
424
- * Update dropdown position
425
- */
426
- KTDatepickerDropdown.prototype.updatePosition = function () {
427
- // Look for the display element rather than using the input directly
428
- var displayElement = this._element.querySelector('[data-kt-datepicker-display]');
429
- var triggerElement = displayElement || this._toggleElement;
430
- if (!triggerElement || !this._dropdownElement)
431
- return;
432
- // Reset position styles
433
- this._dropdownElement.style.top = '';
434
- this._dropdownElement.style.bottom = '';
435
- this._dropdownElement.style.left = '';
436
- this._dropdownElement.style.right = '';
437
- // Set width before positioning
438
- this._setDropdownWidth();
439
- // Get position information
440
- var triggerRect = triggerElement.getBoundingClientRect();
441
- var containerRect = this._element.getBoundingClientRect();
442
- var dropdownRect = this._dropdownElement.getBoundingClientRect();
443
- var viewportHeight = window.innerHeight;
444
- var viewportWidth = window.innerWidth;
445
- // Calculate available space below and above the trigger
446
- var spaceBelow = viewportHeight - triggerRect.bottom;
447
- var spaceAbove = triggerRect.top;
448
- // Calculate if dropdown would overflow horizontally
449
- var overflowRight = triggerRect.left + dropdownRect.width > viewportWidth;
450
- // Position dropdown
451
- this._dropdownElement.style.position = 'absolute';
452
- // Determine vertical position
453
- if (spaceBelow >= dropdownRect.height || spaceBelow >= spaceAbove) {
454
- // Position below the trigger
455
- this._dropdownElement.style.top = "".concat(triggerRect.height + 5, "px");
456
- }
457
- else {
458
- // Position above the trigger
459
- this._dropdownElement.style.bottom = "".concat(triggerRect.height + 5, "px");
460
- }
461
- // Determine horizontal position - handle potential overflow
462
- if (overflowRight) {
463
- // Align with right edge of trigger to prevent overflow
464
- var rightOffset = Math.max(0, dropdownRect.width - triggerRect.width);
465
- this._dropdownElement.style.right = "0px";
466
- }
467
- else {
468
- // Align with left edge of trigger
469
- this._dropdownElement.style.left = "0px";
470
- }
471
- };
472
- /**
473
- * Toggle the dropdown
474
- */
475
- KTDatepickerDropdown.prototype.toggle = function () {
476
- if (this._isOpen) {
477
- this.close();
478
- }
479
- else {
480
- this.open();
481
- }
482
- };
483
- /**
484
- * Open the dropdown
485
- */
486
- KTDatepickerDropdown.prototype.open = function () {
487
- var _this = this;
488
- if (this._isOpen || this._isTransitioning)
489
- return;
490
- // Fire before show event
491
- var beforeShowEvent = new CustomEvent('kt.datepicker.dropdown.show', {
492
- bubbles: true,
493
- cancelable: true,
494
- });
495
- this._element.dispatchEvent(beforeShowEvent);
496
- if (beforeShowEvent.defaultPrevented)
497
- return;
498
- // Begin opening transition
499
- this._isTransitioning = true;
500
- // Set dropdown visibility
501
- this._dropdownElement.classList.remove('hidden');
502
- this._dropdownElement.setAttribute('aria-hidden', 'false');
503
- // Set dropdown width
504
- this._setDropdownWidth();
505
- // Make sure the element is visible for transitioning
506
- KTDom.reflow(this._dropdownElement);
507
- // Apply z-index
508
- this._dropdownElement.style.zIndex = '1000';
509
- // Initialize popper for positioning
510
- this._initPopper();
511
- // Add active classes
512
- this._toggleElement.classList.add('ring', 'ring-blue-300');
513
- this._toggleElement.setAttribute('aria-expanded', 'true');
514
- // Start transition
515
- this._dropdownElement.classList.remove('opacity-0', 'translate-y-2');
516
- this._dropdownElement.classList.add('opacity-100', 'translate-y-0');
517
- // Handle transition end
518
- KTDom.transitionEnd(this._dropdownElement, function () {
519
- _this._isTransitioning = false;
520
- _this._isOpen = true;
521
- // Focus the first interactive element
522
- _this._focusFirstInteractiveElement();
523
- // Fire after show event
524
- var afterShowEvent = new CustomEvent('kt.datepicker.dropdown.shown', {
525
- bubbles: true,
526
- });
527
- _this._element.dispatchEvent(afterShowEvent);
528
- });
529
- };
530
- /**
531
- * Focus the first interactive element in the dropdown
532
- */
533
- KTDatepickerDropdown.prototype._focusFirstInteractiveElement = function () {
534
- // Priority of elements to focus:
535
- // 1. A "Today" button if available
536
- // 2. The first day in the current month
537
- // 3. Any other focusable element
538
- // Find the Today button using standard DOM selectors
539
- var todayBtn = null;
540
- var buttons = this._dropdownElement.querySelectorAll('button');
541
- for (var i = 0; i < buttons.length; i++) {
542
- if (buttons[i].textContent && buttons[i].textContent.trim() === 'Today') {
543
- todayBtn = buttons[i];
544
- break;
545
- }
546
- }
547
- if (todayBtn) {
548
- todayBtn.focus();
549
- return;
550
- }
551
- var currentMonthDay = this._dropdownElement.querySelector('button[data-date]:not(.text-gray-400)');
552
- if (currentMonthDay) {
553
- currentMonthDay.focus();
554
- return;
555
- }
556
- var firstOption = this._focusManager.getVisibleOptions()[0];
557
- if (firstOption) {
558
- this._focusManager.applyFocus(firstOption);
559
- }
560
- };
561
- /**
562
- * Close the dropdown
563
- */
564
- KTDatepickerDropdown.prototype.close = function () {
565
- var _this = this;
566
- if (!this._isOpen || this._isTransitioning)
567
- return;
568
- // Fire before hide event
569
- var beforeHideEvent = new CustomEvent('kt.datepicker.dropdown.hide', {
570
- bubbles: true,
571
- cancelable: true,
572
- });
573
- this._element.dispatchEvent(beforeHideEvent);
574
- if (beforeHideEvent.defaultPrevented)
575
- return;
576
- // Begin closing transition
577
- this._isTransitioning = true;
578
- // Start transition
579
- this._dropdownElement.classList.add('opacity-0', 'translate-y-2');
580
- this._dropdownElement.classList.remove('opacity-100', 'translate-y-0');
581
- // Handle transition end
582
- KTDom.transitionEnd(this._dropdownElement, function () {
583
- // Remove active classes
584
- _this._dropdownElement.classList.add('hidden');
585
- _this._dropdownElement.setAttribute('aria-hidden', 'true');
586
- // Reset styles
587
- _this._dropdownElement.style.opacity = '';
588
- _this._dropdownElement.style.transform = '';
589
- _this._dropdownElement.style.zIndex = '';
590
- // Destroy popper
591
- _this._destroyPopper();
592
- // Update state
593
- _this._isTransitioning = false;
594
- _this._isOpen = false;
595
- // Fire after hide event
596
- var afterHideEvent = new CustomEvent('kt.datepicker.dropdown.hidden', {
597
- bubbles: true,
598
- });
599
- _this._element.dispatchEvent(afterHideEvent);
600
- });
601
- };
602
- /**
603
- * Check if dropdown is open
604
- */
605
- KTDatepickerDropdown.prototype.isOpen = function () {
606
- return this._isOpen;
607
- };
608
- /**
609
- * Clean up component
610
- */
611
- KTDatepickerDropdown.prototype.dispose = function () {
612
- // Destroy popper
613
- this._destroyPopper();
614
- // Remove event listeners
615
- this._eventManager.removeAllListeners(this._element);
616
- this._eventManager.removeAllListeners(this._toggleElement);
617
- this._eventManager.removeAllListeners(document);
618
- // Clean up focus manager
619
- if (this._focusManager &&
620
- typeof this._focusManager.dispose === 'function') {
621
- this._focusManager.dispose();
622
- }
623
- // Clean up state
624
- this._isOpen = false;
625
- this._isTransitioning = false;
626
- // Remove data reference
627
- KTData.remove(this._element, this._name);
628
- };
629
- return KTDatepickerDropdown;
630
- }(KTComponent));
631
- export { KTDatepickerDropdown };
632
- //# sourceMappingURL=dropdown.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../../../src/components/datepicker/dropdown.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;;;;;;;;;AAEH,OAAO,EAEN,YAAY,GAEZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,WAAW,MAAM,cAAc,CAAC;AAKvC;;GAEG;AACH;IAKC,sBAAY,OAAoB;QAHxB,uBAAkB,GACzB,yDAAyD,CAAC;QAG1D,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;OAEG;IACI,wCAAiB,GAAxB;QACC,OAAO,KAAK,CAAC,IAAI,CAChB,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CACvD,CAAC,MAAM,CAAC,UAAC,EAAE;YACX,IAAM,OAAO,GAAG,EAAiB,CAAC;YAClC,OAAO,OAAO,CAAC,YAAY,KAAK,IAAI,CAAC,CAAC,wBAAwB;QAC/D,CAAC,CAAkB,CAAC;IACrB,CAAC;IAED;;OAEG;IACI,iCAAU,GAAjB,UAAkB,OAAoB;QACrC,IAAI,OAAO,IAAI,OAAO,OAAO,CAAC,KAAK,KAAK,UAAU,EAAE,CAAC;YACpD,OAAO,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;IACF,CAAC;IAED;;OAEG;IACI,gCAAS,GAAhB;QACC,IAAM,OAAO,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzC,IAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC;QAE9C,IAAI,SAAS,GAAG,CAAC,CAAC;QAClB,IAAI,cAAc,EAAE,CAAC;YACpB,IAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,cAA6B,CAAC,CAAC;YACpE,SAAS,GAAG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