@3t-transform/threeteeui 0.0.6 → 0.0.8

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 (121) hide show
  1. package/dist/cjs/{index-8a7479e4.js → index-8a4cb9bc.js} +256 -407
  2. package/dist/cjs/loader.cjs.js +4 -3
  3. package/dist/cjs/tttx-button.cjs.entry.js +28 -0
  4. package/dist/cjs/tttx-checkbox.cjs.entry.js +28 -0
  5. package/dist/cjs/tttx-form.cjs.entry.js +58 -0
  6. package/dist/cjs/tttx-icon.cjs.entry.js +1845 -5
  7. package/dist/cjs/tttx-input.cjs.entry.js +44 -0
  8. package/dist/cjs/tttx-loading-spinner.cjs.entry.js +26 -0
  9. package/dist/cjs/tttx-popover-content.cjs.entry.js +23 -0
  10. package/dist/cjs/tttx.cjs.js +7 -3
  11. package/dist/collection/collection-manifest.json +9 -5
  12. package/dist/collection/components/atoms/tttx-button/tttx-button.css +61 -0
  13. package/dist/collection/components/atoms/tttx-button/tttx-button.js +93 -0
  14. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +27 -0
  15. package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +101 -0
  16. package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +114 -0
  17. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +47 -0
  18. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.css +48 -0
  19. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +66 -0
  20. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +15 -0
  21. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.css +30 -0
  22. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.js +96 -0
  23. package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.stories.js +23 -0
  24. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.css +135 -0
  25. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +101 -0
  26. package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +13 -0
  27. package/dist/collection/components/molecules/tttx-form/tttx-form.js +109 -0
  28. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +33 -0
  29. package/dist/collection/components/molecules/tttx-input/tttx-input.css +149 -0
  30. package/dist/collection/components/molecules/tttx-input/tttx-input.js +259 -0
  31. package/dist/collection/components/molecules/tttx-input/tttx-input.stories.js +106 -0
  32. package/dist/collection/components/palette.stories.js +88 -0
  33. package/dist/collection/icons.js +2838 -0
  34. package/dist/components/index.d.ts +16 -3
  35. package/dist/components/index.js +7 -3
  36. package/dist/components/{tttx-worksheet.d.ts → tttx-button.d.ts} +4 -4
  37. package/dist/components/tttx-button.js +45 -0
  38. package/dist/components/tttx-checkbox.d.ts +11 -0
  39. package/dist/components/tttx-checkbox.js +46 -0
  40. package/dist/components/{tttx-page.d.ts → tttx-form.d.ts} +4 -4
  41. package/dist/components/tttx-form.js +75 -0
  42. package/dist/components/tttx-icon.js +1 -32
  43. package/dist/components/tttx-icon2.js +1875 -0
  44. package/dist/components/tttx-input.d.ts +11 -0
  45. package/dist/components/tttx-input.js +77 -0
  46. package/dist/components/tttx-loading-spinner.d.ts +11 -0
  47. package/dist/components/tttx-loading-spinner.js +43 -0
  48. package/dist/components/tttx-popover-content.d.ts +11 -0
  49. package/dist/components/tttx-popover-content.js +42 -0
  50. package/dist/esm/{index-854ff56f.js → index-9654537d.js} +254 -408
  51. package/dist/esm/loader.js +4 -3
  52. package/dist/esm/polyfills/css-shim.js +1 -1
  53. package/dist/esm/tttx-button.entry.js +24 -0
  54. package/dist/esm/tttx-checkbox.entry.js +24 -0
  55. package/dist/esm/tttx-form.entry.js +54 -0
  56. package/dist/esm/tttx-icon.entry.js +1845 -5
  57. package/dist/esm/tttx-input.entry.js +40 -0
  58. package/dist/esm/tttx-loading-spinner.entry.js +22 -0
  59. package/dist/esm/tttx-popover-content.entry.js +19 -0
  60. package/dist/esm/tttx.js +4 -3
  61. package/dist/tttx/p-1884203f.entry.js +1 -0
  62. package/dist/tttx/p-317b13d3.entry.js +1 -0
  63. package/dist/tttx/p-3cb692d6.entry.js +1 -0
  64. package/dist/tttx/p-3cd7ad04.entry.js +1 -0
  65. package/dist/tttx/p-674e2f18.entry.js +1 -0
  66. package/dist/tttx/p-a23389f1.entry.js +1 -0
  67. package/dist/tttx/p-b6cc2780.js +2 -0
  68. package/dist/tttx/p-f30a0e84.entry.js +1 -0
  69. package/dist/tttx/tttx.esm.js +1 -1
  70. package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +9 -0
  71. package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +20 -0
  72. package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +14 -0
  73. package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +21 -0
  74. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +6 -0
  75. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +5 -0
  76. package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.d.ts +7 -0
  77. package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.stories.d.ts +18 -0
  78. package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.d.ts +9 -0
  79. package/dist/types/{docs/template.stories.d.ts → components/atoms/ttx-checkbox/tttx-checkbox.stories.d.ts} +1 -0
  80. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +11 -0
  81. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +13 -0
  82. package/dist/types/components/molecules/tttx-input/tttx-input.d.ts +20 -0
  83. package/dist/types/components/molecules/tttx-input/tttx-input.stories.d.ts +60 -0
  84. package/dist/types/components/palette.stories.d.ts +6 -0
  85. package/dist/types/components.d.ts +142 -38
  86. package/dist/types/icons.d.ts +2 -0
  87. package/dist/types/stencil-public-runtime.d.ts +59 -3
  88. package/loader/index.d.ts +9 -0
  89. package/package.json +33 -25
  90. package/readme.md +14 -32
  91. package/dist/cjs/toolbar-656be6e6.js +0 -34259
  92. package/dist/cjs/tttx-page.cjs.entry.js +0 -927
  93. package/dist/cjs/tttx-worksheet.cjs.entry.js +0 -47
  94. package/dist/collection/components/components/tttx-icon/tttx-icon.css +0 -89
  95. package/dist/collection/components/components/tttx-icon/tttx-icon.js +0 -59
  96. package/dist/collection/components/components/tttx-icon/tttx-icon.stories.js +0 -40
  97. package/dist/collection/components/patterns/tttx-page/tttx-page.css +0 -162
  98. package/dist/collection/components/patterns/tttx-page/tttx-page.js +0 -213
  99. package/dist/collection/components/patterns/tttx-page/tttx-page.stories.js +0 -80
  100. package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.css +0 -134
  101. package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.js +0 -70
  102. package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.stories.js +0 -44
  103. package/dist/collection/docs/template.stories.js +0 -10
  104. package/dist/components/tttx-page.js +0 -953
  105. package/dist/components/tttx-worksheet.js +0 -6
  106. package/dist/components/tttx-worksheet2.js +0 -34288
  107. package/dist/esm/toolbar-cede4385.js +0 -34231
  108. package/dist/esm/tttx-page.entry.js +0 -923
  109. package/dist/esm/tttx-worksheet.entry.js +0 -43
  110. package/dist/tttx/p-4b57de2e.entry.js +0 -1
  111. package/dist/tttx/p-61f78304.entry.js +0 -1
  112. package/dist/tttx/p-7244abd4.entry.js +0 -1
  113. package/dist/tttx/p-d038fe18.js +0 -1
  114. package/dist/tttx/p-ddfeb0ba.js +0 -2
  115. package/dist/tttx/tttx.css +0 -1
  116. package/dist/types/components/components/tttx-icon/tttx-icon.d.ts +0 -5
  117. package/dist/types/components/components/tttx-icon/tttx-icon.stories.d.ts +0 -24
  118. package/dist/types/components/patterns/tttx-page/tttx-page.d.ts +0 -21
  119. package/dist/types/components/patterns/tttx-page/tttx-page.stories.d.ts +0 -48
  120. package/dist/types/components/patterns/tttx-worksheet/tttx-worksheet.d.ts +0 -9
  121. package/dist/types/components/patterns/tttx-worksheet/tttx-worksheet.stories.d.ts +0 -23
@@ -6,78 +6,182 @@
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  export namespace Components {
9
+ interface TttxButton {
10
+ "buttonStyle": string;
11
+ "fontColor": string;
12
+ }
13
+ interface TttxCheckbox {
14
+ "label": string;
15
+ "required": boolean;
16
+ "value": boolean;
17
+ }
18
+ interface TttxForm {
19
+ "dataAttribute": string;
20
+ "functionAttribute": string;
21
+ }
9
22
  interface TttxIcon {
10
- "color"?: string;
11
- "name": string;
23
+ "colour": string;
24
+ "icon": string;
12
25
  }
13
- interface TttxPage {
14
- "appName": string;
15
- "helpUrl": string;
16
- "lastUpdated": string;
17
- "logoutUrl": string;
18
- "manageAccountsUrl": string;
19
- "pageSize": 'large' | 'medium' | 'small' | string;
20
- "pageTitle": string;
26
+ interface TttxInput {
27
+ "errormsg": string;
28
+ "iconleft": string;
29
+ "iconright": string;
30
+ "label": string;
31
+ "pattern": string;
32
+ "placeholder": string;
33
+ "required": boolean;
34
+ "showerrormsg": boolean;
35
+ "type": string;
36
+ "valid": boolean;
37
+ "value": string;
21
38
  }
22
- interface TttxWorksheet {
23
- "pageSize": 'large' | 'medium' | 'small' | string;
39
+ interface TttxLoadingSpinner {
40
+ "loadingMessage": boolean;
41
+ "size": 'small' | 'large';
24
42
  }
43
+ interface TttxPopoverContent {
44
+ "body": string;
45
+ "header": string;
46
+ "linkcontext": string;
47
+ "linktext": string;
48
+ }
49
+ }
50
+ export interface TttxButtonCustomEvent<T> extends CustomEvent<T> {
51
+ detail: T;
52
+ target: HTMLTttxButtonElement;
53
+ }
54
+ export interface TttxCheckboxCustomEvent<T> extends CustomEvent<T> {
55
+ detail: T;
56
+ target: HTMLTttxCheckboxElement;
57
+ }
58
+ export interface TttxFormCustomEvent<T> extends CustomEvent<T> {
59
+ detail: T;
60
+ target: HTMLTttxFormElement;
61
+ }
62
+ export interface TttxInputCustomEvent<T> extends CustomEvent<T> {
63
+ detail: T;
64
+ target: HTMLTttxInputElement;
25
65
  }
26
66
  declare global {
67
+ interface HTMLTttxButtonElement extends Components.TttxButton, HTMLStencilElement {
68
+ }
69
+ var HTMLTttxButtonElement: {
70
+ prototype: HTMLTttxButtonElement;
71
+ new (): HTMLTttxButtonElement;
72
+ };
73
+ interface HTMLTttxCheckboxElement extends Components.TttxCheckbox, HTMLStencilElement {
74
+ }
75
+ var HTMLTttxCheckboxElement: {
76
+ prototype: HTMLTttxCheckboxElement;
77
+ new (): HTMLTttxCheckboxElement;
78
+ };
79
+ interface HTMLTttxFormElement extends Components.TttxForm, HTMLStencilElement {
80
+ }
81
+ var HTMLTttxFormElement: {
82
+ prototype: HTMLTttxFormElement;
83
+ new (): HTMLTttxFormElement;
84
+ };
27
85
  interface HTMLTttxIconElement extends Components.TttxIcon, HTMLStencilElement {
28
86
  }
29
87
  var HTMLTttxIconElement: {
30
88
  prototype: HTMLTttxIconElement;
31
89
  new (): HTMLTttxIconElement;
32
90
  };
33
- interface HTMLTttxPageElement extends Components.TttxPage, HTMLStencilElement {
91
+ interface HTMLTttxInputElement extends Components.TttxInput, HTMLStencilElement {
92
+ }
93
+ var HTMLTttxInputElement: {
94
+ prototype: HTMLTttxInputElement;
95
+ new (): HTMLTttxInputElement;
96
+ };
97
+ interface HTMLTttxLoadingSpinnerElement extends Components.TttxLoadingSpinner, HTMLStencilElement {
34
98
  }
35
- var HTMLTttxPageElement: {
36
- prototype: HTMLTttxPageElement;
37
- new (): HTMLTttxPageElement;
99
+ var HTMLTttxLoadingSpinnerElement: {
100
+ prototype: HTMLTttxLoadingSpinnerElement;
101
+ new (): HTMLTttxLoadingSpinnerElement;
38
102
  };
39
- interface HTMLTttxWorksheetElement extends Components.TttxWorksheet, HTMLStencilElement {
103
+ interface HTMLTttxPopoverContentElement extends Components.TttxPopoverContent, HTMLStencilElement {
40
104
  }
41
- var HTMLTttxWorksheetElement: {
42
- prototype: HTMLTttxWorksheetElement;
43
- new (): HTMLTttxWorksheetElement;
105
+ var HTMLTttxPopoverContentElement: {
106
+ prototype: HTMLTttxPopoverContentElement;
107
+ new (): HTMLTttxPopoverContentElement;
44
108
  };
45
109
  interface HTMLElementTagNameMap {
110
+ "tttx-button": HTMLTttxButtonElement;
111
+ "tttx-checkbox": HTMLTttxCheckboxElement;
112
+ "tttx-form": HTMLTttxFormElement;
46
113
  "tttx-icon": HTMLTttxIconElement;
47
- "tttx-page": HTMLTttxPageElement;
48
- "tttx-worksheet": HTMLTttxWorksheetElement;
114
+ "tttx-input": HTMLTttxInputElement;
115
+ "tttx-loading-spinner": HTMLTttxLoadingSpinnerElement;
116
+ "tttx-popover-content": HTMLTttxPopoverContentElement;
49
117
  }
50
118
  }
51
119
  declare namespace LocalJSX {
120
+ interface TttxButton {
121
+ "buttonStyle"?: string;
122
+ "fontColor"?: string;
123
+ "onClickEvent"?: (event: TttxButtonCustomEvent<string>) => void;
124
+ }
125
+ interface TttxCheckbox {
126
+ "label"?: string;
127
+ "onValueChanged"?: (event: TttxCheckboxCustomEvent<boolean>) => void;
128
+ "required"?: boolean;
129
+ "value"?: boolean;
130
+ }
131
+ interface TttxForm {
132
+ "dataAttribute"?: string;
133
+ "functionAttribute"?: string;
134
+ "onFormSubmit"?: (event: TttxFormCustomEvent<any>) => void;
135
+ }
52
136
  interface TttxIcon {
53
- "color"?: string;
54
- "name"?: string;
137
+ "colour"?: string;
138
+ "icon"?: string;
139
+ }
140
+ interface TttxInput {
141
+ "errormsg"?: string;
142
+ "iconleft"?: string;
143
+ "iconright"?: string;
144
+ "label"?: string;
145
+ "onValueChanged"?: (event: TttxInputCustomEvent<string>) => void;
146
+ "pattern"?: string;
147
+ "placeholder"?: string;
148
+ "required"?: boolean;
149
+ "showerrormsg"?: boolean;
150
+ "type"?: string;
151
+ "valid"?: boolean;
152
+ "value"?: string;
55
153
  }
56
- interface TttxPage {
57
- "appName"?: string;
58
- "helpUrl"?: string;
59
- "lastUpdated"?: string;
60
- "logoutUrl"?: string;
61
- "manageAccountsUrl"?: string;
62
- "pageSize"?: 'large' | 'medium' | 'small' | string;
63
- "pageTitle"?: string;
154
+ interface TttxLoadingSpinner {
155
+ "loadingMessage"?: boolean;
156
+ "size"?: 'small' | 'large';
64
157
  }
65
- interface TttxWorksheet {
66
- "pageSize"?: 'large' | 'medium' | 'small' | string;
158
+ interface TttxPopoverContent {
159
+ "body"?: string;
160
+ "header"?: string;
161
+ "linkcontext"?: string;
162
+ "linktext"?: string;
67
163
  }
68
164
  interface IntrinsicElements {
165
+ "tttx-button": TttxButton;
166
+ "tttx-checkbox": TttxCheckbox;
167
+ "tttx-form": TttxForm;
69
168
  "tttx-icon": TttxIcon;
70
- "tttx-page": TttxPage;
71
- "tttx-worksheet": TttxWorksheet;
169
+ "tttx-input": TttxInput;
170
+ "tttx-loading-spinner": TttxLoadingSpinner;
171
+ "tttx-popover-content": TttxPopoverContent;
72
172
  }
73
173
  }
74
174
  export { LocalJSX as JSX };
75
175
  declare module "@stencil/core" {
76
176
  export namespace JSX {
77
177
  interface IntrinsicElements {
178
+ "tttx-button": LocalJSX.TttxButton & JSXBase.HTMLAttributes<HTMLTttxButtonElement>;
179
+ "tttx-checkbox": LocalJSX.TttxCheckbox & JSXBase.HTMLAttributes<HTMLTttxCheckboxElement>;
180
+ "tttx-form": LocalJSX.TttxForm & JSXBase.HTMLAttributes<HTMLTttxFormElement>;
78
181
  "tttx-icon": LocalJSX.TttxIcon & JSXBase.HTMLAttributes<HTMLTttxIconElement>;
79
- "tttx-page": LocalJSX.TttxPage & JSXBase.HTMLAttributes<HTMLTttxPageElement>;
80
- "tttx-worksheet": LocalJSX.TttxWorksheet & JSXBase.HTMLAttributes<HTMLTttxWorksheetElement>;
182
+ "tttx-input": LocalJSX.TttxInput & JSXBase.HTMLAttributes<HTMLTttxInputElement>;
183
+ "tttx-loading-spinner": LocalJSX.TttxLoadingSpinner & JSXBase.HTMLAttributes<HTMLTttxLoadingSpinnerElement>;
184
+ "tttx-popover-content": LocalJSX.TttxPopoverContent & JSXBase.HTMLAttributes<HTMLTttxPopoverContentElement>;
81
185
  }
82
186
  }
83
187
  }
@@ -0,0 +1,2 @@
1
+ declare const icons: string[];
2
+ export default icons;
@@ -133,7 +133,7 @@ export interface ListenOptions {
133
133
  */
134
134
  passive?: boolean;
135
135
  }
136
- export declare type ListenTargetOptions = 'body' | 'document' | 'window';
136
+ export type ListenTargetOptions = 'body' | 'document' | 'window';
137
137
  export interface StateDecorator {
138
138
  (): PropertyDecorator;
139
139
  }
@@ -214,8 +214,8 @@ export declare const State: StateDecorator;
214
214
  * https://stenciljs.com/docs/reactive-data#watch-decorator
215
215
  */
216
216
  export declare const Watch: WatchDecorator;
217
- export declare type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
218
- export declare type ErrorHandler = (err: any, element?: HTMLElement) => void;
217
+ export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
218
+ export type ErrorHandler = (err: any, element?: HTMLElement) => void;
219
219
  /**
220
220
  * `setMode()` is used for libraries which provide multiple "modes" for styles.
221
221
  */
@@ -257,6 +257,15 @@ export declare function getAssetPath(path: string): string;
257
257
  * @returns the set path
258
258
  */
259
259
  export declare function setAssetPath(path: string): string;
260
+ /**
261
+ * Used to specify a nonce value that corresponds with an application's
262
+ * [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
263
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
264
+ * Alternatively, the nonce value can be set on a `meta` tag in the DOM head
265
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) and will result in the same behavior.
266
+ * @param nonce The value to be used for the nonce attribute.
267
+ */
268
+ export declare function setNonce(nonce: string): void;
260
269
  /**
261
270
  * Retrieve a Stencil element for a given reference
262
271
  * @param ref the ref to get the Stencil element for
@@ -433,13 +442,57 @@ interface HostAttributes {
433
442
  ref?: (el: HTMLElement | null) => void;
434
443
  [prop: string]: any;
435
444
  }
445
+ /**
446
+ * Utilities for working with functional Stencil components. An object
447
+ * conforming to this interface is passed by the Stencil runtime as the third
448
+ * argument to a functional component, allowing component authors to work with
449
+ * features like children.
450
+ *
451
+ * The children of a functional component will be passed as the second
452
+ * argument, so a functional component which uses these utils to transform its
453
+ * children might look like the following:
454
+ *
455
+ * ```ts
456
+ * export const AddClass: FunctionalComponent = (_, children, utils) => (
457
+ * utils.map(children, child => ({
458
+ * ...child,
459
+ * vattrs: {
460
+ * ...child.vattrs,
461
+ * class: `${child.vattrs.class} add-class`
462
+ * }
463
+ * }))
464
+ * );
465
+ * ```
466
+ *
467
+ * For more see the Stencil documentation, here:
468
+ * https://stenciljs.com/docs/functional-components
469
+ */
436
470
  export interface FunctionalUtilities {
471
+ /**
472
+ * Utility for reading the children of a functional component at runtime.
473
+ * Since the Stencil runtime uses a different interface for children it is
474
+ * not recommendeded to read the children directly, and is preferable to use
475
+ * this utility to, for instance, perform a side effect for each child.
476
+ */
437
477
  forEach: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => void) => void;
478
+ /**
479
+ * Utility for transforming the children of a functional component. Given an
480
+ * array of children and a callback this will return a list of the results of
481
+ * passing each child to the supplied callback.
482
+ */
438
483
  map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[];
439
484
  }
440
485
  export interface FunctionalComponent<T = {}> {
441
486
  (props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[];
442
487
  }
488
+ /**
489
+ * A Child VDOM node
490
+ *
491
+ * This has most of the same properties as {@link VNode} but friendlier names
492
+ * (i.e. `vtag` instead of `$tag$`, `vchildren` instead of `$children$`) in
493
+ * order to provide a friendlier public interface for users of the
494
+ * {@link FunctionalUtilities}).
495
+ */
443
496
  export interface ChildNode {
444
497
  vtag?: string | number | Function;
445
498
  vkey?: string | number;
@@ -486,6 +539,9 @@ export declare function h(sel: any, children: Array<VNode | undefined | null>):
486
539
  export declare function h(sel: any, data: VNodeData | null, text: string): VNode;
487
540
  export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
488
541
  export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
542
+ /**
543
+ * A virtual DOM node
544
+ */
489
545
  export interface VNode {
490
546
  $flags$: number;
491
547
  $tag$: string | number | Function;
package/loader/index.d.ts CHANGED
@@ -10,3 +10,12 @@ export interface CustomElementsDefineOptions {
10
10
  }
11
11
  export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): Promise<void>;
12
12
  export declare function applyPolyfills(): Promise<void>;
13
+
14
+ /**
15
+ * Used to specify a nonce value that corresponds with an application's CSP.
16
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
17
+ * Alternatively, the nonce value can be set on a meta tag in the DOM head
18
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) which
19
+ * will result in the same behavior.
20
+ */
21
+ export declare function setNonce(nonce: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3t-transform/threeteeui",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "3t Design System",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -20,40 +20,48 @@
20
20
  "test": "stencil test --spec --e2e",
21
21
  "test.watch": "stencil test --spec --e2e --watchAll",
22
22
  "generate": "stencil generate",
23
- "storybook": "start-storybook -p 6006",
24
- "build-storybook": "build-storybook",
23
+ "storybook": "storybook dev -p 6006",
24
+ "build-storybook": "storybook build",
25
25
  "chromatic": "npx chromatic --project-token=531b962b0be5 --exit-zero-on-changes --exit-once-uploaded",
26
- "theme:build": "sass src/theme/scss/bundles/dx.tttx.scss public/dx.tttx.css"
26
+ "lint:generate": "eslint --ext .tsx -o output.eslint.json -f json"
27
27
  },
28
- "dependencies": {
29
- "@mdx-js/react": "^2.1.5",
30
- "@rollup/plugin-commonjs": "^23.0.3",
31
- "@stencil/core": "^2.20.0",
32
- "devextreme": "22.1.6",
33
- "less": "^4.1.3",
34
- "material-symbols": "^0.2.8",
35
- "materialize-css": "^1.0.0",
36
- "sass": "^1.56.1"
28
+ "resolutions": {
29
+ "@types/babel__traverse": "7.0.6"
37
30
  },
38
31
  "devDependencies": {
39
32
  "@babel/core": "^7.18.10",
33
+ "@babel/preset-env": "^7.21.4",
34
+ "@mdx-js/react": "^2.1.5",
35
+ "@rollup/plugin-commonjs": "^23.0.3",
36
+ "@stencil/core": "^2.20.0",
40
37
  "@stencil/sass": "^1.5.2",
41
- "@storybook/addon-actions": "^6.5.10",
42
- "@storybook/addon-essentials": "^6.5.10",
43
- "@storybook/addon-interactions": "^6.5.10",
44
- "@storybook/addon-links": "^6.5.10",
45
- "@storybook/builder-webpack4": "^6.5.10",
46
- "@storybook/html": "^6.5.10",
47
- "@storybook/manager-webpack4": "^6.5.10",
48
- "@storybook/testing-library": "^0.0.13",
49
- "@types/chart.js": "^2.9.37",
38
+ "@storybook/addon-actions": "^7.0.6",
39
+ "@storybook/addon-essentials": "^7.0.6",
40
+ "@storybook/addon-interactions": "^7.0.6",
41
+ "@storybook/addon-links": "^7.0.6",
42
+ "@storybook/addon-mdx-gfm": "^7.0.6",
43
+ "@storybook/html": "^7.0.6",
44
+ "@storybook/html-webpack5": "^7.0.6",
45
+ "@storybook/testing-library": "^0.1.0",
46
+ "@storybook/web-components": "^7.0.6",
50
47
  "@types/jest": "^27.0.3",
51
- "babel-loader": "^8.2.5",
48
+ "@typescript-eslint/eslint-plugin": "^5.59.0",
49
+ "@typescript-eslint/parser": "^5.59.0",
52
50
  "chromatic": "^6.7.4",
51
+ "eslint": "^8.38.0",
53
52
  "jest": "^27.4.5",
54
53
  "jest-cli": "^27.4.5",
55
- "puppeteer": "^10.0.0"
54
+ "less": "^4.1.3",
55
+ "lit-html": "^2.7.0",
56
+ "puppeteer": "^10.0.0",
57
+ "react": "^18.2.0",
58
+ "react-dom": "^18.2.0",
59
+ "sass": "^1.56.1"
56
60
  },
57
61
  "license": "UNLICENSED",
58
- "readme": "ERROR: No README data found!"
62
+ "readme": "ERROR: No README data found!",
63
+ "dependencies": {
64
+ "@popperjs/core": "^2.11.7",
65
+ "storybook": "^7.0.6"
66
+ }
59
67
  }
package/readme.md CHANGED
@@ -1,35 +1,17 @@
1
- ![header](header.png)
2
-
3
- # 3t Design System
4
-
5
- > Our new UX is under development and we need a space to realise it
6
-
7
- - [x] Individual components so we can test them individually
8
- - [x] Atomic design oriented so it is easy to understand
9
- - [x] Use Storybook to host the components
10
- - [x] The components will be Custom Components (Web Components)
11
- - [x] Use Chromatic for designer feedback on developer work
12
- - [ ] When a developer makes changes and pushes to master, we deploy the library to NPM
13
- - [ ] We will use NPM versions to pull the components into our frontend applications
14
-
15
- ## DevExtreme
16
-
17
- We use devextreme to as a base for building our components. For details on their components, see their [API documentation](https://js.devexpress.com/Documentation/ApiReference/UI_Components/) and their [component demos](https://js.devexpress.com/Demos/WidgetsGallery/).
18
-
19
-
20
- ## Stencil Component Starter
21
-
22
- This is a starter project for building a standalone Web Component using Stencil.
23
-
24
- Stencil is also great for building entire apps. For that, use the [stencil-app-starter](https://github.com/ionic-team/stencil-app-starter) instead.
25
-
26
- ## Stencil
27
-
28
- Stencil is a compiler for building fast web apps using Web Components.
29
-
30
- Stencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than run-time tool. Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements v1 spec.
31
-
32
- Stencil components are just Web Components, so they work in any major framework or with no framework at all.
1
+ ## TTTX Library Vision
2
+
3
+ - To create versioned components where each micro-frontend may use any version it chooses.
4
+ - Why? - Our root frontend contains many micro-frontends. Each one might have a diffrent version of these components loaded at any time. We must not let a change in one MFE affect another MFE loaded at the same time.
5
+ - To keep the components extremely lightweight, use as few dependencies as possible. Keep the individual components in the low KB, not the MB.
6
+ - Why? - When there are multiple versions of the same component loaded, we need to keep them extremely lightweight. Most simple components can be executed in a few dozen KB.
7
+ - No CSS frameworks. Use only the minimum styles to get the job done.
8
+ - Why? - This means we can be sure that we only load code we are actually using.
9
+ - No external styles. A component must style itself and be inside a shadow DOM so that styles from the external application cannot leak inside.
10
+ - Why? - We cannot have any components being affected by the styles of the surrunding application. The component must be entirely self-contained.
11
+ - No leaking styles. A component must not infect the application with its styles.
12
+ - Why? - The same goes both ways, the component styles must not affect the surrounding application.
13
+ - Create only components as we need them. YAGNI applies.
14
+ - Why? - It's about Agile. We need to deliver value to the customer (our develoeprs) as soon as possible for their feedback, and so they can deliver value to their customer (our users). If a certain component is required, it will crop up, and then we will make it.
33
15
 
34
16
  ## Getting Started
35
17