@appquality/unguess-design-system 2.8.8 â 2.8.12
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/.github/workflows/release.yml +43 -0
- package/.github/workflows/storybook.yml +37 -37
- package/.prettierrc +3 -3
- package/CHANGELOG.md +643 -584
- package/README.md +73 -73
- package/build/index.js +69 -50
- package/build/stories/dropdowns/select/_types.d.ts +2 -0
- package/generate-story.sh +60 -60
- package/package.json +119 -119
package/README.md
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
# UNGUESS Design System
|
|
2
|
-
|
|
3
|
-
[](http://commitizen.github.io/cz-cli/)
|
|
4
|
-
|
|
5
|
-
## Used by
|
|
6
|
-
|
|
7
|
-
- [Unguess platform](https://app.unguess.io/)
|
|
8
|
-
|
|
9
|
-
## Tech stack
|
|
10
|
-
|
|
11
|
-
Building components
|
|
12
|
-
|
|
13
|
-
- ðŠī [Zendesk Garden](https://garden.zendesk.com/) as base design system
|
|
14
|
-
- âïļ [React](https://reactjs.org/) declarative component-centric UI
|
|
15
|
-
- ð [Storybook](https://storybook.js.org) for UI component development and [auto-generated docs](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a)
|
|
16
|
-
- ðĐâðĪ [Styled Components](https://styled-components.com/) for component-scoped styling
|
|
17
|
-
|
|
18
|
-
Maintaining the system
|
|
19
|
-
|
|
20
|
-
- ðĶ [Yarn](https://yarnpkg.com/) for package management
|
|
21
|
-
- ðĶ [NPM](https://www.npmjs.com/) for distribution
|
|
22
|
-
- â
[Chromatic](https://www.chromatic.com/) to prevent UI bugs in components (by Storybook maintainers)
|
|
23
|
-
|
|
24
|
-
## Why
|
|
25
|
-
|
|
26
|
-
The Unguess design system codifies existing UI components into a central, well-maintained repository. It is built to address having to paste the same components into multiple projects again and again. This simplifies building UI's with Storybook's design patterns.
|
|
27
|
-
|
|
28
|
-
## Install
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
yarn
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Global Styles
|
|
35
|
-
|
|
36
|
-
Components within the design system assume that a set of global styles have been configured. Depending upon the needs of the application, this can be done several ways:
|
|
37
|
-
|
|
38
|
-
#### Option 1: Render the `GlobalStyle` component
|
|
39
|
-
|
|
40
|
-
Useful when you don't need any custom `body` styling in the application, typically this would be placed in a layout component that wraps all pages, or a top-level `App` component.
|
|
41
|
-
|
|
42
|
-
```javascript
|
|
43
|
-
import { global } from '@storybook/design-system';
|
|
44
|
-
const { GlobalStyle } = global;
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
```javascript
|
|
48
|
-
/* Render the global styles once per page */
|
|
49
|
-
<GlobalStyle />
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
#### Option 2: Use the `bodyStyles` to apply styling
|
|
53
|
-
|
|
54
|
-
Useful when you want build upon the shared global styling.
|
|
55
|
-
|
|
56
|
-
```javascript
|
|
57
|
-
import { Global, css } from '@storybook/theming';
|
|
58
|
-
import { global } from '@storybook/design-system';
|
|
59
|
-
const { bodyStyles } = global;
|
|
60
|
-
|
|
61
|
-
const customGlobalStyle = css`
|
|
62
|
-
body {
|
|
63
|
-
${bodyStyles}// Custom body styling for the app
|
|
64
|
-
}
|
|
65
|
-
`;
|
|
66
|
-
|
|
67
|
-
const CustomGlobalStyle = () => <Global styles={customGlobalStyle} />;
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
```javascript
|
|
71
|
-
/* Render the global styles once per page */
|
|
72
|
-
<CustomGlobalStyle />
|
|
73
|
-
```
|
|
1
|
+
# UNGUESS Design System
|
|
2
|
+
|
|
3
|
+
[](http://commitizen.github.io/cz-cli/)
|
|
4
|
+
|
|
5
|
+
## Used by
|
|
6
|
+
|
|
7
|
+
- [Unguess platform](https://app.unguess.io/)
|
|
8
|
+
|
|
9
|
+
## Tech stack
|
|
10
|
+
|
|
11
|
+
Building components
|
|
12
|
+
|
|
13
|
+
- ðŠī [Zendesk Garden](https://garden.zendesk.com/) as base design system
|
|
14
|
+
- âïļ [React](https://reactjs.org/) declarative component-centric UI
|
|
15
|
+
- ð [Storybook](https://storybook.js.org) for UI component development and [auto-generated docs](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a)
|
|
16
|
+
- ðĐâðĪ [Styled Components](https://styled-components.com/) for component-scoped styling
|
|
17
|
+
|
|
18
|
+
Maintaining the system
|
|
19
|
+
|
|
20
|
+
- ðĶ [Yarn](https://yarnpkg.com/) for package management
|
|
21
|
+
- ðĶ [NPM](https://www.npmjs.com/) for distribution
|
|
22
|
+
- â
[Chromatic](https://www.chromatic.com/) to prevent UI bugs in components (by Storybook maintainers)
|
|
23
|
+
|
|
24
|
+
## Why
|
|
25
|
+
|
|
26
|
+
The Unguess design system codifies existing UI components into a central, well-maintained repository. It is built to address having to paste the same components into multiple projects again and again. This simplifies building UI's with Storybook's design patterns.
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
yarn
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Global Styles
|
|
35
|
+
|
|
36
|
+
Components within the design system assume that a set of global styles have been configured. Depending upon the needs of the application, this can be done several ways:
|
|
37
|
+
|
|
38
|
+
#### Option 1: Render the `GlobalStyle` component
|
|
39
|
+
|
|
40
|
+
Useful when you don't need any custom `body` styling in the application, typically this would be placed in a layout component that wraps all pages, or a top-level `App` component.
|
|
41
|
+
|
|
42
|
+
```javascript
|
|
43
|
+
import { global } from '@storybook/design-system';
|
|
44
|
+
const { GlobalStyle } = global;
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```javascript
|
|
48
|
+
/* Render the global styles once per page */
|
|
49
|
+
<GlobalStyle />
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
#### Option 2: Use the `bodyStyles` to apply styling
|
|
53
|
+
|
|
54
|
+
Useful when you want build upon the shared global styling.
|
|
55
|
+
|
|
56
|
+
```javascript
|
|
57
|
+
import { Global, css } from '@storybook/theming';
|
|
58
|
+
import { global } from '@storybook/design-system';
|
|
59
|
+
const { bodyStyles } = global;
|
|
60
|
+
|
|
61
|
+
const customGlobalStyle = css`
|
|
62
|
+
body {
|
|
63
|
+
${bodyStyles}// Custom body styling for the app
|
|
64
|
+
}
|
|
65
|
+
`;
|
|
66
|
+
|
|
67
|
+
const CustomGlobalStyle = () => <Global styles={customGlobalStyle} />;
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
```javascript
|
|
71
|
+
/* Render the global styles once per page */
|
|
72
|
+
<CustomGlobalStyle />
|
|
73
|
+
```
|
package/build/index.js
CHANGED
|
@@ -232,8 +232,8 @@ var gradients = {
|
|
|
232
232
|
|
|
233
233
|
var theme = __assign(__assign({}, reactTheming.DEFAULT_THEME), { palette: palette, fonts: __assign(__assign({}, reactTheming.DEFAULT_THEME.fonts), { system: '"Poppins",sans-serif,Helvetica,Arial,sans-serif' }), gradients: gradients, borderRadii: __assign(__assign({}, reactTheming.DEFAULT_THEME.borderRadii), { lg: "8px" }), components: __assign(__assign({}, reactTheming.DEFAULT_THEME.components), { Headers: __assign(__assign({}, reactTheming.DEFAULT_THEME.components.Headers), { height: "64px" }) }), shadows: __assign(__assign({}, reactTheming.DEFAULT_THEME.shadows), { boxShadow: boxShadow }) });
|
|
234
234
|
|
|
235
|
-
var GlobalStyle = styled.createGlobalStyle(templateObject_1$
|
|
236
|
-
var templateObject_1$
|
|
235
|
+
var GlobalStyle = styled.createGlobalStyle(templateObject_1$N || (templateObject_1$N = __makeTemplateObject(["\n body {\n font-family: ", ";\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n \n svg {\n max-height: 100%;\n }\n \n "], ["\n body {\n font-family: ", ";\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n \n svg {\n max-height: 100%;\n }\n \n "])), theme.fonts.system);
|
|
236
|
+
var templateObject_1$N;
|
|
237
237
|
|
|
238
238
|
/**
|
|
239
239
|
* Accordions are headers that can be expanded to reveal content or collapsed to hide it.
|
|
@@ -249,7 +249,7 @@ Accordion.Label = reactAccordions.Accordion.Label;
|
|
|
249
249
|
Accordion.Panel = reactAccordions.Accordion.Panel;
|
|
250
250
|
|
|
251
251
|
// import useWindowSize from "../../hooks/useWindowSize";
|
|
252
|
-
var UgAvatar = styled__default["default"](reactAvatars.Avatar)(templateObject_1$
|
|
252
|
+
var UgAvatar = styled__default["default"](reactAvatars.Avatar)(templateObject_1$M || (templateObject_1$M = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
253
253
|
return "\n background: ".concat(props.backgroundColor || theme.gradients.dark, ";\n ");
|
|
254
254
|
});
|
|
255
255
|
/**
|
|
@@ -272,7 +272,7 @@ var Avatar = function (props) {
|
|
|
272
272
|
return (jsxRuntime.jsx(UgAvatar, __assign({}, props, { badge: fixedBadge, children: wrapChildren(props.avatarType || "text"), size: props.size || "small" })));
|
|
273
273
|
};
|
|
274
274
|
Avatar.Text = UgAvatar.Text;
|
|
275
|
-
var templateObject_1$
|
|
275
|
+
var templateObject_1$M;
|
|
276
276
|
|
|
277
277
|
/**
|
|
278
278
|
* Breadcrumbs mark and communicate a userâs location in the product.
|
|
@@ -293,7 +293,7 @@ var Breadcrumb = function (props) { return jsxRuntime.jsx(reactBreadcrumbs.Bread
|
|
|
293
293
|
*/
|
|
294
294
|
var Anchor = function (props) { return jsxRuntime.jsx(reactButtons.Anchor, __assign({}, props)); };
|
|
295
295
|
|
|
296
|
-
var UgButton = styled__default["default"](reactButtons.Button)(templateObject_1$
|
|
296
|
+
var UgButton = styled__default["default"](reactButtons.Button)(templateObject_1$L || (templateObject_1$L = __makeTemplateObject([""], [""])));
|
|
297
297
|
/**
|
|
298
298
|
* Buttons let users take action quickly.
|
|
299
299
|
* Use a Button to enable actions or decisions that are important to a userâs workflow.
|
|
@@ -305,7 +305,7 @@ var UgButton = styled__default["default"](reactButtons.Button)(templateObject_1$
|
|
|
305
305
|
var Button = function (props) { return jsxRuntime.jsx(UgButton, __assign({}, props)); };
|
|
306
306
|
Button.StartIcon = UgButton.StartIcon;
|
|
307
307
|
Button.EndIcon = UgButton.EndIcon;
|
|
308
|
-
var templateObject_1$
|
|
308
|
+
var templateObject_1$L;
|
|
309
309
|
|
|
310
310
|
/**
|
|
311
311
|
A Button group lets users make a selection from a set of options.
|
|
@@ -358,13 +358,13 @@ var Tag = function (props) { return jsxRuntime.jsx(reactTags.Tag, __assign({}, p
|
|
|
358
358
|
Tag.Avatar = reactTags.Tag.Avatar;
|
|
359
359
|
Tag.Close = reactTags.Tag.Close;
|
|
360
360
|
|
|
361
|
-
var UgLabel = styled__default["default"](reactForms.Label)(templateObject_1$
|
|
361
|
+
var UgLabel = styled__default["default"](reactForms.Label)(templateObject_1$K || (templateObject_1$K = __makeTemplateObject([""], [""])));
|
|
362
362
|
/**
|
|
363
363
|
* A Label is used to specify a title for an input.
|
|
364
364
|
* <hr>
|
|
365
365
|
**/
|
|
366
366
|
var Label = function (props) { return jsxRuntime.jsx(UgLabel, __assign({}, props)); };
|
|
367
|
-
var templateObject_1$
|
|
367
|
+
var templateObject_1$K;
|
|
368
368
|
|
|
369
369
|
var _g$4, _path$p, _path2$7, _path3$6, _path4$4, _path5$3, _path6$3, _path7$3, _path8$3, _path9$3, _path10$3, _path11$2;
|
|
370
370
|
|
|
@@ -593,7 +593,7 @@ var getTypeData = function (type) {
|
|
|
593
593
|
};
|
|
594
594
|
}
|
|
595
595
|
};
|
|
596
|
-
var Wrapper = styled__default["default"](Card)(templateObject_1$
|
|
596
|
+
var Wrapper = styled__default["default"](Card)(templateObject_1$J || (templateObject_1$J = __makeTemplateObject(["\n border-radius: ", ";\n padding: 1rem;\n border: 1px solid ", ";\n display: flex;\n flex-direction: column;\n height: 100%;\n\n &:hover {\n box-shadow: ", ";\n }\n"], ["\n border-radius: ", ";\n padding: 1rem;\n border: 1px solid ", ";\n display: flex;\n flex-direction: column;\n height: 100%;\n\n &:hover {\n box-shadow: ", ";\n }\n"])), theme.borderRadii.lg, theme.palette.grey["200"], theme.shadows.boxShadow(theme));
|
|
597
597
|
var StyledTag$1 = styled__default["default"](Tag)(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), theme.palette.grey["700"]);
|
|
598
598
|
var StyledTagNew = styled__default["default"](Tag)(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n height: ", "px;\n padding: ", "px ", "px;\n color: ", ";\n"], ["\n height: ", "px;\n padding: ", "px ", "px;\n color: ", ";\n"])), function (_a) {
|
|
599
599
|
var theme = _a.theme;
|
|
@@ -624,7 +624,7 @@ var CampaignCard = function (props) {
|
|
|
624
624
|
return jsxRuntime.jsxs(Wrapper, __assign({}, props, { children: [jsxRuntime.jsxs(CardHeader, { children: [jsxRuntime.jsx(StyledLabel, __assign({ isRegular: true }, { children: date })), isNew && (jsxRuntime.jsx(StyledTagNew, __assign({ hue: theme.palette.fuschia["600"], isPill: true, size: "medium", title: labelNew ? labelNew : "New!" }, { children: labelNew ? labelNew : "New!" })))] }), jsxRuntime.jsxs(CardBody, { children: [jsxRuntime.jsx(StyledLabel, __assign({ isRegular: true }, { children: projectTitleCut })), jsxRuntime.jsx(StyledTitleLabel, __assign({ isRegular: true }, { children: campaignTitleCut }))] }), jsxRuntime.jsx(Divider, {}), jsxRuntime.jsxs(CardFooter, { children: [typeData &&
|
|
625
625
|
jsxRuntime.jsxs(StyledTag$1, __assign({ size: "large", isPill: true, isRegular: true, hue: theme.palette.grey[100] }, { children: [jsxRuntime.jsx(Tag.Avatar, { children: jsxRuntime.jsx(PillIcon, {}) }), props.pillText] })), jsxRuntime.jsx(StatusIcon, {})] })] }));
|
|
626
626
|
};
|
|
627
|
-
var templateObject_1$
|
|
627
|
+
var templateObject_1$J, templateObject_2$b, templateObject_3$6, templateObject_4$3, templateObject_5$1, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
|
|
628
628
|
|
|
629
629
|
/**
|
|
630
630
|
* Title is a basic component used to display a title. Often used in card headers.
|
|
@@ -830,7 +830,7 @@ var SvgCampaignExperiential = function SvgCampaignExperiential(props) {
|
|
|
830
830
|
})));
|
|
831
831
|
};
|
|
832
832
|
|
|
833
|
-
var StyledTag = styled__default["default"](Tag)(templateObject_1$
|
|
833
|
+
var StyledTag = styled__default["default"](Tag)(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n background-color: transparent;\n pointer-events: none;\n font-weight: ", ";\n ", "\n svg {\n margin-right: ", " !important;\n }\n\n span {\n font-weight: ", ";\n margin-left: ", ";\n color: ", ";\n }\n"], ["\n background-color: transparent;\n pointer-events: none;\n font-weight: ", ";\n ", "\n svg {\n margin-right: ", " !important;\n }\n\n span {\n font-weight: ", ";\n margin-left: ", ";\n color: ", ";\n }\n"])), function (_a) {
|
|
834
834
|
var theme = _a.theme;
|
|
835
835
|
return theme.fontWeights.regular;
|
|
836
836
|
}, function (_a) {
|
|
@@ -866,24 +866,24 @@ var Counter = function (props) {
|
|
|
866
866
|
return (jsxRuntime.jsxs(StyledTag, __assign({}, props, { size: props.size || "large" }, { children: [jsxRuntime.jsx(StyledTag.Avatar, { children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [status === "completed" && jsxRuntime.jsx(SvgCampaignCompleted, {}), status === "progress" && jsxRuntime.jsx(SvgCampaignProgress, {}), status === "incoming" && jsxRuntime.jsx(SvgCampaignIncoming, {}), status === "functional" && jsxRuntime.jsx(SvgCampaignFunctional, {}), status === "experiential" && jsxRuntime.jsx(SvgCampaignExperiential, {})] }) }), props.children, props.counter !== undefined && jsxRuntime.jsx("span", { children: props.counter })] })));
|
|
867
867
|
};
|
|
868
868
|
Counter.Avatar = StyledTag.Avatar;
|
|
869
|
-
var templateObject_1$
|
|
869
|
+
var templateObject_1$I;
|
|
870
870
|
|
|
871
|
-
var Field$1 = styled__default["default"](reactDropdowns.Field)(templateObject_1$
|
|
872
|
-
var templateObject_1$
|
|
871
|
+
var Field$1 = styled__default["default"](reactDropdowns.Field)(templateObject_1$H || (templateObject_1$H = __makeTemplateObject([""], [""])));
|
|
872
|
+
var templateObject_1$H;
|
|
873
873
|
|
|
874
874
|
var index$1 = /*#__PURE__*/Object.freeze({
|
|
875
875
|
__proto__: null,
|
|
876
876
|
Field: Field$1
|
|
877
877
|
});
|
|
878
878
|
|
|
879
|
-
var UgItem = styled__default["default"](reactDropdowns.Item)(templateObject_1$
|
|
879
|
+
var UgItem = styled__default["default"](reactDropdowns.Item)(templateObject_1$G || (templateObject_1$G = __makeTemplateObject(["\n &:hover {\n background-color: ", ";\n }\n"], ["\n &:hover {\n background-color: ", ";\n }\n"])), function (_a) {
|
|
880
880
|
var theme = _a.theme;
|
|
881
881
|
return theme.palette.blue[100];
|
|
882
882
|
});
|
|
883
883
|
var Item = function (props) { return jsxRuntime.jsx(UgItem, __assign({}, props)); };
|
|
884
|
-
var templateObject_1$
|
|
884
|
+
var templateObject_1$G;
|
|
885
885
|
|
|
886
|
-
var UgMenu = styled__default["default"](reactDropdowns.Menu)(templateObject_1$
|
|
886
|
+
var UgMenu = styled__default["default"](reactDropdowns.Menu)(templateObject_1$F || (templateObject_1$F = __makeTemplateObject([""], [""])));
|
|
887
887
|
/**
|
|
888
888
|
* A Menu is a wrapper for items elements
|
|
889
889
|
**/
|
|
@@ -896,7 +896,7 @@ var ItemMeta = function (props) { return jsxRuntime.jsx(reactDropdowns.ItemMeta,
|
|
|
896
896
|
var MediaBody = function (props) { return jsxRuntime.jsx(reactDropdowns.MediaBody, __assign({}, props)); };
|
|
897
897
|
var MediaFigure = function (props) { return jsxRuntime.jsx(reactDropdowns.MediaFigure, __assign({}, props)); };
|
|
898
898
|
var MediaItem = function (props) { return jsxRuntime.jsx(reactDropdowns.MediaItem, __assign({}, props)); };
|
|
899
|
-
var templateObject_1$
|
|
899
|
+
var templateObject_1$F;
|
|
900
900
|
|
|
901
901
|
/**
|
|
902
902
|
* Multiselect lets users select multiple items from a list. Options are dynamically filtered as a user types in the input field and their selections appear as tags in the input field.
|
|
@@ -907,6 +907,10 @@ var templateObject_1$D;
|
|
|
907
907
|
*/
|
|
908
908
|
var Multiselect = function (props) { return (jsxRuntime.jsx(reactDropdowns.Multiselect, __assign({}, props))); };
|
|
909
909
|
|
|
910
|
+
var UgSelect = styled__default["default"](reactDropdowns.Select)(templateObject_1$E || (templateObject_1$E = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
911
|
+
return props.isPrimary &&
|
|
912
|
+
"\n background-color: ".concat(props.theme.palette.blue[600], ";\n color: white;\n & svg {\n color: white;\n }\n ");
|
|
913
|
+
});
|
|
910
914
|
/**
|
|
911
915
|
* Select allows a user to pick one option from a list. This helps simplify the UI when space is limited
|
|
912
916
|
* <hr>
|
|
@@ -917,11 +921,12 @@ var Multiselect = function (props) { return (jsxRuntime.jsx(reactDropdowns.Multi
|
|
|
917
921
|
- To make multiple selections from a list, use Multiselect instead
|
|
918
922
|
- To select from a list on mobile, use a native Select instead
|
|
919
923
|
*/
|
|
920
|
-
var Select = function (props) { return jsxRuntime.jsx(
|
|
921
|
-
var Dropdown = function (props) { return jsxRuntime.jsx(reactDropdowns.Dropdown, __assign({}, props)); };
|
|
922
|
-
var Message = function (props) { return jsxRuntime.jsx(reactDropdowns.Message, __assign({}, props)); };
|
|
924
|
+
var Select = function (props) { return jsxRuntime.jsx(UgSelect, __assign({}, props)); };
|
|
925
|
+
var Dropdown = function (props) { return (jsxRuntime.jsx(reactDropdowns.Dropdown, __assign({}, props))); };
|
|
926
|
+
var Message = function (props) { return jsxRuntime.jsx(reactDropdowns.Message, __assign({}, props)); };
|
|
927
|
+
var templateObject_1$E;
|
|
923
928
|
|
|
924
|
-
var UgCheckbox = styled__default["default"](reactForms.Checkbox)(templateObject_1$
|
|
929
|
+
var UgCheckbox = styled__default["default"](reactForms.Checkbox)(templateObject_1$D || (templateObject_1$D = __makeTemplateObject([""], [""])));
|
|
925
930
|
/**
|
|
926
931
|
* A Checkbox lets users select and unselect options from a list.
|
|
927
932
|
* <hr>
|
|
@@ -933,14 +938,14 @@ var UgCheckbox = styled__default["default"](reactForms.Checkbox)(templateObject_
|
|
|
933
938
|
* - To let users activate an option that takes effect immediately, use a Toggle instead
|
|
934
939
|
**/
|
|
935
940
|
var Checkbox = function (props) { return jsxRuntime.jsx(UgCheckbox, __assign({}, props)); };
|
|
936
|
-
var templateObject_1$
|
|
941
|
+
var templateObject_1$D;
|
|
937
942
|
|
|
938
|
-
var UgField = styled__default["default"](reactForms.Field)(templateObject_1$
|
|
943
|
+
var UgField = styled__default["default"](reactForms.Field)(templateObject_1$C || (templateObject_1$C = __makeTemplateObject([""], [""])));
|
|
939
944
|
/**
|
|
940
945
|
* A Field is a wrapper for input elements
|
|
941
946
|
**/
|
|
942
947
|
var Field = function (props) { return jsxRuntime.jsx(UgField, __assign({}, props)); };
|
|
943
|
-
var templateObject_1$
|
|
948
|
+
var templateObject_1$C;
|
|
944
949
|
|
|
945
950
|
var index = /*#__PURE__*/Object.freeze({
|
|
946
951
|
__proto__: null,
|
|
@@ -948,7 +953,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
948
953
|
Hint: reactForms.Hint
|
|
949
954
|
});
|
|
950
955
|
|
|
951
|
-
var UgInput = styled__default["default"](reactForms.Input)(templateObject_1$
|
|
956
|
+
var UgInput = styled__default["default"](reactForms.Input)(templateObject_1$B || (templateObject_1$B = __makeTemplateObject([""], [""])));
|
|
952
957
|
/**
|
|
953
958
|
* An Input lets users enter text into a field.
|
|
954
959
|
* <hr>
|
|
@@ -957,9 +962,9 @@ var UgInput = styled__default["default"](reactForms.Input)(templateObject_1$A ||
|
|
|
957
962
|
* - To enter multiline text, use a Textarea
|
|
958
963
|
**/
|
|
959
964
|
var Input = function (props) { return jsxRuntime.jsx(UgInput, __assign({}, props)); };
|
|
960
|
-
var templateObject_1$
|
|
965
|
+
var templateObject_1$B;
|
|
961
966
|
|
|
962
|
-
var UgRadio = styled__default["default"](reactForms.Radio)(templateObject_1$
|
|
967
|
+
var UgRadio = styled__default["default"](reactForms.Radio)(templateObject_1$A || (templateObject_1$A = __makeTemplateObject([""], [""])));
|
|
963
968
|
/**
|
|
964
969
|
* Radio buttons let users choose a single option among two or more mutually exclusive options.
|
|
965
970
|
* <hr>
|
|
@@ -971,9 +976,9 @@ var UgRadio = styled__default["default"](reactForms.Radio)(templateObject_1$z ||
|
|
|
971
976
|
* - To select from a long list of options, use Select instead
|
|
972
977
|
**/
|
|
973
978
|
var Radio = function (props) { return jsxRuntime.jsx(UgRadio, __assign({}, props)); };
|
|
974
|
-
var templateObject_1$
|
|
979
|
+
var templateObject_1$A;
|
|
975
980
|
|
|
976
|
-
var UgTextarea = styled__default["default"](reactForms.Textarea)(templateObject_1$
|
|
981
|
+
var UgTextarea = styled__default["default"](reactForms.Textarea)(templateObject_1$z || (templateObject_1$z = __makeTemplateObject([""], [""])));
|
|
977
982
|
/**
|
|
978
983
|
* A Textarea is a form control for multi-line text.
|
|
979
984
|
* <hr>
|
|
@@ -981,9 +986,9 @@ var UgTextarea = styled__default["default"](reactForms.Textarea)(templateObject_
|
|
|
981
986
|
* - To enter multi-line text
|
|
982
987
|
**/
|
|
983
988
|
var Textarea = function (props) { return jsxRuntime.jsx(UgTextarea, __assign({}, props)); };
|
|
984
|
-
var templateObject_1$
|
|
989
|
+
var templateObject_1$z;
|
|
985
990
|
|
|
986
|
-
var UgToggle = styled__default["default"](reactForms.Toggle)(templateObject_1$
|
|
991
|
+
var UgToggle = styled__default["default"](reactForms.Toggle)(templateObject_1$y || (templateObject_1$y = __makeTemplateObject([""], [""])));
|
|
987
992
|
/**
|
|
988
993
|
* A Toggle lets users turn something on and off like a light switch. Unlike a Checkbox, which is used for selection, a Toggle is used for activation.
|
|
989
994
|
* <hr>
|
|
@@ -994,7 +999,7 @@ var UgToggle = styled__default["default"](reactForms.Toggle)(templateObject_1$x
|
|
|
994
999
|
* - To let users select from a list of settings, use Checkboxes instead
|
|
995
1000
|
**/
|
|
996
1001
|
var Toggle = function (props) { return jsxRuntime.jsx(UgToggle, __assign({}, props)); };
|
|
997
|
-
var templateObject_1$
|
|
1002
|
+
var templateObject_1$y;
|
|
998
1003
|
|
|
999
1004
|
var Col = function (props) { return jsxRuntime.jsx(reactGrid.Col, __assign({}, props)); };
|
|
1000
1005
|
|
|
@@ -1059,7 +1064,7 @@ var SvgUgTriangle = function SvgUgTriangle(props) {
|
|
|
1059
1064
|
})));
|
|
1060
1065
|
};
|
|
1061
1066
|
|
|
1062
|
-
var StyledUgIcon$1 = styled__default["default"].span(templateObject_1$
|
|
1067
|
+
var StyledUgIcon$1 = styled__default["default"].span(templateObject_1$x || (templateObject_1$x = __makeTemplateObject([""], [""])));
|
|
1063
1068
|
var Icon = function (props) {
|
|
1064
1069
|
var children = function (type, size) {
|
|
1065
1070
|
if (size === void 0) { size = 24; }
|
|
@@ -1072,9 +1077,9 @@ var Icon = function (props) {
|
|
|
1072
1077
|
};
|
|
1073
1078
|
return (jsxRuntime.jsx(StyledUgIcon$1, { children: children(props.type, props.size) }));
|
|
1074
1079
|
};
|
|
1075
|
-
var templateObject_1$
|
|
1080
|
+
var templateObject_1$x;
|
|
1076
1081
|
|
|
1077
|
-
var UgProgress = styled__default["default"](reactLoaders.Progress)(templateObject_1$
|
|
1082
|
+
var UgProgress = styled__default["default"](reactLoaders.Progress)(templateObject_1$w || (templateObject_1$w = __makeTemplateObject([""], [""])));
|
|
1078
1083
|
/**
|
|
1079
1084
|
* A Progress loader communicates progress when downloading or uploading content.
|
|
1080
1085
|
* <hr>
|
|
@@ -1086,9 +1091,9 @@ var UgProgress = styled__default["default"](reactLoaders.Progress)(templateObjec
|
|
|
1086
1091
|
- When loading page content, use a Skeleton loader instead
|
|
1087
1092
|
*/
|
|
1088
1093
|
var Progress = function (props) { return jsxRuntime.jsx(UgProgress, __assign({}, props)); };
|
|
1089
|
-
var templateObject_1$
|
|
1094
|
+
var templateObject_1$w;
|
|
1090
1095
|
|
|
1091
|
-
var UgSkeleton = styled__default["default"](reactLoaders.Skeleton)(templateObject_1$
|
|
1096
|
+
var UgSkeleton = styled__default["default"](reactLoaders.Skeleton)(templateObject_1$v || (templateObject_1$v = __makeTemplateObject([""], [""])));
|
|
1092
1097
|
/**
|
|
1093
1098
|
* A Skeleton loader shows users a blank version of a page or section of a page into which content is gradually loaded. It provides a visual estimate of the space needed.
|
|
1094
1099
|
* <hr>
|
|
@@ -1103,9 +1108,9 @@ var UgSkeleton = styled__default["default"](reactLoaders.Skeleton)(templateObjec
|
|
|
1103
1108
|
- To communicate a typing status, use Inline instead
|
|
1104
1109
|
*/
|
|
1105
1110
|
var Skeleton = function (props) { return jsxRuntime.jsx(UgSkeleton, __assign({}, props)); };
|
|
1106
|
-
var templateObject_1$
|
|
1111
|
+
var templateObject_1$v;
|
|
1107
1112
|
|
|
1108
|
-
var UgSpinner = styled__default["default"](reactLoaders.Spinner)(templateObject_1$
|
|
1113
|
+
var UgSpinner = styled__default["default"](reactLoaders.Spinner)(templateObject_1$u || (templateObject_1$u = __makeTemplateObject([""], [""])));
|
|
1109
1114
|
/**
|
|
1110
1115
|
* Breadcrumbs mark and communicate a userâs location in the product.
|
|
1111
1116
|
* <hr>
|
|
@@ -1114,7 +1119,7 @@ var UgSpinner = styled__default["default"](reactLoaders.Spinner)(templateObject_
|
|
|
1114
1119
|
- To provide a quick way to navigate to ancestor pages
|
|
1115
1120
|
*/
|
|
1116
1121
|
var Spinner = function (props) { return jsxRuntime.jsx(UgSpinner, __assign({}, props)); };
|
|
1117
|
-
var templateObject_1$
|
|
1122
|
+
var templateObject_1$u;
|
|
1118
1123
|
|
|
1119
1124
|
/**
|
|
1120
1125
|
* Title is a basic component used to display a title. Often used in card headers.
|
|
@@ -1205,7 +1210,7 @@ var Logo = function (props) {
|
|
|
1205
1210
|
}[props.type] })));
|
|
1206
1211
|
};
|
|
1207
1212
|
|
|
1208
|
-
var ugModalBody = styled__default["default"](reactModals.Body)(templateObject_1$
|
|
1213
|
+
var ugModalBody = styled__default["default"](reactModals.Body)(templateObject_1$t || (templateObject_1$t = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
|
|
1209
1214
|
var theme = _a.theme;
|
|
1210
1215
|
return theme.palette.grey["800"];
|
|
1211
1216
|
});
|
|
@@ -1214,9 +1219,9 @@ var FooterItem = reactModals.FooterItem;
|
|
|
1214
1219
|
Modal.Header = reactModals.Header;
|
|
1215
1220
|
Modal.Body = ugModalBody;
|
|
1216
1221
|
Modal.Footer = reactModals.Footer;
|
|
1217
|
-
var templateObject_1$
|
|
1222
|
+
var templateObject_1$t;
|
|
1218
1223
|
|
|
1219
|
-
var UgBody = styled__default["default"](reactChrome.Body)(templateObject_1$
|
|
1224
|
+
var UgBody = styled__default["default"](reactChrome.Body)(templateObject_1$s || (templateObject_1$s = __makeTemplateObject(["\n background-color: ", ";\n"], ["\n background-color: ", ";\n"])), function (_a) {
|
|
1220
1225
|
var theme = _a.theme;
|
|
1221
1226
|
return theme.palette.white;
|
|
1222
1227
|
});
|
|
@@ -1224,18 +1229,26 @@ var UgBody = styled__default["default"](reactChrome.Body)(templateObject_1$r ||
|
|
|
1224
1229
|
* A Body defines the main content of an HTML document which displays on the browser
|
|
1225
1230
|
*/
|
|
1226
1231
|
var Body$1 = function (props) { return jsxRuntime.jsx(UgBody, __assign({}, props)); };
|
|
1227
|
-
var templateObject_1$
|
|
1232
|
+
var templateObject_1$s;
|
|
1228
1233
|
|
|
1229
1234
|
/**
|
|
1230
1235
|
* A Content defines the main content of an HTML document which displays on the browser
|
|
1231
1236
|
*/
|
|
1232
1237
|
var Content = function (props) { return jsxRuntime.jsx(reactChrome.Content, __assign({}, props)); };
|
|
1233
1238
|
|
|
1234
|
-
var UgHeaderItem = styled__default["default"](reactChrome.HeaderItem)(templateObject_1$
|
|
1239
|
+
var UgHeaderItem = styled__default["default"](reactChrome.HeaderItem)(templateObject_1$r || (templateObject_1$r = __makeTemplateObject(["\n ", ";\n font-family: ", ";\n"], ["\n ", ";\n font-family: ", ";\n"])), function (props) { return props.hasLogo && "border-right: none"; }, function (_a) {
|
|
1240
|
+
var theme = _a.theme;
|
|
1241
|
+
return theme.fonts.system;
|
|
1242
|
+
});
|
|
1235
1243
|
var HeaderItem = function (props) { return jsxRuntime.jsx(UgHeaderItem, __assign({}, props)); };
|
|
1236
|
-
var templateObject_1$
|
|
1244
|
+
var templateObject_1$r;
|
|
1237
1245
|
|
|
1238
|
-
var
|
|
1246
|
+
var UgHeaderItemText = styled__default["default"](reactChrome.HeaderItemText)(templateObject_1$q || (templateObject_1$q = __makeTemplateObject(["\n font-family: ", ";\n"], ["\n font-family: ", ";\n"])), function (_a) {
|
|
1247
|
+
var theme = _a.theme;
|
|
1248
|
+
return theme.fonts.system;
|
|
1249
|
+
});
|
|
1250
|
+
var HeaderItemText = function (props) { return jsxRuntime.jsx(UgHeaderItemText, __assign({}, props)); };
|
|
1251
|
+
var templateObject_1$q;
|
|
1239
1252
|
|
|
1240
1253
|
var HeaderItemIcon = function (props) { return (jsxRuntime.jsx(reactChrome.HeaderItemIcon, __assign({}, props))); };
|
|
1241
1254
|
|
|
@@ -1262,9 +1275,12 @@ var LogoIconContainer = styled__default["default"](reactChrome.HeaderItem)(templ
|
|
|
1262
1275
|
var theme = _a.theme;
|
|
1263
1276
|
return theme.breakpoints.sm;
|
|
1264
1277
|
});
|
|
1265
|
-
var BrandName = styled__default["default"](reactChrome.HeaderItem)(templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n margin-right: auto;\n margin-left: -8px;\n color: ", ";\n pointer-events: none;\n @media (max-width: ", ") {\n display: none;\n }\n"], ["\n margin-right: auto;\n margin-left: -8px;\n color: ", ";\n pointer-events: none;\n @media (max-width: ", ") {\n display: none;\n }\n"])), function (_a) {
|
|
1278
|
+
var BrandName = styled__default["default"](reactChrome.HeaderItem)(templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n margin-right: auto;\n margin-left: -8px;\n color: ", ";\n pointer-events: none;\n font-family: ", ";\n @media (max-width: ", ") {\n display: none;\n }\n"], ["\n margin-right: auto;\n margin-left: -8px;\n color: ", ";\n pointer-events: none;\n font-family: ", ";\n @media (max-width: ", ") {\n display: none;\n }\n"])), function (_a) {
|
|
1266
1279
|
var theme = _a.theme;
|
|
1267
1280
|
return theme.palette.blue["600"];
|
|
1281
|
+
}, function (_a) {
|
|
1282
|
+
var theme = _a.theme;
|
|
1283
|
+
return theme.fonts.system;
|
|
1268
1284
|
}, function (_a) {
|
|
1269
1285
|
var theme = _a.theme;
|
|
1270
1286
|
return theme.breakpoints.sm;
|
|
@@ -1361,7 +1377,10 @@ var Nav = function (props) { return jsxRuntime.jsx(UgNav, __assign({}, props));
|
|
|
1361
1377
|
var templateObject_1$l;
|
|
1362
1378
|
|
|
1363
1379
|
var SelectedItemStyle = styled.css(templateObject_1$k || (templateObject_1$k = __makeTemplateObject(["\n background-color: ", ";\n"], ["\n background-color: ", ";\n"])), function (props) { return props.theme.palette.kale["100"]; });
|
|
1364
|
-
var UgNavItem$2 = styled__default["default"](reactChrome.NavItem)(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject(["\n border-top-left-radius: ", "px;\n border-bottom-left-radius: ", "px;\n ", "\n ", "\n &:hover, &:focus {\n ", "\n }\n opacity: 1;\n color: ", ";\n font-weight: ", ";\n ", "\n"], ["\n border-top-left-radius: ", "px;\n border-bottom-left-radius: ", "px;\n ", "\n ", "\n &:hover, &:focus {\n ", "\n }\n opacity: 1;\n color: ", ";\n font-weight: ", ";\n ", "\n"])), function (props) { return props.theme.space.base * 6; }, function (props) { return props.theme.space.base * 6; }, function (
|
|
1380
|
+
var UgNavItem$2 = styled__default["default"](reactChrome.NavItem)(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject(["\n border-top-left-radius: ", "px;\n border-bottom-left-radius: ", "px;\n font-family: ", ";\n ", "\n ", "\n &:hover, &:focus {\n ", "\n }\n opacity: 1;\n color: ", ";\n font-weight: ", ";\n ", "\n"], ["\n border-top-left-radius: ", "px;\n border-bottom-left-radius: ", "px;\n font-family: ", ";\n ", "\n ", "\n &:hover, &:focus {\n ", "\n }\n opacity: 1;\n color: ", ";\n font-weight: ", ";\n ", "\n"])), function (props) { return props.theme.space.base * 6; }, function (props) { return props.theme.space.base * 6; }, function (_a) {
|
|
1381
|
+
var theme = _a.theme;
|
|
1382
|
+
return theme.fonts.system;
|
|
1383
|
+
}, function (props) { return !props.isExpanded && "display: none;"; }, function (props) { return props.isCurrent && SelectedItemStyle; }, SelectedItemStyle, function (props) { return props.theme.palette.blue["600"]; }, function (props) { return props.theme.fontWeights.medium; }, function (props) {
|
|
1365
1384
|
return props.isCurrent &&
|
|
1366
1385
|
"\n color: ".concat(props.theme.palette.blue["700"], ";\n font-weight: ").concat(props.theme.fontWeights.semibold, ";\n ");
|
|
1367
1386
|
});
|
|
@@ -24,6 +24,8 @@ export interface SelectArgs extends ISelectProps {
|
|
|
24
24
|
validation?: 'success' | 'warning' | 'error';
|
|
25
25
|
/** Defines the icon rendered before the element's content */
|
|
26
26
|
start?: any;
|
|
27
|
+
/** Sets the style of dropdown item*/
|
|
28
|
+
isPrimary?: boolean;
|
|
27
29
|
}
|
|
28
30
|
export interface MessageArgs extends IMessageProps {
|
|
29
31
|
/** Applies styles based on validation state */
|
package/generate-story.sh
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
print_help () {
|
|
3
|
-
echo "Usage"
|
|
4
|
-
echo " $0 new-story-name"
|
|
5
|
-
exit
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
if [ $# -lt 1 ]; then
|
|
9
|
-
print_help
|
|
10
|
-
fi
|
|
11
|
-
|
|
12
|
-
STORY_NAME="${1}"
|
|
13
|
-
STORY_NAME_LOWER="$(tr '[:upper:]' '[:lower:]' <<< "${STORY_NAME}")"
|
|
14
|
-
generate_component() {
|
|
15
|
-
cat << EOF
|
|
16
|
-
import { ${STORY_NAME}Props } from "./_types";
|
|
17
|
-
|
|
18
|
-
export const Basic${STORY_NAME} = ({}: ${STORY_NAME}Props) => {};
|
|
19
|
-
EOF
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
generate_types() {
|
|
23
|
-
cat << EOF
|
|
24
|
-
import { BaseProps } from "../../shared/_types";
|
|
25
|
-
export interface ${STORY_NAME}Props extends BaseProps {};
|
|
26
|
-
|
|
27
|
-
EOF
|
|
28
|
-
}
|
|
29
|
-
generate_styled_component() {
|
|
30
|
-
cat << EOF
|
|
31
|
-
import styled from "styled-components";
|
|
32
|
-
import { Basic${STORY_NAME} } from "./_component";
|
|
33
|
-
|
|
34
|
-
export const ${STORY_NAME} = styled(Basic${STORY_NAME})\`\`;
|
|
35
|
-
EOF
|
|
36
|
-
}
|
|
37
|
-
generate_stories() {
|
|
38
|
-
cat << EOF
|
|
39
|
-
import { Story, Meta } from "@storybook/react";
|
|
40
|
-
import { ${STORY_NAME}Props } from "./_types";
|
|
41
|
-
import { ${STORY_NAME} } from "./${STORY_NAME}";
|
|
42
|
-
|
|
43
|
-
export default {
|
|
44
|
-
title: "${STORY_NAME}",
|
|
45
|
-
component: ${STORY_NAME},
|
|
46
|
-
} as Meta;
|
|
47
|
-
|
|
48
|
-
const Template: Story<${STORY_NAME}Props> = (args) => <${STORY_NAME} {...args} />;
|
|
49
|
-
|
|
50
|
-
export const ${STORY_NAME}Base = Template.bind({});
|
|
51
|
-
${STORY_NAME}Base.args = {};
|
|
52
|
-
EOF
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
mkdir "src/test-stories/$STORY_NAME_LOWER"
|
|
56
|
-
|
|
57
|
-
generate_component > "src/test-stories/$STORY_NAME_LOWER/_component.tsx"
|
|
58
|
-
generate_types > "src/test-stories/$STORY_NAME_LOWER/_types.ts"
|
|
59
|
-
generate_styled_component > "src/test-stories/$STORY_NAME_LOWER/$STORY_NAME.tsx"
|
|
60
|
-
generate_stories > "src/test-stories/$STORY_NAME_LOWER/$STORY_NAME.stories.tsx"
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
print_help () {
|
|
3
|
+
echo "Usage"
|
|
4
|
+
echo " $0 new-story-name"
|
|
5
|
+
exit
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
if [ $# -lt 1 ]; then
|
|
9
|
+
print_help
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
STORY_NAME="${1}"
|
|
13
|
+
STORY_NAME_LOWER="$(tr '[:upper:]' '[:lower:]' <<< "${STORY_NAME}")"
|
|
14
|
+
generate_component() {
|
|
15
|
+
cat << EOF
|
|
16
|
+
import { ${STORY_NAME}Props } from "./_types";
|
|
17
|
+
|
|
18
|
+
export const Basic${STORY_NAME} = ({}: ${STORY_NAME}Props) => {};
|
|
19
|
+
EOF
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
generate_types() {
|
|
23
|
+
cat << EOF
|
|
24
|
+
import { BaseProps } from "../../shared/_types";
|
|
25
|
+
export interface ${STORY_NAME}Props extends BaseProps {};
|
|
26
|
+
|
|
27
|
+
EOF
|
|
28
|
+
}
|
|
29
|
+
generate_styled_component() {
|
|
30
|
+
cat << EOF
|
|
31
|
+
import styled from "styled-components";
|
|
32
|
+
import { Basic${STORY_NAME} } from "./_component";
|
|
33
|
+
|
|
34
|
+
export const ${STORY_NAME} = styled(Basic${STORY_NAME})\`\`;
|
|
35
|
+
EOF
|
|
36
|
+
}
|
|
37
|
+
generate_stories() {
|
|
38
|
+
cat << EOF
|
|
39
|
+
import { Story, Meta } from "@storybook/react";
|
|
40
|
+
import { ${STORY_NAME}Props } from "./_types";
|
|
41
|
+
import { ${STORY_NAME} } from "./${STORY_NAME}";
|
|
42
|
+
|
|
43
|
+
export default {
|
|
44
|
+
title: "${STORY_NAME}",
|
|
45
|
+
component: ${STORY_NAME},
|
|
46
|
+
} as Meta;
|
|
47
|
+
|
|
48
|
+
const Template: Story<${STORY_NAME}Props> = (args) => <${STORY_NAME} {...args} />;
|
|
49
|
+
|
|
50
|
+
export const ${STORY_NAME}Base = Template.bind({});
|
|
51
|
+
${STORY_NAME}Base.args = {};
|
|
52
|
+
EOF
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
mkdir "src/test-stories/$STORY_NAME_LOWER"
|
|
56
|
+
|
|
57
|
+
generate_component > "src/test-stories/$STORY_NAME_LOWER/_component.tsx"
|
|
58
|
+
generate_types > "src/test-stories/$STORY_NAME_LOWER/_types.ts"
|
|
59
|
+
generate_styled_component > "src/test-stories/$STORY_NAME_LOWER/$STORY_NAME.tsx"
|
|
60
|
+
generate_stories > "src/test-stories/$STORY_NAME_LOWER/$STORY_NAME.stories.tsx"
|
|
61
61
|
2606:50c0:8003::154
|