@indico-data/design-system 3.17.0 → 3.19.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 (98) hide show
  1. package/lib/components/floatUI/FloatUI.d.ts +1 -1
  2. package/lib/components/floatUI/types.d.ts +2 -0
  3. package/lib/components/forms/date/datePicker/types.d.ts +7 -0
  4. package/lib/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.d.ts +3 -0
  5. package/lib/components/forms/date/iconTriggerDatePicker/types.d.ts +5 -0
  6. package/lib/components/forms/date/inputDatePicker/SingleInputDatePicker.d.ts +2 -1
  7. package/lib/components/forms/date/inputDateRangePicker/InputDateRangePicker.d.ts +3 -0
  8. package/lib/components/forms/date/inputDateRangePicker/types.d.ts +7 -0
  9. package/lib/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.d.ts +2 -1
  10. package/lib/components/forms/select/Select.d.ts +3 -1
  11. package/lib/components/forms/select/types.d.ts +10 -0
  12. package/lib/components/forms/subcomponents/Label.d.ts +4 -0
  13. package/lib/components/forms/subcomponents/types.d.ts +5 -0
  14. package/lib/components/forms/timePicker/TimePicker.d.ts +4 -1
  15. package/lib/components/forms/timePicker/types.d.ts +5 -0
  16. package/lib/components/modal/ConfirmationModal.d.ts +1 -1
  17. package/lib/components/modal/Modal.d.ts +1 -1
  18. package/lib/components/modal/Modal.stories.d.ts +4 -0
  19. package/lib/components/modal/types.d.ts +19 -5
  20. package/lib/components/pagination/Pagination.d.ts +1 -1
  21. package/lib/components/pagination/index.d.ts +1 -0
  22. package/lib/components/pagination/types.d.ts +13 -0
  23. package/lib/components/stepper/Stepper.d.ts +1 -1
  24. package/lib/components/stepper/components/BackNavigation.d.ts +2 -1
  25. package/lib/components/stepper/components/NextNavigation.d.ts +3 -1
  26. package/lib/components/stepper/types.d.ts +11 -0
  27. package/lib/components/table/LoadingComponent.d.ts +5 -1
  28. package/lib/components/table/components/HorizontalStickyHeader.d.ts +4 -1
  29. package/lib/components/table/hooks/usePinnedColumnsManager.d.ts +2 -2
  30. package/lib/components/table/types.d.ts +18 -0
  31. package/lib/components/table/utils/processColumns.d.ts +2 -2
  32. package/lib/components/tanstackTable/TankstackTable.types.d.ts +19 -2
  33. package/lib/components/tanstackTable/TanstackTable.d.ts +1 -1
  34. package/lib/components/tanstackTable/components/NoResults/NoResults.d.ts +2 -1
  35. package/lib/components/tanstackTable/components/TablePagination/TablePagination.d.ts +3 -1
  36. package/lib/index.d.ts +146 -24
  37. package/lib/index.esm.js +135 -63
  38. package/lib/index.esm.js.map +1 -1
  39. package/lib/index.js +135 -63
  40. package/lib/index.js.map +1 -1
  41. package/package.json +1 -1
  42. package/src/components/button/Button.tsx +4 -18
  43. package/src/components/button/__tests__/Button.test.tsx +30 -28
  44. package/src/components/floatUI/FloatUI.stories.tsx +14 -0
  45. package/src/components/floatUI/FloatUI.tsx +5 -0
  46. package/src/components/floatUI/types.ts +2 -0
  47. package/src/components/forms/date/datePicker/DatePicker.stories.tsx +10 -0
  48. package/src/components/forms/date/datePicker/DatePicker.tsx +9 -2
  49. package/src/components/forms/date/datePicker/types.ts +8 -0
  50. package/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.stories.tsx +10 -0
  51. package/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.tsx +12 -1
  52. package/src/components/forms/date/iconTriggerDatePicker/types.ts +5 -0
  53. package/src/components/forms/date/inputDatePicker/SingleInputDatePicker.tsx +4 -3
  54. package/src/components/forms/date/inputDatePicker/__tests__/SingleInputDatePicker.test.tsx +2 -0
  55. package/src/components/forms/date/inputDateRangePicker/InputDateRangePicker.stories.tsx +10 -0
  56. package/src/components/forms/date/inputDateRangePicker/InputDateRangePicker.tsx +14 -2
  57. package/src/components/forms/date/inputDateRangePicker/types.ts +7 -0
  58. package/src/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.tsx +3 -2
  59. package/src/components/forms/input/Input.tsx +1 -0
  60. package/src/components/forms/numberInput/NumberInput.tsx +1 -0
  61. package/src/components/forms/passwordInput/PasswordInput.tsx +7 -1
  62. package/src/components/forms/select/Select.stories.tsx +6 -5
  63. package/src/components/forms/select/Select.tsx +15 -1
  64. package/src/components/forms/select/types.ts +11 -0
  65. package/src/components/forms/subcomponents/Label.tsx +20 -3
  66. package/src/components/forms/subcomponents/types.ts +5 -0
  67. package/src/components/forms/textarea/Textarea.tsx +1 -0
  68. package/src/components/forms/timePicker/TimePicker.stories.tsx +10 -0
  69. package/src/components/forms/timePicker/TimePicker.tsx +10 -1
  70. package/src/components/forms/timePicker/types.ts +5 -0
  71. package/src/components/modal/ConfirmationModal.tsx +19 -14
  72. package/src/components/modal/Modal.stories.tsx +53 -22
  73. package/src/components/modal/Modal.tsx +8 -2
  74. package/src/components/modal/types.ts +21 -5
  75. package/src/components/pagination/Pagination.stories.tsx +11 -0
  76. package/src/components/pagination/Pagination.tsx +14 -5
  77. package/src/components/pagination/index.ts +1 -0
  78. package/src/components/pagination/types.ts +14 -0
  79. package/src/components/stepper/Stepper.stories.tsx +11 -0
  80. package/src/components/stepper/Stepper.tsx +16 -2
  81. package/src/components/stepper/components/BackNavigation.tsx +5 -3
  82. package/src/components/stepper/components/NextNavigation.tsx +15 -5
  83. package/src/components/stepper/types.ts +12 -0
  84. package/src/components/table/LoadingComponent.tsx +6 -2
  85. package/src/components/table/Table.stories.tsx +10 -0
  86. package/src/components/table/Table.tsx +12 -2
  87. package/src/components/table/components/HorizontalStickyHeader.tsx +12 -1
  88. package/src/components/table/hooks/usePinnedColumnsManager.ts +3 -2
  89. package/src/components/table/types.ts +20 -0
  90. package/src/components/table/utils/processColumns.tsx +3 -1
  91. package/src/components/tanstackTable/TankstackTable.types.ts +20 -2
  92. package/src/components/tanstackTable/TanstackTable.stories.tsx +8 -6
  93. package/src/components/tanstackTable/TanstackTable.tsx +21 -11
  94. package/src/components/tanstackTable/components/NoResults/NoResults.tsx +9 -3
  95. package/src/components/tanstackTable/components/TablePagination/TablePagination.tsx +4 -1
  96. package/src/index.ts +1 -1
  97. package/src/storybook/formArgTypes.ts +10 -0
  98. package/src/storybookDocs/Permafrost.mdx +8 -0
package/lib/index.esm.js CHANGED
@@ -5074,7 +5074,7 @@ const Button$1 = forwardRef((props, ref) => {
5074
5074
  onClick(event);
5075
5075
  }
5076
5076
  };
5077
- return (jsxs("button", Object.assign({ ref: ref, disabled: isLoading || isDisabled, className: buttonClasses, role: "button", onClick: handleOnClick, "aria-label": ariaLabel || 'button', "aria-disabled": isLoading || isDisabled, "aria-busy": isLoading, type: type, onMouseLeave: onMouseExit }, rest, { children: [isLoading && !iconRight && (jsx(Icon, { name: "indico-o", style: { animation: 'spin 1s linear infinite' }, ariaLabel: "Loading...", size: iconSize })), iconLeft && !isLoading && (jsx(Icon, { name: iconLeft, ariaLabel: `${iconLeft} Icon`, size: iconSize })), children, iconRight && !isLoading && (jsx(Icon, { name: iconRight, ariaLabel: `${iconRight} Icon`, size: iconSize })), isLoading && iconRight && (jsx(Icon, { name: "indico-o", style: { animation: 'spin 1s linear infinite' }, ariaLabel: "Loading...", size: iconSize }))] })));
5077
+ return (jsxs("button", Object.assign({ ref: ref, disabled: isLoading || isDisabled, className: buttonClasses, role: "button", onClick: handleOnClick, "aria-label": ariaLabel || 'button', "aria-disabled": isLoading || isDisabled, "aria-busy": isLoading, type: type, onMouseLeave: onMouseExit }, rest, { children: [isLoading && !iconRight && (jsx(Icon, { name: "indico-o", style: { animation: 'spin 1s linear infinite' }, size: iconSize })), iconLeft && !isLoading && jsx(Icon, { name: iconLeft, ariaLabel: iconLeft, size: iconSize }), children, iconRight && !isLoading && jsx(Icon, { name: iconRight, ariaLabel: iconRight, size: iconSize }), isLoading && iconRight && (jsx(Icon, { name: "indico-o", style: { animation: 'spin 1s linear infinite' }, size: iconSize }))] })));
5078
5078
  });
5079
5079
 
5080
5080
  var l;function r$1(e,t){return e[t]}function i(e=[],t,n=0){return [...e.slice(0,n),t,...e.slice(n)]}function s(e=[],t,n="id"){const o=e.slice(),a=r$1(t,n);return a?o.splice(o.findIndex((e=>r$1(e,n)===a)),1):o.splice(o.findIndex((e=>e===t)),1),o}function d(e){return e.map(((e,t)=>{const n=Object.assign(Object.assign({},e),{sortable:e.sortable||!!e.sortFunction||void 0});return e.id||(n.id=t+1),n}))}function c(e,t){return Math.ceil(e/t)}function g(e,t){return Math.min(e,t)}!function(e){e.ASC="asc",e.DESC="desc";}(l||(l={}));const u=()=>null;function p(e,t=[],n=[]){let o={},a=[...n];return t.length&&t.forEach((t=>{if(!t.when||"function"!=typeof t.when)throw new Error('"when" must be defined in the conditional style object and must be function');t.when(e)&&(o=t.style||{},t.classNames&&(a=[...a,...t.classNames]),"function"==typeof t.style&&(o=t.style(e)||{}));})),{conditionalStyle:o,classNames:a.join(" ")}}function b$1(e,t=[],n="id"){const o=r$1(e,n);return o?t.some((e=>r$1(e,n)===o)):t.some((t=>t===e))}function m(e,t){return t?e.findIndex((e=>h$1(e.id,t))):-1}function h$1(e,t){return e==t}function w$1(e,t){const n=!e.toggleOnSelectedRowsChange;switch(t.type){case"SELECT_ALL_ROWS":{const{keyField:n,rows:o,rowCount:a,mergeSelections:l}=t,r=!e.allSelected,i=!e.toggleOnSelectedRowsChange;if(l){const t=r?[...e.selectedRows,...o.filter((t=>!b$1(t,e.selectedRows,n)))]:e.selectedRows.filter((e=>!b$1(e,o,n)));return Object.assign(Object.assign({},e),{allSelected:r,selectedCount:t.length,selectedRows:t,toggleOnSelectedRowsChange:i})}return Object.assign(Object.assign({},e),{allSelected:r,selectedCount:r?a:0,selectedRows:r?o:[],toggleOnSelectedRowsChange:i})}case"SELECT_SINGLE_ROW":{const{keyField:o,row:a,isSelected:l,rowCount:r,singleSelect:d}=t;return d?l?Object.assign(Object.assign({},e),{selectedCount:0,allSelected:!1,selectedRows:[],toggleOnSelectedRowsChange:n}):Object.assign(Object.assign({},e),{selectedCount:1,allSelected:!1,selectedRows:[a],toggleOnSelectedRowsChange:n}):l?Object.assign(Object.assign({},e),{selectedCount:e.selectedRows.length>0?e.selectedRows.length-1:0,allSelected:!1,selectedRows:s(e.selectedRows,a,o),toggleOnSelectedRowsChange:n}):Object.assign(Object.assign({},e),{selectedCount:e.selectedRows.length+1,allSelected:e.selectedRows.length+1===r,selectedRows:i(e.selectedRows,a),toggleOnSelectedRowsChange:n})}case"SELECT_MULTIPLE_ROWS":{const{keyField:o,selectedRows:a,totalRows:l,mergeSelections:r}=t;if(r){const t=[...e.selectedRows,...a.filter((t=>!b$1(t,e.selectedRows,o)))];return Object.assign(Object.assign({},e),{selectedCount:t.length,allSelected:!1,selectedRows:t,toggleOnSelectedRowsChange:n})}return Object.assign(Object.assign({},e),{selectedCount:a.length,allSelected:a.length===l,selectedRows:a,toggleOnSelectedRowsChange:n})}case"CLEAR_SELECTED_ROWS":{const{selectedRowsFlag:n}=t;return Object.assign(Object.assign({},e),{allSelected:!1,selectedCount:0,selectedRows:[],selectedRowsFlag:n})}case"SORT_CHANGE":{const{sortDirection:o,selectedColumn:a,clearSelectedOnSort:l}=t;return Object.assign(Object.assign(Object.assign({},e),{selectedColumn:a,sortDirection:o,currentPage:1}),l&&{allSelected:!1,selectedCount:0,selectedRows:[],toggleOnSelectedRowsChange:n})}case"CHANGE_PAGE":{const{page:o,paginationServer:a,visibleOnly:l,persistSelectedOnPageChange:r}=t,i=a&&r,s=a&&!r||l;return Object.assign(Object.assign(Object.assign(Object.assign({},e),{currentPage:o}),i&&{allSelected:!1}),s&&{allSelected:!1,selectedCount:0,selectedRows:[],toggleOnSelectedRowsChange:n})}case"CHANGE_ROWS_PER_PAGE":{const{rowsPerPage:n,page:o}=t;return Object.assign(Object.assign({},e),{currentPage:o,rowsPerPage:n})}}}const f=css`
@@ -5461,21 +5461,25 @@ var l;function r$1(e,t){return e[t]}function i(e=[],t,n=0){return [...e.slice(0,
5461
5461
  margin: 0 4px;
5462
5462
  `;var Me=React.memo((function({rowsPerPage:t,rowCount:n,currentPage:o,direction:a=ke.direction,paginationRowsPerPageOptions:l=ke.paginationRowsPerPageOptions,paginationIconLastPage:r=ke.paginationIconLastPage,paginationIconFirstPage:i=ke.paginationIconFirstPage,paginationIconNext:s=ke.paginationIconNext,paginationIconPrevious:d=ke.paginationIconPrevious,paginationComponentOptions:g=ke.paginationComponentOptions,onChangeRowsPerPage:u=ke.onChangeRowsPerPage,onChangePage:p=ke.onChangePage}){const b=(()=>{const t="object"==typeof window;function n(){return {width:t?window.innerWidth:void 0,height:t?window.innerHeight:void 0}}const[o,a]=React.useState(n);return React.useEffect((()=>{if(!t)return ()=>null;function e(){a(n());}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),o})(),m=le(a),h=b.width&&b.width>599,w=c(n,t),f=o*t,x=f-t+1,C=1===o,y=o===w,R=Object.assign(Object.assign({},Pe),g),v=o===w?`${x}-${n} ${R.rangeSeparatorText} ${n}`:`${x}-${f} ${R.rangeSeparatorText} ${n}`,S=React.useCallback((()=>p(o-1)),[o,p]),E=React.useCallback((()=>p(o+1)),[o,p]),O=React.useCallback((()=>p(1)),[p]),$=React.useCallback((()=>p(c(n,t))),[p,n,t]),k=React.useCallback((e=>u(Number(e.target.value),o)),[o,u]),P=l.map((t=>React.createElement("option",{key:t,value:t},t)));R.selectAllRowsItem&&P.push(React.createElement("option",{key:-1,value:n},R.selectAllRowsItemText));const D=React.createElement($e,{onChange:k,defaultValue:t,"aria-label":R.rowsPerPageText},P);return React.createElement(De,{className:"rdt_Pagination"},!R.noRowsPerPage&&h&&React.createElement(React.Fragment,null,React.createElement(Te,null,R.rowsPerPageText),D),h&&React.createElement(Ie,null,v),React.createElement(Fe,null,React.createElement(He,{id:"pagination-first-page",type:"button","aria-label":"First Page","aria-disabled":C,onClick:O,disabled:C,$isRTL:m},i),React.createElement(He,{id:"pagination-previous-page",type:"button","aria-label":"Previous Page","aria-disabled":C,onClick:S,disabled:C,$isRTL:m},d),!R.noRowsPerPage&&!h&&D,React.createElement(He,{id:"pagination-next-page",type:"button","aria-label":"Next Page","aria-disabled":y,onClick:E,disabled:y,$isRTL:m},s),React.createElement(He,{id:"pagination-last-page",type:"button","aria-label":"Last Page","aria-disabled":y,onClick:$,disabled:y,$isRTL:m},r)))}));const Le=(t,n)=>{const o=React.useRef(!0);React.useEffect((()=>{o.current?o.current=!1:t();}),n);};function Ae(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _e=function(e){return function(e){return !!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return "[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===Ne}(e)}(e)};var Ne="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function ze(e,t){return !1!==t.clone&&t.isMergeableObject(e)?Ue((n=e,Array.isArray(n)?[]:{}),e,t):e;var n;}function We(e,t,n){return e.concat(t).map((function(e){return ze(e,n)}))}function Be(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function Ge(e,t){try{return t in e}catch(e){return !1}}function Ve(e,t,n){var o={};return n.isMergeableObject(e)&&Be(e).forEach((function(t){o[t]=ze(e[t],n);})),Be(t).forEach((function(a){(function(e,t){return Ge(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,a)||(Ge(e,a)&&n.isMergeableObject(t[a])?o[a]=function(e,t){if(!t.customMerge)return Ue;var n=t.customMerge(e);return "function"==typeof n?n:Ue}(a,n)(e[a],t[a],n):o[a]=ze(t[a],n));})),o}function Ue(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||We,n.isMergeableObject=n.isMergeableObject||_e,n.cloneUnlessOtherwiseSpecified=ze;var o=Array.isArray(t);return o===Array.isArray(e)?o?n.arrayMerge(e,t,n):Ve(e,t,n):ze(t,n)}Ue.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return Ue(e,n,t)}),{})};var Ye=Ae(Ue);const Ke={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)"},background:{default:"#FFFFFF"},context:{background:"#e3f2fd",text:"rgba(0, 0, 0, 0.87)"},divider:{default:"rgba(0,0,0,.12)"},button:{default:"rgba(0,0,0,.54)",focus:"rgba(0,0,0,.12)",hover:"rgba(0,0,0,.12)",disabled:"rgba(0, 0, 0, .18)"},selected:{default:"#e3f2fd",text:"rgba(0, 0, 0, 0.87)"},highlightOnHover:{default:"#EEEEEE",text:"rgba(0, 0, 0, 0.87)"},striped:{default:"#FAFAFA",text:"rgba(0, 0, 0, 0.87)"}},qe={default:Ke,light:Ke,dark:{text:{primary:"#FFFFFF",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(0,0,0,.12)"},background:{default:"#424242"},context:{background:"#E91E63",text:"#FFFFFF"},divider:{default:"rgba(81, 81, 81, 1)"},button:{default:"#FFFFFF",focus:"rgba(255, 255, 255, .54)",hover:"rgba(255, 255, 255, .12)",disabled:"rgba(255, 255, 255, .18)"},selected:{default:"rgba(0, 0, 0, .7)",text:"#FFFFFF"},highlightOnHover:{default:"rgba(0, 0, 0, .7)",text:"#FFFFFF"},striped:{default:"rgba(0, 0, 0, .87)",text:"#FFFFFF"}}};function Qe(t,n,o,a){const[r,i]=React.useState((()=>d(t))),[s,c]=React.useState(""),g=React.useRef("");Le((()=>{i(d(t));}),[t]);const u=React.useCallback((e=>{var t,n,o;const{attributes:a}=e.target,l=null===(t=a.getNamedItem("data-column-id"))||void 0===t?void 0:t.value;l&&(g.current=(null===(o=null===(n=r[m(r,l)])||void 0===n?void 0:n.id)||void 0===o?void 0:o.toString())||"",c(g.current));}),[r]),p=React.useCallback((e=>{var t;const{attributes:o}=e.target,a=null===(t=o.getNamedItem("data-column-id"))||void 0===t?void 0:t.value;if(a&&g.current&&a!==g.current){const e=m(r,g.current),t=m(r,a),o=[...r];o[e]=r[t],o[t]=r[e],i(o),n(o);}}),[n,r]),b=React.useCallback((e=>{e.preventDefault();}),[]),h=React.useCallback((e=>{e.preventDefault();}),[]),w=React.useCallback((e=>{e.preventDefault(),g.current="",c("");}),[]),f=function(e=!1){return e?l.ASC:l.DESC}(a),x=React.useMemo((()=>r[m(r,null==o?void 0:o.toString())]||{}),[o,r]);return {tableColumns:r,draggingColumnId:s,handleDragStart:u,handleDragEnter:p,handleDragOver:b,handleDragLeave:h,handleDragEnd:w,defaultSortDirection:f,defaultSortColumn:x}}var Xe=React.memo((function(t){const{data:n=ke.data,columns:o=ke.columns,title:i=ke.title,actions:s=ke.actions,keyField:d=ke.keyField,striped:u=ke.striped,highlightOnHover:p=ke.highlightOnHover,pointerOnHover:m=ke.pointerOnHover,dense:h=ke.dense,selectableRows:f=ke.selectableRows,selectableRowsSingle:C=ke.selectableRowsSingle,selectableRowsHighlight:v=ke.selectableRowsHighlight,selectableRowsNoSelectAll:S=ke.selectableRowsNoSelectAll,selectableRowsVisibleOnly:E=ke.selectableRowsVisibleOnly,selectableRowSelected:O=ke.selectableRowSelected,selectableRowDisabled:k=ke.selectableRowDisabled,selectableRowsComponent:P=ke.selectableRowsComponent,selectableRowsComponentProps:D=ke.selectableRowsComponentProps,onRowExpandToggled:H=ke.onRowExpandToggled,onSelectedRowsChange:F=ke.onSelectedRowsChange,expandableIcon:j=ke.expandableIcon,onChangeRowsPerPage:I=ke.onChangeRowsPerPage,onChangePage:T=ke.onChangePage,paginationServer:M=ke.paginationServer,paginationServerOptions:L=ke.paginationServerOptions,paginationTotalRows:A=ke.paginationTotalRows,paginationDefaultPage:_=ke.paginationDefaultPage,paginationResetDefaultPage:N=ke.paginationResetDefaultPage,paginationPerPage:z=ke.paginationPerPage,paginationRowsPerPageOptions:W=ke.paginationRowsPerPageOptions,paginationIconLastPage:B=ke.paginationIconLastPage,paginationIconFirstPage:G=ke.paginationIconFirstPage,paginationIconNext:V=ke.paginationIconNext,paginationIconPrevious:U=ke.paginationIconPrevious,paginationComponent:Y=ke.paginationComponent,paginationComponentOptions:K=ke.paginationComponentOptions,responsive:J=ke.responsive,progressPending:Q=ke.progressPending,progressComponent:X=ke.progressComponent,persistTableHead:Z=ke.persistTableHead,noDataComponent:ee=ke.noDataComponent,disabled:te=ke.disabled,noTableHead:oe=ke.noTableHead,noHeader:le=ke.noHeader,fixedHeader:re=ke.fixedHeader,fixedHeaderScrollHeight:ie=ke.fixedHeaderScrollHeight,pagination:se=ke.pagination,subHeader:de=ke.subHeader,subHeaderAlign:ce=ke.subHeaderAlign,subHeaderWrap:ge=ke.subHeaderWrap,subHeaderComponent:ue=ke.subHeaderComponent,noContextMenu:be=ke.noContextMenu,contextMessage:me=ke.contextMessage,contextActions:he=ke.contextActions,contextComponent:Se=ke.contextComponent,expandableRows:Ee=ke.expandableRows,onRowClicked:Oe=ke.onRowClicked,onRowDoubleClicked:$e=ke.onRowDoubleClicked,onRowMouseEnter:Pe=ke.onRowMouseEnter,onRowMouseLeave:De=ke.onRowMouseLeave,sortIcon:He=ke.sortIcon,onSort:Fe=ke.onSort,sortFunction:je=ke.sortFunction,sortServer:Ie=ke.sortServer,expandableRowsComponent:Te=ke.expandableRowsComponent,expandableRowsComponentProps:Ae=ke.expandableRowsComponentProps,expandableRowDisabled:_e=ke.expandableRowDisabled,expandableRowsHideExpander:Ne=ke.expandableRowsHideExpander,expandOnRowClicked:ze=ke.expandOnRowClicked,expandOnRowDoubleClicked:We=ke.expandOnRowDoubleClicked,expandableRowExpanded:Be=ke.expandableRowExpanded,expandableInheritConditionalStyles:Ge=ke.expandableInheritConditionalStyles,defaultSortFieldId:Ve=ke.defaultSortFieldId,defaultSortAsc:Ue=ke.defaultSortAsc,clearSelectedRows:Ke=ke.clearSelectedRows,conditionalRowStyles:Je=ke.conditionalRowStyles,theme:Xe=ke.theme,customStyles:Ze=ke.customStyles,direction:et=ke.direction,onColumnOrderChange:tt=ke.onColumnOrderChange,className:nt}=t,{tableColumns:ot,draggingColumnId:at,handleDragStart:lt,handleDragEnter:rt,handleDragOver:it,handleDragLeave:st,handleDragEnd:dt,defaultSortDirection:ct,defaultSortColumn:gt}=Qe(o,tt,Ve,Ue),[{rowsPerPage:ut,currentPage:pt,selectedRows:bt,allSelected:mt,selectedCount:ht,selectedColumn:wt,sortDirection:ft,toggleOnSelectedRowsChange:xt},Ct]=React.useReducer(w$1,{allSelected:!1,selectedCount:0,selectedRows:[],selectedColumn:gt,toggleOnSelectedRowsChange:!1,sortDirection:ct,currentPage:_,rowsPerPage:z,selectedRowsFlag:!1,contextMessage:ke.contextMessage}),{persistSelectedOnSort:yt=!1,persistSelectedOnPageChange:Rt=!1}=L,vt=!(!M||!Rt&&!yt),St=se&&!Q&&n.length>0,Et=Y||Me,Ot=React.useMemo((()=>((e={},t="default",n="default")=>{const o=qe[t]?t:n;return Ye({table:{style:{color:(a=qe[o]).text.primary,backgroundColor:a.background.default}},tableWrapper:{style:{display:"table"}},responsiveWrapper:{style:{}},header:{style:{fontSize:"22px",color:a.text.primary,backgroundColor:a.background.default,minHeight:"56px",paddingLeft:"16px",paddingRight:"8px"}},subHeader:{style:{backgroundColor:a.background.default,minHeight:"52px"}},head:{style:{color:a.text.primary,fontSize:"12px",fontWeight:500}},headRow:{style:{backgroundColor:a.background.default,minHeight:"52px",borderBottomWidth:"1px",borderBottomColor:a.divider.default,borderBottomStyle:"solid"},denseStyle:{minHeight:"32px"}},headCells:{style:{paddingLeft:"16px",paddingRight:"16px"},draggingStyle:{cursor:"move"}},contextMenu:{style:{backgroundColor:a.context.background,fontSize:"18px",fontWeight:400,color:a.context.text,paddingLeft:"16px",paddingRight:"8px",transform:"translate3d(0, -100%, 0)",transitionDuration:"125ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",willChange:"transform"},activeStyle:{transform:"translate3d(0, 0, 0)"}},cells:{style:{paddingLeft:"16px",paddingRight:"16px",wordBreak:"break-word"},draggingStyle:{}},rows:{style:{fontSize:"13px",fontWeight:400,color:a.text.primary,backgroundColor:a.background.default,minHeight:"48px","&:not(:last-of-type)":{borderBottomStyle:"solid",borderBottomWidth:"1px",borderBottomColor:a.divider.default}},denseStyle:{minHeight:"32px"},selectedHighlightStyle:{"&:nth-of-type(n)":{color:a.selected.text,backgroundColor:a.selected.default,borderBottomColor:a.background.default}},highlightOnHoverStyle:{color:a.highlightOnHover.text,backgroundColor:a.highlightOnHover.default,transitionDuration:"0.15s",transitionProperty:"background-color",borderBottomColor:a.background.default,outlineStyle:"solid",outlineWidth:"1px",outlineColor:a.background.default},stripedStyle:{color:a.striped.text,backgroundColor:a.striped.default}},expanderRow:{style:{color:a.text.primary,backgroundColor:a.background.default}},expanderCell:{style:{flex:"0 0 48px"}},expanderButton:{style:{color:a.button.default,fill:a.button.default,backgroundColor:"transparent",borderRadius:"2px",transition:"0.25s",height:"100%",width:"100%","&:hover:enabled":{cursor:"pointer"},"&:disabled":{color:a.button.disabled},"&:hover:not(:disabled)":{cursor:"pointer",backgroundColor:a.button.hover},"&:focus":{outline:"none",backgroundColor:a.button.focus},svg:{margin:"auto"}}},pagination:{style:{color:a.text.secondary,fontSize:"13px",minHeight:"56px",backgroundColor:a.background.default,borderTopStyle:"solid",borderTopWidth:"1px",borderTopColor:a.divider.default},pageButtonsStyle:{borderRadius:"50%",height:"40px",width:"40px",padding:"8px",margin:"px",cursor:"pointer",transition:"0.4s",color:a.button.default,fill:a.button.default,backgroundColor:"transparent","&:disabled":{cursor:"unset",color:a.button.disabled,fill:a.button.disabled},"&:hover:not(:disabled)":{backgroundColor:a.button.hover},"&:focus":{outline:"none",backgroundColor:a.button.focus}}},noData:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:a.text.primary,backgroundColor:a.background.default}},progress:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:a.text.primary,backgroundColor:a.background.default}}},e);var a;})(Ze,Xe)),[Ze,Xe]),$t=React.useMemo((()=>Object.assign({},"auto"!==et&&{dir:et})),[et]),kt=React.useMemo((()=>{if(Ie)return n;if((null==wt?void 0:wt.sortFunction)&&"function"==typeof wt.sortFunction){const e=wt.sortFunction,t=ft===l.ASC?e:(t,n)=>-1*e(t,n);return [...n].sort(t)}return function(e,t,n,o){return t?o&&"function"==typeof o?o(e.slice(0),t,n):e.slice(0).sort(((e,o)=>{const a=t(e),l=t(o);if("asc"===n){if(a<l)return -1;if(a>l)return 1}if("desc"===n){if(a>l)return -1;if(a<l)return 1}return 0})):e}(n,null==wt?void 0:wt.selector,ft,je)}),[Ie,wt,ft,n,je]),Pt=React.useMemo((()=>{if(se&&!M){const e=pt*ut,t=e-ut;return kt.slice(t,e)}return kt}),[pt,se,M,ut,kt]),Dt=React.useCallback((e=>{Ct(e);}),[]),Ht=React.useCallback((e=>{Ct(e);}),[]),Ft=React.useCallback((e=>{Ct(e);}),[]),jt=React.useCallback(((e,t)=>Oe(e,t)),[Oe]),It=React.useCallback(((e,t)=>$e(e,t)),[$e]),Tt=React.useCallback(((e,t)=>Pe(e,t)),[Pe]),Mt=React.useCallback(((e,t)=>De(e,t)),[De]),Lt=React.useCallback((e=>Ct({type:"CHANGE_PAGE",page:e,paginationServer:M,visibleOnly:E,persistSelectedOnPageChange:Rt})),[M,Rt,E]),At=React.useCallback((e=>{const t=c(A||Pt.length,e),n=g(pt,t);M||Lt(n),Ct({type:"CHANGE_ROWS_PER_PAGE",page:n,rowsPerPage:e});}),[pt,Lt,M,A,Pt.length]);if(se&&!M&&kt.length>0&&0===Pt.length){const e=c(kt.length,ut),t=g(pt,e);Lt(t);}Le((()=>{F({allSelected:mt,selectedCount:ht,selectedRows:bt.slice(0)});}),[xt]),Le((()=>{Fe(wt,ft,kt.slice(0));}),[wt,ft]),Le((()=>{T(pt,A||kt.length);}),[pt]),Le((()=>{I(ut,pt);}),[ut]),Le((()=>{Lt(_);}),[_,N]),Le((()=>{if(se&&M&&A>0){const e=c(A,ut),t=g(pt,e);pt!==t&&Lt(t);}}),[A]),React.useEffect((()=>{Ct({type:"CLEAR_SELECTED_ROWS",selectedRowsFlag:Ke});}),[C,Ke]),React.useEffect((()=>{if(!O)return;const e=kt.filter((e=>O(e))),t=C?e.slice(0,1):e;Ct({type:"SELECT_MULTIPLE_ROWS",keyField:d,selectedRows:t,totalRows:kt.length,mergeSelections:vt});}),[n,O]);const _t=E?Pt:kt,Nt=Rt||C||S;return React.createElement(ThemeProvider,{theme:Ot},!le&&(!!i||!!s)&&React.createElement(pe,{title:i,actions:s,showMenu:!be,selectedCount:ht,direction:et,contextActions:he,contextComponent:Se,contextMessage:me}),de&&React.createElement(we,{align:ce,wrapContent:ge},ue),React.createElement(xe,Object.assign({$responsive:J,$fixedHeader:re,$fixedHeaderScrollHeight:ie,className:nt},$t),React.createElement(ye,null,Q&&!Z&&React.createElement(Ce,null,X),React.createElement(x$1,{disabled:te,className:"rdt_Table",role:"table"},!oe&&(!!Z||kt.length>0&&!Q)&&React.createElement(y$1,{className:"rdt_TableHead",role:"rowgroup",$fixedHeader:re},React.createElement(R$1,{className:"rdt_TableHeadRow",role:"row",$dense:h},f&&(Nt?React.createElement($$2,{style:{flex:"0 0 48px"}}):React.createElement(ae,{allSelected:mt,selectedRows:bt,selectableRowsComponent:P,selectableRowsComponentProps:D,selectableRowDisabled:k,rowData:_t,keyField:d,mergeSelections:vt,onSelectAllRows:Ht})),Ee&&!Ne&&React.createElement(Re,null),ot.map((t=>React.createElement(ne,{key:t.id,column:t,selectedColumn:wt,disabled:Q||0===kt.length,pagination:se,paginationServer:M,persistSelectedOnSort:yt,selectableRowsVisibleOnly:E,sortDirection:ft,sortIcon:He,sortServer:Ie,onSort:Dt,onDragStart:lt,onDragOver:it,onDragEnd:dt,onDragEnter:rt,onDragLeave:st,draggingColumnId:at}))))),!kt.length&&!Q&&React.createElement(ve,null,ee),Q&&Z&&React.createElement(Ce,null,X),!Q&&kt.length>0&&React.createElement(fe,{className:"rdt_TableBody",role:"rowgroup"},Pt.map(((t,n)=>{const o=r$1(t,d),a=function(e=""){return "number"!=typeof e&&(!e||0===e.length)}(o)?n:o,l=b$1(t,bt,d),i=!!(Ee&&Be&&Be(t)),s=!!(Ee&&_e&&_e(t));return React.createElement(q$1,{id:a,key:a,keyField:d,"data-row-id":a,columns:ot,row:t,rowCount:kt.length,rowIndex:n,selectableRows:f,expandableRows:Ee,expandableIcon:j,highlightOnHover:p,pointerOnHover:m,dense:h,expandOnRowClicked:ze,expandOnRowDoubleClicked:We,expandableRowsComponent:Te,expandableRowsComponentProps:Ae,expandableRowsHideExpander:Ne,defaultExpanderDisabled:s,defaultExpanded:i,expandableInheritConditionalStyles:Ge,conditionalRowStyles:Je,selected:l,selectableRowsHighlight:v,selectableRowsComponent:P,selectableRowsComponentProps:D,selectableRowDisabled:k,selectableRowsSingle:C,striped:u,onRowExpandToggled:H,onRowClicked:jt,onRowDoubleClicked:It,onRowMouseEnter:Tt,onRowMouseLeave:Mt,onSelectedRow:Ft,draggingColumnId:at,onDragStart:lt,onDragOver:it,onDragEnd:dt,onDragEnter:rt,onDragLeave:st})})))))),St&&React.createElement("div",null,React.createElement(Et,{onChangePage:Lt,onChangeRowsPerPage:At,rowCount:A||kt.length,currentPage:pt,rowsPerPage:ut,direction:et,paginationRowsPerPageOptions:W,paginationIconLastPage:B,paginationIconFirstPage:G,paginationIconNext:V,paginationIconPrevious:U,paginationComponentOptions:K})))}));
5463
5463
 
5464
- const LoadingComponent = () => {
5465
- return jsx("div", { className: "table-loading", children: "Loading..." });
5464
+ const LoadingComponent = ({ loadingText }) => {
5465
+ return jsx("div", { className: "table-loading", children: loadingText });
5466
5466
  };
5467
5467
 
5468
+ const DEFAULT_TEXT$c = {
5469
+ required: '(required)',
5470
+ };
5468
5471
  const Label = ({ label, name, isRequired }) => {
5469
5472
  return (jsx("div", { "data-testid": `${name}-testId`, className: `form-label`, children: jsxs("label", { htmlFor: `${name}`, children: [label, isRequired ? jsx("span", { className: "text-error", children: " *" }) : ''] }) }));
5470
5473
  };
5471
5474
  // HOC to add common label functionality to components
5472
5475
  function withLabel(WrappedComponent) {
5473
5476
  const WithLabelComponent = (_a, ref) => {
5474
- var { label, hasHiddenLabel = false, name, isRequired } = _a, rest = __rest(_a, ["label", "hasHiddenLabel", "name", "isRequired"]);
5477
+ var { label, hasHiddenLabel = false, name, isRequired, text: textProp } = _a, rest = __rest(_a, ["label", "hasHiddenLabel", "name", "isRequired", "text"]);
5478
+ const text = Object.assign(Object.assign({}, DEFAULT_TEXT$c), textProp);
5475
5479
  const ariaLabel = hasHiddenLabel
5476
- ? { 'aria-label': isRequired ? `${label} (required)` : label }
5480
+ ? { 'aria-label': isRequired ? `${label} ${text.required}` : label }
5477
5481
  : {};
5478
- return (jsxs("div", { className: "form-control", children: [!hasHiddenLabel && jsx(Label, { label: label, name: name, isRequired: isRequired }), jsx(WrappedComponent, Object.assign({}, rest, { id: name, name: name }, ariaLabel, { ref: ref }))] }));
5482
+ return (jsxs("div", { className: "form-control", children: [!hasHiddenLabel && jsx(Label, { label: label, name: name, isRequired: isRequired }), jsx(WrappedComponent, Object.assign({}, rest, { id: name, name: name }, ariaLabel, { text: textProp, ref: ref }))] }));
5479
5483
  };
5480
5484
  return forwardRef(WithLabelComponent);
5481
5485
  }
@@ -5486,7 +5490,7 @@ const DisplayFormError = (_a) => {
5486
5490
  };
5487
5491
 
5488
5492
  const Input = React__default.forwardRef((_a, ref) => {
5489
- var { id, name, placeholder, isRequired, isDisabled, readonly, isClearable, errorMessage, helpText, maxLength, iconName, tabIndex, onChange, onBlur, onKeyDown, className } = _a, rest = __rest(_a, ["id", "name", "placeholder", "isRequired", "isDisabled", "readonly", "isClearable", "errorMessage", "helpText", "maxLength", "iconName", "tabIndex", "onChange", "onBlur", "onKeyDown", "className"]);
5493
+ var { id, name, placeholder, isRequired, isDisabled, readonly, isClearable, errorMessage, helpText, maxLength, iconName, tabIndex, onChange, onBlur, onKeyDown, className, text: _text } = _a, rest = __rest(_a, ["id", "name", "placeholder", "isRequired", "isDisabled", "readonly", "isClearable", "errorMessage", "helpText", "maxLength", "iconName", "tabIndex", "onChange", "onBlur", "onKeyDown", "className", "text"]);
5490
5494
  const hasErrors = errorMessage && errorMessage.length > 0;
5491
5495
  const handleClear = () => {
5492
5496
  onChange === null || onChange === void 0 ? void 0 : onChange({ target: { value: '' } });
@@ -5500,10 +5504,17 @@ const Input = React__default.forwardRef((_a, ref) => {
5500
5504
  });
5501
5505
  const LabeledInput = withLabel(Input);
5502
5506
 
5507
+ const DEFAULT_TEXT$b = {
5508
+ previousPage: 'Previous Page',
5509
+ nextPage: 'Next Page',
5510
+ currentPage: 'Current Page',
5511
+ of: 'of',
5512
+ };
5503
5513
  const Pagination = (_a) => {
5504
- var { totalPages, currentPage = 1, onChange, className } = _a, rest = __rest(_a, ["totalPages", "currentPage", "onChange", "className"]);
5514
+ var { totalPages, currentPage = 1, onChange, className, text: textProp } = _a, rest = __rest(_a, ["totalPages", "currentPage", "onChange", "className", "text"]);
5515
+ const text = Object.assign(Object.assign({}, DEFAULT_TEXT$b), textProp);
5505
5516
  const [inputValue, setInputValue] = useState(currentPage.toString());
5506
- const totalPagesText = `of ${totalPages}`;
5517
+ const totalPagesText = `${text.of} ${totalPages}`;
5507
5518
  const classes = classNames('pagination', className);
5508
5519
  useEffect(() => {
5509
5520
  setInputValue(currentPage.toString());
@@ -5535,9 +5546,9 @@ const Pagination = (_a) => {
5535
5546
  const isNextButtonDisabled = currentPage === totalPages;
5536
5547
  const isPreviousButtonDisabled = currentPage === 1;
5537
5548
  const hasError = Number(inputValue) > totalPages || Number(inputValue) < 1;
5538
- return (jsx("div", Object.assign({ className: classes }, rest, { children: jsx(Container, { children: jsxs(Row, { gutterWidth: 12, align: "center", children: [jsx(Col, { xs: "content", children: jsx("div", { className: "pagination__previous", children: jsx(Button$1, { "data-testid": "pagination-previous-button", ariaLabel: "Previous Page", variant: "link", onClick: handlePreviousPage, iconLeft: "chevron-left", size: "sm", isDisabled: isPreviousButtonDisabled || totalPages === 0 }) }) }), jsx(Col, { xs: "content", children: jsx("div", { className: "pagination__current-page", children: jsx(LabeledInput, { "data-testid": "pagination-current-page-input", className: classNames('pagination__current-page-input', {
5549
+ return (jsx("div", Object.assign({ className: classes }, rest, { children: jsx(Container, { children: jsxs(Row, { gutterWidth: 12, align: "center", children: [jsx(Col, { xs: "content", children: jsx("div", { className: "pagination__previous", children: jsx(Button$1, { "data-testid": "pagination-previous-button", ariaLabel: text.previousPage, variant: "link", onClick: handlePreviousPage, iconLeft: "chevron-left", size: "sm", isDisabled: isPreviousButtonDisabled || totalPages === 0 }) }) }), jsx(Col, { xs: "content", children: jsx("div", { className: "pagination__current-page", children: jsx(LabeledInput, { "data-testid": "pagination-current-page-input", className: classNames('pagination__current-page-input', {
5539
5550
  'has-error': hasError,
5540
- }), value: totalPages === 0 ? '0' : inputValue, name: "currentPage", label: "Current Page", hasHiddenLabel: true, onKeyDown: (e) => {
5551
+ }), value: totalPages === 0 ? '0' : inputValue, name: "currentPage", label: text.currentPage, hasHiddenLabel: true, onKeyDown: (e) => {
5541
5552
  if (e.key === 'Enter') {
5542
5553
  validateAndUpdatePage(e.currentTarget.value);
5543
5554
  }
@@ -5547,7 +5558,7 @@ const Pagination = (_a) => {
5547
5558
  if (value === '' || /^\d*$/.test(value)) {
5548
5559
  setInputValue(value);
5549
5560
  }
5550
- }, onBlur: (e) => validateAndUpdatePage(e.currentTarget.value) }) }) }), jsx(Col, { xs: "content", children: jsx("p", { className: "pagination__page-total", children: totalPagesText }) }), jsx(Col, { xs: "content", children: jsx("div", { className: "pagination__next", children: jsx(Button$1, { "data-testid": "pagination-next-button", ariaLabel: "Next Page", variant: "link", onClick: handleNextPage, iconLeft: "chevron-right", isDisabled: isNextButtonDisabled || totalPages === 0, size: "sm" }) }) })] }) }) })));
5561
+ }, onBlur: (e) => validateAndUpdatePage(e.currentTarget.value) }) }) }), jsx(Col, { xs: "content", children: jsx("p", { className: "pagination__page-total", children: totalPagesText }) }), jsx(Col, { xs: "content", children: jsx("div", { className: "pagination__next", children: jsx(Button$1, { "data-testid": "pagination-next-button", ariaLabel: text.nextPage, variant: "link", onClick: handleNextPage, iconLeft: "chevron-right", isDisabled: isNextButtonDisabled || totalPages === 0, size: "sm" }) }) })] }) }) })));
5551
5562
  };
5552
5563
 
5553
5564
  const TablePagination$1 = ({ rowsPerPage, rowCount, onChangePage, currentPage, totalEntriesText, }) => {
@@ -5632,7 +5643,12 @@ const clearStickyStyles = (header) => {
5632
5643
  header.style.backgroundColor = '';
5633
5644
  };
5634
5645
 
5635
- const HorizontalStickyHeader = ({ children, position, onPinColumn, isPinned = false, pinnedColumnIds, }) => {
5646
+ const DEFAULT_TEXT$a = {
5647
+ unpinColumn: 'Unpin column',
5648
+ pinColumn: 'Pin column',
5649
+ };
5650
+ const HorizontalStickyHeader = ({ children, position, onPinColumn, isPinned = false, pinnedColumnIds, text: textProp, }) => {
5651
+ const text = Object.assign(Object.assign({}, DEFAULT_TEXT$a), textProp);
5636
5652
  useEffect(() => {
5637
5653
  const calculateWidth = () => __awaiter(void 0, void 0, void 0, function* () {
5638
5654
  yield new Promise((resolve) => setTimeout(resolve, 0));
@@ -5649,14 +5665,14 @@ const HorizontalStickyHeader = ({ children, position, onPinColumn, isPinned = fa
5649
5665
  });
5650
5666
  calculateWidth();
5651
5667
  }, [position, isPinned, pinnedColumnIds]);
5652
- return (jsxs("div", { className: "table__header-cell", "data-testid": `sticky-column-${position}`, children: [jsx(Button$1, { "data-testid": `sticky-header-pin-button-${position}`, variant: "link", size: "sm", iconLeft: "pin", onClick: () => onPinColumn === null || onPinColumn === void 0 ? void 0 : onPinColumn(`sticky-column-${position}`), ariaLabel: isPinned ? 'Unpin column' : 'Pin column', className: `table__column--${isPinned ? 'is-pinned' : 'is-not-pinned'} table__column__pin-action` }), jsx("div", { className: "table__header-content", children: children })] }));
5668
+ return (jsxs("div", { className: "table__header-cell", "data-testid": `sticky-column-${position}`, children: [jsx(Button$1, { "data-testid": `sticky-header-pin-button-${position}`, variant: "link", size: "sm", iconLeft: "pin", onClick: () => onPinColumn === null || onPinColumn === void 0 ? void 0 : onPinColumn(`sticky-column-${position}`), ariaLabel: isPinned ? text.unpinColumn : text.pinColumn, className: `table__column--${isPinned ? 'is-pinned' : 'is-not-pinned'} table__column__pin-action` }), jsx("div", { className: "table__header-content", children: children })] }));
5653
5669
  };
5654
5670
 
5655
- const processColumns = (columns, pinnedColumnIds, togglePinnedColumn) => {
5671
+ const processColumns = (columns, pinnedColumnIds, togglePinnedColumn, text) => {
5656
5672
  return columns.map((column, index) => {
5657
5673
  const dataColumnId = `sticky-column-${index}`;
5658
5674
  const isPinned = pinnedColumnIds.includes(dataColumnId);
5659
- const headerContent = column.isPinned !== undefined ? (jsx(HorizontalStickyHeader, { position: index, isPinned: isPinned, onPinColumn: () => togglePinnedColumn(column.id), pinnedColumnIds: pinnedColumnIds, children: column.name })) : (jsx(Fragment, { children: column.name }));
5675
+ const headerContent = column.isPinned !== undefined ? (jsx(HorizontalStickyHeader, { position: index, isPinned: isPinned, onPinColumn: () => togglePinnedColumn(column.id), pinnedColumnIds: pinnedColumnIds, text: text, children: column.name })) : (jsx(Fragment, { children: column.name }));
5660
5676
  return Object.assign(Object.assign({}, column), { name: headerContent, id: dataColumnId, style: getPinnedColumnStyles(isPinned, index, pinnedColumnIds) });
5661
5677
  });
5662
5678
  };
@@ -5665,7 +5681,7 @@ const processColumns = (columns, pinnedColumnIds, togglePinnedColumn) => {
5665
5681
  * Hook to manage pinned columns in a table
5666
5682
  * Handles initialization, toggling, positioning and resizing of pinned columns
5667
5683
  */
5668
- const usePinnedColumnsManager = (columns, canPinColumns, onPinnedColumnsChange) => {
5684
+ const usePinnedColumnsManager = (columns, canPinColumns, onPinnedColumnsChange, text) => {
5669
5685
  const pinnedColumnIds = columns.filter((column) => column.isPinned).map((column) => column.id);
5670
5686
  // `dataColumnIds` is the list of IDs used as `data-column-id` attributes on the table headers and cells
5671
5687
  const dataColumnIds = useMemo(() => {
@@ -5772,17 +5788,23 @@ const usePinnedColumnsManager = (columns, canPinColumns, onPinnedColumnsChange)
5772
5788
  }, [canPinColumns, dataColumnIds]);
5773
5789
  // Process columns for rendering with pin state
5774
5790
  const columnsWithPinning = canPinColumns
5775
- ? sortPinnedColumns(processColumns(columns, dataColumnIds, togglePinnedColumn), dataColumnIds)
5791
+ ? sortPinnedColumns(processColumns(columns, dataColumnIds, togglePinnedColumn, text), dataColumnIds)
5776
5792
  : columns;
5777
5793
  return {
5778
5794
  columnsWithPinning, // Columns with pin state and handlers applied
5779
5795
  };
5780
5796
  };
5781
5797
 
5798
+ const DEFAULT_TEXT$9 = {
5799
+ loading: 'Loading...',
5800
+ unpinColumn: 'Unpin column',
5801
+ pinColumn: 'Pin column',
5802
+ };
5782
5803
  const Table = (props) => {
5783
- const { responsive = true, direction = 'auto', keyField = 'id', striped = false, noDataComponent = 'built-in', isDisabled, isLoading, isFullHeight = false, subHeaderAlign = 'left', className, paginationTotalRows, totalEntriesText, data, columns: initialColumns, canPinColumns = false, onPinnedColumnsChange } = props, rest = __rest(props, ["responsive", "direction", "keyField", "striped", "noDataComponent", "isDisabled", "isLoading", "isFullHeight", "subHeaderAlign", "className", "paginationTotalRows", "totalEntriesText", "data", "columns", "canPinColumns", "onPinnedColumnsChange"]);
5804
+ const { responsive = true, direction = 'auto', keyField = 'id', striped = false, noDataComponent = 'built-in', isDisabled, isLoading, isFullHeight = false, subHeaderAlign = 'left', className, paginationTotalRows, totalEntriesText, data, columns: initialColumns, canPinColumns = false, onPinnedColumnsChange, text: textProp } = props, rest = __rest(props, ["responsive", "direction", "keyField", "striped", "noDataComponent", "isDisabled", "isLoading", "isFullHeight", "subHeaderAlign", "className", "paginationTotalRows", "totalEntriesText", "data", "columns", "canPinColumns", "onPinnedColumnsChange", "text"]);
5805
+ const text = Object.assign(Object.assign({}, DEFAULT_TEXT$9), textProp);
5784
5806
  // Turns on/off column pinning.
5785
- const { columnsWithPinning } = usePinnedColumnsManager(initialColumns, canPinColumns, onPinnedColumnsChange);
5807
+ const { columnsWithPinning } = usePinnedColumnsManager(initialColumns, canPinColumns, onPinnedColumnsChange, { unpinColumn: text.unpinColumn, pinColumn: text.pinColumn });
5786
5808
  const combinedClassName = classNames(className, {
5787
5809
  'table--striped': striped,
5788
5810
  'table-body': true,
@@ -5790,7 +5812,7 @@ const Table = (props) => {
5790
5812
  const tableWrapperClassName = classNames('table', {
5791
5813
  'table--full-height': isFullHeight,
5792
5814
  });
5793
- return (jsx("div", { className: tableWrapperClassName, "data-testid": "table", children: jsx(Xe, Object.assign({ data: data, columns: columnsWithPinning, responsive: responsive, direction: direction, subHeaderAlign: subHeaderAlign, keyField: keyField, striped: striped, className: combinedClassName, disabled: isDisabled, noDataComponent: noDataComponent, progressPending: isLoading, progressComponent: jsx(LoadingComponent, {}), pagination: true, paginationComponent: (props) => (jsx(TablePagination$1, Object.assign({}, props, { totalEntriesText: totalEntriesText }))), paginationTotalRows: paginationTotalRows, highlightOnHover: true, pointerOnHover: true }, rest)) }));
5815
+ return (jsx("div", { className: tableWrapperClassName, "data-testid": "table", children: jsx(Xe, Object.assign({ data: data, columns: columnsWithPinning, responsive: responsive, direction: direction, subHeaderAlign: subHeaderAlign, keyField: keyField, striped: striped, className: combinedClassName, disabled: isDisabled, noDataComponent: noDataComponent, progressPending: isLoading, progressComponent: jsx(LoadingComponent, { loadingText: text.loading }), pagination: true, paginationComponent: (props) => (jsx(TablePagination$1, Object.assign({}, props, { totalEntriesText: totalEntriesText }))), paginationTotalRows: paginationTotalRows, highlightOnHover: true, pointerOnHover: true }, rest)) }));
5794
5816
  };
5795
5817
 
5796
5818
  const Radio = React__default.forwardRef((_a, ref) => {
@@ -5809,7 +5831,7 @@ const Toggle = React__default.forwardRef((_a, ref) => {
5809
5831
  });
5810
5832
 
5811
5833
  const Textarea = React__default.forwardRef((_a, ref) => {
5812
- var { label, name, placeholder, value, onChange, onKeyDown, isRequired, isDisabled, errorMessage, helpText, hasHiddenLabel, rows, cols, readonly, wrap, form, maxLength, autofocus, defaultValue, tabIndex } = _a, rest = __rest(_a, ["label", "name", "placeholder", "value", "onChange", "onKeyDown", "isRequired", "isDisabled", "errorMessage", "helpText", "hasHiddenLabel", "rows", "cols", "readonly", "wrap", "form", "maxLength", "autofocus", "defaultValue", "tabIndex"]);
5834
+ var { label, name, placeholder, value, onChange, onKeyDown, isRequired, isDisabled, errorMessage, helpText, hasHiddenLabel, rows, cols, readonly, wrap, form, maxLength, autofocus, defaultValue, tabIndex, text: _text } = _a, rest = __rest(_a, ["label", "name", "placeholder", "value", "onChange", "onKeyDown", "isRequired", "isDisabled", "errorMessage", "helpText", "hasHiddenLabel", "rows", "cols", "readonly", "wrap", "form", "maxLength", "autofocus", "defaultValue", "tabIndex", "text"]);
5813
5835
  const hasErrors = errorMessage && errorMessage.length > 0;
5814
5836
  const textareaClasses = classNames('textarea', { error: hasErrors });
5815
5837
  return (jsxs(Fragment, { children: [jsx("div", { className: "textarea-wrapper", children: jsx("textarea", Object.assign({ ref: ref, rows: rows, cols: cols, autoFocus: autofocus, wrap: wrap, form: form, maxLength: maxLength, readOnly: readonly, "data-testid": `form-textarea-${name}`, name: name, disabled: isDisabled, placeholder: placeholder, onChange: onChange, onKeyDown: onKeyDown, className: textareaClasses, "aria-invalid": hasErrors ? true : undefined, "aria-describedby": hasErrors || helpText ? `${name}-helper` : undefined, "aria-required": isRequired, value: value, defaultValue: defaultValue, tabIndex: tabIndex }, rest)) }), hasErrors && jsx(DisplayFormError, { message: errorMessage }), helpText && (jsx("div", { "data-testid": `${name}-help-text`, className: "help-text", id: `${name}-helper`, children: helpText }))] }));
@@ -5817,7 +5839,7 @@ const Textarea = React__default.forwardRef((_a, ref) => {
5817
5839
  const LabeledTextarea = withLabel(Textarea);
5818
5840
 
5819
5841
  const PasswordInput = React__default.forwardRef((_a, ref) => {
5820
- var { name, placeholder, onChange, onBlur, onKeyDown, isRequired, isDisabled, errorMessage, helpText, hasShowPassword = true } = _a, rest = __rest(_a, ["name", "placeholder", "onChange", "onBlur", "onKeyDown", "isRequired", "isDisabled", "errorMessage", "helpText", "hasShowPassword"]);
5842
+ var { name, placeholder, onChange, onBlur, onKeyDown, isRequired, isDisabled, errorMessage, helpText, hasShowPassword = true, text: _text } = _a, rest = __rest(_a, ["name", "placeholder", "onChange", "onBlur", "onKeyDown", "isRequired", "isDisabled", "errorMessage", "helpText", "hasShowPassword", "text"]);
5821
5843
  const hasErrors = errorMessage && errorMessage.length > 0;
5822
5844
  const [showPassword, setShowPassword] = useState(false);
5823
5845
  const handleShowPassword = () => {
@@ -5830,18 +5852,25 @@ const PasswordInput = React__default.forwardRef((_a, ref) => {
5830
5852
  });
5831
5853
  const LabeledPasswordInput = withLabel(PasswordInput);
5832
5854
 
5855
+ const DEFAULT_TEXT$8 = {
5856
+ placeholder: 'Select...',
5857
+ noOptions: 'No options',
5858
+ loading: 'Loading...',
5859
+ required: '(required)',
5860
+ };
5833
5861
  const OptionComponent = (_a) => {
5834
5862
  var _b, _c, _d;
5835
5863
  var props = __rest(_a, []);
5836
5864
  return (jsx(components$1.Option, Object.assign({}, props, { children: jsxs("div", { className: "select__items", children: [jsx("div", { className: "select__item-value", children: (_b = props === null || props === void 0 ? void 0 : props.data) === null || _b === void 0 ? void 0 : _b.label }), ((_c = props === null || props === void 0 ? void 0 : props.data) === null || _c === void 0 ? void 0 : _c.detail) && jsx("div", { className: "select__item-detail", children: (_d = props === null || props === void 0 ? void 0 : props.data) === null || _d === void 0 ? void 0 : _d.detail })] }) })));
5837
5865
  };
5838
5866
  const Select$1 = React__default.forwardRef((_a, ref) => {
5839
- var { classNamePrefix = 'select', className, components: customComponents, label, hasHiddenLabel, name } = _a, props = __rest(_a, ["classNamePrefix", "className", "components", "label", "hasHiddenLabel", "name"]);
5867
+ var { classNamePrefix = 'select', className, components: customComponents, label, hasHiddenLabel, name, text: textProp } = _a, props = __rest(_a, ["classNamePrefix", "className", "components", "label", "hasHiddenLabel", "name", "text"]);
5868
+ const text = Object.assign(Object.assign({}, DEFAULT_TEXT$8), textProp);
5840
5869
  const defaultComponents = {
5841
5870
  Option: OptionComponent,
5842
5871
  };
5843
5872
  const mergedComponents = Object.assign(Object.assign({}, defaultComponents), customComponents);
5844
- return (jsx(ReactSelect, Object.assign({ ref: ref, classNamePrefix: classNamePrefix, className: classNames('select-wrapper', className), components: mergedComponents }, props)));
5873
+ return (jsx(ReactSelect, Object.assign({ ref: ref, classNamePrefix: classNamePrefix, className: classNames('select-wrapper', className), components: mergedComponents, placeholder: text.placeholder, noOptionsMessage: () => text.noOptions, loadingMessage: () => text.loading }, props)));
5845
5874
  });
5846
5875
  const LabeledSelect = withLabel(Select$1);
5847
5876
 
@@ -13845,8 +13874,8 @@ const defaultOptions$1 = {
13845
13874
  placement: 'bottom-start',
13846
13875
  middleware: [offset$2(5), flip$2(), shift$2()],
13847
13876
  };
13848
- function FloatUI({ children, ariaLabel, isOpen: controlledIsOpen, setIsOpen: controlledSetIsOpen, isPortal = false, portalOptions = {}, floatingOptions = defaultOptions$1, className, hover = false, onOpenChange, }) {
13849
- var _a;
13877
+ function FloatUI({ children, ariaLabel, isOpen: controlledIsOpen, setIsOpen: controlledSetIsOpen, isPortal = false, portalOptions = {}, floatingOptions = defaultOptions$1, className, hover = false, onOpenChange, disableAutoUpdate = false, }) {
13878
+ var _a, _b;
13850
13879
  const [internalIsOpen, setInternalIsOpen] = useState(false);
13851
13880
  // Determine whether the component is controlled or uncontrolled
13852
13881
  const isControlled = controlledIsOpen !== undefined && controlledSetIsOpen !== undefined;
@@ -13866,7 +13895,9 @@ function FloatUI({ children, ariaLabel, isOpen: controlledIsOpen, setIsOpen: con
13866
13895
  const { refs, floatingStyles, context } = useFloating(Object.assign(Object.assign({}, floatingOptions), { open: isOpen, onOpenChange: (isOpen) => {
13867
13896
  setIsOpen(isOpen);
13868
13897
  onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(isOpen);
13869
- }, elements: {
13898
+ }, whileElementsMounted: disableAutoUpdate
13899
+ ? undefined
13900
+ : ((_b = floatingOptions.whileElementsMounted) !== null && _b !== void 0 ? _b : autoUpdate$1), elements: {
13870
13901
  reference: referenceElement,
13871
13902
  } }));
13872
13903
  // Can't call hooks conditionally so this enabled option is needed.
@@ -13930,8 +13961,12 @@ const validateInputValue = (value) => {
13930
13961
  return ''; // Valid time format
13931
13962
  };
13932
13963
 
13964
+ const DEFAULT_TEXT$7 = {
13965
+ validationError: 'Time validation error',
13966
+ };
13933
13967
  const TimePicker = (_a) => {
13934
- var { ref, timeValue = '', label = 'Time Picker', name = 'time-picker', hasHiddenLabel = false, onTimeChange, className, isDisabled, isReadOnly, tabIndex } = _a, rest = __rest(_a, ["ref", "timeValue", "label", "name", "hasHiddenLabel", "onTimeChange", "className", "isDisabled", "isReadOnly", "tabIndex"]);
13968
+ var { ref, timeValue = '', label = 'Time Picker', name = 'time-picker', hasHiddenLabel = false, onTimeChange, className, isDisabled, isReadOnly, tabIndex, text: textProp } = _a, rest = __rest(_a, ["ref", "timeValue", "label", "name", "hasHiddenLabel", "onTimeChange", "className", "isDisabled", "isReadOnly", "tabIndex", "text"]);
13969
+ const text = Object.assign(Object.assign({}, DEFAULT_TEXT$7), textProp);
13935
13970
  const [validationError, setValidationError] = useState('');
13936
13971
  const [inputValue, setInputValue] = useState(timeValue);
13937
13972
  const handleTimeChange = (e) => {
@@ -13953,7 +13988,7 @@ const TimePicker = (_a) => {
13953
13988
  onTimeChange === null || onTimeChange === void 0 ? void 0 : onTimeChange(formattedValue);
13954
13989
  }
13955
13990
  };
13956
- return (jsxs("div", { className: "time-input-wrapper", children: [jsx(LabeledInput, Object.assign({ ref: ref, tabIndex: tabIndex, className: className, "data-testid": `${name}-input`, label: label, hasHiddenLabel: hasHiddenLabel, value: inputValue, maxLength: 8, onChange: handleTimeChange, onBlur: handleBlur, name: name, readonly: isReadOnly, isDisabled: isDisabled }, rest)), jsxs(FloatUI, { ariaLabel: "Time validation error", isOpen: !!validationError, setIsOpen: () => { }, isPortal: true, portalOptions: {
13991
+ return (jsxs("div", { className: "time-input-wrapper", children: [jsx(LabeledInput, Object.assign({ ref: ref, tabIndex: tabIndex, className: className, "data-testid": `${name}-input`, label: label, hasHiddenLabel: hasHiddenLabel, value: inputValue, maxLength: 8, onChange: handleTimeChange, onBlur: handleBlur, name: name, readonly: isReadOnly, isDisabled: isDisabled }, rest)), jsxs(FloatUI, { ariaLabel: text.validationError, isOpen: !!validationError, setIsOpen: () => { }, isPortal: true, portalOptions: {
13957
13992
  rootId: 'theme-root' ,
13958
13993
  }, floatingOptions: {
13959
13994
  placement: 'bottom-start',
@@ -13961,8 +13996,12 @@ const TimePicker = (_a) => {
13961
13996
  }, children: [jsx("div", {}), jsx("div", { className: "time-validation-error", children: validationError && jsx("div", { className: "error-message", children: validationError }) })] })] }));
13962
13997
  };
13963
13998
 
13999
+ const DEFAULT_TEXT$6 = {
14000
+ selectTime: 'Select Time',
14001
+ };
13964
14002
  const DatePicker = (props) => {
13965
- const { mode = 'single', className, captionLayout = 'dropdown', selected, hasTimePicker = false, id, month, defaultMonth, startMonth, endMonth, components, numberOfMonths, isDisabled, formatters, weekStartsOn, firstWeekContainsDate, today, timeValue, isRequired, min, max, onTimeChange, onSelect, onMonthChange, onNextClick, onPrevClick, onDayClick, isReadOnly, ref, timeTabIndex, dateTabIndex } = props, rest = __rest(props, ["mode", "className", "captionLayout", "selected", "hasTimePicker", "id", "month", "defaultMonth", "startMonth", "endMonth", "components", "numberOfMonths", "isDisabled", "formatters", "weekStartsOn", "firstWeekContainsDate", "today", "timeValue", "isRequired", "min", "max", "onTimeChange", "onSelect", "onMonthChange", "onNextClick", "onPrevClick", "onDayClick", "isReadOnly", "ref", "timeTabIndex", "dateTabIndex"]);
14003
+ const { mode = 'single', className, captionLayout = 'dropdown', selected, hasTimePicker = false, id, month, defaultMonth, startMonth, endMonth, components, numberOfMonths, isDisabled, formatters, weekStartsOn, firstWeekContainsDate, today, timeValue, isRequired, min, max, onTimeChange, onSelect, onMonthChange, onNextClick, onPrevClick, onDayClick, isReadOnly, ref, timeTabIndex, dateTabIndex, text: textProp } = props, rest = __rest(props, ["mode", "className", "captionLayout", "selected", "hasTimePicker", "id", "month", "defaultMonth", "startMonth", "endMonth", "components", "numberOfMonths", "isDisabled", "formatters", "weekStartsOn", "firstWeekContainsDate", "today", "timeValue", "isRequired", "min", "max", "onTimeChange", "onSelect", "onMonthChange", "onNextClick", "onPrevClick", "onDayClick", "isReadOnly", "ref", "timeTabIndex", "dateTabIndex", "text"]);
14004
+ const text = Object.assign(Object.assign({}, DEFAULT_TEXT$6), textProp);
13966
14005
  const futureDateByYear = (year) => new Date(new Date().getFullYear() + year, 11, 31);
13967
14006
  const endMonthDefault = endMonth !== null && endMonth !== void 0 ? endMonth : futureDateByYear(5);
13968
14007
  const modeMap = {
@@ -14013,11 +14052,15 @@ const DatePicker = (props) => {
14013
14052
  }
14014
14053
  return () => observer.disconnect();
14015
14054
  }, []);
14016
- return (jsxs("div", { className: "date-picker-wrapper", tabIndex: -1, ref: wrapperRef, children: [hasTimePicker && (jsx("div", { className: "time-picker-wrapper", children: jsxs(Row, { align: "center", children: [jsx(Col, { xs: "content", children: jsx("p", { className: "ma-0", children: "Select Time" }) }), jsx(Col, { children: jsx(TimePicker, { ref: ref, timeValue: timeValue !== null && timeValue !== void 0 ? timeValue : '', onTimeChange: handleTimeChange, readonly: isReadOnly, tabIndex: timeTabIndex }) })] }) })), jsx(DayPicker, Object.assign({}, finalProps))] }));
14055
+ return (jsxs("div", { className: "date-picker-wrapper", tabIndex: -1, ref: wrapperRef, children: [hasTimePicker && (jsx("div", { className: "time-picker-wrapper", children: jsxs(Row, { align: "center", children: [jsx(Col, { xs: "content", children: jsx("p", { className: "ma-0", children: text.selectTime }) }), jsx(Col, { children: jsx(TimePicker, { ref: ref, timeValue: timeValue !== null && timeValue !== void 0 ? timeValue : '', onTimeChange: handleTimeChange, readonly: isReadOnly, tabIndex: timeTabIndex }) })] }) })), jsx(DayPicker, Object.assign({}, finalProps))] }));
14017
14056
  };
14018
14057
 
14058
+ const DEFAULT_TEXT$5 = {
14059
+ triggerIcon: 'Open date picker',
14060
+ };
14019
14061
  const IconTriggerDatePicker = (props) => {
14020
- const { ariaLabel, className, isDisabled, disableBeforeDate, disableAfterDate, id, label, onSelect, selected, triggerIcon, triggerIconSize, mode, isOpen, clearOnClose, initialMonth, portalOptions, floatingOptions, isPortal } = props, rest = __rest(props, ["ariaLabel", "className", "isDisabled", "disableBeforeDate", "disableAfterDate", "id", "label", "onSelect", "selected", "triggerIcon", "triggerIconSize", "mode", "isOpen", "clearOnClose", "initialMonth", "portalOptions", "floatingOptions", "isPortal"]);
14062
+ const { ariaLabel, className, isDisabled, disableBeforeDate, disableAfterDate, id, label, onSelect, selected, triggerIcon, triggerIconSize, mode, isOpen, clearOnClose, initialMonth, portalOptions, floatingOptions, isPortal, text: textProp } = props, rest = __rest(props, ["ariaLabel", "className", "isDisabled", "disableBeforeDate", "disableAfterDate", "id", "label", "onSelect", "selected", "triggerIcon", "triggerIconSize", "mode", "isOpen", "clearOnClose", "initialMonth", "portalOptions", "floatingOptions", "isPortal", "text"]);
14063
+ const text = Object.assign(Object.assign({}, DEFAULT_TEXT$5), textProp);
14021
14064
  const [localMonth, setLocalMonth] = useState(initialMonth !== null && initialMonth !== void 0 ? initialMonth : new Date());
14022
14065
  const handleSelect = (date) => {
14023
14066
  if (!date) {
@@ -14033,7 +14076,7 @@ const IconTriggerDatePicker = (props) => {
14033
14076
  onSelect && onSelect(undefined);
14034
14077
  }
14035
14078
  }, [isOpen, clearOnClose]);
14036
- return (jsxs(FloatUI, { isOpen: isOpen, ariaLabel: ariaLabel, isPortal: isPortal, portalOptions: portalOptions, floatingOptions: floatingOptions, children: [jsx(Icon, { "aria-label": "Open date picker", name: triggerIcon, size: triggerIconSize, className: "date__picker__trigger", "data-testid": `datepicker-trigger-for-${id}` }), jsx(DatePicker, Object.assign({ isDisabled: isDisabled, mode: mode, selected: selected, onSelect: handleSelect, month: localMonth, startMonth: disableBeforeDate, endMonth: disableAfterDate, onMonthChange: setLocalMonth }, rest))] }));
14079
+ return (jsxs(FloatUI, { isOpen: isOpen, ariaLabel: ariaLabel, isPortal: isPortal, portalOptions: portalOptions, floatingOptions: floatingOptions, children: [jsx(Icon, { "aria-label": text.triggerIcon, name: triggerIcon, size: triggerIconSize, className: "date__picker__trigger", "data-testid": `datepicker-trigger-for-${id}` }), jsx(DatePicker, Object.assign({ isDisabled: isDisabled, mode: mode, selected: selected, onSelect: handleSelect, month: localMonth, startMonth: disableBeforeDate, endMonth: disableAfterDate, onMonthChange: setLocalMonth }, rest))] }));
14037
14080
  };
14038
14081
 
14039
14082
  /**
@@ -19460,11 +19503,16 @@ function SingleInputDatePicker(props) {
19460
19503
  setLocalTextValue('');
19461
19504
  }
19462
19505
  }, [isOpen, clearOnClose]);
19463
- return (jsxs(FloatUI, { isOpen: isOpen, ariaLabel: ariaLabel, isPortal: isPortal, portalOptions: portalOptions, floatingOptions: floatingOptions, children: [jsx(LabeledInput, { id: inputId, value: localTextValue, placeholder: inputPlaceholder, isDisabled: isDisabled, hasHiddenLabel: hasHiddenLabel, iconName: inputIconName, isClearable: isClearable, onChange: handleInputChange, errorMessage: errorMessage, label: 'Single Date Picker', tabIndex: tabIndex, name: 'Date Picker', ref: ref, readonly: isReadOnly }), jsx(DatePicker, Object.assign({ captionLayout: captionLayout, mode: "single", selected: selected, onSelect: handleDayPickerSelect, month: localMonth, onMonthChange: setLocalMonth }, rest))] }));
19506
+ return (jsxs(FloatUI, { isOpen: isOpen, ariaLabel: ariaLabel, isPortal: isPortal, portalOptions: portalOptions, floatingOptions: floatingOptions, children: [jsx(LabeledInput, { id: inputId, value: localTextValue, placeholder: inputPlaceholder, isDisabled: isDisabled, hasHiddenLabel: hasHiddenLabel, iconName: inputIconName, isClearable: isClearable, onChange: handleInputChange, errorMessage: errorMessage, label: label, tabIndex: tabIndex, name: label, ref: ref, readonly: isReadOnly }), jsx(DatePicker, Object.assign({ captionLayout: captionLayout, mode: "single", selected: selected, onSelect: handleDayPickerSelect, month: localMonth, onMonthChange: setLocalMonth }, rest))] }));
19464
19507
  }
19465
19508
 
19509
+ const DEFAULT_TEXT$4 = {
19510
+ fromDate: 'From Date',
19511
+ toDate: 'To Date',
19512
+ };
19466
19513
  function InputDateRangePicker(props) {
19467
- const { ariaLabel, className, isDisabled, disableBeforeDate, disableAfterDate, captionLayout, month, id, onSelect, selected, isOpen, setIsOpen, inputPlaceholder, inputIconName, toErrorMessage, fromErrorMessage, gutterWidth, fromLabel, toLabel, closeOnSelect, clearOnClose, hasHiddenLabel, ref, isFromReadOnly, isToReadOnly, toTabIndex, fromTabIndex, portalOptions, floatingOptions, isPortal } = props, rest = __rest(props, ["ariaLabel", "className", "isDisabled", "disableBeforeDate", "disableAfterDate", "captionLayout", "month", "id", "onSelect", "selected", "isOpen", "setIsOpen", "inputPlaceholder", "inputIconName", "toErrorMessage", "fromErrorMessage", "gutterWidth", "fromLabel", "toLabel", "closeOnSelect", "clearOnClose", "hasHiddenLabel", "ref", "isFromReadOnly", "isToReadOnly", "toTabIndex", "fromTabIndex", "portalOptions", "floatingOptions", "isPortal"]);
19514
+ const { ariaLabel, className, isDisabled, disableBeforeDate, disableAfterDate, captionLayout, month, id, onSelect, selected, isOpen, setIsOpen, inputPlaceholder, inputIconName, toErrorMessage, fromErrorMessage, gutterWidth, fromLabel, toLabel, closeOnSelect, clearOnClose, hasHiddenLabel, ref, isFromReadOnly, isToReadOnly, toTabIndex, fromTabIndex, portalOptions, floatingOptions, isPortal, text: textProp } = props, rest = __rest(props, ["ariaLabel", "className", "isDisabled", "disableBeforeDate", "disableAfterDate", "captionLayout", "month", "id", "onSelect", "selected", "isOpen", "setIsOpen", "inputPlaceholder", "inputIconName", "toErrorMessage", "fromErrorMessage", "gutterWidth", "fromLabel", "toLabel", "closeOnSelect", "clearOnClose", "hasHiddenLabel", "ref", "isFromReadOnly", "isToReadOnly", "toTabIndex", "fromTabIndex", "portalOptions", "floatingOptions", "isPortal", "text"]);
19515
+ const text = Object.assign(Object.assign({}, DEFAULT_TEXT$4), textProp);
19468
19516
  const inputId = useId$1();
19469
19517
  // Hold the input values in state
19470
19518
  const [localTextValueFrom, setLocalTextValueFrom] = useState((selected === null || selected === void 0 ? void 0 : selected.from) ? formatDateAsString$1(selected.from) : '');
@@ -19523,7 +19571,7 @@ function InputDateRangePicker(props) {
19523
19571
  setLocalTextValueTo('');
19524
19572
  }
19525
19573
  }, [isOpen, clearOnClose]);
19526
- return (jsxs(FloatUI, { isOpen: isOpen, setIsOpen: setIsOpen, ariaLabel: ariaLabel, portalOptions: portalOptions, floatingOptions: floatingOptions, children: [jsxs(Row, { gutterWidth: gutterWidth, children: [jsx(Col, { children: jsx(LabeledInput, { id: `${inputId}-from`, value: localTextValueFrom, placeholder: inputPlaceholder, isDisabled: isDisabled, iconName: inputIconName, onChange: (e) => handleInputChange(e, 'from'), errorMessage: fromErrorMessage, label: fromLabel, name: 'From Date', "data-testid": "date-picker-from", hasHiddenLabel: hasHiddenLabel, ref: ref, readonly: isFromReadOnly, tabIndex: fromTabIndex }) }), jsx(Col, { children: jsx(LabeledInput, { id: `${inputId}-to`, value: localTextValueTo, placeholder: inputPlaceholder, isDisabled: isDisabled, iconName: inputIconName, onChange: (e) => handleInputChange(e, 'to'), errorMessage: toErrorMessage, label: toLabel, name: 'To Date', "data-testid": "date-picker-to", hasHiddenLabel: hasHiddenLabel, ref: ref, readonly: isToReadOnly, tabIndex: toTabIndex }) })] }), jsx(DatePicker, Object.assign({ captionLayout: captionLayout, month: localMonth, onMonthChange: (date) => setLocalMonth(date), mode: "range", selected: selected, onSelect: handleDayPickerSelect }, rest))] }));
19574
+ return (jsxs(FloatUI, { isOpen: isOpen, setIsOpen: setIsOpen, ariaLabel: ariaLabel, portalOptions: portalOptions, floatingOptions: floatingOptions, children: [jsxs(Row, { gutterWidth: gutterWidth, children: [jsx(Col, { children: jsx(LabeledInput, { id: `${inputId}-from`, value: localTextValueFrom, placeholder: inputPlaceholder, isDisabled: isDisabled, iconName: inputIconName, onChange: (e) => handleInputChange(e, 'from'), errorMessage: fromErrorMessage, label: fromLabel, name: text.fromDate, "data-testid": "date-picker-from", hasHiddenLabel: hasHiddenLabel, ref: ref, readonly: isFromReadOnly, tabIndex: fromTabIndex }) }), jsx(Col, { children: jsx(LabeledInput, { id: `${inputId}-to`, value: localTextValueTo, placeholder: inputPlaceholder, isDisabled: isDisabled, iconName: inputIconName, onChange: (e) => handleInputChange(e, 'to'), errorMessage: toErrorMessage, label: toLabel, name: text.toDate, "data-testid": "date-picker-to", hasHiddenLabel: hasHiddenLabel, ref: ref, readonly: isToReadOnly, tabIndex: toTabIndex }) })] }), jsx(DatePicker, Object.assign({ captionLayout: captionLayout, month: localMonth, onMonthChange: (date) => setLocalMonth(date), mode: "range", selected: selected, onSelect: handleDayPickerSelect }, rest))] }));
19527
19575
  }
19528
19576
 
19529
19577
  const formatDateAsString = (date) => format(date, 'MM/dd/yyyy');
@@ -19567,7 +19615,7 @@ function SingleInputDateTimePicker(props) {
19567
19615
  const handleTimeChange = (time) => {
19568
19616
  onTimeChange === null || onTimeChange === void 0 ? void 0 : onTimeChange(time);
19569
19617
  };
19570
- return (jsxs(Row, { className: "date-time-picker-row", children: [jsx(Col, { className: "date-picker-col", children: jsxs(FloatUI, { className: "date-picker-float-ui", isOpen: isOpen, ariaLabel: ariaLabel, isPortal: isPortal, portalOptions: portalOptions, floatingOptions: floatingOptions, children: [jsx(LabeledInput, { ref: ref, className: `date-picker-input`, id: inputId, value: localTextValue, placeholder: inputPlaceholder, isDisabled: isReadOnly || isDisabled, readonly: isReadOnly, iconName: inputIconName, isClearable: isClearable, onChange: handleInputChange, errorMessage: errorMessage, hasHiddenLabel: hasHiddenLabel, label: 'Single Date Picker', name: `${id}-date-picker`, tabIndex: dateTabIndex }), jsx(DatePicker, Object.assign({ captionLayout: captionLayout, mode: "single", selected: selected, onSelect: handleDayPickerSelect, month: localMonth, onMonthChange: setLocalMonth, isReadOnly: isReadOnly }, rest))] }) }), jsx(Col, { xs: "content", className: "time-picker-col", children: jsx(TimePicker, { ref: timePickerRef, className: `time-picker-input`, timeValue: timeValue, name: `${id}-time-picker`, hasHiddenLabel: true, onTimeChange: handleTimeChange, isReadOnly: isReadOnly, isDisabled: isDisabled, tabIndex: timeTabIndex }) })] }));
19618
+ return (jsxs(Row, { className: "date-time-picker-row", children: [jsx(Col, { className: "date-picker-col", children: jsxs(FloatUI, { className: "date-picker-float-ui", isOpen: isOpen, ariaLabel: ariaLabel, isPortal: isPortal, portalOptions: portalOptions, floatingOptions: floatingOptions, children: [jsx(LabeledInput, { ref: ref, className: `date-picker-input`, id: inputId, value: localTextValue, placeholder: inputPlaceholder, isDisabled: isReadOnly || isDisabled, readonly: isReadOnly, iconName: inputIconName, isClearable: isClearable, onChange: handleInputChange, errorMessage: errorMessage, hasHiddenLabel: hasHiddenLabel, label: label, name: `${id}-date-picker`, tabIndex: dateTabIndex }), jsx(DatePicker, Object.assign({ captionLayout: captionLayout, mode: "single", selected: selected, onSelect: handleDayPickerSelect, month: localMonth, onMonthChange: setLocalMonth, isReadOnly: isReadOnly }, rest))] }) }), jsx(Col, { xs: "content", className: "time-picker-col", children: jsx(TimePicker, { ref: timePickerRef, className: `time-picker-input`, timeValue: timeValue, name: `${id}-time-picker`, hasHiddenLabel: true, onTimeChange: handleTimeChange, isReadOnly: isReadOnly, isDisabled: isDisabled, tabIndex: timeTabIndex }) })] }));
19571
19619
  }
19572
19620
 
19573
19621
  const Form = (_a) => {
@@ -21449,32 +21497,42 @@ Modal$2.default = Modal$1;
21449
21497
  var libExports = lib.exports;
21450
21498
  var ReactModal = /*@__PURE__*/getDefaultExportFromCjs(libExports);
21451
21499
 
21500
+ const DEFAULT_TEXT$3 = {
21501
+ closeButton: 'Close',
21502
+ };
21452
21503
  const Modal = (_a) => {
21453
21504
  var { className = '', children, isOpen, onRequestClose, portalClassName, overlayClassName, appElement = document.getElementById('theme-root') ||
21454
21505
  document.getElementById('root') ||
21455
21506
  document.body, shouldCloseOnOverlayClick, shouldCloseOnEsc, testId, contentElement, overlayElement, position = 'center', parentSelector = () => document.getElementById('theme-root') || document.getElementById('root'), // default for our apps, storybook needs a different one
21456
- title, subtitle, footer, maxWidthInPixels } = _a, rest = __rest(_a, ["className", "children", "isOpen", "onRequestClose", "portalClassName", "overlayClassName", "appElement", "shouldCloseOnOverlayClick", "shouldCloseOnEsc", "testId", "contentElement", "overlayElement", "position", "parentSelector", "title", "subtitle", "footer", "maxWidthInPixels"]);
21507
+ title, subtitle, footer, maxWidthInPixels, text: textProp } = _a, rest = __rest(_a, ["className", "children", "isOpen", "onRequestClose", "portalClassName", "overlayClassName", "appElement", "shouldCloseOnOverlayClick", "shouldCloseOnEsc", "testId", "contentElement", "overlayElement", "position", "parentSelector", "title", "subtitle", "footer", "maxWidthInPixels", "text"]);
21508
+ const text = Object.assign(Object.assign({}, DEFAULT_TEXT$3), textProp);
21457
21509
  const modalClasses = classNames('modal', `modal--${position}`, className);
21458
21510
  const overlayClasses = classNames('modal-overlay', overlayClassName);
21459
21511
  const hasHeader = title || subtitle;
21460
- return (jsx(ReactModal, Object.assign({ className: modalClasses, overlayClassName: overlayClasses, testId: testId, isOpen: isOpen, onRequestClose: onRequestClose, portalClassName: portalClassName, appElement: appElement, parentSelector: parentSelector, shouldCloseOnOverlayClick: shouldCloseOnOverlayClick, shouldCloseOnEsc: shouldCloseOnEsc, contentElement: contentElement, overlayElement: overlayElement }, rest, { children: jsxs("div", { className: "modal-content", style: { maxWidth: `${maxWidthInPixels}px` }, children: [jsx(Button$1, { className: "modal-close-button", onClick: onRequestClose, variant: "link", size: "md", iconLeft: "x-close", ariaLabel: "Close" }), hasHeader && (jsx("div", { className: "modal-header", children: jsx(Row, { justify: "between", align: "center", children: jsxs(Col, { children: [title && jsx("h2", { className: "modal-title", children: title }), subtitle && jsx("p", { className: "modal-subtitle", children: subtitle })] }) }) })), jsx("div", { className: "modal-body", children: children }), footer && jsx("div", { className: "modal-footer", children: footer })] }) })));
21512
+ return (jsx(ReactModal, Object.assign({ className: modalClasses, overlayClassName: overlayClasses, testId: testId, isOpen: isOpen, onRequestClose: onRequestClose, portalClassName: portalClassName, appElement: appElement, parentSelector: parentSelector, shouldCloseOnOverlayClick: shouldCloseOnOverlayClick, shouldCloseOnEsc: shouldCloseOnEsc, contentElement: contentElement, overlayElement: overlayElement }, rest, { children: jsxs("div", { className: "modal-content", style: { maxWidth: `${maxWidthInPixels}px` }, children: [jsx(Button$1, { className: "modal-close-button", onClick: onRequestClose, variant: "link", size: "md", iconLeft: "x-close", ariaLabel: text.closeButton }), hasHeader && (jsx("div", { className: "modal-header", children: jsx(Row, { justify: "between", align: "center", children: jsxs(Col, { children: [title && jsx("h2", { className: "modal-title", children: title }), subtitle && jsx("p", { className: "modal-subtitle", children: subtitle })] }) }) })), jsx("div", { className: "modal-body", children: children }), footer && jsx("div", { className: "modal-footer", children: footer })] }) })));
21461
21513
  };
21462
21514
 
21463
- const defaultFooter = ({ onCancelRequest, onConfirmRequest, confirmationButtonText, confirmationButtonVariant, cancelButtonText, hasDontShowAgainCheckbox, isChecked, onDontShowAgainChange, }) => (jsxs(Row, { gutterWidth: 12, justify: "end", align: "center", children: [hasDontShowAgainCheckbox && (jsx(Col, { children: jsx(Checkbox, { label: "Don't display this again.", onChange: (e) => onDontShowAgainChange === null || onDontShowAgainChange === void 0 ? void 0 : onDontShowAgainChange(e.target.checked), isChecked: isChecked, id: "dont-show-again", name: "dont-show-again" }) })), jsx(Col, { xs: "content", children: jsx(Button$1, { onClick: onCancelRequest, ariaLabel: cancelButtonText || 'Cancel', variant: "outline", children: cancelButtonText }) }), jsx(Col, { xs: "content", children: jsx(Button$1, { onClick: () => onConfirmRequest === null || onConfirmRequest === void 0 ? void 0 : onConfirmRequest({ dontShowAgain: isChecked }), ariaLabel: confirmationButtonText || 'Confirm', variant: confirmationButtonVariant, children: confirmationButtonText }) })] }));
21464
- const ConfirmationModal = ({ className, overlayClassName, testId, isOpen, onRequestClose, portalClassName, appElement, parentSelector, shouldCloseOnOverlayClick, shouldCloseOnEsc, contentElement, overlayElement, footer, children, onConfirmRequest, onCancelRequest, confirmationButtonText = 'Confirm', cancelButtonText = 'Cancel', confirmationButtonVariant = 'solid', icon, title, status = 'info', maxWidthInPixels, hasDontShowAgainCheckbox, }) => {
21515
+ const DEFAULT_TEXT$2 = {
21516
+ closeButton: 'Close',
21517
+ dontShowAgain: "Don't display this again.",
21518
+ confirm: 'Confirm',
21519
+ cancel: 'Cancel',
21520
+ };
21521
+ const defaultFooter = ({ onCancelRequest, onConfirmRequest, text, confirmationButtonVariant, hasDontShowAgainCheckbox, isChecked, onDontShowAgainChange, }) => (jsxs(Row, { gutterWidth: 12, justify: "end", align: "center", children: [hasDontShowAgainCheckbox && (jsx(Col, { children: jsx(Checkbox, { label: text.dontShowAgain, onChange: (e) => onDontShowAgainChange === null || onDontShowAgainChange === void 0 ? void 0 : onDontShowAgainChange(e.target.checked), isChecked: isChecked, id: "dont-show-again", name: "dont-show-again" }) })), jsx(Col, { xs: "content", children: jsx(Button$1, { onClick: onCancelRequest, ariaLabel: text.cancel, variant: "outline", children: text.cancel }) }), jsx(Col, { xs: "content", children: jsx(Button$1, { onClick: () => onConfirmRequest === null || onConfirmRequest === void 0 ? void 0 : onConfirmRequest({ dontShowAgain: isChecked }), ariaLabel: text.confirm, variant: confirmationButtonVariant, children: text.confirm }) })] }));
21522
+ const ConfirmationModal = ({ className, overlayClassName, testId, isOpen, onRequestClose, portalClassName, appElement, parentSelector, shouldCloseOnOverlayClick, shouldCloseOnEsc, contentElement, overlayElement, footer, children, onConfirmRequest, onCancelRequest, confirmationButtonVariant = 'solid', icon, title, status = 'info', maxWidthInPixels, hasDontShowAgainCheckbox, text: textProp, }) => {
21523
+ const text = Object.assign(Object.assign({}, DEFAULT_TEXT$2), textProp);
21465
21524
  const [dontShowAgain, setDontShowAgain] = useState(false);
21466
21525
  const modalFooter = footer ||
21467
21526
  defaultFooter({
21468
21527
  onCancelRequest,
21469
21528
  onConfirmRequest,
21470
- confirmationButtonText,
21471
- cancelButtonText,
21529
+ text,
21472
21530
  confirmationButtonVariant,
21473
21531
  hasDontShowAgainCheckbox,
21474
21532
  isChecked: dontShowAgain,
21475
21533
  onDontShowAgainChange: setDontShowAgain,
21476
21534
  });
21477
- return (jsxs(Modal, { className: classNames('confirmation-modal', className), overlayClassName: overlayClassName, testId: testId, isOpen: isOpen, onRequestClose: onRequestClose, portalClassName: portalClassName, appElement: appElement, parentSelector: parentSelector, shouldCloseOnOverlayClick: shouldCloseOnOverlayClick, shouldCloseOnEsc: shouldCloseOnEsc, contentElement: contentElement, overlayElement: overlayElement, footer: modalFooter, maxWidthInPixels: maxWidthInPixels, children: [icon && (jsx(Icon, { name: icon, className: classNames('confirmation-modal-icon', `color-${status}`), size: "xl" })), title && jsx("h2", { className: "confirmation-modal-title", children: title }), children] }));
21535
+ return (jsxs(Modal, { className: classNames('confirmation-modal', className), overlayClassName: overlayClassName, testId: testId, isOpen: isOpen, onRequestClose: onRequestClose, portalClassName: portalClassName, appElement: appElement, parentSelector: parentSelector, shouldCloseOnOverlayClick: shouldCloseOnOverlayClick, shouldCloseOnEsc: shouldCloseOnEsc, contentElement: contentElement, overlayElement: overlayElement, footer: modalFooter, maxWidthInPixels: maxWidthInPixels, text: { closeButton: text.closeButton }, children: [icon && (jsx(Icon, { name: icon, className: classNames('confirmation-modal-icon', `color-${status}`), size: "xl" })), title && jsx("h2", { className: "confirmation-modal-title", children: title }), children] }));
21478
21536
  };
21479
21537
 
21480
21538
  /**
@@ -24578,8 +24636,8 @@ function ActionBar({ table, TableActions, className, children, }) {
24578
24636
  return (jsx(Card, { className: classNames('tanstack-table__action-bar', className), children: children !== null && children !== void 0 ? children : (jsx("div", { className: "tanstack-table__action-bar__container", children: TableActions && (jsx("div", { className: "tanstack-table__action-bar__button-container", children: jsx(TableActions, { selectedItems: selectedItems, unselectRows: unselectRows }) })) })) }));
24579
24637
  }
24580
24638
 
24581
- function NoResults({ clearFilters, hasFilters, message }) {
24582
- return (jsxs("div", { className: "tanstack-table__no-results", "data-testid": "tanstack-table-no-results", children: [jsx("p", { className: "tanstack-table__no-results__text", children: message }), hasFilters && (jsx("p", { className: "tanstack-table__no-results__text", children: jsx(Button$1, { ariaLabel: "Reset filters", variant: "link", onClick: clearFilters, children: "Reset filters" }) }))] }));
24639
+ function NoResults({ clearFilters, hasFilters, message, resetFiltersText = 'Reset filters', }) {
24640
+ return (jsxs("div", { className: "tanstack-table__no-results", "data-testid": "tanstack-table-no-results", children: [jsx("p", { className: "tanstack-table__no-results__text", children: message }), hasFilters && (jsx("p", { className: "tanstack-table__no-results__text", children: jsx(Button$1, { ariaLabel: resetFiltersText, variant: "link", onClick: clearFilters, children: resetFiltersText }) }))] }));
24583
24641
  }
24584
24642
 
24585
24643
  var lodash = {exports: {}};
@@ -41786,9 +41844,9 @@ lodash.exports;
41786
41844
 
41787
41845
  var lodashExports = lodash.exports;
41788
41846
 
41789
- const TablePagination = ({ rowsPerPage, rowCount, onChangePage, currentPage, totalEntriesText, }) => {
41847
+ const TablePagination = ({ rowsPerPage, rowCount, onChangePage, currentPage, totalEntriesText, text, }) => {
41790
41848
  const totalPages = Math.ceil(rowCount / rowsPerPage);
41791
- return (jsx("div", { className: "table__pagination", "data-testid": "tanstack-table-pagination", children: jsxs(Row, { align: "center", justify: "between", children: [jsx(Col, { xs: "content", children: totalEntriesText && (jsx("span", { "data-testid": "table-pagination-total-entries", className: "table__pagination-total-entries", children: totalEntriesText })) }), jsx(Col, { xs: "content", children: jsx(Pagination, { "data-testid": "table-pagination-component", totalPages: totalPages, currentPage: currentPage, onChange: (page) => onChangePage(page) }) })] }) }));
41849
+ return (jsx("div", { className: "table__pagination", "data-testid": "tanstack-table-pagination", children: jsxs(Row, { align: "center", justify: "between", children: [jsx(Col, { xs: "content", children: totalEntriesText && (jsx("span", { "data-testid": "table-pagination-total-entries", className: "table__pagination-total-entries", children: totalEntriesText })) }), jsx(Col, { xs: "content", children: jsx(Pagination, { "data-testid": "table-pagination-component", totalPages: totalPages, currentPage: currentPage, onChange: (page) => onChangePage(page), text: text }) })] }) }));
41792
41850
  };
41793
41851
 
41794
41852
  function useTanstackTable({ defaultColumns }) {
@@ -41898,8 +41956,18 @@ const TableLoading = ({ columns, message }) => {
41898
41956
  return (jsx("tr", { className: "tanstack-table__tbody__tr ", children: jsxs("td", { className: "tanstack-table__centered-row pa-6", colSpan: columns.length, children: [jsx("h2", { className: "my-12", children: message }), jsx(CirclePulse, { "data-testid": "loading-indicator", className: "mb-14" })] }) }));
41899
41957
  };
41900
41958
 
41959
+ const DEFAULT_TEXT$1 = {
41960
+ loading: 'Table is loading...',
41961
+ noResults: 'No results found.',
41962
+ error: 'There was an error loading the data.',
41963
+ resetFilters: 'Reset filters',
41964
+ entry: 'entry',
41965
+ entries: 'entries',
41966
+ of: 'of',
41967
+ };
41901
41968
  function TanstackTable(_a) {
41902
- var { columns: defaultColumns, data, className, currentPage, rowCount, rowsPerPage = 1000, onChangePage, totalEntriesText, TableActions, error, enableRowSelection = true, clearFilters, hasFilters, showPagination = true, isLoading = false, isLoadingMessage = 'Table is loading...', defaultPinnedColumns, onRowClick, activeRows = [], isStriped = true, actionBarClassName, defaultSorting } = _a, rest = __rest(_a, ["columns", "data", "className", "currentPage", "rowCount", "rowsPerPage", "onChangePage", "totalEntriesText", "TableActions", "error", "enableRowSelection", "clearFilters", "hasFilters", "showPagination", "isLoading", "isLoadingMessage", "defaultPinnedColumns", "onRowClick", "activeRows", "isStriped", "actionBarClassName", "defaultSorting"]);
41969
+ var { columns: defaultColumns, data, className, currentPage, rowCount, rowsPerPage = 1000, onChangePage, totalEntriesText, TableActions, error, enableRowSelection = true, clearFilters, hasFilters, showPagination = true, isLoading = false, defaultPinnedColumns, onRowClick, activeRows = [], isStriped = true, actionBarClassName, defaultSorting, text: textProp } = _a, rest = __rest(_a, ["columns", "data", "className", "currentPage", "rowCount", "rowsPerPage", "onChangePage", "totalEntriesText", "TableActions", "error", "enableRowSelection", "clearFilters", "hasFilters", "showPagination", "isLoading", "defaultPinnedColumns", "onRowClick", "activeRows", "isStriped", "actionBarClassName", "defaultSorting", "text"]);
41970
+ const text = Object.assign(Object.assign({}, DEFAULT_TEXT$1), textProp);
41903
41971
  const { columns, defaultData, windowWidth, rowSelection, // This refers to the checkboxes.
41904
41972
  setRowSelection, formattedColumns, setFormattedColumns, } = useTanstackTable({
41905
41973
  defaultColumns,
@@ -41938,20 +42006,18 @@ function TanstackTable(_a) {
41938
42006
  const renderBody = () => {
41939
42007
  var _a;
41940
42008
  if (hasErrorAndIsNotLoading || hasNoResults) {
41941
- return (jsx("tr", { className: "tanstack-table__tbody__tr", children: jsx("td", { className: "tanstack-table__centered-row", colSpan: columns.length, children: jsx(NoResults, { clearFilters: clearFilters, hasFilters: hasFilters, message: hasErrorAndIsNotLoading
41942
- ? (_a = error === null || error === void 0 ? void 0 : error.errorMessage) !== null && _a !== void 0 ? _a : 'There was an error isLoading the data.'
41943
- : 'No results found.' }) }) }));
42009
+ return (jsx("tr", { className: "tanstack-table__tbody__tr", children: jsx("td", { className: "tanstack-table__centered-row", colSpan: columns.length, children: jsx(NoResults, { clearFilters: clearFilters, hasFilters: hasFilters, resetFiltersText: text.resetFilters, message: hasErrorAndIsNotLoading ? (_a = error === null || error === void 0 ? void 0 : error.errorMessage) !== null && _a !== void 0 ? _a : text.error : text.noResults }) }) }));
41944
42010
  }
41945
42011
  if (isLoading) {
41946
- return jsx(TableLoading, { columns: columns, message: isLoadingMessage });
42012
+ return jsx(TableLoading, { columns: columns, message: text.loading });
41947
42013
  }
41948
42014
  return (jsx(TableBody, { table: table, onRowClick: onRowClick, activeRows: activeRows }));
41949
42015
  };
41950
42016
  return (jsxs("div", { className: "tanstack-table__outer-container", children: [jsxs("div", { className: "tanstack-table__container", children: [jsxs("table", { className: classNames('tanstack-table', className, {
41951
42017
  'is-striped': isStriped,
41952
- }), children: [jsx("thead", { className: "tanstack-table__thead", children: jsx(TableHeader, { table: table, ref: thRefs }) }), jsx("tbody", { className: "tanstack-table__tbody", children: renderBody() })] }), hasSelectedRows && (jsx(ActionBar, { table: table, TableActions: TableActions, className: actionBarClassName }))] }), shouldRenderPagination ? (jsx(TablePagination, { currentPage: currentPage, rowCount: rowCount, onChangePage: onChangePage, rowsPerPage: rowsPerPage, totalEntriesText: (totalEntriesText !== null && totalEntriesText !== void 0 ? totalEntriesText : rowCount === 1)
41953
- ? '1 entry'
41954
- : `${totalRowsOnPage} of ${rowCount} entries` })) : null] }));
42018
+ }), children: [jsx("thead", { className: "tanstack-table__thead", children: jsx(TableHeader, { table: table, ref: thRefs }) }), jsx("tbody", { className: "tanstack-table__tbody", children: renderBody() })] }), hasSelectedRows && (jsx(ActionBar, { table: table, TableActions: TableActions, className: actionBarClassName }))] }), shouldRenderPagination ? (jsx(TablePagination, { currentPage: currentPage, rowCount: rowCount, onChangePage: onChangePage, rowsPerPage: rowsPerPage, totalEntriesText: totalEntriesText !== null && totalEntriesText !== void 0 ? totalEntriesText : (rowCount === 1
42019
+ ? `1 ${text.entry}`
42020
+ : `${totalRowsOnPage} ${text.of} ${rowCount} ${text.entries}`), text: { of: text.of } })) : null] }));
41955
42021
  }
41956
42022
 
41957
42023
  /**
@@ -43499,15 +43565,21 @@ const Legend = ({ currentStep, steps, onStepClick }) => {
43499
43565
  }) }));
43500
43566
  };
43501
43567
 
43502
- const BackNavigation = ({ isDisabled, onBackClick }) => {
43503
- return (jsx("div", { className: "stepper-navigation-back", children: jsx(Button$1, { "data-testid": "stepper-back-button", ariaLabel: "Previous Step", iconLeft: "fa-arrow-left", onClick: onBackClick, variant: "outline", isDisabled: isDisabled, children: "Previous Step" }) }));
43568
+ const BackNavigation = ({ isDisabled, onBackClick, label }) => {
43569
+ return (jsx("div", { className: "stepper-navigation-back", children: jsx(Button$1, { "data-testid": "stepper-back-button", ariaLabel: label, iconLeft: "fa-arrow-left", onClick: onBackClick, variant: "outline", isDisabled: isDisabled, children: label }) }));
43504
43570
  };
43505
43571
 
43506
- const NextNavigation = ({ isLastStep, onNextClick, onFinishClick, isDisabled }) => {
43507
- return (jsx("div", { className: "stepper-navigation", children: !isLastStep ? (jsx("div", { className: "stepper-navigation-next", children: jsx(Button$1, { "data-testid": "stepper-next-button", iconRight: "fa-arrow-right", ariaLabel: "Next Step", onClick: onNextClick, isDisabled: isDisabled, children: "Next Step" }) })) : (jsx("div", { className: "stepper-navigation-finish", children: jsx(Button$1, { "data-testid": "stepper-finish-button", ariaLabel: "Finish", onClick: onFinishClick, isDisabled: isDisabled, children: "Finish" }) })) }));
43572
+ const NextNavigation = ({ isLastStep, onNextClick, onFinishClick, isDisabled, nextLabel, finishLabel, }) => {
43573
+ return (jsx("div", { className: "stepper-navigation", children: !isLastStep ? (jsx("div", { className: "stepper-navigation-next", children: jsx(Button$1, { "data-testid": "stepper-next-button", iconRight: "fa-arrow-right", ariaLabel: nextLabel, onClick: onNextClick, isDisabled: isDisabled, children: nextLabel }) })) : (jsx("div", { className: "stepper-navigation-finish", children: jsx(Button$1, { "data-testid": "stepper-finish-button", ariaLabel: finishLabel, onClick: onFinishClick, isDisabled: isDisabled, children: finishLabel }) })) }));
43508
43574
  };
43509
43575
 
43510
- const Stepper = ({ currentStep: externalCurrentStep, legendHeader, legendFooter, steps, onBackClick, onNextClick, onFinishClick, children, onStepClick, }) => {
43576
+ const DEFAULT_TEXT = {
43577
+ previousStep: 'Previous Step',
43578
+ nextStep: 'Next Step',
43579
+ finish: 'Finish',
43580
+ };
43581
+ const Stepper = ({ currentStep: externalCurrentStep, legendHeader, legendFooter, steps, onBackClick, onNextClick, onFinishClick, children, onStepClick, text: textProp, }) => {
43582
+ const text = Object.assign(Object.assign({}, DEFAULT_TEXT), textProp);
43511
43583
  const [internalCurrentStep, setInternalCurrentStep] = useState(0);
43512
43584
  const currentStep = externalCurrentStep !== undefined ? externalCurrentStep : internalCurrentStep;
43513
43585
  // Convert children to array to access by index
@@ -43543,7 +43615,7 @@ const Stepper = ({ currentStep: externalCurrentStep, legendHeader, legendFooter,
43543
43615
  const disableNextButton = (step) => {
43544
43616
  return steps[step].isOptional || !steps[step].isCompleted;
43545
43617
  };
43546
- return (jsxs("div", { className: "stepper", children: [jsxs("div", { className: "legend", children: [jsx("div", { className: "legend-header", children: legendHeader }), jsx("div", { className: "legend-body", children: jsx(Legend, { currentStep: currentStep, steps: steps, onStepClick: handleStepClick }) }), jsx("div", { className: "legend-footer", children: legendFooter })] }), jsxs("div", { className: "stepper-body", children: [jsx("div", { className: "stepper-content", children: jsx("div", { className: "stepper-steps", children: childrenArray[currentStep] }) }), jsxs("div", { className: "stepper-actions", children: [jsx(BackNavigation, { isDisabled: isFirstStep, onBackClick: handleBackClick }), jsx(NextNavigation, { isLastStep: isLastStep, onNextClick: handleNextClick, onFinishClick: handleFinishClick, isDisabled: disableNextButton(currentStep) })] })] })] }));
43618
+ return (jsxs("div", { className: "stepper", children: [jsxs("div", { className: "legend", children: [jsx("div", { className: "legend-header", children: legendHeader }), jsx("div", { className: "legend-body", children: jsx(Legend, { currentStep: currentStep, steps: steps, onStepClick: handleStepClick }) }), jsx("div", { className: "legend-footer", children: legendFooter })] }), jsxs("div", { className: "stepper-body", children: [jsx("div", { className: "stepper-content", children: jsx("div", { className: "stepper-steps", children: childrenArray[currentStep] }) }), jsxs("div", { className: "stepper-actions", children: [jsx(BackNavigation, { isDisabled: isFirstStep, onBackClick: handleBackClick, label: text.previousStep }), jsx(NextNavigation, { isLastStep: isLastStep, onNextClick: handleNextClick, onFinishClick: handleFinishClick, isDisabled: disableNextButton(currentStep), nextLabel: text.nextStep, finishLabel: text.finish })] })] })] }));
43547
43619
  };
43548
43620
 
43549
43621
  // Unique ID creation requires a high quality random # generator. In the browser we therefore