tyrell-components 1.0.0-TC7
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/LICENSE +21 -0
- package/README.md +221 -0
- package/css/tyrell.css +1783 -0
- package/dist/tyrell.css +1783 -0
- package/dist/tyrell.js +2 -0
- package/lib/base/ty-component.d.ts +133 -0
- package/lib/base/ty-component.d.ts.map +1 -0
- package/lib/base/ty-component.js +297 -0
- package/lib/base/ty-component.js.map +1 -0
- package/lib/components/button.d.ts +126 -0
- package/lib/components/button.d.ts.map +1 -0
- package/lib/components/button.js +244 -0
- package/lib/components/button.js.map +1 -0
- package/lib/components/calendar-month.d.ts +132 -0
- package/lib/components/calendar-month.d.ts.map +1 -0
- package/lib/components/calendar-month.js +440 -0
- package/lib/components/calendar-month.js.map +1 -0
- package/lib/components/calendar-navigation.d.ts +137 -0
- package/lib/components/calendar-navigation.d.ts.map +1 -0
- package/lib/components/calendar-navigation.js +366 -0
- package/lib/components/calendar-navigation.js.map +1 -0
- package/lib/components/calendar.d.ts +166 -0
- package/lib/components/calendar.d.ts.map +1 -0
- package/lib/components/calendar.js +774 -0
- package/lib/components/calendar.js.map +1 -0
- package/lib/components/checkbox.d.ts +189 -0
- package/lib/components/checkbox.d.ts.map +1 -0
- package/lib/components/checkbox.js +400 -0
- package/lib/components/checkbox.js.map +1 -0
- package/lib/components/copy.d.ts +180 -0
- package/lib/components/copy.d.ts.map +1 -0
- package/lib/components/copy.js +393 -0
- package/lib/components/copy.js.map +1 -0
- package/lib/components/date-picker.d.ts +379 -0
- package/lib/components/date-picker.d.ts.map +1 -0
- package/lib/components/date-picker.js +1586 -0
- package/lib/components/date-picker.js.map +1 -0
- package/lib/components/dropdown.d.ts +402 -0
- package/lib/components/dropdown.d.ts.map +1 -0
- package/lib/components/dropdown.js +1564 -0
- package/lib/components/dropdown.js.map +1 -0
- package/lib/components/icon.d.ts +107 -0
- package/lib/components/icon.d.ts.map +1 -0
- package/lib/components/icon.js +230 -0
- package/lib/components/icon.js.map +1 -0
- package/lib/components/input.d.ts +270 -0
- package/lib/components/input.d.ts.map +1 -0
- package/lib/components/input.js +721 -0
- package/lib/components/input.js.map +1 -0
- package/lib/components/modal.d.ts +58 -0
- package/lib/components/modal.d.ts.map +1 -0
- package/lib/components/modal.js +473 -0
- package/lib/components/modal.js.map +1 -0
- package/lib/components/multiselect.d.ts +397 -0
- package/lib/components/multiselect.d.ts.map +1 -0
- package/lib/components/multiselect.js +1580 -0
- package/lib/components/multiselect.js.map +1 -0
- package/lib/components/option.d.ts +66 -0
- package/lib/components/option.d.ts.map +1 -0
- package/lib/components/option.js +314 -0
- package/lib/components/option.js.map +1 -0
- package/lib/components/popup.d.ts +43 -0
- package/lib/components/popup.d.ts.map +1 -0
- package/lib/components/popup.js +380 -0
- package/lib/components/popup.js.map +1 -0
- package/lib/components/radio.d.ts +198 -0
- package/lib/components/radio.d.ts.map +1 -0
- package/lib/components/radio.js +437 -0
- package/lib/components/radio.js.map +1 -0
- package/lib/components/resize-observer.d.ts +48 -0
- package/lib/components/resize-observer.d.ts.map +1 -0
- package/lib/components/resize-observer.js +108 -0
- package/lib/components/resize-observer.js.map +1 -0
- package/lib/components/scroll-container.d.ts +51 -0
- package/lib/components/scroll-container.d.ts.map +1 -0
- package/lib/components/scroll-container.js +239 -0
- package/lib/components/scroll-container.js.map +1 -0
- package/lib/components/step.d.ts +26 -0
- package/lib/components/step.d.ts.map +1 -0
- package/lib/components/step.js +75 -0
- package/lib/components/step.js.map +1 -0
- package/lib/components/switch.d.ts +111 -0
- package/lib/components/switch.d.ts.map +1 -0
- package/lib/components/switch.js +240 -0
- package/lib/components/switch.js.map +1 -0
- package/lib/components/tab.d.ts +23 -0
- package/lib/components/tab.d.ts.map +1 -0
- package/lib/components/tab.js +76 -0
- package/lib/components/tab.js.map +1 -0
- package/lib/components/tabs.d.ts +93 -0
- package/lib/components/tabs.d.ts.map +1 -0
- package/lib/components/tabs.js +653 -0
- package/lib/components/tabs.js.map +1 -0
- package/lib/components/tag.d.ts +144 -0
- package/lib/components/tag.d.ts.map +1 -0
- package/lib/components/tag.js +314 -0
- package/lib/components/tag.js.map +1 -0
- package/lib/components/textarea.d.ts +241 -0
- package/lib/components/textarea.d.ts.map +1 -0
- package/lib/components/textarea.js +585 -0
- package/lib/components/textarea.js.map +1 -0
- package/lib/components/tooltip.d.ts +40 -0
- package/lib/components/tooltip.d.ts.map +1 -0
- package/lib/components/tooltip.js +439 -0
- package/lib/components/tooltip.js.map +1 -0
- package/lib/components/wizard.d.ts +86 -0
- package/lib/components/wizard.d.ts.map +1 -0
- package/lib/components/wizard.js +636 -0
- package/lib/components/wizard.js.map +1 -0
- package/lib/icons/fontawesome/brands.d.ts +557 -0
- package/lib/icons/fontawesome/brands.d.ts.map +1 -0
- package/lib/icons/fontawesome/brands.js +557 -0
- package/lib/icons/fontawesome/brands.js.map +1 -0
- package/lib/icons/fontawesome/regular.d.ts +281 -0
- package/lib/icons/fontawesome/regular.d.ts.map +1 -0
- package/lib/icons/fontawesome/regular.js +281 -0
- package/lib/icons/fontawesome/regular.js.map +1 -0
- package/lib/icons/fontawesome/solid.d.ts +1992 -0
- package/lib/icons/fontawesome/solid.d.ts.map +1 -0
- package/lib/icons/fontawesome/solid.js +1992 -0
- package/lib/icons/fontawesome/solid.js.map +1 -0
- package/lib/icons/heroicons/micro.d.ts +324 -0
- package/lib/icons/heroicons/micro.d.ts.map +1 -0
- package/lib/icons/heroicons/micro.js +1032 -0
- package/lib/icons/heroicons/micro.js.map +1 -0
- package/lib/icons/heroicons/mini.d.ts +332 -0
- package/lib/icons/heroicons/mini.d.ts.map +1 -0
- package/lib/icons/heroicons/mini.js +1038 -0
- package/lib/icons/heroicons/mini.js.map +1 -0
- package/lib/icons/heroicons/outline.d.ts +332 -0
- package/lib/icons/heroicons/outline.d.ts.map +1 -0
- package/lib/icons/heroicons/outline.js +993 -0
- package/lib/icons/heroicons/outline.js.map +1 -0
- package/lib/icons/heroicons/solid.d.ts +332 -0
- package/lib/icons/heroicons/solid.d.ts.map +1 -0
- package/lib/icons/heroicons/solid.js +1063 -0
- package/lib/icons/heroicons/solid.js.map +1 -0
- package/lib/icons/lucide.d.ts +1872 -0
- package/lib/icons/lucide.d.ts.map +1 -0
- package/lib/icons/lucide.js +28212 -0
- package/lib/icons/lucide.js.map +1 -0
- package/lib/icons/material/filled.d.ts +2180 -0
- package/lib/icons/material/filled.d.ts.map +1 -0
- package/lib/icons/material/filled.js +14003 -0
- package/lib/icons/material/filled.js.map +1 -0
- package/lib/icons/material/outlined.d.ts +2142 -0
- package/lib/icons/material/outlined.d.ts.map +1 -0
- package/lib/icons/material/outlined.js +14545 -0
- package/lib/icons/material/outlined.js.map +1 -0
- package/lib/icons/material/round.d.ts +2147 -0
- package/lib/icons/material/round.d.ts.map +1 -0
- package/lib/icons/material/round.js +14779 -0
- package/lib/icons/material/round.js.map +1 -0
- package/lib/icons/material/sharp.d.ts +2147 -0
- package/lib/icons/material/sharp.d.ts.map +1 -0
- package/lib/icons/material/sharp.js +14189 -0
- package/lib/icons/material/sharp.js.map +1 -0
- package/lib/icons/material/two-tone.d.ts +2185 -0
- package/lib/icons/material/two-tone.d.ts.map +1 -0
- package/lib/icons/material/two-tone.js +17152 -0
- package/lib/icons/material/two-tone.js.map +1 -0
- package/lib/index.d.ts +78 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +71 -0
- package/lib/index.js.map +1 -0
- package/lib/styles/button.d.ts +14 -0
- package/lib/styles/button.d.ts.map +1 -0
- package/lib/styles/button.js +457 -0
- package/lib/styles/button.js.map +1 -0
- package/lib/styles/calendar-month.d.ts +6 -0
- package/lib/styles/calendar-month.d.ts.map +1 -0
- package/lib/styles/calendar-month.js +229 -0
- package/lib/styles/calendar-month.js.map +1 -0
- package/lib/styles/calendar-navigation.d.ts +6 -0
- package/lib/styles/calendar-navigation.d.ts.map +1 -0
- package/lib/styles/calendar-navigation.js +125 -0
- package/lib/styles/calendar-navigation.js.map +1 -0
- package/lib/styles/calendar.d.ts +6 -0
- package/lib/styles/calendar.d.ts.map +1 -0
- package/lib/styles/calendar.js +28 -0
- package/lib/styles/calendar.js.map +1 -0
- package/lib/styles/checkbox.d.ts +9 -0
- package/lib/styles/checkbox.d.ts.map +1 -0
- package/lib/styles/checkbox.js +19 -0
- package/lib/styles/checkbox.js.map +1 -0
- package/lib/styles/copy.d.ts +7 -0
- package/lib/styles/copy.d.ts.map +1 -0
- package/lib/styles/copy.js +94 -0
- package/lib/styles/copy.js.map +1 -0
- package/lib/styles/custom-scrollbar.d.ts +6 -0
- package/lib/styles/custom-scrollbar.d.ts.map +1 -0
- package/lib/styles/custom-scrollbar.js +157 -0
- package/lib/styles/custom-scrollbar.js.map +1 -0
- package/lib/styles/date-picker.d.ts +6 -0
- package/lib/styles/date-picker.d.ts.map +1 -0
- package/lib/styles/date-picker.js +400 -0
- package/lib/styles/date-picker.js.map +1 -0
- package/lib/styles/dropdown.d.ts +12 -0
- package/lib/styles/dropdown.d.ts.map +1 -0
- package/lib/styles/dropdown.js +983 -0
- package/lib/styles/dropdown.js.map +1 -0
- package/lib/styles/icon.d.ts +6 -0
- package/lib/styles/icon.d.ts.map +1 -0
- package/lib/styles/icon.js +231 -0
- package/lib/styles/icon.js.map +1 -0
- package/lib/styles/input.d.ts +7 -0
- package/lib/styles/input.d.ts.map +1 -0
- package/lib/styles/input.js +685 -0
- package/lib/styles/input.js.map +1 -0
- package/lib/styles/modal.d.ts +8 -0
- package/lib/styles/modal.d.ts.map +1 -0
- package/lib/styles/modal.js +134 -0
- package/lib/styles/modal.js.map +1 -0
- package/lib/styles/multiselect.d.ts +6 -0
- package/lib/styles/multiselect.d.ts.map +1 -0
- package/lib/styles/multiselect.js +774 -0
- package/lib/styles/multiselect.js.map +1 -0
- package/lib/styles/option.d.ts +6 -0
- package/lib/styles/option.d.ts.map +1 -0
- package/lib/styles/option.js +116 -0
- package/lib/styles/option.js.map +1 -0
- package/lib/styles/popup.d.ts +8 -0
- package/lib/styles/popup.d.ts.map +1 -0
- package/lib/styles/popup.js +95 -0
- package/lib/styles/popup.js.map +1 -0
- package/lib/styles/radio.d.ts +8 -0
- package/lib/styles/radio.d.ts.map +1 -0
- package/lib/styles/radio.js +160 -0
- package/lib/styles/radio.js.map +1 -0
- package/lib/styles/resize-observer.d.ts +6 -0
- package/lib/styles/resize-observer.d.ts.map +1 -0
- package/lib/styles/resize-observer.js +18 -0
- package/lib/styles/resize-observer.js.map +1 -0
- package/lib/styles/scroll-container.d.ts +6 -0
- package/lib/styles/scroll-container.d.ts.map +1 -0
- package/lib/styles/scroll-container.js +198 -0
- package/lib/styles/scroll-container.js.map +1 -0
- package/lib/styles/step.d.ts +5 -0
- package/lib/styles/step.d.ts.map +1 -0
- package/lib/styles/step.js +50 -0
- package/lib/styles/step.js.map +1 -0
- package/lib/styles/switch.d.ts +9 -0
- package/lib/styles/switch.d.ts.map +1 -0
- package/lib/styles/switch.js +100 -0
- package/lib/styles/switch.js.map +1 -0
- package/lib/styles/tab.d.ts +5 -0
- package/lib/styles/tab.d.ts.map +1 -0
- package/lib/styles/tab.js +51 -0
- package/lib/styles/tab.js.map +1 -0
- package/lib/styles/tabs.d.ts +13 -0
- package/lib/styles/tabs.d.ts.map +1 -0
- package/lib/styles/tabs.js +184 -0
- package/lib/styles/tabs.js.map +1 -0
- package/lib/styles/tag.d.ts +6 -0
- package/lib/styles/tag.d.ts.map +1 -0
- package/lib/styles/tag.js +415 -0
- package/lib/styles/tag.js.map +1 -0
- package/lib/styles/textarea.d.ts +6 -0
- package/lib/styles/textarea.d.ts.map +1 -0
- package/lib/styles/textarea.js +350 -0
- package/lib/styles/textarea.js.map +1 -0
- package/lib/styles/tooltip.d.ts +9 -0
- package/lib/styles/tooltip.d.ts.map +1 -0
- package/lib/styles/tooltip.js +136 -0
- package/lib/styles/tooltip.js.map +1 -0
- package/lib/styles/wizard.d.ts +25 -0
- package/lib/styles/wizard.d.ts.map +1 -0
- package/lib/styles/wizard.js +325 -0
- package/lib/styles/wizard.js.map +1 -0
- package/lib/types/common.d.ts +143 -0
- package/lib/types/common.d.ts.map +1 -0
- package/lib/types/common.js +5 -0
- package/lib/types/common.js.map +1 -0
- package/lib/utils/calendar-utils.d.ts +176 -0
- package/lib/utils/calendar-utils.d.ts.map +1 -0
- package/lib/utils/calendar-utils.js +370 -0
- package/lib/utils/calendar-utils.js.map +1 -0
- package/lib/utils/custom-scrollbar.d.ts +82 -0
- package/lib/utils/custom-scrollbar.d.ts.map +1 -0
- package/lib/utils/custom-scrollbar.js +320 -0
- package/lib/utils/custom-scrollbar.js.map +1 -0
- package/lib/utils/icon-registry.d.ts +78 -0
- package/lib/utils/icon-registry.d.ts.map +1 -0
- package/lib/utils/icon-registry.js +304 -0
- package/lib/utils/icon-registry.js.map +1 -0
- package/lib/utils/locale.d.ts +136 -0
- package/lib/utils/locale.d.ts.map +1 -0
- package/lib/utils/locale.js +213 -0
- package/lib/utils/locale.js.map +1 -0
- package/lib/utils/mobile.d.ts +14 -0
- package/lib/utils/mobile.d.ts.map +1 -0
- package/lib/utils/mobile.js +21 -0
- package/lib/utils/mobile.js.map +1 -0
- package/lib/utils/number-format.d.ts +83 -0
- package/lib/utils/number-format.d.ts.map +1 -0
- package/lib/utils/number-format.js +143 -0
- package/lib/utils/number-format.js.map +1 -0
- package/lib/utils/parse-boolean.d.ts +39 -0
- package/lib/utils/parse-boolean.d.ts.map +1 -0
- package/lib/utils/parse-boolean.js +58 -0
- package/lib/utils/parse-boolean.js.map +1 -0
- package/lib/utils/positioning.d.ts +143 -0
- package/lib/utils/positioning.d.ts.map +1 -0
- package/lib/utils/positioning.js +308 -0
- package/lib/utils/positioning.js.map +1 -0
- package/lib/utils/property-capture.d.ts +132 -0
- package/lib/utils/property-capture.d.ts.map +1 -0
- package/lib/utils/property-capture.js +152 -0
- package/lib/utils/property-capture.js.map +1 -0
- package/lib/utils/property-manager.d.ts +90 -0
- package/lib/utils/property-manager.d.ts.map +1 -0
- package/lib/utils/property-manager.js +197 -0
- package/lib/utils/property-manager.js.map +1 -0
- package/lib/utils/resize-observer.d.ts +42 -0
- package/lib/utils/resize-observer.d.ts.map +1 -0
- package/lib/utils/resize-observer.js +71 -0
- package/lib/utils/resize-observer.js.map +1 -0
- package/lib/utils/scroll-lock.d.ts +79 -0
- package/lib/utils/scroll-lock.d.ts.map +1 -0
- package/lib/utils/scroll-lock.js +197 -0
- package/lib/utils/scroll-lock.js.map +1 -0
- package/lib/utils/styles.d.ts +27 -0
- package/lib/utils/styles.d.ts.map +1 -0
- package/lib/utils/styles.js +53 -0
- package/lib/utils/styles.js.map +1 -0
- package/lib/version.d.ts +8 -0
- package/lib/version.d.ts.map +1 -0
- package/lib/version.js +11 -0
- package/lib/version.js.map +1 -0
- package/package.json +159 -0
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TyInput Web Component
|
|
3
|
+
* PORTED FROM: clj/ty/components/input.cljs
|
|
4
|
+
* Phase D: Complete with debounce feature for input and change events
|
|
5
|
+
*
|
|
6
|
+
* Enhanced input component with:
|
|
7
|
+
* - Label, error messages, semantic styling
|
|
8
|
+
* - Icon slots (start/end)
|
|
9
|
+
* - Numeric formatting with shadow values
|
|
10
|
+
* - Currency, percent, compact notation
|
|
11
|
+
* - Format-on-blur / raw-on-focus behavior
|
|
12
|
+
* - Debounce (0-5000ms) for input/change events
|
|
13
|
+
* - Immediate event firing on blur (cancels pending debounce)
|
|
14
|
+
*
|
|
15
|
+
* NOTE: Checkbox functionality is in separate ty-checkbox component
|
|
16
|
+
*/
|
|
17
|
+
import type { Flavor, Size, InputType, TyInputElement } from '../types/common.js';
|
|
18
|
+
import { TyComponent } from '../base/ty-component.js';
|
|
19
|
+
import type { PropertyChange } from '../utils/property-manager.js';
|
|
20
|
+
/**
|
|
21
|
+
* Ty Input Component (Phase D - Complete with Debounce)
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```html
|
|
25
|
+
* <!-- Basic input -->
|
|
26
|
+
* <ty-input label="Email" type="email" placeholder="Enter email" required></ty-input>
|
|
27
|
+
*
|
|
28
|
+
* <!-- With icons -->
|
|
29
|
+
* <ty-input label="Search">
|
|
30
|
+
* <ty-icon slot="start" name="search"></ty-icon>
|
|
31
|
+
* </ty-input>
|
|
32
|
+
*
|
|
33
|
+
* <!-- With debounce (500ms) -->
|
|
34
|
+
* <ty-input
|
|
35
|
+
* label="Search"
|
|
36
|
+
* debounce="500"
|
|
37
|
+
* placeholder="Type to search...">
|
|
38
|
+
* </ty-input>
|
|
39
|
+
*
|
|
40
|
+
* <!-- Currency formatting -->
|
|
41
|
+
* <ty-input
|
|
42
|
+
* label="Price"
|
|
43
|
+
* type="currency"
|
|
44
|
+
* currency="USD"
|
|
45
|
+
* locale="en-US"
|
|
46
|
+
* value="1234.56">
|
|
47
|
+
* </ty-input>
|
|
48
|
+
*
|
|
49
|
+
* <!-- Percent formatting -->
|
|
50
|
+
* <ty-input
|
|
51
|
+
* label="Tax Rate"
|
|
52
|
+
* type="percent"
|
|
53
|
+
* value="15"
|
|
54
|
+
* precision="2">
|
|
55
|
+
* </ty-input>
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
/**
|
|
59
|
+
* Internal state interface for TyInput component
|
|
60
|
+
*/
|
|
61
|
+
interface InputState {
|
|
62
|
+
shadowValue: number | string | null;
|
|
63
|
+
isFocused: boolean;
|
|
64
|
+
listenersSetup: boolean;
|
|
65
|
+
inputHandler: ((e: Event) => void) | null;
|
|
66
|
+
changeHandler: ((e: Event) => void) | null;
|
|
67
|
+
focusHandler: ((e: Event) => void) | null;
|
|
68
|
+
blurHandler: ((e: Event) => void) | null;
|
|
69
|
+
inputDebounceTimer: number | null;
|
|
70
|
+
changeDebounceTimer: number | null;
|
|
71
|
+
localeObserver?: () => void;
|
|
72
|
+
}
|
|
73
|
+
export declare class TyInput extends TyComponent<InputState> implements TyInputElement {
|
|
74
|
+
static formAssociated: boolean;
|
|
75
|
+
protected static properties: {
|
|
76
|
+
type: {
|
|
77
|
+
type: "string";
|
|
78
|
+
visual: boolean;
|
|
79
|
+
default: string;
|
|
80
|
+
validate: (v: any) => boolean;
|
|
81
|
+
coerce: (v: any) => any;
|
|
82
|
+
};
|
|
83
|
+
value: {
|
|
84
|
+
type: "string";
|
|
85
|
+
visual: boolean;
|
|
86
|
+
formValue: boolean;
|
|
87
|
+
emitChange: boolean;
|
|
88
|
+
default: string;
|
|
89
|
+
};
|
|
90
|
+
name: {
|
|
91
|
+
type: "string";
|
|
92
|
+
default: string;
|
|
93
|
+
};
|
|
94
|
+
placeholder: {
|
|
95
|
+
type: "string";
|
|
96
|
+
visual: boolean;
|
|
97
|
+
default: string;
|
|
98
|
+
};
|
|
99
|
+
label: {
|
|
100
|
+
type: "string";
|
|
101
|
+
visual: boolean;
|
|
102
|
+
default: string;
|
|
103
|
+
};
|
|
104
|
+
disabled: {
|
|
105
|
+
type: "boolean";
|
|
106
|
+
visual: boolean;
|
|
107
|
+
default: boolean;
|
|
108
|
+
};
|
|
109
|
+
required: {
|
|
110
|
+
type: "boolean";
|
|
111
|
+
visual: boolean;
|
|
112
|
+
default: boolean;
|
|
113
|
+
};
|
|
114
|
+
error: {
|
|
115
|
+
type: "string";
|
|
116
|
+
visual: boolean;
|
|
117
|
+
default: string;
|
|
118
|
+
};
|
|
119
|
+
size: {
|
|
120
|
+
type: "string";
|
|
121
|
+
visual: boolean;
|
|
122
|
+
default: string;
|
|
123
|
+
validate: (v: any) => boolean;
|
|
124
|
+
coerce: (v: any) => any;
|
|
125
|
+
};
|
|
126
|
+
flavor: {
|
|
127
|
+
type: "string";
|
|
128
|
+
visual: boolean;
|
|
129
|
+
default: string;
|
|
130
|
+
validate: (v: any) => boolean;
|
|
131
|
+
coerce: (v: any) => any;
|
|
132
|
+
};
|
|
133
|
+
currency: {
|
|
134
|
+
type: "string";
|
|
135
|
+
visual: boolean;
|
|
136
|
+
default: string;
|
|
137
|
+
};
|
|
138
|
+
locale: {
|
|
139
|
+
type: "string";
|
|
140
|
+
visual: boolean;
|
|
141
|
+
default: string;
|
|
142
|
+
};
|
|
143
|
+
precision: {
|
|
144
|
+
type: "number";
|
|
145
|
+
visual: boolean;
|
|
146
|
+
default: undefined;
|
|
147
|
+
validate: (v: any) => boolean;
|
|
148
|
+
coerce: (v: any) => number | undefined;
|
|
149
|
+
};
|
|
150
|
+
debounce: {
|
|
151
|
+
type: "number";
|
|
152
|
+
default: number;
|
|
153
|
+
validate: (v: any) => boolean;
|
|
154
|
+
coerce: (v: any) => number;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
private _shadowValue;
|
|
158
|
+
private _isFocused;
|
|
159
|
+
private _listenersSetup;
|
|
160
|
+
private _inputHandler;
|
|
161
|
+
private _changeHandler;
|
|
162
|
+
private _focusHandler;
|
|
163
|
+
private _blurHandler;
|
|
164
|
+
private _inputDebounceTimer;
|
|
165
|
+
private _changeDebounceTimer;
|
|
166
|
+
private _localeObserver?;
|
|
167
|
+
constructor();
|
|
168
|
+
/**
|
|
169
|
+
* Called when component connects to DOM
|
|
170
|
+
* TyComponent already handled pre-connection property capture
|
|
171
|
+
*/
|
|
172
|
+
protected onConnect(): void;
|
|
173
|
+
/**
|
|
174
|
+
* Called when component disconnects from DOM
|
|
175
|
+
*/
|
|
176
|
+
protected onDisconnect(): void;
|
|
177
|
+
/**
|
|
178
|
+
* Handle property changes - called BEFORE render
|
|
179
|
+
* This replaces the old attributeChangedCallback logic
|
|
180
|
+
*/
|
|
181
|
+
protected onPropertiesChanged(changes: PropertyChange[]): void;
|
|
182
|
+
/**
|
|
183
|
+
* Hook: Called when form is reset
|
|
184
|
+
* Clear shadow value and focus state
|
|
185
|
+
*/
|
|
186
|
+
protected onFormReset(): void;
|
|
187
|
+
/**
|
|
188
|
+
* Override form value to return shadow value
|
|
189
|
+
* This ensures numeric types submit their parsed values
|
|
190
|
+
*/
|
|
191
|
+
protected getFormValue(): FormDataEntryValue | null;
|
|
192
|
+
/**
|
|
193
|
+
* Initialize shadow value from the initial value attribute
|
|
194
|
+
*/
|
|
195
|
+
private initializeShadowValue;
|
|
196
|
+
/**
|
|
197
|
+
* Parse a string value to the appropriate shadow value type
|
|
198
|
+
*/
|
|
199
|
+
private parseShadowValue;
|
|
200
|
+
/**
|
|
201
|
+
* Check if current input should format numbers
|
|
202
|
+
*/
|
|
203
|
+
private shouldFormat;
|
|
204
|
+
/**
|
|
205
|
+
* Get the format configuration for current input
|
|
206
|
+
*/
|
|
207
|
+
private getFormatConfig;
|
|
208
|
+
/**
|
|
209
|
+
* Get the display value (formatted or raw)
|
|
210
|
+
*/
|
|
211
|
+
private getDisplayValue;
|
|
212
|
+
get type(): InputType;
|
|
213
|
+
set type(v: InputType);
|
|
214
|
+
get value(): string;
|
|
215
|
+
set value(v: string);
|
|
216
|
+
get name(): string;
|
|
217
|
+
set name(v: string);
|
|
218
|
+
get placeholder(): string;
|
|
219
|
+
set placeholder(v: string);
|
|
220
|
+
get label(): string;
|
|
221
|
+
set label(v: string);
|
|
222
|
+
get disabled(): boolean;
|
|
223
|
+
set disabled(v: boolean);
|
|
224
|
+
get required(): boolean;
|
|
225
|
+
set required(v: boolean);
|
|
226
|
+
get error(): string;
|
|
227
|
+
set error(v: string);
|
|
228
|
+
get size(): Size;
|
|
229
|
+
set size(v: Size);
|
|
230
|
+
get flavor(): Flavor;
|
|
231
|
+
set flavor(v: Flavor);
|
|
232
|
+
get currency(): string;
|
|
233
|
+
set currency(v: string);
|
|
234
|
+
get locale(): string;
|
|
235
|
+
set locale(v: string);
|
|
236
|
+
get precision(): number | undefined;
|
|
237
|
+
set precision(v: number | string | undefined);
|
|
238
|
+
get debounce(): number;
|
|
239
|
+
set debounce(v: number | string);
|
|
240
|
+
get form(): HTMLFormElement | null;
|
|
241
|
+
/**
|
|
242
|
+
* Build CSS class list for input wrapper
|
|
243
|
+
*/
|
|
244
|
+
private buildClassList;
|
|
245
|
+
/**
|
|
246
|
+
* Dispatch input event (helper method for debouncing)
|
|
247
|
+
*/
|
|
248
|
+
private dispatchInputEvent;
|
|
249
|
+
/**
|
|
250
|
+
* Dispatch change event (helper method for debouncing)
|
|
251
|
+
*/
|
|
252
|
+
private dispatchChangeEvent;
|
|
253
|
+
/**
|
|
254
|
+
* Remove event listeners for cleanup
|
|
255
|
+
*/
|
|
256
|
+
private removeEventListeners;
|
|
257
|
+
/**
|
|
258
|
+
* Setup event listeners for input element
|
|
259
|
+
* IMPORTANT: Only called ONCE, not on every render (like ClojureScript)
|
|
260
|
+
*/
|
|
261
|
+
private setupEventListeners;
|
|
262
|
+
/**
|
|
263
|
+
* Render the input component with wrapper and slots
|
|
264
|
+
* Phase C: Uses getDisplayValue() for formatted output
|
|
265
|
+
*
|
|
266
|
+
*/
|
|
267
|
+
render(): void;
|
|
268
|
+
}
|
|
269
|
+
export {};
|
|
270
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/components/input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAgBlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH;;GAEG;AACH,UAAU,UAAU;IAElB,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAGnC,SAAS,EAAE,OAAO,CAAA;IAGlB,cAAc,EAAE,OAAO,CAAA;IAGvB,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC,GAAG,IAAI,CAAA;IACzC,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK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