@adiba-banking-cloud/backoffice 0.0.96 → 0.0.98

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 (32) hide show
  1. package/build/index.cjs.js/index.js +104 -34
  2. package/build/index.esm.js/index.js +104 -34
  3. package/build/typings/components/charts/area/Area.d.ts +3 -1
  4. package/build/typings/components/charts/area/Area.default.d.ts +2 -2
  5. package/build/typings/components/charts/area/Area.stories.d.ts +2 -0
  6. package/build/typings/components/charts/area/Area.types.d.ts +62 -1
  7. package/build/typings/components/charts/column/Column.default.d.ts +1 -1
  8. package/build/typings/components/charts/column/Column.types.d.ts +2 -0
  9. package/build/typings/components/general/icons/Icons.d.ts +1 -1
  10. package/build/typings/components/general/title/Title.types.d.ts +1 -1
  11. package/build/typings/components/menus/application/Application.stories.d.ts +1 -1
  12. package/build/typings/components/menus/side/Side.d.ts +1 -1
  13. package/build/typings/components/menus/user/User.stories.d.ts +1 -1
  14. package/build/typings/components/modals/confim/Confim.d.ts +1 -1
  15. package/build/typings/components/modals/confim/Confim.stories.d.ts +1 -1
  16. package/build/typings/components/widgets/subscription_plan/SubscriptionPlan.types.d.ts +1 -1
  17. package/build/typings/shared/types/ActionProps.types.d.ts +1 -1
  18. package/package.json +1 -1
  19. package/build/typings/components/charts/heatmap/Heatmap.stories.d.ts +0 -0
  20. package/build/typings/components/charts/pie/Pie.stories.d.ts +0 -0
  21. package/build/typings/components/dnd/kanban/Kanban.stories.d.ts +0 -0
  22. package/build/typings/components/dnd/sequence/Sequence.stories.d.ts +0 -0
  23. package/build/typings/components/documents/folder/Folder.stories.d.ts +0 -0
  24. package/build/typings/components/documents/image/Image.stories.d.ts +0 -0
  25. package/build/typings/components/general/drawer/Drawer.stories.d.ts +0 -0
  26. package/build/typings/components/menus/inbox/Inbox.stories.d.ts +0 -0
  27. package/build/typings/components/menus/notification/Notification.stories.d.ts +0 -0
  28. package/build/typings/components/menus/settings/Settings.stories.d.ts +0 -0
  29. package/build/typings/components/modals/error/Error.stories.d.ts +0 -0
  30. package/build/typings/components/modals/info/Info.stories.d.ts +0 -0
  31. package/build/typings/components/modals/success/Success.stories.d.ts +0 -0
  32. package/build/typings/components/modals/twofactor/Twofactor.stories.d.ts +0 -0
@@ -11225,7 +11225,8 @@ const initChart$2 = props => {
11225
11225
  type: "column",
11226
11226
  borderRadius: 8,
11227
11227
  backgroundColor: props?.bgColor || "rgba(255, 255, 255, 0)",
11228
- plotBackgroundColor: props?.plotBgColor || "rgba(255, 255, 255, 0)"
11228
+ plotBackgroundColor: props?.plotBgColor || "rgba(255, 255, 255, 0)",
11229
+ inverted: props?.inverted || false
11229
11230
  },
11230
11231
  tooltip: {
11231
11232
  backgroundColor: "#0F193D",
@@ -11376,7 +11377,8 @@ const EqualizerColumn = props => {
11376
11377
  bgColor: props.bgColor,
11377
11378
  plotBgColor: props.plotBgColor,
11378
11379
  colors: [props.color || "blue"],
11379
- title: props.title
11380
+ title: props.title,
11381
+ inverted: props.inverted
11380
11382
  };
11381
11383
  return /*#__PURE__*/React.createElement(Column, chartOptions);
11382
11384
  };
@@ -11390,7 +11392,8 @@ const SimpleColumn = props => {
11390
11392
  bgColor: props.bgColor,
11391
11393
  plotBgColor: props.plotBgColor,
11392
11394
  colors: [props.color || "gray"],
11393
- title: props.title
11395
+ title: props.title,
11396
+ inverted: props.inverted
11394
11397
  };
11395
11398
  return /*#__PURE__*/React.createElement(Column, chartOptions);
11396
11399
  };
@@ -11518,7 +11521,16 @@ const initSeries$2 = props => {
11518
11521
  };
11519
11522
  };
11520
11523
 
11524
+ const isMultiAxis = props => {
11525
+ return "yAxisConfig" in props;
11526
+ };
11527
+ const isStacked = props => {
11528
+ // StackedAreaChartProps doesn't have yAxisConfig, but has multiple series
11529
+ return !("yAxisConfig" in props) && props.series.length > 1;
11530
+ };
11521
11531
  const initChart$1 = props => {
11532
+ const isMulti = isMultiAxis(props);
11533
+ const isStackedChart = isStacked(props);
11522
11534
  return {
11523
11535
  chart: {
11524
11536
  type: "areaspline",
@@ -11533,7 +11545,45 @@ const initChart$1 = props => {
11533
11545
  style: {
11534
11546
  color: "white"
11535
11547
  },
11536
- format: props.series.length > 1 ? "<b>{key}</b><br/>{series.name}: <b>{y}</b><br/>" + "Total: <b>{point.stackTotal}</b>" : "<b>{key}</b><br/>{series.name}: {y}<br/>"
11548
+ formatter: function () {
11549
+ const point = this.point;
11550
+ const series = this.series;
11551
+ const key = this.key || this.x;
11552
+ if (isStackedChart) {
11553
+ const stackedProps = props;
11554
+ const aggregator = stackedProps.aggregator || "sum";
11555
+ const stackTotal = point.stackTotal || point.y;
11556
+ if (aggregator === "average") {
11557
+ const seriesCount = props.series.length;
11558
+ const average = (stackTotal / seriesCount).toFixed(2);
11559
+ return `<b>${key}</b><br/>${series.name}: <b>${point.y}</b><br/>` + `Average: <b>${average}</b>`;
11560
+ } else {
11561
+ return `<b>${key}</b><br/>${series.name}: <b>${point.y}</b><br/>` + `Total: <b>${stackTotal}</b>`;
11562
+ }
11563
+ }
11564
+ if (isMulti) {
11565
+ const multiProps = props;
11566
+ const aggregator = multiProps.aggregator || "sum";
11567
+ const chart = this.series.chart;
11568
+ const allSeries = chart.series;
11569
+ const pointIndex = series.data.indexOf(point);
11570
+ let sum = 0;
11571
+ let count = 0;
11572
+ allSeries.forEach(s => {
11573
+ if (s.data && s.data[pointIndex] && s.data[pointIndex].y !== null && s.data[pointIndex].y !== undefined) {
11574
+ sum += s.data[pointIndex].y;
11575
+ count++;
11576
+ }
11577
+ });
11578
+ if (aggregator === "average") {
11579
+ const average = count > 0 ? (sum / count).toFixed(2) : "0.00";
11580
+ return `<b>${key}</b><br/>${series.name}: <b>${point.y}</b><br/>` + `Average: <b>${average}</b>`;
11581
+ } else {
11582
+ return `<b>${key}</b><br/>${series.name}: <b>${point.y}</b><br/>` + `Total: <b>${sum}</b>`;
11583
+ }
11584
+ }
11585
+ return `<b>${key}</b><br/>${series.name}: ${point.y}<br/>`;
11586
+ }
11537
11587
  },
11538
11588
  credits: {
11539
11589
  enabled: false
@@ -11551,8 +11601,8 @@ const initChart$1 = props => {
11551
11601
  },
11552
11602
  legend: {
11553
11603
  enabled: props.withLegend,
11554
- align: "right",
11555
- verticalAlign: "top"
11604
+ align: props.legendPosition?.align || "right",
11605
+ verticalAlign: props.legendPosition?.verticalAlign || "top"
11556
11606
  }
11557
11607
  };
11558
11608
  };
@@ -11589,7 +11639,9 @@ const SimpleArea = props => {
11589
11639
  bgColor: props.bgColor,
11590
11640
  plotBgColor: props.plotBgColor,
11591
11641
  colors: [props.color || "gray"],
11592
- title: props.title
11642
+ title: props.title,
11643
+ legendPosition: props.legendPosition,
11644
+ showYAxis: props.showYAxis
11593
11645
  };
11594
11646
  return /*#__PURE__*/React.createElement(Area, chartOptions);
11595
11647
  };
@@ -11626,12 +11678,27 @@ const initSeries$1 = props => {
11626
11678
  const labels = {
11627
11679
  color: "#575E77"
11628
11680
  };
11629
- return {
11681
+ const yAxis = {
11630
11682
  ...defaults,
11631
11683
  ...{
11632
11684
  labels
11633
11685
  }
11634
11686
  };
11687
+
11688
+ // Hide yAxis if showYAxis is false
11689
+ if (props.showYAxis === false) {
11690
+ return {
11691
+ ...yAxis,
11692
+ visible: false,
11693
+ labels: {
11694
+ enabled: false
11695
+ },
11696
+ title: {
11697
+ text: null
11698
+ }
11699
+ };
11700
+ }
11701
+ return yAxis;
11635
11702
  };
11636
11703
  const renderPlot = () => {
11637
11704
  const areaspline = {
@@ -11817,7 +11884,7 @@ var img$b = "data:image/svg+xml,%3csvg width='893' height='221' viewBox='0 0 893
11817
11884
 
11818
11885
  const Logo = _ref => {
11819
11886
  let {
11820
- href = '/',
11887
+ href = "/",
11821
11888
  fallbackSrc,
11822
11889
  src,
11823
11890
  fit,
@@ -12009,11 +12076,11 @@ const UserMenuTarget = _ref => {
12009
12076
  gap: "sm"
12010
12077
  }, /*#__PURE__*/React.createElement(core.Avatar, {
12011
12078
  src: avatar,
12012
- radius: 'md',
12079
+ radius: "md",
12013
12080
  key: name,
12014
12081
  name: name,
12015
12082
  color: "initials",
12016
- bd: '0.5px solid adiba.2'
12083
+ bd: "0.5px solid adiba.2"
12017
12084
  }), /*#__PURE__*/React.createElement(core.Stack, {
12018
12085
  gap: 0,
12019
12086
  align: "flex-start",
@@ -12065,7 +12132,7 @@ const UserMenuDropdown = _ref => {
12065
12132
  if (section?.title) items.push(/*#__PURE__*/React.createElement(core.Menu.Label, {
12066
12133
  fz: 10,
12067
12134
  fw: 500,
12068
- c: 'dimmed',
12135
+ c: "dimmed",
12069
12136
  key: `label-${index}`
12070
12137
  }, section.title));
12071
12138
  items.push(...sectionItems);
@@ -12222,7 +12289,7 @@ const SearchPanel = _ref3 => {
12222
12289
  searchFn ? searchFn(values) : void 0;
12223
12290
  })
12224
12291
  }, /*#__PURE__*/React.createElement(core.Group, {
12225
- gap: 'xs'
12292
+ gap: "xs"
12226
12293
  }, /*#__PURE__*/React.createElement(core.TextInput, {
12227
12294
  fw: 300,
12228
12295
  name: "search",
@@ -12232,7 +12299,7 @@ const SearchPanel = _ref3 => {
12232
12299
  value: search,
12233
12300
  placeholder: placeholder,
12234
12301
  leftSection: /*#__PURE__*/React.createElement(Icons, searchIcon),
12235
- rightSection: typeof filterFn == 'function' ? /*#__PURE__*/React.createElement(core.ActionIcon, {
12302
+ rightSection: typeof filterFn == "function" ? /*#__PURE__*/React.createElement(core.ActionIcon, {
12236
12303
  variant: "transparent",
12237
12304
  onClick: filterFn
12238
12305
  }, /*#__PURE__*/React.createElement(Icons, filterIcon)) : /*#__PURE__*/React.createElement(React.Fragment, null),
@@ -12289,7 +12356,7 @@ const LabelPanel = _ref => {
12289
12356
  radius,
12290
12357
  p
12291
12358
  }), /*#__PURE__*/React.createElement(core.Stack, {
12292
- pb: 'md'
12359
+ pb: "md"
12293
12360
  }, /*#__PURE__*/React.createElement(core.Group, {
12294
12361
  justify: "space-between",
12295
12362
  p: 0
@@ -12340,15 +12407,15 @@ const AvatarLabelPanel = _ref2 => {
12340
12407
  py: "sm"
12341
12408
  }, /*#__PURE__*/React.createElement(core.Box, {
12342
12409
  w: labelWidth,
12343
- pl: 'md'
12410
+ pl: "md"
12344
12411
  }, /*#__PURE__*/React.createElement(core.Avatar, {
12345
12412
  size: avatarSize,
12346
12413
  src: avatar,
12347
- radius: 'md',
12414
+ radius: "md",
12348
12415
  key: name,
12349
12416
  name: name,
12350
12417
  color: "initials",
12351
- bd: '0.5px solid adiba.2'
12418
+ bd: "0.5px solid adiba.2"
12352
12419
  })), /*#__PURE__*/React.createElement(core.Stack, {
12353
12420
  py: 10,
12354
12421
  gap: "md",
@@ -12386,7 +12453,7 @@ const SimpleText = _ref => {
12386
12453
  } = _ref;
12387
12454
  return /*#__PURE__*/React.createElement(core.Text, _extends({
12388
12455
  fw: 300,
12389
- fz: smaller ? '90%' : undefined
12456
+ fz: smaller ? "90%" : undefined
12390
12457
  }, rest), label);
12391
12458
  };
12392
12459
 
@@ -12421,8 +12488,10 @@ const PageTitle = _ref => {
12421
12488
  rightsection = /*#__PURE__*/React.createElement(core.SegmentedControl, {
12422
12489
  size: "sm",
12423
12490
  bg: "white",
12424
- color: 'adiba',
12425
- data: switcher.items
12491
+ color: "adiba",
12492
+ data: switcher.items,
12493
+ value: switcher.value,
12494
+ onChange: switcher.onChange
12426
12495
  });
12427
12496
  }
12428
12497
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(core.Group, {
@@ -12465,7 +12534,7 @@ const TitleWithIndex = _ref => {
12465
12534
  errorFn = () => void 0
12466
12535
  } = _ref;
12467
12536
  return /*#__PURE__*/React.createElement(core.Group, null, /*#__PURE__*/React.createElement(core.Group, {
12468
- gap: 'xs'
12537
+ gap: "xs"
12469
12538
  }, /*#__PURE__*/React.createElement(core.Title, {
12470
12539
  order: 3,
12471
12540
  fw: 500
@@ -12534,7 +12603,7 @@ const ConnectionPanelDetail = _ref => {
12534
12603
  fz: "xs"
12535
12604
  }, label), /*#__PURE__*/React.createElement(core.Text, {
12536
12605
  fw: 300,
12537
- fz: 'sm',
12606
+ fz: "sm",
12538
12607
  c: altColor
12539
12608
  }, value));
12540
12609
  };
@@ -12660,9 +12729,9 @@ const ApplicationPanelFeatures = _ref => {
12660
12729
  stroke: 1.5
12661
12730
  })), /*#__PURE__*/React.createElement(core.Text, {
12662
12731
  fw: 300,
12663
- c: 'altiba',
12664
- size: '12px',
12665
- w: '90%',
12732
+ c: "altiba",
12733
+ size: "12px",
12734
+ w: "90%",
12666
12735
  truncate: true
12667
12736
  }, label));
12668
12737
  };
@@ -12710,7 +12779,8 @@ const ApplicationPanel = _ref => {
12710
12779
  variant: "outline"
12711
12780
  }, discount)), /*#__PURE__*/React.createElement(core.Text, {
12712
12781
  fw: 300,
12713
- fz: "sm"
12782
+ fz: "sm",
12783
+ lineClamp: 3
12714
12784
  }, summary))), /*#__PURE__*/React.createElement(core.Card.Section, {
12715
12785
  p: "md",
12716
12786
  pt: 0
@@ -12778,8 +12848,8 @@ const SubscriptionPlans = _ref => {
12778
12848
  altColor = "altiba.3",
12779
12849
  durationDays,
12780
12850
  planPrice,
12781
- buttonLabel = 'Pay Early',
12782
- altButtonLabel = 'Pay Now',
12851
+ buttonLabel = "Pay Early",
12852
+ altButtonLabel = "Pay Now",
12783
12853
  onClick
12784
12854
  } = _ref;
12785
12855
  const price = planPrice.split("/");
@@ -12954,7 +13024,7 @@ const SimpleBody = _ref => {
12954
13024
  const columnIndex = column.id;
12955
13025
  return /*#__PURE__*/React.createElement(core.Table.Td, {
12956
13026
  key: idx
12957
- }, typeof row[columnIndex] === 'function' ? row[columnIndex](`${index}`) : row[columnIndex] || "");
13027
+ }, typeof row[columnIndex] === "function" ? row[columnIndex](`${index}`) : row[columnIndex] || "");
12958
13028
  }));
12959
13029
  };
12960
13030
 
@@ -12987,7 +13057,7 @@ const SimpleTable = _ref => {
12987
13057
  verticalSpacing: "md"
12988
13058
  };
12989
13059
  return /*#__PURE__*/React.createElement(core.Table, isStriped && isStripedProps, /*#__PURE__*/React.createElement(core.Table.Thead, null, /*#__PURE__*/React.createElement(core.Table.Tr, {
12990
- bg: isStriped ? 'gray.1' : 'transparent'
13060
+ bg: isStriped ? "gray.1" : "transparent"
12991
13061
  }, columns.map((column, index) => {
12992
13062
  return /*#__PURE__*/React.createElement(SimpleHeader, _extends({
12993
13063
  key: `column-${index}`
@@ -13047,7 +13117,7 @@ const File = _ref => {
13047
13117
  p: isChip ? "xs" : undefined
13048
13118
  }, /*#__PURE__*/React.createElement(core.Group, {
13049
13119
  justify: isChip ? "space-between" : undefined,
13050
- gap: 'xs'
13120
+ gap: "xs"
13051
13121
  }, /*#__PURE__*/React.createElement(core.Image, {
13052
13122
  p: isChip ? undefined : "xs",
13053
13123
  pr: 2,
@@ -13147,7 +13217,7 @@ const SimpleModal = _ref => {
13147
13217
  }, /*#__PURE__*/React.createElement(core.Title, {
13148
13218
  order: 3,
13149
13219
  fw: 500,
13150
- lh: '40px'
13220
+ lh: "40px"
13151
13221
  }, innerProps.title), /*#__PURE__*/React.createElement(React.Fragment, null, innerProps.modalBody)));
13152
13222
  };
13153
13223
 
@@ -13235,7 +13305,7 @@ const Drawer = _ref => {
13235
13305
  transition: "slide-left"
13236
13306
  }
13237
13307
  }, /*#__PURE__*/React.createElement(core.Drawer.Overlay, null), /*#__PURE__*/React.createElement(core.Drawer.Content, null, /*#__PURE__*/React.createElement(core.Drawer.Header, null, /*#__PURE__*/React.createElement(core.Drawer.Title, {
13238
- fz: 'lg',
13308
+ fz: "lg",
13239
13309
  fw: "400"
13240
13310
  }, title), /*#__PURE__*/React.createElement(core.Drawer.CloseButton, {
13241
13311
  icon: /*#__PURE__*/React.createElement(Icons, {
@@ -11204,7 +11204,8 @@ const initChart$2 = props => {
11204
11204
  type: "column",
11205
11205
  borderRadius: 8,
11206
11206
  backgroundColor: props?.bgColor || "rgba(255, 255, 255, 0)",
11207
- plotBackgroundColor: props?.plotBgColor || "rgba(255, 255, 255, 0)"
11207
+ plotBackgroundColor: props?.plotBgColor || "rgba(255, 255, 255, 0)",
11208
+ inverted: props?.inverted || false
11208
11209
  },
11209
11210
  tooltip: {
11210
11211
  backgroundColor: "#0F193D",
@@ -11355,7 +11356,8 @@ const EqualizerColumn = props => {
11355
11356
  bgColor: props.bgColor,
11356
11357
  plotBgColor: props.plotBgColor,
11357
11358
  colors: [props.color || "blue"],
11358
- title: props.title
11359
+ title: props.title,
11360
+ inverted: props.inverted
11359
11361
  };
11360
11362
  return /*#__PURE__*/React.createElement(Column, chartOptions);
11361
11363
  };
@@ -11369,7 +11371,8 @@ const SimpleColumn = props => {
11369
11371
  bgColor: props.bgColor,
11370
11372
  plotBgColor: props.plotBgColor,
11371
11373
  colors: [props.color || "gray"],
11372
- title: props.title
11374
+ title: props.title,
11375
+ inverted: props.inverted
11373
11376
  };
11374
11377
  return /*#__PURE__*/React.createElement(Column, chartOptions);
11375
11378
  };
@@ -11497,7 +11500,16 @@ const initSeries$2 = props => {
11497
11500
  };
11498
11501
  };
11499
11502
 
11503
+ const isMultiAxis = props => {
11504
+ return "yAxisConfig" in props;
11505
+ };
11506
+ const isStacked = props => {
11507
+ // StackedAreaChartProps doesn't have yAxisConfig, but has multiple series
11508
+ return !("yAxisConfig" in props) && props.series.length > 1;
11509
+ };
11500
11510
  const initChart$1 = props => {
11511
+ const isMulti = isMultiAxis(props);
11512
+ const isStackedChart = isStacked(props);
11501
11513
  return {
11502
11514
  chart: {
11503
11515
  type: "areaspline",
@@ -11512,7 +11524,45 @@ const initChart$1 = props => {
11512
11524
  style: {
11513
11525
  color: "white"
11514
11526
  },
11515
- format: props.series.length > 1 ? "<b>{key}</b><br/>{series.name}: <b>{y}</b><br/>" + "Total: <b>{point.stackTotal}</b>" : "<b>{key}</b><br/>{series.name}: {y}<br/>"
11527
+ formatter: function () {
11528
+ const point = this.point;
11529
+ const series = this.series;
11530
+ const key = this.key || this.x;
11531
+ if (isStackedChart) {
11532
+ const stackedProps = props;
11533
+ const aggregator = stackedProps.aggregator || "sum";
11534
+ const stackTotal = point.stackTotal || point.y;
11535
+ if (aggregator === "average") {
11536
+ const seriesCount = props.series.length;
11537
+ const average = (stackTotal / seriesCount).toFixed(2);
11538
+ return `<b>${key}</b><br/>${series.name}: <b>${point.y}</b><br/>` + `Average: <b>${average}</b>`;
11539
+ } else {
11540
+ return `<b>${key}</b><br/>${series.name}: <b>${point.y}</b><br/>` + `Total: <b>${stackTotal}</b>`;
11541
+ }
11542
+ }
11543
+ if (isMulti) {
11544
+ const multiProps = props;
11545
+ const aggregator = multiProps.aggregator || "sum";
11546
+ const chart = this.series.chart;
11547
+ const allSeries = chart.series;
11548
+ const pointIndex = series.data.indexOf(point);
11549
+ let sum = 0;
11550
+ let count = 0;
11551
+ allSeries.forEach(s => {
11552
+ if (s.data && s.data[pointIndex] && s.data[pointIndex].y !== null && s.data[pointIndex].y !== undefined) {
11553
+ sum += s.data[pointIndex].y;
11554
+ count++;
11555
+ }
11556
+ });
11557
+ if (aggregator === "average") {
11558
+ const average = count > 0 ? (sum / count).toFixed(2) : "0.00";
11559
+ return `<b>${key}</b><br/>${series.name}: <b>${point.y}</b><br/>` + `Average: <b>${average}</b>`;
11560
+ } else {
11561
+ return `<b>${key}</b><br/>${series.name}: <b>${point.y}</b><br/>` + `Total: <b>${sum}</b>`;
11562
+ }
11563
+ }
11564
+ return `<b>${key}</b><br/>${series.name}: ${point.y}<br/>`;
11565
+ }
11516
11566
  },
11517
11567
  credits: {
11518
11568
  enabled: false
@@ -11530,8 +11580,8 @@ const initChart$1 = props => {
11530
11580
  },
11531
11581
  legend: {
11532
11582
  enabled: props.withLegend,
11533
- align: "right",
11534
- verticalAlign: "top"
11583
+ align: props.legendPosition?.align || "right",
11584
+ verticalAlign: props.legendPosition?.verticalAlign || "top"
11535
11585
  }
11536
11586
  };
11537
11587
  };
@@ -11568,7 +11618,9 @@ const SimpleArea = props => {
11568
11618
  bgColor: props.bgColor,
11569
11619
  plotBgColor: props.plotBgColor,
11570
11620
  colors: [props.color || "gray"],
11571
- title: props.title
11621
+ title: props.title,
11622
+ legendPosition: props.legendPosition,
11623
+ showYAxis: props.showYAxis
11572
11624
  };
11573
11625
  return /*#__PURE__*/React.createElement(Area, chartOptions);
11574
11626
  };
@@ -11605,12 +11657,27 @@ const initSeries$1 = props => {
11605
11657
  const labels = {
11606
11658
  color: "#575E77"
11607
11659
  };
11608
- return {
11660
+ const yAxis = {
11609
11661
  ...defaults,
11610
11662
  ...{
11611
11663
  labels
11612
11664
  }
11613
11665
  };
11666
+
11667
+ // Hide yAxis if showYAxis is false
11668
+ if (props.showYAxis === false) {
11669
+ return {
11670
+ ...yAxis,
11671
+ visible: false,
11672
+ labels: {
11673
+ enabled: false
11674
+ },
11675
+ title: {
11676
+ text: null
11677
+ }
11678
+ };
11679
+ }
11680
+ return yAxis;
11614
11681
  };
11615
11682
  const renderPlot = () => {
11616
11683
  const areaspline = {
@@ -11796,7 +11863,7 @@ var img$b = "data:image/svg+xml,%3csvg width='893' height='221' viewBox='0 0 893
11796
11863
 
11797
11864
  const Logo = _ref => {
11798
11865
  let {
11799
- href = '/',
11866
+ href = "/",
11800
11867
  fallbackSrc,
11801
11868
  src,
11802
11869
  fit,
@@ -11988,11 +12055,11 @@ const UserMenuTarget = _ref => {
11988
12055
  gap: "sm"
11989
12056
  }, /*#__PURE__*/React.createElement(Avatar, {
11990
12057
  src: avatar,
11991
- radius: 'md',
12058
+ radius: "md",
11992
12059
  key: name,
11993
12060
  name: name,
11994
12061
  color: "initials",
11995
- bd: '0.5px solid adiba.2'
12062
+ bd: "0.5px solid adiba.2"
11996
12063
  }), /*#__PURE__*/React.createElement(Stack, {
11997
12064
  gap: 0,
11998
12065
  align: "flex-start",
@@ -12044,7 +12111,7 @@ const UserMenuDropdown = _ref => {
12044
12111
  if (section?.title) items.push(/*#__PURE__*/React.createElement(Menu.Label, {
12045
12112
  fz: 10,
12046
12113
  fw: 500,
12047
- c: 'dimmed',
12114
+ c: "dimmed",
12048
12115
  key: `label-${index}`
12049
12116
  }, section.title));
12050
12117
  items.push(...sectionItems);
@@ -12201,7 +12268,7 @@ const SearchPanel = _ref3 => {
12201
12268
  searchFn ? searchFn(values) : void 0;
12202
12269
  })
12203
12270
  }, /*#__PURE__*/React.createElement(Group, {
12204
- gap: 'xs'
12271
+ gap: "xs"
12205
12272
  }, /*#__PURE__*/React.createElement(TextInput, {
12206
12273
  fw: 300,
12207
12274
  name: "search",
@@ -12211,7 +12278,7 @@ const SearchPanel = _ref3 => {
12211
12278
  value: search,
12212
12279
  placeholder: placeholder,
12213
12280
  leftSection: /*#__PURE__*/React.createElement(Icons, searchIcon),
12214
- rightSection: typeof filterFn == 'function' ? /*#__PURE__*/React.createElement(ActionIcon, {
12281
+ rightSection: typeof filterFn == "function" ? /*#__PURE__*/React.createElement(ActionIcon, {
12215
12282
  variant: "transparent",
12216
12283
  onClick: filterFn
12217
12284
  }, /*#__PURE__*/React.createElement(Icons, filterIcon)) : /*#__PURE__*/React.createElement(React.Fragment, null),
@@ -12268,7 +12335,7 @@ const LabelPanel = _ref => {
12268
12335
  radius,
12269
12336
  p
12270
12337
  }), /*#__PURE__*/React.createElement(Stack, {
12271
- pb: 'md'
12338
+ pb: "md"
12272
12339
  }, /*#__PURE__*/React.createElement(Group, {
12273
12340
  justify: "space-between",
12274
12341
  p: 0
@@ -12319,15 +12386,15 @@ const AvatarLabelPanel = _ref2 => {
12319
12386
  py: "sm"
12320
12387
  }, /*#__PURE__*/React.createElement(Box, {
12321
12388
  w: labelWidth,
12322
- pl: 'md'
12389
+ pl: "md"
12323
12390
  }, /*#__PURE__*/React.createElement(Avatar, {
12324
12391
  size: avatarSize,
12325
12392
  src: avatar,
12326
- radius: 'md',
12393
+ radius: "md",
12327
12394
  key: name,
12328
12395
  name: name,
12329
12396
  color: "initials",
12330
- bd: '0.5px solid adiba.2'
12397
+ bd: "0.5px solid adiba.2"
12331
12398
  })), /*#__PURE__*/React.createElement(Stack, {
12332
12399
  py: 10,
12333
12400
  gap: "md",
@@ -12365,7 +12432,7 @@ const SimpleText = _ref => {
12365
12432
  } = _ref;
12366
12433
  return /*#__PURE__*/React.createElement(Text, _extends({
12367
12434
  fw: 300,
12368
- fz: smaller ? '90%' : undefined
12435
+ fz: smaller ? "90%" : undefined
12369
12436
  }, rest), label);
12370
12437
  };
12371
12438
 
@@ -12400,8 +12467,10 @@ const PageTitle = _ref => {
12400
12467
  rightsection = /*#__PURE__*/React.createElement(SegmentedControl, {
12401
12468
  size: "sm",
12402
12469
  bg: "white",
12403
- color: 'adiba',
12404
- data: switcher.items
12470
+ color: "adiba",
12471
+ data: switcher.items,
12472
+ value: switcher.value,
12473
+ onChange: switcher.onChange
12405
12474
  });
12406
12475
  }
12407
12476
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Group, {
@@ -12444,7 +12513,7 @@ const TitleWithIndex = _ref => {
12444
12513
  errorFn = () => void 0
12445
12514
  } = _ref;
12446
12515
  return /*#__PURE__*/React.createElement(Group, null, /*#__PURE__*/React.createElement(Group, {
12447
- gap: 'xs'
12516
+ gap: "xs"
12448
12517
  }, /*#__PURE__*/React.createElement(Title, {
12449
12518
  order: 3,
12450
12519
  fw: 500
@@ -12513,7 +12582,7 @@ const ConnectionPanelDetail = _ref => {
12513
12582
  fz: "xs"
12514
12583
  }, label), /*#__PURE__*/React.createElement(Text, {
12515
12584
  fw: 300,
12516
- fz: 'sm',
12585
+ fz: "sm",
12517
12586
  c: altColor
12518
12587
  }, value));
12519
12588
  };
@@ -12639,9 +12708,9 @@ const ApplicationPanelFeatures = _ref => {
12639
12708
  stroke: 1.5
12640
12709
  })), /*#__PURE__*/React.createElement(Text, {
12641
12710
  fw: 300,
12642
- c: 'altiba',
12643
- size: '12px',
12644
- w: '90%',
12711
+ c: "altiba",
12712
+ size: "12px",
12713
+ w: "90%",
12645
12714
  truncate: true
12646
12715
  }, label));
12647
12716
  };
@@ -12689,7 +12758,8 @@ const ApplicationPanel = _ref => {
12689
12758
  variant: "outline"
12690
12759
  }, discount)), /*#__PURE__*/React.createElement(Text, {
12691
12760
  fw: 300,
12692
- fz: "sm"
12761
+ fz: "sm",
12762
+ lineClamp: 3
12693
12763
  }, summary))), /*#__PURE__*/React.createElement(Card.Section, {
12694
12764
  p: "md",
12695
12765
  pt: 0
@@ -12757,8 +12827,8 @@ const SubscriptionPlans = _ref => {
12757
12827
  altColor = "altiba.3",
12758
12828
  durationDays,
12759
12829
  planPrice,
12760
- buttonLabel = 'Pay Early',
12761
- altButtonLabel = 'Pay Now',
12830
+ buttonLabel = "Pay Early",
12831
+ altButtonLabel = "Pay Now",
12762
12832
  onClick
12763
12833
  } = _ref;
12764
12834
  const price = planPrice.split("/");
@@ -12933,7 +13003,7 @@ const SimpleBody = _ref => {
12933
13003
  const columnIndex = column.id;
12934
13004
  return /*#__PURE__*/React.createElement(Table.Td, {
12935
13005
  key: idx
12936
- }, typeof row[columnIndex] === 'function' ? row[columnIndex](`${index}`) : row[columnIndex] || "");
13006
+ }, typeof row[columnIndex] === "function" ? row[columnIndex](`${index}`) : row[columnIndex] || "");
12937
13007
  }));
12938
13008
  };
12939
13009
 
@@ -12966,7 +13036,7 @@ const SimpleTable = _ref => {
12966
13036
  verticalSpacing: "md"
12967
13037
  };
12968
13038
  return /*#__PURE__*/React.createElement(Table, isStriped && isStripedProps, /*#__PURE__*/React.createElement(Table.Thead, null, /*#__PURE__*/React.createElement(Table.Tr, {
12969
- bg: isStriped ? 'gray.1' : 'transparent'
13039
+ bg: isStriped ? "gray.1" : "transparent"
12970
13040
  }, columns.map((column, index) => {
12971
13041
  return /*#__PURE__*/React.createElement(SimpleHeader, _extends({
12972
13042
  key: `column-${index}`
@@ -13026,7 +13096,7 @@ const File = _ref => {
13026
13096
  p: isChip ? "xs" : undefined
13027
13097
  }, /*#__PURE__*/React.createElement(Group, {
13028
13098
  justify: isChip ? "space-between" : undefined,
13029
- gap: 'xs'
13099
+ gap: "xs"
13030
13100
  }, /*#__PURE__*/React.createElement(Image, {
13031
13101
  p: isChip ? undefined : "xs",
13032
13102
  pr: 2,
@@ -13126,7 +13196,7 @@ const SimpleModal = _ref => {
13126
13196
  }, /*#__PURE__*/React.createElement(Title, {
13127
13197
  order: 3,
13128
13198
  fw: 500,
13129
- lh: '40px'
13199
+ lh: "40px"
13130
13200
  }, innerProps.title), /*#__PURE__*/React.createElement(React.Fragment, null, innerProps.modalBody)));
13131
13201
  };
13132
13202
 
@@ -13214,7 +13284,7 @@ const Drawer = _ref => {
13214
13284
  transition: "slide-left"
13215
13285
  }
13216
13286
  }, /*#__PURE__*/React.createElement(Drawer$1.Overlay, null), /*#__PURE__*/React.createElement(Drawer$1.Content, null, /*#__PURE__*/React.createElement(Drawer$1.Header, null, /*#__PURE__*/React.createElement(Drawer$1.Title, {
13217
- fz: 'lg',
13287
+ fz: "lg",
13218
13288
  fw: "400"
13219
13289
  }, title), /*#__PURE__*/React.createElement(Drawer$1.CloseButton, {
13220
13290
  icon: /*#__PURE__*/React.createElement(Icons, {
@@ -1,3 +1,5 @@
1
1
  import React from "react";
2
- import { SimpleAreaChartProps } from "./Area.types";
2
+ import { SimpleAreaChartProps, MultiAxisAreaChartProps, StackedAreaChartProps } from "./Area.types";
3
3
  export declare const SimpleArea: React.FC<SimpleAreaChartProps>;
4
+ export declare const MultiAxisArea: React.FC<MultiAxisAreaChartProps>;
5
+ export declare const StackedArea: React.FC<StackedAreaChartProps>;
@@ -1,2 +1,2 @@
1
- import { AreaChartConfig, AreaChartProps } from './Area.types';
2
- export declare const initChart: (props: AreaChartProps) => AreaChartConfig;
1
+ import { AreaChartConfig, AreaChartProps, MultiAxisAreaChartProps, StackedAreaChartProps } from "./Area.types";
2
+ export declare const initChart: (props: AreaChartProps | MultiAxisAreaChartProps | StackedAreaChartProps) => AreaChartConfig;
@@ -4,3 +4,5 @@ import { SimpleArea } from "./Area";
4
4
  declare const _default: Meta<typeof SimpleArea>;
5
5
  export default _default;
6
6
  export declare const SimpleAreaChart: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./Area.types").SimpleAreaChartProps>;
7
+ export declare const MultiAxisAreaChart: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./Area.types").MultiAxisAreaChartProps>;
8
+ export declare const StackedAreaChart: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./Area.types").StackedAreaChartProps>;
@@ -17,6 +17,11 @@ export interface AreaChartProps {
17
17
  series: number[][];
18
18
  withLegend: boolean;
19
19
  withCrossHair: boolean;
20
+ legendPosition?: {
21
+ align?: "left" | "center" | "right";
22
+ verticalAlign?: "top" | "middle" | "bottom";
23
+ };
24
+ showYAxis?: boolean;
20
25
  }
21
26
  export interface SimpleAreaChartProps {
22
27
  bgColor?: string;
@@ -28,6 +33,11 @@ export interface SimpleAreaChartProps {
28
33
  series: number[];
29
34
  withLegend: boolean;
30
35
  withCrossHair: boolean;
36
+ legendPosition?: {
37
+ align?: "left" | "center" | "right";
38
+ verticalAlign?: "top" | "middle" | "bottom";
39
+ };
40
+ showYAxis?: boolean;
31
41
  }
32
42
  export interface ChartSeriesArea {
33
43
  xAxis: {
@@ -46,7 +56,13 @@ export interface ChartSeriesArea {
46
56
  gridLineDashStyle?: string;
47
57
  gridLineWidth?: number;
48
58
  labels: object;
49
- };
59
+ } | Array<{
60
+ allowDecimals: boolean;
61
+ title: object;
62
+ gridLineDashStyle?: string;
63
+ gridLineWidth?: number;
64
+ labels: object;
65
+ }>;
50
66
  series: AreaChartSeries[];
51
67
  plotOptions: object;
52
68
  }
@@ -56,4 +72,49 @@ export interface AreaChartSeries {
56
72
  color: string;
57
73
  enableMouseTracking?: boolean;
58
74
  showInLegend?: boolean;
75
+ yAxis?: number;
76
+ }
77
+ export interface MultiAxisAreaChartProps {
78
+ bgColor?: string;
79
+ plotBgColor?: string;
80
+ colors?: string[];
81
+ title?: string;
82
+ xAxisLabel: string[];
83
+ yAxisLabel: string[];
84
+ series: number[][];
85
+ withLegend: boolean;
86
+ withCrossHair: boolean;
87
+ legendPosition?: {
88
+ align?: "left" | "center" | "right";
89
+ verticalAlign?: "top" | "middle" | "bottom";
90
+ };
91
+ showYAxis?: boolean | boolean[];
92
+ aggregator?: "sum" | "average";
93
+ yAxisConfig?: Array<{
94
+ title?: string;
95
+ allowDecimals?: boolean;
96
+ gridLineDashStyle?: string;
97
+ gridLineWidth?: number;
98
+ labels?: {
99
+ color?: string;
100
+ formatter?: (ctx: any) => string;
101
+ };
102
+ }>;
103
+ }
104
+ export interface StackedAreaChartProps {
105
+ bgColor?: string;
106
+ plotBgColor?: string;
107
+ colors?: string[];
108
+ title?: string;
109
+ xAxisLabel: string[];
110
+ yAxisLabel: string[];
111
+ series: number[][];
112
+ withLegend: boolean;
113
+ withCrossHair: boolean;
114
+ legendPosition?: {
115
+ align?: "left" | "center" | "right";
116
+ verticalAlign?: "top" | "middle" | "bottom";
117
+ };
118
+ showYAxis?: boolean;
119
+ aggregator?: "sum" | "average";
59
120
  }
@@ -1,2 +1,2 @@
1
- import { ChartConfig, ChartProps } from './Column.types';
1
+ import { ChartConfig, ChartProps } from "./Column.types";
2
2
  export declare const initChart: (props: ChartProps) => ChartConfig;
@@ -8,6 +8,7 @@ export interface ChartProps {
8
8
  series: number[][];
9
9
  withLegend: boolean;
10
10
  equalizer: boolean;
11
+ inverted?: boolean;
11
12
  }
12
13
  export interface SimpleChartProps {
13
14
  bgColor?: string;
@@ -18,6 +19,7 @@ export interface SimpleChartProps {
18
19
  yAxisLabel: string;
19
20
  series: number[];
20
21
  withLegend: boolean;
22
+ inverted?: boolean;
21
23
  }
22
24
  export interface ChartConfig {
23
25
  chart: object;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { IconsProps } from "./Icons.types";
3
- import './Icons.css';
3
+ import "./Icons.css";
4
4
  export declare const Icons: React.FC<IconsProps>;
@@ -12,7 +12,7 @@ export interface PageTitleProps extends TitleProps {
12
12
  export interface SwitcherProps {
13
13
  items: string[];
14
14
  value?: string;
15
- onChange?: () => void;
15
+ onChange?: (value: string) => void;
16
16
  }
17
17
  export interface BreadCrumbItemProps {
18
18
  name: string;
@@ -1,6 +1,6 @@
1
1
  import { ApplicationMenu } from "./Application";
2
2
  import { Meta } from "@storybook/react";
3
- import '@mantine/core/styles.css';
3
+ import "@mantine/core/styles.css";
4
4
  declare const _default: Meta<typeof ApplicationMenu>;
5
5
  export default _default;
6
6
  export declare const ApplicationMenuExample: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./Application.types").ApplicationMenuProps>;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { SideMenuProps } from "./Side.types";
3
- import './Side.css';
3
+ import "./Side.css";
4
4
  export declare const SideMenu: React.FC<SideMenuProps>;
@@ -1,6 +1,6 @@
1
1
  import { Meta } from "@storybook/react";
2
2
  import { UserMenu } from "./User";
3
- import '@mantine/core/styles.css';
3
+ import "@mantine/core/styles.css";
4
4
  declare const _default: Meta<typeof UserMenu>;
5
5
  export default _default;
6
6
  export declare const UserMenuExample: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./User.types").UsermenuProps>;
@@ -1,2 +1,2 @@
1
1
  import { BackofficeConfirmModalProps } from "./Confim.types";
2
- export declare const ConfirmModal: ({ children, loading }: BackofficeConfirmModalProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const ConfirmModal: ({ children, loading, }: BackofficeConfirmModalProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { Meta } from "@storybook/react";
2
2
  import { ConfirmModal } from "./Confim";
3
- import '@mantine/core/styles.css';
3
+ import "@mantine/core/styles.css";
4
4
  declare const _default: Meta<typeof ConfirmModal>;
5
5
  export default _default;
6
6
  export declare const ConfirmModalExample: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./Confim.types").BackofficeConfirmModalProps>;
@@ -5,7 +5,7 @@ export interface SubscriptionPlanProps {
5
5
  altColor: MantineColor;
6
6
  durationDays: number;
7
7
  planPrice: string;
8
- onClick: (event: any) => void;
8
+ onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
9
9
  buttonLabel?: string;
10
10
  altButtonLabel?: string;
11
11
  }
@@ -1,5 +1,5 @@
1
1
  import { AlertProps, DrawerProps, ModalProps, NotificationProps, ButtonProps } from "@mantine/core";
2
- import { PageTitleProps } from '../../components/general/title/Title.types';
2
+ import { PageTitleProps } from "../../components/general/title/Title.types";
3
3
  export interface DrawerActionProps {
4
4
  title: string;
5
5
  page: React.ReactNode;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adiba-banking-cloud/backoffice",
3
3
  "author": "TUROG Technologies",
4
- "version": "0.0.96",
4
+ "version": "0.0.98",
5
5
  "description": "An ADIBA component library for backoffice and dashboard applications",
6
6
  "license": "ISC",
7
7
  "main": "build/index.cjs.js",