@gemologic/sheen 0.3.0 → 0.4.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 +2 -0
- package/dist/index.js +68 -67
- package/dist/overlays.d.ts +2 -0
- package/dist/overlays.js +9 -8
- package/dist/primitives/Checkbox.d.ts +18 -2
- package/dist/primitives/Checkbox.js +50 -34
- package/dist/primitives/CommandPalette.d.ts +4 -0
- package/dist/primitives/CommandPalette.js +137 -113
- package/dist/primitives/Popover.d.ts +1 -0
- package/dist/primitives/Popover.js +12 -4
- package/dist/primitives/Switch.d.ts +2 -2
- package/dist/primitives/TooltipTrigger.d.ts +18 -0
- package/dist/primitives/TooltipTrigger.js +76 -0
- package/package.json +2 -2
- package/src/index.ts +2 -0
- package/src/overlays.ts +2 -0
- package/src/primitives/Checkbox.tsx +17 -8
- package/src/primitives/CommandPalette.tsx +11 -2
- package/src/primitives/Popover.tsx +5 -4
- package/src/primitives/Switch.tsx +2 -2
- package/src/primitives/TooltipTrigger.tsx +60 -0
- package/src/styles/forms.css +5 -3
- package/src/styles/overlays.css +3 -0
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export type { ShortcutProviderProps } from "./primitives/ShortcutProvider.tsx";
|
|
|
35
35
|
export type { PendingShortcut, ShortcutAction, ShortcutBinding, ShortcutDefinition, ShortcutInput, ShortcutRegistryOptions } from "./utils/shortcut-registry.ts";
|
|
36
36
|
export { LinkTooltip } from "./primitives/LinkTooltip.tsx";
|
|
37
37
|
export type { LinkTooltipProps } from "./primitives/LinkTooltip.tsx";
|
|
38
|
+
export { TooltipTrigger } from "./primitives/TooltipTrigger.tsx";
|
|
39
|
+
export type { TooltipTriggerProps, TooltipTriggerBindings } from "./primitives/TooltipTrigger.tsx";
|
|
38
40
|
export type { TooltipProps } from "./primitives/Tooltip.tsx";
|
|
39
41
|
export { Popover } from "./primitives/Popover.tsx";
|
|
40
42
|
export type { PopoverProps } from "./primitives/Popover.tsx";
|
package/dist/index.js
CHANGED
|
@@ -17,70 +17,71 @@ import { ShortcutSheet as w } from "./primitives/ShortcutSheet.js";
|
|
|
17
17
|
import { ShortcutPending as T } from "./primitives/ShortcutPending.js";
|
|
18
18
|
import { ShortcutScope as E } from "./primitives/ShortcutScope.js";
|
|
19
19
|
import { LinkTooltip as D } from "./primitives/LinkTooltip.js";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
|
|
20
|
+
import { TooltipTrigger as O } from "./primitives/TooltipTrigger.js";
|
|
21
|
+
import { Popover as k } from "./primitives/Popover.js";
|
|
22
|
+
import { DropdownMenu as A } from "./primitives/DropdownMenu.js";
|
|
23
|
+
import { ContextMenu as j } from "./primitives/ContextMenu.js";
|
|
24
|
+
import { CommandPalette as M, commandPaletteFilter as N } from "./primitives/CommandPalette.js";
|
|
25
|
+
import { cn as P } from "./utils/cn.js";
|
|
26
|
+
import { flashChange as F } from "./utils/change-motion.js";
|
|
27
|
+
import { useIsWindowFocused as I, useOnlineStatus as L } from "./utils/browser-status.js";
|
|
28
|
+
import { optimistic as R } from "./utils/optimistic.js";
|
|
29
|
+
import { createToaster as z } from "./primitives/create-toaster.js";
|
|
30
|
+
import { Toast as B } from "./primitives/Toast.js";
|
|
31
|
+
import { Toaster as V } from "./primitives/Toaster.js";
|
|
32
|
+
import { englishMessages as H } from "./theme/messages.js";
|
|
33
|
+
import { useDateFormatter as U, useNumberFormatter as W } from "./theme/intl.js";
|
|
34
|
+
import { Center as G, Container as K, Grid as q, Row as J, Spacer as Y, Stack as X } from "./layout/Layout.js";
|
|
35
|
+
import { Code as Z, Heading as Q, Kbd as ne, Prose as re, Text as ie } from "./primitives/Typography.js";
|
|
36
|
+
import { Glyph as ae, glyphNames as oe } from "./primitives/Glyph.js";
|
|
37
|
+
import { createMediaQuery as se, useBreakpoint as ce } from "./utils/media-query.js";
|
|
38
|
+
import { List as le, ListItem as ue } from "./primitives/List.js";
|
|
39
|
+
import { NumberText as de } from "./primitives/NumberText.js";
|
|
40
|
+
import { Badge as fe, Tag as pe } from "./primitives/Status.js";
|
|
41
|
+
import { Card as me, Surface as he } from "./primitives/Surface.js";
|
|
42
|
+
import { Separator as ge } from "./primitives/Separator.js";
|
|
43
|
+
import { Alert as _e, Banner as ve, Callout as ye } from "./primitives/Notice.js";
|
|
44
|
+
import { DescriptionDetails as be, DescriptionList as xe, DescriptionTerm as Se } from "./primitives/DescriptionList.js";
|
|
45
|
+
import { Skeleton as $ } from "./primitives/Skeleton.js";
|
|
46
|
+
import { EmptyState as Ce } from "./primitives/EmptyState.js";
|
|
47
|
+
import { Spinner as we } from "./primitives/Spinner.js";
|
|
48
|
+
import { Field as Te } from "./primitives/Field.js";
|
|
49
|
+
import { InputGroup as Ee } from "./primitives/InputGroup.js";
|
|
50
|
+
import { Form as De, FormActions as Oe, FormSection as ke } from "./primitives/Form.js";
|
|
51
|
+
import { SearchInput as Ae } from "./primitives/SearchInput.js";
|
|
52
|
+
import { Textarea as je } from "./primitives/Textarea.js";
|
|
53
|
+
import { EditableTextField as Me } from "./primitives/EditableTextField.js";
|
|
54
|
+
import { Checkbox as Ne } from "./primitives/Checkbox.js";
|
|
55
|
+
import { Switch as Pe } from "./primitives/Switch.js";
|
|
56
|
+
import { CheckboxGroup as Fe } from "./primitives/CheckboxGroup.js";
|
|
57
|
+
import { RadioGroup as Ie } from "./primitives/RadioGroup.js";
|
|
58
|
+
import { SegmentedControl as Le } from "./primitives/SegmentedControl.js";
|
|
59
|
+
import { TagInput as Re } from "./primitives/TagInput.js";
|
|
60
|
+
import { FileDropzone as ze } from "./primitives/FileDropzone.js";
|
|
61
|
+
import { ActivityTimeline as Be } from "./primitives/ActivityTimeline.js";
|
|
62
|
+
import { Stepper as Ve } from "./primitives/Stepper.js";
|
|
63
|
+
import { Select as He } from "./primitives/Select.js";
|
|
64
|
+
import { Combobox as Ue, MultiCombobox as We } from "./primitives/Combobox.js";
|
|
65
|
+
import { Table as Ge, TableBody as Ke, TableCaption as qe, TableCell as Je, TableFoot as Ye, TableHead as Xe, TableHeaderCell as Ze, TableRow as Qe } from "./primitives/Table.js";
|
|
66
|
+
import { Breadcrumb as $e } from "./primitives/Breadcrumb.js";
|
|
67
|
+
import { Collapsible as et } from "./primitives/Collapsible.js";
|
|
68
|
+
import { Accordion as tt, AccordionItem as nt } from "./primitives/Accordion.js";
|
|
69
|
+
import { Tabs as rt } from "./primitives/Tabs.js";
|
|
70
|
+
import { NavItem as it, NavList as at } from "./primitives/NavList.js";
|
|
71
|
+
import { ScrollArea as ot } from "./primitives/ScrollArea.js";
|
|
72
|
+
import { ButtonGroup as st } from "./primitives/ButtonGroup.js";
|
|
73
|
+
import { IconButton as ct } from "./primitives/IconButton.js";
|
|
74
|
+
import { Link as lt } from "./primitives/Link.js";
|
|
75
|
+
import { Pagination as ut } from "./primitives/Pagination.js";
|
|
76
|
+
import { Avatar as dt, AvatarGroup as ft } from "./primitives/Avatar.js";
|
|
77
|
+
import { Meter as pt, Progress as mt } from "./primitives/Progress.js";
|
|
78
|
+
import { NumberField as ht } from "./primitives/NumberField.js";
|
|
79
|
+
import { RangeSlider as gt, Slider as _t } from "./primitives/Slider.js";
|
|
80
|
+
import { Tree as vt, TreeItem as yt } from "./primitives/Tree.js";
|
|
81
|
+
import { Resizable as bt, ResizableHandle as xt, ResizablePanel as St } from "./primitives/Resizable.js";
|
|
82
|
+
import { PromptInput as Ct } from "./primitives/PromptInput.js";
|
|
83
|
+
import { Message as wt } from "./primitives/Message.js";
|
|
84
|
+
import { Conversation as Tt } from "./primitives/Conversation.js";
|
|
85
|
+
import { StreamingText as Et } from "./primitives/StreamingText.js";
|
|
86
|
+
import { breakpointNames as Dt, breakpointQuery as Ot, breakpoints as kt } from "@gemologic/sheen-tokens/catalog";
|
|
87
|
+
export { tt as Accordion, nt as AccordionItem, Be as ActivityTimeline, _e as Alert, f as AlertDialog, dt as Avatar, ft as AvatarGroup, fe as Badge, ve as Banner, $e as Breadcrumb, o as Button, st as ButtonGroup, ye as Callout, me as Card, G as Center, Ne as Checkbox, Fe as CheckboxGroup, J as Cluster, Z as Code, et as Collapsible, Ue as Combobox, M as CommandPalette, p as ConfirmDialog, K as Container, j as ContextMenu, Tt as Conversation, be as DescriptionDetails, xe as DescriptionList, Se as DescriptionTerm, l as Dialog, u as Drawer, A as DropdownMenu, Me as EditableTextField, Ce as EmptyState, Te as Field, ze as FileDropzone, De as Form, Oe as FormActions, ke as FormSection, ae as Glyph, q as Grid, Q as Heading, ct as IconButton, c as Input, Ee as InputGroup, ne as Kbd, lt as Link, D as LinkTooltip, le as List, ue as ListItem, wt as Message, pt as Meter, We as MultiCombobox, it as NavItem, at as NavList, ht as NumberField, de as NumberText, ut as Pagination, k as Popover, mt as Progress, Ct as PromptInput, re as Prose, Ie as RadioGroup, gt as RangeSlider, bt as Resizable, xt as ResizableHandle, St as ResizablePanel, J as Row, ot as ScrollArea, Ae as SearchInput, Le as SegmentedControl, He as Select, ge as Separator, d as Sheet, T as ShortcutPending, v as ShortcutProvider, E as ShortcutScope, w as ShortcutSheet, $ as Skeleton, _t as Slider, Y as Spacer, we as Spinner, X as Stack, Ve as Stepper, Et as StreamingText, he as Surface, Pe as Switch, Ge as Table, Ke as TableBody, qe as TableCaption, Je as TableCell, Ye as TableFoot, Xe as TableHead, Ze as TableHeaderCell, Qe as TableRow, rt as Tabs, pe as Tag, Re as TagInput, ie as Text, je as Textarea, ee as ThemeProvider, te as ThemeScope, B as Toast, V as Toaster, h as Tooltip, O as TooltipTrigger, vt as Tree, yt as TreeItem, Dt as breakpointNames, Ot as breakpointQuery, kt as breakpoints, s as buttonVariants, P as cn, N as commandPaletteFilter, m as createConfirm, a as createKeyboardHydrationScript, se as createMediaQuery, g as createShortcutRegistry, i as createThemeScript, z as createToaster, t as defaultThemeState, H as englishMessages, F as flashChange, _ as formatShortcut, oe as glyphNames, R as optimistic, n as readThemeState, r as resolveThemeState, ce as useBreakpoint, U as useDateFormatter, I as useIsWindowFocused, W as useNumberFormatter, L as useOnlineStatus, y as usePendingShortcut, b as useShortcut, x as useShortcutBindings, S as useShortcutCommands, C as useShortcutLabel, e as useTheme };
|
package/dist/overlays.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export { Tooltip } from "./primitives/Tooltip.tsx";
|
|
|
12
12
|
export type { TooltipProps } from "./primitives/Tooltip.tsx";
|
|
13
13
|
export { LinkTooltip } from "./primitives/LinkTooltip.tsx";
|
|
14
14
|
export type { LinkTooltipProps } from "./primitives/LinkTooltip.tsx";
|
|
15
|
+
export { TooltipTrigger } from "./primitives/TooltipTrigger.tsx";
|
|
16
|
+
export type { TooltipTriggerProps, TooltipTriggerBindings } from "./primitives/TooltipTrigger.tsx";
|
|
15
17
|
export { Popover } from "./primitives/Popover.tsx";
|
|
16
18
|
export type { PopoverProps } from "./primitives/Popover.tsx";
|
|
17
19
|
export { DropdownMenu } from "./primitives/DropdownMenu.tsx";
|
package/dist/overlays.js
CHANGED
|
@@ -5,11 +5,12 @@ import { ConfirmDialog as i } from "./primitives/ConfirmDialog.js";
|
|
|
5
5
|
import { createConfirm as a } from "./primitives/create-confirm.js";
|
|
6
6
|
import { Tooltip as o } from "./primitives/Tooltip.js";
|
|
7
7
|
import { LinkTooltip as s } from "./primitives/LinkTooltip.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
8
|
+
import { TooltipTrigger as c } from "./primitives/TooltipTrigger.js";
|
|
9
|
+
import { Popover as l } from "./primitives/Popover.js";
|
|
10
|
+
import { DropdownMenu as u } from "./primitives/DropdownMenu.js";
|
|
11
|
+
import { ContextMenu as d } from "./primitives/ContextMenu.js";
|
|
12
|
+
import { CommandPalette as f, commandPaletteFilter as p } from "./primitives/CommandPalette.js";
|
|
13
|
+
import { createToaster as m } from "./primitives/create-toaster.js";
|
|
14
|
+
import { Toast as h } from "./primitives/Toast.js";
|
|
15
|
+
import { Toaster as g } from "./primitives/Toaster.js";
|
|
16
|
+
export { r as AlertDialog, f as CommandPalette, i as ConfirmDialog, d as ContextMenu, e as Dialog, t as Drawer, u as DropdownMenu, s as LinkTooltip, l as Popover, n as Sheet, h as Toast, g as Toaster, o as Tooltip, c as TooltipTrigger, p as commandPaletteFilter, a as createConfirm, m as createToaster };
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
import type { JSX } from "solid-js";
|
|
2
|
-
|
|
2
|
+
/** Exactly one accessible name source for the native input. */
|
|
3
|
+
export type BooleanControlName = {
|
|
4
|
+
label: string;
|
|
5
|
+
"aria-label"?: never;
|
|
6
|
+
"aria-labelledby"?: never;
|
|
7
|
+
} | {
|
|
8
|
+
label?: never;
|
|
9
|
+
"aria-label": string;
|
|
10
|
+
"aria-labelledby"?: never;
|
|
11
|
+
} | {
|
|
12
|
+
label?: never;
|
|
13
|
+
"aria-label"?: never;
|
|
14
|
+
"aria-labelledby": string;
|
|
15
|
+
};
|
|
16
|
+
export interface BooleanControlBaseProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "children" | "onChange" | "id" | "ref" | "onPointerDown" | "aria-label" | "aria-labelledby" | "aria-describedby" | `use:${string}`> {
|
|
3
17
|
id?: string;
|
|
4
18
|
ref?: HTMLDivElement | ((element: HTMLDivElement) => void);
|
|
5
19
|
onPointerDown?: NonNullable<JSX.HTMLAttributes<HTMLDivElement>["onPointerDown"]>;
|
|
6
|
-
|
|
20
|
+
/** Extra description IDs for the native input, merged with the description and error. */
|
|
21
|
+
"aria-describedby"?: string | undefined;
|
|
7
22
|
description?: string;
|
|
8
23
|
error?: string;
|
|
9
24
|
checked?: boolean;
|
|
@@ -18,5 +33,6 @@ export interface CheckboxProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>,
|
|
|
18
33
|
value?: string;
|
|
19
34
|
inputRef?: (element: HTMLInputElement) => void;
|
|
20
35
|
}
|
|
36
|
+
export type CheckboxProps = BooleanControlBaseProps & BooleanControlName;
|
|
21
37
|
export declare function createNativeBooleanControl(props: CheckboxProps, kind: "checkbox" | "switch"): JSX.Element;
|
|
22
38
|
export declare function Checkbox(props: CheckboxProps): JSX.Element;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { cn as e } from "../utils/cn.js";
|
|
2
2
|
import { createBooleanInputState as t } from "./boolean-input-state.js";
|
|
3
|
-
import { className as n, createComponent as r,
|
|
4
|
-
import { Show as
|
|
3
|
+
import { className as n, createComponent as r, effect as i, insert as a, mergeProps as o, setAttribute as s, spread as c, template as l, use as u } from "solid-js/web";
|
|
4
|
+
import { Show as d, createUniqueId as f, splitProps as p } from "solid-js";
|
|
5
5
|
// src/primitives/Checkbox.tsx
|
|
6
|
-
var
|
|
7
|
-
function b(
|
|
8
|
-
let [
|
|
6
|
+
var m = /*#__PURE__*/ l("<p>"), h = /*#__PURE__*/ l("<div><div><input type=checkbox><span aria-hidden=true>"), g = /*#__PURE__*/ l("<span class=sheen-checkbox-indicator><span class=sheen-checkbox-mark>"), _ = /*#__PURE__*/ l("<span class=sheen-switch-thumb>"), v = /*#__PURE__*/ l("<span aria-hidden=true> *"), y = /*#__PURE__*/ l("<label>");
|
|
7
|
+
function b(l, b) {
|
|
8
|
+
let [x, S, C] = p(l, [
|
|
9
9
|
"label",
|
|
10
|
+
"aria-label",
|
|
11
|
+
"aria-labelledby",
|
|
12
|
+
"aria-describedby",
|
|
10
13
|
"description",
|
|
11
14
|
"error",
|
|
12
15
|
"class",
|
|
@@ -22,56 +25,68 @@ function b(i, u) {
|
|
|
22
25
|
"required",
|
|
23
26
|
"name",
|
|
24
27
|
"value"
|
|
25
|
-
]),
|
|
28
|
+
]), w = `sheen-${b}`, T = f(), E = `${T}-input`, D = () => [
|
|
29
|
+
x["aria-describedby"],
|
|
30
|
+
x.description ? `${T}-description` : "",
|
|
31
|
+
x.error ? `${T}-error` : ""
|
|
32
|
+
].filter(Boolean).join(" ") || void 0, { checked: O, requestChange: k, setInput: A } = t(S, (e) => x.onCheckedChange?.(e));
|
|
26
33
|
return (() => {
|
|
27
|
-
var t =
|
|
28
|
-
return
|
|
34
|
+
var t = h(), l = t.firstChild, f = l.firstChild, p = f.nextSibling;
|
|
35
|
+
return c(t, o(C, {
|
|
29
36
|
get class() {
|
|
30
|
-
return e(
|
|
37
|
+
return e(w, x.class);
|
|
31
38
|
},
|
|
32
39
|
get "data-checked"() {
|
|
33
40
|
return O() || void 0;
|
|
34
41
|
},
|
|
35
42
|
get "data-indeterminate"() {
|
|
36
|
-
return
|
|
43
|
+
return S.indeterminate || void 0;
|
|
37
44
|
},
|
|
38
45
|
get "data-disabled"() {
|
|
39
|
-
return
|
|
46
|
+
return S.disabled || void 0;
|
|
40
47
|
},
|
|
41
48
|
get "data-readonly"() {
|
|
42
|
-
return
|
|
49
|
+
return S.readOnly || void 0;
|
|
43
50
|
},
|
|
44
51
|
get "data-invalid"() {
|
|
45
|
-
return
|
|
52
|
+
return x.error ? "" : void 0;
|
|
46
53
|
}
|
|
47
|
-
}), !1, !0), n(
|
|
48
|
-
|
|
49
|
-
},
|
|
54
|
+
}), !1, !0), n(l, `${w}-row`), f.addEventListener("change", (e) => k(e.currentTarget)), u((e) => {
|
|
55
|
+
A(e), x.inputRef?.(e);
|
|
56
|
+
}, f), s(f, "id", E), s(f, "role", b === "switch" ? "switch" : void 0), n(f, `${w}-input`), n(p, `${w}-control`), a(p, b === "checkbox" ? g() : _()), a(l, r(d, {
|
|
50
57
|
get when() {
|
|
51
|
-
return x.
|
|
58
|
+
return x.label;
|
|
52
59
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
children: (e) => (() => {
|
|
61
|
+
var t = y();
|
|
62
|
+
return s(t, "for", E), n(t, `${w}-label`), a(t, e, null), a(t, r(d, {
|
|
63
|
+
get when() {
|
|
64
|
+
return S.required;
|
|
65
|
+
},
|
|
66
|
+
get children() {
|
|
67
|
+
return v();
|
|
68
|
+
}
|
|
69
|
+
}), null), t;
|
|
70
|
+
})()
|
|
71
|
+
}), null), a(t, r(d, {
|
|
57
72
|
get when() {
|
|
58
|
-
return
|
|
73
|
+
return x.description;
|
|
59
74
|
},
|
|
60
75
|
get children() {
|
|
61
|
-
var e =
|
|
62
|
-
return
|
|
76
|
+
var e = m();
|
|
77
|
+
return s(e, "id", `${T}-description`), n(e, `${w}-description`), a(e, () => x.description), e;
|
|
63
78
|
}
|
|
64
|
-
}), null),
|
|
79
|
+
}), null), a(t, r(d, {
|
|
65
80
|
get when() {
|
|
66
|
-
return
|
|
81
|
+
return x.error;
|
|
67
82
|
},
|
|
68
83
|
get children() {
|
|
69
|
-
var e =
|
|
70
|
-
return
|
|
84
|
+
var e = m();
|
|
85
|
+
return s(e, "id", `${T}-error`), n(e, `${w}-error`), a(e, () => x.error), e;
|
|
71
86
|
}
|
|
72
|
-
}), null),
|
|
73
|
-
var t =
|
|
74
|
-
return t !== e.e &&
|
|
87
|
+
}), null), i((e) => {
|
|
88
|
+
var t = S.name ?? "", n = x.form, r = S.disabled, i = S.required, a = S.readOnly, o = x["aria-label"], c = x["aria-labelledby"], l = S.readOnly || void 0, u = x.error ? "true" : void 0, d = D(), m = S.indeterminate || void 0;
|
|
89
|
+
return t !== e.e && s(f, "name", e.e = t), n !== e.t && s(f, "form", e.t = n), r !== e.a && (f.disabled = e.a = r), i !== e.o && (f.required = e.o = i), a !== e.i && (f.readOnly = e.i = a), o !== e.n && s(f, "aria-label", e.n = o), c !== e.s && s(f, "aria-labelledby", e.s = c), l !== e.h && s(f, "aria-readonly", e.h = l), u !== e.r && s(f, "aria-invalid", e.r = u), d !== e.d && s(f, "aria-describedby", e.d = d), m !== e.l && s(p, "data-indeterminate", e.l = m), e;
|
|
75
90
|
}, {
|
|
76
91
|
e: void 0,
|
|
77
92
|
t: void 0,
|
|
@@ -81,12 +96,13 @@ function b(i, u) {
|
|
|
81
96
|
n: void 0,
|
|
82
97
|
s: void 0,
|
|
83
98
|
h: void 0,
|
|
84
|
-
r: void 0
|
|
85
|
-
|
|
99
|
+
r: void 0,
|
|
100
|
+
d: void 0,
|
|
101
|
+
l: void 0
|
|
102
|
+
}), i(() => f.value = S.value), i(() => f.checked = O()), t;
|
|
86
103
|
})();
|
|
87
104
|
}
|
|
88
105
|
function x(e) {
|
|
89
106
|
return b(e, "checkbox");
|
|
90
107
|
}
|
|
91
|
-
i(["click"]);
|
|
92
108
|
export { x as Checkbox, b as createNativeBooleanControl };
|
|
@@ -5,6 +5,10 @@ export interface CommandPaletteCommand {
|
|
|
5
5
|
readonly group: string;
|
|
6
6
|
readonly keywords?: readonly string[];
|
|
7
7
|
readonly disabled?: boolean;
|
|
8
|
+
/** Renders decorative leading content, hidden from assistive technology. */
|
|
9
|
+
readonly icon?: () => JSX.Element;
|
|
10
|
+
/** Renders trailing content such as a shortcut hint or badge, exposed as the option's description. */
|
|
11
|
+
readonly trailing?: () => JSX.Element;
|
|
8
12
|
readonly run: () => void | Promise<void>;
|
|
9
13
|
}
|
|
10
14
|
export interface CommandPaletteStaticSource {
|