@codelitdev/design-system 0.1.0-alpha.4 → 0.1.0-alpha.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/package.json +9 -3
- package/src/components/actions/Button.tsx +2 -0
- package/src/components/actions/IconButton.tsx +2 -0
- package/src/components/display/Tabs.tsx +3 -1
- package/src/components/feedback/Dialog.tsx +3 -1
- package/src/components/feedback/Tooltip.tsx +2 -0
- package/src/components/forms/Checkbox.tsx +2 -0
- package/src/components/forms/Input.tsx +2 -0
- package/src/components/forms/Radio.tsx +2 -0
- package/src/components/forms/Select.tsx +2 -0
- package/src/components/forms/Switch.tsx +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codelitdev/design-system",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.6",
|
|
4
4
|
"description": "Shared CodeLit design tokens, Tailwind preset, and React primitives for CourseLit, MediaLit, SendLit, and FrontLit.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "CodeLit",
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"main": "src/index.ts",
|
|
16
16
|
"types": "src/index.ts",
|
|
17
17
|
"scripts": {
|
|
18
|
-
"
|
|
18
|
+
"check": "tsc --noEmit && esbuild src/index.ts --bundle --platform=browser --format=esm --jsx=automatic --external:react --external:react-dom --outfile=/tmp/design-system-check.js",
|
|
19
|
+
"release:alpha": "npm run check && npm publish --tag alpha",
|
|
19
20
|
"registry:build": "shadcn build"
|
|
20
21
|
},
|
|
21
22
|
"exports": {
|
|
@@ -40,7 +41,12 @@
|
|
|
40
41
|
],
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"@types/react": "^19.2.17",
|
|
44
|
+
"@types/react-dom": "^19.2.7",
|
|
45
|
+
"esbuild": "^0.28.1",
|
|
43
46
|
"lucide-react": "^0.544.0",
|
|
44
|
-
"
|
|
47
|
+
"react": "^19.2.8",
|
|
48
|
+
"react-dom": "^19.2.8",
|
|
49
|
+
"shadcn": "^4.14.0",
|
|
50
|
+
"typescript": "^5.9.3"
|
|
45
51
|
}
|
|
46
52
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
1
3
|
import React from "react";
|
|
2
4
|
|
|
3
5
|
export interface TabsProps {
|
|
@@ -15,7 +17,7 @@ export interface TabsProps {
|
|
|
15
17
|
export function Tabs({ tabs = [], value, defaultValue, onChange, variant = "segmented", style }: TabsProps) {
|
|
16
18
|
const [internal, setInternal] = React.useState(defaultValue ?? tabs[0]);
|
|
17
19
|
const active = value ?? internal;
|
|
18
|
-
const pick = (t) => {
|
|
20
|
+
const pick = (t: string) => {
|
|
19
21
|
setInternal(t);
|
|
20
22
|
if (onChange) onChange(t);
|
|
21
23
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
1
3
|
import React from "react";
|
|
2
4
|
|
|
3
5
|
export interface DialogProps {
|
|
@@ -10,7 +12,7 @@ export interface DialogProps {
|
|
|
10
12
|
style?: React.CSSProperties;
|
|
11
13
|
children?: React.ReactNode;
|
|
12
14
|
}
|
|
13
|
-
import { Button } from "../actions/Button
|
|
15
|
+
import { Button } from "../actions/Button";
|
|
14
16
|
|
|
15
17
|
/** Modal dialog with scrim. Controlled: open + onClose. */
|
|
16
18
|
export function Dialog({ open, onClose, title, description, footer, children, style }: DialogProps) {
|