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