@xingxingmofashu/ui 0.1.10 → 0.2.1
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 +22 -9
- package/dist/components/accordion.d.ts +2 -2
- package/dist/components/alert-dialog.d.ts +3 -1
- package/dist/components/alert-dialog.mjs +3 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/card.d.ts +1 -1
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/dialog.d.ts +3 -1
- package/dist/components/dialog.mjs +3 -1
- package/dist/components/drawer.d.ts +4 -2
- package/dist/components/drawer.mjs +3 -1
- package/dist/components/field.d.ts +1 -1
- package/dist/components/fieldset.d.ts +1 -1
- package/dist/components/form.d.ts +1 -1
- package/dist/components/input.d.ts +3 -1
- package/dist/components/input.mjs +3 -1
- package/dist/components/menu.d.ts +7 -5
- package/dist/components/menu.mjs +3 -1
- package/dist/components/popover.d.ts +3 -1
- package/dist/components/popover.mjs +3 -1
- package/dist/components/progress.d.ts +1 -1
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/scroll-area.d.ts +1 -1
- package/dist/components/select.d.ts +4 -2
- package/dist/components/select.mjs +3 -1
- package/dist/components/slider.d.ts +1 -1
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/tabs.d.ts +2 -2
- package/dist/components/toggle-group.d.ts +2 -2
- package/dist/components/toggle.d.ts +1 -1
- package/dist/components/tooltip.d.ts +3 -1
- package/dist/components/tooltip.mjs +3 -1
- package/dist/index.css +1 -1
- package/dist/plugins/glass-preset/index.css +1 -1
- package/dist/theme/alert-dialog.mjs +4 -4
- package/dist/theme/dialog.mjs +4 -4
- package/dist/theme/drawer.mjs +4 -4
- package/dist/theme/menu.mjs +4 -4
- package/dist/theme/popover.mjs +10 -6
- package/dist/theme/select.mjs +2 -2
- package/dist/theme/toast.mjs +3 -3
- package/dist/theme/tooltip.mjs +12 -4
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -39,6 +39,16 @@ Toast, Toggle, Toggle Group, and Tooltip.
|
|
|
39
39
|
- [llms-full.txt](https://xingxingmofashu.github.io/ui/llms-full.txt) — every
|
|
40
40
|
guide and component page in one file
|
|
41
41
|
|
|
42
|
+
## Agent skill
|
|
43
|
+
|
|
44
|
+
The portable skill in
|
|
45
|
+
[`skills/xingxingmofashu-ui`](https://github.com/xingxingmofashu/ui/tree/main/skills/xingxingmofashu-ui)
|
|
46
|
+
teaches coding agents how to install, compose, theme, and troubleshoot the
|
|
47
|
+
components. It lives in the repository and is not included in the npm package.
|
|
48
|
+
See the
|
|
49
|
+
[skill README](https://github.com/xingxingmofashu/ui/blob/main/skills/xingxingmofashu-ui/README.md)
|
|
50
|
+
for OpenCode, Claude Code, and compatible agent setup.
|
|
51
|
+
|
|
42
52
|
## Installation
|
|
43
53
|
|
|
44
54
|
```bash [pnpm]
|
|
@@ -86,9 +96,11 @@ container:
|
|
|
86
96
|
|
|
87
97
|
`thin` is the default and the clearest, `soft` adds diffusion for secondary
|
|
88
98
|
text, `regular` balances transparency with text separation, and `thick` is the
|
|
89
|
-
most readable over busy imagery. Presets only override shared CSS variables
|
|
90
|
-
|
|
91
|
-
|
|
99
|
+
most readable over busy imagery. Presets only override shared CSS variables and
|
|
100
|
+
adjust both the in-page and overlay veils. Text-bearing overlays use
|
|
101
|
+
`.ui-glass-overlay` and `--ui-glass-overlay-surface`; override that token too
|
|
102
|
+
when you change `--ui-surface`. Without the plugin stylesheet, the main
|
|
103
|
+
stylesheet still uses the `thin` material.
|
|
92
104
|
|
|
93
105
|
The optional React plugin manages the attribute and persistence:
|
|
94
106
|
|
|
@@ -140,7 +152,7 @@ import { Button } from "@xingxingmofashu/ui/components/button";
|
|
|
140
152
|
import buttonTheme from "@xingxingmofashu/ui/theme/button";
|
|
141
153
|
```
|
|
142
154
|
|
|
143
|
-
Toast hooks live under `@xingxingmofashu/ui/composables`.
|
|
155
|
+
Toast hooks live under `@xingxingmofashu/ui/composables/use-toast`.
|
|
144
156
|
|
|
145
157
|
## Development
|
|
146
158
|
|
|
@@ -149,15 +161,16 @@ pnpm install
|
|
|
149
161
|
pnpm build # build dist with unbuild
|
|
150
162
|
pnpm lint # lint with oxlint
|
|
151
163
|
pnpm test # run the Vitest suite
|
|
152
|
-
pnpm test:
|
|
153
|
-
pnpm test:visual:update # refresh the Surface Lab screenshots
|
|
164
|
+
pnpm test:e2e # run the Playwright browser suite
|
|
154
165
|
pnpm typecheck # typecheck the package
|
|
155
166
|
pnpm docs:dev # docs site on http://localhost:3001
|
|
156
|
-
pnpm playground:dev #
|
|
167
|
+
pnpm playground:dev # React REPL on http://localhost:3002
|
|
157
168
|
```
|
|
158
169
|
|
|
159
|
-
The documentation site lives in `docs/` and the
|
|
160
|
-
`playground/`; both import the package from the workspace.
|
|
170
|
+
The documentation site lives in `docs/` and the React REPL lives in
|
|
171
|
+
`playground/`; both import the package from the workspace. The REPL compiles
|
|
172
|
+
TSX in the browser with Monaco's TypeScript worker and runs the result against
|
|
173
|
+
a small import whitelist.
|
|
161
174
|
|
|
162
175
|
## Contribution
|
|
163
176
|
|
|
@@ -5,7 +5,7 @@ import { type ComponentConfig } from "../internal/tv";
|
|
|
5
5
|
import theme from "../theme/accordion";
|
|
6
6
|
type Accordion = ComponentConfig<typeof theme>;
|
|
7
7
|
/** One panel managed by the accordion. */
|
|
8
|
-
type AccordionItemProps<Value extends string = string> = Omit<UIAccordion.Item.Props, "children" | "className" | "content" | "
|
|
8
|
+
type AccordionItemProps<Value extends string = string> = Omit<UIAccordion.Item.Props, "children" | "className" | "content" | "title" | "value"> & {
|
|
9
9
|
/** Value that identifies the item in the accordion value. */
|
|
10
10
|
value: Value;
|
|
11
11
|
/** Visible heading inside the trigger. */
|
|
@@ -19,7 +19,7 @@ type AccordionItemProps<Value extends string = string> = Omit<UIAccordion.Item.P
|
|
|
19
19
|
/** Tailwind classes for this item's internal slots, keyed by `data-slot`. */
|
|
20
20
|
ui?: Partial<Pick<Accordion["slots"], "item" | "header" | "trigger" | "title" | "indicator" | "indicatorIcon" | "panel" | "panelContent">>;
|
|
21
21
|
};
|
|
22
|
-
type AccordionProps<Value extends string = string> = Omit<UIAccordion.Root.Props<Value>, "className" | "
|
|
22
|
+
type AccordionProps<Value extends string = string> = Omit<UIAccordion.Root.Props<Value>, "className" | "children"> & VariantProps<typeof theme> & {
|
|
23
23
|
/** Panels rendered by the accordion. */
|
|
24
24
|
items: readonly AccordionItemProps<Value>[];
|
|
25
25
|
/** Tailwind classes merged into the root. */
|
|
@@ -20,9 +20,11 @@ type AlertDialogProps = Omit<UIAlertDialog.Root.Props, "children"> & {
|
|
|
20
20
|
onConfirm?: React.MouseEventHandler<HTMLButtonElement>;
|
|
21
21
|
/** Tailwind classes merged into the popup. */
|
|
22
22
|
className?: string;
|
|
23
|
+
/** Inline styles merged into the popup. */
|
|
24
|
+
style?: React.CSSProperties;
|
|
23
25
|
/** Tailwind classes for internal slots, keyed by `data-slot`. */
|
|
24
26
|
ui?: AlertDialog["slots"];
|
|
25
27
|
};
|
|
26
|
-
declare function AlertDialog({ title, description, children, cancelLabel, confirmLabel, onCancel, onConfirm, className, ui, ...props }: AlertDialogProps): React.JSX.Element;
|
|
28
|
+
declare function AlertDialog({ title, description, children, cancelLabel, confirmLabel, onCancel, onConfirm, className, style, ui, ...props }: AlertDialogProps): React.JSX.Element;
|
|
27
29
|
export { AlertDialog };
|
|
28
30
|
export type { AlertDialogProps };
|
|
@@ -13,6 +13,7 @@ function AlertDialog({
|
|
|
13
13
|
onCancel,
|
|
14
14
|
onConfirm,
|
|
15
15
|
className,
|
|
16
|
+
style,
|
|
16
17
|
ui,
|
|
17
18
|
...props
|
|
18
19
|
}) {
|
|
@@ -33,7 +34,8 @@ function AlertDialog({
|
|
|
33
34
|
UIAlertDialog.Popup,
|
|
34
35
|
{
|
|
35
36
|
"data-slot": "popup",
|
|
36
|
-
className: cn(styles.popup(), ui?.popup, className)
|
|
37
|
+
className: cn(styles.popup(), ui?.popup, className),
|
|
38
|
+
style
|
|
37
39
|
},
|
|
38
40
|
/* @__PURE__ */ React.createElement(
|
|
39
41
|
"span",
|
|
@@ -4,7 +4,7 @@ import { type VariantProps } from "tailwind-variants";
|
|
|
4
4
|
import { type ComponentConfig } from "../internal/tv";
|
|
5
5
|
import theme from "../theme/button";
|
|
6
6
|
type Button = ComponentConfig<typeof theme>;
|
|
7
|
-
interface ButtonProps extends Omit<UIButtonProps, "ref" | "
|
|
7
|
+
interface ButtonProps extends Omit<UIButtonProps, "ref" | "className">, VariantProps<typeof theme> {
|
|
8
8
|
/** Ref to the rendered root element. */
|
|
9
9
|
ref?: React.Ref<HTMLElement>;
|
|
10
10
|
/** Tailwind classes merged into the outer click area. */
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { type ComponentConfig } from "../internal/tv";
|
|
3
3
|
import theme from "../theme/card";
|
|
4
4
|
type Card = ComponentConfig<typeof theme>;
|
|
5
|
-
type CardProps = Omit<React.ComponentProps<"div">, "
|
|
5
|
+
type CardProps = Omit<React.ComponentProps<"div">, "title"> & {
|
|
6
6
|
/** Classes merged into the root element. */
|
|
7
7
|
className?: string;
|
|
8
8
|
/** Tailwind classes for internal slots, keyed by `data-slot`. */
|
|
@@ -6,7 +6,7 @@ import { type ComponentConfig } from "../internal/tv";
|
|
|
6
6
|
import theme from "../theme/checkbox-group";
|
|
7
7
|
type CheckboxGroup = ComponentConfig<typeof theme>;
|
|
8
8
|
/** One entry in the group. */
|
|
9
|
-
type CheckboxGroupItemProps<Value extends string = string> = Omit<UICheckbox.Root.Props, "checked" | "defaultChecked" | "children" | "className" | "onCheckedChange" | "parent" | "
|
|
9
|
+
type CheckboxGroupItemProps<Value extends string = string> = Omit<UICheckbox.Root.Props, "checked" | "defaultChecked" | "children" | "className" | "onCheckedChange" | "parent" | "value"> & {
|
|
10
10
|
/** Value that identifies the option in the group value. */
|
|
11
11
|
value: Value;
|
|
12
12
|
/** Visible label rendered next to the control. */
|
|
@@ -18,7 +18,7 @@ type CheckboxGroupItemProps<Value extends string = string> = Omit<UICheckbox.Roo
|
|
|
18
18
|
/** Tailwind classes for control slots, keyed by `data-slot`. */
|
|
19
19
|
ui?: Partial<Pick<CheckboxGroup["slots"], "item" | "box" | "fill" | "glass" | "overlay" | "indicator" | "indicatorIcon" | "wrapper" | "itemLabel" | "itemDescription">>;
|
|
20
20
|
};
|
|
21
|
-
type CheckboxGroupProps<Value extends string = string> = Omit<UICheckboxGroup.Props, "allValues" | "children" | "className" | "defaultValue" | "onValueChange" | "
|
|
21
|
+
type CheckboxGroupProps<Value extends string = string> = Omit<UICheckboxGroup.Props, "allValues" | "children" | "className" | "defaultValue" | "onValueChange" | "value"> & VariantProps<typeof theme> & Pick<UICheckbox.Root.Props, "name" | "form" | "readOnly"> & {
|
|
22
22
|
/** Entries rendered by the group. */
|
|
23
23
|
items: readonly CheckboxGroupItemProps<Value>[];
|
|
24
24
|
/** Visible label for the group. */
|
|
@@ -4,7 +4,7 @@ import { type VariantProps } from "tailwind-variants";
|
|
|
4
4
|
import { type ComponentConfig } from "../internal/tv";
|
|
5
5
|
import theme from "../theme/checkbox";
|
|
6
6
|
type Checkbox = ComponentConfig<typeof theme>;
|
|
7
|
-
interface CheckboxProps extends Omit<UICheckbox.Root.Props, "className" | "children" | "
|
|
7
|
+
interface CheckboxProps extends Omit<UICheckbox.Root.Props, "className" | "children" | "ref">, VariantProps<typeof theme> {
|
|
8
8
|
/** Ref to the rendered root element. */
|
|
9
9
|
ref?: React.Ref<HTMLElement>;
|
|
10
10
|
/** Tailwind classes merged into the Base UI checkbox root. */
|
|
@@ -14,9 +14,11 @@ type DialogProps = Omit<UIDialog.Root.Props, "children"> & {
|
|
|
14
14
|
footer?: React.ReactNode;
|
|
15
15
|
/** Tailwind classes merged into the popup. */
|
|
16
16
|
className?: string;
|
|
17
|
+
/** Inline styles merged into the popup. */
|
|
18
|
+
style?: React.CSSProperties;
|
|
17
19
|
/** Tailwind classes for internal slots, keyed by `data-slot`. */
|
|
18
20
|
ui?: Dialog["slots"];
|
|
19
21
|
};
|
|
20
|
-
declare function Dialog({ title, description, children, footer, className, ui, ...props }: DialogProps): React.JSX.Element;
|
|
22
|
+
declare function Dialog({ title, description, children, footer, className, style, ui, ...props }: DialogProps): React.JSX.Element;
|
|
21
23
|
export { Dialog };
|
|
22
24
|
export type { DialogProps };
|
|
@@ -9,6 +9,7 @@ function Dialog({
|
|
|
9
9
|
children,
|
|
10
10
|
footer,
|
|
11
11
|
className,
|
|
12
|
+
style,
|
|
12
13
|
ui,
|
|
13
14
|
...props
|
|
14
15
|
}) {
|
|
@@ -29,7 +30,8 @@ function Dialog({
|
|
|
29
30
|
UIDialog.Popup,
|
|
30
31
|
{
|
|
31
32
|
"data-slot": "popup",
|
|
32
|
-
className: cn(styles.popup(), ui?.popup, className)
|
|
33
|
+
className: cn(styles.popup(), ui?.popup, className),
|
|
34
|
+
style
|
|
33
35
|
},
|
|
34
36
|
/* @__PURE__ */ React.createElement(
|
|
35
37
|
"span",
|
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import { type ComponentConfig } from "../internal/tv";
|
|
4
4
|
import theme from "../theme/drawer";
|
|
5
5
|
type Drawer = ComponentConfig<typeof theme>;
|
|
6
|
-
interface DrawerProps extends Omit<UIDrawer.Root.Props, "children" | "className" | "
|
|
6
|
+
interface DrawerProps extends Omit<UIDrawer.Root.Props, "children" | "className" | "swipeDirection"> {
|
|
7
7
|
/** Drawer heading. */
|
|
8
8
|
title: React.ReactNode;
|
|
9
9
|
/** Supporting copy under the title. */
|
|
@@ -16,9 +16,11 @@ interface DrawerProps extends Omit<UIDrawer.Root.Props, "children" | "className"
|
|
|
16
16
|
direction?: NonNullable<UIDrawer.Root.Props["swipeDirection"]>;
|
|
17
17
|
/** Tailwind classes merged into the popup. */
|
|
18
18
|
className?: string;
|
|
19
|
+
/** Inline styles merged into the popup. */
|
|
20
|
+
style?: React.CSSProperties;
|
|
19
21
|
/** Tailwind classes for internal slots, keyed by `data-slot`. */
|
|
20
22
|
ui?: Drawer["slots"];
|
|
21
23
|
}
|
|
22
|
-
declare function Drawer({ title, description, children, footer, direction, className, ui, ...props }: DrawerProps): React.JSX.Element;
|
|
24
|
+
declare function Drawer({ title, description, children, footer, direction, className, style, ui, ...props }: DrawerProps): React.JSX.Element;
|
|
23
25
|
export { Drawer };
|
|
24
26
|
export type { DrawerProps };
|
|
@@ -10,6 +10,7 @@ function Drawer({
|
|
|
10
10
|
footer,
|
|
11
11
|
direction = "down",
|
|
12
12
|
className,
|
|
13
|
+
style,
|
|
13
14
|
ui,
|
|
14
15
|
...props
|
|
15
16
|
}) {
|
|
@@ -30,7 +31,8 @@ function Drawer({
|
|
|
30
31
|
UIDrawer.Popup,
|
|
31
32
|
{
|
|
32
33
|
"data-slot": "popup",
|
|
33
|
-
className: cn(styles.popup(), ui?.popup, className)
|
|
34
|
+
className: cn(styles.popup(), ui?.popup, className),
|
|
35
|
+
style
|
|
34
36
|
},
|
|
35
37
|
/* @__PURE__ */ React.createElement(
|
|
36
38
|
"span",
|
|
@@ -4,7 +4,7 @@ import { type VariantProps } from "tailwind-variants";
|
|
|
4
4
|
import { type ComponentConfig } from "../internal/tv";
|
|
5
5
|
import theme from "../theme/field";
|
|
6
6
|
type Field = ComponentConfig<typeof theme>;
|
|
7
|
-
interface FieldProps extends Omit<UIField.Root.Props, "children" | "className"
|
|
7
|
+
interface FieldProps extends Omit<UIField.Root.Props, "children" | "className">, VariantProps<typeof theme> {
|
|
8
8
|
/** Single Base UI control labelled and validated by the field. */
|
|
9
9
|
children: React.ReactElement;
|
|
10
10
|
/** Visible label associated with the control. */
|
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import { type ComponentConfig } from "../internal/tv";
|
|
4
4
|
import theme from "../theme/fieldset";
|
|
5
5
|
type Fieldset = ComponentConfig<typeof theme>;
|
|
6
|
-
interface FieldsetProps extends Omit<UIFieldset.Root.Props, "children" | "className"
|
|
6
|
+
interface FieldsetProps extends Omit<UIFieldset.Root.Props, "children" | "className"> {
|
|
7
7
|
/** Visible legend naming the group. */
|
|
8
8
|
legend?: React.ReactNode;
|
|
9
9
|
/** Fields and controls grouped by the fieldset. */
|
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import { type ComponentConfig } from "../internal/tv";
|
|
4
4
|
import theme from "../theme/form";
|
|
5
5
|
type Form = ComponentConfig<typeof theme>;
|
|
6
|
-
type FormProps<FormValues extends Record<string, any> = Record<string, any>> = Omit<UIForm.Props<FormValues>, "className"
|
|
6
|
+
type FormProps<FormValues extends Record<string, any> = Record<string, any>> = Omit<UIForm.Props<FormValues>, "className"> & {
|
|
7
7
|
/** Tailwind classes merged into the form element. */
|
|
8
8
|
className?: string;
|
|
9
9
|
/** Tailwind classes for internal slots, keyed by `data-slot`. */
|
|
@@ -7,6 +7,8 @@ type Input = ComponentConfig<typeof theme>;
|
|
|
7
7
|
interface InputProps extends Omit<UIInput.Props, "className" | "children" | "size" | "style">, VariantProps<typeof theme> {
|
|
8
8
|
/** Tailwind classes merged into the root element. */
|
|
9
9
|
className?: string;
|
|
10
|
+
/** Inline styles merged into the outer root. Use `ui.input` for the native input. */
|
|
11
|
+
style?: React.CSSProperties;
|
|
10
12
|
/** Tailwind classes for internal slots, keyed by `data-slot`. */
|
|
11
13
|
ui?: Input["slots"];
|
|
12
14
|
/** Icon rendered before the input. */
|
|
@@ -14,6 +16,6 @@ interface InputProps extends Omit<UIInput.Props, "className" | "children" | "siz
|
|
|
14
16
|
/** Icon rendered after the input. */
|
|
15
17
|
trailingIcon?: React.ReactNode;
|
|
16
18
|
}
|
|
17
|
-
declare function Input({ className, ui, leadingIcon, trailingIcon, size, disabled, ...props }: InputProps): React.JSX.Element;
|
|
19
|
+
declare function Input({ className, ui, leadingIcon, trailingIcon, size, disabled, style, ...props }: InputProps): React.JSX.Element;
|
|
18
20
|
export { Input };
|
|
19
21
|
export type { InputProps };
|
|
@@ -11,6 +11,7 @@ function Input({
|
|
|
11
11
|
trailingIcon,
|
|
12
12
|
size,
|
|
13
13
|
disabled,
|
|
14
|
+
style,
|
|
14
15
|
...props
|
|
15
16
|
}) {
|
|
16
17
|
const styles = theme({ size });
|
|
@@ -20,7 +21,8 @@ function Input({
|
|
|
20
21
|
{
|
|
21
22
|
"data-slot": "root",
|
|
22
23
|
"data-disabled": fieldsetDisabled || void 0,
|
|
23
|
-
className: cn(styles.root(), ui?.root, className)
|
|
24
|
+
className: cn(styles.root(), ui?.root, className),
|
|
25
|
+
style
|
|
24
26
|
},
|
|
25
27
|
/* @__PURE__ */ React.createElement(
|
|
26
28
|
"span",
|
|
@@ -4,7 +4,7 @@ import { type ComponentConfig } from "../internal/tv";
|
|
|
4
4
|
import theme from "../theme/menu";
|
|
5
5
|
type Menu = ComponentConfig<typeof theme>;
|
|
6
6
|
/** One action item in the menu. */
|
|
7
|
-
type MenuItemProps<Value extends string = string> = Omit<UIMenu.Item.Props, "children" | "className" | "
|
|
7
|
+
type MenuItemProps<Value extends string = string> = Omit<UIMenu.Item.Props, "children" | "className" | "label" | "onClick"> & {
|
|
8
8
|
type?: "item";
|
|
9
9
|
/** Value that identifies the item in the menu. */
|
|
10
10
|
value: Value;
|
|
@@ -24,7 +24,7 @@ type MenuItemProps<Value extends string = string> = Omit<UIMenu.Item.Props, "chi
|
|
|
24
24
|
ui?: Partial<Pick<Menu["slots"], "item" | "itemIcon" | "itemLabel" | "shortcut">>;
|
|
25
25
|
};
|
|
26
26
|
/** A labelled group of menu items. */
|
|
27
|
-
type MenuGroupProps<Value extends string = string> = Omit<UIMenu.Group.Props, "children" | "className"
|
|
27
|
+
type MenuGroupProps<Value extends string = string> = Omit<UIMenu.Group.Props, "children" | "className"> & {
|
|
28
28
|
type: "group";
|
|
29
29
|
/** Group heading. */
|
|
30
30
|
label: React.ReactNode;
|
|
@@ -36,23 +36,25 @@ type MenuGroupProps<Value extends string = string> = Omit<UIMenu.Group.Props, "c
|
|
|
36
36
|
ui?: Partial<Pick<Menu["slots"], "group" | "groupLabel" | "item" | "itemIcon" | "itemLabel" | "shortcut">>;
|
|
37
37
|
};
|
|
38
38
|
/** A separator between menu items. */
|
|
39
|
-
type MenuSeparatorProps = Omit<UIMenu.Separator.Props, "children" | "className" | "orientation"
|
|
39
|
+
type MenuSeparatorProps = Omit<UIMenu.Separator.Props, "children" | "className" | "orientation"> & {
|
|
40
40
|
type: "separator";
|
|
41
41
|
/** Tailwind classes merged into the separator. */
|
|
42
42
|
className?: string;
|
|
43
43
|
/** Tailwind classes for the separator slot. */
|
|
44
44
|
ui?: Partial<Pick<Menu["slots"], "separator">>;
|
|
45
45
|
};
|
|
46
|
-
type MenuProps<Value extends string = string> = Omit<UIMenu.Root.Props, "children" | "className"
|
|
46
|
+
type MenuProps<Value extends string = string> = Omit<UIMenu.Root.Props, "children" | "className"> & Pick<UIMenu.Positioner.Props, "side" | "align" | "sideOffset" | "alignOffset" | "collisionPadding"> & {
|
|
47
47
|
/** Element that opens the menu. It must forward props and refs. */
|
|
48
48
|
trigger: React.ReactElement;
|
|
49
49
|
/** Items, groups, and separators rendered by the menu. */
|
|
50
50
|
items: readonly (MenuItemProps<Value> | MenuGroupProps<Value> | MenuSeparatorProps)[];
|
|
51
51
|
/** Tailwind classes merged into the popup. */
|
|
52
52
|
className?: string;
|
|
53
|
+
/** Inline styles merged into the popup. */
|
|
54
|
+
style?: React.CSSProperties;
|
|
53
55
|
/** Tailwind classes for internal slots, keyed by `data-slot`. */
|
|
54
56
|
ui?: Menu["slots"];
|
|
55
57
|
};
|
|
56
|
-
declare function Menu<Value extends string = string>({ trigger, items, side, align, sideOffset, alignOffset, collisionPadding, className, ui, ...props }: MenuProps<Value>): React.JSX.Element;
|
|
58
|
+
declare function Menu<Value extends string = string>({ trigger, items, side, align, sideOffset, alignOffset, collisionPadding, className, style, ui, ...props }: MenuProps<Value>): React.JSX.Element;
|
|
57
59
|
export { Menu };
|
|
58
60
|
export type { MenuGroupProps, MenuItemProps, MenuProps, MenuSeparatorProps, };
|
package/dist/components/menu.mjs
CHANGED
|
@@ -12,6 +12,7 @@ function Menu({
|
|
|
12
12
|
alignOffset,
|
|
13
13
|
collisionPadding,
|
|
14
14
|
className,
|
|
15
|
+
style,
|
|
15
16
|
ui,
|
|
16
17
|
...props
|
|
17
18
|
}) {
|
|
@@ -31,7 +32,8 @@ function Menu({
|
|
|
31
32
|
UIMenu.Popup,
|
|
32
33
|
{
|
|
33
34
|
"data-slot": "popup",
|
|
34
|
-
className: cn(styles.popup(), ui?.popup, className)
|
|
35
|
+
className: cn(styles.popup(), ui?.popup, className),
|
|
36
|
+
style
|
|
35
37
|
},
|
|
36
38
|
/* @__PURE__ */ React.createElement(
|
|
37
39
|
"span",
|
|
@@ -18,9 +18,11 @@ type PopoverProps = Omit<UIPopover.Root.Props, "children"> & Pick<UIPopover.Posi
|
|
|
18
18
|
arrow?: boolean;
|
|
19
19
|
/** Tailwind classes merged into the popup. */
|
|
20
20
|
className?: string;
|
|
21
|
+
/** Inline styles merged into the popup. */
|
|
22
|
+
style?: React.CSSProperties;
|
|
21
23
|
/** Tailwind classes for internal slots, keyed by `data-slot`. */
|
|
22
24
|
ui?: Popover["slots"];
|
|
23
25
|
};
|
|
24
|
-
declare function Popover({ trigger, title, description, children, footer, arrow, side, align, sideOffset, alignOffset, collisionPadding, className, ui, ...props }: PopoverProps): React.JSX.Element;
|
|
26
|
+
declare function Popover({ trigger, title, description, children, footer, arrow, side, align, sideOffset, alignOffset, collisionPadding, className, style, ui, ...props }: PopoverProps): React.JSX.Element;
|
|
25
27
|
export { Popover };
|
|
26
28
|
export type { PopoverProps };
|
|
@@ -16,6 +16,7 @@ function Popover({
|
|
|
16
16
|
alignOffset,
|
|
17
17
|
collisionPadding,
|
|
18
18
|
className,
|
|
19
|
+
style,
|
|
19
20
|
ui,
|
|
20
21
|
...props
|
|
21
22
|
}) {
|
|
@@ -35,7 +36,8 @@ function Popover({
|
|
|
35
36
|
UIPopover.Popup,
|
|
36
37
|
{
|
|
37
38
|
"data-slot": "popup",
|
|
38
|
-
className: cn(styles.popup(), ui?.popup, className)
|
|
39
|
+
className: cn(styles.popup(), ui?.popup, className),
|
|
40
|
+
style
|
|
39
41
|
},
|
|
40
42
|
/* @__PURE__ */ React.createElement(
|
|
41
43
|
"span",
|
|
@@ -4,7 +4,7 @@ import { type VariantProps } from "tailwind-variants";
|
|
|
4
4
|
import { type ComponentConfig } from "../internal/tv";
|
|
5
5
|
import theme from "../theme/progress";
|
|
6
6
|
type Progress = ComponentConfig<typeof theme>;
|
|
7
|
-
type ProgressProps = Omit<UIProgress.Root.Props, "children" | "className" | "
|
|
7
|
+
type ProgressProps = Omit<UIProgress.Root.Props, "children" | "className" | "value"> & VariantProps<typeof theme> & {
|
|
8
8
|
/** Current value. Use `null` for an indeterminate progress bar. */
|
|
9
9
|
value?: number | null;
|
|
10
10
|
/** Visible label for the progress bar. */
|
|
@@ -6,7 +6,7 @@ import { type ComponentConfig } from "../internal/tv";
|
|
|
6
6
|
import theme from "../theme/radio-group";
|
|
7
7
|
type RadioGroup = ComponentConfig<typeof theme>;
|
|
8
8
|
/** One option managed by the radio group. */
|
|
9
|
-
type RadioGroupItemProps<Value extends string = string> = Omit<UIRadio.Root.Props<Value>, "className" | "children" | "
|
|
9
|
+
type RadioGroupItemProps<Value extends string = string> = Omit<UIRadio.Root.Props<Value>, "className" | "children" | "value"> & {
|
|
10
10
|
/** Value that identifies the option in the group value. */
|
|
11
11
|
value: Value;
|
|
12
12
|
/** Visible label rendered next to the control. */
|
|
@@ -18,7 +18,7 @@ type RadioGroupItemProps<Value extends string = string> = Omit<UIRadio.Root.Prop
|
|
|
18
18
|
/** Tailwind classes for this item's internal slots, keyed by `data-slot`. */
|
|
19
19
|
ui?: Partial<Pick<RadioGroup["slots"], "item" | "box" | "glass" | "overlay" | "indicator" | "dot" | "wrapper" | "itemLabel" | "itemDescription">>;
|
|
20
20
|
};
|
|
21
|
-
type RadioGroupProps<Value extends string = string> = Omit<UIRadioGroup.Props<Value>, "className" | "
|
|
21
|
+
type RadioGroupProps<Value extends string = string> = Omit<UIRadioGroup.Props<Value>, "className" | "children"> & VariantProps<typeof theme> & {
|
|
22
22
|
/** Options rendered by the radio group. */
|
|
23
23
|
items: readonly RadioGroupItemProps<Value>[];
|
|
24
24
|
/** Visible label for the group. */
|
|
@@ -5,7 +5,7 @@ import theme from "../theme/scroll-area";
|
|
|
5
5
|
/** Scrollbar axes rendered by the scroll area. */
|
|
6
6
|
type ScrollAreaOrientation = "vertical" | "horizontal" | "both";
|
|
7
7
|
type ScrollArea = ComponentConfig<typeof theme>;
|
|
8
|
-
type ScrollAreaProps = Omit<UIScrollArea.Root.Props, "children" | "className"
|
|
8
|
+
type ScrollAreaProps = Omit<UIScrollArea.Root.Props, "children" | "className"> & {
|
|
9
9
|
/** Scrollable content. */
|
|
10
10
|
children?: React.ReactNode;
|
|
11
11
|
/** Scrollbar axes to render. Defaults to `"vertical"`. */
|
|
@@ -15,7 +15,7 @@ type SelectItemProps<Value extends string = string> = {
|
|
|
15
15
|
/** Whether the option is disabled. */
|
|
16
16
|
disabled?: boolean;
|
|
17
17
|
};
|
|
18
|
-
type SelectProps<Value extends string = string> = Omit<UISelect.Root.Props<Value>, "children" | "className" | "
|
|
18
|
+
type SelectProps<Value extends string = string> = Omit<UISelect.Root.Props<Value>, "children" | "className" | "items" | "multiple" | "value" | "defaultValue" | "onValueChange"> & VariantProps<typeof theme> & Pick<UISelect.Positioner.Props, "side" | "align" | "sideOffset" | "alignOffset" | "collisionPadding" | "alignItemWithTrigger"> & {
|
|
19
19
|
/** Options rendered by the select. */
|
|
20
20
|
items: readonly SelectItemProps<Value>[];
|
|
21
21
|
/** Visible label associated with the trigger. */
|
|
@@ -38,9 +38,11 @@ type SelectProps<Value extends string = string> = Omit<UISelect.Root.Props<Value
|
|
|
38
38
|
"aria-describedby"?: string;
|
|
39
39
|
/** Tailwind classes merged into the root element. */
|
|
40
40
|
className?: string;
|
|
41
|
+
/** Inline styles merged into the root element. */
|
|
42
|
+
style?: React.CSSProperties;
|
|
41
43
|
/** Tailwind classes for internal slots, keyed by `data-slot`. */
|
|
42
44
|
ui?: Select["slots"];
|
|
43
45
|
};
|
|
44
|
-
declare function Select<Value extends string = string>({ className, ui, size, items, label, description, placeholder, value, defaultValue, onValueChange, side, align, sideOffset, alignOffset, collisionPadding, alignItemWithTrigger, disabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...props }: SelectProps<Value>): React.JSX.Element;
|
|
46
|
+
declare function Select<Value extends string = string>({ className, ui, size, items, label, description, placeholder, value, defaultValue, onValueChange, side, align, sideOffset, alignOffset, collisionPadding, alignItemWithTrigger, disabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, style, ...props }: SelectProps<Value>): React.JSX.Element;
|
|
45
47
|
export { Select };
|
|
46
48
|
export type { SelectItemProps, SelectProps };
|
|
@@ -28,6 +28,7 @@ function Select({
|
|
|
28
28
|
"aria-label": ariaLabel,
|
|
29
29
|
"aria-labelledby": ariaLabelledBy,
|
|
30
30
|
"aria-describedby": ariaDescribedBy,
|
|
31
|
+
style,
|
|
31
32
|
...props
|
|
32
33
|
}) {
|
|
33
34
|
const styles = theme({ size });
|
|
@@ -57,7 +58,8 @@ function Select({
|
|
|
57
58
|
{
|
|
58
59
|
"data-slot": "root",
|
|
59
60
|
"data-disabled": fieldsetDisabled || void 0,
|
|
60
|
-
className: cn(styles.root(), ui?.root, className)
|
|
61
|
+
className: cn(styles.root(), ui?.root, className),
|
|
62
|
+
style
|
|
61
63
|
},
|
|
62
64
|
label ? /* @__PURE__ */ React.createElement(
|
|
63
65
|
UISelect.Label,
|
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import { type ComponentConfig } from "../internal/tv";
|
|
4
4
|
import theme from "../theme/slider";
|
|
5
5
|
type Slider = ComponentConfig<typeof theme>;
|
|
6
|
-
type SliderProps<Value extends number | readonly number[] = number> = Omit<UISlider.Root.Props<Value>, "children" | "
|
|
6
|
+
type SliderProps<Value extends number | readonly number[] = number> = Omit<UISlider.Root.Props<Value>, "children" | "className"> & Pick<UISlider.Thumb.Props, "getAriaLabel" | "getAriaValueText"> & {
|
|
7
7
|
/** Tailwind classes merged into the root. */
|
|
8
8
|
className?: string;
|
|
9
9
|
/** Tailwind classes for internal slots, keyed by `data-slot`. */
|
|
@@ -4,7 +4,7 @@ import { type VariantProps } from "tailwind-variants";
|
|
|
4
4
|
import { type ComponentConfig } from "../internal/tv";
|
|
5
5
|
import theme from "../theme/switch";
|
|
6
6
|
type Switch = ComponentConfig<typeof theme>;
|
|
7
|
-
interface SwitchProps extends Omit<UISwitch.Root.Props, "className" | "children" | "
|
|
7
|
+
interface SwitchProps extends Omit<UISwitch.Root.Props, "className" | "children" | "ref">, VariantProps<typeof theme> {
|
|
8
8
|
/** Ref to the rendered root element. */
|
|
9
9
|
ref?: React.Ref<HTMLElement>;
|
|
10
10
|
/** Tailwind classes merged into the Base UI switch root. */
|
|
@@ -5,7 +5,7 @@ import { type ComponentConfig } from "../internal/tv";
|
|
|
5
5
|
import theme from "../theme/tabs";
|
|
6
6
|
type Tabs = ComponentConfig<typeof theme>;
|
|
7
7
|
/** One tab and its related panel. */
|
|
8
|
-
type TabsItemProps<Value extends string = string> = Omit<UITabs.Tab.Props, "children" | "className" | "content" | "
|
|
8
|
+
type TabsItemProps<Value extends string = string> = Omit<UITabs.Tab.Props, "children" | "className" | "content" | "value"> & {
|
|
9
9
|
/** Value that identifies the tab and its panel. */
|
|
10
10
|
value: Value;
|
|
11
11
|
/** Visible label inside the tab. */
|
|
@@ -21,7 +21,7 @@ type TabsItemProps<Value extends string = string> = Omit<UITabs.Tab.Props, "chil
|
|
|
21
21
|
/** Tailwind classes for this item's internal slots, keyed by `data-slot`. */
|
|
22
22
|
ui?: Partial<Pick<Tabs["slots"], "tab" | "icon" | "label" | "panel" | "panelContent">>;
|
|
23
23
|
};
|
|
24
|
-
type TabsProps<Value extends string = string> = Omit<UITabs.Root.Props, "children" | "className" | "
|
|
24
|
+
type TabsProps<Value extends string = string> = Omit<UITabs.Root.Props, "children" | "className" | "value" | "defaultValue" | "onValueChange"> & Pick<UITabs.List.Props, "activateOnFocus" | "loopFocus"> & VariantProps<typeof theme> & {
|
|
25
25
|
/** Tabs and panels rendered by the component. */
|
|
26
26
|
items: readonly TabsItemProps<Value>[];
|
|
27
27
|
/** Controlled active value. Use `null` to render no active tab. */
|
|
@@ -6,7 +6,7 @@ import { type ComponentConfig } from "../internal/tv";
|
|
|
6
6
|
import theme from "../theme/toggle-group";
|
|
7
7
|
type ToggleGroup = ComponentConfig<typeof theme>;
|
|
8
8
|
/** One option managed by the toggle group. */
|
|
9
|
-
type ToggleGroupItemProps<Value extends string = string> = Omit<UIToggle.Props<Value>, "className" | "children" | "
|
|
9
|
+
type ToggleGroupItemProps<Value extends string = string> = Omit<UIToggle.Props<Value>, "className" | "children" | "value" | "pressed" | "defaultPressed"> & {
|
|
10
10
|
/** Value that identifies the option in the group value. */
|
|
11
11
|
value: Value;
|
|
12
12
|
/** Visible content inside the item. */
|
|
@@ -18,7 +18,7 @@ type ToggleGroupItemProps<Value extends string = string> = Omit<UIToggle.Props<V
|
|
|
18
18
|
/** Tailwind classes for this item's internal slots, keyed by `data-slot`. */
|
|
19
19
|
ui?: Partial<Pick<ToggleGroup["slots"], "item" | "content" | "icon" | "label">>;
|
|
20
20
|
};
|
|
21
|
-
type ToggleGroupProps<Value extends string = string> = Omit<UIToggleGroup.Props<Value>, "className" | "
|
|
21
|
+
type ToggleGroupProps<Value extends string = string> = Omit<UIToggleGroup.Props<Value>, "className" | "children"> & VariantProps<typeof theme> & {
|
|
22
22
|
/** Options rendered by the toggle group. */
|
|
23
23
|
items: readonly ToggleGroupItemProps<Value>[];
|
|
24
24
|
/** Tailwind classes merged into the group root. */
|
|
@@ -4,7 +4,7 @@ import { type VariantProps } from "tailwind-variants";
|
|
|
4
4
|
import { type ComponentConfig } from "../internal/tv";
|
|
5
5
|
import theme from "../theme/toggle";
|
|
6
6
|
type Toggle = ComponentConfig<typeof theme>;
|
|
7
|
-
type ToggleProps<Value extends string = string> = Omit<UIToggle.Props<Value>, "className" | "children" | "
|
|
7
|
+
type ToggleProps<Value extends string = string> = Omit<UIToggle.Props<Value>, "className" | "children" | "ref"> & Omit<VariantProps<typeof theme>, "iconOnly"> & {
|
|
8
8
|
/** Ref to the rendered root element. */
|
|
9
9
|
ref?: React.Ref<HTMLButtonElement>;
|
|
10
10
|
/** Tailwind classes merged into the toggle root. */
|
|
@@ -12,9 +12,11 @@ type TooltipProps = Omit<UITooltip.Root.Props, "children"> & Pick<UITooltip.Trig
|
|
|
12
12
|
arrow?: boolean;
|
|
13
13
|
/** Tailwind classes merged into the tooltip popup. */
|
|
14
14
|
className?: string;
|
|
15
|
+
/** Inline styles merged into the tooltip popup. */
|
|
16
|
+
style?: React.CSSProperties;
|
|
15
17
|
/** Tailwind classes for internal slots, keyed by `data-slot`. */
|
|
16
18
|
ui?: Tooltip["slots"];
|
|
17
19
|
};
|
|
18
|
-
declare function Tooltip({ trigger, children, arrow, delay, closeDelay, side, align, sideOffset, alignOffset, collisionPadding, className, ui, ...props }: TooltipProps): React.JSX.Element;
|
|
20
|
+
declare function Tooltip({ trigger, children, arrow, delay, closeDelay, side, align, sideOffset, alignOffset, collisionPadding, className, style, ui, ...props }: TooltipProps): React.JSX.Element;
|
|
19
21
|
export { Tooltip };
|
|
20
22
|
export type { TooltipProps };
|
|
@@ -15,6 +15,7 @@ function Tooltip({
|
|
|
15
15
|
alignOffset,
|
|
16
16
|
collisionPadding,
|
|
17
17
|
className,
|
|
18
|
+
style,
|
|
18
19
|
ui,
|
|
19
20
|
...props
|
|
20
21
|
}) {
|
|
@@ -41,7 +42,8 @@ function Tooltip({
|
|
|
41
42
|
UITooltip.Popup,
|
|
42
43
|
{
|
|
43
44
|
"data-slot": "popup",
|
|
44
|
-
className: cn(styles.popup(), ui?.popup, className)
|
|
45
|
+
className: cn(styles.popup(), ui?.popup, className),
|
|
46
|
+
style
|
|
45
47
|
},
|
|
46
48
|
/* @__PURE__ */ React.createElement(
|
|
47
49
|
"span",
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import "./keyframes.css";@source "./**/*.mjs";@source "./**/*.{ts,tsx}";@custom-variant ui-light (&:where(.light, .light *, [data-theme="light"], [data-theme="light"] *));@custom-variant ui-dark (&:where(.dark, .dark *, [data-theme="dark"], [data-theme="dark"] *));@layer theme{:host,:root{color-scheme:light;--ui-ink:#1f1f1f;--ui-ink-active:#000;--ui-surface:#fff;--ui-glass-surface:hsla(0,0%,100%,.2);--ui-glass-border:rgba(31,31,31,.16);--ui-glass-focus:rgba(0,0,0,.6);--ui-glass-inner-border:rgba(0,0,0,.9);--ui-glass-rim:hsla(0,0%,100%,.2);--ui-glass-highlight:hsla(0,0%,100%,.8);--ui-glass-glare-stop:15%;--ui-glass-tone:brightness(0.98);--ui-glass-contrast:1.05;--ui-drop-shadow-label:drop-shadow(0 25px 3px hsla(0,0%,40%,.15));--ui-shadow-glass:inset 0 2px 1px -1px hsla(0,0%,100%,.9),inset 0 -2px 1px -1px hsla(0,0%,100%,.9),inset 0 6px 1px -6px hsla(0,0%,100%,.55),inset 0 -6px 1px -6px hsla(0,0%,100%,.55),inset 0 0 0 1px hsla(0,0%,100%,.45),inset 0 0 2px rgba(0,0,0,.8),0 4px 8px rgba(0,0,0,.2)}.dark,[data-theme=dark]{color-scheme:dark;--ui-ink:#f5f5f5;--ui-ink-active:#fff;--ui-surface:#141414;--ui-glass-surface:hsla(0,0%,8%,.62);--ui-glass-border:hsla(0,0%,100%,.2);--ui-glass-focus:hsla(0,0%,100%,.7);--ui-glass-inner-border:hsla(0,0%,100%,.4);--ui-glass-rim:hsla(0,0%,100%,.25);--ui-glass-highlight:hsla(0,0%,100%,.45);--ui-glass-tone:brightness(0.95);--ui-glass-contrast:1;--ui-drop-shadow-label:drop-shadow(0 25px 3px rgba(0,0,0,.45));--ui-shadow-glass:inset 0 2px 1px -1px hsla(0,0%,100%,.35),inset 0 -2px 1px -1px hsla(0,0%,100%,.35),inset 0 6px 1px -6px hsla(0,0%,100%,.2),inset 0 -6px 1px -6px hsla(0,0%,100%,.2),inset 0 0 0 1px hsla(0,0%,100%,.14),inset 0 0 2px rgba(0,0,0,.9),0 4px 8px rgba(0,0,0,.35)}.light,[data-theme=light]{color-scheme:light;--ui-ink:#1f1f1f;--ui-ink-active:#000;--ui-surface:#fff;--ui-glass-surface:hsla(0,0%,100%,.2);--ui-glass-border:rgba(31,31,31,.16);--ui-glass-focus:rgba(0,0,0,.6);--ui-glass-inner-border:rgba(0,0,0,.9);--ui-glass-rim:hsla(0,0%,100%,.2);--ui-glass-highlight:hsla(0,0%,100%,.8);--ui-glass-glare-stop:15%;--ui-glass-tone:brightness(0.98);--ui-glass-contrast:1.05;--ui-drop-shadow-label:drop-shadow(0 25px 3px hsla(0,0%,40%,.15));--ui-shadow-glass:inset 0 2px 1px -1px hsla(0,0%,100%,.9),inset 0 -2px 1px -1px hsla(0,0%,100%,.9),inset 0 6px 1px -6px hsla(0,0%,100%,.55),inset 0 -6px 1px -6px hsla(0,0%,100%,.55),inset 0 0 0 1px hsla(0,0%,100%,.45),inset 0 0 2px rgba(0,0,0,.8),0 4px 8px rgba(0,0,0,.2)}:host,:root{--ui-glass-blur:4px;--ui-glass-saturate:150%;--ui-glass-chip-blur:8px;--ui-glass-inner-inset:8px;--ui-glass-inner-offset:1px;--ui-glass-inner-blur:8px;--ui-glass-highlight-blur:7px;--ui-glass-rim-inset:9px;--ui-glass-rim-blur:1px}}@theme inline{--color-ui-ink:var(--ui-ink);--color-ui-ink-active:var(--ui-ink-active);--color-ui-surface:var(--ui-surface);--color-ui-glass-surface:var(--ui-glass-surface);--color-ui-glass-border:var(--ui-glass-border);--color-ui-glass-focus:var(--ui-glass-focus);--color-ui-glass-inner-border:var(--ui-glass-inner-border);--color-ui-glass-rim:var(--ui-glass-rim);--color-ui-glass-highlight:var(--ui-glass-highlight)}@layer components{.ui-glass{backdrop-filter:blur(var(--ui-glass-blur,4px)) saturate(var(--ui-glass-saturate,150%));background-color:var(--ui-glass-surface);border:1px double var(--ui-glass-border);box-shadow:var(--ui-shadow-glass);filter:var(--ui-glass-tone,brightness(.98)) contrast(var(--ui-glass-contrast,1.05));position:relative}.ui-glass-inner:before{border:1px solid var(--ui-glass-inner-border);bottom:calc(var(--ui-glass-inner-inset, 8px) - var(--ui-glass-inner-offset, 1px));filter:blur(var(--ui-glass-inner-blur,8px));left:var(--ui-glass-inner-inset,8px);right:var(--ui-glass-inner-inset,8px);top:calc(var(--ui-glass-inner-inset, 8px) + var(--ui-glass-inner-offset, 1px));z-index:1}.ui-glass-highlight:after,.ui-glass-inner:before{border-radius:inherit;content:"";pointer-events:none;position:absolute}.ui-glass-highlight:after{background:linear-gradient(45deg,var(--ui-glass-highlight) 0,transparent var(--ui-glass-glare-stop),transparent calc(100% - var(--ui-glass-glare-stop)),var(--ui-glass-highlight) 100%);filter:blur(var(--ui-glass-highlight-blur,7px));inset:0;z-index:3}.ui-glass-rim{border:1px solid var(--ui-glass-rim);border-radius:inherit;filter:blur(var(--ui-glass-rim-blur,1px));height:calc(100% - var(--ui-glass-rim-inset, 9px));left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);width:calc(100% - var(--ui-glass-rim-inset, 9px));z-index:2}.ui-glass-chip{backdrop-filter:blur(var(--ui-glass-chip-blur,8px)) saturate(var(--ui-glass-saturate,150%));background-color:var(--ui-glass-surface);border:1px solid var(--ui-glass-border);box-shadow:inset 0 1px 0 var(--ui-glass-highlight)}}
|
|
1
|
+
@import "./keyframes.css";@source "./**/*.mjs";@source "./**/*.{ts,tsx}";@custom-variant ui-light (&:where(.light, .light *, [data-theme="light"], [data-theme="light"] *));@custom-variant ui-dark (&:where(.dark, .dark *, [data-theme="dark"], [data-theme="dark"] *));@layer theme{:host,:root{color-scheme:light;--ui-ink:#1f1f1f;--ui-ink-active:#000;--ui-surface:#fff;--ui-glass-surface:hsla(0,0%,100%,.2);--ui-glass-overlay-surface:hsla(0,0%,100%,.64);--ui-glass-border:rgba(31,31,31,.16);--ui-glass-focus:rgba(0,0,0,.6);--ui-glass-inner-border:rgba(0,0,0,.9);--ui-glass-rim:hsla(0,0%,100%,.2);--ui-glass-highlight:hsla(0,0%,100%,.8);--ui-glass-glare-stop:15%;--ui-glass-tone:brightness(0.98);--ui-glass-contrast:1.05;--ui-drop-shadow-label:drop-shadow(0 25px 3px hsla(0,0%,40%,.15));--ui-shadow-glass:inset 0 2px 1px -1px hsla(0,0%,100%,.9),inset 0 -2px 1px -1px hsla(0,0%,100%,.9),inset 0 6px 1px -6px hsla(0,0%,100%,.55),inset 0 -6px 1px -6px hsla(0,0%,100%,.55),inset 0 0 0 1px hsla(0,0%,100%,.45),inset 0 0 2px rgba(0,0,0,.8),0 4px 8px rgba(0,0,0,.2)}.dark,[data-theme=dark]{color-scheme:dark;--ui-ink:#f5f5f5;--ui-ink-active:#fff;--ui-surface:#141414;--ui-glass-surface:hsla(0,0%,8%,.62);--ui-glass-overlay-surface:hsla(0,0%,8%,.76);--ui-glass-border:hsla(0,0%,100%,.2);--ui-glass-focus:hsla(0,0%,100%,.7);--ui-glass-inner-border:hsla(0,0%,100%,.4);--ui-glass-rim:hsla(0,0%,100%,.25);--ui-glass-highlight:hsla(0,0%,100%,.45);--ui-glass-tone:brightness(0.95);--ui-glass-contrast:1;--ui-drop-shadow-label:drop-shadow(0 25px 3px rgba(0,0,0,.45));--ui-shadow-glass:inset 0 2px 1px -1px hsla(0,0%,100%,.35),inset 0 -2px 1px -1px hsla(0,0%,100%,.35),inset 0 6px 1px -6px hsla(0,0%,100%,.2),inset 0 -6px 1px -6px hsla(0,0%,100%,.2),inset 0 0 0 1px hsla(0,0%,100%,.14),inset 0 0 2px rgba(0,0,0,.9),0 4px 8px rgba(0,0,0,.35)}.light,[data-theme=light]{color-scheme:light;--ui-ink:#1f1f1f;--ui-ink-active:#000;--ui-surface:#fff;--ui-glass-surface:hsla(0,0%,100%,.2);--ui-glass-overlay-surface:hsla(0,0%,100%,.64);--ui-glass-border:rgba(31,31,31,.16);--ui-glass-focus:rgba(0,0,0,.6);--ui-glass-inner-border:rgba(0,0,0,.9);--ui-glass-rim:hsla(0,0%,100%,.2);--ui-glass-highlight:hsla(0,0%,100%,.8);--ui-glass-glare-stop:15%;--ui-glass-tone:brightness(0.98);--ui-glass-contrast:1.05;--ui-drop-shadow-label:drop-shadow(0 25px 3px hsla(0,0%,40%,.15));--ui-shadow-glass:inset 0 2px 1px -1px hsla(0,0%,100%,.9),inset 0 -2px 1px -1px hsla(0,0%,100%,.9),inset 0 6px 1px -6px hsla(0,0%,100%,.55),inset 0 -6px 1px -6px hsla(0,0%,100%,.55),inset 0 0 0 1px hsla(0,0%,100%,.45),inset 0 0 2px rgba(0,0,0,.8),0 4px 8px rgba(0,0,0,.2)}:host,:root{--ui-glass-blur:4px;--ui-glass-saturate:150%;--ui-glass-chip-blur:8px;--ui-glass-inner-inset:8px;--ui-glass-inner-offset:1px;--ui-glass-inner-blur:8px;--ui-glass-highlight-blur:7px;--ui-glass-rim-inset:9px;--ui-glass-rim-blur:1px}}@theme inline{--color-ui-ink:var(--ui-ink);--color-ui-ink-active:var(--ui-ink-active);--color-ui-surface:var(--ui-surface);--color-ui-glass-surface:var(--ui-glass-surface);--color-ui-glass-overlay-surface:var(--ui-glass-overlay-surface);--color-ui-glass-border:var(--ui-glass-border);--color-ui-glass-focus:var(--ui-glass-focus);--color-ui-glass-inner-border:var(--ui-glass-inner-border);--color-ui-glass-rim:var(--ui-glass-rim);--color-ui-glass-highlight:var(--ui-glass-highlight)}@layer components{.ui-glass{backdrop-filter:blur(var(--ui-glass-blur,4px)) saturate(var(--ui-glass-saturate,150%));background-color:var(--ui-glass-surface);border:1px double var(--ui-glass-border);box-shadow:var(--ui-shadow-glass);filter:var(--ui-glass-tone,brightness(.98)) contrast(var(--ui-glass-contrast,1.05));position:relative}.ui-glass-overlay{background-color:var(--ui-glass-overlay-surface)}.ui-glass-inner:before{border:1px solid var(--ui-glass-inner-border);bottom:calc(var(--ui-glass-inner-inset, 8px) - var(--ui-glass-inner-offset, 1px));filter:blur(var(--ui-glass-inner-blur,8px));left:var(--ui-glass-inner-inset,8px);right:var(--ui-glass-inner-inset,8px);top:calc(var(--ui-glass-inner-inset, 8px) + var(--ui-glass-inner-offset, 1px));z-index:1}.ui-glass-highlight:after,.ui-glass-inner:before{border-radius:inherit;content:"";pointer-events:none;position:absolute}.ui-glass-highlight:after{background:linear-gradient(45deg,var(--ui-glass-highlight) 0,transparent var(--ui-glass-glare-stop),transparent calc(100% - var(--ui-glass-glare-stop)),var(--ui-glass-highlight) 100%);filter:blur(var(--ui-glass-highlight-blur,7px));inset:0;z-index:3}.ui-glass-rim{border:1px solid var(--ui-glass-rim);border-radius:inherit;filter:blur(var(--ui-glass-rim-blur,1px));height:calc(100% - var(--ui-glass-rim-inset, 9px));left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);width:calc(100% - var(--ui-glass-rim-inset, 9px));z-index:2}.ui-glass-chip{backdrop-filter:blur(var(--ui-glass-chip-blur,8px)) saturate(var(--ui-glass-saturate,150%));background-color:var(--ui-glass-surface);border:1px solid var(--ui-glass-border);box-shadow:inset 0 1px 0 var(--ui-glass-highlight)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer theme{[data-glass=thin],[data-glass=thin]:is(.light,.dark,[data-theme=light],[data-theme=dark]){--ui-glass-surface:light-dark(hsla(0,0%,100%,.2),hsla(0,0%,8%,.62));--ui-glass-border:light-dark(rgba(31,31,31,.16),hsla(0,0%,100%,.2));--ui-glass-blur:4px;--ui-glass-saturate:150%}[data-glass=soft],[data-glass=soft]:is(.light,.dark,[data-theme=light],[data-theme=dark]){--ui-glass-surface:light-dark(hsla(0,0%,100%,.283),hsla(0,0%,8%,.653));--ui-glass-border:light-dark(rgba(31,31,31,.187),hsla(0,0%,100%,.227));--ui-glass-blur:8px;--ui-glass-saturate:146.7%}[data-glass=regular],[data-glass=regular]:is(.light,.dark,[data-theme=light],[data-theme=dark]){--ui-glass-surface:light-dark(hsla(0,0%,100%,.367),hsla(0,0%,8%,.687));--ui-glass-border:light-dark(rgba(31,31,31,.213),hsla(0,0%,100%,.253));--ui-glass-blur:12px;--ui-glass-saturate:143.3%}[data-glass=thick],[data-glass=thick]:is(.light,.dark,[data-theme=light],[data-theme=dark]){--ui-glass-surface:light-dark(hsla(0,0%,100%,.45),hsla(0,0%,8%,.72));--ui-glass-border:light-dark(rgba(31,31,31,.24),hsla(0,0%,100%,.28));--ui-glass-blur:16px;--ui-glass-saturate:140%}}
|
|
1
|
+
@layer theme{[data-glass=thin],[data-glass=thin]:is(.light,.dark,[data-theme=light],[data-theme=dark]){--ui-glass-surface:light-dark(hsla(0,0%,100%,.2),hsla(0,0%,8%,.62));--ui-glass-overlay-surface:light-dark(hsla(0,0%,100%,.64),hsla(0,0%,8%,.76));--ui-glass-border:light-dark(rgba(31,31,31,.16),hsla(0,0%,100%,.2));--ui-glass-blur:4px;--ui-glass-saturate:150%}[data-glass=soft],[data-glass=soft]:is(.light,.dark,[data-theme=light],[data-theme=dark]){--ui-glass-surface:light-dark(hsla(0,0%,100%,.283),hsla(0,0%,8%,.653));--ui-glass-overlay-surface:light-dark(hsla(0,0%,100%,.69),hsla(0,0%,8%,.79));--ui-glass-border:light-dark(rgba(31,31,31,.187),hsla(0,0%,100%,.227));--ui-glass-blur:8px;--ui-glass-saturate:146.7%}[data-glass=regular],[data-glass=regular]:is(.light,.dark,[data-theme=light],[data-theme=dark]){--ui-glass-surface:light-dark(hsla(0,0%,100%,.367),hsla(0,0%,8%,.687));--ui-glass-overlay-surface:light-dark(hsla(0,0%,100%,.74),hsla(0,0%,8%,.82));--ui-glass-border:light-dark(rgba(31,31,31,.213),hsla(0,0%,100%,.253));--ui-glass-blur:12px;--ui-glass-saturate:143.3%}[data-glass=thick],[data-glass=thick]:is(.light,.dark,[data-theme=light],[data-theme=dark]){--ui-glass-surface:light-dark(hsla(0,0%,100%,.45),hsla(0,0%,8%,.72));--ui-glass-overlay-surface:light-dark(hsla(0,0%,100%,.8),hsla(0,0%,8%,.86));--ui-glass-border:light-dark(rgba(31,31,31,.24),hsla(0,0%,100%,.28));--ui-glass-blur:16px;--ui-glass-saturate:140%}}
|
|
@@ -9,7 +9,7 @@ export default tv({
|
|
|
9
9
|
],
|
|
10
10
|
viewport: "fixed inset-0 z-50 flex overflow-y-auto overscroll-contain p-4",
|
|
11
11
|
popup: [
|
|
12
|
-
"relative isolate m-auto w-full max-w-md
|
|
12
|
+
"relative isolate m-auto w-full max-w-md",
|
|
13
13
|
"rounded-[1.75rem] text-ui-ink outline-none",
|
|
14
14
|
"transition-[opacity,scale,translate] duration-200 ease-out",
|
|
15
15
|
"data-[starting-style]:translate-y-2 data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
|
@@ -17,7 +17,7 @@ export default tv({
|
|
|
17
17
|
"motion-reduce:transition-none"
|
|
18
18
|
],
|
|
19
19
|
glass: [
|
|
20
|
-
"ui-glass ui-glass-inner ui-glass-highlight",
|
|
20
|
+
"ui-glass ui-glass-overlay ui-glass-inner ui-glass-highlight",
|
|
21
21
|
"pointer-events-none absolute inset-0 z-0 overflow-hidden rounded-[inherit]"
|
|
22
22
|
],
|
|
23
23
|
overlay: "ui-glass-rim",
|
|
@@ -26,8 +26,8 @@ export default tv({
|
|
|
26
26
|
"min-w-0 text-lg font-semibold tracking-tight text-ui-ink",
|
|
27
27
|
"[filter:var(--ui-drop-shadow-label)]"
|
|
28
28
|
],
|
|
29
|
-
description: "mt-2 min-w-0 text-sm leading-relaxed text-ui-ink opacity-
|
|
30
|
-
body: "mt-4 min-w-0 text-sm leading-relaxed text-ui-ink opacity-
|
|
29
|
+
description: "mt-2 min-w-0 text-sm leading-relaxed text-ui-ink opacity-85",
|
|
30
|
+
body: "mt-4 min-w-0 text-sm leading-relaxed text-ui-ink opacity-90",
|
|
31
31
|
footer: "mt-6 flex flex-wrap items-center justify-end gap-2"
|
|
32
32
|
}
|
|
33
33
|
});
|
package/dist/theme/dialog.mjs
CHANGED
|
@@ -9,7 +9,7 @@ export default tv({
|
|
|
9
9
|
],
|
|
10
10
|
viewport: "fixed inset-0 z-50 flex overflow-y-auto overscroll-contain p-4",
|
|
11
11
|
popup: [
|
|
12
|
-
"relative isolate m-auto w-full max-w-md
|
|
12
|
+
"relative isolate m-auto w-full max-w-md",
|
|
13
13
|
"rounded-[1.75rem] text-ui-ink outline-none",
|
|
14
14
|
"transition-[opacity,scale,translate] duration-200 ease-out",
|
|
15
15
|
"data-[starting-style]:translate-y-2 data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
|
@@ -17,7 +17,7 @@ export default tv({
|
|
|
17
17
|
"motion-reduce:transition-none"
|
|
18
18
|
],
|
|
19
19
|
glass: [
|
|
20
|
-
"ui-glass ui-glass-inner ui-glass-highlight",
|
|
20
|
+
"ui-glass ui-glass-overlay ui-glass-inner ui-glass-highlight",
|
|
21
21
|
"pointer-events-none absolute inset-0 z-0 overflow-hidden rounded-[inherit]"
|
|
22
22
|
],
|
|
23
23
|
overlay: "ui-glass-rim",
|
|
@@ -26,8 +26,8 @@ export default tv({
|
|
|
26
26
|
"min-w-0 text-lg font-semibold tracking-tight text-ui-ink",
|
|
27
27
|
"[filter:var(--ui-drop-shadow-label)]"
|
|
28
28
|
],
|
|
29
|
-
description: "mt-2 min-w-0 text-sm leading-relaxed text-ui-ink opacity-
|
|
30
|
-
body: "mt-4 min-w-0 text-sm leading-relaxed text-ui-ink opacity-
|
|
29
|
+
description: "mt-2 min-w-0 text-sm leading-relaxed text-ui-ink opacity-85",
|
|
30
|
+
body: "mt-4 min-w-0 text-sm leading-relaxed text-ui-ink opacity-90",
|
|
31
31
|
footer: "mt-6 flex flex-wrap items-center justify-end gap-2"
|
|
32
32
|
}
|
|
33
33
|
});
|
package/dist/theme/drawer.mjs
CHANGED
|
@@ -12,14 +12,14 @@ export default tv({
|
|
|
12
12
|
],
|
|
13
13
|
viewport: "fixed inset-0 z-50 flex overflow-hidden",
|
|
14
14
|
popup: [
|
|
15
|
-
"relative isolate flex min-h-0 flex-col overflow-hidden
|
|
15
|
+
"relative isolate flex min-h-0 flex-col overflow-hidden",
|
|
16
16
|
"text-ui-ink outline-none touch-auto overscroll-contain will-change-transform",
|
|
17
17
|
"transition-transform duration-300 ease-[cubic-bezier(0.32,0.72,0,1)]",
|
|
18
18
|
"data-[swiping]:select-none",
|
|
19
19
|
"motion-reduce:transition-none"
|
|
20
20
|
],
|
|
21
21
|
glass: [
|
|
22
|
-
"ui-glass ui-glass-inner ui-glass-highlight",
|
|
22
|
+
"ui-glass ui-glass-overlay ui-glass-inner ui-glass-highlight",
|
|
23
23
|
"pointer-events-none absolute inset-0 z-0 overflow-hidden rounded-[inherit]"
|
|
24
24
|
],
|
|
25
25
|
overlay: "ui-glass-rim",
|
|
@@ -31,8 +31,8 @@ export default tv({
|
|
|
31
31
|
"min-w-0 text-lg font-semibold tracking-tight text-ui-ink",
|
|
32
32
|
"[filter:var(--ui-drop-shadow-label)]"
|
|
33
33
|
],
|
|
34
|
-
description: "mt-2 min-w-0 text-sm leading-relaxed text-ui-ink opacity-
|
|
35
|
-
body: "mt-4 min-w-0 text-sm leading-relaxed text-ui-ink opacity-
|
|
34
|
+
description: "mt-2 min-w-0 text-sm leading-relaxed text-ui-ink opacity-85",
|
|
35
|
+
body: "mt-4 min-w-0 text-sm leading-relaxed text-ui-ink opacity-90",
|
|
36
36
|
footer: "mt-6 flex flex-wrap items-center justify-end gap-2"
|
|
37
37
|
},
|
|
38
38
|
variants: {
|
package/dist/theme/menu.mjs
CHANGED
|
@@ -3,7 +3,7 @@ export default tv({
|
|
|
3
3
|
slots: {
|
|
4
4
|
positioner: "z-50 outline-none",
|
|
5
5
|
popup: [
|
|
6
|
-
"relative isolate min-w-48 max-w-80 rounded-2xl
|
|
6
|
+
"relative isolate min-w-48 max-w-80 rounded-2xl p-1.5",
|
|
7
7
|
"text-ui-ink outline-none",
|
|
8
8
|
"transition-[opacity,scale] duration-150 ease-out",
|
|
9
9
|
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
|
@@ -15,7 +15,7 @@ export default tv({
|
|
|
15
15
|
"motion-reduce:transition-none"
|
|
16
16
|
],
|
|
17
17
|
glass: [
|
|
18
|
-
"ui-glass ui-glass-inner ui-glass-highlight",
|
|
18
|
+
"ui-glass ui-glass-overlay ui-glass-inner ui-glass-highlight",
|
|
19
19
|
"pointer-events-none absolute inset-0 z-0 overflow-hidden rounded-[inherit]"
|
|
20
20
|
],
|
|
21
21
|
overlay: "ui-glass-rim",
|
|
@@ -36,12 +36,12 @@ export default tv({
|
|
|
36
36
|
itemLabel: "min-w-0 flex-1 truncate",
|
|
37
37
|
shortcut: [
|
|
38
38
|
"ml-auto shrink-0 font-mono text-[0.65rem] uppercase tracking-[0.12em]",
|
|
39
|
-
"text-ui-ink/
|
|
39
|
+
"text-ui-ink/85"
|
|
40
40
|
],
|
|
41
41
|
group: "flex min-w-0 flex-col gap-0.5",
|
|
42
42
|
groupLabel: [
|
|
43
43
|
"px-2.5 pb-1 pt-2 text-[0.65rem] font-medium uppercase tracking-[0.14em]",
|
|
44
|
-
"text-ui-ink/
|
|
44
|
+
"text-ui-ink/85"
|
|
45
45
|
],
|
|
46
46
|
separator: "mx-1 my-1 h-px bg-ui-glass-border"
|
|
47
47
|
}
|
package/dist/theme/popover.mjs
CHANGED
|
@@ -3,7 +3,7 @@ export default tv({
|
|
|
3
3
|
slots: {
|
|
4
4
|
positioner: "z-50 outline-none",
|
|
5
5
|
popup: [
|
|
6
|
-
"relative isolate w-80 max-w-[calc(100vw-2rem)]
|
|
6
|
+
"relative isolate w-80 max-w-[calc(100vw-2rem)]",
|
|
7
7
|
"rounded-[1.5rem] text-ui-ink outline-none",
|
|
8
8
|
"transition-[opacity,scale,translate] duration-150 ease-out",
|
|
9
9
|
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
|
@@ -17,26 +17,30 @@ export default tv({
|
|
|
17
17
|
"motion-reduce:transition-none"
|
|
18
18
|
],
|
|
19
19
|
glass: [
|
|
20
|
-
"ui-glass ui-glass-inner ui-glass-highlight",
|
|
20
|
+
"ui-glass ui-glass-overlay ui-glass-inner ui-glass-highlight",
|
|
21
21
|
"pointer-events-none absolute inset-0 z-0 overflow-hidden rounded-[inherit]"
|
|
22
22
|
],
|
|
23
23
|
overlay: "ui-glass-rim",
|
|
24
24
|
arrow: [
|
|
25
25
|
"pointer-events-none absolute z-[1] size-3 rotate-45",
|
|
26
|
-
"border-ui-glass-border bg-ui-surface",
|
|
26
|
+
"border-ui-glass-border bg-ui-glass-overlay-surface",
|
|
27
27
|
"drop-shadow-[0_1px_2px_rgb(0_0_0/0.12)]",
|
|
28
28
|
"data-[side=bottom]:-top-[6px] data-[side=bottom]:border-t data-[side=bottom]:border-l",
|
|
29
29
|
"data-[side=top]:-bottom-[6px] data-[side=top]:border-r data-[side=top]:border-b",
|
|
30
30
|
"data-[side=left]:-right-[6px] data-[side=left]:border-t data-[side=left]:border-r",
|
|
31
|
-
"data-[side=right]:-left-[6px] data-[side=right]:border-b data-[side=right]:border-l"
|
|
31
|
+
"data-[side=right]:-left-[6px] data-[side=right]:border-b data-[side=right]:border-l",
|
|
32
|
+
"data-[side=bottom]:[clip-path:polygon(0_0,100%_0,0_100%)]",
|
|
33
|
+
"data-[side=top]:[clip-path:polygon(100%_0,100%_100%,0_100%)]",
|
|
34
|
+
"data-[side=left]:[clip-path:polygon(0_0,100%_0,100%_100%)]",
|
|
35
|
+
"data-[side=right]:[clip-path:polygon(0_0,0_100%,100%_100%)]"
|
|
32
36
|
],
|
|
33
37
|
content: "relative z-10 flex min-w-0 flex-col p-4",
|
|
34
38
|
title: [
|
|
35
39
|
"min-w-0 text-sm font-semibold tracking-tight text-ui-ink",
|
|
36
40
|
"[filter:var(--ui-drop-shadow-label)]"
|
|
37
41
|
],
|
|
38
|
-
description: "mt-1 min-w-0 text-xs leading-relaxed text-ui-ink opacity-
|
|
39
|
-
body: "mt-3 min-w-0 text-sm leading-relaxed text-ui-ink opacity-
|
|
42
|
+
description: "mt-1 min-w-0 text-xs leading-relaxed text-ui-ink opacity-85",
|
|
43
|
+
body: "mt-3 min-w-0 text-sm leading-relaxed text-ui-ink opacity-90",
|
|
40
44
|
footer: "mt-4 flex flex-wrap items-center justify-end gap-2"
|
|
41
45
|
}
|
|
42
46
|
});
|
package/dist/theme/select.mjs
CHANGED
|
@@ -39,7 +39,7 @@ export default tv({
|
|
|
39
39
|
positioner: "z-50 outline-none",
|
|
40
40
|
popup: [
|
|
41
41
|
"relative isolate min-w-[var(--anchor-width)] max-w-[min(24rem,var(--available-width))]",
|
|
42
|
-
"rounded-2xl
|
|
42
|
+
"rounded-2xl p-1.5 text-ui-ink outline-none",
|
|
43
43
|
"transition-[opacity,scale] duration-150 ease-out",
|
|
44
44
|
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
|
45
45
|
"data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
|
|
@@ -50,7 +50,7 @@ export default tv({
|
|
|
50
50
|
"motion-reduce:transition-none"
|
|
51
51
|
],
|
|
52
52
|
popupGlass: [
|
|
53
|
-
"ui-glass ui-glass-inner ui-glass-highlight",
|
|
53
|
+
"ui-glass ui-glass-overlay ui-glass-inner ui-glass-highlight",
|
|
54
54
|
"pointer-events-none absolute inset-0 z-0 overflow-hidden rounded-[inherit]"
|
|
55
55
|
],
|
|
56
56
|
popupOverlay: "ui-glass-rim",
|
package/dist/theme/toast.mjs
CHANGED
|
@@ -8,7 +8,7 @@ export default tv({
|
|
|
8
8
|
"[--shrink:calc(1_-_var(--scale))]",
|
|
9
9
|
"[--height:var(--toast-frontmost-height,var(--toast-height))]",
|
|
10
10
|
"absolute inset-x-0 isolate h-[var(--height)] w-full rounded-[1.25rem]",
|
|
11
|
-
"
|
|
11
|
+
"text-ui-ink select-none",
|
|
12
12
|
"z-[calc(1000-var(--toast-index))]",
|
|
13
13
|
"[transition:transform_500ms_cubic-bezier(0.22,1,0.36,1),opacity_500ms,height_150ms]",
|
|
14
14
|
"data-[expanded]:h-[var(--toast-height)]",
|
|
@@ -20,7 +20,7 @@ export default tv({
|
|
|
20
20
|
"motion-reduce:transition-none"
|
|
21
21
|
],
|
|
22
22
|
glass: [
|
|
23
|
-
"ui-glass ui-glass-inner ui-glass-highlight",
|
|
23
|
+
"ui-glass ui-glass-overlay ui-glass-inner ui-glass-highlight",
|
|
24
24
|
"pointer-events-none absolute inset-0 z-0 overflow-hidden rounded-[inherit]"
|
|
25
25
|
],
|
|
26
26
|
overlay: "ui-glass-rim",
|
|
@@ -39,7 +39,7 @@ export default tv({
|
|
|
39
39
|
"min-w-0 text-sm font-semibold tracking-tight text-ui-ink",
|
|
40
40
|
"[filter:var(--ui-drop-shadow-label)]"
|
|
41
41
|
],
|
|
42
|
-
description: "min-w-0 text-sm leading-relaxed text-ui-ink opacity-
|
|
42
|
+
description: "min-w-0 text-sm leading-relaxed text-ui-ink opacity-85",
|
|
43
43
|
actions: "flex shrink-0 items-center gap-1",
|
|
44
44
|
action: [
|
|
45
45
|
"ui-glass-chip inline-flex h-7 shrink-0 items-center rounded-full px-2.5",
|
package/dist/theme/tooltip.mjs
CHANGED
|
@@ -3,7 +3,7 @@ export default tv({
|
|
|
3
3
|
slots: {
|
|
4
4
|
positioner: "z-50 outline-none",
|
|
5
5
|
popup: [
|
|
6
|
-
"relative isolate max-w-64 rounded-xl
|
|
6
|
+
"relative isolate max-w-64 rounded-xl px-2.5 py-1.5",
|
|
7
7
|
"text-xs font-medium leading-tight text-ui-ink outline-none",
|
|
8
8
|
"transition-[opacity,scale] duration-100 ease-out",
|
|
9
9
|
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
|
@@ -15,24 +15,32 @@ export default tv({
|
|
|
15
15
|
"motion-reduce:transition-none"
|
|
16
16
|
],
|
|
17
17
|
glass: [
|
|
18
|
-
"ui-glass ui-glass-inner ui-glass-highlight",
|
|
18
|
+
"ui-glass ui-glass-overlay ui-glass-inner ui-glass-highlight",
|
|
19
19
|
"pointer-events-none absolute inset-0 z-0 overflow-hidden rounded-[inherit]"
|
|
20
20
|
],
|
|
21
21
|
overlay: "ui-glass-rim",
|
|
22
22
|
arrow: [
|
|
23
23
|
"pointer-events-none absolute z-[1] size-2 rotate-45",
|
|
24
|
-
"border-ui-glass-border bg-ui-surface",
|
|
24
|
+
"border-ui-glass-border bg-ui-glass-overlay-surface",
|
|
25
25
|
"drop-shadow-[0_1px_1px_rgb(0_0_0/0.12)]",
|
|
26
26
|
"data-[side=bottom]:-top-[4px] data-[side=bottom]:border-t data-[side=bottom]:border-l",
|
|
27
27
|
"data-[side=top]:-bottom-[4px] data-[side=top]:border-r data-[side=top]:border-b",
|
|
28
28
|
"data-[side=left]:-right-[4px] data-[side=left]:border-t data-[side=left]:border-r",
|
|
29
29
|
"data-[side=right]:-left-[4px] data-[side=right]:border-b data-[side=right]:border-l",
|
|
30
|
+
"data-[side=bottom]:[clip-path:polygon(0_0,100%_0,0_100%)]",
|
|
31
|
+
"data-[side=top]:[clip-path:polygon(100%_0,100%_100%,0_100%)]",
|
|
32
|
+
"data-[side=left]:[clip-path:polygon(0_0,100%_0,100%_100%)]",
|
|
33
|
+
"data-[side=right]:[clip-path:polygon(0_0,0_100%,100%_100%)]",
|
|
30
34
|
"data-[side=inline-start]:-end-[4px]",
|
|
31
35
|
"ltr:data-[side=inline-start]:border-t ltr:data-[side=inline-start]:border-e",
|
|
32
36
|
"rtl:data-[side=inline-start]:border-b rtl:data-[side=inline-start]:border-e",
|
|
33
37
|
"data-[side=inline-end]:-start-[4px]",
|
|
34
38
|
"ltr:data-[side=inline-end]:border-b ltr:data-[side=inline-end]:border-s",
|
|
35
|
-
"rtl:data-[side=inline-end]:border-t rtl:data-[side=inline-end]:border-s"
|
|
39
|
+
"rtl:data-[side=inline-end]:border-t rtl:data-[side=inline-end]:border-s",
|
|
40
|
+
"ltr:data-[side=inline-start]:[clip-path:polygon(0_0,100%_0,100%_100%)]",
|
|
41
|
+
"rtl:data-[side=inline-start]:[clip-path:polygon(0_0,0_100%,100%_100%)]",
|
|
42
|
+
"ltr:data-[side=inline-end]:[clip-path:polygon(0_0,0_100%,100%_100%)]",
|
|
43
|
+
"rtl:data-[side=inline-end]:[clip-path:polygon(0_0,100%_0,100%_100%)]"
|
|
36
44
|
],
|
|
37
45
|
content: "relative z-10"
|
|
38
46
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xingxingmofashu/ui",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "React components with a CSS-only Liquid Glass visual style for React 19 and Tailwind CSS 4.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "xingxingmofashu",
|
|
@@ -109,8 +109,7 @@
|
|
|
109
109
|
"lint": "oxlint",
|
|
110
110
|
"lint:fix": "oxlint --fix",
|
|
111
111
|
"test": "vitest run",
|
|
112
|
-
"test:
|
|
113
|
-
"test:visual:update": "playwright test --update-snapshots",
|
|
112
|
+
"test:e2e": "playwright test",
|
|
114
113
|
"typecheck": "tsc --noEmit",
|
|
115
114
|
"docs:dev": "pnpm --filter @xingxingmofashu/docs dev",
|
|
116
115
|
"docs:build": "pnpm --filter @xingxingmofashu/docs build",
|