@situaction/traq-ui-ste 1.0.4 → 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 +8 -0
- package/dist/components/Button/Button.d.ts +27 -0
- package/dist/components/Button/Button.js +30 -0
- package/dist/components/Input/Input.d.ts +2 -0
- package/dist/components/Input/Input.js +11 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +6 -0
- package/dist/styles/Button.css +1 -0
- package/dist/styles/Input.css +1 -0
- package/package.json +45 -37
- package/dist/esm/assets/output-DIVA_0WZ.css +0 -1
- package/dist/esm/index.js +0 -4209
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/types/components/Button/Button.d.ts +0 -10
- package/dist/esm/types/components/Button/index.d.ts +0 -1
- package/dist/esm/types/components/index.d.ts +0 -1
- package/dist/esm/types/index.d.ts +0 -1
- package/dist/index.d.ts +0 -12
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,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
package/dist/main.js
ADDED
|
@@ -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.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "library react component Situaction",
|
|
5
|
-
"main": "dist/
|
|
5
|
+
"main": "dist/main.js",
|
|
6
|
+
"types": "dist/main.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
6
10
|
"scripts": {
|
|
7
|
-
"
|
|
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
|
-
"
|
|
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,45 +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.
|
|
25
|
-
"@
|
|
26
|
-
"@
|
|
27
|
-
"@
|
|
28
|
-
"@storybook/addon-
|
|
29
|
-
"@storybook/
|
|
30
|
-
"@storybook/
|
|
31
|
-
"@storybook/
|
|
32
|
-
"@storybook/
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
39
|
-
"css-loader": "^7.1.
|
|
40
|
-
"
|
|
41
|
-
"react": "^
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"sass": "^1.
|
|
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.
|
|
60
|
+
"storybook": "^8.1.9",
|
|
48
61
|
"style-loader": "^4.0.0",
|
|
49
|
-
"
|
|
50
|
-
"
|
|
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
|
-
"
|
|
59
|
-
"rollup-plugin-delete": "^2.0.0",
|
|
60
|
-
"rollup-plugin-scss": "^4.0.0"
|
|
68
|
+
"storybook-figma": "^0.1.2"
|
|
61
69
|
}
|
|
62
70
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.storybook-button{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{color:#fff;background-color:#49259e}.storybook-button--secondary{color:#333;background-color:rgba(0,0,0,0);box-shadow:rgba(0,0,0,.15) 0 0 0 1px inset}.storybook-button--small{font-size:12px;padding:10px 16px}.storybook-button--medium{font-size:14px;padding:11px 20px}.storybook-button--large{font-size:16px;padding:12px 24px}
|