@situaction/traq-ui-ste 1.0.5 → 1.0.6

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/README.md CHANGED
@@ -1,3 +1,11 @@
1
1
  # Traq[UI]ste
2
2
  Tra[UI]ste est une librairie de composant crée par Situaction.
3
3
 
4
+ # React + TypeScript + Vite
5
+
6
+ This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
7
+
8
+ Currently, two official plugins are available:
9
+
10
+ - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
11
+ - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
@@ -0,0 +1,27 @@
1
+ interface ButtonProps {
2
+ /**
3
+ * Is this the principal call to action on the page?
4
+ */
5
+ primary?: boolean;
6
+ /**
7
+ * What background color to use
8
+ */
9
+ backgroundColor?: string;
10
+ /**
11
+ * How large should the button be?
12
+ */
13
+ size?: 'small' | 'medium' | 'large';
14
+ /**
15
+ * Button contents
16
+ */
17
+ label: string;
18
+ /**
19
+ * Optional click handler
20
+ */
21
+ onClick?: () => void;
22
+ }
23
+ /**
24
+ * Primary UI component for user interaction
25
+ */
26
+ export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
27
+ export {};
@@ -0,0 +1,30 @@
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import '../../styles/Button.css';const o = {
3
+ "storybook-button": "_storybook-button_rvsxb_1",
4
+ "storybook-button--primary": "_storybook-button--primary_rvsxb_11",
5
+ "storybook-button--secondary": "_storybook-button--secondary_rvsxb_16",
6
+ "storybook-button--small": "_storybook-button--small_rvsxb_22",
7
+ "storybook-button--medium": "_storybook-button--medium_rvsxb_27",
8
+ "storybook-button--large": "_storybook-button--large_rvsxb_32"
9
+ }, e = ({
10
+ primary: t = !1,
11
+ size: b = "medium",
12
+ backgroundColor: r,
13
+ label: s,
14
+ ...n
15
+ }) => {
16
+ const y = t ? o["storybook-button--primary"] : o["storybook-button--secondary"];
17
+ return /* @__PURE__ */ u(
18
+ "button",
19
+ {
20
+ type: "button",
21
+ className: [o["storybook-button"], o[`storybook-button--${b}`], y].join(" "),
22
+ style: { backgroundColor: r },
23
+ ...n,
24
+ children: s
25
+ }
26
+ );
27
+ };
28
+ export {
29
+ e as Button
30
+ };
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function Input(props: React.InputHTMLAttributes<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import '../../styles/Input.css';const u = "_input_rpqtu_1", o = {
3
+ input: u
4
+ };
5
+ function i(t) {
6
+ const { className: n, ...s } = t;
7
+ return /* @__PURE__ */ p("input", { className: `${n} ${o.input}`, ...s });
8
+ }
9
+ export {
10
+ i as Input
11
+ };
package/dist/main.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { Button } from './components/Button/Button';
2
+ export { Input } from './components/Input/Input';
package/dist/main.js ADDED
@@ -0,0 +1,6 @@
1
+ import { Button as r } from "./components/Button/Button.js";
2
+ import { Input as e } from "./components/Input/Input.js";
3
+ export {
4
+ r as Button,
5
+ e as Input
6
+ };
@@ -0,0 +1 @@
1
+ ._storybook-button_rvsxb_1{font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;border:0;border-radius:3em;cursor:pointer;display:inline-block;line-height:1}._storybook-button--primary_rvsxb_11{color:#fff;background-color:#49259e}._storybook-button--secondary_rvsxb_16{color:#333;background-color:transparent;box-shadow:#00000026 0 0 0 1px inset}._storybook-button--small_rvsxb_22{font-size:12px;padding:10px 16px}._storybook-button--medium_rvsxb_27{font-size:14px;padding:11px 20px}._storybook-button--large_rvsxb_32{font-size:16px;padding:12px 24px}
@@ -0,0 +1 @@
1
+ ._input_rpqtu_1{padding:1rem;border-radius:4px;border:1px solid #1ea7fd}
package/package.json CHANGED
@@ -1,16 +1,25 @@
1
1
  {
2
2
  "name": "@situaction/traq-ui-ste",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "library react component Situaction",
5
- "main": "dist/cjs/index.js",
5
+ "main": "dist/main.js",
6
+ "types": "dist/main.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
6
10
  "scripts": {
7
- "build": "rollup -c rollup.config.mjs && rimraf dist/esm/types/stories",
11
+ "dev": "vite",
12
+ "build": "tsc --p ./tsconfig-build.json && vite build",
8
13
  "prepublish": "npm run build",
9
14
  "publish": "npm publish --access public",
10
- "test": "echo \"Error: no test specified\" && exit 1",
15
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
16
+ "preview": "vite preview",
11
17
  "storybook": "storybook dev -p 6006",
12
18
  "build-storybook": "storybook build"
13
19
  },
20
+ "sideEffects": [
21
+ "**/*.css"
22
+ ],
14
23
  "keywords": [
15
24
  "React",
16
25
  "components",
@@ -18,46 +27,44 @@
18
27
  "TypeScript",
19
28
  "sass"
20
29
  ],
30
+ "peerDependencies": {
31
+ "react": "^18.2.0",
32
+ "react-dom": "^18.2.0"
33
+ },
21
34
  "author": "Situaction",
22
35
  "license": "ISC",
23
36
  "devDependencies": {
24
- "@chromatic-com/storybook": "^1.3.3",
25
- "@rollup/plugin-commonjs": "^25.0.7",
26
- "@rollup/plugin-node-resolve": "^15.2.3",
27
- "@rollup/plugin-typescript": "^11.1.6",
28
- "@storybook/addon-designs": "^8.0.0",
29
- "@storybook/addon-essentials": "^8.0.8",
30
- "@storybook/addon-interactions": "^8.0.8",
31
- "@storybook/addon-links": "^8.0.8",
32
- "@storybook/addon-onboarding": "^8.0.8",
33
- "@storybook/addon-webpack5-compiler-swc": "^1.0.2",
34
- "@storybook/blocks": "^8.0.8",
35
- "@storybook/react": "^8.0.8",
36
- "@storybook/react-vite": "^8.0.6",
37
- "@storybook/test": "^8.0.8",
38
- "@types/react": "^18.2.79",
39
- "css-loader": "^7.1.1",
40
- "node-sass": "^9.0.0",
41
- "react": "^18.2.0",
42
- "rimraf": "^5.0.5",
43
- "rollup": "^4.14.3",
44
- "rollup-plugin-dts": "^6.1.0",
45
- "sass": "^1.75.0",
37
+ "@chromatic-com/storybook": "^1.5.0",
38
+ "@storybook/addon-essentials": "^8.1.9",
39
+ "@storybook/addon-interactions": "^8.1.9",
40
+ "@storybook/addon-links": "^8.1.9",
41
+ "@storybook/addon-onboarding": "^8.1.9",
42
+ "@storybook/blocks": "^8.1.9",
43
+ "@storybook/react": "^8.1.9",
44
+ "@storybook/react-vite": "^8.1.9",
45
+ "@storybook/test": "^8.1.9",
46
+ "@types/node": "^20.14.2",
47
+ "@types/react": "^18.2.66",
48
+ "@types/react-dom": "^18.2.22",
49
+ "@typescript-eslint/eslint-plugin": "^7.2.0",
50
+ "@typescript-eslint/parser": "^7.2.0",
51
+ "@vitejs/plugin-react": "^4.2.1",
52
+ "css-loader": "^7.1.2",
53
+ "eslint": "^8.57.0",
54
+ "eslint-plugin-react-hooks": "^4.6.0",
55
+ "eslint-plugin-react-refresh": "^0.4.6",
56
+ "eslint-plugin-storybook": "^0.8.0",
57
+ "glob": "^10.4.1",
58
+ "sass": "^1.77.5",
46
59
  "sass-loader": "^14.2.0",
47
- "storybook": "^8.0.8",
60
+ "storybook": "^8.1.9",
48
61
  "style-loader": "^4.0.0",
49
- "tslib": "^2.6.0",
50
- "typescript": "^5.4.5"
62
+ "typescript": "^5.2.2",
63
+ "vite": "^5.2.0",
64
+ "vite-plugin-dts": "^3.9.1",
65
+ "vite-plugin-lib-inject-css": "^2.1.1"
51
66
  },
52
- "module": "dist/esm/index.js",
53
- "files": [
54
- "dist"
55
- ],
56
- "types": "dist/index.d.ts",
57
67
  "dependencies": {
58
- "react-dom": "^18.2.0",
59
- "rollup-plugin-delete": "^2.0.0",
60
- "rollup-plugin-postcss": "^4.0.2",
61
- "rollup-plugin-scss": "^4.0.0"
68
+ "storybook-figma": "^0.1.2"
62
69
  }
63
70
  }