@frontlit/page-builder 0.1.0-alpha.5 → 0.1.0-alpha.7
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/blocks/index.d.ts +1 -1
- package/dist/blocks/index.js +3 -3
- package/dist/builder/index.js +6 -6
- package/dist/{chunk-LMCEOWQG.js → chunk-HEKBPKGS.js} +6 -6
- package/dist/{chunk-LMCEOWQG.js.map → chunk-HEKBPKGS.js.map} +1 -1
- package/dist/{chunk-USPQ3AOW.js → chunk-I2LRKHSL.js} +6 -6
- package/dist/{chunk-USPQ3AOW.js.map → chunk-I2LRKHSL.js.map} +1 -1
- package/dist/{chunk-J7Z4UW45.js → chunk-KRQWGGAJ.js} +353 -8
- package/dist/chunk-KRQWGGAJ.js.map +1 -0
- package/dist/{chunk-BBI7UHOA.js → chunk-LL6CG6KH.js} +3 -3
- package/dist/{chunk-BBI7UHOA.js.map → chunk-LL6CG6KH.js.map} +1 -1
- package/dist/{chunk-36QHCIPM.js → chunk-QMUIISN3.js} +5 -93
- package/dist/chunk-QMUIISN3.js.map +1 -0
- package/dist/{chunk-5J6TLS5U.js → chunk-XQE4RVNO.js} +5 -5
- package/dist/chunk-XQE4RVNO.js.map +1 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +3 -3
- package/dist/{image-Bk8kPXwP.d.ts → image-Cv0aSUHD.d.ts} +3 -1
- package/dist/index.js +6 -6
- package/dist/primitives/index.d.ts +70 -1
- package/dist/primitives/index.js +1 -1
- package/dist/renderer/index.js +5 -5
- package/dist/server/index.js +10 -5
- package/dist/server/index.js.map +1 -1
- package/dist/server/islands/code-snippet.js +1 -1
- package/dist/server/islands/code-snippet.js.map +1 -1
- package/dist/server/islands/header-mobile-menu.js +1 -1
- package/dist/server/islands/header-mobile-menu.js.map +1 -1
- package/dist/server/islands/tabs.d.ts +23 -0
- package/dist/server/islands/tabs.js +86 -0
- package/dist/server/islands/tabs.js.map +1 -0
- package/dist/server/primitives.d.ts +83 -1
- package/dist/server/primitives.js +253 -35
- package/dist/server/primitives.js.map +1 -1
- package/dist/styles.css +78 -0
- package/package.json +1 -1
- package/dist/chunk-36QHCIPM.js.map +0 -1
- package/dist/chunk-5J6TLS5U.js.map +0 -1
- package/dist/chunk-J7Z4UW45.js.map +0 -1
|
@@ -351,6 +351,73 @@ var PageCardHeader = ({
|
|
|
351
351
|
return /* @__PURE__ */ jsx7("div", { className: classes, ...props, children: /* @__PURE__ */ jsx7(Header4, { theme, children }) });
|
|
352
352
|
};
|
|
353
353
|
|
|
354
|
+
// src/server/primitives.ts
|
|
355
|
+
export * from "./islands/code-snippet.js";
|
|
356
|
+
|
|
357
|
+
// src/primitives/collapsible.tsx
|
|
358
|
+
import { ChevronRight } from "lucide-react";
|
|
359
|
+
import { jsx as jsx8, jsxs } from "react/jsx-runtime";
|
|
360
|
+
function Collapsible({
|
|
361
|
+
summary,
|
|
362
|
+
children,
|
|
363
|
+
defaultOpen,
|
|
364
|
+
variant = "bordered",
|
|
365
|
+
id,
|
|
366
|
+
theme,
|
|
367
|
+
className
|
|
368
|
+
}) {
|
|
369
|
+
const card = theme?.interactives?.card;
|
|
370
|
+
const typography = theme?.typography?.text2;
|
|
371
|
+
return /* @__PURE__ */ jsxs(
|
|
372
|
+
"details",
|
|
373
|
+
{
|
|
374
|
+
id,
|
|
375
|
+
open: defaultOpen,
|
|
376
|
+
className: cn(
|
|
377
|
+
"group min-w-0",
|
|
378
|
+
variant === "bordered" && [
|
|
379
|
+
"border border-border bg-card text-card-foreground",
|
|
380
|
+
card?.border?.radius ?? "rounded-md"
|
|
381
|
+
],
|
|
382
|
+
className
|
|
383
|
+
),
|
|
384
|
+
children: [
|
|
385
|
+
/* @__PURE__ */ jsxs(
|
|
386
|
+
"summary",
|
|
387
|
+
{
|
|
388
|
+
className: cn(
|
|
389
|
+
"flex cursor-pointer list-none items-center gap-2 text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&::-webkit-details-marker]:hidden",
|
|
390
|
+
variant === "bordered" ? "px-3 py-2" : "py-1",
|
|
391
|
+
typography?.fontFamily,
|
|
392
|
+
typography?.fontSize ?? "text-sm",
|
|
393
|
+
typography?.letterSpacing
|
|
394
|
+
),
|
|
395
|
+
children: [
|
|
396
|
+
/* @__PURE__ */ jsx8(
|
|
397
|
+
ChevronRight,
|
|
398
|
+
{
|
|
399
|
+
"aria-hidden": "true",
|
|
400
|
+
className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform group-open:rotate-90"
|
|
401
|
+
}
|
|
402
|
+
),
|
|
403
|
+
/* @__PURE__ */ jsx8("span", { className: "min-w-0 flex-1", children: summary })
|
|
404
|
+
]
|
|
405
|
+
}
|
|
406
|
+
),
|
|
407
|
+
/* @__PURE__ */ jsx8(
|
|
408
|
+
"div",
|
|
409
|
+
{
|
|
410
|
+
className: cn(
|
|
411
|
+
variant === "bordered" ? "border-t border-border p-3" : "pl-6 pt-1"
|
|
412
|
+
),
|
|
413
|
+
children
|
|
414
|
+
}
|
|
415
|
+
)
|
|
416
|
+
]
|
|
417
|
+
}
|
|
418
|
+
);
|
|
419
|
+
}
|
|
420
|
+
|
|
354
421
|
// src/primitives/display.tsx
|
|
355
422
|
var Display = createHeading(
|
|
356
423
|
"Display",
|
|
@@ -383,29 +450,81 @@ var Header3 = createHeading(
|
|
|
383
450
|
(theme) => theme?.typography?.header3
|
|
384
451
|
);
|
|
385
452
|
|
|
453
|
+
// src/components/image.tsx
|
|
454
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
455
|
+
var registry = globalThis;
|
|
456
|
+
function resolveImageAttributes(input) {
|
|
457
|
+
return registry.__frontlitImageResolver?.(input) ?? null;
|
|
458
|
+
}
|
|
459
|
+
|
|
386
460
|
// src/primitives/image.tsx
|
|
387
|
-
import { jsx as
|
|
461
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
388
462
|
var Image = ({
|
|
389
463
|
src,
|
|
390
464
|
alt = "",
|
|
391
465
|
className = "",
|
|
392
466
|
theme,
|
|
467
|
+
priority = false,
|
|
468
|
+
sizes,
|
|
393
469
|
...props
|
|
394
470
|
}) => {
|
|
395
471
|
const cardStyles = theme?.interactives?.card;
|
|
396
472
|
const classes = cn("w-full object-cover", cardStyles?.border?.radius, className);
|
|
397
|
-
|
|
473
|
+
const optimized = resolveImageAttributes({ src, alt, sizes, priority });
|
|
474
|
+
return /* @__PURE__ */ jsx10(
|
|
475
|
+
"img",
|
|
476
|
+
{
|
|
477
|
+
src,
|
|
478
|
+
alt,
|
|
479
|
+
sizes,
|
|
480
|
+
loading: priority ? "eager" : "lazy",
|
|
481
|
+
decoding: "async",
|
|
482
|
+
fetchPriority: priority ? "high" : void 0,
|
|
483
|
+
className: classes,
|
|
484
|
+
...props,
|
|
485
|
+
...optimized
|
|
486
|
+
}
|
|
487
|
+
);
|
|
398
488
|
};
|
|
399
489
|
|
|
490
|
+
// src/primitives/inline-code.tsx
|
|
491
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
492
|
+
function InlineCode({
|
|
493
|
+
children,
|
|
494
|
+
theme,
|
|
495
|
+
variant = "default",
|
|
496
|
+
className,
|
|
497
|
+
...props
|
|
498
|
+
}) {
|
|
499
|
+
const typography = theme?.typography?.code;
|
|
500
|
+
return /* @__PURE__ */ jsx11(
|
|
501
|
+
"code",
|
|
502
|
+
{
|
|
503
|
+
className: cn(
|
|
504
|
+
// Code is literal: never inherit a theme's uppercase captions.
|
|
505
|
+
"break-words normal-case",
|
|
506
|
+
typography?.fontFamily ?? "font-jetbrains-mono",
|
|
507
|
+
// Relative to the surrounding text; the theme's code size is for blocks.
|
|
508
|
+
"text-[0.875em]",
|
|
509
|
+
typography?.letterSpacing,
|
|
510
|
+
variant === "default" ? "rounded bg-muted px-1 py-0.5 text-foreground" : "text-muted-foreground",
|
|
511
|
+
className
|
|
512
|
+
),
|
|
513
|
+
...props,
|
|
514
|
+
children
|
|
515
|
+
}
|
|
516
|
+
);
|
|
517
|
+
}
|
|
518
|
+
|
|
400
519
|
// src/primitives/input.tsx
|
|
401
520
|
import React3 from "react";
|
|
402
521
|
|
|
403
522
|
// src/primitives/components/ui/input.tsx
|
|
404
523
|
import * as React2 from "react";
|
|
405
|
-
import { jsx as
|
|
524
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
406
525
|
var Input = React2.forwardRef(
|
|
407
526
|
({ className, type, ...props }, ref) => {
|
|
408
|
-
return /* @__PURE__ */
|
|
527
|
+
return /* @__PURE__ */ jsx12(
|
|
409
528
|
"input",
|
|
410
529
|
{
|
|
411
530
|
type,
|
|
@@ -422,7 +541,7 @@ var Input = React2.forwardRef(
|
|
|
422
541
|
Input.displayName = "Input";
|
|
423
542
|
|
|
424
543
|
// src/primitives/input.tsx
|
|
425
|
-
import { jsx as
|
|
544
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
426
545
|
var Input2 = React3.forwardRef(
|
|
427
546
|
({
|
|
428
547
|
className = "",
|
|
@@ -465,7 +584,7 @@ var Input2 = React3.forwardRef(
|
|
|
465
584
|
inputStyles?.custom,
|
|
466
585
|
className
|
|
467
586
|
);
|
|
468
|
-
return /* @__PURE__ */
|
|
587
|
+
return /* @__PURE__ */ jsx13(Input, { ref, className: classes, ...props });
|
|
469
588
|
}
|
|
470
589
|
);
|
|
471
590
|
Input2.displayName = "Input";
|
|
@@ -477,11 +596,11 @@ import React5 from "react";
|
|
|
477
596
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
478
597
|
import { cva as cva3 } from "class-variance-authority";
|
|
479
598
|
import * as React4 from "react";
|
|
480
|
-
import { jsx as
|
|
599
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
481
600
|
var labelVariants = cva3(
|
|
482
601
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
483
602
|
);
|
|
484
|
-
var Label = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
603
|
+
var Label = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
485
604
|
LabelPrimitive.Root,
|
|
486
605
|
{
|
|
487
606
|
ref,
|
|
@@ -492,7 +611,7 @@ var Label = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
492
611
|
Label.displayName = LabelPrimitive.Root.displayName;
|
|
493
612
|
|
|
494
613
|
// src/primitives/label.tsx
|
|
495
|
-
import { jsx as
|
|
614
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
496
615
|
var Label2 = React5.forwardRef(
|
|
497
616
|
({ className = "", theme, error = false, ...props }, ref) => {
|
|
498
617
|
const typographyStyles = theme?.typography?.text2;
|
|
@@ -510,13 +629,13 @@ var Label2 = React5.forwardRef(
|
|
|
510
629
|
error && "text-red-500",
|
|
511
630
|
className
|
|
512
631
|
);
|
|
513
|
-
return /* @__PURE__ */
|
|
632
|
+
return /* @__PURE__ */ jsx15(Label, { ref, className: classes, ...props });
|
|
514
633
|
}
|
|
515
634
|
);
|
|
516
635
|
Label2.displayName = "Label";
|
|
517
636
|
|
|
518
637
|
// src/primitives/link.tsx
|
|
519
|
-
import { jsx as
|
|
638
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
520
639
|
var Link = ({
|
|
521
640
|
children,
|
|
522
641
|
className = "",
|
|
@@ -555,7 +674,7 @@ var Link = ({
|
|
|
555
674
|
linkStyles?.custom,
|
|
556
675
|
className
|
|
557
676
|
);
|
|
558
|
-
return /* @__PURE__ */
|
|
677
|
+
return /* @__PURE__ */ jsx16(
|
|
559
678
|
"span",
|
|
560
679
|
{
|
|
561
680
|
className: classes,
|
|
@@ -569,8 +688,42 @@ var Link = ({
|
|
|
569
688
|
);
|
|
570
689
|
};
|
|
571
690
|
|
|
691
|
+
// src/primitives/native-select.tsx
|
|
692
|
+
import React6 from "react";
|
|
693
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
694
|
+
var NativeSelect = React6.forwardRef(
|
|
695
|
+
({ className, theme, children, ...props }, ref) => {
|
|
696
|
+
const input = theme?.interactives?.input;
|
|
697
|
+
const typography = theme?.typography?.input;
|
|
698
|
+
return /* @__PURE__ */ jsx17(
|
|
699
|
+
"select",
|
|
700
|
+
{
|
|
701
|
+
ref,
|
|
702
|
+
className: cn(
|
|
703
|
+
"flex min-h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base leading-normal text-foreground ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
704
|
+
typography?.fontFamily,
|
|
705
|
+
typography?.fontSize,
|
|
706
|
+
typography?.fontWeight,
|
|
707
|
+
typography?.letterSpacing,
|
|
708
|
+
input?.padding?.x,
|
|
709
|
+
input?.padding?.y,
|
|
710
|
+
input?.border?.width,
|
|
711
|
+
input?.border?.style,
|
|
712
|
+
input?.border?.radius,
|
|
713
|
+
input?.shadow,
|
|
714
|
+
input?.custom,
|
|
715
|
+
className
|
|
716
|
+
),
|
|
717
|
+
...props,
|
|
718
|
+
children
|
|
719
|
+
}
|
|
720
|
+
);
|
|
721
|
+
}
|
|
722
|
+
);
|
|
723
|
+
NativeSelect.displayName = "NativeSelect";
|
|
724
|
+
|
|
572
725
|
// src/primitives/preheader.tsx
|
|
573
|
-
import { jsx as
|
|
726
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
574
727
|
var Preheader = ({
|
|
575
728
|
children,
|
|
576
729
|
className = "",
|
|
@@ -592,11 +745,11 @@ var Preheader = ({
|
|
|
592
745
|
typographyStyles?.textOverflow,
|
|
593
746
|
className
|
|
594
747
|
);
|
|
595
|
-
return /* @__PURE__ */
|
|
748
|
+
return /* @__PURE__ */ jsx18("p", { className: classes, ...props, children });
|
|
596
749
|
};
|
|
597
750
|
|
|
598
751
|
// src/primitives/section.tsx
|
|
599
|
-
import
|
|
752
|
+
import React7 from "react";
|
|
600
753
|
|
|
601
754
|
// src/models/media.ts
|
|
602
755
|
function getMediaUrl(media) {
|
|
@@ -611,7 +764,7 @@ function getMediaUrl(media) {
|
|
|
611
764
|
}
|
|
612
765
|
|
|
613
766
|
// src/primitives/section.tsx
|
|
614
|
-
import { Fragment, jsx as
|
|
767
|
+
import { Fragment, jsx as jsx19, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
615
768
|
function resolveBackgroundLayer(background) {
|
|
616
769
|
const attachment = background.backgroundAttachment || "scroll";
|
|
617
770
|
if (background.type === "color") {
|
|
@@ -666,7 +819,7 @@ var Section = ({
|
|
|
666
819
|
);
|
|
667
820
|
const backgroundLayer = background ? resolveBackgroundLayer(background) : null;
|
|
668
821
|
const isFixed = background && background.type !== "color" && background.backgroundAttachment === "fixed";
|
|
669
|
-
return /* @__PURE__ */
|
|
822
|
+
return /* @__PURE__ */ jsx19(Fragment, { children: React7.createElement(
|
|
670
823
|
component,
|
|
671
824
|
{
|
|
672
825
|
// `overflow-clip` keeps a fixed-attachment layer painted
|
|
@@ -675,8 +828,8 @@ var Section = ({
|
|
|
675
828
|
className: cn(classes, isFixed && "overflow-clip"),
|
|
676
829
|
...props
|
|
677
830
|
},
|
|
678
|
-
/* @__PURE__ */
|
|
679
|
-
backgroundLayer && /* @__PURE__ */
|
|
831
|
+
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
832
|
+
backgroundLayer && /* @__PURE__ */ jsx19(
|
|
680
833
|
"div",
|
|
681
834
|
{
|
|
682
835
|
"aria-hidden": true,
|
|
@@ -687,7 +840,7 @@ var Section = ({
|
|
|
687
840
|
style: backgroundLayer.style
|
|
688
841
|
}
|
|
689
842
|
),
|
|
690
|
-
background && background.type === "image" && /* @__PURE__ */
|
|
843
|
+
background && background.type === "image" && /* @__PURE__ */ jsx19(
|
|
691
844
|
"div",
|
|
692
845
|
{
|
|
693
846
|
"aria-hidden": true,
|
|
@@ -700,7 +853,7 @@ var Section = ({
|
|
|
700
853
|
}
|
|
701
854
|
}
|
|
702
855
|
),
|
|
703
|
-
background && background.type === "image" && /* @__PURE__ */
|
|
856
|
+
background && background.type === "image" && /* @__PURE__ */ jsx19(
|
|
704
857
|
"div",
|
|
705
858
|
{
|
|
706
859
|
"aria-hidden": true,
|
|
@@ -710,11 +863,13 @@ var Section = ({
|
|
|
710
863
|
}
|
|
711
864
|
}
|
|
712
865
|
),
|
|
713
|
-
/* @__PURE__ */
|
|
866
|
+
/* @__PURE__ */ jsx19(
|
|
714
867
|
"div",
|
|
715
868
|
{
|
|
716
869
|
className: cn(
|
|
717
|
-
|
|
870
|
+
// Clips like overflow-hidden without becoming a scroll
|
|
871
|
+
// container, so sticky children (docs sidebars) still stick.
|
|
872
|
+
"mx-auto z-[3] relative overflow-clip",
|
|
718
873
|
`lg:${theme?.structure?.page?.width || "max-w-6xl"}`,
|
|
719
874
|
theme?.structure?.section?.padding?.x || "px-4",
|
|
720
875
|
theme?.structure?.section?.padding?.y || "py-4"
|
|
@@ -727,7 +882,7 @@ var Section = ({
|
|
|
727
882
|
};
|
|
728
883
|
|
|
729
884
|
// src/primitives/subheader1.tsx
|
|
730
|
-
import { jsx as
|
|
885
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
731
886
|
var Subheader1 = ({
|
|
732
887
|
children,
|
|
733
888
|
className = "",
|
|
@@ -747,11 +902,11 @@ var Subheader1 = ({
|
|
|
747
902
|
typographyStyles?.textOverflow,
|
|
748
903
|
className
|
|
749
904
|
);
|
|
750
|
-
return component === "h5" ? /* @__PURE__ */
|
|
905
|
+
return component === "h5" ? /* @__PURE__ */ jsx20("h5", { className: classes, ...props, children }) : /* @__PURE__ */ jsx20("span", { className: classes, ...props, children });
|
|
751
906
|
};
|
|
752
907
|
|
|
753
908
|
// src/primitives/subheader2.tsx
|
|
754
|
-
import { jsx as
|
|
909
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
755
910
|
var Subheader2 = ({
|
|
756
911
|
children,
|
|
757
912
|
className = "",
|
|
@@ -770,11 +925,70 @@ var Subheader2 = ({
|
|
|
770
925
|
typographyStyles?.textOverflow,
|
|
771
926
|
className
|
|
772
927
|
].filter(Boolean).join(" ");
|
|
773
|
-
return /* @__PURE__ */
|
|
928
|
+
return /* @__PURE__ */ jsx21("h6", { className: classes, ...props, children });
|
|
774
929
|
};
|
|
775
930
|
|
|
931
|
+
// src/primitives/table.tsx
|
|
932
|
+
import { jsx as jsx22, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
933
|
+
function Table({ columns, rows, theme, className }) {
|
|
934
|
+
const typography = theme?.typography?.text2;
|
|
935
|
+
const card = theme?.interactives?.card;
|
|
936
|
+
const text = cn(
|
|
937
|
+
typography?.fontFamily,
|
|
938
|
+
typography?.fontSize ?? "text-sm",
|
|
939
|
+
typography?.lineHeight,
|
|
940
|
+
typography?.letterSpacing
|
|
941
|
+
);
|
|
942
|
+
return /* @__PURE__ */ jsx22(
|
|
943
|
+
"div",
|
|
944
|
+
{
|
|
945
|
+
className: cn(
|
|
946
|
+
"w-full min-w-0 overflow-hidden border border-border",
|
|
947
|
+
card?.border?.radius ?? "rounded-md",
|
|
948
|
+
className
|
|
949
|
+
),
|
|
950
|
+
children: /* @__PURE__ */ jsxs3("table", { className: cn("block w-full border-collapse md:table", text), children: [
|
|
951
|
+
/* @__PURE__ */ jsx22("thead", { className: "hidden md:table-header-group", children: /* @__PURE__ */ jsx22("tr", { className: "border-b border-border bg-muted/50", children: columns.map((column) => /* @__PURE__ */ jsx22(
|
|
952
|
+
"th",
|
|
953
|
+
{
|
|
954
|
+
scope: "col",
|
|
955
|
+
className: cn(
|
|
956
|
+
"px-3 py-2 text-left font-medium text-muted-foreground",
|
|
957
|
+
column.className
|
|
958
|
+
),
|
|
959
|
+
children: column.label
|
|
960
|
+
},
|
|
961
|
+
column.key
|
|
962
|
+
)) }) }),
|
|
963
|
+
/* @__PURE__ */ jsx22("tbody", { className: "block md:table-row-group", children: rows.map((row, index) => /* @__PURE__ */ jsx22(
|
|
964
|
+
"tr",
|
|
965
|
+
{
|
|
966
|
+
className: "block border-b border-border px-3 py-2 last:border-b-0 md:table-row md:p-0",
|
|
967
|
+
children: columns.map((column) => /* @__PURE__ */ jsx22(
|
|
968
|
+
"td",
|
|
969
|
+
{
|
|
970
|
+
"data-label": column.label,
|
|
971
|
+
className: cn(
|
|
972
|
+
"block min-w-0 break-words py-1 align-top text-foreground before:mr-2 before:text-muted-foreground before:content-[attr(data-label)':'] md:table-cell md:px-3 md:py-2 md:before:content-none",
|
|
973
|
+
column.className
|
|
974
|
+
),
|
|
975
|
+
children: row[column.key]
|
|
976
|
+
},
|
|
977
|
+
column.key
|
|
978
|
+
))
|
|
979
|
+
},
|
|
980
|
+
index
|
|
981
|
+
)) })
|
|
982
|
+
] })
|
|
983
|
+
}
|
|
984
|
+
);
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
// src/server/primitives.ts
|
|
988
|
+
export * from "./islands/tabs.js";
|
|
989
|
+
|
|
776
990
|
// src/primitives/text1.tsx
|
|
777
|
-
import { jsx as
|
|
991
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
778
992
|
var Text1 = ({
|
|
779
993
|
children,
|
|
780
994
|
className = "",
|
|
@@ -797,11 +1011,11 @@ var Text1 = ({
|
|
|
797
1011
|
typographyStyles?.textOverflow,
|
|
798
1012
|
className
|
|
799
1013
|
);
|
|
800
|
-
return component === "p" ? /* @__PURE__ */
|
|
1014
|
+
return component === "p" ? /* @__PURE__ */ jsx23("p", { className: classes, ...props, children }) : /* @__PURE__ */ jsx23("span", { className: classes, ...props, children });
|
|
801
1015
|
};
|
|
802
1016
|
|
|
803
1017
|
// src/primitives/text2.tsx
|
|
804
|
-
import { jsx as
|
|
1018
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
805
1019
|
var Text2 = ({
|
|
806
1020
|
children,
|
|
807
1021
|
className = "",
|
|
@@ -824,13 +1038,13 @@ var Text2 = ({
|
|
|
824
1038
|
typographyStyles?.textOverflow,
|
|
825
1039
|
className
|
|
826
1040
|
);
|
|
827
|
-
return component === "p" ? /* @__PURE__ */
|
|
1041
|
+
return component === "p" ? /* @__PURE__ */ jsx24("p", { className: classes, ...props, children }) : /* @__PURE__ */ jsx24("span", { className: classes, ...props, children });
|
|
828
1042
|
};
|
|
829
1043
|
|
|
830
1044
|
// src/primitives/textarea.tsx
|
|
831
|
-
import
|
|
832
|
-
import { jsx as
|
|
833
|
-
var Textarea =
|
|
1045
|
+
import React8 from "react";
|
|
1046
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1047
|
+
var Textarea = React8.forwardRef(
|
|
834
1048
|
({ className = "", theme, error = false, ...props }, ref) => {
|
|
835
1049
|
const inputStyles = theme?.interactives?.input;
|
|
836
1050
|
const typographyStyles = theme?.typography?.input;
|
|
@@ -853,7 +1067,7 @@ var Textarea = React7.forwardRef(
|
|
|
853
1067
|
inputStyles?.custom,
|
|
854
1068
|
className
|
|
855
1069
|
);
|
|
856
|
-
return /* @__PURE__ */
|
|
1070
|
+
return /* @__PURE__ */ jsx25("textarea", { ref, className: classes, ...props });
|
|
857
1071
|
}
|
|
858
1072
|
);
|
|
859
1073
|
Textarea.displayName = "Textarea";
|
|
@@ -861,15 +1075,18 @@ export {
|
|
|
861
1075
|
Badge2 as Badge,
|
|
862
1076
|
Button2 as Button,
|
|
863
1077
|
Caption,
|
|
1078
|
+
Collapsible,
|
|
864
1079
|
Display,
|
|
865
1080
|
Header1,
|
|
866
1081
|
Header2,
|
|
867
1082
|
Header3,
|
|
868
1083
|
Header4,
|
|
869
1084
|
Image,
|
|
1085
|
+
InlineCode,
|
|
870
1086
|
Input2 as Input,
|
|
871
1087
|
Label2 as Label,
|
|
872
1088
|
Link,
|
|
1089
|
+
NativeSelect,
|
|
873
1090
|
PageCard,
|
|
874
1091
|
PageCardContent,
|
|
875
1092
|
PageCardHeader,
|
|
@@ -879,6 +1096,7 @@ export {
|
|
|
879
1096
|
Subheader1,
|
|
880
1097
|
Subheader2,
|
|
881
1098
|
TAILWIND_TEXT_PX,
|
|
1099
|
+
Table,
|
|
882
1100
|
Text1,
|
|
883
1101
|
Text2,
|
|
884
1102
|
Textarea,
|