globuswebcomponents 0.8.6 → 0.8.9
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/{gb-avatar_39.cjs.entry.js → gb-avatar_38.cjs.entry.js} +148 -150
- package/dist/cjs/gb-avatar_38.cjs.entry.js.map +1 -0
- package/dist/cjs/gb-megainput-field.cjs.entry.js +2 -2
- package/dist/cjs/gb-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/gb-progress-circle.cjs.entry.js +1 -1
- package/dist/cjs/gb-rich-text.cjs.entry.js +1 -1
- package/dist/cjs/gb-scrollbar.cjs.entry.js +1 -1
- package/dist/cjs/gb-slider.cjs.entry.js +1 -1
- package/dist/cjs/gb-toggle.cjs.entry.js +1 -1
- package/dist/cjs/gb-token-field.cjs.entry.js +1 -1
- package/dist/cjs/gb-verification-code-field.cjs.entry.js +2 -2
- package/dist/cjs/globuscomponents.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/test-input-tag.cjs.entry.js +108 -0
- package/dist/cjs/test-input-tag.cjs.entry.js.map +1 -0
- package/dist/collection/components/gb-input-dropdown/gb-input-dropdown.js +25 -5
- package/dist/collection/components/gb-input-dropdown/gb-input-dropdown.js.map +1 -1
- package/dist/collection/components/gb-input-dropdown-menu-item/gb-input-dropdown-menu-item.css +6 -0
- package/dist/collection/components/gb-input-dropdown-menu-item/gb-input-dropdown-menu-item.js +25 -3
- package/dist/collection/components/gb-input-dropdown-menu-item/gb-input-dropdown-menu-item.js.map +1 -1
- package/dist/collection/components/gb-input-field/gb-input-field.css +108 -6
- package/dist/collection/components/gb-input-field/gb-input-field.js +220 -33
- package/dist/collection/components/gb-input-field/gb-input-field.js.map +1 -1
- package/dist/collection/components/gb-megainput-field-base/gb-megainput-field.js +2 -2
- package/dist/collection/components/gb-notification-content/gb-notification-content.js +1 -1
- package/dist/collection/components/gb-notification-pane/gb-notification-pane.js +3 -3
- package/dist/collection/components/gb-pagination/gb-pagination.css +4 -4
- package/dist/collection/components/gb-pagination/gb-pagination.js +3 -4
- package/dist/collection/components/gb-pagination/gb-pagination.js.map +1 -1
- package/dist/collection/components/gb-pagination-button-group-base/gb-pagination-button-group-base.js +1 -1
- package/dist/collection/components/gb-pagination-dot-indicator/gb-pagination-dot-indicator.js +1 -1
- package/dist/collection/components/gb-pagination-number-base/gb-pagination-number-base.js +1 -1
- package/dist/collection/components/gb-password-button/gb-password-button.js +1 -1
- package/dist/collection/components/gb-progress-bar/gb-progress-bar.js +1 -1
- package/dist/collection/components/gb-progress-circle/gb-progress-circle.js +1 -1
- package/dist/collection/components/gb-rich-text/gb-rich-text.js +1 -1
- package/dist/collection/components/gb-scrollbar/gb-scrollbar.js +1 -1
- package/dist/collection/components/gb-side-bar-item/gb-side-bar-item.js +1 -1
- package/dist/collection/components/gb-sidebar/gb-sidebar.js +1 -1
- package/dist/collection/components/gb-slider/gb-slider.js +1 -1
- package/dist/collection/components/gb-status-indicator/gb-status-indicator.js +1 -1
- package/dist/collection/components/gb-tab-button-base/gb-tab-button-base.js +3 -3
- package/dist/collection/components/gb-tag/gb-tag.js +2 -2
- package/dist/collection/components/gb-tag/gb-tag.js.map +1 -1
- package/dist/collection/components/gb-tag-checkbox/gb-tag-checkbox.js +1 -1
- package/dist/collection/components/gb-tag-close/gb-tag-close.js +1 -1
- package/dist/collection/components/gb-tag-count/gb-tag-count.js +1 -1
- package/dist/collection/components/gb-toast/gb-toast.js +1 -1
- package/dist/collection/components/gb-toast-button/gb-toast-button.js +1 -1
- package/dist/collection/components/gb-toggle/gb-toggle.js +1 -1
- package/dist/collection/components/gb-toggle-base/gb-toggle-base.js +2 -2
- package/dist/collection/components/gb-token-field/gb-token-field.js +1 -1
- package/dist/collection/components/gb-tooltip/gb-tooltip.js +1 -1
- package/dist/collection/components/gb-verification-code-field/gb-verification-code-field.js +2 -2
- package/dist/collection/components/test-input-tag/test-input-tag.css +6 -26
- package/dist/collection/components/test-input-tag/test-input-tag.js +5 -5
- package/dist/collection/components/test-input-tag/test-input-tag.js.map +1 -1
- package/dist/components/gb-avatar-add-button.js +1 -1
- package/dist/components/gb-avatar-dropdown.js +3 -3
- package/dist/components/gb-avatar-group.js +4 -4
- package/dist/components/gb-avatar-label-group.js +1 -1
- package/dist/components/gb-avatar-profile-photo.js +2 -2
- package/dist/components/gb-avatar.js +1 -1
- package/dist/components/gb-badge.js +1 -1
- package/dist/components/gb-checkbox-group-item.js +1 -1
- package/dist/components/gb-checkbox-group.js +3 -3
- package/dist/components/gb-collapse-button.js +1 -1
- package/dist/components/gb-control-handle.js +1 -1
- package/dist/components/gb-file-upload-item-base.js +1 -1
- package/dist/components/gb-file-upload.js +3 -3
- package/dist/components/gb-header.js +2 -2
- package/dist/components/gb-help-tooltip.js +1 -1
- package/dist/components/gb-horizontal-tabs.js +4 -4
- package/dist/components/gb-input-dropdown-menu-item.js +1 -1
- package/dist/components/gb-input-dropdown.js +1 -1
- package/dist/components/gb-input-field.js +168 -39
- package/dist/components/gb-input-field.js.map +1 -1
- package/dist/components/gb-megainput-field.js +1 -1
- package/dist/components/gb-notification-content.js +1 -1
- package/dist/components/gb-notification-pane.js +4 -4
- package/dist/components/gb-pagination-button-group-base.js +1 -1
- package/dist/components/gb-pagination-dot-indicator.js +1 -1
- package/dist/components/gb-pagination-number-base.js +1 -1
- package/dist/components/gb-pagination.js +15 -16
- package/dist/components/gb-pagination.js.map +1 -1
- package/dist/components/gb-password-button.js +1 -1
- package/dist/components/gb-progress-bar.js +1 -1
- package/dist/components/gb-progress-circle.js +1 -1
- package/dist/components/gb-rich-text.js +12 -12
- package/dist/components/gb-scrollbar.js +1 -1
- package/dist/components/gb-side-bar-item.js +1 -1
- package/dist/components/gb-sidebar.js +7 -7
- package/dist/components/gb-slider.js +1 -1
- package/dist/components/gb-status-indicator.js +1 -1
- package/dist/components/gb-tab-button-base.js +1 -1
- package/dist/components/gb-tag-checkbox.js +1 -1
- package/dist/components/gb-tag-close.js +1 -1
- package/dist/components/gb-tag-count.js +1 -1
- package/dist/components/gb-tag.js +1 -1
- package/dist/components/gb-toast-button.js +1 -1
- package/dist/components/gb-toast.js +2 -2
- package/dist/components/gb-toggle-base.js +1 -1
- package/dist/components/gb-toggle.js +2 -2
- package/dist/components/gb-token-field.js +2 -2
- package/dist/components/gb-tooltip.js +1 -1
- package/dist/components/gb-verification-code-field.js +3 -3
- package/dist/components/gb-wysiwyg-toolbar.js +1 -1
- package/dist/components/{p-3a3cf40b.js → p-12cba9c1.js} +3 -3
- package/dist/components/{p-3a3cf40b.js.map → p-12cba9c1.js.map} +1 -1
- package/dist/components/{p-8e94ef1f.js → p-1bd85bd9.js} +11 -11
- package/dist/components/{p-8e94ef1f.js.map → p-1bd85bd9.js.map} +1 -1
- package/dist/components/{p-975f4986.js → p-33e637b4.js} +2 -2
- package/dist/components/{p-975f4986.js.map → p-33e637b4.js.map} +1 -1
- package/dist/components/{p-ce28f03f.js → p-346195bc.js} +3 -3
- package/dist/components/{p-ce28f03f.js.map → p-346195bc.js.map} +1 -1
- package/dist/components/{p-a256dcad.js → p-3aafc7e4.js} +2 -2
- package/dist/components/{p-a256dcad.js.map → p-3aafc7e4.js.map} +1 -1
- package/dist/components/{p-7d9f8280.js → p-513c1eee.js} +3 -3
- package/dist/components/{p-7d9f8280.js.map → p-513c1eee.js.map} +1 -1
- package/dist/components/{p-cc01acce.js → p-56bcffa8.js} +2 -2
- package/dist/components/{p-cc01acce.js.map → p-56bcffa8.js.map} +1 -1
- package/dist/components/{p-8873386a.js → p-5dbcc06e.js} +2 -2
- package/dist/components/{p-8873386a.js.map → p-5dbcc06e.js.map} +1 -1
- package/dist/components/{p-d30290b2.js → p-5f678e32.js} +2 -2
- package/dist/components/{p-d30290b2.js.map → p-5f678e32.js.map} +1 -1
- package/dist/components/{p-2ad354d5.js → p-64a56327.js} +3 -3
- package/dist/components/{p-2ad354d5.js.map → p-64a56327.js.map} +1 -1
- package/dist/components/{p-85b56ca0.js → p-696a1f4a.js} +2 -2
- package/dist/components/{p-85b56ca0.js.map → p-696a1f4a.js.map} +1 -1
- package/dist/components/{p-dfe9194c.js → p-6dfe1ebf.js} +2 -2
- package/dist/components/{p-dfe9194c.js.map → p-6dfe1ebf.js.map} +1 -1
- package/dist/components/{p-09708c58.js → p-82a3ab58.js} +2 -2
- package/dist/components/{p-09708c58.js.map → p-82a3ab58.js.map} +1 -1
- package/dist/components/{p-8f5f3aa5.js → p-8710e0f4.js} +2 -2
- package/dist/components/{p-8f5f3aa5.js.map → p-8710e0f4.js.map} +1 -1
- package/dist/components/{p-073ef656.js → p-89c70ab8.js} +2 -2
- package/dist/components/{p-073ef656.js.map → p-89c70ab8.js.map} +1 -1
- package/dist/components/{p-55c3c2f3.js → p-8be88187.js} +3 -3
- package/dist/components/{p-55c3c2f3.js.map → p-8be88187.js.map} +1 -1
- package/dist/components/{p-260fe4d2.js → p-8c105c41.js} +10 -8
- package/dist/components/p-8c105c41.js.map +1 -0
- package/dist/components/{p-72f2c088.js → p-96d8d9cd.js} +2 -2
- package/dist/components/{p-72f2c088.js.map → p-96d8d9cd.js.map} +1 -1
- package/dist/components/{p-8c57e5da.js → p-9d5851d0.js} +18 -15
- package/dist/components/p-9d5851d0.js.map +1 -0
- package/dist/components/{p-4da41d2e.js → p-9ef75780.js} +2 -2
- package/dist/components/{p-4da41d2e.js.map → p-9ef75780.js.map} +1 -1
- package/dist/components/{p-2bd54aaa.js → p-b6b7d110.js} +6 -6
- package/dist/components/{p-2bd54aaa.js.map → p-b6b7d110.js.map} +1 -1
- package/dist/components/{p-cb684a84.js → p-beff7573.js} +2 -2
- package/dist/components/{p-cb684a84.js.map → p-beff7573.js.map} +1 -1
- package/dist/components/{p-4d2dad1c.js → p-d75d024a.js} +7 -7
- package/dist/components/{p-4d2dad1c.js.map → p-d75d024a.js.map} +1 -1
- package/dist/components/{p-2aefd84f.js → p-db801532.js} +3 -3
- package/dist/components/{p-2aefd84f.js.map → p-db801532.js.map} +1 -1
- package/dist/components/{p-57be9ed0.js → p-ea4ef5f2.js} +3 -3
- package/dist/components/{p-57be9ed0.js.map → p-ea4ef5f2.js.map} +1 -1
- package/dist/components/{p-07b3e0e2.js → p-f41d7ec5.js} +8 -8
- package/dist/components/p-f41d7ec5.js.map +1 -0
- package/dist/components/test-input-tag.js +13 -13
- package/dist/components/test-input-tag.js.map +1 -1
- package/dist/esm/{gb-avatar_39.entry.js → gb-avatar_38.entry.js} +149 -150
- package/dist/esm/gb-avatar_38.entry.js.map +1 -0
- package/dist/esm/gb-megainput-field.entry.js +2 -2
- package/dist/esm/gb-progress-bar.entry.js +1 -1
- package/dist/esm/gb-progress-circle.entry.js +1 -1
- package/dist/esm/gb-rich-text.entry.js +1 -1
- package/dist/esm/gb-scrollbar.entry.js +1 -1
- package/dist/esm/gb-slider.entry.js +1 -1
- package/dist/esm/gb-toggle.entry.js +1 -1
- package/dist/esm/gb-token-field.entry.js +1 -1
- package/dist/esm/gb-verification-code-field.entry.js +2 -2
- package/dist/esm/globuscomponents.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/test-input-tag.entry.js +104 -0
- package/dist/esm/test-input-tag.entry.js.map +1 -0
- package/dist/globuscomponents/globuscomponents.esm.js +1 -1
- package/dist/globuscomponents/globuscomponents.esm.js.map +1 -1
- package/dist/globuscomponents/{p-5f8111cf.entry.js → p-15215034.entry.js} +2 -2
- package/dist/globuscomponents/{p-b5ff56f6.entry.js → p-19383348.entry.js} +2 -2
- package/dist/globuscomponents/{p-6194ba21.entry.js → p-31d21f36.entry.js} +2 -2
- package/dist/globuscomponents/{p-bfe20997.entry.js → p-557f65a4.entry.js} +2 -2
- package/dist/globuscomponents/{p-4d400d11.entry.js → p-5c7d1754.entry.js} +2 -2
- package/dist/globuscomponents/p-7682d7e8.entry.js +2 -0
- package/dist/globuscomponents/p-7682d7e8.entry.js.map +1 -0
- package/dist/globuscomponents/{p-817c9a0f.entry.js → p-77859fd7.entry.js} +2 -2
- package/dist/globuscomponents/{p-109a1a02.entry.js → p-89d90763.entry.js} +2 -2
- package/dist/globuscomponents/p-89d90763.entry.js.map +1 -0
- package/dist/globuscomponents/{p-8611fc78.entry.js → p-939426f9.entry.js} +2 -2
- package/dist/globuscomponents/{p-b91d2c78.entry.js → p-ab4ad2bd.entry.js} +2 -2
- package/dist/globuscomponents/{p-308d65ef.entry.js → p-d5ea1db7.entry.js} +2 -2
- package/dist/types/components/gb-input-dropdown/gb-input-dropdown.d.ts +2 -0
- package/dist/types/components/gb-input-dropdown-menu-item/gb-input-dropdown-menu-item.d.ts +1 -1
- package/dist/types/components/gb-input-field/gb-input-field.d.ts +26 -2
- package/dist/types/components/test-input-tag/test-input-tag.d.ts +1 -1
- package/dist/types/components.d.ts +31 -4
- package/package.json +1 -1
- package/dist/cjs/gb-avatar_39.cjs.entry.js.map +0 -1
- package/dist/components/p-07b3e0e2.js.map +0 -1
- package/dist/components/p-260fe4d2.js.map +0 -1
- package/dist/components/p-8c57e5da.js.map +0 -1
- package/dist/esm/gb-avatar_39.entry.js.map +0 -1
- package/dist/globuscomponents/p-109a1a02.entry.js.map +0 -1
- /package/dist/globuscomponents/{p-5f8111cf.entry.js.map → p-15215034.entry.js.map} +0 -0
- /package/dist/globuscomponents/{p-b5ff56f6.entry.js.map → p-19383348.entry.js.map} +0 -0
- /package/dist/globuscomponents/{p-6194ba21.entry.js.map → p-31d21f36.entry.js.map} +0 -0
- /package/dist/globuscomponents/{p-bfe20997.entry.js.map → p-557f65a4.entry.js.map} +0 -0
- /package/dist/globuscomponents/{p-4d400d11.entry.js.map → p-5c7d1754.entry.js.map} +0 -0
- /package/dist/globuscomponents/{p-817c9a0f.entry.js.map → p-77859fd7.entry.js.map} +0 -0
- /package/dist/globuscomponents/{p-8611fc78.entry.js.map → p-939426f9.entry.js.map} +0 -0
- /package/dist/globuscomponents/{p-b91d2c78.entry.js.map → p-ab4ad2bd.entry.js.map} +0 -0
- /package/dist/globuscomponents/{p-308d65ef.entry.js.map → p-d5ea1db7.entry.js.map} +0 -0
|
@@ -2,13 +2,13 @@ import { h, Fragment, getAssetPath } from "@stencil/core";
|
|
|
2
2
|
import { StateEnum } from "../../models/reusableModels";
|
|
3
3
|
export class GbInputField {
|
|
4
4
|
constructor() {
|
|
5
|
+
this.minWidth = 10;
|
|
5
6
|
this.copyToClipboard = () => {
|
|
6
7
|
if (this.inputRef) {
|
|
7
8
|
this.inputRef.select();
|
|
8
9
|
document.execCommand('copy'); // Deprecated but works in most browsers
|
|
9
10
|
// For modern browsers:
|
|
10
|
-
navigator.clipboard
|
|
11
|
-
.writeText(this.inputRef.value);
|
|
11
|
+
navigator.clipboard.writeText(this.inputRef.value);
|
|
12
12
|
// .then(() => {
|
|
13
13
|
// console.log('Copied to clipboard');
|
|
14
14
|
// })
|
|
@@ -33,19 +33,88 @@ export class GbInputField {
|
|
|
33
33
|
this.iconSwap = undefined;
|
|
34
34
|
this.showCloseButton = false;
|
|
35
35
|
this.options = ['USD', 'NGN', 'CAD'];
|
|
36
|
+
this.idOfInput = undefined;
|
|
37
|
+
this.labelText = undefined;
|
|
38
|
+
this.isReadOnly = false;
|
|
39
|
+
this.results = [
|
|
40
|
+
// { name: 'John Doe', email: 'john.doe@example.com' },
|
|
41
|
+
// { name: 'Jane Smith', email: 'jane.smith@example.com' },
|
|
42
|
+
// { name: 'Alice Johnson', email: 'alice.johnson@example.com' },
|
|
43
|
+
// { name: 'Emmanuel Kadiri', email: 'kadiri2047@gmail.com' },
|
|
44
|
+
// { name: 'Gideon Ogunkola', email: 'gideon@example.com' },
|
|
45
|
+
// 10, 20, 30, 40, 50,
|
|
46
|
+
];
|
|
47
|
+
this.menuPosition = undefined;
|
|
48
|
+
this.icon = undefined;
|
|
36
49
|
this.inputValue = '';
|
|
37
50
|
this.tags = [];
|
|
38
51
|
this.leadingIconSvg = '';
|
|
39
52
|
this.isPasswordVisible = false;
|
|
40
53
|
this.showDropdown = false;
|
|
41
54
|
this.selectedItem = '';
|
|
55
|
+
this.selectedItems = [];
|
|
56
|
+
this.paddingLeft = '1rem';
|
|
57
|
+
this.paddingTop = '0rem';
|
|
58
|
+
this.dropdownOpen = false;
|
|
59
|
+
this.show = false;
|
|
60
|
+
this.showSpinner = false;
|
|
42
61
|
}
|
|
62
|
+
;
|
|
43
63
|
async loadIcon(iconName) {
|
|
44
64
|
const iconPath = getAssetPath(`${iconName}`);
|
|
45
65
|
const response = await fetch(iconPath);
|
|
46
66
|
const svg = await response.text();
|
|
47
67
|
this.leadingIconSvg = svg;
|
|
48
68
|
}
|
|
69
|
+
handleTagInput(event) {
|
|
70
|
+
const target = event.target;
|
|
71
|
+
this.inputValue = target.value; // Update the value
|
|
72
|
+
this.inputValueChanged.emit(this.inputValue);
|
|
73
|
+
if (this.inputValue.trim() === '') {
|
|
74
|
+
this.showDropdown = false;
|
|
75
|
+
this.results = [];
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
this.showSpinner = true;
|
|
79
|
+
// Simulate API call
|
|
80
|
+
setTimeout(() => {
|
|
81
|
+
// this.results = this.mockStaffSearch(this.inputValue);
|
|
82
|
+
this.showDropdown = this.results.length > 0;
|
|
83
|
+
this.showSpinner = false;
|
|
84
|
+
}, 1000);
|
|
85
|
+
this.updateInputWidth();
|
|
86
|
+
}
|
|
87
|
+
// mockStaffSearch(query: string) {
|
|
88
|
+
// const mockData = this.results;
|
|
89
|
+
// return mockData.filter(staff => staff.name.toLowerCase().includes(query.toLowerCase()));
|
|
90
|
+
// }
|
|
91
|
+
selectStaff(staff) {
|
|
92
|
+
this.selectedItems = [...this.selectedItems, staff];
|
|
93
|
+
this.inputValue = '';
|
|
94
|
+
// this.results = [];
|
|
95
|
+
// this.showDropdown = false;
|
|
96
|
+
this.updateStyles();
|
|
97
|
+
}
|
|
98
|
+
removeStaff(index) {
|
|
99
|
+
this.selectedItems = [...this.selectedItems.slice(0, index), ...this.selectedItems.slice(index + 1)];
|
|
100
|
+
this.updateStyles();
|
|
101
|
+
}
|
|
102
|
+
updateStyles() {
|
|
103
|
+
setTimeout(() => {
|
|
104
|
+
if (this.resultsDisplayElement) {
|
|
105
|
+
const resultsWidth = this.resultsDisplayElement.offsetWidth;
|
|
106
|
+
const inputWidth = this.inputElement.offsetWidth;
|
|
107
|
+
this.paddingLeft = this.selectedItems.length === 0 ? '1rem' : `${resultsWidth + 10}px`;
|
|
108
|
+
this.paddingTop = this.selectedItems.length > 2 ? '1rem' : `${inputWidth + 10}px`;
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
if (this.destructive) {
|
|
112
|
+
this.destructive = false;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exportSelectedStaff() {
|
|
116
|
+
this.inputValueChanged.emit(this.selectedItems);
|
|
117
|
+
}
|
|
49
118
|
handleClickOutside(event) {
|
|
50
119
|
if (this.showDropdown && !this.el.contains(event.target)) {
|
|
51
120
|
this.showDropdown = false;
|
|
@@ -75,6 +144,11 @@ export class GbInputField {
|
|
|
75
144
|
isItemSelected(option) {
|
|
76
145
|
return this.selectedItem === option;
|
|
77
146
|
}
|
|
147
|
+
isTagItemSelected(item) {
|
|
148
|
+
// return this.selectedStaff.some(i => i.name === item.name);
|
|
149
|
+
const isObject = typeof item === 'object';
|
|
150
|
+
return this.selectedItems.some(i => (isObject ? i.name === item.name : i === item));
|
|
151
|
+
}
|
|
78
152
|
handleItemSelect(option) {
|
|
79
153
|
// For other types, allow only one selection
|
|
80
154
|
this.selectedItem = option;
|
|
@@ -96,27 +170,47 @@ export class GbInputField {
|
|
|
96
170
|
if (supportingTextSlot) {
|
|
97
171
|
supportingTextSlot.classList.add('text-xs-regular');
|
|
98
172
|
}
|
|
99
|
-
|
|
173
|
+
if (this.type === 'tags') {
|
|
174
|
+
document.addEventListener('click', this.handleClickOutside);
|
|
175
|
+
}
|
|
176
|
+
this.inputElement.addEventListener('input', this.handleTagInput.bind(this));
|
|
177
|
+
this.updateInputWidth();
|
|
178
|
+
}
|
|
179
|
+
updateInputWidth() {
|
|
180
|
+
if (this.hiddenSpan) {
|
|
181
|
+
const input = this.el.shadowRoot.querySelector('input');
|
|
182
|
+
// Update input width based on span's width or use minimum width
|
|
183
|
+
const calculatedWidth = Math.max(this.hiddenSpan.offsetWidth + 10, this.minWidth);
|
|
184
|
+
input.style.width = `${calculatedWidth}px`;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
handleWrapperClick() {
|
|
188
|
+
this.inputElement.focus(); // Focus the input field
|
|
100
189
|
}
|
|
101
190
|
disconnectedCallback() {
|
|
102
191
|
document.removeEventListener('click', this.handleClickOutside);
|
|
192
|
+
this.inputElement.removeEventListener('input', this.handleTagInput.bind(this));
|
|
103
193
|
}
|
|
104
194
|
render() {
|
|
105
|
-
return (h("div", { key: '
|
|
106
|
-
h("div", { key: '
|
|
195
|
+
return (h("div", { key: '4d864e7a3568ec15abf4676784ca9e7db8dbb058', class: `input_container` }, h("div", { key: 'ef43101cd89d6759017d71c0ab08996705a6574c', class: `input_with_label` }, this.showLabel && h("p", { key: 'e418cfe694173fc36bf30172ca1dcd664486ef19', class: "label text-sm-medium" }, this.label.charAt(0).toUpperCase() + this.label.slice(1).toLowerCase()), this.type === 'default' && [
|
|
196
|
+
h("div", { key: '60f2519f3025a479d236da6e0b09e609fa16075c', class: `input ${this.type} ${this.size} ${this.state} ${this.destructive ? 'destructive' : ''}` }, h("input", { key: '5198bc1b45e644fc65a6f09b86d23451edf1b098', class: `content text-md-regular ${this.type} ${this.state}`, type: "text", placeholder: this.placeholder ? this.placeholder : '', onInput: event => this.handleInput(event) }), h(Fragment, null, this.showValidation && (h("svg", { key: '53f43a3056386452810bfd35e7cf0bb9d3d3e45f', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", class: "tick" }, h("path", { key: '7012660e4888a1e58066c4642ffc6851a5bdd439', d: "M4.16675 12.0833C4.16675 12.0833 5.41675 12.0833 7.08341 15C7.08341 15 11.7158 7.36112 15.8334 5.83334", stroke: "#079455", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))), this.showHelpIcon && (h("div", { key: '481b4afb189879c17c36c020eb209b18f374e31a', class: `help_circle` }, !this.destructive ? (h("gb-help-tooltip", { "show-supporting-text": true }, h("slot", { name: "tooltip_label", slot: "label" }), h("slot", { name: "tooltip_supporting_text", slot: "supporting_text" }))) : (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, h("path", { d: "M7.99458 10H8.00057M7.99992 8.00001V5.33334M14.6666 8.00001C14.6666 11.6819 11.6818 14.6667 7.99992 14.6667C4.31802 14.6667 1.33325 11.6819 1.33325 8.00001C1.33325 4.31811 4.31802 1.33334 7.99992 1.33334C11.6818 1.33334 14.6666 4.31811 14.6666 8.00001Z", stroke: "#B51726", "stroke-width": "1.33333", "stroke-linecap": "round", "stroke-linejoin": "round" }))))))),
|
|
107
197
|
], this.type === 'icon_leading' && [
|
|
108
|
-
h("div", { key: '
|
|
198
|
+
h("div", { key: '6259313d48cefbdc4eee0aa5bbf3b4c8e3edc38c', class: `input ${this.type} ${this.size} ${this.state} ${this.destructive ? 'destructive' : ''}` }, h("div", { key: '0331ad42a3bb8b3c61f9f2f9dbd1d7e16a5c13d4', class: `icon ${this.size} ${this.state}`, innerHTML: this.leadingIconSvg }), h("input", { key: '8657621ea051ac7471f8dfe00ebc0cbd70246387', class: `content text-md-regular ${this.type} ${this.state}`, type: "text", placeholder: this.placeholder ? this.placeholder : '', onInput: event => this.handleInput(event), ref: el => (this.inputRef = el) }), h(Fragment, null, this.showValidation && !this.destructive && (h("svg", { key: 'ebe54bd44d6bcaa378015720b517718d25213f20', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", class: "tick" }, h("path", { key: '6b9b421729a81f3488af83059690c4af903dd033', d: "M4.16675 12.0833C4.16675 12.0833 5.41675 12.0833 7.08341 15C7.08341 15 11.7158 7.36112 15.8334 5.83334", stroke: "#079455", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))), this.showHelpIcon && (h("div", { key: 'e53129cc8e6828175a41a928d35eea5c6f4af0fa', class: `help_circle` }, !this.destructive ? (h("gb-help-tooltip", { "show-supporting-text": true }, h("slot", { name: "tooltip_label", slot: "label" }), h("slot", { name: "tooltip_supporting_text", slot: "supporting_text" }))) : (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, h("path", { d: "M7.99458 10H8.00057M7.99992 8.00001V5.33334M14.6666 8.00001C14.6666 11.6819 11.6818 14.6667 7.99992 14.6667C4.31802 14.6667 1.33325 11.6819 1.33325 8.00001C1.33325 4.31811 4.31802 1.33334 7.99992 1.33334C11.6818 1.33334 14.6666 4.31811 14.6666 8.00001Z", stroke: "#B51726", "stroke-width": "1.33333", "stroke-linecap": "round", "stroke-linejoin": "round" }))))), this.showCloseButton && !this.destructive && (h("gb-button", { key: 'ae402deb95d1949f800759f8fdb1c519d5ed4370', size: "sm", hierarchy: "tertiary_gray", icon: "only", state: "default", "icon-leading": true, "icon-leading-swap": "assets/cancel-01.svg", onClick: () => this.clearInput() })))),
|
|
109
199
|
], this.type === 'leading_dropdown' && [
|
|
110
|
-
h("div", { key: '
|
|
111
|
-
h(Fragment, null, this.showDropdown && (h("div", { key: '
|
|
200
|
+
h("div", { key: '6604bc1a66e0b76a976eecc52cf38fde3c6123a8', class: `input ${this.type} ${this.size} ${this.state} ${this.destructive ? 'destructive' : ''}` }, h("div", { key: 'c33d73dec2f74bcb5012ecec736f1652d0d5bc9f', class: `leading_dropdown_dropdown`, onClick: () => (this.showDropdown = !this.showDropdown) }, h("div", { key: 'b62a2eaffc30e0e787ee5d449a0c33b77d623b6d', class: `country_icon` }, h("img", { key: 'f056b96359b07e91fc8fd91fbed86f151df6d10d', src: "build/assets/NG.svg", alt: "" })), h("div", { key: '61a8063019bd5f40bba959ac801d2c51478f4596', class: `dropdown_text` }, h("p", { key: 'e015b5c454b18a0ea0323dcba1671d0783594259', class: "text-md-regular", style: { color: 'var(--color-text, #4B5565)' } }, this.selectedItem)), h("div", { key: '6e5b7765c63b6adf7219d57c15f8ea47568f9fd6', class: `dropdown_arrow` }, h("svg", { key: 'e9e2c2d9472f01ad5c9e5b2a06db72d56899dbd3', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: '2501228bade703ef1a1b1949a0bf371cd0c4f38a', d: "M15 7.50004C15 7.50004 11.3176 12.5 9.99996 12.5C8.68237 12.5 5 7.5 5 7.5", stroke: "#4B5565", "stroke-width": "1.66667", "stroke-linecap": "round", "stroke-linejoin": "round" })))), h("div", { key: '5acb1933810c92ca976bae6c2f5b9f2b1ab9f9a7', class: `leading_dropdown_text_input` }, h("input", { key: '47511d97ac943de3a8139c4b2d3c05609c93e93b', class: `content text-md-regular ${this.type} ${this.state}`, type: "text", placeholder: this.placeholder ? this.placeholder : '', onInput: event => this.handleInput(event) }), this.showValidation && !this.destructive && (h("svg", { key: '3ece6778a32e2ee81f0baf6dd47208d14278ece4', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: 'c71c1b0d366050cf2d1fd0bef4d7c32c337b75ef', d: "M4.16675 12.0833C4.16675 12.0833 5.41675 12.0833 7.08341 15C7.08341 15 11.7158 7.36112 15.8334 5.83334", stroke: "#079455", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))), this.showHelpIcon && (h("div", { key: 'ec7bf47d2823ce136dd1b9b71bc6d0e8f984bbb8', class: `help_circle` }, !this.destructive ? (h("gb-help-tooltip", { "show-supporting-text": true }, h("slot", { name: "tooltip_label", slot: "label" }), h("slot", { name: "tooltip_supporting_text", slot: "supporting_text" }))) : (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, h("path", { d: "M7.99458 10H8.00057M7.99992 8.00001V5.33334M14.6666 8.00001C14.6666 11.6819 11.6818 14.6667 7.99992 14.6667C4.31802 14.6667 1.33325 11.6819 1.33325 8.00001C1.33325 4.31811 4.31802 1.33334 7.99992 1.33334C11.6818 1.33334 14.6666 4.31811 14.6666 8.00001Z", stroke: "#B51726", "stroke-width": "1.33333", "stroke-linecap": "round", "stroke-linejoin": "round" }))))))),
|
|
201
|
+
h(Fragment, null, this.showDropdown && (h("div", { key: '9827f94aa00626daf833a717225326e4047e104a', class: `dropdown_menu ${this.type} ${this.size}`, ref: el => (this.dropdownRef = el) }, this.options.map(option => (h("gb-input-dropdown-menu-item", { type: "default", state: StateEnum.Default, selected: this.isItemSelected(option), onClick: () => this.handleItemSelect(option) }, h("p", { slot: "name" }, option))))))),
|
|
112
202
|
], this.type === 'trailing_dropdown' && [
|
|
113
|
-
h("div", { key: '
|
|
114
|
-
h(Fragment, null, this.showDropdown && (h("div", { key: '
|
|
203
|
+
h("div", { key: '94f1b0a722fda7c9bbd2955e162dc0fd31df6206', class: `input ${this.type} ${this.size} ${this.state} ${this.destructive ? 'destructive' : ''}` }, h("div", { key: 'a0ccb18be41280722ea8aaf305cdafd47181ad92', class: `trailing_dropdown_content` }, h("p", { key: 'fa4376af4c6feb13235024efc33cc152a9d12bda', class: "text-md-regular", style: { color: 'var(--color-text, #4B5565)' } }, "$"), h("input", { key: 'ec1e8cf0db44d6b1bdc28f22d0763ca0e8bf698d', class: `content text-md-regular ${this.type} ${this.state}`, type: "text", placeholder: this.placeholder ? this.placeholder : '', onInput: event => this.handleInput(event) }), this.showHelpIcon && (h("div", { key: '5909357ed101521095c6b539c8251b2c2a4e15b0', class: `help_circle` }, !this.destructive ? (h("gb-help-tooltip", { "show-supporting-text": true }, h("slot", { name: "tooltip_label", slot: "label" }), h("slot", { name: "tooltip_supporting_text", slot: "supporting_text" }))) : (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, h("path", { d: "M7.99458 10H8.00057M7.99992 8.00001V5.33334M14.6666 8.00001C14.6666 11.6819 11.6818 14.6667 7.99992 14.6667C4.31802 14.6667 1.33325 11.6819 1.33325 8.00001C1.33325 4.31811 4.31802 1.33334 7.99992 1.33334C11.6818 1.33334 14.6666 4.31811 14.6666 8.00001Z", stroke: "#B51726", "stroke-width": "1.33333", "stroke-linecap": "round", "stroke-linejoin": "round" })))))), h("div", { key: '34bd3bc00970b8974a65e9481169bd5b9eb39b6e', class: `trailing_dropdown_dropdown`, onClick: () => (this.showDropdown = !this.showDropdown) }, h("div", { key: 'a00341386bfcd0895bbd8bf4186b01eed8f3abbd', class: `dropdown_text` }, h("p", { key: '952d0146f4d0afe61b1eeec70429290edefb68a3', class: "text-md-regular", style: { color: 'var(--color-text, #4B5565)' } }, this.selectedItem)), h("div", { key: '58659e6c3ad918bbb510a938ff8d9ba1af722d3b', class: `dropdown_arrow` }, h("svg", { key: '408d3aed934d2daae8cc911be10118898f40631c', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: 'e0cee5595d535935877aa400ea50664c1bf37602', d: "M15 7.50004C15 7.50004 11.3176 12.5 9.99996 12.5C8.68237 12.5 5 7.5 5 7.5", stroke: "#4B5565", "stroke-width": "1.66667", "stroke-linecap": "round", "stroke-linejoin": "round" }))))),
|
|
204
|
+
h(Fragment, null, this.showDropdown && (h("div", { key: '410898d9d7c8efa7a73c716f7cc835f1d5ffd180', class: `dropdown_menu ${this.type} ${this.size}`, ref: el => (this.dropdownRef = el) }, this.options.map(option => (h("gb-input-dropdown-menu-item", { type: "default", state: StateEnum.Default, selected: this.isItemSelected(option), onClick: () => this.handleItemSelect(option) }, h("p", { slot: "name" }, option))))))),
|
|
115
205
|
], this.type === 'leading_text' && [
|
|
116
|
-
h("div", { key: '
|
|
117
|
-
], this.type === 'payment_input' && (h("div", { key: 'b747ea827d5bd30975580c4fb2b02149aa909b9e', class: `input ${this.type} ${this.size} ${this.state} ${this.destructive ? 'destructive' : ''}` }, h("svg", { key: '57ab5078f745353671bdd9b00984f68b1f1e069a', xmlns: "http://www.w3.org/2000/svg", width: "23", height: "14", viewBox: "0 0 23 14", fill: "none" }, h("path", { key: 'aa9cf5f03725bfac6609cb032f9ec5c892011a99', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.179 11.8294C9.99493 12.8275 8.45902 13.43 6.78069 13.43C3.03582 13.43 0 10.4303 0 6.72997C0 3.02966 3.03582 0.0299683 6.78069 0.0299683C8.45902 0.0299683 9.99493 0.632466 11.179 1.63051C12.363 0.632466 13.8989 0.0299683 15.5773 0.0299683C19.3221 0.0299683 22.358 3.02966 22.358 6.72997C22.358 10.4303 19.3221 13.43 15.5773 13.43C13.8989 13.43 12.363 12.8275 11.179 11.8294Z", fill: "#ED0006" }), h("path", { key: 'bf9bf73f6463edb9858dc9ef20f706a38de696ad', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.179 11.8294C12.6369 10.6005 13.5614 8.77192 13.5614 6.72997C13.5614 4.68801 12.6369 2.85941 11.179 1.63051C12.363 0.632465 13.8989 0.0299683 15.5772 0.0299683C19.3221 0.0299683 22.3579 3.02966 22.3579 6.72997C22.3579 10.4303 19.3221 13.43 15.5772 13.43C13.8989 13.43 12.363 12.8275 11.179 11.8294Z", fill: "#F9A000" }), h("path", { key: 'a3f3afb29273bea3db1e1588011b48d49ca84007', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.179 11.8294C12.6369 10.6005 13.5614 8.77193 13.5614 6.72999C13.5614 4.68805 12.6369 2.85946 11.179 1.63055C9.72109 2.85946 8.79663 4.68805 8.79663 6.72999C8.79663 8.77193 9.72109 10.6005 11.179 11.8294Z", fill: "#FF5E00" })), h("input", { key: '6d087cc851ba59403ae6e8251c0f18d3273d8a1f', class: `content text-md-regular ${this.type} ${this.state}`, type: "text", placeholder: this.placeholder ? this.placeholder : '', onInput: event => this.handleInput(event) }), h(Fragment, null, this.showValidation && !this.destructive && (h("svg", { key: '04e846c1f7c40c48dfaee75959a1d645019d5280', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: 'eb9db57f57c80d56b09d0415ed0a96b7ee8b4133', d: "M4.16675 12.0833C4.16675 12.0833 5.41675 12.0833 7.08341 15C7.08341 15 11.7158 7.36112 15.8334 5.83334", stroke: "#079455", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))), this.showHelpIcon && (h("div", { key: '13a1aeb2698cdeefb586b8767137c7bc8dc94dcb', class: `help_circle` }, !this.destructive ? (h("gb-help-tooltip", { "show-supporting-text": true }, h("slot", { name: "tooltip_label", slot: "label" }), h("slot", { name: "tooltip_supporting_text", slot: "supporting_text" }))) : (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, h("path", { d: "M7.99458 10H8.00057M7.99992 8.00001V5.33334M14.6666 8.00001C14.6666 11.6819 11.6818 14.6667 7.99992 14.6667C4.31802 14.6667 1.33325 11.6819 1.33325 8.00001C1.33325 4.31811 4.31802 1.33334 7.99992 1.33334C11.6818 1.33334 14.6666 4.31811 14.6666 8.00001Z", stroke: "#B51726", "stroke-width": "1.33333", "stroke-linecap": "round", "stroke-linejoin": "round" })))))))), this.type === 'trailing_button' && (h("div", { key: '61dc140b53f44092d83205bdd07134fa182a6cf8', class: `input ${this.type} ${this.size} ${this.state} ${this.destructive ? 'destructive' : ''}` }, h("div", { key: 'e30bf3607c9461f12b650ab7ae23ff919acec921', class: `trailing_button_text_input ${this.size}` }, h("input", { key: '2b56206b2d1e1256e6828bda291bf4cdb1a4df81', class: `content text-md-regular ${this.type} ${this.state}`, type: "text", placeholder: this.placeholder ? this.placeholder : '', onInput: event => this.handleInput(event), ref: el => (this.inputRef = el) }), this.showValidation && !this.destructive && (h("svg", { key: '839d902ad855ec56b23b18e7ca0fba780adbb88a', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: '997b0fdf175e48712370c1d7d6e9c857bb3d891e', d: "M4.16675 12.0833C4.16675 12.0833 5.41675 12.0833 7.08341 15C7.08341 15 11.7158 7.36112 15.8334 5.83334", stroke: "#079455", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))), this.showHelpIcon && (h("div", { key: '9f78e96d127297e7b23ca136c41c8a519d5aea00', class: `help_circle` }, !this.destructive ? (h("gb-help-tooltip", { "show-supporting-text": true }, h("slot", { name: "tooltip_label", slot: "label" }), h("slot", { name: "tooltip_supporting_text", slot: "supporting_text" }))) : (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, h("path", { d: "M7.99458 10H8.00057M7.99992 8.00001V5.33334M14.6666 8.00001C14.6666 11.6819 11.6818 14.6667 7.99992 14.6667C4.31802 14.6667 1.33325 11.6819 1.33325 8.00001C1.33325 4.31811 4.31802 1.33334 7.99992 1.33334C11.6818 1.33334 14.6666 4.31811 14.6666 8.00001Z", stroke: "#B51726", "stroke-width": "1.33333", "stroke-linecap": "round", "stroke-linejoin": "round" })))))), h("gb-button", { key: 'dca985ff83c43abe0b8c1048285ae265d176c175', size: "lg", hierarchy: "tertiary_gray", icon: "only", state: this.state === 'disabled' ? 'disabled' : 'default', "icon-leading": true, "icon-leading-swap": "assets/copy-01.svg", onClick: () => this.copyToClipboard() }))), this.type === 'password' && (h("div", { key: 'c04ba6151bacc98c2c2b7295661e90dbf89f80e2', class: `password_input ${this.type} ${this.size} ${this.state} ${this.destructive ? 'destructive' : ''}` }, h("div", { key: '6dde78ec9619afb2f8cf69dea9f39bc5048bdddd', class: `password_content` }, h("input", { key: 'd7be0f4576bc2d0b7cbe219b42e29d15d907e195', class: `content text-md-regular ${this.type} ${this.state}`, type: this.isPasswordVisible ? 'text' : 'password', placeholder: this.placeholder ? this.placeholder : '', onInput: event => this.handleInput(event) }), this.showValidation && !this.destructive && (h("svg", { key: 'd3251adc9ae470177ac7d3fed0d5f6323e1493dd', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: 'adcb312bfa72704f9200b430e1469678a539032d', d: "M4.16675 12.0833C4.16675 12.0833 5.41675 12.0833 7.08341 15C7.08341 15 11.7158 7.36112 15.8334 5.83334", stroke: "#079455", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))), this.showHelpIcon && (h("div", { key: '16929d836b57b6777cefd91575099f92f8fba989', class: `help_circle` }, !this.destructive ? (h("gb-help-tooltip", { "show-supporting-text": true }, h("slot", { name: "tooltip_label", slot: "label" }), h("slot", { name: "tooltip_supporting_text", slot: "supporting_text" }))) : (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, h("path", { d: "M7.99458 10H8.00057M7.99992 8.00001V5.33334M14.6666 8.00001C14.6666 11.6819 11.6818 14.6667 7.99992 14.6667C4.31802 14.6667 1.33325 11.6819 1.33325 8.00001C1.33325 4.31811 4.31802 1.33334 7.99992 1.33334C11.6818 1.33334 14.6666 4.31811 14.6666 8.00001Z", stroke: "#B51726", "stroke-width": "1.33333", "stroke-linecap": "round", "stroke-linejoin": "round" })))))), h("div", { key: '1703b66b3cdfa6257f0708fa9f7ea4a677d6c70d', class: `dropdown` }, h("gb-password-button", { key: 'f05a73570bcb3fea5ad9c5ffc77b1d4af8e225d4', onClick: () => this.togglePasswordVisibility() })))), this.type === 'password_icon_leading' && (h("div", { key: '4308c580f258efb5aa9a19dc9a3837d84280c9a3', class: `password_icon_leading_input input ${this.type} ${this.size} ${this.state} ${this.destructive ? 'destructive' : ''}` }, h("div", { key: '510fe3e2148052983ff950f58b7b6180025a1e81', class: `password_icon_leading_content` }, h("svg", { key: '0194e1161106f134b20dad46ca6aff4b5bd4c7b7', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: '6ab3c1a4ff3fc56c6b6166014b1b8a3b60131447', d: "M12.0759 12.1667C11.6617 12.1667 11.3259 12.5025 11.3259 12.9167C11.3259 13.3309 11.6617 13.6667 12.0759 13.6667V12.1667ZM12.0833 13.6667C12.4976 13.6667 12.8333 13.3309 12.8333 12.9167C12.8333 12.5025 12.4976 12.1667 12.0833 12.1667V13.6667ZM7.91668 12.1667C7.50246 12.1667 7.16668 12.5025 7.16668 12.9167C7.16668 13.3309 7.50246 13.6667 7.91668 13.6667V12.1667ZM7.92415 13.6667C8.33836 13.6667 8.67415 13.3309 8.67415 12.9167C8.67415 12.5025 8.33836 12.1667 7.92415 12.1667V13.6667ZM16.4435 10.1294L17.1868 10.0293L16.4435 10.1294ZM13.7003 7.58258L13.7347 6.83337L13.7003 7.58258ZM13.7003 18.2508L13.7347 19L13.7003 18.2508ZM16.4435 15.704L15.7002 15.6039L16.4435 15.704ZM6.29973 7.58258L6.33417 8.33179L6.29973 7.58258ZM3.55652 10.1294L2.81323 10.0293L3.55652 10.1294ZM6.29973 18.2508L6.33417 17.5015L6.29973 18.2508ZM3.55652 15.704L4.29981 15.6039L3.55652 15.704ZM5.50001 7.5C5.50001 7.91422 5.8358 8.25 6.25001 8.25C6.66422 8.25 7.00001 7.91422 7.00001 7.5H5.50001ZM13 7.5C13 7.91422 13.3358 8.25 13.75 8.25C14.1642 8.25 14.5 7.91422 14.5 7.5H13ZM12.0759 13.6667H12.0833V12.1667H12.0759V13.6667ZM7.91668 13.6667H7.92415V12.1667H7.91668V13.6667ZM10 17.5833C8.69057 17.5833 7.50287 17.5553 6.33417 17.5015L6.26528 19C7.45761 19.0548 8.66829 19.0833 10 19.0833V17.5833ZM13.6659 17.5015C12.4972 17.5553 11.3094 17.5833 10 17.5833V19.0833C11.3317 19.0833 12.5424 19.0548 13.7347 19L13.6659 17.5015ZM17.1868 15.804C17.3105 14.8853 17.4167 13.9152 17.4167 12.9167H15.9167C15.9167 13.8142 15.8211 14.7058 15.7002 15.6039L17.1868 15.804ZM17.4167 12.9167C17.4167 11.9181 17.3105 10.948 17.1868 10.0293L15.7002 10.2295C15.8211 11.1275 15.9167 12.0192 15.9167 12.9167H17.4167ZM10 8.25C11.3095 8.25 12.4972 8.27806 13.6659 8.33179L13.7347 6.83337C12.5424 6.77856 11.3317 6.75 10 6.75V8.25ZM6.33417 8.33179C7.50287 8.27806 8.69057 8.25 10 8.25V6.75C8.66829 6.75 7.45761 6.77856 6.26528 6.83337L6.33417 8.33179ZM2.81323 10.0293C2.68953 10.948 2.58334 11.9181 2.58334 12.9167H4.08334C4.08334 12.0192 4.1789 11.1275 4.29981 10.2295L2.81323 10.0293ZM2.58334 12.9167C2.58334 13.9152 2.68953 14.8853 2.81323 15.804L4.29981 15.6039C4.1789 14.7058 4.08334 13.8142 4.08334 12.9167H2.58334ZM17.1868 10.0293C16.9527 8.29067 15.5122 6.91509 13.7347 6.83337L13.6659 8.33179C14.6943 8.37907 15.5595 9.18437 15.7002 10.2295L17.1868 10.0293ZM13.7347 19C15.5122 18.9183 16.9527 17.5427 17.1868 15.804L15.7002 15.6039C15.5595 16.649 14.6943 17.4543 13.6659 17.5015L13.7347 19ZM6.26528 6.83337C4.48781 6.91508 3.04732 8.29067 2.81323 10.0293L4.29981 10.2295C4.44052 9.18437 5.30576 8.37907 6.33417 8.33179L6.26528 6.83337ZM6.33417 17.5015C5.30576 17.4543 4.44052 16.649 4.29981 15.6039L2.81323 15.804C3.04732 17.5427 4.48782 18.9183 6.26528 19L6.33417 17.5015ZM7.00001 7.5V5.41667H5.50001V7.5H7.00001ZM13 5.41667V7.5H14.5V5.41667H13ZM10 2.41667C11.6569 2.41667 13 3.75981 13 5.41667H14.5C14.5 2.93139 12.4853 0.916668 10 0.916668V2.41667ZM7.00001 5.41667C7.00001 3.75981 8.34316 2.41667 10 2.41667V0.916668C7.51473 0.916668 5.50001 2.93139 5.50001 5.41667H7.00001Z", fill: "#4B5565" })), h("input", { key: '29d2ccbf2831f7b16d8fbdd7cf9c5bc75c0a7e4a', class: `content text-md-regular ${this.type} ${this.state}`, type: this.isPasswordVisible ? 'text' : 'password', placeholder: this.placeholder ? this.placeholder : '', onInput: event => this.handleInput(event) })), this.showValidation && !this.destructive && (h("svg", { key: 'fb37c5cb89acd08c27e67f2b42a4e99d0218f6bf', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: '2fb38ad2e4b8112b459b32e0aa9e34d3a0167a48', d: "M4.16675 12.0833C4.16675 12.0833 5.41675 12.0833 7.08341 15C7.08341 15 11.7158 7.36112 15.8334 5.83334", stroke: "#079455", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))), this.showHelpIcon && (h("div", { key: '3ee8d793956e6c7b5a5518c2e097ad571656d80c', class: `help_circle` }, !this.destructive ? (h("gb-help-tooltip", { "show-supporting-text": true }, h("slot", { name: "tooltip_label", slot: "label" }), h("slot", { name: "tooltip_supporting_text", slot: "supporting_text" }))) : (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, h("path", { d: "M7.99458 10H8.00057M7.99992 8.00001V5.33334M14.6666 8.00001C14.6666 11.6819 11.6818 14.6667 7.99992 14.6667C4.31802 14.6667 1.33325 11.6819 1.33325 8.00001C1.33325 4.31811 4.31802 1.33334 7.99992 1.33334C11.6818 1.33334 14.6666 4.31811 14.6666 8.00001Z", stroke: "#B51726", "stroke-width": "1.33333", "stroke-linecap": "round", "stroke-linejoin": "round" }))))), h("gb-password-button", { key: 'dfd01c3a12f0c2dcafb15f5f9853d85a8fb05614', onClick: () => this.togglePasswordVisibility() }))), this.type === 'count' && [
|
|
118
|
-
h("div", { key: '
|
|
119
|
-
], this.type === 'tags' && (h("div", { key: '
|
|
206
|
+
h("div", { key: '1b16cb1201d40620719aae01f16b15b3976b9268', class: "leading_text_input" }, h("div", { key: '200b7924e563963eef41ce924a23af4d719981bd', class: `add_on` }, h("p", { key: '31ba48cda619f4cb80d74e9ccfd0ad7f205bee4b', class: `text-md-regular`, style: { color: this.state === 'disabled' ? 'var(--color-text-disabled, #CDD5DF)' : 'var(--color-text, #4B5565)' } }, "http://")), h("div", { key: 'eef8e6e2d150931ffd21d6f44103b132ad6e69e5', class: `input ${this.type} ${this.size} ${this.state} ${this.destructive ? 'destructive' : ''}` }, h("input", { key: '880079c2a4301dc490fea5c781d25cb7a9107d19', class: `content text-md-regular ${this.type} ${this.state}`, type: "text", placeholder: this.placeholder ? this.placeholder : '', onInput: event => this.handleInput(event) }), this.showValidation && !this.destructive && (h("svg", { key: '0af7d3420f1af33e31bb261095c3fa3496668e9c', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: '130e902f2cda4b5fda5e84621755fb91447d790b', d: "M4.16675 12.0833C4.16675 12.0833 5.41675 12.0833 7.08341 15C7.08341 15 11.7158 7.36112 15.8334 5.83334", stroke: "#079455", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))), this.showHelpIcon && (h("div", { key: '9f92f52acd99f1ebad4c8f019644ba702a778cb2', class: `help_circle` }, !this.destructive ? (h("gb-help-tooltip", { "show-supporting-text": true }, h("slot", { name: "tooltip_label", slot: "label" }), h("slot", { name: "tooltip_supporting_text", slot: "supporting_text" }))) : (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, h("path", { d: "M7.99458 10H8.00057M7.99992 8.00001V5.33334M14.6666 8.00001C14.6666 11.6819 11.6818 14.6667 7.99992 14.6667C4.31802 14.6667 1.33325 11.6819 1.33325 8.00001C1.33325 4.31811 4.31802 1.33334 7.99992 1.33334C11.6818 1.33334 14.6666 4.31811 14.6666 8.00001Z", stroke: "#B51726", "stroke-width": "1.33333", "stroke-linecap": "round", "stroke-linejoin": "round" }))))))),
|
|
207
|
+
], this.type === 'payment_input' && (h("div", { key: '63dcf091bc893d830d85e779007ccedb7f745aca', class: `input ${this.type} ${this.size} ${this.state} ${this.destructive ? 'destructive' : ''}` }, h("svg", { key: 'e349d16fa2a44725c5c51d329c2320c9e6b78eeb', xmlns: "http://www.w3.org/2000/svg", width: "23", height: "14", viewBox: "0 0 23 14", fill: "none" }, h("path", { key: 'aaed5074f184032bcfc224be431814b4a6d47097', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.179 11.8294C9.99493 12.8275 8.45902 13.43 6.78069 13.43C3.03582 13.43 0 10.4303 0 6.72997C0 3.02966 3.03582 0.0299683 6.78069 0.0299683C8.45902 0.0299683 9.99493 0.632466 11.179 1.63051C12.363 0.632466 13.8989 0.0299683 15.5773 0.0299683C19.3221 0.0299683 22.358 3.02966 22.358 6.72997C22.358 10.4303 19.3221 13.43 15.5773 13.43C13.8989 13.43 12.363 12.8275 11.179 11.8294Z", fill: "#ED0006" }), h("path", { key: 'e78f6c838de51b85b058b90a79131dc735ba37e2', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.179 11.8294C12.6369 10.6005 13.5614 8.77192 13.5614 6.72997C13.5614 4.68801 12.6369 2.85941 11.179 1.63051C12.363 0.632465 13.8989 0.0299683 15.5772 0.0299683C19.3221 0.0299683 22.3579 3.02966 22.3579 6.72997C22.3579 10.4303 19.3221 13.43 15.5772 13.43C13.8989 13.43 12.363 12.8275 11.179 11.8294Z", fill: "#F9A000" }), h("path", { key: '39511848181f5de937def67a12fceb362997af66', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.179 11.8294C12.6369 10.6005 13.5614 8.77193 13.5614 6.72999C13.5614 4.68805 12.6369 2.85946 11.179 1.63055C9.72109 2.85946 8.79663 4.68805 8.79663 6.72999C8.79663 8.77193 9.72109 10.6005 11.179 11.8294Z", fill: "#FF5E00" })), h("input", { key: 'bd819b3f7d1bcec547804792c7ba8549c3a49421', class: `content text-md-regular ${this.type} ${this.state}`, type: "text", placeholder: this.placeholder ? this.placeholder : '', onInput: event => this.handleInput(event) }), h(Fragment, null, this.showValidation && !this.destructive && (h("svg", { key: '16299e01ea4ba72568545f8d93159fa19dd4a5dd', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: '1e5d64d17a15e6cf668c5a44a79f7b9b5b53d4ac', d: "M4.16675 12.0833C4.16675 12.0833 5.41675 12.0833 7.08341 15C7.08341 15 11.7158 7.36112 15.8334 5.83334", stroke: "#079455", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))), this.showHelpIcon && (h("div", { key: '658ccb00b24789d34c8d076c146e71e19efbf9d0', class: `help_circle` }, !this.destructive ? (h("gb-help-tooltip", { "show-supporting-text": true }, h("slot", { name: "tooltip_label", slot: "label" }), h("slot", { name: "tooltip_supporting_text", slot: "supporting_text" }))) : (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, h("path", { d: "M7.99458 10H8.00057M7.99992 8.00001V5.33334M14.6666 8.00001C14.6666 11.6819 11.6818 14.6667 7.99992 14.6667C4.31802 14.6667 1.33325 11.6819 1.33325 8.00001C1.33325 4.31811 4.31802 1.33334 7.99992 1.33334C11.6818 1.33334 14.6666 4.31811 14.6666 8.00001Z", stroke: "#B51726", "stroke-width": "1.33333", "stroke-linecap": "round", "stroke-linejoin": "round" })))))))), this.type === 'trailing_button' && (h("div", { key: 'a89e8fa2059c41f3c17bfc881f787e77cd0f0e76', class: `input ${this.type} ${this.size} ${this.state} ${this.destructive ? 'destructive' : ''}` }, h("div", { key: '4a2b1947cfda420224bec626bd24654ebadaacf8', class: `trailing_button_text_input ${this.size}` }, h("input", { key: '4f342b888be6e0eaa47ddaa4d75428adeed685d9', class: `content text-md-regular ${this.type} ${this.state}`, type: "text", placeholder: this.placeholder ? this.placeholder : '', onInput: event => this.handleInput(event), ref: el => (this.inputRef = el) }), this.showValidation && !this.destructive && (h("svg", { key: '86663617c93d0c13df05019547f729e2d1902343', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: '9767623874559a568bb47e4e51946acbd035d068', d: "M4.16675 12.0833C4.16675 12.0833 5.41675 12.0833 7.08341 15C7.08341 15 11.7158 7.36112 15.8334 5.83334", stroke: "#079455", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))), this.showHelpIcon && (h("div", { key: '23fc815a82d36833e376ffaa53138a718931c97f', class: `help_circle` }, !this.destructive ? (h("gb-help-tooltip", { "show-supporting-text": true }, h("slot", { name: "tooltip_label", slot: "label" }), h("slot", { name: "tooltip_supporting_text", slot: "supporting_text" }))) : (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, h("path", { d: "M7.99458 10H8.00057M7.99992 8.00001V5.33334M14.6666 8.00001C14.6666 11.6819 11.6818 14.6667 7.99992 14.6667C4.31802 14.6667 1.33325 11.6819 1.33325 8.00001C1.33325 4.31811 4.31802 1.33334 7.99992 1.33334C11.6818 1.33334 14.6666 4.31811 14.6666 8.00001Z", stroke: "#B51726", "stroke-width": "1.33333", "stroke-linecap": "round", "stroke-linejoin": "round" })))))), h("gb-button", { key: 'c631e4f79bfd9d25831caf6f24f39eeefe24f272', size: "lg", hierarchy: "tertiary_gray", icon: "only", state: this.state === 'disabled' ? 'disabled' : 'default', "icon-leading": true, "icon-leading-swap": "assets/copy-01.svg", onClick: () => this.copyToClipboard() }))), this.type === 'password' && (h("div", { key: '5e8171ee88002cb2e2bc31c2714bee0c35dbf5c7', class: `password_input ${this.type} ${this.size} ${this.state} ${this.destructive ? 'destructive' : ''}` }, h("div", { key: 'dda03260513855865f57869f3465d56a3a804a89', class: `password_content` }, h("input", { key: 'bb99388bc35e68629759ad8d8eac0d5364f18ae2', class: `content text-md-regular ${this.type} ${this.state}`, type: this.isPasswordVisible ? 'text' : 'password', placeholder: this.placeholder ? this.placeholder : '', onInput: event => this.handleInput(event) }), this.showValidation && !this.destructive && (h("svg", { key: 'ae1a9c5f144936de9a4ece0a2bfbda256bb2c553', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: 'dee2380e4bb144d803690c4fb88b1d7b3b4eeac4', d: "M4.16675 12.0833C4.16675 12.0833 5.41675 12.0833 7.08341 15C7.08341 15 11.7158 7.36112 15.8334 5.83334", stroke: "#079455", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))), this.showHelpIcon && (h("div", { key: 'f318584aa6bb7d5fd724fa3db6e6c1215aa9d045', class: `help_circle` }, !this.destructive ? (h("gb-help-tooltip", { "show-supporting-text": true }, h("slot", { name: "tooltip_label", slot: "label" }), h("slot", { name: "tooltip_supporting_text", slot: "supporting_text" }))) : (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, h("path", { d: "M7.99458 10H8.00057M7.99992 8.00001V5.33334M14.6666 8.00001C14.6666 11.6819 11.6818 14.6667 7.99992 14.6667C4.31802 14.6667 1.33325 11.6819 1.33325 8.00001C1.33325 4.31811 4.31802 1.33334 7.99992 1.33334C11.6818 1.33334 14.6666 4.31811 14.6666 8.00001Z", stroke: "#B51726", "stroke-width": "1.33333", "stroke-linecap": "round", "stroke-linejoin": "round" })))))), h("div", { key: '29ee5d3615b8ead554de93b2ce6f0d20bf9977f5', class: `dropdown` }, h("gb-password-button", { key: '7816e98582ed935b2496c77b00d1e626808e1146', onClick: () => this.togglePasswordVisibility() })))), this.type === 'password_icon_leading' && (h("div", { key: 'ca95050a95debe3d9b10274bd6c94bde45a0d355', class: `password_icon_leading_input input ${this.type} ${this.size} ${this.state} ${this.destructive ? 'destructive' : ''}` }, h("div", { key: '5fbaa91dc3c2db64f216a28c2f5dbb4de9680204', class: `password_icon_leading_content` }, h("svg", { key: 'a6c8d3987163da405a0586567df7c73844b99b26', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: '26fa811214b5c9b157a58d151815e415d5b94598', d: "M12.0759 12.1667C11.6617 12.1667 11.3259 12.5025 11.3259 12.9167C11.3259 13.3309 11.6617 13.6667 12.0759 13.6667V12.1667ZM12.0833 13.6667C12.4976 13.6667 12.8333 13.3309 12.8333 12.9167C12.8333 12.5025 12.4976 12.1667 12.0833 12.1667V13.6667ZM7.91668 12.1667C7.50246 12.1667 7.16668 12.5025 7.16668 12.9167C7.16668 13.3309 7.50246 13.6667 7.91668 13.6667V12.1667ZM7.92415 13.6667C8.33836 13.6667 8.67415 13.3309 8.67415 12.9167C8.67415 12.5025 8.33836 12.1667 7.92415 12.1667V13.6667ZM16.4435 10.1294L17.1868 10.0293L16.4435 10.1294ZM13.7003 7.58258L13.7347 6.83337L13.7003 7.58258ZM13.7003 18.2508L13.7347 19L13.7003 18.2508ZM16.4435 15.704L15.7002 15.6039L16.4435 15.704ZM6.29973 7.58258L6.33417 8.33179L6.29973 7.58258ZM3.55652 10.1294L2.81323 10.0293L3.55652 10.1294ZM6.29973 18.2508L6.33417 17.5015L6.29973 18.2508ZM3.55652 15.704L4.29981 15.6039L3.55652 15.704ZM5.50001 7.5C5.50001 7.91422 5.8358 8.25 6.25001 8.25C6.66422 8.25 7.00001 7.91422 7.00001 7.5H5.50001ZM13 7.5C13 7.91422 13.3358 8.25 13.75 8.25C14.1642 8.25 14.5 7.91422 14.5 7.5H13ZM12.0759 13.6667H12.0833V12.1667H12.0759V13.6667ZM7.91668 13.6667H7.92415V12.1667H7.91668V13.6667ZM10 17.5833C8.69057 17.5833 7.50287 17.5553 6.33417 17.5015L6.26528 19C7.45761 19.0548 8.66829 19.0833 10 19.0833V17.5833ZM13.6659 17.5015C12.4972 17.5553 11.3094 17.5833 10 17.5833V19.0833C11.3317 19.0833 12.5424 19.0548 13.7347 19L13.6659 17.5015ZM17.1868 15.804C17.3105 14.8853 17.4167 13.9152 17.4167 12.9167H15.9167C15.9167 13.8142 15.8211 14.7058 15.7002 15.6039L17.1868 15.804ZM17.4167 12.9167C17.4167 11.9181 17.3105 10.948 17.1868 10.0293L15.7002 10.2295C15.8211 11.1275 15.9167 12.0192 15.9167 12.9167H17.4167ZM10 8.25C11.3095 8.25 12.4972 8.27806 13.6659 8.33179L13.7347 6.83337C12.5424 6.77856 11.3317 6.75 10 6.75V8.25ZM6.33417 8.33179C7.50287 8.27806 8.69057 8.25 10 8.25V6.75C8.66829 6.75 7.45761 6.77856 6.26528 6.83337L6.33417 8.33179ZM2.81323 10.0293C2.68953 10.948 2.58334 11.9181 2.58334 12.9167H4.08334C4.08334 12.0192 4.1789 11.1275 4.29981 10.2295L2.81323 10.0293ZM2.58334 12.9167C2.58334 13.9152 2.68953 14.8853 2.81323 15.804L4.29981 15.6039C4.1789 14.7058 4.08334 13.8142 4.08334 12.9167H2.58334ZM17.1868 10.0293C16.9527 8.29067 15.5122 6.91509 13.7347 6.83337L13.6659 8.33179C14.6943 8.37907 15.5595 9.18437 15.7002 10.2295L17.1868 10.0293ZM13.7347 19C15.5122 18.9183 16.9527 17.5427 17.1868 15.804L15.7002 15.6039C15.5595 16.649 14.6943 17.4543 13.6659 17.5015L13.7347 19ZM6.26528 6.83337C4.48781 6.91508 3.04732 8.29067 2.81323 10.0293L4.29981 10.2295C4.44052 9.18437 5.30576 8.37907 6.33417 8.33179L6.26528 6.83337ZM6.33417 17.5015C5.30576 17.4543 4.44052 16.649 4.29981 15.6039L2.81323 15.804C3.04732 17.5427 4.48782 18.9183 6.26528 19L6.33417 17.5015ZM7.00001 7.5V5.41667H5.50001V7.5H7.00001ZM13 5.41667V7.5H14.5V5.41667H13ZM10 2.41667C11.6569 2.41667 13 3.75981 13 5.41667H14.5C14.5 2.93139 12.4853 0.916668 10 0.916668V2.41667ZM7.00001 5.41667C7.00001 3.75981 8.34316 2.41667 10 2.41667V0.916668C7.51473 0.916668 5.50001 2.93139 5.50001 5.41667H7.00001Z", fill: "#4B5565" })), h("input", { key: '9c0952b52a89cc12afcc469c50b054f0b35bb62e', class: `content text-md-regular ${this.type} ${this.state}`, type: this.isPasswordVisible ? 'text' : 'password', placeholder: this.placeholder ? this.placeholder : '', onInput: event => this.handleInput(event) })), this.showValidation && !this.destructive && (h("svg", { key: 'b2e36c0c20e6bc60fca8910b22ddcf5a17325c0d', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, h("path", { key: '9ba65dcd23fa28ef9e920fffd38d043a4c263ea9', d: "M4.16675 12.0833C4.16675 12.0833 5.41675 12.0833 7.08341 15C7.08341 15 11.7158 7.36112 15.8334 5.83334", stroke: "#079455", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))), this.showHelpIcon && (h("div", { key: '79ee6fcc2748f97214dc14785476ba3777c1fe04', class: `help_circle` }, !this.destructive ? (h("gb-help-tooltip", { "show-supporting-text": true }, h("slot", { name: "tooltip_label", slot: "label" }), h("slot", { name: "tooltip_supporting_text", slot: "supporting_text" }))) : (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, h("path", { d: "M7.99458 10H8.00057M7.99992 8.00001V5.33334M14.6666 8.00001C14.6666 11.6819 11.6818 14.6667 7.99992 14.6667C4.31802 14.6667 1.33325 11.6819 1.33325 8.00001C1.33325 4.31811 4.31802 1.33334 7.99992 1.33334C11.6818 1.33334 14.6666 4.31811 14.6666 8.00001Z", stroke: "#B51726", "stroke-width": "1.33333", "stroke-linecap": "round", "stroke-linejoin": "round" }))))), h("gb-password-button", { key: '2382de2ed225ab7576ed104dc83ebec7cdf3a2cf', onClick: () => this.togglePasswordVisibility() }))), this.type === 'count' && [
|
|
208
|
+
h("div", { key: '03e62c4fb718cc1b49b29b01d67710c0be22b6ec', class: `count_input` }, h("div", { key: 'd04382c73812c2e69f028ddbf60445c403030e2b', class: `count_text_input ${this.destructive ? 'destructive' : ''} ${this.state}` }, h("input", { key: '32eaba90d5a5a8ca8d2fb80e607beb9233e3a916', class: `content text-md-regular ${this.type} ${this.state}`, type: "text", placeholder: this.placeholder ? this.placeholder : '', onInput: event => this.handleInput(event) }), this.showHelpIcon && (h("div", { key: '085e51e8416bc34aa16eda078d0a5c5ebddfd02c', class: `help_circle` }, !this.destructive ? (h("gb-help-tooltip", { "show-supporting-text": true }, h("slot", { name: "tooltip_label", slot: "label" }), h("slot", { name: "tooltip_supporting_text", slot: "supporting_text" }))) : (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, h("path", { d: "M7.99458 10H8.00057M7.99992 8.00001V5.33334M14.6666 8.00001C14.6666 11.6819 11.6818 14.6667 7.99992 14.6667C4.31802 14.6667 1.33325 11.6819 1.33325 8.00001C1.33325 4.31811 4.31802 1.33334 7.99992 1.33334C11.6818 1.33334 14.6666 4.31811 14.6666 8.00001Z", stroke: "#B51726", "stroke-width": "1.33333", "stroke-linecap": "round", "stroke-linejoin": "round" })))))), h("div", { key: '5690fc64b3dba1a5a656aa6f85a2a15b1c8b63ec', class: `action ${this.state}` }, h("gb-button", { key: '28f663b36e7cf39ecf06c2ab59a9dcf9acde2dca', size: "xl", state: this.state === 'disabled' ? 'disabled' : 'default', hierarchy: "tertiary_gray", icon: "only", "icon-leading": "true", "icon-leading-swap": "assets/minus_sign.svg" }), h("hr", { key: '9ed5022ae11bfc58efadfbad8a5ac45dcc42f6a8' }), h("gb-button", { key: 'dbaa439956262dc9487ce7fc8a38c1c2f7a66e5a', size: "xl", state: this.state === 'disabled' ? 'disabled' : 'default', hierarchy: "tertiary_gray", icon: "only", "icon-leading": "true", "icon-leading-swap": "assets/plus_sign.svg" }))),
|
|
209
|
+
], this.type === 'tags' && (h("div", { key: '95feda534f30653da65666ecfb13d0aabe847fd0', class: "input_group", ref: el => (this.inputGroupElement = el), onClick: () => this.handleWrapperClick() }, h("div", { key: 'ac255e0328c14295a61bdfc02a62dc6b092bde7a', class: `input_like_parent ${this.size} ${this.state} ${this.destructive ? 'destructive' : ''}`, onClick: () => (this.dropdownOpen = !this.dropdownOpen) }, h("div", { key: 'baf239f104c1efa1e7edae88398216ad6f8fb876', class: `results_display`, ref: el => (this.resultsDisplayElement = el) }, this.selectedItems.map((item, index) => (h(Fragment, null, typeof item === 'object' ? (h("gb-tag", { size: "sm", action: "X_close", icon: this.icon ? this.icon : 'avatar', onClick: () => this.removeStaff(index) }, h("h1", { class: "text-xxs-semi-bold", slot: "initials" }, item.name.split(' ').map(part => part.charAt(0).toUpperCase())), h("p", null, item.name.split(' ')[0]))) : (h("gb-tag", { size: "sm", action: "X_close", icon: this.icon ? this.icon : 'avatar', onClick: () => this.removeStaff(index) }, h("p", null, item)))))), h("span", { key: '00f81e356359f1a6c627dd08ddf3bae88e443fb0', class: "hidden-span", ref: el => (this.hiddenSpan = el) }, this.inputValue || ' '), h("div", { key: 'bb56c912be76267837bd91e3fb6fc8a1d0249851', class: "input_field" }, h("input", { key: '57d5f2517646929b3123bcf13aa798ea09f9e2f0', id: this.idOfInput, class: `input_like text-md-regular ${this.state}`, type: "text",
|
|
210
|
+
// placeholder={this.placeholder && this.selectedStaff.length === 0 ? this.placeholder : ''}
|
|
211
|
+
value: this.inputValue, readOnly: this.isReadOnly, ref: el => (this.inputElement = el), onBlur: () => this.exportSelectedStaff(), onInput: event => this.handleTagInput(event) })))), this.showDropdown && (h("div", { key: 'ebe59b764ddcf7307ffe3088f519ad0c38ecec7f', class: `tags_dropdown_menu ${this.show ? 'show' : ''} ${this.menuPosition}` }, this.results.map(item => (h("gb-input-dropdown-menu-item", { type: "checkbox", "supporting-text": true, state: StateEnum.Default, onClick: () => this.selectStaff(item), selected: this.isTagItemSelected(item) }, typeof item === 'object'
|
|
212
|
+
? [h("p", { slot: "name" }, item.name), h("p", { slot: "supporting_text" }, item.email)]
|
|
213
|
+
: typeof item !== 'object' && h("p", { slot: "name" }, item))))))))), !this.destructive ? h("p", { class: "hint_text text-sm-regular" }, this.hintText) : h("p", { class: "error_text text-sm-regular" }, this.errorText)));
|
|
120
214
|
}
|
|
121
215
|
static get is() { return "gb-input-field"; }
|
|
122
216
|
static get encapsulation() { return "shadow"; }
|
|
@@ -180,7 +274,7 @@ export class GbInputField {
|
|
|
180
274
|
},
|
|
181
275
|
"destructive": {
|
|
182
276
|
"type": "boolean",
|
|
183
|
-
"mutable":
|
|
277
|
+
"mutable": true,
|
|
184
278
|
"complexType": {
|
|
185
279
|
"original": "boolean",
|
|
186
280
|
"resolved": "boolean",
|
|
@@ -425,6 +519,108 @@ export class GbInputField {
|
|
|
425
519
|
"text": ""
|
|
426
520
|
},
|
|
427
521
|
"defaultValue": "['USD', 'NGN', 'CAD']"
|
|
522
|
+
},
|
|
523
|
+
"idOfInput": {
|
|
524
|
+
"type": "string",
|
|
525
|
+
"mutable": false,
|
|
526
|
+
"complexType": {
|
|
527
|
+
"original": "string",
|
|
528
|
+
"resolved": "string",
|
|
529
|
+
"references": {}
|
|
530
|
+
},
|
|
531
|
+
"required": true,
|
|
532
|
+
"optional": false,
|
|
533
|
+
"docs": {
|
|
534
|
+
"tags": [],
|
|
535
|
+
"text": ""
|
|
536
|
+
},
|
|
537
|
+
"attribute": "id-of-input",
|
|
538
|
+
"reflect": true
|
|
539
|
+
},
|
|
540
|
+
"labelText": {
|
|
541
|
+
"type": "string",
|
|
542
|
+
"mutable": false,
|
|
543
|
+
"complexType": {
|
|
544
|
+
"original": "string",
|
|
545
|
+
"resolved": "string",
|
|
546
|
+
"references": {}
|
|
547
|
+
},
|
|
548
|
+
"required": true,
|
|
549
|
+
"optional": false,
|
|
550
|
+
"docs": {
|
|
551
|
+
"tags": [],
|
|
552
|
+
"text": ""
|
|
553
|
+
},
|
|
554
|
+
"attribute": "label-text",
|
|
555
|
+
"reflect": true
|
|
556
|
+
},
|
|
557
|
+
"isReadOnly": {
|
|
558
|
+
"type": "boolean",
|
|
559
|
+
"mutable": false,
|
|
560
|
+
"complexType": {
|
|
561
|
+
"original": "boolean",
|
|
562
|
+
"resolved": "boolean",
|
|
563
|
+
"references": {}
|
|
564
|
+
},
|
|
565
|
+
"required": false,
|
|
566
|
+
"optional": false,
|
|
567
|
+
"docs": {
|
|
568
|
+
"tags": [],
|
|
569
|
+
"text": ""
|
|
570
|
+
},
|
|
571
|
+
"attribute": "is-read-only",
|
|
572
|
+
"reflect": true,
|
|
573
|
+
"defaultValue": "false"
|
|
574
|
+
},
|
|
575
|
+
"results": {
|
|
576
|
+
"type": "unknown",
|
|
577
|
+
"mutable": true,
|
|
578
|
+
"complexType": {
|
|
579
|
+
"original": "any[]",
|
|
580
|
+
"resolved": "any[]",
|
|
581
|
+
"references": {}
|
|
582
|
+
},
|
|
583
|
+
"required": false,
|
|
584
|
+
"optional": false,
|
|
585
|
+
"docs": {
|
|
586
|
+
"tags": [],
|
|
587
|
+
"text": ""
|
|
588
|
+
},
|
|
589
|
+
"defaultValue": "[\r\n // { name: 'John Doe', email: 'john.doe@example.com' },\r\n // { name: 'Jane Smith', email: 'jane.smith@example.com' },\r\n // { name: 'Alice Johnson', email: 'alice.johnson@example.com' },\r\n // { name: 'Emmanuel Kadiri', email: 'kadiri2047@gmail.com' },\r\n // { name: 'Gideon Ogunkola', email: 'gideon@example.com' },\r\n // 10, 20, 30, 40, 50,\r\n ]"
|
|
590
|
+
},
|
|
591
|
+
"menuPosition": {
|
|
592
|
+
"type": "string",
|
|
593
|
+
"mutable": false,
|
|
594
|
+
"complexType": {
|
|
595
|
+
"original": "'top' | 'bottom'",
|
|
596
|
+
"resolved": "\"bottom\" | \"top\"",
|
|
597
|
+
"references": {}
|
|
598
|
+
},
|
|
599
|
+
"required": false,
|
|
600
|
+
"optional": false,
|
|
601
|
+
"docs": {
|
|
602
|
+
"tags": [],
|
|
603
|
+
"text": ""
|
|
604
|
+
},
|
|
605
|
+
"attribute": "menu-position",
|
|
606
|
+
"reflect": false
|
|
607
|
+
},
|
|
608
|
+
"icon": {
|
|
609
|
+
"type": "string",
|
|
610
|
+
"mutable": false,
|
|
611
|
+
"complexType": {
|
|
612
|
+
"original": "'country' | 'avatar' | 'dot' | 'false'",
|
|
613
|
+
"resolved": "\"avatar\" | \"country\" | \"dot\" | \"false\"",
|
|
614
|
+
"references": {}
|
|
615
|
+
},
|
|
616
|
+
"required": false,
|
|
617
|
+
"optional": false,
|
|
618
|
+
"docs": {
|
|
619
|
+
"tags": [],
|
|
620
|
+
"text": ""
|
|
621
|
+
},
|
|
622
|
+
"attribute": "icon",
|
|
623
|
+
"reflect": false
|
|
428
624
|
}
|
|
429
625
|
};
|
|
430
626
|
}
|
|
@@ -435,26 +631,17 @@ export class GbInputField {
|
|
|
435
631
|
"leadingIconSvg": {},
|
|
436
632
|
"isPasswordVisible": {},
|
|
437
633
|
"showDropdown": {},
|
|
438
|
-
"selectedItem": {}
|
|
634
|
+
"selectedItem": {},
|
|
635
|
+
"selectedItems": {},
|
|
636
|
+
"paddingLeft": {},
|
|
637
|
+
"paddingTop": {},
|
|
638
|
+
"dropdownOpen": {},
|
|
639
|
+
"show": {},
|
|
640
|
+
"showSpinner": {}
|
|
439
641
|
};
|
|
440
642
|
}
|
|
441
643
|
static get events() {
|
|
442
644
|
return [{
|
|
443
|
-
"method": "tagAdded",
|
|
444
|
-
"name": "tagAdded",
|
|
445
|
-
"bubbles": true,
|
|
446
|
-
"cancelable": true,
|
|
447
|
-
"composed": true,
|
|
448
|
-
"docs": {
|
|
449
|
-
"tags": [],
|
|
450
|
-
"text": ""
|
|
451
|
-
},
|
|
452
|
-
"complexType": {
|
|
453
|
-
"original": "string",
|
|
454
|
-
"resolved": "string",
|
|
455
|
-
"references": {}
|
|
456
|
-
}
|
|
457
|
-
}, {
|
|
458
645
|
"method": "inputValueChanged",
|
|
459
646
|
"name": "inputValueChanged",
|
|
460
647
|
"bubbles": true,
|
|
@@ -465,8 +652,8 @@ export class GbInputField {
|
|
|
465
652
|
"text": ""
|
|
466
653
|
},
|
|
467
654
|
"complexType": {
|
|
468
|
-
"original": "
|
|
469
|
-
"resolved": "
|
|
655
|
+
"original": "any",
|
|
656
|
+
"resolved": "any",
|
|
470
657
|
"references": {}
|
|
471
658
|
}
|
|
472
659
|
}];
|