@genexus/genexus-ide-ui 0.0.46 → 0.0.48
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/ch-icon.cjs.entry.js +116 -0
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-share-kb.cjs.entry.js +61 -0
- package/dist/cjs/{gxg-button.cjs.entry.js → gxg-button_2.cjs.entry.js} +61 -0
- package/dist/cjs/gxg-combo-box_2.cjs.entry.js +2 -8
- package/dist/cjs/gxg-form-text.cjs.entry.js +51 -4
- package/dist/cjs/gxg-ide-loader.cjs.entry.js +79 -0
- package/dist/cjs/gxg-test.cjs.entry.js +1 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/share-kb/gx-ide-assets/share-kb/langs/share-kb.lang.en.json +12 -0
- package/dist/collection/components/share-kb/gx-ide-assets/share-kb/langs/share-kb.lang.ja.json +3 -0
- package/dist/collection/components/share-kb/gx-ide-assets/share-kb/langs/share-kb.lang.zh.json +3 -0
- package/dist/collection/components/share-kb/share-kb.css +183 -0
- package/dist/collection/components/share-kb/share-kb.js +157 -0
- package/dist/components/combo-box.js +2 -9
- package/dist/components/form-text.js +55 -4
- package/dist/components/gx-ide-share-kb.d.ts +11 -0
- package/dist/components/gx-ide-share-kb.js +152 -0
- package/dist/components/gxg-ide-loader.js +117 -0
- package/dist/components/gxg-test.js +1 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2 -0
- package/dist/esm/ch-icon.entry.js +112 -0
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-share-kb.entry.js +57 -0
- package/dist/esm/{gxg-button.entry.js → gxg-button_2.entry.js} +62 -2
- package/dist/esm/gxg-combo-box_2.entry.js +2 -8
- package/dist/esm/gxg-form-text.entry.js +51 -4
- package/dist/esm/gxg-ide-loader.entry.js +75 -0
- package/dist/esm/gxg-test.entry.js +1 -3
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.css +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/share-kb/langs/share-kb.lang.en.json +12 -0
- package/dist/genexus-ide-ui/gx-ide-assets/share-kb/langs/share-kb.lang.ja.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/share-kb/langs/share-kb.lang.zh.json +3 -0
- package/dist/genexus-ide-ui/p-447c3a31.entry.js +1 -0
- package/dist/genexus-ide-ui/p-510330c9.entry.js +1 -0
- package/dist/genexus-ide-ui/p-5ad757f4.entry.js +1 -0
- package/dist/genexus-ide-ui/p-6e232a6f.entry.js +1 -0
- package/dist/genexus-ide-ui/p-9943e7db.entry.js +1 -0
- package/dist/genexus-ide-ui/{p-f2f60ed8.entry.js → p-d02f6ce4.entry.js} +1 -1
- package/dist/genexus-ide-ui/p-d8d00971.entry.js +1 -0
- package/dist/node_modules/@genexus/gemini/dist/collection/components/form-text/form-text.css +8 -0
- package/dist/node_modules/@genexus/gemini/dist/collection/components/ide-loader/ide-loader.css +89 -0
- package/dist/types/common/types.d.ts +1 -0
- package/dist/types/components/create-kb-from-server/create-kb-from-server.d.ts +2 -3
- package/dist/types/components/share-kb/share-kb.d.ts +46 -0
- package/dist/types/components.d.ts +54 -0
- package/package.json +3 -3
- package/dist/cjs/ch-icon_2.cjs.entry.js +0 -177
- package/dist/esm/ch-icon_2.entry.js +0 -172
- package/dist/genexus-ide-ui/p-54d15f4d.entry.js +0 -1
- package/dist/genexus-ide-ui/p-98c6b820.entry.js +0 -1
- package/dist/genexus-ide-ui/p-a708db45.entry.js +0 -1
- package/dist/genexus-ide-ui/p-e1e53ab1.entry.js +0 -1
|
@@ -114,7 +114,6 @@ const GxgComboBox = class {
|
|
|
114
114
|
this.inputTextValue = "";
|
|
115
115
|
this.listIsOpen = false;
|
|
116
116
|
this.inputTextIcon = undefined;
|
|
117
|
-
this.inputTextIconPosition = null;
|
|
118
117
|
this.noMatch = false;
|
|
119
118
|
this.lastAllowedValue = undefined;
|
|
120
119
|
this.slottedContent = null;
|
|
@@ -334,6 +333,7 @@ const GxgComboBox = class {
|
|
|
334
333
|
const item = this.getItemByValue(this.value);
|
|
335
334
|
if (item) {
|
|
336
335
|
this.text = item.innerText;
|
|
336
|
+
this.inputTextIcon = item.icon;
|
|
337
337
|
item.selected = true;
|
|
338
338
|
}
|
|
339
339
|
else {
|
|
@@ -376,7 +376,6 @@ const GxgComboBox = class {
|
|
|
376
376
|
this.clearIcon = () => {
|
|
377
377
|
if (!this.disabled) {
|
|
378
378
|
this.inputTextIcon = null;
|
|
379
|
-
this.inputTextIconPosition = null;
|
|
380
379
|
}
|
|
381
380
|
};
|
|
382
381
|
}
|
|
@@ -385,16 +384,13 @@ const GxgComboBox = class {
|
|
|
385
384
|
this.valueBeforeDisabled = this.value;
|
|
386
385
|
this.textBeforeDisabled = this.text;
|
|
387
386
|
this.iconBeforeDisabled = this.inputTextIcon;
|
|
388
|
-
this.iconPositionBeforeDisabled = this.inputTextIconPosition;
|
|
389
387
|
this.value = null;
|
|
390
388
|
this.inputTextIcon = null;
|
|
391
|
-
this.inputTextIconPosition = null;
|
|
392
389
|
}
|
|
393
390
|
else {
|
|
394
391
|
this.value = this.valueBeforeDisabled;
|
|
395
392
|
this.text = this.textBeforeDisabled;
|
|
396
393
|
this.inputTextIcon = this.iconBeforeDisabled;
|
|
397
|
-
this.inputTextIconPosition = this.iconPositionBeforeDisabled;
|
|
398
394
|
}
|
|
399
395
|
}
|
|
400
396
|
componentDidUpdate() {
|
|
@@ -531,11 +527,9 @@ const GxgComboBox = class {
|
|
|
531
527
|
setIcon(icon) {
|
|
532
528
|
if (icon) {
|
|
533
529
|
this.inputTextIcon = icon;
|
|
534
|
-
this.inputTextIconPosition = "start";
|
|
535
530
|
}
|
|
536
531
|
else {
|
|
537
532
|
this.inputTextIcon = null;
|
|
538
|
-
this.inputTextIconPosition = null;
|
|
539
533
|
}
|
|
540
534
|
}
|
|
541
535
|
focus() {
|
|
@@ -605,7 +599,7 @@ const GxgComboBox = class {
|
|
|
605
599
|
large: store.state.large,
|
|
606
600
|
}, style: { maxWidth: this.maxWidth, minWidth: this.minWidth }, exportParts: this.exportparts ? this.exportparts : null }, index.h("div", { class: {
|
|
607
601
|
"main-container": true,
|
|
608
|
-
}, ref: (el) => (this.mainContainer = el) }, this.label ? (index.h("gxg-label", { labelPosition: this.labelPosition, center: this.centerLabel, width: this.labelWidth }, this.label)) : null, index.h("div", { class: "search-and-items-container", ref: (el) => (this.searchItemsContainer = el) }, index.h("div", { class: { "search-container": true } }, index.h("gxg-form-text", { placeholder: this.placeholder, onInput: this.inputHandler.bind(this), onKeyDown: this.keyDownHandler, onClick: this.inputTextClickHandler, value: this.text, icon: this.fixedIcon || this.inputTextIcon, iconPosition:
|
|
602
|
+
}, ref: (el) => (this.mainContainer = el) }, this.label ? (index.h("gxg-label", { labelPosition: this.labelPosition, center: this.centerLabel, width: this.labelWidth }, this.label)) : null, index.h("div", { class: "search-and-items-container", ref: (el) => (this.searchItemsContainer = el) }, index.h("div", { class: { "search-container": true } }, index.h("gxg-form-text", { placeholder: this.placeholder, onInput: this.inputHandler.bind(this), onKeyDown: this.keyDownHandler, onClick: this.inputTextClickHandler, value: this.text, icon: this.fixedIcon || this.inputTextIcon, iconPosition: "start", readonly: this.disableFilter, ref: (el) => (this.inputText = el), validationStatus: this.validationStatus, disabled: this.disabled, onValueChanged: this.handleValueChangeFormText, cursorEnd: this.cursorEnd, preventValueChangedEmit: true, preventValueChangeOnDisabled: true, class: { "clear-icon": clearIcon }, part: this.parts.input }), index.h("div", { class: "buttons-wrapper" }, clearIcon ? (index.h("gxg-button", { class: { "button-icon delete-icon": true }, icon: "menus/delete", type: "tertiary", onClick: () => this.clearCombo(), tabindex: "-1", fit: true, disabled: this.disabled, part: this.parts.clearButton })) : null, index.h("gxg-button", { class: { "button-icon": true }, icon: "navigation/arrow-down", type: "secondary-icon-only", onClick: this.toggleListButtonClickHandler, fit: true, disabled: this.disabled, tabindex: "-1", part: this.parts.toggleButton }))), index.h("div", { class: {
|
|
609
603
|
"items-container": true,
|
|
610
604
|
"items-container--show": this.listIsOpen,
|
|
611
605
|
"items-container--no-match": this.noMatch,
|
|
@@ -8,7 +8,7 @@ const classesNames = require('./classesNames-5b7c6ad4.js');
|
|
|
8
8
|
const store = require('./store-0866de9f.js');
|
|
9
9
|
const exportParts = require('./export-parts-931a23ad.js');
|
|
10
10
|
|
|
11
|
-
const formTextCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--ui-animaton-speed:0.2s}.gxg-title-01{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em}.gxg-title-01--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-on-primary)}.gxg-title-02{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em}.gxg-title-02--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em;color:var(--color-on-primary)}.gxg-title-03{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-xs);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em}.gxg-title-03--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-xs);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em;color:var(--color-on-primary)}.gxg-title-04{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em}.gxg-title-04--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-on-primary)}.gxg-title-05{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;line-height:1.556em}.gxg-title-05--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;line-height:1.556em;color:var(--color-on-primary)}.gxg-text{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em}.gxg-text--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-on-primary)}.gxg-text--gray{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--gray-05)}.gxg-quote{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;font-style:italic}.gxg-quote--negative{color:var(--color-on-primary)}.gxg-link{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-primary);text-decoration:underline;cursor:pointer;display:inline-block}.gxg-link:hover{color:var(--color-primary-hover)}.gxg-link:active{color:var(--color-primary-active)}.gxg-link-gray{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-primary);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--gray-04)}.gxg-link-gray:hover{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-primary);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--gray-04);color:var(--gray-06)}.gxg-alert-error{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-error-dark);display:inline-block}.gxg-alert-warning{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-warning-dark);display:inline-block}.gxg-alert-success{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-success-dark);display:inline-block}.gxg-tab--disabled{color:var(--color-primary-disabled);pointer-events:none}.gxg-tab--disabled[disabled]{color:var(--color-primary-disabled);pointer-events:none}.gxg-label{font-family:var(--font-family-primary) !important;font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm) !important;letter-spacing:var(--letter-spacing-xs);color:var(--color-primary-enabled);text-align:center;line-height:1.455em}.gxg-label:hover{color:var(--color-primary-hover)}.gxg-label:focus{color:var(--color-primary-active)}.gxg-label:active{color:var(--color-primary-active)}.gxg-label[disabled]{color:var(--color-primary-disabled)}.gxg-label--negative{color:var(--color-on-primary)}.gxg-label--negative[disabled]{color:var(--color-on-disabled)}.gxg-button-styles{font-family:var(--font-family-primary) !important;font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm) !important;letter-spacing:var(--letter-spacing-xs);color:var(--color-primary-enabled);text-align:center;line-height:1.455em}.gxg-scrollbar{}.gxg-scrollbar::-webkit-scrollbar{width:6px;height:6px}.gxg-scrollbar::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gxg-scrollbar::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gxg-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}:host(.gxg-validation--warning) .form-element{border-color:var(--color-warning-dark)}:host(.gxg-validation--warning) .form-element:focus{outline-color:var(--color-warning-dark);border-color:var(--color-warning-dark)}:host(.gxg-validation--warning) .form-element:focus+.checkmark{--checkmark-border-color:var(--color-warning-dark)}:host(.gxg-validation--error) .form-element{border-color:var(--color-error-dark)}:host(.gxg-validation--error) .form-element:focus{outline-color:var(--color-error-dark);border-color:var(--color-error-dark)}:host(.gxg-validation--error) .form-element:focus+.checkmark{--checkmark-border-color:var(--color-error-dark)}:host(.gxg-validation--success) .form-element{border-color:var(--color-success-dark)}:host(.gxg-validation--success) .form-element:focus{outline-color:var(--color-success-dark);border-color:var(--color-success-dark)}:host(.gxg-validation--success) .form-element:focus+.checkmark{--checkmark-border-color:var(--color-success-dark)}:host(.gxg--disabled) .form-element,:host(.gxg--disabled.form-element){pointer-events:none;background-color:var(--gxg-background-color--disabled) !important;color:var(--gxg-color--disabled) !important;border-color:var(--gxg-border-color--disabled) !important;cursor:default !important}:host{display:flex;flex-direction:column;width:100%}:host .outer-wrapper{position:relative;width:100%}:host .inner-wrapper{display:flex;flex-direction:column;position:relative;flex:1}:host .inner-wrapper gxg-icon{position:absolute}:host label{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;display:flex;align-items:center;cursor:default}:host label .required{padding-inline-start:2px}:host input{position:relative;width:100%}:host([label-position=start]) .outer-wrapper{display:flex;flex-direction:row}:host input[type=text],:host input[type=password]{border-width:var(--border-width-sm);border-color:var(--gray-02);border-style:var(--border-style-regular);border-radius:var(--border-radius-sm);padding-left:var(--spacing-comp-01);padding-right:var(--spacing-comp-01);color:var(--color-on-background);background-color:var(--color-background);height:var(--gxg-form-text-height);box-sizing:border-box}:host input[type=text]:focus,:host input[type=password]:focus{outline-style:solid;outline-color:var(--gxg-border-color--focused);outline-width:var(--border-width-md);outline-offset:-2px}:host input[disabled]{background-color:var(--gray-01);color:var(--color-on-disabled)}:host input[disabled]::-webkit-input-placeholder{color:var(--gray-04)}:host .input--borderless{border-color:transparent !important}:host input[readonly]{cursor:default}:host([minimal]) input[type=text]:not(:focus),:host([minimal]) input[type=password]:not(:focus){border-color:transparent;background-color:transparent}:host([minimal]) input.cursor-inside{border-color:var(--gray-02) !important;background-color:var(--color-background)}:host([minimal]) input[type=text]:focus,:host([minimal]) input[type=password]:focus{border-color:transparent}:host([minimal]:not([icon-position=start])) input[type=text],:host([minimal]:not([icon-position=start])) input[type=password]{padding-inline-start:0}:host([minimal]:not([icon-position=start])) input.cursor-inside{padding-inline-start:var(--spacing-comp-01)}:host([minimal]:not([icon-position=start])) input[type=text]:focus,:host([minimal]:not([icon-position=start])) input[type=password]:focus{padding-inline-start:var(--spacing-comp-01)}:host([minimal][over-dark-background]) input[type=text]:not(:focus),:host([minimal][over-dark-background]) input[type=password]:not(:focus){color:var(--color-on-primary)}:host gxg-icon{top:50%;transform:translateY(-50%)}:host([icon-position=end]) .clear-button gxg-icon:not(.clear-button){right:16px}:host(.has-icon[icon-position=start]) input{padding-inline-start:20px}:host([icon-position=end]) input{padding-inline-end:20px}:host([icon-position=end]) .inner-wrapper{flex-direction:row-reverse}:host gxg-icon.clear-button{left:auto;opacity:0.5;cursor:pointer}:host gxg-icon.clear-button:hover{opacity:1}:host([clear-button][icon-position=end]) gxg-icon:not(.clear-button){right:16px}:host([clear-button][icon-position=end]) input{padding-inline-end:36px}.custom-icon:has(+.clear-button){}.messages-wrapper{margin-top:var(--spacing-comp-02);display:flex;gap:var(--spacing-comp-01);flex-direction:column}:host([text-style=regular]) input{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em}:host([text-style=quote]) input{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;font-style:italic}:host([text-style=title-01]) input{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em}:host([text-style=title-02]) input{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em}:host([text-style=title-03]) input{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-xs);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em}:host([text-style=title-04]) input{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em}:host([text-style=title-05]) input{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;line-height:1.556em}:host(.rtl[icon-position=start]) gxg-icon{right:0;left:auto}:host(.rtl[icon-position=end]) gxg-icon{right:auto;left:0}:host(.large) label{font-size:var(--font-size-lg)}:host(.large) input{font-size:var(--font-size-lg)}:host(.large) input[type=text],:host(.large) input[type=password]{padding-left:7px;padding-right:7px}:host(.large.has-icon[icon-position=start]) input{padding-inline-start:var(--spacing-comp-05)}:host(.large.has-icon[icon-position=start]) input .inner-wrapper gxg-icon{left:2px}:host(.large[icon-position=end]) input{padding-inline-end:var(--spacing-comp-05)}:host(.large[icon-position=start]) .inner-wrapper gxg-icon{left:2px}:host(.large[icon-position=end]) .inner-wrapper gxg-icon{right:4px;left:auto}:host(.large) gxg-icon.clear-button{right:5px !important;left:auto !important}:host(.large[icon-position=end][clear-button]) .inner-wrapper gxg-icon{right:26px}:host(.large.has-icon[icon-position=start][clear-button]) input{padding-inline-end:26px}:host(.large[icon-position=end][clear-button]) input{padding-inline-end:48px}";
|
|
11
|
+
const formTextCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}:root{--ui-animaton-speed:0.2s}.gxg-title-01{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em}.gxg-title-01--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-on-primary)}.gxg-title-02{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em}.gxg-title-02--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em;color:var(--color-on-primary)}.gxg-title-03{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-xs);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em}.gxg-title-03--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-xs);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em;color:var(--color-on-primary)}.gxg-title-04{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em}.gxg-title-04--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-on-primary)}.gxg-title-05{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;line-height:1.556em}.gxg-title-05--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;line-height:1.556em;color:var(--color-on-primary)}.gxg-text{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em}.gxg-text--negative{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-on-primary)}.gxg-text--gray{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--gray-05)}.gxg-quote{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;font-style:italic}.gxg-quote--negative{color:var(--color-on-primary)}.gxg-link{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-primary);text-decoration:underline;cursor:pointer;display:inline-block}.gxg-link:hover{color:var(--color-primary-hover)}.gxg-link:active{color:var(--color-primary-active)}.gxg-link-gray{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-primary);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--gray-04)}.gxg-link-gray:hover{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-primary);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--gray-04);color:var(--gray-06)}.gxg-alert-error{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-error-dark);display:inline-block}.gxg-alert-warning{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-warning-dark);display:inline-block}.gxg-alert-success{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;color:var(--color-success-dark);display:inline-block}.gxg-tab--disabled{color:var(--color-primary-disabled);pointer-events:none}.gxg-tab--disabled[disabled]{color:var(--color-primary-disabled);pointer-events:none}.gxg-label{font-family:var(--font-family-primary) !important;font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm) !important;letter-spacing:var(--letter-spacing-xs);color:var(--color-primary-enabled);text-align:center;line-height:1.455em}.gxg-label:hover{color:var(--color-primary-hover)}.gxg-label:focus{color:var(--color-primary-active)}.gxg-label:active{color:var(--color-primary-active)}.gxg-label[disabled]{color:var(--color-primary-disabled)}.gxg-label--negative{color:var(--color-on-primary)}.gxg-label--negative[disabled]{color:var(--color-on-disabled)}.gxg-button-styles{font-family:var(--font-family-primary) !important;font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm) !important;letter-spacing:var(--letter-spacing-xs);color:var(--color-primary-enabled);text-align:center;line-height:1.455em}.gxg-scrollbar{}.gxg-scrollbar::-webkit-scrollbar{width:6px;height:6px}.gxg-scrollbar::-webkit-scrollbar-track{background-color:var(--gray-02);border-radius:10px}.gxg-scrollbar::-webkit-scrollbar-thumb{background:var(--gray-05);border-radius:10px}.gxg-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--gray-04);cursor:pointer}:host(.gxg-validation--warning) .form-element{border-color:var(--color-warning-dark)}:host(.gxg-validation--warning) .form-element:focus{outline-color:var(--color-warning-dark);border-color:var(--color-warning-dark)}:host(.gxg-validation--warning) .form-element:focus+.checkmark{--checkmark-border-color:var(--color-warning-dark)}:host(.gxg-validation--error) .form-element{border-color:var(--color-error-dark)}:host(.gxg-validation--error) .form-element:focus{outline-color:var(--color-error-dark);border-color:var(--color-error-dark)}:host(.gxg-validation--error) .form-element:focus+.checkmark{--checkmark-border-color:var(--color-error-dark)}:host(.gxg-validation--success) .form-element{border-color:var(--color-success-dark)}:host(.gxg-validation--success) .form-element:focus{outline-color:var(--color-success-dark);border-color:var(--color-success-dark)}:host(.gxg-validation--success) .form-element:focus+.checkmark{--checkmark-border-color:var(--color-success-dark)}:host(.gxg--disabled) .form-element,:host(.gxg--disabled.form-element){pointer-events:none;background-color:var(--gxg-background-color--disabled) !important;color:var(--gxg-color--disabled) !important;border-color:var(--gxg-border-color--disabled) !important;cursor:default !important}:host{display:flex;flex-direction:column;width:100%}:host .outer-wrapper{position:relative;width:100%}:host .inner-wrapper{display:flex;flex-direction:column;position:relative;flex:1}:host .inner-wrapper gxg-icon{position:absolute}:host label{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;display:flex;align-items:center;cursor:default}:host label .required{padding-inline-start:2px}:host input{position:relative;width:100%}:host([label-position=start]) .outer-wrapper{display:flex;flex-direction:row}:host input[type=text],:host input[type=password]{border-width:var(--border-width-sm);border-color:var(--gray-02);border-style:var(--border-style-regular);border-radius:var(--border-radius-sm);padding-left:var(--spacing-comp-01);padding-right:var(--spacing-comp-01);color:var(--color-on-background);background-color:var(--color-background);height:var(--gxg-form-text-height);box-sizing:border-box}:host input[type=text]:focus,:host input[type=password]:focus{outline-style:solid;outline-color:var(--gxg-border-color--focused);outline-width:var(--border-width-md);outline-offset:-2px}:host input[disabled]{background-color:var(--gray-01);color:var(--color-on-disabled)}:host input[disabled]::-webkit-input-placeholder{color:var(--gray-04)}:host .input--borderless{border-color:transparent !important}:host input[readonly]{cursor:default}:host([minimal]) input[type=text]:not(:focus),:host([minimal]) input[type=password]:not(:focus){border-color:transparent;background-color:transparent}:host([minimal]) input.cursor-inside{border-color:var(--gray-02) !important;background-color:var(--color-background)}:host([minimal]) input[type=text]:focus,:host([minimal]) input[type=password]:focus{border-color:transparent}:host([minimal]:not([icon-position=start])) input[type=text],:host([minimal]:not([icon-position=start])) input[type=password]{padding-inline-start:0}:host([minimal]:not([icon-position=start])) input.cursor-inside{padding-inline-start:var(--spacing-comp-01)}:host([minimal]:not([icon-position=start])) input[type=text]:focus,:host([minimal]:not([icon-position=start])) input[type=password]:focus{padding-inline-start:var(--spacing-comp-01)}:host([minimal][over-dark-background]) input[type=text]:not(:focus),:host([minimal][over-dark-background]) input[type=password]:not(:focus){color:var(--color-on-primary)}:host gxg-icon{top:50%;transform:translateY(-50%)}:host([icon-position=end]) .clear-button gxg-icon:not(.clear-button){right:16px}:host(.has-icon[icon-position=start]) input{padding-inline-start:20px}:host([icon-position=end]) input{padding-inline-end:20px}:host([icon-position=end]) .inner-wrapper{flex-direction:row-reverse}:host gxg-icon.clear-button{left:auto;opacity:0.5;cursor:pointer}:host gxg-icon.clear-button:hover{opacity:1}:host([clear-button][icon-position=end]) gxg-icon:not(.clear-button){right:16px}:host([clear-button][icon-position=end]) input{padding-inline-end:36px}.custom-icon:has(+.clear-button){}.messages-wrapper{margin-top:var(--spacing-comp-02);display:flex;gap:var(--spacing-comp-01);flex-direction:column}:host([text-style=regular]) input{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em}:host([text-style=quote]) input{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-xs);color:var(--color-on-background);text-align:start;line-height:1.455em;font-style:italic}:host([text-style=title-01]) input{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em}:host([text-style=title-02]) input{font-family:var(--font-family-primary);font-weight:var(--font-weight-bold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em}:host([text-style=title-03]) input{font-family:var(--font-family-primary);font-weight:var(--font-weight-regular);font-size:var(--font-size-xs);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;text-transform:uppercase;line-height:1.556em}:host([text-style=title-04]) input{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-md);letter-spacing:var(--letter-spacing-md);color:var(--color-on-background);text-align:start;line-height:1.455em}:host([text-style=title-05]) input{font-family:var(--font-family-primary);font-weight:var(--font-weight-semibold);font-size:var(--font-size-sm);letter-spacing:var(--letter-spacing-sm);color:var(--color-on-background);text-align:start;line-height:1.556em}:host(.file) .input{user-select:none;cursor:pointer}:host(.rtl[icon-position=start]) gxg-icon{right:0;left:auto}:host(.rtl[icon-position=end]) gxg-icon{right:auto;left:0}:host(.large) label{font-size:var(--font-size-lg)}:host(.large) input{font-size:var(--font-size-lg)}:host(.large) input[type=text],:host(.large) input[type=password]{padding-left:7px;padding-right:7px}:host(.large.has-icon[icon-position=start]) input{padding-inline-start:var(--spacing-comp-05)}:host(.large.has-icon[icon-position=start]) input .inner-wrapper gxg-icon{left:2px}:host(.large[icon-position=end]) input{padding-inline-end:var(--spacing-comp-05)}:host(.large[icon-position=start]) .inner-wrapper gxg-icon{left:2px}:host(.large[icon-position=end]) .inner-wrapper gxg-icon{right:4px;left:auto}:host(.large) gxg-icon.clear-button{right:5px !important;left:auto !important}:host(.large[icon-position=end][clear-button]) .inner-wrapper gxg-icon{right:26px}:host(.large.has-icon[icon-position=start][clear-button]) input{padding-inline-end:26px}:host(.large[icon-position=end][clear-button]) input{padding-inline-end:48px}";
|
|
12
12
|
|
|
13
13
|
const GxgFormText = class {
|
|
14
14
|
constructor(hostRef) {
|
|
@@ -76,6 +76,14 @@ const GxgFormText = class {
|
|
|
76
76
|
* Centers the label
|
|
77
77
|
*/
|
|
78
78
|
this.centerLabel = false;
|
|
79
|
+
/**
|
|
80
|
+
* The type of input
|
|
81
|
+
*/
|
|
82
|
+
this.type = "text";
|
|
83
|
+
/**
|
|
84
|
+
* Allows multiple files if type is "file"
|
|
85
|
+
*/
|
|
86
|
+
this.multiple = false;
|
|
79
87
|
/**
|
|
80
88
|
* Prevent "valueChanged" event from being emitted (helpful for cases where the event causes a conflict )
|
|
81
89
|
*/
|
|
@@ -129,6 +137,38 @@ const GxgFormText = class {
|
|
|
129
137
|
const exportPartsResult = exportParts.exportParts(part, this.parts);
|
|
130
138
|
exportPartsResult.length && (this.exportparts = exportPartsResult);
|
|
131
139
|
};
|
|
140
|
+
this.evaluateIcon = () => {
|
|
141
|
+
if (this.type === "file") {
|
|
142
|
+
this.icon = "controls/file-upload";
|
|
143
|
+
this.iconPosition = "start";
|
|
144
|
+
this.placeholder = "Select a file";
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
this.handleClick = () => {
|
|
148
|
+
if (this.type === "file") {
|
|
149
|
+
this.fileInputEl.click();
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
this.handleKeyDown = (e) => {
|
|
153
|
+
if (e.key === "Enter" && this.type === "file") {
|
|
154
|
+
this.textInput.click();
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
this.inputFileChangedHandler = (e) => {
|
|
158
|
+
const selectedFiles = e.target.files;
|
|
159
|
+
this.fileList = selectedFiles;
|
|
160
|
+
if (selectedFiles.length > 1) {
|
|
161
|
+
this.value = `${selectedFiles.length} files chosen`;
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
this.value = selectedFiles[0].name;
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
this.renderInputFile = () => {
|
|
168
|
+
if (this.type === "file") {
|
|
169
|
+
return (index.h("input", { class: "input-file", type: "file", multiple: this.multiple, accept: this.acceptFile, ref: (el) => (this.fileInputEl = el), onChange: this.inputFileChangedHandler, style: { display: "none" } }));
|
|
170
|
+
}
|
|
171
|
+
};
|
|
132
172
|
}
|
|
133
173
|
watchHandler(newValue) {
|
|
134
174
|
if (!this.preventValueChangedEmit && this.debounce) {
|
|
@@ -163,6 +203,7 @@ const GxgFormText = class {
|
|
|
163
203
|
this.textInput.select();
|
|
164
204
|
}
|
|
165
205
|
componentWillLoad() {
|
|
206
|
+
this.evaluateIcon();
|
|
166
207
|
this.attachExportParts();
|
|
167
208
|
}
|
|
168
209
|
/*********************************
|
|
@@ -187,6 +228,7 @@ const GxgFormText = class {
|
|
|
187
228
|
}
|
|
188
229
|
handleInput(e) {
|
|
189
230
|
e.stopPropagation();
|
|
231
|
+
console.log(e);
|
|
190
232
|
const target = e.target;
|
|
191
233
|
this.value = target.value;
|
|
192
234
|
this.input.emit(target.value);
|
|
@@ -205,6 +247,10 @@ const GxgFormText = class {
|
|
|
205
247
|
clearButtonFunc() {
|
|
206
248
|
this.clearButtonClicked.emit({ prevValue: this.value });
|
|
207
249
|
this.value = "";
|
|
250
|
+
if (this.type === "file") {
|
|
251
|
+
this.fileList = null;
|
|
252
|
+
this.fileInputEl.value = "";
|
|
253
|
+
}
|
|
208
254
|
}
|
|
209
255
|
updateGhostSpan() {
|
|
210
256
|
if (this.minimal) {
|
|
@@ -315,7 +361,7 @@ const GxgFormText = class {
|
|
|
315
361
|
return "small";
|
|
316
362
|
}
|
|
317
363
|
}
|
|
318
|
-
|
|
364
|
+
evaluateType() {
|
|
319
365
|
if (this.password) {
|
|
320
366
|
return "password";
|
|
321
367
|
}
|
|
@@ -331,6 +377,7 @@ const GxgFormText = class {
|
|
|
331
377
|
rtl: this.rtl,
|
|
332
378
|
large: store.state.large,
|
|
333
379
|
borderless: this.borderless,
|
|
380
|
+
file: this.type === "file",
|
|
334
381
|
"has-icon": this.icon,
|
|
335
382
|
[classesNames.formClasses["VALIDATION_INDETERMINATE_CLASS"]]: this.validationStatus === "indeterminate",
|
|
336
383
|
[classesNames.formClasses["VALIDATION_WARNING_CLASS"]]: this.validationStatus === "warning",
|
|
@@ -342,7 +389,7 @@ const GxgFormText = class {
|
|
|
342
389
|
} }, this.label ? (index.h("gxg-label", { labelPosition: this.labelPosition, center: this.centerLabel, width: this.labelWidth }, this.label, form.requiredLabel(this))) : (""), index.h("div", { class: {
|
|
343
390
|
"inner-wrapper": true,
|
|
344
391
|
"clear-button": this.clearButton === true,
|
|
345
|
-
} }, index.h("input", { part: this.parts.input, type: this.
|
|
392
|
+
} }, index.h("input", { part: this.parts.input, type: this.evaluateType(), value: this.value, class: {
|
|
346
393
|
input: true,
|
|
347
394
|
"form-element": true,
|
|
348
395
|
"cursor-inside": this.cursorInside,
|
|
@@ -350,7 +397,7 @@ const GxgFormText = class {
|
|
|
350
397
|
"custom-icon": this.icon,
|
|
351
398
|
"custom-icon--end": this.iconPosition === "end",
|
|
352
399
|
"input--borderless": this.borderless,
|
|
353
|
-
}, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly , onInput: this.handleInput.bind(this), onChange: this.handleChange.bind(this), onFocus: this.onFocusHandler.bind(this), required: this.required, onMouseEnter: this.mouseEnterHandler.bind(this), onMouseOut: this.mouseOutHandler.bind(this), ref: (el) => (this.textInput = el), maxLength: this.maxLength ? parseInt(this.maxLength) : null, minLength: this.minLength ? parseInt(this.minLength) : null }), this.inputIcon(), this.clearButton ? (index.h("gxg-icon", { class: "clear-button", type: "gemini-tools/close", size: this.iconSize(), color: "onbackground", onClick: this.clearButtonFunc.bind(this) })) : null, this.labelPosition === "start" ? form.formMessageLogic(this) : null)), this.labelPosition === "above" ? form.formMessageLogic(this) : null));
|
|
400
|
+
}, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly || this.type === "file" , onClick: this.handleClick, onInput: this.handleInput.bind(this), onKeyDown: this.handleKeyDown, onChange: this.handleChange.bind(this), onFocus: this.onFocusHandler.bind(this), required: this.required, onMouseEnter: this.mouseEnterHandler.bind(this), onMouseOut: this.mouseOutHandler.bind(this), ref: (el) => (this.textInput = el), maxLength: this.maxLength ? parseInt(this.maxLength) : null, minLength: this.minLength ? parseInt(this.minLength) : null }), this.inputIcon(), this.clearButton ? (index.h("gxg-icon", { class: "clear-button", type: "gemini-tools/close", size: this.iconSize(), color: "onbackground", onClick: this.clearButtonFunc.bind(this) })) : null, this.labelPosition === "start" ? form.formMessageLogic(this) : null, this.renderInputFile())), this.labelPosition === "above" ? form.formMessageLogic(this) : null));
|
|
354
401
|
}
|
|
355
402
|
static get delegatesFocus() { return true; }
|
|
356
403
|
get el() { return index.getElement(this); }
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-5a32426a.js');
|
|
6
|
+
|
|
7
|
+
const ideLoaderCss = ":host(.gxg--disabled) .form-element,:host(.gxg--disabled.form-element){pointer-events:none;background-color:var(--gxg-background-color--disabled) !important;color:var(--gxg-color--disabled) !important;border-color:var(--gxg-border-color--disabled) !important;cursor:default !important}:host{display:block}ch-window::part(mask){overflow:hidden}ch-window::part(main){height:100%}ch-window::part(window){width:100%;height:100%}.loader-wrapper{opacity:0;transition:var(--show-transition) opacity;width:100%;height:100%;display:flex;background-color:rgba(var(--color-background--rgb), 0.45);backdrop-filter:blur(15px);padding:var(--spacing-comp-05);flex-direction:column;gap:var(--spacing-comp-04);align-items:center;justify-content:center;box-sizing:border-box;-webkit-animation:wrapper 0.6s infinite alternate;animation:wrapper 0.6s infinite alternate;color:var(--color-on-secondary)}.loader-wrapper--visible{opacity:1}.loader-spinner{border:2px var(--gray-01) solid;border-top:2px var(--color-primary-enabled) solid;border-radius:50%;-webkit-animation:spinner 0.6s infinite linear;animation:spinner 0.6s infinite linear;width:30px;height:30px}.loader-description{max-width:400px;text-align:center}@keyframes wrapper{from{background-color:rgba(var(--color-background--rgb), 0.45)}to{background-color:rgba(var(--gray-02--rgb), 0.25)}}@-webkit-keyframes spinner{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(359deg)}}@keyframes spinner{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}";
|
|
8
|
+
|
|
9
|
+
const IdeLoader = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
/*
|
|
13
|
+
INDEX:
|
|
14
|
+
1.OWN PROPERTIES
|
|
15
|
+
2.REFERENCE TO ELEMENTS
|
|
16
|
+
3.STATE() VARIABLES
|
|
17
|
+
4.PUBLIC PROPERTY API | WATCH'S
|
|
18
|
+
5.EVENTS (EMIT)
|
|
19
|
+
6.COMPONENT LIFECYCLE EVENTS
|
|
20
|
+
7.LISTENERS
|
|
21
|
+
8.PUBLIC METHODS API
|
|
22
|
+
9.LOCAL METHODS
|
|
23
|
+
10.RENDER() FUNCTION
|
|
24
|
+
*/
|
|
25
|
+
// 1.OWN PROPERTIES //
|
|
26
|
+
/**
|
|
27
|
+
* The transition speed for displaying/hiding the ch-window
|
|
28
|
+
*/
|
|
29
|
+
this.showTransition = 200;
|
|
30
|
+
// 3.STATE() VARIABLES //
|
|
31
|
+
/**
|
|
32
|
+
* shows the ch-window
|
|
33
|
+
*/
|
|
34
|
+
this.showWindow = false;
|
|
35
|
+
/**
|
|
36
|
+
* shows the '.loader-wrapper'
|
|
37
|
+
*/
|
|
38
|
+
this.showWrapper = false;
|
|
39
|
+
/**
|
|
40
|
+
* It shows the loader
|
|
41
|
+
*/
|
|
42
|
+
this.show = false;
|
|
43
|
+
}
|
|
44
|
+
showHandler(show) {
|
|
45
|
+
const timeout = 50;
|
|
46
|
+
if (show) {
|
|
47
|
+
this.showWindow = true;
|
|
48
|
+
setTimeout(() => {
|
|
49
|
+
this.showWrapper = true;
|
|
50
|
+
}, timeout);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
this.showWrapper = false;
|
|
54
|
+
setTimeout(() => {
|
|
55
|
+
this.showWindow = false;
|
|
56
|
+
}, this.showTransition);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
// 5.EVENTS (EMIT) //
|
|
60
|
+
// 6.COMPONENT LIFECYCLE EVENTS //
|
|
61
|
+
// 7.LISTENERS //
|
|
62
|
+
// 8.PUBLIC METHODS API //
|
|
63
|
+
// 9.LOCAL METHODS //
|
|
64
|
+
// 10.RENDER() FUNCTION //
|
|
65
|
+
render() {
|
|
66
|
+
console.log(this.showTransition);
|
|
67
|
+
return (index.h(index.Host, null, index.h("ch-window", { closeOnEscape: false, closeOnOutsideClick: false, container: this.container, hidden: !this.showWindow, modal: false, showFooter: false, showHeader: false, style: { "--show-transition": `${this.showTransition}ms` } }, index.h("div", { class: {
|
|
68
|
+
"loader-wrapper": true,
|
|
69
|
+
"loader-wrapper--visible": this.showWrapper,
|
|
70
|
+
} }, index.h("div", { class: "loader-spinner" }), this.description ? (index.h("gxg-title", { class: "loader-description", type: "title-04", alignment: "center" }, this.description)) : // <gxg-title>{this.description}</gxg-title>
|
|
71
|
+
null))));
|
|
72
|
+
}
|
|
73
|
+
static get watchers() { return {
|
|
74
|
+
"show": ["showHandler"]
|
|
75
|
+
}; }
|
|
76
|
+
};
|
|
77
|
+
IdeLoader.style = ideLoaderCss;
|
|
78
|
+
|
|
79
|
+
exports.gxg_ide_loader = IdeLoader;
|
|
@@ -98,9 +98,7 @@ const GxgTest = class {
|
|
|
98
98
|
}
|
|
99
99
|
render() {
|
|
100
100
|
return [
|
|
101
|
-
index.h("gxg-combo-box", { id: "combo-fruits", placeholder: "Select item", "max-width": "100%", "label-position": "start", "center-label": true, "cursor-end": true,
|
|
102
|
-
//value={this.getSelectedGxOption(this.comboValues)}
|
|
103
|
-
onValueChanged: this.valueChangedHandler }, this.renderComboBoxItems(this.comboValues)),
|
|
101
|
+
index.h("gxg-combo-box", { id: "combo-fruits", placeholder: "Select item", "max-width": "100%", "label-position": "start", "center-label": true, "cursor-end": true, value: this.getSelectedGxOption(this.comboValues), onValueChanged: this.valueChangedHandler }, this.renderComboBoxItems(this.comboValues)),
|
|
104
102
|
index.h("button", { onClick: this.updateFrontEnds }, "update"),
|
|
105
103
|
];
|
|
106
104
|
}
|