@adiba-banking-cloud/backoffice 0.0.26 → 0.0.28

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.
@@ -12062,6 +12062,73 @@ const PageTitle = _ref => {
12062
12062
  }))), /*#__PURE__*/React.createElement(React.Fragment, null, rightsection)));
12063
12063
  };
12064
12064
 
12065
+ const TitleWithIndex = _ref => {
12066
+ let {
12067
+ title,
12068
+ growth,
12069
+ subtitle,
12070
+ hasError,
12071
+ errorLabel,
12072
+ errorFn = () => void 0
12073
+ } = _ref;
12074
+ return /*#__PURE__*/React.createElement(core.Group, null, /*#__PURE__*/React.createElement(core.Group, {
12075
+ gap: 'xs'
12076
+ }, /*#__PURE__*/React.createElement(core.Title, {
12077
+ order: 3,
12078
+ fw: 500
12079
+ }, title), /*#__PURE__*/React.createElement(Growth, growth), /*#__PURE__*/React.createElement(core.Text, {
12080
+ c: "dimmed",
12081
+ size: "xs",
12082
+ fw: 300
12083
+ }, subtitle)), /*#__PURE__*/React.createElement(core.Space, {
12084
+ flex: 1
12085
+ }), /*#__PURE__*/React.createElement(core.Box, {
12086
+ hidden: !hasError
12087
+ }, /*#__PURE__*/React.createElement(WidgetError, {
12088
+ errorLabel: errorLabel,
12089
+ errorFn: errorFn
12090
+ })));
12091
+ };
12092
+ const Growth = _ref2 => {
12093
+ let {
12094
+ text,
12095
+ direction
12096
+ } = _ref2;
12097
+ const color = direction === "up" ? "rgb(64, 192, 87)" : "rgb(250,82,82)";
12098
+ const name = direction === "up" ? "TrendUp" : "TrendDown";
12099
+ return /*#__PURE__*/React.createElement(core.Group, {
12100
+ c: color,
12101
+ gap: 2
12102
+ }, /*#__PURE__*/React.createElement(Icons, {
12103
+ name: name,
12104
+ color: color,
12105
+ size: 12,
12106
+ stroke: 2.5,
12107
+ variant: "Bold"
12108
+ }), /*#__PURE__*/React.createElement(core.Text, {
12109
+ size: "xs",
12110
+ fw: 500
12111
+ }, text));
12112
+ };
12113
+ const WidgetError = _ref3 => {
12114
+ let {
12115
+ errorLabel,
12116
+ errorFn
12117
+ } = _ref3;
12118
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(core.Button, {
12119
+ size: "sm",
12120
+ variant: "transparent",
12121
+ leftSection: /*#__PURE__*/React.createElement(Icons, {
12122
+ name: "Danger",
12123
+ color: "rgb(250,82,82",
12124
+ stroke: 1.5
12125
+ }),
12126
+ onClick: errorFn,
12127
+ fw: 300,
12128
+ c: "rgb(250,82,82"
12129
+ }, errorLabel));
12130
+ };
12131
+
12065
12132
  const ConnectionPanelDetail = _ref => {
12066
12133
  let {
12067
12134
  label,
@@ -12228,6 +12295,7 @@ const ApplicationPanel = _ref => {
12228
12295
  ratio: 3 / 2
12229
12296
  }, /*#__PURE__*/React.createElement(core.Image, {
12230
12297
  alt: name,
12298
+ src: coverImage,
12231
12299
  fallbackSrc: img$a
12232
12300
  }), /*#__PURE__*/React.createElement(core.Overlay, {
12233
12301
  gradient: "linear-gradient(45deg, rgba(255,255,255,0.25) 0%,rgba(255,255,255,0.1) 100%)"
@@ -12241,7 +12309,7 @@ const ApplicationPanel = _ref => {
12241
12309
  fw: 400
12242
12310
  }, name), /*#__PURE__*/React.createElement(core.Badge, {
12243
12311
  style: {
12244
- display: String(discount).length < 1 ? "none" : "block"
12312
+ display: String(discount).length > 1 ? "block" : "none"
12245
12313
  },
12246
12314
  fw: 300,
12247
12315
  variant: "outline"
@@ -12614,6 +12682,7 @@ exports.SimpleTable = SimpleTable;
12614
12682
  exports.SimpleText = SimpleText;
12615
12683
  exports.StackedColumn = StackedColumn;
12616
12684
  exports.SubscriptionPlans = SubscriptionPlans;
12685
+ exports.TitleWithIndex = TitleWithIndex;
12617
12686
  exports.TitledPanel = TitledPanel;
12618
12687
  exports.UserMenu = UserMenu;
12619
12688
  exports.theme = theme;
@@ -12041,6 +12041,73 @@ const PageTitle = _ref => {
12041
12041
  }))), /*#__PURE__*/React.createElement(React.Fragment, null, rightsection)));
12042
12042
  };
12043
12043
 
12044
+ const TitleWithIndex = _ref => {
12045
+ let {
12046
+ title,
12047
+ growth,
12048
+ subtitle,
12049
+ hasError,
12050
+ errorLabel,
12051
+ errorFn = () => void 0
12052
+ } = _ref;
12053
+ return /*#__PURE__*/React.createElement(Group, null, /*#__PURE__*/React.createElement(Group, {
12054
+ gap: 'xs'
12055
+ }, /*#__PURE__*/React.createElement(Title, {
12056
+ order: 3,
12057
+ fw: 500
12058
+ }, title), /*#__PURE__*/React.createElement(Growth, growth), /*#__PURE__*/React.createElement(Text, {
12059
+ c: "dimmed",
12060
+ size: "xs",
12061
+ fw: 300
12062
+ }, subtitle)), /*#__PURE__*/React.createElement(Space, {
12063
+ flex: 1
12064
+ }), /*#__PURE__*/React.createElement(Box, {
12065
+ hidden: !hasError
12066
+ }, /*#__PURE__*/React.createElement(WidgetError, {
12067
+ errorLabel: errorLabel,
12068
+ errorFn: errorFn
12069
+ })));
12070
+ };
12071
+ const Growth = _ref2 => {
12072
+ let {
12073
+ text,
12074
+ direction
12075
+ } = _ref2;
12076
+ const color = direction === "up" ? "rgb(64, 192, 87)" : "rgb(250,82,82)";
12077
+ const name = direction === "up" ? "TrendUp" : "TrendDown";
12078
+ return /*#__PURE__*/React.createElement(Group, {
12079
+ c: color,
12080
+ gap: 2
12081
+ }, /*#__PURE__*/React.createElement(Icons, {
12082
+ name: name,
12083
+ color: color,
12084
+ size: 12,
12085
+ stroke: 2.5,
12086
+ variant: "Bold"
12087
+ }), /*#__PURE__*/React.createElement(Text, {
12088
+ size: "xs",
12089
+ fw: 500
12090
+ }, text));
12091
+ };
12092
+ const WidgetError = _ref3 => {
12093
+ let {
12094
+ errorLabel,
12095
+ errorFn
12096
+ } = _ref3;
12097
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
12098
+ size: "sm",
12099
+ variant: "transparent",
12100
+ leftSection: /*#__PURE__*/React.createElement(Icons, {
12101
+ name: "Danger",
12102
+ color: "rgb(250,82,82",
12103
+ stroke: 1.5
12104
+ }),
12105
+ onClick: errorFn,
12106
+ fw: 300,
12107
+ c: "rgb(250,82,82"
12108
+ }, errorLabel));
12109
+ };
12110
+
12044
12111
  const ConnectionPanelDetail = _ref => {
12045
12112
  let {
12046
12113
  label,
@@ -12207,6 +12274,7 @@ const ApplicationPanel = _ref => {
12207
12274
  ratio: 3 / 2
12208
12275
  }, /*#__PURE__*/React.createElement(Image, {
12209
12276
  alt: name,
12277
+ src: coverImage,
12210
12278
  fallbackSrc: img$a
12211
12279
  }), /*#__PURE__*/React.createElement(Overlay, {
12212
12280
  gradient: "linear-gradient(45deg, rgba(255,255,255,0.25) 0%,rgba(255,255,255,0.1) 100%)"
@@ -12220,7 +12288,7 @@ const ApplicationPanel = _ref => {
12220
12288
  fw: 400
12221
12289
  }, name), /*#__PURE__*/React.createElement(Badge, {
12222
12290
  style: {
12223
- display: String(discount).length < 1 ? "none" : "block"
12291
+ display: String(discount).length > 1 ? "block" : "none"
12224
12292
  },
12225
12293
  fw: 300,
12226
12294
  variant: "outline"
@@ -12572,4 +12640,4 @@ const File = _ref => {
12572
12640
  }, /*#__PURE__*/React.createElement(Icons, rightsection === null || rightsection === void 0 ? void 0 : rightsection.icon)) : undefined)));
12573
12641
  };
12574
12642
 
12575
- export { ApplicationMenu, ApplicationPanel, AvatarLabelPanel, ConnectionPanel, DynamicLogo, DynamicShigaLogo, EqualizerColumn, File, Icons, LabelPanel, PageTitle, PaymentMethod, PaymentMethodAdd, SearchPanel, SideMenu, SimpleColumn, SimplePanel, SimpleTable, SimpleText, StackedColumn, SubscriptionPlans, TitledPanel, UserMenu, theme };
12643
+ export { ApplicationMenu, ApplicationPanel, AvatarLabelPanel, ConnectionPanel, DynamicLogo, DynamicShigaLogo, EqualizerColumn, File, Icons, LabelPanel, PageTitle, PaymentMethod, PaymentMethodAdd, SearchPanel, SideMenu, SimpleColumn, SimplePanel, SimpleTable, SimpleText, StackedColumn, SubscriptionPlans, TitleWithIndex, TitledPanel, UserMenu, theme };
@@ -8,6 +8,7 @@ export { SimplePanel, SearchPanel, TitledPanel } from "./panels/simple/Simple";
8
8
  export { LabelPanel, AvatarLabelPanel } from "./panels/label/Label";
9
9
  export { SimpleText } from "./general/text/Text";
10
10
  export { PageTitle } from "./general/title/Title";
11
+ export { TitleWithIndex } from "./general/title/TitleWithIndex";
11
12
  export { ConnectionPanel } from "./panels/connection/Connection";
12
13
  export { ApplicationPanel } from "./panels/application/Application";
13
14
  export { SubscriptionPlans } from "./widgets/subscription_plan/SubscriptionPlan";
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.26",
4
+ "version": "0.0.28",
5
5
  "description": "An ADIBA component library for backoffice and dashboard applications",
6
6
  "license": "ISC",
7
7
  "main": "build/index.cjs.js",