@pumba-ui/ui 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +145 -2
- package/dist/badge/badge.d.ts +7 -0
- package/dist/badge/badge.js +19 -0
- package/dist/badge/index.d.ts +1 -0
- package/dist/button/button.d.ts +9 -0
- package/dist/button/button.js +25 -0
- package/dist/button/index.d.ts +1 -0
- package/dist/card/card.d.ts +9 -0
- package/dist/card/card.js +27 -0
- package/dist/card/index.d.ts +8 -0
- package/dist/card/index.js +10 -0
- package/dist/dialog/dialog.d.ts +31 -0
- package/dist/dialog/dialog.js +72 -0
- package/dist/dialog/index.d.ts +10 -0
- package/dist/dialog/index.js +12 -0
- package/dist/icons.d.ts +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +7 -0
- package/dist/input/index.d.ts +1 -0
- package/dist/input/input.d.ts +7 -0
- package/dist/input/input.js +24 -0
- package/dist/reset.css +29 -0
- package/dist/styles.css +682 -0
- package/dist/tabs/index.d.ts +8 -0
- package/dist/tabs/index.js +10 -0
- package/dist/tabs/tabs.d.ts +25 -0
- package/dist/tabs/tabs.js +35 -0
- package/package.json +76 -3
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ComponentProps, ReactElement } from "react";
|
|
2
|
+
type Render<Tag extends "div" | "button"> = ReactElement | ((props: ComponentProps<Tag>) => ReactElement);
|
|
3
|
+
export type TabsProps = Omit<ComponentProps<"div">, "defaultValue"> & {
|
|
4
|
+
value?: string;
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
onValueChange?: (value: string) => void;
|
|
7
|
+
render?: Render<"div">;
|
|
8
|
+
};
|
|
9
|
+
type TabsListProps = ComponentProps<"div"> & {
|
|
10
|
+
render?: Render<"div">;
|
|
11
|
+
};
|
|
12
|
+
type TabsTabProps = ComponentProps<"button"> & {
|
|
13
|
+
value: string;
|
|
14
|
+
nativeButton?: boolean;
|
|
15
|
+
render?: Render<"button">;
|
|
16
|
+
};
|
|
17
|
+
type TabsPanelProps = ComponentProps<"div"> & {
|
|
18
|
+
value: string;
|
|
19
|
+
render?: Render<"div">;
|
|
20
|
+
};
|
|
21
|
+
declare function TabsRoot({ className, onValueChange, ...rest }: TabsProps): import("react").JSX.Element;
|
|
22
|
+
declare function TabsList({ className, children, ...rest }: TabsListProps): import("react").JSX.Element;
|
|
23
|
+
declare function TabsTab({ className, ...rest }: TabsTabProps): import("react").JSX.Element;
|
|
24
|
+
declare function TabsPanel({ className, ...rest }: TabsPanelProps): import("react").JSX.Element;
|
|
25
|
+
export { TabsList, TabsPanel, TabsRoot, TabsTab };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Tabs } from "@base-ui/react/tabs";
|
|
4
|
+
//#region src/tabs/tabs.tsx
|
|
5
|
+
var join = (own, className) => className ? `${own} ${className}` : own;
|
|
6
|
+
function TabsRoot({ className, onValueChange, ...rest }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(Tabs.Root, {
|
|
8
|
+
className: join("pumba-tabs", className),
|
|
9
|
+
onValueChange: (value) => {
|
|
10
|
+
if (typeof value === "string") onValueChange?.(value);
|
|
11
|
+
},
|
|
12
|
+
...rest
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function TabsList({ className, children, ...rest }) {
|
|
16
|
+
return /* @__PURE__ */ jsxs(Tabs.List, {
|
|
17
|
+
className: join("pumba-tabs-list", className),
|
|
18
|
+
...rest,
|
|
19
|
+
children: [children, /* @__PURE__ */ jsx(Tabs.Indicator, { className: "pumba-tabs-indicator" })]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function TabsTab({ className, ...rest }) {
|
|
23
|
+
return /* @__PURE__ */ jsx(Tabs.Tab, {
|
|
24
|
+
className: join("pumba-tabs-tab", className),
|
|
25
|
+
...rest
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function TabsPanel({ className, ...rest }) {
|
|
29
|
+
return /* @__PURE__ */ jsx(Tabs.Panel, {
|
|
30
|
+
className: join("pumba-tabs-panel", className),
|
|
31
|
+
...rest
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { TabsList, TabsPanel, TabsRoot, TabsTab };
|
package/package.json
CHANGED
|
@@ -1,6 +1,79 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pumba-ui/ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Accessible React components for the Pumba design system.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://github.com/vnloyola/pumba-ui#readme",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/vnloyola/pumba-ui.git",
|
|
10
|
+
"directory": "packages/ui"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/vnloyola/pumba-ui/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"react",
|
|
17
|
+
"design-system",
|
|
18
|
+
"components",
|
|
19
|
+
"accessible",
|
|
20
|
+
"base-ui",
|
|
21
|
+
"css-layers",
|
|
22
|
+
"dark-mode"
|
|
23
|
+
],
|
|
24
|
+
"type": "module",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"default": "./dist/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./styles.css": "./dist/styles.css",
|
|
31
|
+
"./reset.css": "./dist/reset.css"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist"
|
|
35
|
+
],
|
|
36
|
+
"sideEffects": [
|
|
37
|
+
"**/*.css"
|
|
38
|
+
],
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"react": "^19.0.0",
|
|
41
|
+
"react-dom": "^19.0.0"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@base-ui/react": "^1.8.0",
|
|
45
|
+
"@fontsource-variable/figtree": "^5.3.0",
|
|
46
|
+
"@fontsource-variable/jetbrains-mono": "^5.3.0",
|
|
47
|
+
"lucide-react": "^1.52.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@arethetypeswrong/cli": "^0.18.5",
|
|
51
|
+
"@pumba-ui/tokens": "0.1.0",
|
|
52
|
+
"@storybook/react-vite": "^10.6.1",
|
|
53
|
+
"@testing-library/dom": "^10.4.2",
|
|
54
|
+
"@testing-library/react": "^16.3.3",
|
|
55
|
+
"@types/react": "^19.3.0",
|
|
56
|
+
"@types/react-dom": "^19.3.0",
|
|
57
|
+
"axe-core": "^4.14.0",
|
|
58
|
+
"jsdom": "^30.1.3",
|
|
59
|
+
"postcss": "^8.5.0",
|
|
60
|
+
"postcss-import": "^17.0.0",
|
|
61
|
+
"publint": "^0.3.25",
|
|
62
|
+
"react": "^19.3.0",
|
|
63
|
+
"react-dom": "^19.3.0",
|
|
64
|
+
"storybook": "^10.6.1",
|
|
65
|
+
"vite": "^8.3.2",
|
|
66
|
+
"vitest": "^5.0.5"
|
|
67
|
+
},
|
|
68
|
+
"publishConfig": {
|
|
69
|
+
"access": "public",
|
|
70
|
+
"provenance": true
|
|
71
|
+
},
|
|
72
|
+
"scripts": {
|
|
73
|
+
"build": "vite build && tsc -p tsconfig.build.json && node scripts/build-css.mjs",
|
|
74
|
+
"typecheck": "tsc --noEmit",
|
|
75
|
+
"check:package": "publint && attw --pack . --profile esm-only --exclude-entrypoints ./styles.css ./reset.css",
|
|
76
|
+
"test": "vitest run",
|
|
77
|
+
"add:component": "node scripts/add-component.mjs"
|
|
78
|
+
}
|
|
6
79
|
}
|