@brosco/ui 0.0.15 → 0.0.17
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 +1 -73
- package/dist/_css/styles.css +1 -0
- package/dist/_css/utils.css +1 -0
- package/dist/_css/variables.css +1 -3
- package/dist/button/button-C6PhxKcd.js +12 -0
- package/dist/button/button-D4ZNioAF.css +2 -0
- package/dist/button/button.d.ts +1 -1
- package/dist/button/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/spinner/index.d.ts +1 -0
- package/dist/spinner/index.js +16 -0
- package/dist/spinner/spinner.d.ts +4 -0
- package/package.json +11 -5
- package/dist/_css/globals.css +0 -8
- package/dist/button/button-BuVpJ3KR.js +0 -9
- package/dist/button/button-D8AICVq0.css +0 -1
- package/dist/input/index.d.ts +0 -1
- package/dist/input/index.js +0 -2
- package/dist/input/input-BkZq7fEa.js +0 -8
- package/dist/input/input-Ditq2Ypm.css +0 -1
- package/dist/input/input.d.ts +0 -3
package/README.md
CHANGED
|
@@ -1,73 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
-
|
|
5
|
-
Currently, two official plugins are available:
|
|
6
|
-
|
|
7
|
-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
|
|
8
|
-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
|
|
9
|
-
|
|
10
|
-
## React Compiler
|
|
11
|
-
|
|
12
|
-
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
|
|
13
|
-
|
|
14
|
-
## Expanding the ESLint configuration
|
|
15
|
-
|
|
16
|
-
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
17
|
-
|
|
18
|
-
```js
|
|
19
|
-
export default defineConfig([
|
|
20
|
-
globalIgnores(["dist"]),
|
|
21
|
-
{
|
|
22
|
-
files: ["**/*.{ts,tsx}"],
|
|
23
|
-
extends: [
|
|
24
|
-
// Other configs...
|
|
25
|
-
|
|
26
|
-
// Remove tseslint.configs.recommended and replace with this
|
|
27
|
-
tseslint.configs.recommendedTypeChecked,
|
|
28
|
-
// Alternatively, use this for stricter rules
|
|
29
|
-
tseslint.configs.strictTypeChecked,
|
|
30
|
-
// Optionally, add this for stylistic rules
|
|
31
|
-
tseslint.configs.stylisticTypeChecked,
|
|
32
|
-
|
|
33
|
-
// Other configs...
|
|
34
|
-
],
|
|
35
|
-
languageOptions: {
|
|
36
|
-
parserOptions: {
|
|
37
|
-
project: ["./tsconfig.node.json", "./tsconfig.app.json"],
|
|
38
|
-
tsconfigRootDir: import.meta.dirname,
|
|
39
|
-
},
|
|
40
|
-
// other options...
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
])
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
You can also install [eslint-plugin-react-x](https://npmx.dev/package/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://npmx.dev/package/eslint-plugin-react-dom) for React-specific lint rules:
|
|
47
|
-
|
|
48
|
-
```js
|
|
49
|
-
// eslint.config.js
|
|
50
|
-
import reactDom from "eslint-plugin-react-dom"
|
|
51
|
-
import reactX from "eslint-plugin-react-x"
|
|
52
|
-
|
|
53
|
-
export default defineConfig([
|
|
54
|
-
globalIgnores(["dist"]),
|
|
55
|
-
{
|
|
56
|
-
files: ["**/*.{ts,tsx}"],
|
|
57
|
-
extends: [
|
|
58
|
-
// Other configs...
|
|
59
|
-
// Enable lint rules for React
|
|
60
|
-
reactX.configs["recommended-typescript"],
|
|
61
|
-
// Enable lint rules for React DOM
|
|
62
|
-
reactDom.configs.recommended,
|
|
63
|
-
],
|
|
64
|
-
languageOptions: {
|
|
65
|
-
parserOptions: {
|
|
66
|
-
project: ["./tsconfig.node.json", "./tsconfig.app.json"],
|
|
67
|
-
tsconfigRootDir: import.meta.dirname,
|
|
68
|
-
},
|
|
69
|
-
// other options...
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
])
|
|
73
|
-
```
|
|
1
|
+
## UI Components based on Base UI
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "tailwindcss";@import "./variables.css";@import "./utils.css";:root{--eclipse:var(--color-zinc-900);--background:var(--color-white);--foreground:var(--eclipse);--muted:var(--color-zinc-500);--primary:var(--color-blue-500);--secondary:var(--eclipse);--success:var(--color-green-600);--danger:var(--color-red-500)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@utility status-disabled{@apply pointer-events-none opacity-50;}@utility status-pending{@apply pointer-events-none;}@utility focus-visible-ring-*{&:focus-visible:not([data-pending]) { --tw-ring-color: --value([*]); --tw-ring-color: --value(--color-*, --default(currentcolor)); @apply ring-2 ring-offset-2; }}
|
package/dist/_css/variables.css
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
:
|
|
2
|
-
--background: yellow;
|
|
3
|
-
}
|
|
1
|
+
@theme{--color-background: var(--background); --color-foreground: var(--foreground); --color-muted: var(--muted); --color-primary: var(--primary); --color-secondary: var(--secondary); --color-success: var(--success); --color-danger: var(--danger);}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Spinner as e } from "../spinner/index.js";
|
|
2
|
+
import { Button as t } from "@base-ui/react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import './button-D4ZNioAF.css';//#region src/button/button.module.css
|
|
5
|
+
var i = {}, a = ({ children: a, icon: o, isPending: s, ...c }) => /* @__PURE__ */ r(t, {
|
|
6
|
+
className: i.wrapper,
|
|
7
|
+
"data-pending": s,
|
|
8
|
+
...c,
|
|
9
|
+
children: [s ? /* @__PURE__ */ n(e, {}) : o, a]
|
|
10
|
+
});
|
|
11
|
+
//#endregion
|
|
12
|
+
export { a as t };
|
package/dist/button/button.d.ts
CHANGED
|
@@ -4,4 +4,4 @@ export type ButtonProps = BaseButtonProps & {
|
|
|
4
4
|
icon?: ReactNode;
|
|
5
5
|
isPending?: boolean;
|
|
6
6
|
};
|
|
7
|
-
export declare const Button: ({ children, ...props }: ButtonProps) => import("react").JSX.Element;
|
|
7
|
+
export declare const Button: ({ children, icon, isPending, ...props }: ButtonProps) => import("react").JSX.Element;
|
package/dist/button/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./button-
|
|
1
|
+
import { t as e } from "./button-C6PhxKcd.js";
|
|
2
2
|
export { e as Button };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from "./button";
|
|
2
|
-
export * from "./
|
|
2
|
+
export * from "./spinner";
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./
|
|
3
|
-
export {
|
|
1
|
+
import { Spinner as e } from "./spinner/index.js";
|
|
2
|
+
import { t } from "./button/button-C6PhxKcd.js";
|
|
3
|
+
export { t as Button, e as Spinner };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./spinner";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
//#region src/spinner/spinner.tsx
|
|
3
|
+
var t = ({ size: t = 24 }) => /* @__PURE__ */ e("svg", {
|
|
4
|
+
stroke: "currentColor",
|
|
5
|
+
fill: "currentColor",
|
|
6
|
+
"stroke-width": "0",
|
|
7
|
+
version: "1.1",
|
|
8
|
+
viewBox: "0 0 16 16",
|
|
9
|
+
height: t,
|
|
10
|
+
width: t,
|
|
11
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12
|
+
className: "animate-spin",
|
|
13
|
+
children: /* @__PURE__ */ e("path", { d: "M16 8c-0.020-1.045-0.247-2.086-0.665-3.038-0.417-0.953-1.023-1.817-1.766-2.53s-1.624-1.278-2.578-1.651c-0.953-0.374-1.978-0.552-2.991-0.531-1.013 0.020-2.021 0.24-2.943 0.646-0.923 0.405-1.758 0.992-2.449 1.712s-1.237 1.574-1.597 2.497c-0.361 0.923-0.533 1.914-0.512 2.895 0.020 0.981 0.234 1.955 0.627 2.847 0.392 0.892 0.961 1.7 1.658 2.368s1.523 1.195 2.416 1.543c0.892 0.348 1.851 0.514 2.799 0.493 0.949-0.020 1.89-0.227 2.751-0.608 0.862-0.379 1.642-0.929 2.287-1.604s1.154-1.472 1.488-2.335c0.204-0.523 0.342-1.069 0.415-1.622 0.019 0.001 0.039 0.002 0.059 0.002 0.552 0 1-0.448 1-1 0-0.028-0.001-0.056-0.004-0.083h0.004zM14.411 10.655c-0.367 0.831-0.898 1.584-1.55 2.206s-1.422 1.112-2.254 1.434c-0.832 0.323-1.723 0.476-2.608 0.454-0.884-0.020-1.759-0.215-2.56-0.57-0.801-0.354-1.526-0.867-2.125-1.495s-1.071-1.371-1.38-2.173c-0.31-0.801-0.457-1.66-0.435-2.512s0.208-1.694 0.551-2.464c0.342-0.77 0.836-1.468 1.441-2.044s1.321-1.029 2.092-1.326c0.771-0.298 1.596-0.438 2.416-0.416s1.629 0.202 2.368 0.532c0.74 0.329 1.41 0.805 1.963 1.387s0.988 1.27 1.272 2.011c0.285 0.74 0.418 1.532 0.397 2.32h0.004c-0.002 0.027-0.004 0.055-0.004 0.083 0 0.516 0.39 0.94 0.892 0.994-0.097 0.544-0.258 1.075-0.481 1.578z" })
|
|
14
|
+
});
|
|
15
|
+
//#endregion
|
|
16
|
+
export { t as Spinner };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brosco/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"types": "./dist/button/index.d.ts",
|
|
15
15
|
"import": "./dist/button/index.js"
|
|
16
16
|
},
|
|
17
|
-
"./
|
|
18
|
-
"types": "./dist/
|
|
19
|
-
"import": "./dist/
|
|
17
|
+
"./spinner": {
|
|
18
|
+
"types": "./dist/spinner/index.d.ts",
|
|
19
|
+
"import": "./dist/spinner/index.js"
|
|
20
20
|
},
|
|
21
|
-
"./
|
|
21
|
+
"./styles.css": "./dist/_css/styles.css"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"dev": "vite",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@eslint/js": "^10.0.1",
|
|
36
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
36
37
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
37
38
|
"@types/node": "^24.13.3",
|
|
38
39
|
"@types/react": "^19.2.18",
|
|
@@ -42,13 +43,18 @@
|
|
|
42
43
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
43
44
|
"eslint-plugin-react-refresh": "^0.5.6",
|
|
44
45
|
"globals": "^17.12.0",
|
|
46
|
+
"lightningcss": "^1.33.0",
|
|
45
47
|
"prettier": "^3.9.6",
|
|
46
48
|
"prettier-plugin-classnames": "^0.10.4",
|
|
47
49
|
"prettier-plugin-merge": "^0.10.1",
|
|
48
50
|
"prettier-plugin-tailwindcss": "^0.8.1",
|
|
51
|
+
"tailwindcss": "^4.3.3",
|
|
49
52
|
"typescript": "^5.9.3",
|
|
50
53
|
"typescript-eslint": "^8.69.0",
|
|
51
54
|
"vite": "^8.3.0",
|
|
52
55
|
"vite-plugin-lib-inject-css": "^2.2.2"
|
|
56
|
+
},
|
|
57
|
+
"imports": {
|
|
58
|
+
"#globals": "./src/_css/styles.css"
|
|
53
59
|
}
|
|
54
60
|
}
|
package/dist/_css/globals.css
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Button as e } from "@base-ui/react";
|
|
2
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import './button-D8AICVq0.css';var n = { wrapper: "_wrapper_hnfn3_3" }, r = ({ children: r, ...i }) => /* @__PURE__ */ t(e, {
|
|
4
|
-
className: n.wrapper,
|
|
5
|
-
...i,
|
|
6
|
-
children: r
|
|
7
|
-
});
|
|
8
|
-
//#endregion
|
|
9
|
-
export { r as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._wrapper_hnfn3_3{color:#ff0;background-color:red;padding:30px}
|
package/dist/input/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./input";
|
package/dist/input/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Input as e } from "@base-ui/react";
|
|
2
|
-
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
import './input-Ditq2Ypm.css';var r = { wrapper: "_wrapper_sdmuq_3" }, i = (i) => /* @__PURE__ */ n("label", { children: ["label ", /* @__PURE__ */ t(e, {
|
|
4
|
-
className: r.wrapper,
|
|
5
|
-
...i
|
|
6
|
-
})] });
|
|
7
|
-
//#endregion
|
|
8
|
-
export { i as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._wrapper_sdmuq_3{background-color:green}
|
package/dist/input/input.d.ts
DELETED