@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.
- package/dist/cjs/{index-8a7479e4.js → index-8a4cb9bc.js} +256 -407
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/tttx-button.cjs.entry.js +28 -0
- package/dist/cjs/tttx-checkbox.cjs.entry.js +28 -0
- package/dist/cjs/tttx-form.cjs.entry.js +58 -0
- package/dist/cjs/tttx-icon.cjs.entry.js +1845 -5
- package/dist/cjs/tttx-input.cjs.entry.js +44 -0
- package/dist/cjs/tttx-loading-spinner.cjs.entry.js +26 -0
- package/dist/cjs/tttx-popover-content.cjs.entry.js +23 -0
- package/dist/cjs/tttx.cjs.js +7 -3
- package/dist/collection/collection-manifest.json +9 -5
- package/dist/collection/components/atoms/tttx-button/tttx-button.css +61 -0
- package/dist/collection/components/atoms/tttx-button/tttx-button.js +93 -0
- package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +27 -0
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +101 -0
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +114 -0
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +47 -0
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.css +48 -0
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +66 -0
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +15 -0
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.css +30 -0
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.js +96 -0
- package/dist/collection/components/atoms/tttx-popover-content/tttx-popover-content.stories.js +23 -0
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.css +135 -0
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +101 -0
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +13 -0
- package/dist/collection/components/molecules/tttx-form/tttx-form.js +109 -0
- package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +33 -0
- package/dist/collection/components/molecules/tttx-input/tttx-input.css +149 -0
- package/dist/collection/components/molecules/tttx-input/tttx-input.js +259 -0
- package/dist/collection/components/molecules/tttx-input/tttx-input.stories.js +106 -0
- package/dist/collection/components/palette.stories.js +88 -0
- package/dist/collection/icons.js +2838 -0
- package/dist/components/index.d.ts +16 -3
- package/dist/components/index.js +7 -3
- package/dist/components/{tttx-worksheet.d.ts → tttx-button.d.ts} +4 -4
- package/dist/components/tttx-button.js +45 -0
- package/dist/components/tttx-checkbox.d.ts +11 -0
- package/dist/components/tttx-checkbox.js +46 -0
- package/dist/components/{tttx-page.d.ts → tttx-form.d.ts} +4 -4
- package/dist/components/tttx-form.js +75 -0
- package/dist/components/tttx-icon.js +1 -32
- package/dist/components/tttx-icon2.js +1875 -0
- package/dist/components/tttx-input.d.ts +11 -0
- package/dist/components/tttx-input.js +77 -0
- package/dist/components/tttx-loading-spinner.d.ts +11 -0
- package/dist/components/tttx-loading-spinner.js +43 -0
- package/dist/components/tttx-popover-content.d.ts +11 -0
- package/dist/components/tttx-popover-content.js +42 -0
- package/dist/esm/{index-854ff56f.js → index-9654537d.js} +254 -408
- package/dist/esm/loader.js +4 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/tttx-button.entry.js +24 -0
- package/dist/esm/tttx-checkbox.entry.js +24 -0
- package/dist/esm/tttx-form.entry.js +54 -0
- package/dist/esm/tttx-icon.entry.js +1845 -5
- package/dist/esm/tttx-input.entry.js +40 -0
- package/dist/esm/tttx-loading-spinner.entry.js +22 -0
- package/dist/esm/tttx-popover-content.entry.js +19 -0
- package/dist/esm/tttx.js +4 -3
- package/dist/tttx/p-1884203f.entry.js +1 -0
- package/dist/tttx/p-317b13d3.entry.js +1 -0
- package/dist/tttx/p-3cb692d6.entry.js +1 -0
- package/dist/tttx/p-3cd7ad04.entry.js +1 -0
- package/dist/tttx/p-674e2f18.entry.js +1 -0
- package/dist/tttx/p-a23389f1.entry.js +1 -0
- package/dist/tttx/p-b6cc2780.js +2 -0
- package/dist/tttx/p-f30a0e84.entry.js +1 -0
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +9 -0
- package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +20 -0
- package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +14 -0
- package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +21 -0
- package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +6 -0
- package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +5 -0
- package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.d.ts +7 -0
- package/dist/types/components/atoms/tttx-popover-content/tttx-popover-content.stories.d.ts +18 -0
- package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.d.ts +9 -0
- package/dist/types/{docs/template.stories.d.ts → components/atoms/ttx-checkbox/tttx-checkbox.stories.d.ts} +1 -0
- package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +11 -0
- package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +13 -0
- package/dist/types/components/molecules/tttx-input/tttx-input.d.ts +20 -0
- package/dist/types/components/molecules/tttx-input/tttx-input.stories.d.ts +60 -0
- package/dist/types/components/palette.stories.d.ts +6 -0
- package/dist/types/components.d.ts +142 -38
- package/dist/types/icons.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +59 -3
- package/loader/index.d.ts +9 -0
- package/package.json +33 -25
- package/readme.md +14 -32
- package/dist/cjs/toolbar-656be6e6.js +0 -34259
- package/dist/cjs/tttx-page.cjs.entry.js +0 -927
- package/dist/cjs/tttx-worksheet.cjs.entry.js +0 -47
- package/dist/collection/components/components/tttx-icon/tttx-icon.css +0 -89
- package/dist/collection/components/components/tttx-icon/tttx-icon.js +0 -59
- package/dist/collection/components/components/tttx-icon/tttx-icon.stories.js +0 -40
- package/dist/collection/components/patterns/tttx-page/tttx-page.css +0 -162
- package/dist/collection/components/patterns/tttx-page/tttx-page.js +0 -213
- package/dist/collection/components/patterns/tttx-page/tttx-page.stories.js +0 -80
- package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.css +0 -134
- package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.js +0 -70
- package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.stories.js +0 -44
- package/dist/collection/docs/template.stories.js +0 -10
- package/dist/components/tttx-page.js +0 -953
- package/dist/components/tttx-worksheet.js +0 -6
- package/dist/components/tttx-worksheet2.js +0 -34288
- package/dist/esm/toolbar-cede4385.js +0 -34231
- package/dist/esm/tttx-page.entry.js +0 -923
- package/dist/esm/tttx-worksheet.entry.js +0 -43
- package/dist/tttx/p-4b57de2e.entry.js +0 -1
- package/dist/tttx/p-61f78304.entry.js +0 -1
- package/dist/tttx/p-7244abd4.entry.js +0 -1
- package/dist/tttx/p-d038fe18.js +0 -1
- package/dist/tttx/p-ddfeb0ba.js +0 -2
- package/dist/tttx/tttx.css +0 -1
- package/dist/types/components/components/tttx-icon/tttx-icon.d.ts +0 -5
- package/dist/types/components/components/tttx-icon/tttx-icon.stories.d.ts +0 -24
- package/dist/types/components/patterns/tttx-page/tttx-page.d.ts +0 -21
- package/dist/types/components/patterns/tttx-page/tttx-page.stories.d.ts +0 -48
- package/dist/types/components/patterns/tttx-worksheet/tttx-worksheet.d.ts +0 -9
- 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
|
-
"
|
|
11
|
-
"
|
|
23
|
+
"colour": string;
|
|
24
|
+
"icon": string;
|
|
12
25
|
}
|
|
13
|
-
interface
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
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
|
|
23
|
-
"
|
|
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
|
|
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
|
|
36
|
-
prototype:
|
|
37
|
-
new ():
|
|
99
|
+
var HTMLTttxLoadingSpinnerElement: {
|
|
100
|
+
prototype: HTMLTttxLoadingSpinnerElement;
|
|
101
|
+
new (): HTMLTttxLoadingSpinnerElement;
|
|
38
102
|
};
|
|
39
|
-
interface
|
|
103
|
+
interface HTMLTttxPopoverContentElement extends Components.TttxPopoverContent, HTMLStencilElement {
|
|
40
104
|
}
|
|
41
|
-
var
|
|
42
|
-
prototype:
|
|
43
|
-
new ():
|
|
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-
|
|
48
|
-
"tttx-
|
|
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
|
-
"
|
|
54
|
-
"
|
|
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
|
|
57
|
-
"
|
|
58
|
-
"
|
|
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
|
|
66
|
-
"
|
|
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-
|
|
71
|
-
"tttx-
|
|
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-
|
|
80
|
-
"tttx-
|
|
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
|
}
|
|
@@ -133,7 +133,7 @@ export interface ListenOptions {
|
|
|
133
133
|
*/
|
|
134
134
|
passive?: boolean;
|
|
135
135
|
}
|
|
136
|
-
export
|
|
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
|
|
218
|
-
export
|
|
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.
|
|
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": "
|
|
24
|
-
"build-storybook": "build
|
|
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
|
-
"
|
|
26
|
+
"lint:generate": "eslint --ext .tsx -o output.eslint.json -f json"
|
|
27
27
|
},
|
|
28
|
-
"
|
|
29
|
-
"@
|
|
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": "^
|
|
42
|
-
"@storybook/addon-essentials": "^
|
|
43
|
-
"@storybook/addon-interactions": "^
|
|
44
|
-
"@storybook/addon-links": "^
|
|
45
|
-
"@storybook/
|
|
46
|
-
"@storybook/html": "^
|
|
47
|
-
"@storybook/
|
|
48
|
-
"@storybook/testing-library": "^0.0
|
|
49
|
-
"@
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
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
|
|