krl-alfred 1.1.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/README.md +44 -0
- package/dist/assets/svg/ArrowRightIcon.js +22 -0
- package/dist/assets/svg/SpinnerIcon.js +29 -0
- package/dist/components/Button/Button.js +22 -0
- package/dist/components/Button/Button.styled.js +61 -0
- package/dist/components/Button/index.js +8 -0
- package/dist/components/Button/props.js +6 -0
- package/dist/components/Button/stories/Button.stories.js +49 -0
- package/dist/components/Spinner/Spinner.js +14 -0
- package/dist/components/Spinner/Spinner.styled.js +34 -0
- package/dist/components/Spinner/index.js +8 -0
- package/dist/components/Spinner/props.js +5 -0
- package/dist/components/Spinner/stories/Spinner.stories.js +23 -0
- package/dist/index.js +10 -0
- package/dist/style/style.css +1269 -0
- package/dist/style/style.css.map +1 -0
- package/package.json +83 -0
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
|
2
|
+
|
|
3
|
+
## Available Scripts
|
|
4
|
+
|
|
5
|
+
In the project directory, you can run:
|
|
6
|
+
|
|
7
|
+
### `npm start`
|
|
8
|
+
|
|
9
|
+
Runs the app in the development mode.<br />
|
|
10
|
+
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
|
11
|
+
|
|
12
|
+
The page will reload if you make edits.<br />
|
|
13
|
+
You will also see any lint errors in the console.
|
|
14
|
+
|
|
15
|
+
### `npm test`
|
|
16
|
+
|
|
17
|
+
Launches the test runner in the interactive watch mode.<br />
|
|
18
|
+
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
|
19
|
+
|
|
20
|
+
### `npm run build`
|
|
21
|
+
|
|
22
|
+
Builds the app for production to the `build` folder.<br />
|
|
23
|
+
It correctly bundles React in production mode and optimizes the build for the best performance.
|
|
24
|
+
|
|
25
|
+
The build is minified and the filenames include the hashes.<br />
|
|
26
|
+
Your app is ready to be deployed!
|
|
27
|
+
|
|
28
|
+
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
|
29
|
+
|
|
30
|
+
### `npm run eject`
|
|
31
|
+
|
|
32
|
+
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
|
33
|
+
|
|
34
|
+
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
|
35
|
+
|
|
36
|
+
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
|
37
|
+
|
|
38
|
+
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
|
39
|
+
|
|
40
|
+
## Learn More
|
|
41
|
+
|
|
42
|
+
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
|
43
|
+
|
|
44
|
+
To learn React, check out the [React documentation](https://reactjs.org/).
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var react_1 = __importDefault(require("react"));
|
|
18
|
+
var ArrowRightIcon = function (props) {
|
|
19
|
+
return (react_1.default.createElement("svg", __assign({}, props, { viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }),
|
|
20
|
+
react_1.default.createElement("path", { d: "M5.66602 3.33268L10.3327 7.99935L5.66602 12.666", stroke: props.color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })));
|
|
21
|
+
};
|
|
22
|
+
exports.default = ArrowRightIcon;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var react_1 = __importDefault(require("react"));
|
|
18
|
+
var SpinnerIcon = function (props) {
|
|
19
|
+
return (react_1.default.createElement("svg", __assign({}, props, { viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }),
|
|
20
|
+
react_1.default.createElement("circle", { cx: "8", cy: "2", r: "2", fill: "white" }),
|
|
21
|
+
react_1.default.createElement("path", { d: "M13.3327 3.66732C13.3327 4.12756 12.9596 4.50065 12.4993 4.50065C12.0391 4.50065 11.666 4.12756 11.666 3.66732C11.666 3.20708 12.0391 2.83398 12.4993 2.83398C12.9596 2.83398 13.3327 3.20708 13.3327 3.66732Z", fill: "white" }),
|
|
22
|
+
react_1.default.createElement("ellipse", { cx: "7.99935", cy: "14.6673", rx: "1.33333", ry: "1.33333", fill: "white" }),
|
|
23
|
+
react_1.default.createElement("path", { d: "M5.00065 3.66732C5.00065 4.67984 4.17984 5.50065 3.16732 5.50065C2.1548 5.50065 1.33398 4.67984 1.33398 3.66732C1.33398 2.6548 2.1548 1.83398 3.16732 1.83398C4.17984 1.83398 5.00065 2.6548 5.00065 3.66732Z", fill: "white" }),
|
|
24
|
+
react_1.default.createElement("path", { d: "M3.33333 8.33268C3.33333 9.25316 2.58714 9.99935 1.66667 9.99935C0.746192 9.99935 0 9.25316 0 8.33268C0 7.41221 0.746192 6.66602 1.66667 6.66602C2.58714 6.66602 3.33333 7.41221 3.33333 8.33268Z", fill: "white" }),
|
|
25
|
+
react_1.default.createElement("path", { d: "M15.666 8.33398C15.666 8.88627 15.2183 9.33398 14.666 9.33398C14.1137 9.33398 13.666 8.88627 13.666 8.33398C13.666 7.7817 14.1137 7.33398 14.666 7.33398C15.2183 7.33398 15.666 7.7817 15.666 8.33398Z", fill: "white" }),
|
|
26
|
+
react_1.default.createElement("path", { d: "M4.83398 12.834C4.83398 13.6624 4.16241 14.334 3.33398 14.334C2.50556 14.334 1.83398 13.6624 1.83398 12.834C1.83398 12.0056 2.50556 11.334 3.33398 11.334C4.16241 11.334 4.83398 12.0056 4.83398 12.834Z", fill: "white" }),
|
|
27
|
+
react_1.default.createElement("path", { d: "M13.8333 12.5007C13.8333 13.145 13.311 13.6673 12.6667 13.6673C12.0223 13.6673 11.5 13.145 11.5 12.5007C11.5 11.8563 12.0223 11.334 12.6667 11.334C13.311 11.334 13.8333 11.8563 13.8333 12.5007Z", fill: "white" })));
|
|
28
|
+
};
|
|
29
|
+
exports.default = SpinnerIcon;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var Button_styled_1 = require("./Button.styled");
|
|
8
|
+
var Spinner_1 = __importDefault(require("../Spinner"));
|
|
9
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
10
|
+
var Children = function (props) {
|
|
11
|
+
var children = props.children, icon = props.icon;
|
|
12
|
+
return react_1.default.createElement(react_1.default.Fragment, null,
|
|
13
|
+
children,
|
|
14
|
+
icon && react_1.default.createElement(Button_styled_1.IconStyled, null, icon));
|
|
15
|
+
};
|
|
16
|
+
var Button = function (props) {
|
|
17
|
+
var _a;
|
|
18
|
+
var isLoading = props.isLoading, onClick = props.onClick, disabled = props.disabled, size = props.size, variant = props.variant, width = props.width, icon = props.icon, children = props.children;
|
|
19
|
+
return (react_1.default.createElement(Button_styled_1.ButtonStyled, { className: (0, classnames_1.default)("body-bold-14-17", (_a = {}, _a["loading"] = isLoading, _a)), onClick: onClick, disabled: disabled || isLoading, size: size, variant: variant, width: width }, isLoading ? react_1.default.createElement(Spinner_1.default, { width: "16px", height: "16px", variant: variant === 'primary' ? 'secondary' : 'primary' }) :
|
|
20
|
+
react_1.default.createElement(Children, { icon: icon }, children)));
|
|
21
|
+
};
|
|
22
|
+
exports.default = Button;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
+
if (mod && mod.__esModule) return mod;
|
|
24
|
+
var result = {};
|
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
+
__setModuleDefault(result, mod);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.IconStyled = exports.ButtonStyled = void 0;
|
|
31
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
32
|
+
var primary = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: var(--primary);\n color: white;\n border: none;\n\n &:hover {\n background-color: var(--primary-hover);\n }\n\n &:active {\n background-color: var(--primary-press);\n }\n\n &:disabled:not(.loading) {\n background-color: var(--dark-opacity-5);\n color: var(--dark-opacity-25);\n }\n"], ["\n background-color: var(--primary);\n color: white;\n border: none;\n\n &:hover {\n background-color: var(--primary-hover);\n }\n\n &:active {\n background-color: var(--primary-press);\n }\n\n &:disabled:not(.loading) {\n background-color: var(--dark-opacity-5);\n color: var(--dark-opacity-25);\n }\n"])));
|
|
33
|
+
var secondary = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: var(--primary-opacity-5);\n color: var(--primary);\n border: none;\n\n &:hover {\n color: var(--primary-hover);\n }\n\n &:active {\n color: var(--primary-press);\n }\n\n &:disabled:not(.loading) {\n background-color: var(--dark-opacity-5);\n color: var(--dark-opacity-25);\n }\n"], ["\n background-color: var(--primary-opacity-5);\n color: var(--primary);\n border: none;\n\n &:hover {\n color: var(--primary-hover);\n }\n\n &:active {\n color: var(--primary-press);\n }\n\n &:disabled:not(.loading) {\n background-color: var(--dark-opacity-5);\n color: var(--dark-opacity-25);\n }\n"])));
|
|
34
|
+
var inverted = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color: white;\n color: var(--primary);\n border: 1px solid;\n border-color: var(--primary);\n\n &:hover {\n color: var(--primary-hover);\n border-color: var(--primary-hover);\n }\n\n &:active {\n color: var(--primary-press);\n border-color: var(--primary-press);\n }\n\n &:disabled:not(.loading) {\n color: var(--dark-opacity-25);\n border-color: var(--dark-opacity-25);\n }\n"], ["\n background-color: white;\n color: var(--primary);\n border: 1px solid;\n border-color: var(--primary);\n\n &:hover {\n color: var(--primary-hover);\n border-color: var(--primary-hover);\n }\n\n &:active {\n color: var(--primary-press);\n border-color: var(--primary-press);\n }\n\n &:disabled:not(.loading) {\n color: var(--dark-opacity-25);\n border-color: var(--dark-opacity-25);\n }\n"])));
|
|
35
|
+
exports.ButtonStyled = styled_components_1.default.button(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: ", ";\n padding: 0 24px;\n font-family: var(--font-family-sans-serif);\n cursor: pointer;\n transition: all .2s;\n width: ", ";\n ", "\n\n height: ", ";\n\n &:disabled {\n cursor: not-allowed;\n }\n"], ["\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: ", ";\n padding: 0 24px;\n font-family: var(--font-family-sans-serif);\n cursor: pointer;\n transition: all .2s;\n width: ", ";\n ", "\n\n height: ", ";\n\n &:disabled {\n cursor: not-allowed;\n }\n"])), function (props) { return props.size == 'xsmall' ? '4px' : '8px'; }, function (props) { return props.width; }, function (props) {
|
|
36
|
+
switch (props.variant) {
|
|
37
|
+
case 'primary':
|
|
38
|
+
return primary;
|
|
39
|
+
case 'secondary':
|
|
40
|
+
return secondary;
|
|
41
|
+
case 'inverted':
|
|
42
|
+
return inverted;
|
|
43
|
+
default:
|
|
44
|
+
return primary;
|
|
45
|
+
}
|
|
46
|
+
}, function (props) {
|
|
47
|
+
switch (props.size) {
|
|
48
|
+
case 'big':
|
|
49
|
+
return "56px;";
|
|
50
|
+
case 'medium':
|
|
51
|
+
return "48px";
|
|
52
|
+
case 'small':
|
|
53
|
+
return "40px";
|
|
54
|
+
case 'xsmall':
|
|
55
|
+
return "32px";
|
|
56
|
+
default:
|
|
57
|
+
return "48px";
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
exports.IconStyled = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n margin-left: 10px;\n display: flex;\n align-items: center;\n"], ["\n margin-left: 10px;\n display: flex;\n align-items: center;\n"])));
|
|
61
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var Button_1 = require("./Button");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Button_1).default; } });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sizes = exports.variants = void 0;
|
|
4
|
+
exports.variants = ['primary', 'secondary', 'inverted'];
|
|
5
|
+
exports.sizes = ['big', 'medium', 'small', 'xsmall'];
|
|
6
|
+
var ButtonDefault = { size: 'medium', variant: 'primary', isLoading: false, width: "auto" };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Icon = exports.Default = void 0;
|
|
18
|
+
var react_1 = __importDefault(require("react"));
|
|
19
|
+
var Button_1 = __importDefault(require("../Button"));
|
|
20
|
+
var props_1 = require("../props");
|
|
21
|
+
var ArrowRightIcon_1 = __importDefault(require("../../../assets/svg/ArrowRightIcon"));
|
|
22
|
+
exports.default = {
|
|
23
|
+
title: 'Button',
|
|
24
|
+
component: Button_1.default,
|
|
25
|
+
tags: ['autodocs'],
|
|
26
|
+
argTypes: {
|
|
27
|
+
variant: { control: 'select', options: props_1.variants },
|
|
28
|
+
size: { control: 'select', options: props_1.sizes },
|
|
29
|
+
icon: {
|
|
30
|
+
table: {
|
|
31
|
+
disable: true,
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
onClick: { action: 'clicked' }
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
exports.Default = {
|
|
38
|
+
args: {
|
|
39
|
+
variant: props_1.variants[0],
|
|
40
|
+
size: props_1.sizes[1],
|
|
41
|
+
children: "Button",
|
|
42
|
+
disabled: false,
|
|
43
|
+
isLoading: false,
|
|
44
|
+
width: "150px"
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
exports.Icon = {
|
|
48
|
+
args: __assign(__assign({}, exports.Default.args), { icon: react_1.default.createElement(ArrowRightIcon_1.default, { width: "16px", height: "16px", color: "white" }) }),
|
|
49
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var Spinner_styled_1 = require("./Spinner.styled");
|
|
8
|
+
var SpinnerIcon_1 = __importDefault(require("../../assets/svg/SpinnerIcon"));
|
|
9
|
+
var Spinner = function (props) {
|
|
10
|
+
var width = props.width, height = props.height, variant = props.variant;
|
|
11
|
+
return (react_1.default.createElement(Spinner_styled_1.SpinnerStyled, { width: width, height: height, variant: variant },
|
|
12
|
+
react_1.default.createElement(SpinnerIcon_1.default, { width: width, height: height })));
|
|
13
|
+
};
|
|
14
|
+
exports.default = Spinner;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
+
if (mod && mod.__esModule) return mod;
|
|
24
|
+
var result = {};
|
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
+
__setModuleDefault(result, mod);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.SpinnerStyled = void 0;
|
|
31
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
32
|
+
var spin = (0, styled_components_1.keyframes)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n from {\n transform:rotate(0deg);\n }\n to {\n transform:rotate(360deg);\n }\n"], ["\n from {\n transform:rotate(0deg);\n }\n to {\n transform:rotate(360deg);\n }\n"])));
|
|
33
|
+
exports.SpinnerStyled = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n \n svg {\n animation-name: ", ";\n animation-duration: 500ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear; \n\n * {\n fill: ", ";\n }\n }\n"], ["\n width: ", ";\n height: ", ";\n \n svg {\n animation-name: ", ";\n animation-duration: 500ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear; \n\n * {\n fill: ", ";\n }\n }\n"])), function (props) { return props.width; }, function (props) { return props.height; }, spin, function (props) { return props.variant === 'primary' ? 'var(--primary)' : 'white'; });
|
|
34
|
+
var templateObject_1, templateObject_2;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var Spinner_1 = require("./Spinner");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Spinner_1).default; } });
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Default = void 0;
|
|
7
|
+
var Spinner_1 = __importDefault(require("../Spinner"));
|
|
8
|
+
var props_1 = require("../props");
|
|
9
|
+
exports.default = {
|
|
10
|
+
title: 'Spinner',
|
|
11
|
+
component: Spinner_1.default,
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
argTypes: {
|
|
14
|
+
variant: { control: 'select', options: props_1.variants }
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
exports.Default = {
|
|
18
|
+
args: {
|
|
19
|
+
variant: props_1.variants[0],
|
|
20
|
+
width: "16px",
|
|
21
|
+
height: "16px"
|
|
22
|
+
},
|
|
23
|
+
};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Spinner = exports.Button = void 0;
|
|
7
|
+
var Button_1 = __importDefault(require("./components/Button"));
|
|
8
|
+
exports.Button = Button_1.default;
|
|
9
|
+
var Spinner_1 = __importDefault(require("./components/Spinner"));
|
|
10
|
+
exports.Spinner = Spinner_1.default;
|