@elliemae/ds-spinner 3.0.0-alpha.0 → 3.0.0-alpha.1

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.
@@ -1,10 +1,39 @@
1
1
  var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
8
  var __getProtoOf = Object.getPrototypeOf;
6
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols)
17
+ for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop))
19
+ __defNormalProp(a, prop, b[prop]);
20
+ }
21
+ return a;
22
+ };
23
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7
24
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
8
37
  var __export = (target, all) => {
9
38
  for (var name in all)
10
39
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -39,55 +68,60 @@ const blockName = "spinner";
39
68
  const SpinnerContainer = (0, import_ds_classnames.aggregatedClasses)("div")(blockName);
40
69
  const SpinnerMessage = (0, import_ds_classnames.aggregatedClasses)("span")(blockName, "message");
41
70
  const Spinner = (0, import_ds_classnames.aggregatedClasses)("div")(blockName, "spinner");
42
- const DSSpinner = ({
43
- containerProps = {},
44
- innerRef,
45
- message,
46
- size,
47
- ...otherProps
48
- }) => /* @__PURE__ */ import_react.default.createElement(SpinnerContainer, {
49
- ...containerProps,
50
- ref: innerRef,
51
- "aria-busy": true,
52
- "aria-label": message,
53
- "aria-live": "polite",
54
- role: "alert",
55
- ...otherProps
56
- }, /* @__PURE__ */ import_react.default.createElement(Spinner, {
57
- classProps: { size }
58
- }, /* @__PURE__ */ import_react.default.createElement("svg", {
59
- className: `${blockName}-tl`,
60
- viewBox: "0 0 16.6 16.6",
61
- xmlns: "http://www.w3.org/2000/svg"
62
- }, /* @__PURE__ */ import_react.default.createElement("path", {
63
- d: "M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z",
64
- fill: "#408a90",
65
- stroke: "#fbfbfb"
66
- })), /* @__PURE__ */ import_react.default.createElement("svg", {
67
- className: `${blockName}-tr`,
68
- viewBox: "0 0 16.6 16.6",
69
- xmlns: "http://www.w3.org/2000/svg"
70
- }, /* @__PURE__ */ import_react.default.createElement("path", {
71
- d: "M16.1,16.1A15.6,15.6,0,0,0,.5.5,15.6,15.6,0,0,0,16.1,16.1Z",
72
- fill: "#f7901e",
73
- stroke: "#fbfbfb"
74
- })), /* @__PURE__ */ import_react.default.createElement("svg", {
75
- className: `${blockName}-br`,
76
- viewBox: "0 0 16.6 16.6",
77
- xmlns: "http://www.w3.org/2000/svg"
78
- }, /* @__PURE__ */ import_react.default.createElement("path", {
79
- d: "M.5.5A15.6,15.6,0,0,0,16.1,16.1,15.6,15.6,0,0,0,.5.5Z",
80
- fill: "#0067ab",
81
- stroke: "#fbfbfb"
82
- })), /* @__PURE__ */ import_react.default.createElement("svg", {
83
- className: `${blockName}-bl`,
84
- viewBox: "0 0 16.6 16.6",
85
- xmlns: "http://www.w3.org/2000/svg"
86
- }, /* @__PURE__ */ import_react.default.createElement("path", {
87
- d: "M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z",
88
- fill: "#00acdc",
89
- stroke: "#fbfbfb"
90
- }))), message && /* @__PURE__ */ import_react.default.createElement(SpinnerMessage, null, message));
71
+ const DSSpinner = (_a) => {
72
+ var _b = _a, {
73
+ containerProps = {},
74
+ innerRef,
75
+ message,
76
+ size
77
+ } = _b, otherProps = __objRest(_b, [
78
+ "containerProps",
79
+ "innerRef",
80
+ "message",
81
+ "size"
82
+ ]);
83
+ return /* @__PURE__ */ import_react.default.createElement(SpinnerContainer, __spreadValues(__spreadProps(__spreadValues({}, containerProps), {
84
+ ref: innerRef,
85
+ "aria-busy": true,
86
+ "aria-label": message,
87
+ "aria-live": "polite",
88
+ role: "alert"
89
+ }), otherProps), /* @__PURE__ */ import_react.default.createElement(Spinner, {
90
+ classProps: { size }
91
+ }, /* @__PURE__ */ import_react.default.createElement("svg", {
92
+ className: `${blockName}-tl`,
93
+ viewBox: "0 0 16.6 16.6",
94
+ xmlns: "http://www.w3.org/2000/svg"
95
+ }, /* @__PURE__ */ import_react.default.createElement("path", {
96
+ d: "M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z",
97
+ fill: "#408a90",
98
+ stroke: "#fbfbfb"
99
+ })), /* @__PURE__ */ import_react.default.createElement("svg", {
100
+ className: `${blockName}-tr`,
101
+ viewBox: "0 0 16.6 16.6",
102
+ xmlns: "http://www.w3.org/2000/svg"
103
+ }, /* @__PURE__ */ import_react.default.createElement("path", {
104
+ d: "M16.1,16.1A15.6,15.6,0,0,0,.5.5,15.6,15.6,0,0,0,16.1,16.1Z",
105
+ fill: "#f7901e",
106
+ stroke: "#fbfbfb"
107
+ })), /* @__PURE__ */ import_react.default.createElement("svg", {
108
+ className: `${blockName}-br`,
109
+ viewBox: "0 0 16.6 16.6",
110
+ xmlns: "http://www.w3.org/2000/svg"
111
+ }, /* @__PURE__ */ import_react.default.createElement("path", {
112
+ d: "M.5.5A15.6,15.6,0,0,0,16.1,16.1,15.6,15.6,0,0,0,.5.5Z",
113
+ fill: "#0067ab",
114
+ stroke: "#fbfbfb"
115
+ })), /* @__PURE__ */ import_react.default.createElement("svg", {
116
+ className: `${blockName}-bl`,
117
+ viewBox: "0 0 16.6 16.6",
118
+ xmlns: "http://www.w3.org/2000/svg"
119
+ }, /* @__PURE__ */ import_react.default.createElement("path", {
120
+ d: "M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z",
121
+ fill: "#00acdc",
122
+ stroke: "#fbfbfb"
123
+ }))), message && /* @__PURE__ */ import_react.default.createElement(SpinnerMessage, null, message));
124
+ };
91
125
  DSSpinner.defaultProps = {
92
126
  containerProps: {},
93
127
  message: "",
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/DSSpinner.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable import/no-unresolved */\nimport React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'spinner';\n\nconst SpinnerContainer = aggregatedClasses('div')(blockName);\nconst SpinnerMessage = aggregatedClasses('span')(blockName, 'message');\nconst Spinner = aggregatedClasses('div')(blockName, 'spinner');\n\n// TODO: do we want dynamic position of the text (top, right, bottom, left)?\n\nconst DSSpinner = ({\n containerProps = {},\n innerRef,\n message,\n size,\n ...otherProps\n}) => (\n <SpinnerContainer\n {...containerProps}\n ref={innerRef}\n aria-busy\n aria-label={message}\n aria-live=\"polite\"\n role=\"alert\"\n {...otherProps}\n >\n <Spinner classProps={{ size }}>\n <svg\n className={`${blockName}-tl`}\n viewBox=\"0 0 16.6 16.6\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z\"\n fill=\"#408a90\"\n stroke=\"#fbfbfb\"\n />\n </svg>\n <svg\n className={`${blockName}-tr`}\n viewBox=\"0 0 16.6 16.6\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16.1,16.1A15.6,15.6,0,0,0,.5.5,15.6,15.6,0,0,0,16.1,16.1Z\"\n fill=\"#f7901e\"\n stroke=\"#fbfbfb\"\n />\n </svg>\n <svg\n className={`${blockName}-br`}\n viewBox=\"0 0 16.6 16.6\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M.5.5A15.6,15.6,0,0,0,16.1,16.1,15.6,15.6,0,0,0,.5.5Z\"\n fill=\"#0067ab\"\n stroke=\"#fbfbfb\"\n />\n </svg>\n <svg\n className={`${blockName}-bl`}\n viewBox=\"0 0 16.6 16.6\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z\"\n fill=\"#00acdc\"\n stroke=\"#fbfbfb\"\n />\n </svg>\n </Spinner>\n {message && <SpinnerMessage>{message}</SpinnerMessage>}\n </SpinnerContainer>\n);\n\nDSSpinner.defaultProps = {\n containerProps: {},\n message: '',\n size: 'm',\n};\n\nconst spinnerProps = {\n innerRef: PropTypes.object.description('ref to the component s container'),\n containerProps: PropTypes.object.description(\n 'Set of Properties attached to the main container',\n ),\n message: PropTypes.string.description('Text below the spinner'),\n size: PropTypes.oneOf(['s', 'm', 'l'])\n .description('Spinner size')\n .defaultValue('m'),\n};\n\nDSSpinner.propTypes = spinnerProps;\n\nconst SpinnerWithSchema = describe(DSSpinner);\nSpinnerWithSchema.propTypes = spinnerProps;\n\nexport { DSSpinner, SpinnerWithSchema };\nexport default DSSpinner;\n", "import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mDAAC,OAAD;AAAA,IACE,WAAW,GAAG;AAAA,IACd,SAAQ;AAAA,IACR,OAAM;AAAA,KAEN,mDAAC,QAAD;AAAA,IACE,GAAE;AAAA,IACF,MAAK;AAAA,IACL,QAAO;AAAA,OAGX,mDAAC,OAAD;AAAA,IACE,WAAW,GAAG;AAAA,IACd,SAAQ;AAAA,IACR,OAAM;AAAA,KAEN,mDAAC,QAAD;AAAA,IACE,GAAE;AAAA,IACF,MAAK;AAAA,IACL,QAAO;AAAA,OAGX,mDAAC,OAAD;AAAA,IACE,WAAW,GAAG;AAAA,IACd,SAAQ;AAAA,IACR,OAAM;AAAA,KAEN,mDAAC,QAAD;AAAA,IACE,GAAE;AAAA,IACF,MAAK;AAAA,IACL,QAAO;AAAA,QAIZ,WAAW,mDAAC,gBAAD,MAAiB;AAAA;AAIjC,UAAU,eAAe;AAAA,EACvB,gBAAgB;AAAA,EAChB,SAAS;AAAA,EACT,MAAM;AAAA;AAGR,MAAM,eAAe;AAAA,EACnB,UAAU,4BAAU,OAAO,YAAY;AAAA,EACvC,gBAAgB,4BAAU,OAAO,YAC/B;AAAA,EAEF,SAAS,4BAAU,OAAO,YAAY;AAAA,EACtC,MAAM,4BAAU,MAAM,CAAC,KAAK,KAAK,MAC9B,YAAY,gBACZ,aAAa;AAAA;AAGlB,UAAU,YAAY;AAEtB,MAAM,oBAAoB,gCAAS;AACnC,kBAAkB,YAAY;AAG9B,IAAO,oBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,34 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
1
32
  import * as React from "react";
2
33
  import React2 from "react";
3
34
  import { describe, PropTypes } from "react-desc";
@@ -6,55 +37,60 @@ const blockName = "spinner";
6
37
  const SpinnerContainer = aggregatedClasses("div")(blockName);
7
38
  const SpinnerMessage = aggregatedClasses("span")(blockName, "message");
8
39
  const Spinner = aggregatedClasses("div")(blockName, "spinner");
9
- const DSSpinner = ({
10
- containerProps = {},
11
- innerRef,
12
- message,
13
- size,
14
- ...otherProps
15
- }) => /* @__PURE__ */ React2.createElement(SpinnerContainer, {
16
- ...containerProps,
17
- ref: innerRef,
18
- "aria-busy": true,
19
- "aria-label": message,
20
- "aria-live": "polite",
21
- role: "alert",
22
- ...otherProps
23
- }, /* @__PURE__ */ React2.createElement(Spinner, {
24
- classProps: { size }
25
- }, /* @__PURE__ */ React2.createElement("svg", {
26
- className: `${blockName}-tl`,
27
- viewBox: "0 0 16.6 16.6",
28
- xmlns: "http://www.w3.org/2000/svg"
29
- }, /* @__PURE__ */ React2.createElement("path", {
30
- d: "M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z",
31
- fill: "#408a90",
32
- stroke: "#fbfbfb"
33
- })), /* @__PURE__ */ React2.createElement("svg", {
34
- className: `${blockName}-tr`,
35
- viewBox: "0 0 16.6 16.6",
36
- xmlns: "http://www.w3.org/2000/svg"
37
- }, /* @__PURE__ */ React2.createElement("path", {
38
- d: "M16.1,16.1A15.6,15.6,0,0,0,.5.5,15.6,15.6,0,0,0,16.1,16.1Z",
39
- fill: "#f7901e",
40
- stroke: "#fbfbfb"
41
- })), /* @__PURE__ */ React2.createElement("svg", {
42
- className: `${blockName}-br`,
43
- viewBox: "0 0 16.6 16.6",
44
- xmlns: "http://www.w3.org/2000/svg"
45
- }, /* @__PURE__ */ React2.createElement("path", {
46
- d: "M.5.5A15.6,15.6,0,0,0,16.1,16.1,15.6,15.6,0,0,0,.5.5Z",
47
- fill: "#0067ab",
48
- stroke: "#fbfbfb"
49
- })), /* @__PURE__ */ React2.createElement("svg", {
50
- className: `${blockName}-bl`,
51
- viewBox: "0 0 16.6 16.6",
52
- xmlns: "http://www.w3.org/2000/svg"
53
- }, /* @__PURE__ */ React2.createElement("path", {
54
- d: "M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z",
55
- fill: "#00acdc",
56
- stroke: "#fbfbfb"
57
- }))), message && /* @__PURE__ */ React2.createElement(SpinnerMessage, null, message));
40
+ const DSSpinner = (_a) => {
41
+ var _b = _a, {
42
+ containerProps = {},
43
+ innerRef,
44
+ message,
45
+ size
46
+ } = _b, otherProps = __objRest(_b, [
47
+ "containerProps",
48
+ "innerRef",
49
+ "message",
50
+ "size"
51
+ ]);
52
+ return /* @__PURE__ */ React2.createElement(SpinnerContainer, __spreadValues(__spreadProps(__spreadValues({}, containerProps), {
53
+ ref: innerRef,
54
+ "aria-busy": true,
55
+ "aria-label": message,
56
+ "aria-live": "polite",
57
+ role: "alert"
58
+ }), otherProps), /* @__PURE__ */ React2.createElement(Spinner, {
59
+ classProps: { size }
60
+ }, /* @__PURE__ */ React2.createElement("svg", {
61
+ className: `${blockName}-tl`,
62
+ viewBox: "0 0 16.6 16.6",
63
+ xmlns: "http://www.w3.org/2000/svg"
64
+ }, /* @__PURE__ */ React2.createElement("path", {
65
+ d: "M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z",
66
+ fill: "#408a90",
67
+ stroke: "#fbfbfb"
68
+ })), /* @__PURE__ */ React2.createElement("svg", {
69
+ className: `${blockName}-tr`,
70
+ viewBox: "0 0 16.6 16.6",
71
+ xmlns: "http://www.w3.org/2000/svg"
72
+ }, /* @__PURE__ */ React2.createElement("path", {
73
+ d: "M16.1,16.1A15.6,15.6,0,0,0,.5.5,15.6,15.6,0,0,0,16.1,16.1Z",
74
+ fill: "#f7901e",
75
+ stroke: "#fbfbfb"
76
+ })), /* @__PURE__ */ React2.createElement("svg", {
77
+ className: `${blockName}-br`,
78
+ viewBox: "0 0 16.6 16.6",
79
+ xmlns: "http://www.w3.org/2000/svg"
80
+ }, /* @__PURE__ */ React2.createElement("path", {
81
+ d: "M.5.5A15.6,15.6,0,0,0,16.1,16.1,15.6,15.6,0,0,0,.5.5Z",
82
+ fill: "#0067ab",
83
+ stroke: "#fbfbfb"
84
+ })), /* @__PURE__ */ React2.createElement("svg", {
85
+ className: `${blockName}-bl`,
86
+ viewBox: "0 0 16.6 16.6",
87
+ xmlns: "http://www.w3.org/2000/svg"
88
+ }, /* @__PURE__ */ React2.createElement("path", {
89
+ d: "M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z",
90
+ fill: "#00acdc",
91
+ stroke: "#fbfbfb"
92
+ }))), message && /* @__PURE__ */ React2.createElement(SpinnerMessage, null, message));
93
+ };
58
94
  DSSpinner.defaultProps = {
59
95
  containerProps: {},
60
96
  message: "",
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSSpinner.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable import/no-unresolved */\nimport React from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'spinner';\n\nconst SpinnerContainer = aggregatedClasses('div')(blockName);\nconst SpinnerMessage = aggregatedClasses('span')(blockName, 'message');\nconst Spinner = aggregatedClasses('div')(blockName, 'spinner');\n\n// TODO: do we want dynamic position of the text (top, right, bottom, left)?\n\nconst DSSpinner = ({\n containerProps = {},\n innerRef,\n message,\n size,\n ...otherProps\n}) => (\n <SpinnerContainer\n {...containerProps}\n ref={innerRef}\n aria-busy\n aria-label={message}\n aria-live=\"polite\"\n role=\"alert\"\n {...otherProps}\n >\n <Spinner classProps={{ size }}>\n <svg\n className={`${blockName}-tl`}\n viewBox=\"0 0 16.6 16.6\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z\"\n fill=\"#408a90\"\n stroke=\"#fbfbfb\"\n />\n </svg>\n <svg\n className={`${blockName}-tr`}\n viewBox=\"0 0 16.6 16.6\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16.1,16.1A15.6,15.6,0,0,0,.5.5,15.6,15.6,0,0,0,16.1,16.1Z\"\n fill=\"#f7901e\"\n stroke=\"#fbfbfb\"\n />\n </svg>\n <svg\n className={`${blockName}-br`}\n viewBox=\"0 0 16.6 16.6\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M.5.5A15.6,15.6,0,0,0,16.1,16.1,15.6,15.6,0,0,0,.5.5Z\"\n fill=\"#0067ab\"\n stroke=\"#fbfbfb\"\n />\n </svg>\n <svg\n className={`${blockName}-bl`}\n viewBox=\"0 0 16.6 16.6\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16.1.5A15.6,15.6,0,0,0,.5,16.1,15.6,15.6,0,0,0,16.1.5Z\"\n fill=\"#00acdc\"\n stroke=\"#fbfbfb\"\n />\n </svg>\n </Spinner>\n {message && <SpinnerMessage>{message}</SpinnerMessage>}\n </SpinnerContainer>\n);\n\nDSSpinner.defaultProps = {\n containerProps: {},\n message: '',\n size: 'm',\n};\n\nconst spinnerProps = {\n innerRef: PropTypes.object.description('ref to the component s container'),\n containerProps: PropTypes.object.description(\n 'Set of Properties attached to the main container',\n ),\n message: PropTypes.string.description('Text below the spinner'),\n size: PropTypes.oneOf(['s', 'm', 'l'])\n .description('Spinner size')\n .defaultValue('m'),\n};\n\nDSSpinner.propTypes = spinnerProps;\n\nconst SpinnerWithSchema = describe(DSSpinner);\nSpinnerWithSchema.propTypes = spinnerProps;\n\nexport { DSSpinner, SpinnerWithSchema };\nexport default DSSpinner;\n"],
5
- "mappings": "AAAA;ACCA;AACA;AACA;AAEA,MAAM,YAAY;AAElB,MAAM,mBAAmB,kBAAkB,OAAO;AAClD,MAAM,iBAAiB,kBAAkB,QAAQ,WAAW;AAC5D,MAAM,UAAU,kBAAkB,OAAO,WAAW;AAIpD,MAAM,YAAY,CAAC;AAAA,EACjB,iBAAiB;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,KACG;AAAA,MAEH,qCAAC,kBAAD;AAAA,KACM;AAAA,EACJ,KAAK;AAAA,EACL,aAAS;AAAA,EACT,cAAY;AAAA,EACZ,aAAU;AAAA,EACV,MAAK;AAAA,KACD;AAAA,GAEJ,qCAAC,SAAD;AAAA,EAAS,YAAY,EAAE;AAAA,GACrB,qCAAC,OAAD;AAAA,EACE,WAAW,GAAG;AAAA,EACd,SAAQ;AAAA,EACR,OAAM;AAAA,GAEN,qCAAC,QAAD;AAAA,EACE,GAAE;AAAA,EACF,MAAK;AAAA,EACL,QAAO;AAAA,KAGX,qCAAC,OAAD;AAAA,EACE,WAAW,GAAG;AAAA,EACd,SAAQ;AAAA,EACR,OAAM;AAAA,GAEN,qCAAC,QAAD;AAAA,EACE,GAAE;A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"@elliemae/ds-spinner",
3
- "version": "3.0.0-alpha.0",
3
+ "version": "3.0.0-alpha.1",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Spinner",
6
6
  "files": [
@@ -39,7 +39,7 @@
39
39
  "indent": 4
40
40
  },
41
41
  "dependencies": {
42
- "@elliemae/ds-classnames": "3.0.0-alpha.0",
42
+ "@elliemae/ds-classnames": "3.0.0-alpha.1",
43
43
  "react-desc": "~4.1.3"
44
44
  },
45
45
  "peerDependencies": {
@@ -55,6 +55,7 @@
55
55
  "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
56
56
  "test": "node ../../scripts/testing/test.mjs",
57
57
  "lint": "node ../../scripts/lint.mjs",
58
+ "dts": "node ../../scripts/dts.mjs",
58
59
  "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
59
60
  }
60
61
  }
@@ -1,46 +0,0 @@
1
- /// <reference path="../../../../shared/typings/react-desc.d.ts" />
2
- /// <reference types="react" />
3
- declare const DSSpinner: {
4
- ({ containerProps, innerRef, message, size, ...otherProps }: {
5
- [x: string]: any;
6
- containerProps?: {} | undefined;
7
- innerRef: any;
8
- message: any;
9
- size: any;
10
- }): JSX.Element;
11
- defaultProps: {
12
- containerProps: {};
13
- message: string;
14
- size: string;
15
- };
16
- propTypes: {
17
- innerRef: {
18
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
19
- deprecated: import("react-desc").PropTypesDescValidator;
20
- };
21
- isRequired: import("react-desc").PropTypesDescValue;
22
- };
23
- containerProps: {
24
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
25
- deprecated: import("react-desc").PropTypesDescValidator;
26
- };
27
- isRequired: import("react-desc").PropTypesDescValue;
28
- };
29
- message: {
30
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
31
- deprecated: import("react-desc").PropTypesDescValidator;
32
- };
33
- isRequired: import("react-desc").PropTypesDescValue;
34
- };
35
- size: {
36
- deprecated: import("react-desc").PropTypesDescValidator;
37
- };
38
- };
39
- };
40
- declare const SpinnerWithSchema: {
41
- (props?: unknown): JSX.Element;
42
- propTypes: unknown;
43
- toTypescript: () => import("react-desc").TypescriptSchema;
44
- };
45
- export { DSSpinner, SpinnerWithSchema };
46
- export default DSSpinner;
@@ -1 +0,0 @@
1
- export { DSSpinner, SpinnerWithSchema, default } from './DSSpinner';