@public-ui/sample-react 2.0.0-rc.8 → 2.0.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.
- package/README.md +18 -0
- package/dist/1130.js +2 -0
- package/dist/1474.js +1 -1
- package/dist/183.js +1 -1
- package/dist/2337.js +1 -1
- package/dist/2412.js +1 -1
- package/dist/{5327.js → 2738.js} +2 -2
- package/dist/3303.js +1 -1
- package/dist/3325.js +1 -1
- package/dist/3429.js +1 -1
- package/dist/3459.js +1 -1
- package/dist/3932.js +1 -1
- package/dist/4022.js +1 -1
- package/dist/4164.js +1 -1
- package/dist/4195.js +1 -1
- package/dist/4291.js +1 -1
- package/dist/4323.js +1 -1
- package/dist/4355.js +1 -1
- package/dist/4564.js +1 -1
- package/dist/4891.js +1 -1
- package/dist/{7648.js → 4916.js} +2 -2
- package/dist/5139.js +2 -0
- package/dist/5183.js +1 -1
- package/dist/5369.js +1 -1
- package/dist/5390.js +1 -1
- package/dist/540.js +1 -1
- package/dist/5717.js +1 -1
- package/dist/{6487.js → 5860.js} +2 -2
- package/dist/5862.js +1 -1
- package/dist/5866.js +1 -1
- package/dist/5869.js +2 -0
- package/dist/6012.js +1 -1
- package/dist/6068.js +1 -1
- package/dist/6210.js +1 -1
- package/dist/6320.js +1 -1
- package/dist/6558.js +1 -1
- package/dist/6813.js +1 -1
- package/dist/6908.js +1 -1
- package/dist/7029.js +1 -1
- package/dist/7255.js +1 -1
- package/dist/{9598.js → 7380.js} +2 -2
- package/dist/7447.js +1 -1
- package/dist/7535.js +1 -1
- package/dist/7715.js +1 -1
- package/dist/7722.js +1 -1
- package/dist/7734.js +2 -0
- package/dist/7801.js +1 -1
- package/dist/7858.js +1 -1
- package/dist/7955.js +1 -1
- package/dist/7995.js +1 -1
- package/dist/8061.js +1 -1
- package/dist/8065.js +1 -1
- package/dist/8073.js +1 -1
- package/dist/8111.js +1 -1
- package/dist/8255.js +1 -1
- package/dist/8291.js +1 -1
- package/dist/8316.js +2 -0
- package/dist/8709.js +1 -1
- package/dist/8761.js +1 -1
- package/dist/9734.js +1 -1
- package/dist/9747.js +1 -1
- package/dist/9792.js +1 -1
- package/dist/9895.js +1 -1
- package/dist/9963.js +1 -1
- package/dist/9972.js +1 -1
- package/dist/main.css +2 -2
- package/dist/main.js +531 -3278
- package/dist/main.js.LICENSE.txt +2 -2
- package/package.json +14 -14
- package/src/App.tsx +3 -1
- package/src/components/FocusInput.tsx +9 -8
- package/src/components/avatar/basic.tsx +3 -1
- package/src/components/badge/basic.tsx +5 -5
- package/src/components/badge/button.tsx +5 -5
- package/src/components/button-link/basic.tsx +3 -0
- package/src/components/button-link/image.tsx +1 -1
- package/src/components/card/flex.tsx +1 -1
- package/src/components/card/selection.tsx +3 -3
- package/src/components/handout/basic.tsx +22 -8
- package/src/components/heading/badged.tsx +18 -6
- package/src/components/image/basic.tsx +1 -1
- package/src/components/input-checkbox/partials/cases.tsx +2 -0
- package/src/components/input-radio/partials/cases.tsx +0 -1
- package/src/components/link/basic.tsx +1 -3
- package/src/components/link/image.tsx +2 -2
- package/src/components/table/formatter.ts +5 -0
- package/src/components/table/render-cell.tsx +16 -8
- package/src/components/table/test-data.ts +340 -0
- package/src/components/table/with-pagination.tsx +4 -3
- package/src/components/tabs/basic.tsx +21 -6
- package/src/components/toast/basic.tsx +68 -34
- package/src/hooks/useSetCurrentLocation.ts +7 -0
- package/src/react.main.tsx +2 -2
- package/src/scenarios/appointment-form/ErrorList.tsx +1 -1
- package/src/scenarios/complex-form/component.tsx +29 -29
- package/src/scenarios/custom-tooltip-width.tsx +6 -0
- package/src/scenarios/inputs-get-value.tsx +160 -0
- package/src/scenarios/routes.ts +4 -0
- package/src/shares/routes.ts +0 -2
- package/src/shares/theme.ts +4 -4
- package/src/style.scss +2 -5
- package/dist/4556.js +0 -2
- package/dist/5414.js +0 -2
- package/dist/6077.js +0 -2
- package/dist/6655.js +0 -2
- package/dist/7929.js +0 -2
- package/src/components/popover/basic.tsx +0 -36
- package/src/components/popover/routes.ts +0 -8
- /package/dist/{4556.js.LICENSE.txt → 1130.js.LICENSE.txt} +0 -0
- /package/dist/{5327.js.LICENSE.txt → 2738.js.LICENSE.txt} +0 -0
- /package/dist/{5414.js.LICENSE.txt → 4916.js.LICENSE.txt} +0 -0
- /package/dist/{6077.js.LICENSE.txt → 5139.js.LICENSE.txt} +0 -0
- /package/dist/{6487.js.LICENSE.txt → 5860.js.LICENSE.txt} +0 -0
- /package/dist/{6655.js.LICENSE.txt → 5869.js.LICENSE.txt} +0 -0
- /package/dist/{7648.js.LICENSE.txt → 7380.js.LICENSE.txt} +0 -0
- /package/dist/{7929.js.LICENSE.txt → 7734.js.LICENSE.txt} +0 -0
- /package/dist/{9598.js.LICENSE.txt → 8316.js.LICENSE.txt} +0 -0
|
@@ -63,4 +63,344 @@ export const DATA: Data[] = [
|
|
|
63
63
|
order: 14,
|
|
64
64
|
date: new Date('1995-01-25T12:31:27.983Z'),
|
|
65
65
|
},
|
|
66
|
+
{
|
|
67
|
+
order: 15,
|
|
68
|
+
date: new Date('1995-04-15T02:00:39.048Z'),
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
order: 16,
|
|
72
|
+
date: new Date('1994-03-15T19:13:04.564Z'),
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
order: 17,
|
|
76
|
+
date: new Date('1999-03-02T16:53:04.418Z'),
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
order: 18,
|
|
80
|
+
date: new Date('1982-08-23T18:37:38.014Z'),
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
order: 19,
|
|
84
|
+
date: new Date('1995-06-19T12:39:56.321Z'),
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
order: 20,
|
|
88
|
+
date: new Date('1994-09-23T15:03:35.746Z'),
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
order: 21,
|
|
92
|
+
date: new Date('1990-04-15T23:38:02.147Z'),
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
order: 22,
|
|
96
|
+
date: new Date('1983-08-01T10:36:44.006Z'),
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
order: 23,
|
|
100
|
+
date: new Date('1986-06-28T21:27:04.588Z'),
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
order: 24,
|
|
104
|
+
date: new Date('1986-08-14T19:34:40.904Z'),
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
order: 25,
|
|
108
|
+
date: new Date('1998-07-14T15:52:29.010Z'),
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
order: 26,
|
|
112
|
+
date: new Date('1985-02-15T18:56:32.344Z'),
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
order: 27,
|
|
116
|
+
date: new Date('1989-09-06T10:49:30.896Z'),
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
order: 28,
|
|
120
|
+
date: new Date('1994-09-05T14:21:37.211Z'),
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
order: 29,
|
|
124
|
+
date: new Date('1995-12-15T23:12:14.411Z'),
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
order: 30,
|
|
128
|
+
date: new Date('1986-08-14T19:34:40.904Z'),
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
order: 31,
|
|
132
|
+
date: new Date('1985-02-15T18:56:32.344Z'),
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
order: 32,
|
|
136
|
+
date: new Date('1989-09-06T10:49:30.896Z'),
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
order: 33,
|
|
140
|
+
date: new Date('1994-09-05T14:21:37.211Z'),
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
order: 34,
|
|
144
|
+
date: new Date('1995-12-15T23:12:14.411Z'),
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
order: 35,
|
|
148
|
+
date: new Date('1986-08-14T19:34:40.904Z'),
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
order: 36,
|
|
152
|
+
date: new Date('1985-02-15T18:56:32.344Z'),
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
order: 37,
|
|
156
|
+
date: new Date('1989-09-06T10:49:30.896Z'),
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
order: 38,
|
|
160
|
+
date: new Date('1994-09-05T14:21:37.211Z'),
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
order: 39,
|
|
164
|
+
date: new Date('1995-12-15T23:12:14.411Z'),
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
order: 40,
|
|
168
|
+
date: new Date('1986-08-14T19:34:40.904Z'),
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
order: 41,
|
|
172
|
+
date: new Date('1985-02-15T18:56:32.344Z'),
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
order: 42,
|
|
176
|
+
date: new Date('1989-09-06T10:49:30.896Z'),
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
order: 43,
|
|
180
|
+
date: new Date('1994-09-05T14:21:37.211Z'),
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
order: 44,
|
|
184
|
+
date: new Date('1995-12-15T23:12:14.411Z'),
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
order: 45,
|
|
188
|
+
date: new Date('1986-08-14T19:34:40.904Z'),
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
order: 46,
|
|
192
|
+
date: new Date('1985-02-15T18:56:32.344Z'),
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
order: 47,
|
|
196
|
+
date: new Date('1989-09-06T10:49:30.896Z'),
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
order: 48,
|
|
200
|
+
date: new Date('1994-09-05T14:21:37.211Z'),
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
order: 49,
|
|
204
|
+
date: new Date('1995-12-15T23:12:14.411Z'),
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
order: 50,
|
|
208
|
+
date: new Date('1986-08-14T19:34:40.904Z'),
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
order: 51,
|
|
212
|
+
date: new Date('1985-02-15T18:56:32.344Z'),
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
order: 52,
|
|
216
|
+
date: new Date('1989-09-06T10:49:30.896Z'),
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
order: 53,
|
|
220
|
+
date: new Date('1994-09-05T14:21:37.211Z'),
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
order: 54,
|
|
224
|
+
date: new Date('1995-12-15T23:12:14.411Z'),
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
order: 55,
|
|
228
|
+
date: new Date('1986-08-14T19:34:40.904Z'),
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
order: 56,
|
|
232
|
+
date: new Date('1985-02-15T18:56:32.344Z'),
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
order: 57,
|
|
236
|
+
date: new Date('1989-09-06T10:49:30.896Z'),
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
order: 58,
|
|
240
|
+
date: new Date('1994-09-05T14:21:37.211Z'),
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
order: 59,
|
|
244
|
+
date: new Date('1995-12-15T23:12:14.411Z'),
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
order: 60,
|
|
248
|
+
date: new Date('1986-08-14T19:34:40.904Z'),
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
order: 61,
|
|
252
|
+
date: new Date('1985-02-15T18:56:32.344Z'),
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
order: 62,
|
|
256
|
+
date: new Date('1989-09-06T10:49:30.896Z'),
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
order: 63,
|
|
260
|
+
date: new Date('1994-09-05T14:21:37.211Z'),
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
order: 64,
|
|
264
|
+
date: new Date('1995-12-15T23:12:14.411Z'),
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
order: 65,
|
|
268
|
+
date: new Date('1986-08-14T19:34:40.904Z'),
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
order: 66,
|
|
272
|
+
date: new Date('1985-02-15T18:56:32.344Z'),
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
order: 67,
|
|
276
|
+
date: new Date('1989-09-06T10:49:30.896Z'),
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
order: 68,
|
|
280
|
+
date: new Date('1994-09-05T14:21:37.211Z'),
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
order: 69,
|
|
284
|
+
date: new Date('1995-12-15T23:12:14.411Z'),
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
order: 70,
|
|
288
|
+
date: new Date('1986-08-14T19:34:40.904Z'),
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
order: 71,
|
|
292
|
+
date: new Date('1985-02-15T18:56:32.344Z'),
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
order: 72,
|
|
296
|
+
date: new Date('1989-09-06T10:49:30.896Z'),
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
order: 73,
|
|
300
|
+
date: new Date('1994-09-05T14:21:37.211Z'),
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
order: 74,
|
|
304
|
+
date: new Date('1995-12-15T23:12:14.411Z'),
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
order: 75,
|
|
308
|
+
date: new Date('1986-08-14T19:34:40.904Z'),
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
order: 76,
|
|
312
|
+
date: new Date('1985-02-15T18:56:32.344Z'),
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
order: 77,
|
|
316
|
+
date: new Date('1989-09-06T10:49:30.896Z'),
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
order: 78,
|
|
320
|
+
date: new Date('1994-09-05T14:21:37.211Z'),
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
order: 79,
|
|
324
|
+
date: new Date('1995-12-15T23:12:14.411Z'),
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
order: 80,
|
|
328
|
+
date: new Date('1986-08-14T19:34:40.904Z'),
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
order: 81,
|
|
332
|
+
date: new Date('1985-02-15T18:56:32.344Z'),
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
order: 82,
|
|
336
|
+
date: new Date('1989-09-06T10:49:30.896Z'),
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
order: 83,
|
|
340
|
+
date: new Date('1994-09-05T14:21:37.211Z'),
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
order: 84,
|
|
344
|
+
date: new Date('1995-12-15T23:12:14.411Z'),
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
order: 85,
|
|
348
|
+
date: new Date('1986-08-14T19:34:40.904Z'),
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
order: 86,
|
|
352
|
+
date: new Date('1985-02-15T18:56:32.344Z'),
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
order: 87,
|
|
356
|
+
date: new Date('1989-09-06T10:49:30.896Z'),
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
order: 88,
|
|
360
|
+
date: new Date('1994-09-05T14:21:37.211Z'),
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
order: 89,
|
|
364
|
+
date: new Date('1995-12-15T23:12:14.411Z'),
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
order: 90,
|
|
368
|
+
date: new Date('1986-08-14T19:34:40.904Z'),
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
order: 91,
|
|
372
|
+
date: new Date('1985-02-15T18:56:32.344Z'),
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
order: 92,
|
|
376
|
+
date: new Date('1989-09-06T10:49:30.896Z'),
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
order: 93,
|
|
380
|
+
date: new Date('1994-09-05T14:21:37.211Z'),
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
order: 94,
|
|
384
|
+
date: new Date('1995-12-15T23:12:14.411Z'),
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
order: 95,
|
|
388
|
+
date: new Date('1986-08-14T19:34:40.904Z'),
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
order: 96,
|
|
392
|
+
date: new Date('1985-02-15T18:56:32.344Z'),
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
order: 97,
|
|
396
|
+
date: new Date('1989-09-06T10:49:30.896Z'),
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
order: 98,
|
|
400
|
+
date: new Date('1994-09-05T14:21:37.211Z'),
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
order: 99,
|
|
404
|
+
date: new Date('1995-12-15T23:12:14.411Z'),
|
|
405
|
+
},
|
|
66
406
|
];
|
|
@@ -2,17 +2,18 @@ import React, { FC } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { KolTable } from '@public-ui/react';
|
|
4
4
|
import { KoliBriTableHeaders, KoliBriTablePaginationProps } from '@public-ui/components';
|
|
5
|
-
import { DATA } from './test-data';
|
|
5
|
+
import { Data, DATA } from './test-data';
|
|
6
|
+
import { DATE_FORMATTER } from './formatter';
|
|
6
7
|
|
|
7
8
|
const HEADERS: KoliBriTableHeaders = {
|
|
8
9
|
horizontal: [
|
|
9
10
|
[
|
|
10
11
|
{ label: 'Order', key: 'order' },
|
|
11
|
-
{ label: 'Date', key: 'date' },
|
|
12
|
+
{ label: 'Date', key: 'date', render: (_el, _cell, tupel) => DATE_FORMATTER.format((tupel as unknown as Data).date) },
|
|
12
13
|
],
|
|
13
14
|
],
|
|
14
15
|
};
|
|
15
|
-
const PAGINATION: KoliBriTablePaginationProps = { _page: 2
|
|
16
|
+
const PAGINATION: KoliBriTablePaginationProps = { _page: 2 };
|
|
16
17
|
|
|
17
18
|
export const TableWithPagination: FC = () => (
|
|
18
19
|
<div>
|
|
@@ -20,11 +20,26 @@ const tabs = [
|
|
|
20
20
|
_label: 'Letzter Tab',
|
|
21
21
|
},
|
|
22
22
|
];
|
|
23
|
+
|
|
24
|
+
const tabsWithoutIcons = tabs.map((tab) => ({
|
|
25
|
+
...tab,
|
|
26
|
+
_icons: undefined,
|
|
27
|
+
}));
|
|
28
|
+
|
|
23
29
|
export const TabsBasic: FC = () => (
|
|
24
|
-
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
<>
|
|
31
|
+
<KolTabs _tabs={tabsWithoutIcons} _label="Regular tabs">
|
|
32
|
+
<div slot="tab-0">Inhalte von Tab 1</div>
|
|
33
|
+
<div slot="tab-1">Inhalte von Tab 2</div>
|
|
34
|
+
<div slot="tab-2">Inhalte von Tab 3</div>
|
|
35
|
+
<div slot="tab-3">Inhalte von Tab 4</div>
|
|
36
|
+
</KolTabs>
|
|
37
|
+
|
|
38
|
+
<KolTabs _tabs={tabs} className="mt-4" _label="Tabs with icons">
|
|
39
|
+
<div slot="tab-0">Inhalte von Tab 1</div>
|
|
40
|
+
<div slot="tab-1">Inhalte von Tab 2</div>
|
|
41
|
+
<div slot="tab-2">Inhalte von Tab 3</div>
|
|
42
|
+
<div slot="tab-3">Inhalte von Tab 4</div>
|
|
43
|
+
</KolTabs>
|
|
44
|
+
</>
|
|
30
45
|
);
|
|
@@ -5,39 +5,73 @@ import { getRoot } from '../../shares/react-roots';
|
|
|
5
5
|
|
|
6
6
|
const toaster = ToasterService.getInstance(document);
|
|
7
7
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
8
|
+
export const ToastBasic: FC = () => {
|
|
9
|
+
const handleButtonClickSimple = () => {
|
|
10
|
+
void toaster.enqueue({
|
|
11
|
+
description: 'Toasty',
|
|
12
|
+
label: `Initial Toast`,
|
|
13
|
+
type: 'warning',
|
|
14
|
+
});
|
|
15
|
+
};
|
|
15
16
|
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
17
|
+
const handleButtonClickVariantMessage = () => {
|
|
18
|
+
void toaster.enqueue({
|
|
19
|
+
description: 'Toasty',
|
|
20
|
+
label: `Toast with variant 'msg'`,
|
|
21
|
+
type: 'warning',
|
|
22
|
+
alertVariant: 'msg',
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const handleButtonClickComplex = () => {
|
|
27
|
+
void toaster.enqueue({
|
|
28
|
+
render: (element: HTMLElement, { close }) => {
|
|
29
|
+
getRoot(element).render(
|
|
30
|
+
<>
|
|
31
|
+
<KolButton
|
|
32
|
+
_label={'Hello World from Toast!'}
|
|
33
|
+
_on={{
|
|
34
|
+
onClick: () => {
|
|
35
|
+
console.log('Toast Button clicked!');
|
|
36
|
+
close();
|
|
37
|
+
},
|
|
38
|
+
}}
|
|
39
|
+
/>
|
|
40
|
+
</>,
|
|
41
|
+
);
|
|
42
|
+
},
|
|
43
|
+
label: `Initial Toast`,
|
|
44
|
+
type: 'warning',
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const handleButtonClickOpenAndClose = async () => {
|
|
49
|
+
const close = await toaster.enqueue({
|
|
50
|
+
description: 'I will disappear in two seconds...',
|
|
51
|
+
label: `Good Bye`,
|
|
52
|
+
type: 'warning',
|
|
53
|
+
});
|
|
37
54
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
)
|
|
55
|
+
if (close) {
|
|
56
|
+
setTimeout(close, 2000);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const closeAll = () => {
|
|
61
|
+
toaster.closeAll();
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<div>
|
|
66
|
+
<KolButton _label="Show simple toast" _on={{ onClick: handleButtonClickSimple }}></KolButton>{' '}
|
|
67
|
+
<KolButton _label="Show toast with alert variant 'msg'" _on={{ onClick: handleButtonClickVariantMessage }}></KolButton>{' '}
|
|
68
|
+
<KolButton _label="Show complex toast" _on={{ onClick: handleButtonClickComplex }}></KolButton>
|
|
69
|
+
<br />
|
|
70
|
+
<br />
|
|
71
|
+
<KolButton _label="Show toast and close after 2 seconds" _on={{ onClick: () => void handleButtonClickOpenAndClose() }}></KolButton>
|
|
72
|
+
<br />
|
|
73
|
+
<br />
|
|
74
|
+
<KolButton _label="Close all toasts" _on={{ onClick: closeAll }}></KolButton>
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
};
|
package/src/react.main.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { HashRouter as Router } from 'react-router-dom';
|
|
|
5
5
|
import { defineCustomElements } from '@public-ui/components/dist/loader';
|
|
6
6
|
import type { Generic } from '@a11y-ui/core';
|
|
7
7
|
import { register } from '@public-ui/components';
|
|
8
|
-
import { BAMF, BMF,
|
|
8
|
+
import { BAMF, BMF, BZStv1, DEFAULT, DESYv1, DESYv2, ECL_EC, ECL_EU, ITZBund, MAPZ, ZOLLv2, ZOLLv3 } from '@public-ui/themes';
|
|
9
9
|
import { TH } from '@public-oss/kolibri-themes';
|
|
10
10
|
import { App } from './App';
|
|
11
11
|
|
|
@@ -23,7 +23,7 @@ void (async () => {
|
|
|
23
23
|
} else {
|
|
24
24
|
/* Regular mode: Register all known themes. */
|
|
25
25
|
try {
|
|
26
|
-
await register([BAMF, BMF, DEFAULT,
|
|
26
|
+
await register([BAMF, BMF, DEFAULT, BZStv1, DESYv1, DESYv2, ECL_EC, ECL_EU, ITZBund, MAPZ, ZOLLv2, ZOLLv3, TH], defineCustomElements, {
|
|
27
27
|
theme: {
|
|
28
28
|
detect: 'auto',
|
|
29
29
|
},
|
|
@@ -19,8 +19,8 @@ type Zeiten = {
|
|
|
19
19
|
export const TerminComponent: FC = () => (
|
|
20
20
|
<>
|
|
21
21
|
<div className="grid sm:grid-cols-1 gap-2 my-3">
|
|
22
|
-
<KolHeading
|
|
23
|
-
<KolHeading
|
|
22
|
+
<KolHeading _label="Terminreservierung" />
|
|
23
|
+
<KolHeading _label="Termine für Einwohnermelde- (incl. Pass- und Ausweisangelegenheiten) und Kraftfahrzeugangelegenheiten" _level={2} />
|
|
24
24
|
<div style={{ fontFamily: 'Arial' }}>
|
|
25
25
|
<p className="py-2">Derzeit kann generell nur mit vorheriger Terminvereinbarung bei den Bürgerdiensten vorgesprochen werden.</p>
|
|
26
26
|
<p className="py-2">
|
|
@@ -40,48 +40,48 @@ export const TerminComponent: FC = () => (
|
|
|
40
40
|
</div>
|
|
41
41
|
<div className="grid sm:grid-cols-1 gap-2">
|
|
42
42
|
<KolTable
|
|
43
|
-
|
|
43
|
+
_label="Öffnungszeiten"
|
|
44
44
|
_data={
|
|
45
45
|
[
|
|
46
46
|
{
|
|
47
47
|
stadtteil: 'Brackel',
|
|
48
|
-
montag: '08:00 - 12:00
|
|
49
|
-
dienstag: '08:00 - 12:00
|
|
50
|
-
mittwoch: '08:00 - 12:00
|
|
51
|
-
donnerstag: '08:00 - 12:00
|
|
48
|
+
montag: '08:00 - 12:00, 14:00 - 16:00',
|
|
49
|
+
dienstag: '08:00 - 12:00, 14:00 - 15:00',
|
|
50
|
+
mittwoch: '08:00 - 12:00, 14:00 - 15:00',
|
|
51
|
+
donnerstag: '08:00 - 12:00, 14:00 - 18:00',
|
|
52
52
|
freitag: '08:00 - 12:00',
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
stadtteil: 'Dorstfeld',
|
|
56
|
-
montag: '09:00 - 12:00
|
|
57
|
-
dienstag: '09:00 - 12:00
|
|
58
|
-
mittwoch: '09:00 - 12:00
|
|
59
|
-
donnerstag: '09:00 - 12:00
|
|
56
|
+
montag: '09:00 - 12:00, 14:00 - 16:00',
|
|
57
|
+
dienstag: '09:00 - 12:00, 14:00 - 15:00',
|
|
58
|
+
mittwoch: '09:00 - 12:00, 14:00 - 15:00',
|
|
59
|
+
donnerstag: '09:00 - 12:00, 14:00 - 18:00',
|
|
60
60
|
freitag: '09:00 - 12:00',
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
stadtteil: 'Aplerbeck',
|
|
64
|
-
montag: '08:00 - 12:00
|
|
65
|
-
dienstag: '08:00 - 12:00
|
|
66
|
-
mittwoch: '08:00 - 12:00
|
|
67
|
-
donnerstag: '08:00 - 12:00
|
|
64
|
+
montag: '08:00 - 12:00, 14:00 - 16:00',
|
|
65
|
+
dienstag: '08:00 - 12:00, 14:00 - 15:00',
|
|
66
|
+
mittwoch: '08:00 - 12:00, 14:00 - 15:00',
|
|
67
|
+
donnerstag: '08:00 - 12:00, 14:00 - 18:00',
|
|
68
68
|
freitag: '08:00 - 12:00',
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
stadtteil: 'Innenstadt Ost',
|
|
72
|
-
montag: '07:00 - 12:00
|
|
73
|
-
dienstag: '07:00 - 12:00
|
|
74
|
-
mittwoch: '07:00 - 12:00
|
|
75
|
-
donnerstag: '07:00 - 12:00
|
|
76
|
-
freitag: '07:00 - 12:00
|
|
72
|
+
montag: '07:00 - 12:00, 14:00 - 16:00',
|
|
73
|
+
dienstag: '07:00 - 12:00, 14:00 - 15:00',
|
|
74
|
+
mittwoch: '07:00 - 12:00, 14:00 - 15:00',
|
|
75
|
+
donnerstag: '07:00 - 12:00, 14:00 - 18:00',
|
|
76
|
+
freitag: '07:00 - 12:00, 13:00 - 16:00',
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
stadtteil: 'Innenstadt West',
|
|
80
|
-
montag: '07:00 - 12:00
|
|
81
|
-
dienstag: '07:00 - 12:00
|
|
82
|
-
mittwoch: '07:00 - 12:00
|
|
83
|
-
donnerstag: '07:00 - 12:00
|
|
84
|
-
freitag: '07:00 - 12:00
|
|
80
|
+
montag: '07:00 - 12:00, 14:00 - 16:00',
|
|
81
|
+
dienstag: '07:00 - 12:00, 14:00 - 15:00',
|
|
82
|
+
mittwoch: '07:00 - 12:00, 14:00 - 15:00',
|
|
83
|
+
donnerstag: '07:00 - 12:00, 14:00 - 18:00',
|
|
84
|
+
freitag: '07:00 - 12:00, 13:00 - 16:00',
|
|
85
85
|
/*render: (el, data) => {
|
|
86
86
|
el.innerHTML = `<kol-badge _color="#ff0000" _label="NIX"></kol-badge>`;
|
|
87
87
|
},*/
|
|
@@ -141,22 +141,22 @@ export const TerminComponent: FC = () => (
|
|
|
141
141
|
]}
|
|
142
142
|
>
|
|
143
143
|
<div>
|
|
144
|
-
<KolHeading _level={2}
|
|
144
|
+
<KolHeading _level={2} _label="Wählen Sie einen Stadtteil aus" />
|
|
145
145
|
<TerminLocationComponent onSubmitted={() => {}} />
|
|
146
146
|
</div>
|
|
147
147
|
<div>
|
|
148
|
-
<KolHeading _level={2}
|
|
148
|
+
<KolHeading _level={2} _label="Wählen Sie einen Termin aus" />
|
|
149
149
|
<TerminScheduleComponent onSubmitted={() => {}} />
|
|
150
150
|
</div>
|
|
151
151
|
<div>
|
|
152
|
-
<KolHeading _level={2}
|
|
152
|
+
<KolHeading _level={2} _label="Geben Sie Ihre Kontaktdaten ein" />
|
|
153
153
|
<TerminKopfdatenComponent onSubmitted={() => {}} />
|
|
154
154
|
</div>
|
|
155
155
|
</KolTabs>
|
|
156
156
|
</div>
|
|
157
157
|
<div className="grid sm:grid-cols-1 gap-2">
|
|
158
158
|
<div className="border-top"></div>
|
|
159
|
-
<KolHeading _level={3}
|
|
159
|
+
<KolHeading _level={3} _label="Fortschritt" />
|
|
160
160
|
<KolProgress _value={0} _max={100} _unit="Prozent des Formulars"></KolProgress>
|
|
161
161
|
</div>
|
|
162
162
|
</>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { KolButton } from '@public-ui/react';
|
|
3
|
+
|
|
4
|
+
export const CustomTooltipWidth: FC = () => (
|
|
5
|
+
<KolButton _label="Tooltip mit fixer Breite" _hideLabel style={{ '--kol-tooltip-width': '400px' }} _icons="codicon codicon-reactions"></KolButton>
|
|
6
|
+
);
|