@3t-transform/threeteeui 0.0.10 → 0.0.12

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 (93) hide show
  1. package/dist/cjs/{index-8a4cb9bc.js → index-61cd741f.js} +43 -88
  2. package/dist/cjs/loader.cjs.js +3 -4
  3. package/dist/cjs/tttx-button.cjs.entry.js +2 -2
  4. package/dist/cjs/tttx-checkbox.cjs.entry.js +3 -3
  5. package/dist/cjs/tttx-form.cjs.entry.js +169 -41
  6. package/dist/cjs/tttx-icon.cjs.entry.js +2 -2
  7. package/dist/cjs/tttx-list.cjs.entry.js +198 -0
  8. package/dist/cjs/tttx-loading-spinner.cjs.entry.js +4 -4
  9. package/dist/cjs/tttx-popover-content.cjs.entry.js +2 -2
  10. package/dist/cjs/tttx-standalone-input.cjs.entry.js +134 -0
  11. package/dist/cjs/tttx.cjs.js +3 -7
  12. package/dist/collection/collection-manifest.json +4 -3
  13. package/dist/collection/components/atoms/tttx-button/tttx-button.css +1 -0
  14. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +3 -3
  15. package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +3 -3
  16. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +15 -15
  17. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.css +1 -1
  18. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +2 -2
  19. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +1 -1
  20. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.js +1 -1
  21. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.stories.js +3 -3
  22. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.css +85 -39
  23. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +1 -1
  24. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +5 -5
  25. package/dist/collection/components/molecules/tttx-form/tttx-form.css +230 -0
  26. package/dist/collection/components/molecules/tttx-form/tttx-form.js +195 -55
  27. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +97 -28
  28. package/dist/collection/components/molecules/tttx-list/tttx-list.css +56 -0
  29. package/dist/collection/components/molecules/tttx-list/tttx-list.js +311 -0
  30. package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +37 -0
  31. package/dist/collection/components/molecules/{tttx-input/tttx-input.css → tttx-standalone-input/tttx-standalone-input.css} +77 -49
  32. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +561 -0
  33. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +156 -0
  34. package/dist/collection/components/palette.stories.js +81 -81
  35. package/dist/collection/docs/gettingstarted-developer.stories.js +4 -4
  36. package/dist/components/index.d.ts +2 -10
  37. package/dist/components/index.js +3 -2
  38. package/dist/components/tttx-button.js +1 -1
  39. package/dist/components/tttx-checkbox.js +2 -2
  40. package/dist/components/tttx-form.js +167 -39
  41. package/dist/components/tttx-icon2.js +1 -1
  42. package/dist/components/{tttx-input.d.ts → tttx-list.d.ts} +4 -4
  43. package/dist/components/tttx-list.js +225 -0
  44. package/dist/components/tttx-loading-spinner.js +1 -38
  45. package/dist/components/tttx-loading-spinner2.js +40 -0
  46. package/dist/components/tttx-popover-content.js +1 -1
  47. package/dist/components/tttx-standalone-input.d.ts +11 -0
  48. package/dist/components/tttx-standalone-input.js +178 -0
  49. package/dist/esm/{index-9654537d.js → index-d8718abe.js} +44 -88
  50. package/dist/esm/loader.js +3 -4
  51. package/dist/esm/polyfills/css-shim.js +1 -1
  52. package/dist/esm/tttx-button.entry.js +2 -2
  53. package/dist/esm/tttx-checkbox.entry.js +3 -3
  54. package/dist/esm/tttx-form.entry.js +169 -41
  55. package/dist/esm/tttx-icon.entry.js +2 -2
  56. package/dist/esm/tttx-list.entry.js +194 -0
  57. package/dist/esm/tttx-loading-spinner.entry.js +4 -4
  58. package/dist/esm/tttx-popover-content.entry.js +2 -2
  59. package/dist/esm/tttx-standalone-input.entry.js +130 -0
  60. package/dist/esm/tttx.js +3 -4
  61. package/dist/tttx/p-1b6b4223.entry.js +1 -0
  62. package/dist/tttx/p-1ea7e424.entry.js +1 -0
  63. package/dist/tttx/{p-3cb692d6.entry.js → p-629411bc.entry.js} +1 -1
  64. package/dist/tttx/p-7d84c410.entry.js +1 -0
  65. package/dist/tttx/p-80bbe164.js +2 -0
  66. package/dist/tttx/{p-1884203f.entry.js → p-daa82b1b.entry.js} +1 -1
  67. package/dist/tttx/p-db1f56ba.entry.js +1 -0
  68. package/dist/tttx/p-dee50f14.entry.js +1 -0
  69. package/dist/tttx/{p-674e2f18.entry.js → p-e5c02c27.entry.js} +1 -1
  70. package/dist/tttx/tttx.esm.js +1 -1
  71. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +14 -7
  72. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +1 -8
  73. package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +51 -0
  74. package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +13 -0
  75. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +38 -0
  76. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +106 -0
  77. package/dist/types/components.d.ts +88 -39
  78. package/dist/types/stencil-public-runtime.d.ts +3 -59
  79. package/loader/index.d.ts +0 -9
  80. package/package.json +67 -65
  81. package/readme.md +89 -86
  82. package/dist/cjs/tttx-input.cjs.entry.js +0 -44
  83. package/dist/collection/components/molecules/tttx-input/tttx-input.js +0 -259
  84. package/dist/collection/components/molecules/tttx-input/tttx-input.stories.js +0 -106
  85. package/dist/components/tttx-input.js +0 -77
  86. package/dist/esm/tttx-input.entry.js +0 -40
  87. package/dist/tttx/p-317b13d3.entry.js +0 -1
  88. package/dist/tttx/p-3cd7ad04.entry.js +0 -1
  89. package/dist/tttx/p-b6cc2780.js +0 -2
  90. package/dist/tttx/p-f30a0e84.entry.js +0 -1
  91. package/dist/tttx/p-f4855113.entry.js +0 -1
  92. package/dist/types/components/molecules/tttx-input/tttx-input.d.ts +0 -20
  93. package/dist/types/components/molecules/tttx-input/tttx-input.stories.d.ts +0 -60
@@ -63,18 +63,6 @@ const isComplexType = (o) => {
63
63
  o = typeof o;
64
64
  return o === 'object' || o === 'function';
65
65
  };
66
- /**
67
- * Helper method for querying a `meta` tag that contains a nonce value
68
- * out of a DOM's head.
69
- *
70
- * @param doc The DOM containing the `head` to query against
71
- * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
72
- * exists or the tag has no content.
73
- */
74
- function queryNonceMetaTagContent(doc) {
75
- var _a, _b, _c;
76
- return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
77
- }
78
66
  /**
79
67
  * Production h() function based on Preact by
80
68
  * Jason Miller (@developit)
@@ -83,6 +71,7 @@ function queryNonceMetaTagContent(doc) {
83
71
  *
84
72
  * Modified for Stencil's compiler and vdom
85
73
  */
74
+ // const stack: any[] = [];
86
75
  // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
87
76
  // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
88
77
  const h = (nodeName, vnodeData, ...children) => {
@@ -133,14 +122,6 @@ const h = (nodeName, vnodeData, ...children) => {
133
122
  }
134
123
  return vnode;
135
124
  };
136
- /**
137
- * A utility function for creating a virtual DOM node from a tag and some
138
- * possible text content.
139
- *
140
- * @param tag the tag for this element
141
- * @param text possible text content for the node
142
- * @returns a newly-minted virtual DOM node
143
- */
144
125
  const newVNode = (tag, text) => {
145
126
  const vnode = {
146
127
  $flags$: 0,
@@ -155,12 +136,6 @@ const newVNode = (tag, text) => {
155
136
  return vnode;
156
137
  };
157
138
  const Host = {};
158
- /**
159
- * Check whether a given node is a Host node or not
160
- *
161
- * @param node the virtual DOM node to check
162
- * @returns whether it's a Host node or not
163
- */
164
139
  const isHost = (node) => node && node.$tag$ === Host;
165
140
  /**
166
141
  * Parse a new property value for a given property type.
@@ -249,7 +224,6 @@ const registerStyle = (scopeId, cssText, allowCS) => {
249
224
  styles.set(scopeId, style);
250
225
  };
251
226
  const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
252
- var _a;
253
227
  let scopeId = getScopeId(cmpMeta);
254
228
  const style = styles.get(scopeId);
255
229
  // if an element is NOT connected then getRootNode() will return the wrong root node
@@ -269,11 +243,6 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
269
243
  styleElm = doc.createElement('style');
270
244
  styleElm.innerHTML = style;
271
245
  }
272
- // Apply CSP nonce to the style tag if it exists
273
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
274
- if (nonce != null) {
275
- styleElm.setAttribute('nonce', nonce);
276
- }
277
246
  styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
278
247
  }
279
248
  if (appliedStyles) {
@@ -303,6 +272,9 @@ const attachStyles = (hostRef) => {
303
272
  // DOM WRITE!!
304
273
  elm['s-sc'] = scopeId;
305
274
  elm.classList.add(scopeId + '-h');
275
+ if (flags & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
276
+ elm.classList.add(scopeId + '-s');
277
+ }
306
278
  }
307
279
  endAttachStyles();
308
280
  };
@@ -478,21 +450,6 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
478
450
  }
479
451
  return elm;
480
452
  };
481
- /**
482
- * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
483
- * add them to the DOM in the appropriate place.
484
- *
485
- * @param parentElm the DOM node which should be used as a parent for the new
486
- * DOM nodes
487
- * @param before a child of the `parentElm` which the new children should be
488
- * inserted before (optional)
489
- * @param parentVNode the parent virtual DOM node
490
- * @param vnodes the new child virtual DOM nodes to produce DOM nodes for
491
- * @param startIdx the index in the child virtual DOM nodes at which to start
492
- * creating DOM nodes (inclusive)
493
- * @param endIdx the index in the child virtual DOM nodes at which to stop
494
- * creating DOM nodes (inclusive)
495
- */
496
453
  const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
497
454
  let containerElm = (parentElm);
498
455
  let childNode;
@@ -509,19 +466,6 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
509
466
  }
510
467
  }
511
468
  };
512
- /**
513
- * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
514
- * This can be used to, for instance, clean up after a list of children which
515
- * should no longer be shown.
516
- *
517
- * This function also handles some of Stencil's slot relocation logic.
518
- *
519
- * @param vnodes a list of virtual DOM nodes to remove
520
- * @param startIdx the index at which to start removing nodes (inclusive)
521
- * @param endIdx the index at which to stop removing nodes (inclusive)
522
- * @param vnode a VNode
523
- * @param elm an element
524
- */
525
469
  const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
526
470
  for (; startIdx <= endIdx; ++startIdx) {
527
471
  if ((vnode = vnodes[startIdx])) {
@@ -714,8 +658,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
714
658
  *
715
659
  * So, in other words, if `key` attrs are not set on VNodes which may be
716
660
  * changing order within a `children` array or something along those lines then
717
- * we could obtain a false negative and then have to do needless re-rendering
718
- * (i.e. we'd say two VNodes aren't equal when in fact they should be).
661
+ * we could obtain a false positive and then have to do needless re-rendering.
719
662
  *
720
663
  * @param leftVNode the first VNode to check
721
664
  * @param rightVNode the second VNode to check
@@ -785,18 +728,6 @@ const callNodeRefs = (vNode) => {
785
728
  vNode.$children$ && vNode.$children$.map(callNodeRefs);
786
729
  }
787
730
  };
788
- /**
789
- * The main entry point for Stencil's virtual DOM-based rendering engine
790
- *
791
- * Given a {@link d.HostRef} container and some virtual DOM nodes, this
792
- * function will handle creating a virtual DOM tree with a single root, patching
793
- * the current virtual DOM tree onto an old one (if any), dealing with slot
794
- * relocation, and reflecting attributes.
795
- *
796
- * @param hostRef data needed to root and render the virtual DOM tree, such as
797
- * the DOM node into which it should be rendered.
798
- * @param renderFnResults the virtual DOM nodes to be rendered
799
- */
800
731
  const renderVdom = (hostRef, renderFnResults) => {
801
732
  const hostElm = hostRef.$hostElement$;
802
733
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
@@ -848,6 +779,9 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
848
779
  promise = safeCall(instance, 'componentWillLoad');
849
780
  }
850
781
  }
782
+ {
783
+ promise = then(promise, () => safeCall(instance, 'componentWillRender'));
784
+ }
851
785
  endSchedule();
852
786
  return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
853
787
  };
@@ -917,6 +851,9 @@ const postUpdateComponent = (hostRef) => {
917
851
  const endPostUpdate = createTime('postUpdate', tagName);
918
852
  const instance = hostRef.$lazyInstance$ ;
919
853
  const ancestorComponent = hostRef.$ancestorComponent$;
854
+ {
855
+ safeCall(instance, 'componentDidRender');
856
+ }
920
857
  if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
921
858
  hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
922
859
  {
@@ -981,6 +918,7 @@ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propNam
981
918
  const setValue = (ref, propName, newVal, cmpMeta) => {
982
919
  // check our new property value against our internal value
983
920
  const hostRef = getHostRef(ref);
921
+ const elm = hostRef.$hostElement$ ;
984
922
  const oldVal = hostRef.$instanceValues$.get(propName);
985
923
  const flags = hostRef.$flags$;
986
924
  const instance = hostRef.$lazyInstance$ ;
@@ -993,6 +931,22 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
993
931
  // set our new value!
994
932
  hostRef.$instanceValues$.set(propName, newVal);
995
933
  if (instance) {
934
+ // get an array of method names of watch functions to call
935
+ if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
936
+ const watchMethods = cmpMeta.$watchers$[propName];
937
+ if (watchMethods) {
938
+ // this instance is watching for when this property changed
939
+ watchMethods.map((watchMethodName) => {
940
+ try {
941
+ // fire off each of the watch methods that are watching this property
942
+ instance[watchMethodName](newVal, oldVal, propName);
943
+ }
944
+ catch (e) {
945
+ consoleError(e, elm);
946
+ }
947
+ });
948
+ }
949
+ }
996
950
  if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
997
951
  // looks like this value actually changed, so we've got work to do!
998
952
  // but only if we've already rendered, otherwise just chill out
@@ -1015,6 +969,9 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1015
969
  */
1016
970
  const proxyComponent = (Cstr, cmpMeta, flags) => {
1017
971
  if (cmpMeta.$members$) {
972
+ if (Cstr.watchers) {
973
+ cmpMeta.$watchers$ = Cstr.watchers;
974
+ }
1018
975
  // It's better to have a const than two Object.entries()
1019
976
  const members = Object.entries(cmpMeta.$members$);
1020
977
  const prototype = Cstr.prototype;
@@ -1119,6 +1076,12 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1119
1076
  endLoad();
1120
1077
  }
1121
1078
  if (!Cstr.isProxied) {
1079
+ // we've never proxied this Constructor before
1080
+ // let's add the getters/setters to its prototype before
1081
+ // the first time we create an instance of the implementation
1082
+ {
1083
+ cmpMeta.$watchers$ = Cstr.watchers;
1084
+ }
1122
1085
  proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
1123
1086
  Cstr.isProxied = true;
1124
1087
  }
@@ -1142,6 +1105,9 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
1142
1105
  {
1143
1106
  hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
1144
1107
  }
1108
+ {
1109
+ hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
1110
+ }
1145
1111
  endNewInstance();
1146
1112
  }
1147
1113
  if (Cstr.style) {
@@ -1234,7 +1200,6 @@ const disconnectedCallback = (elm) => {
1234
1200
  }
1235
1201
  };
1236
1202
  const bootstrapLazy = (lazyBundles, options = {}) => {
1237
- var _a;
1238
1203
  const endBootstrap = createTime();
1239
1204
  const cmpTags = [];
1240
1205
  const exclude = options.exclude || [];
@@ -1261,6 +1226,9 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1261
1226
  {
1262
1227
  cmpMeta.$listeners$ = compactMeta[3];
1263
1228
  }
1229
+ {
1230
+ cmpMeta.$watchers$ = {};
1231
+ }
1264
1232
  const tagName = cmpMeta.$tagName$;
1265
1233
  const HostElement = class extends HTMLElement {
1266
1234
  // StencilLazyHost
@@ -1311,11 +1279,6 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1311
1279
  {
1312
1280
  visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
1313
1281
  visibilityStyle.setAttribute('data-styles', '');
1314
- // Apply CSP nonce to the style tag if it exists
1315
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
1316
- if (nonce != null) {
1317
- visibilityStyle.setAttribute('nonce', nonce);
1318
- }
1319
1282
  head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
1320
1283
  }
1321
1284
  // Process deferred connectedCallbacks now all components have been registered
@@ -1365,13 +1328,6 @@ const getHostListenerTarget = (elm, flags) => {
1365
1328
  };
1366
1329
  // prettier-ignore
1367
1330
  const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
1368
- /**
1369
- * Assigns the given value to the nonce property on the runtime platform object.
1370
- * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
1371
- * @param nonce The value to be assigned to the platform nonce property.
1372
- * @returns void
1373
- */
1374
- const setNonce = (nonce) => (plt.$nonce$ = nonce);
1375
1331
  const hostRefs = /*@__PURE__*/ new WeakMap();
1376
1332
  const getHostRef = (ref) => hostRefs.get(ref);
1377
1333
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
@@ -1486,4 +1442,3 @@ exports.getElement = getElement;
1486
1442
  exports.h = h;
1487
1443
  exports.promiseResolve = promiseResolve;
1488
1444
  exports.registerInstance = registerInstance;
1489
- exports.setNonce = setNonce;
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-8a4cb9bc.js');
5
+ const index = require('./index-61cd741f.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Esm v2.20.0 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
  const patchEsm = () => {
11
11
  return index.promiseResolve();
@@ -14,9 +14,8 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["tttx-input.cjs",[[1,"tttx-input",{"label":[1],"valid":[4],"showerrormsg":[4],"errormsg":[1],"value":[1025],"type":[1],"placeholder":[1],"pattern":[1],"iconleft":[1],"iconright":[1],"required":[4],"isfocused":[32]}]]],["tttx-button.cjs",[[1,"tttx-button",{"fontColor":[1,"font-color"],"buttonStyle":[1,"button-style"]},[[0,"clickEvent","onClicked"]]]]],["tttx-checkbox.cjs",[[1,"tttx-checkbox",{"value":[4],"label":[1],"required":[4]}]]],["tttx-form.cjs",[[1,"tttx-form",{"dataAttribute":[1,"data-attribute"],"functionAttribute":[1,"function-attribute"]}]]],["tttx-loading-spinner.cjs",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-popover-content.cjs",[[1,"tttx-popover-content",{"header":[1],"body":[1],"linkcontext":[1],"linktext":[1]}]]],["tttx-icon.cjs",[[1,"tttx-icon",{"icon":[1],"colour":[1]},[[4,"click","handleDocumentClick"]]]]]], options);
17
+ return index.bootstrapLazy([["tttx-list.cjs",[[1,"tttx-list",{"name":[1],"selectable":[4],"items":[32],"selectedIds":[32],"loading":[32],"lastPage":[32]},[[4,"listPageLoad","listLoadHandler"],[4,"listClearDataCache","listClearDataCacheHandler"],[4,"listActionSelectedEvent","listActionSelectedEventHandler"]]]]],["tttx-standalone-input.cjs",[[2,"tttx-standalone-input",{"label":[1],"valid":[4],"showerrormsg":[4],"errormsg":[1],"iconleft":[1],"iconright":[1],"autocapitalize":[1],"autocomplete":[1],"autofocus":[4],"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],"isfocused":[32]}]]],["tttx-button.cjs",[[1,"tttx-button",{"fontColor":[1,"font-color"],"buttonStyle":[1,"button-style"]},[[0,"clickEvent","onClicked"]]]]],["tttx-checkbox.cjs",[[1,"tttx-checkbox",{"value":[4],"label":[1],"required":[4]}]]],["tttx-form.cjs",[[1,"tttx-form",{"formschema":[8],"submitValue":[8,"submit-value"]}]]],["tttx-popover-content.cjs",[[1,"tttx-popover-content",{"header":[1],"body":[1],"linkcontext":[1],"linktext":[1]}]]],["tttx-icon.cjs",[[1,"tttx-icon",{"icon":[1],"colour":[1]},[[4,"click","handleDocumentClick"]]]]],["tttx-loading-spinner.cjs",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]]], options);
18
18
  });
19
19
  };
20
20
 
21
- exports.setNonce = index.setNonce;
22
21
  exports.defineCustomElements = defineCustomElements;
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-8a4cb9bc.js');
5
+ const index = require('./index-61cd741f.js');
6
6
 
7
- const tttxButtonCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.button{height:36px;padding:8px 16px;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:hover{background:#f0f0f0}.button:active{background:#e3e3e3}.primary-blue{background:#1479c6;border:1px solid #1479c6}.primary-blue:hover{background:#1169ba}.primary-blue:active{background:#0951a8}.secondary-white{background:white;border:1px solid #212121}:host{display:inline-block}.spacingleft{margin-left:8px}.font-white{color:white}.font-black{color:#212121}";
7
+ const tttxButtonCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.button{height:36px;padding:8px 16px;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:hover{background:#f0f0f0}.button:active{background:#e3e3e3}.primary-blue{background:#1479c6;border:1px solid #1479c6;color:white}.primary-blue:hover{background:#1169ba}.primary-blue:active{background:#0951a8}.secondary-white{background:white;border:1px solid #212121}:host{display:inline-block}.spacingleft{margin-left:8px}.font-white{color:white}.font-black{color:#212121}";
8
8
 
9
9
  const TttxButton = class {
10
10
  constructor(hostRef) {
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-8a4cb9bc.js');
5
+ const index = require('./index-61cd741f.js');
6
6
 
7
- const tttxCheckboxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{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}.field{clear:both}.container{display:flex;flex-wrap:wrap;box-sizing:border-box;height:36px;border:1px solid #c8c8c8;border-radius:4px}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.input{flex-grow:1;border:none;outline:none;font-size:16px;padding:8px 16px;background-color:transparent}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.label{display:block;height:18px;font-weight:600;color:#212121;font-size:16px;margin-bottom:4px;z-index:1}.disabled{background:#f0f0f0;color:#9e9e9e;border-color:#c8c8c8}.focused{border-color:#1479c6}.errormsg{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;border-radius:none;z-index:2;color:#DC0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#DC0000}.danger{color:#DC0000}.optional{color:#757575;font-weight:normal}:host{display:block}.spacing{margin-bottom:16px}";
7
+ const tttxCheckboxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{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}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.icon-right{margin-top:5px;margin-right:4px}.icon-left{margin-top:5px;margin-left:4px}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.focused{border-color:#1479c6}.errormsg{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;border-radius:none;z-index:2;color:#dc0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger{color:#dc0000}.optional{color:#757575;font-weight:normal}label.inputBlock{display:block;position:relative;line-height:21px}label{font-weight:500;font-size:16px}input:not([type=submit]){font-family:\"Roboto\", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}input[type=date]{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}input.invalid:invalid,input.standalone.invalid{border:1px solid #dc0000}input~.errorBubble{min-height:27px;position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center}input~.errorBubble:not(.visible){visibility:hidden}input~.errorBubble span{color:#dc0000;font-size:16px;margin-right:4px;height:16px}input.invalid:invalid~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;visibility:visible}input:focus{border-color:#1479c6}:host{display:block}.spacing{margin-bottom:16px}";
8
8
 
9
9
  const TttxCheckbox = class {
10
10
  constructor(hostRef) {
@@ -20,7 +20,7 @@ const TttxCheckbox = class {
20
20
  this.valueChanged.emit(target.checked);
21
21
  }
22
22
  render() {
23
- return (index.h(index.Host, null, index.h("div", { class: "field spacing" }, this.label && index.h("label", { class: "label" }, this.label, !this.required ? index.h("span", { class: "optional" }, " (optional)") : ''), index.h("input", { type: "checkbox", class: "input", onChange: event => this.handleClick(event), checked: this.value }))));
23
+ return (index.h(index.Host, null, index.h("div", { class: "field spacing" }, this.label && (index.h("label", { class: "label" }, this.label, !this.required ? index.h("span", { class: "optional" }, " (optional)") : '')), index.h("input", { type: "checkbox", class: "input", onChange: event => this.handleClick(event), checked: this.value }))));
24
24
  }
25
25
  };
26
26
  TttxCheckbox.style = tttxCheckboxCss;
@@ -2,57 +2,185 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-8a4cb9bc.js');
5
+ const index = require('./index-61cd741f.js');
6
+
7
+ const tttxFormCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{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}.icon-left,.icon-right{flex-basis:24px}.icon-left span,.icon-right span{font-size:24px;line-height:24px;text-align:center;display:block;width:24px;height:24px;margin-top:4px}.icon-left span{margin-left:4px}.icon-right span{margin-right:4px}.icon-right{margin-top:5px;margin-right:4px}.icon-left{margin-top:5px;margin-left:4px}.iconleft .input{padding-left:4px}.iconright .input{padding-right:4px}.focused{border-color:#1479c6}.errormsg{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;border-radius:none;z-index:2;color:#dc0000}.errormsg .validationicon{width:16px;height:16px;font-size:16px;margin-right:4px;vertical-align:middle;color:#dc0000}.danger{color:#dc0000}.optional{color:#757575;font-weight:normal}label.inputBlock{display:block;position:relative;line-height:21px}label{font-weight:500;font-size:16px}input:not([type=submit]){font-family:\"Roboto\", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}input[type=date]{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}input.invalid:invalid,input.standalone.invalid{border:1px solid #dc0000}input~.errorBubble{min-height:27px;position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center}input~.errorBubble:not(.visible){visibility:hidden}input~.errorBubble span{color:#dc0000;font-size:16px;margin-right:4px;height:16px}input.invalid:invalid~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;visibility:visible}input:focus{border-color:#1479c6}.button{height:36px;padding:8px 16px;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:hover{background:#f0f0f0}.button:active{background:#e3e3e3}.primary-blue{background:#1479c6;border:1px solid #1479c6;color:white}.primary-blue:hover{background:#1169ba}.primary-blue:active{background:#0951a8}.secondary-white{background:white;border:1px solid #212121}:host{display:block}fieldset{margin:0;padding:0;border:none}input[type=submit]{margin-left:auto}";
6
8
 
7
9
  const TttxForm = class {
8
10
  constructor(hostRef) {
9
11
  index.registerInstance(this, hostRef);
10
- this.formSubmit = index.createEvent(this, "formSubmit", 7);
11
- this.fetchFormData = () => {
12
- let validForm = true;
13
- const formData = {};
14
- const elements = this.el.querySelectorAll(`[${this.dataAttribute}]`);
15
- elements.forEach((element) => {
16
- const inputElement = element;
17
- validForm = validForm ? this.validateFormField(inputElement) : false;
18
- formData[inputElement.getAttribute(this.dataAttribute)] = inputElement.value;
19
- });
20
- return validForm ? formData : null;
21
- };
22
- this.dataAttribute = 'form-data';
23
- this.functionAttribute = 'function-data';
24
- }
25
- validateFormField(element) {
26
- let isValid = true;
27
- const isRequired = element.hasAttribute("required");
28
- if (isRequired && !element.value) {
29
- // required and not set, show error
30
- element.setAttribute("showerrormsg", "true");
31
- isValid = false;
12
+ this.submitEvent = index.createEvent(this, "submitEvent", 7);
13
+ this.template = document.createElement('template');
14
+ this.formschema = undefined;
15
+ this.submitValue = undefined;
16
+ }
17
+ onFormSchemaChange(newValue) {
18
+ if (typeof newValue === 'string') {
19
+ this._formSchema = JSON.parse(newValue);
20
+ }
21
+ else {
22
+ this._formSchema = newValue;
23
+ }
24
+ }
25
+ validityCheck(event) {
26
+ var _a, _b, _c, _d;
27
+ event.preventDefault();
28
+ const target = event.target;
29
+ let hasError = true;
30
+ let errorMessage = '';
31
+ // validity object on HTML5 inputs has the following options
32
+ // badInput
33
+ // customError
34
+ // patternMismatch
35
+ // rangeOverflow
36
+ // rangeUnderflow
37
+ // stepMismatch
38
+ // tooLong
39
+ // tooShort
40
+ // typeMismatch
41
+ // valid
42
+ // valueMissing
43
+ // customErrors can be set with
44
+ // target.setCustomValidity('custom error!');
45
+ // and cleared with
46
+ // target.setCustomValidity('');
47
+ if (target.validity.valueMissing) {
48
+ errorMessage = (_a = target.dataset.required) !== null && _a !== void 0 ? _a : 'This field is required';
49
+ }
50
+ else if (target.validity.patternMismatch) {
51
+ errorMessage = (_b = target.dataset.pattern) !== null && _b !== void 0 ? _b : 'Incorrect format';
52
+ }
53
+ else if (target.validity.badInput) {
54
+ // IE string in a number field
55
+ errorMessage = (_c = target.dataset.badinput) !== null && _c !== void 0 ? _c : 'Wrong input type';
56
+ }
57
+ else if (target.validity.rangeOverflow || target.validity.rangeUnderflow) {
58
+ // IE date or number is above or below value set in min or max tags
59
+ errorMessage = (_d = target.dataset.range) !== null && _d !== void 0 ? _d : 'Invalid value';
60
+ }
61
+ else {
62
+ // no error
63
+ hasError = false;
64
+ }
65
+ if (hasError) {
66
+ target.className = 'invalid';
67
+ const errorIcon = document.createElement('span');
68
+ errorIcon.className = 'material-symbols-rounded';
69
+ errorIcon.textContent = 'warning';
70
+ target.parentElement.querySelector('.errorBubble').replaceChildren();
71
+ target.parentElement.querySelector('.errorBubble').append(errorIcon);
72
+ target.parentElement.querySelector('.errorBubble').append(errorMessage);
32
73
  }
33
74
  else {
34
- // required and set, ensure error does not show
35
- element.removeAttribute("showerrormsg");
36
- }
37
- return isValid;
38
- }
39
- componentDidLoad() {
40
- const elements = this.el.querySelectorAll(`[${this.functionAttribute}]`);
41
- elements.forEach((element) => {
42
- element.addEventListener('click', event => {
43
- event.preventDefault();
44
- const formData = this.fetchFormData();
45
- if (formData) {
46
- // only emit event if form data is valid
47
- this.formSubmit.emit(this.fetchFormData());
75
+ target.className = '';
76
+ target.parentElement.querySelector('.errorBubble').replaceChildren();
77
+ }
78
+ }
79
+ doSubmit(event) {
80
+ event.preventDefault();
81
+ const formData = new FormData(event.target);
82
+ // Key value pair matching the key names given by the JSON schema will be output line by line
83
+ // TODO: Emit an event so external components can handle the resulting form data
84
+ // let output = "";
85
+ // for (var [key, value] of formData.entries()) {
86
+ // output += `${key} -> ${value}\n`;
87
+ // }
88
+ // console.log(output);
89
+ this.submitEvent.emit(formData);
90
+ }
91
+ fieldsetChange(event) {
92
+ console.log(event.target.name + ' has changed');
93
+ // The correct input box will always be the target of the incoming event
94
+ // TODO: Emit an event so external components can change based on form values input
95
+ }
96
+ componentWillLoad() {
97
+ // set proper on initial render
98
+ this.onFormSchemaChange(this.formschema);
99
+ }
100
+ componentWillRender() {
101
+ this.template.content.replaceChildren(); // clear the template to account for a potential re-render scenario
102
+ this.populateFormFromSchema();
103
+ }
104
+ populateFormFromSchema() {
105
+ if (!this._formSchema)
106
+ return;
107
+ const properties = this._formSchema.properties;
108
+ const propertyKeys = Object.keys(properties);
109
+ propertyKeys.forEach(formKey => {
110
+ var _a, _b, _c;
111
+ const formItem = properties[formKey];
112
+ const formProperties = formItem.form;
113
+ const input = document.createElement('input');
114
+ input.name = formKey;
115
+ input.type = formProperties.type;
116
+ input.placeholder = (_a = formProperties.placeholder) !== null && _a !== void 0 ? _a : '';
117
+ input.autocomplete = 'off';
118
+ input.autocapitalize = 'off';
119
+ if (formProperties.validation) {
120
+ const validation = formProperties.validation;
121
+ if (validation.required) {
122
+ input.setAttribute('required', '');
123
+ input.setAttribute('data-required', (_b = validation.required.message) !== null && _b !== void 0 ? _b : '');
48
124
  }
49
- });
125
+ if (validation.pattern) {
126
+ input.setAttribute('pattern', validation.pattern.pattern);
127
+ input.setAttribute('data-pattern', (_c = validation.pattern.message) !== null && _c !== void 0 ? _c : '');
128
+ }
129
+ if (validation.badInput) {
130
+ input.setAttribute('data-badinput', validation.badInput.message);
131
+ }
132
+ if (validation.minmax) {
133
+ input.setAttribute('min', validation.minmax.min);
134
+ input.setAttribute('max', validation.minmax.max);
135
+ input.setAttribute('data-range', validation.minmax.message);
136
+ }
137
+ if (validation.maxlength) {
138
+ input.setAttribute('maxlength', validation.maxlength);
139
+ }
140
+ }
141
+ const errorBubble = document.createElement('div');
142
+ errorBubble.className = 'errorBubble';
143
+ const label = document.createElement('label');
144
+ label.className = 'inputBlock';
145
+ label.innerText = formProperties.label;
146
+ if (!formProperties.validation) {
147
+ const optionalSpan = document.createElement('span');
148
+ optionalSpan.className = 'optional';
149
+ optionalSpan.innerHTML = '&nbsp;(optional)';
150
+ label.appendChild(optionalSpan);
151
+ }
152
+ label.appendChild(input);
153
+ label.appendChild(errorBubble);
154
+ this.template.content.append(label);
155
+ });
156
+ const submitButton = document.createElement('input');
157
+ submitButton.type = 'submit';
158
+ submitButton.className = 'button primary-blue';
159
+ console.log(this.submitValue);
160
+ submitButton.value = 'Save';
161
+ this.template.content.append(submitButton);
162
+ }
163
+ componentDidRender() {
164
+ if (!this._formSchema)
165
+ return;
166
+ const formItems = this.template.content.cloneNode(true);
167
+ // bind to events here as you can't do it in a template in stencil
168
+ const properties = this._formSchema.properties;
169
+ const propertyKeys = Object.keys(properties);
170
+ propertyKeys.forEach(formKey => {
171
+ formItems.querySelector(`[name=${formKey}]`).oninvalid = this.validityCheck.bind(this);
172
+ formItems.querySelector(`[name=${formKey}]`).onblur = this.validityCheck.bind(this);
50
173
  });
174
+ // append to the fieldset
175
+ this.fieldset.appendChild(formItems);
51
176
  }
52
177
  render() {
53
- return (index.h("div", null, index.h("slot", null)));
178
+ return (index.h(index.Host, null, index.h("form", { onSubmit: this.doSubmit.bind(this) }, index.h("fieldset", { onChange: this.fieldsetChange, ref: el => (this.fieldset = el) }))));
54
179
  }
55
- get el() { return index.getElement(this); }
56
- };
180
+ static get watchers() { return {
181
+ "formschema": ["onFormSchemaChange"]
182
+ }; }
183
+ };
184
+ TttxForm.style = tttxFormCss;
57
185
 
58
186
  exports.tttx_form = TttxForm;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-8a4cb9bc.js');
5
+ const index = require('./index-61cd741f.js');
6
6
 
7
7
  var top = 'top';
8
8
  var bottom = 'bottom';
@@ -1801,7 +1801,7 @@ var createPopper = /*#__PURE__*/popperGenerator({
1801
1801
  defaultModifiers: defaultModifiers
1802
1802
  }); // eslint-disable-next-line import/no-unused-modules
1803
1803
 
1804
- const tttxIconCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{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}:host{display:block}.tooltip{background:#ffffff;color:#343434;font-weight:bold;padding:8px 16px;font-size:13px;border-radius:4px;box-shadow:0 0 5px 1px rgba(0, 0, 0, 0.3);display:none}.tooltip[data-show]{display:block}.arrow,.arrow::before{position:absolute;width:8px;height:8px;background:inherit}.arrow{visibility:hidden}.arrow::before{visibility:visible;content:\"\";transform:rotate(45deg)}.tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}.tooltip[data-popper-placement^=left]>.arrow{right:-4px}.tooltip[data-popper-placement^=right]>.arrow{left:-4px}.red{color:#DC0000}.orange{color:#F59500}.blue{color:#1479c6}.green{color:#A2BB31}.gray{color:#757575}.black{color:#212121}.white{color:white}.clickable{cursor:pointer}";
1804
+ const tttxIconCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{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}:host{display:block}.tooltip{background:#ffffff;color:#343434;font-weight:bold;padding:8px 16px;font-size:13px;border-radius:4px;box-shadow:0 0 5px 1px rgba(0, 0, 0, 0.3);display:none}.tooltip[data-show]{display:block}.arrow,.arrow::before{position:absolute;width:8px;height:8px;background:inherit}.arrow{visibility:hidden}.arrow::before{visibility:visible;content:\"\";transform:rotate(45deg)}.tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}.tooltip[data-popper-placement^=left]>.arrow{right:-4px}.tooltip[data-popper-placement^=right]>.arrow{left:-4px}.red{color:#dc0000}.orange{color:#f59500}.blue{color:#1479c6}.green{color:#a2bb31}.gray{color:#757575}.black{color:#212121}.white{color:white}.clickable{cursor:pointer}";
1805
1805
 
1806
1806
  const TttxIcon = class {
1807
1807
  constructor(hostRef) {