@glasshome/ui 1.34.2 → 1.35.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/dist/solid/index.js +3947 -3898
- package/dist/solid/section-card.d.ts +2 -0
- package/package.json +1 -1
- package/src/solid/alert.tsx +36 -18
- package/src/solid/checkbox.tsx +22 -7
- package/src/solid/data-table.tsx +16 -10
- package/src/solid/dialog-parts.tsx +7 -4
- package/src/solid/field.tsx +9 -5
- package/src/solid/icon.tsx +4 -1
- package/src/solid/page-header.tsx +10 -7
- package/src/solid/password-input.tsx +5 -3
- package/src/solid/picker-row.tsx +14 -5
- package/src/solid/radio-group.tsx +21 -6
- package/src/solid/section-card.tsx +42 -23
- package/src/solid/sheet.tsx +11 -7
- package/src/solid/sonner.tsx +17 -7
- package/src/solid/widget-card.tsx +5 -4
- package/src/styles/theme.css +1 -1
package/src/solid/sheet.tsx
CHANGED
|
@@ -2,6 +2,7 @@ import { Dialog as DialogPrimitive, useDialogContext } from "@kobalte/core/dialo
|
|
|
2
2
|
import { usePortalMount } from "./portal-mount.js";
|
|
3
3
|
import type { VariantProps } from "cva";
|
|
4
4
|
import {
|
|
5
|
+
children,
|
|
5
6
|
type Component,
|
|
6
7
|
type ComponentProps,
|
|
7
8
|
type JSX,
|
|
@@ -97,13 +98,16 @@ type SheetContentProps = ComponentProps<typeof DialogPrimitive.Content> & {
|
|
|
97
98
|
ariaLabel?: string;
|
|
98
99
|
};
|
|
99
100
|
|
|
100
|
-
const SheetAbove: Component<{ above?: JSX.Element }> = (props) =>
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
101
|
+
const SheetAbove: Component<{ above?: JSX.Element }> = (props) => {
|
|
102
|
+
const above = children(() => props.above);
|
|
103
|
+
return (
|
|
104
|
+
<Show when={above()}>
|
|
105
|
+
<div data-slot="sheet-content-above" class="flex w-full shrink-0 items-end justify-center">
|
|
106
|
+
{above()}
|
|
107
|
+
</div>
|
|
108
|
+
</Show>
|
|
109
|
+
);
|
|
110
|
+
};
|
|
107
111
|
|
|
108
112
|
const SheetContent: ParentComponent<SheetContentProps> = (props) => {
|
|
109
113
|
const [local, rest] = splitProps(props, [
|
package/src/solid/sonner.tsx
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
children,
|
|
3
|
+
type Component,
|
|
4
|
+
type ComponentProps,
|
|
5
|
+
type JSX,
|
|
6
|
+
mergeProps,
|
|
7
|
+
Show,
|
|
8
|
+
} from "solid-js";
|
|
2
9
|
import { type ExternalToast, Toaster as SolidSonner, toast as sonnerToast } from "solid-sonner";
|
|
3
10
|
import {
|
|
4
11
|
ALERT_CLASS,
|
|
@@ -59,6 +66,9 @@ const GlassToast: Component<GlassToastProps> = (props) => {
|
|
|
59
66
|
const toneIcon = KIND_ICON[props.kind];
|
|
60
67
|
const watermarkGlyph: JSX.Element | null =
|
|
61
68
|
props.icon ?? (toneIcon ? <Icon icon={toneIcon} width={112} height={112} /> : null);
|
|
69
|
+
const title = children(() => props.title);
|
|
70
|
+
const description = children(() => props.description);
|
|
71
|
+
const action = children(() => props.action);
|
|
62
72
|
|
|
63
73
|
return (
|
|
64
74
|
<div
|
|
@@ -92,17 +102,17 @@ const GlassToast: Component<GlassToastProps> = (props) => {
|
|
|
92
102
|
</span>
|
|
93
103
|
</Show>
|
|
94
104
|
<div class={ALERT_CONTENT_CLASS}>
|
|
95
|
-
<Show when={
|
|
105
|
+
<Show when={title()}>
|
|
96
106
|
<p class={ALERT_TITLE_CLASS} style={tone ? { color: glassToneText(tone) } : undefined}>
|
|
97
|
-
{
|
|
107
|
+
{title()}
|
|
98
108
|
</p>
|
|
99
109
|
</Show>
|
|
100
|
-
<Show when={
|
|
101
|
-
<div class={ALERT_DESCRIPTION_CLASS}>{
|
|
110
|
+
<Show when={description()}>
|
|
111
|
+
<div class={ALERT_DESCRIPTION_CLASS}>{description()}</div>
|
|
102
112
|
</Show>
|
|
103
113
|
</div>
|
|
104
|
-
<Show when={
|
|
105
|
-
<div class="flex shrink-0 items-center">{
|
|
114
|
+
<Show when={action()}>
|
|
115
|
+
<div class="flex shrink-0 items-center">{action()}</div>
|
|
106
116
|
</Show>
|
|
107
117
|
</div>
|
|
108
118
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type JSX, mergeProps, Show } from "solid-js";
|
|
1
|
+
import { children, type JSX, mergeProps, Show } from "solid-js";
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
3
|
import { Card } from "./card.js";
|
|
4
4
|
import { Icon } from "./icon.js";
|
|
@@ -52,7 +52,8 @@ type InternalProps = WidgetCardProps & { interactive: boolean };
|
|
|
52
52
|
function WidgetCardRow(props: InternalProps) {
|
|
53
53
|
const hasMeta = () =>
|
|
54
54
|
props.widget.downloadCount != null || (props.showVersions && props.widget.versionCount != null);
|
|
55
|
-
const
|
|
55
|
+
const trailing = children(() => props.trailing);
|
|
56
|
+
const showTrailing = () => trailing() !== undefined || props.interactive;
|
|
56
57
|
|
|
57
58
|
return (
|
|
58
59
|
<Card
|
|
@@ -74,7 +75,7 @@ function WidgetCardRow(props: InternalProps) {
|
|
|
74
75
|
</Show>
|
|
75
76
|
<Show when={showTrailing()} fallback={null}>
|
|
76
77
|
<Show
|
|
77
|
-
when={
|
|
78
|
+
when={trailing() !== undefined}
|
|
78
79
|
fallback={
|
|
79
80
|
<Icon
|
|
80
81
|
icon="lucide:chevron-right"
|
|
@@ -84,7 +85,7 @@ function WidgetCardRow(props: InternalProps) {
|
|
|
84
85
|
/>
|
|
85
86
|
}
|
|
86
87
|
>
|
|
87
|
-
{
|
|
88
|
+
{trailing()}
|
|
88
89
|
</Show>
|
|
89
90
|
</Show>
|
|
90
91
|
</Card>
|
package/src/styles/theme.css
CHANGED
|
@@ -596,8 +596,8 @@ html[data-motion="live"] {
|
|
|
596
596
|
.reduce-blur,
|
|
597
597
|
.reduce-blur * {
|
|
598
598
|
--tw-backdrop-blur: initial !important;
|
|
599
|
+
/* Unprefixed only: the minifier folds a pair into the -webkit- form alone, which Chromium ignores. */
|
|
599
600
|
backdrop-filter: none !important;
|
|
600
|
-
-webkit-backdrop-filter: none !important;
|
|
601
601
|
}
|
|
602
602
|
/* A control that cannot blur takes the opaque card fill, never bare see-through. */
|
|
603
603
|
.reduce-blur .glass-control {
|