@qeetrix/react 0.0.1 → 0.0.2
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/CHANGELOG.md +173 -0
- package/README.md +141 -4
- package/dist/accordion/accordion.d.ts +42 -0
- package/dist/accordion/accordion.js +72 -0
- package/dist/accordion/index.d.ts +2 -0
- package/dist/accordion/index.js +1 -0
- package/dist/avatar/avatar.d.ts +21 -0
- package/dist/avatar/avatar.js +43 -0
- package/dist/avatar/index.d.ts +2 -0
- package/dist/avatar/index.js +1 -0
- package/dist/badge/badge.d.ts +14 -0
- package/dist/badge/badge.js +25 -0
- package/dist/badge/index.d.ts +2 -0
- package/dist/badge/index.js +1 -0
- package/dist/box/box.d.ts +27 -0
- package/dist/box/box.js +21 -0
- package/dist/box/index.d.ts +2 -0
- package/dist/box/index.js +1 -0
- package/dist/button/button.d.ts +46 -0
- package/dist/button/button.js +74 -0
- package/dist/button/index.d.ts +2 -0
- package/dist/button/index.js +1 -0
- package/dist/card/card.d.ts +30 -0
- package/dist/card/card.js +56 -0
- package/dist/card/index.d.ts +2 -0
- package/dist/card/index.js +1 -0
- package/dist/checkbox/checkbox.d.ts +33 -0
- package/dist/checkbox/checkbox.js +61 -0
- package/dist/checkbox/index.d.ts +2 -0
- package/dist/checkbox/index.js +1 -0
- package/dist/css/accordion.css +73 -0
- package/dist/css/avatar.css +44 -0
- package/dist/css/badge.css +53 -0
- package/dist/css/box.css +163 -0
- package/dist/css/button.css +168 -0
- package/dist/css/card.css +75 -0
- package/dist/css/checkbox.css +58 -0
- package/dist/css/dialog.css +121 -0
- package/dist/css/drawer.css +123 -0
- package/dist/css/field.css +121 -0
- package/dist/css/fieldset.css +37 -0
- package/dist/css/grid.css +86 -0
- package/dist/css/heading.css +93 -0
- package/dist/css/inline.css +85 -0
- package/dist/css/input.css +98 -0
- package/dist/css/link.css +45 -0
- package/dist/css/menu.css +149 -0
- package/dist/css/popover.css +72 -0
- package/dist/css/progress.css +88 -0
- package/dist/css/radio.css +54 -0
- package/dist/css/scroll-area.css +63 -0
- package/dist/css/select.css +173 -0
- package/dist/css/separator.css +28 -0
- package/dist/css/skeleton.css +33 -0
- package/dist/css/skip-link.css +33 -0
- package/dist/css/slider.css +86 -0
- package/dist/css/spinner.css +55 -0
- package/dist/css/stack.css +76 -0
- package/dist/css/switch.css +79 -0
- package/dist/css/table.css +68 -0
- package/dist/css/tabs.css +112 -0
- package/dist/css/text-field.css +4 -0
- package/dist/css/text.css +106 -0
- package/dist/css/toast.css +108 -0
- package/dist/css/toggle.css +112 -0
- package/dist/css/tooltip.css +41 -0
- package/dist/css/visually-hidden.css +15 -0
- package/dist/dialog/dialog.d.ts +51 -0
- package/dist/dialog/dialog.js +120 -0
- package/dist/dialog/index.d.ts +2 -0
- package/dist/dialog/index.js +1 -0
- package/dist/drawer/drawer.d.ts +46 -0
- package/dist/drawer/drawer.js +101 -0
- package/dist/drawer/index.d.ts +2 -0
- package/dist/drawer/index.js +1 -0
- package/dist/field/choice.d.ts +21 -0
- package/dist/field/choice.js +67 -0
- package/dist/field/field.d.ts +28 -0
- package/dist/field/field.js +77 -0
- package/dist/field/index.d.ts +3 -0
- package/dist/field/index.js +1 -0
- package/dist/fieldset/fieldset.d.ts +19 -0
- package/dist/fieldset/fieldset.js +29 -0
- package/dist/fieldset/index.d.ts +2 -0
- package/dist/fieldset/index.js +1 -0
- package/dist/grid/grid.d.ts +30 -0
- package/dist/grid/grid.js +36 -0
- package/dist/grid/index.d.ts +2 -0
- package/dist/grid/index.js +1 -0
- package/dist/heading/heading.d.ts +23 -0
- package/dist/heading/heading.js +30 -0
- package/dist/heading/index.d.ts +2 -0
- package/dist/heading/index.js +1 -0
- package/dist/index.d.ts +80 -1
- package/dist/index.js +38 -0
- package/dist/inline/index.d.ts +2 -0
- package/dist/inline/index.js +1 -0
- package/dist/inline/inline.d.ts +19 -0
- package/dist/inline/inline.js +16 -0
- package/dist/input/index.d.ts +2 -0
- package/dist/input/index.js +1 -0
- package/dist/input/input.d.ts +37 -0
- package/dist/input/input.js +63 -0
- package/dist/internal/control.d.ts +9 -0
- package/dist/internal/control.js +4 -0
- package/dist/internal/cx.js +7 -0
- package/dist/internal/messages.js +22 -0
- package/dist/internal/refs.js +23 -0
- package/dist/internal/render.d.ts +6 -0
- package/dist/internal/render.js +22 -0
- package/dist/internal/space.d.ts +9 -0
- package/dist/internal/text.d.ts +5 -0
- package/dist/internal/text.js +18 -0
- package/dist/link/index.d.ts +2 -0
- package/dist/link/index.js +1 -0
- package/dist/link/link.d.ts +13 -0
- package/dist/link/link.js +31 -0
- package/dist/menu/index.d.ts +2 -0
- package/dist/menu/index.js +1 -0
- package/dist/menu/menu.d.ts +76 -0
- package/dist/menu/menu.js +172 -0
- package/dist/popover/index.d.ts +2 -0
- package/dist/popover/index.js +1 -0
- package/dist/popover/popover.d.ts +33 -0
- package/dist/popover/popover.js +48 -0
- package/dist/progress/index.d.ts +2 -0
- package/dist/progress/index.js +1 -0
- package/dist/progress/progress.d.ts +26 -0
- package/dist/progress/progress.js +57 -0
- package/dist/radio/index.d.ts +2 -0
- package/dist/radio/index.js +1 -0
- package/dist/radio/radio.d.ts +31 -0
- package/dist/radio/radio.js +47 -0
- package/dist/scroll-area/index.d.ts +2 -0
- package/dist/scroll-area/index.js +1 -0
- package/dist/scroll-area/scroll-area.d.ts +18 -0
- package/dist/scroll-area/scroll-area.js +39 -0
- package/dist/select/index.d.ts +2 -0
- package/dist/select/index.js +1 -0
- package/dist/select/select.d.ts +36 -0
- package/dist/select/select.js +82 -0
- package/dist/separator/index.d.ts +2 -0
- package/dist/separator/index.js +1 -0
- package/dist/separator/separator.d.ts +16 -0
- package/dist/separator/separator.js +16 -0
- package/dist/skeleton/index.d.ts +2 -0
- package/dist/skeleton/index.js +1 -0
- package/dist/skeleton/skeleton.d.ts +12 -0
- package/dist/skeleton/skeleton.js +18 -0
- package/dist/skip-link/index.d.ts +2 -0
- package/dist/skip-link/index.js +1 -0
- package/dist/skip-link/skip-link.d.ts +13 -0
- package/dist/skip-link/skip-link.js +18 -0
- package/dist/slider/index.d.ts +2 -0
- package/dist/slider/index.js +1 -0
- package/dist/slider/slider.d.ts +17 -0
- package/dist/slider/slider.js +51 -0
- package/dist/spinner/index.d.ts +2 -0
- package/dist/spinner/index.js +1 -0
- package/dist/spinner/spinner.d.ts +15 -0
- package/dist/spinner/spinner.js +19 -0
- package/dist/stack/index.d.ts +2 -0
- package/dist/stack/index.js +1 -0
- package/dist/stack/stack.d.ts +17 -0
- package/dist/stack/stack.js +15 -0
- package/dist/styles.css +2948 -0
- package/dist/switch/index.d.ts +2 -0
- package/dist/switch/index.js +1 -0
- package/dist/switch/switch.d.ts +18 -0
- package/dist/switch/switch.js +31 -0
- package/dist/table/index.d.ts +2 -0
- package/dist/table/index.js +1 -0
- package/dist/table/table.d.ts +36 -0
- package/dist/table/table.js +69 -0
- package/dist/tabs/index.d.ts +2 -0
- package/dist/tabs/index.js +1 -0
- package/dist/tabs/tabs.d.ts +43 -0
- package/dist/tabs/tabs.js +66 -0
- package/dist/text/index.d.ts +3 -0
- package/dist/text/index.js +1 -0
- package/dist/text/text.d.ts +24 -0
- package/dist/text/text.js +24 -0
- package/dist/text-field/index.d.ts +2 -0
- package/dist/text-field/index.js +1 -0
- package/dist/text-field/text-field.d.ts +15 -0
- package/dist/text-field/text-field.js +41 -0
- package/dist/toast/index.d.ts +2 -0
- package/dist/toast/index.js +1 -0
- package/dist/toast/toast.d.ts +54 -0
- package/dist/toast/toast.js +123 -0
- package/dist/toggle/index.d.ts +2 -0
- package/dist/toggle/index.js +1 -0
- package/dist/toggle/toggle.d.ts +48 -0
- package/dist/toggle/toggle.js +54 -0
- package/dist/tooltip/index.d.ts +2 -0
- package/dist/tooltip/index.js +1 -0
- package/dist/tooltip/tooltip.d.ts +26 -0
- package/dist/tooltip/tooltip.js +39 -0
- package/dist/visually-hidden/index.d.ts +2 -0
- package/dist/visually-hidden/index.js +1 -0
- package/dist/visually-hidden/visually-hidden.d.ts +8 -0
- package/dist/visually-hidden/visually-hidden.js +12 -0
- package/package.json +153 -1
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cx } from "../internal/cx.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { createContext, use } from "react";
|
|
5
|
+
import { CheckIcon } from "@qeetrix/icons/icons/check";
|
|
6
|
+
import { Menu } from "@base-ui/react/menu";
|
|
7
|
+
import { ChevronRightIcon } from "@qeetrix/icons/icons/chevron-right";
|
|
8
|
+
// src/menu/menu.tsx
|
|
9
|
+
/** True inside a submenu, whose content lines its first item up with the trigger item. */
|
|
10
|
+
const InSubmenu = createContext(false);
|
|
11
|
+
/** Holds a menu's open state: `open` / `defaultOpen` / `onOpenChange(open, details)`. */
|
|
12
|
+
function Menu$1(props) {
|
|
13
|
+
return /* @__PURE__ */ jsx(Menu.Root, { ...props });
|
|
14
|
+
}
|
|
15
|
+
/** Opens the menu. Render your own control: `render={<IconButton aria-label="More" … />}`. */
|
|
16
|
+
function MenuTrigger(props) {
|
|
17
|
+
return /* @__PURE__ */ jsx(Menu.Trigger, { ...props });
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The list of actions (06-component-specs.md §5): arrow keys move, typing jumps to a match, Escape
|
|
21
|
+
* closes and returns focus to the trigger. It never traps Tab.
|
|
22
|
+
*/
|
|
23
|
+
function MenuContent({ side, align = "start", sideOffset, className, children, ...props }) {
|
|
24
|
+
const inSubmenu = use(InSubmenu);
|
|
25
|
+
return /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
|
|
26
|
+
side,
|
|
27
|
+
align,
|
|
28
|
+
sideOffset: sideOffset ?? (inSubmenu ? 0 : 4),
|
|
29
|
+
alignOffset: inSubmenu ? -5 : 0,
|
|
30
|
+
className: "qx-menu-positioner",
|
|
31
|
+
children: /* @__PURE__ */ jsx(Menu.Popup, {
|
|
32
|
+
...props,
|
|
33
|
+
className: cx("qx-menu", className),
|
|
34
|
+
"data-slot": "menu-popup",
|
|
35
|
+
children
|
|
36
|
+
})
|
|
37
|
+
}) });
|
|
38
|
+
}
|
|
39
|
+
function Shortcut({ children }) {
|
|
40
|
+
if (children == null) return null;
|
|
41
|
+
return /* @__PURE__ */ jsx("span", {
|
|
42
|
+
className: "qx-menu-shortcut",
|
|
43
|
+
"data-slot": "menu-shortcut",
|
|
44
|
+
"aria-hidden": true,
|
|
45
|
+
children
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/** An action. */
|
|
49
|
+
function MenuItem({ icon: Icon, shortcut, tone, className, children, ...props }) {
|
|
50
|
+
return /* @__PURE__ */ jsxs(Menu.Item, {
|
|
51
|
+
...props,
|
|
52
|
+
className: cx("qx-menu-item", className),
|
|
53
|
+
"data-slot": "menu-item",
|
|
54
|
+
"data-tone": tone,
|
|
55
|
+
children: [
|
|
56
|
+
Icon && /* @__PURE__ */ jsx(Icon, {
|
|
57
|
+
shape: "sharp",
|
|
58
|
+
size: 16,
|
|
59
|
+
"aria-hidden": true,
|
|
60
|
+
className: "qx-menu-item-icon"
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ jsx("span", {
|
|
63
|
+
className: "qx-menu-item-label",
|
|
64
|
+
children
|
|
65
|
+
}),
|
|
66
|
+
/* @__PURE__ */ jsx(Shortcut, { children: shortcut })
|
|
67
|
+
]
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/** An option that turns on or off; a sharp check marks it. */
|
|
71
|
+
function MenuCheckboxItem({ shortcut, className, children, ...props }) {
|
|
72
|
+
return /* @__PURE__ */ jsxs(Menu.CheckboxItem, {
|
|
73
|
+
...props,
|
|
74
|
+
className: cx("qx-menu-item", className),
|
|
75
|
+
"data-slot": "menu-checkbox-item",
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ jsx("span", {
|
|
78
|
+
className: "qx-menu-mark",
|
|
79
|
+
children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, {
|
|
80
|
+
className: "qx-menu-mark-indicator",
|
|
81
|
+
children: /* @__PURE__ */ jsx(CheckIcon, {
|
|
82
|
+
shape: "sharp",
|
|
83
|
+
size: 16,
|
|
84
|
+
"aria-hidden": true
|
|
85
|
+
})
|
|
86
|
+
})
|
|
87
|
+
}),
|
|
88
|
+
/* @__PURE__ */ jsx("span", {
|
|
89
|
+
className: "qx-menu-item-label",
|
|
90
|
+
children
|
|
91
|
+
}),
|
|
92
|
+
/* @__PURE__ */ jsx(Shortcut, { children: shortcut })
|
|
93
|
+
]
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/** One choice of a MenuRadioGroup; a 6px dot marks it. */
|
|
97
|
+
function MenuRadioItem({ shortcut, className, children, ...props }) {
|
|
98
|
+
return /* @__PURE__ */ jsxs(Menu.RadioItem, {
|
|
99
|
+
...props,
|
|
100
|
+
className: cx("qx-menu-item", className),
|
|
101
|
+
"data-slot": "menu-radio-item",
|
|
102
|
+
children: [
|
|
103
|
+
/* @__PURE__ */ jsx("span", {
|
|
104
|
+
className: "qx-menu-mark",
|
|
105
|
+
children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { className: "qx-menu-mark-indicator qx-menu-dot" })
|
|
106
|
+
}),
|
|
107
|
+
/* @__PURE__ */ jsx("span", {
|
|
108
|
+
className: "qx-menu-item-label",
|
|
109
|
+
children
|
|
110
|
+
}),
|
|
111
|
+
/* @__PURE__ */ jsx(Shortcut, { children: shortcut })
|
|
112
|
+
]
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/** Radio items sharing one value: `value` / `defaultValue` / `onValueChange(value, details)`. */
|
|
116
|
+
function MenuRadioGroup(props) {
|
|
117
|
+
return /* @__PURE__ */ jsx(Menu.RadioGroup, { ...props });
|
|
118
|
+
}
|
|
119
|
+
/** Items under one label. */
|
|
120
|
+
function MenuGroup(props) {
|
|
121
|
+
return /* @__PURE__ */ jsx(Menu.Group, { ...props });
|
|
122
|
+
}
|
|
123
|
+
/** A group's label. */
|
|
124
|
+
function MenuGroupLabel({ className, ...props }) {
|
|
125
|
+
return /* @__PURE__ */ jsx(Menu.GroupLabel, {
|
|
126
|
+
...props,
|
|
127
|
+
className: cx("qx-menu-group-label", className),
|
|
128
|
+
"data-slot": "menu-group-label"
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
/** A 1px rule between groups, edge to edge. */
|
|
132
|
+
function MenuSeparator({ className, ...props }) {
|
|
133
|
+
return /* @__PURE__ */ jsx(Menu.Separator, {
|
|
134
|
+
...props,
|
|
135
|
+
className: cx("qx-menu-separator", className),
|
|
136
|
+
"data-slot": "menu-separator"
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/** A nested menu: a MenuSubmenuTrigger and its own MenuContent. */
|
|
140
|
+
function MenuSubmenu(props) {
|
|
141
|
+
return /* @__PURE__ */ jsx(InSubmenu, {
|
|
142
|
+
value: true,
|
|
143
|
+
children: /* @__PURE__ */ jsx(Menu.SubmenuRoot, { ...props })
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
/** The item that opens a submenu, with a trailing chevron that mirrors in right-to-left text. */
|
|
147
|
+
function MenuSubmenuTrigger({ icon: Icon, className, children, ...props }) {
|
|
148
|
+
return /* @__PURE__ */ jsxs(Menu.SubmenuTrigger, {
|
|
149
|
+
...props,
|
|
150
|
+
className: cx("qx-menu-item", className),
|
|
151
|
+
"data-slot": "menu-submenu-trigger",
|
|
152
|
+
children: [
|
|
153
|
+
Icon && /* @__PURE__ */ jsx(Icon, {
|
|
154
|
+
shape: "sharp",
|
|
155
|
+
size: 16,
|
|
156
|
+
"aria-hidden": true,
|
|
157
|
+
className: "qx-menu-item-icon"
|
|
158
|
+
}),
|
|
159
|
+
/* @__PURE__ */ jsx("span", {
|
|
160
|
+
className: "qx-menu-item-label",
|
|
161
|
+
children
|
|
162
|
+
}),
|
|
163
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, {
|
|
164
|
+
shape: "sharp",
|
|
165
|
+
size: 16,
|
|
166
|
+
"aria-hidden": true,
|
|
167
|
+
className: "qx-menu-submenu-icon"
|
|
168
|
+
})
|
|
169
|
+
]
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
export { Menu$1 as Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuGroupLabel, MenuItem, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSubmenu, MenuSubmenuTrigger, MenuTrigger };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Popover, PopoverClose, PopoverCloseProps, PopoverContent, PopoverContentProps, PopoverProps, PopoverTrigger, PopoverTriggerProps } from "./popover.js";
|
|
2
|
+
export { Popover, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Popover, PopoverClose, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CSSProperties, ReactElement, ReactNode } from "react";
|
|
2
|
+
import { Popover } from "@base-ui/react/popover";
|
|
3
|
+
export type PopoverProps = Popover.Root.Props;
|
|
4
|
+
export type PopoverTriggerProps = Popover.Trigger.Props;
|
|
5
|
+
export type PopoverCloseProps = Popover.Close.Props;
|
|
6
|
+
export interface PopoverContentProps extends Omit<Popover.Popup.Props, "className" | "style" | "title" | "children"> {
|
|
7
|
+
/** A heading; when set, the popover is labelled by it. */
|
|
8
|
+
title?: ReactNode;
|
|
9
|
+
/** A line under the title. */
|
|
10
|
+
description?: ReactNode;
|
|
11
|
+
/** The trigger's side to open on. Default `bottom`; it flips when there is no room. */
|
|
12
|
+
side?: Popover.Positioner.Props["side"];
|
|
13
|
+
/** Alignment along that side. Default `center`. */
|
|
14
|
+
align?: Popover.Positioner.Props["align"];
|
|
15
|
+
/** Distance from the trigger, in pixels. Default 6. */
|
|
16
|
+
sideOffset?: number;
|
|
17
|
+
/** Placement and sizing only. */
|
|
18
|
+
className?: string;
|
|
19
|
+
style?: CSSProperties;
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/** Holds a popover's open state: `open` / `defaultOpen` / `onOpenChange(open, details)`. */
|
|
23
|
+
declare function Popover$1(props: PopoverProps): ReactElement;
|
|
24
|
+
/** Opens the popover. Render your own control: `render={<Button variant="soft">Filter</Button>}`. */
|
|
25
|
+
export declare function PopoverTrigger(props: PopoverTriggerProps): ReactElement;
|
|
26
|
+
/** Closes the popover, e.g. a footer action: `render={<Button>Apply</Button>}`. */
|
|
27
|
+
export declare function PopoverClose(props: PopoverCloseProps): ReactElement;
|
|
28
|
+
/**
|
|
29
|
+
* Non-modal content anchored to its trigger (06-component-specs.md, increment 4). Focus moves in on
|
|
30
|
+
* open and back to the trigger on close; Escape and an outside click close it.
|
|
31
|
+
*/
|
|
32
|
+
export declare function PopoverContent({ title, description, side, align, sideOffset, className, children, ...props }: PopoverContentProps): ReactElement;
|
|
33
|
+
export { Popover$1 as Popover };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cx } from "../internal/cx.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Popover } from "@base-ui/react/popover";
|
|
5
|
+
// src/popover/popover.tsx
|
|
6
|
+
/** Holds a popover's open state: `open` / `defaultOpen` / `onOpenChange(open, details)`. */
|
|
7
|
+
function Popover$1(props) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Popover.Root, { ...props });
|
|
9
|
+
}
|
|
10
|
+
/** Opens the popover. Render your own control: `render={<Button variant="soft">Filter</Button>}`. */
|
|
11
|
+
function PopoverTrigger(props) {
|
|
12
|
+
return /* @__PURE__ */ jsx(Popover.Trigger, { ...props });
|
|
13
|
+
}
|
|
14
|
+
/** Closes the popover, e.g. a footer action: `render={<Button>Apply</Button>}`. */
|
|
15
|
+
function PopoverClose(props) {
|
|
16
|
+
return /* @__PURE__ */ jsx(Popover.Close, { ...props });
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Non-modal content anchored to its trigger (06-component-specs.md, increment 4). Focus moves in on
|
|
20
|
+
* open and back to the trigger on close; Escape and an outside click close it.
|
|
21
|
+
*/
|
|
22
|
+
function PopoverContent({ title, description, side, align, sideOffset = 6, className, children, ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Positioner, {
|
|
24
|
+
side,
|
|
25
|
+
align,
|
|
26
|
+
sideOffset,
|
|
27
|
+
className: "qx-popover-positioner",
|
|
28
|
+
children: /* @__PURE__ */ jsxs(Popover.Popup, {
|
|
29
|
+
...props,
|
|
30
|
+
className: cx("qx-popover", className),
|
|
31
|
+
"data-slot": "popover-popup",
|
|
32
|
+
children: [(title != null || description != null) && /* @__PURE__ */ jsxs("div", {
|
|
33
|
+
className: "qx-popover-header",
|
|
34
|
+
"data-slot": "popover-header",
|
|
35
|
+
children: [title != null && /* @__PURE__ */ jsx(Popover.Title, {
|
|
36
|
+
className: "qx-popover-title",
|
|
37
|
+
"data-slot": "popover-title",
|
|
38
|
+
children: title
|
|
39
|
+
}), description != null && /* @__PURE__ */ jsx(Popover.Description, {
|
|
40
|
+
className: "qx-popover-description",
|
|
41
|
+
"data-slot": "popover-description",
|
|
42
|
+
children: description
|
|
43
|
+
})]
|
|
44
|
+
}), children]
|
|
45
|
+
})
|
|
46
|
+
}) });
|
|
47
|
+
}
|
|
48
|
+
export { Popover$1 as Popover, PopoverClose, PopoverContent, PopoverTrigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Meter, Progress } from "./progress.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CSSProperties, ReactElement, ReactNode } from "react";
|
|
2
|
+
import { Meter } from "@base-ui/react/meter";
|
|
3
|
+
import { Progress } from "@base-ui/react/progress";
|
|
4
|
+
interface BarLook {
|
|
5
|
+
/** The visible label. Without one, give it an `aria-label`. */
|
|
6
|
+
label?: ReactNode;
|
|
7
|
+
/** Show the formatted value at the end of the header. */
|
|
8
|
+
showValue?: boolean;
|
|
9
|
+
/** Placement only. */
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
export interface ProgressProps extends Omit<Progress.Root.Props, "className" | "style" | "children">, BarLook {}
|
|
14
|
+
export type MeterTone = "brand" | "success" | "warning" | "danger";
|
|
15
|
+
export interface MeterProps extends Omit<Meter.Root.Props, "className" | "style" | "children">, BarLook {
|
|
16
|
+
/** The indicator's colour. Default `brand`. */
|
|
17
|
+
tone?: MeterTone;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A task advancing, such as an upload (06-component-specs.md, increment 6). `value={null}` is
|
|
21
|
+
* indeterminate: a segment slides along the track, and fades instead under reduced motion.
|
|
22
|
+
*/
|
|
23
|
+
declare function Progress$1({ label, showValue, className, ...props }: ProgressProps): ReactElement;
|
|
24
|
+
/** A measurement within a range, such as storage used. It looks like Progress; it isn't a task. */
|
|
25
|
+
declare function Meter$1({ label, showValue, tone, className, ...props }: MeterProps): ReactElement;
|
|
26
|
+
export { Meter$1 as Meter, Progress$1 as Progress };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cx } from "../internal/cx.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Meter } from "@base-ui/react/meter";
|
|
5
|
+
import { Progress } from "@base-ui/react/progress";
|
|
6
|
+
// src/progress/progress.tsx
|
|
7
|
+
/**
|
|
8
|
+
* A task advancing, such as an upload (06-component-specs.md, increment 6). `value={null}` is
|
|
9
|
+
* indeterminate: a segment slides along the track, and fades instead under reduced motion.
|
|
10
|
+
*/
|
|
11
|
+
function Progress$1({ label, showValue, className, ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsxs(Progress.Root, {
|
|
13
|
+
...props,
|
|
14
|
+
className: cx("qx-progress", className),
|
|
15
|
+
"data-slot": "progress",
|
|
16
|
+
children: [(label != null || showValue) && /* @__PURE__ */ jsxs("div", {
|
|
17
|
+
className: "qx-progress-header",
|
|
18
|
+
"data-slot": "progress-header",
|
|
19
|
+
children: [label != null && /* @__PURE__ */ jsx(Progress.Label, {
|
|
20
|
+
className: "qx-progress-label",
|
|
21
|
+
children: label
|
|
22
|
+
}), showValue && /* @__PURE__ */ jsx(Progress.Value, { className: "qx-progress-value" })]
|
|
23
|
+
}), /* @__PURE__ */ jsx(Progress.Track, {
|
|
24
|
+
className: "qx-progress-track",
|
|
25
|
+
"data-slot": "progress-track",
|
|
26
|
+
children: /* @__PURE__ */ jsx(Progress.Indicator, {
|
|
27
|
+
className: "qx-progress-indicator",
|
|
28
|
+
"data-slot": "progress-indicator"
|
|
29
|
+
})
|
|
30
|
+
})]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/** A measurement within a range, such as storage used. It looks like Progress; it isn't a task. */
|
|
34
|
+
function Meter$1({ label, showValue, tone = "brand", className, ...props }) {
|
|
35
|
+
return /* @__PURE__ */ jsxs(Meter.Root, {
|
|
36
|
+
...props,
|
|
37
|
+
className: cx("qx-progress", className),
|
|
38
|
+
"data-slot": "meter",
|
|
39
|
+
"data-tone": tone,
|
|
40
|
+
children: [(label != null || showValue) && /* @__PURE__ */ jsxs("div", {
|
|
41
|
+
className: "qx-progress-header",
|
|
42
|
+
"data-slot": "meter-header",
|
|
43
|
+
children: [label != null && /* @__PURE__ */ jsx(Meter.Label, {
|
|
44
|
+
className: "qx-progress-label",
|
|
45
|
+
children: label
|
|
46
|
+
}), showValue && /* @__PURE__ */ jsx(Meter.Value, { className: "qx-progress-value" })]
|
|
47
|
+
}), /* @__PURE__ */ jsx(Meter.Track, {
|
|
48
|
+
className: "qx-progress-track",
|
|
49
|
+
"data-slot": "meter-track",
|
|
50
|
+
children: /* @__PURE__ */ jsx(Meter.Indicator, {
|
|
51
|
+
className: "qx-progress-indicator",
|
|
52
|
+
"data-slot": "meter-indicator"
|
|
53
|
+
})
|
|
54
|
+
})]
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
export { Meter$1 as Meter, Progress$1 as Progress };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Radio, RadioGroup } from "./radio.js";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FieldMessageProps } from "../field/field.js";
|
|
2
|
+
import { ChoiceLabelProps, ChoiceOrientation } from "../field/choice.js";
|
|
3
|
+
import { CSSProperties, ReactElement, ReactNode } from "react";
|
|
4
|
+
import { Radio } from "@base-ui/react/radio";
|
|
5
|
+
import { RadioGroup } from "@base-ui/react/radio-group";
|
|
6
|
+
interface RadioOwnProps<Value> extends Omit<Radio.Root.Props<Value>, "className" | "style" | "children"> {
|
|
7
|
+
/** A line under the label. */
|
|
8
|
+
description?: ReactNode;
|
|
9
|
+
/** Placement of the row (or of the control alone, with no label) only. */
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
/** Radio props: Base UI's (`value` required), plus `label` — or a required `aria-label`. */
|
|
14
|
+
export type RadioProps<Value = string> = RadioOwnProps<Value> & ChoiceLabelProps;
|
|
15
|
+
/** One option of a RadioGroup (06-component-specs.md §3). The 5px Ember ring is its border. */
|
|
16
|
+
declare function Radio$1<Value = string>({ label, description, className, style, ...props }: RadioProps<Value>): ReactElement;
|
|
17
|
+
export interface RadioGroupProps<Value = string> extends Omit<RadioGroup.Props<Value>, "className" | "style" | "render">, FieldMessageProps {
|
|
18
|
+
/** The question, shown as the group's legend. */
|
|
19
|
+
label: ReactNode;
|
|
20
|
+
/** `vertical` (default) or `horizontal` for short options. */
|
|
21
|
+
orientation?: ChoiceOrientation;
|
|
22
|
+
/** Placement only (margin, width, grid placement). */
|
|
23
|
+
className?: string;
|
|
24
|
+
style?: CSSProperties;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* One choice from a set, always answered: arrow keys move and select, and the group is one tab
|
|
28
|
+
* stop. Generic over the value: `RadioGroup<"monthly" | "yearly">`.
|
|
29
|
+
*/
|
|
30
|
+
declare function RadioGroup$1<Value = string>({ label, description, error, name, disabled, orientation, className, style, children, ...props }: RadioGroupProps<Value>): ReactElement;
|
|
31
|
+
export { Radio$1 as Radio, RadioGroup$1 as RadioGroup };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cx } from "../internal/cx.js";
|
|
3
|
+
import { ChoiceGroup, ChoiceRow } from "../field/choice.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Radio } from "@base-ui/react/radio";
|
|
6
|
+
import { RadioGroup } from "@base-ui/react/radio-group";
|
|
7
|
+
// src/radio/radio.tsx
|
|
8
|
+
/** One option of a RadioGroup (06-component-specs.md §3). The 5px Ember ring is its border. */
|
|
9
|
+
function Radio$1({ label, description, className, style, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(ChoiceRow, {
|
|
11
|
+
kind: "radio",
|
|
12
|
+
label,
|
|
13
|
+
description,
|
|
14
|
+
disabled: props.disabled,
|
|
15
|
+
className,
|
|
16
|
+
style,
|
|
17
|
+
children: /* @__PURE__ */ jsx(Radio.Root, {
|
|
18
|
+
...props,
|
|
19
|
+
className: cx("qx-radio", label == null ? className : void 0),
|
|
20
|
+
style: label == null ? style : void 0,
|
|
21
|
+
"data-slot": "radio-indicator"
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* One choice from a set, always answered: arrow keys move and select, and the group is one tab
|
|
27
|
+
* stop. Generic over the value: `RadioGroup<"monthly" | "yearly">`.
|
|
28
|
+
*/
|
|
29
|
+
function RadioGroup$1({ label, description, error, name, disabled, orientation = "vertical", className, style, children, ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsx(ChoiceGroup, {
|
|
31
|
+
kind: "radio",
|
|
32
|
+
label,
|
|
33
|
+
description,
|
|
34
|
+
error,
|
|
35
|
+
name,
|
|
36
|
+
disabled,
|
|
37
|
+
orientation,
|
|
38
|
+
className,
|
|
39
|
+
style,
|
|
40
|
+
group: /* @__PURE__ */ jsx(RadioGroup, {
|
|
41
|
+
...props,
|
|
42
|
+
disabled
|
|
43
|
+
}),
|
|
44
|
+
children
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
export { Radio$1 as Radio, RadioGroup$1 as RadioGroup };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ScrollArea } from "./scroll-area.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CSSProperties, ReactElement, ReactNode } from "react";
|
|
2
|
+
import { ScrollArea } from "@base-ui/react/scroll-area";
|
|
3
|
+
export type ScrollAreaOrientation = "vertical" | "horizontal" | "both";
|
|
4
|
+
export interface ScrollAreaProps extends Omit<ScrollArea.Root.Props, "className" | "style" | "children"> {
|
|
5
|
+
/** Which way it scrolls. Default `vertical`. */
|
|
6
|
+
orientation?: ScrollAreaOrientation;
|
|
7
|
+
/** Its size, e.g. a height (`style={{ blockSize: 320 }}`), and its placement. */
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A scrolling region with Qeetrix scrollbars that show on hover, while scrolling and on keyboard
|
|
14
|
+
* focus (06-component-specs.md, increment 5). When its content overflows, the region takes keyboard
|
|
15
|
+
* focus, so it can be scrolled without a pointer.
|
|
16
|
+
*/
|
|
17
|
+
declare function ScrollArea$1({ orientation, className, children, ...props }: ScrollAreaProps): ReactElement;
|
|
18
|
+
export { ScrollArea$1 as ScrollArea };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cx } from "../internal/cx.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { ScrollArea } from "@base-ui/react/scroll-area";
|
|
5
|
+
// src/scroll-area/scroll-area.tsx
|
|
6
|
+
/**
|
|
7
|
+
* A scrolling region with Qeetrix scrollbars that show on hover, while scrolling and on keyboard
|
|
8
|
+
* focus (06-component-specs.md, increment 5). When its content overflows, the region takes keyboard
|
|
9
|
+
* focus, so it can be scrolled without a pointer.
|
|
10
|
+
*/
|
|
11
|
+
function ScrollArea$1({ orientation = "vertical", className, children, ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsxs(ScrollArea.Root, {
|
|
13
|
+
...props,
|
|
14
|
+
className: cx("qx-scroll-area", className),
|
|
15
|
+
"data-slot": "scroll-area",
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ jsx(ScrollArea.Viewport, {
|
|
18
|
+
className: "qx-scroll-area-viewport",
|
|
19
|
+
"data-slot": "scroll-area-viewport",
|
|
20
|
+
children: /* @__PURE__ */ jsx(ScrollArea.Content, {
|
|
21
|
+
className: "qx-scroll-area-content",
|
|
22
|
+
children
|
|
23
|
+
})
|
|
24
|
+
}),
|
|
25
|
+
orientation !== "horizontal" && /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {
|
|
26
|
+
orientation: "vertical",
|
|
27
|
+
className: "qx-scroll-area-scrollbar",
|
|
28
|
+
children: /* @__PURE__ */ jsx(ScrollArea.Thumb, { className: "qx-scroll-area-thumb" })
|
|
29
|
+
}),
|
|
30
|
+
orientation !== "vertical" && /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {
|
|
31
|
+
orientation: "horizontal",
|
|
32
|
+
className: "qx-scroll-area-scrollbar",
|
|
33
|
+
children: /* @__PURE__ */ jsx(ScrollArea.Thumb, { className: "qx-scroll-area-thumb" })
|
|
34
|
+
}),
|
|
35
|
+
orientation === "both" && /* @__PURE__ */ jsx(ScrollArea.Corner, {})
|
|
36
|
+
]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
export { ScrollArea$1 as ScrollArea };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Select } from "./select.js";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CSSProperties, ReactElement, ReactNode, Ref } from "react";
|
|
2
|
+
import { Select } from "@base-ui/react/select";
|
|
3
|
+
/** One option. */
|
|
4
|
+
export interface SelectItem<Value> {
|
|
5
|
+
value: Value;
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** Options under a group label. */
|
|
10
|
+
export interface SelectItemGroup<Value> {
|
|
11
|
+
label: ReactNode;
|
|
12
|
+
items: ReadonlyArray<SelectItem<Value>>;
|
|
13
|
+
}
|
|
14
|
+
export interface SelectProps<Value, Multiple extends boolean | undefined = false> extends Omit<Select.Root.Props<Value, Multiple>, "items" | "children" | "id"> {
|
|
15
|
+
/** The options, flat or in groups. */
|
|
16
|
+
items: ReadonlyArray<SelectItem<Value> | SelectItemGroup<Value>>;
|
|
17
|
+
/** Shown while nothing is chosen. An example, never an instruction ("e.g. Monthly"). */
|
|
18
|
+
placeholder?: ReactNode;
|
|
19
|
+
/** The trigger's id. */
|
|
20
|
+
id?: string;
|
|
21
|
+
/** The trigger, which a Field labels. */
|
|
22
|
+
ref?: Ref<HTMLButtonElement>;
|
|
23
|
+
/** Without a Field: the trigger's accessible name. */
|
|
24
|
+
"aria-label"?: string;
|
|
25
|
+
"aria-labelledby"?: string;
|
|
26
|
+
"aria-describedby"?: string;
|
|
27
|
+
/** Placement of the trigger only. */
|
|
28
|
+
className?: string;
|
|
29
|
+
style?: CSSProperties;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Pick one option, or several with `multiple`, from up to about 15 (06-component-specs.md §4). It
|
|
33
|
+
* looks like a field and opens its list below, like a menu. Wrap it in a Field for its label.
|
|
34
|
+
*/
|
|
35
|
+
declare function Select$1<Value, Multiple extends boolean | undefined = false>({ items, placeholder, id, ref, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, className, style, ...props }: SelectProps<Value, Multiple>): ReactElement;
|
|
36
|
+
export { Select$1 as Select };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cx } from "../internal/cx.js";
|
|
3
|
+
import { ChevronDownIcon } from "@qeetrix/icons/icons/chevron-down";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { CheckIcon } from "@qeetrix/icons/icons/check";
|
|
6
|
+
import { Select } from "@base-ui/react/select";
|
|
7
|
+
// src/select/select.tsx
|
|
8
|
+
const isGroup = (entry) => "items" in entry;
|
|
9
|
+
function Option({ item }) {
|
|
10
|
+
return /* @__PURE__ */ jsxs(Select.Item, {
|
|
11
|
+
value: item.value,
|
|
12
|
+
disabled: item.disabled,
|
|
13
|
+
className: "qx-select-option",
|
|
14
|
+
"data-slot": "select-option",
|
|
15
|
+
children: [/* @__PURE__ */ jsx(Select.ItemText, {
|
|
16
|
+
className: "qx-select-option-text",
|
|
17
|
+
children: item.label
|
|
18
|
+
}), /* @__PURE__ */ jsx(Select.ItemIndicator, {
|
|
19
|
+
className: "qx-select-option-check",
|
|
20
|
+
children: /* @__PURE__ */ jsx(CheckIcon, {
|
|
21
|
+
shape: "sharp",
|
|
22
|
+
size: 16,
|
|
23
|
+
"aria-hidden": true
|
|
24
|
+
})
|
|
25
|
+
})]
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Pick one option, or several with `multiple`, from up to about 15 (06-component-specs.md §4). It
|
|
30
|
+
* looks like a field and opens its list below, like a menu. Wrap it in a Field for its label.
|
|
31
|
+
*/
|
|
32
|
+
function Select$1({ items, placeholder, id, ref, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, className, style, ...props }) {
|
|
33
|
+
const flat = items.flatMap((entry) => isGroup(entry) ? entry.items : [entry]);
|
|
34
|
+
const labelOf = (value) => flat.find((item) => Object.is(item.value, value))?.label;
|
|
35
|
+
return /* @__PURE__ */ jsxs(Select.Root, {
|
|
36
|
+
...props,
|
|
37
|
+
id,
|
|
38
|
+
items: flat,
|
|
39
|
+
children: [/* @__PURE__ */ jsxs(Select.Trigger, {
|
|
40
|
+
ref,
|
|
41
|
+
"aria-label": ariaLabel,
|
|
42
|
+
"aria-labelledby": ariaLabelledBy,
|
|
43
|
+
"aria-describedby": ariaDescribedBy,
|
|
44
|
+
className: cx("qx-select-trigger", className),
|
|
45
|
+
style,
|
|
46
|
+
"data-slot": "select-trigger",
|
|
47
|
+
children: [/* @__PURE__ */ jsx(Select.Value, {
|
|
48
|
+
className: "qx-select-value",
|
|
49
|
+
"data-slot": "select-value",
|
|
50
|
+
placeholder,
|
|
51
|
+
children: (value) => Array.isArray(value) ? value.length > 0 ? value.map(labelOf).filter((label) => label != null).join(", ") : placeholder : labelOf(value) ?? placeholder
|
|
52
|
+
}), /* @__PURE__ */ jsx(Select.Icon, {
|
|
53
|
+
className: "qx-select-icon",
|
|
54
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
55
|
+
shape: "sharp",
|
|
56
|
+
size: 16,
|
|
57
|
+
"aria-hidden": true
|
|
58
|
+
})
|
|
59
|
+
})]
|
|
60
|
+
}), /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, {
|
|
61
|
+
alignItemWithTrigger: false,
|
|
62
|
+
sideOffset: 4,
|
|
63
|
+
className: "qx-select-positioner",
|
|
64
|
+
children: /* @__PURE__ */ jsx(Select.Popup, {
|
|
65
|
+
className: "qx-select-popup",
|
|
66
|
+
"data-slot": "select-popup",
|
|
67
|
+
children: /* @__PURE__ */ jsx(Select.List, {
|
|
68
|
+
className: "qx-select-list",
|
|
69
|
+
children: items.map((entry, index) => isGroup(entry) ? /* @__PURE__ */ jsxs(Select.Group, {
|
|
70
|
+
className: "qx-select-group",
|
|
71
|
+
children: [/* @__PURE__ */ jsx(Select.GroupLabel, {
|
|
72
|
+
className: "qx-select-group-label",
|
|
73
|
+
"data-slot": "select-group-label",
|
|
74
|
+
children: entry.label
|
|
75
|
+
}), entry.items.map((item) => /* @__PURE__ */ jsx(Option, { item }, String(item.value)))]
|
|
76
|
+
}, index) : /* @__PURE__ */ jsx(Option, { item: entry }, String(entry.value)))
|
|
77
|
+
})
|
|
78
|
+
})
|
|
79
|
+
}) })]
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
export { Select$1 as Select };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Separator } from "./separator.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RenderProp } from "../internal/render.js";
|
|
2
|
+
import { ComponentProps, ReactElement } from "react";
|
|
3
|
+
export type SeparatorOrientation = "horizontal" | "vertical";
|
|
4
|
+
export type SeparatorTone = "subtle" | "default" | "strong";
|
|
5
|
+
export interface SeparatorProps extends ComponentProps<"div"> {
|
|
6
|
+
/** Default `horizontal`. A vertical separator stretches to its row. */
|
|
7
|
+
orientation?: SeparatorOrientation;
|
|
8
|
+
/** Line colour from the border tokens. Default `subtle`. */
|
|
9
|
+
tone?: SeparatorTone;
|
|
10
|
+
/** Purely visual: hidden from assistive technology (`role="none"`). */
|
|
11
|
+
decorative?: boolean;
|
|
12
|
+
/** Render a different element. */
|
|
13
|
+
render?: RenderProp;
|
|
14
|
+
}
|
|
15
|
+
/** A 1px line between groups of content. */
|
|
16
|
+
export declare function Separator({ orientation, tone, decorative, render, className, ...props }: SeparatorProps): ReactElement;
|