@3t-transform/threeteeui 0.2.76 → 0.2.78

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.
Files changed (27) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/tttx-multiselect-box.cjs.entry.js +5 -2
  3. package/dist/cjs/tttx-textarea.cjs.entry.js +59 -0
  4. package/dist/cjs/tttx.cjs.js +1 -1
  5. package/dist/collection/collection-manifest.json +1 -0
  6. package/dist/collection/components/molecules/tttx-multiselect-box/tttx-multiselect-box.js +5 -2
  7. package/dist/collection/components/molecules/tttx-textarea/tttx-textarea.css +62 -0
  8. package/dist/collection/components/molecules/tttx-textarea/tttx-textarea.js +420 -0
  9. package/dist/collection/components/molecules/tttx-textarea/tttx-textarea.stories.js +107 -0
  10. package/dist/components/index.d.ts +1 -0
  11. package/dist/components/index.js +1 -0
  12. package/dist/components/tttx-multiselect-box.js +5 -2
  13. package/dist/components/tttx-textarea.d.ts +11 -0
  14. package/dist/components/tttx-textarea.js +90 -0
  15. package/dist/esm/loader.js +1 -1
  16. package/dist/esm/tttx-multiselect-box.entry.js +5 -2
  17. package/dist/esm/tttx-textarea.entry.js +55 -0
  18. package/dist/esm/tttx.js +1 -1
  19. package/dist/tttx/p-5f1f699d.entry.js +1 -0
  20. package/dist/tttx/p-9c3f730f.entry.js +1 -0
  21. package/dist/tttx/tttx.esm.js +1 -1
  22. package/dist/types/components/molecules/tttx-multiselect-box/tttx-multiselect-box.d.ts +1 -0
  23. package/dist/types/components/molecules/tttx-textarea/tttx-textarea.d.ts +42 -0
  24. package/dist/types/components/molecules/tttx-textarea/tttx-textarea.stories.d.ts +89 -0
  25. package/dist/types/components.d.ts +77 -0
  26. package/package.json +3 -3
  27. package/dist/tttx/p-77fed2a6.entry.js +0 -1
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["tttx-multiselect-box.cjs",[[1,"tttx-multiselect-box",{"optionsData":[1,"options-data"],"label":[1],"inline":[4],"placeholder":[1],"searchEnabled":[4,"search-enabled"],"htmlVisibleValue":[4,"html-visible-value"],"visibleValue":[1,"visible-value"],"open":[32],"unsavedSelectedItems":[32],"searchTerm":[32]},[[0,"closeSelectBox","handleCloseSelectBox"],[0,"blur","handleBlur"]]]]],["tttx-dialog-box.cjs",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"open":[1028],"allowOverflow":[4,"allow-overflow"],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-select-box.cjs",[[1,"tttx-select-box",{"optionsData":[1,"options-data"],"label":[1],"inline":[4],"placeholder":[1],"searchEnabled":[4,"search-enabled"],"selectedValue":[1,"selected-value"],"open":[32],"selectedItem":[32],"searchTerm":[32]},[[0,"closeSelectBox","handleCloseSelectBox"],[0,"blur","handleBlur"]]]]],["tttx-tree-view.cjs",[[1,"tttx-tree-view",{"data":[1040],"treeData":[32]}]]],["tttx-filter.cjs",[[1,"tttx-filter",{"filterKey":[1,"filter-key"],"filterOptions":[1,"filter-options"],"showSelectAll":[4,"show-select-all"],"showSearchField":[4,"show-search-field"],"showOptionIcons":[4,"show-option-icons"],"filterButtonStyle":[1,"filter-button-style"],"filterHeader":[1,"filter-header"],"defaultFilterOptions":[1,"default-filter-options"],"popoverWidth":[1,"popover-width"],"showPopover":[32],"displayedFilterSettings":[32],"selectedFilters":[32],"filterSearchTerm":[32],"allSelected":[32]},[[0,"closeFilter","handleCloseFilter"]]]]],["tttx-list.cjs",[[1,"tttx-list",{"data":[1025],"name":[1],"_data":[32]}]]],["tttx-sorter.cjs",[[1,"tttx-sorter",{"sorterKey":[1,"sorter-key"],"defaultSortDirection":[1,"default-sort-direction"],"fieldOptionsData":[1,"field-options-data"],"defaultOption":[1,"default-option"],"selectedField":[32],"sortDirection":[32],"dropdownExpand":[32],"dropdownOptions":[32]},[[0,"closeSorter","handleCloseSorter"]]]]],["tttx-tabs.cjs",[[2,"tttx-tabs",{"tabsName":[1,"tabs-name"],"navigation":[4],"wide":[4],"tabs":[1],"_tabs":[32]},[[0,"keydown","handleKeyDown"]]]]],["tttx-form.cjs",[[1,"tttx-form",{"formschema":[1025],"data":[1032],"submit":[64]}]]],["tttx-keyvalue-block.cjs",[[1,"tttx-keyvalue-block",{"keyvalues":[1],"horizontal":[4],"spacedout":[4],"_elements":[32]}]]],["tttx-loading-spinner.cjs",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-qrcode.cjs",[[1,"tttx-qrcode",{"link":[1025],"size":[1026]}]]],["tttx-tag.cjs",[[1,"tttx-tag",{"text":[1],"color":[1]}]]],["tttx-toolbar.cjs",[[1,"tttx-toolbar",{"border":[4],"viewSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-icon.cjs",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]],["tttx-standalone-input.cjs",[[2,"tttx-standalone-input",{"label":[1],"secondarylabel":[1],"showerrormsg":[4],"showerrorbubble":[4],"errormsg":[1],"iconleft":[1],"iconleftcolor":[1],"iconright":[1],"iconrightcolor":[1],"inputicon":[1],"inputiconcolor":[1],"inline":[4],"inputautocapitalize":[1],"inputautofocus":[4],"inputkeyhint":[1],"inputindex":[8],"inputtitle":[1],"autocomplete":[1],"checked":[4],"disabled":[4],"max":[8],"maxlength":[8],"min":[8],"minlength":[8],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[8],"required":[4],"step":[8],"type":[1],"value":[1032]}]]],["tttx-button.cjs",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"iconcolor":[1025],"design":[1]}]]]], options);
17
+ return index.bootstrapLazy([["tttx-multiselect-box.cjs",[[1,"tttx-multiselect-box",{"optionsData":[1,"options-data"],"label":[1],"inline":[4],"placeholder":[1],"searchEnabled":[4,"search-enabled"],"htmlVisibleValue":[4,"html-visible-value"],"visibleValue":[1,"visible-value"],"open":[32],"unsavedSelectedItems":[32],"searchTerm":[32]},[[0,"closeSelectBox","handleCloseSelectBox"],[0,"blur","handleBlur"]]]]],["tttx-dialog-box.cjs",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"open":[1028],"allowOverflow":[4,"allow-overflow"],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-select-box.cjs",[[1,"tttx-select-box",{"optionsData":[1,"options-data"],"label":[1],"inline":[4],"placeholder":[1],"searchEnabled":[4,"search-enabled"],"selectedValue":[1,"selected-value"],"open":[32],"selectedItem":[32],"searchTerm":[32]},[[0,"closeSelectBox","handleCloseSelectBox"],[0,"blur","handleBlur"]]]]],["tttx-tree-view.cjs",[[1,"tttx-tree-view",{"data":[1040],"treeData":[32]}]]],["tttx-filter.cjs",[[1,"tttx-filter",{"filterKey":[1,"filter-key"],"filterOptions":[1,"filter-options"],"showSelectAll":[4,"show-select-all"],"showSearchField":[4,"show-search-field"],"showOptionIcons":[4,"show-option-icons"],"filterButtonStyle":[1,"filter-button-style"],"filterHeader":[1,"filter-header"],"defaultFilterOptions":[1,"default-filter-options"],"popoverWidth":[1,"popover-width"],"showPopover":[32],"displayedFilterSettings":[32],"selectedFilters":[32],"filterSearchTerm":[32],"allSelected":[32]},[[0,"closeFilter","handleCloseFilter"]]]]],["tttx-list.cjs",[[1,"tttx-list",{"data":[1025],"name":[1],"_data":[32]}]]],["tttx-sorter.cjs",[[1,"tttx-sorter",{"sorterKey":[1,"sorter-key"],"defaultSortDirection":[1,"default-sort-direction"],"fieldOptionsData":[1,"field-options-data"],"defaultOption":[1,"default-option"],"selectedField":[32],"sortDirection":[32],"dropdownExpand":[32],"dropdownOptions":[32]},[[0,"closeSorter","handleCloseSorter"]]]]],["tttx-tabs.cjs",[[2,"tttx-tabs",{"tabsName":[1,"tabs-name"],"navigation":[4],"wide":[4],"tabs":[1],"_tabs":[32]},[[0,"keydown","handleKeyDown"]]]]],["tttx-form.cjs",[[1,"tttx-form",{"formschema":[1025],"data":[1032],"submit":[64]}]]],["tttx-keyvalue-block.cjs",[[1,"tttx-keyvalue-block",{"keyvalues":[1],"horizontal":[4],"spacedout":[4],"_elements":[32]}]]],["tttx-loading-spinner.cjs",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-qrcode.cjs",[[1,"tttx-qrcode",{"link":[1025],"size":[1026]}]]],["tttx-tag.cjs",[[1,"tttx-tag",{"text":[1],"color":[1]}]]],["tttx-textarea.cjs",[[2,"tttx-textarea",{"label":[1],"secondarylabel":[1],"showerrormsg":[4],"showerrorbubble":[4],"errormsg":[1],"rows":[2],"textareaautofocus":[4],"inputkeyhint":[1],"inputindex":[8],"inputtitle":[1],"disabled":[4],"maxlength":[8],"name":[1],"placeholder":[1],"readonly":[8],"required":[4],"value":[1032]}]]],["tttx-toolbar.cjs",[[1,"tttx-toolbar",{"border":[4],"viewSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-icon.cjs",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]],["tttx-standalone-input.cjs",[[2,"tttx-standalone-input",{"label":[1],"secondarylabel":[1],"showerrormsg":[4],"showerrorbubble":[4],"errormsg":[1],"iconleft":[1],"iconleftcolor":[1],"iconright":[1],"iconrightcolor":[1],"inputicon":[1],"inputiconcolor":[1],"inline":[4],"inputautocapitalize":[1],"inputautofocus":[4],"inputkeyhint":[1],"inputindex":[8],"inputtitle":[1],"autocomplete":[1],"checked":[4],"disabled":[4],"max":[8],"maxlength":[8],"min":[8],"minlength":[8],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[8],"required":[4],"step":[8],"type":[1],"value":[1032]}]]],["tttx-button.cjs",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"iconcolor":[1025],"design":[1]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -72,10 +72,13 @@ const TttxMultiselectBox = class {
72
72
  }
73
73
  return index.h("div", null, this.visibleValue);
74
74
  }
75
+ optionFoundInSearchTerm(option) {
76
+ return option.label.toLowerCase().indexOf(this.searchTerm.toLowerCase()) === -1;
77
+ }
75
78
  dropdownOption(option) {
76
79
  // This is tested in e2e tests
77
80
  /* istanbul ignore next */
78
- const hideOption = this.searchEnabled && option.label.toLowerCase().indexOf(this.searchTerm.toLowerCase()) === -1;
81
+ const hideOption = this.searchEnabled && this.optionFoundInSearchTerm(option);
79
82
  const checkboxIcon = option.selected ? 'check_box' : 'check_box_outline_blank';
80
83
  const checkboxColor = option.selected ? 'blue' : 'grey';
81
84
  if (option.html) {
@@ -102,7 +105,7 @@ const TttxMultiselectBox = class {
102
105
  if (this.searchEnabled)
103
106
  dropdownMenuMaxHeight += 52;
104
107
  if (bottomPosY + dropdownMenuMaxHeight > window.innerHeight) {
105
- this.bodyOffset = { bottom: '16px', position: 'fixed', width: `${dropdownSelector.offsetWidth}px` };
108
+ this.bodyOffset = { top: `${window.innerHeight - (dropdownMenuMaxHeight + 16)}px`, position: 'fixed', width: `${dropdownSelector.offsetWidth}px` };
106
109
  }
107
110
  else {
108
111
  this.bodyOffset = {};
@@ -0,0 +1,59 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-4cfa8e25.js');
6
+
7
+ const tttxTextareaCss = ".material-symbols-rounded.sc-tttx-textarea{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.sc-tttx-textarea-h{display:block}.textarea-container.sc-tttx-textarea{position:relative}textarea.sc-tttx-textarea{font-family:\"Roboto\", serif;box-sizing:border-box;width:100%;padding:9px 16px;font-size:16px;line-height:19px;border:1px solid #d5d5d5;border-radius:4px;margin-top:8px;resize:none}textarea.no-label.sc-tttx-textarea{margin-top:0}textarea.sc-tttx-textarea~.errorBubble.sc-tttx-textarea{font-size:14px;line-height:16px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center;margin-top:4px}textarea.sc-tttx-textarea~.errorBubble.sc-tttx-textarea:not(.visible){display:none}textarea.sc-tttx-textarea~.errorBubble.sc-tttx-textarea span.sc-tttx-textarea{color:#dc0000;font-size:16px;margin-right:4px}.secondarylabel.sc-tttx-textarea{color:#757575;font-size:14px;line-height:16px;font-weight:normal;display:flex;margin-top:4px}.optional.sc-tttx-textarea{color:#757575;font-weight:normal}";
8
+
9
+ const TttxTextarea = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this.valueChanged = index.createEvent(this, "valueChanged", 7);
13
+ this.focusChanged = index.createEvent(this, "focusChanged", 7);
14
+ this.blurChanged = index.createEvent(this, "blurChanged", 7);
15
+ this.invalidChanged = index.createEvent(this, "invalidChanged", 7);
16
+ this.label = undefined;
17
+ this.secondarylabel = undefined;
18
+ this.showerrormsg = undefined;
19
+ this.showerrorbubble = true;
20
+ this.errormsg = undefined;
21
+ this.rows = undefined;
22
+ this.textareaautofocus = undefined;
23
+ this.inputkeyhint = undefined;
24
+ this.inputindex = undefined;
25
+ this.inputtitle = undefined;
26
+ this.disabled = undefined;
27
+ this.maxlength = undefined;
28
+ this.name = undefined;
29
+ this.placeholder = undefined;
30
+ this.readonly = undefined;
31
+ this.required = undefined;
32
+ this.value = undefined;
33
+ }
34
+ handleChange(event) {
35
+ const target = event.target;
36
+ this.value = target.value;
37
+ this.valueChanged.emit(target.value);
38
+ }
39
+ handleFocus(event) {
40
+ const target = event.target;
41
+ this.focusChanged.emit(target.value);
42
+ }
43
+ handleBlur(event) {
44
+ const target = event.target;
45
+ this.blurChanged.emit(target.value);
46
+ }
47
+ handleInvalid(event) {
48
+ event.preventDefault();
49
+ const target = event.target;
50
+ this.invalidChanged.emit(target.value);
51
+ }
52
+ render() {
53
+ const classNames = [this.showerrormsg ? 'invalid' : '', !this.label && this.required ? 'no-label' : ''].join(' ');
54
+ return (index.h(index.Host, null, index.h("label", null, this.label, !this.required ? index.h("span", { class: "optional" }, "\u00A0(optional)") : '', index.h("div", { class: "textarea-container" }, index.h("textarea", { rows: this.rows, class: classNames, autofocus: this.textareaautofocus, enterkeyhint: this.inputkeyhint, tabindex: this.inputindex, title: this.inputtitle, disabled: this.disabled, maxlength: this.maxlength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, value: this.value, onBlur: this.handleBlur.bind(this), onFocus: this.handleFocus.bind(this), onInput: this.handleChange.bind(this), onInvalid: this.handleInvalid.bind(this) }), this.secondarylabel && index.h("span", { class: "secondarylabel" }, this.secondarylabel), this.showerrorbubble && (index.h("span", { class: ['errorBubble', this.showerrormsg && this.errormsg ? 'visible' : ''].join(' ') }, index.h("span", { class: "material-symbols-rounded validationicon" }, "warning"), " ", this.errormsg))))));
55
+ }
56
+ };
57
+ TttxTextarea.style = tttxTextareaCss;
58
+
59
+ exports.tttx_textarea = TttxTextarea;
@@ -17,7 +17,7 @@ const patchBrowser = () => {
17
17
  };
18
18
 
19
19
  patchBrowser().then(options => {
20
- return index.bootstrapLazy([["tttx-multiselect-box.cjs",[[1,"tttx-multiselect-box",{"optionsData":[1,"options-data"],"label":[1],"inline":[4],"placeholder":[1],"searchEnabled":[4,"search-enabled"],"htmlVisibleValue":[4,"html-visible-value"],"visibleValue":[1,"visible-value"],"open":[32],"unsavedSelectedItems":[32],"searchTerm":[32]},[[0,"closeSelectBox","handleCloseSelectBox"],[0,"blur","handleBlur"]]]]],["tttx-dialog-box.cjs",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"open":[1028],"allowOverflow":[4,"allow-overflow"],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-select-box.cjs",[[1,"tttx-select-box",{"optionsData":[1,"options-data"],"label":[1],"inline":[4],"placeholder":[1],"searchEnabled":[4,"search-enabled"],"selectedValue":[1,"selected-value"],"open":[32],"selectedItem":[32],"searchTerm":[32]},[[0,"closeSelectBox","handleCloseSelectBox"],[0,"blur","handleBlur"]]]]],["tttx-tree-view.cjs",[[1,"tttx-tree-view",{"data":[1040],"treeData":[32]}]]],["tttx-filter.cjs",[[1,"tttx-filter",{"filterKey":[1,"filter-key"],"filterOptions":[1,"filter-options"],"showSelectAll":[4,"show-select-all"],"showSearchField":[4,"show-search-field"],"showOptionIcons":[4,"show-option-icons"],"filterButtonStyle":[1,"filter-button-style"],"filterHeader":[1,"filter-header"],"defaultFilterOptions":[1,"default-filter-options"],"popoverWidth":[1,"popover-width"],"showPopover":[32],"displayedFilterSettings":[32],"selectedFilters":[32],"filterSearchTerm":[32],"allSelected":[32]},[[0,"closeFilter","handleCloseFilter"]]]]],["tttx-list.cjs",[[1,"tttx-list",{"data":[1025],"name":[1],"_data":[32]}]]],["tttx-sorter.cjs",[[1,"tttx-sorter",{"sorterKey":[1,"sorter-key"],"defaultSortDirection":[1,"default-sort-direction"],"fieldOptionsData":[1,"field-options-data"],"defaultOption":[1,"default-option"],"selectedField":[32],"sortDirection":[32],"dropdownExpand":[32],"dropdownOptions":[32]},[[0,"closeSorter","handleCloseSorter"]]]]],["tttx-tabs.cjs",[[2,"tttx-tabs",{"tabsName":[1,"tabs-name"],"navigation":[4],"wide":[4],"tabs":[1],"_tabs":[32]},[[0,"keydown","handleKeyDown"]]]]],["tttx-form.cjs",[[1,"tttx-form",{"formschema":[1025],"data":[1032],"submit":[64]}]]],["tttx-keyvalue-block.cjs",[[1,"tttx-keyvalue-block",{"keyvalues":[1],"horizontal":[4],"spacedout":[4],"_elements":[32]}]]],["tttx-loading-spinner.cjs",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-qrcode.cjs",[[1,"tttx-qrcode",{"link":[1025],"size":[1026]}]]],["tttx-tag.cjs",[[1,"tttx-tag",{"text":[1],"color":[1]}]]],["tttx-toolbar.cjs",[[1,"tttx-toolbar",{"border":[4],"viewSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-icon.cjs",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]],["tttx-standalone-input.cjs",[[2,"tttx-standalone-input",{"label":[1],"secondarylabel":[1],"showerrormsg":[4],"showerrorbubble":[4],"errormsg":[1],"iconleft":[1],"iconleftcolor":[1],"iconright":[1],"iconrightcolor":[1],"inputicon":[1],"inputiconcolor":[1],"inline":[4],"inputautocapitalize":[1],"inputautofocus":[4],"inputkeyhint":[1],"inputindex":[8],"inputtitle":[1],"autocomplete":[1],"checked":[4],"disabled":[4],"max":[8],"maxlength":[8],"min":[8],"minlength":[8],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[8],"required":[4],"step":[8],"type":[1],"value":[1032]}]]],["tttx-button.cjs",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"iconcolor":[1025],"design":[1]}]]]], options);
20
+ return index.bootstrapLazy([["tttx-multiselect-box.cjs",[[1,"tttx-multiselect-box",{"optionsData":[1,"options-data"],"label":[1],"inline":[4],"placeholder":[1],"searchEnabled":[4,"search-enabled"],"htmlVisibleValue":[4,"html-visible-value"],"visibleValue":[1,"visible-value"],"open":[32],"unsavedSelectedItems":[32],"searchTerm":[32]},[[0,"closeSelectBox","handleCloseSelectBox"],[0,"blur","handleBlur"]]]]],["tttx-dialog-box.cjs",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"open":[1028],"allowOverflow":[4,"allow-overflow"],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-select-box.cjs",[[1,"tttx-select-box",{"optionsData":[1,"options-data"],"label":[1],"inline":[4],"placeholder":[1],"searchEnabled":[4,"search-enabled"],"selectedValue":[1,"selected-value"],"open":[32],"selectedItem":[32],"searchTerm":[32]},[[0,"closeSelectBox","handleCloseSelectBox"],[0,"blur","handleBlur"]]]]],["tttx-tree-view.cjs",[[1,"tttx-tree-view",{"data":[1040],"treeData":[32]}]]],["tttx-filter.cjs",[[1,"tttx-filter",{"filterKey":[1,"filter-key"],"filterOptions":[1,"filter-options"],"showSelectAll":[4,"show-select-all"],"showSearchField":[4,"show-search-field"],"showOptionIcons":[4,"show-option-icons"],"filterButtonStyle":[1,"filter-button-style"],"filterHeader":[1,"filter-header"],"defaultFilterOptions":[1,"default-filter-options"],"popoverWidth":[1,"popover-width"],"showPopover":[32],"displayedFilterSettings":[32],"selectedFilters":[32],"filterSearchTerm":[32],"allSelected":[32]},[[0,"closeFilter","handleCloseFilter"]]]]],["tttx-list.cjs",[[1,"tttx-list",{"data":[1025],"name":[1],"_data":[32]}]]],["tttx-sorter.cjs",[[1,"tttx-sorter",{"sorterKey":[1,"sorter-key"],"defaultSortDirection":[1,"default-sort-direction"],"fieldOptionsData":[1,"field-options-data"],"defaultOption":[1,"default-option"],"selectedField":[32],"sortDirection":[32],"dropdownExpand":[32],"dropdownOptions":[32]},[[0,"closeSorter","handleCloseSorter"]]]]],["tttx-tabs.cjs",[[2,"tttx-tabs",{"tabsName":[1,"tabs-name"],"navigation":[4],"wide":[4],"tabs":[1],"_tabs":[32]},[[0,"keydown","handleKeyDown"]]]]],["tttx-form.cjs",[[1,"tttx-form",{"formschema":[1025],"data":[1032],"submit":[64]}]]],["tttx-keyvalue-block.cjs",[[1,"tttx-keyvalue-block",{"keyvalues":[1],"horizontal":[4],"spacedout":[4],"_elements":[32]}]]],["tttx-loading-spinner.cjs",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-qrcode.cjs",[[1,"tttx-qrcode",{"link":[1025],"size":[1026]}]]],["tttx-tag.cjs",[[1,"tttx-tag",{"text":[1],"color":[1]}]]],["tttx-textarea.cjs",[[2,"tttx-textarea",{"label":[1],"secondarylabel":[1],"showerrormsg":[4],"showerrorbubble":[4],"errormsg":[1],"rows":[2],"textareaautofocus":[4],"inputkeyhint":[1],"inputindex":[8],"inputtitle":[1],"disabled":[4],"maxlength":[8],"name":[1],"placeholder":[1],"readonly":[8],"required":[4],"value":[1032]}]]],["tttx-toolbar.cjs",[[1,"tttx-toolbar",{"border":[4],"viewSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-icon.cjs",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]],["tttx-standalone-input.cjs",[[2,"tttx-standalone-input",{"label":[1],"secondarylabel":[1],"showerrormsg":[4],"showerrorbubble":[4],"errormsg":[1],"iconleft":[1],"iconleftcolor":[1],"iconright":[1],"iconrightcolor":[1],"inputicon":[1],"inputiconcolor":[1],"inline":[4],"inputautocapitalize":[1],"inputautofocus":[4],"inputkeyhint":[1],"inputindex":[8],"inputtitle":[1],"autocomplete":[1],"checked":[4],"disabled":[4],"max":[8],"maxlength":[8],"min":[8],"minlength":[8],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[8],"required":[4],"step":[8],"type":[1],"value":[1032]}]]],["tttx-button.cjs",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"iconcolor":[1025],"design":[1]}]]]], options);
21
21
  });
22
22
 
23
23
  exports.setNonce = index.setNonce;
@@ -15,6 +15,7 @@
15
15
  "./components/molecules/tttx-select-box/tttx-select-box.js",
16
16
  "./components/molecules/tttx-sorter/tttx-sorter.js",
17
17
  "./components/molecules/tttx-tabs/tttx-tabs.js",
18
+ "./components/molecules/tttx-textarea/tttx-textarea.js",
18
19
  "./components/molecules/tttx-toolbar/tttx-toolbar.js",
19
20
  "./components/molecules/tttx-tree-view/tttx-tree-view.js"
20
21
  ],
@@ -62,10 +62,13 @@ export class TttxMultiselectBox {
62
62
  }
63
63
  return h("div", null, this.visibleValue);
64
64
  }
65
+ optionFoundInSearchTerm(option) {
66
+ return option.label.toLowerCase().indexOf(this.searchTerm.toLowerCase()) === -1;
67
+ }
65
68
  dropdownOption(option) {
66
69
  // This is tested in e2e tests
67
70
  /* istanbul ignore next */
68
- const hideOption = this.searchEnabled && option.label.toLowerCase().indexOf(this.searchTerm.toLowerCase()) === -1;
71
+ const hideOption = this.searchEnabled && this.optionFoundInSearchTerm(option);
69
72
  const checkboxIcon = option.selected ? 'check_box' : 'check_box_outline_blank';
70
73
  const checkboxColor = option.selected ? 'blue' : 'grey';
71
74
  if (option.html) {
@@ -92,7 +95,7 @@ export class TttxMultiselectBox {
92
95
  if (this.searchEnabled)
93
96
  dropdownMenuMaxHeight += 52;
94
97
  if (bottomPosY + dropdownMenuMaxHeight > window.innerHeight) {
95
- this.bodyOffset = { bottom: '16px', position: 'fixed', width: `${dropdownSelector.offsetWidth}px` };
98
+ this.bodyOffset = { top: `${window.innerHeight - (dropdownMenuMaxHeight + 16)}px`, position: 'fixed', width: `${dropdownSelector.offsetWidth}px` };
96
99
  }
97
100
  else {
98
101
  this.bodyOffset = {};
@@ -0,0 +1,62 @@
1
+ .material-symbols-rounded {
2
+ font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
3
+ }
4
+
5
+ :host {
6
+ display: block;
7
+ }
8
+
9
+ .textarea-container {
10
+ position: relative;
11
+ }
12
+
13
+ textarea {
14
+ font-family: "Roboto", serif;
15
+ box-sizing: border-box;
16
+ width: 100%;
17
+ padding: 9px 16px;
18
+ font-size: 16px;
19
+ line-height: 19px;
20
+ border: 1px solid #d5d5d5;
21
+ border-radius: 4px;
22
+ margin-top: 8px;
23
+ resize: none;
24
+ }
25
+ textarea.no-label {
26
+ margin-top: 0;
27
+ }
28
+ textarea ~ .errorBubble {
29
+ font-size: 14px;
30
+ line-height: 16px;
31
+ font-weight: normal;
32
+ width: 100%;
33
+ font-family: "Roboto", sans-serif;
34
+ color: #dc0000;
35
+ display: flex;
36
+ align-content: center;
37
+ align-items: center;
38
+ justify-items: center;
39
+ margin-top: 4px;
40
+ }
41
+ textarea ~ .errorBubble:not(.visible) {
42
+ display: none;
43
+ }
44
+ textarea ~ .errorBubble span {
45
+ color: #dc0000;
46
+ font-size: 16px;
47
+ margin-right: 4px;
48
+ }
49
+
50
+ .secondarylabel {
51
+ color: #757575;
52
+ font-size: 14px;
53
+ line-height: 16px;
54
+ font-weight: normal;
55
+ display: flex;
56
+ margin-top: 4px;
57
+ }
58
+
59
+ .optional {
60
+ color: #757575;
61
+ font-weight: normal;
62
+ }
@@ -0,0 +1,420 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Host, h } from '@stencil/core';
3
+ export class TttxTextarea {
4
+ constructor() {
5
+ this.label = undefined;
6
+ this.secondarylabel = undefined;
7
+ this.showerrormsg = undefined;
8
+ this.showerrorbubble = true;
9
+ this.errormsg = undefined;
10
+ this.rows = undefined;
11
+ this.textareaautofocus = undefined;
12
+ this.inputkeyhint = undefined;
13
+ this.inputindex = undefined;
14
+ this.inputtitle = undefined;
15
+ this.disabled = undefined;
16
+ this.maxlength = undefined;
17
+ this.name = undefined;
18
+ this.placeholder = undefined;
19
+ this.readonly = undefined;
20
+ this.required = undefined;
21
+ this.value = undefined;
22
+ }
23
+ handleChange(event) {
24
+ const target = event.target;
25
+ this.value = target.value;
26
+ this.valueChanged.emit(target.value);
27
+ }
28
+ handleFocus(event) {
29
+ const target = event.target;
30
+ this.focusChanged.emit(target.value);
31
+ }
32
+ handleBlur(event) {
33
+ const target = event.target;
34
+ this.blurChanged.emit(target.value);
35
+ }
36
+ handleInvalid(event) {
37
+ event.preventDefault();
38
+ const target = event.target;
39
+ this.invalidChanged.emit(target.value);
40
+ }
41
+ render() {
42
+ const classNames = [this.showerrormsg ? 'invalid' : '', !this.label && this.required ? 'no-label' : ''].join(' ');
43
+ return (h(Host, null, h("label", null, this.label, !this.required ? h("span", { class: "optional" }, "\u00A0(optional)") : '', h("div", { class: "textarea-container" }, h("textarea", { rows: this.rows, class: classNames, autofocus: this.textareaautofocus, enterkeyhint: this.inputkeyhint, tabindex: this.inputindex, title: this.inputtitle, disabled: this.disabled, maxlength: this.maxlength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, value: this.value, onBlur: this.handleBlur.bind(this), onFocus: this.handleFocus.bind(this), onInput: this.handleChange.bind(this), onInvalid: this.handleInvalid.bind(this) }), this.secondarylabel && h("span", { class: "secondarylabel" }, this.secondarylabel), this.showerrorbubble && (h("span", { class: ['errorBubble', this.showerrormsg && this.errormsg ? 'visible' : ''].join(' ') }, h("span", { class: "material-symbols-rounded validationicon" }, "warning"), " ", this.errormsg))))));
44
+ }
45
+ static get is() { return "tttx-textarea"; }
46
+ static get encapsulation() { return "scoped"; }
47
+ static get originalStyleUrls() {
48
+ return {
49
+ "$": ["./tttx-textarea.scss"]
50
+ };
51
+ }
52
+ static get styleUrls() {
53
+ return {
54
+ "$": ["tttx-textarea.css"]
55
+ };
56
+ }
57
+ static get properties() {
58
+ return {
59
+ "label": {
60
+ "type": "string",
61
+ "mutable": false,
62
+ "complexType": {
63
+ "original": "string",
64
+ "resolved": "string",
65
+ "references": {}
66
+ },
67
+ "required": false,
68
+ "optional": false,
69
+ "docs": {
70
+ "tags": [],
71
+ "text": ""
72
+ },
73
+ "attribute": "label",
74
+ "reflect": false
75
+ },
76
+ "secondarylabel": {
77
+ "type": "string",
78
+ "mutable": false,
79
+ "complexType": {
80
+ "original": "string",
81
+ "resolved": "string",
82
+ "references": {}
83
+ },
84
+ "required": false,
85
+ "optional": false,
86
+ "docs": {
87
+ "tags": [],
88
+ "text": "Footnote under the input field"
89
+ },
90
+ "attribute": "secondarylabel",
91
+ "reflect": false
92
+ },
93
+ "showerrormsg": {
94
+ "type": "boolean",
95
+ "mutable": false,
96
+ "complexType": {
97
+ "original": "boolean",
98
+ "resolved": "boolean",
99
+ "references": {}
100
+ },
101
+ "required": false,
102
+ "optional": false,
103
+ "docs": {
104
+ "tags": [],
105
+ "text": ""
106
+ },
107
+ "attribute": "showerrormsg",
108
+ "reflect": false
109
+ },
110
+ "showerrorbubble": {
111
+ "type": "boolean",
112
+ "mutable": false,
113
+ "complexType": {
114
+ "original": "boolean",
115
+ "resolved": "boolean",
116
+ "references": {}
117
+ },
118
+ "required": false,
119
+ "optional": false,
120
+ "docs": {
121
+ "tags": [],
122
+ "text": ""
123
+ },
124
+ "attribute": "showerrorbubble",
125
+ "reflect": false,
126
+ "defaultValue": "true"
127
+ },
128
+ "errormsg": {
129
+ "type": "string",
130
+ "mutable": false,
131
+ "complexType": {
132
+ "original": "string",
133
+ "resolved": "string",
134
+ "references": {}
135
+ },
136
+ "required": false,
137
+ "optional": false,
138
+ "docs": {
139
+ "tags": [],
140
+ "text": ""
141
+ },
142
+ "attribute": "errormsg",
143
+ "reflect": false
144
+ },
145
+ "rows": {
146
+ "type": "number",
147
+ "mutable": false,
148
+ "complexType": {
149
+ "original": "number",
150
+ "resolved": "number",
151
+ "references": {}
152
+ },
153
+ "required": false,
154
+ "optional": false,
155
+ "docs": {
156
+ "tags": [],
157
+ "text": ""
158
+ },
159
+ "attribute": "rows",
160
+ "reflect": false
161
+ },
162
+ "textareaautofocus": {
163
+ "type": "boolean",
164
+ "mutable": false,
165
+ "complexType": {
166
+ "original": "boolean",
167
+ "resolved": "boolean",
168
+ "references": {}
169
+ },
170
+ "required": false,
171
+ "optional": false,
172
+ "docs": {
173
+ "tags": [],
174
+ "text": ""
175
+ },
176
+ "attribute": "textareaautofocus",
177
+ "reflect": false
178
+ },
179
+ "inputkeyhint": {
180
+ "type": "string",
181
+ "mutable": false,
182
+ "complexType": {
183
+ "original": "'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'",
184
+ "resolved": "\"done\" | \"enter\" | \"go\" | \"next\" | \"previous\" | \"search\" | \"send\"",
185
+ "references": {}
186
+ },
187
+ "required": false,
188
+ "optional": false,
189
+ "docs": {
190
+ "tags": [],
191
+ "text": "Defines what action to present for the enter key on virtual keyboards"
192
+ },
193
+ "attribute": "inputkeyhint",
194
+ "reflect": false
195
+ },
196
+ "inputindex": {
197
+ "type": "any",
198
+ "mutable": false,
199
+ "complexType": {
200
+ "original": "string | number",
201
+ "resolved": "number | string",
202
+ "references": {}
203
+ },
204
+ "required": false,
205
+ "optional": false,
206
+ "docs": {
207
+ "tags": [{
208
+ "name": "example",
209
+ "text": "<caption>In HTML (like `index.html`)</caption>\n<tttx-textarea input-index=\"1\" />"
210
+ }, {
211
+ "name": "example",
212
+ "text": "<caption>In TSX files</caption>\n<tttx-textarea inputindex={1} />"
213
+ }],
214
+ "text": "tabindex - Allows the HTML elements to be focusable"
215
+ },
216
+ "attribute": "inputindex",
217
+ "reflect": false
218
+ },
219
+ "inputtitle": {
220
+ "type": "string",
221
+ "mutable": false,
222
+ "complexType": {
223
+ "original": "string",
224
+ "resolved": "string",
225
+ "references": {}
226
+ },
227
+ "required": false,
228
+ "optional": false,
229
+ "docs": {
230
+ "tags": [],
231
+ "text": ""
232
+ },
233
+ "attribute": "inputtitle",
234
+ "reflect": false
235
+ },
236
+ "disabled": {
237
+ "type": "boolean",
238
+ "mutable": false,
239
+ "complexType": {
240
+ "original": "boolean",
241
+ "resolved": "boolean",
242
+ "references": {}
243
+ },
244
+ "required": false,
245
+ "optional": false,
246
+ "docs": {
247
+ "tags": [],
248
+ "text": ""
249
+ },
250
+ "attribute": "disabled",
251
+ "reflect": false
252
+ },
253
+ "maxlength": {
254
+ "type": "any",
255
+ "mutable": false,
256
+ "complexType": {
257
+ "original": "string | number",
258
+ "resolved": "number | string",
259
+ "references": {}
260
+ },
261
+ "required": false,
262
+ "optional": false,
263
+ "docs": {
264
+ "tags": [],
265
+ "text": ""
266
+ },
267
+ "attribute": "maxlength",
268
+ "reflect": false
269
+ },
270
+ "name": {
271
+ "type": "string",
272
+ "mutable": false,
273
+ "complexType": {
274
+ "original": "string",
275
+ "resolved": "string",
276
+ "references": {}
277
+ },
278
+ "required": false,
279
+ "optional": false,
280
+ "docs": {
281
+ "tags": [],
282
+ "text": ""
283
+ },
284
+ "attribute": "name",
285
+ "reflect": false
286
+ },
287
+ "placeholder": {
288
+ "type": "string",
289
+ "mutable": false,
290
+ "complexType": {
291
+ "original": "string",
292
+ "resolved": "string",
293
+ "references": {}
294
+ },
295
+ "required": false,
296
+ "optional": false,
297
+ "docs": {
298
+ "tags": [],
299
+ "text": ""
300
+ },
301
+ "attribute": "placeholder",
302
+ "reflect": false
303
+ },
304
+ "readonly": {
305
+ "type": "any",
306
+ "mutable": false,
307
+ "complexType": {
308
+ "original": "string | boolean",
309
+ "resolved": "boolean | string",
310
+ "references": {}
311
+ },
312
+ "required": false,
313
+ "optional": false,
314
+ "docs": {
315
+ "tags": [],
316
+ "text": ""
317
+ },
318
+ "attribute": "readonly",
319
+ "reflect": false
320
+ },
321
+ "required": {
322
+ "type": "boolean",
323
+ "mutable": false,
324
+ "complexType": {
325
+ "original": "boolean",
326
+ "resolved": "boolean",
327
+ "references": {}
328
+ },
329
+ "required": false,
330
+ "optional": false,
331
+ "docs": {
332
+ "tags": [],
333
+ "text": ""
334
+ },
335
+ "attribute": "required",
336
+ "reflect": false
337
+ },
338
+ "value": {
339
+ "type": "any",
340
+ "mutable": true,
341
+ "complexType": {
342
+ "original": "string | number",
343
+ "resolved": "number | string",
344
+ "references": {}
345
+ },
346
+ "required": false,
347
+ "optional": false,
348
+ "docs": {
349
+ "tags": [],
350
+ "text": ""
351
+ },
352
+ "attribute": "value",
353
+ "reflect": false
354
+ }
355
+ };
356
+ }
357
+ static get events() {
358
+ return [{
359
+ "method": "valueChanged",
360
+ "name": "valueChanged",
361
+ "bubbles": true,
362
+ "cancelable": true,
363
+ "composed": true,
364
+ "docs": {
365
+ "tags": [],
366
+ "text": ""
367
+ },
368
+ "complexType": {
369
+ "original": "string",
370
+ "resolved": "string",
371
+ "references": {}
372
+ }
373
+ }, {
374
+ "method": "focusChanged",
375
+ "name": "focusChanged",
376
+ "bubbles": true,
377
+ "cancelable": true,
378
+ "composed": true,
379
+ "docs": {
380
+ "tags": [],
381
+ "text": ""
382
+ },
383
+ "complexType": {
384
+ "original": "string",
385
+ "resolved": "string",
386
+ "references": {}
387
+ }
388
+ }, {
389
+ "method": "blurChanged",
390
+ "name": "blurChanged",
391
+ "bubbles": true,
392
+ "cancelable": true,
393
+ "composed": true,
394
+ "docs": {
395
+ "tags": [],
396
+ "text": ""
397
+ },
398
+ "complexType": {
399
+ "original": "string",
400
+ "resolved": "string",
401
+ "references": {}
402
+ }
403
+ }, {
404
+ "method": "invalidChanged",
405
+ "name": "invalidChanged",
406
+ "bubbles": true,
407
+ "cancelable": true,
408
+ "composed": true,
409
+ "docs": {
410
+ "tags": [],
411
+ "text": ""
412
+ },
413
+ "complexType": {
414
+ "original": "string",
415
+ "resolved": "string",
416
+ "references": {}
417
+ }
418
+ }];
419
+ }
420
+ }