@nesso-how/ui 1.0.0-alpha.33 → 1.0.0-beta.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/dist/index.d.ts +5 -2
- package/dist/index.js +11 -8
- package/dist/styles.css +13 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -34,8 +34,9 @@ export declare function SidePanel({ id, side, open, size, minSize, maxSize, onTo
|
|
|
34
34
|
}): import("react").JSX.Element;
|
|
35
35
|
//#endregion
|
|
36
36
|
//#region src/panel-header.d.ts
|
|
37
|
-
export declare function PanelHeader({ actions, className, children, ...props }: ComponentProps<'header'> & {
|
|
37
|
+
export declare function PanelHeader({ actions, size, className, children, ...props }: ComponentProps<'header'> & {
|
|
38
38
|
actions: ReactNode;
|
|
39
|
+
size?: 'default' | 'lg';
|
|
39
40
|
}): import("react").JSX.Element;
|
|
40
41
|
//#endregion
|
|
41
42
|
//#region src/spinner.d.ts
|
|
@@ -112,7 +113,7 @@ export declare function DialogActions({ className, children }: {
|
|
|
112
113
|
className?: string;
|
|
113
114
|
children: ReactNode;
|
|
114
115
|
}): import("react").JSX.Element;
|
|
115
|
-
export declare function ConfirmDialog({ open, onOpenChange, title, description, cancelLabel, confirmLabel, onConfirm, initialFocus, finalFocus, children }: {
|
|
116
|
+
export declare function ConfirmDialog({ open, onOpenChange, title, description, cancelLabel, confirmLabel, onConfirm, disabled, initialFocus, finalFocus, children }: {
|
|
116
117
|
open: boolean;
|
|
117
118
|
onOpenChange: (open: boolean) => void;
|
|
118
119
|
title: string;
|
|
@@ -120,6 +121,7 @@ export declare function ConfirmDialog({ open, onOpenChange, title, description,
|
|
|
120
121
|
cancelLabel: string;
|
|
121
122
|
confirmLabel: string;
|
|
122
123
|
onConfirm: () => void;
|
|
124
|
+
disabled?: boolean;
|
|
123
125
|
initialFocus?: Dialog.Popup.Props['initialFocus'];
|
|
124
126
|
finalFocus?: Dialog.Popup.Props['finalFocus'];
|
|
125
127
|
children?: ReactNode;
|
|
@@ -269,6 +271,7 @@ declare const icons: {
|
|
|
269
271
|
readonly play: LucideIcon;
|
|
270
272
|
readonly plus: LucideIcon;
|
|
271
273
|
readonly refresh: LucideIcon;
|
|
274
|
+
readonly repeat: LucideIcon;
|
|
272
275
|
readonly scissors: LucideIcon;
|
|
273
276
|
readonly search: LucideIcon;
|
|
274
277
|
readonly share: LucideIcon;
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { cva } from "class-variance-authority";
|
|
|
3
3
|
import { cn } from "cn";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
|
|
6
|
-
import { ArrowRight, BookOpen, Check, ChevronDown, ChevronLeft, ChevronRight, CircleHelp, ClipboardPaste, Copy, Download, FileDown, FileUp, Folder, Glasses, Globe, Info, Layers, Minus, Pencil, Play, Plus, RefreshCw, RotateCcw, Scissors, Search, Share2, Sparkles, TriangleAlert, Upload, X, Zap } from "lucide-react";
|
|
6
|
+
import { ArrowRight, BookOpen, Check, ChevronDown, ChevronLeft, ChevronRight, CircleHelp, ClipboardPaste, Copy, Download, FileDown, FileUp, Folder, Glasses, Globe, Info, Layers, Minus, Pencil, Play, Plus, RefreshCw, Repeat, RotateCcw, Scissors, Search, Share2, Sparkles, TriangleAlert, Upload, X, Zap } from "lucide-react";
|
|
7
7
|
import { Input as Input$1 } from "@base-ui/react/input";
|
|
8
8
|
import { Annotation, Compartment, EditorSelection, EditorState, Transaction } from "@codemirror/state";
|
|
9
9
|
import { Decoration, EditorView, ViewPlugin, WidgetType, keymap } from "@codemirror/view";
|
|
@@ -21,8 +21,8 @@ const buttonVariants = cva("nesso-button inline-flex shrink-0 items-center justi
|
|
|
21
21
|
variants: {
|
|
22
22
|
variant: {
|
|
23
23
|
default: "bg-primary text-primary-foreground hover:bg-primary-hover active:bg-primary-hover",
|
|
24
|
-
outline: "border-border bg-background hover:bg-accent active:bg-pressed",
|
|
25
|
-
ghost: "hover:bg-accent active:bg-pressed"
|
|
24
|
+
outline: "border-border bg-background text-foreground hover:bg-accent active:bg-pressed",
|
|
25
|
+
ghost: "text-foreground hover:bg-accent active:bg-pressed"
|
|
26
26
|
},
|
|
27
27
|
size: {
|
|
28
28
|
default: "min-h-9",
|
|
@@ -169,9 +169,9 @@ function SidePanel({ id, side, open, size, minSize, maxSize, onToggle, onSizeCha
|
|
|
169
169
|
}
|
|
170
170
|
//#endregion
|
|
171
171
|
//#region src/panel-header.tsx
|
|
172
|
-
function PanelHeader({ actions, className, children, ...props }) {
|
|
172
|
+
function PanelHeader({ actions, size = "default", className, children, ...props }) {
|
|
173
173
|
return /* @__PURE__ */ jsxs("header", {
|
|
174
|
-
className: cn("nesso-panel-header", className),
|
|
174
|
+
className: cn("nesso-panel-header", size === "lg" && "h-[49px] pointer-coarse:h-[52px]", className),
|
|
175
175
|
...props,
|
|
176
176
|
children: [children, /* @__PURE__ */ jsx("div", {
|
|
177
177
|
className: "nesso-panel-actions",
|
|
@@ -564,7 +564,7 @@ function Label({ className, ...props }) {
|
|
|
564
564
|
//#region src/kbd.tsx
|
|
565
565
|
function Kbd({ className, ...props }) {
|
|
566
566
|
return /* @__PURE__ */ jsx("kbd", {
|
|
567
|
-
className: cn("inline-flex h-6 min-w-6 items-center justify-center rounded-sm border border-border bg-
|
|
567
|
+
className: cn("inline-flex h-6 min-w-6 items-center justify-center rounded-sm border border-border bg-transparent px-1.5 font-mono text-[11px] leading-none text-muted-foreground", className),
|
|
568
568
|
...props
|
|
569
569
|
});
|
|
570
570
|
}
|
|
@@ -781,7 +781,7 @@ function DialogActions({ className, children }) {
|
|
|
781
781
|
children
|
|
782
782
|
});
|
|
783
783
|
}
|
|
784
|
-
function ConfirmDialog({ open, onOpenChange, title, description, cancelLabel, confirmLabel, onConfirm, initialFocus, finalFocus, children }) {
|
|
784
|
+
function ConfirmDialog({ open, onOpenChange, title, description, cancelLabel, confirmLabel, onConfirm, disabled = false, initialFocus, finalFocus, children }) {
|
|
785
785
|
const cancel = useRef(null);
|
|
786
786
|
return /* @__PURE__ */ jsx(Dialog.Root, {
|
|
787
787
|
open,
|
|
@@ -802,10 +802,12 @@ function ConfirmDialog({ open, onOpenChange, title, description, cancelLabel, co
|
|
|
802
802
|
/* @__PURE__ */ jsxs(DialogActions, { children: [/* @__PURE__ */ jsx(Dialog.Close, {
|
|
803
803
|
render: /* @__PURE__ */ jsx(Button, {
|
|
804
804
|
ref: cancel,
|
|
805
|
-
variant: "outline"
|
|
805
|
+
variant: "outline",
|
|
806
|
+
disabled
|
|
806
807
|
}),
|
|
807
808
|
children: cancelLabel
|
|
808
809
|
}), /* @__PURE__ */ jsx(Button, {
|
|
810
|
+
disabled,
|
|
809
811
|
onClick: onConfirm,
|
|
810
812
|
children: confirmLabel
|
|
811
813
|
})] })
|
|
@@ -1407,6 +1409,7 @@ const icons = {
|
|
|
1407
1409
|
play: Play,
|
|
1408
1410
|
plus: Plus,
|
|
1409
1411
|
refresh: RefreshCw,
|
|
1412
|
+
repeat: Repeat,
|
|
1410
1413
|
scissors: Scissors,
|
|
1411
1414
|
search: Search,
|
|
1412
1415
|
share: Share2,
|
package/dist/styles.css
CHANGED
|
@@ -24,6 +24,18 @@
|
|
|
24
24
|
--radius-lg: var(--radius-object);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
@layer base {
|
|
28
|
+
:root {
|
|
29
|
+
--nesso-panel-bar-height: 40px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@media (pointer: coarse) {
|
|
33
|
+
:root {
|
|
34
|
+
--nesso-panel-bar-height: 52px;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
27
39
|
@layer components {
|
|
28
40
|
.nesso-button,
|
|
29
41
|
.nesso-input,
|
|
@@ -138,7 +150,7 @@
|
|
|
138
150
|
align-items: center;
|
|
139
151
|
justify-content: space-between;
|
|
140
152
|
gap: 12px;
|
|
141
|
-
height:
|
|
153
|
+
height: var(--nesso-panel-bar-height);
|
|
142
154
|
padding: 0 14px 0 20px;
|
|
143
155
|
border-bottom: 1px solid var(--border);
|
|
144
156
|
}
|
|
@@ -146,7 +158,6 @@
|
|
|
146
158
|
display: flex;
|
|
147
159
|
flex-shrink: 0;
|
|
148
160
|
gap: 2px;
|
|
149
|
-
color: var(--muted-foreground);
|
|
150
161
|
}
|
|
151
162
|
.nesso-panel-actions button {
|
|
152
163
|
width: 26px;
|
package/package.json
CHANGED