@nesso-how/ui 1.0.0-beta.1 → 1.0.0-beta.10
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 +8 -4
- package/dist/index.d.ts +43 -2
- package/dist/index.js +144 -6
- package/dist/styles.css +76 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,17 +39,21 @@ Your build must compile this CSS; it is not a precompiled stylesheet. Supply the
|
|
|
39
39
|
|
|
40
40
|
| Area | Exports |
|
|
41
41
|
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------- |
|
|
42
|
-
| Buttons and inputs | `Button`, `IconButton`, `Input`, `MarkdownInput`, `Label`, `PreferenceSelect`, `ColorPicker`
|
|
42
|
+
| Buttons and inputs | `Button`, `IconButton`, `Input`, `DirectoryField`, `MarkdownInput`, `Label`, `PreferenceSelect`, `ColorPicker` |
|
|
43
43
|
| Forms and rows | `Field`, `FieldHint`, `ListRow`, `ListRowButton`, `ListRowDetail`, `ListRowTitle`, `RevealActions`, `PromptForm` |
|
|
44
44
|
| Menus and popovers | `Menu`, `MenuItem`, `MenuPopup`, `MenuRadioItem`, `Popover`, `PopoverPopup` |
|
|
45
45
|
| Search and suggestions | `Combobox`, `ComboboxItem`, `ComboboxPopup`, `Autocomplete`, `AutocompleteClear`, `AutocompleteItem`, `AutocompletePopup` |
|
|
46
|
-
| Dialogs | `Dialog`, `DialogActions`, `DialogPopup`, `ConfirmDialog`, `TextPromptDialog`
|
|
47
|
-
| Panels and disclosure | `SidePanel`, `PanelHeader`, `SectionHeading`, `Collapsible`, `Tabs`
|
|
48
|
-
| Feedback | `Banner`, `ToastViewport`, `Spinner`
|
|
46
|
+
| Dialogs | `Dialog`, `DialogActions`, `DialogPopup`, `ConfirmDialog`, `TextPromptDialog`, `BottomSheet` |
|
|
47
|
+
| Panels and disclosure | `SidePanel`, `PanelHeader`, `PluginPage`, `PluginContent`, `SectionHeading`, `Collapsible`, `Tabs` |
|
|
48
|
+
| Feedback | `Banner`, `BannerRow`, `BannerDetails`, `ToastViewport`, `Spinner` |
|
|
49
49
|
| Labels and icons | `Kbd`, `ContextLabel`, `ActionIcon` |
|
|
50
50
|
|
|
51
51
|
`Button` supports `default`, `outline`, and `ghost` variants. `SidePanel` supports controlled resizing and collapse. `Spinner` accepts an accessible `label` and respects reduced motion. State, content, and event handling remain yours to provide.
|
|
52
52
|
|
|
53
|
+
`BottomSheet` is a controlled, non-modal drawer with a title, close label, optional footer, and popup ref for measuring covered content. It supports swipe-down dismissal, safe-area padding, and reduced motion. Reading text can use `--nesso-reading-font-size` and `--nesso-reading-line-height`, which increase from 13/20px to 15/23px on narrow screens or coarse pointers.
|
|
54
|
+
|
|
53
55
|
`MarkdownInput` provides a live preview of bold, italic, links, and bullet or numbered lists in one field without a toolbar. Markdown delimiters reappear when the cursor or selection enters formatted text, including link destinations and list markers. Enter continues a list, incrementing the current number for numbered lists; Enter on an empty nested item returns to the parent level, and on an empty top-level item ends the list. Tab nests the current item under the previous one; Shift+Tab moves it up a level. Both move the item's continuation lines and children together, leaving unrelated text alone. At level boundaries they leave content and focus unchanged; outside lists they retain normal focus navigation. Shift+Enter inserts a plain line break. Existing items are not renumbered, and there are no checklists. It accepts the unchanged Markdown source through `value` and `onChange`, supports Cmd/Ctrl+B/I on selections, and preserves line breaks. Set `history={false}` when the host owns undo/redo and its shortcuts. Cmd/Ctrl-click requests `onOpenLink`; read-only fields request it on a regular click. The host is responsible for validating and opening destinations.
|
|
54
56
|
|
|
57
|
+
`MarkdownInput` also accepts an optional `placeholder` shown only while the editor is empty.
|
|
58
|
+
|
|
55
59
|
The package also exports `useMediaQuery`, `contrastColor`, `presetColors`, and the `ActionIconName` and `ToastItem` types. See the [public exports](https://github.com/nesso-how/nesso/blob/main/packages/ui/src/index.ts) and component source files for prop definitions; published TypeScript declarations provide editor completion.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button as Button$1 } from "@base-ui/react/button";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
-
import { ButtonHTMLAttributes, ComponentProps, HTMLAttributes, ReactNode } from "react";
|
|
3
|
+
import { ButtonHTMLAttributes, ComponentProps, HTMLAttributes, ReactNode, Ref } from "react";
|
|
4
4
|
import { LucideIcon, Zap } from "lucide-react";
|
|
5
5
|
import { Dialog, Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
6
6
|
import { Combobox } from "@base-ui/react/combobox";
|
|
@@ -39,6 +39,10 @@ export declare function PanelHeader({ actions, size, className, children, ...pro
|
|
|
39
39
|
size?: 'default' | 'lg';
|
|
40
40
|
}): import("react").JSX.Element;
|
|
41
41
|
//#endregion
|
|
42
|
+
//#region src/plugin-page.d.ts
|
|
43
|
+
export declare function PluginPage({ className, children, ...props }: ComponentProps<'main'>): import("react").JSX.Element;
|
|
44
|
+
export declare function PluginContent({ className, children, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
45
|
+
//#endregion
|
|
42
46
|
//#region src/spinner.d.ts
|
|
43
47
|
export declare function Spinner({ label, className }: {
|
|
44
48
|
label: string;
|
|
@@ -51,6 +55,22 @@ export declare function useMediaQuery(query: string): boolean;
|
|
|
51
55
|
//#region src/input.d.ts
|
|
52
56
|
declare function Input({ className, type, ...props }: ComponentProps<'input'>): import("react").JSX.Element;
|
|
53
57
|
//#endregion
|
|
58
|
+
//#region src/directory-field.d.ts
|
|
59
|
+
export declare function DirectoryField({ label, value, labels, disabled, changeDisabled, onOpen, onChange, onRestore }: {
|
|
60
|
+
label: string;
|
|
61
|
+
value?: string;
|
|
62
|
+
labels: {
|
|
63
|
+
open: string;
|
|
64
|
+
change: string;
|
|
65
|
+
restore: string;
|
|
66
|
+
};
|
|
67
|
+
disabled?: boolean;
|
|
68
|
+
changeDisabled?: boolean;
|
|
69
|
+
onOpen: () => void;
|
|
70
|
+
onChange: () => void;
|
|
71
|
+
onRestore?: () => void;
|
|
72
|
+
}): import("react").JSX.Element;
|
|
73
|
+
//#endregion
|
|
54
74
|
//#region src/markdown-input.d.ts
|
|
55
75
|
type MarkdownInputProps = Omit<ComponentProps<'div'>, 'onChange' | 'children' | 'defaultValue'> & {
|
|
56
76
|
value: string;
|
|
@@ -58,8 +78,9 @@ type MarkdownInputProps = Omit<ComponentProps<'div'>, 'onChange' | 'children' |
|
|
|
58
78
|
readOnly?: boolean;
|
|
59
79
|
history?: boolean;
|
|
60
80
|
onOpenLink?: (url: string) => void;
|
|
81
|
+
placeholder?: string;
|
|
61
82
|
};
|
|
62
|
-
export declare function MarkdownInput({ value, onChange, readOnly, history, onOpenLink, className, id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...props }: MarkdownInputProps): import("react").JSX.Element;
|
|
83
|
+
export declare function MarkdownInput({ value, onChange, readOnly, history, onOpenLink, placeholder, className, id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...props }: MarkdownInputProps): import("react").JSX.Element;
|
|
63
84
|
//#endregion
|
|
64
85
|
//#region src/label.d.ts
|
|
65
86
|
declare function Label({ className, ...props }: ComponentProps<'label'>): import("react").JSX.Element;
|
|
@@ -75,6 +96,14 @@ type BannerProps = ComponentProps<'div'> & {
|
|
|
75
96
|
tone?: 'info' | 'warning' | 'error';
|
|
76
97
|
};
|
|
77
98
|
export declare function Banner({ tone, className, children, ...props }: BannerProps): import("react").JSX.Element;
|
|
99
|
+
export declare function BannerRow({ message, actions }: {
|
|
100
|
+
message: ReactNode;
|
|
101
|
+
actions?: ReactNode;
|
|
102
|
+
}): import("react").JSX.Element;
|
|
103
|
+
export declare function BannerDetails({ label, children }: {
|
|
104
|
+
label: ReactNode;
|
|
105
|
+
children: ReactNode;
|
|
106
|
+
}): import("react").JSX.Element;
|
|
78
107
|
//#endregion
|
|
79
108
|
//#region src/toast.d.ts
|
|
80
109
|
type ToastAction = {
|
|
@@ -127,6 +156,18 @@ export declare function ConfirmDialog({ open, onOpenChange, title, description,
|
|
|
127
156
|
children?: ReactNode;
|
|
128
157
|
}): import("react").JSX.Element;
|
|
129
158
|
//#endregion
|
|
159
|
+
//#region src/sheet.d.ts
|
|
160
|
+
export declare function BottomSheet({ open, onOpenChange, title, closeLabel, popupRef, footer, className, children }: {
|
|
161
|
+
open: boolean;
|
|
162
|
+
onOpenChange: (open: boolean) => void;
|
|
163
|
+
title: ReactNode;
|
|
164
|
+
closeLabel: string;
|
|
165
|
+
popupRef?: Ref<HTMLDivElement>;
|
|
166
|
+
footer?: ReactNode;
|
|
167
|
+
className?: string;
|
|
168
|
+
children: ReactNode;
|
|
169
|
+
}): import("react").JSX.Element;
|
|
170
|
+
//#endregion
|
|
130
171
|
//#region src/prompt.d.ts
|
|
131
172
|
export declare function PromptForm({ initialValue, nameLabel, submitLabel, cancelLabel, maxLength, onSubmit }: {
|
|
132
173
|
initialValue?: string;
|
package/dist/index.js
CHANGED
|
@@ -6,10 +6,11 @@ import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState, useSy
|
|
|
6
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
|
-
import { Decoration, EditorView, ViewPlugin, WidgetType, keymap } from "@codemirror/view";
|
|
9
|
+
import { Decoration, EditorView, ViewPlugin, WidgetType, keymap, placeholder } from "@codemirror/view";
|
|
10
10
|
import { defaultKeymap, history, historyKeymap } from "@codemirror/commands";
|
|
11
11
|
import { parser } from "@lezer/markdown";
|
|
12
12
|
import { Dialog, Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
13
|
+
import { Drawer } from "@base-ui/react/drawer";
|
|
13
14
|
import { Combobox } from "@base-ui/react/combobox";
|
|
14
15
|
import { Menu } from "@base-ui/react/menu";
|
|
15
16
|
import { Popover } from "@base-ui/react/popover";
|
|
@@ -180,6 +181,22 @@ function PanelHeader({ actions, size = "default", className, children, ...props
|
|
|
180
181
|
});
|
|
181
182
|
}
|
|
182
183
|
//#endregion
|
|
184
|
+
//#region src/plugin-page.tsx
|
|
185
|
+
function PluginPage({ className, children, ...props }) {
|
|
186
|
+
return /* @__PURE__ */ jsx("main", {
|
|
187
|
+
className: cn("nesso-plugin-page", className),
|
|
188
|
+
...props,
|
|
189
|
+
children
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
function PluginContent({ className, children, ...props }) {
|
|
193
|
+
return /* @__PURE__ */ jsx("div", {
|
|
194
|
+
className: cn("nesso-plugin-content", className),
|
|
195
|
+
...props,
|
|
196
|
+
children
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
//#endregion
|
|
183
200
|
//#region src/spinner.tsx
|
|
184
201
|
function Spinner({ label, className }) {
|
|
185
202
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -220,6 +237,54 @@ function Input({ className, type, ...props }) {
|
|
|
220
237
|
});
|
|
221
238
|
}
|
|
222
239
|
//#endregion
|
|
240
|
+
//#region src/directory-field.tsx
|
|
241
|
+
function DirectoryField({ label, value, labels, disabled, changeDisabled, onOpen, onChange, onRestore }) {
|
|
242
|
+
const id = useId();
|
|
243
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
244
|
+
className: "mt-4",
|
|
245
|
+
children: [
|
|
246
|
+
/* @__PURE__ */ jsx("label", {
|
|
247
|
+
htmlFor: id,
|
|
248
|
+
className: "block text-xs",
|
|
249
|
+
children: label
|
|
250
|
+
}),
|
|
251
|
+
/* @__PURE__ */ jsxs("div", {
|
|
252
|
+
className: "mt-2 flex items-center gap-2",
|
|
253
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
254
|
+
className: "relative min-w-0 flex-1",
|
|
255
|
+
children: [/* @__PURE__ */ jsx(Input, {
|
|
256
|
+
id,
|
|
257
|
+
className: "pr-10",
|
|
258
|
+
readOnly: true,
|
|
259
|
+
value: value ?? "",
|
|
260
|
+
title: value
|
|
261
|
+
}), /* @__PURE__ */ jsx(IconButton, {
|
|
262
|
+
className: "absolute top-1/2 right-1 -translate-y-1/2 text-muted-foreground",
|
|
263
|
+
"aria-label": labels.open,
|
|
264
|
+
title: labels.open,
|
|
265
|
+
disabled,
|
|
266
|
+
onClick: onOpen,
|
|
267
|
+
children: /* @__PURE__ */ jsx(Folder, { "aria-hidden": "true" })
|
|
268
|
+
})]
|
|
269
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
270
|
+
variant: "outline",
|
|
271
|
+
disabled: disabled || changeDisabled,
|
|
272
|
+
onClick: onChange,
|
|
273
|
+
children: labels.change
|
|
274
|
+
})]
|
|
275
|
+
}),
|
|
276
|
+
onRestore && /* @__PURE__ */ jsxs(Button, {
|
|
277
|
+
variant: "ghost",
|
|
278
|
+
size: "sm",
|
|
279
|
+
className: "mt-2",
|
|
280
|
+
disabled: disabled || changeDisabled,
|
|
281
|
+
onClick: onRestore,
|
|
282
|
+
children: [/* @__PURE__ */ jsx(RotateCcw, { "aria-hidden": "true" }), labels.restore]
|
|
283
|
+
})
|
|
284
|
+
]
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
//#endregion
|
|
223
288
|
//#region src/markdown.ts
|
|
224
289
|
const listPrefix = /^(\s*)([-+*]|(\d{1,9})([.)]))([\t ]+|$)/;
|
|
225
290
|
var ListMarker = class extends WidgetType {
|
|
@@ -421,7 +486,7 @@ const livePreview = ViewPlugin.define((view) => ({
|
|
|
421
486
|
if (update.docChanged || update.selectionSet || update.focusChanged || update.startState.readOnly !== update.state.readOnly) this.decorations = markdownDecorations(update.state, update.view.hasFocus && !update.state.readOnly);
|
|
422
487
|
}
|
|
423
488
|
}), { decorations: (plugin) => plugin.decorations });
|
|
424
|
-
function MarkdownInput({ value, onChange, readOnly = false, history: history$1 = true, onOpenLink, className, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }) {
|
|
489
|
+
function MarkdownInput({ value, onChange, readOnly = false, history: history$1 = true, onOpenLink, placeholder: placeholder$1, className, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }) {
|
|
425
490
|
const container = useRef(null);
|
|
426
491
|
const editor = useRef(null);
|
|
427
492
|
const callbacks = useRef({
|
|
@@ -523,7 +588,8 @@ function MarkdownInput({ value, onChange, readOnly = false, history: history$1 =
|
|
|
523
588
|
"aria-readonly": String(readOnly),
|
|
524
589
|
spellcheck: "true"
|
|
525
590
|
}),
|
|
526
|
-
...history$1 ? [history(), keymap.of(historyKeymap)] : []
|
|
591
|
+
...history$1 ? [history(), keymap.of(historyKeymap)] : [],
|
|
592
|
+
...placeholder$1 ? [placeholder(placeholder$1)] : []
|
|
527
593
|
]) });
|
|
528
594
|
}, [
|
|
529
595
|
configuration,
|
|
@@ -531,7 +597,8 @@ function MarkdownInput({ value, onChange, readOnly = false, history: history$1 =
|
|
|
531
597
|
history$1,
|
|
532
598
|
id,
|
|
533
599
|
ariaLabel,
|
|
534
|
-
ariaLabelledBy
|
|
600
|
+
ariaLabelledBy,
|
|
601
|
+
placeholder$1
|
|
535
602
|
]);
|
|
536
603
|
useLayoutEffect(() => {
|
|
537
604
|
const view = editor.current;
|
|
@@ -589,6 +656,30 @@ function Banner({ tone = "info", className, children, ...props }) {
|
|
|
589
656
|
children
|
|
590
657
|
});
|
|
591
658
|
}
|
|
659
|
+
function BannerRow({ message, actions }) {
|
|
660
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
661
|
+
className: "flex flex-wrap items-center gap-x-3 gap-y-2",
|
|
662
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
663
|
+
className: "min-w-0 flex-1",
|
|
664
|
+
children: message
|
|
665
|
+
}), actions && /* @__PURE__ */ jsx("span", {
|
|
666
|
+
className: "ml-auto flex flex-wrap items-center gap-2",
|
|
667
|
+
children: actions
|
|
668
|
+
})]
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
function BannerDetails({ label, children }) {
|
|
672
|
+
return /* @__PURE__ */ jsxs("details", {
|
|
673
|
+
className: "mt-1",
|
|
674
|
+
children: [/* @__PURE__ */ jsx("summary", {
|
|
675
|
+
className: "w-fit cursor-pointer text-[11px] leading-4 text-muted-foreground underline underline-offset-2",
|
|
676
|
+
children: label
|
|
677
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
678
|
+
className: "pt-2",
|
|
679
|
+
children
|
|
680
|
+
})]
|
|
681
|
+
});
|
|
682
|
+
}
|
|
592
683
|
//#endregion
|
|
593
684
|
//#region src/toast.tsx
|
|
594
685
|
function useToastLifecycle({ id, duration, onDismiss, onRestoreFocus }) {
|
|
@@ -816,6 +907,53 @@ function ConfirmDialog({ open, onOpenChange, title, description, cancelLabel, co
|
|
|
816
907
|
});
|
|
817
908
|
}
|
|
818
909
|
//#endregion
|
|
910
|
+
//#region src/sheet.tsx
|
|
911
|
+
function BottomSheet({ open, onOpenChange, title, closeLabel, popupRef, footer, className, children }) {
|
|
912
|
+
return /* @__PURE__ */ jsx(Drawer.Root, {
|
|
913
|
+
open,
|
|
914
|
+
onOpenChange,
|
|
915
|
+
modal: false,
|
|
916
|
+
disablePointerDismissal: true,
|
|
917
|
+
swipeDirection: "down",
|
|
918
|
+
children: /* @__PURE__ */ jsx(Drawer.Portal, { children: /* @__PURE__ */ jsx(Drawer.Viewport, {
|
|
919
|
+
className: "pointer-events-none fixed inset-0 z-40 flex items-end pr-[env(safe-area-inset-right)] pl-[env(safe-area-inset-left)]",
|
|
920
|
+
children: /* @__PURE__ */ jsxs(Drawer.Popup, {
|
|
921
|
+
ref: popupRef,
|
|
922
|
+
className: cn("nesso-sheet pointer-events-auto", className),
|
|
923
|
+
initialFocus: false,
|
|
924
|
+
children: [
|
|
925
|
+
/* @__PURE__ */ jsx("div", {
|
|
926
|
+
"aria-hidden": "true",
|
|
927
|
+
className: "nesso-sheet-handle"
|
|
928
|
+
}),
|
|
929
|
+
/* @__PURE__ */ jsxs("div", {
|
|
930
|
+
className: "flex shrink-0 items-center justify-between gap-2 pr-2 pl-5",
|
|
931
|
+
children: [/* @__PURE__ */ jsx(Drawer.Title, {
|
|
932
|
+
className: "nesso-sheet-title",
|
|
933
|
+
children: title
|
|
934
|
+
}), /* @__PURE__ */ jsx(Drawer.Close, {
|
|
935
|
+
render: /* @__PURE__ */ jsx(IconButton, {
|
|
936
|
+
className: "min-h-11 min-w-11",
|
|
937
|
+
"aria-label": closeLabel,
|
|
938
|
+
title: closeLabel
|
|
939
|
+
}),
|
|
940
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
941
|
+
})]
|
|
942
|
+
}),
|
|
943
|
+
/* @__PURE__ */ jsx(Drawer.Content, {
|
|
944
|
+
className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-5 pt-1 pb-5",
|
|
945
|
+
children
|
|
946
|
+
}),
|
|
947
|
+
footer && /* @__PURE__ */ jsx("div", {
|
|
948
|
+
className: "nesso-sheet-footer",
|
|
949
|
+
children: footer
|
|
950
|
+
})
|
|
951
|
+
]
|
|
952
|
+
})
|
|
953
|
+
}) })
|
|
954
|
+
});
|
|
955
|
+
}
|
|
956
|
+
//#endregion
|
|
819
957
|
//#region src/prompt.tsx
|
|
820
958
|
function PromptForm({ initialValue = "", nameLabel, submitLabel, cancelLabel, maxLength, onSubmit }) {
|
|
821
959
|
const [value, setValue] = useState(initialValue);
|
|
@@ -1418,11 +1556,11 @@ const icons = {
|
|
|
1418
1556
|
zap: Zap
|
|
1419
1557
|
};
|
|
1420
1558
|
function ActionIcon({ name, ...props }) {
|
|
1421
|
-
const Icon =
|
|
1559
|
+
const Icon = name !== void 0 && Object.hasOwn(icons, name) ? icons[name] : Zap;
|
|
1422
1560
|
return /* @__PURE__ */ jsx(Icon, {
|
|
1423
1561
|
"aria-hidden": "true",
|
|
1424
1562
|
...props
|
|
1425
1563
|
});
|
|
1426
1564
|
}
|
|
1427
1565
|
//#endregion
|
|
1428
|
-
export { ActionIcon, Autocomplete, AutocompleteClear, AutocompleteItem, AutocompletePopup, Banner, Button, Collapsible, ColorPicker, Combobox, ComboboxItem, ComboboxPopup, ConfirmDialog, ContextLabel, Dialog, DialogActions, DialogPopup, Field, FieldHint, IconButton, Input, Kbd, Label, ListRow, ListRowButton, ListRowDetail, ListRowTitle, MarkdownInput, Menu, MenuItem, MenuPopup, MenuRadioItem, PanelHeader, Popover, PopoverPopup, PreferenceSelect, PromptForm, RevealActions, SectionHeading, SidePanel, Spinner, Tabs, TextPromptDialog, ToastViewport, contrastColor, presetColors, useMediaQuery };
|
|
1566
|
+
export { ActionIcon, Autocomplete, AutocompleteClear, AutocompleteItem, AutocompletePopup, Banner, BannerDetails, BannerRow, BottomSheet, Button, Collapsible, ColorPicker, Combobox, ComboboxItem, ComboboxPopup, ConfirmDialog, ContextLabel, Dialog, DialogActions, DialogPopup, DirectoryField, Field, FieldHint, IconButton, Input, Kbd, Label, ListRow, ListRowButton, ListRowDetail, ListRowTitle, MarkdownInput, Menu, MenuItem, MenuPopup, MenuRadioItem, PanelHeader, PluginContent, PluginPage, Popover, PopoverPopup, PreferenceSelect, PromptForm, RevealActions, SectionHeading, SidePanel, Spinner, Tabs, TextPromptDialog, ToastViewport, contrastColor, presetColors, useMediaQuery };
|
package/dist/styles.css
CHANGED
|
@@ -27,11 +27,15 @@
|
|
|
27
27
|
@layer base {
|
|
28
28
|
:root {
|
|
29
29
|
--nesso-panel-bar-height: 40px;
|
|
30
|
+
--nesso-reading-font-size: 13px;
|
|
31
|
+
--nesso-reading-line-height: 20px;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
@media (pointer: coarse) {
|
|
33
35
|
:root {
|
|
34
36
|
--nesso-panel-bar-height: 52px;
|
|
37
|
+
--nesso-reading-font-size: 15px;
|
|
38
|
+
--nesso-reading-line-height: 23px;
|
|
35
39
|
}
|
|
36
40
|
}
|
|
37
41
|
}
|
|
@@ -97,6 +101,57 @@
|
|
|
97
101
|
outline: none;
|
|
98
102
|
}
|
|
99
103
|
|
|
104
|
+
.nesso-sheet {
|
|
105
|
+
display: flex;
|
|
106
|
+
width: 100%;
|
|
107
|
+
max-height: min(60dvh, calc(100dvh - 96px));
|
|
108
|
+
flex-direction: column;
|
|
109
|
+
border-top: 1px solid var(--border);
|
|
110
|
+
border-radius: calc(var(--radius-object) * 2) calc(var(--radius-object) * 2) 0 0;
|
|
111
|
+
background: var(--background);
|
|
112
|
+
color: var(--foreground);
|
|
113
|
+
box-shadow: 0 -8px 24px #00000014;
|
|
114
|
+
outline: none;
|
|
115
|
+
transform: translateY(var(--drawer-swipe-movement-y, 0px));
|
|
116
|
+
transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.nesso-sheet[data-swiping] {
|
|
120
|
+
transition-duration: 0s;
|
|
121
|
+
user-select: none;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.nesso-sheet[data-starting-style],
|
|
125
|
+
.nesso-sheet[data-ending-style] {
|
|
126
|
+
transform: translateY(calc(100% + 2px));
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.nesso-sheet-handle {
|
|
130
|
+
flex-shrink: 0;
|
|
131
|
+
width: 36px;
|
|
132
|
+
height: 4px;
|
|
133
|
+
margin: 8px auto 0;
|
|
134
|
+
border-radius: 2px;
|
|
135
|
+
background: var(--node-border);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.nesso-sheet-title {
|
|
139
|
+
min-width: 0;
|
|
140
|
+
font-size: 18px;
|
|
141
|
+
line-height: 24px;
|
|
142
|
+
font-weight: 500;
|
|
143
|
+
overflow-wrap: anywhere;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.nesso-sheet-footer {
|
|
147
|
+
display: flex;
|
|
148
|
+
flex-shrink: 0;
|
|
149
|
+
align-items: center;
|
|
150
|
+
gap: 12px;
|
|
151
|
+
padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px));
|
|
152
|
+
border-top: 1px solid var(--border);
|
|
153
|
+
}
|
|
154
|
+
|
|
100
155
|
.nesso-option[data-highlighted] {
|
|
101
156
|
background: var(--hover);
|
|
102
157
|
}
|
|
@@ -163,6 +218,23 @@
|
|
|
163
218
|
width: 26px;
|
|
164
219
|
height: 28px;
|
|
165
220
|
}
|
|
221
|
+
.nesso-plugin-page {
|
|
222
|
+
display: flex;
|
|
223
|
+
flex-direction: column;
|
|
224
|
+
height: 100%;
|
|
225
|
+
min-height: 0;
|
|
226
|
+
overflow: hidden;
|
|
227
|
+
background: var(--background);
|
|
228
|
+
color: var(--foreground);
|
|
229
|
+
font-family: var(--font-sans);
|
|
230
|
+
}
|
|
231
|
+
.nesso-plugin-content {
|
|
232
|
+
box-sizing: border-box;
|
|
233
|
+
width: 100%;
|
|
234
|
+
max-width: 40rem;
|
|
235
|
+
margin-inline: auto;
|
|
236
|
+
padding: clamp(1.5rem, 5vw, 3rem);
|
|
237
|
+
}
|
|
166
238
|
|
|
167
239
|
.side-panel {
|
|
168
240
|
position: relative;
|
|
@@ -323,6 +395,9 @@
|
|
|
323
395
|
}
|
|
324
396
|
|
|
325
397
|
@media (prefers-reduced-motion: reduce) {
|
|
398
|
+
.nesso-sheet {
|
|
399
|
+
transition: none;
|
|
400
|
+
}
|
|
326
401
|
*,
|
|
327
402
|
*::before,
|
|
328
403
|
*::after {
|
|
@@ -451,6 +526,7 @@
|
|
|
451
526
|
color: var(--muted-foreground);
|
|
452
527
|
font-size: 12px;
|
|
453
528
|
line-height: 18px;
|
|
529
|
+
white-space: pre-line;
|
|
454
530
|
}
|
|
455
531
|
.toast-actions {
|
|
456
532
|
display: flex;
|
package/package.json
CHANGED