tyrell-components 1.0.0-RC13 → 1.0.0-RC15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -2
- package/css/tyrell-theme.css +192 -180
- package/css/tyrell.css +23 -0
- package/dist/tyrell-colors-static.css +1 -316
- package/dist/tyrell-theme.css +1 -1454
- package/dist/tyrell.css +1 -1371
- package/dist/tyrell.js +1 -1
- package/lib/base/ty-component.d.ts +20 -10
- package/lib/base/ty-component.js +196 -319
- package/lib/components/button.d.ts +3 -17
- package/lib/components/button.js +261 -295
- package/lib/components/calendar-month.d.ts +4 -50
- package/lib/components/calendar-month.js +443 -582
- package/lib/components/calendar-navigation.d.ts +3 -48
- package/lib/components/calendar-navigation.js +239 -362
- package/lib/components/calendar.d.ts +8 -83
- package/lib/components/calendar.js +616 -829
- package/lib/components/checkbox.d.ts +5 -72
- package/lib/components/checkbox.js +273 -416
- package/lib/components/copy.d.ts +4 -57
- package/lib/components/copy.js +280 -397
- package/lib/components/date-picker.d.ts +21 -163
- package/lib/components/date-picker.js +1143 -1674
- package/lib/components/file-upload.d.ts +9 -15
- package/lib/components/file-upload.js +404 -426
- package/lib/components/icon.d.ts +3 -24
- package/lib/components/icon.js +141 -230
- package/lib/components/input.d.ts +8 -108
- package/lib/components/input.js +593 -784
- package/lib/components/modal.d.ts +17 -26
- package/lib/components/modal.js +340 -484
- package/lib/components/option.d.ts +2 -9
- package/lib/components/option.js +168 -216
- package/lib/components/popup.d.ts +2 -17
- package/lib/components/popup.js +249 -380
- package/lib/components/radio.d.ts +5 -25
- package/lib/components/radio.js +407 -461
- package/lib/components/resize-observer.d.ts +3 -30
- package/lib/components/resize-observer.js +69 -103
- package/lib/components/scroll-container.d.ts +2 -12
- package/lib/components/scroll-container.js +293 -338
- package/lib/components/select.d.ts +87 -159
- package/lib/components/select.js +1609 -2090
- package/lib/components/selected-tags.d.ts +5 -48
- package/lib/components/selected-tags.js +188 -276
- package/lib/components/step.d.ts +1 -6
- package/lib/components/step.js +62 -68
- package/lib/components/switch.d.ts +1 -12
- package/lib/components/switch.js +214 -247
- package/lib/components/tab.d.ts +1 -6
- package/lib/components/tab.js +62 -69
- package/lib/components/tabs.d.ts +6 -63
- package/lib/components/tabs.js +545 -777
- package/lib/components/tag.d.ts +3 -37
- package/lib/components/tag.js +236 -335
- package/lib/components/textarea.d.ts +7 -87
- package/lib/components/textarea.js +457 -627
- package/lib/components/tooltip.d.ts +3 -11
- package/lib/components/tooltip.js +307 -443
- package/lib/components/wizard.d.ts +6 -54
- package/lib/components/wizard.js +405 -618
- package/lib/icons/fontawesome/brands.d.ts +0 -1
- package/lib/icons/fontawesome/brands.js +0 -8
- package/lib/icons/fontawesome/regular.d.ts +0 -1
- package/lib/icons/fontawesome/regular.js +0 -8
- package/lib/icons/fontawesome/solid.d.ts +0 -1
- package/lib/icons/fontawesome/solid.js +0 -8
- package/lib/icons/heroicons/micro.d.ts +0 -1
- package/lib/icons/heroicons/micro.js +392 -400
- package/lib/icons/heroicons/mini.d.ts +0 -1
- package/lib/icons/heroicons/mini.js +382 -390
- package/lib/icons/heroicons/outline.d.ts +0 -1
- package/lib/icons/heroicons/outline.js +337 -345
- package/lib/icons/heroicons/solid.d.ts +0 -1
- package/lib/icons/heroicons/solid.js +407 -415
- package/lib/icons/lucide.d.ts +0 -1
- package/lib/icons/lucide.js +24479 -26351
- package/lib/icons/material/filled.d.ts +0 -1
- package/lib/icons/material/filled.js +9653 -9663
- package/lib/icons/material/outlined.d.ts +0 -1
- package/lib/icons/material/outlined.js +10271 -10281
- package/lib/icons/material/round.d.ts +0 -1
- package/lib/icons/material/round.js +10495 -10505
- package/lib/icons/material/sharp.d.ts +0 -1
- package/lib/icons/material/sharp.js +9905 -9915
- package/lib/icons/material/two-tone.d.ts +0 -1
- package/lib/icons/material/two-tone.js +12792 -12802
- package/lib/index.d.ts +0 -1
- package/lib/index.js +21 -41
- package/lib/styles/button.d.ts +2 -20
- package/lib/styles/button.js +202 -404
- package/lib/styles/calendar-month.d.ts +1 -5
- package/lib/styles/calendar-month.js +127 -244
- package/lib/styles/calendar-navigation.d.ts +2 -6
- package/lib/styles/calendar-navigation.js +64 -104
- package/lib/styles/calendar.d.ts +1 -2
- package/lib/styles/calendar.js +9 -22
- package/lib/styles/checkbox.d.ts +0 -1
- package/lib/styles/checkbox.js +45 -94
- package/lib/styles/copy.d.ts +0 -1
- package/lib/styles/copy.js +67 -106
- package/lib/styles/custom-scrollbar.d.ts +1 -2
- package/lib/styles/custom-scrollbar.js +80 -115
- package/lib/styles/date-picker.d.ts +1 -5
- package/lib/styles/date-picker.js +261 -335
- package/lib/styles/field-size.d.ts +6 -0
- package/lib/styles/field-size.js +91 -0
- package/lib/styles/file-upload.d.ts +1 -2
- package/lib/styles/file-upload.js +143 -188
- package/lib/styles/icon.d.ts +2 -6
- package/lib/styles/icon.js +92 -170
- package/lib/styles/input.d.ts +1 -6
- package/lib/styles/input.js +125 -290
- package/lib/styles/modal.d.ts +1 -2
- package/lib/styles/modal.js +71 -108
- package/lib/styles/option.d.ts +2 -6
- package/lib/styles/option.js +49 -64
- package/lib/styles/popup.d.ts +1 -2
- package/lib/styles/popup.js +42 -77
- package/lib/styles/radio.d.ts +0 -1
- package/lib/styles/radio.js +69 -110
- package/lib/styles/resize-observer.d.ts +1 -2
- package/lib/styles/resize-observer.js +2 -12
- package/lib/styles/scroll-container.d.ts +1 -2
- package/lib/styles/scroll-container.js +100 -149
- package/lib/styles/select-base.d.ts +0 -1
- package/lib/styles/select-base.js +597 -785
- package/lib/styles/select.d.ts +1 -2
- package/lib/styles/select.js +140 -236
- package/lib/styles/step.d.ts +1 -2
- package/lib/styles/step.js +22 -33
- package/lib/styles/switch.d.ts +0 -1
- package/lib/styles/switch.js +34 -73
- package/lib/styles/tab.d.ts +1 -2
- package/lib/styles/tab.js +22 -34
- package/lib/styles/tabs.d.ts +3 -11
- package/lib/styles/tabs.js +190 -222
- package/lib/styles/tag.d.ts +1 -5
- package/lib/styles/tag.js +136 -218
- package/lib/styles/textarea.d.ts +1 -2
- package/lib/styles/textarea.js +210 -319
- package/lib/styles/tooltip.d.ts +0 -1
- package/lib/styles/tooltip.js +3 -13
- package/lib/styles/wizard.d.ts +5 -21
- package/lib/styles/wizard.js +170 -306
- package/lib/types/common.d.ts +2 -2
- package/lib/types/common.js +6 -17
- package/lib/utils/calendar-utils.d.ts +4 -21
- package/lib/utils/calendar-utils.js +100 -273
- package/lib/utils/custom-scrollbar.d.ts +6 -20
- package/lib/utils/custom-scrollbar.js +273 -317
- package/lib/utils/flavor-sheet.d.ts +0 -1
- package/lib/utils/flavor-sheet.js +14 -37
- package/lib/utils/icon-registry.d.ts +0 -2
- package/lib/utils/icon-registry.js +137 -243
- package/lib/utils/icons.d.ts +0 -1
- package/lib/utils/icons.js +0 -9
- package/lib/utils/loader-registry.d.ts +0 -1
- package/lib/utils/loader-registry.js +3 -35
- package/lib/utils/locale.d.ts +2 -23
- package/lib/utils/locale.js +34 -120
- package/lib/utils/mobile.d.ts +0 -1
- package/lib/utils/mobile.js +1 -18
- package/lib/utils/number-format.d.ts +6 -3
- package/lib/utils/number-format.js +54 -110
- package/lib/utils/positioning.d.ts +50 -7
- package/lib/utils/positioning.js +224 -234
- package/lib/utils/property-capture.d.ts +5 -27
- package/lib/utils/property-capture.js +36 -144
- package/lib/utils/property-manager.d.ts +0 -1
- package/lib/utils/property-manager.js +126 -196
- package/lib/utils/resize-observer.d.ts +0 -1
- package/lib/utils/resize-observer.js +23 -59
- package/lib/utils/scroll-lock.d.ts +4 -11
- package/lib/utils/scroll-lock.js +65 -172
- package/lib/utils/styles.d.ts +0 -1
- package/lib/utils/styles.js +17 -41
- package/lib/version.d.ts +1 -2
- package/lib/version.js +1 -11
- package/package.json +4 -4
- package/lib/base/ty-component.d.ts.map +0 -1
- package/lib/base/ty-component.js.map +0 -1
- package/lib/components/button.d.ts.map +0 -1
- package/lib/components/button.js.map +0 -1
- package/lib/components/calendar-month.d.ts.map +0 -1
- package/lib/components/calendar-month.js.map +0 -1
- package/lib/components/calendar-navigation.d.ts.map +0 -1
- package/lib/components/calendar-navigation.js.map +0 -1
- package/lib/components/calendar.d.ts.map +0 -1
- package/lib/components/calendar.js.map +0 -1
- package/lib/components/checkbox.d.ts.map +0 -1
- package/lib/components/checkbox.js.map +0 -1
- package/lib/components/copy.d.ts.map +0 -1
- package/lib/components/copy.js.map +0 -1
- package/lib/components/date-picker.d.ts.map +0 -1
- package/lib/components/date-picker.js.map +0 -1
- package/lib/components/file-upload.d.ts.map +0 -1
- package/lib/components/file-upload.js.map +0 -1
- package/lib/components/icon.d.ts.map +0 -1
- package/lib/components/icon.js.map +0 -1
- package/lib/components/input.d.ts.map +0 -1
- package/lib/components/input.js.map +0 -1
- package/lib/components/modal.d.ts.map +0 -1
- package/lib/components/modal.js.map +0 -1
- package/lib/components/option.d.ts.map +0 -1
- package/lib/components/option.js.map +0 -1
- package/lib/components/popup.d.ts.map +0 -1
- package/lib/components/popup.js.map +0 -1
- package/lib/components/radio.d.ts.map +0 -1
- package/lib/components/radio.js.map +0 -1
- package/lib/components/resize-observer.d.ts.map +0 -1
- package/lib/components/resize-observer.js.map +0 -1
- package/lib/components/scroll-container.d.ts.map +0 -1
- package/lib/components/scroll-container.js.map +0 -1
- package/lib/components/select.d.ts.map +0 -1
- package/lib/components/select.js.map +0 -1
- package/lib/components/selected-tags.d.ts.map +0 -1
- package/lib/components/selected-tags.js.map +0 -1
- package/lib/components/step.d.ts.map +0 -1
- package/lib/components/step.js.map +0 -1
- package/lib/components/switch.d.ts.map +0 -1
- package/lib/components/switch.js.map +0 -1
- package/lib/components/tab.d.ts.map +0 -1
- package/lib/components/tab.js.map +0 -1
- package/lib/components/tabs.d.ts.map +0 -1
- package/lib/components/tabs.js.map +0 -1
- package/lib/components/tag.d.ts.map +0 -1
- package/lib/components/tag.js.map +0 -1
- package/lib/components/textarea.d.ts.map +0 -1
- package/lib/components/textarea.js.map +0 -1
- package/lib/components/tooltip.d.ts.map +0 -1
- package/lib/components/tooltip.js.map +0 -1
- package/lib/components/wizard.d.ts.map +0 -1
- package/lib/components/wizard.js.map +0 -1
- package/lib/icons/fontawesome/brands.d.ts.map +0 -1
- package/lib/icons/fontawesome/brands.js.map +0 -1
- package/lib/icons/fontawesome/regular.d.ts.map +0 -1
- package/lib/icons/fontawesome/regular.js.map +0 -1
- package/lib/icons/fontawesome/solid.d.ts.map +0 -1
- package/lib/icons/fontawesome/solid.js.map +0 -1
- package/lib/icons/heroicons/micro.d.ts.map +0 -1
- package/lib/icons/heroicons/micro.js.map +0 -1
- package/lib/icons/heroicons/mini.d.ts.map +0 -1
- package/lib/icons/heroicons/mini.js.map +0 -1
- package/lib/icons/heroicons/outline.d.ts.map +0 -1
- package/lib/icons/heroicons/outline.js.map +0 -1
- package/lib/icons/heroicons/solid.d.ts.map +0 -1
- package/lib/icons/heroicons/solid.js.map +0 -1
- package/lib/icons/lucide.d.ts.map +0 -1
- package/lib/icons/lucide.js.map +0 -1
- package/lib/icons/material/filled.d.ts.map +0 -1
- package/lib/icons/material/filled.js.map +0 -1
- package/lib/icons/material/outlined.d.ts.map +0 -1
- package/lib/icons/material/outlined.js.map +0 -1
- package/lib/icons/material/round.d.ts.map +0 -1
- package/lib/icons/material/round.js.map +0 -1
- package/lib/icons/material/sharp.d.ts.map +0 -1
- package/lib/icons/material/sharp.js.map +0 -1
- package/lib/icons/material/two-tone.d.ts.map +0 -1
- package/lib/icons/material/two-tone.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/styles/button.d.ts.map +0 -1
- package/lib/styles/button.js.map +0 -1
- package/lib/styles/calendar-month.d.ts.map +0 -1
- package/lib/styles/calendar-month.js.map +0 -1
- package/lib/styles/calendar-navigation.d.ts.map +0 -1
- package/lib/styles/calendar-navigation.js.map +0 -1
- package/lib/styles/calendar.d.ts.map +0 -1
- package/lib/styles/calendar.js.map +0 -1
- package/lib/styles/checkbox.d.ts.map +0 -1
- package/lib/styles/checkbox.js.map +0 -1
- package/lib/styles/copy.d.ts.map +0 -1
- package/lib/styles/copy.js.map +0 -1
- package/lib/styles/custom-scrollbar.d.ts.map +0 -1
- package/lib/styles/custom-scrollbar.js.map +0 -1
- package/lib/styles/date-picker.d.ts.map +0 -1
- package/lib/styles/date-picker.js.map +0 -1
- package/lib/styles/file-upload.d.ts.map +0 -1
- package/lib/styles/file-upload.js.map +0 -1
- package/lib/styles/icon.d.ts.map +0 -1
- package/lib/styles/icon.js.map +0 -1
- package/lib/styles/input.d.ts.map +0 -1
- package/lib/styles/input.js.map +0 -1
- package/lib/styles/modal.d.ts.map +0 -1
- package/lib/styles/modal.js.map +0 -1
- package/lib/styles/multiselect.d.ts +0 -8
- package/lib/styles/multiselect.d.ts.map +0 -1
- package/lib/styles/multiselect.js +0 -849
- package/lib/styles/multiselect.js.map +0 -1
- package/lib/styles/option.d.ts.map +0 -1
- package/lib/styles/option.js.map +0 -1
- package/lib/styles/popup.d.ts.map +0 -1
- package/lib/styles/popup.js.map +0 -1
- package/lib/styles/radio.d.ts.map +0 -1
- package/lib/styles/radio.js.map +0 -1
- package/lib/styles/resize-observer.d.ts.map +0 -1
- package/lib/styles/resize-observer.js.map +0 -1
- package/lib/styles/scroll-container.d.ts.map +0 -1
- package/lib/styles/scroll-container.js.map +0 -1
- package/lib/styles/select-base.d.ts.map +0 -1
- package/lib/styles/select-base.js.map +0 -1
- package/lib/styles/select.d.ts.map +0 -1
- package/lib/styles/select.js.map +0 -1
- package/lib/styles/step.d.ts.map +0 -1
- package/lib/styles/step.js.map +0 -1
- package/lib/styles/switch.d.ts.map +0 -1
- package/lib/styles/switch.js.map +0 -1
- package/lib/styles/tab.d.ts.map +0 -1
- package/lib/styles/tab.js.map +0 -1
- package/lib/styles/tabs.d.ts.map +0 -1
- package/lib/styles/tabs.js.map +0 -1
- package/lib/styles/tag.d.ts.map +0 -1
- package/lib/styles/tag.js.map +0 -1
- package/lib/styles/textarea.d.ts.map +0 -1
- package/lib/styles/textarea.js.map +0 -1
- package/lib/styles/tooltip.d.ts.map +0 -1
- package/lib/styles/tooltip.js.map +0 -1
- package/lib/styles/wizard.d.ts.map +0 -1
- package/lib/styles/wizard.js.map +0 -1
- package/lib/types/common.d.ts.map +0 -1
- package/lib/types/common.js.map +0 -1
- package/lib/utils/calendar-utils.d.ts.map +0 -1
- package/lib/utils/calendar-utils.js.map +0 -1
- package/lib/utils/custom-scrollbar.d.ts.map +0 -1
- package/lib/utils/custom-scrollbar.js.map +0 -1
- package/lib/utils/flavor-sheet.d.ts.map +0 -1
- package/lib/utils/flavor-sheet.js.map +0 -1
- package/lib/utils/icon-registry.d.ts.map +0 -1
- package/lib/utils/icon-registry.js.map +0 -1
- package/lib/utils/icons.d.ts.map +0 -1
- package/lib/utils/icons.js.map +0 -1
- package/lib/utils/loader-registry.d.ts.map +0 -1
- package/lib/utils/loader-registry.js.map +0 -1
- package/lib/utils/locale.d.ts.map +0 -1
- package/lib/utils/locale.js.map +0 -1
- package/lib/utils/mobile.d.ts.map +0 -1
- package/lib/utils/mobile.js.map +0 -1
- package/lib/utils/number-format.d.ts.map +0 -1
- package/lib/utils/number-format.js.map +0 -1
- package/lib/utils/parse-boolean.d.ts +0 -39
- package/lib/utils/parse-boolean.d.ts.map +0 -1
- package/lib/utils/parse-boolean.js +0 -58
- package/lib/utils/parse-boolean.js.map +0 -1
- package/lib/utils/positioning.d.ts.map +0 -1
- package/lib/utils/positioning.js.map +0 -1
- package/lib/utils/property-capture.d.ts.map +0 -1
- package/lib/utils/property-capture.js.map +0 -1
- package/lib/utils/property-manager.d.ts.map +0 -1
- package/lib/utils/property-manager.js.map +0 -1
- package/lib/utils/resize-observer.d.ts.map +0 -1
- package/lib/utils/resize-observer.js.map +0 -1
- package/lib/utils/scroll-lock.d.ts.map +0 -1
- package/lib/utils/scroll-lock.js.map +0 -1
- package/lib/utils/styles.d.ts.map +0 -1
- package/lib/utils/styles.js.map +0 -1
- package/lib/version.d.ts.map +0 -1
- package/lib/version.js.map +0 -1
|
@@ -1,51 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TyDatePicker Web Component
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* A date picker component with read-only input and calendar dropdown.
|
|
6
|
-
* Supports date-only and date+time modes with smart time input.
|
|
7
|
-
*
|
|
8
|
-
* Architecture:
|
|
9
|
-
* - Read-only input stub (displays formatted date)
|
|
10
|
-
* - Calendar dropdown (modal dialog with ty-calendar)
|
|
11
|
-
* - Optional time input (with smart digit navigation)
|
|
12
|
-
* - Form participation via ElementInternals
|
|
13
|
-
* - UTC output, local display
|
|
14
|
-
*
|
|
15
|
-
* Features:
|
|
16
|
-
* - Date selection with calendar dropdown
|
|
17
|
-
* - Optional time input with smart navigation
|
|
18
|
-
* - Form integration (works with FormData)
|
|
19
|
-
* - UTC value output for server communication
|
|
20
|
-
* - Localized display formatting (Intl API)
|
|
21
|
-
* - Clearable with clear button
|
|
22
|
-
* - Keyboard navigation (Escape to close)
|
|
23
|
-
* - Outside click handling
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```html
|
|
27
|
-
* <!-- Basic date picker -->
|
|
28
|
-
* <ty-date-picker
|
|
29
|
-
* label="Select Date"
|
|
30
|
-
* placeholder="Choose a date">
|
|
31
|
-
* </ty-date-picker>
|
|
32
|
-
*
|
|
33
|
-
* <!-- With time -->
|
|
34
|
-
* <ty-date-picker
|
|
35
|
-
* with-time="true"
|
|
36
|
-
* label="Select Date & Time">
|
|
37
|
-
* </ty-date-picker>
|
|
38
|
-
*
|
|
39
|
-
* <!-- Form integration -->
|
|
40
|
-
* <form>
|
|
41
|
-
* <ty-date-picker name="booking-date"></ty-date-picker>
|
|
42
|
-
* <button type="submit">Submit</button>
|
|
43
|
-
* </form>
|
|
44
|
-
*
|
|
45
|
-
* <!-- Pre-filled value (UTC) -->
|
|
46
|
-
* <ty-date-picker value="2024-09-21T08:30:00.000Z"></ty-date-picker>
|
|
47
|
-
* ```
|
|
2
|
+
* TyDatePicker Web Component — read-only input stub + calendar dropdown
|
|
3
|
+
* (modal <dialog>), optional time input, form participation via
|
|
4
|
+
* ElementInternals. Value is UTC; display is local.
|
|
48
5
|
*/
|
|
6
|
+
import { type Placement } from '../utils/positioning.js';
|
|
49
7
|
import { TyComponent } from '../base/ty-component.js';
|
|
50
8
|
import type { Flavor } from '../types/common.js';
|
|
51
9
|
import type { PropertyChange } from '../utils/property-manager.js';
|
|
@@ -66,17 +24,11 @@ interface DatePickerState extends DateComponents {
|
|
|
66
24
|
withTime: boolean;
|
|
67
25
|
open: boolean;
|
|
68
26
|
}
|
|
69
|
-
/**
|
|
70
|
-
* Date picker sizes
|
|
71
|
-
*/
|
|
72
27
|
type DatePickerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
73
28
|
/**
|
|
74
29
|
* Date picker flavors (visual styles)
|
|
75
30
|
*/
|
|
76
31
|
type DatePickerFlavor = 'default' | Flavor;
|
|
77
|
-
/**
|
|
78
|
-
* Date format types
|
|
79
|
-
*/
|
|
80
32
|
type DateFormatType = 'short' | 'medium' | 'long' | 'full';
|
|
81
33
|
/**
|
|
82
34
|
* Change event detail
|
|
@@ -90,10 +42,15 @@ export interface DatePickerChangeDetail {
|
|
|
90
42
|
}
|
|
91
43
|
export declare class TyDatePicker extends TyComponent<DatePickerState> {
|
|
92
44
|
protected static properties: {
|
|
93
|
-
|
|
45
|
+
placement: {
|
|
94
46
|
type: "string";
|
|
95
47
|
visual: boolean;
|
|
96
48
|
default: string;
|
|
49
|
+
};
|
|
50
|
+
size: {
|
|
51
|
+
type: "string";
|
|
52
|
+
visual: boolean;
|
|
53
|
+
default: import("../types/common.js").Size;
|
|
97
54
|
validate: (v: any) => boolean;
|
|
98
55
|
coerce: (v: any) => any;
|
|
99
56
|
};
|
|
@@ -178,35 +135,20 @@ export declare class TyDatePicker extends TyComponent<DatePickerState> {
|
|
|
178
135
|
private _timeInput?;
|
|
179
136
|
private _localeObserver?;
|
|
180
137
|
private _customFlavorSheet;
|
|
181
|
-
/**
|
|
182
|
-
* Form-associated custom element
|
|
183
|
-
*/
|
|
184
138
|
static formAssociated: boolean;
|
|
185
139
|
constructor();
|
|
186
|
-
/**
|
|
187
|
-
* Called when component connects to DOM
|
|
188
|
-
* TyComponent handles property capture automatically
|
|
189
|
-
*/
|
|
140
|
+
/** TyComponent handles property capture automatically. */
|
|
190
141
|
protected onConnect(): void;
|
|
191
142
|
/** Custom (non-built-in) flavors — see utils/flavor-sheet.ts. */
|
|
192
143
|
private _syncCustomFlavor;
|
|
193
|
-
/**
|
|
194
|
-
* Called when component disconnects from DOM
|
|
195
|
-
*/
|
|
196
144
|
protected onDisconnect(): void;
|
|
197
|
-
/**
|
|
198
|
-
* Called when properties change
|
|
199
|
-
* Handle state updates BEFORE render
|
|
200
|
-
*/
|
|
145
|
+
/** Handle state updates BEFORE render. */
|
|
201
146
|
protected onPropertiesChanged(changes: PropertyChange[]): void;
|
|
202
147
|
/**
|
|
203
148
|
* Get form value - returns UTC string from current state
|
|
204
149
|
* TyComponent calls this automatically when value property changes
|
|
205
150
|
*/
|
|
206
151
|
protected getFormValue(): FormDataEntryValue | null;
|
|
207
|
-
/**
|
|
208
|
-
* Extract current date components from internal state
|
|
209
|
-
*/
|
|
210
152
|
private getComponents;
|
|
211
153
|
/**
|
|
212
154
|
* Whether internal state has a complete date
|
|
@@ -218,15 +160,8 @@ export declare class TyDatePicker extends TyComponent<DatePickerState> {
|
|
|
218
160
|
private getFormattedValue;
|
|
219
161
|
/**
|
|
220
162
|
* Initialize component state from attributes
|
|
221
|
-
*
|
|
222
|
-
* PORTED FROM: init-component-state! in date_picker.cljs
|
|
223
163
|
*/
|
|
224
164
|
private initializeState;
|
|
225
|
-
/**
|
|
226
|
-
* Update internal state
|
|
227
|
-
*
|
|
228
|
-
* PORTED FROM: update-component-state! in date_picker.cljs
|
|
229
|
-
*/
|
|
230
165
|
private updateState;
|
|
231
166
|
/**
|
|
232
167
|
* Sync form value with current state
|
|
@@ -234,19 +169,21 @@ export declare class TyDatePicker extends TyComponent<DatePickerState> {
|
|
|
234
169
|
*/
|
|
235
170
|
private syncFormValue;
|
|
236
171
|
/**
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
172
|
+
* Reflect constraint validation to the owning <form> via ElementInternals.
|
|
173
|
+
* Without this `required` is only cosmetic — unlike ty-input/ty-select/
|
|
174
|
+
* ty-calendar, which all call setValidity, an empty required date-picker
|
|
175
|
+
* never blocks form submission.
|
|
240
176
|
*/
|
|
241
|
-
|
|
177
|
+
private updateValidity;
|
|
242
178
|
/**
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
* PORTED FROM: emit-change-event! in date_picker.cljs
|
|
179
|
+
* Handle time input changes from TimeInput class
|
|
246
180
|
*/
|
|
181
|
+
handleTimeInputChange(hour: number, minute: number): void;
|
|
247
182
|
private emitChangeEvent;
|
|
248
183
|
get size(): DatePickerSize;
|
|
249
184
|
set size(v: DatePickerSize);
|
|
185
|
+
get placement(): Placement | '';
|
|
186
|
+
set placement(v: Placement | '');
|
|
250
187
|
get flavor(): DatePickerFlavor;
|
|
251
188
|
set flavor(v: DatePickerFlavor);
|
|
252
189
|
get label(): string;
|
|
@@ -289,33 +226,10 @@ export declare class TyDatePicker extends TyComponent<DatePickerState> {
|
|
|
289
226
|
* without needing the built-in clear button. Mirrors ty-select's clear().
|
|
290
227
|
*/
|
|
291
228
|
clear(): void;
|
|
292
|
-
/**
|
|
293
|
-
* Build CSS classes for the stub element
|
|
294
|
-
*
|
|
295
|
-
* PORTED FROM: build-stub-classes in date_picker.cljs
|
|
296
|
-
*/
|
|
297
229
|
private buildStubClasses;
|
|
298
|
-
/**
|
|
299
|
-
* Render the date picker stub (input display)
|
|
300
|
-
*
|
|
301
|
-
* PORTED FROM: render-date-picker-stub in date_picker.cljs
|
|
302
|
-
*/
|
|
303
230
|
private renderStub;
|
|
304
|
-
/**
|
|
305
|
-
* Create time input element
|
|
306
|
-
*
|
|
307
|
-
* PORTED FROM: create-time-input in date_picker.cljs
|
|
308
|
-
*/
|
|
309
231
|
private createTimeInputElement;
|
|
310
|
-
/**
|
|
311
|
-
* Render time input section
|
|
312
|
-
*/
|
|
313
232
|
private renderTimeSection;
|
|
314
|
-
/**
|
|
315
|
-
* Render calendar dropdown with dialog
|
|
316
|
-
*
|
|
317
|
-
* PORTED FROM: render-calendar-dropdown in date_picker.cljs
|
|
318
|
-
*/
|
|
319
233
|
private renderCalendarDropdown;
|
|
320
234
|
/**
|
|
321
235
|
* Render native date input for mobile touch devices.
|
|
@@ -323,33 +237,13 @@ export declare class TyDatePicker extends TyComponent<DatePickerState> {
|
|
|
323
237
|
* Reuses .date-picker-stub styling and existing event/state infrastructure.
|
|
324
238
|
*/
|
|
325
239
|
private renderNativeInput;
|
|
326
|
-
/**
|
|
327
|
-
* Calculate calendar position
|
|
328
|
-
*
|
|
329
|
-
* PORTED FROM: calculate-calendar-position! in date_picker.cljs
|
|
330
|
-
*/
|
|
331
240
|
private calculateCalendarPosition;
|
|
332
|
-
/**
|
|
333
|
-
* Render container structure
|
|
334
|
-
*
|
|
335
|
-
* PORTED FROM: render-container-structure in date_picker.cljs
|
|
336
|
-
*/
|
|
337
241
|
private renderContainer;
|
|
338
|
-
/**
|
|
339
|
-
* Main render method
|
|
340
|
-
*
|
|
341
|
-
* PORTED FROM: render! in date_picker.cljs
|
|
342
|
-
*/
|
|
343
242
|
protected render(): void;
|
|
344
243
|
/**
|
|
345
244
|
* Update display without destroying DOM (for open dialog)
|
|
346
|
-
*
|
|
347
|
-
* PORTED FROM: update-display! in date_picker.cljs
|
|
348
245
|
*/
|
|
349
246
|
private updateDisplay;
|
|
350
|
-
/**
|
|
351
|
-
* Setup document-level event listeners
|
|
352
|
-
*/
|
|
353
247
|
private setupEventListeners;
|
|
354
248
|
private handleStubClick;
|
|
355
249
|
/**
|
|
@@ -357,48 +251,12 @@ export declare class TyDatePicker extends TyComponent<DatePickerState> {
|
|
|
357
251
|
*/
|
|
358
252
|
private clearValue;
|
|
359
253
|
private handleClearClick;
|
|
360
|
-
/**
|
|
361
|
-
* Handle calendar date selection
|
|
362
|
-
*
|
|
363
|
-
* PORTED FROM: handle-calendar-change! in date_picker.cljs
|
|
364
|
-
*/
|
|
365
254
|
private handleCalendarChange;
|
|
366
|
-
/**
|
|
367
|
-
* Handle dialog backdrop clicks
|
|
368
|
-
*
|
|
369
|
-
* PORTED FROM: handle-dialog-click! in date_picker.cljs
|
|
370
|
-
*/
|
|
371
255
|
private handleDialogClick;
|
|
372
|
-
/**
|
|
373
|
-
* Handle clicks outside the date picker
|
|
374
|
-
*
|
|
375
|
-
* PORTED FROM: handle-outside-click! in date_picker.cljs
|
|
376
|
-
*/
|
|
377
256
|
private handleOutsideClick;
|
|
378
|
-
/**
|
|
379
|
-
* Handle Escape key press
|
|
380
|
-
*
|
|
381
|
-
* PORTED FROM: handle-escape-key! in date_picker.cljs
|
|
382
|
-
*/
|
|
383
257
|
private handleEscapeKey;
|
|
384
|
-
/**
|
|
385
|
-
* Open calendar dropdown
|
|
386
|
-
*
|
|
387
|
-
* PORTED FROM: open-dropdown! in date_picker.cljs
|
|
388
|
-
*/
|
|
389
258
|
private openDropdown;
|
|
390
|
-
/**
|
|
391
|
-
* Close calendar dropdown
|
|
392
|
-
*
|
|
393
|
-
* PORTED FROM: close-dropdown! in date_picker.cljs
|
|
394
|
-
*/
|
|
395
259
|
private closeDropdown;
|
|
396
|
-
/**
|
|
397
|
-
* Clean up event listeners and state
|
|
398
|
-
*
|
|
399
|
-
* PORTED FROM: cleanup! in date_picker.cljs
|
|
400
|
-
*/
|
|
401
260
|
private cleanup;
|
|
402
261
|
}
|
|
403
262
|
export {};
|
|
404
|
-
//# sourceMappingURL=date-picker.d.ts.map
|