@streamline-pulse/formkrafter-wc 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/README.md +23 -9
  2. package/dist/components/fk-brick-actions.js +1 -1
  3. package/dist/components/fk-brick-list.js +1 -1
  4. package/dist/components/fk-brick-mold-item.js +1 -1
  5. package/dist/components/fk-brick-render.js +1 -1
  6. package/dist/components/fk-code-editor.js +1 -1
  7. package/dist/components/fk-data-grid.js +1 -1
  8. package/dist/components/fk-drop-area.js +1 -1
  9. package/dist/components/fk-empty-form.js +1 -1
  10. package/dist/components/fk-file-input.js +1 -1
  11. package/dist/components/fk-form-builder.js +1 -1
  12. package/dist/components/fk-form-render.js +1 -1
  13. package/dist/components/fk-property-panel.js +1 -1
  14. package/dist/components/fk-rules-editor.js +1 -1
  15. package/dist/components/fk-select-input.js +1 -1
  16. package/dist/components/fk-signature-input.js +1 -1
  17. package/dist/components/fk-stepper.js +1 -1
  18. package/dist/components/fk-tabs.js +1 -1
  19. package/dist/components/index.js +1 -1
  20. package/dist/components/{p-DYchD23x.js → p-BerMKKKo.js} +1 -1
  21. package/dist/components/p-Bey6yx4S.js +1 -0
  22. package/dist/{formkrafter-wc/p-C-wnqV3i.js → components/p-BietHxaT.js} +1 -1
  23. package/dist/components/p-Bj48EXdM.js +1 -0
  24. package/dist/components/p-BkqqQX6U.js +1 -0
  25. package/dist/components/p-BnxDCFjv.js +1 -0
  26. package/dist/components/p-BpkKcCCr.js +1 -0
  27. package/dist/components/p-C0Y8qh8R.js +1 -0
  28. package/dist/components/{p-BGkZP87K.js → p-CIzLjMz0.js} +1 -1
  29. package/dist/components/{p--vL6GR31.js → p-C_8wUoZ4.js} +1 -1
  30. package/dist/components/p-CeeVZgCr.js +1 -0
  31. package/dist/components/{p-4COASNrZ.js → p-CehxuHtl.js} +1 -1
  32. package/dist/components/{p-D6n74M9d.js → p-CjnF4RZI.js} +1 -1
  33. package/dist/components/{p-CIfjRTky.js → p-CsHWN99R.js} +1 -1
  34. package/dist/components/p-CyZA17qf.js +1 -0
  35. package/dist/components/p-DlqnIm46.js +1 -0
  36. package/dist/components/{p-v7LxwCAc.js → p-DwN4nM7G.js} +1 -1
  37. package/dist/components/{p-DMCkrZqi.js → p-RzeBwfwG.js} +1 -1
  38. package/dist/components/{p-BWdm2a6q.js → p-_64WINOr.js} +1 -1
  39. package/dist/components/p-bZPtT8wr.js +1 -0
  40. package/dist/components/{p-fDJP6whN.js → p-hELMtJ9v.js} +1 -1
  41. package/dist/components/{p-CKMHMpID.js → p-l7ULqDJ3.js} +4 -4
  42. package/dist/components/{p-wuC5rVU7.js → p-tSZpD5I-.js} +1 -1
  43. package/dist/components/p-tTJg_I4V.js +1 -0
  44. package/dist/formkrafter-wc/formkrafter-wc.css +1 -1
  45. package/dist/formkrafter-wc/formkrafter-wc.esm.js +1 -1
  46. package/dist/formkrafter-wc/index.esm.js +1 -1
  47. package/dist/{components/p-C-wnqV3i.js → formkrafter-wc/p-BietHxaT.js} +1 -1
  48. package/dist/formkrafter-wc/p-C0Y8qh8R.js +1 -0
  49. package/dist/formkrafter-wc/p-C5tYszq2.js +12 -0
  50. package/dist/formkrafter-wc/{p-4COASNrZ.js → p-CehxuHtl.js} +1 -1
  51. package/dist/formkrafter-wc/p-DYsf28oe.js +1 -0
  52. package/dist/formkrafter-wc/p-DlqnIm46.js +1 -0
  53. package/dist/formkrafter-wc/{p-DMCkrZqi.js → p-RzeBwfwG.js} +1 -1
  54. package/dist/formkrafter-wc/p-WWmY5Z05.js +1 -0
  55. package/dist/formkrafter-wc/p-bf962b94.entry.js +1 -0
  56. package/dist/formkrafter-wc/p-ca200eec.entry.js +1 -0
  57. package/dist/types/components/fk-code-editor/fk-code-editor.d.ts +1 -0
  58. package/dist/types/components/fk-data-grid/fk-data-grid.d.ts +1 -0
  59. package/dist/types/components/fk-drop-area/fk-drop-area.d.ts +1 -0
  60. package/dist/types/components/fk-form-render/fk-form-render.d.ts +7 -1
  61. package/dist/types/components/fk-select-input/fk-select-input.d.ts +5 -1
  62. package/dist/types/components.d.ts +17 -0
  63. package/dist/types/index.d.ts +1 -1
  64. package/dist/types/registry/default-bricks.d.ts +36 -0
  65. package/dist/types/utils/mask.d.ts +1 -0
  66. package/package.json +10 -15
  67. package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -5
  68. package/dist/cjs/fk-brick-actions_18.cjs.entry.js +0 -4224
  69. package/dist/cjs/formkrafter-wc.cjs.js +0 -25
  70. package/dist/cjs/index-Bhy1RJMV.js +0 -3042
  71. package/dist/cjs/index-CImTe9BG.js +0 -2126
  72. package/dist/cjs/index-CdaT3-qx.js +0 -5444
  73. package/dist/cjs/index-CkPPRg03.js +0 -17548
  74. package/dist/cjs/index-DHgK3reD.js +0 -12233
  75. package/dist/cjs/index-Ds0sDbXV.js +0 -4019
  76. package/dist/cjs/index-c9BL7y3N.js +0 -1922
  77. package/dist/cjs/index.cjs.js +0 -48
  78. package/dist/cjs/loader.cjs.js +0 -13
  79. package/dist/collection/collection-manifest.json +0 -30
  80. package/dist/collection/components/fk-brick-actions/fk-brick-actions.css +0 -78
  81. package/dist/collection/components/fk-brick-actions/fk-brick-actions.js +0 -215
  82. package/dist/collection/components/fk-brick-list/fk-brick-list.css +0 -71
  83. package/dist/collection/components/fk-brick-list/fk-brick-list.js +0 -55
  84. package/dist/collection/components/fk-brick-mold-item/fk-brick-mold-item.css +0 -33
  85. package/dist/collection/components/fk-brick-mold-item/fk-brick-mold-item.js +0 -73
  86. package/dist/collection/components/fk-brick-not-found/fk-brick-not-found.css +0 -8
  87. package/dist/collection/components/fk-brick-not-found/fk-brick-not-found.js +0 -18
  88. package/dist/collection/components/fk-brick-render/fk-brick-render.js +0 -447
  89. package/dist/collection/components/fk-code-editor/fk-code-editor.css +0 -26
  90. package/dist/collection/components/fk-code-editor/fk-code-editor.js +0 -145
  91. package/dist/collection/components/fk-data-grid/fk-data-grid.css +0 -75
  92. package/dist/collection/components/fk-data-grid/fk-data-grid.js +0 -300
  93. package/dist/collection/components/fk-drop-area/fk-drop-area.css +0 -18
  94. package/dist/collection/components/fk-drop-area/fk-drop-area.js +0 -98
  95. package/dist/collection/components/fk-empty-form/fk-empty-form.css +0 -22
  96. package/dist/collection/components/fk-empty-form/fk-empty-form.js +0 -19
  97. package/dist/collection/components/fk-file-input/fk-file-input.css +0 -95
  98. package/dist/collection/components/fk-file-input/fk-file-input.js +0 -239
  99. package/dist/collection/components/fk-form-builder/fk-form-builder.css +0 -112
  100. package/dist/collection/components/fk-form-builder/fk-form-builder.js +0 -431
  101. package/dist/collection/components/fk-form-render/fk-form-render.css +0 -7
  102. package/dist/collection/components/fk-form-render/fk-form-render.js +0 -352
  103. package/dist/collection/components/fk-property-panel/fk-property-panel.css +0 -153
  104. package/dist/collection/components/fk-property-panel/fk-property-panel.js +0 -388
  105. package/dist/collection/components/fk-rules-editor/fk-rules-editor.css +0 -166
  106. package/dist/collection/components/fk-rules-editor/fk-rules-editor.js +0 -250
  107. package/dist/collection/components/fk-select-input/fk-select-input.css +0 -153
  108. package/dist/collection/components/fk-select-input/fk-select-input.js +0 -454
  109. package/dist/collection/components/fk-signature-input/fk-signature-input.css +0 -42
  110. package/dist/collection/components/fk-signature-input/fk-signature-input.js +0 -158
  111. package/dist/collection/components/fk-stepper/fk-stepper.css +0 -99
  112. package/dist/collection/components/fk-stepper/fk-stepper.js +0 -285
  113. package/dist/collection/components/fk-tabs/fk-tabs.css +0 -38
  114. package/dist/collection/components/fk-tabs/fk-tabs.js +0 -249
  115. package/dist/collection/i18n/i18n.js +0 -265
  116. package/dist/collection/index.js +0 -5
  117. package/dist/collection/registry/create-brick.js +0 -34
  118. package/dist/collection/registry/default-bricks.js +0 -564
  119. package/dist/collection/registry/registry.js +0 -44
  120. package/dist/collection/utils/brick-data.js +0 -16
  121. package/dist/collection/utils/drop.js +0 -14
  122. package/dist/collection/utils/events.js +0 -1
  123. package/dist/collection/utils/options.js +0 -21
  124. package/dist/collection/utils/remote.js +0 -27
  125. package/dist/collection/utils/rule-condition.js +0 -72
  126. package/dist/collection/utils/style.js +0 -11
  127. package/dist/components/p-BOmBVgfJ.js +0 -1
  128. package/dist/components/p-B_-x-GlA.js +0 -1
  129. package/dist/components/p-Br1s4Ujx.js +0 -1
  130. package/dist/components/p-CUF31e-P.js +0 -1
  131. package/dist/components/p-CWQX0sXS.js +0 -1
  132. package/dist/components/p-DFe3zZCI.js +0 -1
  133. package/dist/components/p-DOInQkG6.js +0 -1
  134. package/dist/components/p-PAr7WoWG.js +0 -1
  135. package/dist/components/p-YyGnQmX-.js +0 -1
  136. package/dist/components/p-swxZqinH.js +0 -1
  137. package/dist/esm/app-globals-DQuL1Twl.js +0 -3
  138. package/dist/esm/fk-brick-actions_18.entry.js +0 -4205
  139. package/dist/esm/formkrafter-wc.js +0 -21
  140. package/dist/esm/index-BAcz7b5u.js +0 -5416
  141. package/dist/esm/index-BkRMoLXK.js +0 -3029
  142. package/dist/esm/index-CGMDfZ5m.js +0 -1808
  143. package/dist/esm/index-D7Cta1UB.js +0 -17488
  144. package/dist/esm/index-DtcM1yw5.js +0 -3991
  145. package/dist/esm/index-DuVf3NlP.js +0 -12222
  146. package/dist/esm/index-qLZlXROB.js +0 -2117
  147. package/dist/esm/index.js +0 -2
  148. package/dist/esm/loader.js +0 -11
  149. package/dist/formkrafter-wc/p-6d29555b.entry.js +0 -1
  150. package/dist/formkrafter-wc/p-DOInQkG6.js +0 -1
  151. package/dist/formkrafter-wc/p-Ddu6BquK.js +0 -12
  152. package/dist/index.cjs.js +0 -1
  153. package/dist/index.js +0 -1
  154. package/dist/stencil.config.js +0 -34
  155. package/loader/cdn.js +0 -1
  156. package/loader/index.cjs.js +0 -1
  157. package/loader/index.d.ts +0 -24
  158. package/loader/index.es2017.js +0 -1
  159. package/loader/index.js +0 -2
@@ -1,300 +0,0 @@
1
- import { h } from "@stencil/core";
2
- import { validateBrickSpecDataDetailed } from "@streamline-pulse/formkrafter-core";
3
- import { fkT } from "../../i18n/i18n";
4
- export class FkDataGrid {
5
- constructor() {
6
- this.disabled = false;
7
- this.touched = {};
8
- this.addRow = (event) => {
9
- event.preventDefault();
10
- this.gridValueChange.emit([...this.rows(), {}]);
11
- };
12
- }
13
- rows() {
14
- return Array.isArray(this.value)
15
- ? this.value
16
- : [];
17
- }
18
- rowSpec() {
19
- var _a, _b;
20
- if (((_a = this.rowSpecCache) === null || _a === void 0 ? void 0 : _a.source) !== this.spec) {
21
- this.rowSpecCache = {
22
- source: this.spec,
23
- rowSpec: {
24
- type: 'panel',
25
- id: 'grid-row',
26
- name: 'Row',
27
- configs: { key: 'row' },
28
- children: (_b = this.spec.children) !== null && _b !== void 0 ? _b : [],
29
- },
30
- };
31
- }
32
- return this.rowSpecCache.rowSpec;
33
- }
34
- rowErrors(row) {
35
- const present = Object.fromEntries(Object.entries(row).filter(([, value]) => value !== '' && value !== null && value !== undefined));
36
- return validateBrickSpecDataDetailed(this.rowSpec(), present, this.locale)
37
- .errors;
38
- }
39
- visibleRowErrors(index) {
40
- var _a, _b;
41
- const row = (_a = this.rows()[index]) !== null && _a !== void 0 ? _a : {};
42
- const touched = (_b = this.touched[index]) !== null && _b !== void 0 ? _b : {};
43
- const errors = {};
44
- for (const [key, message] of Object.entries(this.rowErrors(row))) {
45
- if (touched[key])
46
- errors[key] = message;
47
- }
48
- return errors;
49
- }
50
- handleRowChange(event) {
51
- var _a, _b;
52
- event.stopPropagation();
53
- const origin = event.target;
54
- const rowEl = origin.closest('[data-grid-row]');
55
- const index = Number((_a = rowEl === null || rowEl === void 0 ? void 0 : rowEl.getAttribute('data-grid-row')) !== null && _a !== void 0 ? _a : -1);
56
- if (index < 0)
57
- return;
58
- const rowTouched = Object.assign({}, ((_b = this.touched[index]) !== null && _b !== void 0 ? _b : {}));
59
- for (const key of Object.keys(event.detail))
60
- rowTouched[key] = true;
61
- this.touched = Object.assign(Object.assign({}, this.touched), { [index]: rowTouched });
62
- const rows = this.rows().map((row, i) => i === index ? Object.assign(Object.assign({}, row), event.detail) : row);
63
- this.gridValueChange.emit(rows);
64
- }
65
- async validateRows() {
66
- var _a, _b;
67
- const rows = this.rows();
68
- const gridKey = (_b = (_a = this.spec.configs) === null || _a === void 0 ? void 0 : _a.key) !== null && _b !== void 0 ? _b : 'grid';
69
- const allTouched = {};
70
- const errors = {};
71
- rows.forEach((row, index) => {
72
- var _a, _b;
73
- const rowTouched = {};
74
- for (const child of (_a = this.spec.children) !== null && _a !== void 0 ? _a : []) {
75
- if ((_b = child.configs) === null || _b === void 0 ? void 0 : _b.key)
76
- rowTouched[child.configs.key] = true;
77
- }
78
- allTouched[index] = rowTouched;
79
- for (const [key, message] of Object.entries(this.rowErrors(row))) {
80
- errors[`${gridKey}[${index}].${key}`] = message;
81
- }
82
- });
83
- this.touched = allTouched;
84
- return { valid: Object.keys(errors).length === 0, errors };
85
- }
86
- removeRow(index) {
87
- const rows = this.rows().filter((_, i) => i !== index);
88
- const touched = {};
89
- for (const [key, value] of Object.entries(this.touched)) {
90
- const i = Number(key);
91
- if (i < index)
92
- touched[i] = value;
93
- else if (i > index)
94
- touched[i - 1] = value;
95
- }
96
- this.touched = touched;
97
- this.gridValueChange.emit(rows.length ? rows : undefined);
98
- }
99
- render() {
100
- var _a;
101
- const children = (_a = this.spec.children) !== null && _a !== void 0 ? _a : [];
102
- const rows = this.rows();
103
- return (h("div", { key: '1c77d72cd1482d673ffdb5b7d67ca200e55919d7', class: "fk-grid" }, rows.length === 0 ? (h("p", { class: "fk-grid__empty" }, fkT('grid.empty'))) : null, rows.map((row, index) => (h("div", { class: "fk-grid__row", "data-grid-row": index, key: index }, h("div", { class: "fk-grid__cells" }, children.map((child, childIndex) => (h("fk-brick-render", { brickSpec: child, data: row, dataMap: row, errors: this.visibleRowErrors(index), locale: this.locale, path: `grid.${index}.${childIndex}`, utils: this.utils })))), h("button", { type: "button", class: "fk-grid__remove", title: fkT('grid.removeRow'), disabled: this.disabled, onClick: (event) => {
104
- event.preventDefault();
105
- this.removeRow(index);
106
- } }, "\u2715")))), h("button", { key: '9bf04c364b3262c436ffb580daf802d15f29de57', type: "button", class: "fk-grid__add", disabled: this.disabled, onClick: this.addRow }, fkT('grid.addRow'))));
107
- }
108
- static get is() { return "fk-data-grid"; }
109
- static get encapsulation() { return "scoped"; }
110
- static get originalStyleUrls() {
111
- return {
112
- "$": ["fk-data-grid.css"]
113
- };
114
- }
115
- static get styleUrls() {
116
- return {
117
- "$": ["fk-data-grid.css"]
118
- };
119
- }
120
- static get properties() {
121
- return {
122
- "spec": {
123
- "type": "unknown",
124
- "mutable": false,
125
- "complexType": {
126
- "original": "BrickSpec",
127
- "resolved": "BrickSpec",
128
- "references": {
129
- "BrickSpec": {
130
- "location": "import",
131
- "path": "@streamline-pulse/formkrafter-core",
132
- "id": "../core/dist/index.d.ts::BrickSpec",
133
- "referenceLocation": "BrickSpec"
134
- }
135
- }
136
- },
137
- "required": true,
138
- "optional": false,
139
- "docs": {
140
- "tags": [],
141
- "text": ""
142
- },
143
- "getter": false,
144
- "setter": false
145
- },
146
- "value": {
147
- "type": "unknown",
148
- "mutable": false,
149
- "complexType": {
150
- "original": "unknown",
151
- "resolved": "unknown",
152
- "references": {}
153
- },
154
- "required": false,
155
- "optional": true,
156
- "docs": {
157
- "tags": [],
158
- "text": ""
159
- },
160
- "getter": false,
161
- "setter": false
162
- },
163
- "disabled": {
164
- "type": "boolean",
165
- "mutable": false,
166
- "complexType": {
167
- "original": "boolean",
168
- "resolved": "boolean",
169
- "references": {}
170
- },
171
- "required": false,
172
- "optional": false,
173
- "docs": {
174
- "tags": [],
175
- "text": ""
176
- },
177
- "getter": false,
178
- "setter": false,
179
- "reflect": false,
180
- "attribute": "disabled",
181
- "defaultValue": "false"
182
- },
183
- "locale": {
184
- "type": "string",
185
- "mutable": false,
186
- "complexType": {
187
- "original": "string",
188
- "resolved": "string",
189
- "references": {}
190
- },
191
- "required": false,
192
- "optional": true,
193
- "docs": {
194
- "tags": [],
195
- "text": ""
196
- },
197
- "getter": false,
198
- "setter": false,
199
- "reflect": false,
200
- "attribute": "locale"
201
- },
202
- "utils": {
203
- "type": "unknown",
204
- "mutable": false,
205
- "complexType": {
206
- "original": "Utils",
207
- "resolved": "object & { validateForm: () => { isValid: boolean; }; }",
208
- "references": {
209
- "Utils": {
210
- "location": "import",
211
- "path": "@streamline-pulse/formkrafter-core",
212
- "id": "../core/dist/index.d.ts::Utils",
213
- "referenceLocation": "Utils"
214
- }
215
- }
216
- },
217
- "required": true,
218
- "optional": false,
219
- "docs": {
220
- "tags": [],
221
- "text": ""
222
- },
223
- "getter": false,
224
- "setter": false
225
- }
226
- };
227
- }
228
- static get states() {
229
- return {
230
- "touched": {}
231
- };
232
- }
233
- static get events() {
234
- return [{
235
- "method": "gridValueChange",
236
- "name": "gridValueChange",
237
- "bubbles": true,
238
- "cancelable": true,
239
- "composed": true,
240
- "docs": {
241
- "tags": [],
242
- "text": ""
243
- },
244
- "complexType": {
245
- "original": "Array<Record<string, unknown>> | undefined",
246
- "resolved": "Record<string, unknown>[]",
247
- "references": {
248
- "Array": {
249
- "location": "global",
250
- "id": "global::Array"
251
- },
252
- "Record": {
253
- "location": "global",
254
- "id": "global::Record"
255
- }
256
- }
257
- }
258
- }];
259
- }
260
- static get methods() {
261
- return {
262
- "validateRows": {
263
- "complexType": {
264
- "signature": "() => Promise<ValidationResult>",
265
- "parameters": [],
266
- "references": {
267
- "Promise": {
268
- "location": "global",
269
- "id": "global::Promise"
270
- },
271
- "ValidationResult": {
272
- "location": "import",
273
- "path": "@streamline-pulse/formkrafter-core",
274
- "id": "../core/dist/index.d.ts::ValidationResult",
275
- "referenceLocation": "ValidationResult"
276
- },
277
- "Record": {
278
- "location": "global",
279
- "id": "global::Record"
280
- }
281
- },
282
- "return": "Promise<ValidationResult>"
283
- },
284
- "docs": {
285
- "text": "",
286
- "tags": []
287
- }
288
- }
289
- };
290
- }
291
- static get listeners() {
292
- return [{
293
- "name": "brickDataChange",
294
- "method": "handleRowChange",
295
- "target": undefined,
296
- "capture": false,
297
- "passive": false
298
- }];
299
- }
300
- }
@@ -1,18 +0,0 @@
1
- .fk-drop {
2
- display: flex;
3
- align-items: center;
4
- justify-content: center;
5
- min-height: 40px;
6
- margin-top: calc(var(--fk-spacing) / 2);
7
- border: 1px dashed var(--fk-color-border);
8
- border-radius: var(--fk-radius);
9
- color: var(--fk-color-muted);
10
- font-size: 0.75rem;
11
- transition: border-color 120ms ease, background-color 120ms ease;
12
- }
13
-
14
- .fk-drop--over {
15
- border-color: var(--fk-color-primary);
16
- background: color-mix(in srgb, var(--fk-color-primary) 8%, transparent);
17
- color: var(--fk-color-primary);
18
- }
@@ -1,98 +0,0 @@
1
- import { h } from "@stencil/core";
2
- import { dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
3
- import { toBrickDropDetail } from "../../utils/drop";
4
- import { fkT } from "../../i18n/i18n";
5
- export class FkDropArea {
6
- constructor() {
7
- this.isOver = false;
8
- }
9
- componentDidLoad() {
10
- this.cleanup = dropTargetForElements({
11
- element: this.host,
12
- onDragEnter: () => (this.isOver = true),
13
- onDragLeave: () => (this.isOver = false),
14
- onDrop: ({ source, location }) => {
15
- var _a;
16
- this.isOver = false;
17
- if (((_a = location.current.dropTargets[0]) === null || _a === void 0 ? void 0 : _a.element) !== this.host)
18
- return;
19
- const detail = toBrickDropDetail(source.data, this.path);
20
- if (detail)
21
- this.brickDrop.emit(detail);
22
- },
23
- });
24
- }
25
- disconnectedCallback() {
26
- var _a;
27
- (_a = this.cleanup) === null || _a === void 0 ? void 0 : _a.call(this);
28
- }
29
- render() {
30
- return (h("div", { key: '727b7005fcc58e3b6b2f455b03312fd91e3b063b', class: { 'fk-drop': true, 'fk-drop--over': this.isOver } }, h("span", { key: '41d1158e101100ebb229b74aec2ddfaf1aa57202', class: "fk-drop__hint" }, fkT('drop.hint'))));
31
- }
32
- static get is() { return "fk-drop-area"; }
33
- static get encapsulation() { return "scoped"; }
34
- static get originalStyleUrls() {
35
- return {
36
- "$": ["fk-drop-area.css"]
37
- };
38
- }
39
- static get styleUrls() {
40
- return {
41
- "$": ["fk-drop-area.css"]
42
- };
43
- }
44
- static get properties() {
45
- return {
46
- "path": {
47
- "type": "string",
48
- "mutable": false,
49
- "complexType": {
50
- "original": "string",
51
- "resolved": "string",
52
- "references": {}
53
- },
54
- "required": true,
55
- "optional": false,
56
- "docs": {
57
- "tags": [],
58
- "text": ""
59
- },
60
- "getter": false,
61
- "setter": false,
62
- "reflect": false,
63
- "attribute": "path"
64
- }
65
- };
66
- }
67
- static get states() {
68
- return {
69
- "isOver": {}
70
- };
71
- }
72
- static get events() {
73
- return [{
74
- "method": "brickDrop",
75
- "name": "brickDrop",
76
- "bubbles": true,
77
- "cancelable": true,
78
- "composed": true,
79
- "docs": {
80
- "tags": [],
81
- "text": ""
82
- },
83
- "complexType": {
84
- "original": "BrickDropDetail",
85
- "resolved": "BrickDropDetail",
86
- "references": {
87
- "BrickDropDetail": {
88
- "location": "import",
89
- "path": "../../utils/events",
90
- "id": "src/utils/events.ts::BrickDropDetail",
91
- "referenceLocation": "BrickDropDetail"
92
- }
93
- }
94
- }
95
- }];
96
- }
97
- static get elementRef() { return "host"; }
98
- }
@@ -1,22 +0,0 @@
1
- .fk-empty {
2
- display: flex;
3
- flex-direction: column;
4
- align-items: center;
5
- justify-content: center;
6
- gap: calc(var(--fk-spacing) / 2);
7
- min-height: 160px;
8
- border: 2px dashed var(--fk-color-border);
9
- border-radius: var(--fk-radius);
10
- color: var(--fk-color-muted);
11
- text-align: center;
12
- }
13
-
14
- .fk-empty__title {
15
- margin: 0;
16
- font-weight: 600;
17
- }
18
-
19
- .fk-empty__hint {
20
- margin: 0;
21
- font-size: 0.875rem;
22
- }
@@ -1,19 +0,0 @@
1
- import { Host, h } from "@stencil/core";
2
- import { fkT } from "../../i18n/i18n";
3
- export class FkEmptyForm {
4
- render() {
5
- return (h(Host, { key: '1b0ab4cd1d988a4800deeb6e3cfd8f5074520f6b' }, h("div", { key: '65b551e1cab6162514ad941b21e318c5f19b824a', class: "fk-empty" }, h("p", { key: 'c4eba1c6fecb4f2669f1c4dfb09cd816790a5ebf', class: "fk-empty__title" }, fkT('empty.title')), h("p", { key: '751bb3a2fc07982c90a214bd1e71592ec03d988d', class: "fk-empty__hint" }, fkT('empty.hint')))));
6
- }
7
- static get is() { return "fk-empty-form"; }
8
- static get encapsulation() { return "scoped"; }
9
- static get originalStyleUrls() {
10
- return {
11
- "$": ["fk-empty-form.css"]
12
- };
13
- }
14
- static get styleUrls() {
15
- return {
16
- "$": ["fk-empty-form.css"]
17
- };
18
- }
19
- }
@@ -1,95 +0,0 @@
1
- :host {
2
- display: block;
3
- }
4
-
5
- .fk-file {
6
- display: flex;
7
- flex-direction: column;
8
- gap: calc(var(--fk-spacing) / 2);
9
- align-items: flex-start;
10
- }
11
-
12
- .fk-file__native {
13
- display: none;
14
- }
15
-
16
- .fk-file__choose {
17
- font: inherit;
18
- font-size: 0.85rem;
19
- padding: calc(var(--fk-spacing) / 1.5) var(--fk-spacing);
20
- border: 1px dashed var(--fk-color-border);
21
- border-radius: var(--fk-radius);
22
- background: transparent;
23
- color: var(--fk-color-muted);
24
- cursor: pointer;
25
- }
26
-
27
- .fk-file__choose:hover:not(:disabled) {
28
- border-color: var(--fk-color-primary);
29
- color: var(--fk-color-primary);
30
- }
31
-
32
- .fk-file__choose:disabled {
33
- opacity: 0.55;
34
- cursor: not-allowed;
35
- }
36
-
37
- .fk-file__selected {
38
- display: flex;
39
- align-items: center;
40
- gap: var(--fk-spacing);
41
- width: 100%;
42
- box-sizing: border-box;
43
- padding: calc(var(--fk-spacing) * 0.75) var(--fk-spacing);
44
- border: 1px solid var(--fk-color-border);
45
- border-radius: var(--fk-radius);
46
- background: var(--fk-color-surface);
47
- }
48
-
49
- .fk-file__icon {
50
- display: inline-flex;
51
- flex-shrink: 0;
52
- color: var(--fk-color-primary);
53
- }
54
-
55
- .fk-file__meta {
56
- display: flex;
57
- flex-direction: column;
58
- gap: 2px;
59
- flex: 1;
60
- min-width: 0;
61
- }
62
-
63
- .fk-file__name {
64
- font-size: 0.85rem;
65
- font-weight: 600;
66
- color: var(--fk-color-text);
67
- overflow: hidden;
68
- text-overflow: ellipsis;
69
- white-space: nowrap;
70
- }
71
-
72
- .fk-file__size {
73
- font-size: 0.72rem;
74
- color: var(--fk-color-muted);
75
- white-space: nowrap;
76
- }
77
-
78
- .fk-file__remove {
79
- border: none;
80
- background: transparent;
81
- color: var(--fk-color-muted);
82
- font-size: 0.8rem;
83
- cursor: pointer;
84
- padding: 4px 6px;
85
- border-radius: calc(var(--fk-radius) / 2);
86
- flex-shrink: 0;
87
- }
88
-
89
- .fk-file__remove:hover:not(:disabled) {
90
- background: color-mix(in srgb, var(--fk-color-danger) 12%, transparent);
91
- }
92
-
93
- .fk-file__remove:hover:not(:disabled) {
94
- color: var(--fk-color-danger);
95
- }