@appquality/unguess-design-system 0.1.1 → 0.3.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.
- package/.prettierrc +4 -0
- package/.storybook/preview-head.html +5 -0
- package/.storybook/preview.js +15 -0
- package/CHANGELOG.md +48 -0
- package/build/index.d.ts +2 -1
- package/build/index.js +4 -1
- package/build/stories/{Button → button}/index.d.ts +0 -0
- package/build/stories/{Button → button}/index.stories.d.ts +4 -3
- package/build/stories/shared/globalStyle.d.ts +2 -0
- package/build/stories/theme/index.d.ts +96 -0
- package/package.json +18 -15
- package/src/index.tsx +5 -1
- package/src/stories/{Button → button}/index.stories.tsx +7 -6
- package/src/stories/{Button → button}/index.tsx +1 -3
- package/src/stories/shared/globalStyle.ts +11 -0
- package/src/stories/theme/index.ts +14 -0
package/.prettierrc
ADDED
package/.storybook/preview.js
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
import { ThemeProvider } from "@zendeskgarden/react-theming";
|
|
2
|
+
import { Chrome } from '@zendeskgarden/react-chrome';
|
|
3
|
+
import GlobalStyle from "../src/stories/shared/globalStyle";
|
|
4
|
+
import { theme } from '../src/stories/theme';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export const decorators = [
|
|
8
|
+
(Story) => (
|
|
9
|
+
<ThemeProvider theme={theme}>
|
|
10
|
+
<GlobalStyle />
|
|
11
|
+
<Story />
|
|
12
|
+
</ThemeProvider>
|
|
13
|
+
),
|
|
14
|
+
];
|
|
15
|
+
|
|
1
16
|
export const parameters = {
|
|
2
17
|
actions: { argTypesRegex: "^on[A-Z].*" },
|
|
3
18
|
controls: {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,51 @@
|
|
|
1
|
+
# v0.3.1 (Thu Mar 03 2022)
|
|
2
|
+
|
|
3
|
+
#### ⚠️ Pushed to `master`
|
|
4
|
+
|
|
5
|
+
- feat: change theme export ([@cannarocks](https://github.com/cannarocks))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# v0.2.0 (Thu Mar 03 2022)
|
|
14
|
+
|
|
15
|
+
#### 🚀 Enhancement
|
|
16
|
+
|
|
17
|
+
- Cup 422 setup theme [#1](https://github.com/AppQuality/unguess-design-system/pull/1) ([@cannarocks](https://github.com/cannarocks))
|
|
18
|
+
|
|
19
|
+
#### Authors: 1
|
|
20
|
+
|
|
21
|
+
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# v0.2.0 (Wed Mar 02 2022)
|
|
26
|
+
|
|
27
|
+
#### 🚀 Enhancement
|
|
28
|
+
|
|
29
|
+
- Cup 422 setup theme [#1](https://github.com/AppQuality/unguess-design-system/pull/1) ([@cannarocks](https://github.com/cannarocks))
|
|
30
|
+
|
|
31
|
+
#### Authors: 1
|
|
32
|
+
|
|
33
|
+
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
# v0.1.2 (Tue Mar 01 2022)
|
|
38
|
+
|
|
39
|
+
#### ⚠️ Pushed to `master`
|
|
40
|
+
|
|
41
|
+
- chore: move @zendeskgarden/react-theming to dependency ([@cannarocks](https://github.com/cannarocks))
|
|
42
|
+
|
|
43
|
+
#### Authors: 1
|
|
44
|
+
|
|
45
|
+
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
1
49
|
# v0.1.1 (Tue Mar 01 2022)
|
|
2
50
|
|
|
3
51
|
#### ⚠️ Pushed to `master`
|
package/build/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from './stories/
|
|
1
|
+
export * from './stories/button';
|
|
2
|
+
export * from './stories/theme';
|
package/build/index.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var reactButtons = require('@zendeskgarden/react-buttons');
|
|
7
7
|
var styled = require('styled-components');
|
|
8
|
+
var reactTheming = require('@zendeskgarden/react-theming');
|
|
8
9
|
|
|
9
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
11
|
|
|
@@ -41,8 +42,10 @@ function __makeTemplateObject(cooked, raw) {
|
|
|
41
42
|
return cooked;
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
var DressBerryButton = styled__default["default"](reactButtons.Button)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 0.5rem
|
|
45
|
+
var DressBerryButton = styled__default["default"](reactButtons.Button)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 0.5rem 2rem;\n"], ["\n padding: 0.5rem 2rem;\n"])));
|
|
45
46
|
var Button = function (props) { return jsxRuntime.jsx(DressBerryButton, __assign({}, props)); };
|
|
46
47
|
var templateObject_1;
|
|
47
48
|
|
|
49
|
+
__assign(__assign({}, reactTheming.DEFAULT_THEME), { colors: __assign(__assign({}, reactTheming.DEFAULT_THEME.colors), { primaryHue: "pink", foreground: "red" }), fonts: __assign(__assign({}, reactTheming.DEFAULT_THEME.fonts), { system: '"Poppins",sans-serif,Helvetica,Arial,sans-serif' }) });
|
|
50
|
+
|
|
48
51
|
exports.Button = Button;
|
|
File without changes
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
2
3
|
import { IButtonProps } from "@zendeskgarden/react-buttons";
|
|
3
4
|
interface IArgs extends IButtonProps {
|
|
4
5
|
hasStartIcon?: boolean;
|
|
@@ -6,7 +7,7 @@ interface IArgs extends IButtonProps {
|
|
|
6
7
|
isStartIconRotated?: boolean;
|
|
7
8
|
isEndIconRotated?: boolean;
|
|
8
9
|
}
|
|
9
|
-
declare const _default: Meta<import("@storybook/react").Args>;
|
|
10
|
-
export default _default;
|
|
11
10
|
export declare const Basic: Story<IArgs>;
|
|
12
11
|
export declare const Primary: Story<IArgs>;
|
|
12
|
+
declare const _default: ComponentMeta<(props: IButtonProps) => JSX.Element>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
declare const theme: {
|
|
2
|
+
colors: {
|
|
3
|
+
primaryHue: string;
|
|
4
|
+
foreground: string;
|
|
5
|
+
base: "light" | "dark";
|
|
6
|
+
background: string;
|
|
7
|
+
dangerHue: string;
|
|
8
|
+
warningHue: string;
|
|
9
|
+
successHue: string;
|
|
10
|
+
neutralHue: string;
|
|
11
|
+
chromeHue: string;
|
|
12
|
+
};
|
|
13
|
+
fonts: {
|
|
14
|
+
system: string;
|
|
15
|
+
mono: string;
|
|
16
|
+
};
|
|
17
|
+
rtl: boolean;
|
|
18
|
+
document?: any;
|
|
19
|
+
borders: {
|
|
20
|
+
sm: string;
|
|
21
|
+
md: string;
|
|
22
|
+
};
|
|
23
|
+
borderRadii: {
|
|
24
|
+
sm: string;
|
|
25
|
+
md: string;
|
|
26
|
+
};
|
|
27
|
+
borderStyles: {
|
|
28
|
+
solid: string;
|
|
29
|
+
};
|
|
30
|
+
borderWidths: {
|
|
31
|
+
sm: string;
|
|
32
|
+
md: string;
|
|
33
|
+
};
|
|
34
|
+
breakpoints: {
|
|
35
|
+
xs: string;
|
|
36
|
+
sm: string;
|
|
37
|
+
md: string;
|
|
38
|
+
lg: string;
|
|
39
|
+
xl: string;
|
|
40
|
+
};
|
|
41
|
+
components: Record<string, any>;
|
|
42
|
+
fontSizes: {
|
|
43
|
+
xs: string;
|
|
44
|
+
sm: string;
|
|
45
|
+
md: string;
|
|
46
|
+
lg: string;
|
|
47
|
+
xl: string;
|
|
48
|
+
xxl: string;
|
|
49
|
+
xxxl: string;
|
|
50
|
+
};
|
|
51
|
+
fontWeights: {
|
|
52
|
+
thin: number;
|
|
53
|
+
extralight: number;
|
|
54
|
+
light: number;
|
|
55
|
+
regular: number;
|
|
56
|
+
medium: number;
|
|
57
|
+
semibold: number;
|
|
58
|
+
bold: number;
|
|
59
|
+
extrabold: number;
|
|
60
|
+
black: number;
|
|
61
|
+
};
|
|
62
|
+
iconSizes: {
|
|
63
|
+
sm: string;
|
|
64
|
+
md: string;
|
|
65
|
+
lg: string;
|
|
66
|
+
};
|
|
67
|
+
lineHeights: {
|
|
68
|
+
sm: string;
|
|
69
|
+
md: string;
|
|
70
|
+
lg: string;
|
|
71
|
+
xl: string;
|
|
72
|
+
xxl: string;
|
|
73
|
+
xxxl: string;
|
|
74
|
+
};
|
|
75
|
+
shadowWidths: {
|
|
76
|
+
sm: string;
|
|
77
|
+
md: string;
|
|
78
|
+
};
|
|
79
|
+
shadows: {
|
|
80
|
+
sm: (color: string) => string;
|
|
81
|
+
md: (color: string) => string;
|
|
82
|
+
lg: (offsetY: string, blurRadius: string, color: string) => string;
|
|
83
|
+
};
|
|
84
|
+
space: {
|
|
85
|
+
base: number;
|
|
86
|
+
xxs: string;
|
|
87
|
+
xs: string;
|
|
88
|
+
sm: string;
|
|
89
|
+
md: string;
|
|
90
|
+
lg: string;
|
|
91
|
+
xl: string;
|
|
92
|
+
xxl: string;
|
|
93
|
+
};
|
|
94
|
+
palette: Record<string, string | Record<string | number, string>>;
|
|
95
|
+
};
|
|
96
|
+
export default theme;
|
package/package.json
CHANGED
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appquality/unguess-design-system",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "build/index.js",
|
|
6
|
-
"types": "build/index.d.ts",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/AppQuality/unguess-design-system.git"
|
|
10
|
-
},
|
|
3
|
+
"version": "0.3.1",
|
|
11
4
|
"dependencies": {
|
|
12
|
-
"@zendeskgarden/react-buttons": "^8.48.2"
|
|
5
|
+
"@zendeskgarden/react-buttons": "^8.48.2",
|
|
6
|
+
"@zendeskgarden/react-chrome": "^8.48.2",
|
|
7
|
+
"@zendeskgarden/react-theming": "^8.48.2"
|
|
13
8
|
},
|
|
14
9
|
"scripts": {
|
|
15
10
|
"start": "react-scripts start",
|
|
16
11
|
"build": "yarn run clean && rollup -c",
|
|
17
|
-
"test": "react-scripts test",
|
|
18
|
-
"eject": "react-scripts eject",
|
|
19
|
-
"storybook": "start-storybook -p 6006 -s public",
|
|
20
12
|
"build-storybook": "build-storybook -s public",
|
|
21
|
-
"
|
|
13
|
+
"storybook": "start-storybook -p 6006 -s public",
|
|
14
|
+
"clean": "rimraf build",
|
|
15
|
+
"release": "npx auto shipit --base-branch=master",
|
|
16
|
+
"test": "react-scripts test"
|
|
22
17
|
},
|
|
23
18
|
"eslintConfig": {
|
|
24
19
|
"extends": [
|
|
@@ -74,7 +69,6 @@
|
|
|
74
69
|
"@types/react": "^17.0.39",
|
|
75
70
|
"@types/react-dom": "^17.0.11",
|
|
76
71
|
"@types/styled-components": "^5.1.23",
|
|
77
|
-
"@zendeskgarden/react-theming": "^8.48.2",
|
|
78
72
|
"auto": "^10.32.6",
|
|
79
73
|
"react": "^17.0.2",
|
|
80
74
|
"react-dom": "^17.0.2",
|
|
@@ -86,5 +80,14 @@
|
|
|
86
80
|
"typescript": "^4.6.2",
|
|
87
81
|
"web-vitals": "^2.1.4",
|
|
88
82
|
"webpack": "^5.69.1"
|
|
89
|
-
}
|
|
83
|
+
},
|
|
84
|
+
"description": "Unguess design system",
|
|
85
|
+
"author": "Luca Cannarozzo (@cannarocks)",
|
|
86
|
+
"main": "build/index.js",
|
|
87
|
+
"types": "build/index.d.ts",
|
|
88
|
+
"repository": {
|
|
89
|
+
"type": "git",
|
|
90
|
+
"url": "git+https://github.com/AppQuality/unguess-design-system.git"
|
|
91
|
+
},
|
|
92
|
+
"license": "ISC"
|
|
90
93
|
}
|
package/src/index.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
2
2
|
import { IButtonProps } from "@zendeskgarden/react-buttons";
|
|
3
3
|
import { Button } from ".";
|
|
4
4
|
|
|
@@ -9,11 +9,6 @@ interface IArgs extends IButtonProps {
|
|
|
9
9
|
isEndIconRotated?: boolean;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export default {
|
|
13
|
-
title: "Button",
|
|
14
|
-
component: Button,
|
|
15
|
-
} as Meta;
|
|
16
|
-
|
|
17
12
|
const defaultArgs: IArgs = {
|
|
18
13
|
isBasic: false,
|
|
19
14
|
isPrimary: false,
|
|
@@ -39,3 +34,9 @@ Primary.args = {
|
|
|
39
34
|
children: "button",
|
|
40
35
|
onClick: () => alert("clicked!"),
|
|
41
36
|
};
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
export default {
|
|
40
|
+
title: "Button",
|
|
41
|
+
component: Button,
|
|
42
|
+
} as ComponentMeta<typeof Button>;
|
|
@@ -2,9 +2,7 @@ import { Button as ZendeskButton, IButtonProps } from '@zendeskgarden/react-butt
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
4
|
const DressBerryButton = styled(ZendeskButton)`
|
|
5
|
-
padding: 0.5rem
|
|
6
|
-
background-color: magenta;
|
|
7
|
-
color: white;
|
|
5
|
+
padding: 0.5rem 2rem;
|
|
8
6
|
`;
|
|
9
7
|
|
|
10
8
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createGlobalStyle } from "styled-components";
|
|
2
|
+
import { theme } from "../theme";
|
|
3
|
+
|
|
4
|
+
const GlobalStyle = createGlobalStyle`
|
|
5
|
+
body {
|
|
6
|
+
font-family: ${theme.fonts.system};
|
|
7
|
+
-webkit-font-smoothing: antialiased;
|
|
8
|
+
-moz-osx-font-smoothing: grayscale;
|
|
9
|
+
}`;
|
|
10
|
+
|
|
11
|
+
export default GlobalStyle;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DEFAULT_THEME } from "@zendeskgarden/react-theming";
|
|
2
|
+
|
|
3
|
+
export const theme = {
|
|
4
|
+
...DEFAULT_THEME,
|
|
5
|
+
colors: {
|
|
6
|
+
...DEFAULT_THEME.colors,
|
|
7
|
+
primaryHue: "pink",
|
|
8
|
+
foreground: "red",
|
|
9
|
+
},
|
|
10
|
+
fonts: {
|
|
11
|
+
...DEFAULT_THEME.fonts,
|
|
12
|
+
system: '"Poppins",sans-serif,Helvetica,Arial,sans-serif',
|
|
13
|
+
},
|
|
14
|
+
};
|