@digitalpromise/design 1.0.1-next.1 → 1.0.1-next.2

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.
@@ -0,0 +1,7 @@
1
+ import type { ButtonHTMLAttributes } from "react";
2
+ type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
3
+ state?: "inverse" | "danger" | "decolor";
4
+ };
5
+ export default function Button({ className, state, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAEjD,KAAK,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IACzD,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;CAC5C,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC3B,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACX,EAAE,WAAW,2CAQb"}
@@ -0,0 +1,3 @@
1
+ import { default as Button } from "./components/button";
2
+ export { Button };
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,MAAM,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,12 +1,53 @@
1
1
  {
2
2
  "name": "@digitalpromise/design",
3
3
  "private": false,
4
- "version": "1.0.1-next.1",
4
+ "version": "1.0.1-next.2",
5
5
  "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
6
8
  "files": [
7
- "src/components/**",
8
- "dist/**"
9
+ "dist"
9
10
  ],
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js",
15
+ "require": "./dist/index.cjs"
16
+ }
17
+ },
18
+ "devDependencies": {
19
+ "@chromatic-com/storybook": "^4.1.1",
20
+ "@storybook/addon-docs": "^9.1.5",
21
+ "@storybook/addon-links": "^9.1.5",
22
+ "@storybook/react-vite": "^9.1.5",
23
+ "@tailwindcss/vite": "^4.1.13",
24
+ "@testing-library/jest-dom": "^6.8.0",
25
+ "@testing-library/react": "^16.3.0",
26
+ "@types/jest": "^30.0.0",
27
+ "@types/react": "^19.1.12",
28
+ "@types/react-dom": "^19.1.9",
29
+ "@typescript-eslint/eslint-plugin": "^8.43.0",
30
+ "@typescript-eslint/parser": "^8.43.0",
31
+ "@vitejs/plugin-react-swc": "^4.0.1",
32
+ "eslint": "^9.35.0",
33
+ "eslint-plugin-react-hooks": "^5.2.0",
34
+ "eslint-plugin-react-refresh": "^0.4.20",
35
+ "eslint-plugin-storybook": "^9.1.5",
36
+ "jsdom": "^26.1.0",
37
+ "react": "^19.1.1",
38
+ "react-dom": "^19.1.1",
39
+ "storybook": "^9.1.5",
40
+ "style-dictionary": "^5.0.4",
41
+ "tailwindcss": "^4.1.13",
42
+ "typescript": "^5.9.2",
43
+ "vite": "^7.1.5",
44
+ "vitest": "^3.2.4"
45
+ },
46
+ "peerDependencies": {
47
+ "react": "^19.1.1",
48
+ "react-dom": "^19.1.1",
49
+ "tailwindcss": "^4.1.13"
50
+ },
10
51
  "scripts": {
11
52
  "postinstall": "npm run build",
12
53
  "style-dictionary": "style-dictionary build",
@@ -14,36 +55,11 @@
14
55
  "prestorybook": "style-dictionary build",
15
56
  "prebuild-storybook": "style-dictionary build",
16
57
  "dev": "vite",
17
- "build": "tsc && vite build",
58
+ "build": "vite build && tsc",
18
59
  "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
19
60
  "preview": "vite preview",
20
61
  "storybook": "storybook dev -p 6006",
21
- "build-storybook": "storybook build"
22
- },
23
- "dependencies": {
24
- "react": "^19.1.0",
25
- "react-dom": "^19.1.0"
26
- },
27
- "devDependencies": {
28
- "@chromatic-com/storybook": "^4.0.1",
29
- "@storybook/addon-docs": "^9.0.17",
30
- "@storybook/addon-links": "^9.0.17",
31
- "@storybook/react-vite": "^9.0.17",
32
- "@tailwindcss/vite": "^4.0.12",
33
- "@types/react": "^19.1.8",
34
- "@types/react-dom": "^19.1.6",
35
- "@typescript-eslint/eslint-plugin": "^8.37.0",
36
- "@typescript-eslint/parser": "^8.37.0",
37
- "@vitejs/plugin-react-swc": "^3.3.2",
38
- "eslint": "^9.31.0",
39
- "eslint-plugin-react-hooks": "^5.2.0",
40
- "eslint-plugin-react-refresh": "^0.4.3",
41
- "eslint-plugin-storybook": "^9.0.17",
42
- "storybook": "^9.0.17",
43
- "style-dictionary": "^5.0.1",
44
- "tailwindcss": "^4.0.12",
45
- "typescript": "^5.0.2",
46
- "vite": "^7.0.5"
47
- },
48
- "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
49
- }
62
+ "build-storybook": "storybook build",
63
+ "test": "vitest"
64
+ }
65
+ }
@@ -1,49 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react-vite";
2
-
3
- import { Button } from "../index";
4
-
5
- // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
6
- const meta = {
7
- title: "Button",
8
- component: Button,
9
- parameters: {
10
- // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
11
- layout: "centered",
12
- },
13
- // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
14
- tags: ["autodocs"],
15
- args: {
16
- disabled: false,
17
- },
18
- } satisfies Meta<typeof Button>;
19
-
20
- export default meta;
21
- type Story = StoryObj<typeof meta>;
22
-
23
- // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
24
- export const Primary: Story = {
25
- args: {
26
- children: "Button",
27
- },
28
- };
29
-
30
- export const Danger: Story = {
31
- args: {
32
- children: "Dangerous action!",
33
- state: "danger",
34
- },
35
- };
36
-
37
- export const Inverse: Story = {
38
- args: {
39
- children: "Secondary Style",
40
- state: "inverse",
41
- },
42
- };
43
-
44
- export const Decolor: Story = {
45
- args: {
46
- children: "Decolored Button",
47
- state: "decolor",
48
- },
49
- };
@@ -1,19 +0,0 @@
1
- import type { ButtonHTMLAttributes } from "react"
2
-
3
- type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
4
- state?: "inverse" | "danger" | "decolor",
5
- }
6
-
7
- export default function Button({
8
- className,
9
- state,
10
- ...props
11
- }: ButtonProps) {
12
- return (
13
- <button
14
- data-state={state}
15
- className="btn"
16
- {...props}
17
- />
18
- )
19
- }
File without changes
File without changes