@puckeditor/plugin-ai 0.1.0-canary.90c84bb5 → 0.1.0-canary.9761de95
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 +60 -41
- package/dist/index.js +21 -12
- package/dist/index.mjs +21 -12
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -234,7 +234,7 @@ p {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
/* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Modal/Modal.module.css/#css-module-data */
|
|
237
|
-
._Modal-
|
|
237
|
+
._Modal-background_1bedq_1 {
|
|
238
238
|
align-items: center;
|
|
239
239
|
display: flex;
|
|
240
240
|
justify-content: center;
|
|
@@ -248,24 +248,26 @@ p {
|
|
|
248
248
|
opacity: 0;
|
|
249
249
|
pointer-events: none;
|
|
250
250
|
}
|
|
251
|
-
._Modal--
|
|
251
|
+
._Modal--visible_1bedq_16 ._Modal-background_1bedq_1 {
|
|
252
252
|
opacity: 1;
|
|
253
253
|
transition: opacity ease 100ms;
|
|
254
254
|
pointer-events: auto;
|
|
255
255
|
}
|
|
256
|
-
._Modal-
|
|
256
|
+
._Modal-modal_1bedq_22 {
|
|
257
257
|
background: white;
|
|
258
|
-
border-radius:
|
|
258
|
+
border-radius: 16px;
|
|
259
259
|
display: block;
|
|
260
|
-
|
|
260
|
+
max-height: calc(100vh - 24px);
|
|
261
|
+
margin-inline: 24px;
|
|
262
|
+
overflow: auto;
|
|
261
263
|
}
|
|
262
264
|
|
|
263
265
|
/* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Button/Button.module.css/#css-module-data */
|
|
264
|
-
.
|
|
266
|
+
._Button_1wyvm_1 {
|
|
265
267
|
appearance: none;
|
|
266
268
|
background: none;
|
|
267
269
|
border: 1px solid transparent;
|
|
268
|
-
border-radius:
|
|
270
|
+
border-radius: 8px;
|
|
269
271
|
color: var(--puck-color-white);
|
|
270
272
|
display: inline-flex;
|
|
271
273
|
align-items: center;
|
|
@@ -283,69 +285,80 @@ p {
|
|
|
283
285
|
white-space: nowrap;
|
|
284
286
|
margin: 0;
|
|
285
287
|
}
|
|
286
|
-
.
|
|
287
|
-
.
|
|
288
|
+
._Button_1wyvm_1:hover,
|
|
289
|
+
._Button_1wyvm_1:active {
|
|
288
290
|
transition: none;
|
|
289
291
|
}
|
|
290
|
-
._Button--
|
|
292
|
+
._Button--medium_1wyvm_29 {
|
|
291
293
|
min-height: 34px;
|
|
292
294
|
padding-bottom: 7px;
|
|
293
295
|
padding-left: 19px;
|
|
294
296
|
padding-right: 19px;
|
|
295
297
|
padding-top: 7px;
|
|
296
298
|
}
|
|
297
|
-
._Button--
|
|
299
|
+
._Button--large_1wyvm_37 {
|
|
298
300
|
padding-bottom: 11px;
|
|
299
301
|
padding-left: 19px;
|
|
300
302
|
padding-right: 19px;
|
|
301
303
|
padding-top: 11px;
|
|
302
304
|
}
|
|
303
|
-
._Button-
|
|
305
|
+
._Button-icon_1wyvm_44 {
|
|
304
306
|
margin-top: 2px;
|
|
305
307
|
}
|
|
306
|
-
._Button--
|
|
308
|
+
._Button--primary_1wyvm_48 {
|
|
307
309
|
background: var(--puck-color-azure-04);
|
|
308
310
|
}
|
|
309
|
-
.
|
|
311
|
+
._Button_1wyvm_1:focus-visible {
|
|
310
312
|
outline: 2px solid var(--puck-color-azure-05);
|
|
311
313
|
outline-offset: 2px;
|
|
312
314
|
}
|
|
313
315
|
@media (hover: hover) and (pointer: fine) {
|
|
314
|
-
._Button--
|
|
316
|
+
._Button--primary_1wyvm_48:hover {
|
|
315
317
|
background-color: var(--puck-color-azure-03);
|
|
316
318
|
}
|
|
317
319
|
}
|
|
318
|
-
._Button--
|
|
320
|
+
._Button--primary_1wyvm_48:active {
|
|
319
321
|
background-color: var(--puck-color-azure-02);
|
|
320
322
|
}
|
|
321
|
-
._Button--
|
|
323
|
+
._Button--secondary_1wyvm_67 {
|
|
322
324
|
border: 1px solid currentColor;
|
|
323
325
|
color: currentColor;
|
|
324
326
|
}
|
|
325
327
|
@media (hover: hover) and (pointer: fine) {
|
|
326
|
-
._Button--
|
|
328
|
+
._Button--secondary_1wyvm_67:hover {
|
|
327
329
|
background-color: var(--puck-color-azure-12);
|
|
328
330
|
color: var(--puck-color-black);
|
|
329
331
|
}
|
|
330
332
|
}
|
|
331
|
-
._Button--
|
|
333
|
+
._Button--secondary_1wyvm_67:active {
|
|
332
334
|
background-color: var(--puck-color-azure-11);
|
|
333
335
|
color: var(--puck-color-black);
|
|
334
336
|
}
|
|
335
|
-
._Button--
|
|
337
|
+
._Button--danger_1wyvm_84 {
|
|
338
|
+
background: var(--puck-color-red-04);
|
|
339
|
+
}
|
|
340
|
+
@media (hover: hover) and (pointer: fine) {
|
|
341
|
+
._Button--danger_1wyvm_84:hover {
|
|
342
|
+
background-color: var(--puck-color-red-03);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
._Button--danger_1wyvm_84:active {
|
|
346
|
+
background-color: var(--puck-color-red-02);
|
|
347
|
+
}
|
|
348
|
+
._Button--flush_1wyvm_98 {
|
|
336
349
|
border-radius: 0;
|
|
337
350
|
}
|
|
338
|
-
._Button--
|
|
339
|
-
._Button--
|
|
351
|
+
._Button--disabled_1wyvm_102,
|
|
352
|
+
._Button--disabled_1wyvm_102:hover {
|
|
340
353
|
background-color: var(--puck-color-grey-09);
|
|
341
354
|
color: var(--puck-color-grey-03);
|
|
342
355
|
cursor: not-allowed;
|
|
343
356
|
}
|
|
344
|
-
._Button--
|
|
357
|
+
._Button--fullWidth_1wyvm_109 {
|
|
345
358
|
justify-content: center;
|
|
346
359
|
width: 100%;
|
|
347
360
|
}
|
|
348
|
-
._Button-
|
|
361
|
+
._Button-spinner_1wyvm_114 {
|
|
349
362
|
padding-left: 8px;
|
|
350
363
|
}
|
|
351
364
|
|
|
@@ -800,26 +813,26 @@ p {
|
|
|
800
813
|
}
|
|
801
814
|
|
|
802
815
|
/* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Table/Table.module.css/#css-module-data */
|
|
803
|
-
.
|
|
816
|
+
._Table_1bbu5_1 {
|
|
804
817
|
color: black;
|
|
805
818
|
display: flex;
|
|
806
819
|
flex-direction: column;
|
|
807
820
|
flex-grow: 1;
|
|
808
821
|
overflow-y: auto;
|
|
809
822
|
}
|
|
810
|
-
._Table-
|
|
823
|
+
._Table-filters_1bbu5_9 {
|
|
811
824
|
margin: 16px;
|
|
812
825
|
}
|
|
813
|
-
._Table-
|
|
826
|
+
._Table-inner_1bbu5_13 {
|
|
814
827
|
text-align: left;
|
|
815
828
|
}
|
|
816
|
-
._Table-
|
|
829
|
+
._Table-table_1bbu5_17 {
|
|
817
830
|
color: var(--puck-color-grey-02);
|
|
818
831
|
font-size: var(--puck-font-size-xxs);
|
|
819
832
|
position: relative;
|
|
820
833
|
width: 100%;
|
|
821
834
|
}
|
|
822
|
-
.
|
|
835
|
+
._Table_1bbu5_1 thead {
|
|
823
836
|
background: white;
|
|
824
837
|
font-size: var(--puck-font-size-xxs);
|
|
825
838
|
position: sticky;
|
|
@@ -827,17 +840,20 @@ p {
|
|
|
827
840
|
white-space: nowrap;
|
|
828
841
|
z-index: 1;
|
|
829
842
|
}
|
|
830
|
-
.
|
|
843
|
+
._Table_1bbu5_1 thead::after {
|
|
831
844
|
content: "";
|
|
832
845
|
position: absolute;
|
|
833
846
|
height: 1px;
|
|
834
847
|
width: 100%;
|
|
835
848
|
background-color: var(--puck-color-grey-10);
|
|
836
849
|
}
|
|
837
|
-
.
|
|
850
|
+
._Table--hideHeader_1bbu5_41 thead {
|
|
851
|
+
display: none;
|
|
852
|
+
}
|
|
853
|
+
._Table_1bbu5_1 tbody tr {
|
|
838
854
|
z-index: 0;
|
|
839
855
|
}
|
|
840
|
-
.
|
|
856
|
+
._Table_1bbu5_1 th {
|
|
841
857
|
background: var(--puck-color-grey-12);
|
|
842
858
|
font-weight: 400;
|
|
843
859
|
padding-left: 24px;
|
|
@@ -846,12 +862,12 @@ p {
|
|
|
846
862
|
padding-top: 12px;
|
|
847
863
|
}
|
|
848
864
|
@media (--standard-viewport) {
|
|
849
|
-
.
|
|
865
|
+
._Table_1bbu5_1 th {
|
|
850
866
|
padding-left: 32px;
|
|
851
867
|
padding-right: 32px;
|
|
852
868
|
}
|
|
853
869
|
}
|
|
854
|
-
.
|
|
870
|
+
._Table_1bbu5_1 td {
|
|
855
871
|
border-bottom: 1px solid var(--puck-color-grey-10);
|
|
856
872
|
padding-left: 24px;
|
|
857
873
|
padding-right: 24px;
|
|
@@ -859,26 +875,26 @@ p {
|
|
|
859
875
|
padding-top: 16px;
|
|
860
876
|
white-space: nowrap;
|
|
861
877
|
}
|
|
862
|
-
.
|
|
878
|
+
._Table_1bbu5_1 td:not(:first-of-type) {
|
|
863
879
|
color: var(--puck-color-grey-05);
|
|
864
880
|
}
|
|
865
|
-
.
|
|
881
|
+
._Table_1bbu5_1 tbody tr:last-of-type td {
|
|
866
882
|
border-bottom: none;
|
|
867
883
|
}
|
|
868
884
|
@media (--standard-viewport) {
|
|
869
|
-
.
|
|
885
|
+
._Table_1bbu5_1 td {
|
|
870
886
|
padding-left: 32px;
|
|
871
887
|
padding-right: 32px;
|
|
872
888
|
}
|
|
873
889
|
}
|
|
874
|
-
._Table-
|
|
890
|
+
._Table-footer_1bbu5_89 {
|
|
875
891
|
border-top: 1px solid var(--puck-color-grey-09);
|
|
876
892
|
}
|
|
877
|
-
._Table--
|
|
893
|
+
._Table--clickableRows_1bbu5_93 tbody tr:hover {
|
|
878
894
|
background: var(--puck-color-azure-12);
|
|
879
895
|
cursor: pointer;
|
|
880
896
|
}
|
|
881
|
-
._Table-
|
|
897
|
+
._Table-placeholder_1bbu5_98 {
|
|
882
898
|
align-items: center;
|
|
883
899
|
color: var(--puck-color-grey-06);
|
|
884
900
|
justify-content: center;
|
|
@@ -888,9 +904,12 @@ p {
|
|
|
888
904
|
width: 100%;
|
|
889
905
|
height: 100%;
|
|
890
906
|
}
|
|
891
|
-
._Table-
|
|
907
|
+
._Table-loader_1bbu5_109 {
|
|
892
908
|
padding: 16px 24px;
|
|
893
909
|
}
|
|
910
|
+
._TableRow--highlightRow_1bbu5_113 {
|
|
911
|
+
background-color: var(--puck-color-grey-12);
|
|
912
|
+
}
|
|
894
913
|
|
|
895
914
|
/* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/VerticalSpace/VerticalSpace.module.css/#css-module-data */
|
|
896
915
|
._VerticalSpace_1tjaw_1 {
|
package/dist/index.js
CHANGED
|
@@ -20910,7 +20910,7 @@ init_react_import();
|
|
|
20910
20910
|
|
|
20911
20911
|
// css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Modal/Modal.module.css#css-module
|
|
20912
20912
|
init_react_import();
|
|
20913
|
-
var Modal_module_default = { "Modal-background": "_Modal-
|
|
20913
|
+
var Modal_module_default = { "Modal-background": "_Modal-background_1bedq_1", "Modal--visible": "_Modal--visible_1bedq_16", "Modal-modal": "_Modal-modal_1bedq_22" };
|
|
20914
20914
|
|
|
20915
20915
|
// ../platform-client/components/Modal/Modal.tsx
|
|
20916
20916
|
var import_react9 = require("react");
|
|
@@ -20928,7 +20928,7 @@ var import_react8 = require("react");
|
|
|
20928
20928
|
|
|
20929
20929
|
// css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Button/Button.module.css#css-module
|
|
20930
20930
|
init_react_import();
|
|
20931
|
-
var Button_module_default = { "Button": "
|
|
20931
|
+
var Button_module_default = { "Button": "_Button_1wyvm_1", "Button--medium": "_Button--medium_1wyvm_29", "Button--large": "_Button--large_1wyvm_37", "Button-icon": "_Button-icon_1wyvm_44", "Button--primary": "_Button--primary_1wyvm_48", "Button--secondary": "_Button--secondary_1wyvm_67", "Button--danger": "_Button--danger_1wyvm_84", "Button--flush": "_Button--flush_1wyvm_98", "Button--disabled": "_Button--disabled_1wyvm_102", "Button--fullWidth": "_Button--fullWidth_1wyvm_109", "Button-spinner": "_Button-spinner_1wyvm_114" };
|
|
20932
20932
|
|
|
20933
20933
|
// ../platform-client/components/Loader/index.tsx
|
|
20934
20934
|
init_react_import();
|
|
@@ -20988,6 +20988,7 @@ var Button = ({
|
|
|
20988
20988
|
className: getClassName2({
|
|
20989
20989
|
primary: variant === "primary",
|
|
20990
20990
|
secondary: variant === "secondary",
|
|
20991
|
+
danger: variant === "danger",
|
|
20991
20992
|
disabled,
|
|
20992
20993
|
fullWidth,
|
|
20993
20994
|
[size]: true
|
|
@@ -21009,7 +21010,7 @@ var Button = ({
|
|
|
21009
21010
|
children: [
|
|
21010
21011
|
icon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: getClassName2("icon"), children: icon }),
|
|
21011
21012
|
children,
|
|
21012
|
-
loading && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: getClassName2("spinner"), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Loader, { size:
|
|
21013
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: getClassName2("spinner"), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Loader, { size: 12 }) })
|
|
21013
21014
|
]
|
|
21014
21015
|
}
|
|
21015
21016
|
);
|
|
@@ -21019,18 +21020,24 @@ var Button = ({
|
|
|
21019
21020
|
// ../platform-client/components/Modal/Modal.tsx
|
|
21020
21021
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
21021
21022
|
var getClassName3 = getClassNameFactory2("Modal", Modal_module_default);
|
|
21022
|
-
var modalContext = (0, import_react9.createContext)({
|
|
21023
|
-
|
|
21023
|
+
var modalContext = (0, import_react9.createContext)({
|
|
21024
|
+
buttonVariant: "primary",
|
|
21025
|
+
visible: false,
|
|
21026
|
+
setVisible: () => {
|
|
21027
|
+
},
|
|
21028
|
+
ref: null
|
|
21029
|
+
});
|
|
21024
21030
|
var Modal = ({
|
|
21025
21031
|
actionLabel = "Open",
|
|
21026
|
-
children
|
|
21032
|
+
children,
|
|
21033
|
+
hideButton = false
|
|
21027
21034
|
}) => {
|
|
21028
|
-
const { visible, setVisible, ref } = (0, import_react9.useContext)(modalContext);
|
|
21035
|
+
const { visible, setVisible, buttonVariant, ref } = (0, import_react9.useContext)(modalContext);
|
|
21029
21036
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: getClassName3({ visible }), children: [
|
|
21030
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: getClassName3("button"), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
21037
|
+
!hideButton && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: getClassName3("button"), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
21031
21038
|
Button,
|
|
21032
21039
|
{
|
|
21033
|
-
variant:
|
|
21040
|
+
variant: buttonVariant,
|
|
21034
21041
|
onClick: () => {
|
|
21035
21042
|
setVisible(!visible);
|
|
21036
21043
|
},
|
|
@@ -21076,9 +21083,10 @@ var ActionModal = ({
|
|
|
21076
21083
|
children,
|
|
21077
21084
|
title,
|
|
21078
21085
|
description,
|
|
21079
|
-
actions
|
|
21086
|
+
actions,
|
|
21087
|
+
hideButton
|
|
21080
21088
|
}) => {
|
|
21081
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Modal, { actionLabel, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: getClassName5(), children: [
|
|
21089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Modal, { actionLabel, hideButton, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: getClassName5(), children: [
|
|
21082
21090
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: getClassName5("header"), children: [
|
|
21083
21091
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Heading, { size: "s", children: title }),
|
|
21084
21092
|
description && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("small", { children: description })
|
|
@@ -21382,11 +21390,12 @@ var import_react14 = require("react");
|
|
|
21382
21390
|
|
|
21383
21391
|
// css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Table/Table.module.css#css-module
|
|
21384
21392
|
init_react_import();
|
|
21385
|
-
var Table_module_default = { "Table": "
|
|
21393
|
+
var Table_module_default = { "Table": "_Table_1bbu5_1", "Table-filters": "_Table-filters_1bbu5_9", "Table-inner": "_Table-inner_1bbu5_13", "Table-table": "_Table-table_1bbu5_17", "Table--hideHeader": "_Table--hideHeader_1bbu5_41", "Table-footer": "_Table-footer_1bbu5_89", "Table--clickableRows": "_Table--clickableRows_1bbu5_93", "Table-placeholder": "_Table-placeholder_1bbu5_98", "Table-loader": "_Table-loader_1bbu5_109", "TableRow--highlightRow": "_TableRow--highlightRow_1bbu5_113" };
|
|
21386
21394
|
|
|
21387
21395
|
// ../platform-client/components/Table/Table.tsx
|
|
21388
21396
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
21389
21397
|
var getClassName14 = get_class_name_factory_default("Table", Table_module_default);
|
|
21398
|
+
var getRowClassName = get_class_name_factory_default("TableRow", Table_module_default);
|
|
21390
21399
|
|
|
21391
21400
|
// ../platform-client/components/Textarea/index.tsx
|
|
21392
21401
|
init_react_import();
|
package/dist/index.mjs
CHANGED
|
@@ -20902,7 +20902,7 @@ init_react_import();
|
|
|
20902
20902
|
|
|
20903
20903
|
// css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Modal/Modal.module.css#css-module
|
|
20904
20904
|
init_react_import();
|
|
20905
|
-
var Modal_module_default = { "Modal-background": "_Modal-
|
|
20905
|
+
var Modal_module_default = { "Modal-background": "_Modal-background_1bedq_1", "Modal--visible": "_Modal--visible_1bedq_16", "Modal-modal": "_Modal-modal_1bedq_22" };
|
|
20906
20906
|
|
|
20907
20907
|
// ../platform-client/components/Modal/Modal.tsx
|
|
20908
20908
|
import { createContext, useContext } from "react";
|
|
@@ -20920,7 +20920,7 @@ import { useEffect as useEffect4, useState as useState4 } from "react";
|
|
|
20920
20920
|
|
|
20921
20921
|
// css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Button/Button.module.css#css-module
|
|
20922
20922
|
init_react_import();
|
|
20923
|
-
var Button_module_default = { "Button": "
|
|
20923
|
+
var Button_module_default = { "Button": "_Button_1wyvm_1", "Button--medium": "_Button--medium_1wyvm_29", "Button--large": "_Button--large_1wyvm_37", "Button-icon": "_Button-icon_1wyvm_44", "Button--primary": "_Button--primary_1wyvm_48", "Button--secondary": "_Button--secondary_1wyvm_67", "Button--danger": "_Button--danger_1wyvm_84", "Button--flush": "_Button--flush_1wyvm_98", "Button--disabled": "_Button--disabled_1wyvm_102", "Button--fullWidth": "_Button--fullWidth_1wyvm_109", "Button-spinner": "_Button-spinner_1wyvm_114" };
|
|
20924
20924
|
|
|
20925
20925
|
// ../platform-client/components/Loader/index.tsx
|
|
20926
20926
|
init_react_import();
|
|
@@ -20980,6 +20980,7 @@ var Button = ({
|
|
|
20980
20980
|
className: getClassName2({
|
|
20981
20981
|
primary: variant === "primary",
|
|
20982
20982
|
secondary: variant === "secondary",
|
|
20983
|
+
danger: variant === "danger",
|
|
20983
20984
|
disabled,
|
|
20984
20985
|
fullWidth,
|
|
20985
20986
|
[size]: true
|
|
@@ -21001,7 +21002,7 @@ var Button = ({
|
|
|
21001
21002
|
children: [
|
|
21002
21003
|
icon && /* @__PURE__ */ jsx2("div", { className: getClassName2("icon"), children: icon }),
|
|
21003
21004
|
children,
|
|
21004
|
-
loading && /* @__PURE__ */ jsx2("div", { className: getClassName2("spinner"), children: /* @__PURE__ */ jsx2(Loader, { size:
|
|
21005
|
+
loading && /* @__PURE__ */ jsx2("div", { className: getClassName2("spinner"), children: /* @__PURE__ */ jsx2(Loader, { size: 12 }) })
|
|
21005
21006
|
]
|
|
21006
21007
|
}
|
|
21007
21008
|
);
|
|
@@ -21011,18 +21012,24 @@ var Button = ({
|
|
|
21011
21012
|
// ../platform-client/components/Modal/Modal.tsx
|
|
21012
21013
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
21013
21014
|
var getClassName3 = getClassNameFactory2("Modal", Modal_module_default);
|
|
21014
|
-
var modalContext = createContext({
|
|
21015
|
-
|
|
21015
|
+
var modalContext = createContext({
|
|
21016
|
+
buttonVariant: "primary",
|
|
21017
|
+
visible: false,
|
|
21018
|
+
setVisible: () => {
|
|
21019
|
+
},
|
|
21020
|
+
ref: null
|
|
21021
|
+
});
|
|
21016
21022
|
var Modal = ({
|
|
21017
21023
|
actionLabel = "Open",
|
|
21018
|
-
children
|
|
21024
|
+
children,
|
|
21025
|
+
hideButton = false
|
|
21019
21026
|
}) => {
|
|
21020
|
-
const { visible, setVisible, ref } = useContext(modalContext);
|
|
21027
|
+
const { visible, setVisible, buttonVariant, ref } = useContext(modalContext);
|
|
21021
21028
|
return /* @__PURE__ */ jsxs2("div", { className: getClassName3({ visible }), children: [
|
|
21022
|
-
/* @__PURE__ */ jsx3("div", { className: getClassName3("button"), children: /* @__PURE__ */ jsx3(
|
|
21029
|
+
!hideButton && /* @__PURE__ */ jsx3("div", { className: getClassName3("button"), children: /* @__PURE__ */ jsx3(
|
|
21023
21030
|
Button,
|
|
21024
21031
|
{
|
|
21025
|
-
variant:
|
|
21032
|
+
variant: buttonVariant,
|
|
21026
21033
|
onClick: () => {
|
|
21027
21034
|
setVisible(!visible);
|
|
21028
21035
|
},
|
|
@@ -21068,9 +21075,10 @@ var ActionModal = ({
|
|
|
21068
21075
|
children,
|
|
21069
21076
|
title,
|
|
21070
21077
|
description,
|
|
21071
|
-
actions
|
|
21078
|
+
actions,
|
|
21079
|
+
hideButton
|
|
21072
21080
|
}) => {
|
|
21073
|
-
return /* @__PURE__ */ jsx5(Modal, { actionLabel, children: /* @__PURE__ */ jsxs3("div", { className: getClassName5(), children: [
|
|
21081
|
+
return /* @__PURE__ */ jsx5(Modal, { actionLabel, hideButton, children: /* @__PURE__ */ jsxs3("div", { className: getClassName5(), children: [
|
|
21074
21082
|
/* @__PURE__ */ jsxs3("div", { className: getClassName5("header"), children: [
|
|
21075
21083
|
/* @__PURE__ */ jsx5(Heading, { size: "s", children: title }),
|
|
21076
21084
|
description && /* @__PURE__ */ jsx5("small", { children: description })
|
|
@@ -21374,11 +21382,12 @@ import { useEffect as useEffect6, useMemo as useMemo2, useRef as useRef5, useSta
|
|
|
21374
21382
|
|
|
21375
21383
|
// css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Table/Table.module.css#css-module
|
|
21376
21384
|
init_react_import();
|
|
21377
|
-
var Table_module_default = { "Table": "
|
|
21385
|
+
var Table_module_default = { "Table": "_Table_1bbu5_1", "Table-filters": "_Table-filters_1bbu5_9", "Table-inner": "_Table-inner_1bbu5_13", "Table-table": "_Table-table_1bbu5_17", "Table--hideHeader": "_Table--hideHeader_1bbu5_41", "Table-footer": "_Table-footer_1bbu5_89", "Table--clickableRows": "_Table--clickableRows_1bbu5_93", "Table-placeholder": "_Table-placeholder_1bbu5_98", "Table-loader": "_Table-loader_1bbu5_109", "TableRow--highlightRow": "_TableRow--highlightRow_1bbu5_113" };
|
|
21378
21386
|
|
|
21379
21387
|
// ../platform-client/components/Table/Table.tsx
|
|
21380
21388
|
import { jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
21381
21389
|
var getClassName14 = get_class_name_factory_default("Table", Table_module_default);
|
|
21390
|
+
var getRowClassName = get_class_name_factory_default("TableRow", Table_module_default);
|
|
21382
21391
|
|
|
21383
21392
|
// ../platform-client/components/Textarea/index.tsx
|
|
21384
21393
|
init_react_import();
|
package/package.json
CHANGED