@undp/carbon-library 1.0.174-CARBON-329.0 → 1.0.174-carbon-lib-test.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +4 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/stories/Button.d.ts +29 -0
- package/dist/cjs/types/stories/TestComponent.stories.d.ts +19 -0
- package/dist/esm/index.js +4 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/stories/Button.d.ts +29 -0
- package/dist/esm/types/stories/TestComponent.stories.d.ts +19 -0
- package/package.json +23 -2
@@ -0,0 +1,29 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './button.css';
|
3
|
+
interface ButtonProps {
|
4
|
+
/**
|
5
|
+
* Is this the principal call to action on the page?
|
6
|
+
*/
|
7
|
+
primary?: boolean;
|
8
|
+
/**
|
9
|
+
* What background color to use
|
10
|
+
*/
|
11
|
+
backgroundColor?: string;
|
12
|
+
/**
|
13
|
+
* How large should the button be?
|
14
|
+
*/
|
15
|
+
size?: 'small' | 'medium' | 'large';
|
16
|
+
/**
|
17
|
+
* Button contents
|
18
|
+
*/
|
19
|
+
label: string;
|
20
|
+
/**
|
21
|
+
* Optional click handler
|
22
|
+
*/
|
23
|
+
onClick?: () => void;
|
24
|
+
}
|
25
|
+
/**
|
26
|
+
* Primary UI component for user interaction
|
27
|
+
*/
|
28
|
+
export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => React.JSX.Element;
|
29
|
+
export {};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
3
|
+
import "antd/dist/antd.css";
|
4
|
+
declare const meta: {
|
5
|
+
title: string;
|
6
|
+
component: (props: any) => import("react").JSX.Element;
|
7
|
+
parameters: {
|
8
|
+
layout: string;
|
9
|
+
};
|
10
|
+
tags: string[];
|
11
|
+
argTypes: {
|
12
|
+
backgroundColor: {
|
13
|
+
control: string;
|
14
|
+
};
|
15
|
+
};
|
16
|
+
};
|
17
|
+
export default meta;
|
18
|
+
type Story = StoryObj<typeof meta>;
|
19
|
+
export declare const Primary: Story;
|
package/package.json
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "@undp/carbon-library",
|
3
|
-
"version": "1.0.174-
|
3
|
+
"version": "1.0.174-carbon-lib-test.1",
|
4
4
|
"description": "Shared Library of tools for Carbon Credits applications ecosystem for ExO and and HQ/GEF",
|
5
5
|
"type": "module",
|
6
6
|
"scripts": {
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1",
|
8
8
|
"build": "rollup -c --bundleConfigAsCjs",
|
9
|
-
"prepare": "npm run build"
|
9
|
+
"prepare": "npm run build",
|
10
|
+
"storybook": "storybook dev -p 6006",
|
11
|
+
"build-storybook": "storybook build"
|
10
12
|
},
|
11
13
|
"keywords": [],
|
12
14
|
"author": "",
|
@@ -15,6 +17,7 @@
|
|
15
17
|
"@rollup/plugin-commonjs": "^25.0.0",
|
16
18
|
"@rollup/plugin-node-resolve": "^15.0.2",
|
17
19
|
"@rollup/plugin-typescript": "^11.1.1",
|
20
|
+
"@storybook/addon-styling-webpack": "^0.0.5",
|
18
21
|
"@undp/carbon-credit-calculator": "^1.1.1",
|
19
22
|
"node-sass": "^7.0.3",
|
20
23
|
"postcss": "^8.4.23",
|
@@ -28,6 +31,19 @@
|
|
28
31
|
},
|
29
32
|
"devDependencies": {
|
30
33
|
"@ant-design/icons": "^5.2.5",
|
34
|
+
"@babel/preset-env": "^7.23.3",
|
35
|
+
"@babel/preset-react": "^7.23.3",
|
36
|
+
"@babel/preset-typescript": "^7.23.3",
|
37
|
+
"@storybook/addon-essentials": "7.5.3",
|
38
|
+
"@storybook/addon-interactions": "7.5.3",
|
39
|
+
"@storybook/addon-links": "7.5.3",
|
40
|
+
"@storybook/addon-onboarding": "1.0.8",
|
41
|
+
"@storybook/blocks": "7.5.3",
|
42
|
+
"@storybook/preset-ant-design": "^0.0.2",
|
43
|
+
"@storybook/preset-create-react-app": "^7.5.3",
|
44
|
+
"@storybook/react": "7.5.3",
|
45
|
+
"@storybook/react-webpack5": "7.5.3",
|
46
|
+
"@storybook/testing-library": "0.2.2",
|
31
47
|
"@types/luxon": "^3.1.0",
|
32
48
|
"@types/mapbox-gl": "^2.7.10",
|
33
49
|
"@types/react": "^18.0.25",
|
@@ -37,13 +53,18 @@
|
|
37
53
|
"axios": "^1.1.3",
|
38
54
|
"buffer": "^6.0.3",
|
39
55
|
"class-transformer": "^0.5.1",
|
56
|
+
"css-loader": "^6.8.1",
|
40
57
|
"luxon": "^3.2.1",
|
41
58
|
"mapbox-gl": "^2.11.1",
|
42
59
|
"react": "^18.2.0",
|
43
60
|
"react-apexcharts": "^1.4.0",
|
44
61
|
"react-bootstrap-icons": "^1.10.2",
|
62
|
+
"react-dom": "18.2.0",
|
45
63
|
"react-mapbox-gl": "^5.1.1",
|
46
64
|
"react-phone-number-input": "^3.2.12",
|
65
|
+
"sass-loader": "^13.3.2",
|
66
|
+
"storybook": "7.5.3",
|
67
|
+
"style-loader": "^3.3.3",
|
47
68
|
"validator": "^13.9.0"
|
48
69
|
},
|
49
70
|
"peerDependencies": {
|