@cscfi/csc-ui-react 4.0.0-alpha.9 → 4.0.0-rc.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/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # @cscfi/csc-ui-react
2
+
3
+ React components for the [CSC Design System](https://design-system.csc.fi)'s
4
+ custom elements from [`@cscfi/csc-ui`](https://www.npmjs.com/package/@cscfi/csc-ui):
5
+ one typed component per element, generated from the same source, with props
6
+ set as properties and events as typed `on*` callbacks.
7
+
8
+ ```bash
9
+ npm install @cscfi/csc-ui @cscfi/csc-ui-react
10
+ ```
11
+
12
+ Import the design tokens once at startup. Importing anything from this
13
+ package registers the custom elements, so there is no setup call:
14
+
15
+ ```tsx
16
+ import '@cscfi/csc-ui/css/tokens.css';
17
+
18
+ import { CTextField } from '@cscfi/csc-ui-react';
19
+ import { useState } from 'react';
20
+
21
+ export const ProjectName = () => {
22
+ const [name, setName] = useState('');
23
+
24
+ return (
25
+ <CTextField
26
+ label="Project name"
27
+ onUpdateValue={(event) => setName(event.detail as string)}
28
+ value={name}
29
+ />
30
+ );
31
+ };
32
+ ```
33
+
34
+ The two packages are released together under the same version; keep them
35
+ in step. React 18 or later is required. Types for props and event details
36
+ (`CSelectItem`, `CAlertType`, …) are exported from `@cscfi/csc-ui`.
37
+
38
+ [Getting started](https://design-system.csc.fi/getting-started) has the full
39
+ setup, and every component's page shows its React example.
40
+
41
+ ## Upgrading from 3.x
42
+
43
+ 4.0.0 is a rewrite; the
44
+ [migration guide](https://design-system.csc.fi/migration) lists every change.
45
+ 3.x is unsupported since 4.0.0. To stay on it for now, pin the major version
46
+ of both packages (`@cscfi/csc-ui@3 @cscfi/csc-ui-react@3`).
47
+
48
+ ## License
49
+
50
+ MIT
@@ -3,29 +3,32 @@
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 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';
6
+ import { type CAccordionElement, type CAccordionElementEventMap, type CAccordionItemElement, 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 CColorPickerElement, type CColorPickerElementEventMap, type CCscLogoElement, type CDataTableElement, type CDataTableElementEventMap, type CDatePickerElement, type CDatePickerElementEventMap, type CDividerElement, type CFileUploadElement, type CFileUploadElementEventMap, type CIconElement, type CIconButtonElement, 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 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 CSubNavigationItemElementEventMap, type CSwitchElement, type CSwitchElementEventMap, type CTabElement, type CTabButtonsElement, type CTabItemElement, type CTabItemsElement, type CTableElement, type CTabsElement, type CTabsElementEventMap, type CTagElement, type CTagElementEventMap, type CTagsElement, type CTextFieldElement, type CTextFieldElementEventMap, type CTimePickerElement, type CTimePickerElementEventMap, type CToastsElement, type CToastsElementEventMap, type CToolbarElement, type CTooltipElement, type CTooltipElementEventMap, type CTreeSelectElement, type CTreeSelectElementEventMap } from '@cscfi/csc-ui';
7
+ /** A stack of collapsible sections, each a `c-accordion-item` whose header button shows or hides the content beneath it. */
7
8
  export declare const CAccordion: import("@lit/react").ReactWebComponent<CAccordionElement, {
8
9
  onChange: EventName<CAccordionElementEventMap["change"]>;
9
- onChangeValue: EventName<CAccordionElementEventMap["changeValue"]>;
10
10
  onInput: EventName<CAccordionElementEventMap["input"]>;
11
11
  onUpdateValue: EventName<CAccordionElementEventMap["update:value"]>;
12
12
  }>;
13
- export declare const CAccordionItem: import("@lit/react").ReactWebComponent<CAccordionItemElement, {
14
- onItemChange: EventName<CAccordionItemElementEventMap["item-change"]>;
15
- }>;
13
+ /** One collapsible section of a `c-accordion`: a header button showing its `heading` (or the `heading` slot) and an optional icon, above the content in the default slot. Place it directly inside the accordion and give it a `value`: the accordion expands items by value and leaves an item without one collapsed. */
14
+ export declare const CAccordionItem: import("@lit/react").ReactWebComponent<CAccordionItemElement, {}>;
16
15
  /** 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
16
  export declare const CAlert: import("@lit/react").ReactWebComponent<CAlertElement, {
18
- onDismiss: EventName<CAlertElementEventMap["dismiss"]>;
17
+ onClose: EventName<CAlertElementEventMap["close"]>;
19
18
  }>;
20
19
  /** A filterable value-selection component: a readonly value field that opens a popover panel with a search input above the matching options. */
21
20
  export declare const CAutocomplete: import("@lit/react").ReactWebComponent<CAutocompleteElement, {
22
21
  onChange: EventName<CAutocompleteElementEventMap["change"]>;
23
22
  onChangeQuery: EventName<CAutocompleteElementEventMap["change:query"]>;
24
- onChangeValue: EventName<CAutocompleteElementEventMap["changeValue"]>;
25
23
  onInput: EventName<CAutocompleteElementEventMap["input"]>;
26
24
  onUpdateValue: EventName<CAutocompleteElementEventMap["update:value"]>;
27
25
  }>;
26
+ /** A small pill that pins a short count or label to the top-right corner of the element it sits in, such as the number of unread messages on a button. */
28
27
  export declare const CBadge: import("@lit/react").ReactWebComponent<CBadgeElement, {}>;
28
+ /** 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. */
29
+ export declare const CBreadcrumb: import("@lit/react").ReactWebComponent<CBreadcrumbElement, {}>;
30
+ /** One crumb in a `c-breadcrumb`: a link to a level of the hierarchy, or, as the last crumb, the current page. */
31
+ export declare const CBreadcrumbItem: import("@lit/react").ReactWebComponent<CBreadcrumbItemElement, {}>;
29
32
  /** 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. */
30
33
  export declare const CButton: import("@lit/react").ReactWebComponent<CButtonElement, {}>;
31
34
  /** 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. */
@@ -34,18 +37,30 @@ export declare const CButtonGroup: import("@lit/react").ReactWebComponent<CButto
34
37
  onInput: EventName<CButtonGroupElementEventMap["input"]>;
35
38
  onUpdateValue: EventName<CButtonGroupElementEventMap["update:value"]>;
36
39
  }>;
40
+ /** A raised, bordered surface that groups one piece of content — its heading, body and actions — into a single box on the page. */
37
41
  export declare const CCard: import("@lit/react").ReactWebComponent<CCardElement, {}>;
42
+ /** The row of actions at the bottom of a `c-card`, typically `c-button`s, which wraps onto further rows instead of overflowing the card. `justify` distributes the actions along the row (`start` by default, `stretch` to grow them all) and `align` places them across it. */
38
43
  export declare const CCardActions: import("@lit/react").ReactWebComponent<CCardActionsElement, {}>;
44
+ /** The body section of a `c-card`: it pads its content in from the card's edges and stacks the children in a column with the card's section spacing. Place it after `c-card-title` and before `c-card-actions`. */
39
45
  export declare const CCardContent: import("@lit/react").ReactWebComponent<CCardContentElement, {}>;
46
+ /** The heading section of a `c-card`, set in small uppercase type above a primary accent bar; place it first in the card. Controls in its `actions` slot sit at the right of the heading and move onto their own line under it when the two do not fit side by side. */
40
47
  export declare const CCardTitle: import("@lit/react").ReactWebComponent<CCardTitleElement, {}>;
41
48
  /** A form control for a single on/off choice: a native checkbox with a label, an optional hint, and validation messaging. */
42
49
  export declare const CCheckbox: import("@lit/react").ReactWebComponent<CCheckboxElement, {
43
50
  onChange: EventName<CCheckboxElementEventMap["change"]>;
44
- onChangeValue: EventName<CCheckboxElementEventMap["changeValue"]>;
45
51
  onInput: EventName<CCheckboxElementEventMap["input"]>;
46
52
  onUpdateValue: EventName<CCheckboxElementEventMap["update:value"]>;
47
53
  }>;
54
+ /** A colour field that takes any typed CSS colour, or opens a panel for picking one: a colour area, hue and alpha sliders, per-channel inputs and swatches — or swatches alone under `swatches-only`. */
55
+ export declare const CColorPicker: import("@lit/react").ReactWebComponent<CColorPickerElement, {
56
+ onChange: EventName<CColorPickerElementEventMap["change"]>;
57
+ onChangeText: EventName<CColorPickerElementEventMap["change:text"]>;
58
+ onInput: EventName<CColorPickerElementEventMap["input"]>;
59
+ onUpdateValue: EventName<CColorPickerElementEventMap["update:value"]>;
60
+ }>;
61
+ /** The CSC logo without its tagline, drawn as an inline SVG in the colours of the current theme mode. */
48
62
  export declare const CCscLogo: import("@lit/react").ReactWebComponent<CCscLogoElement, {}>;
63
+ /** A data-driven table that renders the rows of a `data` array through a set of `columns` definitions, with built-in sorting, pagination, row selection and expandable rows. Rows are your own plain objects; each column reads one of their properties and may render its header, cells and footer through render functions. */
49
64
  export declare const CDataTable: import("@lit/react").ReactWebComponent<CDataTableElement, {
50
65
  onChangeExpanded: EventName<CDataTableElementEventMap["change:expanded"]>;
51
66
  onChangePage: EventName<CDataTableElementEventMap["change:page"]>;
@@ -53,25 +68,52 @@ export declare const CDataTable: import("@lit/react").ReactWebComponent<CDataTab
53
68
  onChangeSelected: EventName<CDataTableElementEventMap["change:selected"]>;
54
69
  onChangeSort: EventName<CDataTableElementEventMap["change:sort"]>;
55
70
  }>;
71
+ /** A date field that takes a typed date, or opens a calendar panel for picking one, or a start and end date under `range`. */
72
+ export declare const CDatePicker: import("@lit/react").ReactWebComponent<CDatePickerElement, {
73
+ onChange: EventName<CDatePickerElementEventMap["change"]>;
74
+ onChangeMonth: EventName<CDatePickerElementEventMap["change:month"]>;
75
+ onChangeText: EventName<CDatePickerElementEventMap["change:text"]>;
76
+ onInput: EventName<CDatePickerElementEventMap["input"]>;
77
+ onUpdateValue: EventName<CDatePickerElementEventMap["update:value"]>;
78
+ }>;
79
+ /** A separator: a thin line dividing groups of content, horizontal by default or vertical with `vertical`. */
56
80
  export declare const CDivider: import("@lit/react").ReactWebComponent<CDividerElement, {}>;
81
+ /** A field the user adds files to by dropping them on it or choosing them from a file dialog — and, given an upload function, the place each file's upload shows its progress. */
82
+ export declare const CFileUpload: import("@lit/react").ReactWebComponent<CFileUploadElement, {
83
+ onChange: EventName<CFileUploadElementEventMap["change"]>;
84
+ onInput: EventName<CFileUploadElementEventMap["input"]>;
85
+ onReject: EventName<CFileUploadElementEventMap["reject"]>;
86
+ onUpdateValue: EventName<CFileUploadElementEventMap["update:value"]>;
87
+ }>;
88
+ /** An icon drawn from a single SVG path, sized in pixels and filled with the colour of the surrounding text unless given one of its own. */
57
89
  export declare const CIcon: import("@lit/react").ReactWebComponent<CIconElement, {}>;
90
+ /** An icon-only button: a round native button that shows a single icon and takes its accessible name from an `aria-label` on the element. */
58
91
  export declare const CIconButton: import("@lit/react").ReactWebComponent<CIconButtonElement, {}>;
59
- export declare const CInput: import("@lit/react").ReactWebComponent<CInputElement, {}>;
60
- /** Basic hyperlink component */
92
+ /** A text link to another page or resource: a native `<a>` in the link colour, with an optional underline. */
61
93
  export declare const CLink: import("@lit/react").ReactWebComponent<CLinkElement, {}>;
94
+ /** A vertical list of rows, each a `c-list-item` with its main content and optional leading and trailing content, for settings entries, related pages or a short set of records. */
62
95
  export declare const CList: import("@lit/react").ReactWebComponent<CListElement, {}>;
96
+ /** One row of a `c-list`: its main content goes in the default slot, leading content such as an icon in the `pre` slot and trailing content in the `post` slot. The row is static unless it has an `href`, which makes it a real link; `ripple` adds a press effect and a Tab stop that Enter and Space press, firing `click`; give navigation an `href`. */
63
97
  export declare const CListItem: import("@lit/react").ReactWebComponent<CListItemElement, {}>;
98
+ /** The main text of a `c-list-item`, in medium-weight type; place it in the item's default slot. It takes the active row's ink by itself when its item is `active`. */
64
99
  export declare const CListItemTitle: import("@lit/react").ReactWebComponent<CListItemTitleElement, {}>;
65
- /** A loader component that fills the nearest containing element that has css-property position set to 'relative' */
100
+ /** A loading overlay that covers a container with a translucent scrim and a centred spinner, with an optional message below it, while that container's content loads. */
66
101
  export declare const CLoader: import("@lit/react").ReactWebComponent<CLoaderElement, {}>;
102
+ /** One identity-provider choice inside `c-login-buttons`: a card with the provider's logo (`src`, or markup in the `image` slot) above the provider's name. With an `href` it is a link to the provider's sign-in; without one it is a button whose `click` you handle. Leave `alt` empty when the name already identifies the provider. */
67
103
  export declare const CLoginButton: import("@lit/react").ReactWebComponent<CLoginButtonElement, {}>;
104
+ /** A grid of sign-in choices, one `c-login-button` per identity provider, each showing the provider's logo above its name. */
68
105
  export declare const CLoginButtons: import("@lit/react").ReactWebComponent<CLoginButtonsElement, {}>;
106
+ /** The card of a sign-in page: a large surface holding the service's heading, the sign-in form or choices and their actions, with an optional background image showing below a curved edge. */
69
107
  export declare const CLoginCard: import("@lit/react").ReactWebComponent<CLoginCardElement, {}>;
108
+ /** The row of actions at the bottom of a `c-login-card`: the sign-in button and any link beside it, such as a forgotten-password link. `justify` distributes them along the row (`start` by default, `space-between` to push the last one to the far end, `stretch` to grow them all) and `align` places them across it. */
70
109
  export declare const CLoginCardActions: import("@lit/react").ReactWebComponent<CLoginCardActionsElement, {}>;
110
+ /** The body of a `c-login-card`, which stacks the intro text and the sign-in fields in a column with a 24px gap. Place it between `c-login-card-title` and `c-login-card-actions`. */
71
111
  export declare const CLoginCardContent: import("@lit/react").ReactWebComponent<CLoginCardContentElement, {}>;
112
+ /** The heading of a `c-login-card`, in large bold type in the primary colour; place it first in the card. The card shrinks it from 40px to 32px in its compact layout. */
72
113
  export declare const CLoginCardTitle: import("@lit/react").ReactWebComponent<CLoginCardTitleElement, {}>;
73
- /** Wrapper component for the whole page */
114
+ /** 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. */
74
115
  export declare const CMain: import("@lit/react").ReactWebComponent<CMainElement, {}>;
116
+ /** 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. */
75
117
  export declare const CMenu: import("@lit/react").ReactWebComponent<CMenuElement, {
76
118
  onChangeOpen: EventName<CMenuElementEventMap["change:open"]>;
77
119
  onSelect: EventName<CMenuElementEventMap["select"]>;
@@ -80,25 +122,38 @@ export declare const CMenu: import("@lit/react").ReactWebComponent<CMenuElement,
80
122
  export declare const CMenuItem: import("@lit/react").ReactWebComponent<CMenuItemElement, {}>;
81
123
  /** Section label for a group of `c-menu-item`s. */
82
124
  export declare const CMenuLabel: import("@lit/react").ReactWebComponent<CMenuLabelElement, {}>;
125
+ /** A single line of text under a form control: a neutral hint, or an error message that takes its place while the control is invalid. */
83
126
  export declare const CMessage: import("@lit/react").ReactWebComponent<CMessageElement, {}>;
84
127
  /** 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`. */
85
128
  export declare const CModal: import("@lit/react").ReactWebComponent<CModalElement, {
86
- onChangeValue: EventName<CModalElementEventMap["changeValue"]>;
129
+ onChange: EventName<CModalElementEventMap["change"]>;
87
130
  onInput: EventName<CModalElementEventMap["input"]>;
88
131
  onUpdateValue: EventName<CModalElementEventMap["update:value"]>;
89
132
  }>;
133
+ /** The hamburger menu button that opens and closes the mobile drawer of a `c-side-navigation`. */
90
134
  export declare const CNavigationButton: import("@lit/react").ReactWebComponent<CNavigationButtonElement, {}>;
135
+ /** A field for a number — an integer, or one with decimals — shown with thousands separators as it is typed. */
136
+ export declare const CNumberField: import("@lit/react").ReactWebComponent<CNumberFieldElement, {
137
+ onChange: EventName<CNumberFieldElementEventMap["change"]>;
138
+ onInput: EventName<CNumberFieldElementEventMap["input"]>;
139
+ onUpdateValue: EventName<CNumberFieldElementEventMap["update:value"]>;
140
+ }>;
141
+ /** One option of a `c-select` or `c-autocomplete`: `value` is what the field reports when the option is picked, and the option's label is its `name`, else the text of a `c-option-value` inside it, else its whole text. `disabled` keeps it from being picked, and `selected` sets the field's initial value once, silently, while that value is empty — with a bound `v-model`, initialise the model instead. */
91
142
  export declare const COption: import("@lit/react").ReactWebComponent<COptionElement, {}>;
143
+ /** 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)`). */
92
144
  export declare const COptionValue: import("@lit/react").ReactWebComponent<COptionValueElement, {}>;
93
- export declare const COtpInput: import("@lit/react").ReactWebComponent<COtpInputElement, {
94
- onChangeValue: EventName<COtpInputElementEventMap["changeValue"]>;
145
+ /** A one-time-code field: a row of single-digit boxes, filled in order as the user types or pastes a code, under a group label and above a hint or error message. */
146
+ export declare const COtpInput: import("@lit/react").ReactWebComponent<Omit<COtpInputElement, "autofocus"> & HTMLElement, {
147
+ onChange: EventName<COtpInputElementEventMap["change"]>;
95
148
  onCompletion: EventName<COtpInputElementEventMap["completion"]>;
96
149
  onInput: EventName<COtpInputElementEventMap["input"]>;
97
150
  onUpdateValue: EventName<COtpInputElementEventMap["update:value"]>;
98
151
  }>;
152
+ /** The routed-content region of the dashboard layout: inside `c-main` it fills the area beside the side navigation and below the toolbar, pads the current view's content and keeps an optional footer at its bottom edge. */
99
153
  export declare const CPage: import("@lit/react").ReactWebComponent<CPageElement, {}>;
154
+ /** A page navigation bar for a list split into pages: previous and next buttons around a window of page buttons, with a page-size menu and the range of items shown. */
100
155
  export declare const CPagination: import("@lit/react").ReactWebComponent<CPaginationElement, {
101
- onChangeValue: EventName<CPaginationElementEventMap["changeValue"]>;
156
+ onChange: EventName<CPaginationElementEventMap["change"]>;
102
157
  onInput: EventName<CPaginationElementEventMap["input"]>;
103
158
  onUpdateValue: EventName<CPaginationElementEventMap["update:value"]>;
104
159
  }>;
@@ -111,82 +166,102 @@ export declare const CProgressBar: import("@lit/react").ReactWebComponent<CProgr
111
166
  /** A circular progress indicator that draws a known completion percentage as an arc around a track — the circular counterpart of `c-progress-bar`. */
112
167
  export declare const CProgressCircle: import("@lit/react").ReactWebComponent<CProgressCircleElement, {}>;
113
168
  /** 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
- }>;
169
+ export declare const CRadio: import("@lit/react").ReactWebComponent<CRadioElement, {}>;
117
170
  /** 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. */
118
171
  export declare const CRadioGroup: import("@lit/react").ReactWebComponent<CRadioGroupElement, {
119
- onChangeValue: EventName<CRadioGroupElementEventMap["changeValue"]>;
172
+ onChange: EventName<CRadioGroupElementEventMap["change"]>;
120
173
  onInput: EventName<CRadioGroupElementEventMap["input"]>;
121
174
  onUpdateValue: EventName<CRadioGroupElementEventMap["update:value"]>;
122
175
  }>;
176
+ /** 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`. */
123
177
  export declare const CSelect: import("@lit/react").ReactWebComponent<CSelectElement, {
124
- onChangeValue: EventName<CSelectElementEventMap["changeValue"]>;
178
+ onChange: EventName<CSelectElementEventMap["change"]>;
125
179
  onInput: EventName<CSelectElementEventMap["input"]>;
126
180
  onUpdateValue: EventName<CSelectElementEventMap["update:value"]>;
127
181
  }>;
182
+ /** 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. */
128
183
  export declare const CSideNavigation: import("@lit/react").ReactWebComponent<CSideNavigationElement, {
129
- onChangeMenuVisible: EventName<CSideNavigationElementEventMap["change:menu-visible"]>;
184
+ onChangeOpen: EventName<CSideNavigationElementEventMap["change:open"]>;
130
185
  }>;
186
+ /** One entry of a `c-side-navigation`: its label text, after an optional leading `c-icon`, goes in the default slot, and activating it fires `select` with its `value`; with `href` it is a real link, opened in `target`, and without one a button. Write `c-sub-navigation-item` children inside it to make it an expandable parent, whose `active` then means expanded rather than the current page. */
131
187
  export declare const CSideNavigationItem: import("@lit/react").ReactWebComponent<CSideNavigationItemElement, {
132
- onItemChange: EventName<CSideNavigationItemElementEventMap["itemChange"]>;
188
+ onSelect: EventName<CSideNavigationItemElementEventMap["select"]>;
133
189
  }>;
190
+ /** A section title in a `c-side-navigation`: uppercase text over a divider line, placed before the items it groups. It is a heading (level 2), so screen-reader users can jump between sections, and cannot be activated. */
134
191
  export declare const CSideNavigationTitle: import("@lit/react").ReactWebComponent<CSideNavigationTitleElement, {}>;
192
+ /** A slider for picking a number from a range by dragging a thumb along a track, with a label, a value bubble and optional tick marks. */
135
193
  export declare const CSlider: import("@lit/react").ReactWebComponent<CSliderElement, {
136
- onChangeValue: EventName<CSliderElementEventMap["changeValue"]>;
194
+ onChange: EventName<CSliderElementEventMap["change"]>;
137
195
  onInput: EventName<CSliderElementEventMap["input"]>;
138
196
  onUpdateValue: EventName<CSliderElementEventMap["update:value"]>;
139
197
  }>;
140
198
  /** A circular indeterminate activity indicator — pure motion with no value, for waits of unknown duration. */
141
199
  export declare const CSpinner: import("@lit/react").ReactWebComponent<CSpinnerElement, {}>;
200
+ /** A status pill: a short word naming the state of a record, such as Active, Pending or Failed, tinted with the colours of its status type. */
142
201
  export declare const CStatus: import("@lit/react").ReactWebComponent<CStatusElement, {}>;
202
+ /** One step of a `c-steps` indicator: its label goes in the default slot, under a dot that is ringed for the current step and becomes a check mark once the step is complete. A step has no props of its own — its state follows the parent's `value`. */
143
203
  export declare const CStep: import("@lit/react").ReactWebComponent<CStepElement, {}>;
204
+ /** A step indicator for a multi-step flow: a row of `c-step` dots joined by lines, with the steps before the current one checked off and the current one ringed. */
144
205
  export declare const CSteps: import("@lit/react").ReactWebComponent<CStepsElement, {}>;
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. */
206
+ /** A second-level entry of a `c-side-navigation`, written inside the `c-side-navigation-item` it belongs to (no `slot` attribute needed) and shown while that parent is `active`. Activating it fires `select` with its `value` and closes the mobile drawer. It does not mark itself as the current page: set `active` on the sub-item of the page shown, and on its parent so the parent is expanded. */
207
+ export declare const CSubNavigationItem: import("@lit/react").ReactWebComponent<CSubNavigationItemElement, {
208
+ onSelect: EventName<CSubNavigationItemElementEventMap["select"]>;
209
+ }>;
210
+ /** A toggle for a binary setting that takes effect immediately: a native switch control with a label. */
147
211
  export declare const CSwitch: import("@lit/react").ReactWebComponent<CSwitchElement, {
148
212
  onChange: EventName<CSwitchElementEventMap["change"]>;
149
- onChangeValue: EventName<CSwitchElementEventMap["changeValue"]>;
150
213
  onInput: EventName<CSwitchElementEventMap["input"]>;
151
214
  onUpdateValue: EventName<CSwitchElementEventMap["update:value"]>;
152
215
  }>;
153
- export declare const CTab: import("@lit/react").ReactWebComponent<CTabElement, {
154
- onTabChange: EventName<CTabElementEventMap["tabChange"]>;
155
- onTabFocus: EventName<CTabElementEventMap["tabFocus"]>;
156
- }>;
216
+ /** One tab in the row of a `c-tabs`: its label goes in the default slot (a `c-badge` there sits on the tab's corner), and its `value` names the `c-tab-item` panel it shows. `c-tabs` decides which tab is active; `disabled` keeps a tab from being selected. */
217
+ export declare const CTab: import("@lit/react").ReactWebComponent<CTabElement, {}>;
157
218
  /** 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. */
158
- export declare const CTabButtons: import("@lit/react").ReactWebComponent<CTabButtonsElement, {
159
- onTabChange: EventName<CTabButtonsElementEventMap["tabChange"]>;
160
- }>;
161
- export declare const CTabItem: import("@lit/react").ReactWebComponent<CTabItemElement, {
162
- onContentChange: EventName<CTabItemElementEventMap["contentChange"]>;
163
- }>;
219
+ export declare const CTabButtons: import("@lit/react").ReactWebComponent<CTabButtonsElement, {}>;
220
+ /** One tab panel inside `c-tab-items`, shown while its `value` equals the `value` of `c-tabs` — give it the same `value` as its `c-tab`. Inactive panels stay in the DOM, hidden, so their content keeps its state across tab switches. */
221
+ export declare const CTabItem: import("@lit/react").ReactWebComponent<CTabItemElement, {}>;
222
+ /** The panel container of a `c-tabs`: slot it in with `slot="items"` and put the `c-tab-item` panels inside it. It shows the panel whose `value` matches the tabs' value and slides between panels; it has no props of its own, as `c-tabs` drives it. */
164
223
  export declare const CTabItems: import("@lit/react").ReactWebComponent<CTabItemsElement, {}>;
165
224
  /** 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. */
166
225
  export declare const CTable: import("@lit/react").ReactWebComponent<CTableElement, {}>;
226
+ /** A tab set that switches between panels of related content: a row of `c-tab` headers above the `c-tab-item` panels, one panel shown at a time. */
167
227
  export declare const CTabs: import("@lit/react").ReactWebComponent<CTabsElement, {
168
- onChangeValue: EventName<CTabsElementEventMap["changeValue"]>;
228
+ onChange: EventName<CTabsElementEventMap["change"]>;
169
229
  onInput: EventName<CTabsElementEventMap["input"]>;
170
230
  onUpdateValue: EventName<CTabsElementEventMap["update:value"]>;
171
231
  }>;
232
+ /** A pill-shaped tag naming one item — a keyword, a category, an applied filter — authored inside `c-tags`, or on its own where a single tag is needed, such as a status in a table cell. With `closeable` it shows a close button that fires `close` and leaves removing the tag to you; name that button with `close-label`, for example "Remove Chemistry". */
172
233
  export declare const CTag: import("@lit/react").ReactWebComponent<CTagElement, {
173
234
  onClose: EventName<CTagElementEventMap["close"]>;
174
235
  }>;
236
+ /** A group of `c-tag` elements laid out in a wrapping row, with an optional group label above them. */
175
237
  export declare const CTags: import("@lit/react").ReactWebComponent<CTagsElement, {}>;
238
+ /** A text field for a single line of text, or several lines under `rows`, with a label, a hint and an error message. */
176
239
  export declare const CTextField: import("@lit/react").ReactWebComponent<Omit<CTextFieldElement, "autocorrect"> & HTMLElement, {
177
240
  onChange: EventName<CTextFieldElementEventMap["change"]>;
178
- onChangeValue: EventName<CTextFieldElementEventMap["changeValue"]>;
179
241
  onInput: EventName<CTextFieldElementEventMap["input"]>;
180
242
  onUpdateValue: EventName<CTextFieldElementEventMap["update:value"]>;
181
243
  }>;
182
- /** A single toast notification, rendered and managed by c-toasts */
183
- export declare const CToast: import("@lit/react").ReactWebComponent<CToastElement, {
184
- onClose: EventName<CToastElementEventMap["close"]>;
244
+ /** 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`. */
245
+ export declare const CTimePicker: import("@lit/react").ReactWebComponent<CTimePickerElement, {
246
+ onChange: EventName<CTimePickerElementEventMap["change"]>;
247
+ onChangeText: EventName<CTimePickerElementEventMap["change:text"]>;
248
+ onInput: EventName<CTimePickerElementEventMap["input"]>;
249
+ onUpdateValue: EventName<CTimePickerElementEventMap["update:value"]>;
250
+ }>;
251
+ /** Toasts are passive, transient notifications — operation results, background progress — stacked and managed by a single `c-toasts` container via its `addToast` / `removeToast` methods. `addToast` returns the message's `id` (its own, or a generated one), which `removeToast` takes; `close` fires on the container with the message once a toast has left. */
252
+ export declare const CToasts: import("@lit/react").ReactWebComponent<CToastsElement, {
253
+ onClose: EventName<CToastsElementEventMap["close"]>;
185
254
  }>;
186
- /** Toasts are passive, transient notifications — operation results, background progress — stacked and managed by a single `c-toasts` container via its `addToast` / `removeToast` methods. */
187
- export declare const CToasts: import("@lit/react").ReactWebComponent<CToastsElement, {}>;
255
+ /** 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. */
188
256
  export declare const CToolbar: import("@lit/react").ReactWebComponent<CToolbarElement, {}>;
189
257
  /** 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
258
  export declare const CTooltip: import("@lit/react").ReactWebComponent<CTooltipElement, {
191
259
  onChangeOpen: EventName<CTooltipElementEventMap["change:open"]>;
192
260
  }>;
261
+ /** 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. */
262
+ export declare const CTreeSelect: import("@lit/react").ReactWebComponent<CTreeSelectElement, {
263
+ onChange: EventName<CTreeSelectElementEventMap["change"]>;
264
+ onChangeQuery: EventName<CTreeSelectElementEventMap["change:query"]>;
265
+ onInput: EventName<CTreeSelectElementEventMap["input"]>;
266
+ onUpdateValue: EventName<CTreeSelectElementEventMap["update:value"]>;
267
+ }>;
@@ -12,42 +12,51 @@ if (typeof customElements !== 'undefined') {
12
12
  defineCustomElements();
13
13
  }
14
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.
15
+ * A stand-in element class, typed as the generated element interface.
16
+ * `createComponent` sets a React prop as a DOM property only when the
17
+ * class's prototype names it; anything else goes to React, which writes an
18
+ * attribute while the element is still unconnected. Vue defines a custom
19
+ * element's props on the instance when it connects, so the registered class's
20
+ * prototype names none of them, and objects, arrays and functions arrived as
21
+ * `[object Object]` attributes. The prototype lists the tag's properties
22
+ * instead. On the server (no custom element registry) it lists none, so every
23
+ * prop renders as an attribute, which hydration then corrects.
19
24
  */
20
- const elementClass = (tag) => (typeof customElements !== 'undefined'
21
- ? customElements.get(tag)
22
- : class {
23
- });
25
+ const elementClass = (properties) => {
26
+ const stand = class {
27
+ };
28
+ if (typeof customElements !== 'undefined') {
29
+ for (const name of properties) {
30
+ Object.defineProperty(stand.prototype, name, { value: undefined });
31
+ }
32
+ }
33
+ return stand;
34
+ };
35
+ /** A stack of collapsible sections, each a `c-accordion-item` whose header button shows or hides the content beneath it. */
24
36
  export const CAccordion = createComponent({
25
37
  displayName: 'CAccordion',
26
- elementClass: elementClass('c-accordion'),
38
+ elementClass: elementClass(['mandatory', 'multiple', 'outlined', 'value']),
27
39
  events: {
28
40
  onChange: 'change',
29
- onChangeValue: 'changeValue',
30
41
  onInput: 'input',
31
42
  onUpdateValue: 'update:value',
32
43
  },
33
44
  react: React,
34
45
  tagName: 'c-accordion',
35
46
  });
47
+ /** One collapsible section of a `c-accordion`: a header button showing its `heading` (or the `heading` slot) and an optional icon, above the content in the default slot. Place it directly inside the accordion and give it a `value`: the accordion expands items by value and leaves an item without one collapsed. */
36
48
  export const CAccordionItem = createComponent({
37
49
  displayName: 'CAccordionItem',
38
- elementClass: elementClass('c-accordion-item'),
39
- events: {
40
- onItemChange: 'item-change',
41
- },
50
+ elementClass: elementClass(['heading', 'value']),
42
51
  react: React,
43
52
  tagName: 'c-accordion-item',
44
53
  });
45
54
  /** 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. */
46
55
  export const CAlert = createComponent({
47
56
  displayName: 'CAlert',
48
- elementClass: elementClass('c-alert'),
57
+ elementClass: elementClass(['closeable', 'heading', 'type']),
49
58
  events: {
50
- onDismiss: 'dismiss',
59
+ onClose: 'close',
51
60
  },
52
61
  react: React,
53
62
  tagName: 'c-alert',
@@ -55,34 +64,48 @@ export const CAlert = createComponent({
55
64
  /** A filterable value-selection component: a readonly value field that opens a popover panel with a search input above the matching options. */
56
65
  export const CAutocomplete = createComponent({
57
66
  displayName: 'CAutocomplete',
58
- elementClass: elementClass('c-autocomplete'),
67
+ elementClass: elementClass(['clearable', 'disabled', 'errorMessage', 'external', 'filter', 'hideDetails', 'hint', 'invalid', 'items', 'itemsPerPage', 'label', 'labelOnTop', 'loading', 'maxTags', 'multiple', 'name', 'placeholder', 'required', 'returnObject', 'selectAll', 'shadow', 'size', 'texts', 'value']),
59
68
  events: {
60
69
  onChange: 'change',
61
70
  onChangeQuery: 'change:query',
62
- onChangeValue: 'changeValue',
63
71
  onInput: 'input',
64
72
  onUpdateValue: 'update:value',
65
73
  },
66
74
  react: React,
67
75
  tagName: 'c-autocomplete',
68
76
  });
77
+ /** A small pill that pins a short count or label to the top-right corner of the element it sits in, such as the number of unread messages on a button. */
69
78
  export const CBadge = createComponent({
70
79
  displayName: 'CBadge',
71
- elementClass: elementClass('c-badge'),
80
+ elementClass: elementClass([]),
72
81
  react: React,
73
82
  tagName: 'c-badge',
74
83
  });
84
+ /** 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. */
85
+ export const CBreadcrumb = createComponent({
86
+ displayName: 'CBreadcrumb',
87
+ elementClass: elementClass(['texts']),
88
+ react: React,
89
+ tagName: 'c-breadcrumb',
90
+ });
91
+ /** One crumb in a `c-breadcrumb`: a link to a level of the hierarchy, or, as the last crumb, the current page. */
92
+ export const CBreadcrumbItem = createComponent({
93
+ displayName: 'CBreadcrumbItem',
94
+ elementClass: elementClass(['href', 'target']),
95
+ react: React,
96
+ tagName: 'c-breadcrumb-item',
97
+ });
75
98
  /** 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. */
76
99
  export const CButton = createComponent({
77
100
  displayName: 'CButton',
78
- elementClass: elementClass('c-button'),
101
+ elementClass: elementClass(['active', 'danger', 'disabled', 'fit', 'ghost', 'href', 'inverted', 'loading', 'noRadius', 'outlined', 'size', 'target', 'text', 'type', 'value']),
79
102
  react: React,
80
103
  tagName: 'c-button',
81
104
  });
82
105
  /** 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. */
83
106
  export const CButtonGroup = createComponent({
84
107
  displayName: 'CButtonGroup',
85
- elementClass: elementClass('c-button-group'),
108
+ elementClass: elementClass(['disabled', 'label', 'mandatory', 'multiple', 'required', 'size', 'value']),
86
109
  events: {
87
110
  onChange: 'change',
88
111
  onInput: 'input',
@@ -91,52 +114,70 @@ export const CButtonGroup = createComponent({
91
114
  react: React,
92
115
  tagName: 'c-button-group',
93
116
  });
117
+ /** A raised, bordered surface that groups one piece of content — its heading, body and actions — into a single box on the page. */
94
118
  export const CCard = createComponent({
95
119
  displayName: 'CCard',
96
- elementClass: elementClass('c-card'),
120
+ elementClass: elementClass(['fullscreen']),
97
121
  react: React,
98
122
  tagName: 'c-card',
99
123
  });
124
+ /** The row of actions at the bottom of a `c-card`, typically `c-button`s, which wraps onto further rows instead of overflowing the card. `justify` distributes the actions along the row (`start` by default, `stretch` to grow them all) and `align` places them across it. */
100
125
  export const CCardActions = createComponent({
101
126
  displayName: 'CCardActions',
102
- elementClass: elementClass('c-card-actions'),
127
+ elementClass: elementClass(['align', 'justify']),
103
128
  react: React,
104
129
  tagName: 'c-card-actions',
105
130
  });
131
+ /** The body section of a `c-card`: it pads its content in from the card's edges and stacks the children in a column with the card's section spacing. Place it after `c-card-title` and before `c-card-actions`. */
106
132
  export const CCardContent = createComponent({
107
133
  displayName: 'CCardContent',
108
- elementClass: elementClass('c-card-content'),
134
+ elementClass: elementClass([]),
109
135
  react: React,
110
136
  tagName: 'c-card-content',
111
137
  });
138
+ /** The heading section of a `c-card`, set in small uppercase type above a primary accent bar; place it first in the card. Controls in its `actions` slot sit at the right of the heading and move onto their own line under it when the two do not fit side by side. */
112
139
  export const CCardTitle = createComponent({
113
140
  displayName: 'CCardTitle',
114
- elementClass: elementClass('c-card-title'),
141
+ elementClass: elementClass(['headingLevel']),
115
142
  react: React,
116
143
  tagName: 'c-card-title',
117
144
  });
118
145
  /** A form control for a single on/off choice: a native checkbox with a label, an optional hint, and validation messaging. */
119
146
  export const CCheckbox = createComponent({
120
147
  displayName: 'CCheckbox',
121
- elementClass: elementClass('c-checkbox'),
148
+ elementClass: elementClass(['checked', 'disabled', 'errorMessage', 'falseValue', 'hideDetails', 'hint', 'indeterminate', 'invalid', 'label', 'name', 'required', 'trueValue', 'value']),
122
149
  events: {
123
150
  onChange: 'change',
124
- onChangeValue: 'changeValue',
125
151
  onInput: 'input',
126
152
  onUpdateValue: 'update:value',
127
153
  },
128
154
  react: React,
129
155
  tagName: 'c-checkbox',
130
156
  });
157
+ /** A colour field that takes any typed CSS colour, or opens a panel for picking one: a colour area, hue and alpha sliders, per-channel inputs and swatches — or swatches alone under `swatches-only`. */
158
+ export const CColorPicker = createComponent({
159
+ displayName: 'CColorPicker',
160
+ elementClass: elementClass(['alpha', 'clearable', 'disabled', 'errorMessage', 'format', 'hideDetails', 'hint', 'invalid', 'label', 'labelOnTop', 'name', 'placeholder', 'required', 'shadow', 'size', 'swatches', 'swatchesOnly', 'texts', 'value']),
161
+ events: {
162
+ onChange: 'change',
163
+ onChangeText: 'change:text',
164
+ onInput: 'input',
165
+ onUpdateValue: 'update:value',
166
+ },
167
+ react: React,
168
+ tagName: 'c-color-picker',
169
+ });
170
+ /** The CSC logo without its tagline, drawn as an inline SVG in the colours of the current theme mode. */
131
171
  export const CCscLogo = createComponent({
132
172
  displayName: 'CCscLogo',
133
- elementClass: elementClass('c-csc-logo'),
173
+ elementClass: elementClass(['width']),
134
174
  react: React,
135
175
  tagName: 'c-csc-logo',
136
176
  });
177
+ /** A data-driven table that renders the rows of a `data` array through a set of `columns` definitions, with built-in sorting, pagination, row selection and expandable rows. Rows are your own plain objects; each column reads one of their properties and may render its header, cells and footer through render functions. */
137
178
  export const CDataTable = createComponent({
138
179
  displayName: 'CDataTable',
139
- elementClass: elementClass('c-data-table'),
180
+ elementClass: elementClass(['autohide', 'columns', 'data', 'expanded', 'expandedContent', 'external', 'getRowId', 'itemCount', 'loading', 'page', 'pageSize', 'pageSizes', 'query', 'selected', 'selection', 'singleExpansion', 'sort', 'stickyFooter', 'stickyHeader', 'texts']),
140
181
  events: {
141
182
  onChangeExpanded: 'change:expanded',
142
183
  onChangePage: 'change:page',
@@ -147,108 +188,142 @@ export const CDataTable = createComponent({
147
188
  react: React,
148
189
  tagName: 'c-data-table',
149
190
  });
191
+ /** A date field that takes a typed date, or opens a calendar panel for picking one, or a start and end date under `range`. */
192
+ export const CDatePicker = createComponent({
193
+ displayName: 'CDatePicker',
194
+ elementClass: elementClass(['clearable', 'disabled', 'disabledDates', 'errorMessage', 'firstDayOfWeek', 'format', 'hideDetails', 'hint', 'invalid', 'isDateDisabled', 'label', 'labelOnTop', 'max', 'min', 'name', 'placeholder', 'range', 'required', 'shadow', 'showToday', 'showWeekNumbers', 'size', 'texts', 'type', 'value']),
195
+ events: {
196
+ onChange: 'change',
197
+ onChangeMonth: 'change:month',
198
+ onChangeText: 'change:text',
199
+ onInput: 'input',
200
+ onUpdateValue: 'update:value',
201
+ },
202
+ react: React,
203
+ tagName: 'c-date-picker',
204
+ });
205
+ /** A separator: a thin line dividing groups of content, horizontal by default or vertical with `vertical`. */
150
206
  export const CDivider = createComponent({
151
207
  displayName: 'CDivider',
152
- elementClass: elementClass('c-divider'),
208
+ elementClass: elementClass(['vertical']),
153
209
  react: React,
154
210
  tagName: 'c-divider',
155
211
  });
212
+ /** A field the user adds files to by dropping them on it or choosing them from a file dialog — and, given an upload function, the place each file's upload shows its progress. */
213
+ export const CFileUpload = createComponent({
214
+ displayName: 'CFileUpload',
215
+ elementClass: elementClass(['accept', 'compact', 'disabled', 'errorMessage', 'hideDetails', 'hint', 'invalid', 'label', 'manual', 'maxFiles', 'maxSize', 'multiple', 'required', 'size', 'texts', 'upload', 'value']),
216
+ events: {
217
+ onChange: 'change',
218
+ onInput: 'input',
219
+ onReject: 'reject',
220
+ onUpdateValue: 'update:value',
221
+ },
222
+ react: React,
223
+ tagName: 'c-file-upload',
224
+ });
225
+ /** An icon drawn from a single SVG path, sized in pixels and filled with the colour of the surrounding text unless given one of its own. */
156
226
  export const CIcon = createComponent({
157
227
  displayName: 'CIcon',
158
- elementClass: elementClass('c-icon'),
228
+ elementClass: elementClass(['color', 'path', 'size']),
159
229
  react: React,
160
230
  tagName: 'c-icon',
161
231
  });
232
+ /** An icon-only button: a round native button that shows a single icon and takes its accessible name from an `aria-label` on the element. */
162
233
  export const CIconButton = createComponent({
163
234
  displayName: 'CIconButton',
164
- elementClass: elementClass('c-icon-button'),
235
+ elementClass: elementClass(['badge', 'danger', 'disabled', 'ghost', 'inverted', 'loading', 'outlined', 'path', 'size', 'text']),
165
236
  react: React,
166
237
  tagName: 'c-icon-button',
167
238
  });
168
- export const CInput = createComponent({
169
- displayName: 'CInput',
170
- elementClass: elementClass('c-input'),
171
- react: React,
172
- tagName: 'c-input',
173
- });
174
- /** Basic hyperlink component */
239
+ /** A text link to another page or resource: a native `<a>` in the link colour, with an optional underline. */
175
240
  export const CLink = createComponent({
176
241
  displayName: 'CLink',
177
- elementClass: elementClass('c-link'),
242
+ elementClass: elementClass(['href', 'target', 'underline']),
178
243
  react: React,
179
244
  tagName: 'c-link',
180
245
  });
246
+ /** A vertical list of rows, each a `c-list-item` with its main content and optional leading and trailing content, for settings entries, related pages or a short set of records. */
181
247
  export const CList = createComponent({
182
248
  displayName: 'CList',
183
- elementClass: elementClass('c-list'),
249
+ elementClass: elementClass(['bordered', 'disabled']),
184
250
  react: React,
185
251
  tagName: 'c-list',
186
252
  });
253
+ /** One row of a `c-list`: its main content goes in the default slot, leading content such as an icon in the `pre` slot and trailing content in the `post` slot. The row is static unless it has an `href`, which makes it a real link; `ripple` adds a press effect and a Tab stop that Enter and Space press, firing `click`; give navigation an `href`. */
187
254
  export const CListItem = createComponent({
188
255
  displayName: 'CListItem',
189
- elementClass: elementClass('c-list-item'),
256
+ elementClass: elementClass(['active', 'disabled', 'hoverable', 'href', 'ripple', 'target']),
190
257
  react: React,
191
258
  tagName: 'c-list-item',
192
259
  });
260
+ /** The main text of a `c-list-item`, in medium-weight type; place it in the item's default slot. It takes the active row's ink by itself when its item is `active`. */
193
261
  export const CListItemTitle = createComponent({
194
262
  displayName: 'CListItemTitle',
195
- elementClass: elementClass('c-list-item-title'),
263
+ elementClass: elementClass([]),
196
264
  react: React,
197
265
  tagName: 'c-list-item-title',
198
266
  });
199
- /** A loader component that fills the nearest containing element that has css-property position set to 'relative' */
267
+ /** A loading overlay that covers a container with a translucent scrim and a centred spinner, with an optional message below it, while that container's content loads. */
200
268
  export const CLoader = createComponent({
201
269
  displayName: 'CLoader',
202
- elementClass: elementClass('c-loader'),
270
+ elementClass: elementClass(['contentDelay', 'hide', 'size', 'width']),
203
271
  react: React,
204
272
  tagName: 'c-loader',
205
273
  });
274
+ /** One identity-provider choice inside `c-login-buttons`: a card with the provider's logo (`src`, or markup in the `image` slot) above the provider's name. With an `href` it is a link to the provider's sign-in; without one it is a button whose `click` you handle. Leave `alt` empty when the name already identifies the provider. */
206
275
  export const CLoginButton = createComponent({
207
276
  displayName: 'CLoginButton',
208
- elementClass: elementClass('c-login-button'),
277
+ elementClass: elementClass(['alt', 'href', 'src']),
209
278
  react: React,
210
279
  tagName: 'c-login-button',
211
280
  });
281
+ /** A grid of sign-in choices, one `c-login-button` per identity provider, each showing the provider's logo above its name. */
212
282
  export const CLoginButtons = createComponent({
213
283
  displayName: 'CLoginButtons',
214
- elementClass: elementClass('c-login-buttons'),
284
+ elementClass: elementClass([]),
215
285
  react: React,
216
286
  tagName: 'c-login-buttons',
217
287
  });
288
+ /** The card of a sign-in page: a large surface holding the service's heading, the sign-in form or choices and their actions, with an optional background image showing below a curved edge. */
218
289
  export const CLoginCard = createComponent({
219
290
  displayName: 'CLoginCard',
220
- elementClass: elementClass('c-login-card'),
291
+ elementClass: elementClass(['backgroundPosition', 'mobileBreakpoint', 'overlay', 'overlayBlendMode', 'src']),
221
292
  react: React,
222
293
  tagName: 'c-login-card',
223
294
  });
295
+ /** The row of actions at the bottom of a `c-login-card`: the sign-in button and any link beside it, such as a forgotten-password link. `justify` distributes them along the row (`start` by default, `space-between` to push the last one to the far end, `stretch` to grow them all) and `align` places them across it. */
224
296
  export const CLoginCardActions = createComponent({
225
297
  displayName: 'CLoginCardActions',
226
- elementClass: elementClass('c-login-card-actions'),
298
+ elementClass: elementClass(['align', 'justify']),
227
299
  react: React,
228
300
  tagName: 'c-login-card-actions',
229
301
  });
302
+ /** The body of a `c-login-card`, which stacks the intro text and the sign-in fields in a column with a 24px gap. Place it between `c-login-card-title` and `c-login-card-actions`. */
230
303
  export const CLoginCardContent = createComponent({
231
304
  displayName: 'CLoginCardContent',
232
- elementClass: elementClass('c-login-card-content'),
305
+ elementClass: elementClass([]),
233
306
  react: React,
234
307
  tagName: 'c-login-card-content',
235
308
  });
309
+ /** The heading of a `c-login-card`, in large bold type in the primary colour; place it first in the card. The card shrinks it from 40px to 32px in its compact layout. */
236
310
  export const CLoginCardTitle = createComponent({
237
311
  displayName: 'CLoginCardTitle',
238
- elementClass: elementClass('c-login-card-title'),
312
+ elementClass: elementClass(['headingLevel']),
239
313
  react: React,
240
314
  tagName: 'c-login-card-title',
241
315
  });
242
- /** Wrapper component for the whole page */
316
+ /** 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. */
243
317
  export const CMain = createComponent({
244
318
  displayName: 'CMain',
245
- elementClass: elementClass('c-main'),
319
+ elementClass: elementClass(['disableLayout']),
246
320
  react: React,
247
321
  tagName: 'c-main',
248
322
  });
323
+ /** 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. */
249
324
  export const CMenu = createComponent({
250
325
  displayName: 'CMenu',
251
- elementClass: elementClass('c-menu'),
326
+ elementClass: elementClass(['distance', 'open', 'position', 'trigger']),
252
327
  events: {
253
328
  onChangeOpen: 'change:open',
254
329
  onSelect: 'select',
@@ -259,58 +334,75 @@ export const CMenu = createComponent({
259
334
  /** A single command in a `c-menu`. */
260
335
  export const CMenuItem = createComponent({
261
336
  displayName: 'CMenuItem',
262
- elementClass: elementClass('c-menu-item'),
337
+ elementClass: elementClass(['checked', 'danger', 'disabled', 'type', 'value']),
263
338
  react: React,
264
339
  tagName: 'c-menu-item',
265
340
  });
266
341
  /** Section label for a group of `c-menu-item`s. */
267
342
  export const CMenuLabel = createComponent({
268
343
  displayName: 'CMenuLabel',
269
- elementClass: elementClass('c-menu-label'),
344
+ elementClass: elementClass([]),
270
345
  react: React,
271
346
  tagName: 'c-menu-label',
272
347
  });
348
+ /** A single line of text under a form control: a neutral hint, or an error message that takes its place while the control is invalid. */
273
349
  export const CMessage = createComponent({
274
350
  displayName: 'CMessage',
275
- elementClass: elementClass('c-message'),
351
+ elementClass: elementClass(['errorMessage', 'hint', 'invalid']),
276
352
  react: React,
277
353
  tagName: 'c-message',
278
354
  });
279
355
  /** 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`. */
280
356
  export const CModal = createComponent({
281
357
  displayName: 'CModal',
282
- elementClass: elementClass('c-modal'),
358
+ elementClass: elementClass(['disableBackdropBlur', 'dismissable', 'value', 'width']),
283
359
  events: {
284
- onChangeValue: 'changeValue',
360
+ onChange: 'change',
285
361
  onInput: 'input',
286
362
  onUpdateValue: 'update:value',
287
363
  },
288
364
  react: React,
289
365
  tagName: 'c-modal',
290
366
  });
367
+ /** The hamburger menu button that opens and closes the mobile drawer of a `c-side-navigation`. */
291
368
  export const CNavigationButton = createComponent({
292
369
  displayName: 'CNavigationButton',
293
- elementClass: elementClass('c-navigation-button'),
370
+ elementClass: elementClass(['texts']),
294
371
  react: React,
295
372
  tagName: 'c-navigation-button',
296
373
  });
374
+ /** A field for a number — an integer, or one with decimals — shown with thousands separators as it is typed. */
375
+ export const CNumberField = createComponent({
376
+ displayName: 'CNumberField',
377
+ elementClass: elementClass(['decimalSeparator', 'decimals', 'disabled', 'errorMessage', 'fixedDecimals', 'groupSeparator', 'hideDetails', 'hint', 'invalid', 'label', 'labelOnTop', 'max', 'min', 'name', 'placeholder', 'readonly', 'required', 'shadow', 'size', 'step', 'texts', 'value']),
378
+ events: {
379
+ onChange: 'change',
380
+ onInput: 'input',
381
+ onUpdateValue: 'update:value',
382
+ },
383
+ react: React,
384
+ tagName: 'c-number-field',
385
+ });
386
+ /** One option of a `c-select` or `c-autocomplete`: `value` is what the field reports when the option is picked, and the option's label is its `name`, else the text of a `c-option-value` inside it, else its whole text. `disabled` keeps it from being picked, and `selected` sets the field's initial value once, silently, while that value is empty — with a bound `v-model`, initialise the model instead. */
297
387
  export const COption = createComponent({
298
388
  displayName: 'COption',
299
- elementClass: elementClass('c-option'),
389
+ elementClass: elementClass(['disabled', 'name', 'selected', 'value']),
300
390
  react: React,
301
391
  tagName: 'c-option',
302
392
  });
393
+ /** 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)`). */
303
394
  export const COptionValue = createComponent({
304
395
  displayName: 'COptionValue',
305
- elementClass: elementClass('c-option-value'),
396
+ elementClass: elementClass([]),
306
397
  react: React,
307
398
  tagName: 'c-option-value',
308
399
  });
400
+ /** A one-time-code field: a row of single-digit boxes, filled in order as the user types or pastes a code, under a group label and above a hint or error message. */
309
401
  export const COtpInput = createComponent({
310
402
  displayName: 'COtpInput',
311
- elementClass: elementClass('c-otp-input'),
403
+ elementClass: elementClass(['autofocus', 'errorMessage', 'hideDetails', 'hint', 'invalid', 'label', 'length', 'required', 'value']),
312
404
  events: {
313
- onChangeValue: 'changeValue',
405
+ onChange: 'change',
314
406
  onCompletion: 'completion',
315
407
  onInput: 'input',
316
408
  onUpdateValue: 'update:value',
@@ -318,17 +410,19 @@ export const COtpInput = createComponent({
318
410
  react: React,
319
411
  tagName: 'c-otp-input',
320
412
  });
413
+ /** The routed-content region of the dashboard layout: inside `c-main` it fills the area beside the side navigation and below the toolbar, pads the current view's content and keeps an optional footer at its bottom edge. */
321
414
  export const CPage = createComponent({
322
415
  displayName: 'CPage',
323
- elementClass: elementClass('c-page'),
416
+ elementClass: elementClass(['scrollIndicator']),
324
417
  react: React,
325
418
  tagName: 'c-page',
326
419
  });
420
+ /** A page navigation bar for a list split into pages: previous and next buttons around a window of page buttons, with a page-size menu and the range of items shown. */
327
421
  export const CPagination = createComponent({
328
422
  displayName: 'CPagination',
329
- elementClass: elementClass('c-pagination'),
423
+ elementClass: elementClass(['hideDetails', 'hideRange', 'simple', 'size', 'texts', 'value']),
330
424
  events: {
331
- onChangeValue: 'changeValue',
425
+ onChange: 'change',
332
426
  onInput: 'input',
333
427
  onUpdateValue: 'update:value',
334
428
  },
@@ -338,7 +432,7 @@ export const CPagination = createComponent({
338
432
  /** A click-opened, non-modal surface anchored to its trigger, floating in the top layer; its content may be interactive. */
339
433
  export const CPopover = createComponent({
340
434
  displayName: 'CPopover',
341
- elementClass: elementClass('c-popover'),
435
+ elementClass: elementClass(['distance', 'heading', 'open', 'position', 'trigger']),
342
436
  events: {
343
437
  onChangeOpen: 'change:open',
344
438
  },
@@ -348,79 +442,81 @@ export const CPopover = createComponent({
348
442
  /** A horizontal progress bar that fills a track to a known completion percentage, with an optional details line showing the value and a label. */
349
443
  export const CProgressBar = createComponent({
350
444
  displayName: 'CProgressBar',
351
- elementClass: elementClass('c-progress-bar'),
445
+ elementClass: elementClass(['hideDetails', 'indeterminate', 'label', 'singleLine', 'value']),
352
446
  react: React,
353
447
  tagName: 'c-progress-bar',
354
448
  });
355
449
  /** A circular progress indicator that draws a known completion percentage as an arc around a track — the circular counterpart of `c-progress-bar`. */
356
450
  export const CProgressCircle = createComponent({
357
451
  displayName: 'CProgressCircle',
358
- elementClass: elementClass('c-progress-circle'),
452
+ elementClass: elementClass(['size', 'thickness', 'value']),
359
453
  react: React,
360
454
  tagName: 'c-progress-circle',
361
455
  });
362
456
  /** A single radio option inside a `c-radio-group`: a native radio input whose default slot is its clickable, announced label. */
363
457
  export const CRadio = createComponent({
364
458
  displayName: 'CRadio',
365
- elementClass: elementClass('c-radio'),
366
- events: {
367
- onChange: 'change',
368
- },
459
+ elementClass: elementClass(['disabled', 'value']),
369
460
  react: React,
370
461
  tagName: 'c-radio',
371
462
  });
372
463
  /** 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. */
373
464
  export const CRadioGroup = createComponent({
374
465
  displayName: 'CRadioGroup',
375
- elementClass: elementClass('c-radio-group'),
466
+ elementClass: elementClass(['disabled', 'errorMessage', 'hideDetails', 'hint', 'inline', 'invalid', 'label', 'required', 'value']),
376
467
  events: {
377
- onChangeValue: 'changeValue',
468
+ onChange: 'change',
378
469
  onInput: 'input',
379
470
  onUpdateValue: 'update:value',
380
471
  },
381
472
  react: React,
382
473
  tagName: 'c-radio-group',
383
474
  });
475
+ /** 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`. */
384
476
  export const CSelect = createComponent({
385
477
  displayName: 'CSelect',
386
- elementClass: elementClass('c-select'),
478
+ elementClass: elementClass(['clearable', 'disabled', 'errorMessage', 'hideDetails', 'hint', 'invalid', 'items', 'itemsPerPage', 'label', 'labelOnTop', 'loading', 'maxTags', 'multiple', 'name', 'optionAsSelection', 'placeholder', 'required', 'returnObject', 'selectAll', 'shadow', 'size', 'texts', 'value']),
387
479
  events: {
388
- onChangeValue: 'changeValue',
480
+ onChange: 'change',
389
481
  onInput: 'input',
390
482
  onUpdateValue: 'update:value',
391
483
  },
392
484
  react: React,
393
485
  tagName: 'c-select',
394
486
  });
487
+ /** 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. */
395
488
  export const CSideNavigation = createComponent({
396
489
  displayName: 'CSideNavigation',
397
- elementClass: elementClass('c-side-navigation'),
490
+ elementClass: elementClass(['mobile', 'open']),
398
491
  events: {
399
- onChangeMenuVisible: 'change:menu-visible',
492
+ onChangeOpen: 'change:open',
400
493
  },
401
494
  react: React,
402
495
  tagName: 'c-side-navigation',
403
496
  });
497
+ /** One entry of a `c-side-navigation`: its label text, after an optional leading `c-icon`, goes in the default slot, and activating it fires `select` with its `value`; with `href` it is a real link, opened in `target`, and without one a button. Write `c-sub-navigation-item` children inside it to make it an expandable parent, whose `active` then means expanded rather than the current page. */
404
498
  export const CSideNavigationItem = createComponent({
405
499
  displayName: 'CSideNavigationItem',
406
- elementClass: elementClass('c-side-navigation-item'),
500
+ elementClass: elementClass(['active', 'href', 'loading', 'target', 'value']),
407
501
  events: {
408
- onItemChange: 'itemChange',
502
+ onSelect: 'select',
409
503
  },
410
504
  react: React,
411
505
  tagName: 'c-side-navigation-item',
412
506
  });
507
+ /** A section title in a `c-side-navigation`: uppercase text over a divider line, placed before the items it groups. It is a heading (level 2), so screen-reader users can jump between sections, and cannot be activated. */
413
508
  export const CSideNavigationTitle = createComponent({
414
509
  displayName: 'CSideNavigationTitle',
415
- elementClass: elementClass('c-side-navigation-title'),
510
+ elementClass: elementClass([]),
416
511
  react: React,
417
512
  tagName: 'c-side-navigation-title',
418
513
  });
514
+ /** A slider for picking a number from a range by dragging a thumb along a track, with a label, a value bubble and optional tick marks. */
419
515
  export const CSlider = createComponent({
420
516
  displayName: 'CSlider',
421
- elementClass: elementClass('c-slider'),
517
+ elementClass: elementClass(['disableTooltip', 'disabled', 'label', 'labels', 'max', 'min', 'name', 'segments', 'step', 'ticks', 'unit', 'value']),
422
518
  events: {
423
- onChangeValue: 'changeValue',
519
+ onChange: 'change',
424
520
  onInput: 'input',
425
521
  onUpdateValue: 'update:value',
426
522
  },
@@ -430,157 +526,179 @@ export const CSlider = createComponent({
430
526
  /** A circular indeterminate activity indicator — pure motion with no value, for waits of unknown duration. */
431
527
  export const CSpinner = createComponent({
432
528
  displayName: 'CSpinner',
433
- elementClass: elementClass('c-spinner'),
529
+ elementClass: elementClass(['color', 'size', 'width']),
434
530
  react: React,
435
531
  tagName: 'c-spinner',
436
532
  });
533
+ /** A status pill: a short word naming the state of a record, such as Active, Pending or Failed, tinted with the colours of its status type. */
437
534
  export const CStatus = createComponent({
438
535
  displayName: 'CStatus',
439
- elementClass: elementClass('c-status'),
536
+ elementClass: elementClass(['type']),
440
537
  react: React,
441
538
  tagName: 'c-status',
442
539
  });
540
+ /** One step of a `c-steps` indicator: its label goes in the default slot, under a dot that is ringed for the current step and becomes a check mark once the step is complete. A step has no props of its own — its state follows the parent's `value`. */
443
541
  export const CStep = createComponent({
444
542
  displayName: 'CStep',
445
- elementClass: elementClass('c-step'),
543
+ elementClass: elementClass([]),
446
544
  react: React,
447
545
  tagName: 'c-step',
448
546
  });
547
+ /** A step indicator for a multi-step flow: a row of `c-step` dots joined by lines, with the steps before the current one checked off and the current one ringed. */
449
548
  export const CSteps = createComponent({
450
549
  displayName: 'CSteps',
451
- elementClass: elementClass('c-steps'),
550
+ elementClass: elementClass(['value']),
452
551
  react: React,
453
552
  tagName: 'c-steps',
454
553
  });
554
+ /** A second-level entry of a `c-side-navigation`, written inside the `c-side-navigation-item` it belongs to (no `slot` attribute needed) and shown while that parent is `active`. Activating it fires `select` with its `value` and closes the mobile drawer. It does not mark itself as the current page: set `active` on the sub-item of the page shown, and on its parent so the parent is expanded. */
455
555
  export const CSubNavigationItem = createComponent({
456
556
  displayName: 'CSubNavigationItem',
457
- elementClass: elementClass('c-sub-navigation-item'),
557
+ elementClass: elementClass(['active', 'href', 'loading', 'target', 'value']),
558
+ events: {
559
+ onSelect: 'select',
560
+ },
458
561
  react: React,
459
562
  tagName: 'c-sub-navigation-item',
460
563
  });
461
- /** A toggle for a binary setting that takes effect immediately: a native switch control with a label, an optional hint, and validation messaging. */
564
+ /** A toggle for a binary setting that takes effect immediately: a native switch control with a label. */
462
565
  export const CSwitch = createComponent({
463
566
  displayName: 'CSwitch',
464
- elementClass: elementClass('c-switch'),
567
+ elementClass: elementClass(['checked', 'disabled', 'falseValue', 'label', 'loading', 'required', 'trueValue', 'value']),
465
568
  events: {
466
569
  onChange: 'change',
467
- onChangeValue: 'changeValue',
468
570
  onInput: 'input',
469
571
  onUpdateValue: 'update:value',
470
572
  },
471
573
  react: React,
472
574
  tagName: 'c-switch',
473
575
  });
576
+ /** One tab in the row of a `c-tabs`: its label goes in the default slot (a `c-badge` there sits on the tab's corner), and its `value` names the `c-tab-item` panel it shows. `c-tabs` decides which tab is active; `disabled` keeps a tab from being selected. */
474
577
  export const CTab = createComponent({
475
578
  displayName: 'CTab',
476
- elementClass: elementClass('c-tab'),
477
- events: {
478
- onTabChange: 'tabChange',
479
- onTabFocus: 'tabFocus',
480
- },
579
+ elementClass: elementClass(['disabled', 'value']),
481
580
  react: React,
482
581
  tagName: 'c-tab',
483
582
  });
484
583
  /** 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. */
485
584
  export const CTabButtons = createComponent({
486
585
  displayName: 'CTabButtons',
487
- elementClass: elementClass('c-tab-buttons'),
488
- events: {
489
- onTabChange: 'tabChange',
490
- },
586
+ elementClass: elementClass(['disabled', 'size']),
491
587
  react: React,
492
588
  tagName: 'c-tab-buttons',
493
589
  });
590
+ /** One tab panel inside `c-tab-items`, shown while its `value` equals the `value` of `c-tabs` — give it the same `value` as its `c-tab`. Inactive panels stay in the DOM, hidden, so their content keeps its state across tab switches. */
494
591
  export const CTabItem = createComponent({
495
592
  displayName: 'CTabItem',
496
- elementClass: elementClass('c-tab-item'),
497
- events: {
498
- onContentChange: 'contentChange',
499
- },
593
+ elementClass: elementClass(['value']),
500
594
  react: React,
501
595
  tagName: 'c-tab-item',
502
596
  });
597
+ /** The panel container of a `c-tabs`: slot it in with `slot="items"` and put the `c-tab-item` panels inside it. It shows the panel whose `value` matches the tabs' value and slides between panels; it has no props of its own, as `c-tabs` drives it. */
503
598
  export const CTabItems = createComponent({
504
599
  displayName: 'CTabItems',
505
- elementClass: elementClass('c-tab-items'),
600
+ elementClass: elementClass([]),
506
601
  react: React,
507
602
  tagName: 'c-tab-items',
508
603
  });
509
604
  /** 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. */
510
605
  export const CTable = createComponent({
511
606
  displayName: 'CTable',
512
- elementClass: elementClass('c-table'),
607
+ elementClass: elementClass(['mobileBreakpoint', 'responsive']),
513
608
  react: React,
514
609
  tagName: 'c-table',
515
610
  });
611
+ /** A tab set that switches between panels of related content: a row of `c-tab` headers above the `c-tab-item` panels, one panel shown at a time. */
516
612
  export const CTabs = createComponent({
517
613
  displayName: 'CTabs',
518
- elementClass: elementClass('c-tabs'),
614
+ elementClass: elementClass(['borderless', 'disableAnimation', 'justify', 'mobileBreakpoint', 'value', 'vertical']),
519
615
  events: {
520
- onChangeValue: 'changeValue',
616
+ onChange: 'change',
521
617
  onInput: 'input',
522
618
  onUpdateValue: 'update:value',
523
619
  },
524
620
  react: React,
525
621
  tagName: 'c-tabs',
526
622
  });
623
+ /** A pill-shaped tag naming one item — a keyword, a category, an applied filter — authored inside `c-tags`, or on its own where a single tag is needed, such as a status in a table cell. With `closeable` it shows a close button that fires `close` and leaves removing the tag to you; name that button with `close-label`, for example "Remove Chemistry". */
527
624
  export const CTag = createComponent({
528
625
  displayName: 'CTag',
529
- elementClass: elementClass('c-tag'),
626
+ elementClass: elementClass(['active', 'badge', 'closeLabel', 'closeable', 'flat', 'size']),
530
627
  events: {
531
628
  onClose: 'close',
532
629
  },
533
630
  react: React,
534
631
  tagName: 'c-tag',
535
632
  });
633
+ /** A group of `c-tag` elements laid out in a wrapping row, with an optional group label above them. */
536
634
  export const CTags = createComponent({
537
635
  displayName: 'CTags',
538
- elementClass: elementClass('c-tags'),
636
+ elementClass: elementClass(['label', 'required', 'size']),
539
637
  react: React,
540
638
  tagName: 'c-tags',
541
639
  });
640
+ /** A text field for a single line of text, or several lines under `rows`, with a label, a hint and an error message. */
542
641
  export const CTextField = createComponent({
543
642
  displayName: 'CTextField',
544
- elementClass: elementClass('c-text-field'),
643
+ elementClass: elementClass(['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'disabled', 'errorMessage', 'hideDetails', 'hint', 'invalid', 'label', 'labelOnTop', 'mask', 'max', 'min', 'name', 'placeholder', 'readonly', 'required', 'rows', 'shadow', 'size', 'step', 'trimWhitespace', 'type', 'value']),
545
644
  events: {
546
645
  onChange: 'change',
547
- onChangeValue: 'changeValue',
548
646
  onInput: 'input',
549
647
  onUpdateValue: 'update:value',
550
648
  },
551
649
  react: React,
552
650
  tagName: 'c-text-field',
553
651
  });
554
- /** A single toast notification, rendered and managed by c-toasts */
555
- export const CToast = createComponent({
556
- displayName: 'CToast',
557
- elementClass: elementClass('c-toast'),
652
+ /** 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`. */
653
+ export const CTimePicker = createComponent({
654
+ displayName: 'CTimePicker',
655
+ elementClass: elementClass(['clearable', 'disabled', 'errorMessage', 'format', 'hideDetails', 'hint', 'invalid', 'label', 'labelOnTop', 'max', 'min', 'minuteStep', 'name', 'placeholder', 'range', 'required', 'shadow', 'showNow', 'size', 'texts', 'value']),
558
656
  events: {
559
- onClose: 'close',
657
+ onChange: 'change',
658
+ onChangeText: 'change:text',
659
+ onInput: 'input',
660
+ onUpdateValue: 'update:value',
560
661
  },
561
662
  react: React,
562
- tagName: 'c-toast',
663
+ tagName: 'c-time-picker',
563
664
  });
564
- /** Toasts are passive, transient notifications — operation results, background progress — stacked and managed by a single `c-toasts` container via its `addToast` / `removeToast` methods. */
665
+ /** Toasts are passive, transient notifications — operation results, background progress — stacked and managed by a single `c-toasts` container via its `addToast` / `removeToast` methods. `addToast` returns the message's `id` (its own, or a generated one), which `removeToast` takes; `close` fires on the container with the message once a toast has left. */
565
666
  export const CToasts = createComponent({
566
667
  displayName: 'CToasts',
567
- elementClass: elementClass('c-toasts'),
668
+ elementClass: elementClass(['absolute', 'horizontal', 'vertical']),
669
+ events: {
670
+ onClose: 'close',
671
+ },
568
672
  react: React,
569
673
  tagName: 'c-toasts',
570
674
  });
675
+ /** 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. */
571
676
  export const CToolbar = createComponent({
572
677
  displayName: 'CToolbar',
573
- elementClass: elementClass('c-toolbar'),
678
+ elementClass: elementClass(['static']),
574
679
  react: React,
575
680
  tagName: 'c-toolbar',
576
681
  });
577
682
  /** 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
683
  export const CTooltip = createComponent({
579
684
  displayName: 'CTooltip',
580
- elementClass: elementClass('c-tooltip'),
685
+ elementClass: elementClass(['delay', 'distance', 'open', 'position', 'text', 'trigger']),
581
686
  events: {
582
687
  onChangeOpen: 'change:open',
583
688
  },
584
689
  react: React,
585
690
  tagName: 'c-tooltip',
586
691
  });
692
+ /** 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. */
693
+ export const CTreeSelect = createComponent({
694
+ displayName: 'CTreeSelect',
695
+ elementClass: elementClass(['allowBranch', 'clearable', 'disabled', 'errorMessage', 'filter', 'hideDetails', 'hint', 'invalid', 'items', 'itemsPerPage', 'label', 'labelOnTop', 'levelLabels', 'name', 'placeholder', 'required', 'returnObject', 'shadow', 'size', 'texts', 'value']),
696
+ events: {
697
+ onChange: 'change',
698
+ onChangeQuery: 'change:query',
699
+ onInput: 'input',
700
+ onUpdateValue: 'update:value',
701
+ },
702
+ react: React,
703
+ tagName: 'c-tree-select',
704
+ });
package/dist/index.d.ts CHANGED
@@ -7,5 +7,9 @@
7
7
  * need (e.g. `CSelectItem`) from there.
8
8
  */
9
9
  export * from './components.js';
10
- export { applyTheme, resetTheme, themeToCss } from '@cscfi/csc-ui';
11
- export type { Family, ThemeSeeds } from '@cscfi/csc-ui';
10
+ export { applyTheme, DEFAULT_SEEDS, FAMILIES, resetTheme, themeToCss, } from '@cscfi/csc-ui';
11
+ export type { CFamily, CThemeSeeds } from '@cscfi/csc-ui';
12
+ export { applyDefaults, DEFAULTABLE_PROPS, resetDefaults } from '@cscfi/csc-ui';
13
+ export type { CAppDefaults, CDefaultableTag } from '@cscfi/csc-ui';
14
+ export { chartAnatomy, chartAnatomyHex, chartSlots, chartSlotsHex, observeThemeMode, themeMode, } from '@cscfi/csc-ui';
15
+ export type { CChartAnatomy, CChartSlots, CThemeMode } from '@cscfi/csc-ui';
package/dist/index.js CHANGED
@@ -7,4 +7,6 @@
7
7
  * need (e.g. `CSelectItem`) from there.
8
8
  */
9
9
  export * from './components.js';
10
- export { applyTheme, resetTheme, themeToCss } from '@cscfi/csc-ui';
10
+ export { applyTheme, DEFAULT_SEEDS, FAMILIES, resetTheme, themeToCss, } from '@cscfi/csc-ui';
11
+ export { applyDefaults, DEFAULTABLE_PROPS, 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.9",
3
+ "version": "4.0.0-rc.1",
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",
@@ -16,18 +16,26 @@
16
16
  "files": [
17
17
  "dist"
18
18
  ],
19
+ "browserslist": [
20
+ "last 2 Chrome versions",
21
+ "last 2 Edge versions",
22
+ "last 2 Firefox versions",
23
+ "Firefox ESR",
24
+ "last 2 Safari versions",
25
+ "last 2 iOS versions"
26
+ ],
19
27
  "dependencies": {
20
28
  "@lit/react": "^1.0.8"
21
29
  },
22
30
  "peerDependencies": {
23
31
  "react": ">=18",
24
- "@cscfi/csc-ui": "^4.0.0-alpha.9"
32
+ "@cscfi/csc-ui": "^4.0.0-rc.1"
25
33
  },
26
34
  "devDependencies": {
27
35
  "@types/react": "^19.1.8",
28
- "react": "^19.1.0",
36
+ "react": "19.3.1",
29
37
  "typescript": "^6.0.3",
30
- "@cscfi/csc-ui": "4.0.0-alpha.9"
38
+ "@cscfi/csc-ui": "4.0.0-rc.1"
31
39
  },
32
40
  "license": "MIT",
33
41
  "repository": "CSCfi/ui",