@worknice/whiteboard 0.52.0 → 0.53.0

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 (75) hide show
  1. package/dist/{presentation/TableColumnFilterModal.d.ts → controls/FilterModal.d.ts} +10 -3
  2. package/dist/{presentation/TableColumnFilterModal.js → controls/FilterModal.js} +32 -32
  3. package/dist/controls/FilterModal.module.js +13 -0
  4. package/dist/controls/FilterModal_module.css +60 -0
  5. package/dist/controls/MenuButton.js +1 -1
  6. package/dist/icons/MessagesIcon.d.ts +3 -0
  7. package/dist/icons/MessagesIcon.js +11 -0
  8. package/dist/icons/SlidersIcon.d.ts +3 -0
  9. package/dist/icons/SlidersIcon.js +12 -0
  10. package/dist/icons/WarningIcon.js +3 -3
  11. package/dist/icons/index.d.ts +2 -0
  12. package/dist/icons/index.js +3 -1
  13. package/dist/presentation/CustomizableTable/CustomizableTable.d.ts +2 -2
  14. package/dist/presentation/CustomizableTable/CustomizableTable.js +9 -7
  15. package/dist/presentation/RichList/RichList.d.ts +150 -0
  16. package/dist/presentation/RichList/RichList.js +507 -0
  17. package/dist/presentation/RichList/RichList.module.js +12 -0
  18. package/dist/presentation/RichList/RichList.stories.d.ts +24 -0
  19. package/dist/presentation/RichList/RichList.stories.js +334 -0
  20. package/dist/presentation/RichList/RichListBulkActionBar.d.ts +21 -0
  21. package/dist/presentation/RichList/RichListBulkActionBar.js +112 -0
  22. package/dist/presentation/RichList/RichListBulkActionBar.module.js +7 -0
  23. package/dist/presentation/RichList/RichListBulkActionBar_module.css +18 -0
  24. package/dist/presentation/RichList/RichListDisplayModal.d.ts +33 -0
  25. package/dist/presentation/RichList/RichListDisplayModal.js +198 -0
  26. package/dist/presentation/RichList/RichListRow.d.ts +39 -0
  27. package/dist/presentation/RichList/RichListRow.js +278 -0
  28. package/dist/presentation/RichList/RichListRow.module.js +34 -0
  29. package/dist/presentation/RichList/RichListRow_module.css +313 -0
  30. package/dist/presentation/RichList/RichListToolbar.d.ts +21 -0
  31. package/dist/presentation/RichList/RichListToolbar.js +104 -0
  32. package/dist/presentation/RichList/RichListToolbar.module.js +12 -0
  33. package/dist/presentation/RichList/RichListToolbar_module.css +100 -0
  34. package/dist/presentation/RichList/RichList_module.css +77 -0
  35. package/dist/presentation/RichList/helpers.d.ts +77 -0
  36. package/dist/presentation/RichList/helpers.js +121 -0
  37. package/dist/presentation/RichList/stories/ComplianceGroups.d.ts +9 -0
  38. package/dist/presentation/RichList/stories/ComplianceGroups.js +141 -0
  39. package/dist/presentation/RichList/stories/CustomFields.d.ts +13 -0
  40. package/dist/presentation/RichList/stories/CustomFields.js +80 -0
  41. package/dist/presentation/RichList/stories/EmployeeCompliance.d.ts +15 -0
  42. package/dist/presentation/RichList/stories/EmployeeCompliance.js +300 -0
  43. package/dist/presentation/RichList/stories/EmployeePaperwork.d.ts +21 -0
  44. package/dist/presentation/RichList/stories/EmployeePaperwork.js +225 -0
  45. package/dist/presentation/RichList/stories/EmployeePeople.d.ts +10 -0
  46. package/dist/presentation/RichList/stories/EmployeePeople.js +170 -0
  47. package/dist/presentation/RichList/stories/Leave.d.ts +21 -0
  48. package/dist/presentation/RichList/stories/Leave.js +332 -0
  49. package/dist/presentation/RichList/stories/Paperwork.d.ts +22 -0
  50. package/dist/presentation/RichList/stories/Paperwork.js +446 -0
  51. package/dist/presentation/RichList/stories/PaperworkApprovals.d.ts +23 -0
  52. package/dist/presentation/RichList/stories/PaperworkApprovals.js +342 -0
  53. package/dist/presentation/RichList/stories/PeopleList.d.ts +19 -0
  54. package/dist/presentation/RichList/stories/PeopleList.js +391 -0
  55. package/dist/presentation/RichList/stories/PeopleTags.d.ts +14 -0
  56. package/dist/presentation/RichList/stories/PeopleTags.js +106 -0
  57. package/dist/presentation/RichList/stories/Positions.d.ts +22 -0
  58. package/dist/presentation/RichList/stories/Positions.js +519 -0
  59. package/dist/presentation/RichList/stories/SavedQuestions.d.ts +13 -0
  60. package/dist/presentation/RichList/stories/SavedQuestions.js +152 -0
  61. package/dist/presentation/RichList/stories/Tables.d.ts +9 -0
  62. package/dist/presentation/RichList/stories/Tables.js +85 -0
  63. package/dist/presentation/RichList/stories/Tasks.d.ts +16 -0
  64. package/dist/presentation/RichList/stories/Tasks.js +340 -0
  65. package/dist/presentation/RichList/stories/shared/bulkActionStubs.d.ts +9 -0
  66. package/dist/presentation/RichList/stories/shared/bulkActionStubs.js +122 -0
  67. package/dist/presentation/RichList/stories/shared.d.ts +8 -0
  68. package/dist/presentation/RichList/stories/shared.js +2 -0
  69. package/dist/presentation/RichList/types.d.ts +342 -0
  70. package/dist/presentation/RichList/types.js +0 -0
  71. package/dist/presentation/Table.d.ts +1 -1
  72. package/dist/presentation/Table.js +2 -2
  73. package/dist/presentation/Table.module.js +0 -10
  74. package/dist/presentation/Table_module.css +1 -61
  75. package/package.json +2 -2
@@ -0,0 +1,77 @@
1
+ import type { Row } from "@tanstack/react-table";
2
+ import { type NormalizedSlot, type NormalizedTextField, type RichListContentSlot, type RichListSlotSize, type RichListTextField } from "./types";
3
+ export declare const isToggleableContentColumn: <Type>(entry: NormalizedTextField<Type> | NormalizedSlot<Type> | null) => entry is NormalizedSlot<Type>;
4
+ /**
5
+ * Whether this column’s visibility is stored (toggleable content, or `hiddenByDefault`
6
+ * without a user toggle).
7
+ */
8
+ export declare const isColumnWithVisibilityState: <Type>(entry: NormalizedTextField<Type> | NormalizedSlot<Type> | null) => boolean;
9
+ export declare const formatSlotSize: (size: RichListSlotSize) => string;
10
+ /**
11
+ * Default **`RichList` `compactBreakpoint`** (list scope width in px): at or below this,
12
+ * measured on the list scope only (`listScopeRef` `clientWidth` via `ResizeObserver` —
13
+ * the whole list, head and rows together), the list is "compact". `compactBreakpoint`
14
+ * is the **only** width guardrail in `RichList`; everything narrow / mobile-flavoured
15
+ * cascades from this single threshold.
16
+ *
17
+ * Effects of being at/under `compactBreakpoint`:
18
+ *
19
+ * - `compactSize` is used instead of `size` when set (leading, content, trailing).
20
+ * - Main-slot `prefixOnWide` / `suffixOnWide` are hidden via `rowListAtCompactBreakpoint`.
21
+ * - Slots / text fields with `layoutVisibility: "whenWide"` are hidden, and ones with
22
+ * `"whenCompact"` become visible.
23
+ * - If no content slot is visible at compact (none have `layoutVisibility` `"always"`
24
+ * or `"whenCompact"`), the whole middle content-slot strip is hidden (`rowMainCompact`).
25
+ * - Hover-only controls (row checkbox lane, toolbar select-all) are shown by default;
26
+ * toolbar button labels collapse to icons. CSS rules are keyed off the
27
+ * `data-richlist-compact` attribute that JS sets on `.richListQueryScope` from
28
+ * `isCompactContentSlots` (driven by this prop).
29
+ * - The Display dialog's column-visibility section is hidden (no room).
30
+ */
31
+ export declare const RICH_LIST_CONTENT_COMPACT_MAX_PX = 1024;
32
+ export declare const ROW_HEIGHT_PRESETS: {
33
+ readonly small: 56;
34
+ readonly medium: 72;
35
+ readonly large: 104;
36
+ };
37
+ /**
38
+ * Horizontal padding (px) applied across the whole list (toolbar, rows, empty state)
39
+ * at each row height preset. Forwarded as the `--richlist-padding-inline` custom
40
+ * property and consumed by `RichList.module.css`, `RichListRow.module.css`, and
41
+ * `RichListToolbar.module.css` so head and body share the same gutter.
42
+ */
43
+ export declare const RICH_LIST_INLINE_PAD_PRESET_PX: {
44
+ [K in keyof typeof ROW_HEIGHT_PRESETS]: number;
45
+ };
46
+ export declare const richListInlinePaddingPx: (rowHeight: number | keyof typeof ROW_HEIGHT_PRESETS) => number;
47
+ export declare const SELECT_COLUMN_ID = "_richListSelect";
48
+ export declare const normalizeTextField: <Type>(field: RichListTextField<Type>, position: "primary" | "secondary") => NormalizedTextField<Type>;
49
+ /**
50
+ * Accepts the wider `RichListContentSlot` shape so leading/trailing `RichListSlot`
51
+ * values (which omit the content-only options) are also assignable. `position`
52
+ * controls which fields are honoured: the content-only options are forced to their
53
+ * inert defaults for leading/trailing.
54
+ *
55
+ * `positionIndex` is the index within its position group (e.g. the i-th leading slot
56
+ * when `leadingSlot` is an array). Used for fallback ids on function-form slots and
57
+ * stored on the normalized shape for debugging.
58
+ */
59
+ export declare const normalizeSlot: <Type>(slot: RichListContentSlot<Type>, position: "leading" | "content" | "trailing", positionIndex?: number) => NormalizedSlot<Type>;
60
+ /**
61
+ * Whether a slot or text field renders at the current list-width compact state.
62
+ *
63
+ * - `"always"` — render at any list width.
64
+ * - `"whenWide"` — render only when **not** at compact (`isCompactContentSlots === false`).
65
+ * - `"whenCompact"` — render only at/under `compactBreakpoint` (`isCompactContentSlots === true`).
66
+ */
67
+ export declare const isVisibleAtBreakpoint: (layoutVisibility: NormalizedSlot<unknown>["layoutVisibility"], isCompactContentSlots: boolean) => boolean;
68
+ type CsvColumn = {
69
+ id: string;
70
+ header?: string;
71
+ };
72
+ /**
73
+ * Blob + object URL (not a `data:` URL) so multiline CSV is not mangled. Table keeps
74
+ * `handleDownloadCsv` in `utils/tables` for regression stability.
75
+ */
76
+ export declare const handleDownloadCsv: <Type>(csvFilename: string | undefined, columns: CsvColumn[], rows: Row<Type>[]) => void;
77
+ export {};
@@ -0,0 +1,121 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE__utils_encodeCsv_js_bae5629c__ from "../../utils/encodeCsv.js";
2
+ const isNormalizedSlot = (entry)=>null !== entry && "align" in entry;
3
+ const isToggleableContentColumn = (entry)=>isNormalizedSlot(entry) && "content" === entry.position && entry.canToggleVisibility && "string" == typeof entry.label && entry.label.length > 0;
4
+ const isColumnWithVisibilityState = (entry)=>{
5
+ if (null === entry) return false;
6
+ if (!isNormalizedSlot(entry)) return false;
7
+ if (isToggleableContentColumn(entry)) return true;
8
+ const slot = entry;
9
+ return slot.hiddenByDefault && !slot.canToggleVisibility;
10
+ };
11
+ const formatSlotSize = (size)=>"number" == typeof size ? `${size}px` : size;
12
+ const RICH_LIST_CONTENT_COMPACT_MAX_PX = 1024;
13
+ const ROW_HEIGHT_PRESETS = {
14
+ small: 56,
15
+ medium: 72,
16
+ large: 104
17
+ };
18
+ const RICH_LIST_INLINE_PAD_PRESET_PX = {
19
+ small: 12,
20
+ medium: 16,
21
+ large: 20
22
+ };
23
+ const richListInlinePaddingPx = (rowHeight)=>{
24
+ if ("number" != typeof rowHeight) return RICH_LIST_INLINE_PAD_PRESET_PX[rowHeight];
25
+ if (rowHeight < 1) return RICH_LIST_INLINE_PAD_PRESET_PX.small;
26
+ if (rowHeight <= 60) return RICH_LIST_INLINE_PAD_PRESET_PX.small;
27
+ if (rowHeight < 88) return RICH_LIST_INLINE_PAD_PRESET_PX.medium;
28
+ return RICH_LIST_INLINE_PAD_PRESET_PX.large;
29
+ };
30
+ const SELECT_COLUMN_ID = "_richListSelect";
31
+ const normalizeTextField = (field, position)=>{
32
+ if ("function" == typeof field) return {
33
+ id: `_richList_${position}`,
34
+ position,
35
+ render: field,
36
+ globalFiltering: false,
37
+ csvExport: false,
38
+ layoutVisibility: "always"
39
+ };
40
+ return {
41
+ id: `_richList_${position}`,
42
+ position,
43
+ label: field.label,
44
+ value: field.value,
45
+ render: field.render,
46
+ prefixOnWide: field.prefixOnWide,
47
+ suffixOnWide: field.suffixOnWide,
48
+ filter: field.filter,
49
+ globalFiltering: field.globalFiltering ?? void 0 !== field.value,
50
+ csvExport: field.csvExport ?? false,
51
+ layoutVisibility: field.layoutVisibility ?? "always"
52
+ };
53
+ };
54
+ const normalizeSlot = (slot, position, positionIndex)=>{
55
+ if ("function" == typeof slot) {
56
+ const fallbackId = "content" === position ? `_richList_content_${positionIndex ?? 0}` : void 0 !== positionIndex && positionIndex > 0 ? `_richList_${position}_${positionIndex}` : `_richList_${position}`;
57
+ return {
58
+ id: fallbackId,
59
+ position,
60
+ positionIndex,
61
+ render: slot,
62
+ layoutVisibility: "always",
63
+ columnWidthMode: "shrinkable",
64
+ align: "trailing" === position ? "end" : "start",
65
+ globalFiltering: false,
66
+ canToggleVisibility: false,
67
+ hiddenByDefault: false,
68
+ csvExport: false
69
+ };
70
+ }
71
+ return {
72
+ id: slot.id,
73
+ position,
74
+ positionIndex,
75
+ label: slot.label,
76
+ value: slot.value,
77
+ render: slot.render,
78
+ layoutVisibility: slot.layoutVisibility ?? "always",
79
+ columnWidthMode: "content" === position ? slot.columnWidthMode ?? "shrinkable" : "shrinkable",
80
+ align: slot.align ?? ("trailing" === position ? "end" : "start"),
81
+ size: slot.size,
82
+ compactSize: slot.compactSize,
83
+ filter: slot.filter,
84
+ globalFiltering: slot.globalFiltering ?? void 0 !== slot.value,
85
+ canToggleVisibility: "content" === position && true === slot.canToggleVisibility,
86
+ hiddenByDefault: slot.hiddenByDefault ?? false,
87
+ csvExport: slot.csvExport ?? false
88
+ };
89
+ };
90
+ const isVisibleAtBreakpoint = (layoutVisibility, isCompactContentSlots)=>{
91
+ switch(layoutVisibility){
92
+ case "always":
93
+ return true;
94
+ case "whenWide":
95
+ return !isCompactContentSlots;
96
+ case "whenCompact":
97
+ return isCompactContentSlots;
98
+ }
99
+ };
100
+ const handleDownloadCsv = (csvFilename, columns, rows)=>{
101
+ if (!csvFilename) return;
102
+ const csvContent = (0, __WEBPACK_EXTERNAL_MODULE__utils_encodeCsv_js_bae5629c__["default"])([
103
+ columns.map((col)=>col.header),
104
+ ...rows.map((row)=>columns.map((col)=>row.getValue(col.id)))
105
+ ]);
106
+ const blob = new Blob([
107
+ csvContent
108
+ ], {
109
+ type: "text/csv;charset=utf-8"
110
+ });
111
+ const objectUrl = URL.createObjectURL(blob);
112
+ const a = document.createElement("a");
113
+ a.href = objectUrl;
114
+ a.download = csvFilename.endsWith(".csv") ? csvFilename : `${csvFilename}.csv`;
115
+ a.style.display = "none";
116
+ document.body.appendChild(a);
117
+ a.click();
118
+ document.body.removeChild(a);
119
+ URL.revokeObjectURL(objectUrl);
120
+ };
121
+ export { RICH_LIST_CONTENT_COMPACT_MAX_PX, RICH_LIST_INLINE_PAD_PRESET_PX, ROW_HEIGHT_PRESETS, SELECT_COLUMN_ID, formatSlotSize, handleDownloadCsv, isColumnWithVisibilityState, isToggleableContentColumn, isVisibleAtBreakpoint, normalizeSlot, normalizeTextField, richListInlinePaddingPx };
@@ -0,0 +1,9 @@
1
+ import { type CommonProps } from "./shared";
2
+ export type ComplianceGroupsRow = {
3
+ id: string;
4
+ title: string;
5
+ requirementsCount: number;
6
+ enrolmentsCount: number;
7
+ };
8
+ declare const ComplianceGroupsList: ({ compactBreakpoint, contentAlignment, rowHeight }: CommonProps) => import("react/jsx-runtime").JSX.Element;
9
+ export default ComplianceGroupsList;
@@ -0,0 +1,141 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
2
+ import * as __WEBPACK_EXTERNAL_MODULE__HStack_js_d2f77bae__ from "../../HStack.js";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__ from "../../Icon.js";
4
+ import * as __WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__ from "../../PlainText.js";
5
+ import * as __WEBPACK_EXTERNAL_MODULE__RichList_js_64f3f04c__ from "../RichList.js";
6
+ function requirementsLabel(n) {
7
+ return 1 === n ? "1 requirement" : `${n} requirements`;
8
+ }
9
+ function enrolmentsLabel(n) {
10
+ return 1 === n ? "1 enrolment" : `${n} enrolments`;
11
+ }
12
+ const groups = [
13
+ {
14
+ id: "cg1",
15
+ title: "Company Policies",
16
+ requirementsCount: 9,
17
+ enrolmentsCount: 40
18
+ },
19
+ {
20
+ id: "cg2",
21
+ title: "Annual Security Training",
22
+ requirementsCount: 2,
23
+ enrolmentsCount: 12
24
+ },
25
+ {
26
+ id: "cg3",
27
+ title: "Employment Compliance",
28
+ requirementsCount: 6,
29
+ enrolmentsCount: 1
30
+ },
31
+ {
32
+ id: "cg4",
33
+ title: "Pre-boarding",
34
+ requirementsCount: 8,
35
+ enrolmentsCount: 1
36
+ },
37
+ {
38
+ id: "cg5",
39
+ title: "NDIS Worker Screening",
40
+ requirementsCount: 9,
41
+ enrolmentsCount: 2
42
+ },
43
+ {
44
+ id: "cg6",
45
+ title: "Offboarding",
46
+ requirementsCount: 1,
47
+ enrolmentsCount: 1
48
+ },
49
+ {
50
+ id: "cg7",
51
+ title: "Rem Adjustment",
52
+ requirementsCount: 0,
53
+ enrolmentsCount: 0
54
+ },
55
+ {
56
+ id: "cg8",
57
+ title: "Onboarding",
58
+ requirementsCount: 14,
59
+ enrolmentsCount: 2
60
+ },
61
+ {
62
+ id: "cg9",
63
+ title: "New Hire Induction",
64
+ requirementsCount: 4,
65
+ enrolmentsCount: 2
66
+ }
67
+ ];
68
+ const rowActions = ()=>[
69
+ {
70
+ id: "view",
71
+ label: "View group",
72
+ icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__["default"], {
73
+ symbol: "Visible"
74
+ }),
75
+ alwaysVisible: false,
76
+ onClick: ()=>void 0
77
+ },
78
+ {
79
+ id: "edit",
80
+ label: "Edit",
81
+ icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__["default"], {
82
+ symbol: "Edit"
83
+ }),
84
+ alwaysVisible: false,
85
+ onClick: ()=>void 0
86
+ }
87
+ ];
88
+ const ComplianceGroupsList = ({ compactBreakpoint, contentAlignment, rowHeight })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__RichList_js_64f3f04c__["default"], {
89
+ compactBreakpoint: compactBreakpoint,
90
+ contentAlignment: contentAlignment,
91
+ data: groups,
92
+ enableSorting: false,
93
+ fillContainerHeight: true,
94
+ getRowId: (r)=>r.id,
95
+ href: ()=>"#",
96
+ rowActions: rowActions,
97
+ rowHeight: rowHeight,
98
+ mainSlot: {
99
+ primary: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__["default"], {
100
+ font: "regular-bold",
101
+ children: r.title
102
+ }),
103
+ secondary: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__HStack_js_d2f77bae__["default"], {
104
+ spacing: "n2",
105
+ align: "center",
106
+ tagName: "div",
107
+ children: [
108
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__["default"], {
109
+ symbol: "AssignmentDocument",
110
+ size: "small",
111
+ tone: "muted"
112
+ }),
113
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__["default"], {
114
+ font: "small",
115
+ tone: "muted",
116
+ children: requirementsLabel(r.requirementsCount)
117
+ })
118
+ ]
119
+ })
120
+ },
121
+ trailingSlot: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__HStack_js_d2f77bae__["default"], {
122
+ spacing: "n2",
123
+ align: "center",
124
+ justify: "end",
125
+ tagName: "div",
126
+ children: [
127
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__["default"], {
128
+ symbol: "People",
129
+ size: "small",
130
+ tone: "muted"
131
+ }),
132
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__["default"], {
133
+ font: "small",
134
+ tone: "muted",
135
+ children: enrolmentsLabel(r.enrolmentsCount)
136
+ })
137
+ ]
138
+ })
139
+ });
140
+ const ComplianceGroups_rslib_entry_ = ComplianceGroupsList;
141
+ export { ComplianceGroups_rslib_entry_ as default };
@@ -0,0 +1,13 @@
1
+ import type { ComponentProps } from "react";
2
+ import Badge from "../../Badge";
3
+ import { type CommonProps } from "./shared";
4
+ type BadgeColor = NonNullable<ComponentProps<typeof Badge>["color"]>;
5
+ export type CustomFieldsRow = {
6
+ id: string;
7
+ name: string;
8
+ description: string;
9
+ fieldTypeLabel: string;
10
+ fieldTypeColor: BadgeColor;
11
+ };
12
+ declare const CustomFieldsList: ({ compactBreakpoint, contentAlignment, rowHeight }: CommonProps) => import("react/jsx-runtime").JSX.Element;
13
+ export default CustomFieldsList;
@@ -0,0 +1,80 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
2
+ import * as __WEBPACK_EXTERNAL_MODULE__Badge_js_56d6dba9__ from "../../Badge.js";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__ from "../../Icon.js";
4
+ import * as __WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__ from "../../PlainText.js";
5
+ import * as __WEBPACK_EXTERNAL_MODULE__RichList_js_64f3f04c__ from "../RichList.js";
6
+ const fields = [
7
+ {
8
+ id: "cf1",
9
+ name: "Probation date",
10
+ description: "The date an employee's probationary period ends.",
11
+ fieldTypeLabel: "Date",
12
+ fieldTypeColor: "blue"
13
+ },
14
+ {
15
+ id: "cf2",
16
+ name: "Salary sacrifice",
17
+ description: "Amount deducted from pre-tax salary for benefits.",
18
+ fieldTypeLabel: "Number",
19
+ fieldTypeColor: "green"
20
+ },
21
+ {
22
+ id: "cf3",
23
+ name: "Department",
24
+ description: "The primary department or division the employee belongs to.",
25
+ fieldTypeLabel: "Single choice",
26
+ fieldTypeColor: "purple"
27
+ },
28
+ {
29
+ id: "cf4",
30
+ name: "Cost centre",
31
+ description: "Financial code for expense allocation.",
32
+ fieldTypeLabel: "Single choice",
33
+ fieldTypeColor: "purple"
34
+ }
35
+ ];
36
+ const rowActions = ()=>[
37
+ {
38
+ id: "more",
39
+ label: "Field actions",
40
+ icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_b85e52f7__["default"], {
41
+ symbol: "Edit"
42
+ }),
43
+ alwaysVisible: false,
44
+ onClick: ()=>void 0
45
+ }
46
+ ];
47
+ const CustomFieldsList = ({ compactBreakpoint, contentAlignment, rowHeight })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__RichList_js_64f3f04c__["default"], {
48
+ compactBreakpoint: compactBreakpoint,
49
+ contentAlignment: contentAlignment,
50
+ data: fields,
51
+ enableSorting: false,
52
+ fillContainerHeight: true,
53
+ getRowId: (r)=>r.id,
54
+ rowActions: rowActions,
55
+ rowHeight: rowHeight,
56
+ mainSlot: {
57
+ primary: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__["default"], {
58
+ font: "regular-bold",
59
+ children: r.name
60
+ }),
61
+ secondary: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_acfb96d1__["default"], {
62
+ font: "small",
63
+ tone: "muted",
64
+ children: r.description
65
+ })
66
+ },
67
+ trailingSlot: (r)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
68
+ style: {
69
+ display: "flex",
70
+ justifyContent: "flex-end"
71
+ },
72
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Badge_js_56d6dba9__["default"], {
73
+ id: `${r.id}-type`,
74
+ color: r.fieldTypeColor,
75
+ children: r.fieldTypeLabel
76
+ })
77
+ })
78
+ });
79
+ const CustomFields_rslib_entry_ = CustomFieldsList;
80
+ export { CustomFields_rslib_entry_ as default };
@@ -0,0 +1,15 @@
1
+ import type { ComponentProps } from "react";
2
+ import Badge from "../../Badge";
3
+ import { type CommonProps } from "./shared";
4
+ type NameBadgeColor = NonNullable<ComponentProps<typeof Badge>["color"]>;
5
+ export type EmployeeComplianceRow = {
6
+ id: string;
7
+ title: string;
8
+ statusBadge: {
9
+ text: string;
10
+ color: NameBadgeColor;
11
+ };
12
+ statusDetail: string;
13
+ };
14
+ declare const EmployeeComplianceList: ({ compactBreakpoint, contentAlignment, rowHeight, enableSorting, }: CommonProps) => import("react/jsx-runtime").JSX.Element;
15
+ export default EmployeeComplianceList;