@telicent-oss/ds 4.4.2 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ds.cjs +463 -172
- package/dist/ds.cjs.map +1 -1
- package/dist/ds.d.ts +125 -72
- package/dist/ds.js +461 -171
- package/dist/ds.js.map +1 -1
- package/dist/llms.txt +70 -8
- package/package.json +1 -1
package/dist/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Telicent DS Component Manifest
|
|
2
2
|
|
|
3
|
-
**VERSION:** This file documents @telicent-oss/ds
|
|
3
|
+
**VERSION:** This file documents @telicent-oss/ds v5.0.1. It shipped inside that package, so it matches the version installed in your project. If that package was built locally rather than installed from npm, the code may be newer than v5.0.1.
|
|
4
4
|
|
|
5
5
|
> `@telicent-oss/ds` is Telicent's MUI-based React component library. This file is the complete, self-contained reference: setup, theming, every exported component, and copy-paste recipes. An agent that fetches it has what it needs to build a Telicent app UI without reading the source.
|
|
6
6
|
|
|
@@ -32,11 +32,11 @@ Wrap the app in `UIThemeProvider`. It supplies the MUI theme and `CssBaseline` i
|
|
|
32
32
|
```tsx
|
|
33
33
|
import { UIThemeProvider } from "@telicent-oss/ds";
|
|
34
34
|
|
|
35
|
-
<UIThemeProvider theme="
|
|
35
|
+
<UIThemeProvider theme="DocumentPink" dark={false}>
|
|
36
36
|
<App />
|
|
37
37
|
</UIThemeProvider>
|
|
38
38
|
```
|
|
39
|
-
- `theme` (required): one of `"
|
|
39
|
+
- `theme` (required): one of `"DocumentPink"`, `"GraphOrange"`, `"AdminBlue"`, `"GeoGreen"`, `"Blank"`.
|
|
40
40
|
- `dark` (optional, default `false`): set it for the dark palette. Dark mode is this prop only — there is no runtime toggle or CSS class.
|
|
41
41
|
|
|
42
42
|
Read theme colours and tokens in app code with the `useExtendedTheme` hook. This is the sanctioned way to set a colour — use it instead of a Tailwind colour class:
|
|
@@ -248,9 +248,22 @@ Usage: https://github.com/telicent-oss/telicent-ds/blob/main/src/components/surf
|
|
|
248
248
|
|
|
249
249
|
Demonstrated states:
|
|
250
250
|
- ResizeBaseline — bounds="parent", title="Resize baseline", targetId="map", iconBeforeTitle=<jsx>
|
|
251
|
-
* **`Drawer`**:
|
|
251
|
+
* **`Drawer`**: Controlled side sheet for a task beside the page (filters, details). Pass `open`/`onClose` and `width`; header, scrolling body and footer are children.
|
|
252
252
|
```yaml
|
|
253
253
|
Drawer:
|
|
254
|
+
width: {type: 'string | number', required: false}
|
|
255
|
+
```
|
|
256
|
+
Live: https://telicent-oss.github.io/telicent-ds/?path=/docs/surfaces-drawer--docs
|
|
257
|
+
Usage: https://github.com/telicent-oss/telicent-ds/blob/main/src/components/surfaces/Drawer/Drawer.stories.tsx
|
|
258
|
+
|
|
259
|
+
Demonstrated states:
|
|
260
|
+
- Default — open=false
|
|
261
|
+
- Width — open=false, width=420
|
|
262
|
+
- CappedAtViewport — open=false, width=1600
|
|
263
|
+
- HeaderBodyFooter — open=false, width=420
|
|
264
|
+
* **`InsetDrawer`** *(deprecated, use `Drawer`)*: The map inset's collapsible side panel with a built-in toggle tab. `children` is the panel content; `drawerWidth` sets its open width; `initialOpen` sets the starting state; `onVisibilityChange(open)` and `onToggle` report toggles. Style the surface with `PaperProps` / `PaperSx`.
|
|
265
|
+
```yaml
|
|
266
|
+
InsetDrawer:
|
|
254
267
|
children: {type: 'React.ReactNode', required: true}
|
|
255
268
|
drawerWidth: {type: 'number', required: false}
|
|
256
269
|
id: {type: 'string', required: false}
|
|
@@ -260,8 +273,8 @@ Drawer:
|
|
|
260
273
|
PaperProps: {type: 'Partial<PaperProps<React.ElementType<any, keyof React.JSX.IntrinsicElements>>>', required: false}
|
|
261
274
|
PaperSx: {type: 'SxProps<Theme>', required: false}
|
|
262
275
|
```
|
|
263
|
-
Live: https://telicent-oss.github.io/telicent-ds/?path=/docs/component-library-
|
|
264
|
-
Usage: https://github.com/telicent-oss/telicent-ds/blob/main/src/feature-components/Drawer/composites/
|
|
276
|
+
Live: https://telicent-oss.github.io/telicent-ds/?path=/docs/component-library-insetdrawer--docs
|
|
277
|
+
Usage: https://github.com/telicent-oss/telicent-ds/blob/main/src/feature-components/Drawer/composites/InsetDrawer.stories.tsx
|
|
265
278
|
|
|
266
279
|
Demonstrated states:
|
|
267
280
|
- Default — children=<jsx>
|
|
@@ -657,6 +670,55 @@ Demonstrated states:
|
|
|
657
670
|
- Outlined — variant="outlined"
|
|
658
671
|
- ClickableChips
|
|
659
672
|
- DeletableChips
|
|
673
|
+
* **`Badge`**: A count or dot on another element. Put the count in the host's accessible name; the badge is hidden from screen readers.
|
|
674
|
+
```yaml
|
|
675
|
+
Badge: {} # no own props; all inherited from the underlying MUI/DOM element
|
|
676
|
+
```
|
|
677
|
+
Live: https://telicent-oss.github.io/telicent-ds/?path=/docs/data-display-badge--docs
|
|
678
|
+
Usage: https://github.com/telicent-oss/telicent-ds/blob/main/src/components/data-display/Badge/Badge.stories.tsx
|
|
679
|
+
|
|
680
|
+
Demonstrated states:
|
|
681
|
+
- OnIconButton — badgeContent=2
|
|
682
|
+
- ZeroHidden — badgeContent=0
|
|
683
|
+
- Max — badgeContent=120, max=99
|
|
684
|
+
- Dot — variant="dot", badgeContent=1
|
|
685
|
+
- AnnouncedBadge — badgeContent=3, slotProps={…}
|
|
686
|
+
* **`EntityList`**: Navigational list of entities where each row opens a detail page — users, groups, clients, service accounts. Uses the ARIA list pattern (`<section>` → `<ul>` → `<a href>`) so screen readers announce "link, View Alice", not the grid-pattern "row 3 of 24, cell 1 of 5" that `DataGrid` would. Required props: `items`, `columns`, `getItemKey`, and one of `ariaLabel` or `ariaLabelledBy` (XOR-required at the type level so the landmark is never unnamed). Set `getItemHref` + `getItemLabel` to make rows navigate; omit `getItemHref` for display-only (permission-gated) views — rows render as inert with no chevron, hover tint, or focus outline. Pass `onItemClick(item, href)` to intercept plain left-clicks for SPA routing — modifier-click (cmd/ctrl/shift/alt) and non-primary mouse buttons always fall through to native anchor behaviour, so cmd-click opens a new tab even in SPAs with zero extra code. Columns are sortable iff `getSortValue` is provided; sort state is encoded in the sort button's accessible name via `visuallyHidden`, no `aria-sort` on a non-grid element. `defaultPageSize` seeds initial state and the user then controls the dropdown — the prop is not reactive. Loading state renders skeleton rows that mirror the column layout; empty state is customisable via `renderEmpty`. Reach for `DataGrid` instead when the data is genuinely tabular/analytical — filterable columns, cell editing, column reordering, server-side sort.
|
|
687
|
+
```yaml
|
|
688
|
+
EntityList:
|
|
689
|
+
ariaLabel: {type: 'string', required: false}
|
|
690
|
+
ariaLabelledBy: {type: 'string', required: false}
|
|
691
|
+
columns: {type: 'EntityListColumn<T>[]', required: true}
|
|
692
|
+
defaultPageSize: {type: 'number', required: false}
|
|
693
|
+
getItemHref: {type: '(item: T) => string', required: false}
|
|
694
|
+
getItemKey: {type: '(item: T) => string | number', required: true}
|
|
695
|
+
getItemLabel: {type: '(item: T) => string', required: false}
|
|
696
|
+
initialSort: {type: '{ key: string; direction: SortDirection; }', required: false}
|
|
697
|
+
isLoading: {type: 'boolean', required: false}
|
|
698
|
+
items: {type: 'T[]', required: true}
|
|
699
|
+
onItemClick: {type: '(item: T, href: string) => void', required: false}
|
|
700
|
+
pageSizeOptions: {type: 'number[]', required: false}
|
|
701
|
+
renderEmpty: {type: '() => ReactNode', required: false}
|
|
702
|
+
```
|
|
703
|
+
Live: https://telicent-oss.github.io/telicent-ds/?path=/docs/data-display-entitylist--docs
|
|
704
|
+
Usage: https://github.com/telicent-oss/telicent-ds/blob/main/src/components/data-display/EntityList/EntityList.stories.tsx
|
|
705
|
+
|
|
706
|
+
Demonstrated states:
|
|
707
|
+
- Interactive — items=USERS, columns=COLUMNS, ariaLabel="Users", initialSort={…}
|
|
708
|
+
- DisplayOnly — items=USERS, columns=COLUMNS, ariaLabel="Users (read-only)", initialSort={…}
|
|
709
|
+
- WithSPAInterception — items=USERS, columns=COLUMNS, ariaLabel="Users", initialSort={…}
|
|
710
|
+
- Loading — items=[…], columns=COLUMNS, ariaLabel="Users", isLoading=true
|
|
711
|
+
- Empty — items=[…], columns=COLUMNS, ariaLabel="Users"
|
|
712
|
+
* **`Table` / `TableHead` / `TableBody` / `TableRow` / `TableCell`**: Semantic HTML table family — thin passthroughs to MUI's `Table` primitives; the theme carries the visuals. Use for read-only or lightly-interactive structural data: audit logs, activity streams, resource summaries, user lists inside a card. Row-click patterns via `TableRow` `onClick` + `hover`; otherwise no behaviour baked in. Props: `Table` takes `size="small" | "medium"` (default `medium`), `stickyHeader`, `padding`; `TableRow` takes `hover`, `selected`, `onClick`; `TableCell` takes `align`, `padding`, `variant`, `component` (override the rendered tag when semantics differ from visual position). Reach for `EntityList` instead when each row navigates to a detail page — the ARIA list pattern announces each row as a link, which a table can't. Reach for `DataGrid` when the data is interactive/analytical — filterable columns, cell editing, column reordering, virtualisation, server-side sort.
|
|
713
|
+
Live: https://telicent-oss.github.io/telicent-ds/?path=/docs/data-display-table--docs
|
|
714
|
+
Usage: https://github.com/telicent-oss/telicent-ds/blob/main/src/components/data-display/Table/Table.stories.tsx
|
|
715
|
+
|
|
716
|
+
Demonstrated states:
|
|
717
|
+
- Basic
|
|
718
|
+
- SmallSize — size="small"
|
|
719
|
+
- StickyHeader — stickyHeader=true
|
|
720
|
+
- EmptyState
|
|
721
|
+
- LongContent
|
|
660
722
|
* **`DataGrid`**: Tabular data with pagination, sorting, and themed styling (wraps MUI X `DataGrid`). Import from the `@telicent-oss/ds/data-grid` sub-path, which carries the `@mui/x-data-grid` dependency so apps that don't use grids pay nothing for it. DS bakes `autoHeight`, `disableColumnResize`, `disableRowSelectionOnClick`, `disableColumnMenu`, `pagination`, `pageSizeOptions=[10, 25, 50]`, and initial `pageSize=10`. Row hover is suppressed by default; when `onRowClick` is set, the DS auto-opts `cursor: "pointer"` + `palette.action.hover` back in so interactive grids read as interactive with zero `sx` at the callsite. A nested `ThemeProvider` scopes the palette-driven grid overrides so Paper / MenuItem / IconButton / TablePagination styling inside the grid doesn't leak globally. DS re-exports `GridColDef`, `GridRenderCellParams`, `GridRowParams`, `GridSortModel`. `initialSort` is a DS convenience prop that maps to `initialState.sorting.sortModel`.
|
|
661
723
|
```yaml
|
|
662
724
|
DataGrid:
|
|
@@ -822,7 +884,7 @@ import { UIThemeProvider } from "@telicent-oss/ds";
|
|
|
822
884
|
|
|
823
885
|
export function Root() {
|
|
824
886
|
return (
|
|
825
|
-
<UIThemeProvider theme="
|
|
887
|
+
<UIThemeProvider theme="DocumentPink" dark={false}>
|
|
826
888
|
<App />
|
|
827
889
|
</UIThemeProvider>
|
|
828
890
|
);
|
|
@@ -1006,4 +1068,4 @@ ThemeSwitchRow:
|
|
|
1006
1068
|
- Live examples (Storybook): https://telicent-oss.github.io/telicent-ds/
|
|
1007
1069
|
- Source and issues: https://github.com/telicent-oss/telicent-ds
|
|
1008
1070
|
|
|
1009
|
-
This reference documents @telicent-oss/ds
|
|
1071
|
+
This reference documents @telicent-oss/ds v5.0.1.
|