@cscfi/csc-ui-react 4.0.0-alpha.3 → 4.0.0-alpha.30
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 +64 -4
- package/dist/components.js +114 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.js +4 -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 CBreadcrumbElement, type CBreadcrumbItemElement, 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 CDatePickerElement, type CDatePickerElementEventMap, 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 CNumberFieldElement, type CNumberFieldElementEventMap, 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 CTimePickerElement, type CTimePickerElementEventMap, type CToastElement, type CToastElementEventMap, type CToastsElement, type CToolbarElement, type CTooltipElement, type CTooltipElementEventMap, type CTreeSelectElement, type CTreeSelectElementEventMap } 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,7 +13,10 @@ 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,6 +26,10 @@ export declare const CAutocomplete: import("@lit/react").ReactWebComponent<CAuto
|
|
|
23
26
|
onUpdateValue: EventName<CAutocompleteElementEventMap["update:value"]>;
|
|
24
27
|
}>;
|
|
25
28
|
export declare const CBadge: import("@lit/react").ReactWebComponent<CBadgeElement, {}>;
|
|
29
|
+
/** A navigation aid naming where the current page sits in a site's hierarchy: one line of crumbs from the top of the hierarchy down to the current page, the middle ones folding behind a "…" button when the line runs out of room. */
|
|
30
|
+
export declare const CBreadcrumb: import("@lit/react").ReactWebComponent<CBreadcrumbElement, {}>;
|
|
31
|
+
/** One crumb in a `c-breadcrumb`: a link to a level of the hierarchy, or, as the last crumb, the current page. */
|
|
32
|
+
export declare const CBreadcrumbItem: import("@lit/react").ReactWebComponent<CBreadcrumbItemElement, {}>;
|
|
26
33
|
/** 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. */
|
|
27
34
|
export declare const CButton: import("@lit/react").ReactWebComponent<CButtonElement, {}>;
|
|
28
35
|
/** 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. */
|
|
@@ -35,6 +42,7 @@ export declare const CCard: import("@lit/react").ReactWebComponent<CCardElement,
|
|
|
35
42
|
export declare const CCardActions: import("@lit/react").ReactWebComponent<CCardActionsElement, {}>;
|
|
36
43
|
export declare const CCardContent: import("@lit/react").ReactWebComponent<CCardContentElement, {}>;
|
|
37
44
|
export declare const CCardTitle: import("@lit/react").ReactWebComponent<CCardTitleElement, {}>;
|
|
45
|
+
/** A form control for a single on/off choice: a native checkbox with a label, an optional hint, and validation messaging. */
|
|
38
46
|
export declare const CCheckbox: import("@lit/react").ReactWebComponent<CCheckboxElement, {
|
|
39
47
|
onChange: EventName<CCheckboxElementEventMap["change"]>;
|
|
40
48
|
onChangeValue: EventName<CCheckboxElementEventMap["changeValue"]>;
|
|
@@ -49,6 +57,14 @@ export declare const CDataTable: import("@lit/react").ReactWebComponent<CDataTab
|
|
|
49
57
|
onChangeSelected: EventName<CDataTableElementEventMap["change:selected"]>;
|
|
50
58
|
onChangeSort: EventName<CDataTableElementEventMap["change:sort"]>;
|
|
51
59
|
}>;
|
|
60
|
+
/** A date field that takes a typed date, or opens a calendar panel for picking one, or a start and end date under `range`. */
|
|
61
|
+
export declare const CDatePicker: import("@lit/react").ReactWebComponent<CDatePickerElement, {
|
|
62
|
+
onChange: EventName<CDatePickerElementEventMap["change"]>;
|
|
63
|
+
onChangeMonth: EventName<CDatePickerElementEventMap["change:month"]>;
|
|
64
|
+
onChangeText: EventName<CDatePickerElementEventMap["change:text"]>;
|
|
65
|
+
onInput: EventName<CDatePickerElementEventMap["input"]>;
|
|
66
|
+
onUpdateValue: EventName<CDatePickerElementEventMap["update:value"]>;
|
|
67
|
+
}>;
|
|
52
68
|
export declare const CDivider: import("@lit/react").ReactWebComponent<CDividerElement, {}>;
|
|
53
69
|
export declare const CIcon: import("@lit/react").ReactWebComponent<CIconElement, {}>;
|
|
54
70
|
export declare const CIconButton: import("@lit/react").ReactWebComponent<CIconButtonElement, {}>;
|
|
@@ -66,8 +82,9 @@ export declare const CLoginCard: import("@lit/react").ReactWebComponent<CLoginCa
|
|
|
66
82
|
export declare const CLoginCardActions: import("@lit/react").ReactWebComponent<CLoginCardActionsElement, {}>;
|
|
67
83
|
export declare const CLoginCardContent: import("@lit/react").ReactWebComponent<CLoginCardContentElement, {}>;
|
|
68
84
|
export declare const CLoginCardTitle: import("@lit/react").ReactWebComponent<CLoginCardTitleElement, {}>;
|
|
69
|
-
/**
|
|
85
|
+
/** The page shell of an application: it paints the page canvas and lays out the toolbar, the side navigation and the page in the dashboard layout. It is at least a viewport tall and grows with its content, so the document — not a component — is what scrolls. */
|
|
70
86
|
export declare const CMain: import("@lit/react").ReactWebComponent<CMainElement, {}>;
|
|
87
|
+
/** A command menu: a transient panel of actions or navigation choices opened from a trigger (the WAI-ARIA menu-button pattern), authored declaratively with slotted `c-menu-item`, `c-menu-label` and `c-divider` elements. Activating an item fires a one-off `select` event and closes the menu; the menu holds no selected value — that is `c-select`'s job. */
|
|
71
88
|
export declare const CMenu: import("@lit/react").ReactWebComponent<CMenuElement, {
|
|
72
89
|
onChangeOpen: EventName<CMenuElementEventMap["change:open"]>;
|
|
73
90
|
onSelect: EventName<CMenuElementEventMap["select"]>;
|
|
@@ -84,7 +101,14 @@ export declare const CModal: import("@lit/react").ReactWebComponent<CModalElemen
|
|
|
84
101
|
onUpdateValue: EventName<CModalElementEventMap["update:value"]>;
|
|
85
102
|
}>;
|
|
86
103
|
export declare const CNavigationButton: import("@lit/react").ReactWebComponent<CNavigationButtonElement, {}>;
|
|
104
|
+
/** A field for a number — an integer, or one with decimals — shown with thousands separators as it is typed. */
|
|
105
|
+
export declare const CNumberField: import("@lit/react").ReactWebComponent<CNumberFieldElement, {
|
|
106
|
+
onChange: EventName<CNumberFieldElementEventMap["change"]>;
|
|
107
|
+
onInput: EventName<CNumberFieldElementEventMap["input"]>;
|
|
108
|
+
onUpdateValue: EventName<CNumberFieldElementEventMap["update:value"]>;
|
|
109
|
+
}>;
|
|
87
110
|
export declare const COption: import("@lit/react").ReactWebComponent<COptionElement, {}>;
|
|
111
|
+
/** The label region of a `c-option`: wraps the text that c-select and c-autocomplete use as the option's label — in the closed field, its tag and the autocomplete filter — so the option can carry a description or an icon beside its label, and the region in which c-autocomplete marks the runs equal to the query (`::part(match)`). */
|
|
88
112
|
export declare const COptionValue: import("@lit/react").ReactWebComponent<COptionValueElement, {}>;
|
|
89
113
|
export declare const COtpInput: import("@lit/react").ReactWebComponent<COtpInputElement, {
|
|
90
114
|
onChangeValue: EventName<COtpInputElementEventMap["changeValue"]>;
|
|
@@ -98,18 +122,31 @@ export declare const CPagination: import("@lit/react").ReactWebComponent<CPagina
|
|
|
98
122
|
onInput: EventName<CPaginationElementEventMap["input"]>;
|
|
99
123
|
onUpdateValue: EventName<CPaginationElementEventMap["update:value"]>;
|
|
100
124
|
}>;
|
|
125
|
+
/** A click-opened, non-modal surface anchored to its trigger, floating in the top layer; its content may be interactive. */
|
|
126
|
+
export declare const CPopover: import("@lit/react").ReactWebComponent<CPopoverElement, {
|
|
127
|
+
onChangeOpen: EventName<CPopoverElementEventMap["change:open"]>;
|
|
128
|
+
}>;
|
|
129
|
+
/** A horizontal progress bar that fills a track to a known completion percentage, with an optional details line showing the value and a label. */
|
|
101
130
|
export declare const CProgressBar: import("@lit/react").ReactWebComponent<CProgressBarElement, {}>;
|
|
102
|
-
|
|
131
|
+
/** A circular progress indicator that draws a known completion percentage as an arc around a track — the circular counterpart of `c-progress-bar`. */
|
|
132
|
+
export declare const CProgressCircle: import("@lit/react").ReactWebComponent<CProgressCircleElement, {}>;
|
|
133
|
+
/** A single radio option inside a `c-radio-group`: a native radio input whose default slot is its clickable, announced label. */
|
|
134
|
+
export declare const CRadio: import("@lit/react").ReactWebComponent<CRadioElement, {
|
|
135
|
+
onChange: EventName<CRadioElementEventMap["change"]>;
|
|
136
|
+
}>;
|
|
137
|
+
/** 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. */
|
|
103
138
|
export declare const CRadioGroup: import("@lit/react").ReactWebComponent<CRadioGroupElement, {
|
|
104
139
|
onChangeValue: EventName<CRadioGroupElementEventMap["changeValue"]>;
|
|
105
140
|
onInput: EventName<CRadioGroupElementEventMap["input"]>;
|
|
106
141
|
onUpdateValue: EventName<CRadioGroupElementEventMap["update:value"]>;
|
|
107
142
|
}>;
|
|
143
|
+
/** A value-selection field: a readonly field that opens a listbox of options — slotted `c-option` elements or an `items` array — and holds the picked value, emitting the value events that back `v-model`. */
|
|
108
144
|
export declare const CSelect: import("@lit/react").ReactWebComponent<CSelectElement, {
|
|
109
145
|
onChangeValue: EventName<CSelectElementEventMap["changeValue"]>;
|
|
110
146
|
onInput: EventName<CSelectElementEventMap["input"]>;
|
|
111
147
|
onUpdateValue: EventName<CSelectElementEventMap["update:value"]>;
|
|
112
148
|
}>;
|
|
149
|
+
/** The dashboard layout's left-hand menu: section titles, navigation items and their sub-items in a drawer that is pinned beside the page on desktop and slides in over it on mobile. */
|
|
113
150
|
export declare const CSideNavigation: import("@lit/react").ReactWebComponent<CSideNavigationElement, {
|
|
114
151
|
onChangeMenuVisible: EventName<CSideNavigationElementEventMap["change:menu-visible"]>;
|
|
115
152
|
}>;
|
|
@@ -122,11 +159,13 @@ export declare const CSlider: import("@lit/react").ReactWebComponent<CSliderElem
|
|
|
122
159
|
onInput: EventName<CSliderElementEventMap["input"]>;
|
|
123
160
|
onUpdateValue: EventName<CSliderElementEventMap["update:value"]>;
|
|
124
161
|
}>;
|
|
162
|
+
/** A circular indeterminate activity indicator — pure motion with no value, for waits of unknown duration. */
|
|
125
163
|
export declare const CSpinner: import("@lit/react").ReactWebComponent<CSpinnerElement, {}>;
|
|
126
164
|
export declare const CStatus: import("@lit/react").ReactWebComponent<CStatusElement, {}>;
|
|
127
165
|
export declare const CStep: import("@lit/react").ReactWebComponent<CStepElement, {}>;
|
|
128
166
|
export declare const CSteps: import("@lit/react").ReactWebComponent<CStepsElement, {}>;
|
|
129
167
|
export declare const CSubNavigationItem: import("@lit/react").ReactWebComponent<CSubNavigationItemElement, {}>;
|
|
168
|
+
/** A toggle for a binary setting that takes effect immediately: a native switch control with a label, an optional hint, and validation messaging. */
|
|
130
169
|
export declare const CSwitch: import("@lit/react").ReactWebComponent<CSwitchElement, {
|
|
131
170
|
onChange: EventName<CSwitchElementEventMap["change"]>;
|
|
132
171
|
onChangeValue: EventName<CSwitchElementEventMap["changeValue"]>;
|
|
@@ -145,6 +184,7 @@ export declare const CTabItem: import("@lit/react").ReactWebComponent<CTabItemEl
|
|
|
145
184
|
onContentChange: EventName<CTabItemElementEventMap["contentChange"]>;
|
|
146
185
|
}>;
|
|
147
186
|
export declare const CTabItems: import("@lit/react").ReactWebComponent<CTabItemsElement, {}>;
|
|
187
|
+
/** 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. */
|
|
148
188
|
export declare const CTable: import("@lit/react").ReactWebComponent<CTableElement, {}>;
|
|
149
189
|
export declare const CTabs: import("@lit/react").ReactWebComponent<CTabsElement, {
|
|
150
190
|
onChangeValue: EventName<CTabsElementEventMap["changeValue"]>;
|
|
@@ -155,16 +195,36 @@ export declare const CTag: import("@lit/react").ReactWebComponent<CTagElement, {
|
|
|
155
195
|
onClose: EventName<CTagElementEventMap["close"]>;
|
|
156
196
|
}>;
|
|
157
197
|
export declare const CTags: import("@lit/react").ReactWebComponent<CTagsElement, {}>;
|
|
198
|
+
/** A text field for a single line of text, or several lines under `rows`, with a label, a hint and an error message. */
|
|
158
199
|
export declare const CTextField: import("@lit/react").ReactWebComponent<Omit<CTextFieldElement, "autocorrect"> & HTMLElement, {
|
|
159
200
|
onChange: EventName<CTextFieldElementEventMap["change"]>;
|
|
160
201
|
onChangeValue: EventName<CTextFieldElementEventMap["changeValue"]>;
|
|
161
202
|
onInput: EventName<CTextFieldElementEventMap["input"]>;
|
|
162
203
|
onUpdateValue: EventName<CTextFieldElementEventMap["update:value"]>;
|
|
163
204
|
}>;
|
|
205
|
+
/** A time field that takes a typed time, or opens hour and minute columns for picking one, or a start and end time under `range`. */
|
|
206
|
+
export declare const CTimePicker: import("@lit/react").ReactWebComponent<CTimePickerElement, {
|
|
207
|
+
onChange: EventName<CTimePickerElementEventMap["change"]>;
|
|
208
|
+
onChangeText: EventName<CTimePickerElementEventMap["change:text"]>;
|
|
209
|
+
onInput: EventName<CTimePickerElementEventMap["input"]>;
|
|
210
|
+
onUpdateValue: EventName<CTimePickerElementEventMap["update:value"]>;
|
|
211
|
+
}>;
|
|
164
212
|
/** A single toast notification, rendered and managed by c-toasts */
|
|
165
213
|
export declare const CToast: import("@lit/react").ReactWebComponent<CToastElement, {
|
|
166
214
|
onClose: EventName<CToastElementEventMap["close"]>;
|
|
167
215
|
}>;
|
|
168
216
|
/** Toasts are passive, transient notifications — operation results, background progress — stacked and managed by a single `c-toasts` container via its `addToast` / `removeToast` methods. */
|
|
169
217
|
export declare const CToasts: import("@lit/react").ReactWebComponent<CToastsElement, {}>;
|
|
218
|
+
/** The app-wide bar at the top of the dashboard layout: the logo, the service name and global actions such as the user menu or log out. It is pinned to the top of the viewport by default and stays there while the page scrolls; `static` keeps it in the page flow so it scrolls away with the content. */
|
|
170
219
|
export declare const CToolbar: import("@lit/react").ReactWebComponent<CToolbarElement, {}>;
|
|
220
|
+
/** A non-interactive text hint shown when its trigger is hovered or keyboard-focused, floating in the top layer on the inverted surface tier. */
|
|
221
|
+
export declare const CTooltip: import("@lit/react").ReactWebComponent<CTooltipElement, {
|
|
222
|
+
onChangeOpen: EventName<CTooltipElementEventMap["change:open"]>;
|
|
223
|
+
}>;
|
|
224
|
+
/** A hierarchical value-selection component: a readonly value field that opens a panel for browsing a tree one level at a time, or searching it as a whole, to commit one item. */
|
|
225
|
+
export declare const CTreeSelect: import("@lit/react").ReactWebComponent<CTreeSelectElement, {
|
|
226
|
+
onChange: EventName<CTreeSelectElementEventMap["change"]>;
|
|
227
|
+
onChangeQuery: EventName<CTreeSelectElementEventMap["change:query"]>;
|
|
228
|
+
onInput: EventName<CTreeSelectElementEventMap["input"]>;
|
|
229
|
+
onUpdateValue: EventName<CTreeSelectElementEventMap["update:value"]>;
|
|
230
|
+
}>;
|
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
|
});
|
|
@@ -68,6 +72,20 @@ export const CBadge = createComponent({
|
|
|
68
72
|
react: React,
|
|
69
73
|
tagName: 'c-badge',
|
|
70
74
|
});
|
|
75
|
+
/** A navigation aid naming where the current page sits in a site's hierarchy: one line of crumbs from the top of the hierarchy down to the current page, the middle ones folding behind a "…" button when the line runs out of room. */
|
|
76
|
+
export const CBreadcrumb = createComponent({
|
|
77
|
+
displayName: 'CBreadcrumb',
|
|
78
|
+
elementClass: elementClass('c-breadcrumb'),
|
|
79
|
+
react: React,
|
|
80
|
+
tagName: 'c-breadcrumb',
|
|
81
|
+
});
|
|
82
|
+
/** One crumb in a `c-breadcrumb`: a link to a level of the hierarchy, or, as the last crumb, the current page. */
|
|
83
|
+
export const CBreadcrumbItem = createComponent({
|
|
84
|
+
displayName: 'CBreadcrumbItem',
|
|
85
|
+
elementClass: elementClass('c-breadcrumb-item'),
|
|
86
|
+
react: React,
|
|
87
|
+
tagName: 'c-breadcrumb-item',
|
|
88
|
+
});
|
|
71
89
|
/** 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
90
|
export const CButton = createComponent({
|
|
73
91
|
displayName: 'CButton',
|
|
@@ -111,6 +129,7 @@ export const CCardTitle = createComponent({
|
|
|
111
129
|
react: React,
|
|
112
130
|
tagName: 'c-card-title',
|
|
113
131
|
});
|
|
132
|
+
/** A form control for a single on/off choice: a native checkbox with a label, an optional hint, and validation messaging. */
|
|
114
133
|
export const CCheckbox = createComponent({
|
|
115
134
|
displayName: 'CCheckbox',
|
|
116
135
|
elementClass: elementClass('c-checkbox'),
|
|
@@ -142,6 +161,20 @@ export const CDataTable = createComponent({
|
|
|
142
161
|
react: React,
|
|
143
162
|
tagName: 'c-data-table',
|
|
144
163
|
});
|
|
164
|
+
/** A date field that takes a typed date, or opens a calendar panel for picking one, or a start and end date under `range`. */
|
|
165
|
+
export const CDatePicker = createComponent({
|
|
166
|
+
displayName: 'CDatePicker',
|
|
167
|
+
elementClass: elementClass('c-date-picker'),
|
|
168
|
+
events: {
|
|
169
|
+
onChange: 'change',
|
|
170
|
+
onChangeMonth: 'change:month',
|
|
171
|
+
onChangeText: 'change:text',
|
|
172
|
+
onInput: 'input',
|
|
173
|
+
onUpdateValue: 'update:value',
|
|
174
|
+
},
|
|
175
|
+
react: React,
|
|
176
|
+
tagName: 'c-date-picker',
|
|
177
|
+
});
|
|
145
178
|
export const CDivider = createComponent({
|
|
146
179
|
displayName: 'CDivider',
|
|
147
180
|
elementClass: elementClass('c-divider'),
|
|
@@ -234,13 +267,14 @@ export const CLoginCardTitle = createComponent({
|
|
|
234
267
|
react: React,
|
|
235
268
|
tagName: 'c-login-card-title',
|
|
236
269
|
});
|
|
237
|
-
/**
|
|
270
|
+
/** The page shell of an application: it paints the page canvas and lays out the toolbar, the side navigation and the page in the dashboard layout. It is at least a viewport tall and grows with its content, so the document — not a component — is what scrolls. */
|
|
238
271
|
export const CMain = createComponent({
|
|
239
272
|
displayName: 'CMain',
|
|
240
273
|
elementClass: elementClass('c-main'),
|
|
241
274
|
react: React,
|
|
242
275
|
tagName: 'c-main',
|
|
243
276
|
});
|
|
277
|
+
/** A command menu: a transient panel of actions or navigation choices opened from a trigger (the WAI-ARIA menu-button pattern), authored declaratively with slotted `c-menu-item`, `c-menu-label` and `c-divider` elements. Activating an item fires a one-off `select` event and closes the menu; the menu holds no selected value — that is `c-select`'s job. */
|
|
244
278
|
export const CMenu = createComponent({
|
|
245
279
|
displayName: 'CMenu',
|
|
246
280
|
elementClass: elementClass('c-menu'),
|
|
@@ -289,12 +323,25 @@ export const CNavigationButton = createComponent({
|
|
|
289
323
|
react: React,
|
|
290
324
|
tagName: 'c-navigation-button',
|
|
291
325
|
});
|
|
326
|
+
/** A field for a number — an integer, or one with decimals — shown with thousands separators as it is typed. */
|
|
327
|
+
export const CNumberField = createComponent({
|
|
328
|
+
displayName: 'CNumberField',
|
|
329
|
+
elementClass: elementClass('c-number-field'),
|
|
330
|
+
events: {
|
|
331
|
+
onChange: 'change',
|
|
332
|
+
onInput: 'input',
|
|
333
|
+
onUpdateValue: 'update:value',
|
|
334
|
+
},
|
|
335
|
+
react: React,
|
|
336
|
+
tagName: 'c-number-field',
|
|
337
|
+
});
|
|
292
338
|
export const COption = createComponent({
|
|
293
339
|
displayName: 'COption',
|
|
294
340
|
elementClass: elementClass('c-option'),
|
|
295
341
|
react: React,
|
|
296
342
|
tagName: 'c-option',
|
|
297
343
|
});
|
|
344
|
+
/** The label region of a `c-option`: wraps the text that c-select and c-autocomplete use as the option's label — in the closed field, its tag and the autocomplete filter — so the option can carry a description or an icon beside its label, and the region in which c-autocomplete marks the runs equal to the query (`::part(match)`). */
|
|
298
345
|
export const COptionValue = createComponent({
|
|
299
346
|
displayName: 'COptionValue',
|
|
300
347
|
elementClass: elementClass('c-option-value'),
|
|
@@ -330,18 +377,41 @@ export const CPagination = createComponent({
|
|
|
330
377
|
react: React,
|
|
331
378
|
tagName: 'c-pagination',
|
|
332
379
|
});
|
|
380
|
+
/** A click-opened, non-modal surface anchored to its trigger, floating in the top layer; its content may be interactive. */
|
|
381
|
+
export const CPopover = createComponent({
|
|
382
|
+
displayName: 'CPopover',
|
|
383
|
+
elementClass: elementClass('c-popover'),
|
|
384
|
+
events: {
|
|
385
|
+
onChangeOpen: 'change:open',
|
|
386
|
+
},
|
|
387
|
+
react: React,
|
|
388
|
+
tagName: 'c-popover',
|
|
389
|
+
});
|
|
390
|
+
/** A horizontal progress bar that fills a track to a known completion percentage, with an optional details line showing the value and a label. */
|
|
333
391
|
export const CProgressBar = createComponent({
|
|
334
392
|
displayName: 'CProgressBar',
|
|
335
393
|
elementClass: elementClass('c-progress-bar'),
|
|
336
394
|
react: React,
|
|
337
395
|
tagName: 'c-progress-bar',
|
|
338
396
|
});
|
|
397
|
+
/** A circular progress indicator that draws a known completion percentage as an arc around a track — the circular counterpart of `c-progress-bar`. */
|
|
398
|
+
export const CProgressCircle = createComponent({
|
|
399
|
+
displayName: 'CProgressCircle',
|
|
400
|
+
elementClass: elementClass('c-progress-circle'),
|
|
401
|
+
react: React,
|
|
402
|
+
tagName: 'c-progress-circle',
|
|
403
|
+
});
|
|
404
|
+
/** A single radio option inside a `c-radio-group`: a native radio input whose default slot is its clickable, announced label. */
|
|
339
405
|
export const CRadio = createComponent({
|
|
340
406
|
displayName: 'CRadio',
|
|
341
407
|
elementClass: elementClass('c-radio'),
|
|
408
|
+
events: {
|
|
409
|
+
onChange: 'change',
|
|
410
|
+
},
|
|
342
411
|
react: React,
|
|
343
412
|
tagName: 'c-radio',
|
|
344
413
|
});
|
|
414
|
+
/** 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. */
|
|
345
415
|
export const CRadioGroup = createComponent({
|
|
346
416
|
displayName: 'CRadioGroup',
|
|
347
417
|
elementClass: elementClass('c-radio-group'),
|
|
@@ -353,6 +423,7 @@ export const CRadioGroup = createComponent({
|
|
|
353
423
|
react: React,
|
|
354
424
|
tagName: 'c-radio-group',
|
|
355
425
|
});
|
|
426
|
+
/** A value-selection field: a readonly field that opens a listbox of options — slotted `c-option` elements or an `items` array — and holds the picked value, emitting the value events that back `v-model`. */
|
|
356
427
|
export const CSelect = createComponent({
|
|
357
428
|
displayName: 'CSelect',
|
|
358
429
|
elementClass: elementClass('c-select'),
|
|
@@ -364,6 +435,7 @@ export const CSelect = createComponent({
|
|
|
364
435
|
react: React,
|
|
365
436
|
tagName: 'c-select',
|
|
366
437
|
});
|
|
438
|
+
/** The dashboard layout's left-hand menu: section titles, navigation items and their sub-items in a drawer that is pinned beside the page on desktop and slides in over it on mobile. */
|
|
367
439
|
export const CSideNavigation = createComponent({
|
|
368
440
|
displayName: 'CSideNavigation',
|
|
369
441
|
elementClass: elementClass('c-side-navigation'),
|
|
@@ -399,6 +471,7 @@ export const CSlider = createComponent({
|
|
|
399
471
|
react: React,
|
|
400
472
|
tagName: 'c-slider',
|
|
401
473
|
});
|
|
474
|
+
/** A circular indeterminate activity indicator — pure motion with no value, for waits of unknown duration. */
|
|
402
475
|
export const CSpinner = createComponent({
|
|
403
476
|
displayName: 'CSpinner',
|
|
404
477
|
elementClass: elementClass('c-spinner'),
|
|
@@ -429,6 +502,7 @@ export const CSubNavigationItem = createComponent({
|
|
|
429
502
|
react: React,
|
|
430
503
|
tagName: 'c-sub-navigation-item',
|
|
431
504
|
});
|
|
505
|
+
/** A toggle for a binary setting that takes effect immediately: a native switch control with a label, an optional hint, and validation messaging. */
|
|
432
506
|
export const CSwitch = createComponent({
|
|
433
507
|
displayName: 'CSwitch',
|
|
434
508
|
elementClass: elementClass('c-switch'),
|
|
@@ -476,6 +550,7 @@ export const CTabItems = createComponent({
|
|
|
476
550
|
react: React,
|
|
477
551
|
tagName: 'c-tab-items',
|
|
478
552
|
});
|
|
553
|
+
/** 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. */
|
|
479
554
|
export const CTable = createComponent({
|
|
480
555
|
displayName: 'CTable',
|
|
481
556
|
elementClass: elementClass('c-table'),
|
|
@@ -508,6 +583,7 @@ export const CTags = createComponent({
|
|
|
508
583
|
react: React,
|
|
509
584
|
tagName: 'c-tags',
|
|
510
585
|
});
|
|
586
|
+
/** A text field for a single line of text, or several lines under `rows`, with a label, a hint and an error message. */
|
|
511
587
|
export const CTextField = createComponent({
|
|
512
588
|
displayName: 'CTextField',
|
|
513
589
|
elementClass: elementClass('c-text-field'),
|
|
@@ -520,6 +596,19 @@ export const CTextField = createComponent({
|
|
|
520
596
|
react: React,
|
|
521
597
|
tagName: 'c-text-field',
|
|
522
598
|
});
|
|
599
|
+
/** A time field that takes a typed time, or opens hour and minute columns for picking one, or a start and end time under `range`. */
|
|
600
|
+
export const CTimePicker = createComponent({
|
|
601
|
+
displayName: 'CTimePicker',
|
|
602
|
+
elementClass: elementClass('c-time-picker'),
|
|
603
|
+
events: {
|
|
604
|
+
onChange: 'change',
|
|
605
|
+
onChangeText: 'change:text',
|
|
606
|
+
onInput: 'input',
|
|
607
|
+
onUpdateValue: 'update:value',
|
|
608
|
+
},
|
|
609
|
+
react: React,
|
|
610
|
+
tagName: 'c-time-picker',
|
|
611
|
+
});
|
|
523
612
|
/** A single toast notification, rendered and managed by c-toasts */
|
|
524
613
|
export const CToast = createComponent({
|
|
525
614
|
displayName: 'CToast',
|
|
@@ -537,9 +626,33 @@ export const CToasts = createComponent({
|
|
|
537
626
|
react: React,
|
|
538
627
|
tagName: 'c-toasts',
|
|
539
628
|
});
|
|
629
|
+
/** The app-wide bar at the top of the dashboard layout: the logo, the service name and global actions such as the user menu or log out. It is pinned to the top of the viewport by default and stays there while the page scrolls; `static` keeps it in the page flow so it scrolls away with the content. */
|
|
540
630
|
export const CToolbar = createComponent({
|
|
541
631
|
displayName: 'CToolbar',
|
|
542
632
|
elementClass: elementClass('c-toolbar'),
|
|
543
633
|
react: React,
|
|
544
634
|
tagName: 'c-toolbar',
|
|
545
635
|
});
|
|
636
|
+
/** A non-interactive text hint shown when its trigger is hovered or keyboard-focused, floating in the top layer on the inverted surface tier. */
|
|
637
|
+
export const CTooltip = createComponent({
|
|
638
|
+
displayName: 'CTooltip',
|
|
639
|
+
elementClass: elementClass('c-tooltip'),
|
|
640
|
+
events: {
|
|
641
|
+
onChangeOpen: 'change:open',
|
|
642
|
+
},
|
|
643
|
+
react: React,
|
|
644
|
+
tagName: 'c-tooltip',
|
|
645
|
+
});
|
|
646
|
+
/** A hierarchical value-selection component: a readonly value field that opens a panel for browsing a tree one level at a time, or searching it as a whole, to commit one item. */
|
|
647
|
+
export const CTreeSelect = createComponent({
|
|
648
|
+
displayName: 'CTreeSelect',
|
|
649
|
+
elementClass: elementClass('c-tree-select'),
|
|
650
|
+
events: {
|
|
651
|
+
onChange: 'change',
|
|
652
|
+
onChangeQuery: 'change:query',
|
|
653
|
+
onInput: 'input',
|
|
654
|
+
onUpdateValue: 'update:value',
|
|
655
|
+
},
|
|
656
|
+
react: React,
|
|
657
|
+
tagName: 'c-tree-select',
|
|
658
|
+
});
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,10 @@
|
|
|
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 { DEFAULTABLE_PROPS, applyDefaults, resetDefaults, } from "@cscfi/csc-ui";
|
|
13
|
+
export type { AppDefaults, DefaultableTag } from "@cscfi/csc-ui";
|
|
14
|
+
export { chartAnatomy, chartAnatomyHex, chartSlots, chartSlotsHex, observeThemeMode, themeMode, } from "@cscfi/csc-ui";
|
|
15
|
+
export type { ChartAnatomy, ChartSlots, ThemeMode } from "@cscfi/csc-ui";
|
package/dist/index.js
CHANGED
|
@@ -6,5 +6,7 @@
|
|
|
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 { DEFAULTABLE_PROPS, applyDefaults, resetDefaults, } from "@cscfi/csc-ui";
|
|
12
|
+
export { chartAnatomy, chartAnatomyHex, chartSlots, chartSlotsHex, observeThemeMode, 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.30",
|
|
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.30"
|
|
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.30"
|
|
31
31
|
},
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"repository": "CSCfi/ui",
|