@3t-transform/threeteeui 0.2.74 → 0.2.76

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 (72) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/tttx-button.cjs.entry.js +2 -2
  3. package/dist/cjs/tttx-form.cjs.entry.js +78 -49
  4. package/dist/cjs/tttx-keyvalue-block.cjs.entry.js +17 -14
  5. package/dist/cjs/tttx-list.cjs.entry.js +1 -1
  6. package/dist/cjs/tttx-multiselect-box.cjs.entry.js +130 -0
  7. package/dist/cjs/tttx-standalone-input.cjs.entry.js +8 -3
  8. package/dist/cjs/tttx-tag.cjs.entry.js +1 -1
  9. package/dist/cjs/tttx.cjs.js +1 -1
  10. package/dist/collection/collection-manifest.json +2 -1
  11. package/dist/collection/components/atoms/tttx-button/tttx-button.css +1 -1
  12. package/dist/collection/components/atoms/tttx-button/tttx-button.js +1 -2
  13. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +1 -1
  14. package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +0 -1
  15. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.css +14 -5
  16. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +46 -18
  17. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.js +85 -29
  18. package/dist/collection/components/atoms/tttx-tag/tttx-tag.css +1 -1
  19. package/dist/collection/components/atoms/tttx-tag/tttx-tag.js +0 -1
  20. package/dist/collection/components/atoms/tttx-tag/tttx-tag.stories.js +1 -1
  21. package/dist/collection/components/molecules/tttx-form/lib/setErrorState.js +14 -3
  22. package/dist/collection/components/molecules/tttx-form/lib/validityCheck.js +15 -13
  23. package/dist/collection/components/molecules/tttx-form/tttx-form.css +107 -177
  24. package/dist/collection/components/molecules/tttx-form/tttx-form.js +56 -36
  25. package/dist/collection/components/molecules/tttx-list/tttx-list.css +1 -1
  26. package/dist/collection/components/molecules/tttx-multiselect-box/tttx-multiselect-box.css +135 -0
  27. package/dist/collection/components/molecules/tttx-multiselect-box/tttx-multiselect-box.js +339 -0
  28. package/dist/collection/components/molecules/tttx-multiselect-box/tttx-multiselect-box.stories.js +201 -0
  29. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.css +102 -198
  30. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +7 -2
  31. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +23 -5
  32. package/dist/components/index.d.ts +1 -0
  33. package/dist/components/index.js +1 -0
  34. package/dist/components/tttx-button2.js +2 -2
  35. package/dist/components/tttx-form.js +79 -50
  36. package/dist/components/tttx-keyvalue-block.js +21 -16
  37. package/dist/components/tttx-list.js +1 -1
  38. package/dist/components/tttx-multiselect-box.d.ts +11 -0
  39. package/dist/components/tttx-multiselect-box.js +172 -0
  40. package/dist/components/tttx-standalone-input2.js +8 -3
  41. package/dist/components/tttx-tag.js +1 -1
  42. package/dist/esm/loader.js +1 -1
  43. package/dist/esm/tttx-button.entry.js +2 -2
  44. package/dist/esm/tttx-form.entry.js +78 -49
  45. package/dist/esm/tttx-keyvalue-block.entry.js +17 -14
  46. package/dist/esm/tttx-list.entry.js +1 -1
  47. package/dist/esm/tttx-multiselect-box.entry.js +126 -0
  48. package/dist/esm/tttx-standalone-input.entry.js +8 -3
  49. package/dist/esm/tttx-tag.entry.js +1 -1
  50. package/dist/esm/tttx.js +1 -1
  51. package/dist/tttx/p-09b92178.entry.js +1 -0
  52. package/dist/tttx/{p-750cf31b.entry.js → p-129df5a2.entry.js} +1 -1
  53. package/dist/tttx/{p-a6582ab0.entry.js → p-25acdd4c.entry.js} +1 -1
  54. package/dist/tttx/{p-5b7b8539.entry.js → p-4ade2866.entry.js} +1 -1
  55. package/dist/tttx/p-77fed2a6.entry.js +1 -0
  56. package/dist/tttx/p-b30a1025.entry.js +1 -0
  57. package/dist/tttx/p-d1ff1456.entry.js +1 -0
  58. package/dist/tttx/tttx.esm.js +1 -1
  59. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.d.ts +7 -1
  60. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.d.ts +6 -4
  61. package/dist/types/components/molecules/tttx-form/lib/setErrorState.d.ts +3 -2
  62. package/dist/types/components/molecules/tttx-form/lib/validityCheck.d.ts +5 -7
  63. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +74 -29
  64. package/dist/types/components/molecules/tttx-multiselect-box/interfaces.d.ts +6 -0
  65. package/dist/types/components/molecules/tttx-multiselect-box/tttx-multiselect-box.d.ts +38 -0
  66. package/dist/types/components/molecules/tttx-multiselect-box/tttx-multiselect-box.stories.d.ts +15 -0
  67. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +7 -0
  68. package/dist/types/components.d.ts +46 -8
  69. package/package.json +1 -1
  70. package/dist/tttx/p-6fe0af4e.entry.js +0 -1
  71. package/dist/tttx/p-818574fe.entry.js +0 -1
  72. package/dist/tttx/p-895526aa.entry.js +0 -1
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-4cfa8e25.js');
6
6
 
7
- const tttxStandaloneInputCss = ".material-symbols-rounded.sc-tttx-standalone-input{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded.sc-tttx-standalone-input{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded.sc-tttx-standalone-input{font-family:\"Material Symbols Rounded\", sans-serif;font-weight:normal;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.icon-left.sc-tttx-standalone-input,.icon-right.sc-tttx-standalone-input{flex-basis:24px}.icon-left.sc-tttx-standalone-input span.sc-tttx-standalone-input,.icon-right.sc-tttx-standalone-input span.sc-tttx-standalone-input{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left.sc-tttx-standalone-input span.sc-tttx-standalone-input{margin-left:4px}.icon-right.sc-tttx-standalone-input span.sc-tttx-standalone-input{margin-right:4px}.icon-right.sc-tttx-standalone-input{margin-top:5px}.icon-left.sc-tttx-standalone-input{margin-top:5px;margin-left:4px}.iconleft.sc-tttx-standalone-input .input.sc-tttx-standalone-input{padding-left:4px}.iconright.sc-tttx-standalone-input .input.sc-tttx-standalone-input{padding-right:4px}.input-icon.sc-tttx-standalone-input{position:absolute;margin-top:9px;margin-left:4px}.errormsg.sc-tttx-standalone-input{display:flex;justify-content:center;align-items:center;float:left;margin-bottom:16px;box-sizing:border-box;background-color:transparent;height:26px;font-size:14px;line-height:16px;border-radius:none;z-index:2;color:#dc0000}.errormsg.sc-tttx-standalone-input .validationicon.sc-tttx-standalone-input{width:16px;height:16px;font-size:16px;line-height:19px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger.sc-tttx-standalone-input{color:#dc0000}.optional.sc-tttx-standalone-input{color:#757575;font-weight:normal}label.inputBlock.sc-tttx-standalone-input{display:block;position:relative;line-height:21px}label.inputInline.sc-tttx-standalone-input{display:flex;white-space:nowrap;align-items:center}label.inputInline.sc-tttx-standalone-input .input-container.sc-tttx-standalone-input{margin:0 4px;width:100%;display:flex;align-items:center;gap:4px;position:relative}label.sc-tttx-standalone-input{font-weight:500;font-size:16px;line-height:19px;margin-bottom:16px}input.sc-tttx-standalone-input:not([type=submit]){font-family:\"Roboto\", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;line-height:19px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}input[type=date].sc-tttx-standalone-input{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}@media (max-width: 600px){input[type=date].sc-tttx-standalone-input{padding-top:6px}}input.invalid.sc-tttx-standalone-input:invalid,input.standalone.invalid.sc-tttx-standalone-input{border:1px solid #dc0000}.input-icon.sc-tttx-standalone-input~input.sc-tttx-standalone-input{padding:0 32px}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input{position:relative;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}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input:not(.visible){display:none}input.sc-tttx-standalone-input~.errorBubble.sc-tttx-standalone-input span.sc-tttx-standalone-input{color:#dc0000;font-size:16px;margin-right:4px}input.invalid.sc-tttx-standalone-input:invalid~.errorBubble.sc-tttx-standalone-input{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000}input.sc-tttx-standalone-input:focus{border-color:#1479c6}input.sc-tttx-standalone-input:focus-visible{outline:none}.secondarylabel.sc-tttx-standalone-input{color:#757575;font-size:14px;line-height:16px;font-weight:normal;display:flex;margin-top:4px}label.inputBlock.readonly.sc-tttx-standalone-input{pointer-events:none;user-select:none;color:gray}input[readonly].sc-tttx-standalone-input{cursor:default;pointer-events:none;user-select:none;color:gray}.sc-tttx-standalone-input-h{display:block}.input-container.sc-tttx-standalone-input{position:relative}#icon-left.sc-tttx-standalone-input{position:absolute;left:8px;top:10px}#icon-left.sc-tttx-standalone-input~input.sc-tttx-standalone-input{padding-left:36px}#icon-right.sc-tttx-standalone-input{position:absolute;right:8px;top:10px}#icon-right.sc-tttx-standalone-input~input.sc-tttx-standalone-input{padding-right:36px}";
7
+ const tttxStandaloneInputCss = ".material-symbols-rounded.sc-tttx-standalone-input{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded.sc-tttx-standalone-input{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}label.sc-tttx-standalone-input{font-weight:500;font-size:16px;line-height:19px;color:#212121}label.sc-tttx-standalone-input .optional.sc-tttx-standalone-input{color:#757575;font-weight:normal}label.sc-tttx-standalone-input .outer-container.sc-tttx-standalone-input{position:relative}label.sc-tttx-standalone-input .outer-container.sc-tttx-standalone-input .left-icons.sc-tttx-standalone-input,label.sc-tttx-standalone-input .outer-container.sc-tttx-standalone-input .right-icons.sc-tttx-standalone-input{display:flex;position:absolute;height:24px;gap:8px}label.sc-tttx-standalone-input .outer-container.sc-tttx-standalone-input .left-icons.sc-tttx-standalone-input tttx-icon.sc-tttx-standalone-input,label.sc-tttx-standalone-input .outer-container.sc-tttx-standalone-input .right-icons.sc-tttx-standalone-input tttx-icon.sc-tttx-standalone-input{height:24px;width:24px}label.sc-tttx-standalone-input .outer-container.sc-tttx-standalone-input .left-icons.sc-tttx-standalone-input{left:8px}label.sc-tttx-standalone-input .outer-container.sc-tttx-standalone-input .right-icons.sc-tttx-standalone-input{right:8px}label.sc-tttx-standalone-input .outer-container.sc-tttx-standalone-input input.sc-tttx-standalone-input{color:#212121;box-sizing:border-box;border:1px solid #d5d5d5;border-radius:4px;padding:0;padding-left:16px;padding-right:16px;margin-top:4px}label.sc-tttx-standalone-input .outer-container.sc-tttx-standalone-input input.has-input-icon.sc-tttx-standalone-input{padding-left:40px}label.sc-tttx-standalone-input .outer-container.sc-tttx-standalone-input input.has-input-icon.has-left-icon.sc-tttx-standalone-input{padding-left:72px}label.sc-tttx-standalone-input .outer-container.sc-tttx-standalone-input input.has-left-icon.sc-tttx-standalone-input{padding-left:40px}label.sc-tttx-standalone-input .outer-container.sc-tttx-standalone-input input.has-right-icon.sc-tttx-standalone-input{padding-right:40px}label.sc-tttx-standalone-input .outer-container.sc-tttx-standalone-input input.invalid.sc-tttx-standalone-input{border:1px solid #dc0000}label.sc-tttx-standalone-input .outer-container.sc-tttx-standalone-input input.sc-tttx-standalone-input:not([type=submit]){font-family:\"Roboto\", serif;width:100%;height:36px;font-size:16px;line-height:19px}label.sc-tttx-standalone-input .outer-container.sc-tttx-standalone-input input[type=date].sc-tttx-standalone-input{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}label.sc-tttx-standalone-input .outer-container.sc-tttx-standalone-input input[readonly].sc-tttx-standalone-input{cursor:default;pointer-events:none;user-select:none;color:gray}label.sc-tttx-standalone-input .outer-container.sc-tttx-standalone-input input.sc-tttx-standalone-input:focus{border-color:#1479c6}label.sc-tttx-standalone-input .outer-container.sc-tttx-standalone-input input.sc-tttx-standalone-input:focus-visible{outline:none}label.sc-tttx-standalone-input .outer-container.inputBlock.sc-tttx-standalone-input{display:flex;align-items:center;line-height:21px}label.sc-tttx-standalone-input .outer-container.inputBlock.sc-tttx-standalone-input .left-icons.sc-tttx-standalone-input,label.sc-tttx-standalone-input .outer-container.inputBlock.sc-tttx-standalone-input .right-icons.sc-tttx-standalone-input{margin-top:4px}label.sc-tttx-standalone-input .outer-container.inputBlock.readonly.sc-tttx-standalone-input{pointer-events:none;user-select:none;color:gray}label.sc-tttx-standalone-input .outer-container.inputInline.sc-tttx-standalone-input{display:flex;white-space:nowrap;align-items:center;margin:0}label.sc-tttx-standalone-input .outer-container.inputInline.sc-tttx-standalone-input input.sc-tttx-standalone-input{margin-top:0}label.sc-tttx-standalone-input .secondarylabel.sc-tttx-standalone-input{color:#757575;font-size:14px;line-height:16px;font-weight:normal;display:flex;margin-top:4px}label.sc-tttx-standalone-input .errorBubble.sc-tttx-standalone-input{position:relative;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}label.sc-tttx-standalone-input .errorBubble.sc-tttx-standalone-input:not(.visible){display:none}label.sc-tttx-standalone-input .errorBubble.sc-tttx-standalone-input span.sc-tttx-standalone-input{color:#dc0000;font-size:16px;margin-right:4px}.material-symbols-rounded.sc-tttx-standalone-input{font-family:\"Material Symbols Rounded\", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}.sc-tttx-standalone-input-h{display:block}";
8
8
 
9
9
  const TttxInput = class {
10
10
  constructor(hostRef) {
@@ -80,8 +80,13 @@ const TttxInput = class {
80
80
  this.rightIconClick.emit();
81
81
  }
82
82
  render() {
83
- const classNames = ['standalone', this.showerrormsg ? 'invalid' : ''].join(' ');
84
- return (index.h(index.Host, null, index.h("label", { class: this.inline ? 'inputInline' : 'inputBlock' }, this.label, !this.required ? index.h("span", { class: "optional" }, "\u00A0(optional)") : '', index.h("div", { class: "input-container" }, this.inputicon && (index.h("tttx-icon", { class: "input-icon", icon: this.inputicon, color: this.inputiconcolor, onClick: this.handleInputIconClick.bind(this) })), this.iconleft && (index.h("tttx-icon", { id: "icon-left", icon: this.iconleft, color: this.iconleftcolor, onClick: this.handleLeftIconClick.bind(this) })), this.iconright && (index.h("tttx-icon", { id: "icon-right", icon: this.iconright, color: this.iconrightcolor, onClick: this.handleRightIconClick.bind(this) })), index.h("input", { class: classNames, autocapitalize: this.inputautocapitalize, autofocus: this.inputautofocus, enterkeyhint: this.inputkeyhint, tabindex: this.inputindex, title: this.inputtitle, autocomplete: this.autocomplete, checked: this.checked, disabled: this.disabled, max: this.max, maxlength: this.maxlength, min: this.min, minlength: this.minlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readonly: this.readonly, required: this.required, step: this.step, type: this.type, 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))))));
83
+ const classNames = [
84
+ this.showerrormsg ? 'invalid' : '',
85
+ this.inputicon ? 'has-input-icon' : '',
86
+ this.iconleft ? 'has-left-icon' : '',
87
+ this.iconright ? 'has-right-icon' : '',
88
+ ].join(' ');
89
+ 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: ['outer-container', this.inline ? 'inputInline' : 'inputBlock'].join(' ') }, index.h("input", { class: classNames, autocapitalize: this.inputautocapitalize, autofocus: this.inputautofocus, enterkeyhint: this.inputkeyhint, tabindex: this.inputindex, title: this.inputtitle, autocomplete: this.autocomplete, checked: this.checked, disabled: this.disabled, max: this.max, maxlength: this.maxlength, min: this.min, minlength: this.minlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readonly: this.readonly, required: this.required, step: this.step, type: this.type, value: this.value, onBlur: this.handleBlur.bind(this), onFocus: this.handleFocus.bind(this), onInput: this.handleChange.bind(this), onInvalid: this.handleInvalid.bind(this) }), (this.inputicon || this.iconleft) && (index.h("span", { class: "left-icons" }, this.inputicon && (index.h("tttx-icon", { class: "input-icon", icon: this.inputicon, color: this.inputiconcolor, onClick: this.handleInputIconClick.bind(this) })), this.iconleft && (index.h("tttx-icon", { class: "left-icon", icon: this.iconleft, color: this.iconleftcolor, onClick: this.handleLeftIconClick.bind(this) })))), this.iconright && (index.h("span", { class: "right-icons" }, index.h("tttx-icon", { class: "right-icon", icon: this.iconright, color: this.iconrightcolor, onClick: this.handleRightIconClick.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" }, "warning"), " ", this.errormsg)))));
85
90
  }
86
91
  };
87
92
  TttxInput.style = tttxStandaloneInputCss;
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-4cfa8e25.js');
6
6
 
7
- const tttxTagCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}button{cursor:pointer}.button{font-family:Roboto, serif;box-sizing:border-box;height:36px;min-width:36px;padding:0;margin:0;background:transparent;color:#212121;border:1px solid #c8c8c8;border-radius:4px;text-transform:uppercase;display:flex;justify-content:left;align-items:center;font-size:14px;font-weight:400}.button-content{display:block;padding:0 16px}.icon-left,.icon-right{margin-top:4px}.iconleft{padding-left:8px}.iconleft .button-content{padding-left:4px}.iconright{padding-right:8px}.iconright .button-content{padding-right:4px}.notext{padding:0 6px}.button:active{background:rgba(17, 17, 17, 0.2);border:1px solid #d5d5d5}.primary{background:#1479c6;border:1px solid #1479c6;color:white}.primary:active{background:#1464a2;border:1px solid #1464a2}.borderless{background:transparent;border:none;color:#212121}.borderless:active{background:rgba(17, 17, 17, 0.2);border:none}.borderless-circle{background:transparent;border:none;color:#212121;border-radius:50%}.borderless-circle:active{border:none}.borderless-circle:focus{border-color:transparent}.danger{background:#dc0000;border:1px solid #dc0000;color:white}.danger:active{background:#b00000;border:1px solid #b00000}.disabled{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:active{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}@media (hover: hover){.button:hover{background:rgba(17, 17, 17, 0.1);border:1px solid #d5d5d5}.primary:hover{background:#146eb3;border:1px solid #146eb3}.borderless:hover{background:rgba(17, 17, 17, 0.1);border:none}.borderless-circle:hover{background:rgba(17, 17, 17, 0.1);border:none}.danger:hover{background:#c60000;border:1px solid #c60000}.disabled:hover{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}}:host{display:inline-block}.tag{border-radius:20px;padding:4px;font-family:\"Roboto\", sans-serif;font-size:14px;font-weight:400}.tag span{margin-left:4px;margin-right:4px;color:#212121}.icon{height:18px;width:18px;font-weight:400}";
7
+ const tttxTagCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}button{cursor:pointer}.button{font-family:Roboto, serif;box-sizing:border-box;height:36px;min-width:36px;padding:0;margin:0;background:transparent;color:#212121;border:1px solid #c8c8c8;border-radius:4px;text-transform:uppercase;display:flex;justify-content:left;align-items:center;font-size:14px;font-weight:500}.button-content{display:block;padding:0 16px}.icon-left,.icon-right{margin-top:4px}.iconleft{padding-left:8px}.iconleft .button-content{padding-left:4px}.iconright{padding-right:8px}.iconright .button-content{padding-right:4px}.notext{padding:0 6px}.button:active{background:rgba(17, 17, 17, 0.2);border:1px solid #d5d5d5}.primary{background:#1479c6;border:1px solid #1479c6;color:white}.primary:active{background:#1464a2;border:1px solid #1464a2}.borderless{background:transparent;border:none;color:#212121}.borderless:active{background:rgba(17, 17, 17, 0.2);border:none}.borderless-circle{background:transparent;border:none;color:#212121;border-radius:50%}.borderless-circle:active{border:none}.borderless-circle:focus{border-color:transparent}.danger{background:#dc0000;border:1px solid #dc0000;color:white}.danger:active{background:#b00000;border:1px solid #b00000}.disabled{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:active{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}@media (hover: hover){.button:hover{background:rgba(17, 17, 17, 0.1);border:1px solid #d5d5d5}.primary:hover{background:#146eb3;border:1px solid #146eb3}.borderless:hover{background:rgba(17, 17, 17, 0.1);border:none}.borderless-circle:hover{background:rgba(17, 17, 17, 0.1);border:none}.danger:hover{background:#c60000;border:1px solid #c60000}.disabled:hover{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}}:host{display:inline-block}.tag{border-radius:20px;padding:4px;font-family:\"Roboto\", sans-serif;font-size:14px;font-weight:400}.tag span{margin-left:4px;margin-right:4px;color:#212121}.icon{height:18px;width:18px;font-weight:400}";
8
8
 
9
9
  const TttxTag = class {
10
10
  constructor(hostRef) {
@@ -17,7 +17,7 @@ const patchBrowser = () => {
17
17
  };
18
18
 
19
19
  patchBrowser().then(options => {
20
- return index.bootstrapLazy([["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":[1032],"data":[1032],"submit":[64]}]]],["tttx-keyvalue-block.cjs",[[1,"tttx-keyvalue-block",{"keyvalues":[8],"horizontal":[4]}]]],["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-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;
@@ -1,16 +1,17 @@
1
1
  {
2
2
  "entries": [
3
3
  "./components/molecules/tttx-filter/tttx-filter.js",
4
+ "./components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js",
4
5
  "./components/molecules/tttx-standalone-input/tttx-standalone-input.js",
5
6
  "./components/atoms/tttx-button/tttx-button.js",
6
7
  "./components/atoms/tttx-icon/tttx-icon.js",
7
- "./components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js",
8
8
  "./components/atoms/tttx-loading-spinner/tttx-loading-spinner.js",
9
9
  "./components/atoms/tttx-qrcode/tttx-qrcode.js",
10
10
  "./components/atoms/tttx-tag/tttx-tag.js",
11
11
  "./components/molecules/tttx-dialog-box/tttx-dialog-box.js",
12
12
  "./components/molecules/tttx-form/tttx-form.js",
13
13
  "./components/molecules/tttx-list/tttx-list.js",
14
+ "./components/molecules/tttx-multiselect-box/tttx-multiselect-box.js",
14
15
  "./components/molecules/tttx-select-box/tttx-select-box.js",
15
16
  "./components/molecules/tttx-sorter/tttx-sorter.js",
16
17
  "./components/molecules/tttx-tabs/tttx-tabs.js",
@@ -22,7 +22,7 @@ button {
22
22
  justify-content: left;
23
23
  align-items: center;
24
24
  font-size: 14px;
25
- font-weight: 400;
25
+ font-weight: 500;
26
26
  }
27
27
 
28
28
  .button-content {
@@ -1,4 +1,3 @@
1
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
1
  import { Host, h } from '@stencil/core';
3
2
  export class TttxButton {
4
3
  constructor() {
@@ -21,7 +20,7 @@ export class TttxButton {
21
20
  }
22
21
  render() {
23
22
  this._iconcolor = this.iconcolor;
24
- return (h(Host, null, h("button", { class: `button ${this._design} ${this.icon ? 'withicon' : ''} ${this.icon && this.iconposition ? 'icon' + this.iconposition : ''} ${this.notext ? 'notext' : ''}` }, this.icon && this.iconposition === 'left' && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))), !this.notext && h("div", { class: "button-content" }, h("slot", null)), this.icon && this.iconposition === 'right' && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))))));
23
+ return (h(Host, null, h("button", { class: `button ${this._design} ${this.icon ? 'withicon' : ''} ${this.icon && this.iconposition ? 'icon' + this.iconposition : ''} ${this.notext ? 'notext' : ''}` }, this.icon && this.iconposition === 'left' && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))), !this.notext && (h("div", { class: "button-content" }, h("slot", null))), this.icon && this.iconposition === 'right' && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))))));
25
24
  }
26
25
  static get is() { return "tttx-button"; }
27
26
  static get encapsulation() { return "shadow"; }
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  title: 'Atoms/Button',
3
- component: 'tttx-button'
3
+ component: 'tttx-button',
4
4
  };
5
5
  const PrimaryButtons = () => `
6
6
  <h2>Standard</h2>
@@ -1,4 +1,3 @@
1
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
1
  import { Host, h } from '@stencil/core';
3
2
  export class TttxIcon {
4
3
  constructor() {
@@ -11,11 +11,12 @@ dl {
11
11
 
12
12
  dt {
13
13
  font-weight: 400;
14
- line-height: 21px;
15
14
  font-size: 16px;
15
+ margin-bottom: 4px;
16
16
  }
17
17
 
18
- dt, dt.subTitle {
18
+ dt,
19
+ dt.subTitle {
19
20
  color: #757575;
20
21
  }
21
22
 
@@ -23,7 +24,8 @@ dt.mainTitle {
23
24
  color: #212121;
24
25
  }
25
26
 
26
- dt, dd {
27
+ dt,
28
+ dd {
27
29
  overflow-wrap: anywhere;
28
30
  }
29
31
 
@@ -32,16 +34,23 @@ dd {
32
34
  font-weight: 400;
33
35
  font-size: 16px;
34
36
  color: #212121;
35
- line-height: 21px;
36
- margin-bottom: 18px;
37
37
  }
38
38
 
39
+ dd:not(:last-child) {
40
+ margin-bottom: 16px;
41
+ }
42
+
43
+ dl.spacedout,
39
44
  dl.horizontal {
40
45
  display: flex;
41
46
  flex-direction: row;
42
47
  width: 100%;
43
48
  }
44
49
 
50
+ dl.spacedout {
51
+ justify-content: space-between;
52
+ }
53
+
45
54
  dl.horizontal div {
46
55
  flex-grow: 1;
47
56
  }
@@ -1,21 +1,22 @@
1
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
1
  import { h, Host } from '@stencil/core';
3
2
  export class TttxKeyvalueBlock {
4
3
  constructor() {
5
4
  this.keyvalues = undefined;
6
5
  this.horizontal = undefined;
6
+ this.spacedout = undefined;
7
+ this._elements = undefined;
7
8
  }
8
9
  renderSingleElements(values) {
9
10
  const keys = Object.keys(values);
10
11
  const elements = [];
11
12
  const divSize = (100 / keys.length).toString() + '%';
12
- for (let i = 0; i < keys.length; i++) {
13
- if (this.horizontal) {
14
- elements.push(h("div", { style: { maxWidth: divSize } }, h("dt", null, keys[i]), h("dd", null, values[keys[i]])));
13
+ for (const element of keys) {
14
+ if (this.horizontal || this.spacedout) {
15
+ elements.push(h("div", { style: { maxWidth: divSize } }, h("dt", null, element), h("dd", null, values[element])));
15
16
  }
16
17
  else {
17
- elements.push(h("dt", null, keys[i]));
18
- elements.push(h("dd", null, values[keys[i]]));
18
+ elements.push(h("dt", null, element));
19
+ elements.push(h("dd", null, values[element]));
19
20
  }
20
21
  }
21
22
  return elements;
@@ -23,9 +24,9 @@ export class TttxKeyvalueBlock {
23
24
  renderArrayElements(values) {
24
25
  const elements = [];
25
26
  const divSize = (100 / values.length).toString() + '%';
26
- for (let i = 0; i < values.length; i++) {
27
- const value = values[i];
28
- if (this.horizontal) {
27
+ for (const element of values) {
28
+ const value = element;
29
+ if (this.horizontal || this.spacedout) {
29
30
  elements.push(h("div", { style: { maxWidth: divSize } }, h("dt", { class: 'mainTitle' }, value.title), h("dt", { class: 'subTitle' }, value.subTitle), h("dd", null, value.data)));
30
31
  }
31
32
  else {
@@ -36,7 +37,7 @@ export class TttxKeyvalueBlock {
36
37
  }
37
38
  return elements;
38
39
  }
39
- render() {
40
+ componentWillRender() {
40
41
  if (!this.keyvalues) {
41
42
  return;
42
43
  }
@@ -47,14 +48,15 @@ export class TttxKeyvalueBlock {
47
48
  else {
48
49
  values = this.keyvalues;
49
50
  }
50
- let elements;
51
51
  if (Array.isArray(values)) {
52
- elements = this.renderArrayElements(values);
52
+ this._elements = this.renderArrayElements(values);
53
53
  }
54
54
  else {
55
- elements = this.renderSingleElements(values);
55
+ this._elements = this.renderSingleElements(values);
56
56
  }
57
- return (h(Host, null, h("dl", { class: this.horizontal ? 'horizontal' : null }, elements)));
57
+ }
58
+ render() {
59
+ return (h(Host, null, h("dl", { class: [this.horizontal ? 'horizontal' : undefined, this.spacedout ? ' spacedout' : undefined].join(' ').trim() }, this._elements)));
58
60
  }
59
61
  static get is() { return "tttx-keyvalue-block"; }
60
62
  static get encapsulation() { return "shadow"; }
@@ -71,12 +73,16 @@ export class TttxKeyvalueBlock {
71
73
  static get properties() {
72
74
  return {
73
75
  "keyvalues": {
74
- "type": "any",
76
+ "type": "string",
75
77
  "mutable": false,
76
78
  "complexType": {
77
- "original": "any | any[] | string",
78
- "resolved": "any",
79
- "references": {}
79
+ "original": "KeyBlockValues | KeyBlockValues[] | string",
80
+ "resolved": "KeyBlockValues | KeyBlockValues[] | string",
81
+ "references": {
82
+ "KeyBlockValues": {
83
+ "location": "local"
84
+ }
85
+ }
80
86
  },
81
87
  "required": false,
82
88
  "optional": false,
@@ -103,7 +109,29 @@ export class TttxKeyvalueBlock {
103
109
  },
104
110
  "attribute": "horizontal",
105
111
  "reflect": false
112
+ },
113
+ "spacedout": {
114
+ "type": "boolean",
115
+ "mutable": false,
116
+ "complexType": {
117
+ "original": "boolean",
118
+ "resolved": "boolean",
119
+ "references": {}
120
+ },
121
+ "required": false,
122
+ "optional": false,
123
+ "docs": {
124
+ "tags": [],
125
+ "text": ""
126
+ },
127
+ "attribute": "spacedout",
128
+ "reflect": false
106
129
  }
107
130
  };
108
131
  }
132
+ static get states() {
133
+ return {
134
+ "_elements": {}
135
+ };
136
+ }
109
137
  }
@@ -1,38 +1,94 @@
1
1
  export default {
2
2
  title: 'atoms/Key Value Block',
3
- component: 'tttx-keyvalue-block'
3
+ component: 'tttx-keyvalue-block',
4
4
  };
5
- const keyValues = {
6
- 'Name': 'John Doe',
7
- 'Date of birth': '14 Jan 1981',
8
- 'Start of postcode': 'AB10'
9
- };
10
- export const KeyValueBlock = () => {
11
- return `<tttx-keyvalue-block keyvalues='${JSON.stringify(keyValues)}' />`;
12
- };
13
- const keyValueArray = [
14
- {
15
- title: "Electrical Designer",
16
- subTitle: "Satchwell",
17
- data: "18 Oct 2021 - Present"
5
+ const TemplateKeyValueBlock = ({ keyValues }) => `<tttx-keyvalue-block keyvalues='${JSON.stringify(keyValues)}' />`;
6
+ export const BasicKeyValueBlock = TemplateKeyValueBlock.bind({});
7
+ BasicKeyValueBlock.args = {
8
+ keyValues: {
9
+ 'Name': 'John Doe',
10
+ 'Date of birth': '14 Jan 1981',
11
+ 'Start of postcode': 'AB10',
18
12
  },
19
- {
20
- title: "Electrical Inspector",
21
- subTitle: "Fastned",
22
- data: "20 Dec 2016 - 10 Oct 2021"
13
+ };
14
+ const TemplateHorizontalKeyValueBlock = ({ keyValues }) => `<tttx-keyvalue-block horizontal='true' keyvalues='${JSON.stringify(keyValues)}' />`;
15
+ export const HorizontalKeyValueBlock = TemplateHorizontalKeyValueBlock.bind({});
16
+ HorizontalKeyValueBlock.args = {
17
+ keyValues: {
18
+ 'Name': 'John Doe',
19
+ 'Date of birth': '14 Jan 1981',
20
+ 'Start of postcode': 'AB10',
23
21
  },
24
- {
25
- title: "Electrical Tech Prof I - Eng",
26
- subTitle: "Voltech",
27
- data: "20 Dec 2009 - 20 Nov 2016"
22
+ };
23
+ const TemplateSpacedoutKeyValueBlock = ({ keyValues }) => `<tttx-keyvalue-block spacedout='true' keyvalues='${JSON.stringify(keyValues)}' />`;
24
+ export const SpacedoutKeyValueBlock = TemplateSpacedoutKeyValueBlock.bind({});
25
+ SpacedoutKeyValueBlock.args = {
26
+ keyValues: {
27
+ 'Name': 'John Doe',
28
+ 'Date of birth': '14 Jan 1981',
29
+ 'Start of postcode': 'AB10',
28
30
  },
29
- ];
30
- export const KeyValueSubtitleBlock = () => {
31
- return `<tttx-keyvalue-block keyvalues='${JSON.stringify(keyValueArray)}' />`;
32
31
  };
33
- export const HorizontalKeyValueBlock = () => {
34
- return `<tttx-keyvalue-block horizontal='true' keyvalues='${JSON.stringify(keyValues)}' />`;
32
+ const TemplateKeyValueBlockArray = ({ keyValueArray }) => `<tttx-keyvalue-block keyvalues='${JSON.stringify(keyValueArray)}' />`;
33
+ export const BasicKeyValueBlockArray = TemplateKeyValueBlockArray.bind({});
34
+ BasicKeyValueBlockArray.args = {
35
+ keyValueArray: [
36
+ {
37
+ title: 'Electrical Designer',
38
+ subTitle: 'Satchwell',
39
+ data: '18 Oct 2021 - Present',
40
+ },
41
+ {
42
+ title: 'Electrical Inspector',
43
+ subTitle: 'Fastned',
44
+ data: '20 Dec 2016 - 10 Oct 2021',
45
+ },
46
+ {
47
+ title: 'Electrical Tech Prof I - Eng',
48
+ subTitle: 'Voltech',
49
+ data: '20 Dec 2009 - 20 Nov 2016',
50
+ },
51
+ ],
52
+ };
53
+ const TemplateHorizontalKeyValueBlockArray = ({ keyValueArray }) => `<tttx-keyvalue-block horizontal='true' keyvalues='${JSON.stringify(keyValueArray)}' />`;
54
+ export const HorizontalKeyValueBlockArray = TemplateHorizontalKeyValueBlockArray.bind({});
55
+ HorizontalKeyValueBlockArray.args = {
56
+ keyValueArray: [
57
+ {
58
+ title: 'Electrical Designer',
59
+ subTitle: 'Satchwell',
60
+ data: '18 Oct 2021 - Present',
61
+ },
62
+ {
63
+ title: 'Electrical Inspector',
64
+ subTitle: 'Fastned',
65
+ data: '20 Dec 2016 - 10 Oct 2021',
66
+ },
67
+ {
68
+ title: 'Electrical Tech Prof I - Eng',
69
+ subTitle: 'Voltech',
70
+ data: '20 Dec 2009 - 20 Nov 2016',
71
+ },
72
+ ],
35
73
  };
36
- export const HorizontalKeyValueSubtitleBlock = () => {
37
- return `<tttx-keyvalue-block horizontal='true' keyvalues='${JSON.stringify(keyValueArray)}' />`;
74
+ const TemplateSpacedoutKeyValueBlockArray = ({ keyValueArray }) => `<tttx-keyvalue-block spacedout='true' keyvalues='${JSON.stringify(keyValueArray)}' />`;
75
+ export const SpacedoutKeyValueBlockArray = TemplateSpacedoutKeyValueBlockArray.bind({});
76
+ SpacedoutKeyValueBlockArray.args = {
77
+ keyValueArray: [
78
+ {
79
+ title: 'Electrical Designer',
80
+ subTitle: 'Satchwell',
81
+ data: '18 Oct 2021 - Present',
82
+ },
83
+ {
84
+ title: 'Electrical Inspector',
85
+ subTitle: 'Fastned',
86
+ data: '20 Dec 2016 - 10 Oct 2021',
87
+ },
88
+ {
89
+ title: 'Electrical Tech Prof I - Eng',
90
+ subTitle: 'Voltech',
91
+ data: '20 Dec 2009 - 20 Nov 2016',
92
+ },
93
+ ],
38
94
  };
@@ -22,7 +22,7 @@ button {
22
22
  justify-content: left;
23
23
  align-items: center;
24
24
  font-size: 14px;
25
- font-weight: 400;
25
+ font-weight: 500;
26
26
  }
27
27
 
28
28
  .button-content {
@@ -1,4 +1,3 @@
1
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
1
  import { Host, h } from '@stencil/core';
3
2
  export class TttxTag {
4
3
  constructor() {
@@ -9,7 +9,7 @@ export default {
9
9
  color: {
10
10
  control: { type: 'text' },
11
11
  default: '#d5d5d5',
12
- }
12
+ },
13
13
  },
14
14
  };
15
15
  const Template = ({ text, color }) => {
@@ -4,14 +4,25 @@
4
4
  * displays the error message in an error bubble. If no error was detected,
5
5
  * it removes the "invalid" class from the input field and clears the error bubble.
6
6
  *
7
- * @param {HTMLInputElement} target - The input field to update.
7
+ * @param {FormField} target - The input field to update.
8
8
  * @param {boolean} hasError - Whether an error was detected in the field.
9
9
  * @param {string} errorMessage - The error message to display (if any).
10
10
  * @return {void}
11
11
  */
12
- function setErrorState(target, hasError, errorMessage) {
12
+ function setErrorState(target, hasError, errorMessage, parent = undefined) {
13
13
  // Find the error bubble element for the input field
14
- const errorBubble = target.parentElement.querySelector('.errorBubble');
14
+ let errorBubble;
15
+ if (parent !== undefined) {
16
+ errorBubble = parent.querySelector('.errorBubble');
17
+ }
18
+ else {
19
+ if (target.parentElement.nodeName.toLowerCase() === 'label') {
20
+ errorBubble = target.parentElement.querySelector('.errorBubble');
21
+ }
22
+ else {
23
+ errorBubble = target.parentElement.parentElement.querySelector('.errorBubble');
24
+ }
25
+ }
15
26
  // If an error was detected, set the input field's class to "invalid" and display the error message in the error bubble
16
27
  if (hasError) {
17
28
  target.classList.add('invalid');
@@ -3,8 +3,8 @@
3
3
  * sets an error message if there's an issue, and emits a "dataChanged" event to
4
4
  * the parent component with the field name and its new value.
5
5
  *
6
- * @param {Event} event - The focusout event triggered by the input field.
7
- * @return {void}
6
+ * @param {Event | FocusEvent} event - The focusout event triggered by the input field.
7
+ * @return {{ target: FormField; hasError: boolean; errorMessage: string; }}
8
8
  */
9
9
  function validityCheck(event) {
10
10
  var _a, _b, _c, _d;
@@ -13,17 +13,19 @@ function validityCheck(event) {
13
13
  let hasError = true;
14
14
  let errorMessage = '';
15
15
  // validity object on HTML5 inputs has the following options
16
- // badInput
17
- // customError
18
- // patternMismatch
19
- // rangeOverflow
20
- // rangeUnderflow
21
- // stepMismatch
22
- // tooLong
23
- // tooShort
24
- // typeMismatch
25
- // valid
26
- // valueMissing
16
+ /*
17
+ badInput
18
+ customError
19
+ patternMismatch
20
+ rangeOverflow
21
+ rangeUnderflow
22
+ stepMismatch
23
+ tooLong
24
+ tooShort
25
+ typeMismatch
26
+ valid
27
+ valueMissing
28
+ */
27
29
  // customErrors can be set with
28
30
  // target.setCustomValidity('custom error!');
29
31
  // and cleared with