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