@adiba-banking-cloud/backoffice 0.0.68 → 0.0.70
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.
|
@@ -12395,31 +12395,31 @@ const theme = core.createTheme({
|
|
|
12395
12395
|
}
|
|
12396
12396
|
});
|
|
12397
12397
|
|
|
12398
|
-
const _excluded$6 = ["
|
|
12398
|
+
const _excluded$6 = ["createFn", "icon", "label"];
|
|
12399
12399
|
const PageTitle = _ref => {
|
|
12400
12400
|
var _switcher$items;
|
|
12401
12401
|
let {
|
|
12402
|
-
|
|
12403
|
-
|
|
12404
|
-
|
|
12405
|
-
|
|
12406
|
-
|
|
12407
|
-
|
|
12408
|
-
|
|
12409
|
-
|
|
12410
|
-
rest = _objectWithoutProperties(_ref, _excluded$6);
|
|
12402
|
+
title,
|
|
12403
|
+
subtitle = "",
|
|
12404
|
+
rightsection,
|
|
12405
|
+
withCreate,
|
|
12406
|
+
withSwitcher,
|
|
12407
|
+
create,
|
|
12408
|
+
switcher
|
|
12409
|
+
} = _ref;
|
|
12411
12410
|
if (withCreate && create) {
|
|
12412
12411
|
const {
|
|
12413
|
-
|
|
12414
|
-
|
|
12415
|
-
|
|
12416
|
-
|
|
12417
|
-
|
|
12412
|
+
createFn,
|
|
12413
|
+
icon,
|
|
12414
|
+
label
|
|
12415
|
+
} = create,
|
|
12416
|
+
rest = _objectWithoutProperties(create, _excluded$6);
|
|
12417
|
+
rightsection = /*#__PURE__*/React.createElement(core.Button, _extends({
|
|
12418
12418
|
radius: "md",
|
|
12419
12419
|
size: "sm",
|
|
12420
12420
|
leftSection: /*#__PURE__*/React.createElement(Icons, icon),
|
|
12421
12421
|
onClick: createFn
|
|
12422
|
-
}, /*#__PURE__*/React.createElement(core.Text, {
|
|
12422
|
+
}, rest), /*#__PURE__*/React.createElement(core.Text, {
|
|
12423
12423
|
fw: 300,
|
|
12424
12424
|
fz: 14
|
|
12425
12425
|
}, label));
|
|
@@ -12427,6 +12427,8 @@ const PageTitle = _ref => {
|
|
|
12427
12427
|
if (withSwitcher && switcher !== null && switcher !== void 0 && (_switcher$items = switcher.items) !== null && _switcher$items !== void 0 && _switcher$items.length) {
|
|
12428
12428
|
rightsection = /*#__PURE__*/React.createElement(core.SegmentedControl, {
|
|
12429
12429
|
size: "sm",
|
|
12430
|
+
bg: "white",
|
|
12431
|
+
bd: "1px solid gray.3",
|
|
12430
12432
|
color: theme.primaryColor,
|
|
12431
12433
|
data: switcher.items
|
|
12432
12434
|
});
|
|
@@ -12436,10 +12438,10 @@ const PageTitle = _ref => {
|
|
|
12436
12438
|
py: "lg"
|
|
12437
12439
|
}, /*#__PURE__*/React.createElement(core.Stack, {
|
|
12438
12440
|
gap: 4
|
|
12439
|
-
}, /*#__PURE__*/React.createElement(core.Title,
|
|
12441
|
+
}, /*#__PURE__*/React.createElement(core.Title, {
|
|
12440
12442
|
order: 2,
|
|
12441
12443
|
fw: 500
|
|
12442
|
-
},
|
|
12444
|
+
}, title), typeof subtitle == "string" ? /*#__PURE__*/React.createElement(core.Text, {
|
|
12443
12445
|
fz: 14,
|
|
12444
12446
|
fw: 300
|
|
12445
12447
|
}, subtitle) : /*#__PURE__*/React.createElement(core.Breadcrumbs, {
|
|
@@ -12456,7 +12458,7 @@ const PageTitle = _ref => {
|
|
|
12456
12458
|
fz: 14,
|
|
12457
12459
|
key: index,
|
|
12458
12460
|
fw: 300,
|
|
12459
|
-
c:
|
|
12461
|
+
c: "dimmed"
|
|
12460
12462
|
}, item.name);
|
|
12461
12463
|
}))), /*#__PURE__*/React.createElement(React.Fragment, null, rightsection)));
|
|
12462
12464
|
};
|
|
@@ -13270,7 +13272,8 @@ const SimpleForm = _ref => {
|
|
|
13270
13272
|
c: "adiba.5"
|
|
13271
13273
|
},
|
|
13272
13274
|
readOnly: !isEditable,
|
|
13273
|
-
variant: !isEditable ? "unstyled" : "default"
|
|
13275
|
+
variant: !isEditable ? "unstyled" : "default",
|
|
13276
|
+
required: true
|
|
13274
13277
|
};
|
|
13275
13278
|
return /*#__PURE__*/React.createElement(core.Grid, null, fields.map((field, index) => {
|
|
13276
13279
|
if (typeof field === "string") {
|
|
@@ -13286,18 +13289,18 @@ const SimpleForm = _ref => {
|
|
|
13286
13289
|
}, field());
|
|
13287
13290
|
}
|
|
13288
13291
|
if (["Textarea", "TextInput", "PasswordInput", "NumberInput"].includes(field.component)) {
|
|
13289
|
-
var _field$field
|
|
13292
|
+
var _field$field;
|
|
13290
13293
|
const Component = components[field.component];
|
|
13291
13294
|
return /*#__PURE__*/React.createElement(core.Grid.Col, {
|
|
13292
13295
|
key: index,
|
|
13293
13296
|
span: layout[index]
|
|
13294
|
-
}, /*#__PURE__*/React.createElement(Component, _extends({}, field.field, inputProps, santize((_field$field
|
|
13297
|
+
}, /*#__PURE__*/React.createElement(Component, _extends({}, field.field, inputProps, santize((_field$field = field.field) !== null && _field$field !== void 0 ? _field$field : ""))));
|
|
13295
13298
|
}
|
|
13296
13299
|
return null;
|
|
13297
13300
|
}));
|
|
13298
13301
|
};
|
|
13299
13302
|
const santize = field => {
|
|
13300
|
-
var _ref2, _field$
|
|
13303
|
+
var _ref2, _field$label, _field$placeholder, _field$name, _field$name$split$joi, _field$name2;
|
|
13301
13304
|
if (typeof field === "string") {
|
|
13302
13305
|
const name = field === null || field === void 0 ? void 0 : field.split(" ").join("_").toLowerCase();
|
|
13303
13306
|
return {
|
|
@@ -13307,9 +13310,9 @@ const santize = field => {
|
|
|
13307
13310
|
};
|
|
13308
13311
|
}
|
|
13309
13312
|
return {
|
|
13310
|
-
label: "".concat((_ref2 = (_field$
|
|
13311
|
-
placeholder: (_field$
|
|
13312
|
-
name: (_field$
|
|
13313
|
+
label: "".concat((_ref2 = (_field$label = field === null || field === void 0 ? void 0 : field.label) !== null && _field$label !== void 0 ? _field$label : field === null || field === void 0 ? void 0 : field.name) !== null && _ref2 !== void 0 ? _ref2 : ""),
|
|
13314
|
+
placeholder: (_field$placeholder = field.placeholder) !== null && _field$placeholder !== void 0 ? _field$placeholder : "Please enter ".concat((_field$name = field.name) === null || _field$name === void 0 ? void 0 : _field$name.toLowerCase()),
|
|
13315
|
+
name: (_field$name$split$joi = (_field$name2 = field.name) === null || _field$name2 === void 0 ? void 0 : _field$name2.split(" ").join("_").toLowerCase()) !== null && _field$name$split$joi !== void 0 ? _field$name$split$joi : ""
|
|
13313
13316
|
};
|
|
13314
13317
|
};
|
|
13315
13318
|
|
|
@@ -12374,31 +12374,31 @@ const theme = createTheme({
|
|
|
12374
12374
|
}
|
|
12375
12375
|
});
|
|
12376
12376
|
|
|
12377
|
-
const _excluded$6 = ["
|
|
12377
|
+
const _excluded$6 = ["createFn", "icon", "label"];
|
|
12378
12378
|
const PageTitle = _ref => {
|
|
12379
12379
|
var _switcher$items;
|
|
12380
12380
|
let {
|
|
12381
|
-
|
|
12382
|
-
|
|
12383
|
-
|
|
12384
|
-
|
|
12385
|
-
|
|
12386
|
-
|
|
12387
|
-
|
|
12388
|
-
|
|
12389
|
-
rest = _objectWithoutProperties(_ref, _excluded$6);
|
|
12381
|
+
title,
|
|
12382
|
+
subtitle = "",
|
|
12383
|
+
rightsection,
|
|
12384
|
+
withCreate,
|
|
12385
|
+
withSwitcher,
|
|
12386
|
+
create,
|
|
12387
|
+
switcher
|
|
12388
|
+
} = _ref;
|
|
12390
12389
|
if (withCreate && create) {
|
|
12391
12390
|
const {
|
|
12392
|
-
|
|
12393
|
-
|
|
12394
|
-
|
|
12395
|
-
|
|
12396
|
-
|
|
12391
|
+
createFn,
|
|
12392
|
+
icon,
|
|
12393
|
+
label
|
|
12394
|
+
} = create,
|
|
12395
|
+
rest = _objectWithoutProperties(create, _excluded$6);
|
|
12396
|
+
rightsection = /*#__PURE__*/React.createElement(Button, _extends({
|
|
12397
12397
|
radius: "md",
|
|
12398
12398
|
size: "sm",
|
|
12399
12399
|
leftSection: /*#__PURE__*/React.createElement(Icons, icon),
|
|
12400
12400
|
onClick: createFn
|
|
12401
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
12401
|
+
}, rest), /*#__PURE__*/React.createElement(Text, {
|
|
12402
12402
|
fw: 300,
|
|
12403
12403
|
fz: 14
|
|
12404
12404
|
}, label));
|
|
@@ -12406,6 +12406,8 @@ const PageTitle = _ref => {
|
|
|
12406
12406
|
if (withSwitcher && switcher !== null && switcher !== void 0 && (_switcher$items = switcher.items) !== null && _switcher$items !== void 0 && _switcher$items.length) {
|
|
12407
12407
|
rightsection = /*#__PURE__*/React.createElement(SegmentedControl, {
|
|
12408
12408
|
size: "sm",
|
|
12409
|
+
bg: "white",
|
|
12410
|
+
bd: "1px solid gray.3",
|
|
12409
12411
|
color: theme.primaryColor,
|
|
12410
12412
|
data: switcher.items
|
|
12411
12413
|
});
|
|
@@ -12415,10 +12417,10 @@ const PageTitle = _ref => {
|
|
|
12415
12417
|
py: "lg"
|
|
12416
12418
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
12417
12419
|
gap: 4
|
|
12418
|
-
}, /*#__PURE__*/React.createElement(Title,
|
|
12420
|
+
}, /*#__PURE__*/React.createElement(Title, {
|
|
12419
12421
|
order: 2,
|
|
12420
12422
|
fw: 500
|
|
12421
|
-
},
|
|
12423
|
+
}, title), typeof subtitle == "string" ? /*#__PURE__*/React.createElement(Text, {
|
|
12422
12424
|
fz: 14,
|
|
12423
12425
|
fw: 300
|
|
12424
12426
|
}, subtitle) : /*#__PURE__*/React.createElement(Breadcrumbs, {
|
|
@@ -12435,7 +12437,7 @@ const PageTitle = _ref => {
|
|
|
12435
12437
|
fz: 14,
|
|
12436
12438
|
key: index,
|
|
12437
12439
|
fw: 300,
|
|
12438
|
-
c:
|
|
12440
|
+
c: "dimmed"
|
|
12439
12441
|
}, item.name);
|
|
12440
12442
|
}))), /*#__PURE__*/React.createElement(React.Fragment, null, rightsection)));
|
|
12441
12443
|
};
|
|
@@ -13249,7 +13251,8 @@ const SimpleForm = _ref => {
|
|
|
13249
13251
|
c: "adiba.5"
|
|
13250
13252
|
},
|
|
13251
13253
|
readOnly: !isEditable,
|
|
13252
|
-
variant: !isEditable ? "unstyled" : "default"
|
|
13254
|
+
variant: !isEditable ? "unstyled" : "default",
|
|
13255
|
+
required: true
|
|
13253
13256
|
};
|
|
13254
13257
|
return /*#__PURE__*/React.createElement(Grid, null, fields.map((field, index) => {
|
|
13255
13258
|
if (typeof field === "string") {
|
|
@@ -13265,18 +13268,18 @@ const SimpleForm = _ref => {
|
|
|
13265
13268
|
}, field());
|
|
13266
13269
|
}
|
|
13267
13270
|
if (["Textarea", "TextInput", "PasswordInput", "NumberInput"].includes(field.component)) {
|
|
13268
|
-
var _field$field
|
|
13271
|
+
var _field$field;
|
|
13269
13272
|
const Component = components[field.component];
|
|
13270
13273
|
return /*#__PURE__*/React.createElement(Grid.Col, {
|
|
13271
13274
|
key: index,
|
|
13272
13275
|
span: layout[index]
|
|
13273
|
-
}, /*#__PURE__*/React.createElement(Component, _extends({}, field.field, inputProps, santize((_field$field
|
|
13276
|
+
}, /*#__PURE__*/React.createElement(Component, _extends({}, field.field, inputProps, santize((_field$field = field.field) !== null && _field$field !== void 0 ? _field$field : ""))));
|
|
13274
13277
|
}
|
|
13275
13278
|
return null;
|
|
13276
13279
|
}));
|
|
13277
13280
|
};
|
|
13278
13281
|
const santize = field => {
|
|
13279
|
-
var _ref2, _field$
|
|
13282
|
+
var _ref2, _field$label, _field$placeholder, _field$name, _field$name$split$joi, _field$name2;
|
|
13280
13283
|
if (typeof field === "string") {
|
|
13281
13284
|
const name = field === null || field === void 0 ? void 0 : field.split(" ").join("_").toLowerCase();
|
|
13282
13285
|
return {
|
|
@@ -13286,9 +13289,9 @@ const santize = field => {
|
|
|
13286
13289
|
};
|
|
13287
13290
|
}
|
|
13288
13291
|
return {
|
|
13289
|
-
label: "".concat((_ref2 = (_field$
|
|
13290
|
-
placeholder: (_field$
|
|
13291
|
-
name: (_field$
|
|
13292
|
+
label: "".concat((_ref2 = (_field$label = field === null || field === void 0 ? void 0 : field.label) !== null && _field$label !== void 0 ? _field$label : field === null || field === void 0 ? void 0 : field.name) !== null && _ref2 !== void 0 ? _ref2 : ""),
|
|
13293
|
+
placeholder: (_field$placeholder = field.placeholder) !== null && _field$placeholder !== void 0 ? _field$placeholder : "Please enter ".concat((_field$name = field.name) === null || _field$name === void 0 ? void 0 : _field$name.toLowerCase()),
|
|
13294
|
+
name: (_field$name$split$joi = (_field$name2 = field.name) === null || _field$name2 === void 0 ? void 0 : _field$name2.split(" ").join("_").toLowerCase()) !== null && _field$name$split$joi !== void 0 ? _field$name$split$joi : ""
|
|
13292
13295
|
};
|
|
13293
13296
|
};
|
|
13294
13297
|
|
|
@@ -42,7 +42,7 @@ export declare const theme: {
|
|
|
42
42
|
headings?: {
|
|
43
43
|
fontFamily?: string | undefined;
|
|
44
44
|
fontWeight?: string | undefined;
|
|
45
|
-
textWrap?: "
|
|
45
|
+
textWrap?: "nowrap" | "wrap" | "balance" | "pretty" | "stable" | undefined;
|
|
46
46
|
sizes?: {
|
|
47
47
|
h1?: {
|
|
48
48
|
fontSize?: string | undefined;
|
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.
|
|
4
|
+
"version": "0.0.70",
|
|
5
5
|
"description": "An ADIBA component library for backoffice and dashboard applications",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"main": "build/index.cjs.js",
|