@sula-tech/webcomponents 0.11.3 → 0.13.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.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sula-avatar_21.cjs.entry.js +120 -18
- package/dist/cjs/sula-avatar_21.cjs.entry.js.map +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/components/sula-textfield/sula-textfield.css +1 -1
- package/dist/collection/components/sula-textfield/sula-textfield.js +157 -18
- package/dist/collection/components/sula-textfield/sula-textfield.js.map +1 -1
- package/dist/collection/components/sula-textfield/sula-textfield.stories.js +92 -1
- package/dist/collection/components/sula-textfield/sula-textfield.stories.js.map +1 -1
- package/dist/components/sula-textfield.js +124 -19
- package/dist/components/sula-textfield.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sula-avatar_21.entry.js +120 -18
- package/dist/esm/sula-avatar_21.entry.js.map +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/types/components/sula-textfield/sula-textfield.d.ts +23 -2
- package/dist/types/components/sula-textfield/sula-textfield.stories.d.ts +14 -0
- package/dist/types/components.d.ts +15 -2
- package/dist/webcomponents/{p-0749814d.entry.js → p-f1a4d84f.entry.js} +129 -32
- package/dist/webcomponents/p-f1a4d84f.entry.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +9 -6
- package/package.json +1 -1
- package/dist/webcomponents/p-0749814d.entry.js.map +0 -1
|
@@ -16,7 +16,7 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["sula-avatar_21",[[1,"sula-modal",{"opened":[1028],"blockBodyScroll":[1028,"block-body-scroll"],"closeOnClickOutside":[1028,"close-on-click-outside"],"type":[1],"headerIcon":[1,"header-icon"],"modalTitle":[1,"modal-title"],"promoImage":[1,"promo-image"],"subTitle":[1,"sub-title"],"primaryButtonText":[1,"primary-button-text"],"secondaryButtonText":[1,"secondary-button-text"],"slotOverflow":[1,"slot-overflow"],"isAnimating":[32],"shouldRender":[32]},null,{"opened":["handleOpenedChange"]}],[1,"sula-chip",{"text":[1025],"appearance":[1025],"disabled":[1028],"items":[1040],"selected":[1028],"isFocused":[32],"showItems":[32]},[[4,"click","handleDocumentClick"]]],[1,"sula-dropdown",{"label":[1025],"disabled":[1028],"items":[1040],"value":[1040],"searchable":[516],"menuMaxHeight":[2,"menu-max-height"],"selectedItem":[32],"showItems":[32],"isFocused":[32],"searchTerm":[32],"filteredItems":[32],"openUpward":[32]},[[4,"click","handleDocumentClick"],[9,"resize","handleWindowResize"]],{"value":["handleValueChange"],"showItems":["handleShowItemsChange"]}],[1,"sula-avatar",{"size":[1],"imageUrl":[1,"image-url"],"text":[1],"icon":[1]}],[1,"sula-badge",{"status":[1025],"size":[1025],"type":[1025],"text":[1025],"icon":[1025],"hasSlotContent":[32]}],[1,"sula-breadcrumb",{"items":[1040]}],[1,"sula-checkbox",{"type":[1025],"label":[1025],"subTitle":[1025,"sub-title"],"disabled":[1028],"checked":[1028],"isFocus":[32]}],[1,"sula-progress-bar",{"appearance":[1025],"state":[1025],"topLabel":[1025,"top-label"],"bottomLabel":[1025,"bottom-label"],"progress":[1026],"showProgress":[1028,"show-progress"]},null,{"progress":["validateProgress"]}],[1,"sula-search-bar",{"value":[1025],"searchBarStyle":[1025,"search-bar-style"],"placeholder":[1025],"leftIcon":[1025,"left-icon"],"rightIcon":[1025,"right-icon"],"isFocused":[32],"textValue":[32]}],[1,"sula-segmented-control",{"items":[1040],"type":[1025],"size":[1025],"color":[1025]}],[1,"sula-tag",{"label":[1025],"icon":[1025],"iconStatus":[1025,"icon-status"],"size":[1025],"appearance":[1025],"fontWeight":[1025,"font-weight"]}],[1,"sula-textfield",{"value":[1025],"type":[1],"status":[1025],"label":[1],"placeholder":[1],"disabled":[1028],"helpText":[1,"help-text"],"maxLength":[2,"max-length"],"icon":[1],"maskPattern":[1,"mask-pattern"],"inputIsOpen":[32],"textValue":[32],"showPassword":[32],"inputIsFocused":[32]},[[4,"click","handleClick"]],{"value":["watchValueHandler"]}],[1,"sula-tiles",{"type":[1],"size":[1],"ellipsis":[4],"icon":[1],"text":[1],"subText":[1,"sub-text"],"disabled":[4]}],[1,"sula-timeline-list",{"sulaTimelineList":[1040,"sula-timeline-list"]}],[1,"sula-radio-button",{"checked":[1028],"label":[1025],"disabled":[1028],"radioIsFocus":[32]}],[1,"sula-switch",{"type":[1025],"active":[1028],"disabled":[1028],"label":[1025],"subTitle":[1025,"sub-title"],"responsive":[4],"isFocus":[32]}],[1,"sula-textarea",{"value":[1025],"status":[1025],"label":[1],"placeholder":[1],"disabled":[1028],"helpText":[1,"help-text"],"maxLength":[2,"max-length"],"rows":[2],"isActive":[32],"textValue":[32],"textareaIsFocused":[32],"labelPadding":[32]},[[4,"click","handleClick"]],{"value":["watchValueHandler"]}],[1,"sula-button",{"text":[1025],"icon":[1025],"leftIcon":[1025,"left-icon"],"rightIcon":[1025,"right-icon"],"appearance":[1025],"type":[1025],"size":[1025],"status":[1025],"loading":[1028],"buttonDisabled":[1028,"button-disabled"],"fullWidth":[1028,"full-width"]}],[1,"sula-loader",{"size":[1],"animationInstance":[32]}],[1,"sula-menu-select-list",{"items":[1040],"fullWidth":[4,"full-width"],"maxHeight":[2,"max-height"],"selectedValue":[16,"selected-value"]}],[0,"sula-icon",{"icon":[1],"customClass":[1,"custom-class"]}]]]], options);
|
|
19
|
+
return bootstrapLazy([["sula-avatar_21",[[1,"sula-modal",{"opened":[1028],"blockBodyScroll":[1028,"block-body-scroll"],"closeOnClickOutside":[1028,"close-on-click-outside"],"type":[1],"headerIcon":[1,"header-icon"],"modalTitle":[1,"modal-title"],"promoImage":[1,"promo-image"],"subTitle":[1,"sub-title"],"primaryButtonText":[1,"primary-button-text"],"secondaryButtonText":[1,"secondary-button-text"],"slotOverflow":[1,"slot-overflow"],"isAnimating":[32],"shouldRender":[32]},null,{"opened":["handleOpenedChange"]}],[1,"sula-chip",{"text":[1025],"appearance":[1025],"disabled":[1028],"items":[1040],"selected":[1028],"isFocused":[32],"showItems":[32]},[[4,"click","handleDocumentClick"]]],[1,"sula-dropdown",{"label":[1025],"disabled":[1028],"items":[1040],"value":[1040],"searchable":[516],"menuMaxHeight":[2,"menu-max-height"],"selectedItem":[32],"showItems":[32],"isFocused":[32],"searchTerm":[32],"filteredItems":[32],"openUpward":[32]},[[4,"click","handleDocumentClick"],[9,"resize","handleWindowResize"]],{"value":["handleValueChange"],"showItems":["handleShowItemsChange"]}],[1,"sula-avatar",{"size":[1],"imageUrl":[1,"image-url"],"text":[1],"icon":[1]}],[1,"sula-badge",{"status":[1025],"size":[1025],"type":[1025],"text":[1025],"icon":[1025],"hasSlotContent":[32]}],[1,"sula-breadcrumb",{"items":[1040]}],[1,"sula-checkbox",{"type":[1025],"label":[1025],"subTitle":[1025,"sub-title"],"disabled":[1028],"checked":[1028],"isFocus":[32]}],[1,"sula-progress-bar",{"appearance":[1025],"state":[1025],"topLabel":[1025,"top-label"],"bottomLabel":[1025,"bottom-label"],"progress":[1026],"showProgress":[1028,"show-progress"]},null,{"progress":["validateProgress"]}],[1,"sula-search-bar",{"value":[1025],"searchBarStyle":[1025,"search-bar-style"],"placeholder":[1025],"leftIcon":[1025,"left-icon"],"rightIcon":[1025,"right-icon"],"isFocused":[32],"textValue":[32]}],[1,"sula-segmented-control",{"items":[1040],"type":[1025],"size":[1025],"color":[1025]}],[1,"sula-tag",{"label":[1025],"icon":[1025],"iconStatus":[1025,"icon-status"],"size":[1025],"appearance":[1025],"fontWeight":[1025,"font-weight"]}],[1,"sula-textfield",{"value":[1025],"type":[1],"status":[1025],"label":[1],"placeholder":[1],"disabled":[1028],"helpText":[1,"help-text"],"maxLength":[2,"max-length"],"icon":[1],"maskPattern":[1,"mask-pattern"],"maskPatternSwitchMaxLength":[2,"mask-pattern-switch-max-length"],"inputIsOpen":[32],"textValue":[32],"showPassword":[32],"inputIsFocused":[32]},[[4,"click","handleClick"]],{"value":["watchValueHandler"],"maskPattern":["watchMaskPatternHandler"],"maskPatternSwitchMaxLength":["watchMaskPatternSwitchMaxLengthHandler"]}],[1,"sula-tiles",{"type":[1],"size":[1],"ellipsis":[4],"icon":[1],"text":[1],"subText":[1,"sub-text"],"disabled":[4]}],[1,"sula-timeline-list",{"sulaTimelineList":[1040,"sula-timeline-list"]}],[1,"sula-radio-button",{"checked":[1028],"label":[1025],"disabled":[1028],"radioIsFocus":[32]}],[1,"sula-switch",{"type":[1025],"active":[1028],"disabled":[1028],"label":[1025],"subTitle":[1025,"sub-title"],"responsive":[4],"isFocus":[32]}],[1,"sula-textarea",{"value":[1025],"status":[1025],"label":[1],"placeholder":[1],"disabled":[1028],"helpText":[1,"help-text"],"maxLength":[2,"max-length"],"rows":[2],"isActive":[32],"textValue":[32],"textareaIsFocused":[32],"labelPadding":[32]},[[4,"click","handleClick"]],{"value":["watchValueHandler"]}],[1,"sula-button",{"text":[1025],"icon":[1025],"leftIcon":[1025,"left-icon"],"rightIcon":[1025,"right-icon"],"appearance":[1025],"type":[1025],"size":[1025],"status":[1025],"loading":[1028],"buttonDisabled":[1028,"button-disabled"],"fullWidth":[1028,"full-width"]}],[1,"sula-loader",{"size":[1],"animationInstance":[32]}],[1,"sula-menu-select-list",{"items":[1040],"fullWidth":[4,"full-width"],"maxHeight":[2,"max-height"],"selectedValue":[16,"selected-value"]}],[0,"sula-icon",{"icon":[1],"customClass":[1,"custom-class"]}]]]], options);
|
|
20
20
|
});
|
|
21
21
|
//# sourceMappingURL=webcomponents.js.map
|
|
22
22
|
|
|
@@ -41,12 +41,25 @@ export declare class SulaTextfield {
|
|
|
41
41
|
* Event emitted when input value changes.
|
|
42
42
|
*/
|
|
43
43
|
valueChanged: EventEmitter<string>;
|
|
44
|
+
/**
|
|
45
|
+
* Event emitted when input value changes without mask pattern applied.
|
|
46
|
+
*/
|
|
47
|
+
valueChangedWithoutMask: EventEmitter<string>;
|
|
44
48
|
/**
|
|
45
49
|
* The textfield mask pattern
|
|
46
50
|
* The mask pattern should follow the VMasker pattern format
|
|
47
51
|
* More info: https://github.com/vanilla-masker/vanilla-masker?tab=readme-ov-file#custom-pattern
|
|
48
52
|
*/
|
|
49
|
-
maskPattern?: string;
|
|
53
|
+
maskPattern?: string | string[];
|
|
54
|
+
/**
|
|
55
|
+
* Optional manual switch lengths used to switch between mask patterns.
|
|
56
|
+
* If not provided, switch lengths are automatically inferred from `maskPattern`.
|
|
57
|
+
*
|
|
58
|
+
* - When number: switches between first and second pattern at this length
|
|
59
|
+
* - When array: defines multiple switch points for multiple patterns
|
|
60
|
+
* Example: [11, 14] means 0-11 uses first pattern, 12-14 uses second, 15+ uses third
|
|
61
|
+
*/
|
|
62
|
+
maskPatternSwitchMaxLength?: number | number[];
|
|
50
63
|
/**
|
|
51
64
|
* Event emitted when input is focused.
|
|
52
65
|
*/
|
|
@@ -60,6 +73,8 @@ export declare class SulaTextfield {
|
|
|
60
73
|
showPassword: boolean;
|
|
61
74
|
inputIsFocused: boolean;
|
|
62
75
|
watchValueHandler(newValue: string): void;
|
|
76
|
+
watchMaskPatternHandler(): void;
|
|
77
|
+
watchMaskPatternSwitchMaxLengthHandler(): void;
|
|
63
78
|
inputContainer: HTMLDivElement;
|
|
64
79
|
inputElement: HTMLInputElement;
|
|
65
80
|
labelElement: HTMLDivElement;
|
|
@@ -75,7 +90,13 @@ export declare class SulaTextfield {
|
|
|
75
90
|
handleBlur: () => void;
|
|
76
91
|
handleInputFocus: () => void;
|
|
77
92
|
handleIconClick: (event: MouseEvent) => void;
|
|
78
|
-
handleInputMask(): void;
|
|
93
|
+
handleInputMask(inputValue?: string): void;
|
|
94
|
+
private syncMaskState;
|
|
95
|
+
private hasMaskPatternConfigured;
|
|
96
|
+
private getMaskPatterns;
|
|
97
|
+
private getMaskPatternByValueLength;
|
|
98
|
+
private getMaskPatternByAutoInference;
|
|
99
|
+
private normalizeProvidedSwitchLengths;
|
|
79
100
|
handlePasswordIconClicked(): void;
|
|
80
101
|
getInputIcon(): string;
|
|
81
102
|
render(): any;
|
|
@@ -49,6 +49,14 @@ declare const _default: {
|
|
|
49
49
|
required: boolean;
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
|
+
maskPatternSwitchMaxLength: {
|
|
53
|
+
control: string;
|
|
54
|
+
defaultValue: number;
|
|
55
|
+
description: string;
|
|
56
|
+
type: {
|
|
57
|
+
required: boolean;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
52
60
|
placeholder: {
|
|
53
61
|
control: string;
|
|
54
62
|
defaultValue: string;
|
|
@@ -93,6 +101,10 @@ declare const _default: {
|
|
|
93
101
|
action: string;
|
|
94
102
|
description: string;
|
|
95
103
|
};
|
|
104
|
+
valueChangedWithoutMask: {
|
|
105
|
+
action: string;
|
|
106
|
+
description: string;
|
|
107
|
+
};
|
|
96
108
|
focusedOn: {
|
|
97
109
|
action: string;
|
|
98
110
|
description: string;
|
|
@@ -113,6 +125,8 @@ declare const _default: {
|
|
|
113
125
|
export default _default;
|
|
114
126
|
export declare const Default: any;
|
|
115
127
|
export declare const WithMask: any;
|
|
128
|
+
export declare const WithCpfCnpjMask: any;
|
|
129
|
+
export declare const WithMultipleMasks: any;
|
|
116
130
|
export declare const WithValue: any;
|
|
117
131
|
export declare const WithHelpText: any;
|
|
118
132
|
export declare const WithMaxLength: any;
|
|
@@ -536,7 +536,11 @@ export namespace Components {
|
|
|
536
536
|
/**
|
|
537
537
|
* The textfield mask pattern The mask pattern should follow the VMasker pattern format More info: https://github.com/vanilla-masker/vanilla-masker?tab=readme-ov-file#custom-pattern
|
|
538
538
|
*/
|
|
539
|
-
"maskPattern"?: string;
|
|
539
|
+
"maskPattern"?: string | string[];
|
|
540
|
+
/**
|
|
541
|
+
* Optional manual switch lengths used to switch between mask patterns. If not provided, switch lengths are automatically inferred from `maskPattern`. - When number: switches between first and second pattern at this length - When array: defines multiple switch points for multiple patterns Example: [11, 14] means 0-11 uses first pattern, 12-14 uses second, 15+ uses third
|
|
542
|
+
*/
|
|
543
|
+
"maskPatternSwitchMaxLength"?: number | number[];
|
|
540
544
|
/**
|
|
541
545
|
* The textfield max length
|
|
542
546
|
*/
|
|
@@ -927,6 +931,7 @@ declare global {
|
|
|
927
931
|
};
|
|
928
932
|
interface HTMLSulaTextfieldElementEventMap {
|
|
929
933
|
"valueChanged": string;
|
|
934
|
+
"valueChangedWithoutMask": string;
|
|
930
935
|
"focusedOn": void;
|
|
931
936
|
"focusedOut": void;
|
|
932
937
|
}
|
|
@@ -1620,7 +1625,11 @@ declare namespace LocalJSX {
|
|
|
1620
1625
|
/**
|
|
1621
1626
|
* The textfield mask pattern The mask pattern should follow the VMasker pattern format More info: https://github.com/vanilla-masker/vanilla-masker?tab=readme-ov-file#custom-pattern
|
|
1622
1627
|
*/
|
|
1623
|
-
"maskPattern"?: string;
|
|
1628
|
+
"maskPattern"?: string | string[];
|
|
1629
|
+
/**
|
|
1630
|
+
* Optional manual switch lengths used to switch between mask patterns. If not provided, switch lengths are automatically inferred from `maskPattern`. - When number: switches between first and second pattern at this length - When array: defines multiple switch points for multiple patterns Example: [11, 14] means 0-11 uses first pattern, 12-14 uses second, 15+ uses third
|
|
1631
|
+
*/
|
|
1632
|
+
"maskPatternSwitchMaxLength"?: number | number[];
|
|
1624
1633
|
/**
|
|
1625
1634
|
* The textfield max length
|
|
1626
1635
|
*/
|
|
@@ -1637,6 +1646,10 @@ declare namespace LocalJSX {
|
|
|
1637
1646
|
* Event emitted when input value changes.
|
|
1638
1647
|
*/
|
|
1639
1648
|
"onValueChanged"?: (event: SulaTextfieldCustomEvent<string>) => void;
|
|
1649
|
+
/**
|
|
1650
|
+
* Event emitted when input value changes without mask pattern applied.
|
|
1651
|
+
*/
|
|
1652
|
+
"onValueChangedWithoutMask"?: (event: SulaTextfieldCustomEvent<string>) => void;
|
|
1640
1653
|
/**
|
|
1641
1654
|
* The textfield placeholder
|
|
1642
1655
|
*/
|
|
@@ -22485,12 +22485,13 @@ var vanillaMaskerExports = requireVanillaMasker();
|
|
|
22485
22485
|
|
|
22486
22486
|
var VMasker = getDefaultExportFromCjs(vanillaMaskerExports);
|
|
22487
22487
|
|
|
22488
|
-
const sulaTextfieldCss = '*,:after,:before{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.outline{outline-style:solid}:host{display:block}.button-focus{outline:2px solid var(--color-feedback-informational)!important;outline-offset:2px!important}.button-error{outline:2px solid var(--color-feedback-error)!important;outline-offset:2px!important}.from-down{animation:from-down .2s ease-in-out}.from-up{animation:from-up .2s ease-in-out}@keyframes from-down{0%{opacity:0;transform:translateY(75%)}to{opacity:1;transform:translateY(0)}}@keyframes from-up{0%{opacity:0;transform:translateY(-75%)}to{opacity:1;transform:translateY(0)}}:root{--color-green-50:#f1f9f4;--color-green-100:#e6f4ed;--color-green-200:#cae7d8;--color-green-300:#a0d4b8;--color-green-400:#68bb8e;--color-green-500:#04843f;--color-green-600:#037236;--color-green-700:#03632f;--color-green-800:#035428;--color-green-900:#024521;--color-green-950:#012b15;--color-red-50:#fef6f6;--color-red-100:#fde8e8;--color-red-200:#fad1d1;--color-red-300:#f7abab;--color-red-400:#f17474;--color-red-500:#c80505;--color-red-600:#b30404;--color-red-700:#9f0404;--color-red-800:#860303;--color-red-900:#6d0303;--color-red-950:#330d00;--color-yellow-50:#fdf4e7;--color-yellow-100:#fcedd9;--color-yellow-200:#fae0bd;--color-yellow-300:#f6c788;--color-yellow-400:#f3b159;--color-yellow-500:#ef9928;--color-yellow-600:#e49226;--color-yellow-700:#d17e10;--color-yellow-800:#b46d0e;--color-yellow-900:#93590b;--color-yellow-950:#402705;--color-orange-50:#fef4f1;--color-orange-100:#fde8e2;--color-orange-200:#fbd2c6;--color-orange-300:#f8b4a0;--color-orange-400:#f58e70;--color-orange-500:#f05223;--color-orange-600:#ea4210;--color-orange-700:#d23b0e;--color-orange-800:#b5330c;--color-orange-900:#942a0a;--color-orange-950:#401204;--color-blue-50:#ecf0f9;--color-blue-100:#dde3f4;--color-blue-200:#b2c2e5;--color-blue-300:#7994d2;--color-blue-400:#4066bf;--color-blue-500:#001e64;--color-blue-600:#001c5c;--color-blue-700:#00174c;--color-blue-800:#00123d;--color-blue-900:#000f33;--color-blue-950:#000d2b;--color-ambar-50:#fff6eb;--color-ambar-100:#ffefdc;--color-ambar-200:#fedfb9;--color-ambar-300:#fdca8b;--color-ambar-400:#fdb359;--color-ambar-500:#fc9c26;--color-ambar-600:#ec8403;--color-ambar-700:#d87803;--color-ambar-800:#ba6803;--color-ambar-900:#975402;--color-ambar-950:#402301;--color-gray-50:#fff;--color-gray-100:#f3f4f4;--color-gray-200:#e5e6e6;--color-gray-300:#bfc0c0;--color-gray-400:#acaeae;--color-gray-500:#949595;--color-gray-600:#737575;--color-gray-700:#6c6e6e;--color-gray-800:#313333;--color-gray-900:#272929;--color-gray-950:#191d1d;--color-white-opacity-50:#ffffff0d;--color-white-opacity-100:#ffffff1a;--color-white-opacity-200:#ffffff26;--color-white-opacity-300:#ffffff45;--color-white-opacity-400:#ffffff5c;--color-white-opacity-500:#ffffff80;--color-white-opacity-600:#ffffff8c;--color-white-opacity-700:#ffffffa3;--color-white-opacity-800:#ffffffba;--color-white-opacity-900:#fffc;--color-white-opacity-950:#ffffffe8;--color-ciano-50:#f1f6fe;--color-ciano-100:#dfeafc;--color-ciano-200:#c3d9f9;--color-ciano-300:#90b9f4;--color-ciano-400:#5d98ee;--color-ciano-500:#1769e0;--color-ciano-600:#155fcb;--color-ciano-700:#1355b4;--color-ciano-800:#104899;--color-ciano-900:#0d3b7d;--color-ciano-950:#071e40;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:rgba(25,29,29,.02);--color-black-opacity-100:rgba(25,29,29,.05);--color-black-opacity-200:rgba(25,29,29,.11);--color-black-opacity-300:rgba(25,29,29,.28);--color-black-opacity-400:rgba(25,29,29,.36);--color-black-opacity-500:rgba(25,29,29,.44);--color-black-opacity-600:rgba(25,29,29,.62);--color-black-opacity-700:rgba(25,29,29,.64);--color-black-opacity-800:rgba(25,29,29,.72);--color-black-opacity-900:rgba(25,29,29,.8);--color-black-opacity-950:rgba(25,29,29,.96);--color-shadow-opacity-50:rgba(0,0,0,.04);--color-shadow-opacity-100:rgba(0,0,0,.06);--color-shadow-opacity-200:rgba(0,0,0,.12);--color-shadow-opacity-300:rgba(0,0,0,.2);--color-shadow-opacity-400:rgba(0,0,0,.32);--color-shadow-opacity-500:rgba(0,0,0,.5);--color-shadow-opacity-600:rgba(0,0,0,.55);--color-shadow-opacity-700:rgba(0,0,0,.64);--color-shadow-opacity-800:rgba(0,0,0,.73);--color-shadow-opacity-900:rgba(0,0,0,.8);--color-shadow-opacity-950:rgba(0,0,0,.91);--color-feedback-success:#04843f;--color-feedback-error:#c80505;--color-feedback-informational:#1355b4;--color-feedback-alert:#ef9928;--color-brand-primary:#f05223;--color-brand-secondary:#001c5c;--color-brand-tertiary-1:#1769e0;--color-brand-tertiary-2:#fc9c26;--color-surface-body:#fff;--color-surface-on-body:#f3f4f4;--color-surface-on-body-blue:#e7f0f4;--color-surface-on-body-brand:#fff6eb;--color-surface-on-body-feedback-success:#e6f4ed;--color-surface-on-body-feedback-error:#fde8e8;--color-surface-on-body-feedback-alert:#fdf4e7;--color-surface-on-body-feedback-info:#dfeafc;--color-text-brand:#f05223;--color-text-primary:#313333;--color-text-secondary:#6c6e6e;--color-text-disabled:#949595;--color-text-link:#1355b4;--color-states-empty-bg-hover:rgba(25,29,29,.05);--color-states-empty-bg-pressed:rgba(25,29,29,.11);--color-states-bg-disabled:rgba(25,29,29,.02);--color-states-bg-focus:#1355b4;--color-states-primary-hover:#ea4210;--color-states-primary-pressed:#d23b0e;--color-states-danger-hover:#b30404;--color-states-danger-pressed:#9f0404;--color-states-negative-hover:#e5e6e6;--color-states-negative-pressed:#bfc0c0;--color-icon-primary:#6c6e6e;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#acaeae;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f3f4f4;--color-neutral-neutral-3:#acaeae;--color-neutral-neutral-4:#949595;--color-neutral-neutral-5:#737575;--color-neutral-neutral-6:#6c6e6e;--color-neutral-neutral-7:#313333;--color-neutral-neutral-8:#272929;--color-negative-negative-1:#fff;--color-negative-negative-2:#313333;--color-opacity-body:#fffc;--color-opacity-on-body:rgba(25,29,29,.02);--color-opacity-overlay:rgba(25,29,29,.62);--color-opacity-on-overlay:#ffffff1a;--color-line-input:#949595;--color-line-general-strong:#bfc0c0;--color-line-general:#e5e6e6;--color-line-hair:rgba(25,29,29,.05);--color-box-shadow-body:#fff;--color-box-shadow-shadow-color-1:rgba(0,0,0,.04);--color-box-shadow-shadow-color-2:rgba(0,0,0,.06)}.static{position:static}.mt-4{margin-top:.25rem}.flex{display:flex}.hidden{display:none}.h-\\[72px\\]{height:72px}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.rounded-sm{border-radius:.75rem}.border{border-width:1px}.border-line-general{border-color:var(--color-line-general)}.border-line-input{border-color:var(--color-line-input)}.bg-states-bg-disabled{background-color:var(--color-states-bg-disabled)}.bg-surface-body{background-color:var(--color-surface-body)}.bg-transparent{background-color:transparent}.px-16{padding-left:1rem;padding-right:1rem}.pr-12{padding-right:.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.text-feedback-error{color:var(--color-feedback-error)}.text-icon-disabled{color:var(--color-icon-disabled)}.text-icon-primary{color:var(--color-icon-primary)}.text-text-disabled{color:var(--color-text-disabled)}.text-text-primary{color:var(--color-text-primary)}.caret-brand-primary{caret-color:var(--color-brand-primary)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}';
|
|
22488
|
+
const sulaTextfieldCss = '*,:after,:before{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.outline{outline-style:solid}:host{display:block}.button-focus{outline:2px solid var(--color-feedback-informational)!important;outline-offset:2px!important}.button-error{outline:2px solid var(--color-feedback-error)!important;outline-offset:2px!important}.from-down{animation:from-down .2s ease-in-out}.from-up{animation:from-up .2s ease-in-out}@keyframes from-down{0%{opacity:0;transform:translateY(75%)}to{opacity:1;transform:translateY(0)}}@keyframes from-up{0%{opacity:0;transform:translateY(-75%)}to{opacity:1;transform:translateY(0)}}:root{--color-green-50:#f1f9f4;--color-green-100:#e6f4ed;--color-green-200:#cae7d8;--color-green-300:#a0d4b8;--color-green-400:#68bb8e;--color-green-500:#04843f;--color-green-600:#037236;--color-green-700:#03632f;--color-green-800:#035428;--color-green-900:#024521;--color-green-950:#012b15;--color-red-50:#fef6f6;--color-red-100:#fde8e8;--color-red-200:#fad1d1;--color-red-300:#f7abab;--color-red-400:#f17474;--color-red-500:#c80505;--color-red-600:#b30404;--color-red-700:#9f0404;--color-red-800:#860303;--color-red-900:#6d0303;--color-red-950:#330d00;--color-yellow-50:#fdf4e7;--color-yellow-100:#fcedd9;--color-yellow-200:#fae0bd;--color-yellow-300:#f6c788;--color-yellow-400:#f3b159;--color-yellow-500:#ef9928;--color-yellow-600:#e49226;--color-yellow-700:#d17e10;--color-yellow-800:#b46d0e;--color-yellow-900:#93590b;--color-yellow-950:#402705;--color-orange-50:#fef4f1;--color-orange-100:#fde8e2;--color-orange-200:#fbd2c6;--color-orange-300:#f8b4a0;--color-orange-400:#f58e70;--color-orange-500:#f05223;--color-orange-600:#ea4210;--color-orange-700:#d23b0e;--color-orange-800:#b5330c;--color-orange-900:#942a0a;--color-orange-950:#401204;--color-blue-50:#ecf0f9;--color-blue-100:#dde3f4;--color-blue-200:#b2c2e5;--color-blue-300:#7994d2;--color-blue-400:#4066bf;--color-blue-500:#001e64;--color-blue-600:#001c5c;--color-blue-700:#00174c;--color-blue-800:#00123d;--color-blue-900:#000f33;--color-blue-950:#000d2b;--color-ambar-50:#fff6eb;--color-ambar-100:#ffefdc;--color-ambar-200:#fedfb9;--color-ambar-300:#fdca8b;--color-ambar-400:#fdb359;--color-ambar-500:#fc9c26;--color-ambar-600:#ec8403;--color-ambar-700:#d87803;--color-ambar-800:#ba6803;--color-ambar-900:#975402;--color-ambar-950:#402301;--color-gray-50:#fff;--color-gray-100:#f3f4f4;--color-gray-200:#e5e6e6;--color-gray-300:#bfc0c0;--color-gray-400:#acaeae;--color-gray-500:#949595;--color-gray-600:#737575;--color-gray-700:#6c6e6e;--color-gray-800:#313333;--color-gray-900:#272929;--color-gray-950:#191d1d;--color-white-opacity-50:#ffffff0d;--color-white-opacity-100:#ffffff1a;--color-white-opacity-200:#ffffff26;--color-white-opacity-300:#ffffff45;--color-white-opacity-400:#ffffff5c;--color-white-opacity-500:#ffffff80;--color-white-opacity-600:#ffffff8c;--color-white-opacity-700:#ffffffa3;--color-white-opacity-800:#ffffffba;--color-white-opacity-900:#fffc;--color-white-opacity-950:#ffffffe8;--color-ciano-50:#f1f6fe;--color-ciano-100:#dfeafc;--color-ciano-200:#c3d9f9;--color-ciano-300:#90b9f4;--color-ciano-400:#5d98ee;--color-ciano-500:#1769e0;--color-ciano-600:#155fcb;--color-ciano-700:#1355b4;--color-ciano-800:#104899;--color-ciano-900:#0d3b7d;--color-ciano-950:#071e40;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:rgba(25,29,29,.02);--color-black-opacity-100:rgba(25,29,29,.05);--color-black-opacity-200:rgba(25,29,29,.11);--color-black-opacity-300:rgba(25,29,29,.28);--color-black-opacity-400:rgba(25,29,29,.36);--color-black-opacity-500:rgba(25,29,29,.44);--color-black-opacity-600:rgba(25,29,29,.62);--color-black-opacity-700:rgba(25,29,29,.64);--color-black-opacity-800:rgba(25,29,29,.72);--color-black-opacity-900:rgba(25,29,29,.8);--color-black-opacity-950:rgba(25,29,29,.96);--color-shadow-opacity-50:rgba(0,0,0,.04);--color-shadow-opacity-100:rgba(0,0,0,.06);--color-shadow-opacity-200:rgba(0,0,0,.12);--color-shadow-opacity-300:rgba(0,0,0,.2);--color-shadow-opacity-400:rgba(0,0,0,.32);--color-shadow-opacity-500:rgba(0,0,0,.5);--color-shadow-opacity-600:rgba(0,0,0,.55);--color-shadow-opacity-700:rgba(0,0,0,.64);--color-shadow-opacity-800:rgba(0,0,0,.73);--color-shadow-opacity-900:rgba(0,0,0,.8);--color-shadow-opacity-950:rgba(0,0,0,.91);--color-feedback-success:#04843f;--color-feedback-error:#c80505;--color-feedback-informational:#1355b4;--color-feedback-alert:#ef9928;--color-brand-primary:#f05223;--color-brand-secondary:#001c5c;--color-brand-tertiary-1:#1769e0;--color-brand-tertiary-2:#fc9c26;--color-surface-body:#fff;--color-surface-on-body:#f3f4f4;--color-surface-on-body-blue:#e7f0f4;--color-surface-on-body-brand:#fff6eb;--color-surface-on-body-feedback-success:#e6f4ed;--color-surface-on-body-feedback-error:#fde8e8;--color-surface-on-body-feedback-alert:#fdf4e7;--color-surface-on-body-feedback-info:#dfeafc;--color-text-brand:#f05223;--color-text-primary:#313333;--color-text-secondary:#6c6e6e;--color-text-disabled:#949595;--color-text-link:#1355b4;--color-states-empty-bg-hover:rgba(25,29,29,.05);--color-states-empty-bg-pressed:rgba(25,29,29,.11);--color-states-bg-disabled:rgba(25,29,29,.02);--color-states-bg-focus:#1355b4;--color-states-primary-hover:#ea4210;--color-states-primary-pressed:#d23b0e;--color-states-danger-hover:#b30404;--color-states-danger-pressed:#9f0404;--color-states-negative-hover:#e5e6e6;--color-states-negative-pressed:#bfc0c0;--color-icon-primary:#6c6e6e;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#acaeae;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f3f4f4;--color-neutral-neutral-3:#acaeae;--color-neutral-neutral-4:#949595;--color-neutral-neutral-5:#737575;--color-neutral-neutral-6:#6c6e6e;--color-neutral-neutral-7:#313333;--color-neutral-neutral-8:#272929;--color-negative-negative-1:#fff;--color-negative-negative-2:#313333;--color-opacity-body:#fffc;--color-opacity-on-body:rgba(25,29,29,.02);--color-opacity-overlay:rgba(25,29,29,.62);--color-opacity-on-overlay:#ffffff1a;--color-line-input:#949595;--color-line-general-strong:#bfc0c0;--color-line-general:#e5e6e6;--color-line-hair:rgba(25,29,29,.05);--color-box-shadow-body:#fff;--color-box-shadow-shadow-color-1:rgba(0,0,0,.04);--color-box-shadow-shadow-color-2:rgba(0,0,0,.06)}.static{position:static}.mt-4{margin-top:.25rem}.flex{display:flex}.hidden{display:none}.h-\\[72px\\]{height:72px}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.rounded-sm{border-radius:.75rem}.border{border-width:1px}.border-line-general{border-color:var(--color-line-general)}.border-line-input{border-color:var(--color-line-input)}.bg-states-bg-disabled{background-color:var(--color-states-bg-disabled)}.bg-surface-body{background-color:var(--color-surface-body)}.bg-transparent{background-color:transparent}.px-16{padding-left:1rem;padding-right:1rem}.pr-12{padding-right:.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.text-feedback-error{color:var(--color-feedback-error)}.text-icon-disabled{color:var(--color-icon-disabled)}.text-icon-primary{color:var(--color-icon-primary)}.text-text-disabled{color:var(--color-text-disabled)}.text-text-primary{color:var(--color-text-primary)}.caret-brand-primary{caret-color:var(--color-brand-primary)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}';
|
|
22489
22489
|
|
|
22490
22490
|
const SulaTextfield = class {
|
|
22491
22491
|
constructor(e) {
|
|
22492
22492
|
registerInstance(this, e);
|
|
22493
22493
|
this.valueChanged = createEvent(this, "valueChanged");
|
|
22494
|
+
this.valueChangedWithoutMask = createEvent(this, "valueChangedWithoutMask");
|
|
22494
22495
|
this.focusedOn = createEvent(this, "focusedOn");
|
|
22495
22496
|
this.focusedOut = createEvent(this, "focusedOut");
|
|
22496
22497
|
/**
|
|
@@ -22507,13 +22508,16 @@ const SulaTextfield = class {
|
|
|
22507
22508
|
this.toggleOptions(true);
|
|
22508
22509
|
};
|
|
22509
22510
|
this.handleInputChanges = e => {
|
|
22510
|
-
if (this.maskPattern && this.inputElement) {
|
|
22511
|
-
this.handleInputMask();
|
|
22512
|
-
}
|
|
22513
22511
|
const t = e.target.value;
|
|
22514
|
-
|
|
22515
|
-
this.
|
|
22516
|
-
|
|
22512
|
+
let o = t;
|
|
22513
|
+
if (this.hasMaskPatternConfigured() && this.inputElement) {
|
|
22514
|
+
this.handleInputMask(t);
|
|
22515
|
+
o = this.inputElement.value;
|
|
22516
|
+
}
|
|
22517
|
+
this.valueChangedWithoutMask.emit(o.replace(/\D/g, ""));
|
|
22518
|
+
this.textValue = o;
|
|
22519
|
+
this.value = o;
|
|
22520
|
+
this.valueChanged.emit(o);
|
|
22517
22521
|
};
|
|
22518
22522
|
this.handleFocus = () => {
|
|
22519
22523
|
if (this.disabled) return;
|
|
@@ -22537,16 +22541,21 @@ const SulaTextfield = class {
|
|
|
22537
22541
|
};
|
|
22538
22542
|
}
|
|
22539
22543
|
watchValueHandler(e) {
|
|
22540
|
-
|
|
22541
|
-
|
|
22542
|
-
|
|
22543
|
-
this.inputElement.
|
|
22544
|
-
|
|
22545
|
-
|
|
22546
|
-
this.
|
|
22544
|
+
const t = e || "";
|
|
22545
|
+
this.textValue = t;
|
|
22546
|
+
if (this.inputElement && this.inputElement.value !== t) {
|
|
22547
|
+
const e = this.inputElement.selectionStart;
|
|
22548
|
+
this.inputElement.value = t;
|
|
22549
|
+
if (this.hasMaskPatternConfigured()) {
|
|
22550
|
+
this.handleInputMask(t);
|
|
22551
|
+
this.textValue = this.inputElement.value;
|
|
22552
|
+
}
|
|
22553
|
+
if (this.inputIsFocused && e !== null) {
|
|
22554
|
+
const t = Math.min(e, this.inputElement.value.length);
|
|
22555
|
+
this.inputElement.setSelectionRange(t, t);
|
|
22547
22556
|
}
|
|
22548
22557
|
}
|
|
22549
|
-
if (
|
|
22558
|
+
if (this.textValue && this.textValue.trim().length > 0) {
|
|
22550
22559
|
this.inputIsOpen = true;
|
|
22551
22560
|
this.changeElementsStyle();
|
|
22552
22561
|
} else if (!this.inputIsFocused) {
|
|
@@ -22554,6 +22563,12 @@ const SulaTextfield = class {
|
|
|
22554
22563
|
this.changeElementsStyle();
|
|
22555
22564
|
}
|
|
22556
22565
|
}
|
|
22566
|
+
watchMaskPatternHandler() {
|
|
22567
|
+
this.syncMaskState();
|
|
22568
|
+
}
|
|
22569
|
+
watchMaskPatternSwitchMaxLengthHandler() {
|
|
22570
|
+
this.syncMaskState();
|
|
22571
|
+
}
|
|
22557
22572
|
handleClick(e) {
|
|
22558
22573
|
if (!this.node || !this.inputIsFocused) return;
|
|
22559
22574
|
const t = this.node.contains(e.target);
|
|
@@ -22577,8 +22592,10 @@ const SulaTextfield = class {
|
|
|
22577
22592
|
if (this.textValue && this.textValue.trim().length > 0) {
|
|
22578
22593
|
this.changeElementsStyle();
|
|
22579
22594
|
}
|
|
22580
|
-
if (this.
|
|
22595
|
+
if (this.hasMaskPatternConfigured() && this.inputElement) {
|
|
22581
22596
|
this.handleInputMask();
|
|
22597
|
+
this.textValue = this.inputElement.value;
|
|
22598
|
+
this.value = this.inputElement.value;
|
|
22582
22599
|
}
|
|
22583
22600
|
}
|
|
22584
22601
|
toggleOptions(e) {
|
|
@@ -22595,8 +22612,86 @@ const SulaTextfield = class {
|
|
|
22595
22612
|
this.labelElement.classList.add("from-up");
|
|
22596
22613
|
}
|
|
22597
22614
|
}
|
|
22598
|
-
handleInputMask() {
|
|
22599
|
-
|
|
22615
|
+
handleInputMask(e) {
|
|
22616
|
+
var t, o;
|
|
22617
|
+
if (!this.inputElement) return;
|
|
22618
|
+
const r = ((t = e !== null && e !== void 0 ? e : this.inputElement.value) !== null && t !== void 0 ? t : "").replace(/[^a-zA-Z0-9]/g, "");
|
|
22619
|
+
const n = this.getMaskPatternByValueLength(r, (o = e !== null && e !== void 0 ? e : this.inputElement.value) !== null && o !== void 0 ? o : "");
|
|
22620
|
+
if (!n) return;
|
|
22621
|
+
VMasker(this.inputElement).unMask();
|
|
22622
|
+
this.inputElement.value = VMasker.toPattern(r, n);
|
|
22623
|
+
}
|
|
22624
|
+
syncMaskState() {
|
|
22625
|
+
if (!this.inputElement) return;
|
|
22626
|
+
if (!this.hasMaskPatternConfigured()) {
|
|
22627
|
+
VMasker(this.inputElement).unMask();
|
|
22628
|
+
return;
|
|
22629
|
+
}
|
|
22630
|
+
this.handleInputMask();
|
|
22631
|
+
this.textValue = this.inputElement.value;
|
|
22632
|
+
this.value = this.inputElement.value;
|
|
22633
|
+
}
|
|
22634
|
+
hasMaskPatternConfigured() {
|
|
22635
|
+
return this.getMaskPatterns().length > 0;
|
|
22636
|
+
}
|
|
22637
|
+
getMaskPatterns() {
|
|
22638
|
+
if (Array.isArray(this.maskPattern)) {
|
|
22639
|
+
return this.maskPattern.map((e => e === null || e === void 0 ? void 0 : e.trim())).filter(Boolean);
|
|
22640
|
+
}
|
|
22641
|
+
if (typeof this.maskPattern === "string" && this.maskPattern.trim().length > 0) {
|
|
22642
|
+
return [ this.maskPattern.trim() ];
|
|
22643
|
+
}
|
|
22644
|
+
return [];
|
|
22645
|
+
}
|
|
22646
|
+
getMaskPatternByValueLength(e, t) {
|
|
22647
|
+
const o = this.getMaskPatterns();
|
|
22648
|
+
if (o.length === 0) return undefined;
|
|
22649
|
+
if (o.length === 1) return o[0];
|
|
22650
|
+
const r = (e !== null && e !== void 0 ? e : "").length;
|
|
22651
|
+
const n = this.normalizeProvidedSwitchLengths();
|
|
22652
|
+
if (n.length === 0) {
|
|
22653
|
+
return this.getMaskPatternByAutoInference(o, r, t);
|
|
22654
|
+
}
|
|
22655
|
+
for (let e = 0; e < n.length; e++) {
|
|
22656
|
+
if (r <= n[e]) {
|
|
22657
|
+
return o[Math.min(e, o.length - 1)];
|
|
22658
|
+
}
|
|
22659
|
+
}
|
|
22660
|
+
return o[o.length - 1];
|
|
22661
|
+
}
|
|
22662
|
+
getMaskPatternByAutoInference(e, t, o) {
|
|
22663
|
+
const r = e.map((e => (e.match(/[9AS]/g) || []).length));
|
|
22664
|
+
const n = r.filter((e => e >= t && e > 0));
|
|
22665
|
+
if (n.length === 0) {
|
|
22666
|
+
return e[e.length - 1];
|
|
22667
|
+
}
|
|
22668
|
+
const a = Math.min(...n);
|
|
22669
|
+
const i = r.map(((e, t) => ({
|
|
22670
|
+
capacity: e,
|
|
22671
|
+
index: t
|
|
22672
|
+
}))).filter((e => e.capacity === a)).map((e => e.index));
|
|
22673
|
+
if (i.length === 1) {
|
|
22674
|
+
return e[i[0]];
|
|
22675
|
+
}
|
|
22676
|
+
const c = (o !== null && o !== void 0 ? o : "").replace(/[a-zA-Z0-9]/g, "");
|
|
22677
|
+
if (c.length > 0) {
|
|
22678
|
+
for (const t of i) {
|
|
22679
|
+
const o = e[t].replace(/[9AS]/g, "");
|
|
22680
|
+
if (o === c) {
|
|
22681
|
+
return e[t];
|
|
22682
|
+
}
|
|
22683
|
+
}
|
|
22684
|
+
}
|
|
22685
|
+
return e[i[0]];
|
|
22686
|
+
}
|
|
22687
|
+
normalizeProvidedSwitchLengths() {
|
|
22688
|
+
if (Array.isArray(this.maskPatternSwitchMaxLength)) {
|
|
22689
|
+
return this.maskPatternSwitchMaxLength.filter((e => Number.isFinite(e) && e > 0)).sort(((e, t) => e - t));
|
|
22690
|
+
}
|
|
22691
|
+
if (typeof this.maskPatternSwitchMaxLength === "number" && Number.isFinite(this.maskPatternSwitchMaxLength) && this.maskPatternSwitchMaxLength > 0) {
|
|
22692
|
+
return [ this.maskPatternSwitchMaxLength ];
|
|
22693
|
+
}
|
|
22694
|
+
return [];
|
|
22600
22695
|
}
|
|
22601
22696
|
handlePasswordIconClicked() {
|
|
22602
22697
|
const e = this.inputElement.selectionStart;
|
|
@@ -22617,12 +22712,12 @@ const SulaTextfield = class {
|
|
|
22617
22712
|
}
|
|
22618
22713
|
render() {
|
|
22619
22714
|
return h$1(Host, {
|
|
22620
|
-
key: "
|
|
22715
|
+
key: "0dbf51792e5bdc43328820106b083d194bbcae61",
|
|
22621
22716
|
ref: e => this.node = e
|
|
22622
22717
|
}, h$1("div", {
|
|
22623
|
-
key: "
|
|
22718
|
+
key: "3659f51f5a9d0c75909e6a6939b8ff1b5c25e377"
|
|
22624
22719
|
}, h$1("div", {
|
|
22625
|
-
key: "
|
|
22720
|
+
key: "320da879fdea605e95525f54607c9cb285446133",
|
|
22626
22721
|
id: "button-container",
|
|
22627
22722
|
class: {
|
|
22628
22723
|
"flex items-center border rounded-sm px-16 outline-none h-[72px] caret-brand-primary": true,
|
|
@@ -22636,17 +22731,17 @@ const SulaTextfield = class {
|
|
|
22636
22731
|
onFocus: this.handleFocus,
|
|
22637
22732
|
onClick: this.handleInputClick
|
|
22638
22733
|
}, !this.disabled && h$1("div", {
|
|
22639
|
-
key: "
|
|
22734
|
+
key: "44777180c60bb9a21ef64cffd98f465cf15af446",
|
|
22640
22735
|
class: {
|
|
22641
22736
|
"hidden flex-col w-full": true,
|
|
22642
22737
|
"pr-12": !!this.icon
|
|
22643
22738
|
},
|
|
22644
22739
|
ref: e => this.inputContainer = e
|
|
22645
22740
|
}, h$1("label", {
|
|
22646
|
-
key: "
|
|
22741
|
+
key: "75bc3b05a66ed7c00915842b275faf657b1784b3",
|
|
22647
22742
|
class: "font-bold text-sm text-text-primary from-down"
|
|
22648
22743
|
}, this.label), h$1("input", {
|
|
22649
|
-
key: "
|
|
22744
|
+
key: "4f6bde78c385dc3c158c08be70f2277e56f7ab95",
|
|
22650
22745
|
type: this.type,
|
|
22651
22746
|
ref: e => this.inputElement = e,
|
|
22652
22747
|
placeholder: this.placeholder,
|
|
@@ -22655,7 +22750,7 @@ const SulaTextfield = class {
|
|
|
22655
22750
|
onFocus: this.handleInputFocus,
|
|
22656
22751
|
value: this.textValue
|
|
22657
22752
|
})), h$1("div", {
|
|
22658
|
-
key: "
|
|
22753
|
+
key: "df7e84e77d3d05ba0328f736e6c03f45d32c9c76",
|
|
22659
22754
|
id: "textfield-label",
|
|
22660
22755
|
class: {
|
|
22661
22756
|
"text-base flex items-center": true,
|
|
@@ -22664,25 +22759,25 @@ const SulaTextfield = class {
|
|
|
22664
22759
|
},
|
|
22665
22760
|
ref: e => this.labelElement = e
|
|
22666
22761
|
}, this.label), (!!this.icon || this.type === SulaTextfieldType.Password) && h$1("div", {
|
|
22667
|
-
key: "
|
|
22762
|
+
key: "55dba31d1ca9d6b213900b9a2d3aa02044b246ef",
|
|
22668
22763
|
class: "flex items-center justify-center",
|
|
22669
22764
|
onClick: this.handleIconClick
|
|
22670
22765
|
}, h$1("sula-icon", {
|
|
22671
|
-
key: "
|
|
22766
|
+
key: "19712e5575abb7aaef17a098de13543ed550dc6c",
|
|
22672
22767
|
icon: this.getInputIcon(),
|
|
22673
22768
|
customClass: `text-2xl ${this.disabled ? "text-icon-disabled" : "text-icon-primary"}`
|
|
22674
22769
|
}))), (this.helpText || this.maxLength) && !this.disabled && h$1("div", {
|
|
22675
|
-
key: "
|
|
22770
|
+
key: "0c68e89181316ffed13f212a5c7f6ba78372e83c",
|
|
22676
22771
|
class: "flex justify-between items-center px-16 mt-4 text-sm"
|
|
22677
22772
|
}, this.helpText && h$1("div", {
|
|
22678
|
-
key: "
|
|
22773
|
+
key: "af970054750c28cb8a9901fcf850c7c02fd059b9",
|
|
22679
22774
|
id: "textfield-help-text",
|
|
22680
22775
|
class: {
|
|
22681
22776
|
"text-text-primary": this.status === SulaTextfieldStatus.Default,
|
|
22682
22777
|
"text-feedback-error": this.status === SulaTextfieldStatus.Error
|
|
22683
22778
|
}
|
|
22684
22779
|
}, this.helpText), this.maxLength && h$1("div", {
|
|
22685
|
-
key: "
|
|
22780
|
+
key: "e78a661c6c614d2d6787159137cce01bf129e2c2",
|
|
22686
22781
|
id: "max-length-container",
|
|
22687
22782
|
class: {
|
|
22688
22783
|
"text-text-primary": this.status === SulaTextfieldStatus.Default,
|
|
@@ -22692,7 +22787,9 @@ const SulaTextfield = class {
|
|
|
22692
22787
|
}
|
|
22693
22788
|
static get watchers() {
|
|
22694
22789
|
return {
|
|
22695
|
-
value: [ "watchValueHandler" ]
|
|
22790
|
+
value: [ "watchValueHandler" ],
|
|
22791
|
+
maskPattern: [ "watchMaskPatternHandler" ],
|
|
22792
|
+
maskPatternSwitchMaxLength: [ "watchMaskPatternSwitchMaxLengthHandler" ]
|
|
22696
22793
|
};
|
|
22697
22794
|
}
|
|
22698
22795
|
};
|
|
@@ -22971,4 +23068,4 @@ SulaTimelineList.style = sulaTimelineListCss;
|
|
|
22971
23068
|
|
|
22972
23069
|
export { SulaAvatar as sula_avatar, SulaBadge as sula_badge, SulaBreadcrumb as sula_breadcrumb, SulaButton as sula_button, SulaCheckbox as sula_checkbox, SulaChip as sula_chip, SulaDropdown as sula_dropdown, SulaIcon as sula_icon, SulaLoader as sula_loader, SulaMenuSelectList as sula_menu_select_list, SulaModal as sula_modal, SulaProgressBar as sula_progress_bar, SulaRadioButton as sula_radio_button, SulaSearchBar as sula_search_bar, SulaSegmentedControl as sula_segmented_control, SulaSwitch as sula_switch, SulaTag as sula_tag, SulaTextarea as sula_textarea, SulaTextfield as sula_textfield, SulaTiles as sula_tiles, SulaTimelineList as sula_timeline_list };
|
|
22973
23070
|
//# sourceMappingURL=sula-avatar.sula-badge.sula-breadcrumb.sula-button.sula-checkbox.sula-chip.sula-dropdown.sula-icon.sula-loader.sula-menu-select-list.sula-modal.sula-progress-bar.sula-radio-button.sula-search-bar.sula-segmented-control.sula-switch.sula-tag.sula-textarea.sula-textfield.sula-tiles.sula-timeline-list.entry.esm.js.map
|
|
22974
|
-
//# sourceMappingURL=p-
|
|
23071
|
+
//# sourceMappingURL=p-f1a4d84f.entry.js.map
|