@cscfi/csc-ui-react 3.0.19 → 4.0.0-alpha.1
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/components.d.ts +170 -0
- package/dist/components.js +545 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +10 -2
- package/package.json +30 -29
- package/README.md +0 -11
- package/dist/components/stencil-generated/components.js +0 -607
- package/dist/components/stencil-generated/components.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/styles/.gitkeep +0 -0
- package/dist/styles/css/theme.css +0 -102
- package/dist/styles/scss/_theme.scss +0 -100
- package/dist/styles/tailwind/theme.js +0 -120
- package/dist/types/components/stencil-generated/components.d.ts +0 -299
- package/dist/types/index.d.ts +0 -1
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* GENERATED by scripts/generate.mjs from the csc-ui Custom Elements
|
|
4
|
+
* Manifest — do not edit. Regenerate with `pnpm run generate`.
|
|
5
|
+
*/
|
|
6
|
+
import { createComponent } from '@lit/react';
|
|
7
|
+
import { defineCustomElements, } from '@cscfi/csc-ui';
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
// Register the custom elements once on the client. During SSR the bare tags
|
|
10
|
+
// render as-is and upgrade on the client.
|
|
11
|
+
if (typeof customElements !== 'undefined') {
|
|
12
|
+
defineCustomElements();
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The upgraded element class, typed as its generated element interface.
|
|
16
|
+
* `createComponent` probes `elementClass.prototype` to route React props to
|
|
17
|
+
* DOM properties; on the server (no custom element registry) an empty class
|
|
18
|
+
* makes every prop render as an attribute, which hydration then corrects.
|
|
19
|
+
*/
|
|
20
|
+
const elementClass = (tag) => (typeof customElements !== 'undefined'
|
|
21
|
+
? customElements.get(tag)
|
|
22
|
+
: class {
|
|
23
|
+
});
|
|
24
|
+
export const CAccordion = createComponent({
|
|
25
|
+
displayName: 'CAccordion',
|
|
26
|
+
elementClass: elementClass('c-accordion'),
|
|
27
|
+
events: {
|
|
28
|
+
onChange: 'change',
|
|
29
|
+
onChangeValue: 'changeValue',
|
|
30
|
+
onInput: 'input',
|
|
31
|
+
onUpdateValue: 'update:value',
|
|
32
|
+
},
|
|
33
|
+
react: React,
|
|
34
|
+
tagName: 'c-accordion',
|
|
35
|
+
});
|
|
36
|
+
export const CAccordionItem = createComponent({
|
|
37
|
+
displayName: 'CAccordionItem',
|
|
38
|
+
elementClass: elementClass('c-accordion-item'),
|
|
39
|
+
events: {
|
|
40
|
+
onItemChange: 'item-change',
|
|
41
|
+
},
|
|
42
|
+
react: React,
|
|
43
|
+
tagName: 'c-accordion-item',
|
|
44
|
+
});
|
|
45
|
+
export const CAlert = createComponent({
|
|
46
|
+
displayName: 'CAlert',
|
|
47
|
+
elementClass: elementClass('c-alert'),
|
|
48
|
+
react: React,
|
|
49
|
+
tagName: 'c-alert',
|
|
50
|
+
});
|
|
51
|
+
/** A filterable value-selection component: a readonly value field that opens a popover panel with a search input above the matching options. */
|
|
52
|
+
export const CAutocomplete = createComponent({
|
|
53
|
+
displayName: 'CAutocomplete',
|
|
54
|
+
elementClass: elementClass('c-autocomplete'),
|
|
55
|
+
events: {
|
|
56
|
+
onChange: 'change',
|
|
57
|
+
onChangeQuery: 'change:query',
|
|
58
|
+
onChangeValue: 'changeValue',
|
|
59
|
+
onInput: 'input',
|
|
60
|
+
onUpdateValue: 'update:value',
|
|
61
|
+
},
|
|
62
|
+
react: React,
|
|
63
|
+
tagName: 'c-autocomplete',
|
|
64
|
+
});
|
|
65
|
+
export const CBadge = createComponent({
|
|
66
|
+
displayName: 'CBadge',
|
|
67
|
+
elementClass: elementClass('c-badge'),
|
|
68
|
+
react: React,
|
|
69
|
+
tagName: 'c-badge',
|
|
70
|
+
});
|
|
71
|
+
/** Buttons trigger actions — submitting a form, opening a modal, confirming a choice. Use one primary (default appearance) button per view; secondary actions use the `outlined`, `ghost` or `text` appearances. */
|
|
72
|
+
export const CButton = createComponent({
|
|
73
|
+
displayName: 'CButton',
|
|
74
|
+
elementClass: elementClass('c-button'),
|
|
75
|
+
react: React,
|
|
76
|
+
tagName: 'c-button',
|
|
77
|
+
});
|
|
78
|
+
/** A button group is a segmented control: a compact group of choices rendered as plain `c-button` children, where activating a button takes effect immediately (switching a view, picking a billing period). Selection is exclusive by default; set `multiple` to let several buttons be active at once. Give the group a `label` when it acts as a form field so the choice it represents is named for every user. */
|
|
79
|
+
export const CButtonGroup = createComponent({
|
|
80
|
+
displayName: 'CButtonGroup',
|
|
81
|
+
elementClass: elementClass('c-button-group'),
|
|
82
|
+
events: {
|
|
83
|
+
onChange: 'change',
|
|
84
|
+
onInput: 'input',
|
|
85
|
+
onUpdateValue: 'update:value',
|
|
86
|
+
},
|
|
87
|
+
react: React,
|
|
88
|
+
tagName: 'c-button-group',
|
|
89
|
+
});
|
|
90
|
+
export const CCard = createComponent({
|
|
91
|
+
displayName: 'CCard',
|
|
92
|
+
elementClass: elementClass('c-card'),
|
|
93
|
+
react: React,
|
|
94
|
+
tagName: 'c-card',
|
|
95
|
+
});
|
|
96
|
+
export const CCardActions = createComponent({
|
|
97
|
+
displayName: 'CCardActions',
|
|
98
|
+
elementClass: elementClass('c-card-actions'),
|
|
99
|
+
react: React,
|
|
100
|
+
tagName: 'c-card-actions',
|
|
101
|
+
});
|
|
102
|
+
export const CCardContent = createComponent({
|
|
103
|
+
displayName: 'CCardContent',
|
|
104
|
+
elementClass: elementClass('c-card-content'),
|
|
105
|
+
react: React,
|
|
106
|
+
tagName: 'c-card-content',
|
|
107
|
+
});
|
|
108
|
+
export const CCardTitle = createComponent({
|
|
109
|
+
displayName: 'CCardTitle',
|
|
110
|
+
elementClass: elementClass('c-card-title'),
|
|
111
|
+
react: React,
|
|
112
|
+
tagName: 'c-card-title',
|
|
113
|
+
});
|
|
114
|
+
export const CCheckbox = createComponent({
|
|
115
|
+
displayName: 'CCheckbox',
|
|
116
|
+
elementClass: elementClass('c-checkbox'),
|
|
117
|
+
events: {
|
|
118
|
+
onChange: 'change',
|
|
119
|
+
onChangeValue: 'changeValue',
|
|
120
|
+
onInput: 'input',
|
|
121
|
+
onUpdateValue: 'update:value',
|
|
122
|
+
},
|
|
123
|
+
react: React,
|
|
124
|
+
tagName: 'c-checkbox',
|
|
125
|
+
});
|
|
126
|
+
export const CCscLogo = createComponent({
|
|
127
|
+
displayName: 'CCscLogo',
|
|
128
|
+
elementClass: elementClass('c-csc-logo'),
|
|
129
|
+
react: React,
|
|
130
|
+
tagName: 'c-csc-logo',
|
|
131
|
+
});
|
|
132
|
+
export const CDataTable = createComponent({
|
|
133
|
+
displayName: 'CDataTable',
|
|
134
|
+
elementClass: elementClass('c-data-table'),
|
|
135
|
+
events: {
|
|
136
|
+
onChangeExpanded: 'change:expanded',
|
|
137
|
+
onChangePage: 'change:page',
|
|
138
|
+
onChangePageSize: 'change:page-size',
|
|
139
|
+
onChangeSelected: 'change:selected',
|
|
140
|
+
onChangeSort: 'change:sort',
|
|
141
|
+
},
|
|
142
|
+
react: React,
|
|
143
|
+
tagName: 'c-data-table',
|
|
144
|
+
});
|
|
145
|
+
export const CDivider = createComponent({
|
|
146
|
+
displayName: 'CDivider',
|
|
147
|
+
elementClass: elementClass('c-divider'),
|
|
148
|
+
react: React,
|
|
149
|
+
tagName: 'c-divider',
|
|
150
|
+
});
|
|
151
|
+
export const CIcon = createComponent({
|
|
152
|
+
displayName: 'CIcon',
|
|
153
|
+
elementClass: elementClass('c-icon'),
|
|
154
|
+
react: React,
|
|
155
|
+
tagName: 'c-icon',
|
|
156
|
+
});
|
|
157
|
+
export const CIconButton = createComponent({
|
|
158
|
+
displayName: 'CIconButton',
|
|
159
|
+
elementClass: elementClass('c-icon-button'),
|
|
160
|
+
react: React,
|
|
161
|
+
tagName: 'c-icon-button',
|
|
162
|
+
});
|
|
163
|
+
export const CInput = createComponent({
|
|
164
|
+
displayName: 'CInput',
|
|
165
|
+
elementClass: elementClass('c-input'),
|
|
166
|
+
react: React,
|
|
167
|
+
tagName: 'c-input',
|
|
168
|
+
});
|
|
169
|
+
/** Basic hyperlink component */
|
|
170
|
+
export const CLink = createComponent({
|
|
171
|
+
displayName: 'CLink',
|
|
172
|
+
elementClass: elementClass('c-link'),
|
|
173
|
+
react: React,
|
|
174
|
+
tagName: 'c-link',
|
|
175
|
+
});
|
|
176
|
+
export const CList = createComponent({
|
|
177
|
+
displayName: 'CList',
|
|
178
|
+
elementClass: elementClass('c-list'),
|
|
179
|
+
react: React,
|
|
180
|
+
tagName: 'c-list',
|
|
181
|
+
});
|
|
182
|
+
export const CListItem = createComponent({
|
|
183
|
+
displayName: 'CListItem',
|
|
184
|
+
elementClass: elementClass('c-list-item'),
|
|
185
|
+
react: React,
|
|
186
|
+
tagName: 'c-list-item',
|
|
187
|
+
});
|
|
188
|
+
export const CListItemTitle = createComponent({
|
|
189
|
+
displayName: 'CListItemTitle',
|
|
190
|
+
elementClass: elementClass('c-list-item-title'),
|
|
191
|
+
react: React,
|
|
192
|
+
tagName: 'c-list-item-title',
|
|
193
|
+
});
|
|
194
|
+
/** A loader component that fills the nearest containing element that has css-property position set to 'relative' */
|
|
195
|
+
export const CLoader = createComponent({
|
|
196
|
+
displayName: 'CLoader',
|
|
197
|
+
elementClass: elementClass('c-loader'),
|
|
198
|
+
react: React,
|
|
199
|
+
tagName: 'c-loader',
|
|
200
|
+
});
|
|
201
|
+
export const CLoginButton = createComponent({
|
|
202
|
+
displayName: 'CLoginButton',
|
|
203
|
+
elementClass: elementClass('c-login-button'),
|
|
204
|
+
react: React,
|
|
205
|
+
tagName: 'c-login-button',
|
|
206
|
+
});
|
|
207
|
+
export const CLoginButtons = createComponent({
|
|
208
|
+
displayName: 'CLoginButtons',
|
|
209
|
+
elementClass: elementClass('c-login-buttons'),
|
|
210
|
+
react: React,
|
|
211
|
+
tagName: 'c-login-buttons',
|
|
212
|
+
});
|
|
213
|
+
export const CLoginCard = createComponent({
|
|
214
|
+
displayName: 'CLoginCard',
|
|
215
|
+
elementClass: elementClass('c-login-card'),
|
|
216
|
+
react: React,
|
|
217
|
+
tagName: 'c-login-card',
|
|
218
|
+
});
|
|
219
|
+
export const CLoginCardActions = createComponent({
|
|
220
|
+
displayName: 'CLoginCardActions',
|
|
221
|
+
elementClass: elementClass('c-login-card-actions'),
|
|
222
|
+
react: React,
|
|
223
|
+
tagName: 'c-login-card-actions',
|
|
224
|
+
});
|
|
225
|
+
export const CLoginCardContent = createComponent({
|
|
226
|
+
displayName: 'CLoginCardContent',
|
|
227
|
+
elementClass: elementClass('c-login-card-content'),
|
|
228
|
+
react: React,
|
|
229
|
+
tagName: 'c-login-card-content',
|
|
230
|
+
});
|
|
231
|
+
export const CLoginCardTitle = createComponent({
|
|
232
|
+
displayName: 'CLoginCardTitle',
|
|
233
|
+
elementClass: elementClass('c-login-card-title'),
|
|
234
|
+
react: React,
|
|
235
|
+
tagName: 'c-login-card-title',
|
|
236
|
+
});
|
|
237
|
+
/** Wrapper component for the whole page */
|
|
238
|
+
export const CMain = createComponent({
|
|
239
|
+
displayName: 'CMain',
|
|
240
|
+
elementClass: elementClass('c-main'),
|
|
241
|
+
react: React,
|
|
242
|
+
tagName: 'c-main',
|
|
243
|
+
});
|
|
244
|
+
export const CMenu = createComponent({
|
|
245
|
+
displayName: 'CMenu',
|
|
246
|
+
elementClass: elementClass('c-menu'),
|
|
247
|
+
events: {
|
|
248
|
+
onChangeOpen: 'change:open',
|
|
249
|
+
onSelect: 'select',
|
|
250
|
+
},
|
|
251
|
+
react: React,
|
|
252
|
+
tagName: 'c-menu',
|
|
253
|
+
});
|
|
254
|
+
/** A single command in a `c-menu`. */
|
|
255
|
+
export const CMenuItem = createComponent({
|
|
256
|
+
displayName: 'CMenuItem',
|
|
257
|
+
elementClass: elementClass('c-menu-item'),
|
|
258
|
+
react: React,
|
|
259
|
+
tagName: 'c-menu-item',
|
|
260
|
+
});
|
|
261
|
+
/** Section label for a group of `c-menu-item`s. */
|
|
262
|
+
export const CMenuLabel = createComponent({
|
|
263
|
+
displayName: 'CMenuLabel',
|
|
264
|
+
elementClass: elementClass('c-menu-label'),
|
|
265
|
+
react: React,
|
|
266
|
+
tagName: 'c-menu-label',
|
|
267
|
+
});
|
|
268
|
+
export const CMessage = createComponent({
|
|
269
|
+
displayName: 'CMessage',
|
|
270
|
+
elementClass: elementClass('c-message'),
|
|
271
|
+
react: React,
|
|
272
|
+
tagName: 'c-message',
|
|
273
|
+
});
|
|
274
|
+
/** Modals interrupt the page for a task that must be completed (or explicitly cancelled) before continuing — confirmations, short forms, destructive-action warnings. The slotted content is typically a `c-card`. */
|
|
275
|
+
export const CModal = createComponent({
|
|
276
|
+
displayName: 'CModal',
|
|
277
|
+
elementClass: elementClass('c-modal'),
|
|
278
|
+
events: {
|
|
279
|
+
onChangeValue: 'changeValue',
|
|
280
|
+
onInput: 'input',
|
|
281
|
+
onUpdateValue: 'update:value',
|
|
282
|
+
},
|
|
283
|
+
react: React,
|
|
284
|
+
tagName: 'c-modal',
|
|
285
|
+
});
|
|
286
|
+
export const CNavigationButton = createComponent({
|
|
287
|
+
displayName: 'CNavigationButton',
|
|
288
|
+
elementClass: elementClass('c-navigation-button'),
|
|
289
|
+
react: React,
|
|
290
|
+
tagName: 'c-navigation-button',
|
|
291
|
+
});
|
|
292
|
+
export const COption = createComponent({
|
|
293
|
+
displayName: 'COption',
|
|
294
|
+
elementClass: elementClass('c-option'),
|
|
295
|
+
react: React,
|
|
296
|
+
tagName: 'c-option',
|
|
297
|
+
});
|
|
298
|
+
export const COptionValue = createComponent({
|
|
299
|
+
displayName: 'COptionValue',
|
|
300
|
+
elementClass: elementClass('c-option-value'),
|
|
301
|
+
react: React,
|
|
302
|
+
tagName: 'c-option-value',
|
|
303
|
+
});
|
|
304
|
+
export const COtpInput = createComponent({
|
|
305
|
+
displayName: 'COtpInput',
|
|
306
|
+
elementClass: elementClass('c-otp-input'),
|
|
307
|
+
events: {
|
|
308
|
+
onChangeValue: 'changeValue',
|
|
309
|
+
onCompletion: 'completion',
|
|
310
|
+
onInput: 'input',
|
|
311
|
+
onUpdateValue: 'update:value',
|
|
312
|
+
},
|
|
313
|
+
react: React,
|
|
314
|
+
tagName: 'c-otp-input',
|
|
315
|
+
});
|
|
316
|
+
export const CPage = createComponent({
|
|
317
|
+
displayName: 'CPage',
|
|
318
|
+
elementClass: elementClass('c-page'),
|
|
319
|
+
react: React,
|
|
320
|
+
tagName: 'c-page',
|
|
321
|
+
});
|
|
322
|
+
export const CPagination = createComponent({
|
|
323
|
+
displayName: 'CPagination',
|
|
324
|
+
elementClass: elementClass('c-pagination'),
|
|
325
|
+
events: {
|
|
326
|
+
onChangeValue: 'changeValue',
|
|
327
|
+
onInput: 'input',
|
|
328
|
+
onUpdateValue: 'update:value',
|
|
329
|
+
},
|
|
330
|
+
react: React,
|
|
331
|
+
tagName: 'c-pagination',
|
|
332
|
+
});
|
|
333
|
+
export const CProgressBar = createComponent({
|
|
334
|
+
displayName: 'CProgressBar',
|
|
335
|
+
elementClass: elementClass('c-progress-bar'),
|
|
336
|
+
react: React,
|
|
337
|
+
tagName: 'c-progress-bar',
|
|
338
|
+
});
|
|
339
|
+
export const CRadio = createComponent({
|
|
340
|
+
displayName: 'CRadio',
|
|
341
|
+
elementClass: elementClass('c-radio'),
|
|
342
|
+
react: React,
|
|
343
|
+
tagName: 'c-radio',
|
|
344
|
+
});
|
|
345
|
+
export const CRadioGroup = createComponent({
|
|
346
|
+
displayName: 'CRadioGroup',
|
|
347
|
+
elementClass: elementClass('c-radio-group'),
|
|
348
|
+
events: {
|
|
349
|
+
onChangeValue: 'changeValue',
|
|
350
|
+
onInput: 'input',
|
|
351
|
+
onUpdateValue: 'update:value',
|
|
352
|
+
},
|
|
353
|
+
react: React,
|
|
354
|
+
tagName: 'c-radio-group',
|
|
355
|
+
});
|
|
356
|
+
export const CSelect = createComponent({
|
|
357
|
+
displayName: 'CSelect',
|
|
358
|
+
elementClass: elementClass('c-select'),
|
|
359
|
+
events: {
|
|
360
|
+
onChangeValue: 'changeValue',
|
|
361
|
+
onInput: 'input',
|
|
362
|
+
onUpdateValue: 'update:value',
|
|
363
|
+
},
|
|
364
|
+
react: React,
|
|
365
|
+
tagName: 'c-select',
|
|
366
|
+
});
|
|
367
|
+
export const CSideNavigation = createComponent({
|
|
368
|
+
displayName: 'CSideNavigation',
|
|
369
|
+
elementClass: elementClass('c-side-navigation'),
|
|
370
|
+
events: {
|
|
371
|
+
onChangeMenuVisible: 'change:menu-visible',
|
|
372
|
+
},
|
|
373
|
+
react: React,
|
|
374
|
+
tagName: 'c-side-navigation',
|
|
375
|
+
});
|
|
376
|
+
export const CSideNavigationItem = createComponent({
|
|
377
|
+
displayName: 'CSideNavigationItem',
|
|
378
|
+
elementClass: elementClass('c-side-navigation-item'),
|
|
379
|
+
events: {
|
|
380
|
+
onItemChange: 'itemChange',
|
|
381
|
+
},
|
|
382
|
+
react: React,
|
|
383
|
+
tagName: 'c-side-navigation-item',
|
|
384
|
+
});
|
|
385
|
+
export const CSideNavigationTitle = createComponent({
|
|
386
|
+
displayName: 'CSideNavigationTitle',
|
|
387
|
+
elementClass: elementClass('c-side-navigation-title'),
|
|
388
|
+
react: React,
|
|
389
|
+
tagName: 'c-side-navigation-title',
|
|
390
|
+
});
|
|
391
|
+
export const CSlider = createComponent({
|
|
392
|
+
displayName: 'CSlider',
|
|
393
|
+
elementClass: elementClass('c-slider'),
|
|
394
|
+
events: {
|
|
395
|
+
onChangeValue: 'changeValue',
|
|
396
|
+
onInput: 'input',
|
|
397
|
+
onUpdateValue: 'update:value',
|
|
398
|
+
},
|
|
399
|
+
react: React,
|
|
400
|
+
tagName: 'c-slider',
|
|
401
|
+
});
|
|
402
|
+
export const CSpinner = createComponent({
|
|
403
|
+
displayName: 'CSpinner',
|
|
404
|
+
elementClass: elementClass('c-spinner'),
|
|
405
|
+
react: React,
|
|
406
|
+
tagName: 'c-spinner',
|
|
407
|
+
});
|
|
408
|
+
export const CStatus = createComponent({
|
|
409
|
+
displayName: 'CStatus',
|
|
410
|
+
elementClass: elementClass('c-status'),
|
|
411
|
+
react: React,
|
|
412
|
+
tagName: 'c-status',
|
|
413
|
+
});
|
|
414
|
+
export const CStep = createComponent({
|
|
415
|
+
displayName: 'CStep',
|
|
416
|
+
elementClass: elementClass('c-step'),
|
|
417
|
+
react: React,
|
|
418
|
+
tagName: 'c-step',
|
|
419
|
+
});
|
|
420
|
+
export const CSteps = createComponent({
|
|
421
|
+
displayName: 'CSteps',
|
|
422
|
+
elementClass: elementClass('c-steps'),
|
|
423
|
+
react: React,
|
|
424
|
+
tagName: 'c-steps',
|
|
425
|
+
});
|
|
426
|
+
export const CSubNavigationItem = createComponent({
|
|
427
|
+
displayName: 'CSubNavigationItem',
|
|
428
|
+
elementClass: elementClass('c-sub-navigation-item'),
|
|
429
|
+
react: React,
|
|
430
|
+
tagName: 'c-sub-navigation-item',
|
|
431
|
+
});
|
|
432
|
+
export const CSwitch = createComponent({
|
|
433
|
+
displayName: 'CSwitch',
|
|
434
|
+
elementClass: elementClass('c-switch'),
|
|
435
|
+
events: {
|
|
436
|
+
onChange: 'change',
|
|
437
|
+
onChangeValue: 'changeValue',
|
|
438
|
+
onInput: 'input',
|
|
439
|
+
onUpdateValue: 'update:value',
|
|
440
|
+
},
|
|
441
|
+
react: React,
|
|
442
|
+
tagName: 'c-switch',
|
|
443
|
+
});
|
|
444
|
+
export const CTab = createComponent({
|
|
445
|
+
displayName: 'CTab',
|
|
446
|
+
elementClass: elementClass('c-tab'),
|
|
447
|
+
events: {
|
|
448
|
+
onTabChange: 'tabChange',
|
|
449
|
+
onTabFocus: 'tabFocus',
|
|
450
|
+
},
|
|
451
|
+
react: React,
|
|
452
|
+
tagName: 'c-tab',
|
|
453
|
+
});
|
|
454
|
+
/** Tab buttons present a `c-tabs` tab list as a segmented control instead of the underlined tab row. Author it only inside `<c-tabs>`, with plain `<c-button>` children whose `value`s match the `c-tab-item` panels; `c-tabs` owns the active value and pushes it down. */
|
|
455
|
+
export const CTabButtons = createComponent({
|
|
456
|
+
displayName: 'CTabButtons',
|
|
457
|
+
elementClass: elementClass('c-tab-buttons'),
|
|
458
|
+
events: {
|
|
459
|
+
onTabChange: 'tabChange',
|
|
460
|
+
},
|
|
461
|
+
react: React,
|
|
462
|
+
tagName: 'c-tab-buttons',
|
|
463
|
+
});
|
|
464
|
+
export const CTabItem = createComponent({
|
|
465
|
+
displayName: 'CTabItem',
|
|
466
|
+
elementClass: elementClass('c-tab-item'),
|
|
467
|
+
events: {
|
|
468
|
+
onContentChange: 'contentChange',
|
|
469
|
+
},
|
|
470
|
+
react: React,
|
|
471
|
+
tagName: 'c-tab-item',
|
|
472
|
+
});
|
|
473
|
+
export const CTabItems = createComponent({
|
|
474
|
+
displayName: 'CTabItems',
|
|
475
|
+
elementClass: elementClass('c-tab-items'),
|
|
476
|
+
react: React,
|
|
477
|
+
tagName: 'c-tab-items',
|
|
478
|
+
});
|
|
479
|
+
export const CTable = createComponent({
|
|
480
|
+
displayName: 'CTable',
|
|
481
|
+
elementClass: elementClass('c-table'),
|
|
482
|
+
react: React,
|
|
483
|
+
tagName: 'c-table',
|
|
484
|
+
});
|
|
485
|
+
export const CTabs = createComponent({
|
|
486
|
+
displayName: 'CTabs',
|
|
487
|
+
elementClass: elementClass('c-tabs'),
|
|
488
|
+
events: {
|
|
489
|
+
onChangeValue: 'changeValue',
|
|
490
|
+
onInput: 'input',
|
|
491
|
+
onUpdateValue: 'update:value',
|
|
492
|
+
},
|
|
493
|
+
react: React,
|
|
494
|
+
tagName: 'c-tabs',
|
|
495
|
+
});
|
|
496
|
+
export const CTag = createComponent({
|
|
497
|
+
displayName: 'CTag',
|
|
498
|
+
elementClass: elementClass('c-tag'),
|
|
499
|
+
events: {
|
|
500
|
+
onClose: 'close',
|
|
501
|
+
},
|
|
502
|
+
react: React,
|
|
503
|
+
tagName: 'c-tag',
|
|
504
|
+
});
|
|
505
|
+
export const CTags = createComponent({
|
|
506
|
+
displayName: 'CTags',
|
|
507
|
+
elementClass: elementClass('c-tags'),
|
|
508
|
+
react: React,
|
|
509
|
+
tagName: 'c-tags',
|
|
510
|
+
});
|
|
511
|
+
export const CTextField = createComponent({
|
|
512
|
+
displayName: 'CTextField',
|
|
513
|
+
elementClass: elementClass('c-text-field'),
|
|
514
|
+
events: {
|
|
515
|
+
onChange: 'change',
|
|
516
|
+
onChangeValue: 'changeValue',
|
|
517
|
+
onInput: 'input',
|
|
518
|
+
onUpdateValue: 'update:value',
|
|
519
|
+
},
|
|
520
|
+
react: React,
|
|
521
|
+
tagName: 'c-text-field',
|
|
522
|
+
});
|
|
523
|
+
/** A single toast notification, rendered and managed by c-toasts */
|
|
524
|
+
export const CToast = createComponent({
|
|
525
|
+
displayName: 'CToast',
|
|
526
|
+
elementClass: elementClass('c-toast'),
|
|
527
|
+
events: {
|
|
528
|
+
onClose: 'close',
|
|
529
|
+
},
|
|
530
|
+
react: React,
|
|
531
|
+
tagName: 'c-toast',
|
|
532
|
+
});
|
|
533
|
+
/** Toasts are passive, transient notifications — operation results, background progress — stacked and managed by a single `c-toasts` container via its `addToast` / `removeToast` methods. */
|
|
534
|
+
export const CToasts = createComponent({
|
|
535
|
+
displayName: 'CToasts',
|
|
536
|
+
elementClass: elementClass('c-toasts'),
|
|
537
|
+
react: React,
|
|
538
|
+
tagName: 'c-toasts',
|
|
539
|
+
});
|
|
540
|
+
export const CToolbar = createComponent({
|
|
541
|
+
displayName: 'CToolbar',
|
|
542
|
+
elementClass: elementClass('c-toolbar'),
|
|
543
|
+
react: React,
|
|
544
|
+
tagName: 'c-toolbar',
|
|
545
|
+
});
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React components for the `@cscfi/csc-ui` custom elements.
|
|
3
|
+
*
|
|
4
|
+
* Importing this package registers the custom elements as a side effect and
|
|
5
|
+
* exposes one typed React component per element. Prop and event `detail`
|
|
6
|
+
* types come from `@cscfi/csc-ui` — import any option/item types you
|
|
7
|
+
* need (e.g. `CSelectItem`) from there.
|
|
8
|
+
*/
|
|
9
|
+
export * from './components.js';
|
|
10
|
+
export { applyTheme, resetTheme, themeToCss } from '@cscfi/csc-ui';
|
|
11
|
+
export type { Family, ThemeSeeds } from '@cscfi/csc-ui';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* React components for the `@cscfi/csc-ui` custom elements.
|
|
3
|
+
*
|
|
4
|
+
* Importing this package registers the custom elements as a side effect and
|
|
5
|
+
* exposes one typed React component per element. Prop and event `detail`
|
|
6
|
+
* types come from `@cscfi/csc-ui` — import any option/item types you
|
|
7
|
+
* need (e.g. `CSelectItem`) from there.
|
|
8
|
+
*/
|
|
9
|
+
export * from './components.js';
|
|
10
|
+
export { applyTheme, resetTheme, themeToCss } from '@cscfi/csc-ui';
|
package/package.json
CHANGED
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
{
|
|
2
|
+
"name": "@cscfi/csc-ui-react",
|
|
3
|
+
"version": "4.0.0-alpha.1",
|
|
4
|
+
"description": "React components for the @cscfi/csc-ui custom elements, generated from the Custom Elements Manifest.",
|
|
2
5
|
"author": "My CSC Team <suiteamsui@gmail.com>",
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"description": "CSC UI components for React",
|
|
8
|
-
"devDependencies": {
|
|
9
|
-
"typescript": "^5.5.4"
|
|
10
|
-
},
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
11
10
|
"exports": {
|
|
12
11
|
".": {
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
}
|
|
16
|
-
"./css/*": "./dist/styles/css/*",
|
|
17
|
-
"./scss/*": "./dist/styles/css/*",
|
|
18
|
-
"./tailwind": "./dist/styles/tailwind/theme.js",
|
|
19
|
-
"./tailwind/*": "./dist/styles/tailwind/*"
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js"
|
|
14
|
+
}
|
|
20
15
|
},
|
|
21
16
|
"files": [
|
|
22
17
|
"dist"
|
|
23
18
|
],
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
"main": "dist/index.js",
|
|
27
|
-
"module": "dist/index.js",
|
|
28
|
-
"name": "@cscfi/csc-ui-react",
|
|
29
|
-
"publishConfig": {
|
|
30
|
-
"access": "public"
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@lit/react": "^1.0.8"
|
|
31
21
|
},
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"react": ">=18",
|
|
24
|
+
"@cscfi/csc-ui": "^4.0.0-alpha.1"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/react": "^19.1.8",
|
|
28
|
+
"react": "^19.1.0",
|
|
29
|
+
"typescript": "^6.0.3",
|
|
30
|
+
"@cscfi/csc-ui": "4.0.0-alpha.1"
|
|
36
31
|
},
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"repository": "CSCfi/ui",
|
|
34
|
+
"homepage": "https://design-system.csc.fi",
|
|
35
|
+
"scripts": {
|
|
36
|
+
"generate": "node scripts/generate.mjs",
|
|
37
|
+
"build": "pnpm run generate && tsc -p tsconfig.build.json",
|
|
38
|
+
"type-check": "tsc -p tsconfig.build.json --noEmit"
|
|
39
|
+
}
|
|
40
|
+
}
|