@cscfi/csc-ui-react 4.0.0-alpha.0 → 4.0.0-alpha.10
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 +26 -3
- package/dist/components.js +42 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +3 -2
- package/package.json +3 -3
package/dist/components.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Manifest — do not edit. Regenerate with `pnpm run generate`.
|
|
4
4
|
*/
|
|
5
5
|
import { type EventName } from '@lit/react';
|
|
6
|
-
import { type CAccordionElement, type CAccordionElementEventMap, type CAccordionItemElement, type CAccordionItemElementEventMap, type CAlertElement, type CAutocompleteElement, type CAutocompleteElementEventMap, type CBadgeElement, type CButtonElement, type CButtonGroupElement, type CButtonGroupElementEventMap, type CCardElement, type CCardActionsElement, type CCardContentElement, type CCardTitleElement, type CCheckboxElement, type CCheckboxElementEventMap, type CCscLogoElement, type CDataTableElement, type CDataTableElementEventMap, type CDividerElement, type CIconElement, type CIconButtonElement, type CInputElement, type CLinkElement, type CListElement, type CListItemElement, type CListItemTitleElement, type CLoaderElement, type CLoginButtonElement, type CLoginButtonsElement, type CLoginCardElement, type CLoginCardActionsElement, type CLoginCardContentElement, type CLoginCardTitleElement, type CMainElement, type CMenuElement, type CMenuElementEventMap, type CMenuItemElement, type CMenuLabelElement, type CMessageElement, type CModalElement, type CModalElementEventMap, type CNavigationButtonElement, type COptionElement, type COptionValueElement, type COtpInputElement, type COtpInputElementEventMap, type CPageElement, type CPaginationElement, type CPaginationElementEventMap, type CProgressBarElement, type CRadioElement, type CRadioGroupElement, type CRadioGroupElementEventMap, type CSelectElement, type CSelectElementEventMap, type CSideNavigationElement, type CSideNavigationElementEventMap, type CSideNavigationItemElement, type CSideNavigationItemElementEventMap, type CSideNavigationTitleElement, type CSliderElement, type CSliderElementEventMap, type CSpinnerElement, type CStatusElement, type CStepElement, type CStepsElement, type CSubNavigationItemElement, type CSwitchElement, type CSwitchElementEventMap, type CTabElement, type CTabElementEventMap, type CTabButtonsElement, type CTabButtonsElementEventMap, type CTabItemElement, type CTabItemElementEventMap, type CTabItemsElement, type CTableElement, type CTabsElement, type CTabsElementEventMap, type CTagElement, type CTagElementEventMap, type CTagsElement, type CTextFieldElement, type CTextFieldElementEventMap, type CToastElement, type CToastElementEventMap, type CToastsElement, type CToolbarElement } from '@cscfi/csc-ui';
|
|
6
|
+
import { type CAccordionElement, type CAccordionElementEventMap, type CAccordionItemElement, type CAccordionItemElementEventMap, type CAlertElement, type CAlertElementEventMap, type CAutocompleteElement, type CAutocompleteElementEventMap, type CBadgeElement, type CButtonElement, type CButtonGroupElement, type CButtonGroupElementEventMap, type CCardElement, type CCardActionsElement, type CCardContentElement, type CCardTitleElement, type CCheckboxElement, type CCheckboxElementEventMap, type CCscLogoElement, type CDataTableElement, type CDataTableElementEventMap, type CDividerElement, type CIconElement, type CIconButtonElement, type CInputElement, type CLinkElement, type CListElement, type CListItemElement, type CListItemTitleElement, type CLoaderElement, type CLoginButtonElement, type CLoginButtonsElement, type CLoginCardElement, type CLoginCardActionsElement, type CLoginCardContentElement, type CLoginCardTitleElement, type CMainElement, type CMenuElement, type CMenuElementEventMap, type CMenuItemElement, type CMenuLabelElement, type CMessageElement, type CModalElement, type CModalElementEventMap, type CNavigationButtonElement, type COptionElement, type COptionValueElement, type COtpInputElement, type COtpInputElementEventMap, type CPageElement, type CPaginationElement, type CPaginationElementEventMap, type CPopoverElement, type CPopoverElementEventMap, type CProgressBarElement, type CProgressCircleElement, type CRadioElement, type CRadioElementEventMap, type CRadioGroupElement, type CRadioGroupElementEventMap, type CSelectElement, type CSelectElementEventMap, type CSideNavigationElement, type CSideNavigationElementEventMap, type CSideNavigationItemElement, type CSideNavigationItemElementEventMap, type CSideNavigationTitleElement, type CSliderElement, type CSliderElementEventMap, type CSpinnerElement, type CStatusElement, type CStepElement, type CStepsElement, type CSubNavigationItemElement, type CSwitchElement, type CSwitchElementEventMap, type CTabElement, type CTabElementEventMap, type CTabButtonsElement, type CTabButtonsElementEventMap, type CTabItemElement, type CTabItemElementEventMap, type CTabItemsElement, type CTableElement, type CTabsElement, type CTabsElementEventMap, type CTagElement, type CTagElementEventMap, type CTagsElement, type CTextFieldElement, type CTextFieldElementEventMap, type CToastElement, type CToastElementEventMap, type CToastsElement, type CToolbarElement, type CTooltipElement, type CTooltipElementEventMap } from '@cscfi/csc-ui';
|
|
7
7
|
export declare const CAccordion: import("@lit/react").ReactWebComponent<CAccordionElement, {
|
|
8
8
|
onChange: EventName<CAccordionElementEventMap["change"]>;
|
|
9
9
|
onChangeValue: EventName<CAccordionElementEventMap["changeValue"]>;
|
|
@@ -13,10 +13,14 @@ export declare const CAccordion: import("@lit/react").ReactWebComponent<CAccordi
|
|
|
13
13
|
export declare const CAccordionItem: import("@lit/react").ReactWebComponent<CAccordionItemElement, {
|
|
14
14
|
onItemChange: EventName<CAccordionItemElementEventMap["item-change"]>;
|
|
15
15
|
}>;
|
|
16
|
-
|
|
16
|
+
/** A persistent, in-flow status message: a tinted box whose type carries a status family's colours through the icon, heading and accent edge, while the body copy stays neutral. */
|
|
17
|
+
export declare const CAlert: import("@lit/react").ReactWebComponent<CAlertElement, {
|
|
18
|
+
onDismiss: EventName<CAlertElementEventMap["dismiss"]>;
|
|
19
|
+
}>;
|
|
17
20
|
/** A filterable value-selection component: a readonly value field that opens a popover panel with a search input above the matching options. */
|
|
18
21
|
export declare const CAutocomplete: import("@lit/react").ReactWebComponent<CAutocompleteElement, {
|
|
19
22
|
onChange: EventName<CAutocompleteElementEventMap["change"]>;
|
|
23
|
+
onChangeQuery: EventName<CAutocompleteElementEventMap["change:query"]>;
|
|
20
24
|
onChangeValue: EventName<CAutocompleteElementEventMap["changeValue"]>;
|
|
21
25
|
onInput: EventName<CAutocompleteElementEventMap["input"]>;
|
|
22
26
|
onUpdateValue: EventName<CAutocompleteElementEventMap["update:value"]>;
|
|
@@ -34,6 +38,7 @@ export declare const CCard: import("@lit/react").ReactWebComponent<CCardElement,
|
|
|
34
38
|
export declare const CCardActions: import("@lit/react").ReactWebComponent<CCardActionsElement, {}>;
|
|
35
39
|
export declare const CCardContent: import("@lit/react").ReactWebComponent<CCardContentElement, {}>;
|
|
36
40
|
export declare const CCardTitle: import("@lit/react").ReactWebComponent<CCardTitleElement, {}>;
|
|
41
|
+
/** A form control for a single on/off choice: a native checkbox with a label, an optional hint, and validation messaging. */
|
|
37
42
|
export declare const CCheckbox: import("@lit/react").ReactWebComponent<CCheckboxElement, {
|
|
38
43
|
onChange: EventName<CCheckboxElementEventMap["change"]>;
|
|
39
44
|
onChangeValue: EventName<CCheckboxElementEventMap["changeValue"]>;
|
|
@@ -97,8 +102,19 @@ export declare const CPagination: import("@lit/react").ReactWebComponent<CPagina
|
|
|
97
102
|
onInput: EventName<CPaginationElementEventMap["input"]>;
|
|
98
103
|
onUpdateValue: EventName<CPaginationElementEventMap["update:value"]>;
|
|
99
104
|
}>;
|
|
105
|
+
/** A click-opened, non-modal surface anchored to its trigger, floating in the top layer; its content may be interactive. */
|
|
106
|
+
export declare const CPopover: import("@lit/react").ReactWebComponent<CPopoverElement, {
|
|
107
|
+
onChangeOpen: EventName<CPopoverElementEventMap["change:open"]>;
|
|
108
|
+
}>;
|
|
109
|
+
/** A horizontal progress bar that fills a track to a known completion percentage, with an optional details line showing the value and a label. */
|
|
100
110
|
export declare const CProgressBar: import("@lit/react").ReactWebComponent<CProgressBarElement, {}>;
|
|
101
|
-
|
|
111
|
+
/** A circular progress indicator that draws a known completion percentage as an arc around a track — the circular counterpart of `c-progress-bar`. */
|
|
112
|
+
export declare const CProgressCircle: import("@lit/react").ReactWebComponent<CProgressCircleElement, {}>;
|
|
113
|
+
/** A single radio option inside a `c-radio-group`: a native radio input whose default slot is its clickable, announced label. */
|
|
114
|
+
export declare const CRadio: import("@lit/react").ReactWebComponent<CRadioElement, {
|
|
115
|
+
onChange: EventName<CRadioElementEventMap["change"]>;
|
|
116
|
+
}>;
|
|
117
|
+
/** A radio group is a set of mutually exclusive choices where exactly one can be selected, authored as slotted `c-radio` children. Give the group a `label` so the choice it represents is named for every user, and a `hint` describing how to answer. */
|
|
102
118
|
export declare const CRadioGroup: import("@lit/react").ReactWebComponent<CRadioGroupElement, {
|
|
103
119
|
onChangeValue: EventName<CRadioGroupElementEventMap["changeValue"]>;
|
|
104
120
|
onInput: EventName<CRadioGroupElementEventMap["input"]>;
|
|
@@ -121,11 +137,13 @@ export declare const CSlider: import("@lit/react").ReactWebComponent<CSliderElem
|
|
|
121
137
|
onInput: EventName<CSliderElementEventMap["input"]>;
|
|
122
138
|
onUpdateValue: EventName<CSliderElementEventMap["update:value"]>;
|
|
123
139
|
}>;
|
|
140
|
+
/** A circular indeterminate activity indicator — pure motion with no value, for waits of unknown duration. */
|
|
124
141
|
export declare const CSpinner: import("@lit/react").ReactWebComponent<CSpinnerElement, {}>;
|
|
125
142
|
export declare const CStatus: import("@lit/react").ReactWebComponent<CStatusElement, {}>;
|
|
126
143
|
export declare const CStep: import("@lit/react").ReactWebComponent<CStepElement, {}>;
|
|
127
144
|
export declare const CSteps: import("@lit/react").ReactWebComponent<CStepsElement, {}>;
|
|
128
145
|
export declare const CSubNavigationItem: import("@lit/react").ReactWebComponent<CSubNavigationItemElement, {}>;
|
|
146
|
+
/** A toggle for a binary setting that takes effect immediately: a native switch control with a label, an optional hint, and validation messaging. */
|
|
129
147
|
export declare const CSwitch: import("@lit/react").ReactWebComponent<CSwitchElement, {
|
|
130
148
|
onChange: EventName<CSwitchElementEventMap["change"]>;
|
|
131
149
|
onChangeValue: EventName<CSwitchElementEventMap["changeValue"]>;
|
|
@@ -144,6 +162,7 @@ export declare const CTabItem: import("@lit/react").ReactWebComponent<CTabItemEl
|
|
|
144
162
|
onContentChange: EventName<CTabItemElementEventMap["contentChange"]>;
|
|
145
163
|
}>;
|
|
146
164
|
export declare const CTabItems: import("@lit/react").ReactWebComponent<CTabItemsElement, {}>;
|
|
165
|
+
/** A styled wrapper for a table you author yourself: slot in a plain `<table>` and c-table gives it the CSC look plus an optional responsive card layout on narrow screens. The table stays in your own DOM — your stylesheets, your framework's rendering, and `::part()` selectors on components nested in cells (a `c-tag` status chip, a `c-pagination` footer) all keep working. */
|
|
147
166
|
export declare const CTable: import("@lit/react").ReactWebComponent<CTableElement, {}>;
|
|
148
167
|
export declare const CTabs: import("@lit/react").ReactWebComponent<CTabsElement, {
|
|
149
168
|
onChangeValue: EventName<CTabsElementEventMap["changeValue"]>;
|
|
@@ -167,3 +186,7 @@ export declare const CToast: import("@lit/react").ReactWebComponent<CToastElemen
|
|
|
167
186
|
/** Toasts are passive, transient notifications — operation results, background progress — stacked and managed by a single `c-toasts` container via its `addToast` / `removeToast` methods. */
|
|
168
187
|
export declare const CToasts: import("@lit/react").ReactWebComponent<CToastsElement, {}>;
|
|
169
188
|
export declare const CToolbar: import("@lit/react").ReactWebComponent<CToolbarElement, {}>;
|
|
189
|
+
/** A non-interactive text hint shown when its trigger is hovered or keyboard-focused, floating in the top layer on the inverted surface tier. */
|
|
190
|
+
export declare const CTooltip: import("@lit/react").ReactWebComponent<CTooltipElement, {
|
|
191
|
+
onChangeOpen: EventName<CTooltipElementEventMap["change:open"]>;
|
|
192
|
+
}>;
|
package/dist/components.js
CHANGED
|
@@ -42,9 +42,13 @@ export const CAccordionItem = createComponent({
|
|
|
42
42
|
react: React,
|
|
43
43
|
tagName: 'c-accordion-item',
|
|
44
44
|
});
|
|
45
|
+
/** A persistent, in-flow status message: a tinted box whose type carries a status family's colours through the icon, heading and accent edge, while the body copy stays neutral. */
|
|
45
46
|
export const CAlert = createComponent({
|
|
46
47
|
displayName: 'CAlert',
|
|
47
48
|
elementClass: elementClass('c-alert'),
|
|
49
|
+
events: {
|
|
50
|
+
onDismiss: 'dismiss',
|
|
51
|
+
},
|
|
48
52
|
react: React,
|
|
49
53
|
tagName: 'c-alert',
|
|
50
54
|
});
|
|
@@ -54,6 +58,7 @@ export const CAutocomplete = createComponent({
|
|
|
54
58
|
elementClass: elementClass('c-autocomplete'),
|
|
55
59
|
events: {
|
|
56
60
|
onChange: 'change',
|
|
61
|
+
onChangeQuery: 'change:query',
|
|
57
62
|
onChangeValue: 'changeValue',
|
|
58
63
|
onInput: 'input',
|
|
59
64
|
onUpdateValue: 'update:value',
|
|
@@ -110,6 +115,7 @@ export const CCardTitle = createComponent({
|
|
|
110
115
|
react: React,
|
|
111
116
|
tagName: 'c-card-title',
|
|
112
117
|
});
|
|
118
|
+
/** A form control for a single on/off choice: a native checkbox with a label, an optional hint, and validation messaging. */
|
|
113
119
|
export const CCheckbox = createComponent({
|
|
114
120
|
displayName: 'CCheckbox',
|
|
115
121
|
elementClass: elementClass('c-checkbox'),
|
|
@@ -329,18 +335,41 @@ export const CPagination = createComponent({
|
|
|
329
335
|
react: React,
|
|
330
336
|
tagName: 'c-pagination',
|
|
331
337
|
});
|
|
338
|
+
/** A click-opened, non-modal surface anchored to its trigger, floating in the top layer; its content may be interactive. */
|
|
339
|
+
export const CPopover = createComponent({
|
|
340
|
+
displayName: 'CPopover',
|
|
341
|
+
elementClass: elementClass('c-popover'),
|
|
342
|
+
events: {
|
|
343
|
+
onChangeOpen: 'change:open',
|
|
344
|
+
},
|
|
345
|
+
react: React,
|
|
346
|
+
tagName: 'c-popover',
|
|
347
|
+
});
|
|
348
|
+
/** A horizontal progress bar that fills a track to a known completion percentage, with an optional details line showing the value and a label. */
|
|
332
349
|
export const CProgressBar = createComponent({
|
|
333
350
|
displayName: 'CProgressBar',
|
|
334
351
|
elementClass: elementClass('c-progress-bar'),
|
|
335
352
|
react: React,
|
|
336
353
|
tagName: 'c-progress-bar',
|
|
337
354
|
});
|
|
355
|
+
/** A circular progress indicator that draws a known completion percentage as an arc around a track — the circular counterpart of `c-progress-bar`. */
|
|
356
|
+
export const CProgressCircle = createComponent({
|
|
357
|
+
displayName: 'CProgressCircle',
|
|
358
|
+
elementClass: elementClass('c-progress-circle'),
|
|
359
|
+
react: React,
|
|
360
|
+
tagName: 'c-progress-circle',
|
|
361
|
+
});
|
|
362
|
+
/** A single radio option inside a `c-radio-group`: a native radio input whose default slot is its clickable, announced label. */
|
|
338
363
|
export const CRadio = createComponent({
|
|
339
364
|
displayName: 'CRadio',
|
|
340
365
|
elementClass: elementClass('c-radio'),
|
|
366
|
+
events: {
|
|
367
|
+
onChange: 'change',
|
|
368
|
+
},
|
|
341
369
|
react: React,
|
|
342
370
|
tagName: 'c-radio',
|
|
343
371
|
});
|
|
372
|
+
/** A radio group is a set of mutually exclusive choices where exactly one can be selected, authored as slotted `c-radio` children. Give the group a `label` so the choice it represents is named for every user, and a `hint` describing how to answer. */
|
|
344
373
|
export const CRadioGroup = createComponent({
|
|
345
374
|
displayName: 'CRadioGroup',
|
|
346
375
|
elementClass: elementClass('c-radio-group'),
|
|
@@ -398,6 +427,7 @@ export const CSlider = createComponent({
|
|
|
398
427
|
react: React,
|
|
399
428
|
tagName: 'c-slider',
|
|
400
429
|
});
|
|
430
|
+
/** A circular indeterminate activity indicator — pure motion with no value, for waits of unknown duration. */
|
|
401
431
|
export const CSpinner = createComponent({
|
|
402
432
|
displayName: 'CSpinner',
|
|
403
433
|
elementClass: elementClass('c-spinner'),
|
|
@@ -428,6 +458,7 @@ export const CSubNavigationItem = createComponent({
|
|
|
428
458
|
react: React,
|
|
429
459
|
tagName: 'c-sub-navigation-item',
|
|
430
460
|
});
|
|
461
|
+
/** A toggle for a binary setting that takes effect immediately: a native switch control with a label, an optional hint, and validation messaging. */
|
|
431
462
|
export const CSwitch = createComponent({
|
|
432
463
|
displayName: 'CSwitch',
|
|
433
464
|
elementClass: elementClass('c-switch'),
|
|
@@ -475,6 +506,7 @@ export const CTabItems = createComponent({
|
|
|
475
506
|
react: React,
|
|
476
507
|
tagName: 'c-tab-items',
|
|
477
508
|
});
|
|
509
|
+
/** A styled wrapper for a table you author yourself: slot in a plain `<table>` and c-table gives it the CSC look plus an optional responsive card layout on narrow screens. The table stays in your own DOM — your stylesheets, your framework's rendering, and `::part()` selectors on components nested in cells (a `c-tag` status chip, a `c-pagination` footer) all keep working. */
|
|
478
510
|
export const CTable = createComponent({
|
|
479
511
|
displayName: 'CTable',
|
|
480
512
|
elementClass: elementClass('c-table'),
|
|
@@ -542,3 +574,13 @@ export const CToolbar = createComponent({
|
|
|
542
574
|
react: React,
|
|
543
575
|
tagName: 'c-toolbar',
|
|
544
576
|
});
|
|
577
|
+
/** A non-interactive text hint shown when its trigger is hovered or keyboard-focused, floating in the top layer on the inverted surface tier. */
|
|
578
|
+
export const CTooltip = createComponent({
|
|
579
|
+
displayName: 'CTooltip',
|
|
580
|
+
elementClass: elementClass('c-tooltip'),
|
|
581
|
+
events: {
|
|
582
|
+
onChangeOpen: 'change:open',
|
|
583
|
+
},
|
|
584
|
+
react: React,
|
|
585
|
+
tagName: 'c-tooltip',
|
|
586
|
+
});
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* types come from `@cscfi/csc-ui` — import any option/item types you
|
|
7
7
|
* need (e.g. `CSelectItem`) from there.
|
|
8
8
|
*/
|
|
9
|
-
export * from
|
|
10
|
-
export { applyTheme, resetTheme, themeToCss } from
|
|
11
|
-
export type { Family, ThemeSeeds } from
|
|
9
|
+
export * from "./components.js";
|
|
10
|
+
export { DEFAULT_SEEDS, FAMILIES, applyTheme, resetTheme, themeToCss, } from "@cscfi/csc-ui";
|
|
11
|
+
export type { Family, ThemeSeeds } from "@cscfi/csc-ui";
|
|
12
|
+
export { chartAnatomy, chartAnatomyHex, chartSlots, chartSlotsHex, themeMode, } from "@cscfi/csc-ui";
|
|
13
|
+
export type { ChartAnatomy, ChartSlots, ThemeMode } from "@cscfi/csc-ui";
|
package/dist/index.js
CHANGED
|
@@ -6,5 +6,6 @@
|
|
|
6
6
|
* types come from `@cscfi/csc-ui` — import any option/item types you
|
|
7
7
|
* need (e.g. `CSelectItem`) from there.
|
|
8
8
|
*/
|
|
9
|
-
export * from
|
|
10
|
-
export { applyTheme, resetTheme, themeToCss } from
|
|
9
|
+
export * from "./components.js";
|
|
10
|
+
export { DEFAULT_SEEDS, FAMILIES, applyTheme, resetTheme, themeToCss, } from "@cscfi/csc-ui";
|
|
11
|
+
export { chartAnatomy, chartAnatomyHex, chartSlots, chartSlotsHex, themeMode, } from "@cscfi/csc-ui";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cscfi/csc-ui-react",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.10",
|
|
4
4
|
"description": "React components for the @cscfi/csc-ui custom elements, generated from the Custom Elements Manifest.",
|
|
5
5
|
"author": "My CSC Team <suiteamsui@gmail.com>",
|
|
6
6
|
"type": "module",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"react": ">=18",
|
|
24
|
-
"@cscfi/csc-ui": "^4.0.0-alpha.
|
|
24
|
+
"@cscfi/csc-ui": "^4.0.0-alpha.10"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/react": "^19.1.8",
|
|
28
28
|
"react": "^19.1.0",
|
|
29
29
|
"typescript": "^6.0.3",
|
|
30
|
-
"@cscfi/csc-ui": "4.0.0-alpha.
|
|
30
|
+
"@cscfi/csc-ui": "4.0.0-alpha.10"
|
|
31
31
|
},
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"repository": "CSCfi/ui",
|