@appquality/unguess-design-system 0.3.5 → 2.0.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/CHANGELOG.md +48 -0
- package/build/index.d.ts +2 -1
- package/build/index.js +12 -3
- package/build/stories/buttons/anchor/_types.d.ts +3 -0
- package/build/stories/buttons/anchor/index.d.ts +4 -0
- package/build/stories/buttons/anchor/index.stories.d.ts +8 -0
- package/build/stories/buttons/button/_types.d.ts +16 -0
- package/build/stories/buttons/button/index.d.ts +18 -0
- package/build/stories/buttons/button/index.stories.d.ts +19 -0
- package/build/stories/buttons/button-group/_types.d.ts +3 -0
- package/build/stories/buttons/button-group/index.d.ts +9 -0
- package/build/stories/buttons/button-group/index.stories.d.ts +11 -0
- package/build/stories/buttons/shared/_shared.d.ts +2 -0
- package/build/stories/buttons/utils/useButtonVariant.d.ts +5 -0
- package/build/stories/theme/index.d.ts +1 -1
- package/generate-story.sh +61 -0
- package/package.json +14 -11
- package/build/stories/button/index.d.ts +0 -3
- package/build/stories/button/index.stories.d.ts +0 -13
- package/rollup.config.js +0 -28
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,51 @@
|
|
|
1
|
+
# v1.0.0 (Fri Mar 04 2022)
|
|
2
|
+
|
|
3
|
+
#### 💥 Breaking Change
|
|
4
|
+
|
|
5
|
+
- Cup 427 ds buttons [#2](https://github.com/AppQuality/unguess-design-system/pull/2) ([@cannarocks](https://github.com/cannarocks))
|
|
6
|
+
|
|
7
|
+
#### ⚠️ Pushed to `master`
|
|
8
|
+
|
|
9
|
+
- update .npmignore ([@cannarocks](https://github.com/cannarocks))
|
|
10
|
+
|
|
11
|
+
#### Authors: 1
|
|
12
|
+
|
|
13
|
+
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# v1.0.0 (Fri Mar 04 2022)
|
|
18
|
+
|
|
19
|
+
#### 💥 Breaking Change
|
|
20
|
+
|
|
21
|
+
- Cup 427 ds buttons [#2](https://github.com/AppQuality/unguess-design-system/pull/2) ([@cannarocks](https://github.com/cannarocks))
|
|
22
|
+
|
|
23
|
+
#### ⚠️ Pushed to `master`
|
|
24
|
+
|
|
25
|
+
- update .npmignore ([@cannarocks](https://github.com/cannarocks))
|
|
26
|
+
|
|
27
|
+
#### Authors: 1
|
|
28
|
+
|
|
29
|
+
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
# v1.0.0 (Fri Mar 04 2022)
|
|
34
|
+
|
|
35
|
+
#### 💥 Breaking Change
|
|
36
|
+
|
|
37
|
+
- Cup 427 ds buttons [#2](https://github.com/AppQuality/unguess-design-system/pull/2) ([@cannarocks](https://github.com/cannarocks))
|
|
38
|
+
|
|
39
|
+
#### ⚠️ Pushed to `master`
|
|
40
|
+
|
|
41
|
+
- update .npmignore ([@cannarocks](https://github.com/cannarocks))
|
|
42
|
+
|
|
43
|
+
#### Authors: 1
|
|
44
|
+
|
|
45
|
+
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
1
49
|
# v0.3.5 (Thu Mar 03 2022)
|
|
2
50
|
|
|
3
51
|
#### ⚠️ Pushed to `master`
|
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -42,15 +42,24 @@ function __makeTemplateObject(cooked, raw) {
|
|
|
42
42
|
return cooked;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
var theme = __assign(__assign({}, reactTheming.DEFAULT_THEME), { colors: __assign(__assign({}, reactTheming.DEFAULT_THEME.colors), { primaryHue: "
|
|
45
|
+
var theme = __assign(__assign({}, reactTheming.DEFAULT_THEME), { colors: __assign(__assign({}, reactTheming.DEFAULT_THEME.colors), { primaryHue: "#003A57" }), fonts: __assign(__assign({}, reactTheming.DEFAULT_THEME.fonts), { system: '"Poppins",sans-serif,Helvetica,Arial,sans-serif' }) });
|
|
46
46
|
|
|
47
47
|
var GlobalStyle = styled.createGlobalStyle(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\nbody {\n font-family: ", ";\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }"], ["\nbody {\n font-family: ", ";\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }"])), theme.fonts.system);
|
|
48
48
|
var templateObject_1$1;
|
|
49
49
|
|
|
50
|
-
var
|
|
51
|
-
|
|
50
|
+
var UgButton = styled__default["default"](reactButtons.Button)(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* Buttons let users take action quickly. Use a Button to enable actions or decisions that are important to a user’s workflow.
|
|
54
|
+
*/
|
|
55
|
+
var Button = function (props) { return jsxRuntime.jsx(UgButton, __assign({}, props)); };
|
|
56
|
+
Button.StartIcon = UgButton.StartIcon;
|
|
57
|
+
Button.EndIcon = UgButton.EndIcon;
|
|
52
58
|
var templateObject_1;
|
|
53
59
|
|
|
60
|
+
var Anchor = function (props) { return jsxRuntime.jsx(reactButtons.Anchor, __assign({}, props)); };
|
|
61
|
+
|
|
62
|
+
exports.Anchor = Anchor;
|
|
54
63
|
exports.Button = Button;
|
|
55
64
|
exports.GlobalStyle = GlobalStyle;
|
|
56
65
|
exports.theme = theme;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { AnchorArgs } from "./_types";
|
|
4
|
+
export declare const Basic: Story<AnchorArgs>;
|
|
5
|
+
export declare const Danger: Story<AnchorArgs>;
|
|
6
|
+
export declare const External: Story<AnchorArgs>;
|
|
7
|
+
declare const _default: ComponentMeta<(props: AnchorArgs) => JSX.Element>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IButtonProps, IButtonStartIconProps, IButtonEndIconProps } from "@zendeskgarden/react-buttons";
|
|
2
|
+
export interface ButtonArgs extends IButtonProps {
|
|
3
|
+
/**
|
|
4
|
+
It's a boolean value that determines whether the button has an icon on the left side.
|
|
5
|
+
*/
|
|
6
|
+
hasStartIcon?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
It's a boolean value that determines whether the button has an icon on the right side.
|
|
9
|
+
*/
|
|
10
|
+
hasEndIcon?: boolean;
|
|
11
|
+
isStartIconRotated?: boolean;
|
|
12
|
+
isEndIconRotated?: boolean;
|
|
13
|
+
StartIcon?: IButtonStartIconProps;
|
|
14
|
+
EndIcon?: IButtonEndIconProps;
|
|
15
|
+
variant?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonArgs } from "./_types";
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* Buttons let users take action quickly. Use a Button to enable actions or decisions that are important to a user’s workflow.
|
|
6
|
+
*/
|
|
7
|
+
declare const Button: {
|
|
8
|
+
(props: ButtonArgs): JSX.Element;
|
|
9
|
+
StartIcon: {
|
|
10
|
+
(props: import("@zendeskgarden/react-buttons").IButtonStartIconProps): JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
EndIcon: {
|
|
14
|
+
(props: import("@zendeskgarden/react-buttons").IButtonEndIconProps): JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export { Button };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { ButtonArgs } from "./_types";
|
|
4
|
+
export declare const Default: Story<ButtonArgs>;
|
|
5
|
+
export declare const Basic: Story<ButtonArgs>;
|
|
6
|
+
export declare const Primary: Story<ButtonArgs>;
|
|
7
|
+
export declare const WithIcon: Story<ButtonArgs>;
|
|
8
|
+
declare const _default: ComponentMeta<{
|
|
9
|
+
(props: ButtonArgs): JSX.Element;
|
|
10
|
+
StartIcon: {
|
|
11
|
+
(props: import("@zendeskgarden/react-buttons").IButtonStartIconProps): JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
EndIcon: {
|
|
15
|
+
(props: import("@zendeskgarden/react-buttons").IButtonEndIconProps): JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
}>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonGroupArgs } from "./_types";
|
|
3
|
+
/**
|
|
4
|
+
A Button group lets users make a selection from a set of options.
|
|
5
|
+
|
|
6
|
+
This is a legacy component and may be deprecated in the future. Garden does not presently recommend the use of Button groups.
|
|
7
|
+
**/
|
|
8
|
+
declare const ButtonGroup: (props: ButtonGroupArgs) => JSX.Element;
|
|
9
|
+
export { ButtonGroup };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
+
import { ButtonGroupArgs } from "./_types";
|
|
4
|
+
interface ButtonGroupProps extends ButtonGroupArgs {
|
|
5
|
+
items: any[];
|
|
6
|
+
}
|
|
7
|
+
export declare const TwoItems: Story<ButtonGroupProps>;
|
|
8
|
+
export declare const WithBorders: Story<ButtonGroupProps>;
|
|
9
|
+
export declare const RoundedItems: Story<ButtonGroupProps>;
|
|
10
|
+
declare const _default: ComponentMeta<(props: ButtonGroupArgs) => JSX.Element>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +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"
|
|
61
|
+
2606:50c0:8003::154
|
package/package.json
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appquality/unguess-design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"dependencies": {
|
|
5
|
+
"@zendeskgarden/react-breadcrumbs": "^8.49.0",
|
|
5
6
|
"@zendeskgarden/react-buttons": "^8.48.2",
|
|
6
7
|
"@zendeskgarden/react-chrome": "^8.48.2",
|
|
7
|
-
"@zendeskgarden/react-
|
|
8
|
+
"@zendeskgarden/react-dropdowns": "^8.49.0",
|
|
9
|
+
"@zendeskgarden/react-tooltips": "^8.49.0",
|
|
10
|
+
"@zendeskgarden/react-typography": "^8.49.0",
|
|
11
|
+
"@zendeskgarden/svg-icons": "^6.31.1"
|
|
8
12
|
},
|
|
9
13
|
"scripts": {
|
|
10
14
|
"start": "react-scripts start",
|
|
11
15
|
"build": "yarn run clean && rollup -c",
|
|
12
|
-
"build-storybook": "build-storybook
|
|
13
|
-
"storybook": "start-storybook -p 6006
|
|
16
|
+
"build-storybook": "build-storybook",
|
|
17
|
+
"storybook": "start-storybook -p 6006",
|
|
14
18
|
"clean": "rimraf build",
|
|
15
19
|
"release": "npx auto shipit --base-branch=master",
|
|
16
20
|
"test": "react-scripts test"
|
|
@@ -44,20 +48,18 @@
|
|
|
44
48
|
]
|
|
45
49
|
},
|
|
46
50
|
"peerDependencies": {
|
|
51
|
+
"@zendeskgarden/react-theming": "^8.48.2",
|
|
47
52
|
"react": "^17.0.2",
|
|
48
53
|
"react-dom": "^17.0.2",
|
|
49
54
|
"styled-components": "^5.3.3"
|
|
50
55
|
},
|
|
51
56
|
"devDependencies": {
|
|
57
|
+
"@babel/core": "^7.17.5",
|
|
52
58
|
"@rollup/plugin-image": "^2.1.1",
|
|
53
59
|
"@storybook/addon-actions": "^6.4.19",
|
|
54
60
|
"@storybook/addon-essentials": "^6.4.19",
|
|
55
61
|
"@storybook/addon-interactions": "^6.4.19",
|
|
56
62
|
"@storybook/addon-links": "^6.4.19",
|
|
57
|
-
"@storybook/builder-webpack5": "^6.4.19",
|
|
58
|
-
"@storybook/manager-webpack5": "^6.4.19",
|
|
59
|
-
"@storybook/node-logger": "^6.4.19",
|
|
60
|
-
"@storybook/preset-create-react-app": "^4.0.1",
|
|
61
63
|
"@storybook/react": "^6.4.19",
|
|
62
64
|
"@storybook/testing-library": "^0.0.9",
|
|
63
65
|
"@svgr/rollup": "^6.2.1",
|
|
@@ -69,17 +71,18 @@
|
|
|
69
71
|
"@types/react": "^17.0.39",
|
|
70
72
|
"@types/react-dom": "^17.0.11",
|
|
71
73
|
"@types/styled-components": "^5.1.23",
|
|
74
|
+
"@zendeskgarden/react-theming": "^8.48.2",
|
|
72
75
|
"auto": "^10.32.6",
|
|
76
|
+
"babel-loader": "^8.2.3",
|
|
73
77
|
"react": "^17.0.2",
|
|
74
78
|
"react-dom": "^17.0.2",
|
|
75
|
-
"react-scripts": "
|
|
79
|
+
"react-scripts": "4.0.3",
|
|
76
80
|
"rimraf": "^3.0.2",
|
|
77
81
|
"rollup": "^2.68.0",
|
|
78
82
|
"rollup-plugin-typescript2": "^0.31.2",
|
|
79
83
|
"styled-components": "^5.3.3",
|
|
80
84
|
"typescript": "^4.6.2",
|
|
81
|
-
"web-vitals": "^2.1.4"
|
|
82
|
-
"webpack": "^5.69.1"
|
|
85
|
+
"web-vitals": "^2.1.4"
|
|
83
86
|
},
|
|
84
87
|
"description": "Unguess design system",
|
|
85
88
|
"author": "Luca Cannarozzo (@cannarocks)",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ComponentMeta, Story } from "@storybook/react";
|
|
3
|
-
import { IButtonProps } from "@zendeskgarden/react-buttons";
|
|
4
|
-
interface IArgs extends IButtonProps {
|
|
5
|
-
hasStartIcon?: boolean;
|
|
6
|
-
hasEndIcon?: boolean;
|
|
7
|
-
isStartIconRotated?: boolean;
|
|
8
|
-
isEndIconRotated?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare const Basic: Story<IArgs>;
|
|
11
|
-
export declare const Primary: Story<IArgs>;
|
|
12
|
-
declare const _default: ComponentMeta<(props: IButtonProps) => JSX.Element>;
|
|
13
|
-
export default _default;
|
package/rollup.config.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// rollup.config.js
|
|
2
|
-
import image from "@rollup/plugin-image";
|
|
3
|
-
import svgr from "@svgr/rollup";
|
|
4
|
-
import typescript from "rollup-plugin-typescript2";
|
|
5
|
-
|
|
6
|
-
// eslint-disable-next-line import/no-anonymous-default-export
|
|
7
|
-
export default {
|
|
8
|
-
input: "src/index.tsx",
|
|
9
|
-
output: {
|
|
10
|
-
dir: "build",
|
|
11
|
-
format: "cjs",
|
|
12
|
-
},
|
|
13
|
-
plugins: [
|
|
14
|
-
image(),
|
|
15
|
-
svgr({
|
|
16
|
-
svgoConfig: {
|
|
17
|
-
plugins: [
|
|
18
|
-
{
|
|
19
|
-
active: false,
|
|
20
|
-
name: "removeDimensions",
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
},
|
|
24
|
-
}),
|
|
25
|
-
typescript(),
|
|
26
|
-
],
|
|
27
|
-
external: ["react", "react-dom", "styled-components"],
|
|
28
|
-
};
|