dawn-ui-react 1.0.0-rc.6 → 1.0.0-rc.7
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 +21 -3
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +22 -10
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
A React component library for building polished product interfaces with composable primitives, Tailwind CSS styling, and accessible interaction patterns.
|
|
4
4
|
|
|
5
|
+
[](https://github.com/sponsors/PHNTMbandit)
|
|
6
|
+
[](https://www.npmjs.com/package/dawn-ui-react)
|
|
7
|
+
[](https://www.npmjs.com/package/dawn-ui-react)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
[](https://www.npmjs.com/package/dawn-ui-react)
|
|
10
|
+
|
|
5
11
|
Dawn UI React is currently in release-candidate testing for `1.0.0`. APIs are nearing stability, but breaking changes may still happen before the stable release.
|
|
6
12
|
|
|
7
13
|
## Features
|
|
@@ -15,20 +21,28 @@ Dawn UI React is currently in release-candidate testing for `1.0.0`. APIs are ne
|
|
|
15
21
|
|
|
16
22
|
## Installation
|
|
17
23
|
|
|
24
|
+
Install Dawn UI React with your package manager:
|
|
25
|
+
|
|
18
26
|
```sh
|
|
27
|
+
npm install dawn-ui-react
|
|
19
28
|
pnpm add dawn-ui-react
|
|
29
|
+
yarn add dawn-ui-react
|
|
30
|
+
bun add dawn-ui-react
|
|
20
31
|
```
|
|
21
32
|
|
|
22
33
|
Install the required peer dependencies if your app does not already include them:
|
|
23
34
|
|
|
24
35
|
```sh
|
|
36
|
+
npm install react react-dom
|
|
25
37
|
pnpm add react react-dom
|
|
38
|
+
yarn add react react-dom
|
|
39
|
+
bun add react react-dom
|
|
26
40
|
```
|
|
27
41
|
|
|
28
42
|
Import the library styles once in your app entry file:
|
|
29
43
|
|
|
30
44
|
```ts
|
|
31
|
-
import 'dawn-ui-react/styles
|
|
45
|
+
import 'dawn-ui-react/styles'
|
|
32
46
|
```
|
|
33
47
|
|
|
34
48
|
## Usage
|
|
@@ -45,6 +59,10 @@ export function Example() {
|
|
|
45
59
|
|
|
46
60
|
Dawn UI React includes primitives for accordions, alerts, dialogs, autocomplete, avatars, badges, breadcrumbs, buttons, charts, checkboxes, code blocks, comboboxes, context menus, drawers, dropzones, fields, forms, inputs, menus, navigation, popovers, profiles, progress, radio groups, scroll areas, selects, sidebars, sliders, switches, tables, tabs, text areas, toasts, toggles, tooltips, and more.
|
|
47
61
|
|
|
62
|
+
## Sponsor Development
|
|
63
|
+
|
|
64
|
+
If Dawn UI React saves you time or helps your product, consider [sponsoring its development on GitHub](https://github.com/sponsors/PHNTMbandit). Sponsorship helps fund ongoing maintenance, accessibility improvements, documentation, testing, and new components. One-time and recurring support are both welcome, and sponsorship is never required to use or contribute to the library.
|
|
65
|
+
|
|
48
66
|
## Development
|
|
49
67
|
|
|
50
68
|
```sh
|
|
@@ -57,8 +75,8 @@ Vite+ provides the `vp` CLI for the project toolchain. Use its built-in commands
|
|
|
57
75
|
```sh
|
|
58
76
|
vp check
|
|
59
77
|
vp test
|
|
60
|
-
|
|
61
|
-
|
|
78
|
+
vp run build
|
|
79
|
+
vp run build-storybook
|
|
62
80
|
```
|
|
63
81
|
|
|
64
82
|
See the [Vite+ guide](https://viteplus.dev/guide/) for CLI details.
|
package/dist/index.d.mts
CHANGED
|
@@ -319,6 +319,7 @@ export declare function Badge({ className, size, tone, variant, ref, ...props }:
|
|
|
319
319
|
//#endregion
|
|
320
320
|
//#region src/components/bento-box/bento-box.types.d.ts
|
|
321
321
|
declare const bentoBoxVariants: (props?: ({
|
|
322
|
+
elevation?: "high" | "low" | "medium" | "none" | "veryHigh" | null | undefined;
|
|
322
323
|
fill?: boolean | null | undefined;
|
|
323
324
|
size?: "large" | "medium" | "small" | null | undefined;
|
|
324
325
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -331,7 +332,7 @@ type BentoBoxActionProps = React.ComponentProps<'div'>;
|
|
|
331
332
|
type BentoBoxFooterProps = React.ComponentProps<'div'>;
|
|
332
333
|
//#endregion
|
|
333
334
|
//#region src/components/bento-box/bento-box.d.ts
|
|
334
|
-
declare function BentoBox$1({ fill, size, className, ref, ...props }: BentoBoxProps): import("react").JSX.Element;
|
|
335
|
+
declare function BentoBox$1({ elevation, fill, size, className, ref, ...props }: BentoBoxProps): import("react").JSX.Element;
|
|
335
336
|
//#endregion
|
|
336
337
|
//#region src/components/bento-box/bento-box-action.d.ts
|
|
337
338
|
export declare function BentoBoxAction({ className, ref, ...props }: BentoBoxActionProps): import("react").JSX.Element;
|
package/dist/index.mjs
CHANGED
|
@@ -1116,30 +1116,39 @@ function Badge({ className, size, tone, variant, ref, ...props }) {
|
|
|
1116
1116
|
}
|
|
1117
1117
|
//#endregion
|
|
1118
1118
|
//#region src/components/bento-box/bento-box.types.ts
|
|
1119
|
-
const bentoBoxVariants = cva("group/box flex size-full min-h-0 flex-col overflow-hidden bg-surface", {
|
|
1119
|
+
const bentoBoxVariants = cva("group/box flex size-full min-h-0 flex-col overflow-hidden border border-border bg-surface", {
|
|
1120
1120
|
defaultVariants: {
|
|
1121
|
+
elevation: "medium",
|
|
1121
1122
|
fill: false,
|
|
1122
1123
|
size: "medium"
|
|
1123
1124
|
},
|
|
1124
1125
|
variants: {
|
|
1126
|
+
elevation: {
|
|
1127
|
+
high: "shadow-sm",
|
|
1128
|
+
low: "shadow-2xs",
|
|
1129
|
+
medium: "shadow-xs",
|
|
1130
|
+
none: "",
|
|
1131
|
+
veryHigh: "shadow-md"
|
|
1132
|
+
},
|
|
1125
1133
|
fill: {
|
|
1126
1134
|
false: "",
|
|
1127
1135
|
true: "p-0!"
|
|
1128
1136
|
},
|
|
1129
1137
|
size: {
|
|
1130
|
-
large: "gap-md rounded-3xl p-md
|
|
1131
|
-
medium: "gap-sm rounded-2xl p-sm
|
|
1132
|
-
small: "gap-xs rounded-xl p-xs
|
|
1138
|
+
large: "gap-md rounded-3xl p-md",
|
|
1139
|
+
medium: "gap-sm rounded-2xl p-sm",
|
|
1140
|
+
small: "gap-xs rounded-xl p-xs"
|
|
1133
1141
|
}
|
|
1134
1142
|
}
|
|
1135
1143
|
});
|
|
1136
1144
|
//#endregion
|
|
1137
1145
|
//#region src/components/bento-box/bento-box.tsx
|
|
1138
|
-
function BentoBox$1({ fill, size, className, ref, ...props }) {
|
|
1146
|
+
function BentoBox$1({ elevation, fill, size, className, ref, ...props }) {
|
|
1139
1147
|
return /* @__PURE__ */ jsx("div", {
|
|
1140
1148
|
"data-size": size,
|
|
1141
1149
|
className: cn(bentoBoxVariants({
|
|
1142
1150
|
className,
|
|
1151
|
+
elevation,
|
|
1143
1152
|
fill,
|
|
1144
1153
|
size
|
|
1145
1154
|
})),
|
|
@@ -1160,7 +1169,7 @@ function BentoBoxAction({ className, ref, ...props }) {
|
|
|
1160
1169
|
//#region src/components/bento-box/bento-box-content.tsx
|
|
1161
1170
|
function BentoBoxContent({ className, ref, ...props }) {
|
|
1162
1171
|
return /* @__PURE__ */ jsx("div", {
|
|
1163
|
-
className: cn("min-h-0 flex-1", className),
|
|
1172
|
+
className: cn("flex min-h-0 flex-1 flex-col gap-3xs", className),
|
|
1164
1173
|
ref,
|
|
1165
1174
|
...props
|
|
1166
1175
|
});
|
|
@@ -1178,7 +1187,7 @@ function BentoBoxDescription({ className, ref, ...props }) {
|
|
|
1178
1187
|
//#region src/components/bento-box/bento-box-footer.tsx
|
|
1179
1188
|
function BentoBoxFooter({ className, ref, ...props }) {
|
|
1180
1189
|
return /* @__PURE__ */ jsx("div", {
|
|
1181
|
-
className: cn("flex items-center justify-
|
|
1190
|
+
className: cn("mt-auto flex flex-wrap items-center justify-start gap-sm not-first:group-data-[size=large]/box:gap-lg not-first:group-data-[size=medium]/box:gap-md group-data-[size=small]/box:gap-sm", className),
|
|
1182
1191
|
ref,
|
|
1183
1192
|
...props
|
|
1184
1193
|
});
|
|
@@ -1187,7 +1196,7 @@ function BentoBoxFooter({ className, ref, ...props }) {
|
|
|
1187
1196
|
//#region src/components/bento-box/bento-box-header.tsx
|
|
1188
1197
|
function BentoBoxHeader({ className, ref, ...props }) {
|
|
1189
1198
|
return /* @__PURE__ */ jsx("div", {
|
|
1190
|
-
className: cn("group/box-header grid auto-rows-min items-start group-data-[size=large]/box:gap-0 group-data-[size=medium]/box:gap-0 group-data-[size=small]/box:gap-0", className),
|
|
1199
|
+
className: cn("group/box-header grid auto-rows-min items-start space-y-2xs group-data-[size=large]/box:gap-0 group-data-[size=medium]/box:gap-0 group-data-[size=small]/box:gap-0", className),
|
|
1191
1200
|
ref,
|
|
1192
1201
|
...props
|
|
1193
1202
|
});
|
|
@@ -5840,8 +5849,11 @@ function FormErrors({ className, children, ref, ...props }) {
|
|
|
5840
5849
|
...props,
|
|
5841
5850
|
children: [
|
|
5842
5851
|
/* @__PURE__ */ jsx(AlertIcon, { children: /* @__PURE__ */ jsx(XCircleIcon, { weight: "duotone" }) }),
|
|
5843
|
-
children,
|
|
5844
|
-
/* @__PURE__ */ jsx(AlertDescription, { children: /* @__PURE__ */ jsx("ul", {
|
|
5852
|
+
/* @__PURE__ */ jsx(AlertTitle, { children }),
|
|
5853
|
+
/* @__PURE__ */ jsx(AlertDescription, { children: /* @__PURE__ */ jsx("ul", {
|
|
5854
|
+
className: "list-inside list-disc",
|
|
5855
|
+
children: [...messages].map((message) => /* @__PURE__ */ jsx("li", { children: message }, message))
|
|
5856
|
+
}) })
|
|
5845
5857
|
]
|
|
5846
5858
|
});
|
|
5847
5859
|
}
|