@ostack.tech/ui-exhibit 0.10.0
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 +3 -0
- package/dist/favicon.svg +11 -0
- package/dist/ostack-ui-exhibit.css +58 -0
- package/dist/ostack-ui-exhibit.js +1466 -0
- package/dist/ostack-ui-exhibit.js.map +1 -0
- package/dist/types/ExhibitApp.d.ts +8 -0
- package/dist/types/ExhibitContext.d.ts +6 -0
- package/dist/types/components/ExhibitGrid.d.ts +11 -0
- package/dist/types/components/ExhibitSection.d.ts +7 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/main.d.ts +0 -0
- package/dist/types/sections/AlertDialogSection.d.ts +1 -0
- package/dist/types/sections/AlertSection.d.ts +1 -0
- package/dist/types/sections/ButtonGroupSection.d.ts +1 -0
- package/dist/types/sections/ButtonSection.d.ts +1 -0
- package/dist/types/sections/CalendarSection.d.ts +1 -0
- package/dist/types/sections/CheckboxGroupSection.d.ts +1 -0
- package/dist/types/sections/CheckboxSection.d.ts +1 -0
- package/dist/types/sections/CodeSection.d.ts +1 -0
- package/dist/types/sections/CollapsibleSection.d.ts +1 -0
- package/dist/types/sections/CommandMenuSection.d.ts +1 -0
- package/dist/types/sections/DataTableSection.d.ts +1 -0
- package/dist/types/sections/DateInputSection.d.ts +1 -0
- package/dist/types/sections/DateRangeInputSection.d.ts +1 -0
- package/dist/types/sections/DialogSection.d.ts +1 -0
- package/dist/types/sections/DropdownMenuSection.d.ts +1 -0
- package/dist/types/sections/IconButtonSection.d.ts +1 -0
- package/dist/types/sections/InputSection.d.ts +1 -0
- package/dist/types/sections/KeyboardSection.d.ts +1 -0
- package/dist/types/sections/LinkSection.d.ts +1 -0
- package/dist/types/sections/MarkSection.d.ts +1 -0
- package/dist/types/sections/MenuListSection.d.ts +1 -0
- package/dist/types/sections/NumericInputSection.d.ts +1 -0
- package/dist/types/sections/OutputSection.d.ts +1 -0
- package/dist/types/sections/PopoverSection.d.ts +1 -0
- package/dist/types/sections/RadioGroupSection.d.ts +1 -0
- package/dist/types/sections/SelectSection.d.ts +1 -0
- package/dist/types/sections/SpinnerSection.d.ts +1 -0
- package/dist/types/sections/TableSection.d.ts +1 -0
- package/dist/types/sections/TabsSection.d.ts +1 -0
- package/dist/types/sections/TagSection.d.ts +1 -0
- package/dist/types/sections/TextAreaSection.d.ts +1 -0
- package/dist/types/sections/ToastSection.d.ts +1 -0
- package/dist/types/sections/TooltipSection.d.ts +1 -0
- package/dist/webapp/assets/index-54a2WCtJ.css +1 -0
- package/dist/webapp/assets/index-DzBccsSr.js +626 -0
- package/dist/webapp/favicon.svg +11 -0
- package/dist/webapp/index.html +14 -0
- package/package.json +62 -0
- package/scss/_App.scss +61 -0
- package/scss/index.scss +1 -0
|
@@ -0,0 +1,1466 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
2
|
+
import { Stack, Heading, Link, VisuallyHidden, AlertDialog, AlertDialogTrigger, Button, AlertDialogContent, AlertDialogHeader, AlertDialogTitle, AlertDialogBody, AlertDialogDescription, AlertDialogFooter, AlertDialogCancel, AlertDialogAction, Alert, AlertTitle, ButtonGroup, IconButton, Calendar, Field, Label, CheckboxGroup, Checkbox, Feedback, HelperText, Code, useSpacing, Collapsible, CollapsibleTrigger, CollapsibleContent, useCssVars, useKeyboardShortcut, Keybinds, CommandMenuDialog, CommandMenu, CommandMenuGroup, CommandMenuItem, DataTable, DataTableFilter, DataTableContent, DataTableRowsPerPage, DataTablePagination, DateInput, DateRangeInput, Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogBody, DialogDescription, Input, DialogFooter, DialogClose, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuCheckboxItem, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, Keyboard, Mark, MenuList, MenuListGroup, MenuListItem, NumericInput, ControlAddon, Output, Popover, PopoverTrigger, PopoverContent, TextArea, RadioGroup, Radio, Select, Option, Spinner, Table, TableHead, TableColumn, TableBody, TableRow, TableCell, TableFoot, Tabs, TabList, Tab, TabContent, Tag, useToastManager, Tooltip, Root, enGB, Container } from "@ostack.tech/ui";
|
|
3
|
+
import { createContext, useContext, Fragment, useState } from "react";
|
|
4
|
+
import { faFolderOpen, faSave, faTrashCan, faBolt, faCaretUp, faCaretDown, faGear, faWifi, faNetworkWired, faDisplay, faVolumeHigh, faKeyboard, faPrint, faClock, faUser, faCircleXmark, faSeedling, faEye, faPencil, faComment, faStar, faBookmark } from "@fortawesome/free-solid-svg-icons";
|
|
5
|
+
const DEV_DOCS_URL = "http://localhost:6006/";
|
|
6
|
+
const ExhibitContext = createContext(null);
|
|
7
|
+
function useDocsUrl() {
|
|
8
|
+
return useContext(ExhibitContext)?.docsUrl ?? DEV_DOCS_URL;
|
|
9
|
+
}
|
|
10
|
+
function ExhibitGrid({
|
|
11
|
+
rows,
|
|
12
|
+
cols,
|
|
13
|
+
renderItem
|
|
14
|
+
}) {
|
|
15
|
+
return /* @__PURE__ */ jsxs(
|
|
16
|
+
"div",
|
|
17
|
+
{
|
|
18
|
+
className: "exhibit-grid",
|
|
19
|
+
style: {
|
|
20
|
+
"--exhibit-grid-cols": Object.keys(cols).length + (rows ? 1 : 0)
|
|
21
|
+
},
|
|
22
|
+
tabIndex: 0,
|
|
23
|
+
children: [
|
|
24
|
+
rows && /* @__PURE__ */ jsx("div", {}),
|
|
25
|
+
Object.keys(cols).map((colLabel) => /* @__PURE__ */ jsx("div", { className: "exhibit-grid-col-label", children: colLabel }, colLabel)),
|
|
26
|
+
Object.entries(rows ?? { "": void 0 }).map(
|
|
27
|
+
([rowLabel, row]) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
28
|
+
rowLabel && /* @__PURE__ */ jsx("div", { className: "exhibit-grid-row-label", children: rowLabel }),
|
|
29
|
+
Object.entries(cols).map(([colLabel, col]) => /* @__PURE__ */ jsx("div", { className: "exhibit-grid-item", children: renderItem({ row, col }) }, colLabel))
|
|
30
|
+
] }, rowLabel)
|
|
31
|
+
)
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
function ExhibitSection({
|
|
37
|
+
title,
|
|
38
|
+
docsPage,
|
|
39
|
+
children
|
|
40
|
+
}) {
|
|
41
|
+
const docsUrl = useDocsUrl();
|
|
42
|
+
const headingId = title.toLowerCase().replace(/[^a-z0-9]/g, "-");
|
|
43
|
+
return /* @__PURE__ */ jsx(Stack, { asChild: true, children: /* @__PURE__ */ jsxs("section", { className: "exhibit-section", "aria-labelledby": headingId, children: [
|
|
44
|
+
/* @__PURE__ */ jsx(Stack, { asChild: true, direction: "row", gap: 4, alignItems: "center", children: /* @__PURE__ */ jsxs("header", { children: [
|
|
45
|
+
/* @__PURE__ */ jsx(Heading, { id: headingId, children: /* @__PURE__ */ jsx(
|
|
46
|
+
Link,
|
|
47
|
+
{
|
|
48
|
+
href: `#${headingId}`,
|
|
49
|
+
color: "neutral",
|
|
50
|
+
style: { color: "var(--o-ui-neutral-12)" },
|
|
51
|
+
children: title
|
|
52
|
+
}
|
|
53
|
+
) }),
|
|
54
|
+
/* @__PURE__ */ jsxs(
|
|
55
|
+
Link,
|
|
56
|
+
{
|
|
57
|
+
className: "exhibit-section-docs-link",
|
|
58
|
+
href: `${docsUrl}?path=/docs/${docsPage}--docs`,
|
|
59
|
+
external: true,
|
|
60
|
+
children: [
|
|
61
|
+
"View docs",
|
|
62
|
+
/* @__PURE__ */ jsxs(VisuallyHidden, { children: [
|
|
63
|
+
" of ",
|
|
64
|
+
title
|
|
65
|
+
] })
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
] }) }),
|
|
70
|
+
/* @__PURE__ */ jsx("div", { className: "exhibit-section-content", children })
|
|
71
|
+
] }) });
|
|
72
|
+
}
|
|
73
|
+
function AlertDialogSection() {
|
|
74
|
+
return /* @__PURE__ */ jsx(
|
|
75
|
+
ExhibitSection,
|
|
76
|
+
{
|
|
77
|
+
title: "Alert dialog",
|
|
78
|
+
docsPage: "ostack-ui-overlay-alert-dialog",
|
|
79
|
+
children: /* @__PURE__ */ jsx(
|
|
80
|
+
ExhibitGrid,
|
|
81
|
+
{
|
|
82
|
+
cols: {
|
|
83
|
+
Neutral: "neutral",
|
|
84
|
+
Primary: "primary",
|
|
85
|
+
Success: "success",
|
|
86
|
+
Danger: "danger",
|
|
87
|
+
Warning: "warning"
|
|
88
|
+
},
|
|
89
|
+
rows: {
|
|
90
|
+
Solid: "solid",
|
|
91
|
+
Subtle: "subtle",
|
|
92
|
+
Outlined: "outlined",
|
|
93
|
+
Ghost: "ghost"
|
|
94
|
+
},
|
|
95
|
+
renderItem: ({ col, row }) => /* @__PURE__ */ jsxs(AlertDialog, { children: [
|
|
96
|
+
/* @__PURE__ */ jsx(AlertDialogTrigger, { children: /* @__PURE__ */ jsx(Button, { variant: row, color: col, children: "Restore" }) }),
|
|
97
|
+
/* @__PURE__ */ jsxs(AlertDialogContent, { variant: row, color: col, children: [
|
|
98
|
+
/* @__PURE__ */ jsx(AlertDialogHeader, { children: /* @__PURE__ */ jsx(AlertDialogTitle, { children: "Restore previous version?" }) }),
|
|
99
|
+
/* @__PURE__ */ jsx(AlertDialogBody, { children: /* @__PURE__ */ jsx(AlertDialogDescription, { children: "This will overwrite your current draft with the version saved on January 12th. Current changes will be lost." }) }),
|
|
100
|
+
/* @__PURE__ */ jsxs(AlertDialogFooter, { children: [
|
|
101
|
+
/* @__PURE__ */ jsx(AlertDialogCancel, { children: /* @__PURE__ */ jsx(Button, { variant: "subtle", children: "Go back" }) }),
|
|
102
|
+
/* @__PURE__ */ jsx(AlertDialogAction, { children: /* @__PURE__ */ jsx(Button, { color: col, children: "Restore" }) })
|
|
103
|
+
] })
|
|
104
|
+
] })
|
|
105
|
+
] })
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
function AlertSection() {
|
|
112
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Alert", docsPage: "ostack-ui-feedback-alert", children: /* @__PURE__ */ jsx(
|
|
113
|
+
ExhibitGrid,
|
|
114
|
+
{
|
|
115
|
+
cols: {
|
|
116
|
+
Neutral: "neutral",
|
|
117
|
+
Info: "info",
|
|
118
|
+
Success: "success",
|
|
119
|
+
Danger: "danger",
|
|
120
|
+
Warning: "warning",
|
|
121
|
+
Title: "title",
|
|
122
|
+
Action: "action",
|
|
123
|
+
"Close button": "showCloseButton"
|
|
124
|
+
},
|
|
125
|
+
rows: {
|
|
126
|
+
Solid: "solid",
|
|
127
|
+
Subtle: "subtle",
|
|
128
|
+
Outlined: "outlined"
|
|
129
|
+
},
|
|
130
|
+
renderItem: ({ col, row }) => /* @__PURE__ */ jsxs(
|
|
131
|
+
Alert,
|
|
132
|
+
{
|
|
133
|
+
variant: row,
|
|
134
|
+
action: col === "action" && /* @__PURE__ */ jsx(Button, { color: "primary", children: "Accept" }),
|
|
135
|
+
severity: col === "title" || col === "action" || col === "showCloseButton" ? void 0 : col,
|
|
136
|
+
showCloseButton: col === "showCloseButton",
|
|
137
|
+
children: [
|
|
138
|
+
col === "title" && /* @__PURE__ */ jsx(AlertTitle, { children: "Notice" }),
|
|
139
|
+
"Terms may apply."
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
) });
|
|
145
|
+
}
|
|
146
|
+
function ButtonGroupSection() {
|
|
147
|
+
return /* @__PURE__ */ jsx(
|
|
148
|
+
ExhibitSection,
|
|
149
|
+
{
|
|
150
|
+
title: "Button group",
|
|
151
|
+
docsPage: "ostack-ui-layout-button-group",
|
|
152
|
+
children: /* @__PURE__ */ jsx(
|
|
153
|
+
ExhibitGrid,
|
|
154
|
+
{
|
|
155
|
+
cols: {
|
|
156
|
+
Neutral: "neutral",
|
|
157
|
+
Primary: "primary",
|
|
158
|
+
Success: "success",
|
|
159
|
+
Danger: "danger",
|
|
160
|
+
Warning: "warning"
|
|
161
|
+
},
|
|
162
|
+
rows: {
|
|
163
|
+
Solid: "solid",
|
|
164
|
+
Subtle: "subtle",
|
|
165
|
+
Outlined: "outlined",
|
|
166
|
+
Ghost: "ghost"
|
|
167
|
+
},
|
|
168
|
+
renderItem: ({ col, row }) => /* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
169
|
+
/* @__PURE__ */ jsx(Button, { icon: faFolderOpen, variant: row, color: col, children: "Load" }),
|
|
170
|
+
/* @__PURE__ */ jsx(Button, { icon: faSave, variant: row, color: col, children: "Save" }),
|
|
171
|
+
/* @__PURE__ */ jsx(
|
|
172
|
+
IconButton,
|
|
173
|
+
{
|
|
174
|
+
icon: faTrashCan,
|
|
175
|
+
label: "Delete",
|
|
176
|
+
variant: row,
|
|
177
|
+
color: col
|
|
178
|
+
}
|
|
179
|
+
)
|
|
180
|
+
] })
|
|
181
|
+
}
|
|
182
|
+
)
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
function ButtonSection() {
|
|
187
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Button", docsPage: "ostack-ui-forms-button", children: /* @__PURE__ */ jsx(
|
|
188
|
+
ExhibitGrid,
|
|
189
|
+
{
|
|
190
|
+
cols: {
|
|
191
|
+
Neutral: "neutral",
|
|
192
|
+
Primary: "primary",
|
|
193
|
+
Success: "success",
|
|
194
|
+
Danger: "danger",
|
|
195
|
+
Warning: "warning",
|
|
196
|
+
Disabled: "disabled",
|
|
197
|
+
Loading: "loading",
|
|
198
|
+
Keybinds: "keybinds",
|
|
199
|
+
Vertical: "vertical"
|
|
200
|
+
},
|
|
201
|
+
rows: {
|
|
202
|
+
Solid: "solid",
|
|
203
|
+
Subtle: "subtle",
|
|
204
|
+
Outlined: "outlined",
|
|
205
|
+
Ghost: "ghost"
|
|
206
|
+
},
|
|
207
|
+
renderItem: ({ col, row }) => /* @__PURE__ */ jsx(
|
|
208
|
+
Button,
|
|
209
|
+
{
|
|
210
|
+
icon: faBolt,
|
|
211
|
+
variant: row,
|
|
212
|
+
color: col === "disabled" || col === "loading" || col === "keybinds" || col === "vertical" ? void 0 : col,
|
|
213
|
+
disabled: col === "disabled",
|
|
214
|
+
loading: col === "loading",
|
|
215
|
+
loadingContent: col === "loading" ? "Zapping…" : void 0,
|
|
216
|
+
keybinds: col === "keybinds" ? "Alt+Shift+Z" : void 0,
|
|
217
|
+
vertical: col === "vertical",
|
|
218
|
+
children: "Zap"
|
|
219
|
+
}
|
|
220
|
+
)
|
|
221
|
+
}
|
|
222
|
+
) });
|
|
223
|
+
}
|
|
224
|
+
function CalendarSection() {
|
|
225
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Calendar", docsPage: "ostack-ui-data-display-calendar", children: /* @__PURE__ */ jsx(Calendar, {}) });
|
|
226
|
+
}
|
|
227
|
+
function CheckboxGroupSection() {
|
|
228
|
+
return /* @__PURE__ */ jsx(
|
|
229
|
+
ExhibitSection,
|
|
230
|
+
{
|
|
231
|
+
title: "Checkbox group",
|
|
232
|
+
docsPage: "ostack-ui-forms-checkbox-group",
|
|
233
|
+
children: /* @__PURE__ */ jsx(
|
|
234
|
+
ExhibitGrid,
|
|
235
|
+
{
|
|
236
|
+
cols: {
|
|
237
|
+
Basic: "",
|
|
238
|
+
"Helper text": "helperText",
|
|
239
|
+
Required: "required",
|
|
240
|
+
Disabled: "disabled",
|
|
241
|
+
"Read-only": "readOnly",
|
|
242
|
+
Loading: "loading",
|
|
243
|
+
Code: "code",
|
|
244
|
+
"All codes": "allCodes"
|
|
245
|
+
},
|
|
246
|
+
rows: {
|
|
247
|
+
"No status": void 0,
|
|
248
|
+
Valid: "valid",
|
|
249
|
+
Invalid: "invalid",
|
|
250
|
+
Warned: "warned"
|
|
251
|
+
},
|
|
252
|
+
renderItem: ({ col, row }) => /* @__PURE__ */ jsxs(Field, { children: [
|
|
253
|
+
/* @__PURE__ */ jsx(Label, { children: "Toppings" }),
|
|
254
|
+
/* @__PURE__ */ jsxs(
|
|
255
|
+
CheckboxGroup,
|
|
256
|
+
{
|
|
257
|
+
defaultValue: ["caramel"],
|
|
258
|
+
status: row,
|
|
259
|
+
required: col === "required",
|
|
260
|
+
disabled: col === "disabled",
|
|
261
|
+
readOnly: col === "readOnly",
|
|
262
|
+
loading: col === "loading",
|
|
263
|
+
code: col === "code" || col === "allCodes" ? "3.2" : void 0,
|
|
264
|
+
children: [
|
|
265
|
+
/* @__PURE__ */ jsx(
|
|
266
|
+
Checkbox,
|
|
267
|
+
{
|
|
268
|
+
value: "caramel",
|
|
269
|
+
code: col === "allCodes" ? "a" : void 0,
|
|
270
|
+
children: "Caramel"
|
|
271
|
+
}
|
|
272
|
+
),
|
|
273
|
+
/* @__PURE__ */ jsx(
|
|
274
|
+
Checkbox,
|
|
275
|
+
{
|
|
276
|
+
value: "chocolate",
|
|
277
|
+
code: col === "allCodes" ? "b" : void 0,
|
|
278
|
+
children: "Chocolate"
|
|
279
|
+
}
|
|
280
|
+
),
|
|
281
|
+
/* @__PURE__ */ jsx(
|
|
282
|
+
Checkbox,
|
|
283
|
+
{
|
|
284
|
+
value: "strawberry",
|
|
285
|
+
code: col === "allCodes" ? "c" : void 0,
|
|
286
|
+
children: "Strawberry"
|
|
287
|
+
}
|
|
288
|
+
)
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
),
|
|
292
|
+
row === "valid" && /* @__PURE__ */ jsx(Feedback, { type: "success", children: "Available." }),
|
|
293
|
+
row === "warned" && /* @__PURE__ */ jsx(Feedback, { type: "warning", children: "Maybe unavailable." }),
|
|
294
|
+
row === "invalid" && /* @__PURE__ */ jsx(Feedback, { children: "Unavailable." }),
|
|
295
|
+
col === "helperText" && /* @__PURE__ */ jsx(HelperText, { children: "Select all wanted." })
|
|
296
|
+
] })
|
|
297
|
+
}
|
|
298
|
+
)
|
|
299
|
+
}
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
function CheckboxSection() {
|
|
303
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Checkbox", docsPage: "ostack-ui-forms-checkbox", children: /* @__PURE__ */ jsx(
|
|
304
|
+
ExhibitGrid,
|
|
305
|
+
{
|
|
306
|
+
cols: {
|
|
307
|
+
Basic: "",
|
|
308
|
+
Indeterminate: "indeterminate",
|
|
309
|
+
"Helper text": "helperText",
|
|
310
|
+
Required: "required",
|
|
311
|
+
Disabled: "disabled",
|
|
312
|
+
"Read-only": "readOnly",
|
|
313
|
+
Loading: "loading",
|
|
314
|
+
Code: "code"
|
|
315
|
+
},
|
|
316
|
+
rows: {
|
|
317
|
+
"No status": void 0,
|
|
318
|
+
Valid: "valid",
|
|
319
|
+
Invalid: "invalid",
|
|
320
|
+
Warned: "warned"
|
|
321
|
+
},
|
|
322
|
+
renderItem: ({ col, row }) => /* @__PURE__ */ jsxs(Field, { children: [
|
|
323
|
+
/* @__PURE__ */ jsx(
|
|
324
|
+
Checkbox,
|
|
325
|
+
{
|
|
326
|
+
status: row,
|
|
327
|
+
defaultChecked: col === "indeterminate" ? "indeterminate" : true,
|
|
328
|
+
required: col === "required",
|
|
329
|
+
disabled: col === "disabled",
|
|
330
|
+
readOnly: col === "readOnly",
|
|
331
|
+
loading: col === "loading",
|
|
332
|
+
code: col === "code" ? "1.5" : void 0,
|
|
333
|
+
children: "I accept"
|
|
334
|
+
}
|
|
335
|
+
),
|
|
336
|
+
row === "valid" && /* @__PURE__ */ jsx(Feedback, { type: "success", children: "Accepted." }),
|
|
337
|
+
row === "warned" && /* @__PURE__ */ jsx(Feedback, { type: "warning", children: "Are you sure?" }),
|
|
338
|
+
row === "invalid" && /* @__PURE__ */ jsx(Feedback, { children: "Must accept." }),
|
|
339
|
+
col === "helperText" && /* @__PURE__ */ jsx(HelperText, { children: "Please indicate." })
|
|
340
|
+
] })
|
|
341
|
+
}
|
|
342
|
+
) });
|
|
343
|
+
}
|
|
344
|
+
function CodeSection() {
|
|
345
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Code", docsPage: "ostack-ui-typography-code", children: /* @__PURE__ */ jsx(
|
|
346
|
+
ExhibitGrid,
|
|
347
|
+
{
|
|
348
|
+
cols: {
|
|
349
|
+
Neutral: "neutral",
|
|
350
|
+
Primary: "primary",
|
|
351
|
+
Success: "success",
|
|
352
|
+
Danger: "danger",
|
|
353
|
+
Warning: "warning"
|
|
354
|
+
},
|
|
355
|
+
renderItem: ({ col }) => /* @__PURE__ */ jsx(Code, { color: col, children: "Math.sin(1)" })
|
|
356
|
+
}
|
|
357
|
+
) });
|
|
358
|
+
}
|
|
359
|
+
function CollapsibleSection() {
|
|
360
|
+
const spacing = useSpacing();
|
|
361
|
+
return /* @__PURE__ */ jsx(
|
|
362
|
+
ExhibitSection,
|
|
363
|
+
{
|
|
364
|
+
title: "Collapsible",
|
|
365
|
+
docsPage: "ostack-ui-disclosure-collapsible",
|
|
366
|
+
children: /* @__PURE__ */ jsxs(Collapsible, { children: [
|
|
367
|
+
/* @__PURE__ */ jsx(CollapsibleTrigger, { children: (open) => /* @__PURE__ */ jsxs(Button, { icon: open ? faCaretUp : faCaretDown, iconPlacement: "end", children: [
|
|
368
|
+
open ? "Hide" : "Show",
|
|
369
|
+
" quote"
|
|
370
|
+
] }) }),
|
|
371
|
+
/* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsxs(
|
|
372
|
+
"blockquote",
|
|
373
|
+
{
|
|
374
|
+
cite: "https://gutenberg.net.au/ebooks02/0201091h.html",
|
|
375
|
+
style: { marginTop: spacing(4) },
|
|
376
|
+
children: [
|
|
377
|
+
/* @__PURE__ */ jsx("p", { children: '"The sun had not yet risen. The sea was indistinguishable from the sky, except that the sea was slightly creased as if a cloth had wrinkles in it. Gradually as the sky whitened a dark line lay on the horizon dividing the sea from the sky and the grey cloth became barred with thick strokes moving, one after another, beneath the surface, following each other, pursuing each other, perpetually."' }),
|
|
378
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
379
|
+
"—Virginia Woolf, ",
|
|
380
|
+
/* @__PURE__ */ jsx("cite", { children: "The Waves" })
|
|
381
|
+
] })
|
|
382
|
+
]
|
|
383
|
+
}
|
|
384
|
+
) })
|
|
385
|
+
] })
|
|
386
|
+
}
|
|
387
|
+
);
|
|
388
|
+
}
|
|
389
|
+
function CommandMenuSection() {
|
|
390
|
+
const [open, setOpen] = useState(false);
|
|
391
|
+
const { cssVar } = useCssVars();
|
|
392
|
+
const keybind = "$mod+K";
|
|
393
|
+
useKeyboardShortcut(keybind, () => setOpen(true), { preventDefault: true });
|
|
394
|
+
const handleSelect = () => setOpen(false);
|
|
395
|
+
return /* @__PURE__ */ jsxs(
|
|
396
|
+
ExhibitSection,
|
|
397
|
+
{
|
|
398
|
+
title: "Command menu",
|
|
399
|
+
docsPage: "ostack-ui-overlay-command-menu",
|
|
400
|
+
children: [
|
|
401
|
+
/* @__PURE__ */ jsxs("span", { style: { color: cssVar("neutral-11") }, children: [
|
|
402
|
+
"Press ",
|
|
403
|
+
/* @__PURE__ */ jsx(Keybinds, { keybinds: keybind }),
|
|
404
|
+
" to open the command menu."
|
|
405
|
+
] }),
|
|
406
|
+
/* @__PURE__ */ jsx(CommandMenuDialog, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs(CommandMenu, { children: [
|
|
407
|
+
/* @__PURE__ */ jsxs(CommandMenuGroup, { label: "Actions", children: [
|
|
408
|
+
/* @__PURE__ */ jsx(CommandMenuItem, { onSelect: handleSelect, children: "Find" }),
|
|
409
|
+
/* @__PURE__ */ jsx(CommandMenuItem, { onSelect: handleSelect, children: "Replace" }),
|
|
410
|
+
/* @__PURE__ */ jsx(CommandMenuItem, { onSelect: handleSelect, children: "Analyse" }),
|
|
411
|
+
/* @__PURE__ */ jsx(CommandMenuItem, { onSelect: handleSelect, children: "Inspect" })
|
|
412
|
+
] }),
|
|
413
|
+
/* @__PURE__ */ jsxs(CommandMenuGroup, { label: "Languages", children: [
|
|
414
|
+
/* @__PURE__ */ jsx(CommandMenuItem, { onSelect: handleSelect, children: "C" }),
|
|
415
|
+
/* @__PURE__ */ jsx(CommandMenuItem, { onSelect: handleSelect, children: "C++" }),
|
|
416
|
+
/* @__PURE__ */ jsx(CommandMenuItem, { onSelect: handleSelect, children: "Java" }),
|
|
417
|
+
/* @__PURE__ */ jsx(CommandMenuItem, { onSelect: handleSelect, children: "JavaScript" }),
|
|
418
|
+
/* @__PURE__ */ jsx(CommandMenuItem, { onSelect: handleSelect, children: "Python" }),
|
|
419
|
+
/* @__PURE__ */ jsx(CommandMenuItem, { onSelect: handleSelect, children: "Rust" })
|
|
420
|
+
] })
|
|
421
|
+
] }) })
|
|
422
|
+
]
|
|
423
|
+
}
|
|
424
|
+
);
|
|
425
|
+
}
|
|
426
|
+
const ROWS$1 = [
|
|
427
|
+
{ id: 0, student: "Allyson Meyer", grade: 84.2 },
|
|
428
|
+
{ id: 1, student: "Tristan Hogan", grade: 71.5 },
|
|
429
|
+
{ id: 2, student: "Kathryn Duarte", grade: 92.8 },
|
|
430
|
+
{ id: 3, student: "Abdullah Flynn", grade: 58.4 },
|
|
431
|
+
{ id: 4, student: "Dorothy Davidson", grade: 76.1 },
|
|
432
|
+
{ id: 5, student: "Dante Hurst", grade: 89 },
|
|
433
|
+
{ id: 6, student: "Adalee Koch", grade: 94.3 },
|
|
434
|
+
{ id: 7, student: "Salvador Reeves", grade: 62.7 },
|
|
435
|
+
{ id: 8, student: "Lana Carr", grade: 81.9 },
|
|
436
|
+
{ id: 9, student: "Kash Shaffer", grade: 45.6 },
|
|
437
|
+
{ id: 10, student: "Alanna Bradley", grade: 88.3 },
|
|
438
|
+
{ id: 11, student: "Richard Barker", grade: 73.4 },
|
|
439
|
+
{ id: 12, student: "Remington Villalobos", grade: 90.1 },
|
|
440
|
+
{ id: 13, student: "Reuben Rivera", grade: 66.8 },
|
|
441
|
+
{ id: 14, student: "Lillian Page", grade: 95.5 },
|
|
442
|
+
{ id: 15, student: "Pablo Miranda", grade: 52.2 },
|
|
443
|
+
{ id: 16, student: "Amina McDowell", grade: 79.7 },
|
|
444
|
+
{ id: 17, student: "Lachlan Austin", grade: 83.1 },
|
|
445
|
+
{ id: 18, student: "Alivia Roberts", grade: 70.4 },
|
|
446
|
+
{ id: 19, student: "Josiah Medina", grade: 61.9 },
|
|
447
|
+
{ id: 20, student: "Elliana Delgado", grade: 87.6 },
|
|
448
|
+
{ id: 21, student: "Colt Martin", grade: 74.3 },
|
|
449
|
+
{ id: 22, student: "Mila Jenkins", grade: 98.2 },
|
|
450
|
+
{ id: 23, student: "Declan Byrd", grade: 55.9 },
|
|
451
|
+
{ id: 24, student: "Giselle Parsons", grade: 82 },
|
|
452
|
+
{ id: 25, student: "Lewis Wallace", grade: 69.1 },
|
|
453
|
+
{ id: 26, student: "Arianna Ahmed", grade: 91.4 },
|
|
454
|
+
{ id: 27, student: "Harry Willis", grade: 48.7 },
|
|
455
|
+
{ id: 28, student: "Alexa Griffin", grade: 77.8 },
|
|
456
|
+
{ id: 29, student: "Ayden Woods", grade: 63.5 },
|
|
457
|
+
{ id: 30, student: "Reese Allen", grade: 85.3 },
|
|
458
|
+
{ id: 31, student: "Carter Moore", grade: 90.7 },
|
|
459
|
+
{ id: 32, student: "Emily Spears", grade: 72.2 },
|
|
460
|
+
{ id: 33, student: "Ameer McKinney", grade: 59.9 },
|
|
461
|
+
{ id: 34, student: "Gwendolyn Sanford", grade: 93.6 },
|
|
462
|
+
{ id: 35, student: "Truett Rangel", grade: 68.4 },
|
|
463
|
+
{ id: 36, student: "Gloria Yoder", grade: 80.5 },
|
|
464
|
+
{ id: 37, student: "Johan Fleming", grade: 74.9 },
|
|
465
|
+
{ id: 38, student: "Fatima Gates", grade: 88.2 },
|
|
466
|
+
{ id: 39, student: "Ermias McPherson", grade: 51.3 },
|
|
467
|
+
{ id: 40, student: "Emmaline Ali", grade: 96.4 },
|
|
468
|
+
{ id: 41, student: "Arjun Wade", grade: 71.8 },
|
|
469
|
+
{ id: 42, student: "Evie Yates", grade: 84.7 },
|
|
470
|
+
{ id: 43, student: "Braylon Golden", grade: 67.2 },
|
|
471
|
+
{ id: 44, student: "Giuliana Paul", grade: 92.1 },
|
|
472
|
+
{ id: 45, student: "Noel Wilkerson", grade: 54.5 },
|
|
473
|
+
{ id: 46, student: "Janiyah Floyd", grade: 78.9 },
|
|
474
|
+
{ id: 47, student: "Pierce Farmer", grade: 86.4 },
|
|
475
|
+
{ id: 48, student: "Madelynn Duarte", grade: 73.6 },
|
|
476
|
+
{ id: 49, student: "Abdullah Massey", grade: 60.2 },
|
|
477
|
+
{ id: 50, student: "Clementine Clay", grade: 99.1 },
|
|
478
|
+
{ id: 51, student: "Yosef Blair", grade: 65.8 },
|
|
479
|
+
{ id: 52, student: "Frances Truong", grade: 82.5 },
|
|
480
|
+
{ id: 53, student: "Ayan Davis", grade: 75.3 },
|
|
481
|
+
{ id: 54, student: "Mia Roach", grade: 90.9 },
|
|
482
|
+
{ id: 55, student: "Caspian Stein", grade: 57.1 },
|
|
483
|
+
{ id: 56, student: "Leilany Villegas", grade: 81.4 },
|
|
484
|
+
{ id: 57, student: "Clyde Corona", grade: 64.6 },
|
|
485
|
+
{ id: 58, student: "Marianna Fletcher", grade: 88.7 },
|
|
486
|
+
{ id: 59, student: "Jay McCarty", grade: 72.9 },
|
|
487
|
+
{ id: 60, student: "Halo Rocha", grade: 85 },
|
|
488
|
+
{ id: 61, student: "Onyx Davidson", grade: 49.2 },
|
|
489
|
+
{ id: 62, student: "Jayla Whitehead", grade: 77.4 },
|
|
490
|
+
{ id: 63, student: "Zayd Harvey", grade: 93.2 },
|
|
491
|
+
{ id: 64, student: "Nicole Hubbard", grade: 68.7 },
|
|
492
|
+
{ id: 65, student: "Forrest Bartlett", grade: 80.1 },
|
|
493
|
+
{ id: 66, student: "Aubrielle Gallegos", grade: 95.8 },
|
|
494
|
+
{ id: 67, student: "Jonas Mosley", grade: 56.4 },
|
|
495
|
+
{ id: 68, student: "Zaniyah Lee", grade: 82.3 },
|
|
496
|
+
{ id: 69, student: "Jack Giles", grade: 71 },
|
|
497
|
+
{ id: 70, student: "Bailee Warren", grade: 89.5 },
|
|
498
|
+
{ id: 71, student: "Abel Cruz", grade: 63.8 },
|
|
499
|
+
{ id: 72, student: "Claire Steele", grade: 91.2 },
|
|
500
|
+
{ id: 73, student: "Elian Berg", grade: 74.5 },
|
|
501
|
+
{ id: 74, student: "Emmalyn McClain", grade: 86.9 },
|
|
502
|
+
{ id: 75, student: "Mitchell Clayton", grade: 53.7 },
|
|
503
|
+
{ id: 76, student: "Saige Graves", grade: 78.2 },
|
|
504
|
+
{ id: 77, student: "Cesar Kane", grade: 83.4 },
|
|
505
|
+
{ id: 78, student: "Ellianna Ortega", grade: 97 },
|
|
506
|
+
{ id: 79, student: "Kobe Wallace", grade: 33.5 },
|
|
507
|
+
{ id: 80, student: "Arianna Dorsey", grade: 84.8 },
|
|
508
|
+
{ id: 81, student: "Enoch Elliott", grade: 76.3 },
|
|
509
|
+
{ id: 82, student: "Noelle Estes", grade: 90.4 },
|
|
510
|
+
{ id: 83, student: "Hakeem Andrews", grade: 58.1 },
|
|
511
|
+
{ id: 84, student: "Payton Phelps", grade: 82.6 },
|
|
512
|
+
{ id: 85, student: "Hamza Anthony", grade: 69.9 },
|
|
513
|
+
{ id: 86, student: "Macy Horton", grade: 87.2 },
|
|
514
|
+
{ id: 87, student: "Garrett Meyer", grade: 75.8 },
|
|
515
|
+
{ id: 88, student: "Sara McClain", grade: 94.1 },
|
|
516
|
+
{ id: 89, student: "Mitchell Magana", grade: 52.9 },
|
|
517
|
+
{ id: 90, student: "Amaris Foster", grade: 80.3 },
|
|
518
|
+
{ id: 91, student: "Kayden McGee", grade: 66.4 },
|
|
519
|
+
{ id: 92, student: "Kayleigh Bean", grade: 91.7 },
|
|
520
|
+
{ id: 93, student: "Mccoy Dunlap", grade: 73.1 },
|
|
521
|
+
{ id: 94, student: "Iliana Ochoa", grade: 85.5 },
|
|
522
|
+
{ id: 95, student: "Winston Hall", grade: 47.8 },
|
|
523
|
+
{ id: 96, student: "Leah David", grade: 79.2 },
|
|
524
|
+
{ id: 97, student: "Alonso Ballard", grade: 88.9 },
|
|
525
|
+
{ id: 98, student: "Alejandra Bass", grade: 62.1 },
|
|
526
|
+
{ id: 99, student: "Landen Santana", grade: 95.2 },
|
|
527
|
+
{ id: 100, student: "Myra Knight", grade: 70.8 },
|
|
528
|
+
{ id: 101, student: "Beckett Gilmore", grade: 83.7 },
|
|
529
|
+
{ id: 102, student: "Chanel Rosas", grade: 31.4 },
|
|
530
|
+
{ id: 103, student: "Remi Wade", grade: 92.6 },
|
|
531
|
+
{ id: 104, student: "Evie Church", grade: 68.2 },
|
|
532
|
+
{ id: 105, student: "Terrance Luna", grade: 81.1 },
|
|
533
|
+
{ id: 106, student: "Journey Alfaro", grade: 77.5 },
|
|
534
|
+
{ id: 107, student: "Xzavier Colon", grade: 89.3 },
|
|
535
|
+
{ id: 108, student: "Remy Curry", grade: 64.9 },
|
|
536
|
+
{ id: 109, student: "Briggs Hale", grade: 96.7 },
|
|
537
|
+
{ id: 110, student: "Brinley Phillips", grade: 59.3 },
|
|
538
|
+
{ id: 111, student: "Andrew Huynh", grade: 82.4 },
|
|
539
|
+
{ id: 112, student: "Oaklee Gross", grade: 74.1 },
|
|
540
|
+
{ id: 113, student: "Quinn Rosales", grade: 90.8 },
|
|
541
|
+
{ id: 114, student: "Kinley Bartlett", grade: 61.2 },
|
|
542
|
+
{ id: 115, student: "Kace Pineda", grade: 85.9 },
|
|
543
|
+
{ id: 116, student: "Nola Maynard", grade: 27.6 },
|
|
544
|
+
{ id: 117, student: "Landry Rowland", grade: 93.4 },
|
|
545
|
+
{ id: 118, student: "Harleigh Camacho", grade: 50.5 },
|
|
546
|
+
{ id: 119, student: "Tatum Lynn", grade: 78.7 },
|
|
547
|
+
{ id: 120, student: "Samira Nelson", grade: 86.2 },
|
|
548
|
+
{ id: 121, student: "Dylan Giles", grade: 67.5 },
|
|
549
|
+
{ id: 122, student: "Bailee Hendricks", grade: 94.8 },
|
|
550
|
+
{ id: 123, student: "Dash Carr", grade: 71.3 },
|
|
551
|
+
{ id: 124, student: "Rowan Acosta", grade: 44 },
|
|
552
|
+
{ id: 125, student: "Jensen Santana", grade: 56.7 },
|
|
553
|
+
{ id: 126, student: "Myra Christensen", grade: 91.9 },
|
|
554
|
+
{ id: 127, student: "Gregory Vu", grade: 79.4 },
|
|
555
|
+
{ id: 128, student: "Kimora Delarosa", grade: 88.5 },
|
|
556
|
+
{ id: 129, student: "Osiris Padilla", grade: 28.2 }
|
|
557
|
+
];
|
|
558
|
+
function DataTableSection() {
|
|
559
|
+
return /* @__PURE__ */ jsx(
|
|
560
|
+
ExhibitSection,
|
|
561
|
+
{
|
|
562
|
+
title: "Data table",
|
|
563
|
+
docsPage: "ostack-ui-data-data-display-data-table",
|
|
564
|
+
children: /* @__PURE__ */ jsx(
|
|
565
|
+
ExhibitGrid,
|
|
566
|
+
{
|
|
567
|
+
cols: {
|
|
568
|
+
Default: "default",
|
|
569
|
+
Control: "control",
|
|
570
|
+
Scrolled: "scrolled",
|
|
571
|
+
Selectable: "showSelectionColumn"
|
|
572
|
+
},
|
|
573
|
+
renderItem: ({ col }) => /* @__PURE__ */ jsx(Field, { style: { width: 450 }, children: /* @__PURE__ */ jsxs(
|
|
574
|
+
DataTable,
|
|
575
|
+
{
|
|
576
|
+
displayMode: col === "scrolled" ? col : void 0,
|
|
577
|
+
showSelectionColumn: col === "showSelectionColumn",
|
|
578
|
+
rowKey: "id",
|
|
579
|
+
defaultLimit: 5,
|
|
580
|
+
columns: {
|
|
581
|
+
student: {
|
|
582
|
+
label: "Student",
|
|
583
|
+
header: true,
|
|
584
|
+
sortable: true,
|
|
585
|
+
filterable: true
|
|
586
|
+
},
|
|
587
|
+
grade: {
|
|
588
|
+
label: "Grade",
|
|
589
|
+
align: "right",
|
|
590
|
+
sortable: true,
|
|
591
|
+
filterable: true,
|
|
592
|
+
format: ({ value }) => value.toFixed(1)
|
|
593
|
+
}
|
|
594
|
+
},
|
|
595
|
+
rows: ROWS$1,
|
|
596
|
+
children: [
|
|
597
|
+
/* @__PURE__ */ jsx(Label, { children: "Exam grades" }),
|
|
598
|
+
/* @__PURE__ */ jsx(DataTableFilter, {}),
|
|
599
|
+
/* @__PURE__ */ jsx(
|
|
600
|
+
DataTableContent,
|
|
601
|
+
{
|
|
602
|
+
variant: col === "default" || col === "control" ? col : void 0
|
|
603
|
+
}
|
|
604
|
+
),
|
|
605
|
+
/* @__PURE__ */ jsx(DataTableRowsPerPage, { limitOptions: [5, 10, 25, 50, 100] }),
|
|
606
|
+
/* @__PURE__ */ jsx(DataTablePagination, {})
|
|
607
|
+
]
|
|
608
|
+
}
|
|
609
|
+
) })
|
|
610
|
+
}
|
|
611
|
+
)
|
|
612
|
+
}
|
|
613
|
+
);
|
|
614
|
+
}
|
|
615
|
+
function DateInputSection() {
|
|
616
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Date input", docsPage: "ostack-ui-forms-date-input", children: /* @__PURE__ */ jsx(
|
|
617
|
+
ExhibitGrid,
|
|
618
|
+
{
|
|
619
|
+
cols: {
|
|
620
|
+
Basic: "",
|
|
621
|
+
"Helper text": "helperText",
|
|
622
|
+
Required: "required",
|
|
623
|
+
Disabled: "disabled",
|
|
624
|
+
"Read-only": "readOnly",
|
|
625
|
+
Loading: "loading",
|
|
626
|
+
Code: "code"
|
|
627
|
+
},
|
|
628
|
+
rows: {
|
|
629
|
+
"No status": void 0,
|
|
630
|
+
Valid: "valid",
|
|
631
|
+
Invalid: "invalid",
|
|
632
|
+
Warned: "warned"
|
|
633
|
+
},
|
|
634
|
+
renderItem: ({ col, row }) => /* @__PURE__ */ jsxs(Field, { children: [
|
|
635
|
+
/* @__PURE__ */ jsx(Label, { children: "Birthday" }),
|
|
636
|
+
/* @__PURE__ */ jsx(
|
|
637
|
+
DateInput,
|
|
638
|
+
{
|
|
639
|
+
containerProps: { style: { width: 145 } },
|
|
640
|
+
defaultValue: new Date(1990, 3, 10),
|
|
641
|
+
status: row,
|
|
642
|
+
required: col === "required",
|
|
643
|
+
disabled: col === "disabled",
|
|
644
|
+
readOnly: col === "readOnly",
|
|
645
|
+
loading: col === "loading",
|
|
646
|
+
code: col === "code" ? "7.2" : void 0
|
|
647
|
+
}
|
|
648
|
+
),
|
|
649
|
+
row === "valid" && /* @__PURE__ */ jsx(Feedback, { type: "success", children: "Confirmed." }),
|
|
650
|
+
row === "warned" && /* @__PURE__ */ jsx(Feedback, { type: "warning", children: "Awaiting confirmation…" }),
|
|
651
|
+
row === "invalid" && /* @__PURE__ */ jsx(Feedback, { children: "Unable to confirm." }),
|
|
652
|
+
col === "helperText" && /* @__PURE__ */ jsx(HelperText, { children: "For legal purposes." })
|
|
653
|
+
] })
|
|
654
|
+
}
|
|
655
|
+
) });
|
|
656
|
+
}
|
|
657
|
+
function DateRangeInputSection() {
|
|
658
|
+
return /* @__PURE__ */ jsx(
|
|
659
|
+
ExhibitSection,
|
|
660
|
+
{
|
|
661
|
+
title: "Date-range input",
|
|
662
|
+
docsPage: "ostack-ui-forms-date-range-input",
|
|
663
|
+
children: /* @__PURE__ */ jsx(
|
|
664
|
+
ExhibitGrid,
|
|
665
|
+
{
|
|
666
|
+
cols: {
|
|
667
|
+
Basic: "",
|
|
668
|
+
"Helper text": "helperText",
|
|
669
|
+
Required: "required",
|
|
670
|
+
Disabled: "disabled",
|
|
671
|
+
"Read-only": "readOnly",
|
|
672
|
+
Loading: "loading",
|
|
673
|
+
Code: "code"
|
|
674
|
+
},
|
|
675
|
+
rows: {
|
|
676
|
+
"No status": void 0,
|
|
677
|
+
Valid: "valid",
|
|
678
|
+
Invalid: "invalid",
|
|
679
|
+
Warned: "warned"
|
|
680
|
+
},
|
|
681
|
+
renderItem: ({ col, row }) => /* @__PURE__ */ jsxs(Field, { children: [
|
|
682
|
+
/* @__PURE__ */ jsx(Label, { children: "Time off" }),
|
|
683
|
+
/* @__PURE__ */ jsx(
|
|
684
|
+
DateRangeInput,
|
|
685
|
+
{
|
|
686
|
+
popoverAnchorProps: { style: { width: 280 } },
|
|
687
|
+
defaultValue: {
|
|
688
|
+
start: new Date(2026, 2, 10),
|
|
689
|
+
end: new Date(2026, 2, 24)
|
|
690
|
+
},
|
|
691
|
+
status: row,
|
|
692
|
+
required: col === "required",
|
|
693
|
+
disabled: col === "disabled",
|
|
694
|
+
readOnly: col === "readOnly",
|
|
695
|
+
loading: col === "loading",
|
|
696
|
+
code: col === "code" ? "1.6" : void 0
|
|
697
|
+
}
|
|
698
|
+
),
|
|
699
|
+
row === "valid" && /* @__PURE__ */ jsx(Feedback, { type: "success", children: "Accepted." }),
|
|
700
|
+
row === "warned" && /* @__PURE__ */ jsx(Feedback, { type: "warning", children: "Processing…" }),
|
|
701
|
+
row === "invalid" && /* @__PURE__ */ jsx(Feedback, { children: "Not accepted." }),
|
|
702
|
+
col === "helperText" && /* @__PURE__ */ jsx(HelperText, { children: "Reserve your paid time off." })
|
|
703
|
+
] })
|
|
704
|
+
}
|
|
705
|
+
)
|
|
706
|
+
}
|
|
707
|
+
);
|
|
708
|
+
}
|
|
709
|
+
function DialogSection() {
|
|
710
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Dialog", docsPage: "ostack-ui-overlay-dialog", children: /* @__PURE__ */ jsx(
|
|
711
|
+
ExhibitGrid,
|
|
712
|
+
{
|
|
713
|
+
cols: {
|
|
714
|
+
Neutral: "neutral",
|
|
715
|
+
Primary: "primary",
|
|
716
|
+
Success: "success",
|
|
717
|
+
Danger: "danger",
|
|
718
|
+
Warning: "warning"
|
|
719
|
+
},
|
|
720
|
+
rows: {
|
|
721
|
+
Solid: "solid",
|
|
722
|
+
Subtle: "subtle",
|
|
723
|
+
Outlined: "outlined",
|
|
724
|
+
Ghost: "ghost"
|
|
725
|
+
},
|
|
726
|
+
renderItem: ({ col, row }) => /* @__PURE__ */ jsxs(Dialog, { children: [
|
|
727
|
+
/* @__PURE__ */ jsx(DialogTrigger, { children: /* @__PURE__ */ jsx(Button, { variant: row, color: col, children: "Edit" }) }),
|
|
728
|
+
/* @__PURE__ */ jsx(DialogContent, { variant: row, color: col, asChild: true, children: /* @__PURE__ */ jsxs("form", { children: [
|
|
729
|
+
/* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: "Edit user information" }) }),
|
|
730
|
+
/* @__PURE__ */ jsxs(DialogBody, { children: [
|
|
731
|
+
/* @__PURE__ */ jsx(DialogDescription, { children: "Edit user information below, changes are saved automatically." }),
|
|
732
|
+
/* @__PURE__ */ jsxs(Stack, { children: [
|
|
733
|
+
/* @__PURE__ */ jsxs(Field, { children: [
|
|
734
|
+
/* @__PURE__ */ jsx(Label, { children: "Name" }),
|
|
735
|
+
/* @__PURE__ */ jsx(Input, { defaultValue: "Charles McClain" })
|
|
736
|
+
] }),
|
|
737
|
+
/* @__PURE__ */ jsxs(Field, { children: [
|
|
738
|
+
/* @__PURE__ */ jsx(Label, { children: "Date of birth" }),
|
|
739
|
+
/* @__PURE__ */ jsx(DateInput, { defaultValue: new Date(1993, 4, 4) })
|
|
740
|
+
] })
|
|
741
|
+
] })
|
|
742
|
+
] }),
|
|
743
|
+
/* @__PURE__ */ jsx(DialogFooter, { children: /* @__PURE__ */ jsx(DialogClose, { children: /* @__PURE__ */ jsx(Button, { color: col, children: "Close" }) }) })
|
|
744
|
+
] }) })
|
|
745
|
+
] })
|
|
746
|
+
}
|
|
747
|
+
) });
|
|
748
|
+
}
|
|
749
|
+
var faBluetooth = {
|
|
750
|
+
prefix: "fab",
|
|
751
|
+
iconName: "bluetooth",
|
|
752
|
+
icon: [384, 512, [], "f293", "M260.6 171.1l-42.9 42.9-.3-86 43.2 43.1zM217.4 390.9l43.1-43.1-42.9-42.9-.2 86zM384 259.4C384 465 312.1 512 198.9 512S0 465 0 259.4 83.4 0 196.6 0 384 53.9 384 259.4zm-158.5 0l79.4-88.6-125.1-134.3 0 176.9-73.8-73.8-27 26.9 92.7 93-92.7 93 26.9 26.9 73.8-73.8 2.3 170 127.4-127.5-83.9-88.7z"]
|
|
753
|
+
};
|
|
754
|
+
var faReact = {
|
|
755
|
+
prefix: "fab",
|
|
756
|
+
iconName: "react",
|
|
757
|
+
icon: [512, 512, [], "f41b", "M418.2 177.2c-5.4-1.8-10.8-3.5-16.2-5.1 .9-3.7 1.7-7.4 2.5-11.1 12.3-59.6 4.2-107.5-23.1-123.3-26.3-15.1-69.2 .6-112.6 38.4-4.3 3.7-8.5 7.6-12.5 11.5-2.7-2.6-5.5-5.2-8.3-7.7-45.5-40.4-91.1-57.4-118.4-41.5-26.2 15.2-34 60.3-23 116.7 1.1 5.6 2.3 11.1 3.7 16.7-6.4 1.8-12.7 3.8-18.6 5.9-53.4 18.5-91.7 47.7-91.7 77.9 0 31.2 40.8 62.5 96.3 81.5 4.5 1.5 9 3 13.6 4.3-1.5 6-2.8 11.9-4 18-10.5 55.5-2.3 99.5 23.9 114.6 27 15.6 72.4-.4 116.6-39.1 3.5-3.1 7-6.3 10.5-9.7 4.4 4.3 9 8.4 13.6 12.4 42.8 36.8 85.1 51.7 111.2 36.6 27-15.6 35.8-62.9 24.4-120.5-.9-4.4-1.9-8.9-3-13.5 3.2-.9 6.3-1.9 9.4-2.9 57.7-19.1 99.5-50 99.5-81.7 0-30.3-39.4-59.7-93.8-78.4zM282.9 92.3c37.2-32.4 71.9-45.1 87.7-36 16.9 9.7 23.4 48.9 12.8 100.4-.7 3.4-1.4 6.7-2.3 10-22.2-5-44.7-8.6-67.3-10.6-13-18.6-27.2-36.4-42.6-53.1 3.9-3.7 7.7-7.2 11.7-10.7zM167.2 307.5c5.1 8.7 10.3 17.4 15.8 25.9-15.6-1.7-31.1-4.2-46.4-7.5 4.4-14.4 9.9-29.3 16.3-44.5 4.6 8.8 9.3 17.5 14.3 26.1zM136.9 187.2c14.4-3.2 29.7-5.8 45.6-7.8-5.3 8.3-10.5 16.8-15.4 25.4-4.9 8.5-9.7 17.2-14.2 26-6.3-14.9-11.6-29.5-16-43.6zm27.4 68.9c6.6-13.8 13.8-27.3 21.4-40.6s15.8-26.2 24.4-38.9c15-1.1 30.3-1.7 45.9-1.7s31 .6 45.9 1.7c8.5 12.6 16.6 25.5 24.3 38.7s14.9 26.7 21.7 40.4c-6.7 13.8-13.9 27.4-21.6 40.8-7.6 13.3-15.7 26.2-24.2 39-14.9 1.1-30.4 1.6-46.1 1.6s-30.9-.5-45.6-1.4c-8.7-12.7-16.9-25.7-24.6-39s-14.8-26.8-21.5-40.6zm180.6 51.2c5.1-8.8 9.9-17.7 14.6-26.7 6.4 14.5 12 29.2 16.9 44.3-15.5 3.5-31.2 6.2-47 8 5.4-8.4 10.5-17 15.5-25.6zm14.4-76.5c-4.7-8.8-9.5-17.6-14.5-26.2-4.9-8.5-10-16.9-15.3-25.2 16.1 2 31.5 4.7 45.9 8-4.6 14.8-10 29.2-16.1 43.4zM256.2 118.3c10.5 11.4 20.4 23.4 29.6 35.8-19.8-.9-39.7-.9-59.5 0 9.8-12.9 19.9-24.9 29.9-35.8zM140.2 57c16.8-9.8 54.1 4.2 93.4 39 2.5 2.2 5 4.6 7.6 7-15.5 16.7-29.8 34.5-42.9 53.1-22.6 2-45 5.5-67.2 10.4-1.3-5.1-2.4-10.3-3.5-15.5-9.4-48.4-3.2-84.9 12.6-94zM115.7 320.6c-4.2-1.2-8.3-2.5-12.4-3.9-21.3-6.7-45.5-17.3-63-31.2-10.1-7-16.9-17.8-18.8-29.9 0-18.3 31.6-41.7 77.2-57.6 5.7-2 11.5-3.8 17.3-5.5 6.8 21.7 15 43 24.5 63.6-9.6 20.9-17.9 42.5-24.8 64.5zm116.6 98c-16.5 15.1-35.6 27.1-56.4 35.3-11.1 5.3-23.9 5.8-35.3 1.3-15.9-9.2-22.5-44.5-13.5-92 1.1-5.6 2.3-11.2 3.7-16.7 22.4 4.8 45 8.1 67.9 9.8 13.2 18.7 27.7 36.6 43.2 53.4-3.2 3.1-6.4 6.1-9.6 8.9zm24.5-24.3c-10.2-11-20.4-23.2-30.3-36.3 9.6 .4 19.5 .6 29.5 .6 10.3 0 20.4-.2 30.4-.7-9.2 12.7-19.1 24.8-29.6 36.4zm130.7 30c-.9 12.2-6.9 23.6-16.5 31.3-15.9 9.2-49.8-2.8-86.4-34.2-4.2-3.6-8.4-7.5-12.7-11.5 15.3-16.9 29.4-34.8 42.2-53.6 22.9-1.9 45.7-5.4 68.2-10.5 1 4.1 1.9 8.2 2.7 12.2 4.9 21.6 5.7 44.1 2.5 66.3zm18.2-107.5c-2.8 .9-5.6 1.8-8.5 2.6-7-21.8-15.6-43.1-25.5-63.8 9.6-20.4 17.7-41.4 24.5-62.9 5.2 1.5 10.2 3.1 15 4.7 46.6 16 79.3 39.8 79.3 58 0 19.6-34.9 44.9-84.8 61.4zM256 301.8a45.8 45.8 0 1 0 0-91.6 45.8 45.8 0 1 0 0 91.6z"]
|
|
758
|
+
};
|
|
759
|
+
var faWikipediaW = {
|
|
760
|
+
prefix: "fab",
|
|
761
|
+
iconName: "wikipedia-w",
|
|
762
|
+
icon: [640, 512, [], "f266", "M640 51.2l-.3 12.2c-28.1 .8-45 15.8-55.8 40.3-25 57.8-103.3 240-155.3 358.6l-13.6 0-81.9-193.1c-32.5 63.6-68.3 130-99.2 193.1-.3 .3-15 0-15-.3-46.9-109.7-96.1-218.6-143.1-328.6-11.4-26.7-49.4-70-75.6-69.7 0-3.1-.3-10-.3-14.2l161.9 0 0 13.9c-19.2 1.1-52.8 13.3-43.3 34.2 21.9 49.7 103.6 240.3 125.6 288.6 15-29.7 57.8-109.2 75.3-142.8-13.9-28.3-58.6-133.9-72.8-160-9.7-17.8-36.1-19.4-55.8-19.7l0-13.9 142.5 .3 0 13.1c-19.4 .6-38.1 7.8-29.4 26.1 18.9 40 30.6 68.1 48.1 104.7 5.6-10.8 34.7-69.4 48.1-100.8 8.9-20.6-3.9-28.6-38.6-29.4 .3-3.6 0-10.3 .3-13.6 44.4-.3 111.1-.3 123.1-.6l0 13.6C462.4 64 439.1 76 426.8 94.9L367.6 217.7c6.4 16.1 63.3 142.8 69.2 156.7L559.2 91.8c-8.6-23.1-36.4-28.1-47.2-28.3l0-13.9 127.8 1.1 .2 .5z"]
|
|
763
|
+
};
|
|
764
|
+
function DropdownMenuSection() {
|
|
765
|
+
return /* @__PURE__ */ jsx(
|
|
766
|
+
ExhibitSection,
|
|
767
|
+
{
|
|
768
|
+
title: "Dropdown menu",
|
|
769
|
+
docsPage: "ostack-ui-overlay-dropdown-menu",
|
|
770
|
+
children: /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
771
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { children: /* @__PURE__ */ jsx(Button, { icon: faGear, children: "Settings" }) }),
|
|
772
|
+
/* @__PURE__ */ jsxs(DropdownMenuContent, { style: { minWidth: 200 }, children: [
|
|
773
|
+
/* @__PURE__ */ jsxs(DropdownMenuGroup, { label: "Connectivity", children: [
|
|
774
|
+
/* @__PURE__ */ jsx(DropdownMenuItem, { icon: faWifi, children: "Wi-Fi" }),
|
|
775
|
+
/* @__PURE__ */ jsx(DropdownMenuItem, { icon: faNetworkWired, children: "Network" }),
|
|
776
|
+
/* @__PURE__ */ jsx(DropdownMenuItem, { icon: faBluetooth, children: "Bluetooth" })
|
|
777
|
+
] }),
|
|
778
|
+
/* @__PURE__ */ jsxs(DropdownMenuGroup, { label: "Devices", children: [
|
|
779
|
+
/* @__PURE__ */ jsx(DropdownMenuItem, { icon: faDisplay, children: "Displays" }),
|
|
780
|
+
/* @__PURE__ */ jsx(DropdownMenuItem, { icon: faVolumeHigh, children: "Sound" }),
|
|
781
|
+
/* @__PURE__ */ jsx(DropdownMenuItem, { icon: faKeyboard, children: "Input" }),
|
|
782
|
+
/* @__PURE__ */ jsx(DropdownMenuItem, { icon: faPrint, children: "Printers" })
|
|
783
|
+
] }),
|
|
784
|
+
/* @__PURE__ */ jsxs(DropdownMenuRadioGroup, { label: "Language", value: "en", children: [
|
|
785
|
+
/* @__PURE__ */ jsx(DropdownMenuRadioItem, { value: "en", children: "English" }),
|
|
786
|
+
/* @__PURE__ */ jsx(DropdownMenuRadioItem, { value: "pt", children: "Portuguese" }),
|
|
787
|
+
/* @__PURE__ */ jsx(DropdownMenuRadioItem, { value: "es", disabled: true, children: "Spanish" })
|
|
788
|
+
] }),
|
|
789
|
+
/* @__PURE__ */ jsxs(DropdownMenuGroup, { label: "Notifications", children: [
|
|
790
|
+
/* @__PURE__ */ jsx(DropdownMenuCheckboxItem, { children: "Calendar" }),
|
|
791
|
+
/* @__PURE__ */ jsx(DropdownMenuCheckboxItem, { checked: true, children: "Weather" })
|
|
792
|
+
] }),
|
|
793
|
+
/* @__PURE__ */ jsx(DropdownMenuGroup, { children: /* @__PURE__ */ jsxs(DropdownMenuSub, { children: [
|
|
794
|
+
/* @__PURE__ */ jsx(DropdownMenuSubTrigger, { children: "System" }),
|
|
795
|
+
/* @__PURE__ */ jsxs(DropdownMenuSubContent, { children: [
|
|
796
|
+
/* @__PURE__ */ jsxs(DropdownMenuGroup, { children: [
|
|
797
|
+
/* @__PURE__ */ jsx(DropdownMenuItem, { icon: faClock, children: "Date & Time" }),
|
|
798
|
+
/* @__PURE__ */ jsx(DropdownMenuItem, { icon: faUser, children: "Users" })
|
|
799
|
+
] }),
|
|
800
|
+
/* @__PURE__ */ jsx(DropdownMenuGroup, { children: /* @__PURE__ */ jsx(DropdownMenuItem, { icon: faCircleXmark, color: "danger", children: "Factory reset" }) })
|
|
801
|
+
] })
|
|
802
|
+
] }) })
|
|
803
|
+
] })
|
|
804
|
+
] })
|
|
805
|
+
}
|
|
806
|
+
);
|
|
807
|
+
}
|
|
808
|
+
function IconButtonSection() {
|
|
809
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Icon button", docsPage: "ostack-ui-forms-icon-button", children: /* @__PURE__ */ jsx(
|
|
810
|
+
ExhibitGrid,
|
|
811
|
+
{
|
|
812
|
+
cols: {
|
|
813
|
+
Neutral: "neutral",
|
|
814
|
+
Primary: "primary",
|
|
815
|
+
Success: "success",
|
|
816
|
+
Danger: "danger",
|
|
817
|
+
Warning: "warning",
|
|
818
|
+
Disabled: "disabled",
|
|
819
|
+
Loading: "loading",
|
|
820
|
+
Keybinds: "keybinds"
|
|
821
|
+
},
|
|
822
|
+
rows: {
|
|
823
|
+
Solid: "solid",
|
|
824
|
+
Subtle: "subtle",
|
|
825
|
+
Outlined: "outlined",
|
|
826
|
+
Ghost: "ghost"
|
|
827
|
+
},
|
|
828
|
+
renderItem: ({ col, row }) => /* @__PURE__ */ jsx(
|
|
829
|
+
IconButton,
|
|
830
|
+
{
|
|
831
|
+
label: "Bloom",
|
|
832
|
+
icon: faSeedling,
|
|
833
|
+
variant: row,
|
|
834
|
+
color: col === "disabled" || col === "loading" || col === "keybinds" ? void 0 : col,
|
|
835
|
+
disabled: col === "disabled",
|
|
836
|
+
loading: col === "loading",
|
|
837
|
+
loadingLabel: col === "loading" ? "Blooming…" : void 0,
|
|
838
|
+
keybinds: col === "keybinds" ? "Alt+Shift+B" : void 0
|
|
839
|
+
}
|
|
840
|
+
)
|
|
841
|
+
}
|
|
842
|
+
) });
|
|
843
|
+
}
|
|
844
|
+
function InputSection() {
|
|
845
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Input", docsPage: "ostack-ui-forms-input", children: /* @__PURE__ */ jsx(
|
|
846
|
+
ExhibitGrid,
|
|
847
|
+
{
|
|
848
|
+
cols: {
|
|
849
|
+
Basic: "",
|
|
850
|
+
"Helper text": "helperText",
|
|
851
|
+
Required: "required",
|
|
852
|
+
"Label help": "labelHelp",
|
|
853
|
+
Disabled: "disabled",
|
|
854
|
+
"Read-only": "readOnly",
|
|
855
|
+
Loading: "loading",
|
|
856
|
+
Code: "code",
|
|
857
|
+
"Clear button": "showClearButton"
|
|
858
|
+
},
|
|
859
|
+
rows: {
|
|
860
|
+
"No status": void 0,
|
|
861
|
+
Valid: "valid",
|
|
862
|
+
Invalid: "invalid",
|
|
863
|
+
Warned: "warned"
|
|
864
|
+
},
|
|
865
|
+
renderItem: ({ col, row }) => /* @__PURE__ */ jsxs(Field, { children: [
|
|
866
|
+
/* @__PURE__ */ jsx(
|
|
867
|
+
Label,
|
|
868
|
+
{
|
|
869
|
+
helperText: col === "labelHelp" ? "Used to sign in." : void 0,
|
|
870
|
+
children: "Username"
|
|
871
|
+
}
|
|
872
|
+
),
|
|
873
|
+
/* @__PURE__ */ jsx(
|
|
874
|
+
Input,
|
|
875
|
+
{
|
|
876
|
+
containerProps: { style: { width: 110 } },
|
|
877
|
+
defaultValue: "j_smith",
|
|
878
|
+
status: row,
|
|
879
|
+
required: col === "required",
|
|
880
|
+
disabled: col === "disabled",
|
|
881
|
+
readOnly: col === "readOnly",
|
|
882
|
+
loading: col === "loading",
|
|
883
|
+
code: col === "code" ? "1.1" : void 0,
|
|
884
|
+
showClearButton: col === "showClearButton" ? "auto" : void 0
|
|
885
|
+
}
|
|
886
|
+
),
|
|
887
|
+
row === "valid" && /* @__PURE__ */ jsx(Feedback, { type: "success", children: "Available." }),
|
|
888
|
+
row === "warned" && /* @__PURE__ */ jsx(Feedback, { type: "warning", children: "Already taken." }),
|
|
889
|
+
row === "invalid" && /* @__PURE__ */ jsx(Feedback, { children: "Invalid format." }),
|
|
890
|
+
col === "helperText" && /* @__PURE__ */ jsx(HelperText, { children: "Used to sign in." })
|
|
891
|
+
] })
|
|
892
|
+
}
|
|
893
|
+
) });
|
|
894
|
+
}
|
|
895
|
+
function KeyboardSection() {
|
|
896
|
+
return /* @__PURE__ */ jsxs(ExhibitSection, { title: "Keyboard", docsPage: "ostack-ui-typography-keyboard", children: [
|
|
897
|
+
"Press ",
|
|
898
|
+
/* @__PURE__ */ jsx(Keyboard, { children: "Ctrl" }),
|
|
899
|
+
" + ",
|
|
900
|
+
/* @__PURE__ */ jsx(Keyboard, { children: "P" }),
|
|
901
|
+
" to print."
|
|
902
|
+
] });
|
|
903
|
+
}
|
|
904
|
+
function LinkSection() {
|
|
905
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Link", docsPage: "ostack-ui-typography-link", children: /* @__PURE__ */ jsx(
|
|
906
|
+
ExhibitGrid,
|
|
907
|
+
{
|
|
908
|
+
cols: {
|
|
909
|
+
Neutral: "neutral",
|
|
910
|
+
Primary: "primary",
|
|
911
|
+
Success: "success",
|
|
912
|
+
Danger: "danger",
|
|
913
|
+
Warning: "warning",
|
|
914
|
+
External: "external"
|
|
915
|
+
},
|
|
916
|
+
renderItem: ({ col }) => /* @__PURE__ */ jsx(
|
|
917
|
+
Link,
|
|
918
|
+
{
|
|
919
|
+
href: col === "external" ? "https://www.wikipedia.org/" : "#",
|
|
920
|
+
color: col === "external" ? void 0 : col,
|
|
921
|
+
external: col === "external",
|
|
922
|
+
children: col === "external" ? "Wikipedia" : "Go to top"
|
|
923
|
+
}
|
|
924
|
+
)
|
|
925
|
+
}
|
|
926
|
+
) });
|
|
927
|
+
}
|
|
928
|
+
function MarkSection() {
|
|
929
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Mark", docsPage: "ostack-ui-typography-mark", children: /* @__PURE__ */ jsx(
|
|
930
|
+
ExhibitGrid,
|
|
931
|
+
{
|
|
932
|
+
cols: {
|
|
933
|
+
Neutral: "neutral",
|
|
934
|
+
Primary: "primary",
|
|
935
|
+
Success: "success",
|
|
936
|
+
Danger: "danger",
|
|
937
|
+
Warning: "warning"
|
|
938
|
+
},
|
|
939
|
+
renderItem: ({ col }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
940
|
+
"The deadline is ",
|
|
941
|
+
/* @__PURE__ */ jsx(Mark, { color: col, children: "Friday" }),
|
|
942
|
+
"."
|
|
943
|
+
] })
|
|
944
|
+
}
|
|
945
|
+
) });
|
|
946
|
+
}
|
|
947
|
+
function MenuListSection() {
|
|
948
|
+
return /* @__PURE__ */ jsx(
|
|
949
|
+
ExhibitSection,
|
|
950
|
+
{
|
|
951
|
+
title: "Menu list",
|
|
952
|
+
docsPage: "ostack-ui-overlay-dropdown-menu",
|
|
953
|
+
children: /* @__PURE__ */ jsx(
|
|
954
|
+
ExhibitGrid,
|
|
955
|
+
{
|
|
956
|
+
cols: {
|
|
957
|
+
Subtle: "subtle",
|
|
958
|
+
Solid: "solid"
|
|
959
|
+
},
|
|
960
|
+
renderItem: ({ col }) => /* @__PURE__ */ jsxs(MenuList, { variant: col, style: { width: 250 }, children: [
|
|
961
|
+
/* @__PURE__ */ jsxs(MenuListGroup, { label: "Actions", children: [
|
|
962
|
+
/* @__PURE__ */ jsx(MenuListItem, { icon: faEye, selected: true, children: "View" }),
|
|
963
|
+
/* @__PURE__ */ jsx(MenuListItem, { icon: faPencil, children: "Edit" }),
|
|
964
|
+
/* @__PURE__ */ jsx(MenuListItem, { icon: faTrashCan, color: "danger", children: "Delete" })
|
|
965
|
+
] }),
|
|
966
|
+
/* @__PURE__ */ jsxs(MenuListGroup, { label: "Links", children: [
|
|
967
|
+
/* @__PURE__ */ jsx(
|
|
968
|
+
MenuListItem,
|
|
969
|
+
{
|
|
970
|
+
type: "link",
|
|
971
|
+
href: "https://www.wikipedia.org/",
|
|
972
|
+
icon: faWikipediaW,
|
|
973
|
+
target: "_blank",
|
|
974
|
+
rel: "noopener noreferrer",
|
|
975
|
+
children: "Wikipedia"
|
|
976
|
+
}
|
|
977
|
+
),
|
|
978
|
+
/* @__PURE__ */ jsx(
|
|
979
|
+
MenuListItem,
|
|
980
|
+
{
|
|
981
|
+
type: "link",
|
|
982
|
+
href: "https://react.dev",
|
|
983
|
+
icon: faReact,
|
|
984
|
+
target: "_blank",
|
|
985
|
+
rel: "noopener noreferrer",
|
|
986
|
+
children: "React"
|
|
987
|
+
}
|
|
988
|
+
)
|
|
989
|
+
] })
|
|
990
|
+
] })
|
|
991
|
+
}
|
|
992
|
+
)
|
|
993
|
+
}
|
|
994
|
+
);
|
|
995
|
+
}
|
|
996
|
+
function NumericInputSection() {
|
|
997
|
+
return /* @__PURE__ */ jsx(
|
|
998
|
+
ExhibitSection,
|
|
999
|
+
{
|
|
1000
|
+
title: "Numeric input",
|
|
1001
|
+
docsPage: "ostack-ui-forms-numeric-input",
|
|
1002
|
+
children: /* @__PURE__ */ jsx(
|
|
1003
|
+
ExhibitGrid,
|
|
1004
|
+
{
|
|
1005
|
+
cols: {
|
|
1006
|
+
Basic: "",
|
|
1007
|
+
"Helper text": "helperText",
|
|
1008
|
+
Required: "required",
|
|
1009
|
+
Disabled: "disabled",
|
|
1010
|
+
"Read-only": "readOnly",
|
|
1011
|
+
Loading: "loading",
|
|
1012
|
+
Code: "code",
|
|
1013
|
+
"Clear button": "showClearButton"
|
|
1014
|
+
},
|
|
1015
|
+
rows: {
|
|
1016
|
+
"No status": void 0,
|
|
1017
|
+
Valid: "valid",
|
|
1018
|
+
Invalid: "invalid",
|
|
1019
|
+
Warned: "warned"
|
|
1020
|
+
},
|
|
1021
|
+
renderItem: ({ col, row }) => /* @__PURE__ */ jsxs(Field, { children: [
|
|
1022
|
+
/* @__PURE__ */ jsx(Label, { children: "Income" }),
|
|
1023
|
+
/* @__PURE__ */ jsx(
|
|
1024
|
+
NumericInput,
|
|
1025
|
+
{
|
|
1026
|
+
containerProps: { style: { width: 120 } },
|
|
1027
|
+
defaultValue: 42000.9,
|
|
1028
|
+
precision: 11,
|
|
1029
|
+
scale: 2,
|
|
1030
|
+
groupDigits: true,
|
|
1031
|
+
min: 0,
|
|
1032
|
+
endAdornment: /* @__PURE__ */ jsx(ControlAddon, { children: "€" }),
|
|
1033
|
+
status: row,
|
|
1034
|
+
required: col === "required",
|
|
1035
|
+
disabled: col === "disabled",
|
|
1036
|
+
readOnly: col === "readOnly",
|
|
1037
|
+
loading: col === "loading",
|
|
1038
|
+
code: col === "code" ? "3.9" : void 0,
|
|
1039
|
+
showClearButton: col === "showClearButton" ? "auto" : void 0
|
|
1040
|
+
}
|
|
1041
|
+
),
|
|
1042
|
+
row === "valid" && /* @__PURE__ */ jsx(Feedback, { type: "success", children: "Confirmed." }),
|
|
1043
|
+
row === "warned" && /* @__PURE__ */ jsx(Feedback, { type: "warning", children: "Processing…" }),
|
|
1044
|
+
row === "invalid" && /* @__PURE__ */ jsx(Feedback, { children: "Insufficient." }),
|
|
1045
|
+
col === "helperText" && /* @__PURE__ */ jsx(HelperText, { children: "For tax purposes." })
|
|
1046
|
+
] })
|
|
1047
|
+
}
|
|
1048
|
+
)
|
|
1049
|
+
}
|
|
1050
|
+
);
|
|
1051
|
+
}
|
|
1052
|
+
function OutputSection() {
|
|
1053
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Output", docsPage: "ostack-ui-forms-output", children: /* @__PURE__ */ jsx(
|
|
1054
|
+
ExhibitGrid,
|
|
1055
|
+
{
|
|
1056
|
+
cols: {
|
|
1057
|
+
Basic: "",
|
|
1058
|
+
"Helper text": "helperText",
|
|
1059
|
+
Pending: "pending",
|
|
1060
|
+
Code: "code"
|
|
1061
|
+
},
|
|
1062
|
+
rows: {
|
|
1063
|
+
"No status": void 0,
|
|
1064
|
+
Valid: "valid",
|
|
1065
|
+
Invalid: "invalid",
|
|
1066
|
+
Warned: "warned"
|
|
1067
|
+
},
|
|
1068
|
+
renderItem: ({ col, row }) => /* @__PURE__ */ jsxs(Field, { children: [
|
|
1069
|
+
/* @__PURE__ */ jsx(Label, { children: "Total" }),
|
|
1070
|
+
/* @__PURE__ */ jsx(
|
|
1071
|
+
Output,
|
|
1072
|
+
{
|
|
1073
|
+
containerProps: { style: { width: 150 } },
|
|
1074
|
+
status: row,
|
|
1075
|
+
pending: col === "pending",
|
|
1076
|
+
code: col === "code" ? "6.2" : void 0,
|
|
1077
|
+
children: "$30,000"
|
|
1078
|
+
}
|
|
1079
|
+
),
|
|
1080
|
+
row === "valid" && /* @__PURE__ */ jsx(Feedback, { type: "success", children: "Funds available." }),
|
|
1081
|
+
row === "warned" && /* @__PURE__ */ jsx(Feedback, { type: "warning", children: "Funds unavailable." }),
|
|
1082
|
+
row === "invalid" && /* @__PURE__ */ jsx(Feedback, { children: "Incorrect amount." }),
|
|
1083
|
+
col === "helperText" && /* @__PURE__ */ jsx(HelperText, { children: "A + B + C + D - E" })
|
|
1084
|
+
] })
|
|
1085
|
+
}
|
|
1086
|
+
) });
|
|
1087
|
+
}
|
|
1088
|
+
function PopoverSection() {
|
|
1089
|
+
const spacing = useSpacing();
|
|
1090
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Popover", docsPage: "ostack-ui-overlay-popover", children: /* @__PURE__ */ jsxs(Popover, { children: [
|
|
1091
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { children: /* @__PURE__ */ jsx(Button, { icon: faComment, children: "Comment" }) }),
|
|
1092
|
+
/* @__PURE__ */ jsx(PopoverContent, { style: { padding: spacing(2) }, children: /* @__PURE__ */ jsx(Stack, { asChild: true, gap: 2, alignItems: "flex-end", children: /* @__PURE__ */ jsxs("form", { children: [
|
|
1093
|
+
/* @__PURE__ */ jsxs(Field, { children: [
|
|
1094
|
+
/* @__PURE__ */ jsx(Label, { children: "Leave a comment" }),
|
|
1095
|
+
/* @__PURE__ */ jsx(TextArea, { rows: 6, style: { width: 300 } })
|
|
1096
|
+
] }),
|
|
1097
|
+
/* @__PURE__ */ jsx(
|
|
1098
|
+
Button,
|
|
1099
|
+
{
|
|
1100
|
+
color: "primary",
|
|
1101
|
+
type: "submit",
|
|
1102
|
+
onClick: (evt) => evt.preventDefault(),
|
|
1103
|
+
children: "Submit"
|
|
1104
|
+
}
|
|
1105
|
+
)
|
|
1106
|
+
] }) }) })
|
|
1107
|
+
] }) });
|
|
1108
|
+
}
|
|
1109
|
+
function RadioGroupSection() {
|
|
1110
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Radio group", docsPage: "ostack-ui-forms-radio-group", children: /* @__PURE__ */ jsx(
|
|
1111
|
+
ExhibitGrid,
|
|
1112
|
+
{
|
|
1113
|
+
cols: {
|
|
1114
|
+
Basic: "",
|
|
1115
|
+
"Helper text": "helperText",
|
|
1116
|
+
Required: "required",
|
|
1117
|
+
Disabled: "disabled",
|
|
1118
|
+
"Read-only": "readOnly",
|
|
1119
|
+
Loading: "loading",
|
|
1120
|
+
Code: "code",
|
|
1121
|
+
"All codes": "allCodes",
|
|
1122
|
+
"Clear button": "clearButton"
|
|
1123
|
+
},
|
|
1124
|
+
rows: {
|
|
1125
|
+
"No status": void 0,
|
|
1126
|
+
Valid: "valid",
|
|
1127
|
+
Invalid: "invalid",
|
|
1128
|
+
Warned: "warned"
|
|
1129
|
+
},
|
|
1130
|
+
renderItem: ({ col, row }) => /* @__PURE__ */ jsxs(Field, { children: [
|
|
1131
|
+
/* @__PURE__ */ jsx(Label, { children: "Preferred make" }),
|
|
1132
|
+
/* @__PURE__ */ jsxs(
|
|
1133
|
+
RadioGroup,
|
|
1134
|
+
{
|
|
1135
|
+
status: row,
|
|
1136
|
+
defaultValue: "fiat",
|
|
1137
|
+
required: col === "required",
|
|
1138
|
+
disabled: col === "disabled",
|
|
1139
|
+
readOnly: col === "readOnly",
|
|
1140
|
+
loading: col === "loading",
|
|
1141
|
+
code: col === "code" || col === "allCodes" ? "1.7" : void 0,
|
|
1142
|
+
showClearButton: col === "clearButton" ? "auto" : void 0,
|
|
1143
|
+
children: [
|
|
1144
|
+
/* @__PURE__ */ jsx(Radio, { value: "fiat", code: col === "allCodes" ? "a" : void 0, children: "Fiat" }),
|
|
1145
|
+
/* @__PURE__ */ jsx(
|
|
1146
|
+
Radio,
|
|
1147
|
+
{
|
|
1148
|
+
value: "renault",
|
|
1149
|
+
code: col === "allCodes" ? "b" : void 0,
|
|
1150
|
+
children: "Renault"
|
|
1151
|
+
}
|
|
1152
|
+
),
|
|
1153
|
+
/* @__PURE__ */ jsx(Radio, { value: "toyota", code: col === "allCodes" ? "c" : void 0, children: "Toyota" })
|
|
1154
|
+
]
|
|
1155
|
+
}
|
|
1156
|
+
),
|
|
1157
|
+
row === "valid" && /* @__PURE__ */ jsx(Feedback, { type: "success", children: "Available." }),
|
|
1158
|
+
row === "warned" && /* @__PURE__ */ jsx(Feedback, { type: "warning", children: "Maybe unavailable." }),
|
|
1159
|
+
row === "invalid" && /* @__PURE__ */ jsx(Feedback, { children: "Unavailable." }),
|
|
1160
|
+
col === "helperText" && /* @__PURE__ */ jsx(HelperText, { children: "All with low mileage." })
|
|
1161
|
+
] })
|
|
1162
|
+
}
|
|
1163
|
+
) });
|
|
1164
|
+
}
|
|
1165
|
+
function SelectSection() {
|
|
1166
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Select", docsPage: "ostack-ui-forms-select", children: /* @__PURE__ */ jsx(
|
|
1167
|
+
ExhibitGrid,
|
|
1168
|
+
{
|
|
1169
|
+
cols: {
|
|
1170
|
+
Single: "",
|
|
1171
|
+
Multiple: "multiple",
|
|
1172
|
+
"Helper text": "helperText",
|
|
1173
|
+
Required: "required",
|
|
1174
|
+
Disabled: "disabled",
|
|
1175
|
+
"Read-only": "readOnly",
|
|
1176
|
+
Loading: "loading",
|
|
1177
|
+
Code: "code"
|
|
1178
|
+
},
|
|
1179
|
+
rows: {
|
|
1180
|
+
"No status": void 0,
|
|
1181
|
+
Valid: "valid",
|
|
1182
|
+
Invalid: "invalid",
|
|
1183
|
+
Warned: "warned"
|
|
1184
|
+
},
|
|
1185
|
+
renderItem: ({ col, row }) => /* @__PURE__ */ jsxs(Field, { children: [
|
|
1186
|
+
/* @__PURE__ */ jsxs(Label, { children: [
|
|
1187
|
+
"Pick your fruit",
|
|
1188
|
+
col === "multiple" && "s"
|
|
1189
|
+
] }),
|
|
1190
|
+
/* @__PURE__ */ jsxs(
|
|
1191
|
+
Select,
|
|
1192
|
+
{
|
|
1193
|
+
containerProps: { style: { width: 120 } },
|
|
1194
|
+
multiple: col === "multiple",
|
|
1195
|
+
defaultValue: col === "multiple" ? ["apple", "kiwi"] : "apple",
|
|
1196
|
+
status: row,
|
|
1197
|
+
required: col === "required",
|
|
1198
|
+
disabled: col === "disabled",
|
|
1199
|
+
readOnly: col === "readOnly",
|
|
1200
|
+
loading: col === "loading",
|
|
1201
|
+
code: col === "code" ? "2.1" : void 0,
|
|
1202
|
+
children: [
|
|
1203
|
+
/* @__PURE__ */ jsx(Option, { value: "apple", children: "Apple" }),
|
|
1204
|
+
/* @__PURE__ */ jsx(Option, { value: "kiwi", children: "Kiwi" }),
|
|
1205
|
+
/* @__PURE__ */ jsx(Option, { value: "pear", children: "Pear" })
|
|
1206
|
+
]
|
|
1207
|
+
}
|
|
1208
|
+
),
|
|
1209
|
+
row === "valid" && /* @__PURE__ */ jsx(Feedback, { type: "success", children: "Available." }),
|
|
1210
|
+
row === "warned" && /* @__PURE__ */ jsx(Feedback, { type: "warning", children: "Maybe unavailable." }),
|
|
1211
|
+
row === "invalid" && /* @__PURE__ */ jsx(Feedback, { children: "Unavailable." }),
|
|
1212
|
+
col === "helperText" && /* @__PURE__ */ jsx(HelperText, { children: "For breakfast." })
|
|
1213
|
+
] })
|
|
1214
|
+
}
|
|
1215
|
+
) });
|
|
1216
|
+
}
|
|
1217
|
+
function SpinnerSection() {
|
|
1218
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Spinner", docsPage: "ostack-ui-feedback-spinner", children: /* @__PURE__ */ jsx(
|
|
1219
|
+
ExhibitGrid,
|
|
1220
|
+
{
|
|
1221
|
+
cols: {
|
|
1222
|
+
Neutral: "neutral",
|
|
1223
|
+
Primary: "primary",
|
|
1224
|
+
Success: "success",
|
|
1225
|
+
Danger: "danger",
|
|
1226
|
+
Warning: "warning",
|
|
1227
|
+
Labelled: "label"
|
|
1228
|
+
},
|
|
1229
|
+
renderItem: ({ col }) => /* @__PURE__ */ jsx(
|
|
1230
|
+
Spinner,
|
|
1231
|
+
{
|
|
1232
|
+
color: col === "label" ? void 0 : col,
|
|
1233
|
+
label: col === "label" ? "Loading…" : void 0
|
|
1234
|
+
}
|
|
1235
|
+
)
|
|
1236
|
+
}
|
|
1237
|
+
) });
|
|
1238
|
+
}
|
|
1239
|
+
const ROWS = [
|
|
1240
|
+
{ student: "Avi Everett", grade: 82.5 },
|
|
1241
|
+
{ student: "Evan Gutierrez", grade: 67.8 },
|
|
1242
|
+
{ student: "Jackson Ford", grade: 55.1 },
|
|
1243
|
+
{ student: "Olivia Cortes", grade: 77.5 }
|
|
1244
|
+
];
|
|
1245
|
+
const AVG_GRADE = ROWS.reduce((total, { grade }) => total + grade, 0) / ROWS.length;
|
|
1246
|
+
function TableSection() {
|
|
1247
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Table", docsPage: "ostack-ui-data-data-display-table", children: /* @__PURE__ */ jsx(
|
|
1248
|
+
ExhibitGrid,
|
|
1249
|
+
{
|
|
1250
|
+
cols: {
|
|
1251
|
+
Default: "default",
|
|
1252
|
+
Annexes: "control"
|
|
1253
|
+
},
|
|
1254
|
+
renderItem: ({ col }) => /* @__PURE__ */ jsxs(Table, { caption: "Exam grades", variant: col, style: { width: 250 }, children: [
|
|
1255
|
+
/* @__PURE__ */ jsxs(TableHead, { children: [
|
|
1256
|
+
/* @__PURE__ */ jsx(TableColumn, { label: "Student" }),
|
|
1257
|
+
/* @__PURE__ */ jsx(TableColumn, { label: "Grade", align: "right" })
|
|
1258
|
+
] }),
|
|
1259
|
+
/* @__PURE__ */ jsx(TableBody, { children: ROWS.map(({ student, grade }, i) => /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
1260
|
+
/* @__PURE__ */ jsx(TableCell, { header: true, children: student }),
|
|
1261
|
+
/* @__PURE__ */ jsx(TableCell, { align: "right", children: grade.toFixed(1) })
|
|
1262
|
+
] }, i)) }),
|
|
1263
|
+
/* @__PURE__ */ jsx(TableFoot, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
1264
|
+
/* @__PURE__ */ jsx(TableCell, { header: true, children: "Average" }),
|
|
1265
|
+
/* @__PURE__ */ jsx(TableCell, { align: "right", children: AVG_GRADE.toFixed(1) })
|
|
1266
|
+
] }) })
|
|
1267
|
+
] })
|
|
1268
|
+
}
|
|
1269
|
+
) });
|
|
1270
|
+
}
|
|
1271
|
+
function TabsSection() {
|
|
1272
|
+
const spacing = useSpacing();
|
|
1273
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Tabs", docsPage: "ostack-ui-data-disclosure-tabs", children: /* @__PURE__ */ jsx(
|
|
1274
|
+
ExhibitGrid,
|
|
1275
|
+
{
|
|
1276
|
+
cols: {
|
|
1277
|
+
Default: "default",
|
|
1278
|
+
Annexes: "annexes"
|
|
1279
|
+
},
|
|
1280
|
+
renderItem: ({ col }) => /* @__PURE__ */ jsxs(Tabs, { variant: col, defaultValue: "accessibility", children: [
|
|
1281
|
+
/* @__PURE__ */ jsxs(TabList, { children: [
|
|
1282
|
+
/* @__PURE__ */ jsx(Tab, { value: "accessibility", children: "Accessibility" }),
|
|
1283
|
+
/* @__PURE__ */ jsx(Tab, { value: "privacy", children: "Privacy & Security" }),
|
|
1284
|
+
/* @__PURE__ */ jsx(Tab, { value: "system", children: "System" })
|
|
1285
|
+
] }),
|
|
1286
|
+
/* @__PURE__ */ jsx(TabContent, { value: "accessibility", style: { marginTop: spacing(2) }, children: "Accessibility options…" }),
|
|
1287
|
+
/* @__PURE__ */ jsx(TabContent, { value: "privacy", style: { marginTop: spacing(2) }, children: "Privacy & Security settings…" }),
|
|
1288
|
+
/* @__PURE__ */ jsx(TabContent, { value: "system", style: { marginTop: spacing(2) }, children: "System configuration…" })
|
|
1289
|
+
] })
|
|
1290
|
+
}
|
|
1291
|
+
) });
|
|
1292
|
+
}
|
|
1293
|
+
function TagSection() {
|
|
1294
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Tag", docsPage: "ostack-ui-data-display-tag", children: /* @__PURE__ */ jsx(
|
|
1295
|
+
ExhibitGrid,
|
|
1296
|
+
{
|
|
1297
|
+
cols: {
|
|
1298
|
+
Neutral: "neutral",
|
|
1299
|
+
Primary: "primary",
|
|
1300
|
+
Success: "success",
|
|
1301
|
+
Danger: "danger",
|
|
1302
|
+
Warning: "warning",
|
|
1303
|
+
Pill: "pill",
|
|
1304
|
+
Icon: "icon",
|
|
1305
|
+
"Close button": "showCloseButton"
|
|
1306
|
+
},
|
|
1307
|
+
rows: {
|
|
1308
|
+
Solid: "solid",
|
|
1309
|
+
Subtle: "subtle",
|
|
1310
|
+
Outlined: "outlined"
|
|
1311
|
+
},
|
|
1312
|
+
renderItem: ({ col, row }) => /* @__PURE__ */ jsx(
|
|
1313
|
+
Tag,
|
|
1314
|
+
{
|
|
1315
|
+
variant: row,
|
|
1316
|
+
color: col === "pill" || col === "icon" || col === "showCloseButton" ? "neutral" : col,
|
|
1317
|
+
pill: col === "pill",
|
|
1318
|
+
icon: col === "icon" ? faStar : void 0,
|
|
1319
|
+
showCloseButton: col === "showCloseButton",
|
|
1320
|
+
children: "New"
|
|
1321
|
+
}
|
|
1322
|
+
)
|
|
1323
|
+
}
|
|
1324
|
+
) });
|
|
1325
|
+
}
|
|
1326
|
+
function TextAreaSection() {
|
|
1327
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Text area", docsPage: "ostack-ui-forms-text-area", children: /* @__PURE__ */ jsx(
|
|
1328
|
+
ExhibitGrid,
|
|
1329
|
+
{
|
|
1330
|
+
cols: {
|
|
1331
|
+
Basic: "",
|
|
1332
|
+
"Helper text": "helperText",
|
|
1333
|
+
Required: "required",
|
|
1334
|
+
Disabled: "disabled",
|
|
1335
|
+
"Read-only": "readOnly",
|
|
1336
|
+
Loading: "loading",
|
|
1337
|
+
Code: "code",
|
|
1338
|
+
"Clear button": "showClearButton"
|
|
1339
|
+
},
|
|
1340
|
+
rows: {
|
|
1341
|
+
"No status": void 0,
|
|
1342
|
+
Valid: "valid",
|
|
1343
|
+
Invalid: "invalid",
|
|
1344
|
+
Warned: "warned"
|
|
1345
|
+
},
|
|
1346
|
+
renderItem: ({ col, row }) => /* @__PURE__ */ jsxs(Field, { children: [
|
|
1347
|
+
/* @__PURE__ */ jsx(Label, { children: "Additional requests" }),
|
|
1348
|
+
/* @__PURE__ */ jsx(
|
|
1349
|
+
TextArea,
|
|
1350
|
+
{
|
|
1351
|
+
containerProps: { style: { width: 130 } },
|
|
1352
|
+
defaultValue: "Please provide two extra towels.",
|
|
1353
|
+
status: row,
|
|
1354
|
+
required: col === "required",
|
|
1355
|
+
disabled: col === "disabled",
|
|
1356
|
+
readOnly: col === "readOnly",
|
|
1357
|
+
loading: col === "loading",
|
|
1358
|
+
code: col === "code" ? "4.1" : void 0,
|
|
1359
|
+
showClearButton: col === "showClearButton" ? "auto" : void 0
|
|
1360
|
+
}
|
|
1361
|
+
),
|
|
1362
|
+
row === "valid" && /* @__PURE__ */ jsx(Feedback, { type: "success", children: "Accepted." }),
|
|
1363
|
+
row === "warned" && /* @__PURE__ */ jsx(Feedback, { type: "warning", children: "Unable to process." }),
|
|
1364
|
+
row === "invalid" && /* @__PURE__ */ jsx(Feedback, { children: "Invalid request." }),
|
|
1365
|
+
col === "helperText" && /* @__PURE__ */ jsx(HelperText, { children: "We will attempt to honour them." })
|
|
1366
|
+
] })
|
|
1367
|
+
}
|
|
1368
|
+
) });
|
|
1369
|
+
}
|
|
1370
|
+
function ToastSection() {
|
|
1371
|
+
const { addToast } = useToastManager();
|
|
1372
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Toast", docsPage: "ostack-ui-feedback-toast", children: /* @__PURE__ */ jsx(
|
|
1373
|
+
ExhibitGrid,
|
|
1374
|
+
{
|
|
1375
|
+
cols: {
|
|
1376
|
+
Neutral: "neutral",
|
|
1377
|
+
Info: "info",
|
|
1378
|
+
Success: "success",
|
|
1379
|
+
Danger: "danger",
|
|
1380
|
+
Warning: "warning",
|
|
1381
|
+
Title: "title",
|
|
1382
|
+
Action: "action"
|
|
1383
|
+
},
|
|
1384
|
+
rows: {
|
|
1385
|
+
Solid: "solid",
|
|
1386
|
+
Subtle: "subtle",
|
|
1387
|
+
Outlined: "outlined"
|
|
1388
|
+
},
|
|
1389
|
+
renderItem: ({ col, row }) => /* @__PURE__ */ jsx(
|
|
1390
|
+
Button,
|
|
1391
|
+
{
|
|
1392
|
+
icon: faBookmark,
|
|
1393
|
+
color: col === "info" || col === "title" || col === "action" ? "primary" : col,
|
|
1394
|
+
variant: row,
|
|
1395
|
+
onClick: () => {
|
|
1396
|
+
addToast("Item has been bookmarked.", {
|
|
1397
|
+
title: col === "title" ? "Bookmarked" : void 0,
|
|
1398
|
+
variant: row,
|
|
1399
|
+
severity: col === "title" || col === "action" ? void 0 : col,
|
|
1400
|
+
action: col === "action" && /* @__PURE__ */ jsx(Button, { keybinds: "$mod+Z", color: "primary", children: "Undo" }),
|
|
1401
|
+
actionAltText: "Undo (Ctrl+Z)"
|
|
1402
|
+
});
|
|
1403
|
+
},
|
|
1404
|
+
children: "Bookmark"
|
|
1405
|
+
}
|
|
1406
|
+
)
|
|
1407
|
+
}
|
|
1408
|
+
) });
|
|
1409
|
+
}
|
|
1410
|
+
function TooltipSection() {
|
|
1411
|
+
return /* @__PURE__ */ jsx(ExhibitSection, { title: "Tooltip", docsPage: "ostack-ui-overlay-tooltip", children: /* @__PURE__ */ jsx(Tooltip, { content: "Press to reload all content", children: /* @__PURE__ */ jsx(Button, { children: "Refresh" }) }) });
|
|
1412
|
+
}
|
|
1413
|
+
const DEFAULT_PROD_DOCS_URL = "https://ui.ostack.tech/";
|
|
1414
|
+
function ExhibitApp({
|
|
1415
|
+
docsUrl = DEFAULT_PROD_DOCS_URL,
|
|
1416
|
+
title = document.title,
|
|
1417
|
+
prefix,
|
|
1418
|
+
actions
|
|
1419
|
+
}) {
|
|
1420
|
+
return /* @__PURE__ */ jsx(ExhibitContext, { value: { docsUrl }, children: /* @__PURE__ */ jsxs(Root, { prefix, locale: enGB, children: [
|
|
1421
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { focusable: true, asChild: true, children: /* @__PURE__ */ jsx(Link, { href: "#exhibit-main", style: { top: 6, left: 6 }, children: "Skip to main content" }) }),
|
|
1422
|
+
/* @__PURE__ */ jsx(Container, { asChild: true, children: /* @__PURE__ */ jsxs("header", { id: "exhibit-header", children: [
|
|
1423
|
+
/* @__PURE__ */ jsx(Heading, { level: 1, id: "exhibit-title", children: title }),
|
|
1424
|
+
actions && /* @__PURE__ */ jsx(Stack, { id: "exhibit-actions", direction: "row", gap: 2, children: actions })
|
|
1425
|
+
] }) }),
|
|
1426
|
+
/* @__PURE__ */ jsx(Stack, { asChild: true, gap: 15, children: /* @__PURE__ */ jsx(Container, { asChild: true, children: /* @__PURE__ */ jsxs("main", { id: "exhibit-main", tabIndex: -1, children: [
|
|
1427
|
+
/* @__PURE__ */ jsx(AlertSection, {}),
|
|
1428
|
+
/* @__PURE__ */ jsx(AlertDialogSection, {}),
|
|
1429
|
+
/* @__PURE__ */ jsx(ButtonSection, {}),
|
|
1430
|
+
/* @__PURE__ */ jsx(ButtonGroupSection, {}),
|
|
1431
|
+
/* @__PURE__ */ jsx(CalendarSection, {}),
|
|
1432
|
+
/* @__PURE__ */ jsx(CheckboxSection, {}),
|
|
1433
|
+
/* @__PURE__ */ jsx(CheckboxGroupSection, {}),
|
|
1434
|
+
/* @__PURE__ */ jsx(CodeSection, {}),
|
|
1435
|
+
/* @__PURE__ */ jsx(CollapsibleSection, {}),
|
|
1436
|
+
/* @__PURE__ */ jsx(CommandMenuSection, {}),
|
|
1437
|
+
/* @__PURE__ */ jsx(DataTableSection, {}),
|
|
1438
|
+
/* @__PURE__ */ jsx(DateInputSection, {}),
|
|
1439
|
+
/* @__PURE__ */ jsx(DateRangeInputSection, {}),
|
|
1440
|
+
/* @__PURE__ */ jsx(DialogSection, {}),
|
|
1441
|
+
/* @__PURE__ */ jsx(DropdownMenuSection, {}),
|
|
1442
|
+
/* @__PURE__ */ jsx(IconButtonSection, {}),
|
|
1443
|
+
/* @__PURE__ */ jsx(InputSection, {}),
|
|
1444
|
+
/* @__PURE__ */ jsx(LinkSection, {}),
|
|
1445
|
+
/* @__PURE__ */ jsx(MarkSection, {}),
|
|
1446
|
+
/* @__PURE__ */ jsx(MenuListSection, {}),
|
|
1447
|
+
/* @__PURE__ */ jsx(NumericInputSection, {}),
|
|
1448
|
+
/* @__PURE__ */ jsx(OutputSection, {}),
|
|
1449
|
+
/* @__PURE__ */ jsx(PopoverSection, {}),
|
|
1450
|
+
/* @__PURE__ */ jsx(RadioGroupSection, {}),
|
|
1451
|
+
/* @__PURE__ */ jsx(SelectSection, {}),
|
|
1452
|
+
/* @__PURE__ */ jsx(SpinnerSection, {}),
|
|
1453
|
+
/* @__PURE__ */ jsx(TableSection, {}),
|
|
1454
|
+
/* @__PURE__ */ jsx(TabsSection, {}),
|
|
1455
|
+
/* @__PURE__ */ jsx(TagSection, {}),
|
|
1456
|
+
/* @__PURE__ */ jsx(ToastSection, {}),
|
|
1457
|
+
/* @__PURE__ */ jsx(TextAreaSection, {}),
|
|
1458
|
+
/* @__PURE__ */ jsx(TooltipSection, {}),
|
|
1459
|
+
/* @__PURE__ */ jsx(KeyboardSection, {})
|
|
1460
|
+
] }) }) })
|
|
1461
|
+
] }) });
|
|
1462
|
+
}
|
|
1463
|
+
export {
|
|
1464
|
+
ExhibitApp
|
|
1465
|
+
};
|
|
1466
|
+
//# sourceMappingURL=ostack-ui-exhibit.js.map
|