@uxf/cms 11.25.1 → 11.27.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/cms",
3
- "version": "11.25.1",
3
+ "version": "11.27.0",
4
4
  "description": "UXF Cms",
5
5
  "author": "UXFans <dev@uxf.cz>",
6
6
  "homepage": "https://gitlab.com/uxf-npm/cms#readme",
@@ -32,11 +32,11 @@
32
32
  "@redux-devtools/extension": "3.3.0",
33
33
  "@uxf/core": "11.22.0",
34
34
  "@uxf/core-react": "11.22.0",
35
- "@uxf/data-grid": "11.25.1",
36
- "@uxf/form": "11.25.1",
35
+ "@uxf/data-grid": "11.27.0",
36
+ "@uxf/form": "11.27.0",
37
37
  "@uxf/router": "11.22.0",
38
- "@uxf/ui": "11.25.1",
39
- "@uxf/wysiwyg": "11.25.1",
38
+ "@uxf/ui": "11.27.0",
39
+ "@uxf/wysiwyg": "11.27.0",
40
40
  "axios": "1.6.7",
41
41
  "axios-hooks": "5.0.2",
42
42
  "es6-error": "4.1.1",
@@ -20,9 +20,9 @@ const AddSectionButton = (props) => {
20
20
  react_1.default.createElement(button_1.Button, { onClick: () => (0, modal_service_1.openModal)({
21
21
  children: (react_1.default.createElement("div", { className: "px-4 py-6" },
22
22
  react_1.default.createElement("h2", { className: "uxf-typo-h5 mb-4" }, "P\u0159idat sekci"),
23
- react_1.default.createElement("div", { className: "space-y-4" }, props.contentComponents.map((component) => (react_1.default.createElement(button_1.Button, { key: component.getConfig().type, isFullWidth: true, variant: "white", onClick: () => props.createSection(component, props.index) }, component.getConfig().label)))))),
23
+ react_1.default.createElement("div", { className: "space-y-4" }, props.contentComponents.map((component) => (react_1.default.createElement(button_1.Button, { key: component.getConfig().type, isFullWidth: true, variant: "secondary", onClick: () => props.createSection(component, props.index) }, component.getConfig().label)))))),
24
24
  width: "sm",
25
- }), variant: "white", size: "sm" }, "P\u0159idat sekci")));
25
+ }), variant: "secondary", size: "sm" }, "P\u0159idat sekci")));
26
26
  };
27
27
  const FormContent = (props) => {
28
28
  // eslint-disable-next-line react/destructuring-assignment
@@ -56,7 +56,7 @@ const FormContent = (props) => {
56
56
  react_1.default.createElement("div", null),
57
57
  react_1.default.createElement("div", { className: "flex grow items-center justify-center" },
58
58
  react_1.default.createElement("p", { className: "text-error font-bold" }, "Nepodporovan\u00E1 sekce")),
59
- react_1.default.createElement(button_1.Button, { variant: "white", size: "sm", isIconButton: true, onClick: onRemove },
59
+ react_1.default.createElement(button_1.Button, { variant: "secondary", size: "sm", isIconButton: true, onClick: onRemove },
60
60
  react_1.default.createElement(icon_1.Icon, { name: "delete" }))),
61
61
  react_1.default.createElement(AddSectionButton, { contentComponents: contentComponents, createSection: createSection, index: index })));
62
62
  };
@@ -36,9 +36,9 @@ const Header = (props) => {
36
36
  react_1.default.createElement("h1", { className: "uxf-typo-h5" }, props.title),
37
37
  react_1.default.createElement("div", { className: "flex space-x-4" },
38
38
  react_1.default.createElement(button_group_1.ButtonGroup, null,
39
- react_1.default.createElement(button_1.Button, { onClick: () => setLanguage("cs"), size: "xs", variant: language === "cs" ? "default" : "white" }, "CS"),
40
- react_1.default.createElement(button_1.Button, { onClick: () => setLanguage("en"), size: "xs", variant: language === "en" ? "default" : "white" }, "EN"),
41
- react_1.default.createElement(button_1.Button, { onClick: () => setLanguage("de"), size: "xs", variant: language === "de" ? "default" : "white" }, "DE")),
39
+ react_1.default.createElement(button_1.Button, { onClick: () => setLanguage("cs"), size: "sm", variant: language === "cs" ? "default" : "secondary" }, "CS"),
40
+ react_1.default.createElement(button_1.Button, { onClick: () => setLanguage("en"), size: "sm", variant: language === "en" ? "default" : "secondary" }, "EN"),
41
+ react_1.default.createElement(button_1.Button, { onClick: () => setLanguage("de"), size: "sm", variant: language === "de" ? "default" : "secondary" }, "DE")),
42
42
  react_1.default.createElement("button", { form: constants_1.CONTENT_BUILDER_FORM_ID, className: "uxf-button uxf-button--color-default uxf-button--size-default uxf-button--variant-default is-hoverable", type: "submit" }, "Ulo\u017Eit")))));
43
43
  };
44
44
  exports.Header = Header;
@@ -38,7 +38,7 @@ const FeatureSection = (props) => {
38
38
  "Feature #",
39
39
  index + 1),
40
40
  index > 0 ? (react_1.default.createElement("div", null,
41
- react_1.default.createElement(button_1.Button, { size: "sm", variant: "white", onClick: handleRemove }, "Smazat feature"))) : (react_1.default.createElement("div", null))),
41
+ react_1.default.createElement(button_1.Button, { size: "sm", variant: "secondary", onClick: handleRemove }, "Smazat feature"))) : (react_1.default.createElement("div", null))),
42
42
  react_1.default.createElement("div", { className: "mt-2 grid grid-cols-12 gap-4" },
43
43
  react_1.default.createElement("div", { className: "col-span-12 sm:col-span-6" },
44
44
  react_1.default.createElement(text_input_1.TextInput, { name: `${props.name}.features[${index}].title`, label: "Nadpis", isRequired: true, control: props.control })),
@@ -49,7 +49,7 @@ const FeatureSection = (props) => {
49
49
  react_1.default.createElement("div", { className: "col-span-12" },
50
50
  react_1.default.createElement(text_input_1.TextInput, { name: `${props.name}.features[${index}].ctaUrl`, label: "CTA url", control: props.control })))));
51
51
  }),
52
- react_1.default.createElement(button_1.Button, { variant: "white", size: "sm", onClick: () => append({ title: "" }) }, "P\u0159idat feature")))))));
52
+ react_1.default.createElement(button_1.Button, { variant: "secondary", size: "sm", onClick: () => append({ title: "" }) }, "P\u0159idat feature")))))));
53
53
  };
54
54
  exports.FeatureSection = FeatureSection;
55
55
  exports.FeatureSection.getConfig = () => ({
@@ -32,7 +32,7 @@ const People = (props) => {
32
32
  "Osoba #",
33
33
  index + 1),
34
34
  index > 0 ? (react_1.default.createElement("div", null,
35
- react_1.default.createElement(button_1.Button, { size: "sm", variant: "white", onClick: handleRemove }, "Smazat osobu"))) : (react_1.default.createElement("div", null))),
35
+ react_1.default.createElement(button_1.Button, { size: "sm", variant: "secondary", onClick: handleRemove }, "Smazat osobu"))) : (react_1.default.createElement("div", null))),
36
36
  react_1.default.createElement("div", { className: "mt-2 grid grid-cols-12 gap-4" },
37
37
  react_1.default.createElement("div", { className: "col-span-12 sm:col-span-6" },
38
38
  react_1.default.createElement(text_input_1.TextInput, { name: `${props.name}.people.${index}.name`, label: "Jm\u00E9no", isRequired: true, control: props.control })),
@@ -47,7 +47,7 @@ const People = (props) => {
47
47
  react_1.default.createElement("div", { className: "col-span-6" },
48
48
  react_1.default.createElement(text_input_1.TextInput, { name: `${props.name}.people.${index}.email`, label: "E-mail", type: "email", control: props.control })))));
49
49
  }),
50
- react_1.default.createElement(button_1.Button, { variant: "white", size: "sm", onClick: () => append({ name: "" }) }, "P\u0159idat osobu")))));
50
+ react_1.default.createElement(button_1.Button, { variant: "secondary", size: "sm", onClick: () => append({ name: "" }) }, "P\u0159idat osobu")))));
51
51
  };
52
52
  exports.People = People;
53
53
  exports.People.getConfig = () => ({
@@ -33,10 +33,10 @@ const ContentField = (props) => {
33
33
  react_1.default.createElement("div", { className: "mb-4 mt-6 flex flex-wrap items-center justify-between gap-4" },
34
34
  react_1.default.createElement("h2", { className: "uxf-typo-h5" }, "Obsah"),
35
35
  fields.length > 1 && (react_1.default.createElement("div", { className: "flex justify-end space-x-4" },
36
- react_1.default.createElement(button_1.Button, { variant: "white", size: "xs", onClick: () => setVisibilityForAll(true) },
36
+ react_1.default.createElement(button_1.Button, { variant: "secondary", size: "sm", onClick: () => setVisibilityForAll(true) },
37
37
  react_1.default.createElement(icon_1.Icon, { name: "arrow-down-from-line", className: "mr-1" }),
38
38
  "otev\u0159\u00EDt v\u0161e"),
39
- react_1.default.createElement(button_1.Button, { variant: "white", size: "xs", onClick: () => setVisibilityForAll(false) },
39
+ react_1.default.createElement(button_1.Button, { variant: "secondary", size: "sm", onClick: () => setVisibilityForAll(false) },
40
40
  react_1.default.createElement(icon_1.Icon, { name: "arrow-up-to-line", className: "mr-1" }),
41
41
  "zav\u0159\u00EDt v\u0161e")))),
42
42
  react_1.default.createElement(core_1.DndContext, { sensors: memoizedSensors, onDragStart: onDragStart, onDragEnd: onDragEnd, onDragCancel: onDragCancel },
@@ -52,7 +52,7 @@ const ContentField = (props) => {
52
52
  react_1.default.createElement(button_1.Button, { className: "h-20 border-2 border-dashed border-gray-600", size: "lg", variant: "text", isFullWidth: true, onClick: () => (0, modal_service_1.openModal)({
53
53
  children: (react_1.default.createElement("div", { className: "px-4 py-6" },
54
54
  react_1.default.createElement("h2", { className: "uxf-typo-h5 mb-4" }, "P\u0159idat sekci"),
55
- react_1.default.createElement("div", { className: "space-y-4" }, props.contentComponents.map((component) => (react_1.default.createElement(button_1.Button, { key: component.getConfig().type, isFullWidth: true, variant: "white", onClick: () => createSection(component, 0) }, component.getConfig().label)))))),
55
+ react_1.default.createElement("div", { className: "space-y-4" }, props.contentComponents.map((component) => (react_1.default.createElement(button_1.Button, { key: component.getConfig().type, isFullWidth: true, variant: "secondary", onClick: () => createSection(component, 0) }, component.getConfig().label)))))),
56
56
  width: "sm",
57
57
  }) },
58
58
  react_1.default.createElement(icon_1.Icon, { name: "plus", className: "mr-3", size: 16 }),
@@ -62,9 +62,9 @@ const ContentHeader = (props) => {
62
62
  react_1.default.createElement("h3", { className: "uxf-typo-h6" }, props.title),
63
63
  react_1.default.createElement("div", { className: "flex items-center space-x-4" },
64
64
  react_1.default.createElement("div", { className: "flex space-x-2" },
65
- react_1.default.createElement(button_1.Button, { size: "sm", variant: "white", isIconButton: true, onClick: (event) => setVisibilityHandler(event) },
65
+ react_1.default.createElement(button_1.Button, { size: "sm", variant: "secondary", isIconButton: true, onClick: (event) => setVisibilityHandler(event) },
66
66
  react_1.default.createElement(icon_1.Icon, { name: "calendar" })),
67
- react_1.default.createElement(button_1.Button, { size: "sm", onClick: (event) => removeHandler(event), variant: "white", isIconButton: true },
67
+ react_1.default.createElement(button_1.Button, { size: "sm", onClick: (event) => removeHandler(event), variant: "secondary", isIconButton: true },
68
68
  react_1.default.createElement(icon_1.Icon, { name: "delete" }))),
69
69
  react_1.default.createElement(icon_1.Icon, { name: `${visibility ? "chevronUp" : "chevronDown"}`, size: 16 }))));
70
70
  };
@@ -44,10 +44,10 @@ const FieldArray = (props) => {
44
44
  react_1.default.createElement(base_field_1.BaseField, { fieldSchema: schema, entityAlias: entityAlias, isEditing: isEditing, prefix: `${index}.`, control: control })));
45
45
  }),
46
46
  react_1.default.createElement("div", { className: "flex justify-end" },
47
- react_1.default.createElement(button_1.Button, { variant: "white", isIconButton: true, onClick: () => remove(index) },
47
+ react_1.default.createElement(button_1.Button, { variant: "secondary", isIconButton: true, onClick: () => remove(index) },
48
48
  react_1.default.createElement(icon_1.Icon, { name: "trash", size: 20 }))))))),
49
49
  react_1.default.createElement("div", { className: "mt-2" },
50
- react_1.default.createElement(button_1.Button, { isIconButton: true, onClick: () => append({ id: null }), variant: "white" },
50
+ react_1.default.createElement(button_1.Button, { isIconButton: true, onClick: () => append({ id: null }), variant: "secondary" },
51
51
  react_1.default.createElement(icon_1.Icon, { name: "plus", size: 20 })))));
52
52
  };
53
53
  exports.FieldArray = FieldArray;
@@ -38,7 +38,7 @@ const CopyToClipboard = (props) => {
38
38
  message: isCopied ? "Text zkopírován" : "Nepodařilo se zkopírovat text",
39
39
  });
40
40
  }, [props.value]);
41
- return (react_1.default.createElement(text_input_1.TextInput, { isDisabled: props.disabled, label: props.label, onChange: () => void null, rightAddon: react_1.default.createElement(button_1.Button, { className: "size-full rounded-l-none border-none", disabled: props.value === "", onClick: onCopy, variant: "white" },
41
+ return (react_1.default.createElement(text_input_1.TextInput, { isDisabled: props.disabled, label: props.label, onChange: () => void null, rightAddon: react_1.default.createElement(button_1.Button, { className: "size-full rounded-l-none border-none", disabled: props.value === "", onClick: onCopy, variant: "secondary" },
42
42
  react_1.default.createElement(icon_1.Icon, { className: "w-4", name: "copy" })), value: props.value, name: props.name }));
43
43
  };
44
44
  exports.CopyToClipboard = CopyToClipboard;