q2-tecton-elements 1.21.1 → 1.22.0

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 (152) hide show
  1. package/dist/cjs/installCanvasRenderer-b4d10c92.js +38433 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/q2-badge_2.cjs.entry.js +6 -4
  4. package/dist/cjs/q2-calendar.cjs.entry.js +75 -55
  5. package/dist/cjs/q2-carousel.cjs.entry.js +3 -3
  6. package/dist/cjs/q2-chart-bar.cjs.entry.js +4679 -0
  7. package/dist/cjs/q2-chart-donut.cjs.entry.js +357 -35592
  8. package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
  9. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  10. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  11. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  12. package/dist/collection/collection-manifest.json +1 -0
  13. package/dist/collection/components/q2-calendar/index.js +43 -2
  14. package/dist/collection/components/q2-chart-bar/index.js +466 -0
  15. package/dist/collection/components/q2-chart-bar/styles.css +85 -0
  16. package/dist/collection/components/q2-chart-donut/index.js +3 -3
  17. package/dist/collection/components/q2-checkbox/styles.css +5 -1
  18. package/dist/collection/components/q2-editable-field/styles.css +1 -1
  19. package/dist/collection/components/q2-input/formatting/phone.js +3 -3
  20. package/dist/collection/components/q2-input/index.js +21 -0
  21. package/dist/collection/components/q2-input/styles.css +2 -2
  22. package/dist/collection/components/q2-radio/styles.css +1 -1
  23. package/dist/collection/utils/charting.js +182 -0
  24. package/dist/components/click-elsewhere.d.ts +11 -0
  25. package/dist/components/click-elsewhere.js +6 -0
  26. package/dist/components/index.d.ts +62 -0
  27. package/dist/components/index.js +42 -0
  28. package/dist/components/index10.js +84 -0
  29. package/dist/components/index11.js +383 -0
  30. package/dist/components/index12.js +125 -0
  31. package/dist/components/index13.js +602 -0
  32. package/dist/components/index2.js +100 -0
  33. package/dist/components/index3.js +90 -0
  34. package/dist/components/index4.js +62 -0
  35. package/dist/components/index5.js +146 -0
  36. package/dist/components/index6.js +145 -0
  37. package/dist/components/index7.js +2960 -0
  38. package/dist/components/index8.js +3356 -0
  39. package/dist/components/index9.js +101 -0
  40. package/dist/components/installCanvasRenderer.js +38282 -0
  41. package/dist/components/q2-avatar.d.ts +11 -0
  42. package/dist/components/q2-avatar.js +6 -0
  43. package/dist/components/q2-badge.d.ts +11 -0
  44. package/dist/components/q2-badge.js +6 -0
  45. package/dist/components/q2-btn.d.ts +11 -0
  46. package/dist/components/q2-btn.js +6 -0
  47. package/dist/components/q2-calendar.d.ts +11 -0
  48. package/dist/components/q2-calendar.js +3755 -0
  49. package/dist/components/q2-card.d.ts +11 -0
  50. package/dist/components/q2-card.js +187 -0
  51. package/dist/components/q2-carousel-pane.d.ts +11 -0
  52. package/dist/components/q2-carousel-pane.js +97 -0
  53. package/dist/components/q2-carousel.d.ts +11 -0
  54. package/dist/components/q2-carousel.js +5379 -0
  55. package/dist/components/q2-chart-bar.d.ts +11 -0
  56. package/dist/components/q2-chart-bar.js +4710 -0
  57. package/dist/components/q2-chart-donut.d.ts +11 -0
  58. package/dist/components/q2-chart-donut.js +4887 -0
  59. package/dist/components/q2-checkbox-group.d.ts +11 -0
  60. package/dist/components/q2-checkbox-group.js +114 -0
  61. package/dist/components/q2-checkbox.d.ts +11 -0
  62. package/dist/components/q2-checkbox.js +138 -0
  63. package/dist/components/q2-dropdown-item.d.ts +11 -0
  64. package/dist/components/q2-dropdown-item.js +6 -0
  65. package/dist/components/q2-dropdown.d.ts +11 -0
  66. package/dist/components/q2-dropdown.js +345 -0
  67. package/dist/components/q2-editable-field.d.ts +11 -0
  68. package/dist/components/q2-editable-field.js +220 -0
  69. package/dist/components/q2-icon.d.ts +11 -0
  70. package/dist/components/q2-icon.js +6 -0
  71. package/dist/components/q2-input.d.ts +11 -0
  72. package/dist/components/q2-input.js +6 -0
  73. package/dist/components/q2-loading-element.d.ts +11 -0
  74. package/dist/components/q2-loading-element.js +52 -0
  75. package/dist/components/q2-loading.d.ts +11 -0
  76. package/dist/components/q2-loading.js +6 -0
  77. package/dist/components/q2-loc.d.ts +11 -0
  78. package/dist/components/q2-loc.js +40 -0
  79. package/dist/components/q2-message.d.ts +11 -0
  80. package/dist/components/q2-message.js +6 -0
  81. package/dist/components/q2-month-picker.d.ts +11 -0
  82. package/dist/components/q2-month-picker.js +189 -0
  83. package/dist/components/q2-optgroup.d.ts +11 -0
  84. package/dist/components/q2-optgroup.js +75 -0
  85. package/dist/components/q2-option-list.d.ts +11 -0
  86. package/dist/components/q2-option-list.js +6 -0
  87. package/dist/components/q2-option.d.ts +11 -0
  88. package/dist/components/q2-option.js +81 -0
  89. package/dist/components/q2-pagination.d.ts +11 -0
  90. package/dist/components/q2-pagination.js +184 -0
  91. package/dist/components/q2-pill.d.ts +11 -0
  92. package/dist/components/q2-pill.js +216 -0
  93. package/dist/components/q2-popover.d.ts +11 -0
  94. package/dist/components/q2-popover.js +6 -0
  95. package/dist/components/q2-radio-group.d.ts +11 -0
  96. package/dist/components/q2-radio-group.js +191 -0
  97. package/dist/components/q2-radio.d.ts +11 -0
  98. package/dist/components/q2-radio.js +105 -0
  99. package/dist/components/q2-section.d.ts +11 -0
  100. package/dist/components/q2-section.js +218 -0
  101. package/dist/components/q2-select.d.ts +11 -0
  102. package/dist/components/q2-select.js +817 -0
  103. package/dist/components/q2-stepper-pane.d.ts +11 -0
  104. package/dist/components/q2-stepper-pane.js +92 -0
  105. package/dist/components/q2-stepper-vertical.d.ts +11 -0
  106. package/dist/components/q2-stepper-vertical.js +311 -0
  107. package/dist/components/q2-stepper.d.ts +11 -0
  108. package/dist/components/q2-stepper.js +252 -0
  109. package/dist/components/q2-tab-container.d.ts +11 -0
  110. package/dist/components/q2-tab-container.js +288 -0
  111. package/dist/components/q2-tab-pane.d.ts +11 -0
  112. package/dist/components/q2-tab-pane.js +58 -0
  113. package/dist/components/q2-tag.d.ts +11 -0
  114. package/dist/components/q2-tag.js +156 -0
  115. package/dist/components/q2-textarea.d.ts +11 -0
  116. package/dist/components/q2-textarea.js +265 -0
  117. package/dist/components/q2-tooltip.d.ts +11 -0
  118. package/dist/components/q2-tooltip.js +112 -0
  119. package/dist/components/shapes.js +91 -0
  120. package/dist/components/tecton-tab-pane.d.ts +11 -0
  121. package/dist/components/tecton-tab-pane.js +111 -0
  122. package/dist/esm/installCanvasRenderer-0143b52d.js +38282 -0
  123. package/dist/esm/loader.js +1 -1
  124. package/dist/esm/q2-badge_2.entry.js +6 -4
  125. package/dist/esm/q2-calendar.entry.js +75 -55
  126. package/dist/esm/q2-carousel.entry.js +3 -3
  127. package/dist/esm/q2-chart-bar.entry.js +4675 -0
  128. package/dist/esm/q2-chart-donut.entry.js +171 -35406
  129. package/dist/esm/q2-checkbox.entry.js +1 -1
  130. package/dist/esm/q2-editable-field.entry.js +1 -1
  131. package/dist/esm/q2-radio.entry.js +1 -1
  132. package/dist/esm/q2-tecton-elements.js +1 -1
  133. package/dist/q2-tecton-elements/p-1f85cced.js +39 -0
  134. package/dist/q2-tecton-elements/{p-89608314.entry.js → p-4625184b.entry.js} +1 -1
  135. package/dist/q2-tecton-elements/{p-9772b15f.entry.js → p-520c40f6.entry.js} +1 -1
  136. package/dist/q2-tecton-elements/p-6b52a262.entry.js +1 -0
  137. package/dist/q2-tecton-elements/p-c4640b55.entry.js +1 -0
  138. package/dist/q2-tecton-elements/{p-7e8f43d1.entry.js → p-cf41970f.entry.js} +1 -1
  139. package/dist/q2-tecton-elements/p-e4dc9ac0.entry.js +1 -0
  140. package/dist/q2-tecton-elements/p-f35bf6a3.entry.js +1 -0
  141. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  142. package/dist/types/components/q2-calendar/index.d.ts +3 -0
  143. package/dist/types/components/q2-chart-bar/index.d.ts +40 -0
  144. package/dist/types/components/q2-chart-donut/index.d.ts +7 -10
  145. package/dist/types/components/q2-input/index.d.ts +1 -0
  146. package/dist/types/components.d.ts +50 -3
  147. package/dist/types/utils/charting.d.ts +14 -0
  148. package/package.json +5 -2
  149. package/dist/q2-tecton-elements/p-0766a694.entry.js +0 -1
  150. package/dist/q2-tecton-elements/p-35177f6c.entry.js +0 -1
  151. package/dist/q2-tecton-elements/p-5f064e1e.entry.js +0 -39
  152. /package/dist/types/workspace/workspace/{tecton-production_release_1.21.x → Tecton_tecton-production_master}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +0 -0
@@ -0,0 +1,91 @@
1
+ import { h } from '@stencil/core/internal/client';
2
+
3
+ const atoms = {
4
+ circle: ({ width, additionalClasses }) => (h("div", { class: `skeleton-shape circle ${additionalClasses || ''}`, style: { width, height: width } })),
5
+ rectangle: ({ width, height, borderRadius, additionalClasses }) => (h("div", { class: `skeleton-shape rectangle ${additionalClasses || ''}`, style: { width, height, borderRadius } })),
6
+ };
7
+ const molecules = {
8
+ field: () => (h("div", { class: "skeleton-shape field" },
9
+ h("div", { class: "skeleton-field-label" }, atoms.rectangle({ height: '1rem', width: '50%' })),
10
+ atoms.rectangle({
11
+ height: 'var(--tct-input-height, 42px)',
12
+ borderRadius: '3px',
13
+ }))),
14
+ text: (counts, modifiers) => {
15
+ var _a;
16
+ const rows = (_a = counts === null || counts === void 0 ? void 0 : counts[0]) !== null && _a !== void 0 ? _a : 1;
17
+ const hasHeader = modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('header');
18
+ const alignment = ((modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('center')) && 'center') || ((modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('right')) && 'right') || 'left';
19
+ const smallHeaderClass = (modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('smallheader')) ? ' smaller' : '';
20
+ const additionalClasses = hasHeader ? `header ${alignment}${smallHeaderClass}` : '';
21
+ return (h("div", { class: "skeleton-shape text" },
22
+ hasHeader && atoms.rectangle({ width: '60%', additionalClasses }),
23
+ !!rows &&
24
+ Array(rows)
25
+ .fill(undefined)
26
+ .map(() => atoms.rectangle({ height: '1rem' }))));
27
+ },
28
+ };
29
+ const shapes = {
30
+ circle: () => {
31
+ return atoms.circle({ width: '100%' });
32
+ },
33
+ rectangle: () => {
34
+ return atoms.rectangle({ height: '100%', borderRadius: 'var(--tct-border-radius-1, 3px)' });
35
+ },
36
+ table: (counts, modifiers) => {
37
+ var _a, _b;
38
+ const columnCount = (_a = counts === null || counts === void 0 ? void 0 : counts[0]) !== null && _a !== void 0 ? _a : 5;
39
+ const rowCount = (_b = counts === null || counts === void 0 ? void 0 : counts[1]) !== null && _b !== void 0 ? _b : 5;
40
+ const headless = modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('headless');
41
+ const bordered = modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('bordered');
42
+ return (h("div", { class: "skeleton-shape table" },
43
+ !headless && (h("div", { class: "skeleton-table-head" },
44
+ h("div", { class: "skeleton-table-row skeleton-table-header flex" }, !!columnCount &&
45
+ Array(columnCount)
46
+ .fill(undefined)
47
+ .map(() => atoms.rectangle({ height: '1rem' }))),
48
+ h("div", { class: "skeleton-table-row-border" }, atoms.rectangle({ height: '3px' })))),
49
+ h("div", { class: "skeleton-table-body" }, !!rowCount &&
50
+ Array(rowCount)
51
+ .fill(undefined)
52
+ .map(() => (h("div", { class: "skeleton-table-row-wrapper" },
53
+ h("div", { class: "skeleton-table-row flex" }, !!columnCount &&
54
+ Array(columnCount)
55
+ .fill(undefined)
56
+ .map(() => atoms.rectangle({ height: '1.5rem' }))),
57
+ bordered && (h("div", { class: "skeleton-table-row-border" }, atoms.rectangle({
58
+ height: '1px',
59
+ additionalClasses: 'no-margin',
60
+ })))))))));
61
+ },
62
+ field: molecules.field,
63
+ form: (counts) => {
64
+ var _a, _b, _c;
65
+ const columns = (_a = ((counts === null || counts === void 0 ? void 0 : counts[1]) && (counts === null || counts === void 0 ? void 0 : counts[0]))) !== null && _a !== void 0 ? _a : 1;
66
+ const rows = (_c = (_b = counts === null || counts === void 0 ? void 0 : counts[1]) !== null && _b !== void 0 ? _b : counts === null || counts === void 0 ? void 0 : counts[0]) !== null && _c !== void 0 ? _c : 1;
67
+ const totalItems = columns * rows;
68
+ return (h("div", { class: `skeleton-shape form flex columns-${columns}` }, !!totalItems && Array(totalItems).fill(undefined).map(molecules.field)));
69
+ },
70
+ text: molecules.text,
71
+ 'detailed-item': (counts, modifiers) => {
72
+ const isSquare = modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('square');
73
+ const alignment = ((modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('center')) && 'center') || ((modifiers === null || modifiers === void 0 ? void 0 : modifiers.has('right')) && 'right') || 'left';
74
+ return (h("div", { class: `skeleton-shape detailed-item flex ${alignment}` },
75
+ h("div", { class: `detailed-item-image flex-${alignment}` }, isSquare
76
+ ? atoms.rectangle({ width: '1.5em', height: '1.5em', borderRadius: '3px' })
77
+ : atoms.circle({ width: '1.5em' })),
78
+ h("div", { class: `detailed-item-text flex flex-v-center flex-${alignment}` },
79
+ h("div", null, molecules.text(counts, modifiers)))));
80
+ },
81
+ 'label-value': (counts) => {
82
+ var _a;
83
+ const cells = 2 * ((_a = counts === null || counts === void 0 ? void 0 : counts[0]) !== null && _a !== void 0 ? _a : 1);
84
+ return (h("div", { class: "skeleton-shape label-value flex" }, !!cells &&
85
+ Array(cells)
86
+ .fill(undefined)
87
+ .map(() => atoms.rectangle({ height: '1rem' }))));
88
+ },
89
+ };
90
+
91
+ export { atoms as a, shapes as s };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface TectonTabPane extends Components.TectonTabPane, HTMLElement {}
4
+ export const TectonTabPane: {
5
+ prototype: TectonTabPane;
6
+ new (): TectonTabPane;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,111 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
+
3
+ const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.tab-pane[aria-hidden=true]{display:none}.tab-pane:focus{outline:none;box-shadow:none}.loading-wrapper{height:44px;width:100%;align-items:center;justify-content:center}.loading-wrapper:not([hidden]){display:flex}iframe{width:100%;height:auto;overflow-y:hidden;border:none}iframe:not([hidden]){display:inline-block}.slot-wrapper:focus{outline:none;box-shadow:var(--const-global-focus)}";
4
+
5
+ const TectonTabPane$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
+ constructor() {
7
+ super();
8
+ this.__registerHost();
9
+ this.__attachShadow();
10
+ this.badge = createEvent(this, "badge", 7);
11
+ ///////// Actions /////////
12
+ this.onIFrameLoad = (event) => {
13
+ const iframe = event.target;
14
+ iframe.contentWindow &&
15
+ iframe.contentWindow.postMessage(`[iFrameSizer]${this.moduleId}:0:false:false:32:true:true:null:documentElementOffset`, '*');
16
+ };
17
+ this.value = undefined;
18
+ this.label = undefined;
19
+ this.name = undefined;
20
+ this.selected = undefined;
21
+ this.index = undefined;
22
+ this.guid = undefined;
23
+ this.provided = undefined;
24
+ this.url = undefined;
25
+ this.moduleId = undefined;
26
+ this.minHeight = undefined;
27
+ this.badgeCount = undefined;
28
+ this.badgeDescription = undefined;
29
+ this.authPayload = undefined;
30
+ this.showForm = undefined;
31
+ this._showForm = undefined;
32
+ }
33
+ badgeObserver() {
34
+ this.badge.emit();
35
+ }
36
+ get iframeTitle() {
37
+ return this.moduleId.split('.').slice(-2).join('-');
38
+ }
39
+ componentWillRender() {
40
+ const loadingWrapper = this.hostElement.shadowRoot.querySelector('.loading-wrapper');
41
+ if (loadingWrapper) {
42
+ loadingWrapper.style.minHeight = this.minHeight;
43
+ loadingWrapper.hidden = !this.selected;
44
+ }
45
+ }
46
+ componentWillLoad() {
47
+ this._showForm = this.showForm;
48
+ }
49
+ componentDidRender() {
50
+ const formElement = this.hostElement.shadowRoot.querySelector('form');
51
+ if (!!formElement && !!formElement.parentElement) {
52
+ formElement.submit();
53
+ this._showForm = false;
54
+ }
55
+ }
56
+ ///////// Observers /////////
57
+ selectedObserver() {
58
+ const loader = this.hostElement.shadowRoot.querySelector('div[slot="loading-wrapper"]');
59
+ this._showForm = this.showForm; // reset state
60
+ if (loader) {
61
+ loader.hidden = !this.selected;
62
+ }
63
+ }
64
+ ///////// View Methods /////////
65
+ render() {
66
+ return (h("div", { id: `tab-pane-${this.guid}-${this.index}`, class: `tab-pane${this.selected ? '' : ' hidden'}`, role: "tabpanel", tabindex: "-1", "aria-hidden": `${!this.selected}`, "aria-labelledby": `tab-${this.guid}-${this.index}` }, this.selected && this.provided !== undefined && !this.provided && (h("div", null, h("slot", { name: "loading-wrapper" }), h("iframe", { hidden: true, name: this.moduleId, scrolling: "no", src: this.showForm && this.authPayload.length ? '' : this.url || '', "data-module-id": this.moduleId, style: this.minHeight ? { minHeight: this.minHeight } : null, onLoad: this.onIFrameLoad, title: this.iframeTitle, allow: "geolocation; camera" }), this._showForm && this.authPayload ? (h("form", { hidden: true, method: "post", action: this.url, target: this.moduleId, encType: "multipart/form-data" }, this.authPayload.map(element => {
67
+ return (h("input", { type: "hidden", value: element.value, name: element.key }));
68
+ }))) : (''))), h("div", { class: "slot-wrapper", hidden: this.selected && this.provided !== undefined && !this.provided }, h("slot", null))));
69
+ }
70
+ get hostElement() { return this; }
71
+ static get watchers() { return {
72
+ "badgeCount": ["badgeObserver"],
73
+ "selected": ["selectedObserver"]
74
+ }; }
75
+ static get style() { return stylesCss; }
76
+ }, [1, "tecton-tab-pane", {
77
+ "value": [513],
78
+ "label": [513],
79
+ "name": [513],
80
+ "selected": [516],
81
+ "index": [2],
82
+ "guid": [2],
83
+ "provided": [516],
84
+ "url": [513],
85
+ "moduleId": [513, "module-id"],
86
+ "minHeight": [513, "min-height"],
87
+ "badgeCount": [514, "badge-count"],
88
+ "badgeDescription": [513, "badge-description"],
89
+ "authPayload": [16],
90
+ "showForm": [4, "show-form"],
91
+ "_showForm": [32]
92
+ }]);
93
+ function defineCustomElement$1() {
94
+ if (typeof customElements === "undefined") {
95
+ return;
96
+ }
97
+ const components = ["tecton-tab-pane"];
98
+ components.forEach(tagName => { switch (tagName) {
99
+ case "tecton-tab-pane":
100
+ if (!customElements.get(tagName)) {
101
+ customElements.define(tagName, TectonTabPane$1);
102
+ }
103
+ break;
104
+ } });
105
+ }
106
+ defineCustomElement$1();
107
+
108
+ const TectonTabPane = TectonTabPane$1;
109
+ const defineCustomElement = defineCustomElement$1;
110
+
111
+ export { TectonTabPane, defineCustomElement };