@cnc-ti/layout-basic 8.3.12 → 8.3.14
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 +6 -8
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +97 -64
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +96 -64
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -2650,17 +2650,16 @@ function cn(...inputs) {
|
|
|
2650
2650
|
// src/components/Button/index.tsx
|
|
2651
2651
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2652
2652
|
var buttonVariants = cva(
|
|
2653
|
-
"cnc-inline-flex cnc-items-center cnc-justify-center cnc-border cnc-
|
|
2653
|
+
"cnc-inline-flex cnc-items-center cnc-justify-center cnc-border cnc-whitespace-nowrap cnc-rounded-md cnc-text-sm cnc-font-medium cnc-ring-offset-background cnc-transition-colors focus-visible:cnc-outline-none focus-visible:cnc-ring-2 focus-visible:cnc-ring-ring focus-visible:cnc-ring-offset-2 disabled:cnc-pointer-events-none disabled:cnc-opacity-50",
|
|
2654
2654
|
{
|
|
2655
2655
|
variants: {
|
|
2656
2656
|
variant: {
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
2657
|
+
confirm: "cnc-bg-brand-blue-400 cnc-border-brand-blue-500 hover:cnc-bg-brand-blue-400/90 cnc-text-white",
|
|
2658
|
+
create: "cnc-bg-brand-green-100 cnc-border-brand-green-200 hover:cnc-bg-brand-green-100/80 cnc-text-white",
|
|
2659
|
+
secondary: "cnc-bg-brand-gray-20 cnc-text-secondary-foreground hover:cnc-brightness-95 cnc-text-white",
|
|
2660
|
+
danger: "cnc-bg-brand-red-500 cnc-border-brand-red-600 hover:cnc-bg-brand-red-500/80 cnc-text-white",
|
|
2661
|
+
outline: "cnc-border cnc-border-input cnc-text-brand-gray-200 cnc-bg-background cnc-shadow-sm hover:cnc-bg-brand-blue-50 hover:cnc-text-accent-foreground",
|
|
2662
|
+
default: "cnc-bg-primary cnc-text-primary-foreground hover:cnc-bg-primary/90 cnc-text-white"
|
|
2664
2663
|
},
|
|
2665
2664
|
size: {
|
|
2666
2665
|
default: "cnc-h-10 cnc-px-4 cnc-py-2",
|
|
@@ -10064,7 +10063,7 @@ function Sidebar({ children, ...rest }) {
|
|
|
10064
10063
|
return /* @__PURE__ */ jsx26(Accordion.Root, { ...rest, children: /* @__PURE__ */ jsx26(
|
|
10065
10064
|
"div",
|
|
10066
10065
|
{
|
|
10067
|
-
className: "cnc-w-full cnc-h-screen-minus-70 cnc-flex cnc-flex-col cnc-py-8 cnc-bg-primary-800 cnc-px-5 \
|
|
10066
|
+
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",
|
|
10068
10067
|
children
|
|
10069
10068
|
}
|
|
10070
10069
|
) });
|
|
@@ -12096,8 +12095,39 @@ var Input = React74.forwardRef(
|
|
|
12096
12095
|
);
|
|
12097
12096
|
Input.displayName = "Input";
|
|
12098
12097
|
|
|
12098
|
+
// src/components/atoms/forms/checkbox.tsx
|
|
12099
|
+
import * as React75 from "react";
|
|
12100
|
+
import { jsx as jsx38, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
12101
|
+
var Checkbox = React75.forwardRef(
|
|
12102
|
+
({ className, id, label, ...props }, ref) => {
|
|
12103
|
+
console.log();
|
|
12104
|
+
const idGenerate = id ? id : label && `field-${Date.now()}-${Math.random() * 1e5}`;
|
|
12105
|
+
return /* @__PURE__ */ jsxs12("div", { className: "cnc-w-full cnc-flex cnc-flex-row", children: [
|
|
12106
|
+
/* @__PURE__ */ jsx38(
|
|
12107
|
+
"input",
|
|
12108
|
+
{
|
|
12109
|
+
type: "checkbox",
|
|
12110
|
+
id: idGenerate,
|
|
12111
|
+
className: cn("cnc-w-6 cnc-h-6", className),
|
|
12112
|
+
ref,
|
|
12113
|
+
...props
|
|
12114
|
+
}
|
|
12115
|
+
),
|
|
12116
|
+
label && /* @__PURE__ */ jsx38(
|
|
12117
|
+
"label",
|
|
12118
|
+
{
|
|
12119
|
+
htmlFor: idGenerate,
|
|
12120
|
+
className: "cnc-block cnc-text-sm cnc-font-medium cnc-text-brand-gray-600 cnc-ml-2",
|
|
12121
|
+
children: label
|
|
12122
|
+
}
|
|
12123
|
+
)
|
|
12124
|
+
] });
|
|
12125
|
+
}
|
|
12126
|
+
);
|
|
12127
|
+
Checkbox.displayName = "Checkbox";
|
|
12128
|
+
|
|
12099
12129
|
// src/components/atoms/display/badge.tsx
|
|
12100
|
-
import { jsx as
|
|
12130
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
12101
12131
|
var Badge = ({
|
|
12102
12132
|
variant = "default",
|
|
12103
12133
|
rounded = true,
|
|
@@ -12119,7 +12149,7 @@ var Badge = ({
|
|
|
12119
12149
|
md: "cnc-text-sm cnc-px-3 cnc-py-1",
|
|
12120
12150
|
lg: "cnc-text-base cnc-px-4 cnc-py-2"
|
|
12121
12151
|
};
|
|
12122
|
-
return /* @__PURE__ */
|
|
12152
|
+
return /* @__PURE__ */ jsx39(
|
|
12123
12153
|
"span",
|
|
12124
12154
|
{
|
|
12125
12155
|
className: cn(
|
|
@@ -12135,12 +12165,12 @@ var Badge = ({
|
|
|
12135
12165
|
};
|
|
12136
12166
|
|
|
12137
12167
|
// src/components/molecules/card.tsx
|
|
12138
|
-
import { jsx as
|
|
12168
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
12139
12169
|
function Card({
|
|
12140
12170
|
className,
|
|
12141
12171
|
...rest
|
|
12142
12172
|
}) {
|
|
12143
|
-
return /* @__PURE__ */
|
|
12173
|
+
return /* @__PURE__ */ jsx40(
|
|
12144
12174
|
"div",
|
|
12145
12175
|
{
|
|
12146
12176
|
className: cn(
|
|
@@ -12155,7 +12185,7 @@ function CardHeader({
|
|
|
12155
12185
|
className,
|
|
12156
12186
|
...rest
|
|
12157
12187
|
}) {
|
|
12158
|
-
return /* @__PURE__ */
|
|
12188
|
+
return /* @__PURE__ */ jsx40("div", { className: "cnc-px-6 cnc-pt-6", children: /* @__PURE__ */ jsx40(
|
|
12159
12189
|
"div",
|
|
12160
12190
|
{
|
|
12161
12191
|
className: cn(
|
|
@@ -12170,13 +12200,13 @@ function CardContent({
|
|
|
12170
12200
|
className,
|
|
12171
12201
|
...rest
|
|
12172
12202
|
}) {
|
|
12173
|
-
return /* @__PURE__ */
|
|
12203
|
+
return /* @__PURE__ */ jsx40("div", { className: cn("cnc-px-6 cnc-py-2", className), ...rest });
|
|
12174
12204
|
}
|
|
12175
12205
|
function CardFooter({
|
|
12176
12206
|
className,
|
|
12177
12207
|
...rest
|
|
12178
12208
|
}) {
|
|
12179
|
-
return /* @__PURE__ */
|
|
12209
|
+
return /* @__PURE__ */ jsx40(
|
|
12180
12210
|
"div",
|
|
12181
12211
|
{
|
|
12182
12212
|
className: cn(
|
|
@@ -12191,7 +12221,7 @@ function CardFooterItem({
|
|
|
12191
12221
|
className,
|
|
12192
12222
|
...rest
|
|
12193
12223
|
}) {
|
|
12194
|
-
return /* @__PURE__ */
|
|
12224
|
+
return /* @__PURE__ */ jsx40(
|
|
12195
12225
|
"div",
|
|
12196
12226
|
{
|
|
12197
12227
|
className: cn(
|
|
@@ -12205,7 +12235,7 @@ function CardFooterItem({
|
|
|
12205
12235
|
|
|
12206
12236
|
// src/components/molecules/collapsible.tsx
|
|
12207
12237
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
12208
|
-
import { jsx as
|
|
12238
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
12209
12239
|
var Collapsible = CollapsiblePrimitive.Root;
|
|
12210
12240
|
var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
|
12211
12241
|
var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
@@ -12213,16 +12243,16 @@ var AnimatedCollapsibleContent = ({
|
|
|
12213
12243
|
className,
|
|
12214
12244
|
...rest
|
|
12215
12245
|
}) => {
|
|
12216
|
-
return /* @__PURE__ */
|
|
12246
|
+
return /* @__PURE__ */ jsx41(CollapsibleContent2, { className: "cnc-collapsible-content", ...rest });
|
|
12217
12247
|
};
|
|
12218
12248
|
|
|
12219
12249
|
// src/components/molecules/display/page-header.tsx
|
|
12220
|
-
import { jsx as
|
|
12250
|
+
import { jsx as jsx42, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
12221
12251
|
function PageHeader({
|
|
12222
12252
|
children,
|
|
12223
12253
|
className
|
|
12224
12254
|
}) {
|
|
12225
|
-
return /* @__PURE__ */
|
|
12255
|
+
return /* @__PURE__ */ jsx42(
|
|
12226
12256
|
"header",
|
|
12227
12257
|
{
|
|
12228
12258
|
className: cn(
|
|
@@ -12237,7 +12267,7 @@ function PageHeaderTitleContent({
|
|
|
12237
12267
|
children,
|
|
12238
12268
|
className
|
|
12239
12269
|
}) {
|
|
12240
|
-
return /* @__PURE__ */
|
|
12270
|
+
return /* @__PURE__ */ jsx42(
|
|
12241
12271
|
"div",
|
|
12242
12272
|
{
|
|
12243
12273
|
className: cn(
|
|
@@ -12254,16 +12284,16 @@ function PageHeaderTitle({
|
|
|
12254
12284
|
titleAs = "h1"
|
|
12255
12285
|
}) {
|
|
12256
12286
|
const ComponentTitle = titleAs;
|
|
12257
|
-
return /* @__PURE__ */
|
|
12258
|
-
/* @__PURE__ */
|
|
12259
|
-
description && /* @__PURE__ */
|
|
12287
|
+
return /* @__PURE__ */ jsxs13("div", { children: [
|
|
12288
|
+
/* @__PURE__ */ jsx42(ComponentTitle, { className: "cnc-text-2xl cnc-font-semibold cnc-text-brand-blue-600", children: title }),
|
|
12289
|
+
description && /* @__PURE__ */ jsx42("p", { className: "cnc-text-sm cnc-text-brand-gray-500", children: description })
|
|
12260
12290
|
] });
|
|
12261
12291
|
}
|
|
12262
12292
|
function PageHeaderActionsContainer({
|
|
12263
12293
|
children,
|
|
12264
12294
|
className
|
|
12265
12295
|
}) {
|
|
12266
|
-
return /* @__PURE__ */
|
|
12296
|
+
return /* @__PURE__ */ jsx42(
|
|
12267
12297
|
"div",
|
|
12268
12298
|
{
|
|
12269
12299
|
className: cn(
|
|
@@ -12275,14 +12305,14 @@ function PageHeaderActionsContainer({
|
|
|
12275
12305
|
);
|
|
12276
12306
|
}
|
|
12277
12307
|
function Title2({ title, as: Component = "h1" }) {
|
|
12278
|
-
return /* @__PURE__ */
|
|
12308
|
+
return /* @__PURE__ */ jsx42(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 });
|
|
12279
12309
|
}
|
|
12280
12310
|
|
|
12281
12311
|
// src/components/molecules/forms/combobox.tsx
|
|
12282
|
-
import * as
|
|
12312
|
+
import * as React80 from "react";
|
|
12283
12313
|
|
|
12284
12314
|
// src/components/molecules/overlay/command.tsx
|
|
12285
|
-
import * as
|
|
12315
|
+
import * as React78 from "react";
|
|
12286
12316
|
|
|
12287
12317
|
// ../../node_modules/cmdk/dist/chunk-NZJY6EH4.mjs
|
|
12288
12318
|
var U = 1;
|
|
@@ -12315,10 +12345,10 @@ function W(_, C, h) {
|
|
|
12315
12345
|
import * as t from "react";
|
|
12316
12346
|
|
|
12317
12347
|
// ../../node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
12318
|
-
import * as
|
|
12348
|
+
import * as React76 from "react";
|
|
12319
12349
|
import * as ReactDOM8 from "react-dom";
|
|
12320
12350
|
import { createSlot as createSlot5 } from "@radix-ui/react-slot";
|
|
12321
|
-
import { jsx as
|
|
12351
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
12322
12352
|
var NODES4 = [
|
|
12323
12353
|
"a",
|
|
12324
12354
|
"button",
|
|
@@ -12340,20 +12370,20 @@ var NODES4 = [
|
|
|
12340
12370
|
];
|
|
12341
12371
|
var Primitive4 = NODES4.reduce((primitive, node) => {
|
|
12342
12372
|
const Slot8 = createSlot5(`Primitive.${node}`);
|
|
12343
|
-
const Node2 =
|
|
12373
|
+
const Node2 = React76.forwardRef((props, forwardedRef) => {
|
|
12344
12374
|
const { asChild, ...primitiveProps } = props;
|
|
12345
12375
|
const Comp = asChild ? Slot8 : node;
|
|
12346
12376
|
if (typeof window !== "undefined") {
|
|
12347
12377
|
window[Symbol.for("radix-ui")] = true;
|
|
12348
12378
|
}
|
|
12349
|
-
return /* @__PURE__ */
|
|
12379
|
+
return /* @__PURE__ */ jsx43(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
12350
12380
|
});
|
|
12351
12381
|
Node2.displayName = `Primitive.${node}`;
|
|
12352
12382
|
return { ...primitive, [node]: Node2 };
|
|
12353
12383
|
}, {});
|
|
12354
12384
|
|
|
12355
12385
|
// ../../node_modules/cmdk/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
12356
|
-
import * as
|
|
12386
|
+
import * as React77 from "react";
|
|
12357
12387
|
function setRef4(ref, value) {
|
|
12358
12388
|
if (typeof ref === "function") {
|
|
12359
12389
|
return ref(value);
|
|
@@ -12703,8 +12733,8 @@ function B2({ asChild: r2, children: o }, n) {
|
|
|
12703
12733
|
var Te = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
|
|
12704
12734
|
|
|
12705
12735
|
// src/components/molecules/overlay/command.tsx
|
|
12706
|
-
import { jsx as
|
|
12707
|
-
var Command =
|
|
12736
|
+
import { jsx as jsx44, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
12737
|
+
var Command = React78.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx44(
|
|
12708
12738
|
_e,
|
|
12709
12739
|
{
|
|
12710
12740
|
ref,
|
|
@@ -12717,16 +12747,16 @@ var Command = React77.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
12717
12747
|
));
|
|
12718
12748
|
Command.displayName = _e.displayName;
|
|
12719
12749
|
var CommandDialog = ({ children, ...props }) => {
|
|
12720
|
-
return /* @__PURE__ */
|
|
12750
|
+
return /* @__PURE__ */ jsx44(Dialog2, { ...props, children: /* @__PURE__ */ jsx44(DialogContent2, { className: "cnc-overflow-hidden cnc-p-0", children: /* @__PURE__ */ jsx44(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 }) }) });
|
|
12721
12751
|
};
|
|
12722
|
-
var CommandInput =
|
|
12752
|
+
var CommandInput = React78.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs14(
|
|
12723
12753
|
"div",
|
|
12724
12754
|
{
|
|
12725
12755
|
className: "cnc-flex cnc-items-center cnc-border-b cnc-px-3",
|
|
12726
12756
|
"cmdk-input-wrapper": "",
|
|
12727
12757
|
children: [
|
|
12728
|
-
/* @__PURE__ */
|
|
12729
|
-
/* @__PURE__ */
|
|
12758
|
+
/* @__PURE__ */ jsx44(Search, { className: "cnc-mr-2 cnc-h-4 cnc-w-4 cnc-shrink-0 cnc-opacity-50" }),
|
|
12759
|
+
/* @__PURE__ */ jsx44(
|
|
12730
12760
|
_e.Input,
|
|
12731
12761
|
{
|
|
12732
12762
|
ref,
|
|
@@ -12741,7 +12771,7 @@ var CommandInput = React77.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
12741
12771
|
}
|
|
12742
12772
|
));
|
|
12743
12773
|
CommandInput.displayName = _e.Input.displayName;
|
|
12744
|
-
var CommandList =
|
|
12774
|
+
var CommandList = React78.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx44(
|
|
12745
12775
|
_e.List,
|
|
12746
12776
|
{
|
|
12747
12777
|
ref,
|
|
@@ -12753,7 +12783,7 @@ var CommandList = React77.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
12753
12783
|
}
|
|
12754
12784
|
));
|
|
12755
12785
|
CommandList.displayName = _e.List.displayName;
|
|
12756
|
-
var CommandEmpty =
|
|
12786
|
+
var CommandEmpty = React78.forwardRef((props, ref) => /* @__PURE__ */ jsx44(
|
|
12757
12787
|
_e.Empty,
|
|
12758
12788
|
{
|
|
12759
12789
|
ref,
|
|
@@ -12762,7 +12792,7 @@ var CommandEmpty = React77.forwardRef((props, ref) => /* @__PURE__ */ jsx43(
|
|
|
12762
12792
|
}
|
|
12763
12793
|
));
|
|
12764
12794
|
CommandEmpty.displayName = _e.Empty.displayName;
|
|
12765
|
-
var CommandGroup =
|
|
12795
|
+
var CommandGroup = React78.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx44(
|
|
12766
12796
|
_e.Group,
|
|
12767
12797
|
{
|
|
12768
12798
|
ref,
|
|
@@ -12774,7 +12804,7 @@ var CommandGroup = React77.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
12774
12804
|
}
|
|
12775
12805
|
));
|
|
12776
12806
|
CommandGroup.displayName = _e.Group.displayName;
|
|
12777
|
-
var CommandSeparator =
|
|
12807
|
+
var CommandSeparator = React78.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx44(
|
|
12778
12808
|
_e.Separator,
|
|
12779
12809
|
{
|
|
12780
12810
|
ref,
|
|
@@ -12783,7 +12813,7 @@ var CommandSeparator = React77.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
12783
12813
|
}
|
|
12784
12814
|
));
|
|
12785
12815
|
CommandSeparator.displayName = _e.Separator.displayName;
|
|
12786
|
-
var CommandItem =
|
|
12816
|
+
var CommandItem = React78.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx44(
|
|
12787
12817
|
_e.Item,
|
|
12788
12818
|
{
|
|
12789
12819
|
ref,
|
|
@@ -12799,7 +12829,7 @@ var CommandShortcut = ({
|
|
|
12799
12829
|
className,
|
|
12800
12830
|
...props
|
|
12801
12831
|
}) => {
|
|
12802
|
-
return /* @__PURE__ */
|
|
12832
|
+
return /* @__PURE__ */ jsx44(
|
|
12803
12833
|
"span",
|
|
12804
12834
|
{
|
|
12805
12835
|
className: cn(
|
|
@@ -12813,11 +12843,11 @@ var CommandShortcut = ({
|
|
|
12813
12843
|
CommandShortcut.displayName = "CommandShortcut";
|
|
12814
12844
|
|
|
12815
12845
|
// src/components/molecules/overlay/popover.tsx
|
|
12816
|
-
import * as
|
|
12817
|
-
import { jsx as
|
|
12846
|
+
import * as React79 from "react";
|
|
12847
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
12818
12848
|
var Popover3 = Root24;
|
|
12819
12849
|
var PopoverTrigger3 = Trigger4;
|
|
12820
|
-
var PopoverContent3 =
|
|
12850
|
+
var PopoverContent3 = React79.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx45(Portal6, { children: /* @__PURE__ */ jsx45(
|
|
12821
12851
|
Content23,
|
|
12822
12852
|
{
|
|
12823
12853
|
ref,
|
|
@@ -12833,7 +12863,7 @@ var PopoverContent3 = React78.forwardRef(({ className, align = "center", sideOff
|
|
|
12833
12863
|
PopoverContent3.displayName = Content23.displayName;
|
|
12834
12864
|
|
|
12835
12865
|
// src/components/molecules/forms/combobox.tsx
|
|
12836
|
-
import { jsx as
|
|
12866
|
+
import { jsx as jsx46, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
12837
12867
|
function Combobox({
|
|
12838
12868
|
options,
|
|
12839
12869
|
placeholder = "",
|
|
@@ -12841,30 +12871,31 @@ function Combobox({
|
|
|
12841
12871
|
onChange,
|
|
12842
12872
|
value = ""
|
|
12843
12873
|
}) {
|
|
12844
|
-
const [open, setOpen] =
|
|
12845
|
-
return /* @__PURE__ */
|
|
12846
|
-
/* @__PURE__ */
|
|
12847
|
-
|
|
12874
|
+
const [open, setOpen] = React80.useState(false);
|
|
12875
|
+
return /* @__PURE__ */ jsxs15(Popover3, { open, onOpenChange: setOpen, children: [
|
|
12876
|
+
/* @__PURE__ */ jsx46(PopoverTrigger3, { asChild: true, children: /* @__PURE__ */ jsxs15(
|
|
12877
|
+
Button,
|
|
12848
12878
|
{
|
|
12879
|
+
variant: "outline",
|
|
12849
12880
|
role: "combobox",
|
|
12850
12881
|
"aria-expanded": open,
|
|
12851
|
-
className: "cnc-
|
|
12882
|
+
className: "cnc-w-full cnc-justify-between",
|
|
12852
12883
|
children: [
|
|
12853
|
-
|
|
12854
|
-
/* @__PURE__ */
|
|
12884
|
+
value ? options?.find((framework) => framework.value === value)?.label : placeholder,
|
|
12885
|
+
/* @__PURE__ */ jsx46(ChevronsUpDown, { className: "cnc-ml-2 cnc-h-4 cnc-w-4 cnc-shrink-0 cnc-opacity-50" })
|
|
12855
12886
|
]
|
|
12856
12887
|
}
|
|
12857
12888
|
) }),
|
|
12858
|
-
/* @__PURE__ */
|
|
12889
|
+
/* @__PURE__ */ jsx46(
|
|
12859
12890
|
PopoverContent3,
|
|
12860
12891
|
{
|
|
12861
12892
|
align: "start",
|
|
12862
12893
|
className: "cnc-w-[--radix-popover-trigger-width] cnc-p-0",
|
|
12863
|
-
children: /* @__PURE__ */
|
|
12864
|
-
/* @__PURE__ */
|
|
12865
|
-
/* @__PURE__ */
|
|
12866
|
-
/* @__PURE__ */
|
|
12867
|
-
/* @__PURE__ */
|
|
12894
|
+
children: /* @__PURE__ */ jsxs15(Command, { children: [
|
|
12895
|
+
/* @__PURE__ */ jsx46(CommandInput, { placeholder: command?.placeholder }),
|
|
12896
|
+
/* @__PURE__ */ jsxs15(CommandList, { children: [
|
|
12897
|
+
/* @__PURE__ */ jsx46(CommandEmpty, { children: command?.emptyMessage ?? "Nenhum item encontrado" }),
|
|
12898
|
+
/* @__PURE__ */ jsx46(CommandGroup, { children: options?.map((option) => /* @__PURE__ */ jsxs15(
|
|
12868
12899
|
CommandItem,
|
|
12869
12900
|
{
|
|
12870
12901
|
value: option.value,
|
|
@@ -12875,7 +12906,7 @@ function Combobox({
|
|
|
12875
12906
|
},
|
|
12876
12907
|
keywords: [option.value, option.label],
|
|
12877
12908
|
children: [
|
|
12878
|
-
/* @__PURE__ */
|
|
12909
|
+
/* @__PURE__ */ jsx46(
|
|
12879
12910
|
Check,
|
|
12880
12911
|
{
|
|
12881
12912
|
className: cn(
|
|
@@ -12904,6 +12935,7 @@ export {
|
|
|
12904
12935
|
CardFooter,
|
|
12905
12936
|
CardFooterItem,
|
|
12906
12937
|
CardHeader,
|
|
12938
|
+
Checkbox,
|
|
12907
12939
|
Collapsible,
|
|
12908
12940
|
AnimatedCollapsibleContent as CollapsibleContent,
|
|
12909
12941
|
CollapsibleTrigger2 as CollapsibleTrigger,
|