@godxjp/ui 8.2.0 → 9.0.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/dist/{chunk-3EMDVI7X.js → chunk-2ACNEQOI.js} +1 -1
- package/dist/{chunk-PZ4LO723.js → chunk-32ZUUKML.js} +19 -10
- package/dist/{chunk-YXJ3FS6O.js → chunk-442ULAA6.js} +12 -4
- package/dist/{chunk-C5H655GK.js → chunk-6PA2YHRE.js} +129 -30
- package/dist/chunk-B73NA66T.js +122 -0
- package/dist/chunk-HCM4JAC2.js +134 -0
- package/dist/chunk-HL3G4SVG.js +131 -0
- package/dist/{chunk-3FUXNL5A.js → chunk-INSF6K3Y.js} +4 -40
- package/dist/chunk-JKHWLPM5.js +101 -0
- package/dist/{chunk-MISVV4IT.js → chunk-JOLM73YQ.js} +1 -1
- package/dist/chunk-LFW37FGG.js +68 -0
- package/dist/{chunk-67HEX3OS.js → chunk-LJLGABFV.js} +2 -2
- package/dist/{chunk-IAKROVSG.js → chunk-N3JPLJ3B.js} +2 -2
- package/dist/chunk-QLMXEJSY.js +114 -0
- package/dist/{chunk-SEG2YBXF.js → chunk-QTUJSRDH.js} +9 -1
- package/dist/{chunk-Q7AU6WDX.js → chunk-RSC5K7RP.js} +1 -1
- package/dist/{chunk-V45EK6S7.js → chunk-TBXQJCBQ.js} +1 -1
- package/dist/chunk-W4REF4TD.js +42 -0
- package/dist/chunk-WGWI7EGL.js +83 -0
- package/dist/{chunk-TMDGV4CN.js → chunk-ZRRLOOBX.js} +1 -10
- package/dist/components/admin/index.d.ts +5 -23
- package/dist/components/admin/index.js +23 -19
- package/dist/components/data-display/carousel.d.ts +25 -0
- package/dist/components/data-display/carousel.js +2 -0
- package/dist/components/data-display/index.d.ts +2 -0
- package/dist/components/data-display/index.js +4 -3
- package/dist/components/data-entry/autocomplete.js +3 -3
- package/dist/components/data-entry/calendar.js +2 -2
- package/dist/components/data-entry/cascader.js +2 -2
- package/dist/components/data-entry/combobox.d.ts +22 -0
- package/dist/components/data-entry/combobox.js +6 -0
- package/dist/components/data-entry/command.d.ts +1 -1
- package/dist/components/data-entry/date-picker.js +3 -3
- package/dist/components/data-entry/date-range-picker.js +3 -3
- package/dist/components/data-entry/index.d.ts +2 -0
- package/dist/components/data-entry/index.js +19 -16
- package/dist/components/data-entry/select.js +3 -3
- package/dist/components/data-entry/time-input.d.ts +12 -0
- package/dist/components/data-entry/time-input.js +3 -0
- package/dist/components/data-entry/time-picker.js +2 -2
- package/dist/components/data-entry/transfer.js +4 -3
- package/dist/components/data-entry/tree-select.js +2 -2
- package/dist/components/data-entry/upload.js +3 -3
- package/dist/components/feedback/alert.js +1 -1
- package/dist/components/feedback/index.js +3 -3
- package/dist/components/layout/index.d.ts +9 -6
- package/dist/components/layout/index.js +2 -1
- package/dist/components/layout/resizable.d.ts +18 -0
- package/dist/components/layout/resizable.js +2 -0
- package/dist/components/navigation/context-menu.d.ts +25 -0
- package/dist/components/navigation/context-menu.js +2 -0
- package/dist/components/navigation/index.d.ts +9 -2
- package/dist/components/navigation/index.js +9 -6
- package/dist/components/navigation/menubar.d.ts +29 -0
- package/dist/components/navigation/menubar.js +2 -0
- package/dist/components/navigation/navigation-menu.d.ts +13 -0
- package/dist/components/navigation/navigation-menu.js +2 -0
- package/dist/components/navigation/pagination.js +4 -4
- package/dist/components/query/index.d.ts +2 -2
- package/dist/components/query/index.js +193 -4
- package/dist/components/ui/index.d.ts +13 -0
- package/dist/components/ui/index.js +26 -19
- package/dist/{filter-bar-DvVXm_d1.d.ts → filter-bar-BycYH10i.d.ts} +3 -3
- package/dist/form/index.js +71 -3
- package/dist/index.d.ts +5 -13
- package/dist/index.js +34 -29
- package/dist/{inline-DqfYlGKj.d.ts → inline-DCqn4O29.d.ts} +2 -2
- package/dist/{layout.prop-Baq9muDN.d.ts → layout.prop-DwJKI6ka.d.ts} +2 -0
- package/dist/lib/hooks.d.ts +17 -0
- package/dist/lib/hooks.js +1 -0
- package/dist/props/components/index.d.ts +2 -2
- package/dist/props/index.d.ts +2 -2
- package/dist/props/index.js +1 -1
- package/dist/props/registry.js +1 -1
- package/dist/{query.prop-DuODxsiU.d.ts → query.prop-BDdz9L1G.d.ts} +1 -1
- package/dist/styles/data-display-layout.css +55 -0
- package/dist/styles/data-entry-layout.css +93 -0
- package/dist/styles/index.css +2 -0
- package/dist/styles/layout.css +35 -3
- package/dist/styles/navigation-layout.css +271 -0
- package/package.json +41 -3
- package/dist/chunk-7WRZG2IG.js +0 -71
- package/dist/chunk-N43OKOFT.js +0 -193
- package/dist/{chunk-TV7WEENM.js → chunk-6J7GRCDA.js} +1 -1
- package/dist/{chunk-RGPF3HU6.js → chunk-6YBYAEXD.js} +1 -1
- package/dist/{chunk-WY4RSEYC.js → chunk-GKED65NV.js} +1 -1
- package/dist/{chunk-PKGPNZA4.js → chunk-HB2OHB5X.js} +1 -1
- package/dist/{chunk-7577VIAC.js → chunk-IOGU3ZWF.js} +1 -1
- package/dist/{chunk-N5SDFNSJ.js → chunk-JBHXILI4.js} +1 -1
- package/dist/{chunk-HKD6ERY7.js → chunk-LDSLS6HE.js} +0 -0
- package/dist/{chunk-NGT3I6OG.js → chunk-Z6HNY2PL.js} +2 -2
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-
|
|
1
|
+
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-2ACNEQOI.js';
|
|
2
2
|
import { Button } from './chunk-M4PZNAMV.js';
|
|
3
3
|
import { useTranslation, useOptionalAppContext, APP_LOCALES, resolveTimezonePickerOptions, getTimezoneLabel, APP_TIME_FORMAT_OPTIONS, getTimeFormatLabel } from './chunk-RLGHEV4A.js';
|
|
4
4
|
import { APP_DATE_FORMAT_OPTIONS, getDateFormatLabel } from './chunk-FXFJF4YA.js';
|
|
5
5
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
6
6
|
import { X, ChevronRight, Languages, Globe, Clock, CalendarDays } from 'lucide-react';
|
|
7
7
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
|
-
import { Link } from 'react-router-dom';
|
|
9
8
|
import * as React from 'react';
|
|
10
9
|
|
|
11
|
-
function Toolbar({
|
|
12
|
-
onClear,
|
|
13
|
-
hasActiveFilters = true,
|
|
14
|
-
className,
|
|
15
|
-
children
|
|
16
|
-
}) {
|
|
10
|
+
function Toolbar({ onClear, hasActiveFilters = true, className, children }) {
|
|
17
11
|
const { t } = useTranslation();
|
|
18
12
|
return /* @__PURE__ */ jsxs("div", { className: cn("ui-toolbar", className), children: [
|
|
19
13
|
children,
|
|
@@ -31,12 +25,27 @@ function ToolbarGroup({ label, className, children }) {
|
|
|
31
25
|
}
|
|
32
26
|
var FilterBar = Toolbar;
|
|
33
27
|
var FilterGroup = ToolbarGroup;
|
|
34
|
-
function PageHeader({
|
|
28
|
+
function PageHeader({
|
|
29
|
+
title,
|
|
30
|
+
description,
|
|
31
|
+
breadcrumb,
|
|
32
|
+
actions,
|
|
33
|
+
linkComponent: LinkComponent = "a",
|
|
34
|
+
className
|
|
35
|
+
}) {
|
|
35
36
|
return /* @__PURE__ */ jsxs("header", { className: cn("ui-page-header", className), children: [
|
|
36
37
|
breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsx("nav", { "aria-label": "Breadcrumb", className: "ui-breadcrumb", children: /* @__PURE__ */ jsx("ol", { className: "ui-breadcrumb-list", children: breadcrumb.map((item, i) => {
|
|
37
38
|
const isLast = i === breadcrumb.length - 1;
|
|
38
39
|
return /* @__PURE__ */ jsxs("li", { className: "ui-inline-xs", children: [
|
|
39
|
-
item.to && !isLast ? /* @__PURE__ */ jsx(
|
|
40
|
+
item.to && !isLast ? /* @__PURE__ */ jsx(
|
|
41
|
+
LinkComponent,
|
|
42
|
+
{
|
|
43
|
+
href: item.to,
|
|
44
|
+
to: item.to,
|
|
45
|
+
className: "hover:text-foreground hover:underline",
|
|
46
|
+
children: item.label
|
|
47
|
+
}
|
|
48
|
+
) : /* @__PURE__ */ jsx(
|
|
40
49
|
"span",
|
|
41
50
|
{
|
|
42
51
|
className: isLast ? "text-foreground" : "",
|
|
@@ -4,7 +4,6 @@ import { Collapsible, CollapsibleTrigger, CollapsibleContent } from './chunk-DV5
|
|
|
4
4
|
import { densityClass, pageContainerVariantClass, Flex } from './chunk-TILFZBTE.js';
|
|
5
5
|
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
6
6
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
7
|
-
import { Link } from 'react-router-dom';
|
|
8
7
|
import { ChevronRight, ChevronDown, PanelLeftOpen, PanelLeftClose, Search, Bell, SlidersHorizontal } from 'lucide-react';
|
|
9
8
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
9
|
import * as React from 'react';
|
|
@@ -19,6 +18,7 @@ function PageContainerRoot({
|
|
|
19
18
|
extra,
|
|
20
19
|
footer,
|
|
21
20
|
breadcrumb,
|
|
21
|
+
linkComponent: LinkComponent = "a",
|
|
22
22
|
density = "default",
|
|
23
23
|
variant = "default",
|
|
24
24
|
stickyFooter = false,
|
|
@@ -40,7 +40,15 @@ function PageContainerRoot({
|
|
|
40
40
|
breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsx("nav", { "aria-label": "Breadcrumb", className: "ui-breadcrumb", children: /* @__PURE__ */ jsx("ol", { className: "ui-breadcrumb-list", children: breadcrumb.map((item, i) => {
|
|
41
41
|
const isLast = i === breadcrumb.length - 1;
|
|
42
42
|
return /* @__PURE__ */ jsxs("li", { className: "ui-inline-xs", children: [
|
|
43
|
-
item.to && !isLast ? /* @__PURE__ */ jsx(
|
|
43
|
+
item.to && !isLast ? /* @__PURE__ */ jsx(
|
|
44
|
+
LinkComponent,
|
|
45
|
+
{
|
|
46
|
+
href: item.to,
|
|
47
|
+
to: item.to,
|
|
48
|
+
className: "hover:text-foreground hover:underline",
|
|
49
|
+
children: item.label
|
|
50
|
+
}
|
|
51
|
+
) : /* @__PURE__ */ jsx(
|
|
44
52
|
"span",
|
|
45
53
|
{
|
|
46
54
|
className: isLast ? "text-foreground" : "",
|
|
@@ -101,11 +109,11 @@ function AppShell({
|
|
|
101
109
|
footer !== void 0 && /* @__PURE__ */ jsx("footer", { className: "app-footer", children: footer })
|
|
102
110
|
] });
|
|
103
111
|
}
|
|
104
|
-
function Breadcrumb({ items }) {
|
|
112
|
+
function Breadcrumb({ items, linkComponent: LinkComponent = "a" }) {
|
|
105
113
|
return /* @__PURE__ */ jsx("nav", { "aria-label": "Breadcrumb", className: "ui-breadcrumb", children: /* @__PURE__ */ jsx("ol", { className: "ui-breadcrumb-list", children: items.map((item, index) => {
|
|
106
114
|
const isLast = index === items.length - 1;
|
|
107
115
|
return /* @__PURE__ */ jsxs("li", { className: "ui-breadcrumb-item", children: [
|
|
108
|
-
item.to && !isLast ? /* @__PURE__ */ jsx(
|
|
116
|
+
item.to && !isLast ? /* @__PURE__ */ jsx(LinkComponent, { href: item.to, to: item.to, className: "ui-breadcrumb-link", children: item.label }) : /* @__PURE__ */ jsx("span", { className: "ui-breadcrumb-current", "aria-current": isLast ? "page" : void 0, children: item.label }),
|
|
109
117
|
!isLast ? /* @__PURE__ */ jsx(ChevronRight, { "aria-hidden": "true" }) : null
|
|
110
118
|
] }, item.to ?? index);
|
|
111
119
|
}) }) });
|
|
@@ -319,10 +319,26 @@ var VOCABULARY_REGISTRY = {
|
|
|
319
319
|
};
|
|
320
320
|
var COMPONENT_PROP_REGISTRY = {
|
|
321
321
|
AppProviderProp: { group: "app", file: "components/app.prop.ts", vocabulary: ["ChildrenProp"] },
|
|
322
|
-
LocalePickerProp: {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
322
|
+
LocalePickerProp: {
|
|
323
|
+
group: "app",
|
|
324
|
+
file: "components/app.prop.ts",
|
|
325
|
+
vocabulary: ["ValueProp", "OnValueChangeProp", "DisabledProp", "IdProp", "ClassNameProp"]
|
|
326
|
+
},
|
|
327
|
+
TimezonePickerProp: {
|
|
328
|
+
group: "app",
|
|
329
|
+
file: "components/app.prop.ts",
|
|
330
|
+
vocabulary: ["ValueProp", "OnValueChangeProp", "DisabledProp", "IdProp", "ClassNameProp"]
|
|
331
|
+
},
|
|
332
|
+
TimeFormatPickerProp: {
|
|
333
|
+
group: "app",
|
|
334
|
+
file: "components/app.prop.ts",
|
|
335
|
+
vocabulary: ["ValueProp", "OnValueChangeProp", "DisabledProp", "IdProp", "ClassNameProp"]
|
|
336
|
+
},
|
|
337
|
+
DateFormatPickerProp: {
|
|
338
|
+
group: "app",
|
|
339
|
+
file: "components/app.prop.ts",
|
|
340
|
+
vocabulary: ["ValueProp", "OnValueChangeProp", "DisabledProp", "IdProp", "ClassNameProp"]
|
|
341
|
+
},
|
|
326
342
|
PageContainerProp: {
|
|
327
343
|
group: "layout",
|
|
328
344
|
file: "components/layout.prop.ts",
|
|
@@ -363,13 +379,41 @@ var COMPONENT_PROP_REGISTRY = {
|
|
|
363
379
|
file: "components/layout.prop.ts",
|
|
364
380
|
vocabulary: ["ChildrenProp"]
|
|
365
381
|
},
|
|
366
|
-
SidebarProductProp: {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
382
|
+
SidebarProductProp: {
|
|
383
|
+
group: "layout",
|
|
384
|
+
file: "components/layout.prop.ts",
|
|
385
|
+
vocabulary: ["LabelProp"]
|
|
386
|
+
},
|
|
387
|
+
SidebarItemProp: {
|
|
388
|
+
group: "layout",
|
|
389
|
+
file: "components/layout.prop.ts",
|
|
390
|
+
vocabulary: ["IdProp", "LabelProp", "DisabledProp", "ChildrenProp"]
|
|
391
|
+
},
|
|
392
|
+
SidebarSectionProp: {
|
|
393
|
+
group: "layout",
|
|
394
|
+
file: "components/layout.prop.ts",
|
|
395
|
+
vocabulary: ["LabelProp"]
|
|
396
|
+
},
|
|
397
|
+
SidebarProp: {
|
|
398
|
+
group: "layout",
|
|
399
|
+
file: "components/layout.prop.ts",
|
|
400
|
+
vocabulary: ["IdProp", "OnValueChangeProp", "ChildrenProp"]
|
|
401
|
+
},
|
|
402
|
+
TopbarProductProp: {
|
|
403
|
+
group: "layout",
|
|
404
|
+
file: "components/layout.prop.ts",
|
|
405
|
+
vocabulary: ["LabelProp"]
|
|
406
|
+
},
|
|
407
|
+
TopbarProjectProp: {
|
|
408
|
+
group: "layout",
|
|
409
|
+
file: "components/layout.prop.ts",
|
|
410
|
+
vocabulary: ["LabelProp"]
|
|
411
|
+
},
|
|
412
|
+
TopbarProp: {
|
|
413
|
+
group: "layout",
|
|
414
|
+
file: "components/layout.prop.ts",
|
|
415
|
+
vocabulary: ["ChildrenProp", "OnOpenChangeProp", "OnValueChangeProp"]
|
|
416
|
+
},
|
|
373
417
|
PageHeaderProp: {
|
|
374
418
|
group: "layout",
|
|
375
419
|
file: "components/layout.prop.ts",
|
|
@@ -379,13 +423,7 @@ var COMPONENT_PROP_REGISTRY = {
|
|
|
379
423
|
ButtonProp: {
|
|
380
424
|
group: "general",
|
|
381
425
|
file: "components/general.prop.ts",
|
|
382
|
-
vocabulary: [
|
|
383
|
-
"ButtonVariantProp",
|
|
384
|
-
"SizeProp",
|
|
385
|
-
"AsChildProp",
|
|
386
|
-
"DisabledProp",
|
|
387
|
-
"OnClickProp"
|
|
388
|
-
]
|
|
426
|
+
vocabulary: ["ButtonVariantProp", "SizeProp", "AsChildProp", "DisabledProp", "OnClickProp"]
|
|
389
427
|
},
|
|
390
428
|
InputProp: {
|
|
391
429
|
group: "data-entry",
|
|
@@ -417,7 +455,11 @@ var COMPONENT_PROP_REGISTRY = {
|
|
|
417
455
|
file: "components/data-entry.prop.ts",
|
|
418
456
|
vocabulary: ["ValueProp", "DefaultValueProp", "OnValueChangeProp", "DisabledProp"]
|
|
419
457
|
},
|
|
420
|
-
ChoiceOptionProp: {
|
|
458
|
+
ChoiceOptionProp: {
|
|
459
|
+
group: "data-entry",
|
|
460
|
+
file: "components/data-entry.prop.ts",
|
|
461
|
+
vocabulary: ["LabelProp", "ValueProp", "DisabledProp", "DescriptionProp"]
|
|
462
|
+
},
|
|
421
463
|
RadioProp: {
|
|
422
464
|
group: "data-entry",
|
|
423
465
|
file: "components/data-entry.prop.ts",
|
|
@@ -551,7 +593,13 @@ var COMPONENT_PROP_REGISTRY = {
|
|
|
551
593
|
UploadProp: {
|
|
552
594
|
group: "data-entry",
|
|
553
595
|
file: "components/data-entry.prop.ts",
|
|
554
|
-
vocabulary: [
|
|
596
|
+
vocabulary: [
|
|
597
|
+
"ValueProp",
|
|
598
|
+
"DefaultValueProp",
|
|
599
|
+
"OnValueChangeProp",
|
|
600
|
+
"DisabledProp",
|
|
601
|
+
"ClassNameProp"
|
|
602
|
+
]
|
|
555
603
|
},
|
|
556
604
|
UploadFileItemProp: {
|
|
557
605
|
group: "data-entry",
|
|
@@ -572,12 +620,28 @@ var COMPONENT_PROP_REGISTRY = {
|
|
|
572
620
|
CascaderProp: {
|
|
573
621
|
group: "data-entry",
|
|
574
622
|
file: "components/data-entry.prop.ts",
|
|
575
|
-
vocabulary: [
|
|
623
|
+
vocabulary: [
|
|
624
|
+
"ValueProp",
|
|
625
|
+
"DefaultValueProp",
|
|
626
|
+
"OnValueChangeProp",
|
|
627
|
+
"PlaceholderProp",
|
|
628
|
+
"DisabledProp",
|
|
629
|
+
"ClassNameProp",
|
|
630
|
+
"IdProp"
|
|
631
|
+
]
|
|
576
632
|
},
|
|
577
633
|
TreeSelectProp: {
|
|
578
634
|
group: "data-entry",
|
|
579
635
|
file: "components/data-entry.prop.ts",
|
|
580
|
-
vocabulary: [
|
|
636
|
+
vocabulary: [
|
|
637
|
+
"ValueProp",
|
|
638
|
+
"DefaultValueProp",
|
|
639
|
+
"OnValueChangeProp",
|
|
640
|
+
"PlaceholderProp",
|
|
641
|
+
"DisabledProp",
|
|
642
|
+
"ClassNameProp",
|
|
643
|
+
"IdProp"
|
|
644
|
+
]
|
|
581
645
|
},
|
|
582
646
|
ShowCheckedStrategyProp: {
|
|
583
647
|
group: "data-entry",
|
|
@@ -645,9 +709,17 @@ var COMPONENT_PROP_REGISTRY = {
|
|
|
645
709
|
"ConfirmLabelProp",
|
|
646
710
|
"CancelLabelProp",
|
|
647
711
|
"ConfirmVariantProp",
|
|
648
|
-
{
|
|
712
|
+
{
|
|
713
|
+
field: "confirmPhrase",
|
|
714
|
+
local: true,
|
|
715
|
+
reason: "Destructive-dialog type-to-confirm friction phrase."
|
|
716
|
+
},
|
|
649
717
|
"HandlerProp",
|
|
650
|
-
{
|
|
718
|
+
{
|
|
719
|
+
field: "keepOpenOnConfirm",
|
|
720
|
+
local: true,
|
|
721
|
+
reason: "AlertDialog-specific async completion behavior."
|
|
722
|
+
},
|
|
651
723
|
"PendingProp"
|
|
652
724
|
]
|
|
653
725
|
},
|
|
@@ -656,10 +728,18 @@ var COMPONENT_PROP_REGISTRY = {
|
|
|
656
728
|
group: "query",
|
|
657
729
|
file: "components/query.prop.ts",
|
|
658
730
|
vocabulary: [
|
|
659
|
-
{
|
|
731
|
+
{
|
|
732
|
+
field: "mutation",
|
|
733
|
+
local: true,
|
|
734
|
+
reason: "TanStack mutation lifecycle object consumed by this helper."
|
|
735
|
+
},
|
|
660
736
|
"HandlerProp",
|
|
661
737
|
{ field: "showRetry", local: true, reason: "Query helper retry affordance toggle." },
|
|
662
|
-
{
|
|
738
|
+
{
|
|
739
|
+
field: "pending",
|
|
740
|
+
local: true,
|
|
741
|
+
reason: "Inline pending ReactNode slot, not boolean PendingProp state."
|
|
742
|
+
},
|
|
663
743
|
"ClassNameProp"
|
|
664
744
|
]
|
|
665
745
|
},
|
|
@@ -672,7 +752,11 @@ var COMPONENT_PROP_REGISTRY = {
|
|
|
672
752
|
group: "query",
|
|
673
753
|
file: "components/query.prop.ts",
|
|
674
754
|
vocabulary: [
|
|
675
|
-
{
|
|
755
|
+
{
|
|
756
|
+
field: "query",
|
|
757
|
+
local: true,
|
|
758
|
+
reason: "TanStack query refetch handle consumed by this helper."
|
|
759
|
+
},
|
|
676
760
|
"LabelProp"
|
|
677
761
|
]
|
|
678
762
|
},
|
|
@@ -695,7 +779,14 @@ var COMPONENT_PROP_REGISTRY = {
|
|
|
695
779
|
AlertProp: {
|
|
696
780
|
group: "feedback",
|
|
697
781
|
file: "components/feedback.prop.ts",
|
|
698
|
-
vocabulary: [
|
|
782
|
+
vocabulary: [
|
|
783
|
+
"AlertVariantProp",
|
|
784
|
+
"ToneProp",
|
|
785
|
+
"IconProp",
|
|
786
|
+
"OnValueChangeProp",
|
|
787
|
+
"ClassNameProp",
|
|
788
|
+
"ChildrenProp"
|
|
789
|
+
]
|
|
699
790
|
},
|
|
700
791
|
AlertTitleProp: {
|
|
701
792
|
group: "feedback",
|
|
@@ -748,14 +839,22 @@ var COMPONENT_PROP_REGISTRY = {
|
|
|
748
839
|
file: "components/navigation.prop.ts",
|
|
749
840
|
vocabulary: ["SizeProp", "OnValueChangeProp", "ClassNameProp"]
|
|
750
841
|
},
|
|
751
|
-
StepItemProp: {
|
|
842
|
+
StepItemProp: {
|
|
843
|
+
group: "navigation",
|
|
844
|
+
file: "components/navigation.prop.ts",
|
|
845
|
+
vocabulary: ["TitleProp", "DescriptionProp", "IconProp", "DisabledProp"]
|
|
846
|
+
},
|
|
752
847
|
StepStatusProp: { group: "navigation", file: "components/navigation.prop.ts", vocabulary: [] },
|
|
753
848
|
TabsProp: {
|
|
754
849
|
group: "navigation",
|
|
755
850
|
file: "components/navigation.prop.ts",
|
|
756
851
|
vocabulary: ["ValueProp", "DefaultValueProp", "OnValueChangeProp", "ClassNameProp"]
|
|
757
852
|
},
|
|
758
|
-
TabItemProp: {
|
|
853
|
+
TabItemProp: {
|
|
854
|
+
group: "navigation",
|
|
855
|
+
file: "components/navigation.prop.ts",
|
|
856
|
+
vocabulary: ["ValueProp", "LabelProp", "ChildrenProp", "DisabledProp"]
|
|
857
|
+
},
|
|
759
858
|
FormRootProp: {
|
|
760
859
|
group: "form",
|
|
761
860
|
file: "components/form.prop.ts",
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { cn } from './chunk-U7N2A7A3.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
4
|
+
import { Check, Circle, ChevronRight } from 'lucide-react';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var Menubar = MenubarPrimitive.Root;
|
|
8
|
+
var MenubarMenu = MenubarPrimitive.Menu;
|
|
9
|
+
function MenubarTrigger(props) {
|
|
10
|
+
return /* @__PURE__ */ jsx(MenubarPrimitive.Trigger, { "data-slot": "menubar-trigger", ...props });
|
|
11
|
+
}
|
|
12
|
+
var MenubarContent = React.forwardRef(({ className, align = "start", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
13
|
+
MenubarPrimitive.Content,
|
|
14
|
+
{
|
|
15
|
+
ref,
|
|
16
|
+
"data-slot": "menubar-content",
|
|
17
|
+
align,
|
|
18
|
+
sideOffset,
|
|
19
|
+
className: cn("ui-menubar-content", className),
|
|
20
|
+
...props
|
|
21
|
+
}
|
|
22
|
+
) }));
|
|
23
|
+
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
24
|
+
var MenubarItem = React.forwardRef(({ className, inset, variant = "default", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
25
|
+
MenubarPrimitive.Item,
|
|
26
|
+
{
|
|
27
|
+
ref,
|
|
28
|
+
"data-slot": "menubar-item",
|
|
29
|
+
"data-inset": inset,
|
|
30
|
+
"data-variant": variant,
|
|
31
|
+
className: cn("ui-menubar-item", className),
|
|
32
|
+
...props
|
|
33
|
+
}
|
|
34
|
+
));
|
|
35
|
+
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
36
|
+
var MenubarCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
37
|
+
MenubarPrimitive.CheckboxItem,
|
|
38
|
+
{
|
|
39
|
+
ref,
|
|
40
|
+
"data-slot": "menubar-checkbox-item",
|
|
41
|
+
className: cn("ui-menubar-checkbox-item", className),
|
|
42
|
+
checked,
|
|
43
|
+
...props,
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ jsx("span", { className: "ui-menubar-item-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "ui-menubar-check" }) }) }),
|
|
46
|
+
children
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
));
|
|
50
|
+
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
|
51
|
+
var MenubarRadioGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
52
|
+
MenubarPrimitive.RadioGroup,
|
|
53
|
+
{
|
|
54
|
+
ref,
|
|
55
|
+
"data-slot": "menubar-radio-group",
|
|
56
|
+
className: cn("ui-menubar-radio-group", className),
|
|
57
|
+
...props
|
|
58
|
+
}
|
|
59
|
+
));
|
|
60
|
+
MenubarRadioGroup.displayName = MenubarPrimitive.RadioGroup.displayName;
|
|
61
|
+
var MenubarRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
62
|
+
MenubarPrimitive.RadioItem,
|
|
63
|
+
{
|
|
64
|
+
ref,
|
|
65
|
+
"data-slot": "menubar-radio-item",
|
|
66
|
+
className: cn("ui-menubar-radio-item", className),
|
|
67
|
+
...props,
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ jsx("span", { className: "ui-menubar-item-indicator", "aria-hidden": "true", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "ui-menubar-dot" }) }) }),
|
|
70
|
+
children
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
));
|
|
74
|
+
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
|
75
|
+
var MenubarLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
76
|
+
MenubarPrimitive.Label,
|
|
77
|
+
{
|
|
78
|
+
ref,
|
|
79
|
+
"data-slot": "menubar-label",
|
|
80
|
+
className: cn("ui-menubar-label", className),
|
|
81
|
+
...props
|
|
82
|
+
}
|
|
83
|
+
));
|
|
84
|
+
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
|
85
|
+
var MenubarSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
86
|
+
MenubarPrimitive.Separator,
|
|
87
|
+
{
|
|
88
|
+
ref,
|
|
89
|
+
"data-slot": "menubar-separator",
|
|
90
|
+
className: cn("ui-menubar-separator", className),
|
|
91
|
+
...props
|
|
92
|
+
}
|
|
93
|
+
));
|
|
94
|
+
MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
|
|
95
|
+
var MenubarShortcut = ({ className, ...props }) => /* @__PURE__ */ jsx("span", { "data-slot": "menubar-shortcut", className: cn("ui-menubar-shortcut", className), ...props });
|
|
96
|
+
var MenubarSub = MenubarPrimitive.Sub;
|
|
97
|
+
var MenubarSubTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
98
|
+
MenubarPrimitive.SubTrigger,
|
|
99
|
+
{
|
|
100
|
+
ref,
|
|
101
|
+
"data-slot": "menubar-sub-trigger",
|
|
102
|
+
className: cn("ui-menubar-sub-trigger", className),
|
|
103
|
+
...props,
|
|
104
|
+
children: [
|
|
105
|
+
children,
|
|
106
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "ui-menubar-sub-trigger-icon", "aria-hidden": "true" })
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
));
|
|
110
|
+
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
111
|
+
var MenubarSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
112
|
+
MenubarPrimitive.SubContent,
|
|
113
|
+
{
|
|
114
|
+
ref,
|
|
115
|
+
"data-slot": "menubar-sub-content",
|
|
116
|
+
className: cn("ui-menubar-sub-content", className),
|
|
117
|
+
...props
|
|
118
|
+
}
|
|
119
|
+
));
|
|
120
|
+
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
|
121
|
+
|
|
122
|
+
export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { cn } from './chunk-U7N2A7A3.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import useEmblaCarousel from 'embla-carousel-react';
|
|
4
|
+
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var CarouselContext = React.createContext(null);
|
|
8
|
+
var useCarousel = () => {
|
|
9
|
+
const context = React.useContext(CarouselContext);
|
|
10
|
+
if (!context) {
|
|
11
|
+
throw new Error("useCarousel must be used within a Carousel component");
|
|
12
|
+
}
|
|
13
|
+
return context;
|
|
14
|
+
};
|
|
15
|
+
var Carousel = React.forwardRef(({ className, opts, plugins, setApi, children, ...props }, ref) => {
|
|
16
|
+
const [emblaRef, api] = useEmblaCarousel(opts, plugins);
|
|
17
|
+
const [canScrollPrev, setCanScrollPrev] = React.useState(false);
|
|
18
|
+
const [canScrollNext, setCanScrollNext] = React.useState(false);
|
|
19
|
+
const onSelect = React.useCallback(() => {
|
|
20
|
+
if (!api) return;
|
|
21
|
+
setCanScrollPrev(api.canScrollPrev());
|
|
22
|
+
setCanScrollNext(api.canScrollNext());
|
|
23
|
+
}, [api]);
|
|
24
|
+
React.useEffect(() => {
|
|
25
|
+
if (!api) return void 0;
|
|
26
|
+
onSelect();
|
|
27
|
+
setApi?.(api);
|
|
28
|
+
api.on("reInit", onSelect);
|
|
29
|
+
api.on("select", onSelect);
|
|
30
|
+
return () => {
|
|
31
|
+
api.off("reInit", onSelect);
|
|
32
|
+
api.off("select", onSelect);
|
|
33
|
+
};
|
|
34
|
+
}, [api, onSelect, setApi]);
|
|
35
|
+
const scrollPrev = React.useCallback(() => {
|
|
36
|
+
api?.scrollPrev();
|
|
37
|
+
}, [api]);
|
|
38
|
+
const scrollNext = React.useCallback(() => {
|
|
39
|
+
api?.scrollNext();
|
|
40
|
+
}, [api]);
|
|
41
|
+
const scrollTo = React.useCallback(
|
|
42
|
+
(index) => {
|
|
43
|
+
api?.scrollTo(index);
|
|
44
|
+
},
|
|
45
|
+
[api]
|
|
46
|
+
);
|
|
47
|
+
const contextValue = React.useMemo(
|
|
48
|
+
() => ({
|
|
49
|
+
canScrollPrev,
|
|
50
|
+
canScrollNext,
|
|
51
|
+
api,
|
|
52
|
+
scrollPrev,
|
|
53
|
+
scrollNext,
|
|
54
|
+
scrollTo
|
|
55
|
+
}),
|
|
56
|
+
[canScrollPrev, canScrollNext, api, scrollPrev, scrollNext, scrollTo]
|
|
57
|
+
);
|
|
58
|
+
return /* @__PURE__ */ jsx(CarouselContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
ref,
|
|
62
|
+
"data-slot": "carousel",
|
|
63
|
+
className: cn("ui-carousel", className),
|
|
64
|
+
"data-orientation": opts?.axis === "y" ? "vertical" : "horizontal",
|
|
65
|
+
...props,
|
|
66
|
+
children: /* @__PURE__ */ jsx("div", { className: "ui-carousel-viewport", ref: emblaRef, children })
|
|
67
|
+
}
|
|
68
|
+
) });
|
|
69
|
+
});
|
|
70
|
+
Carousel.displayName = "Carousel";
|
|
71
|
+
var CarouselContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
72
|
+
"div",
|
|
73
|
+
{
|
|
74
|
+
ref,
|
|
75
|
+
"data-slot": "carousel-content",
|
|
76
|
+
className: cn("ui-carousel-content", className),
|
|
77
|
+
...props
|
|
78
|
+
}
|
|
79
|
+
));
|
|
80
|
+
CarouselContent.displayName = "CarouselContent";
|
|
81
|
+
var CarouselItem = React.forwardRef(
|
|
82
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
ref,
|
|
86
|
+
"data-slot": "carousel-item",
|
|
87
|
+
className: cn("ui-carousel-item", className),
|
|
88
|
+
...props
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
);
|
|
92
|
+
CarouselItem.displayName = "CarouselItem";
|
|
93
|
+
var CarouselPrevious = React.forwardRef(({ className, ...props }, ref) => {
|
|
94
|
+
const { canScrollPrev, scrollPrev } = useCarousel();
|
|
95
|
+
return /* @__PURE__ */ jsxs(
|
|
96
|
+
"button",
|
|
97
|
+
{
|
|
98
|
+
ref,
|
|
99
|
+
type: "button",
|
|
100
|
+
"data-slot": "carousel-previous",
|
|
101
|
+
disabled: !canScrollPrev,
|
|
102
|
+
className: cn("ui-carousel-previous", className),
|
|
103
|
+
onClick: scrollPrev,
|
|
104
|
+
...props,
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ jsx(ChevronLeft, { className: "ui-carousel-arrow", "aria-hidden": "true" }),
|
|
107
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous" })
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
});
|
|
112
|
+
CarouselPrevious.displayName = "CarouselPrevious";
|
|
113
|
+
var CarouselNext = React.forwardRef(({ className, ...props }, ref) => {
|
|
114
|
+
const { canScrollNext, scrollNext } = useCarousel();
|
|
115
|
+
return /* @__PURE__ */ jsxs(
|
|
116
|
+
"button",
|
|
117
|
+
{
|
|
118
|
+
ref,
|
|
119
|
+
type: "button",
|
|
120
|
+
"data-slot": "carousel-next",
|
|
121
|
+
disabled: !canScrollNext,
|
|
122
|
+
className: cn("ui-carousel-next", className),
|
|
123
|
+
onClick: scrollNext,
|
|
124
|
+
...props,
|
|
125
|
+
children: [
|
|
126
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "ui-carousel-arrow", "aria-hidden": "true" }),
|
|
127
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next" })
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
});
|
|
132
|
+
CarouselNext.displayName = "CarouselNext";
|
|
133
|
+
|
|
134
|
+
export { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, useCarousel };
|