@nulogy/components 8.14.5 → 8.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -8543,79 +8543,87 @@
8543
8543
  }
8544
8544
  };
8545
8545
 
8546
- var prefix = "random-id-";
8547
- var randomId = 0;
8548
-
8549
- var generateId = function generateId() {
8550
- randomId += 1;
8551
- return prefix + randomId;
8552
- };
8553
-
8554
- var LoadingIcon = function LoadingIcon(_a) {
8555
- var _a$color = _a.color,
8556
- color = _a$color === void 0 ? "currentColor" : _a$color,
8557
- _a$size = _a.size,
8558
- size = _a$size === void 0 ? "24px" : _a$size;
8559
- _a.title;
8560
- var props = __rest(_a, ["color", "size", "title"]);
8561
-
8562
- var id = generateId();
8563
- return (
8564
- /*#__PURE__*/
8565
- // Modified svg By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL
8566
- React__default["default"].createElement("svg", Object.assign({
8567
- width: size,
8568
- height: size,
8569
- viewBox: "0 0 38 38",
8570
- xmlns: "http://www.w3.org/2000/svg"
8571
- }, props), /*#__PURE__*/React__default["default"].createElement("defs", null, /*#__PURE__*/React__default["default"].createElement("linearGradient", {
8572
- x1: "8.042%",
8573
- y1: "0%",
8574
- x2: "65.682%",
8575
- y2: "23.865%",
8576
- id: id
8577
- }, /*#__PURE__*/React__default["default"].createElement("stop", {
8578
- stopColor: color,
8579
- stopOpacity: "0",
8580
- offset: "0%"
8581
- }), /*#__PURE__*/React__default["default"].createElement("stop", {
8582
- stopColor: color,
8583
- stopOpacity: ".631",
8584
- offset: "63.146%"
8585
- }), /*#__PURE__*/React__default["default"].createElement("stop", {
8586
- stopColor: color,
8587
- offset: "100%"
8588
- }))), /*#__PURE__*/React__default["default"].createElement("g", {
8589
- fill: "none",
8590
- fillRule: "evenodd"
8591
- }, /*#__PURE__*/React__default["default"].createElement("g", {
8592
- transform: "translate(1 1)"
8593
- }, /*#__PURE__*/React__default["default"].createElement("path", {
8594
- d: "M36 18c0-9.94-8.06-18-18-18",
8595
- id: "Oval-2",
8596
- stroke: "url(#" + id + ")",
8597
- strokeWidth: "2"
8598
- }, /*#__PURE__*/React__default["default"].createElement("animateTransform", {
8599
- attributeName: "transform",
8600
- type: "rotate",
8601
- from: "0 18 18",
8602
- to: "360 18 18",
8603
- dur: "0.9s",
8604
- repeatCount: "indefinite"
8605
- })), /*#__PURE__*/React__default["default"].createElement("circle", {
8606
- fill: color,
8607
- cx: "36",
8608
- cy: "18",
8609
- r: "1"
8610
- }, /*#__PURE__*/React__default["default"].createElement("animateTransform", {
8611
- attributeName: "transform",
8612
- type: "rotate",
8613
- from: "0 18 18",
8614
- to: "360 18 18",
8615
- dur: "0.9s",
8616
- repeatCount: "indefinite"
8617
- })))))
8618
- );
8546
+ var LoadingIcon = function LoadingIcon(props) {
8547
+ return /*#__PURE__*/React__default["default"].createElement("svg", Object.assign({
8548
+ viewBox: "0 0 24px 24px",
8549
+ width: "24px",
8550
+ height: "24px",
8551
+ fill: "none",
8552
+ xmlns: "http://www.w3.org/2000/svg",
8553
+ preserveAspectRatio: "xMidYMid"
8554
+ }, props), /*#__PURE__*/React__default["default"].createElement("g", null, /*#__PURE__*/React__default["default"].createElement("circle", {
8555
+ cx: "3.5",
8556
+ cy: "12",
8557
+ fill: "#C0C8D1",
8558
+ "transform-origin": "3.5 3.5"
8559
+ }, /*#__PURE__*/React__default["default"].createElement("animate", {
8560
+ attributeName: "r",
8561
+ values: "3;3;3.5;3",
8562
+ keySplines: "\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;",
8563
+ keyTimes: "0; 0.25;0.4; 1",
8564
+ calcMode: "spline",
8565
+ dur: "0.8s",
8566
+ repeatCount: "indefinite"
8567
+ }), /*#__PURE__*/React__default["default"].createElement("animate", {
8568
+ id: "first",
8569
+ attributeName: "fill",
8570
+ values: "#C0C8D1;#C0C8D1;#434D59;#C0C8D1",
8571
+ keySplines: "\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;",
8572
+ keyTimes: "0; 0.25;0.4; 1",
8573
+ calcMode: "spline",
8574
+ dur: "0.8s",
8575
+ repeatCount: "indefinite"
8576
+ })), /*#__PURE__*/React__default["default"].createElement("circle", {
8577
+ cx: "12",
8578
+ cy: "12",
8579
+ r: "3",
8580
+ fill: "#C0C8D1",
8581
+ "transform-origin": "12 3.5"
8582
+ }, /*#__PURE__*/React__default["default"].createElement("animate", {
8583
+ attributeName: "r",
8584
+ begin: "0.2s; first.begin",
8585
+ values: "3;3;3.5;3",
8586
+ keySplines: "\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;",
8587
+ keyTimes: "0; 0.25;0.4; 1",
8588
+ calcMode: "spline",
8589
+ dur: "0.8s",
8590
+ repeatCount: "indefinite"
8591
+ }), /*#__PURE__*/React__default["default"].createElement("animate", {
8592
+ id: "second",
8593
+ attributeName: "fill",
8594
+ begin: "0.2s; first.begin",
8595
+ values: "#C0C8D1;#C0C8D1;#434D59;#C0C8D1",
8596
+ keySplines: "\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;",
8597
+ keyTimes: "0; 0.25;0.4; 1",
8598
+ calcMode: "spline",
8599
+ dur: "0.8s",
8600
+ repeatCount: "indefinite"
8601
+ })), /*#__PURE__*/React__default["default"].createElement("circle", {
8602
+ cx: "20.5",
8603
+ cy: "12",
8604
+ r: "3",
8605
+ fill: "#C0C8D1",
8606
+ "transform-origin": "20.5 3.5"
8607
+ }, /*#__PURE__*/React__default["default"].createElement("animate", {
8608
+ attributeName: "r",
8609
+ begin: "0.3s; first.begin",
8610
+ values: "3;3;3.5;3",
8611
+ keySplines: "\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;",
8612
+ keyTimes: "0; 0.25;0.4; 1",
8613
+ calcMode: "spline",
8614
+ dur: "0.8s",
8615
+ repeatCount: "indefinite"
8616
+ }), /*#__PURE__*/React__default["default"].createElement("animate", {
8617
+ id: "third",
8618
+ attributeName: "fill",
8619
+ begin: "0.3s; first.begin",
8620
+ values: "#C0C8D1;#C0C8D1;#434D59;#C0C8D1",
8621
+ keySplines: "\n .24 .1 .35 .8;\n .24 .1 .35 .8;\n 0.1 0.8 0.2 1",
8622
+ keyTimes: "0; 0.25;0.4; 1",
8623
+ calcMode: "spline",
8624
+ dur: "0.8s",
8625
+ repeatCount: "indefinite"
8626
+ }))));
8619
8627
  };
8620
8628
 
8621
8629
  /* eslint-disable react/no-array-index-key */
@@ -8646,7 +8654,6 @@
8646
8654
  if (icon === "loading") {
8647
8655
  return /*#__PURE__*/React__default["default"].createElement(LoadingIcon, Object.assign({
8648
8656
  color: Theme.colors[fillColor] ? Theme.colors[fillColor] : fillColor,
8649
- size: space[size] || size,
8650
8657
  className: className
8651
8658
  }, props));
8652
8659
  }
@@ -17633,6 +17640,14 @@
17633
17640
  return parseInt(val1.replace("px", ""), 10) - parseInt(val2Str.replace("px", ""), 10) + "px";
17634
17641
  };
17635
17642
 
17643
+ var prefix = "random-id-";
17644
+ var randomId = 0;
17645
+
17646
+ var generateId = function generateId() {
17647
+ randomId += 1;
17648
+ return prefix + randomId;
17649
+ };
17650
+
17636
17651
  var WindowDimensions = /*#__PURE__*/function (_React$Component) {
17637
17652
  _inheritsLoose__default["default"](WindowDimensions, _React$Component);
17638
17653
 
@@ -50031,7 +50046,7 @@
50031
50046
  quiet: "quiet"
50032
50047
  };
50033
50048
 
50034
- var StatusIndicatorColours = function StatusIndicatorColours(theme) {
50049
+ var statusIndicatorStyles = function statusIndicatorStyles(theme) {
50035
50050
  var _ref;
50036
50051
 
50037
50052
  return _ref = {}, _ref[StatusIndicatorValues.neutral] = {
@@ -50043,7 +50058,8 @@
50043
50058
  backgroundColor: theme.colors.blackBlue,
50044
50059
  color: theme.colors.white
50045
50060
  }, _ref[StatusIndicatorValues.quiet] = {
50046
- borderColor: theme.colors.white,
50061
+ border: "1px solid",
50062
+ borderColor: theme.colors.grey,
50047
50063
  backgroundColor: theme.colors.white,
50048
50064
  color: theme.colors.darkGrey
50049
50065
  }, _ref[StatusIndicatorValues.danger] = {
@@ -50065,10 +50081,6 @@
50065
50081
  }, _ref;
50066
50082
  };
50067
50083
 
50068
- var getStatusIndicatorColours = function getStatusIndicatorColours(type, theme) {
50069
- return StatusIndicatorColours(theme)[type];
50070
- };
50071
-
50072
50084
  var StatusIndicator = styled__default["default"].span.withConfig({
50073
50085
  displayName: "StatusIndicator",
50074
50086
  componentId: "sc-17eyafq-0"
@@ -50081,7 +50093,7 @@
50081
50093
  textTransform: "uppercase",
50082
50094
  letterSpacing: ".05em",
50083
50095
  borderRadius: theme.space.x1
50084
- }, getStatusIndicatorColours(type, theme));
50096
+ }, statusIndicatorStyles(theme)[type]);
50085
50097
  });
50086
50098
  StatusIndicator.defaultProps = {
50087
50099
  type: StatusIndicatorValues.neutral,
@@ -8520,79 +8520,87 @@ var Theme = {
8520
8520
  }
8521
8521
  };
8522
8522
 
8523
- var prefix = "random-id-";
8524
- var randomId = 0;
8525
-
8526
- var generateId = function generateId() {
8527
- randomId += 1;
8528
- return prefix + randomId;
8529
- };
8530
-
8531
- var LoadingIcon = function LoadingIcon(_a) {
8532
- var _a$color = _a.color,
8533
- color = _a$color === void 0 ? "currentColor" : _a$color,
8534
- _a$size = _a.size,
8535
- size = _a$size === void 0 ? "24px" : _a$size;
8536
- _a.title;
8537
- var props = __rest(_a, ["color", "size", "title"]);
8538
-
8539
- var id = generateId();
8540
- return (
8541
- /*#__PURE__*/
8542
- // Modified svg By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL
8543
- React__default.createElement("svg", Object.assign({
8544
- width: size,
8545
- height: size,
8546
- viewBox: "0 0 38 38",
8547
- xmlns: "http://www.w3.org/2000/svg"
8548
- }, props), /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("linearGradient", {
8549
- x1: "8.042%",
8550
- y1: "0%",
8551
- x2: "65.682%",
8552
- y2: "23.865%",
8553
- id: id
8554
- }, /*#__PURE__*/React__default.createElement("stop", {
8555
- stopColor: color,
8556
- stopOpacity: "0",
8557
- offset: "0%"
8558
- }), /*#__PURE__*/React__default.createElement("stop", {
8559
- stopColor: color,
8560
- stopOpacity: ".631",
8561
- offset: "63.146%"
8562
- }), /*#__PURE__*/React__default.createElement("stop", {
8563
- stopColor: color,
8564
- offset: "100%"
8565
- }))), /*#__PURE__*/React__default.createElement("g", {
8566
- fill: "none",
8567
- fillRule: "evenodd"
8568
- }, /*#__PURE__*/React__default.createElement("g", {
8569
- transform: "translate(1 1)"
8570
- }, /*#__PURE__*/React__default.createElement("path", {
8571
- d: "M36 18c0-9.94-8.06-18-18-18",
8572
- id: "Oval-2",
8573
- stroke: "url(#" + id + ")",
8574
- strokeWidth: "2"
8575
- }, /*#__PURE__*/React__default.createElement("animateTransform", {
8576
- attributeName: "transform",
8577
- type: "rotate",
8578
- from: "0 18 18",
8579
- to: "360 18 18",
8580
- dur: "0.9s",
8581
- repeatCount: "indefinite"
8582
- })), /*#__PURE__*/React__default.createElement("circle", {
8583
- fill: color,
8584
- cx: "36",
8585
- cy: "18",
8586
- r: "1"
8587
- }, /*#__PURE__*/React__default.createElement("animateTransform", {
8588
- attributeName: "transform",
8589
- type: "rotate",
8590
- from: "0 18 18",
8591
- to: "360 18 18",
8592
- dur: "0.9s",
8593
- repeatCount: "indefinite"
8594
- })))))
8595
- );
8523
+ var LoadingIcon = function LoadingIcon(props) {
8524
+ return /*#__PURE__*/React__default.createElement("svg", Object.assign({
8525
+ viewBox: "0 0 24px 24px",
8526
+ width: "24px",
8527
+ height: "24px",
8528
+ fill: "none",
8529
+ xmlns: "http://www.w3.org/2000/svg",
8530
+ preserveAspectRatio: "xMidYMid"
8531
+ }, props), /*#__PURE__*/React__default.createElement("g", null, /*#__PURE__*/React__default.createElement("circle", {
8532
+ cx: "3.5",
8533
+ cy: "12",
8534
+ fill: "#C0C8D1",
8535
+ "transform-origin": "3.5 3.5"
8536
+ }, /*#__PURE__*/React__default.createElement("animate", {
8537
+ attributeName: "r",
8538
+ values: "3;3;3.5;3",
8539
+ keySplines: "\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;",
8540
+ keyTimes: "0; 0.25;0.4; 1",
8541
+ calcMode: "spline",
8542
+ dur: "0.8s",
8543
+ repeatCount: "indefinite"
8544
+ }), /*#__PURE__*/React__default.createElement("animate", {
8545
+ id: "first",
8546
+ attributeName: "fill",
8547
+ values: "#C0C8D1;#C0C8D1;#434D59;#C0C8D1",
8548
+ keySplines: "\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;",
8549
+ keyTimes: "0; 0.25;0.4; 1",
8550
+ calcMode: "spline",
8551
+ dur: "0.8s",
8552
+ repeatCount: "indefinite"
8553
+ })), /*#__PURE__*/React__default.createElement("circle", {
8554
+ cx: "12",
8555
+ cy: "12",
8556
+ r: "3",
8557
+ fill: "#C0C8D1",
8558
+ "transform-origin": "12 3.5"
8559
+ }, /*#__PURE__*/React__default.createElement("animate", {
8560
+ attributeName: "r",
8561
+ begin: "0.2s; first.begin",
8562
+ values: "3;3;3.5;3",
8563
+ keySplines: "\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;",
8564
+ keyTimes: "0; 0.25;0.4; 1",
8565
+ calcMode: "spline",
8566
+ dur: "0.8s",
8567
+ repeatCount: "indefinite"
8568
+ }), /*#__PURE__*/React__default.createElement("animate", {
8569
+ id: "second",
8570
+ attributeName: "fill",
8571
+ begin: "0.2s; first.begin",
8572
+ values: "#C0C8D1;#C0C8D1;#434D59;#C0C8D1",
8573
+ keySplines: "\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;",
8574
+ keyTimes: "0; 0.25;0.4; 1",
8575
+ calcMode: "spline",
8576
+ dur: "0.8s",
8577
+ repeatCount: "indefinite"
8578
+ })), /*#__PURE__*/React__default.createElement("circle", {
8579
+ cx: "20.5",
8580
+ cy: "12",
8581
+ r: "3",
8582
+ fill: "#C0C8D1",
8583
+ "transform-origin": "20.5 3.5"
8584
+ }, /*#__PURE__*/React__default.createElement("animate", {
8585
+ attributeName: "r",
8586
+ begin: "0.3s; first.begin",
8587
+ values: "3;3;3.5;3",
8588
+ keySplines: "\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;\n 0.1 0.8 0.2 1;",
8589
+ keyTimes: "0; 0.25;0.4; 1",
8590
+ calcMode: "spline",
8591
+ dur: "0.8s",
8592
+ repeatCount: "indefinite"
8593
+ }), /*#__PURE__*/React__default.createElement("animate", {
8594
+ id: "third",
8595
+ attributeName: "fill",
8596
+ begin: "0.3s; first.begin",
8597
+ values: "#C0C8D1;#C0C8D1;#434D59;#C0C8D1",
8598
+ keySplines: "\n .24 .1 .35 .8;\n .24 .1 .35 .8;\n 0.1 0.8 0.2 1",
8599
+ keyTimes: "0; 0.25;0.4; 1",
8600
+ calcMode: "spline",
8601
+ dur: "0.8s",
8602
+ repeatCount: "indefinite"
8603
+ }))));
8596
8604
  };
8597
8605
 
8598
8606
  /* eslint-disable react/no-array-index-key */
@@ -8623,7 +8631,6 @@ var Svg$1 = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
8623
8631
  if (icon === "loading") {
8624
8632
  return /*#__PURE__*/React__default.createElement(LoadingIcon, Object.assign({
8625
8633
  color: Theme.colors[fillColor] ? Theme.colors[fillColor] : fillColor,
8626
- size: space[size] || size,
8627
8634
  className: className
8628
8635
  }, props));
8629
8636
  }
@@ -17610,6 +17617,14 @@ var subPx = function subPx(val1, val2) {
17610
17617
  return parseInt(val1.replace("px", ""), 10) - parseInt(val2Str.replace("px", ""), 10) + "px";
17611
17618
  };
17612
17619
 
17620
+ var prefix = "random-id-";
17621
+ var randomId = 0;
17622
+
17623
+ var generateId = function generateId() {
17624
+ randomId += 1;
17625
+ return prefix + randomId;
17626
+ };
17627
+
17613
17628
  var WindowDimensions = /*#__PURE__*/function (_React$Component) {
17614
17629
  _inheritsLoose$2(WindowDimensions, _React$Component);
17615
17630
 
@@ -50008,7 +50023,7 @@ var StatusIndicatorValues = {
50008
50023
  quiet: "quiet"
50009
50024
  };
50010
50025
 
50011
- var StatusIndicatorColours = function StatusIndicatorColours(theme) {
50026
+ var statusIndicatorStyles = function statusIndicatorStyles(theme) {
50012
50027
  var _ref;
50013
50028
 
50014
50029
  return _ref = {}, _ref[StatusIndicatorValues.neutral] = {
@@ -50020,7 +50035,8 @@ var StatusIndicatorColours = function StatusIndicatorColours(theme) {
50020
50035
  backgroundColor: theme.colors.blackBlue,
50021
50036
  color: theme.colors.white
50022
50037
  }, _ref[StatusIndicatorValues.quiet] = {
50023
- borderColor: theme.colors.white,
50038
+ border: "1px solid",
50039
+ borderColor: theme.colors.grey,
50024
50040
  backgroundColor: theme.colors.white,
50025
50041
  color: theme.colors.darkGrey
50026
50042
  }, _ref[StatusIndicatorValues.danger] = {
@@ -50042,10 +50058,6 @@ var StatusIndicatorColours = function StatusIndicatorColours(theme) {
50042
50058
  }, _ref;
50043
50059
  };
50044
50060
 
50045
- var getStatusIndicatorColours = function getStatusIndicatorColours(type, theme) {
50046
- return StatusIndicatorColours(theme)[type];
50047
- };
50048
-
50049
50061
  var StatusIndicator = styled.span.withConfig({
50050
50062
  displayName: "StatusIndicator",
50051
50063
  componentId: "sc-17eyafq-0"
@@ -50058,7 +50070,7 @@ var StatusIndicator = styled.span.withConfig({
50058
50070
  textTransform: "uppercase",
50059
50071
  letterSpacing: ".05em",
50060
50072
  borderRadius: theme.space.x1
50061
- }, getStatusIndicatorColours(type, theme));
50073
+ }, statusIndicatorStyles(theme)[type]);
50062
50074
  });
50063
50075
  StatusIndicator.defaultProps = {
50064
50076
  type: StatusIndicatorValues.neutral,
@@ -1,9 +1,4 @@
1
1
  import React from "react";
2
- type LoadingIconProps = {
3
- size?: string | number;
4
- color?: string;
5
- title?: string;
6
- className?: string;
7
- };
2
+ type LoadingIconProps = React.ComponentPropsWithoutRef<"svg">;
8
3
  declare const LoadingIcon: React.FC<LoadingIconProps>;
9
4
  export default LoadingIcon;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nulogy/components",
3
- "version": "8.14.5",
3
+ "version": "8.15.0",
4
4
  "description": "Component library for the Nulogy Design System - http://nulogy.design",
5
5
  "private": false,
6
6
  "publishConfig": {