@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
@@ -0,0 +1,107 @@
1
+ export default {
2
+ title: 'Molecules/Textarea',
3
+ component: 'tttx-textarea',
4
+ argTypes: {
5
+ label: {
6
+ control: { type: 'text' },
7
+ },
8
+ secondarylabel: {
9
+ control: { type: 'text' },
10
+ },
11
+ errormsg: {
12
+ control: { type: 'text' },
13
+ },
14
+ showerrorbubble: {
15
+ control: { type: 'boolean' },
16
+ },
17
+ showerrormsg: {
18
+ control: { type: 'boolean' },
19
+ },
20
+ disabled: {
21
+ control: { type: 'boolean' },
22
+ },
23
+ maxlength: {
24
+ control: { type: 'text' },
25
+ },
26
+ minlength: {
27
+ control: { type: 'text' },
28
+ },
29
+ name: {
30
+ control: { type: 'text' },
31
+ },
32
+ pattern: {
33
+ control: { type: 'text' },
34
+ },
35
+ placeholder: {
36
+ control: { type: 'text' },
37
+ },
38
+ readonly: {
39
+ control: { type: 'boolean' },
40
+ },
41
+ required: {
42
+ control: { type: 'boolean' },
43
+ },
44
+ resize: {
45
+ control: { type: 'boolean' },
46
+ },
47
+ rows: {
48
+ control: { type: 'number' },
49
+ },
50
+ value: {
51
+ control: { type: 'text' },
52
+ },
53
+ },
54
+ };
55
+ const TemplateTextarea = ({ iconleft, iconleftcolor, iconright, iconrightcolor, inputicon, inputiconcolor, label, secondarylabel, errormsg, showerrorbubble, showerrormsg, disabled, maxlength, minlength, name, pattern, placeholder, readonly, required, resize = false, rows, type, value, }) => `
56
+ <tttx-textarea
57
+ iconleft="${iconleft || ''}"
58
+ iconleftcolor="${iconleftcolor || ''}"
59
+ iconright="${iconright || ''}"
60
+ iconrightcolor="${iconrightcolor || ''}"
61
+ inputicon="${inputicon || ''}"
62
+ inputiconcolor="${inputiconcolor || ''}"
63
+ label="${label}"
64
+ ${secondarylabel ? `secondarylabel="${secondarylabel}"` : ''}
65
+ errormsg="${errormsg}"
66
+ showerrorbubble="${showerrorbubble === false ? 'false' : 'true'}"
67
+ ${showerrormsg ? 'showerrormsg' : ''}
68
+ ${disabled ? 'disabled' : ''}
69
+ ${maxlength ? `maxlength=${maxlength}` : ''}
70
+ ${minlength ? `minlength=${minlength}` : ''}
71
+ ${name ? `name=${name}` : ''}
72
+ ${pattern ? `pattern=${pattern}` : ''}
73
+ ${placeholder ? `placeholder="${placeholder}"` : ''}
74
+ ${readonly ? 'readonly' : ''}
75
+ ${required ? 'required' : ''}
76
+ rows=${rows}
77
+ ${resize ? 'resize' : ''}
78
+ type="${type}"
79
+ value="${value}"
80
+
81
+ />
82
+ `;
83
+ export const Textarea = TemplateTextarea.bind({});
84
+ Textarea.args = {
85
+ value: '',
86
+ label: 'First name',
87
+ secondarylabel: 'First name can be up to 100 characters long',
88
+ maxlength: '100',
89
+ type: 'text',
90
+ errormsg: 'Please enter your first name',
91
+ required: false,
92
+ showerrormsg: false,
93
+ placeholder: 'Enter first name',
94
+ };
95
+ export const ResizableTextarea = TemplateTextarea.bind({});
96
+ ResizableTextarea.args = {
97
+ value: '',
98
+ label: 'First name',
99
+ secondarylabel: 'First name can be up to 100 characters long',
100
+ maxlength: '100',
101
+ type: 'text',
102
+ errormsg: 'Please enter your first name',
103
+ required: false,
104
+ showerrormsg: false,
105
+ placeholder: 'Enter first name',
106
+ resize: true
107
+ };
@@ -14,6 +14,7 @@ export { TttxSorter as TttxSorter } from '../types/components/molecules/tttx-sor
14
14
  export { TttxInput as TttxStandaloneInput } from '../types/components/molecules/tttx-standalone-input/tttx-standalone-input';
15
15
  export { TttxTabs as TttxTabs } from '../types/components/molecules/tttx-tabs/tttx-tabs';
16
16
  export { TttxTag as TttxTag } from '../types/components/atoms/tttx-tag/tttx-tag';
17
+ export { TttxTextarea as TttxTextarea } from '../types/components/molecules/tttx-textarea/tttx-textarea';
17
18
  export { TttxToolbar as TttxToolbar } from '../types/components/molecules/tttx-toolbar/tttx-toolbar';
18
19
  export { TttxTreeView as TttxTreeView } from '../types/components/molecules/tttx-tree-view/tttx-tree-view';
19
20
 
@@ -14,5 +14,6 @@ export { TttxSorter, defineCustomElement as defineCustomElementTttxSorter } from
14
14
  export { TttxStandaloneInput, defineCustomElement as defineCustomElementTttxStandaloneInput } from './tttx-standalone-input.js';
15
15
  export { TttxTabs, defineCustomElement as defineCustomElementTttxTabs } from './tttx-tabs.js';
16
16
  export { TttxTag, defineCustomElement as defineCustomElementTttxTag } from './tttx-tag.js';
17
+ export { TttxTextarea, defineCustomElement as defineCustomElementTttxTextarea } from './tttx-textarea.js';
17
18
  export { TttxToolbar, defineCustomElement as defineCustomElementTttxToolbar } from './tttx-toolbar.js';
18
19
  export { TttxTreeView, defineCustomElement as defineCustomElementTttxTreeView } from './tttx-tree-view.js';
@@ -72,10 +72,13 @@ const TttxMultiselectBox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
72
72
  }
73
73
  return 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$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
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,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface TttxTextarea extends Components.TttxTextarea, HTMLElement {}
4
+ export const TttxTextarea: {
5
+ prototype: TttxTextarea;
6
+ new (): TttxTextarea;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,90 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+
3
+ 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}";
4
+
5
+ const TttxTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
+ constructor() {
7
+ super();
8
+ this.__registerHost();
9
+ this.valueChanged = createEvent(this, "valueChanged", 7);
10
+ this.focusChanged = createEvent(this, "focusChanged", 7);
11
+ this.blurChanged = createEvent(this, "blurChanged", 7);
12
+ this.invalidChanged = createEvent(this, "invalidChanged", 7);
13
+ this.label = undefined;
14
+ this.secondarylabel = undefined;
15
+ this.showerrormsg = undefined;
16
+ this.showerrorbubble = true;
17
+ this.errormsg = undefined;
18
+ this.rows = undefined;
19
+ this.textareaautofocus = undefined;
20
+ this.inputkeyhint = undefined;
21
+ this.inputindex = undefined;
22
+ this.inputtitle = undefined;
23
+ this.disabled = undefined;
24
+ this.maxlength = undefined;
25
+ this.name = undefined;
26
+ this.placeholder = undefined;
27
+ this.readonly = undefined;
28
+ this.required = undefined;
29
+ this.value = undefined;
30
+ }
31
+ handleChange(event) {
32
+ const target = event.target;
33
+ this.value = target.value;
34
+ this.valueChanged.emit(target.value);
35
+ }
36
+ handleFocus(event) {
37
+ const target = event.target;
38
+ this.focusChanged.emit(target.value);
39
+ }
40
+ handleBlur(event) {
41
+ const target = event.target;
42
+ this.blurChanged.emit(target.value);
43
+ }
44
+ handleInvalid(event) {
45
+ event.preventDefault();
46
+ const target = event.target;
47
+ this.invalidChanged.emit(target.value);
48
+ }
49
+ render() {
50
+ const classNames = [this.showerrormsg ? 'invalid' : '', !this.label && this.required ? 'no-label' : ''].join(' ');
51
+ 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))))));
52
+ }
53
+ static get style() { return tttxTextareaCss; }
54
+ }, [2, "tttx-textarea", {
55
+ "label": [1],
56
+ "secondarylabel": [1],
57
+ "showerrormsg": [4],
58
+ "showerrorbubble": [4],
59
+ "errormsg": [1],
60
+ "rows": [2],
61
+ "textareaautofocus": [4],
62
+ "inputkeyhint": [1],
63
+ "inputindex": [8],
64
+ "inputtitle": [1],
65
+ "disabled": [4],
66
+ "maxlength": [8],
67
+ "name": [1],
68
+ "placeholder": [1],
69
+ "readonly": [8],
70
+ "required": [4],
71
+ "value": [1032]
72
+ }]);
73
+ function defineCustomElement$1() {
74
+ if (typeof customElements === "undefined") {
75
+ return;
76
+ }
77
+ const components = ["tttx-textarea"];
78
+ components.forEach(tagName => { switch (tagName) {
79
+ case "tttx-textarea":
80
+ if (!customElements.get(tagName)) {
81
+ customElements.define(tagName, TttxTextarea$1);
82
+ }
83
+ break;
84
+ } });
85
+ }
86
+
87
+ const TttxTextarea = TttxTextarea$1;
88
+ const defineCustomElement = defineCustomElement$1;
89
+
90
+ export { TttxTextarea, defineCustomElement };
@@ -11,7 +11,7 @@ const patchEsm = () => {
11
11
  const defineCustomElements = (win, options) => {
12
12
  if (typeof window === 'undefined') return Promise.resolve();
13
13
  return patchEsm().then(() => {
14
- return bootstrapLazy([["tttx-multiselect-box",[[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",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"open":[1028],"allowOverflow":[4,"allow-overflow"],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-select-box",[[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",[[1,"tttx-tree-view",{"data":[1040],"treeData":[32]}]]],["tttx-filter",[[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",[[1,"tttx-list",{"data":[1025],"name":[1],"_data":[32]}]]],["tttx-sorter",[[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",[[2,"tttx-tabs",{"tabsName":[1,"tabs-name"],"navigation":[4],"wide":[4],"tabs":[1],"_tabs":[32]},[[0,"keydown","handleKeyDown"]]]]],["tttx-form",[[1,"tttx-form",{"formschema":[1025],"data":[1032],"submit":[64]}]]],["tttx-keyvalue-block",[[1,"tttx-keyvalue-block",{"keyvalues":[1],"horizontal":[4],"spacedout":[4],"_elements":[32]}]]],["tttx-loading-spinner",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-qrcode",[[1,"tttx-qrcode",{"link":[1025],"size":[1026]}]]],["tttx-tag",[[1,"tttx-tag",{"text":[1],"color":[1]}]]],["tttx-toolbar",[[1,"tttx-toolbar",{"border":[4],"viewSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-icon",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]],["tttx-standalone-input",[[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",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"iconcolor":[1025],"design":[1]}]]]], options);
14
+ return bootstrapLazy([["tttx-multiselect-box",[[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",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"open":[1028],"allowOverflow":[4,"allow-overflow"],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-select-box",[[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",[[1,"tttx-tree-view",{"data":[1040],"treeData":[32]}]]],["tttx-filter",[[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",[[1,"tttx-list",{"data":[1025],"name":[1],"_data":[32]}]]],["tttx-sorter",[[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",[[2,"tttx-tabs",{"tabsName":[1,"tabs-name"],"navigation":[4],"wide":[4],"tabs":[1],"_tabs":[32]},[[0,"keydown","handleKeyDown"]]]]],["tttx-form",[[1,"tttx-form",{"formschema":[1025],"data":[1032],"submit":[64]}]]],["tttx-keyvalue-block",[[1,"tttx-keyvalue-block",{"keyvalues":[1],"horizontal":[4],"spacedout":[4],"_elements":[32]}]]],["tttx-loading-spinner",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-qrcode",[[1,"tttx-qrcode",{"link":[1025],"size":[1026]}]]],["tttx-tag",[[1,"tttx-tag",{"text":[1],"color":[1]}]]],["tttx-textarea",[[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",[[1,"tttx-toolbar",{"border":[4],"viewSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-icon",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]],["tttx-standalone-input",[[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",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"iconcolor":[1025],"design":[1]}]]]], options);
15
15
  });
16
16
  };
17
17
 
@@ -68,10 +68,13 @@ const TttxMultiselectBox = class {
68
68
  }
69
69
  return h("div", null, this.visibleValue);
70
70
  }
71
+ optionFoundInSearchTerm(option) {
72
+ return option.label.toLowerCase().indexOf(this.searchTerm.toLowerCase()) === -1;
73
+ }
71
74
  dropdownOption(option) {
72
75
  // This is tested in e2e tests
73
76
  /* istanbul ignore next */
74
- const hideOption = this.searchEnabled && option.label.toLowerCase().indexOf(this.searchTerm.toLowerCase()) === -1;
77
+ const hideOption = this.searchEnabled && this.optionFoundInSearchTerm(option);
75
78
  const checkboxIcon = option.selected ? 'check_box' : 'check_box_outline_blank';
76
79
  const checkboxColor = option.selected ? 'blue' : 'grey';
77
80
  if (option.html) {
@@ -98,7 +101,7 @@ const TttxMultiselectBox = class {
98
101
  if (this.searchEnabled)
99
102
  dropdownMenuMaxHeight += 52;
100
103
  if (bottomPosY + dropdownMenuMaxHeight > window.innerHeight) {
101
- this.bodyOffset = { bottom: '16px', position: 'fixed', width: `${dropdownSelector.offsetWidth}px` };
104
+ this.bodyOffset = { top: `${window.innerHeight - (dropdownMenuMaxHeight + 16)}px`, position: 'fixed', width: `${dropdownSelector.offsetWidth}px` };
102
105
  }
103
106
  else {
104
107
  this.bodyOffset = {};
@@ -0,0 +1,55 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-6a372ea6.js';
2
+
3
+ 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}";
4
+
5
+ const TttxTextarea = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.valueChanged = createEvent(this, "valueChanged", 7);
9
+ this.focusChanged = createEvent(this, "focusChanged", 7);
10
+ this.blurChanged = createEvent(this, "blurChanged", 7);
11
+ this.invalidChanged = createEvent(this, "invalidChanged", 7);
12
+ this.label = undefined;
13
+ this.secondarylabel = undefined;
14
+ this.showerrormsg = undefined;
15
+ this.showerrorbubble = true;
16
+ this.errormsg = undefined;
17
+ this.rows = undefined;
18
+ this.textareaautofocus = undefined;
19
+ this.inputkeyhint = undefined;
20
+ this.inputindex = undefined;
21
+ this.inputtitle = undefined;
22
+ this.disabled = undefined;
23
+ this.maxlength = undefined;
24
+ this.name = undefined;
25
+ this.placeholder = undefined;
26
+ this.readonly = undefined;
27
+ this.required = undefined;
28
+ this.value = undefined;
29
+ }
30
+ handleChange(event) {
31
+ const target = event.target;
32
+ this.value = target.value;
33
+ this.valueChanged.emit(target.value);
34
+ }
35
+ handleFocus(event) {
36
+ const target = event.target;
37
+ this.focusChanged.emit(target.value);
38
+ }
39
+ handleBlur(event) {
40
+ const target = event.target;
41
+ this.blurChanged.emit(target.value);
42
+ }
43
+ handleInvalid(event) {
44
+ event.preventDefault();
45
+ const target = event.target;
46
+ this.invalidChanged.emit(target.value);
47
+ }
48
+ render() {
49
+ const classNames = [this.showerrormsg ? 'invalid' : '', !this.label && this.required ? 'no-label' : ''].join(' ');
50
+ 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))))));
51
+ }
52
+ };
53
+ TttxTextarea.style = tttxTextareaCss;
54
+
55
+ export { TttxTextarea as tttx_textarea };
package/dist/esm/tttx.js CHANGED
@@ -14,5 +14,5 @@ const patchBrowser = () => {
14
14
  };
15
15
 
16
16
  patchBrowser().then(options => {
17
- return bootstrapLazy([["tttx-multiselect-box",[[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",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"open":[1028],"allowOverflow":[4,"allow-overflow"],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-select-box",[[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",[[1,"tttx-tree-view",{"data":[1040],"treeData":[32]}]]],["tttx-filter",[[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",[[1,"tttx-list",{"data":[1025],"name":[1],"_data":[32]}]]],["tttx-sorter",[[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",[[2,"tttx-tabs",{"tabsName":[1,"tabs-name"],"navigation":[4],"wide":[4],"tabs":[1],"_tabs":[32]},[[0,"keydown","handleKeyDown"]]]]],["tttx-form",[[1,"tttx-form",{"formschema":[1025],"data":[1032],"submit":[64]}]]],["tttx-keyvalue-block",[[1,"tttx-keyvalue-block",{"keyvalues":[1],"horizontal":[4],"spacedout":[4],"_elements":[32]}]]],["tttx-loading-spinner",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-qrcode",[[1,"tttx-qrcode",{"link":[1025],"size":[1026]}]]],["tttx-tag",[[1,"tttx-tag",{"text":[1],"color":[1]}]]],["tttx-toolbar",[[1,"tttx-toolbar",{"border":[4],"viewSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-icon",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]],["tttx-standalone-input",[[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",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"iconcolor":[1025],"design":[1]}]]]], options);
17
+ return bootstrapLazy([["tttx-multiselect-box",[[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",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"open":[1028],"allowOverflow":[4,"allow-overflow"],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-select-box",[[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",[[1,"tttx-tree-view",{"data":[1040],"treeData":[32]}]]],["tttx-filter",[[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",[[1,"tttx-list",{"data":[1025],"name":[1],"_data":[32]}]]],["tttx-sorter",[[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",[[2,"tttx-tabs",{"tabsName":[1,"tabs-name"],"navigation":[4],"wide":[4],"tabs":[1],"_tabs":[32]},[[0,"keydown","handleKeyDown"]]]]],["tttx-form",[[1,"tttx-form",{"formschema":[1025],"data":[1032],"submit":[64]}]]],["tttx-keyvalue-block",[[1,"tttx-keyvalue-block",{"keyvalues":[1],"horizontal":[4],"spacedout":[4],"_elements":[32]}]]],["tttx-loading-spinner",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-qrcode",[[1,"tttx-qrcode",{"link":[1025],"size":[1026]}]]],["tttx-tag",[[1,"tttx-tag",{"text":[1],"color":[1]}]]],["tttx-textarea",[[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",[[1,"tttx-toolbar",{"border":[4],"viewSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-icon",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]],["tttx-standalone-input",[[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",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"iconcolor":[1025],"design":[1]}]]]], options);
18
18
  });
@@ -0,0 +1 @@
1
+ import{r as o,c as t,h as i,H as s,g as e}from"./p-3f1b6013.js";import{p as n,d}from"./p-5ed38d61.js";import"./p-112455b1.js";const r=class{constructor(i){o(this,i),this.selectItemEvent=t(this,"selectItemEvent",7),this.toggleOpen=t(this,"toggleOpen",7),this.changesApplied=t(this,"changesApplied",7),this.bodyOffset={},this.optionsData=null,this.label=void 0,this.inline=void 0,this.placeholder="",this.searchEnabled=void 0,this.htmlVisibleValue=void 0,this.visibleValue=void 0,this.open=!1,this.unsavedSelectedItems=void 0,this.searchTerm=""}handleCloseSelectBox(){this.open=!1}handleBlur(){this.open=!1,this.toggleOpen.emit(!1)}safelyCloneArray(o){return JSON.parse(JSON.stringify(o))}onDropdownClicked(){this.open=!this.open,this.searchTerm="",this.calculateDropdownMenuOffset(),this.toggleOpen.emit(this.open)}onCancel(){this.open=!1,this.unsavedSelectedItems=this.safelyCloneArray(this._optionsData),this.toggleOpen.emit(!1)}applyChanges(){this.open=!1,this.changesApplied.emit(this.safelyCloneArray(this.unsavedSelectedItems))}onItemSelected(o){const t=this.unsavedSelectedItems.findIndex((t=>t.value===o.value));this.unsavedSelectedItems[t]=Object.assign(Object.assign({},o),{selected:!o.selected}),this.unsavedSelectedItems=[...this.unsavedSelectedItems],this.selectItemEvent.emit(o)}dropdownSelectorContent(){if(!this._optionsData.find((o=>o.selected)))return i("div",{class:"placeholder"},this.placeholder);if(this.htmlVisibleValue){const o=n.sanitize(this.visibleValue,d);return i("div",{class:"dropdown-selector-html-content",innerHTML:o})}return i("div",null,this.visibleValue)}optionFoundInSearchTerm(o){return-1===o.label.toLowerCase().indexOf(this.searchTerm.toLowerCase())}dropdownOption(o){const t=this.searchEnabled&&this.optionFoundInSearchTerm(o),s=o.selected?"check_box":"check_box_outline_blank",e=o.selected?"blue":"grey";if(o.html){const r=n.sanitize(o.html,d);return i("div",{class:`dropdown-option ${t?"hidden":""} ${o.selected?"selected":""}`,onClick:this.onItemSelected.bind(this,o),key:o.label},i("tttx-icon",{icon:s,color:e,class:"checkbox-icon"}),i("div",{innerHTML:r}))}return i("div",{class:`dropdown-option ${t?"hidden":""} ${o.selected?"selected":""}`,onClick:this.onItemSelected.bind(this,o),key:o.label},i("tttx-icon",{icon:s,color:e,class:"checkbox-icon"}),i("div",{class:"plaintext-option"},o.label))}handleSearchInput(o){this.searchTerm=o.target.value}calculateDropdownMenuOffset(){const o=this.el.shadowRoot.querySelector(".dropdown-selector"),t=o.getBoundingClientRect().bottom;let i=Math.min(288,36*this._optionsData.length)+45+8;this.searchEnabled&&(i+=52),this.bodyOffset=t+i>window.innerHeight?{top:window.innerHeight-(i+16)+"px",position:"fixed",width:`${o.offsetWidth}px`}:{}}render(){if(!this.optionsData)return;this._optionsData="string"==typeof this.optionsData?JSON.parse(this.optionsData):this.optionsData,this.unsavedSelectedItems||(this.unsavedSelectedItems=this.safelyCloneArray(this._optionsData));const o=this.open?"expand_less":"expand_more";return i(s,{class:this.inline?"inline":"block"},this.label&&i("div",{class:"label"},this.label),i("div",{tabindex:"0",class:"dropdown-container"},i("div",{class:"dropdown-selector",onClick:this.onDropdownClicked.bind(this)},this.dropdownSelectorContent(),i("div",{class:"dropdown-selector-chevron"},i("tttx-icon",{icon:o,color:"black"}))),this.open&&i("div",{class:"dropdown-body-container"},i("div",{class:"dropdown-body",style:Object.assign({},this.bodyOffset)},this.searchEnabled&&i("div",{class:"searchbox"},i("tttx-standalone-input",{type:"text",label:"",required:!0,showerrorbubble:!1,iconleft:"search",onInput:this.handleSearchInput.bind(this),inline:!0})),i("div",{class:"dropdown-options-list"},this.unsavedSelectedItems.map((o=>this.dropdownOption(o)))),i("div",{class:"footer"},i("tttx-button",{design:"primary",onClick:this.applyChanges.bind(this)},"Apply"),i("tttx-button",{onClick:this.onCancel.bind(this)},"Cancel"))))))}get el(){return e(this)}};r.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}:host{display:flex;gap:4px}.label{font-size:16px;font-style:normal;font-weight:500;line-height:normal}:host(.inline) .label{padding-top:8px}:host(.block){flex-direction:column}.dropdown-container{display:grid;position:relative;display:flex;flex-direction:column;width:100%}.dropdown-container:focus-visible{outline:none}.dropdown-container:focus .dropdown-selector{border:1px solid #1479c6}.dropdown-selector,.dropdown-body{display:flex;border-radius:4px;background-color:white}.dropdown-selector{grid-row:1;align-items:center;gap:8px;padding:6px 8px 6px 16px;cursor:pointer;border:1px solid #d5d5d5}.dropdown-selector-chevron{margin-left:auto;height:24px}.dropdown-selector-chevron>tttx-icon{cursor:pointer}.dropdown-selector-html-content{display:flex;gap:8px;flex-wrap:wrap}.dropdown-body-container{grid-row:2;position:relative}.dropdown-body{position:absolute;display:flex;position:absolute;flex-direction:column;box-shadow:0px 1px 5px #1111114D;padding-bottom:8px;border:1px solid #d5d5d5;width:100%}.dropdown-options-list{display:flex;flex-direction:column;overflow-y:auto;scrollbar-gutter:stable;max-height:288px}.dropdown-option{padding:6px 8px 6px 16px;cursor:pointer;display:flex;gap:8px}.dropdown-option .checkbox-icon{height:24px}.dropdown-option .plaintext-option{line-height:24px}.dropdown-option:hover{background-color:#1111110d}.dropdown-option:active,.dropdown-option.selected{background-color:#ebfbfc}.placeholder{color:#9e9e9e}.searchbox{padding:8px 16px 8px 16px;height:52px;box-sizing:border-box}.searchbox tttx-standalone-input{margin-top:-4px}.hidden{display:none}.footer{display:flex;gap:8px;flex-direction:row-reverse;padding:8px 16px 0 16px;border-top:1px solid #d5d5d5}';export{r as tttx_multiselect_box}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s,H as e}from"./p-3f1b6013.js";const a=class{constructor(s){t(this,s),this.valueChanged=i(this,"valueChanged",7),this.focusChanged=i(this,"focusChanged",7),this.blurChanged=i(this,"blurChanged",7),this.invalidChanged=i(this,"invalidChanged",7),this.label=void 0,this.secondarylabel=void 0,this.showerrormsg=void 0,this.showerrorbubble=!0,this.errormsg=void 0,this.rows=void 0,this.textareaautofocus=void 0,this.inputkeyhint=void 0,this.inputindex=void 0,this.inputtitle=void 0,this.disabled=void 0,this.maxlength=void 0,this.name=void 0,this.placeholder=void 0,this.readonly=void 0,this.required=void 0,this.value=void 0}handleChange(t){const i=t.target;this.value=i.value,this.valueChanged.emit(i.value)}handleFocus(t){this.focusChanged.emit(t.target.value)}handleBlur(t){this.blurChanged.emit(t.target.value)}handleInvalid(t){t.preventDefault(),this.invalidChanged.emit(t.target.value)}render(){const t=[this.showerrormsg?"invalid":"",!this.label&&this.required?"no-label":""].join(" ");return s(e,null,s("label",null,this.label,this.required?"":s("span",{class:"optional"}," (optional)"),s("div",{class:"textarea-container"},s("textarea",{rows:this.rows,class:t,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&&s("span",{class:"secondarylabel"},this.secondarylabel),this.showerrorbubble&&s("span",{class:["errorBubble",this.showerrormsg&&this.errormsg?"visible":""].join(" ")},s("span",{class:"material-symbols-rounded validationicon"},"warning")," ",this.errormsg))))}};a.style='.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}';export{a as tttx_textarea}
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-3f1b6013.js";export{s as setNonce}from"./p-3f1b6013.js";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((e=>t([["p-77fed2a6",[[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"]]]]],["p-f34bface",[[1,"tttx-dialog-box",{data:[1025],size:[1],open:[1028],allowOverflow:[4,"allow-overflow"],elementSize:[32]},[[9,"resize","handleResize"]]]]],["p-887f56cb",[[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"]]]]],["p-75c31e23",[[1,"tttx-tree-view",{data:[1040],treeData:[32]}]]],["p-c714f7c0",[[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"]]]]],["p-129df5a2",[[1,"tttx-list",{data:[1025],name:[1],_data:[32]}]]],["p-5290db99",[[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"]]]]],["p-67c342d7",[[2,"tttx-tabs",{tabsName:[1,"tabs-name"],navigation:[4],wide:[4],tabs:[1],_tabs:[32]},[[0,"keydown","handleKeyDown"]]]]],["p-b30a1025",[[1,"tttx-form",{formschema:[1025],data:[1032],submit:[64]}]]],["p-d1ff1456",[[1,"tttx-keyvalue-block",{keyvalues:[1],horizontal:[4],spacedout:[4],_elements:[32]}]]],["p-e55a967b",[[1,"tttx-loading-spinner",{loadingMessage:[1028,"loading-message"],size:[1025]}]]],["p-50cdce65",[[1,"tttx-qrcode",{link:[1025],size:[1026]}]]],["p-25acdd4c",[[1,"tttx-tag",{text:[1],color:[1]}]]],["p-c0c022cd",[[1,"tttx-toolbar",{border:[4],viewSize:[32]},[[9,"resize","handleResize"]]]]],["p-e89b053f",[[1,"tttx-icon",{icon:[1],color:[1]}]]],["p-09b92178",[[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]}]]],["p-4ade2866",[[1,"tttx-button",{notext:[4],icon:[1],iconposition:[1],iconcolor:[1025],design:[1]}]]]],e)));
1
+ import{p as e,b as t}from"./p-3f1b6013.js";export{s as setNonce}from"./p-3f1b6013.js";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((e=>t([["p-5f1f699d",[[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"]]]]],["p-f34bface",[[1,"tttx-dialog-box",{data:[1025],size:[1],open:[1028],allowOverflow:[4,"allow-overflow"],elementSize:[32]},[[9,"resize","handleResize"]]]]],["p-887f56cb",[[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"]]]]],["p-75c31e23",[[1,"tttx-tree-view",{data:[1040],treeData:[32]}]]],["p-c714f7c0",[[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"]]]]],["p-129df5a2",[[1,"tttx-list",{data:[1025],name:[1],_data:[32]}]]],["p-5290db99",[[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"]]]]],["p-67c342d7",[[2,"tttx-tabs",{tabsName:[1,"tabs-name"],navigation:[4],wide:[4],tabs:[1],_tabs:[32]},[[0,"keydown","handleKeyDown"]]]]],["p-b30a1025",[[1,"tttx-form",{formschema:[1025],data:[1032],submit:[64]}]]],["p-d1ff1456",[[1,"tttx-keyvalue-block",{keyvalues:[1],horizontal:[4],spacedout:[4],_elements:[32]}]]],["p-e55a967b",[[1,"tttx-loading-spinner",{loadingMessage:[1028,"loading-message"],size:[1025]}]]],["p-50cdce65",[[1,"tttx-qrcode",{link:[1025],size:[1026]}]]],["p-25acdd4c",[[1,"tttx-tag",{text:[1],color:[1]}]]],["p-9c3f730f",[[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]}]]],["p-c0c022cd",[[1,"tttx-toolbar",{border:[4],viewSize:[32]},[[9,"resize","handleResize"]]]]],["p-e89b053f",[[1,"tttx-icon",{icon:[1],color:[1]}]]],["p-09b92178",[[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]}]]],["p-4ade2866",[[1,"tttx-button",{notext:[4],icon:[1],iconposition:[1],iconcolor:[1025],design:[1]}]]]],e)));
@@ -31,6 +31,7 @@ export declare class TttxMultiselectBox {
31
31
  applyChanges(): void;
32
32
  onItemSelected(option: SelectItem): void;
33
33
  dropdownSelectorContent(): any;
34
+ optionFoundInSearchTerm(option: any): boolean;
34
35
  dropdownOption(option: SelectItem): any;
35
36
  handleSearchInput(event: InputEvent): void;
36
37
  calculateDropdownMenuOffset(): void;
@@ -0,0 +1,42 @@
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ export declare class TttxTextarea {
3
+ label: string;
4
+ /**
5
+ * Footnote under the input field
6
+ */
7
+ secondarylabel: string;
8
+ showerrormsg: boolean;
9
+ showerrorbubble: boolean;
10
+ errormsg: string;
11
+ rows: number;
12
+ textareaautofocus: boolean;
13
+ /**
14
+ * Defines what action to present for the enter key on virtual keyboards
15
+ */
16
+ inputkeyhint: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
17
+ /**
18
+ * tabindex - Allows the HTML elements to be focusable
19
+ * @example <caption>In HTML (like `index.html`)</caption>
20
+ * <tttx-textarea input-index="1" />
21
+ * @example <caption>In TSX files</caption>
22
+ * <tttx-textarea inputindex={1} />
23
+ */
24
+ inputindex: string | number;
25
+ inputtitle: string;
26
+ disabled: boolean;
27
+ maxlength: string | number;
28
+ name: string;
29
+ placeholder: string;
30
+ readonly: string | boolean;
31
+ required: boolean;
32
+ value: string | number;
33
+ valueChanged: EventEmitter<string>;
34
+ handleChange(event: Event | InputEvent): void;
35
+ focusChanged: EventEmitter<string>;
36
+ handleFocus(event: Event | InputEvent): void;
37
+ blurChanged: EventEmitter<string>;
38
+ handleBlur(event: Event | InputEvent): void;
39
+ invalidChanged: EventEmitter<string>;
40
+ handleInvalid(event: Event | InputEvent): void;
41
+ render(): any;
42
+ }
@@ -0,0 +1,89 @@
1
+ declare const _default: {
2
+ title: string;
3
+ component: string;
4
+ argTypes: {
5
+ label: {
6
+ control: {
7
+ type: string;
8
+ };
9
+ };
10
+ secondarylabel: {
11
+ control: {
12
+ type: string;
13
+ };
14
+ };
15
+ errormsg: {
16
+ control: {
17
+ type: string;
18
+ };
19
+ };
20
+ showerrorbubble: {
21
+ control: {
22
+ type: string;
23
+ };
24
+ };
25
+ showerrormsg: {
26
+ control: {
27
+ type: string;
28
+ };
29
+ };
30
+ disabled: {
31
+ control: {
32
+ type: string;
33
+ };
34
+ };
35
+ maxlength: {
36
+ control: {
37
+ type: string;
38
+ };
39
+ };
40
+ minlength: {
41
+ control: {
42
+ type: string;
43
+ };
44
+ };
45
+ name: {
46
+ control: {
47
+ type: string;
48
+ };
49
+ };
50
+ pattern: {
51
+ control: {
52
+ type: string;
53
+ };
54
+ };
55
+ placeholder: {
56
+ control: {
57
+ type: string;
58
+ };
59
+ };
60
+ readonly: {
61
+ control: {
62
+ type: string;
63
+ };
64
+ };
65
+ required: {
66
+ control: {
67
+ type: string;
68
+ };
69
+ };
70
+ resize: {
71
+ control: {
72
+ type: string;
73
+ };
74
+ };
75
+ rows: {
76
+ control: {
77
+ type: string;
78
+ };
79
+ };
80
+ value: {
81
+ control: {
82
+ type: string;
83
+ };
84
+ };
85
+ };
86
+ };
87
+ export default _default;
88
+ export declare const Textarea: any;
89
+ export declare const ResizableTextarea: any;