@measured/puck 0.8.0-canary.6e95652 → 0.8.0-canary.e4cab76
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 +47 -47
- package/dist/index.d.ts +7 -6
- package/dist/index.js +8 -6
- package/package.json +1 -1
package/dist/index.css
CHANGED
@@ -502,38 +502,38 @@
|
|
502
502
|
}
|
503
503
|
|
504
504
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/InputOrGroup/styles.module.css/#css-module-data */
|
505
|
-
.
|
505
|
+
._Input_izwhv_1 {
|
506
506
|
color: var(--puck-color-grey-3);
|
507
507
|
padding: 16px;
|
508
508
|
padding-bottom: 12px;
|
509
509
|
display: block;
|
510
510
|
font-family: var(--puck-font-stack);
|
511
511
|
}
|
512
|
-
.
|
512
|
+
._Input_izwhv_1 ._Input_izwhv_1 {
|
513
513
|
padding: 0px;
|
514
514
|
}
|
515
|
-
.
|
515
|
+
._Input_izwhv_1 * {
|
516
516
|
box-sizing: border-box;
|
517
517
|
}
|
518
|
-
.
|
518
|
+
._Input_izwhv_1 + ._Input_izwhv_1 {
|
519
519
|
border-top: 1px solid var(--puck-color-grey-8);
|
520
520
|
margin-top: 8px;
|
521
521
|
}
|
522
|
-
.
|
522
|
+
._Input_izwhv_1 ._Input_izwhv_1 + ._Input_izwhv_1 {
|
523
523
|
border-top: 0px;
|
524
524
|
margin-top: 12px;
|
525
525
|
}
|
526
|
-
._Input-
|
526
|
+
._Input-label_izwhv_27 {
|
527
527
|
display: flex;
|
528
528
|
padding-bottom: 12px;
|
529
529
|
font-size: var(--puck-font-size-xxs);
|
530
530
|
font-weight: 600;
|
531
531
|
}
|
532
|
-
._Input-
|
532
|
+
._Input-labelIcon_izwhv_34 {
|
533
533
|
color: var(--puck-color-grey-6);
|
534
534
|
margin-right: 4px;
|
535
535
|
}
|
536
|
-
._Input-
|
536
|
+
._Input-input_izwhv_39 {
|
537
537
|
border-width: 1px;
|
538
538
|
border-style: solid;
|
539
539
|
border-color: var(--puck-color-grey-8);
|
@@ -542,7 +542,7 @@
|
|
542
542
|
padding: 12px 16px;
|
543
543
|
width: 100%;
|
544
544
|
}
|
545
|
-
.
|
545
|
+
._Input_izwhv_1 select {
|
546
546
|
appearance: none;
|
547
547
|
background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23c3c3c3'><polygon points='0,0 100,0 50,50'/></svg>") no-repeat;
|
548
548
|
background-size: 12px;
|
@@ -550,19 +550,19 @@
|
|
550
550
|
background-repeat: no-repeat;
|
551
551
|
background-color: white;
|
552
552
|
}
|
553
|
-
._Input--
|
553
|
+
._Input--readOnly_izwhv_60 ._Input-input_izwhv_39 {
|
554
554
|
background-color: var(--puck-color-grey-10);
|
555
555
|
border-color: var(--puck-color-grey-8);
|
556
556
|
}
|
557
|
-
._Input-
|
557
|
+
._Input-input_izwhv_39:hover {
|
558
558
|
border-color: var(--puck-color-neutral-3);
|
559
559
|
}
|
560
|
-
._Input-
|
560
|
+
._Input-arrayItem_izwhv_69 {
|
561
561
|
background: white;
|
562
562
|
border: 1px solid var(--puck-color-grey-8);
|
563
563
|
border-radius: 4px;
|
564
564
|
}
|
565
|
-
._Input-
|
565
|
+
._Input-arrayItem_izwhv_69 > summary {
|
566
566
|
color: var(--puck-color-grey-3);
|
567
567
|
display: flex;
|
568
568
|
align-items: center;
|
@@ -572,43 +572,42 @@
|
|
572
572
|
padding: 12px 16px;
|
573
573
|
position: relative;
|
574
574
|
}
|
575
|
-
._Input-
|
575
|
+
._Input-arrayItem_izwhv_69 > summary:hover {
|
576
576
|
cursor: pointer;
|
577
577
|
color: var(--puck-color-blue);
|
578
578
|
}
|
579
|
-
._Input-
|
579
|
+
._Input-arrayItem_izwhv_69 > summary::-webkit-details-marker {
|
580
580
|
display: none;
|
581
581
|
}
|
582
|
-
._Input-
|
582
|
+
._Input-arrayItem_izwhv_69 > ._Input-fieldset_izwhv_95 {
|
583
583
|
background-color: var(--puck-color-grey-11);
|
584
584
|
border: none;
|
585
585
|
border-top: 1px solid var(--puck-color-grey-8);
|
586
586
|
margin: 0;
|
587
|
-
padding
|
588
|
-
padding-top: 16px;
|
587
|
+
padding: 16px;
|
589
588
|
}
|
590
|
-
._Input-
|
589
|
+
._Input-arrayItem_izwhv_69 > ._Input-fieldset_izwhv_95 ._Input_izwhv_1 + ._Input-arrayItem_izwhv_69 > ._Input-fieldset_izwhv_95 ._Input_izwhv_1 {
|
591
590
|
margin-top: 16px;
|
592
591
|
}
|
593
|
-
._Input-
|
592
|
+
._Input-arrayItem_izwhv_69 > ._Input-fieldset_izwhv_95 ._Input-label_izwhv_27 {
|
594
593
|
padding-bottom: 4px;
|
595
594
|
}
|
596
|
-
._Input-
|
595
|
+
._Input-arrayItem_izwhv_69 ._Input-arrayItemAction_izwhv_116 {
|
597
596
|
border-radius: 4px;
|
598
597
|
opacity: 0;
|
599
598
|
}
|
600
|
-
._Input-
|
599
|
+
._Input-arrayItem_izwhv_69 summary:hover ._Input-arrayItemAction_izwhv_116 {
|
601
600
|
opacity: 1;
|
602
601
|
}
|
603
|
-
._Input-
|
602
|
+
._Input-arrayItem_izwhv_69 ._Input-arrayItemAction_izwhv_116:hover {
|
604
603
|
background: var(--puck-color-grey-9);
|
605
604
|
color: var(--puck-color-blue);
|
606
605
|
cursor: pointer;
|
607
606
|
}
|
608
|
-
._Input-
|
607
|
+
._Input-arrayItem_izwhv_69 + ._Input-arrayItem_izwhv_69 {
|
609
608
|
margin-top: 12px;
|
610
609
|
}
|
611
|
-
._Input-
|
610
|
+
._Input-addButton_izwhv_135 {
|
612
611
|
background-color: white;
|
613
612
|
border: none;
|
614
613
|
border-radius: 4px;
|
@@ -620,45 +619,45 @@
|
|
620
619
|
padding: 12px 16px;
|
621
620
|
text-align: left;
|
622
621
|
}
|
623
|
-
._Input-
|
622
|
+
._Input-addButton_izwhv_135:hover {
|
624
623
|
background: var(--puck-color-grey-10);
|
625
624
|
}
|
626
|
-
._Input-
|
625
|
+
._Input-array_izwhv_69 {
|
627
626
|
overflow: hidden;
|
628
627
|
}
|
629
|
-
._Input-
|
628
|
+
._Input-radioGroupItems_izwhv_156 {
|
630
629
|
display: flex;
|
631
630
|
border: 1px solid var(--puck-color-grey-7);
|
632
631
|
border-radius: 4px;
|
633
632
|
flex-wrap: wrap;
|
634
633
|
overflow: hidden;
|
635
634
|
}
|
636
|
-
._Input-
|
635
|
+
._Input-radio_izwhv_156 {
|
637
636
|
border-right: 1px solid var(--puck-color-grey-7);
|
638
637
|
flex-grow: 1;
|
639
638
|
}
|
640
|
-
._Input-
|
639
|
+
._Input-radio_izwhv_156:last-of-type {
|
641
640
|
border-right: none;
|
642
641
|
}
|
643
|
-
._Input-
|
642
|
+
._Input-radioInner_izwhv_173 {
|
644
643
|
color: var(--puck-color-grey-4);
|
645
644
|
font-size: var(--puck-font-size-xxxs);
|
646
645
|
padding: 8px 12px;
|
647
646
|
text-align: center;
|
648
647
|
}
|
649
|
-
._Input-
|
648
|
+
._Input-radioInner_izwhv_173:hover {
|
650
649
|
background-color: var(--puck-color-azure-9);
|
651
650
|
cursor: pointer;
|
652
651
|
}
|
653
|
-
._Input-
|
652
|
+
._Input-radio_izwhv_156 ._Input-radioInput_izwhv_185:checked ~ ._Input-radioInner_izwhv_173 {
|
654
653
|
background-color: var(--puck-color-azure-9);
|
655
654
|
color: var(--puck-color-grey-2);
|
656
655
|
font-weight: 500;
|
657
656
|
}
|
658
|
-
._Input-
|
657
|
+
._Input-radio_izwhv_156 ._Input-radioInput_izwhv_185 {
|
659
658
|
display: none;
|
660
659
|
}
|
661
|
-
.
|
660
|
+
._Input_izwhv_1 textarea._Input-input_izwhv_39 {
|
662
661
|
margin-bottom: -4px;
|
663
662
|
}
|
664
663
|
|
@@ -695,51 +694,52 @@
|
|
695
694
|
}
|
696
695
|
|
697
696
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css/#css-module-data */
|
698
|
-
.
|
697
|
+
._SidebarSection_f1p35_1 {
|
699
698
|
display: flex;
|
700
699
|
position: relative;
|
701
700
|
flex-direction: column;
|
701
|
+
color: black;
|
702
702
|
}
|
703
|
-
.
|
703
|
+
._SidebarSection_f1p35_1:last-of-type {
|
704
704
|
flex-grow: 1;
|
705
705
|
}
|
706
|
-
._SidebarSection-
|
706
|
+
._SidebarSection-title_f1p35_12 {
|
707
707
|
background: white;
|
708
708
|
padding: 16px;
|
709
709
|
border-bottom: 1px solid var(--puck-color-grey-8);
|
710
|
-
overflow-x:
|
710
|
+
overflow-x: auto;
|
711
711
|
}
|
712
|
-
._SidebarSection-
|
712
|
+
._SidebarSection-content_f1p35_19 {
|
713
713
|
border-bottom: 1px solid var(--puck-color-grey-8);
|
714
714
|
padding: 16px;
|
715
715
|
}
|
716
|
-
._SidebarSection--
|
716
|
+
._SidebarSection--noPadding_f1p35_24 ._SidebarSection-content_f1p35_19 {
|
717
717
|
padding: 0px;
|
718
718
|
}
|
719
|
-
.
|
719
|
+
._SidebarSection_f1p35_1:last-of-type ._SidebarSection-content_f1p35_19 {
|
720
720
|
border-bottom: none;
|
721
721
|
flex-grow: 1;
|
722
722
|
}
|
723
|
-
._SidebarSection-
|
723
|
+
._SidebarSection-breadcrumbLabel_f1p35_33 {
|
724
724
|
color: var(--puck-color-azure-3);
|
725
725
|
flex-shrink: 0;
|
726
726
|
}
|
727
|
-
._SidebarSection-
|
727
|
+
._SidebarSection-breadcrumbLabel_f1p35_33:hover {
|
728
728
|
color: var(--puck-color-azure-4);
|
729
729
|
cursor: pointer;
|
730
730
|
text-decoration: underline;
|
731
731
|
}
|
732
|
-
._SidebarSection-
|
732
|
+
._SidebarSection-breadcrumbs_f1p35_44 {
|
733
733
|
align-items: center;
|
734
734
|
display: flex;
|
735
735
|
gap: 4px;
|
736
736
|
}
|
737
|
-
._SidebarSection-
|
737
|
+
._SidebarSection-breadcrumb_f1p35_33 {
|
738
738
|
align-items: center;
|
739
739
|
display: flex;
|
740
740
|
gap: 4px;
|
741
741
|
}
|
742
|
-
._SidebarSection-
|
742
|
+
._SidebarSection-heading_f1p35_56 {
|
743
743
|
padding-right: 16px;
|
744
744
|
}
|
745
745
|
|
package/dist/index.d.ts
CHANGED
@@ -7,6 +7,9 @@ type Adaptor<AdaptorParams = {}> = {
|
|
7
7
|
name: string;
|
8
8
|
fetchList: (adaptorParams?: AdaptorParams) => Promise<Record<string, any>[] | null>;
|
9
9
|
};
|
10
|
+
type WithId<T> = T & {
|
11
|
+
id: string;
|
12
|
+
};
|
10
13
|
type Field<Props extends {
|
11
14
|
[key: string]: any;
|
12
15
|
} = {
|
@@ -17,7 +20,7 @@ type Field<Props extends {
|
|
17
20
|
adaptor?: Adaptor;
|
18
21
|
adaptorParams?: object;
|
19
22
|
arrayFields?: {
|
20
|
-
[SubPropName in keyof Props]: Field<Props[SubPropName]>;
|
23
|
+
[SubPropName in keyof Props]: Field<Props[SubPropName][0]>;
|
21
24
|
};
|
22
25
|
getItemSummary?: (item: Props, index?: number) => string;
|
23
26
|
defaultItemProps?: Props;
|
@@ -52,7 +55,7 @@ type Content<Props extends {
|
|
52
55
|
[key: string]: any;
|
53
56
|
}> = MappedItem<Props>[];
|
54
57
|
type ComponentConfig<ComponentProps extends DefaultComponentProps = DefaultComponentProps, DefaultProps = ComponentProps> = {
|
55
|
-
render: (props: ComponentProps) => ReactElement;
|
58
|
+
render: (props: WithId<ComponentProps>) => ReactElement;
|
56
59
|
defaultProps?: DefaultProps;
|
57
60
|
fields?: Fields<ComponentProps>;
|
58
61
|
};
|
@@ -76,11 +79,9 @@ type MappedItem<Props extends {
|
|
76
79
|
[key: string]: any;
|
77
80
|
}> = {
|
78
81
|
type: keyof Props;
|
79
|
-
props: {
|
82
|
+
props: WithId<{
|
80
83
|
[key: string]: any;
|
81
|
-
}
|
82
|
-
id: string;
|
83
|
-
};
|
84
|
+
}>;
|
84
85
|
};
|
85
86
|
type Data<Props extends {
|
86
87
|
[key: string]: any;
|
package/dist/index.js
CHANGED
@@ -1004,7 +1004,7 @@ var ExternalInput = ({
|
|
1004
1004
|
|
1005
1005
|
// css-module:/home/runner/work/puck/puck/packages/core/components/InputOrGroup/styles.module.css#css-module
|
1006
1006
|
init_react_import();
|
1007
|
-
var styles_module_default4 = { "Input": "
|
1007
|
+
var styles_module_default4 = { "Input": "_Input_izwhv_1", "Input-label": "_Input-label_izwhv_27", "Input-labelIcon": "_Input-labelIcon_izwhv_34", "Input-input": "_Input-input_izwhv_39", "Input--readOnly": "_Input--readOnly_izwhv_60", "Input-arrayItem": "_Input-arrayItem_izwhv_69", "Input-fieldset": "_Input-fieldset_izwhv_95", "Input-arrayItemAction": "_Input-arrayItemAction_izwhv_116", "Input-addButton": "_Input-addButton_izwhv_135", "Input-array": "_Input-array_izwhv_69", "Input-radioGroupItems": "_Input-radioGroupItems_izwhv_156", "Input-radio": "_Input-radio_izwhv_156", "Input-radioInner": "_Input-radioInner_izwhv_173", "Input-radioInput": "_Input-radioInput_izwhv_185" };
|
1008
1008
|
|
1009
1009
|
// components/InputOrGroup/index.tsx
|
1010
1010
|
var import_react_feather3 = require("react-feather");
|
@@ -1357,7 +1357,7 @@ init_react_import();
|
|
1357
1357
|
|
1358
1358
|
// css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css#css-module
|
1359
1359
|
init_react_import();
|
1360
|
-
var styles_module_default6 = { "SidebarSection": "
|
1360
|
+
var styles_module_default6 = { "SidebarSection": "_SidebarSection_f1p35_1", "SidebarSection-title": "_SidebarSection-title_f1p35_12", "SidebarSection-content": "_SidebarSection-content_f1p35_19", "SidebarSection--noPadding": "_SidebarSection--noPadding_f1p35_24", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_f1p35_33", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_f1p35_44", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_f1p35_33", "SidebarSection-heading": "_SidebarSection-heading_f1p35_56" };
|
1361
1361
|
|
1362
1362
|
// components/Heading/index.tsx
|
1363
1363
|
init_react_import();
|
@@ -2056,6 +2056,8 @@ function Puck({
|
|
2056
2056
|
{
|
2057
2057
|
style: {
|
2058
2058
|
gridArea: "header",
|
2059
|
+
color: "var(--puck-color-black)",
|
2060
|
+
background: "var(--puck-color-white)",
|
2059
2061
|
borderBottom: "1px solid var(--puck-color-grey-8)"
|
2060
2062
|
},
|
2061
2063
|
children: renderHeader ? renderHeader({
|
@@ -2189,7 +2191,6 @@ function Puck({
|
|
2189
2191
|
"div",
|
2190
2192
|
{
|
2191
2193
|
style: {
|
2192
|
-
background: "var(--puck-color-grey-10)",
|
2193
2194
|
padding: 32,
|
2194
2195
|
overflowY: "auto",
|
2195
2196
|
gridArea: "editor",
|
@@ -2202,8 +2203,8 @@ function Puck({
|
|
2202
2203
|
{
|
2203
2204
|
className: "puck-root",
|
2204
2205
|
style: {
|
2205
|
-
background: "white",
|
2206
2206
|
border: "1px solid var(--puck-color-grey-8)",
|
2207
|
+
boxShadow: "0px 0px 0px 3rem var(--puck-color-grey-10)",
|
2207
2208
|
zoom: 0.75
|
2208
2209
|
},
|
2209
2210
|
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Page, __spreadProps(__spreadValues({ data }, data.root), { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropZone, { zone: rootDroppableId }) }))
|
@@ -2220,7 +2221,8 @@ function Puck({
|
|
2220
2221
|
gridArea: "right",
|
2221
2222
|
fontFamily: "var(--puck-font-stack)",
|
2222
2223
|
display: "flex",
|
2223
|
-
flexDirection: "column"
|
2224
|
+
flexDirection: "column",
|
2225
|
+
background: "var(--puck-color-white)"
|
2224
2226
|
},
|
2225
2227
|
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FieldWrapper, { data, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
2226
2228
|
SidebarSection,
|
@@ -2330,7 +2332,7 @@ init_react_import();
|
|
2330
2332
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
2331
2333
|
function Render({ config, data }) {
|
2332
2334
|
if (config.root) {
|
2333
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropZoneProvider, { value: { data, config, mode: "render" }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(config.root.render, __spreadProps(__spreadValues({}, data.root), { editMode: false, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropZone, { zone: rootDroppableId }) })) });
|
2335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropZoneProvider, { value: { data, config, mode: "render" }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(config.root.render, __spreadProps(__spreadValues({}, data.root), { editMode: false, id: "puck-root", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropZone, { zone: rootDroppableId }) })) });
|
2334
2336
|
}
|
2335
2337
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropZoneProvider, { value: { data, config, mode: "render" }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropZone, { zone: rootDroppableId }) });
|
2336
2338
|
}
|