@economic/taco 2.45.0-alpha.3 → 2.45.0-alpha.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. package/dist/charts/components/Area/AreaChart.d.ts +19 -0
  2. package/dist/charts/components/Bar/BarChart.d.ts +20 -0
  3. package/dist/charts/components/Donut/ActiveShape.d.ts +8 -0
  4. package/dist/charts/components/Donut/CenteredLabel.d.ts +11 -0
  5. package/dist/charts/components/Donut/DonutChart.d.ts +21 -0
  6. package/dist/charts/components/Donut/Legend.d.ts +13 -0
  7. package/dist/charts/components/Donut/util.d.ts +2 -0
  8. package/dist/charts/components/Legend.d.ts +16 -0
  9. package/dist/charts/components/Line/LineChart.d.ts +18 -0
  10. package/dist/charts/components/ResponsiveContainer.d.ts +5 -0
  11. package/dist/charts/components/Tooltip.d.ts +10 -0
  12. package/dist/charts/components/types.d.ts +5 -0
  13. package/dist/charts/utils/color.d.ts +3 -0
  14. package/dist/charts/utils/common.d.ts +37 -0
  15. package/dist/components/RadioGroup/RadioGroup.d.ts +3 -3
  16. package/dist/components/Table3/features/useEditingState.d.ts +1 -1
  17. package/dist/components/Table3/features/useTableEditing.d.ts +4 -3
  18. package/dist/esm/index.css +18 -0
  19. package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js +67 -0
  20. package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js.map +1 -0
  21. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js +120 -0
  22. package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js.map +1 -0
  23. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js +47 -0
  24. package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js.map +1 -0
  25. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js +27 -0
  26. package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js.map +1 -0
  27. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js +170 -0
  28. package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js.map +1 -0
  29. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js +164 -0
  30. package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js.map +1 -0
  31. package/dist/esm/packages/taco/src/charts/components/Donut/util.js +5 -0
  32. package/dist/esm/packages/taco/src/charts/components/Donut/util.js.map +1 -0
  33. package/dist/esm/packages/taco/src/charts/components/Legend.js +145 -0
  34. package/dist/esm/packages/taco/src/charts/components/Legend.js.map +1 -0
  35. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js +65 -0
  36. package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js.map +1 -0
  37. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js +10 -0
  38. package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js.map +1 -0
  39. package/dist/esm/packages/taco/src/charts/components/Tooltip.js +44 -0
  40. package/dist/esm/packages/taco/src/charts/components/Tooltip.js.map +1 -0
  41. package/dist/esm/packages/taco/src/charts/utils/color.js +24 -0
  42. package/dist/esm/packages/taco/src/charts/utils/color.js.map +1 -0
  43. package/dist/esm/packages/taco/src/charts/utils/common.js +34 -0
  44. package/dist/esm/packages/taco/src/charts/utils/common.js.map +1 -0
  45. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js +6 -14
  46. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js.map +1 -1
  47. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js.map +1 -1
  48. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +2 -4
  49. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
  50. package/dist/esm/packages/taco/src/components/Input/util.js +1 -1
  51. package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
  52. package/dist/esm/packages/taco/src/components/Listbox/util.js +1 -7
  53. package/dist/esm/packages/taco/src/components/Listbox/util.js.map +1 -1
  54. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js.map +1 -1
  55. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  56. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
  57. package/dist/esm/packages/taco/src/components/Table3/Table3.js +0 -1
  58. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  59. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
  60. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js +4 -33
  61. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js.map +1 -1
  62. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js +1 -1
  63. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js.map +1 -1
  64. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js +4 -4
  65. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js.map +1 -1
  66. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js +32 -1
  67. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -1
  68. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js +7 -5
  69. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js.map +1 -1
  70. package/dist/esm/packages/taco/src/components/Table3/useTable3.js +4 -1
  71. package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -1
  72. package/dist/esm/packages/taco/src/index.js +4 -0
  73. package/dist/esm/packages/taco/src/index.js.map +1 -1
  74. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js.map +1 -1
  75. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +5 -4
  76. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -1
  77. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js +6 -0
  78. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js.map +1 -1
  79. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js +2 -2
  80. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js.map +1 -1
  81. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js +7 -0
  82. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js.map +1 -1
  83. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js +7 -0
  84. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -1
  85. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js +2 -1
  86. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js.map +1 -1
  87. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js +3 -1
  88. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js.map +1 -1
  89. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js +3 -2
  90. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js.map +1 -1
  91. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js +5 -1
  92. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
  93. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
  94. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js.map +1 -1
  95. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js.map +1 -1
  96. package/dist/esm/packages/taco/tailwind.colors.js +122 -0
  97. package/dist/esm/packages/taco/tailwind.colors.js.map +1 -0
  98. package/dist/index.css +18 -0
  99. package/dist/index.d.ts +5 -0
  100. package/dist/primitives/Table/Core/components/Body/EmptyStateBody.d.ts +1 -0
  101. package/dist/primitives/Table/Core/components/Row/RowContext.d.ts +2 -1
  102. package/dist/primitives/Table/Core/types.d.ts +1 -0
  103. package/dist/taco.cjs.development.js +895 -83
  104. package/dist/taco.cjs.development.js.map +1 -1
  105. package/dist/taco.cjs.production.min.js +1 -1
  106. package/dist/taco.cjs.production.min.js.map +1 -1
  107. package/package.json +18 -16
  108. package/tailwind.colors.js +121 -0
  109. package/tailwind.config.js +3 -2
  110. package/dist/components/Table3/components/Row/Editing/CreateRowButton.d.ts +0 -11
@@ -48,6 +48,7 @@ var setWith = _interopDefault(require('lodash/setWith'));
48
48
  var TabsPrimitive = require('@radix-ui/react-tabs');
49
49
  var Joyride = require('react-joyride');
50
50
  var Joyride__default = _interopDefault(Joyride);
51
+ var Recharts = require('recharts');
51
52
 
52
53
  const AVAILABLE_COLORS = ['green', 'yellow', 'red', 'blue', 'purple', 'brown', 'pink', 'orange', 'grey', 'transparent'];
53
54
  const getColorByState = state => {
@@ -4038,33 +4039,25 @@ const Accordion = props => {
4038
4039
  const context = React__default.useMemo(() => ({
4039
4040
  as
4040
4041
  }), [as]);
4041
- const type = typeof defaultId === 'string' || typeof id === 'string' ? 'single' : 'multiple';
4042
4042
  let valueProps;
4043
4043
  if (defaultId) {
4044
- valueProps = type === 'single' ? {
4045
- type: 'single',
4046
- defaultValue: defaultId
4047
- } : {
4048
- type: 'multiple',
4049
- defaultValue: defaultId
4044
+ valueProps = {
4045
+ defaultValue: defaultId || undefined
4050
4046
  };
4051
4047
  } else {
4052
- valueProps = type === 'single' ? {
4053
- type: 'single',
4054
- onValueChange: onChange,
4055
- value: id || undefined
4056
- } : {
4057
- type: 'multiple',
4048
+ valueProps = {
4058
4049
  onValueChange: onChange,
4059
4050
  value: id || undefined
4060
4051
  };
4061
4052
  }
4053
+ const type = typeof valueProps.defaultValue === 'string' || typeof valueProps.value === 'string' ? 'single' : 'multiple';
4062
4054
  const className = cn('divide-y divide-grey-200', props.className);
4063
4055
  return /*#__PURE__*/React__default.createElement(AccordionContext.Provider, {
4064
4056
  value: context
4065
4057
  }, /*#__PURE__*/React__default.createElement(AccordionPrimitive.Root, Object.assign({}, otherProps, valueProps, {
4066
4058
  "data-taco": "accordion",
4067
- className: className
4059
+ className: className,
4060
+ type: type
4068
4061
  })));
4069
4062
  };
4070
4063
  Accordion.Item = Item;
@@ -5254,7 +5247,7 @@ const getInputClasses = props => {
5254
5247
  const disabled = props.disabled || !!props['aria-disabled'];
5255
5248
  const readOnly = props.readOnly || !!props['aria-readonly'];
5256
5249
  const invalid = props.invalid || !!props['aria-invalid'];
5257
- return cn('peer text-black text-sm border font-normal not-italic no-underline rounded flex items-center leading-6 px-2 relative w-full text-ellipsis transition-colors transition-opacity ease-in min-h-[theme(spacing.8)] focus-visible:yt-focus',
5250
+ return cn('peer text-black text-sm border font-normal not-italic no-underline rounded flex items-center leading-6 px-2 relative w-full text-ellipsis transition-colors transition-opacity ease-in min-h-[theme(spacing.8)] focus:yt-focus',
5258
5251
  // hide the arrow controls on input[type=number]
5259
5252
  '[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none', {
5260
5253
  'bg-white': !props.highlighted && !readOnly,
@@ -5758,13 +5751,7 @@ const searchForString = (child, value, strategy = 'includes') => {
5758
5751
  }
5759
5752
  return searchForString((_child$props3 = child.props) === null || _child$props3 === void 0 ? void 0 : _child$props3.children, value, strategy);
5760
5753
  } else {
5761
- const childLowerCase = child.toString().toLowerCase();
5762
- const valueLowerCase = String(value).toLowerCase();
5763
- if (strategy === 'startsWith') {
5764
- return childLowerCase.startsWith(valueLowerCase);
5765
- } else {
5766
- return childLowerCase.includes(valueLowerCase);
5767
- }
5754
+ return child.toString().toLowerCase()[strategy](String(value).toLowerCase());
5768
5755
  }
5769
5756
  } catch {
5770
5757
  return false;
@@ -12130,9 +12117,10 @@ const Skeleton = /*#__PURE__*/React__default.forwardRef(function Skeleton(props,
12130
12117
  });
12131
12118
 
12132
12119
  const RowContext = /*#__PURE__*/React__default.createContext({
12120
+ hideInternalColumns: false,
12121
+ hideRowActions: false,
12133
12122
  isHovered: false,
12134
- rowIndex: -1,
12135
- hideRowActions: false
12123
+ rowIndex: -1
12136
12124
  });
12137
12125
 
12138
12126
  /* anonymous functions will break the memoisation on each render, wrap handlers in callbacks */
@@ -12140,6 +12128,7 @@ function Row(props) {
12140
12128
  const {
12141
12129
  renderer: RowRenderer,
12142
12130
  cellRenderer: CellRenderer,
12131
+ hideInternalColumns = false,
12143
12132
  hideRowActions = false,
12144
12133
  ...displayRowProps
12145
12134
  } = props;
@@ -12149,8 +12138,9 @@ function Row(props) {
12149
12138
  const contextValue = React__default.useMemo(() => ({
12150
12139
  isHovered,
12151
12140
  rowIndex: props.index,
12141
+ hideInternalColumns,
12152
12142
  hideRowActions
12153
- }), [isHovered, props.index, hideRowActions]);
12143
+ }), [isHovered, props.index, hideInternalColumns, hideRowActions]);
12154
12144
  if (props.row.original === undefined) {
12155
12145
  return /*#__PURE__*/React__default.createElement(SkeletonRow, Object.assign({}, props));
12156
12146
  }
@@ -12248,12 +12238,16 @@ function useTableRenderer(renderers, table, tableRef, defaultRowActiveIndex, opt
12248
12238
  // rendered output
12249
12239
  let style = {};
12250
12240
  let content = null;
12251
- if (rows.length) {
12241
+ // bottom rows aren't virtualised (they're sticky) but we need to set the height
12242
+ if (rows.length || table.getBottomRows().length) {
12252
12243
  style = {
12253
12244
  height: totalSize,
12254
12245
  paddingBottom,
12255
12246
  paddingTop
12256
12247
  };
12248
+ }
12249
+ // only render non sticky rows
12250
+ if (rows.length) {
12257
12251
  content = virtualItems.map(virtualRow => {
12258
12252
  // there appears to be a react-virtual bug where it inserts a single `undefined` item at the end of the row, which crashes here
12259
12253
  if (!virtualRow) {
@@ -12411,9 +12405,9 @@ const Cell = /*#__PURE__*/React__default.memo(function MemoedCell(context) {
12411
12405
  table
12412
12406
  } = context;
12413
12407
  const {
12408
+ hideRowActions,
12414
12409
  isHovered,
12415
- rowIndex,
12416
- hideRowActions
12410
+ rowIndex
12417
12411
  } = React__default.useContext(RowContext);
12418
12412
  const tableMeta = table.options.meta;
12419
12413
  const actions = tableMeta.rowActions.rowActions;
@@ -12453,6 +12447,12 @@ function Cell$1() {
12453
12447
  const {
12454
12448
  texts
12455
12449
  } = useLocalization();
12450
+ const {
12451
+ hideInternalColumns
12452
+ } = React__default.useContext(RowContext);
12453
+ if (hideInternalColumns) {
12454
+ return null;
12455
+ }
12456
12456
  return /*#__PURE__*/React__default.createElement(Icon, {
12457
12457
  "aria-label": texts.table.columns.drag.tooltip,
12458
12458
  name: "drag",
@@ -12501,7 +12501,13 @@ function Cell$2(context) {
12501
12501
  const {
12502
12502
  texts
12503
12503
  } = useLocalization();
12504
+ const {
12505
+ hideInternalColumns
12506
+ } = React__default.useContext(RowContext);
12504
12507
  const tableMeta = context.table.options.meta;
12508
+ if (hideInternalColumns) {
12509
+ return null;
12510
+ }
12505
12511
  const hasExpandedRow = (_tableMeta$rowExpansi = (_tableMeta$rowExpansi2 = tableMeta.rowExpansion).rowExpansionRenderer) === null || _tableMeta$rowExpansi === void 0 ? void 0 : _tableMeta$rowExpansi.call(_tableMeta$rowExpansi2, context.row.original);
12506
12512
  if (hasExpandedRow) {
12507
12513
  const isActiveRow = tableMeta.rowActive.rowActiveIndex === context.row.index;
@@ -12591,10 +12597,11 @@ function Cell$3(context) {
12591
12597
  table
12592
12598
  } = context;
12593
12599
  const {
12600
+ hideInternalColumns,
12594
12601
  rowIndex
12595
12602
  } = React__default.useContext(RowContext);
12596
12603
  const tableMeta = table.options.meta;
12597
- if (table.options.enableGrouping && (_table$getState$group = table.getState().grouping) !== null && _table$getState$group !== void 0 && _table$getState$group.length && !row.getIsGrouped()) {
12604
+ if (hideInternalColumns || table.options.enableGrouping && (_table$getState$group = table.getState().grouping) !== null && _table$getState$group !== void 0 && _table$getState$group.length && !row.getIsGrouped()) {
12598
12605
  return null;
12599
12606
  }
12600
12607
  const isSelected = row.getIsGrouped() ? row.getIsAllSubRowsSelected() : row.getIsSelected();
@@ -13830,9 +13837,15 @@ const MemoedFooter = /*#__PURE__*/React__default.memo(function MemoedFooter(prop
13830
13837
  function EmptyStateBody(props) {
13831
13838
  const {
13832
13839
  emptyState: Placeholder,
13840
+ isReady,
13833
13841
  reason,
13834
13842
  ...attributes
13835
13843
  } = props;
13844
+ if (!isReady) {
13845
+ return /*#__PURE__*/React__default.createElement("tbody", Object.assign({}, attributes, {
13846
+ className: "!auto-rows-fr"
13847
+ }));
13848
+ }
13836
13849
  return /*#__PURE__*/React__default.createElement("tbody", Object.assign({}, attributes, {
13837
13850
  className: "!auto-rows-fr"
13838
13851
  }), /*#__PURE__*/React__default.createElement("tr", {
@@ -16831,7 +16844,7 @@ function Table(props) {
16831
16844
  }
16832
16845
  Table.Toolbar = TableToolbar;
16833
16846
  Table.Grid = TableGrid;
16834
- function getFilterReason(table) {
16847
+ function getEmptyStateReason(table) {
16835
16848
  if (table.instance.getFilteredRowModel().rows.length === 0 && table.instance.getCoreRowModel().rows.length !== 0) {
16836
16849
  const state = table.instance.getState();
16837
16850
  if (table.meta.search.enableGlobalFilter && !!state.globalFilter) {
@@ -16854,7 +16867,7 @@ function TableGrid(props) {
16854
16867
  const handleFocus = table.meta.rowActive.rowActiveIndex === undefined ? event => {
16855
16868
  table.meta.rowActive.handleFocus(event, table.meta.length, table.renderer.scrollToIndex);
16856
16869
  } : undefined;
16857
- const filterReason = getFilterReason(table);
16870
+ const emptyStateReason = getEmptyStateReason(table);
16858
16871
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("style", null, table.stylesheet), /*#__PURE__*/React__default.createElement(focus.FocusScope, null, /*#__PURE__*/React__default.createElement("table", Object.assign({}, attributes, {
16859
16872
  id: table.id,
16860
16873
  "data-table-font-size": table.meta.fontSize.size,
@@ -16879,9 +16892,10 @@ function TableGrid(props) {
16879
16892
  key: props.id,
16880
16893
  header: props,
16881
16894
  scrollToIndex: table.renderer.scrollToIndex
16882
- }))))))), filterReason ? (/*#__PURE__*/React__default.createElement(EmptyStateBody, {
16895
+ }))))))), emptyStateReason ? (/*#__PURE__*/React__default.createElement(EmptyStateBody, {
16883
16896
  emptyState: props.table.props.emptyState,
16884
- reason: filterReason
16897
+ isReady: table.meta.server.isEnabled ? table.meta.server.isReady : true,
16898
+ reason: emptyStateReason
16885
16899
  })) : (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Body, {
16886
16900
  enableHorizontalArrowKeyNavigation: enableHorizontalArrowKeyNavigation,
16887
16901
  table: table.instance,
@@ -18494,11 +18508,13 @@ function useTableEditingListener(table, tableRef, scrollToIndex) {
18494
18508
  // store the last row active index, otherwise everytime tableMeta.editing.saveChanges changes the hook runs again
18495
18509
  const lastRowActiveIndexRef = React__default.useRef(tableMeta.rowActive.rowActiveIndex);
18496
18510
  useLazyEffect(() => {
18497
- if (tableMeta.editing.isEditing && lastRowActiveIndexRef.current !== undefined && tableMeta.rowActive.rowActiveIndex !== lastRowActiveIndexRef.current) {
18511
+ if (tableMeta.rowActive.rowActiveIndex !== lastRowActiveIndexRef.current) {
18498
18512
  lastRowActiveIndexRef.current = tableMeta.rowActive.rowActiveIndex;
18499
- tableMeta.editing.saveChanges(table);
18513
+ if (tableMeta.editing.isEditing && lastRowActiveIndexRef.current !== undefined) {
18514
+ tableMeta.editing.saveChanges(table);
18515
+ }
18500
18516
  }
18501
- }, [tableMeta.rowActive.rowActiveIndex, tableMeta.editing.saveChanges]);
18517
+ }, [tableMeta.rowActive.rowActiveIndex]);
18502
18518
  // show a warning if the user navigates away without triggering save, such as using the browser back/forward button
18503
18519
  const hasChanges = tableMeta.editing.hasChanges();
18504
18520
  React__default.useEffect(() => {
@@ -18524,9 +18540,9 @@ function useTableEditingListener(table, tableRef, scrollToIndex) {
18524
18540
  const onClickOutside = event => {
18525
18541
  if (tableMeta.editing.isEditing) {
18526
18542
  const element = event.target;
18527
- const insideTable = element.getAttribute('data-taco') === 'backdrop' || element.getAttribute('data-table') === 'editing-toggle' || isElementInsideOrTriggeredFromContainer(element, tableRef.current);
18543
+ const isTableOrIsInsideTable = element.tagName === 'TABLE' || element.tagName === 'TBODY' || element.getAttribute('data-taco') === 'backdrop' || element.getAttribute('data-table') === 'editing-toggle' || !document.body.contains(element) || isElementInsideOrTriggeredFromContainer(element, tableRef.current);
18528
18544
  // users can click the white space below rows which could be inside the table, but a valid scenario to save
18529
- if (!insideTable || element.tagName === 'TABLE' || element.tagName === 'TBODY') {
18545
+ if (!isTableOrIsInsideTable) {
18530
18546
  tableMeta.editing.saveChanges(table);
18531
18547
  }
18532
18548
  }
@@ -18677,7 +18693,7 @@ function reducer$2(state, action) {
18677
18693
  }
18678
18694
  };
18679
18695
  }
18680
- case 'createRow':
18696
+ case 'insertTemporaryRow':
18681
18697
  {
18682
18698
  const {
18683
18699
  value
@@ -18964,14 +18980,14 @@ function usePendingChangesState(handleSave, handleChange, rowIdentityAccessor, v
18964
18980
  }
18965
18981
  });
18966
18982
  }
18967
- function createRow(data) {
18983
+ function insertTemporaryRow(data) {
18968
18984
  const newRowId = `${TEMPORARY_ROW_ID_PREFIX}${uuid.v4()}`;
18969
18985
  const value = {
18970
18986
  ...data,
18971
18987
  [rowIdentityAccessor]: newRowId
18972
18988
  };
18973
18989
  dispatch({
18974
- type: 'createRow',
18990
+ type: 'insertTemporaryRow',
18975
18991
  rowId: newRowId,
18976
18992
  payload: {
18977
18993
  value
@@ -19065,12 +19081,42 @@ function usePendingChangesState(handleSave, handleChange, rowIdentityAccessor, v
19065
19081
  discardChanges,
19066
19082
  hasSaved,
19067
19083
  // new rows
19068
- createRow,
19084
+ insertTemporaryRow,
19069
19085
  temporaryRows: state.temporaryRows
19070
19086
  };
19071
19087
  }
19072
19088
 
19073
- function useTableEditing(isEnabled = false, handleSave, handleChange, rowIdentityAccessor, validator) {
19089
+ function useTableEditing(isEnabled = false, handleSave, handleChange, handleCreate, rowIdentityAccessor, validator) {
19090
+ const createRow = function (table, scrollToIndex, row) {
19091
+ try {
19092
+ if (!handleCreate) {
19093
+ return Promise.resolve();
19094
+ }
19095
+ const tableMeta = table.options.meta;
19096
+ return Promise.resolve(tableMeta.editing.saveChanges(table)).then(function (saved) {
19097
+ if (!saved) {
19098
+ return;
19099
+ }
19100
+ const changeset = row !== null && row !== void 0 ? row : handleCreate();
19101
+ try {
19102
+ if (changeset) {
19103
+ const rowId = pendingChangesFns.insertTemporaryRow(changeset);
19104
+ table.getRow(rowId).pin('bottom');
19105
+ // set the active row to the new row before toggling editing on
19106
+ const temporaryRows = tableMeta.editing.temporaryRows;
19107
+ const nextRowIndex = temporaryRows.length ? tableMeta.length + 1 : tableMeta.length;
19108
+ tableMeta.rowActive.setRowActiveIndex(nextRowIndex);
19109
+ toggleEditing(true, table, scrollToIndex);
19110
+ setLastFocusedCellIndex(undefined);
19111
+ }
19112
+ } catch (error) {
19113
+ console.error(error);
19114
+ }
19115
+ });
19116
+ } catch (e) {
19117
+ return Promise.reject(e);
19118
+ }
19119
+ };
19074
19120
  // used to switch the table into editing mode
19075
19121
  const [isEditing, setEditing] = React__default.useState(false);
19076
19122
  // used to switch the editing between "detailed" mode
@@ -19108,6 +19154,7 @@ function useTableEditing(isEnabled = false, handleSave, handleChange, rowIdentit
19108
19154
  toggleEditing: isEnabled ? toggleEditing : () => undefined,
19109
19155
  lastFocusedCellIndex,
19110
19156
  setLastFocusedCellIndex,
19157
+ createRow,
19111
19158
  createRowButtonRef,
19112
19159
  ...pendingChangesFns
19113
19160
  };
@@ -19784,7 +19831,7 @@ const RENDERERS$1 = {
19784
19831
  cell: Cell$5
19785
19832
  };
19786
19833
  function useTable3(props, ref) {
19787
- const editing = useTableEditing(props.enableEditing, props.onEditingSave, props.onEditingChange, props.rowIdentityAccessor, props.validator);
19834
+ const editing = useTableEditing(props.enableEditing, props.onEditingSave, props.onEditingChange, props.onEditingCreate, props.rowIdentityAccessor, props.validator);
19788
19835
  const creationEnabled = editing.isEnabled && !!props.onEditingCreate;
19789
19836
  // this gives me the performance heeby jeebies, but can't think of a better way to internalise the state
19790
19837
  const data = React__default.useMemo(() => {
@@ -19837,6 +19884,9 @@ function useTable3(props, ref) {
19837
19884
  React__default.useEffect(() => {
19838
19885
  if (table.ref.current) {
19839
19886
  table.ref.current.instance.toggleEditing = enabled => table.meta.editing.toggleEditing(enabled !== null && enabled !== void 0 ? enabled : editing => !editing, table.instance, table.renderer.scrollToIndex);
19887
+ if (props.onEditingCreate) {
19888
+ table.ref.current.instance.createRow = row => table.meta.editing.createRow(table.instance, table.renderer.scrollToIndex, row);
19889
+ }
19840
19890
  }
19841
19891
  }, [table.ref.current]);
19842
19892
  return table;
@@ -19994,10 +20044,9 @@ function Editing(props) {
19994
20044
  }
19995
20045
 
19996
20046
  function CreateNewRow(props) {
19997
- var _temporaryRows$0$tabl, _temporaryRows$, _table$getState$colum, _tableRef$current2;
20047
+ var _temporaryRows$0$tabl, _temporaryRows$, _table$getState$colum;
19998
20048
  const {
19999
20049
  buttonRef,
20000
- onEditingCreate: handleEditingCreate,
20001
20050
  scrollToIndex,
20002
20051
  table,
20003
20052
  tableMeta,
@@ -20010,44 +20059,16 @@ function CreateNewRow(props) {
20010
20059
  const temporaryRowId = (_temporaryRows$0$tabl = (_temporaryRows$ = temporaryRows[0]) === null || _temporaryRows$ === void 0 ? void 0 : _temporaryRows$[tableMeta.rowIdentityAccessor]) !== null && _temporaryRows$0$tabl !== void 0 ? _temporaryRows$0$tabl : '';
20011
20060
  const isDisabled = !!table.getState().globalFilter || !!((_table$getState$colum = table.getState().columnFilters) !== null && _table$getState$colum !== void 0 && _table$getState$colum.length) || !!temporaryRowId && !!tableMeta.editing.hasRowErrors(temporaryRowId);
20012
20061
  const isSaving = !!temporaryRowId && tableMeta.editing.getRowStatus(temporaryRowId) === 'saving';
20013
- const createRow = function (row) {
20062
+ const handleCreate = function () {
20014
20063
  try {
20015
- if (!handleEditingCreate || isDisabled) {
20064
+ if (isDisabled) {
20016
20065
  return Promise.resolve();
20017
20066
  }
20018
- return Promise.resolve(tableMeta.editing.saveChanges(table)).then(function (saved) {
20019
- if (!saved) {
20020
- return;
20021
- }
20022
- const changeset = row !== null && row !== void 0 ? row : handleEditingCreate();
20023
- try {
20024
- if (changeset) {
20025
- const rowId = tableMeta.editing.createRow(changeset);
20026
- table.getRow(rowId).pin('bottom');
20027
- // set the active row to the new row before toggling editing on
20028
- const nextRowIndex = temporaryRows.length ? tableMeta.length + 1 : tableMeta.length;
20029
- tableMeta.rowActive.setRowActiveIndex(nextRowIndex);
20030
- tableMeta.editing.toggleEditing(true, table, scrollToIndex);
20031
- tableMeta.editing.setLastFocusedCellIndex(0);
20032
- }
20033
- } catch (error) {
20034
- console.error(error);
20035
- }
20036
- });
20067
+ return Promise.resolve(tableMeta.editing.createRow(table, scrollToIndex)).then(function () {});
20037
20068
  } catch (e) {
20038
20069
  return Promise.reject(e);
20039
20070
  }
20040
20071
  };
20041
- // allow programmatic access to creating rows from outside the table
20042
- React__default.useEffect(() => {
20043
- var _tableRef$current;
20044
- if (tableRef !== null && tableRef !== void 0 && (_tableRef$current = tableRef.current) !== null && _tableRef$current !== void 0 && _tableRef$current.instance) {
20045
- tableRef.current.instance.createRow = createRow;
20046
- }
20047
- }, [tableRef === null || tableRef === void 0 ? void 0 : (_tableRef$current2 = tableRef.current) === null || _tableRef$current2 === void 0 ? void 0 : _tableRef$current2.instance, createRow]);
20048
- const handleCreate = function () {
20049
- return createRow();
20050
- };
20051
20072
  const shortcut = {
20052
20073
  key: 'Enter',
20053
20074
  meta: true
@@ -20170,7 +20191,7 @@ function TemporaryRow(props) {
20170
20191
  className: className,
20171
20192
  onKeyDown: handleKeyDown,
20172
20193
  onKeyDownCapture: handleKeyDownCapture,
20173
- // Row actions should only be hidden on temporary rows when editing is turned off
20194
+ hideInternalColumns: true,
20174
20195
  hideRowActions: !tableMeta.editing.isEditing
20175
20196
  }))));
20176
20197
  }
@@ -20212,7 +20233,6 @@ const BaseTable3 = /*#__PURE__*/fixedForwardRef(function BaseTable3(props, ref)
20212
20233
  tableRef: table3.ref
20213
20234
  }), /*#__PURE__*/React__default.createElement(CreateNewRow, {
20214
20235
  buttonRef: table3.meta.editing.createRowButtonRef,
20215
- onEditingCreate: props.onEditingCreate,
20216
20236
  scrollToIndex: table3.renderer.scrollToIndex,
20217
20237
  table: table3.instance,
20218
20238
  tableMeta: table3.meta,
@@ -20453,6 +20473,796 @@ const Tour = props => {
20453
20473
  };
20454
20474
  Tour.Step = TourStep;
20455
20475
 
20476
+ // NOTE: this file is intentianally a js file so that it can be consumed by tailwind.config.js
20477
+
20478
+ const THEME_COLORS = {
20479
+ transparent: 'transparent',
20480
+ current: 'currentColor',
20481
+ white: '#fff',
20482
+ black: '#1c1c1c',
20483
+ brand: {
20484
+ vismaRed: '#E70641',
20485
+ paleOrange: '#FFF5E5',
20486
+ sunsetOrange: '#E89C2E',
20487
+ midnightBlue: '#29283E',
20488
+ coolBlue: '#F5F7F9'
20489
+ },
20490
+ grey: {
20491
+ lightest: '#fafafa',
20492
+ light: '#F6F6F6',
20493
+ DEFAULT: '#EBEBEB',
20494
+ dark: '#DDDDDD',
20495
+ darker: '#ACACAC',
20496
+ darkest: '#595959',
20497
+ darkNew: '#a5a6a9',
20498
+ 50: '#fafafa',
20499
+ 100: '#F6F6F6',
20500
+ 200: '#EBEBEB',
20501
+ 300: '#DDDDDD',
20502
+ 500: '#ACACAC',
20503
+ 700: '#595959',
20504
+ 900: '#303030'
20505
+ },
20506
+ purple: {
20507
+ lightest: '#585c74',
20508
+ light: '#4b4f64',
20509
+ DEFAULT: '#3d4153',
20510
+ dark: '#353a48',
20511
+ darker: '#29283e',
20512
+ darkest: '#212032',
20513
+ darkNew_1: '#373647',
20514
+ darkNew_2: '#414050',
20515
+ 100: '#EEE5FF',
20516
+ 200: '#ddd1ff',
20517
+ 300: '#CBBCFE',
20518
+ 500: '#9270FA',
20519
+ 700: '#6542D1',
20520
+ 900: '#412970'
20521
+ },
20522
+ blue: {
20523
+ lightest: '#DEEBFF',
20524
+ light: '#75A0F5',
20525
+ DEFAULT: '#4573D2',
20526
+ dark: '#2B57B4',
20527
+ 100: '#DEEBFF',
20528
+ 200: '#AACCFF',
20529
+ 300: '#75A0F5',
20530
+ 500: '#4573D2',
20531
+ 700: '#2B57B4',
20532
+ 900: '#29283E'
20533
+ },
20534
+ red: {
20535
+ lightest: '#FFDAD2',
20536
+ light: '#E66568',
20537
+ DEFAULT: '#CE3F42',
20538
+ dark: '#950027',
20539
+ 100: '#FFDAD2',
20540
+ 200: '#f3a09d',
20541
+ 300: '#E66568',
20542
+ 500: '#CE3F42',
20543
+ 700: '#950027',
20544
+ 900: '#64001B'
20545
+ },
20546
+ green: {
20547
+ lightest: '#cdf0e7',
20548
+ light: '#52C7AB',
20549
+ DEFAULT: '#08AE87',
20550
+ dark: '#028465',
20551
+ 100: '#cdf0e7',
20552
+ 200: '#9be1ce',
20553
+ 300: '#52C7AB',
20554
+ 500: '#08AE87',
20555
+ 700: '#028465',
20556
+ 900: '#14493A'
20557
+ },
20558
+ yellow: {
20559
+ lightest: '#FFF1C3',
20560
+ light: '#FFD665',
20561
+ DEFAULT: '#FFBD3B',
20562
+ dark: '#e89c2e',
20563
+ 100: '#FFF1C3',
20564
+ 200: '#ffe494',
20565
+ 300: '#FFD665',
20566
+ 500: '#FFBD3B',
20567
+ 700: '#e89c2e',
20568
+ 900: '#733700'
20569
+ },
20570
+ pink: {
20571
+ 100: '#FFE3F7',
20572
+ 200: '#fcb9e9',
20573
+ 300: '#F98EDB',
20574
+ 500: '#E165BF',
20575
+ 700: '#CF49AA',
20576
+ 900: '#870062'
20577
+ },
20578
+ brown: {
20579
+ 100: '#EEE0DA',
20580
+ 200: '#DFCCC2',
20581
+ 300: '#C4AB9E',
20582
+ 500: '#93715D',
20583
+ 700: '#73503B',
20584
+ 900: '#45291F'
20585
+ },
20586
+ orange: {
20587
+ 100: '#FFE3BB',
20588
+ 200: '#FCCB80',
20589
+ 300: '#FAB64D',
20590
+ 500: '#F99702',
20591
+ 700: '#EF7D00',
20592
+ 900: '#4A2811'
20593
+ }
20594
+ };
20595
+
20596
+ const mapColor = (palette, prefix = '') => {
20597
+ return Object.keys(palette).reduce((accum, color) => {
20598
+ if (color === 'current') {
20599
+ return accum;
20600
+ } else if (typeof palette[color] === 'string') {
20601
+ return {
20602
+ ...accum,
20603
+ [prefix ? color === 'DEFAULT' ? prefix : `${prefix}-${color}` : color]: palette[color]
20604
+ };
20605
+ } else {
20606
+ return {
20607
+ ...accum,
20608
+ ...mapColor(palette[color], color)
20609
+ };
20610
+ }
20611
+ }, {});
20612
+ };
20613
+ const colors = /*#__PURE__*/mapColor(THEME_COLORS);
20614
+ const getThemeColor = color => colors[color];
20615
+
20616
+ function Legend(props) {
20617
+ const {
20618
+ activeIndex,
20619
+ onMouseEnter,
20620
+ onMouseLeave,
20621
+ onClick,
20622
+ payload,
20623
+ layout,
20624
+ activeItems
20625
+ } = props;
20626
+ const [hoverIndex, setHoverIndex] = React.useState(null);
20627
+ const handleMouseEnter = (entry, index) => {
20628
+ setHoverIndex(index);
20629
+ if (activeItems[entry.dataKey]) onMouseEnter(entry, index);
20630
+ };
20631
+ const handleMouseLeave = () => {
20632
+ onMouseLeave();
20633
+ setHoverIndex(null);
20634
+ };
20635
+ const moreButton = moreButtonText => (/*#__PURE__*/React__default.createElement(Button$1, {
20636
+ appearance: "transparent",
20637
+ className: "text-grey-700"
20638
+ }, moreButtonText));
20639
+ return /*#__PURE__*/React__default.createElement("div", {
20640
+ className: "mx-auto w-auto max-w-full overflow-hidden"
20641
+ }, /*#__PURE__*/React__default.createElement("div", {
20642
+ className: cn('mb-0 ml-0 flex justify-center', {
20643
+ 'flex-col': layout === 'vertical'
20644
+ })
20645
+ }, /*#__PURE__*/React__default.createElement(OverflowGroup, {
20646
+ className: "w-full items-center py-1",
20647
+ moreButton: moreButton
20648
+ }, payload.map((entry, index) => (/*#__PURE__*/React__default.createElement("span", {
20649
+ key: `${entry.dataKey}-${index}`,
20650
+ className: cn(' hover:bg-grey-100 cursor-pointer px-[8px] py-[2px] hover:rounded-[4px]', {
20651
+ 'bg-grey-100 rounded': activeIndex === index
20652
+ }),
20653
+ onMouseEnter: () => handleMouseEnter(entry, index),
20654
+ onMouseLeave: handleMouseLeave,
20655
+ onClick: onClick ? () => onClick(entry) : undefined
20656
+ }, /*#__PURE__*/React__default.createElement("span", {
20657
+ className: "text-grey-700 flex items-center gap-[4px]"
20658
+ }, /*#__PURE__*/React__default.createElement("span", {
20659
+ className: cn('-mt-px ml-1 flex h-3 w-3 rounded-sm', {
20660
+ 'border-grey-300 border !bg-white': !activeItems[entry.dataKey]
20661
+ }),
20662
+ style: {
20663
+ backgroundColor: entry.color
20664
+ }
20665
+ }, hoverIndex === index && activeItems[entry.dataKey] && (/*#__PURE__*/React__default.createElement(Icon, {
20666
+ name: "tick-bold",
20667
+ className: "!h-full !w-full text-white"
20668
+ }))), entry.value)))))));
20669
+ }
20670
+
20671
+ const Tooltip$2 = ({
20672
+ active,
20673
+ formatter,
20674
+ payload,
20675
+ style,
20676
+ singlePieDonutChart
20677
+ }) => {
20678
+ const getColor = entry => {
20679
+ var _ref, _entry$color;
20680
+ if (singlePieDonutChart) {
20681
+ // We use entry.payload.label because the payload structure differs between a Donut chart with a single pie
20682
+ // and one with multiple pies.
20683
+ return getThemeColor(entry.payload.color);
20684
+ }
20685
+ return (_ref = (_entry$color = entry.color) !== null && _entry$color !== void 0 ? _entry$color : entry.payload.fill) !== null && _ref !== void 0 ? _ref : 'blue-500';
20686
+ };
20687
+ if (active && payload && payload.length) {
20688
+ return /*#__PURE__*/React__default.createElement("dl", {
20689
+ className: "z-20 grid grid-cols-[max-content_max-content] gap-x-4 rounded-md bg-white p-4 text-xs shadow-[0px_0px_1px_rgba(0,0,0,0.1),_0px_6px_18px_rgba(47,51,68,0.2)]",
20690
+ style: style
20691
+ }, payload.map((entry, index) => (/*#__PURE__*/React__default.createElement(React__default.Fragment, {
20692
+ key: `${entry.name}-${index}`
20693
+ }, /*#__PURE__*/React__default.createElement("dt", {
20694
+ className: "text-grey-700 mb-0 flex items-center gap-1 font-normal"
20695
+ }, /*#__PURE__*/React__default.createElement("span", {
20696
+ className: "-mt-px h-2.5 w-2.5 rounded-sm",
20697
+ style: {
20698
+ background: getColor(entry)
20699
+ }
20700
+ }),
20701
+ // We use entry.payload.label because the payload structure differs between a Donut chart with a single pie
20702
+ // and one with multiple pies.
20703
+ singlePieDonutChart ? entry.payload.label : entry.name), /*#__PURE__*/React__default.createElement("dd", {
20704
+ className: "mb-0 text-right font-bold text-black "
20705
+ }, formatter ? formatter(entry.value) : entry.value)))));
20706
+ }
20707
+ return null;
20708
+ };
20709
+
20710
+ const getCartesianGridProps = () => ({
20711
+ vertical: false
20712
+ });
20713
+ const getXAxisProps = props => ({
20714
+ axisLine: false,
20715
+ dataKey: props.accessor,
20716
+ fontSize: 12,
20717
+ scale: props.xAxisScale,
20718
+ tickLine: false,
20719
+ tickFormatter: props.xAxisTickFormat
20720
+ });
20721
+ const getYAxisProps = props => ({
20722
+ axisLine: false,
20723
+ fontSize: 12,
20724
+ scale: props.yAxisScale,
20725
+ tickLine: false,
20726
+ tickFormatter: props.yAxisTickFormat
20727
+ });
20728
+ const getLegendProps = props => ({
20729
+ content: /*#__PURE__*/React__default.createElement(Legend, Object.assign({}, props))
20730
+ });
20731
+ const getTooltipProps = (props = undefined) => ({
20732
+ content: /*#__PURE__*/React__default.createElement(Tooltip$2, Object.assign({}, props)),
20733
+ wrapperStyle: {
20734
+ outline: 'none'
20735
+ }
20736
+ });
20737
+
20738
+ // A hacky fix for EC-50037 to make sure that Chart doesn't resize when it is inside a Card.
20739
+ const ResponsiveContainer = props => (/*#__PURE__*/React__default.createElement(Recharts.ResponsiveContainer, Object.assign({
20740
+ className: "!h-[calc(100%-1px)] !w-[calc(100%-1px)]"
20741
+ }, props)));
20742
+
20743
+ const Area = _ => null;
20744
+ const AreaChart = function AreaChart(externalProps) {
20745
+ const {
20746
+ children,
20747
+ data,
20748
+ formatter,
20749
+ ...props
20750
+ } = externalProps;
20751
+ const [hoveredArea, setHoveredArea] = React.useState(null);
20752
+ const [activeAreas, setActiveAreas] = React.useState(() => {
20753
+ const areas = {};
20754
+ React__default.Children.forEach(children, child => {
20755
+ areas[child.props.accessor] = true;
20756
+ });
20757
+ return areas;
20758
+ });
20759
+ const handleLegendClick = entry => {
20760
+ setHoveredArea(null);
20761
+ setActiveAreas({
20762
+ ...activeAreas,
20763
+ [entry.dataKey]: !activeAreas[entry.dataKey]
20764
+ });
20765
+ };
20766
+ return /*#__PURE__*/React__default.createElement(ResponsiveContainer, null, /*#__PURE__*/React__default.createElement(Recharts.AreaChart, {
20767
+ data: data,
20768
+ margin: {
20769
+ top: 10,
20770
+ right: 0,
20771
+ left: -25,
20772
+ bottom: 0
20773
+ }
20774
+ }, /*#__PURE__*/React__default.createElement(Recharts.CartesianGrid, Object.assign({}, getCartesianGridProps())), /*#__PURE__*/React__default.createElement(Recharts.XAxis, Object.assign({}, getXAxisProps(props))), /*#__PURE__*/React__default.createElement(Recharts.YAxis, Object.assign({}, getYAxisProps(props))), /*#__PURE__*/React__default.createElement(Recharts.Legend, Object.assign({}, getLegendProps({
20775
+ onClick: handleLegendClick,
20776
+ onMouseEnter: entry => setHoveredArea(entry.dataKey),
20777
+ onMouseLeave: () => setHoveredArea(null),
20778
+ activeItems: activeAreas
20779
+ }))), /*#__PURE__*/React__default.createElement(Recharts.Tooltip, Object.assign({}, getTooltipProps(), {
20780
+ formatter: formatter
20781
+ })), React__default.Children.map(children, child => {
20782
+ var _child$props$color, _child$props$color2, _child$props$color3;
20783
+ return /*#__PURE__*/React__default.createElement(Recharts.Area, {
20784
+ activeDot: {
20785
+ fill: getThemeColor((_child$props$color = child.props.color) !== null && _child$props$color !== void 0 ? _child$props$color : 'blue-300')
20786
+ },
20787
+ isAnimationActive: false,
20788
+ dataKey: child.props.accessor,
20789
+ dot: false,
20790
+ fill: getThemeColor((_child$props$color2 = child.props.color) !== null && _child$props$color2 !== void 0 ? _child$props$color2 : 'grey-100'),
20791
+ name: child.props.label,
20792
+ strokeWidth: 2,
20793
+ stroke: getThemeColor((_child$props$color3 = child.props.color) !== null && _child$props$color3 !== void 0 ? _child$props$color3 : 'grey-300'),
20794
+ stackId: child.props.stackId,
20795
+ hide: !activeAreas[child.props.accessor],
20796
+ opacity: hoveredArea && child.props.accessor !== hoveredArea ? 0.3 : 1
20797
+ });
20798
+ })));
20799
+ };
20800
+ AreaChart.Area = Area;
20801
+
20802
+ const Bar$1 = _ => null;
20803
+ const getXAxisVerticalProps = props => ({
20804
+ ...getXAxisProps(props),
20805
+ ...{
20806
+ type: 'number',
20807
+ dataKey: undefined
20808
+ }
20809
+ });
20810
+ const getYAxisVerticalProps = props => ({
20811
+ ...getYAxisProps(props),
20812
+ ...{
20813
+ dataKey: props.accessor,
20814
+ type: 'category'
20815
+ }
20816
+ });
20817
+ const BarChart = function BarChart(externalProps) {
20818
+ const {
20819
+ children,
20820
+ data,
20821
+ formatter,
20822
+ layout = 'horizontal',
20823
+ ...props
20824
+ } = externalProps;
20825
+ const [activeIndex, setActiveIndex] = React__default.useState(undefined);
20826
+ const [hoveredBar, setHoveredBar] = React__default.useState(null);
20827
+ const [activeBars, setActiveBars] = React__default.useState(() => {
20828
+ const keys = {};
20829
+ React__default.Children.forEach(children, child => {
20830
+ keys[child.props.accessor] = true;
20831
+ });
20832
+ return keys;
20833
+ });
20834
+ // Recharts doesn't provide a way for us to know if a stacked bar is at the top or the bottom,
20835
+ // so we can't set proper radiuses without some "magic"
20836
+ const stacks = {};
20837
+ React__default.Children.forEach(children, child => {
20838
+ if (child.props.stackId) {
20839
+ if (!stacks[child.props.stackId]) {
20840
+ stacks[child.props.stackId] = [child.props.accessor];
20841
+ } else {
20842
+ stacks[child.props.stackId].push(child.props.accessor);
20843
+ }
20844
+ }
20845
+ });
20846
+ const handleLegendClick = entry => {
20847
+ setHoveredBar(null);
20848
+ setActiveBars({
20849
+ ...activeBars,
20850
+ [entry.dataKey]: !activeBars[entry.dataKey]
20851
+ });
20852
+ };
20853
+ const handleLegendHover = (entry, index) => {
20854
+ setHoveredBar(entry.dataKey);
20855
+ setActiveIndex(index);
20856
+ };
20857
+ return /*#__PURE__*/React__default.createElement(ResponsiveContainer, null, /*#__PURE__*/React__default.createElement(Recharts.BarChart, {
20858
+ layout: layout,
20859
+ data: data,
20860
+ margin: {
20861
+ top: 10,
20862
+ right: 0,
20863
+ left: layout === 'vertical' ? 0 : -25,
20864
+ bottom: 0
20865
+ },
20866
+ onMouseMove: chartState => setActiveIndex(chartState.activeTooltipIndex),
20867
+ onMouseLeave: () => setActiveIndex(undefined)
20868
+ }, /*#__PURE__*/React__default.createElement(Recharts.CartesianGrid, Object.assign({}, getCartesianGridProps())), /*#__PURE__*/React__default.createElement(Recharts.XAxis, Object.assign({}, layout === 'vertical' ? getXAxisVerticalProps(props) : getXAxisProps(props))), /*#__PURE__*/React__default.createElement(Recharts.YAxis, Object.assign({}, layout === 'vertical' ? getYAxisVerticalProps(props) : getYAxisProps(props))), /*#__PURE__*/React__default.createElement(Recharts.Legend, Object.assign({}, getLegendProps({
20869
+ onClick: handleLegendClick,
20870
+ onMouseEnter: handleLegendHover,
20871
+ onMouseLeave: () => setHoveredBar(null),
20872
+ activeItems: activeBars
20873
+ }))), /*#__PURE__*/React__default.createElement(Recharts.Tooltip, Object.assign({}, getTooltipProps(), {
20874
+ formatter: formatter
20875
+ })), React__default.Children.map(children, child => (/*#__PURE__*/React__default.createElement(Recharts.Bar, {
20876
+ isAnimationActive: false,
20877
+ barSize: 16,
20878
+ dataKey: child.props.accessor,
20879
+ name: child.props.label,
20880
+ onMouseEnter: (_, index) => setActiveIndex(index),
20881
+ onMouseLeave: () => setActiveIndex(undefined),
20882
+ fill: getThemeColor(child.props.color ? `${child.props.color}` : `blue-300`),
20883
+ radius: getBarRadius(stacks, child.props.accessor, child.props.stackId, activeBars),
20884
+ stackId: child.props.stackId,
20885
+ style: child.props.stackId ? {
20886
+ stroke: '#fff',
20887
+ strokeWidth: '2px'
20888
+ } : undefined,
20889
+ hide: !activeBars[child.props.accessor]
20890
+ }, data.map((_, index) => (/*#__PURE__*/React__default.createElement(Recharts.Cell, {
20891
+ key: `cell-${index}`,
20892
+ opacity: hoveredBar && child.props.accessor !== hoveredBar || activeIndex !== undefined && activeIndex !== index ? 0.3 : 1
20893
+ }))))))));
20894
+ };
20895
+ BarChart.Bar = Bar$1;
20896
+ const getBarRadius = (stacks, accessor, stackId, activeBars) => {
20897
+ if (stackId && Array.isArray(stacks[stackId])) {
20898
+ const length = stacks[stackId].length - 1;
20899
+ const index = stacks[stackId].indexOf(accessor);
20900
+ if (Object.entries(activeBars).filter(item => item[0] !== accessor).every(item => !item[1])) {
20901
+ return [3, 3, 0, 0];
20902
+ }
20903
+ if (activeBars[stacks[stackId][index + 1]] === false) {
20904
+ return [index === 0 ? 0 : 3, index === 0 ? 0 : 3, index === length - 1 ? 0 : 3, index === length - 1 ? 0 : 3];
20905
+ }
20906
+ if (index !== 0 && index !== length) {
20907
+ return 0;
20908
+ }
20909
+ return [index === 0 ? 0 : 3, index === 0 ? 0 : 3, index === length ? 0 : 3, index === length ? 0 : 3];
20910
+ }
20911
+ return 3;
20912
+ };
20913
+
20914
+ const Legend$1 = ({
20915
+ legendPosition,
20916
+ hoveredItem,
20917
+ selectedItem,
20918
+ data,
20919
+ onClick,
20920
+ setHoveredItem,
20921
+ formatter,
20922
+ total,
20923
+ visibleItems,
20924
+ label
20925
+ }) => {
20926
+ const isTotalLegendSelected = selectedItem.length === data.length;
20927
+ const isTotalLegendHovered = hoveredItem.length === data.length;
20928
+ const handleMouseLeave = () => setHoveredItem([]);
20929
+ const renderLegendItem = (entry, index) => {
20930
+ const isTotal = entry === null;
20931
+ // We can't use `isTotal` here because TypeScript is unable to infer the type when `entry` is not null.
20932
+ const itemData = entry === null ? {
20933
+ id: 'total',
20934
+ label,
20935
+ value: total,
20936
+ color: 'grey-300'
20937
+ } : entry;
20938
+ const isSelected = isTotal ? isTotalLegendSelected : selectedItem.includes(itemData.id);
20939
+ const isHovered = isTotal ? isTotalLegendHovered : hoveredItem.includes(itemData.id);
20940
+ return /*#__PURE__*/React__default.createElement("li", {
20941
+ key: isTotal ? 'total' : `${itemData.label}-${index}`,
20942
+ className: cn('mr-2 flex cursor-pointer gap-2 rounded pl-0 pr-1', {
20943
+ 'bg-grey-100': isHovered && (!isTotal || legendPosition === 'right'),
20944
+ 'bg-grey-200': isSelected && (!isTotal || legendPosition === 'right')
20945
+ }),
20946
+ onClick: () => onClick(isTotal ? data : itemData),
20947
+ onMouseEnter: () => setHoveredItem(isTotal ? data.map(item => item.id) : [itemData.id]),
20948
+ onMouseLeave: handleMouseLeave
20949
+ }, legendPosition === 'bottom' ? (/*#__PURE__*/React__default.createElement("div", {
20950
+ className: "flex items-center gap-1"
20951
+ }, /*#__PURE__*/React__default.createElement("span", {
20952
+ className: cn('ml-1 h-3 w-3 rounded-sm', {
20953
+ 'border-grey-300 border !bg-white': !visibleItems[itemData.id]
20954
+ }),
20955
+ style: {
20956
+ backgroundColor: getThemeColor(itemData.color)
20957
+ }
20958
+ }, visibleItems[itemData.id] && isHovered && (/*#__PURE__*/React__default.createElement(Icon, {
20959
+ name: "tick-bold",
20960
+ className: "mb-2.5 !h-full !w-full text-white"
20961
+ }))), /*#__PURE__*/React__default.createElement("div", null, itemData.label))) : (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", {
20962
+ className: "ml-1 mt-1 h-9 w-2 rounded-[1px]",
20963
+ style: {
20964
+ backgroundColor: getThemeColor(itemData.color)
20965
+ }
20966
+ }), /*#__PURE__*/React__default.createElement("div", null, itemData.label, /*#__PURE__*/React__default.createElement("span", {
20967
+ className: "-mt-1 flex w-full text-lg font-bold"
20968
+ }, formatter ? formatter(itemData.value) : itemData.value)))));
20969
+ };
20970
+ const moreButton = moreButtonText => (/*#__PURE__*/React__default.createElement(Button$1, {
20971
+ appearance: "transparent",
20972
+ className: "text-grey-700"
20973
+ }, moreButtonText));
20974
+ const className = cn('flex-grow pl-4', {
20975
+ 'w-full': legendPosition === 'bottom'
20976
+ });
20977
+ return /*#__PURE__*/React__default.createElement("div", {
20978
+ className: className
20979
+ }, /*#__PURE__*/React__default.createElement("ul", {
20980
+ className: cn('mb-0 ml-0 mt-4 flex justify-center space-y-1', legendPosition === 'right' ? 'flex-col gap-1' : 'flex-row')
20981
+ }, legendPosition === 'right' ? (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, renderLegendItem(null), data.map(renderLegendItem))) : (/*#__PURE__*/React__default.createElement(OverflowGroup, {
20982
+ className: "w-full items-center py-1",
20983
+ moreButton: moreButton
20984
+ }, data.map(renderLegendItem)))));
20985
+ };
20986
+
20987
+ const DONUT_WIDTH = 16;
20988
+ const HOVER_DONUT_WIDTH = 10;
20989
+
20990
+ const CenteredLabel = ({
20991
+ radius,
20992
+ legendPosition,
20993
+ label,
20994
+ total,
20995
+ formatter,
20996
+ showLegend
20997
+ }) => {
20998
+ const totalInset = HOVER_DONUT_WIDTH + DONUT_WIDTH + DONUT_WIDTH;
20999
+ const diameter = radius * 2;
21000
+ return /*#__PURE__*/React__default.createElement("div", {
21001
+ className: "absolute mt-1 flex h-12 flex-col text-center",
21002
+ style: {
21003
+ top: `calc(${radius}px - (3rem / 2))`,
21004
+ left: legendPosition === 'right' ? `${totalInset}px` : `calc(50%-${diameter - 2 * totalInset})`,
21005
+ width: showLegend ? `${diameter - 2 * totalInset}px` : `${diameter}px`
21006
+ }
21007
+ }, /*#__PURE__*/React__default.createElement("span", {
21008
+ className: "w-full truncate text-lg font-bold"
21009
+ }, formatter ? formatter(total) : total), label);
21010
+ };
21011
+
21012
+ const ActiveShape = props => {
21013
+ var _getThemeColor;
21014
+ const {
21015
+ cx,
21016
+ cy,
21017
+ id,
21018
+ innerRadius,
21019
+ onClick,
21020
+ outerRadius = 0,
21021
+ pieColors,
21022
+ startAngle,
21023
+ endAngle,
21024
+ fill
21025
+ } = props;
21026
+ return /*#__PURE__*/React__default.createElement("g", {
21027
+ onClick: () => onClick(id),
21028
+ className: cn({
21029
+ 'cursor-pointer': !!onClick
21030
+ })
21031
+ }, /*#__PURE__*/React__default.createElement(Recharts.Sector, {
21032
+ cx: cx,
21033
+ cy: cy,
21034
+ innerRadius: innerRadius,
21035
+ outerRadius: outerRadius,
21036
+ startAngle: startAngle,
21037
+ endAngle: endAngle,
21038
+ fill: fill
21039
+ }), /*#__PURE__*/React__default.createElement(Recharts.Sector, {
21040
+ cx: cx,
21041
+ cy: cy,
21042
+ startAngle: startAngle,
21043
+ endAngle: endAngle,
21044
+ innerRadius: outerRadius + 2,
21045
+ outerRadius: outerRadius + HOVER_DONUT_WIDTH,
21046
+ fill: id !== undefined ? (_getThemeColor = getThemeColor(pieColors[id])) !== null && _getThemeColor !== void 0 ? _getThemeColor : getThemeColor('blue-500') : getThemeColor('blue-500'),
21047
+ opacity: 0.3
21048
+ }));
21049
+ };
21050
+
21051
+ const Segment = _ => null;
21052
+ const DonutChart = function DonutChart({
21053
+ children,
21054
+ formatter,
21055
+ onClick,
21056
+ showLegend = false,
21057
+ legendPosition = 'bottom',
21058
+ label
21059
+ }) {
21060
+ const ref = React__default.useRef(null);
21061
+ const [radius, setRadius] = React__default.useState(0);
21062
+ const [hoveredItem, setHoveredItem] = React__default.useState([]);
21063
+ // used for right legends
21064
+ const [selectedItem, setSelectedItem] = React__default.useState([]);
21065
+ // used for bottom legends
21066
+ const [visibleItems, setVisibleItems] = React__default.useState(() => {
21067
+ const keys = {};
21068
+ React__default.Children.forEach(children, child => {
21069
+ keys[child.props.id] = true;
21070
+ });
21071
+ return keys;
21072
+ });
21073
+ React__default.useEffect(() => {
21074
+ if (ref.current) {
21075
+ var _ref$current$parentEl;
21076
+ const rect = (_ref$current$parentEl = ref.current.parentElement) === null || _ref$current$parentEl === void 0 ? void 0 : _ref$current$parentEl.getBoundingClientRect();
21077
+ if (rect) {
21078
+ const width = showLegend ? rect.width / 2 : rect.width;
21079
+ const max = rect.height < width ? rect.height : width;
21080
+ setRadius(max / 2);
21081
+ }
21082
+ }
21083
+ }, [showLegend]);
21084
+ const diameter = radius * 2; // get dimensions of the parent container to find the max radius, so we can fill the container AND always have a 16px wide donut
21085
+ const data = React__default.Children.map(children, child => ({
21086
+ id: child.props.id,
21087
+ color: child.props.color,
21088
+ label: child.props.label,
21089
+ value: child.props.value
21090
+ }));
21091
+ const displayedData = data.filter(child => visibleItems[child.id]);
21092
+ const total = displayedData.reduce((accum, entry) => accum + entry.value, 0);
21093
+ const showTooltip = (!showLegend || legendPosition === 'bottom') && displayedData.length > 0;
21094
+ const handleLegendClick = entry => {
21095
+ if (legendPosition === 'bottom' && !Array.isArray(entry)) {
21096
+ setVisibleItems({
21097
+ ...visibleItems,
21098
+ [entry.id]: !visibleItems[entry.id]
21099
+ });
21100
+ } else {
21101
+ const nextSelectedItem = Array.isArray(entry) ? entry.map(entryItem => entryItem.id) : [entry.id];
21102
+ // Using slice to avoid mutation of the react state 'selectedItem'
21103
+ const isCurrentSegmentActive = selectedItem.slice().sort().join(',') === nextSelectedItem.sort().join(',');
21104
+ if (onClick && !isCurrentSegmentActive) {
21105
+ onClick(entry);
21106
+ }
21107
+ setSelectedItem(isCurrentSegmentActive ? [] : nextSelectedItem);
21108
+ }
21109
+ };
21110
+ const handlePieClick = React__default.useCallback(pieId => {
21111
+ if (onClick && pieId !== undefined) {
21112
+ const pieProps = displayedData.find(item => item.id === pieId);
21113
+ onClick(pieProps);
21114
+ }
21115
+ }, [onClick, displayedData]);
21116
+ const singlePieDonutChart = displayedData.length === 1;
21117
+ const activeShapeColor = React__default.useMemo(() => {
21118
+ const getSegmentColor = item => item.reduce((colors, itemId) => {
21119
+ const visibleHoveredItem = displayedData.find(dataItem => dataItem.id === itemId);
21120
+ if (visibleHoveredItem) {
21121
+ colors[visibleHoveredItem.id] = visibleHoveredItem.color;
21122
+ }
21123
+ return colors;
21124
+ }, {});
21125
+ const hoveredSegmentColor = getSegmentColor(hoveredItem);
21126
+ const selectedSegmentColor = getSegmentColor(selectedItem);
21127
+ return legendPosition === 'bottom' || hoveredItem.length !== 0 ? hoveredSegmentColor : selectedSegmentColor;
21128
+ }, [hoveredItem, selectedItem, legendPosition]);
21129
+ if (ref.current && !radius) {
21130
+ return null;
21131
+ }
21132
+ const getActiveIndex = () => {
21133
+ if (hoveredItem.length > 0) {
21134
+ return hoveredItem.map(itemId => displayedData.findIndex(element => element.id === itemId));
21135
+ }
21136
+ return selectedItem.map(selectedItemId => displayedData.findIndex(element => element.id === selectedItemId));
21137
+ };
21138
+ const content = () => {
21139
+ const elements = React__default.Children.toArray(children).filter(child => /*#__PURE__*/React__default.isValidElement(child) && visibleItems[child.props.id]);
21140
+ return elements.length > 0 ? elements.map((child, index) => {
21141
+ var _getThemeColor;
21142
+ return /*#__PURE__*/React__default.createElement(Recharts.Cell, {
21143
+ key: `cell-${index}`,
21144
+ name: child.props.label,
21145
+ fill: (_getThemeColor = getThemeColor(child.props.color)) !== null && _getThemeColor !== void 0 ? _getThemeColor : getThemeColor('blue-300')
21146
+ });
21147
+ }) : (/*#__PURE__*/React__default.createElement(Recharts.Cell, {
21148
+ key: "empty-chart",
21149
+ name: '',
21150
+ fill: getThemeColor('grey-200')
21151
+ }));
21152
+ };
21153
+ return /*#__PURE__*/React__default.createElement("div", {
21154
+ className: cn('relative h-full w-full', {
21155
+ [`flex `]: showLegend,
21156
+ 'flex-col items-center': legendPosition === 'bottom'
21157
+ }),
21158
+ ref: ref
21159
+ }, /*#__PURE__*/React__default.createElement(CenteredLabel, {
21160
+ radius: radius,
21161
+ legendPosition: legendPosition,
21162
+ label: label,
21163
+ total: total,
21164
+ formatter: formatter,
21165
+ showLegend: showLegend
21166
+ }), /*#__PURE__*/React__default.createElement(Recharts.PieChart, {
21167
+ data: data,
21168
+ height: diameter,
21169
+ width: diameter,
21170
+ style: {
21171
+ transform: 'rotate(90deg) scale(-1,1)'
21172
+ }
21173
+ }, showTooltip ? (/*#__PURE__*/React__default.createElement(Recharts.Tooltip, Object.assign({}, getTooltipProps({
21174
+ style: {
21175
+ transform: 'rotate(90deg) scale(-1,1)'
21176
+ },
21177
+ singlePieDonutChart
21178
+ })))) : null, /*#__PURE__*/React__default.createElement(Recharts.Pie, {
21179
+ isAnimationActive: false,
21180
+ activeIndex: getActiveIndex(),
21181
+ activeShape: /*#__PURE__*/React__default.createElement(ActiveShape, {
21182
+ pieColors: activeShapeColor,
21183
+ onClick: handlePieClick
21184
+ }),
21185
+ data: displayedData.length > 0 ? displayedData : [],
21186
+ dataKey: "value",
21187
+ innerRadius: radius - HOVER_DONUT_WIDTH - DONUT_WIDTH,
21188
+ onMouseEnter: segment => displayedData.length > 0 && setHoveredItem([segment.id]),
21189
+ onMouseLeave: () => setHoveredItem([]),
21190
+ outerRadius: radius - HOVER_DONUT_WIDTH,
21191
+ paddingAngle: 2,
21192
+ // Prevents the pie group element from being focusable
21193
+ rootTabIndex: -1
21194
+ }, content())), showLegend && (/*#__PURE__*/React__default.createElement(Legend$1, {
21195
+ data: data,
21196
+ visibleItems: visibleItems,
21197
+ onClick: handleLegendClick,
21198
+ total: total,
21199
+ setHoveredItem: setHoveredItem,
21200
+ label: label,
21201
+ legendPosition: legendPosition,
21202
+ hoveredItem: hoveredItem,
21203
+ selectedItem: selectedItem,
21204
+ formatter: formatter
21205
+ })));
21206
+ };
21207
+ DonutChart.Segment = Segment;
21208
+
21209
+ const Line$1 = _ => null;
21210
+ const LineChart = function LineChart(externalProps) {
21211
+ const {
21212
+ children,
21213
+ data,
21214
+ formatter,
21215
+ ...props
21216
+ } = externalProps;
21217
+ const [hoveredLine, setHoveredLine] = React.useState(null);
21218
+ const [activeLines, setActiveLines] = React.useState(() => {
21219
+ const keys = {};
21220
+ React__default.Children.forEach(children, child => {
21221
+ keys[child.props.accessor] = true;
21222
+ });
21223
+ return keys;
21224
+ });
21225
+ const handleLegendClick = entry => {
21226
+ setHoveredLine(null);
21227
+ setActiveLines({
21228
+ ...activeLines,
21229
+ [entry.dataKey]: !activeLines[entry.dataKey]
21230
+ });
21231
+ };
21232
+ return /*#__PURE__*/React__default.createElement(ResponsiveContainer, null, /*#__PURE__*/React__default.createElement(Recharts.LineChart, {
21233
+ data: data,
21234
+ margin: {
21235
+ top: 10,
21236
+ right: 0,
21237
+ left: -25,
21238
+ bottom: 0
21239
+ }
21240
+ }, /*#__PURE__*/React__default.createElement(Recharts.CartesianGrid, Object.assign({}, getCartesianGridProps())), /*#__PURE__*/React__default.createElement(Recharts.XAxis, Object.assign({}, getXAxisProps(props))), /*#__PURE__*/React__default.createElement(Recharts.YAxis, Object.assign({}, getYAxisProps(props))), /*#__PURE__*/React__default.createElement(Recharts.Legend, Object.assign({}, getLegendProps({
21241
+ onClick: handleLegendClick,
21242
+ onMouseEnter: entry => setHoveredLine(entry.dataKey),
21243
+ onMouseLeave: () => setHoveredLine(null),
21244
+ activeItems: activeLines
21245
+ }))), /*#__PURE__*/React__default.createElement(Recharts.Tooltip, Object.assign({}, getTooltipProps(), {
21246
+ formatter: formatter
21247
+ })), React__default.Children.map(children, child => {
21248
+ var _child$props$color, _child$props$color2;
21249
+ return /*#__PURE__*/React__default.createElement(Recharts.Line, {
21250
+ activeDot: {
21251
+ fill: getThemeColor((_child$props$color = child.props.color) !== null && _child$props$color !== void 0 ? _child$props$color : 'blue-300')
21252
+ },
21253
+ dataKey: child.props.accessor,
21254
+ isAnimationActive: false,
21255
+ dot: false,
21256
+ name: child.props.label,
21257
+ stroke: getThemeColor((_child$props$color2 = child.props.color) !== null && _child$props$color2 !== void 0 ? _child$props$color2 : 'blue-300'),
21258
+ strokeWidth: 2,
21259
+ hide: !activeLines[child.props.accessor],
21260
+ opacity: hoveredLine && child.props.accessor !== hoveredLine ? 0.3 : 1
21261
+ });
21262
+ })));
21263
+ };
21264
+ LineChart.Line = Line$1;
21265
+
20456
21266
  const Button$4 = /*#__PURE__*/React__default.forwardRef(function Button(props, ref) {
20457
21267
  const {
20458
21268
  ...attributes
@@ -20725,15 +21535,13 @@ const AgreementDisplay = props => {
20725
21535
  }));
20726
21536
  };
20727
21537
 
20728
- const Container$1 = ({
20729
- children
20730
- }) => {
21538
+ const Container$1 = props => {
20731
21539
  return /*#__PURE__*/React__default.createElement("div", {
20732
21540
  className: "-ml-2 flex flex-shrink-0 flex-grow-0 items-center gap-2 pr-2 xl:ml-auto xl:w-64",
20733
21541
  "data-taco": "header-agreements"
20734
21542
  }, /*#__PURE__*/React__default.createElement("span", {
20735
21543
  className: "hidden h-8 w-px flex-shrink-0 flex-grow-0 bg-white/[0.3] xl:flex"
20736
- }), children);
21544
+ }), props.children);
20737
21545
  };
20738
21546
  function AgreementSelector(props) {
20739
21547
  const {
@@ -21199,10 +22007,12 @@ const useOnClickOutside = (ref, callback) => {
21199
22007
  exports.Accordion = Accordion;
21200
22008
  exports.Alert = Alert;
21201
22009
  exports.AlertDialog = AlertDialog;
22010
+ exports.AreaChart = AreaChart;
21202
22011
  exports.Backdrop = Backdrop;
21203
22012
  exports.Badge = Badge;
21204
22013
  exports.BadgeIcon = BadgeIcon;
21205
22014
  exports.Banner = Banner;
22015
+ exports.BarChart = BarChart;
21206
22016
  exports.Base = Base;
21207
22017
  exports.Button = Button$1;
21208
22018
  exports.Calendar = Calendar$1;
@@ -21213,6 +22023,7 @@ exports.Combobox = Combobox;
21213
22023
  exports.DEFAULT_PAGE_SIZE = DEFAULT_PAGE_SIZE;
21214
22024
  exports.Datepicker = Datepicker;
21215
22025
  exports.Dialog = Dialog;
22026
+ exports.DonutChart = DonutChart;
21216
22027
  exports.Drawer = Drawer;
21217
22028
  exports.Field = Field;
21218
22029
  exports.Form = Form;
@@ -21224,6 +22035,7 @@ exports.Icon = Icon;
21224
22035
  exports.IconButton = IconButton;
21225
22036
  exports.Input = Input;
21226
22037
  exports.Layout = Layout$1;
22038
+ exports.LineChart = LineChart;
21227
22039
  exports.List = List$1;
21228
22040
  exports.Listbox = Listbox;
21229
22041
  exports.LocalizationContext = LocalizationContext;