@cnc-ti/layout-basic 8.3.0 → 8.3.2
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 +166 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +91 -2
- package/dist/index.d.ts +91 -2
- package/dist/index.js +240 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +226 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -9245,6 +9245,8 @@ import { jsx as jsx24, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
|
9245
9245
|
var Select = SelectPrimitive.Root;
|
|
9246
9246
|
var SelectGroup = SelectPrimitive.Group;
|
|
9247
9247
|
var SelectValue = SelectPrimitive.Value;
|
|
9248
|
+
var SelectPortal = SelectPrimitive.Portal;
|
|
9249
|
+
var SelectViewport = SelectPrimitive.Viewport;
|
|
9248
9250
|
var SelectTrigger = React38.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
|
9249
9251
|
SelectPrimitive.Trigger,
|
|
9250
9252
|
{
|
|
@@ -9319,7 +9321,10 @@ var SelectLabel = React38.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
9319
9321
|
SelectPrimitive.Label,
|
|
9320
9322
|
{
|
|
9321
9323
|
ref,
|
|
9322
|
-
className: cn(
|
|
9324
|
+
className: cn(
|
|
9325
|
+
"cnc-py-1.5 cnc-pl-8 cnc-pr-2 cnc-text-sm cnc-font-semibold",
|
|
9326
|
+
className
|
|
9327
|
+
),
|
|
9323
9328
|
...props
|
|
9324
9329
|
}
|
|
9325
9330
|
));
|
|
@@ -9349,9 +9354,224 @@ var SelectSeparator = React38.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
9349
9354
|
}
|
|
9350
9355
|
));
|
|
9351
9356
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
9357
|
+
|
|
9358
|
+
// src/components/atoms/forms/input.tsx
|
|
9359
|
+
import * as React39 from "react";
|
|
9360
|
+
import { jsx as jsx25, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
9361
|
+
var Input = React39.forwardRef(
|
|
9362
|
+
({ className, type, id, label, ...props }, ref) => {
|
|
9363
|
+
const idGenerate = id ? id : label && `field-${Date.now()}-${Math.random() * 1e5}`;
|
|
9364
|
+
return /* @__PURE__ */ jsxs11("div", { className: "cnc-w-full", children: [
|
|
9365
|
+
label && /* @__PURE__ */ jsx25(
|
|
9366
|
+
"label",
|
|
9367
|
+
{
|
|
9368
|
+
htmlFor: idGenerate,
|
|
9369
|
+
className: "cnc-block cnc-text-sm cnc-mb-1 cnc-font-medium cnc-text-brand-gray-600",
|
|
9370
|
+
children: label
|
|
9371
|
+
}
|
|
9372
|
+
),
|
|
9373
|
+
/* @__PURE__ */ jsx25(
|
|
9374
|
+
"input",
|
|
9375
|
+
{
|
|
9376
|
+
type,
|
|
9377
|
+
id: idGenerate,
|
|
9378
|
+
className: cn(
|
|
9379
|
+
"cnc-flex cnc-h-8 cnc-w-full cnc-rounded-md cnc-border cnc-border-input cnc-bg-transparent cnc-px-3 cnc-py-1 cnc-text-base cnc-shadow-sm cnc-transition-colors",
|
|
9380
|
+
" file:cnc-border-0 file:cnc-bg-transparent file:cnc-text-sm file:cnc-font-medium file:cnc-text-foreground placeholder:cnc-text-muted-foreground focus-visible:cnc-outline-none",
|
|
9381
|
+
"focus-visible:cnc-ring-2 focus-visible:cnc-ring-brand-gray-500/50 disabled:cnc-cursor-not-allowed disabled:cnc-opacity-50 md:cnc-text-sm ",
|
|
9382
|
+
"not-disabled:hover:cnc-border-brand-gray-500",
|
|
9383
|
+
className
|
|
9384
|
+
),
|
|
9385
|
+
ref,
|
|
9386
|
+
...props
|
|
9387
|
+
}
|
|
9388
|
+
)
|
|
9389
|
+
] });
|
|
9390
|
+
}
|
|
9391
|
+
);
|
|
9392
|
+
Input.displayName = "Input";
|
|
9393
|
+
|
|
9394
|
+
// src/components/atoms/display/badge.tsx
|
|
9395
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
9396
|
+
var Badge = ({
|
|
9397
|
+
variant = "default",
|
|
9398
|
+
rounded = true,
|
|
9399
|
+
size: size4 = "md",
|
|
9400
|
+
className,
|
|
9401
|
+
...rest
|
|
9402
|
+
}) => {
|
|
9403
|
+
const baseStyle = "cnc-inline-flex cnc-items-center cnc-font-semibold cnc-transition-colors";
|
|
9404
|
+
const variants = {
|
|
9405
|
+
default: "cnc-bg-brand-gray-20 cnc-text-brand-gray-600",
|
|
9406
|
+
primary: "cnc-bg-brand-blue-100 cnc-text-white",
|
|
9407
|
+
success: "cnc-bg-brand-green-200 cnc-text-white",
|
|
9408
|
+
warning: "cnc-bg-brand-gold-400 cnc-text-white",
|
|
9409
|
+
danger: "cnc-bg-brand-red-500 cnc-text-white",
|
|
9410
|
+
info: "cnc-bg-brand-blue-60 cnc-text-brand-blue-900"
|
|
9411
|
+
};
|
|
9412
|
+
const sizes = {
|
|
9413
|
+
sm: "cnc-text-xs cnc-px-2 cnc-py-0.5",
|
|
9414
|
+
md: "cnc-text-sm cnc-px-3 cnc-py-1",
|
|
9415
|
+
lg: "cnc-text-base cnc-px-4 cnc-py-2"
|
|
9416
|
+
};
|
|
9417
|
+
return /* @__PURE__ */ jsx26(
|
|
9418
|
+
"span",
|
|
9419
|
+
{
|
|
9420
|
+
className: cn(
|
|
9421
|
+
baseStyle,
|
|
9422
|
+
variants[variant],
|
|
9423
|
+
sizes[size4],
|
|
9424
|
+
rounded ? "cnc-rounded-full" : "",
|
|
9425
|
+
className
|
|
9426
|
+
),
|
|
9427
|
+
...rest
|
|
9428
|
+
}
|
|
9429
|
+
);
|
|
9430
|
+
};
|
|
9431
|
+
|
|
9432
|
+
// src/components/molecules/card.tsx
|
|
9433
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
9434
|
+
function Card({
|
|
9435
|
+
className,
|
|
9436
|
+
...rest
|
|
9437
|
+
}) {
|
|
9438
|
+
return /* @__PURE__ */ jsx27(
|
|
9439
|
+
"div",
|
|
9440
|
+
{
|
|
9441
|
+
className: cn(
|
|
9442
|
+
"cnc-w-full cnc-flex cnc-flex-col cnc-border-2 cnc-border-brand-gray-50 cnc-rounded-md cnc-shadow",
|
|
9443
|
+
className
|
|
9444
|
+
),
|
|
9445
|
+
...rest
|
|
9446
|
+
}
|
|
9447
|
+
);
|
|
9448
|
+
}
|
|
9449
|
+
function CardHeader({
|
|
9450
|
+
className,
|
|
9451
|
+
...rest
|
|
9452
|
+
}) {
|
|
9453
|
+
return /* @__PURE__ */ jsx27("div", { className: "cnc-px-6 cnc-pt-6", children: /* @__PURE__ */ jsx27(
|
|
9454
|
+
"div",
|
|
9455
|
+
{
|
|
9456
|
+
className: cn(
|
|
9457
|
+
"cnc-flex cnc-items-center cnc-justify-between cnc-w-full cnc-border-b-2 cnc-border-brand-gray-50 cnc-pb-4",
|
|
9458
|
+
className
|
|
9459
|
+
),
|
|
9460
|
+
...rest
|
|
9461
|
+
}
|
|
9462
|
+
) });
|
|
9463
|
+
}
|
|
9464
|
+
function CardContent({
|
|
9465
|
+
className,
|
|
9466
|
+
...rest
|
|
9467
|
+
}) {
|
|
9468
|
+
return /* @__PURE__ */ jsx27("div", { className: cn("cnc-px-6 cnc-py-2", className), ...rest });
|
|
9469
|
+
}
|
|
9470
|
+
function CardFooter({
|
|
9471
|
+
className,
|
|
9472
|
+
...rest
|
|
9473
|
+
}) {
|
|
9474
|
+
return /* @__PURE__ */ jsx27(
|
|
9475
|
+
"div",
|
|
9476
|
+
{
|
|
9477
|
+
className: cn(
|
|
9478
|
+
"cnc-mt-4 cnc-flex cnc-border-t-2 cnc-border-brand-gray-50",
|
|
9479
|
+
className
|
|
9480
|
+
),
|
|
9481
|
+
...rest
|
|
9482
|
+
}
|
|
9483
|
+
);
|
|
9484
|
+
}
|
|
9485
|
+
function CardFooterItem({
|
|
9486
|
+
className,
|
|
9487
|
+
...rest
|
|
9488
|
+
}) {
|
|
9489
|
+
return /* @__PURE__ */ jsx27(
|
|
9490
|
+
"div",
|
|
9491
|
+
{
|
|
9492
|
+
className: cn(
|
|
9493
|
+
"cnc-molecule-card-item cnc-flex cnc-flex-1 cnc-items-center cnc-justify-center cnc-py-3 cnc-px-8",
|
|
9494
|
+
className
|
|
9495
|
+
),
|
|
9496
|
+
...rest
|
|
9497
|
+
}
|
|
9498
|
+
);
|
|
9499
|
+
}
|
|
9500
|
+
|
|
9501
|
+
// src/components/molecules/collapsible.tsx
|
|
9502
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
9503
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
9504
|
+
var Collapsible = CollapsiblePrimitive.Root;
|
|
9505
|
+
var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
|
9506
|
+
var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
9507
|
+
var AnimatedCollapsibleContent = ({
|
|
9508
|
+
className,
|
|
9509
|
+
...rest
|
|
9510
|
+
}) => {
|
|
9511
|
+
return /* @__PURE__ */ jsx28(CollapsibleContent2, { className: "cnc-collapsible-content", ...rest });
|
|
9512
|
+
};
|
|
9513
|
+
|
|
9514
|
+
// src/components/molecules/display/page-header.tsx
|
|
9515
|
+
import { Fragment as Fragment8, jsx as jsx29, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
9516
|
+
function PageHeader({
|
|
9517
|
+
title,
|
|
9518
|
+
description,
|
|
9519
|
+
actions,
|
|
9520
|
+
titleAs = "h1",
|
|
9521
|
+
showGoBack = false
|
|
9522
|
+
}) {
|
|
9523
|
+
const ComponentTitle = titleAs;
|
|
9524
|
+
return /* @__PURE__ */ jsx29(Fragment8, { children: title && /* @__PURE__ */ jsxs12("header", { className: "cnc-w-full cnc-flex cnc-items-center cnc-justify-between cnc-p-8 cnc-bg-brand-blue-50 cnc-border-b-2 cnc-border-brand-blue-60", children: [
|
|
9525
|
+
/* @__PURE__ */ jsx29("div", { className: "cnc-flex cnc-flex-col cnc-gap-2", children: /* @__PURE__ */ jsxs12("div", { className: "cnc-flex cnc-items-start cnc-gap-2", children: [
|
|
9526
|
+
showGoBack && /* @__PURE__ */ jsx29(
|
|
9527
|
+
"button",
|
|
9528
|
+
{
|
|
9529
|
+
className: "cnc-mt-1 hover:cnc-opacity-60",
|
|
9530
|
+
onClick: () => window.history.back(),
|
|
9531
|
+
children: /* @__PURE__ */ jsx29(
|
|
9532
|
+
"svg",
|
|
9533
|
+
{
|
|
9534
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9535
|
+
className: "cnc-w-6 cnc-h-6 cnc-text-[#1F2C4D]",
|
|
9536
|
+
fill: "none",
|
|
9537
|
+
viewBox: "0 0 24 24",
|
|
9538
|
+
strokeWidth: 1.5,
|
|
9539
|
+
stroke: "currentColor",
|
|
9540
|
+
children: /* @__PURE__ */ jsx29(
|
|
9541
|
+
"path",
|
|
9542
|
+
{
|
|
9543
|
+
strokeLinecap: "round",
|
|
9544
|
+
strokeLinejoin: "round",
|
|
9545
|
+
d: "M15.75 19.5 8.25 12l7.5-7.5"
|
|
9546
|
+
}
|
|
9547
|
+
)
|
|
9548
|
+
}
|
|
9549
|
+
)
|
|
9550
|
+
}
|
|
9551
|
+
),
|
|
9552
|
+
/* @__PURE__ */ jsxs12("div", { children: [
|
|
9553
|
+
/* @__PURE__ */ jsx29(ComponentTitle, { className: "cnc-text-2xl cnc-leading-8 cnc-font-semibold cnc-text-brand-blue-600", children: title }),
|
|
9554
|
+
description && /* @__PURE__ */ jsx29("p", { className: "cnc-text-brand-gray-500 cnc-leading-4", children: description })
|
|
9555
|
+
] })
|
|
9556
|
+
] }) }),
|
|
9557
|
+
actions && /* @__PURE__ */ jsx29("div", { className: "cnc-flex cnc-gap-4", children: actions })
|
|
9558
|
+
] }) });
|
|
9559
|
+
}
|
|
9560
|
+
function Title2({ title, as: Component = "h1" }) {
|
|
9561
|
+
return /* @__PURE__ */ jsx29(Component, { className: "cnc-text-[28px] cnc-text-[#1F2C4D] cnc-font-bold cnc-mt-[10px] cnc-mb-5", children: title });
|
|
9562
|
+
}
|
|
9352
9563
|
export {
|
|
9353
9564
|
AplicationsHeader,
|
|
9565
|
+
Badge,
|
|
9354
9566
|
Button,
|
|
9567
|
+
Card,
|
|
9568
|
+
CardContent,
|
|
9569
|
+
CardFooter,
|
|
9570
|
+
CardFooterItem,
|
|
9571
|
+
CardHeader,
|
|
9572
|
+
Collapsible,
|
|
9573
|
+
AnimatedCollapsibleContent as CollapsibleContent,
|
|
9574
|
+
CollapsibleTrigger2 as CollapsibleTrigger,
|
|
9355
9575
|
Dialog2 as Dialog,
|
|
9356
9576
|
DialogClose2 as DialogClose,
|
|
9357
9577
|
DialogContent2 as DialogContent,
|
|
@@ -9381,9 +9601,11 @@ export {
|
|
|
9381
9601
|
HeaderContainer,
|
|
9382
9602
|
HeaderProfileHeader,
|
|
9383
9603
|
HeaderProfileItem,
|
|
9604
|
+
Input,
|
|
9384
9605
|
Modal,
|
|
9385
9606
|
ModalEntidade,
|
|
9386
9607
|
ModalMudancaEntidade,
|
|
9608
|
+
PageHeader,
|
|
9387
9609
|
Popover2 as Popover,
|
|
9388
9610
|
PopoverContent2 as PopoverContent,
|
|
9389
9611
|
PopoverTrigger2 as PopoverTrigger,
|
|
@@ -9392,16 +9614,19 @@ export {
|
|
|
9392
9614
|
SelectGroup,
|
|
9393
9615
|
SelectItem,
|
|
9394
9616
|
SelectLabel,
|
|
9617
|
+
SelectPortal,
|
|
9395
9618
|
SelectScrollDownButton,
|
|
9396
9619
|
SelectScrollUpButton,
|
|
9397
9620
|
SelectSeparator,
|
|
9398
9621
|
SelectTrigger,
|
|
9399
9622
|
SelectValue,
|
|
9623
|
+
SelectViewport,
|
|
9400
9624
|
Sidebar,
|
|
9401
9625
|
SidebarContainer,
|
|
9402
9626
|
SidebarImageBrand,
|
|
9403
9627
|
SidebarNavCollapse,
|
|
9404
9628
|
SidebarNavLink,
|
|
9629
|
+
Title2 as Title,
|
|
9405
9630
|
buttonVariants
|
|
9406
9631
|
};
|
|
9407
9632
|
/*! Bundled license information:
|