@arbor-education/design-system.components 0.10.0 → 0.11.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.
Files changed (119) hide show
  1. package/.claude/agent-memory/blanche-designspert/MEMORY.md +64 -0
  2. package/.claude/agent-memory/blanche-designspert/token-review-patterns.md +29 -0
  3. package/.claude/agent-memory/dorothy-fact-checker/MEMORY.md +129 -0
  4. package/.claude/agent-memory/rose-storybookspert/MEMORY.md +29 -0
  5. package/.claude/agent-memory/rose-storybookspert/patterns.md +132 -0
  6. package/.claude/agent-memory/sophia-componentspert/MEMORY.md +14 -0
  7. package/.claude/agent-memory/sophia-componentspert/components.md +367 -0
  8. package/.claude/agents/blanche-designspert.md +150 -0
  9. package/.claude/agents/dorothy-fact-checker.md +145 -0
  10. package/.claude/agents/rose-storybookspert.md +148 -0
  11. package/.claude/agents/sophia-componentspert.md +133 -0
  12. package/.claude/component-library.md +1107 -0
  13. package/.claude/design-assessment-daily-attendance-2026-04-10.md +566 -0
  14. package/.claude/figma-assessment-7154-58899.md +404 -0
  15. package/.claude/figma-assessment-UKQfcxnT4rlHHNuiumt4o1-11086-97537.md +392 -0
  16. package/.claude/figma-assessment-UKQfcxnT4rlHHNuiumt4o1-551-41974.md +474 -0
  17. package/.claude/figma-assessment-UKQfcxnT4rlHHNuiumt4o1-551-43094.md +462 -0
  18. package/.claude/figma-assessment-fcFK4CGzkz2fVyY3koX8ZE-7154-59061.md +440 -0
  19. package/.claude/migration-report-custom-report-writer-2026-02-19.md +591 -0
  20. package/.claude/skills/analyze-design/README.md +295 -0
  21. package/.claude/skills/analyze-design/SKILL.md +741 -0
  22. package/.claude/skills/create-page/README.md +246 -0
  23. package/.claude/skills/create-page/SKILL.md +634 -0
  24. package/.claude/skills/create-page/design-analysis-template.md +333 -0
  25. package/.claude/skills/create-page/page-template.scss +118 -0
  26. package/.claude/skills/create-page/page-template.tsx +230 -0
  27. package/.claude/skills/map-legacy/README.md +87 -0
  28. package/.claude/skills/map-legacy/SKILL.md +465 -0
  29. package/.claude/skills/migrate-page/README.md +125 -0
  30. package/.claude/skills/migrate-page/SKILL.md +374 -0
  31. package/.github/CODEOWNERS +1 -0
  32. package/.github/pull_request_template.md +39 -0
  33. package/CHANGELOG.md +14 -0
  34. package/CLAUDE.md +31 -0
  35. package/CONTRIBUTING.md +191 -0
  36. package/README.md +110 -20
  37. package/dist/components/table/DSDefaultColDef.js +2 -2
  38. package/dist/components/table/DSDefaultColDef.js.map +1 -1
  39. package/dist/components/table/Table.d.ts +5 -29
  40. package/dist/components/table/Table.d.ts.map +1 -1
  41. package/dist/components/table/Table.js +12 -22
  42. package/dist/components/table/Table.js.map +1 -1
  43. package/dist/components/table/Table.stories.d.ts +4 -0
  44. package/dist/components/table/Table.stories.d.ts.map +1 -1
  45. package/dist/components/table/Table.stories.js +163 -28
  46. package/dist/components/table/Table.stories.js.map +1 -1
  47. package/dist/components/table/Table.test.js +109 -8
  48. package/dist/components/table/Table.test.js.map +1 -1
  49. package/dist/components/table/TableSettingsContext.d.ts +13 -0
  50. package/dist/components/table/TableSettingsContext.d.ts.map +1 -0
  51. package/dist/components/table/TableSettingsContext.js +15 -0
  52. package/dist/components/table/TableSettingsContext.js.map +1 -0
  53. package/dist/components/table/cellRenderers/CheckboxCellRenderer.d.ts +3 -0
  54. package/dist/components/table/cellRenderers/CheckboxCellRenderer.d.ts.map +1 -0
  55. package/dist/components/table/cellRenderers/CheckboxCellRenderer.js +12 -0
  56. package/dist/components/table/cellRenderers/CheckboxCellRenderer.js.map +1 -0
  57. package/dist/components/table/cellRenderers/CheckboxCellRenderer.test.d.ts +2 -0
  58. package/dist/components/table/cellRenderers/CheckboxCellRenderer.test.d.ts.map +1 -0
  59. package/dist/components/table/cellRenderers/CheckboxCellRenderer.test.js +65 -0
  60. package/dist/components/table/cellRenderers/CheckboxCellRenderer.test.js.map +1 -0
  61. package/dist/components/table/tableConsts.d.ts +7 -0
  62. package/dist/components/table/tableConsts.d.ts.map +1 -0
  63. package/dist/components/table/tableConsts.js +8 -0
  64. package/dist/components/table/tableConsts.js.map +1 -0
  65. package/dist/components/table/{BulkActionsDropdown.d.ts → tableControls/BulkActionsDropdown.d.ts} +1 -1
  66. package/dist/components/table/tableControls/BulkActionsDropdown.d.ts.map +1 -0
  67. package/dist/components/table/{BulkActionsDropdown.js → tableControls/BulkActionsDropdown.js} +3 -3
  68. package/dist/components/table/tableControls/BulkActionsDropdown.js.map +1 -0
  69. package/dist/components/table/{HideColumnsDropdown.d.ts → tableControls/HideColumnsDropdown.d.ts} +1 -2
  70. package/dist/components/table/tableControls/HideColumnsDropdown.d.ts.map +1 -0
  71. package/dist/components/table/{HideColumnsDropdown.js → tableControls/HideColumnsDropdown.js} +2 -2
  72. package/dist/components/table/tableControls/HideColumnsDropdown.js.map +1 -0
  73. package/dist/components/table/tableControls/TableControls.d.ts +23 -0
  74. package/dist/components/table/tableControls/TableControls.d.ts.map +1 -0
  75. package/dist/components/table/tableControls/TableControls.js +21 -0
  76. package/dist/components/table/tableControls/TableControls.js.map +1 -0
  77. package/dist/components/table/tableControls/TableControls.test.d.ts +2 -0
  78. package/dist/components/table/tableControls/TableControls.test.d.ts.map +1 -0
  79. package/dist/components/table/tableControls/TableControls.test.js +124 -0
  80. package/dist/components/table/tableControls/TableControls.test.js.map +1 -0
  81. package/dist/components/table/tableControls/TableSettingsDropdown.d.ts.map +1 -0
  82. package/dist/components/table/{TableSettingsDropdown.js → tableControls/TableSettingsDropdown.js} +7 -6
  83. package/dist/components/table/tableControls/TableSettingsDropdown.js.map +1 -0
  84. package/dist/components/table/useTableSettings.d.ts +1 -1
  85. package/dist/components/table/useTableSettings.d.ts.map +1 -1
  86. package/dist/components/table/useTableSettings.js +1 -1
  87. package/dist/components/table/useTableSettings.js.map +1 -1
  88. package/dist/index.css +19 -1
  89. package/dist/index.css.map +1 -1
  90. package/dist/index.d.ts +1 -0
  91. package/dist/index.d.ts.map +1 -1
  92. package/dist/index.js +1 -0
  93. package/dist/index.js.map +1 -1
  94. package/dist/utils/setAgGridLicenseKey.js +1 -1
  95. package/package.json +1 -1
  96. package/src/components/table/DSDefaultColDef.ts +2 -2
  97. package/src/components/table/Table.stories.tsx +202 -35
  98. package/src/components/table/Table.test.tsx +134 -8
  99. package/src/components/table/Table.tsx +12 -22
  100. package/src/components/table/TableSettingsContext.ts +15 -0
  101. package/src/components/table/cellRenderers/CheckboxCellRenderer.test.tsx +74 -0
  102. package/src/components/table/cellRenderers/CheckboxCellRenderer.tsx +28 -0
  103. package/src/components/table/table.scss +23 -1
  104. package/src/components/table/tableConsts.ts +6 -0
  105. package/src/components/table/{BulkActionsDropdown.tsx → tableControls/BulkActionsDropdown.tsx} +2 -2
  106. package/src/components/table/{HideColumnsDropdown.tsx → tableControls/HideColumnsDropdown.tsx} +2 -2
  107. package/src/components/table/tableControls/TableControls.test.tsx +150 -0
  108. package/src/components/table/tableControls/TableControls.tsx +143 -0
  109. package/src/components/table/{TableSettingsDropdown.tsx → tableControls/TableSettingsDropdown.tsx} +2 -1
  110. package/src/components/table/useTableSettings.ts +1 -1
  111. package/src/index.ts +1 -0
  112. package/src/utils/setAgGridLicenseKey.ts +1 -1
  113. package/dist/components/table/BulkActionsDropdown.d.ts.map +0 -1
  114. package/dist/components/table/BulkActionsDropdown.js.map +0 -1
  115. package/dist/components/table/HideColumnsDropdown.d.ts.map +0 -1
  116. package/dist/components/table/HideColumnsDropdown.js.map +0 -1
  117. package/dist/components/table/TableSettingsDropdown.d.ts.map +0 -1
  118. package/dist/components/table/TableSettingsDropdown.js.map +0 -1
  119. /package/dist/components/table/{TableSettingsDropdown.d.ts → tableControls/TableSettingsDropdown.d.ts} +0 -0
package/README.md CHANGED
@@ -1,38 +1,128 @@
1
- # Components for the Design System
1
+ # @arbor-education/design-system.components
2
2
 
3
- ## What components are there?
4
- Have a look at our wonderful [Storybook](https://main--68c3f2a09d95b22aa55a11e8.chromatic.com/).
3
+ The React component library for the Arbor design system. Components are built with TypeScript, styled with Sass, developed in Storybook, and tested with Vitest. This library serves millions of students and educators across the UK — handle with care.
4
+
5
+ ---
6
+
7
+ ## Storybook
8
+
9
+ The component library is documented and previewed in Storybook.
10
+
11
+ **Production Storybook** (built on every push to `main`):
12
+ https://main--68c3f2a09d95b22aa55a11e8.chromatic.com/
13
+
14
+ **Per-PR Storybook previews**: every pull request automatically triggers a Chromatic build. Once it completes, a bot will comment on your PR with links to both the Storybook preview and the Chromatic visual diff for that branch.
15
+
16
+ ---
17
+
18
+ ## Local setup
5
19
 
6
- ## Local set up
7
20
  ### Prerequisites
8
- Make sure you have [nvm](https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating) and [yarn](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable) installed
9
21
 
10
- ### Set up steps
11
- Run `nvm use`
22
+ - [nvm](https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating) for Node version management
23
+ - [yarn](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable) for package management
24
+
25
+ ### Steps
26
+
27
+ ```bash
28
+ nvm use
29
+ yarn install
30
+ yarn storybook
31
+ ```
32
+
33
+ Storybook will build and open in your browser with hot reloading ready for development.
34
+
35
+ ---
36
+
37
+ ## Commands
38
+
39
+ ### Development
40
+ | Command | Description |
41
+ |---------|-------------|
42
+ | `yarn storybook` | Start Storybook dev server on port 6006 |
43
+ | `yarn watch` | Watch mode — rebuilds and pushes to Yalc consumers on changes |
44
+
45
+ ### Building
46
+ | Command | Description |
47
+ |---------|-------------|
48
+ | `yarn build` | Full production build (TypeScript + tsc-alias + Sass) |
49
+ | `yarn tsc` | TypeScript compilation only |
50
+ | `yarn check-types` | Type check without emitting files |
51
+
52
+ ### Testing
53
+ | Command | Description |
54
+ |---------|-------------|
55
+ | `yarn test` | Run Vitest in watch mode |
56
+ | `yarn test:coverage` | Run tests once with coverage report |
57
+
58
+ ### Linting
59
+ | Command | Description |
60
+ |---------|-------------|
61
+ | `yarn style-lint` | Lint SCSS files with stylelint |
62
+
63
+ > ESLint runs automatically on staged TypeScript files via lint-staged on git commit.
64
+
65
+ ---
66
+
67
+ ## Creating a new component
68
+
69
+ Use the scaffolding script to generate all necessary files for a new component:
70
+
71
+ ```bash
72
+ yarn create-component <ComponentName>
73
+ ```
74
+
75
+ This creates `Component.tsx`, `Component.test.tsx`, `Component.stories.tsx`, and `component.scss`, and automatically adds the exports to `src/index.ts` and `src/index.scss`.
76
+
77
+ ---
78
+
79
+ ## Local development with a consumer project
80
+
81
+ This library uses [Yalc](https://github.com/wclr/yalc) for local linking.
82
+
83
+ **First time setup** — install Yalc globally:
84
+ ```bash
85
+ npm i yalc -g
86
+ ```
12
87
 
13
- Run `yarn install`
88
+ **Link the library to a consumer project:**
14
89
 
15
- Run `yarn storybook`
90
+ ```bash
91
+ # In this repo — build and publish to the local Yalc store
92
+ yarn build
93
+ yalc publish
16
94
 
17
- Storybook should then build and open a browser window with your local version, complete with all the hot reloading niceties, ready for you to start development.
95
+ # In the consumer project add the local package
96
+ yalc add @arbor-education/design-system.components
97
+ ```
18
98
 
99
+ **For active development with hot updates**, use watch mode instead:
19
100
 
20
- ## How can I create a component?
101
+ ```bash
102
+ # In this repo — automatically rebuilds and pushes to Yalc on file changes
103
+ yarn watch
104
+ ```
21
105
 
22
- In order to use the createComponent script, run the following command:
106
+ ---
23
107
 
24
- chmod +x bin/createComponent.sh
108
+ ## Version management
25
109
 
26
- Then you can create a new component by running
110
+ This library uses [Changesets](https://github.com/changesets/changesets) for versioning and changelog generation.
27
111
 
28
- npm run create-component <ComponentName>
112
+ If your change affects the public API (new components, changed props, removed exports), create a changeset before opening your PR:
29
113
 
30
- ## How can I link this package locally?
114
+ ```bash
115
+ yarn changeset
116
+ ```
31
117
 
32
- You can link this package locally using [Yalc](https://github.com/wclr/yalc). To publish new changes locally with hot loading, run:
118
+ ---
33
119
 
34
- yarn build
120
+ ## Contributing
35
121
 
36
- On the consumer project run:
122
+ Before opening a PR, please read [CONTRIBUTING.md](./CONTRIBUTING.md). Key points:
37
123
 
38
- yalc add design-system.components
124
+ - One PR, one thing — if the title needs "and" or "also", split it
125
+ - Keep meaningful code diffs under 400 lines
126
+ - All tests must pass (`yarn test:coverage`)
127
+ - All type checks must pass (`yarn check-types`)
128
+ - Use the PR template — fill in every section
@@ -14,7 +14,7 @@ export const shouldSuppressFocus = (params) => {
14
14
  if (typeof params.column !== 'object') {
15
15
  return false;
16
16
  }
17
- return params.column?.getColDef().cellRendererParams.supressCellFocusAndFocusFirstElement ?? false;
17
+ return params.column?.getColDef().cellRendererParams.suppressCellFocusAndFocusFirstElement ?? false;
18
18
  };
19
19
  export const DSDefaultColDef = {
20
20
  cellStyle: cellColorStyles,
@@ -48,7 +48,7 @@ export const DSDefaultColDef = {
48
48
  useFormatter: true,
49
49
  },
50
50
  cellClassRules: {
51
- 'ds-table__cell--supress-focus': shouldSuppressFocus,
51
+ 'ds-table__cell--suppress-focus': shouldSuppressFocus,
52
52
  },
53
53
  cellRendererParams: {
54
54
  suppressMouseEventHandling: (params) => {
@@ -1 +1 @@
1
- {"version":3,"file":"DSDefaultColDef.js","sourceRoot":"","sources":["../../../src/components/table/DSDefaultColDef.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,mEAAmE;AACnE,MAAM,cAAc,GAAG,CAAC,KAAc,EAA+B,EAAE;IACrE,OAAO,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,CAAC;AACxE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAuB,CAAC,MAAM,EAAE,EAAE;IAClE,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IACzB,IAAI,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC,KAAK,CAAC;IACrB,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,C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CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,gBAAgB,EAAE;QAChB,YAAY,EAAE,IAAI;KACnB;IACD,cAAc,EAAE;QACd,+BAA+B,EAAE,mBAAmB;KACrD;IACD,kBAAkB,EAAE;QAClB,0BAA0B,EAAE,CAAC,MAAwC,EAAE,EAAE;YACvE,IAAI,mBAAmB,CAAC,MAAM,CAAC,EAAE,CAAC;gBAChC,OAAO,IAAI,CAAC;YACd,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"DSDefaultColDef.js","sourceRoot":"","sources":["../../../src/components/table/DSDefaultColDef.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,mEAAmE;AACnE,MAAM,cAAc,GAAG,CAAC,KAAc,EAA+B,EAAE;IACrE,OAAO,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,CAAC;AACxE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAuB,CAAC,MAAM,EAAE,EAAE;IAClE,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IACzB,IAAI,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC,KAAK,CAAC;IACrB,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,MAA8E,EAAE,EAAE;IACpH,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QACtC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,kBAAkB,CAAC,qCAAqC,IAAI,KAAK,CAAC;AACtG,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAW;IACrC,SAAS,EAAE,eA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ACf,CAAC;KACF;CACF,CAAC"}
@@ -1,4 +1,3 @@
1
- import { type GridApi } from 'ag-grid-enterprise';
2
1
  import { type AgGridReactProps } from 'ag-grid-react';
3
2
  import { type ReactNode } from 'react';
4
3
  import { type UseTableSettingsParams } from './useTableSettings';
@@ -14,23 +13,8 @@ type TableProps<TData = any> = {
14
13
  'disableDragSelect'?: boolean;
15
14
  'tableTheme'?: string;
16
15
  } & UseTableSettingsParams & AgGridReactProps<TData>;
17
- export declare enum TABLE_SPACING {
18
- XS = "XS",
19
- S = "S",
20
- M = "M",
21
- L = "L"
22
- }
23
- export declare const TableSettingsContext: import("react").Context<{
24
- settings: {
25
- hasColumnBorders: boolean;
26
- tableSpacing: TABLE_SPACING;
27
- areCellColorsEnabled: boolean;
28
- };
29
- resetSettings: () => void;
30
- setHasColumnBorders: import("react").Dispatch<import("react").SetStateAction<boolean>>;
31
- setTableSpacing: import("react").Dispatch<import("react").SetStateAction<TABLE_SPACING>>;
32
- setAreCellColorsEnabled: import("react").Dispatch<import("react").SetStateAction<boolean>>;
33
- }>;
16
+ export { TABLE_SPACING } from './tableConsts';
17
+ export { TableSettingsContext } from './TableSettingsContext';
34
18
  export declare const Table: {
35
19
  (props: TableProps): import("react/jsx-runtime").JSX.Element;
36
20
  PaginationPanel: (props: {
@@ -40,22 +24,14 @@ export declare const Table: {
40
24
  PaginationControls: (props: import("./pagination/PaginationControls").PaginationControlsProps) => import("react/jsx-runtime").JSX.Element;
41
25
  RowCountInfo: (props: import("./pagination/RowCountInfo").RowCountInfoProps) => import("react/jsx-runtime").JSX.Element | null;
42
26
  BulkActionsDropdown: (props: {
43
- actions: {
44
- displayName: string;
45
- callback: (api: GridApi | null) => void;
46
- disabled?: boolean;
47
- }[];
27
+ actions: import("./tableControls/BulkActionsDropdown").BulkAction[];
48
28
  }) => import("react/jsx-runtime").JSX.Element;
49
- HideColumnsDropdown: (props: {
50
- columns?: import("ag-grid-enterprise").Column[];
51
- onSelectionChanged?: (cols: string[]) => void;
52
- overrideColumnHiding?: boolean;
53
- }) => import("react/jsx-runtime").JSX.Element | null;
29
+ HideColumnsDropdown: (props: import("./tableControls/HideColumnsDropdown").HideColumnsDropdownProps) => import("react/jsx-runtime").JSX.Element | null;
54
30
  ButtonCellRenderer: (props: import("ag-grid-react").CustomCellRendererProps<any, any, any> & {
55
31
  value: import("../button/Button").ButtonProps;
56
32
  }) => import("react/jsx-runtime").JSX.Element;
57
33
  DefaultValueFormatter: import("ag-grid-enterprise").ValueFormatterFunc<any, any, any>;
58
34
  TableSettingsDropdown: () => import("react/jsx-runtime").JSX.Element;
35
+ TableControls: (props: import("./tableControls/TableControls").TableControlsProps) => import("react/jsx-runtime").JSX.Element | null;
59
36
  };
60
- export {};
61
37
  //# sourceMappingURL=Table.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGnE,OAAO,EAAmC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAUxE,OAAO,EAAoB,KAAK,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAenF,KAAK,UAAU,CAAC,KAAK,GAAG,GAAG,IAAI;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wCAAwC,CAAC,EAAE,OAAO,CAAC;IACnD,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;C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egistry } from 'ag-grid-enterprise';
3
3
  import { AgGridReact } from 'ag-grid-react';
4
4
  import { defaultTheme } from './theme/defaultTheme';
5
5
  import classNames from 'classnames';
6
- import { createContext, useRef, useState } from 'react';
6
+ import { useRef, useState } from 'react';
7
7
  import { TableFooter } from './TableFooter';
8
8
  import { TableHeader } from './TableHeader';
9
9
  import { GridApiContext } from './GridApiContext';
@@ -11,8 +11,8 @@ import { PaginationPanel } from './pagination/PaginationPanel';
11
11
  import { PageSizeSelector } from './pagination/PageSizeSelector';
12
12
  import { PaginationControls } from './pagination/PaginationControls';
13
13
  import { RowCountInfo } from './pagination/RowCountInfo';
14
- import { BulkActionsDropdown } from './BulkActionsDropdown';
15
- import { HideColumnsDropdown } from './HideColumnsDropdown';
14
+ import { BulkActionsDropdown } from './tableControls/BulkActionsDropdown';
15
+ import { HideColumnsDropdown } from './tableControls/HideColumnsDropdown';
16
16
  import { useTableSettings } from './useTableSettings';
17
17
  import { setAgGridLicenseKey } from '../../utils/setAgGridLicenseKey';
18
18
  import { toggleRowSelectionInCurrentRange } from './toggleRowSelectionInCurrentRange';
@@ -24,28 +24,16 @@ import { tidyTheme } from './theme/tidyTheme';
24
24
  import { focusFirstFocusableElement } from '../../utils/focusFirstFocusableElement';
25
25
  import { BooleanFilter } from './columnFilters/BooleanFilter/BooleanFilter';
26
26
  import { TimeFilter } from './columnFilters/TimeFilter/TimeFilter';
27
- import { TableSettingsDropdown } from './TableSettingsDropdown';
27
+ import { TableSettingsDropdown } from './tableControls/TableSettingsDropdown';
28
+ import { TableControls } from './tableControls/TableControls';
29
+ import { TABLE_SPACING } from './tableConsts';
30
+ import { TableSettingsContext } from './TableSettingsContext';
28
31
  import { BooleanCellRenderer } from './cellRenderers/BooleanCellRenderer';
32
+ import { CheckboxCellRenderer } from './cellRenderers/CheckboxCellRenderer';
29
33
  setAgGridLicenseKey();
30
34
  ModuleRegistry.registerModules([AllEnterpriseModule]);
31
- export var TABLE_SPACING;
32
- (function (TABLE_SPACING) {
33
- TABLE_SPACING["XS"] = "XS";
34
- TABLE_SPACING["S"] = "S";
35
- TABLE_SPACING["M"] = "M";
36
- TABLE_SPACING["L"] = "L";
37
- })(TABLE_SPACING || (TABLE_SPACING = {}));
38
- export const TableSettingsContext = createContext({
39
- settings: {
40
- hasColumnBorders: false,
41
- tableSpacing: TABLE_SPACING.S,
42
- areCellColorsEnabled: true,
43
- },
44
- setTableSpacing: () => { },
45
- setHasColumnBorders: () => { },
46
- resetSettings: () => { },
47
- setAreCellColorsEnabled: () => { },
48
- });
35
+ export { TABLE_SPACING } from './tableConsts';
36
+ export { TableSettingsContext } from './TableSettingsContext';
49
37
  export const Table = (props) => {
50
38
  const { 'data-testid': testId, wrapperClassName, headerContent, headerTestId, hasSearch = true, footerContent, footerTestId, onGridReady, onTableSettingsChanged, onTableSettingsReset, onColumnBordersChanged, onTableSpacingChanged, onCellColorsChanged, enableSimultaneousRangeAndRowSelection = false, disableDragSelect = false, onCellSelectionChanged, defaultColDef = {}, context = {}, components = {}, tableTheme, onCellFocused, ...rest } = props;
51
39
  const [gridApi, setGridApi] = useState(null);
@@ -107,6 +95,7 @@ export const Table = (props) => {
107
95
  dsSelectDropdownCellRenderer: SelectDropdownCellRenderer,
108
96
  dsBooleanFilter: BooleanFilter,
109
97
  dsTimeFilter: TimeFilter,
98
+ dsCheckboxCellRenderer: CheckboxCellRenderer,
110
99
  dsBooleanCellRenderer: BooleanCellRenderer,
111
100
  ...components,
112
101
  }, ...rest, ...(hasSearch && { quickFilterText: searchValue }) }), footerContent && (_jsx(TableFooter, { "data-testid": footerTestId, children: footerContent }))] }) }) }));
@@ -120,4 +109,5 @@ Table.HideColumnsDropdown = HideColumnsDropdown;
120
109
  Table.ButtonCellRenderer = ButtonCellRenderer;
121
110
  Table.DefaultValueFormatter = defaultValueFormatter;
122
111
  Table.TableSettingsDropdown = TableSettingsDropdown;
112
+ Table.TableControls = TableControls;
123
113
  //# sourceMappingURL=Table.js.map
@@ -1 +1 @@
1
-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CAAC;AACpD,KAAK,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;AACpD,KAAK,CAAC,aAAa,GAAG,aAAa,CAAC"}
@@ -10,6 +10,9 @@ export declare const WithHeader: Story;
10
10
  export declare const WithHeaderAndNoSearch: Story;
11
11
  export declare const WithHeaderAndFooter: Story;
12
12
  export declare const WithBulkActions: Story;
13
+ export declare const WithTableControls: Story;
14
+ export declare const WithTableControlsStartGroupOnly: Story;
15
+ export declare const WithTableControlsEndGroupOnly: Story;
13
16
  export declare const WithHideColumnsDropdown: Story;
14
17
  export declare const WithRestrictedHideColumnsDropdown: Story;
15
18
  export declare const WithClientSidePagination: StoryObj<TableProps>;
@@ -25,5 +28,6 @@ export declare const TidyTable: Story;
25
28
  export declare const TableWithExplicitColours: Story;
26
29
  export declare const TableWithSemanticColors: Story;
27
30
  export declare const WithBooleanCellRenderer: Story;
31
+ export declare const WithCheckboxCellRenderer: Story;
28
32
  export default meta;
29
33
  //# sourceMappingURL=Table.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.stories.d.ts","sourceRoot":"","sources":["../../../src/components/table/Table.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAKhC,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAmBtD,KAAK,UAAU,GAAG,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC;AAE/C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAAU,CAY1B,CAAC;AAEF,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;AA6JpC,eAAO,MAAM,OAAO,EAAE,KAYrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KASxB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAoBxB,CAAC;AAEF,eAAO,MAAM,q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,MAAM,uBAAuB,EAAE,KA0DrC,CAAC;AAiCF,eAAO,MAAM,uBAAuB,EAAE,KAerC,CAAC;AAiFF,eAAO,MAAM,wBAAwB,EAAE,KAetC,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -2,13 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import {} from 'ag-grid-enterprise';
3
3
  import { Table } from './Table';
4
4
  import { Button } from '../button/Button';
5
- import { Icon } from '../icon/Icon';
6
- import { BulkActionsDropdown } from './BulkActionsDropdown';
7
5
  import { useState } from 'react';
8
6
  import { RowCountInfo } from './pagination/RowCountInfo';
9
7
  import { PaginationPanel } from './pagination/PaginationPanel';
10
- import { HideColumnsDropdown } from './HideColumnsDropdown';
11
- import { TableSettingsDropdown } from './TableSettingsDropdown';
8
+ import { HideColumnsDropdown } from './tableControls/HideColumnsDropdown';
9
+ import { TableControls } from './tableControls/TableControls';
12
10
  import { ModalManager } from '../modal/modalManager/ModalManager';
13
11
  import { Modal } from '../modal/Modal';
14
12
  import { ModalUtils } from '../../utils/ModalUtils';
@@ -138,10 +136,7 @@ const footerContent = [
138
136
  _jsx(RowCountInfo, {}, 3),
139
137
  _jsx(Button, { variant: "secondary", children: "Button 2" }, 2),
140
138
  ];
141
- const headerContent = [
142
- _jsxs("div", { style: { display: 'flex', gap: '0.5rem' }, children: [_jsx(Button, { variant: "secondary", size: "S", children: "Button 1" }, 0), _jsx(Button, { variant: "secondary", size: "S", children: "Button 2" }, 1)] }, 0),
143
- _jsxs("div", { style: { display: 'flex', gap: '1rem' }, children: [_jsx(Icon, { name: "download" }), _jsx(TableSettingsDropdown, {}), _jsx(Icon, { name: "circle-help" }), _jsx(Icon, { name: "expand" })] }, 1),
144
- ];
139
+ const headerContent = (_jsx(TableControls, { onDownload: () => console.log('download'), showSettings: true, onHelp: () => console.log('help'), onExpandToggle: expanded => console.log('expand', expanded) }));
145
140
  export const Default = {
146
141
  args: {
147
142
  rowData: sampleData,
@@ -219,23 +214,71 @@ export const WithBulkActions = {
219
214
  columnDefs: sampleColumnDefs,
220
215
  defaultColDef,
221
216
  domLayout: 'autoHeight',
222
- headerContent: [
223
- _jsx(BulkActionsDropdown, { actions: [
224
- {
225
- displayName: 'foo',
226
- callback: (gridApi) => {
227
- console.log('clicked on the foo action', gridApi);
228
- },
229
- },
230
- {
231
- displayName: 'bar',
232
- callback: (gridApi) => {
233
- console.log('clicked on the bar action', gridApi);
234
- },
235
- disabled: true,
236
- },
237
- ] }, 0),
238
- ],
217
+ headerContent: (_jsx(TableControls, { bulkActions: [
218
+ {
219
+ displayName: 'foo',
220
+ callback: (gridApi) => { console.log('clicked on the foo action', gridApi); },
221
+ },
222
+ {
223
+ displayName: 'bar',
224
+ callback: (gridApi) => { console.log('clicked on the bar action', gridApi); },
225
+ disabled: true,
226
+ },
227
+ ] })),
228
+ },
229
+ };
230
+ export const WithTableControls = {
231
+ parameters: {
232
+ docs: {
233
+ description: {
234
+ story: 'TableControls is a pre-composed toolbar that wires up the standard set of table controls. Every slot is opt-in — only pass the props for the controls you need.',
235
+ },
236
+ },
237
+ },
238
+ args: {
239
+ rowData: sampleData,
240
+ columnDefs: sampleColumnDefs,
241
+ defaultColDef,
242
+ domLayout: 'autoHeight',
243
+ headerContent: (_jsx(TableControls, { bulkActions: [
244
+ { displayName: 'Export selected', callback: api => console.log('export', api) },
245
+ { displayName: 'Delete selected', callback: api => console.log('delete', api), disabled: true },
246
+ ], onUndo: () => console.log('undo'), onRedo: () => console.log('redo'), showHideColumns: true, onDownload: () => console.log('download'), showSettings: true, onHelp: () => console.log('help'), onExpandToggle: expanded => console.log('expand', expanded) })),
247
+ },
248
+ };
249
+ export const WithTableControlsStartGroupOnly = {
250
+ parameters: {
251
+ docs: {
252
+ description: {
253
+ story: 'TableControls with only the start group rendered — bulk actions, undo, redo, and hide columns. No end group props are passed so that side is omitted entirely.',
254
+ },
255
+ },
256
+ },
257
+ args: {
258
+ rowData: sampleData,
259
+ columnDefs: sampleColumnDefs,
260
+ defaultColDef,
261
+ domLayout: 'autoHeight',
262
+ headerContent: (_jsx(TableControls, { bulkActions: [
263
+ { displayName: 'Export selected', callback: api => console.log('export', api) },
264
+ { displayName: 'Delete selected', callback: api => console.log('delete', api), disabled: true },
265
+ ], onUndo: () => console.log('undo'), onRedo: () => console.log('redo'), showHideColumns: true })),
266
+ },
267
+ };
268
+ export const WithTableControlsEndGroupOnly = {
269
+ parameters: {
270
+ docs: {
271
+ description: {
272
+ story: 'TableControls with only the end group rendered — search, download, settings, help, and expand. No start group props are passed so that side is omitted entirely.',
273
+ },
274
+ },
275
+ },
276
+ args: {
277
+ rowData: sampleData,
278
+ columnDefs: sampleColumnDefs,
279
+ defaultColDef,
280
+ domLayout: 'autoHeight',
281
+ headerContent: (_jsx(TableControls, { hasSearch: true, onDownload: () => console.log('download'), showSettings: true, onHelp: () => console.log('help'), onExpandToggle: expanded => console.log('expand', expanded) })),
239
282
  },
240
283
  };
241
284
  export const WithHideColumnsDropdown = {
@@ -349,7 +392,7 @@ const sampleColumnDefsWithButtonCellRenderer = [
349
392
  headerTooltip: 'The name of the user',
350
393
  cellRenderer: 'dsButtonCellRenderer',
351
394
  cellRendererParams: {
352
- supressCellFocusAndFocusFirstElement: true,
395
+ suppressCellFocusAndFocusFirstElement: true,
353
396
  },
354
397
  editable: false,
355
398
  },
@@ -608,7 +651,7 @@ export const WithInlineTextCellRenderer = {
608
651
  field: 'name',
609
652
  cellRenderer: 'dsInlineTextCellRenderer',
610
653
  cellRendererParams: {
611
- supressCellFocusAndFocusFirstElement: true,
654
+ suppressCellFocusAndFocusFirstElement: true,
612
655
  suppressCount: true,
613
656
  suppressDoubleClickExpand: true,
614
657
  suppressEnterExpand: true,
@@ -947,7 +990,7 @@ export const TidyTable = {
947
990
  editable: false,
948
991
  cellRenderer: 'agGroupCellRenderer',
949
992
  cellRendererParams: {
950
- supressCellFocusAndFocusFirstElement: true,
993
+ suppressCellFocusAndFocusFirstElement: true,
951
994
  suppressCount: true,
952
995
  suppressDoubleClickExpand: true,
953
996
  suppressEnterExpand: true,
@@ -1169,5 +1212,97 @@ export const WithBooleanCellRenderer = {
1169
1212
  domLayout: 'autoHeight',
1170
1213
  },
1171
1214
  };
1215
+ const checkboxRowData = [
1216
+ {
1217
+ id: 1,
1218
+ name: { value: 'Alice Johnson' },
1219
+ email: { value: 'alice.johnson@example.com' },
1220
+ role: { value: 'Developer' },
1221
+ attended: true,
1222
+ consented: false,
1223
+ },
1224
+ {
1225
+ id: 2,
1226
+ name: { value: 'Bob Smith' },
1227
+ email: { value: 'bob.smith@example.com' },
1228
+ role: { value: 'Designer' },
1229
+ attended: false,
1230
+ consented: true,
1231
+ },
1232
+ {
1233
+ id: 3,
1234
+ name: { value: 'Charlie Brown' },
1235
+ email: { value: 'charlie.brown@example.com' },
1236
+ role: { value: 'Manager' },
1237
+ attended: true,
1238
+ consented: true,
1239
+ },
1240
+ {
1241
+ id: 4,
1242
+ name: { value: 'Diana Prince' },
1243
+ email: { value: 'diana.prince@example.com' },
1244
+ role: { value: 'Developer' },
1245
+ attended: false,
1246
+ consented: false,
1247
+ },
1248
+ {
1249
+ id: 5,
1250
+ name: { value: 'Ethan Hunt' },
1251
+ email: { value: 'ethan.hunt@example.com' },
1252
+ role: { value: 'Analyst' },
1253
+ attended: true,
1254
+ consented: false,
1255
+ },
1256
+ ];
1257
+ const checkboxColumnDefs = [
1258
+ {
1259
+ field: 'name',
1260
+ headerName: 'Name',
1261
+ valueFormatter: Table.DefaultValueFormatter,
1262
+ },
1263
+ {
1264
+ field: 'email',
1265
+ headerName: 'Email',
1266
+ valueFormatter: Table.DefaultValueFormatter,
1267
+ },
1268
+ {
1269
+ field: 'role',
1270
+ headerName: 'Role',
1271
+ valueFormatter: Table.DefaultValueFormatter,
1272
+ },
1273
+ {
1274
+ field: 'attended',
1275
+ headerName: 'Attended',
1276
+ cellRenderer: 'dsCheckboxCellRenderer',
1277
+ cellRendererParams: {
1278
+ suppressCellFocusAndFocusFirstElement: true,
1279
+ },
1280
+ editable: false,
1281
+ },
1282
+ {
1283
+ field: 'consented',
1284
+ headerName: 'Consented',
1285
+ cellRenderer: 'dsCheckboxCellRenderer',
1286
+ cellRendererParams: {
1287
+ suppressCellFocusAndFocusFirstElement: true,
1288
+ },
1289
+ editable: false,
1290
+ },
1291
+ ];
1292
+ export const WithCheckboxCellRenderer = {
1293
+ parameters: {
1294
+ docs: {
1295
+ description: {
1296
+ story: 'The CheckboxCellRenderer renders a checkbox input inside a table cell. Pass a boolean value to the cell data to control the checked state.',
1297
+ },
1298
+ },
1299
+ },
1300
+ args: {
1301
+ rowData: checkboxRowData,
1302
+ columnDefs: checkboxColumnDefs,
1303
+ defaultColDef,
1304
+ domLayout: 'autoHeight',
1305
+ },
1306
+ };
1172
1307
  export default meta;
1173
1308
  //# sourceMappingURL=Table.stories.js.map