@3t-transform/threeteeui 0.1.3 → 0.1.5

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 (101) hide show
  1. package/dist/cjs/{index-451f61dd.js → index-906c2757.js} +102 -3
  2. package/dist/cjs/loader.cjs.js +4 -3
  3. package/dist/cjs/{tttx-button.cjs.entry.js → tttx-button_2.cjs.entry.js} +50 -24
  4. package/dist/cjs/tttx-form.cjs.entry.js +364 -364
  5. package/dist/cjs/tttx-keyvalue-block.cjs.entry.js +57 -57
  6. package/dist/cjs/tttx-list.cjs.entry.js +43 -43
  7. package/dist/cjs/tttx-loading-spinner.cjs.entry.js +16 -16
  8. package/dist/cjs/tttx-standalone-input.cjs.entry.js +58 -61
  9. package/dist/cjs/tttx.cjs.js +7 -3
  10. package/dist/collection/collection-manifest.json +2 -2
  11. package/dist/collection/components/atoms/tttx-button/tttx-button.js +116 -110
  12. package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +14 -14
  13. package/dist/collection/components/atoms/tttx-icon/tttx-icon.css +0 -4
  14. package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +62 -62
  15. package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +22 -22
  16. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +107 -107
  17. package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.js +38 -38
  18. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +67 -67
  19. package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +17 -17
  20. package/dist/collection/components/molecules/tttx-form/lib/setErrorState.js +35 -35
  21. package/dist/collection/components/molecules/tttx-form/lib/validityCheck.js +58 -58
  22. package/dist/collection/components/molecules/tttx-form/tttx-form.css +3 -26
  23. package/dist/collection/components/molecules/tttx-form/tttx-form.js +364 -364
  24. package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +127 -127
  25. package/dist/collection/components/molecules/tttx-list/tttx-list.js +105 -105
  26. package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +43 -43
  27. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.css +3 -26
  28. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +572 -627
  29. package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +135 -148
  30. package/dist/collection/components/palette.stories.js +7 -7
  31. package/dist/collection/docs/gettingstarted-developer.stories.js +5 -5
  32. package/dist/collection/icons.js +2838 -2838
  33. package/dist/collection/index.js +1 -1
  34. package/dist/collection/shared/domsanitiser.options.js +14 -14
  35. package/dist/collection/transform-tag-name.js +5 -0
  36. package/dist/components/index.d.ts +9 -0
  37. package/dist/components/index.js +1 -1
  38. package/dist/components/tttx-button.js +59 -48
  39. package/dist/components/tttx-form.js +381 -381
  40. package/dist/components/tttx-icon2.js +29 -29
  41. package/dist/components/tttx-keyvalue-block.js +74 -74
  42. package/dist/components/tttx-list.js +65 -65
  43. package/dist/components/tttx-loading-spinner.js +33 -33
  44. package/dist/components/tttx-standalone-input.js +102 -108
  45. package/dist/esm/{index-0350f122.js → index-4010ad69.js} +101 -4
  46. package/dist/esm/loader.js +4 -3
  47. package/dist/esm/polyfills/core-js.js +0 -0
  48. package/dist/esm/polyfills/css-shim.js +1 -1
  49. package/dist/esm/polyfills/dom.js +0 -0
  50. package/dist/esm/polyfills/es5-html-element.js +0 -0
  51. package/dist/esm/polyfills/index.js +0 -0
  52. package/dist/esm/polyfills/system.js +0 -0
  53. package/dist/esm/{tttx-button.entry.js → tttx-button_2.entry.js} +50 -25
  54. package/dist/esm/tttx-form.entry.js +364 -364
  55. package/dist/esm/tttx-keyvalue-block.entry.js +57 -57
  56. package/dist/esm/tttx-list.entry.js +43 -43
  57. package/dist/esm/tttx-loading-spinner.entry.js +16 -16
  58. package/dist/esm/tttx-standalone-input.entry.js +58 -61
  59. package/dist/esm/tttx.js +4 -3
  60. package/dist/tttx/p-083eeedc.entry.js +1 -0
  61. package/dist/tttx/{p-1b015a9d.entry.js → p-3281444a.entry.js} +1 -1
  62. package/dist/tttx/p-5687f4ad.js +2 -0
  63. package/dist/tttx/p-5c9a1626.entry.js +3 -0
  64. package/dist/tttx/p-931e42c9.entry.js +1 -0
  65. package/dist/tttx/p-b5c1dd86.entry.js +1 -0
  66. package/dist/tttx/{p-a0179cb1.entry.js → p-dab7ee1b.entry.js} +1 -1
  67. package/dist/tttx/tttx.esm.js +1 -1
  68. package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +13 -10
  69. package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +10 -10
  70. package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +5 -5
  71. package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +20 -20
  72. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.d.ts +7 -7
  73. package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.d.ts +9 -9
  74. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +6 -6
  75. package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +17 -17
  76. package/dist/types/components/molecules/tttx-form/lib/setErrorState.d.ts +13 -13
  77. package/dist/types/components/molecules/tttx-form/lib/validityCheck.d.ts +17 -17
  78. package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +114 -114
  79. package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +13 -13
  80. package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +11 -11
  81. package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +14 -14
  82. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +53 -56
  83. package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +106 -122
  84. package/dist/types/components/palette.stories.d.ts +6 -6
  85. package/dist/types/components.d.ts +0 -6
  86. package/dist/types/docs/gettingstarted-developer.stories.d.ts +5 -5
  87. package/dist/types/icons.d.ts +2 -2
  88. package/dist/types/index.d.ts +1 -1
  89. package/dist/types/shared/domsanitiser.options.d.ts +10 -10
  90. package/dist/types/stencil-public-runtime.d.ts +59 -3
  91. package/dist/types/transform-tag-name.d.ts +1 -0
  92. package/loader/index.d.ts +9 -0
  93. package/package.json +1 -1
  94. package/dist/cjs/tttx-icon.cjs.entry.js +0 -21
  95. package/dist/esm/tttx-icon.entry.js +0 -17
  96. package/dist/tttx/p-4f3958fa.entry.js +0 -1
  97. package/dist/tttx/p-62869344.js +0 -2
  98. package/dist/tttx/p-92465671.entry.js +0 -1
  99. package/dist/tttx/p-bfdf5c4e.entry.js +0 -1
  100. package/dist/tttx/p-c773116b.entry.js +0 -1
  101. package/dist/tttx/p-cd1565e0.entry.js +0 -3
@@ -1,56 +1,53 @@
1
- import { EventEmitter } from '../../../stencil-public-runtime';
2
- export declare type DateSyntax = `${number}${number}${number}${number}-${number}${number}-${number}${number}`;
3
- export declare type MonthSyntax = `${number}${number}${number}${number}-${number}${number}`;
4
- export declare type WeekSyntax = `${number}${number}${number}${number}-W${number}${number}`;
5
- export declare type TimeSyntax = `${number}${number}:${number}${number}`;
6
- export declare type DateTimeLocalSyntax = `${number}${number}${number}${number}-${number}${number}-${number}${number}T${number}${number}:${number}${number}`;
7
- export declare type MinMaxDates = DateSyntax | MonthSyntax | WeekSyntax | TimeSyntax | DateTimeLocalSyntax;
8
- export declare class TttxInput {
9
- label: string;
10
- showerrormsg: boolean;
11
- showerrorbubble: boolean;
12
- errormsg: string;
13
- iconleft: string;
14
- iconright: string;
15
- inputicon: string;
16
- inline: boolean;
17
- inputAutocapitalize: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';
18
- inputAutofocus: boolean;
19
- /**
20
- * Defines what action to present for the enter key on virtual keyboards
21
- */
22
- inputKeyhint: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
23
- /**
24
- * tabindex - Allows the HTML elements to be focusable
25
- * @example <caption>In HTML (like `index.html`)</caption>
26
- * <tttx-standalone-input input-index="1" />
27
- * @example <caption>In TSX files</caption>
28
- * <tttx-standalone-input inputIndex={1} />
29
- */
30
- inputIndex: string | number;
31
- inputTitle: string;
32
- autocomplete: 'off' | 'on';
33
- checked: boolean;
34
- disabled: boolean;
35
- max: MinMaxDates | number;
36
- maxlength: string | number;
37
- min: MinMaxDates | number;
38
- minlength: string | number;
39
- name: string;
40
- pattern: string;
41
- placeholder: string;
42
- readonly: string | boolean;
43
- required: boolean;
44
- step: string | number;
45
- type: string;
46
- value: string | number;
47
- valueChanged: EventEmitter<string>;
48
- handleChange(event: Event | InputEvent): void;
49
- focusChanged: EventEmitter<string>;
50
- handleFocus(event: Event | InputEvent): void;
51
- blurChanged: EventEmitter<string>;
52
- handleBlur(event: Event | InputEvent): void;
53
- invalidChanged: EventEmitter<string>;
54
- handleInvalid(event: Event | InputEvent): void;
55
- render(): any;
56
- }
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ export type DateSyntax = `${number}${number}${number}${number}-${number}${number}-${number}${number}`;
3
+ export type MonthSyntax = `${number}${number}${number}${number}-${number}${number}`;
4
+ export type WeekSyntax = `${number}${number}${number}${number}-W${number}${number}`;
5
+ export type TimeSyntax = `${number}${number}:${number}${number}`;
6
+ export type DateTimeLocalSyntax = `${number}${number}${number}${number}-${number}${number}-${number}${number}T${number}${number}:${number}${number}`;
7
+ export type MinMaxDates = DateSyntax | MonthSyntax | WeekSyntax | TimeSyntax | DateTimeLocalSyntax;
8
+ export declare class TttxInput {
9
+ label: string;
10
+ showerrormsg: boolean;
11
+ errormsg: string;
12
+ iconleft: string;
13
+ iconright: string;
14
+ inputAutocapitalize: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';
15
+ inputAutofocus: boolean;
16
+ /**
17
+ * Defines what action to present for the enter key on virtual keyboards
18
+ */
19
+ inputKeyhint: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
20
+ /**
21
+ * tabindex - Allows the HTML elements to be focusable
22
+ * @example <caption>In HTML (like `index.html`)</caption>
23
+ * <tttx-standalone-input input-index="1" />
24
+ * @example <caption>In TSX files</caption>
25
+ * <tttx-standalone-input inputIndex={1} />
26
+ */
27
+ inputIndex: string | number;
28
+ inputTitle: string;
29
+ autocomplete: 'off' | 'on';
30
+ checked: boolean;
31
+ disabled: boolean;
32
+ max: MinMaxDates | number;
33
+ maxlength: string | number;
34
+ min: MinMaxDates | number;
35
+ minlength: string | number;
36
+ name: string;
37
+ pattern: string;
38
+ placeholder: string;
39
+ readonly: string | boolean;
40
+ required: boolean;
41
+ step: string | number;
42
+ type: string;
43
+ value: string | number;
44
+ valueChanged: EventEmitter<string>;
45
+ handleChange(event: Event | InputEvent): void;
46
+ focusChanged: EventEmitter<string>;
47
+ handleFocus(event: Event | InputEvent): void;
48
+ blurChanged: EventEmitter<string>;
49
+ handleBlur(event: Event | InputEvent): void;
50
+ invalidChanged: EventEmitter<string>;
51
+ handleInvalid(event: Event | InputEvent): void;
52
+ render(): any;
53
+ }
@@ -1,122 +1,106 @@
1
- declare const _default: {
2
- title: string;
3
- component: string;
4
- argTypes: {
5
- iconleft: {
6
- options: string[];
7
- control: {
8
- type: string;
9
- };
10
- };
11
- iconright: {
12
- options: string[];
13
- control: {
14
- type: string;
15
- };
16
- };
17
- inputIcon: {
18
- options: string[];
19
- control: {
20
- type: string;
21
- };
22
- };
23
- label: {
24
- control: {
25
- type: string;
26
- };
27
- };
28
- errormsg: {
29
- control: {
30
- type: string;
31
- };
32
- };
33
- showerrorbubble: {
34
- control: {
35
- type: string;
36
- };
37
- };
38
- showerrormsg: {
39
- control: {
40
- type: string;
41
- };
42
- };
43
- inline: {
44
- control: {
45
- type: string;
46
- };
47
- };
48
- checked: {
49
- control: {
50
- type: string;
51
- };
52
- };
53
- disabled: {
54
- control: {
55
- type: string;
56
- };
57
- };
58
- max: {
59
- control: {
60
- type: string;
61
- };
62
- };
63
- maxlength: {
64
- control: {
65
- type: string;
66
- };
67
- };
68
- min: {
69
- control: {
70
- type: string;
71
- };
72
- };
73
- minlength: {
74
- control: {
75
- type: string;
76
- };
77
- };
78
- name: {
79
- control: {
80
- type: string;
81
- };
82
- };
83
- pattern: {
84
- control: {
85
- type: string;
86
- };
87
- };
88
- placeholder: {
89
- control: {
90
- type: string;
91
- };
92
- };
93
- readonly: {
94
- control: {
95
- type: string;
96
- };
97
- };
98
- required: {
99
- control: {
100
- type: string;
101
- };
102
- };
103
- step: {
104
- control: {
105
- type: string;
106
- };
107
- };
108
- type: {
109
- options: string[];
110
- control: {
111
- type: string;
112
- };
113
- };
114
- value: {
115
- control: {
116
- type: string;
117
- };
118
- };
119
- };
120
- };
121
- export default _default;
122
- export declare const InputField: any;
1
+ declare const _default: {
2
+ title: string;
3
+ component: string;
4
+ argTypes: {
5
+ iconleft: {
6
+ options: string[];
7
+ control: {
8
+ type: string;
9
+ };
10
+ };
11
+ iconright: {
12
+ options: string[];
13
+ control: {
14
+ type: string;
15
+ };
16
+ };
17
+ label: {
18
+ control: {
19
+ type: string;
20
+ };
21
+ };
22
+ errormsg: {
23
+ control: {
24
+ type: string;
25
+ };
26
+ };
27
+ showerrormsg: {
28
+ control: {
29
+ type: string;
30
+ };
31
+ };
32
+ checked: {
33
+ control: {
34
+ type: string;
35
+ };
36
+ };
37
+ disabled: {
38
+ control: {
39
+ type: string;
40
+ };
41
+ };
42
+ max: {
43
+ control: {
44
+ type: string;
45
+ };
46
+ };
47
+ maxlength: {
48
+ control: {
49
+ type: string;
50
+ };
51
+ };
52
+ min: {
53
+ control: {
54
+ type: string;
55
+ };
56
+ };
57
+ minlength: {
58
+ control: {
59
+ type: string;
60
+ };
61
+ };
62
+ name: {
63
+ control: {
64
+ type: string;
65
+ };
66
+ };
67
+ pattern: {
68
+ control: {
69
+ type: string;
70
+ };
71
+ };
72
+ placeholder: {
73
+ control: {
74
+ type: string;
75
+ };
76
+ };
77
+ readonly: {
78
+ control: {
79
+ type: string;
80
+ };
81
+ };
82
+ required: {
83
+ control: {
84
+ type: string;
85
+ };
86
+ };
87
+ step: {
88
+ control: {
89
+ type: string;
90
+ };
91
+ };
92
+ type: {
93
+ options: string[];
94
+ control: {
95
+ type: string;
96
+ };
97
+ };
98
+ value: {
99
+ control: {
100
+ type: string;
101
+ };
102
+ };
103
+ };
104
+ };
105
+ export default _default;
106
+ export declare const InputField: any;
@@ -1,6 +1,6 @@
1
- declare const _default: {
2
- title: string;
3
- component: string;
4
- };
5
- export default _default;
6
- export declare const Default: any;
1
+ declare const _default: {
2
+ title: string;
3
+ component: string;
4
+ };
5
+ export default _default;
6
+ export declare const Default: any;
@@ -41,7 +41,6 @@ export namespace Components {
41
41
  "errormsg": string;
42
42
  "iconleft": string;
43
43
  "iconright": string;
44
- "inline": boolean;
45
44
  "inputAutocapitalize": 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';
46
45
  "inputAutofocus": boolean;
47
46
  /**
@@ -55,7 +54,6 @@ export namespace Components {
55
54
  */
56
55
  "inputKeyhint": 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
57
56
  "inputTitle": string;
58
- "inputicon": string;
59
57
  "label": string;
60
58
  "max": MinMaxDates | number;
61
59
  "maxlength": string | number;
@@ -66,7 +64,6 @@ export namespace Components {
66
64
  "placeholder": string;
67
65
  "readonly": string | boolean;
68
66
  "required": boolean;
69
- "showerrorbubble": boolean;
70
67
  "showerrormsg": boolean;
71
68
  "step": string | number;
72
69
  "type": string;
@@ -175,7 +172,6 @@ declare namespace LocalJSX {
175
172
  "errormsg"?: string;
176
173
  "iconleft"?: string;
177
174
  "iconright"?: string;
178
- "inline"?: boolean;
179
175
  "inputAutocapitalize"?: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';
180
176
  "inputAutofocus"?: boolean;
181
177
  /**
@@ -189,7 +185,6 @@ declare namespace LocalJSX {
189
185
  */
190
186
  "inputKeyhint"?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
191
187
  "inputTitle"?: string;
192
- "inputicon"?: string;
193
188
  "label"?: string;
194
189
  "max"?: MinMaxDates | number;
195
190
  "maxlength"?: string | number;
@@ -204,7 +199,6 @@ declare namespace LocalJSX {
204
199
  "placeholder"?: string;
205
200
  "readonly"?: string | boolean;
206
201
  "required"?: boolean;
207
- "showerrorbubble"?: boolean;
208
202
  "showerrormsg"?: boolean;
209
203
  "step"?: string | number;
210
204
  "type"?: string;
@@ -1,5 +1,5 @@
1
- declare const _default: {
2
- title: string;
3
- };
4
- export default _default;
5
- export declare const Default: any;
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const Default: any;
@@ -1,2 +1,2 @@
1
- declare const icons: string[];
2
- export default icons;
1
+ declare const icons: string[];
2
+ export default icons;
@@ -1 +1 @@
1
- export { Components, JSX } from './components';
1
+ export { Components, JSX } from './components';
@@ -1,10 +1,10 @@
1
- declare function tagRegXp(tagName: string): RegExpExecArray;
2
- declare function attributeNameCheck(): boolean;
3
- declare const domSanitiserOptions: {
4
- CUSTOM_ELEMENT_HANDLING: {
5
- tagNameCheck: typeof tagRegXp;
6
- attributeNameCheck: typeof attributeNameCheck;
7
- allowCustomizedBuiltInElements: boolean;
8
- };
9
- };
10
- export default domSanitiserOptions;
1
+ declare function tagRegXp(tagName: string): RegExpExecArray;
2
+ declare function attributeNameCheck(): boolean;
3
+ declare const domSanitiserOptions: {
4
+ CUSTOM_ELEMENT_HANDLING: {
5
+ tagNameCheck: typeof tagRegXp;
6
+ attributeNameCheck: typeof attributeNameCheck;
7
+ allowCustomizedBuiltInElements: boolean;
8
+ };
9
+ };
10
+ export default domSanitiserOptions;
@@ -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;
@@ -0,0 +1 @@
1
+ export declare const transformTagName: (tagNameToBeTransformed: string, knownUntransformedTagName: string, knownUntransformedTagNameElementReference: HTMLElement) => string;
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.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "3t Design System",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1,21 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-451f61dd.js');
6
-
7
- 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:inline-block;cursor:default;user-select:none}.icon-size{width:24px;height:24px}.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}.darkred{color:#A20000}.orange{color:#f59500}.blue{color:#1479c6}.green{color:#a2bb31}.gray{color:#757575}.black{color:#212121}.white{color:white}";
8
-
9
- const TttxIcon = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- this.icon = undefined;
13
- this.color = 'grey';
14
- }
15
- render() {
16
- return (index.h(index.Host, null, index.h("span", { class: `material-symbols-rounded ${this.color ? this.color : ''}` }, this.icon)));
17
- }
18
- };
19
- TttxIcon.style = tttxIconCss;
20
-
21
- exports.tttx_icon = TttxIcon;
@@ -1,17 +0,0 @@
1
- import { r as registerInstance, h, H as Host } from './index-0350f122.js';
2
-
3
- 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:inline-block;cursor:default;user-select:none}.icon-size{width:24px;height:24px}.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}.darkred{color:#A20000}.orange{color:#f59500}.blue{color:#1479c6}.green{color:#a2bb31}.gray{color:#757575}.black{color:#212121}.white{color:white}";
4
-
5
- const TttxIcon = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.icon = undefined;
9
- this.color = 'grey';
10
- }
11
- render() {
12
- return (h(Host, null, h("span", { class: `material-symbols-rounded ${this.color ? this.color : ''}` }, this.icon)));
13
- }
14
- };
15
- TttxIcon.style = tttxIconCss;
16
-
17
- export { TttxIcon as tttx_icon };
@@ -1 +0,0 @@
1
- import{r as o,h as t,H as r}from"./p-62869344.js";const e=class{constructor(t){o(this,t),this.icon=void 0,this.color="grey"}render(){return t(r,null,t("span",{class:`material-symbols-rounded ${this.color?this.color:""}`},this.icon))}};e.style='.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:inline-block;cursor:default;user-select:none}.icon-size{width:24px;height:24px}.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}.darkred{color:#A20000}.orange{color:#f59500}.blue{color:#1479c6}.green{color:#a2bb31}.gray{color:#757575}.black{color:#212121}.white{color:white}';export{e as tttx_icon}
@@ -1,2 +0,0 @@
1
- let e,t,n=!1;const l={},s=e=>"object"==(e=typeof e)||"function"===e,o=(e,t,...n)=>{let l=null,o=!1,r=!1;const i=[],u=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!s(l))&&(l+=""),o&&r?i[i.length-1].t+=l:i.push(o?c(null,l):l),r=o)};if(u(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const a=c(e,null);return a.l=t,i.length>0&&(a.o=i),a},c=(e,t)=>({i:0,u:e,t,$:null,o:null,l:null}),r={},i=(e,t,n)=>{const l=(e=>T(e).h)(e);return{emit:e=>u(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},u=(e,t,n)=>{const l=B.ce(t,n);return e.dispatchEvent(l),l},a=new WeakMap,f=e=>"sc-"+e.m,d=(e,t,n,l,o,c)=>{if(n!==l){let r=U(e,t),i=t.toLowerCase();if("class"===t){const t=e.classList,s=h(n),o=h(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("ref"===t)l&&l(e);else if(r||"o"!==t[0]||"n"!==t[1]){const i=s(l);if((r||i&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const s=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&c||o)&&!i&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):U(_,i)?i.slice(2):i[2]+t.slice(3),n&&B.rel(e,t,n,!1),l&&B.ael(e,t,l,!1)}},$=/\s/,h=e=>e?e.split($):[],m=(e,t,n,s)=>{const o=11===t.$.nodeType&&t.$.host?t.$.host:t.$,c=e&&e.l||l,r=t.l||l;for(s in c)s in r||d(o,s,c[s],void 0,n,t.i);for(s in r)d(o,s,c[s],r[s],n,t.i)},p=(t,n,l)=>{const s=n.o[l];let o,c,r=0;if(null!==s.t)o=s.$=z.createTextNode(s.t);else if(o=s.$=z.createElement(s.u),m(null,s,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),s.o)for(r=0;r<s.o.length;++r)c=p(t,s,r),c&&o.appendChild(c);return o},y=(e,n,l,s,o,c)=>{let r,i=e;for(i.shadowRoot&&i.tagName===t&&(i=i.shadowRoot);o<=c;++o)s[o]&&(r=p(null,l,o),r&&(s[o].$=r,i.insertBefore(r,n)))},b=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.$,g(l),s.remove())},w=(e,t)=>e.u===t.u,S=(e,t)=>{const n=t.$=e.$,l=e.o,s=t.o,o=t.t;null===o?("slot"===t.u||m(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,c=0,r=t.length-1,i=t[0],u=t[r],a=l.length-1,f=l[0],d=l[a];for(;o<=r&&c<=a;)null==i?i=t[++o]:null==u?u=t[--r]:null==f?f=l[++c]:null==d?d=l[--a]:w(i,f)?(S(i,f),i=t[++o],f=l[++c]):w(u,d)?(S(u,d),u=t[--r],d=l[--a]):w(i,d)?(S(i,d),e.insertBefore(i.$,u.$.nextSibling),i=t[++o],d=l[--a]):w(u,f)?(S(u,f),e.insertBefore(u.$,i.$),u=t[--r],f=l[++c]):(s=p(t&&t[c],n,c),f=l[++c],s&&i.$.parentNode.insertBefore(s,i.$));o>r?y(e,null==l[a+1]?null:l[a+1].$,n,l,c,a):c>a&&b(t,o,r)})(n,l,t,s):null!==s?(null!==e.t&&(n.textContent=""),y(n,null,t,s,0,s.length-1)):null!==l&&b(l,0,l.length-1)):e.t!==o&&(n.data=o)},g=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(g)},j=(e,t)=>{t&&!e.p&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.p=t)))},M=(e,t)=>{if(e.i|=16,!(4&e.i))return j(e,e.S),ee((()=>v(e,t)));e.i|=512},v=(e,t)=>{const n=e.g;let l;return t&&(l=P(n,"componentWillLoad")),l=R(l,(()=>P(n,"componentWillRender"))),R(l,(()=>k(e,n,t)))},k=async(e,t,n)=>{const l=e.h,s=l["s-rc"];n&&(e=>{const t=e.j,n=e.h,l=t.i,s=((e,t)=>{let n=f(t);const l=V.get(n);if(e=11===e.nodeType?e:z,l)if("string"==typeof l){let t,s=a.get(e=e.head||e);s||a.set(e,s=new Set),s.has(n)||(t=z.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"),2&l&&n.classList.add(s+"-s"))})(e);C(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>O(e);0===t.length?n():(Promise.all(t).then(n),e.i|=4,t.length=0)}},C=(n,l)=>{try{l=l.render(),n.i&=-17,n.i|=2,((n,l)=>{const s=n.h,i=n.M||c(null,null),u=(e=>e&&e.u===r)(l)?l:o(null,null,l);t=s.tagName,u.u=null,u.i|=4,n.M=u,u.$=i.$=s.shadowRoot||s,e=s["s-sc"],S(i,u)})(n,l)}catch(e){q(e,n.h)}return null},O=e=>{const t=e.h,n=e.S;P(e.g,"componentDidRender"),64&e.i||(e.i|=64,W(t),e.v(t),n||x()),e.p&&(e.p(),e.p=void 0),512&e.i&&Z((()=>M(e,!1))),e.i&=-517},x=()=>{W(z.documentElement),Z((()=>u(_,"appload",{detail:{namespace:"tttx"}})))},P=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){q(e)}},R=(e,t)=>e&&e.then?e.then(t):t(),W=e=>e.classList.add("hydrated"),E=(e,t,n)=>{if(t.k){e.watchers&&(t.C=e.watchers);const l=Object.entries(t.k),o=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(o,e,{get(){return((e,t)=>T(this).O.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=T(e),c=o.h,r=o.O.get(t),i=o.i,u=o.g;if(n=((e,t)=>null==e||s(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(n,l.k[t][0]),(!(8&i)||void 0===r)&&n!==r&&(!Number.isNaN(r)||!Number.isNaN(n))&&(o.O.set(t,n),u)){if(l.C&&128&i){const e=l.C[t];e&&e.map((e=>{try{u[e](n,r,t)}catch(e){q(e,c)}}))}2==(18&i)&&M(o,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const t=new Map;o.attributeChangedCallback=function(e,n,l){B.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(o.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))}}return e},L=(e,t={})=>{const n=[],l=t.exclude||[],s=_.customElements,o=z.head,c=o.querySelector("meta[charset]"),r=z.createElement("style"),i=[];let u,a=!0;Object.assign(B,t),B.P=new URL(t.resourcesUrl||"./",z.baseURI).href,e.map((e=>{e[1].map((t=>{const o={i:t[0],m:t[1],k:t[2],R:t[3]};o.k=t[2],o.C={};const c=o.m,r=class extends HTMLElement{constructor(e){super(e),H(e=this,o),1&o.i&&e.attachShadow({mode:"open"})}connectedCallback(){u&&(clearTimeout(u),u=null),a?i.push(this):B.jmp((()=>(e=>{if(0==(1&B.i)){const t=T(e),n=t.j,l=()=>{};if(!(1&t.i)){t.i|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){j(t,t.S=n);break}}n.k&&Object.entries(n.k).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.i)){{if(t.i|=32,(s=F(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.C=s.watchers,E(s,n,2),s.isProxied=!0);const e=()=>{};t.i|=8;try{new s(t)}catch(e){q(e)}t.i&=-9,t.i|=128,e()}if(s.style){let e=s.style;const t=f(n);if(!V.has(t)){const l=()=>{};((e,t,n)=>{let l=V.get(e);I&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,V.set(e,l)})(t,e,!!(1&n.i)),l()}}}const o=t.S,c=()=>M(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(0,t,n)}l()}})(this)))}disconnectedCallback(){B.jmp((()=>{}))}componentOnReady(){return T(this).W}};o.L=e[0],l.includes(c)||s.get(c)||(n.push(c),s.define(c,E(r,o,1)))}))})),r.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",r.setAttribute("data-styles",""),o.insertBefore(r,c?c.nextSibling:o.firstChild),a=!1,i.length?i.map((e=>e.connectedCallback())):B.jmp((()=>u=setTimeout(x,30)))},N=new WeakMap,T=e=>N.get(e),A=(e,t)=>N.set(t.g=e,t),H=(e,t)=>{const n={i:0,h:e,j:t,O:new Map};return n.W=new Promise((e=>n.v=e)),e["s-p"]=[],e["s-rc"]=[],N.set(e,n)},U=(e,t)=>t in e,q=(e,t)=>(0,console.error)(e,t),D=new Map,F=e=>{const t=e.m.replace(/-/g,"_"),n=e.L,l=D.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(D.set(n,e),e[t])),q)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},V=new Map,_="undefined"!=typeof window?window:{},z=_.document||{head:{}},B={i:0,P:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},G=e=>Promise.resolve(e),I=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),J=[],K=[],Q=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&B.i?Z(Y):B.raf(Y))},X=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){q(e)}e.length=0},Y=()=>{X(J),X(K),(n=J.length>0)&&B.raf(Y)},Z=e=>G().then(e),ee=Q(K,!0);export{r as H,L as b,i as c,o as h,G as p,A as r}