@cnc-ti/layout-basic 8.3.8 → 8.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +3 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +89 -55
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +88 -55
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -43,6 +43,7 @@ __export(src_exports, {
|
|
|
43
43
|
CardFooter: () => CardFooter,
|
|
44
44
|
CardFooterItem: () => CardFooterItem,
|
|
45
45
|
CardHeader: () => CardHeader,
|
|
46
|
+
Checkbox: () => Checkbox,
|
|
46
47
|
Collapsible: () => Collapsible,
|
|
47
48
|
CollapsibleContent: () => AnimatedCollapsibleContent,
|
|
48
49
|
CollapsibleTrigger: () => CollapsibleTrigger2,
|
|
@@ -10174,7 +10175,7 @@ function Sidebar({ children, ...rest }) {
|
|
|
10174
10175
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Accordion.Root, { ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
10175
10176
|
"div",
|
|
10176
10177
|
{
|
|
10177
|
-
className: "cnc-w-full cnc-h-screen-minus-70 cnc-flex cnc-flex-col cnc-py-8 cnc-bg-primary-800 cnc-px-5 \
|
|
10178
|
+
className: "cnc-w-full cnc-h-screen-minus-70 cnc-flex cnc-flex-col cnc-py-8 cnc-bg-primary-800 cnc-px-5 \n cnc-scroll-smooth cnc-overflow-y-auto\n [&::-webkit-scrollbar]:cnc-w-1\n [&::-webkit-scrollbar-track]:cnc-bg-brand-blue-500\n [&::-webkit-scrollbar-thumb]:cnc-rounded\n [&::-webkit-scrollbar-thumb]:cnc-border\n [&::-webkit-scrollbar-thumb]:cnc-border-solid\n [&::-webkit-scrollbar-thumb]:cnc-border-brand-gray-400\n [&::-webkit-scrollbar-thumb]:cnc-bg-brand-gray-200\n cnc-sidebar-child-w-0",
|
|
10178
10179
|
children
|
|
10179
10180
|
}
|
|
10180
10181
|
) });
|
|
@@ -12206,8 +12207,39 @@ var Input = React74.forwardRef(
|
|
|
12206
12207
|
);
|
|
12207
12208
|
Input.displayName = "Input";
|
|
12208
12209
|
|
|
12209
|
-
// src/components/atoms/
|
|
12210
|
+
// src/components/atoms/forms/checkbox.tsx
|
|
12211
|
+
var React75 = __toESM(require("react"));
|
|
12210
12212
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
12213
|
+
var Checkbox = React75.forwardRef(
|
|
12214
|
+
({ className, id, label, ...props }, ref) => {
|
|
12215
|
+
console.log();
|
|
12216
|
+
const idGenerate = id ? id : label && `field-${Date.now()}-${Math.random() * 1e5}`;
|
|
12217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "cnc-w-full cnc-flex cnc-flex-row cnc-items-baseline", children: [
|
|
12218
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12219
|
+
"input",
|
|
12220
|
+
{
|
|
12221
|
+
type: "checkbox",
|
|
12222
|
+
id: idGenerate,
|
|
12223
|
+
className: cn(className),
|
|
12224
|
+
ref,
|
|
12225
|
+
...props
|
|
12226
|
+
}
|
|
12227
|
+
),
|
|
12228
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12229
|
+
"label",
|
|
12230
|
+
{
|
|
12231
|
+
htmlFor: idGenerate,
|
|
12232
|
+
className: "cnc-block cnc-text-sm cnc-mb-1 cnc-font-medium cnc-text-brand-gray-600 cnc-ml-2",
|
|
12233
|
+
children: label
|
|
12234
|
+
}
|
|
12235
|
+
)
|
|
12236
|
+
] });
|
|
12237
|
+
}
|
|
12238
|
+
);
|
|
12239
|
+
Checkbox.displayName = "Checkbox";
|
|
12240
|
+
|
|
12241
|
+
// src/components/atoms/display/badge.tsx
|
|
12242
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
12211
12243
|
var Badge = ({
|
|
12212
12244
|
variant = "default",
|
|
12213
12245
|
rounded = true,
|
|
@@ -12229,7 +12261,7 @@ var Badge = ({
|
|
|
12229
12261
|
md: "cnc-text-sm cnc-px-3 cnc-py-1",
|
|
12230
12262
|
lg: "cnc-text-base cnc-px-4 cnc-py-2"
|
|
12231
12263
|
};
|
|
12232
|
-
return /* @__PURE__ */ (0,
|
|
12264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
12233
12265
|
"span",
|
|
12234
12266
|
{
|
|
12235
12267
|
className: cn(
|
|
@@ -12245,12 +12277,12 @@ var Badge = ({
|
|
|
12245
12277
|
};
|
|
12246
12278
|
|
|
12247
12279
|
// src/components/molecules/card.tsx
|
|
12248
|
-
var
|
|
12280
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
12249
12281
|
function Card({
|
|
12250
12282
|
className,
|
|
12251
12283
|
...rest
|
|
12252
12284
|
}) {
|
|
12253
|
-
return /* @__PURE__ */ (0,
|
|
12285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
12254
12286
|
"div",
|
|
12255
12287
|
{
|
|
12256
12288
|
className: cn(
|
|
@@ -12265,7 +12297,7 @@ function CardHeader({
|
|
|
12265
12297
|
className,
|
|
12266
12298
|
...rest
|
|
12267
12299
|
}) {
|
|
12268
|
-
return /* @__PURE__ */ (0,
|
|
12300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "cnc-px-6 cnc-pt-6", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
12269
12301
|
"div",
|
|
12270
12302
|
{
|
|
12271
12303
|
className: cn(
|
|
@@ -12280,13 +12312,13 @@ function CardContent({
|
|
|
12280
12312
|
className,
|
|
12281
12313
|
...rest
|
|
12282
12314
|
}) {
|
|
12283
|
-
return /* @__PURE__ */ (0,
|
|
12315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: cn("cnc-px-6 cnc-py-2", className), ...rest });
|
|
12284
12316
|
}
|
|
12285
12317
|
function CardFooter({
|
|
12286
12318
|
className,
|
|
12287
12319
|
...rest
|
|
12288
12320
|
}) {
|
|
12289
|
-
return /* @__PURE__ */ (0,
|
|
12321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
12290
12322
|
"div",
|
|
12291
12323
|
{
|
|
12292
12324
|
className: cn(
|
|
@@ -12301,7 +12333,7 @@ function CardFooterItem({
|
|
|
12301
12333
|
className,
|
|
12302
12334
|
...rest
|
|
12303
12335
|
}) {
|
|
12304
|
-
return /* @__PURE__ */ (0,
|
|
12336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
12305
12337
|
"div",
|
|
12306
12338
|
{
|
|
12307
12339
|
className: cn(
|
|
@@ -12315,7 +12347,7 @@ function CardFooterItem({
|
|
|
12315
12347
|
|
|
12316
12348
|
// src/components/molecules/collapsible.tsx
|
|
12317
12349
|
var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible"));
|
|
12318
|
-
var
|
|
12350
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
12319
12351
|
var Collapsible = CollapsiblePrimitive.Root;
|
|
12320
12352
|
var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
|
12321
12353
|
var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
@@ -12323,16 +12355,16 @@ var AnimatedCollapsibleContent = ({
|
|
|
12323
12355
|
className,
|
|
12324
12356
|
...rest
|
|
12325
12357
|
}) => {
|
|
12326
|
-
return /* @__PURE__ */ (0,
|
|
12358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CollapsibleContent2, { className: "cnc-collapsible-content", ...rest });
|
|
12327
12359
|
};
|
|
12328
12360
|
|
|
12329
12361
|
// src/components/molecules/display/page-header.tsx
|
|
12330
|
-
var
|
|
12362
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
12331
12363
|
function PageHeader({
|
|
12332
12364
|
children,
|
|
12333
12365
|
className
|
|
12334
12366
|
}) {
|
|
12335
|
-
return /* @__PURE__ */ (0,
|
|
12367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
12336
12368
|
"header",
|
|
12337
12369
|
{
|
|
12338
12370
|
className: cn(
|
|
@@ -12347,7 +12379,7 @@ function PageHeaderTitleContent({
|
|
|
12347
12379
|
children,
|
|
12348
12380
|
className
|
|
12349
12381
|
}) {
|
|
12350
|
-
return /* @__PURE__ */ (0,
|
|
12382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
12351
12383
|
"div",
|
|
12352
12384
|
{
|
|
12353
12385
|
className: cn(
|
|
@@ -12364,16 +12396,16 @@ function PageHeaderTitle({
|
|
|
12364
12396
|
titleAs = "h1"
|
|
12365
12397
|
}) {
|
|
12366
12398
|
const ComponentTitle = titleAs;
|
|
12367
|
-
return /* @__PURE__ */ (0,
|
|
12368
|
-
/* @__PURE__ */ (0,
|
|
12369
|
-
description && /* @__PURE__ */ (0,
|
|
12399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { children: [
|
|
12400
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ComponentTitle, { className: "cnc-text-2xl cnc-font-semibold cnc-text-brand-blue-600", children: title }),
|
|
12401
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "cnc-text-sm cnc-text-brand-gray-500", children: description })
|
|
12370
12402
|
] });
|
|
12371
12403
|
}
|
|
12372
12404
|
function PageHeaderActionsContainer({
|
|
12373
12405
|
children,
|
|
12374
12406
|
className
|
|
12375
12407
|
}) {
|
|
12376
|
-
return /* @__PURE__ */ (0,
|
|
12408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
12377
12409
|
"div",
|
|
12378
12410
|
{
|
|
12379
12411
|
className: cn(
|
|
@@ -12385,14 +12417,14 @@ function PageHeaderActionsContainer({
|
|
|
12385
12417
|
);
|
|
12386
12418
|
}
|
|
12387
12419
|
function Title2({ title, as: Component = "h1" }) {
|
|
12388
|
-
return /* @__PURE__ */ (0,
|
|
12420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Component, { className: "cnc-text-[24px] cnc-text-[#1F2C4D] cnc-font-bold cnc-mt-2 cnc-mb-4 text-center md:cnc-text-[28px] md:cnc-text-left", children: title });
|
|
12389
12421
|
}
|
|
12390
12422
|
|
|
12391
12423
|
// src/components/molecules/forms/combobox.tsx
|
|
12392
|
-
var
|
|
12424
|
+
var React80 = __toESM(require("react"));
|
|
12393
12425
|
|
|
12394
12426
|
// src/components/molecules/overlay/command.tsx
|
|
12395
|
-
var
|
|
12427
|
+
var React78 = __toESM(require("react"));
|
|
12396
12428
|
|
|
12397
12429
|
// ../../node_modules/cmdk/dist/chunk-NZJY6EH4.mjs
|
|
12398
12430
|
var U = 1;
|
|
@@ -12425,10 +12457,10 @@ function W(_, C, h) {
|
|
|
12425
12457
|
var t = __toESM(require("react"), 1);
|
|
12426
12458
|
|
|
12427
12459
|
// ../../node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
12428
|
-
var
|
|
12460
|
+
var React76 = __toESM(require("react"), 1);
|
|
12429
12461
|
var ReactDOM8 = __toESM(require("react-dom"), 1);
|
|
12430
12462
|
var import_react_slot10 = require("@radix-ui/react-slot");
|
|
12431
|
-
var
|
|
12463
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
12432
12464
|
var NODES4 = [
|
|
12433
12465
|
"a",
|
|
12434
12466
|
"button",
|
|
@@ -12450,20 +12482,20 @@ var NODES4 = [
|
|
|
12450
12482
|
];
|
|
12451
12483
|
var Primitive4 = NODES4.reduce((primitive, node) => {
|
|
12452
12484
|
const Slot8 = (0, import_react_slot10.createSlot)(`Primitive.${node}`);
|
|
12453
|
-
const Node2 =
|
|
12485
|
+
const Node2 = React76.forwardRef((props, forwardedRef) => {
|
|
12454
12486
|
const { asChild, ...primitiveProps } = props;
|
|
12455
12487
|
const Comp = asChild ? Slot8 : node;
|
|
12456
12488
|
if (typeof window !== "undefined") {
|
|
12457
12489
|
window[Symbol.for("radix-ui")] = true;
|
|
12458
12490
|
}
|
|
12459
|
-
return /* @__PURE__ */ (0,
|
|
12491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
12460
12492
|
});
|
|
12461
12493
|
Node2.displayName = `Primitive.${node}`;
|
|
12462
12494
|
return { ...primitive, [node]: Node2 };
|
|
12463
12495
|
}, {});
|
|
12464
12496
|
|
|
12465
12497
|
// ../../node_modules/cmdk/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
12466
|
-
var
|
|
12498
|
+
var React77 = __toESM(require("react"), 1);
|
|
12467
12499
|
function setRef4(ref, value) {
|
|
12468
12500
|
if (typeof ref === "function") {
|
|
12469
12501
|
return ref(value);
|
|
@@ -12813,8 +12845,8 @@ function B2({ asChild: r2, children: o }, n) {
|
|
|
12813
12845
|
var Te = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
|
|
12814
12846
|
|
|
12815
12847
|
// src/components/molecules/overlay/command.tsx
|
|
12816
|
-
var
|
|
12817
|
-
var Command =
|
|
12848
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
12849
|
+
var Command = React78.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12818
12850
|
_e,
|
|
12819
12851
|
{
|
|
12820
12852
|
ref,
|
|
@@ -12827,16 +12859,16 @@ var Command = React77.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
12827
12859
|
));
|
|
12828
12860
|
Command.displayName = _e.displayName;
|
|
12829
12861
|
var CommandDialog = ({ children, ...props }) => {
|
|
12830
|
-
return /* @__PURE__ */ (0,
|
|
12862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Dialog2, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DialogContent2, { className: "cnc-overflow-hidden cnc-p-0", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Command, { className: "cnc-[&_cmdk-group-heading]:cnc-px-2 cnc-[&_cmdk-group-heading]:cnc-font-medium cnc-[&_cmdk-group-heading]:cnc-text-muted-foreground cnc-[&_cmdk-group]:not([hidden])~[cmdk-group]:cnc-pt-0 cnc-[&_cmdk-group]:cnc-px-2 cnc-[&_cmdk-input-wrapper]_svg:cnc-h-5 cnc-[&_cmdk-input-wrapper]_svg:cnc-w-5 cnc-[&_cmdk-input]:cnc-h-12 cnc-[&_cmdk-item]:cnc-px-2 cnc-[&_cmdk-item]:cnc-py-3 cnc-[&_cmdk-item]_svg:cnc-h-5 cnc-[&_cmdk-item]_svg:cnc-w-5", children }) }) });
|
|
12831
12863
|
};
|
|
12832
|
-
var CommandInput =
|
|
12864
|
+
var CommandInput = React78.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
12833
12865
|
"div",
|
|
12834
12866
|
{
|
|
12835
12867
|
className: "cnc-flex cnc-items-center cnc-border-b cnc-px-3",
|
|
12836
12868
|
"cmdk-input-wrapper": "",
|
|
12837
12869
|
children: [
|
|
12838
|
-
/* @__PURE__ */ (0,
|
|
12839
|
-
/* @__PURE__ */ (0,
|
|
12870
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Search, { className: "cnc-mr-2 cnc-h-4 cnc-w-4 cnc-shrink-0 cnc-opacity-50" }),
|
|
12871
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12840
12872
|
_e.Input,
|
|
12841
12873
|
{
|
|
12842
12874
|
ref,
|
|
@@ -12851,7 +12883,7 @@ var CommandInput = React77.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
12851
12883
|
}
|
|
12852
12884
|
));
|
|
12853
12885
|
CommandInput.displayName = _e.Input.displayName;
|
|
12854
|
-
var CommandList =
|
|
12886
|
+
var CommandList = React78.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12855
12887
|
_e.List,
|
|
12856
12888
|
{
|
|
12857
12889
|
ref,
|
|
@@ -12863,7 +12895,7 @@ var CommandList = React77.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
12863
12895
|
}
|
|
12864
12896
|
));
|
|
12865
12897
|
CommandList.displayName = _e.List.displayName;
|
|
12866
|
-
var CommandEmpty =
|
|
12898
|
+
var CommandEmpty = React78.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12867
12899
|
_e.Empty,
|
|
12868
12900
|
{
|
|
12869
12901
|
ref,
|
|
@@ -12872,7 +12904,7 @@ var CommandEmpty = React77.forwardRef((props, ref) => /* @__PURE__ */ (0, import
|
|
|
12872
12904
|
}
|
|
12873
12905
|
));
|
|
12874
12906
|
CommandEmpty.displayName = _e.Empty.displayName;
|
|
12875
|
-
var CommandGroup =
|
|
12907
|
+
var CommandGroup = React78.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12876
12908
|
_e.Group,
|
|
12877
12909
|
{
|
|
12878
12910
|
ref,
|
|
@@ -12884,7 +12916,7 @@ var CommandGroup = React77.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
12884
12916
|
}
|
|
12885
12917
|
));
|
|
12886
12918
|
CommandGroup.displayName = _e.Group.displayName;
|
|
12887
|
-
var CommandSeparator =
|
|
12919
|
+
var CommandSeparator = React78.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12888
12920
|
_e.Separator,
|
|
12889
12921
|
{
|
|
12890
12922
|
ref,
|
|
@@ -12893,7 +12925,7 @@ var CommandSeparator = React77.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
12893
12925
|
}
|
|
12894
12926
|
));
|
|
12895
12927
|
CommandSeparator.displayName = _e.Separator.displayName;
|
|
12896
|
-
var CommandItem =
|
|
12928
|
+
var CommandItem = React78.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12897
12929
|
_e.Item,
|
|
12898
12930
|
{
|
|
12899
12931
|
ref,
|
|
@@ -12909,7 +12941,7 @@ var CommandShortcut = ({
|
|
|
12909
12941
|
className,
|
|
12910
12942
|
...props
|
|
12911
12943
|
}) => {
|
|
12912
|
-
return /* @__PURE__ */ (0,
|
|
12944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
12913
12945
|
"span",
|
|
12914
12946
|
{
|
|
12915
12947
|
className: cn(
|
|
@@ -12923,11 +12955,11 @@ var CommandShortcut = ({
|
|
|
12923
12955
|
CommandShortcut.displayName = "CommandShortcut";
|
|
12924
12956
|
|
|
12925
12957
|
// src/components/molecules/overlay/popover.tsx
|
|
12926
|
-
var
|
|
12927
|
-
var
|
|
12958
|
+
var React79 = __toESM(require("react"));
|
|
12959
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
12928
12960
|
var Popover3 = Root24;
|
|
12929
12961
|
var PopoverTrigger3 = Trigger4;
|
|
12930
|
-
var PopoverContent3 =
|
|
12962
|
+
var PopoverContent3 = React79.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Portal6, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
12931
12963
|
Content23,
|
|
12932
12964
|
{
|
|
12933
12965
|
ref,
|
|
@@ -12943,7 +12975,7 @@ var PopoverContent3 = React78.forwardRef(({ className, align = "center", sideOff
|
|
|
12943
12975
|
PopoverContent3.displayName = Content23.displayName;
|
|
12944
12976
|
|
|
12945
12977
|
// src/components/molecules/forms/combobox.tsx
|
|
12946
|
-
var
|
|
12978
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
12947
12979
|
function Combobox({
|
|
12948
12980
|
options,
|
|
12949
12981
|
placeholder = "",
|
|
@@ -12951,30 +12983,31 @@ function Combobox({
|
|
|
12951
12983
|
onChange,
|
|
12952
12984
|
value = ""
|
|
12953
12985
|
}) {
|
|
12954
|
-
const [open, setOpen] =
|
|
12955
|
-
return /* @__PURE__ */ (0,
|
|
12956
|
-
/* @__PURE__ */ (0,
|
|
12957
|
-
|
|
12986
|
+
const [open, setOpen] = React80.useState(false);
|
|
12987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Popover3, { open, onOpenChange: setOpen, children: [
|
|
12988
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(PopoverTrigger3, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
12989
|
+
Button,
|
|
12958
12990
|
{
|
|
12991
|
+
variant: "outline",
|
|
12959
12992
|
role: "combobox",
|
|
12960
12993
|
"aria-expanded": open,
|
|
12961
|
-
className: "cnc-
|
|
12994
|
+
className: "cnc-w-full cnc-justify-between",
|
|
12962
12995
|
children: [
|
|
12963
12996
|
value ? options?.find((framework) => framework.value === value)?.label : placeholder,
|
|
12964
|
-
/* @__PURE__ */ (0,
|
|
12997
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ChevronsUpDown, { className: "cnc-ml-2 cnc-h-4 cnc-w-4 cnc-shrink-0 cnc-opacity-50" })
|
|
12965
12998
|
]
|
|
12966
12999
|
}
|
|
12967
13000
|
) }),
|
|
12968
|
-
/* @__PURE__ */ (0,
|
|
13001
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
12969
13002
|
PopoverContent3,
|
|
12970
13003
|
{
|
|
12971
13004
|
align: "start",
|
|
12972
13005
|
className: "cnc-w-[--radix-popover-trigger-width] cnc-p-0",
|
|
12973
|
-
children: /* @__PURE__ */ (0,
|
|
12974
|
-
/* @__PURE__ */ (0,
|
|
12975
|
-
/* @__PURE__ */ (0,
|
|
12976
|
-
/* @__PURE__ */ (0,
|
|
12977
|
-
/* @__PURE__ */ (0,
|
|
13006
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Command, { children: [
|
|
13007
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(CommandInput, { placeholder: command?.placeholder }),
|
|
13008
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(CommandList, { children: [
|
|
13009
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(CommandEmpty, { children: command?.emptyMessage ?? "Nenhum item encontrado" }),
|
|
13010
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(CommandGroup, { children: options?.map((option) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
12978
13011
|
CommandItem,
|
|
12979
13012
|
{
|
|
12980
13013
|
value: option.value,
|
|
@@ -12985,7 +13018,7 @@ function Combobox({
|
|
|
12985
13018
|
},
|
|
12986
13019
|
keywords: [option.value, option.label],
|
|
12987
13020
|
children: [
|
|
12988
|
-
/* @__PURE__ */ (0,
|
|
13021
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
12989
13022
|
Check,
|
|
12990
13023
|
{
|
|
12991
13024
|
className: cn(
|
|
@@ -13015,6 +13048,7 @@ function Combobox({
|
|
|
13015
13048
|
CardFooter,
|
|
13016
13049
|
CardFooterItem,
|
|
13017
13050
|
CardHeader,
|
|
13051
|
+
Checkbox,
|
|
13018
13052
|
Collapsible,
|
|
13019
13053
|
CollapsibleContent,
|
|
13020
13054
|
CollapsibleTrigger,
|