@bigbinary/neeto-themes-frontend 4.0.8 → 4.0.9
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.
|
@@ -285,7 +285,7 @@ var Card$2 = function Card(_ref) {
|
|
|
285
285
|
var isRTL = i18n.dir() === "rtl";
|
|
286
286
|
var ToggleIcon = isRTL ? Left : Right;
|
|
287
287
|
return /*#__PURE__*/jsxs("div", {
|
|
288
|
-
"data-
|
|
288
|
+
"data-testid": "theme-".concat(hyphenate(title), "-properties"),
|
|
289
289
|
className: classnames("neeto-themes-nano-section neeto-ui-border-gray-200 border-b pt-2 transition-all duration-300 last:border-none", className, {
|
|
290
290
|
"pb-2": !accordionOpenState[name],
|
|
291
291
|
"pb-3": accordionOpenState[name],
|
|
@@ -301,7 +301,7 @@ var Card$2 = function Card(_ref) {
|
|
|
301
301
|
children: [/*#__PURE__*/jsxs(Typography, {
|
|
302
302
|
className: "flex min-w-0 grow items-center gap-2 text-start",
|
|
303
303
|
component: "span",
|
|
304
|
-
"data-
|
|
304
|
+
"data-testid": "theme-properties",
|
|
305
305
|
lineHeight: "normal",
|
|
306
306
|
style: "h4",
|
|
307
307
|
weight: "semibold",
|
|
@@ -675,9 +675,9 @@ var AlignmentBlock = function AlignmentBlock(_ref) {
|
|
|
675
675
|
name = _ref.name;
|
|
676
676
|
return /*#__PURE__*/jsxs("div", {
|
|
677
677
|
className: "flex items-center justify-between gap-2",
|
|
678
|
-
"data-
|
|
678
|
+
"data-testid": joinHyphenCase(label),
|
|
679
679
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
680
|
-
"data-
|
|
680
|
+
"data-testid": "style-fields-labels",
|
|
681
681
|
style: "body2",
|
|
682
682
|
children: label
|
|
683
683
|
}), /*#__PURE__*/jsx(Field, {
|
|
@@ -689,7 +689,7 @@ var AlignmentBlock = function AlignmentBlock(_ref) {
|
|
|
689
689
|
className: "neeto-ui-border-gray-300 neeto-themes-nano-alignment-block flex items-center border",
|
|
690
690
|
children: [/*#__PURE__*/jsx(Button, {
|
|
691
691
|
className: "neeto-themes-nano-alignment-button neeto-themes-nano-alignment-button__alignment-left",
|
|
692
|
-
"data-
|
|
692
|
+
"data-testid": "alignment-left",
|
|
693
693
|
size: "medium",
|
|
694
694
|
style: value === "left" ? "primary" : "text",
|
|
695
695
|
icon: function icon() {
|
|
@@ -713,7 +713,7 @@ var AlignmentBlock = function AlignmentBlock(_ref) {
|
|
|
713
713
|
className: "neeto-themes-nano-alignment-divider"
|
|
714
714
|
}), /*#__PURE__*/jsx(Button, {
|
|
715
715
|
className: "neeto-themes-nano-alignment-button neeto-themes-nano-alignment-button__alignment-center",
|
|
716
|
-
"data-
|
|
716
|
+
"data-testid": "alignment-center",
|
|
717
717
|
size: "medium",
|
|
718
718
|
style: value === "center" ? "primary" : "text",
|
|
719
719
|
icon: function icon() {
|
|
@@ -748,9 +748,9 @@ var ColorBlock = function ColorBlock(_ref) {
|
|
|
748
748
|
showTransparencyControl = _ref.showTransparencyControl;
|
|
749
749
|
return /*#__PURE__*/jsxs("div", {
|
|
750
750
|
className: "flex items-center justify-between",
|
|
751
|
-
"data-
|
|
751
|
+
"data-testid": "theme-style-".concat(joinHyphenCase(label)),
|
|
752
752
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
753
|
-
"data-
|
|
753
|
+
"data-testid": "style-fields-labels",
|
|
754
754
|
style: "body2",
|
|
755
755
|
children: label
|
|
756
756
|
}), /*#__PURE__*/jsx(ColorPicker, {
|
|
@@ -774,9 +774,9 @@ var FontPickerBlock = function FontPickerBlock(_ref) {
|
|
|
774
774
|
onChange = _ref.onChange;
|
|
775
775
|
return /*#__PURE__*/jsxs("div", {
|
|
776
776
|
className: "flex items-center justify-between",
|
|
777
|
-
"data-
|
|
777
|
+
"data-testid": "theme-style-".concat(joinHyphenCase(label)),
|
|
778
778
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
779
|
-
"data-
|
|
779
|
+
"data-testid": "style-fields-labels",
|
|
780
780
|
style: "body2",
|
|
781
781
|
children: label
|
|
782
782
|
}), /*#__PURE__*/jsx("div", {
|
|
@@ -809,9 +809,9 @@ var SelectBlock = function SelectBlock(_ref) {
|
|
|
809
809
|
onChange = _ref.onChange;
|
|
810
810
|
return /*#__PURE__*/jsxs("div", {
|
|
811
811
|
className: "flex items-center justify-between",
|
|
812
|
-
"data-
|
|
812
|
+
"data-testid": "theme-style-".concat(joinHyphenCase(label)),
|
|
813
813
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
814
|
-
"data-
|
|
814
|
+
"data-testid": "logo-field-labels",
|
|
815
815
|
style: "body2",
|
|
816
816
|
children: label
|
|
817
817
|
}), /*#__PURE__*/jsx("div", {
|
|
@@ -835,9 +835,9 @@ var SliderBlock = function SliderBlock(_ref) {
|
|
|
835
835
|
marks = _ref.marks;
|
|
836
836
|
return /*#__PURE__*/jsxs("div", {
|
|
837
837
|
className: "flex items-center justify-between gap-3",
|
|
838
|
-
"data-
|
|
838
|
+
"data-testid": "theme-style-".concat(joinHyphenCase(label)),
|
|
839
839
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
840
|
-
"data-
|
|
840
|
+
"data-testid": "style-fields-labels",
|
|
841
841
|
style: "body2",
|
|
842
842
|
children: label
|
|
843
843
|
}), /*#__PURE__*/jsx(Slider, {
|
|
@@ -868,11 +868,11 @@ var SwitchBlock = function SwitchBlock(_ref) {
|
|
|
868
868
|
var doesHelpTextExist = i18n.exists(translationKey);
|
|
869
869
|
return /*#__PURE__*/jsxs("div", {
|
|
870
870
|
className: "flex items-center justify-between",
|
|
871
|
-
"data-
|
|
871
|
+
"data-testid": "theme-style-content-background",
|
|
872
872
|
children: [/*#__PURE__*/jsxs("div", {
|
|
873
873
|
className: "inline-flex items-center gap-4",
|
|
874
874
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
875
|
-
"data-
|
|
875
|
+
"data-testid": "style-fields-labels",
|
|
876
876
|
style: "body2",
|
|
877
877
|
className: classnames({
|
|
878
878
|
"w-32": doesHelpTextExist,
|
|
@@ -886,7 +886,7 @@ var SwitchBlock = function SwitchBlock(_ref) {
|
|
|
886
886
|
}), /*#__PURE__*/jsx(Switch, _objectSpread$1(_objectSpread$1({}, _objectSpread$1({
|
|
887
887
|
name: name
|
|
888
888
|
}, switchProps)), {}, {
|
|
889
|
-
"data-
|
|
889
|
+
"data-testid": "enable-background-color-toggle"
|
|
890
890
|
}))]
|
|
891
891
|
});
|
|
892
892
|
};
|
|
@@ -901,9 +901,9 @@ var TextBlock = function TextBlock(_ref) {
|
|
|
901
901
|
placeholder = _ref.placeholder;
|
|
902
902
|
return /*#__PURE__*/jsxs("div", {
|
|
903
903
|
className: "flex items-center justify-between",
|
|
904
|
-
"data-
|
|
904
|
+
"data-testid": "theme-style-".concat(joinHyphenCase(label)),
|
|
905
905
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
906
|
-
"data-
|
|
906
|
+
"data-testid": "style-fields-labels",
|
|
907
907
|
style: "body2",
|
|
908
908
|
children: label
|
|
909
909
|
}), /*#__PURE__*/jsx("div", {
|
|
@@ -1192,11 +1192,11 @@ var ImageBlock = function ImageBlock(_ref) {
|
|
|
1192
1192
|
}();
|
|
1193
1193
|
return /*#__PURE__*/jsxs("div", {
|
|
1194
1194
|
className: "space-y-3",
|
|
1195
|
-
"data-
|
|
1195
|
+
"data-testid": "theme-style-".concat(label ? joinHyphenCase(label) : "image-block"),
|
|
1196
1196
|
children: [label && /*#__PURE__*/jsx("div", {
|
|
1197
1197
|
className: "flex items-center justify-between",
|
|
1198
1198
|
children: /*#__PURE__*/jsx(Typography, {
|
|
1199
|
-
"data-
|
|
1199
|
+
"data-testid": "style-fields-labels",
|
|
1200
1200
|
style: "body2",
|
|
1201
1201
|
children: label
|
|
1202
1202
|
})
|
|
@@ -1283,7 +1283,7 @@ var ThemeMeta = function ThemeMeta(_ref) {
|
|
|
1283
1283
|
title: t("neetoThemes.common.name"),
|
|
1284
1284
|
children: /*#__PURE__*/jsx(Input$1, {
|
|
1285
1285
|
autoFocus: true,
|
|
1286
|
-
"data-
|
|
1286
|
+
"data-testid": "theme-name-property",
|
|
1287
1287
|
name: "name"
|
|
1288
1288
|
})
|
|
1289
1289
|
});
|
|
@@ -1489,13 +1489,13 @@ var Customize = function Customize(_ref) {
|
|
|
1489
1489
|
}), /*#__PURE__*/jsxs("div", {
|
|
1490
1490
|
className: "neeto-ui-bg-white neeto-ui-shadow-s sticky bottom-0 start-0 end-0 flex justify-end gap-x-2 px-4 py-6 lg:px-5 xl:px-6",
|
|
1491
1491
|
children: [/*#__PURE__*/jsx(Button, {
|
|
1492
|
-
"data-
|
|
1492
|
+
"data-testid": "reset-button",
|
|
1493
1493
|
disabled: !dirty || isSubmitting,
|
|
1494
1494
|
label: t("neetoThemes.buttons.reset"),
|
|
1495
1495
|
style: "text",
|
|
1496
1496
|
type: "reset"
|
|
1497
1497
|
}), /*#__PURE__*/jsx(Button, {
|
|
1498
|
-
"data-
|
|
1498
|
+
"data-testid": "save-changes-button",
|
|
1499
1499
|
disabled: !dirty && (themeData === null || themeData === void 0 ? void 0 : themeData.id) || isSubmitting,
|
|
1500
1500
|
label: t("neetoThemes.buttons.save"),
|
|
1501
1501
|
loading: isSubmitting,
|
|
@@ -1662,7 +1662,7 @@ var Card = function Card(_ref) {
|
|
|
1662
1662
|
};
|
|
1663
1663
|
return /*#__PURE__*/jsx("div", {
|
|
1664
1664
|
className: "group space-y-2 pt-0.5",
|
|
1665
|
-
"data-
|
|
1665
|
+
"data-testid": active ? "active-theme-card" : "theme-card",
|
|
1666
1666
|
id: theme.id,
|
|
1667
1667
|
children: /*#__PURE__*/jsxs("div", {
|
|
1668
1668
|
className: classnames("neeto-themes-theme-thumbnail neeto-ui-rounded-lg relative cursor-pointer border transition-all duration-300 ease-in-out", {
|
|
@@ -1680,7 +1680,7 @@ var Card = function Card(_ref) {
|
|
|
1680
1680
|
className: "absolute start-0 top-0 z-10 flex h-full w-full items-center justify-center gap-1 p-3",
|
|
1681
1681
|
children: active ? /*#__PURE__*/jsx("span", {
|
|
1682
1682
|
className: "neeto-ui-btn neeto-themes-theme-thumbnail__active-label neeto-ui-btn--style-primary neeto-ui-btn--size-medium neeto-ui-rounded-full shrink-0 cursor-auto justify-center",
|
|
1683
|
-
"data-
|
|
1683
|
+
"data-testid": "active-theme-label",
|
|
1684
1684
|
children: t("neetoThemes.common.activeTheme")
|
|
1685
1685
|
}) : /*#__PURE__*/jsx("div", {
|
|
1686
1686
|
className: classnames({
|
|
@@ -1690,7 +1690,7 @@ var Card = function Card(_ref) {
|
|
|
1690
1690
|
children: /*#__PURE__*/jsxs("div", {
|
|
1691
1691
|
className: "relative flex w-full flex-col gap-2",
|
|
1692
1692
|
children: [/*#__PURE__*/jsx(Button, {
|
|
1693
|
-
"data-
|
|
1693
|
+
"data-testid": "preview-theme-button",
|
|
1694
1694
|
disabled: isPreviewing,
|
|
1695
1695
|
label: t("neetoThemes.common.previewTheme"),
|
|
1696
1696
|
size: "medium",
|
|
@@ -1704,7 +1704,7 @@ var Card = function Card(_ref) {
|
|
|
1704
1704
|
}
|
|
1705
1705
|
}), /*#__PURE__*/jsx(Button, {
|
|
1706
1706
|
className: "neeto-themes-theme-thumbnail__apply-btn shrink-0 justify-center",
|
|
1707
|
-
"data-
|
|
1707
|
+
"data-testid": "apply-theme-button",
|
|
1708
1708
|
disabled: isApplyingTheme,
|
|
1709
1709
|
label: t("neetoThemes.common.useTheme"),
|
|
1710
1710
|
loading: isApplyingTheme,
|
|
@@ -1736,13 +1736,13 @@ var Card = function Card(_ref) {
|
|
|
1736
1736
|
className: "flex items-center space-x-2",
|
|
1737
1737
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
1738
1738
|
className: "line-clamp-2 min-w-0 grow wrap-anywhere pt-1",
|
|
1739
|
-
"data-
|
|
1739
|
+
"data-testid": "theme-name",
|
|
1740
1740
|
lineHeight: "snug",
|
|
1741
1741
|
style: "body2",
|
|
1742
1742
|
children: name
|
|
1743
1743
|
}), isGlobalTheme && /*#__PURE__*/jsx(Rating, {
|
|
1744
1744
|
className: "neeto-themes-nano-global-theme-icon",
|
|
1745
|
-
"data-
|
|
1745
|
+
"data-testid": "global-theme-icon",
|
|
1746
1746
|
size: 18
|
|
1747
1747
|
})]
|
|
1748
1748
|
}), /*#__PURE__*/jsx(MoreDropdown, {
|
|
@@ -1757,18 +1757,18 @@ var Card = function Card(_ref) {
|
|
|
1757
1757
|
},
|
|
1758
1758
|
menuItems: [{
|
|
1759
1759
|
key: "edit",
|
|
1760
|
-
"data-
|
|
1760
|
+
"data-testid": "edit-theme-menu-item",
|
|
1761
1761
|
label: t("neetoThemes.common.edit"),
|
|
1762
1762
|
isVisible: isPresent(onEditTheme),
|
|
1763
1763
|
onClick: handleEditTheme
|
|
1764
1764
|
}, {
|
|
1765
1765
|
key: "clone",
|
|
1766
|
-
"data-
|
|
1766
|
+
"data-testid": "clone-theme-menu-item",
|
|
1767
1767
|
label: t("neetoThemes.build.leftSideBar.themes.themeOptions.clone"),
|
|
1768
1768
|
onClick: handleCloneTheme
|
|
1769
1769
|
}, {
|
|
1770
1770
|
key: "set-as-global-theme",
|
|
1771
|
-
"data-
|
|
1771
|
+
"data-testid": "set-as-global-theme-menu-item",
|
|
1772
1772
|
label: t("neetoThemes.build.leftSideBar.themes.themeOptions.setAsGlobalTheme.label"),
|
|
1773
1773
|
isVisible: !isGlobalTheme,
|
|
1774
1774
|
onClick: handleApplyGlobalTheme
|
|
@@ -1778,7 +1778,7 @@ var Card = function Card(_ref) {
|
|
|
1778
1778
|
isVisible: isFunction(onDeleteTheme)
|
|
1779
1779
|
}, {
|
|
1780
1780
|
key: "delete",
|
|
1781
|
-
"data-
|
|
1781
|
+
"data-testid": "delete-theme-menu-item",
|
|
1782
1782
|
label: t("neetoThemes.build.leftSideBar.themes.themeOptions.delete"),
|
|
1783
1783
|
isDisabled: isApplyingTheme,
|
|
1784
1784
|
isVisible: isFunction(onDeleteTheme),
|
|
@@ -1904,19 +1904,19 @@ var Themes = function Themes(_ref) {
|
|
|
1904
1904
|
placeholder: t("neetoThemes.common.searchThemes")
|
|
1905
1905
|
}), isEmpty(filteredThemes) && isEmpty(filteredDefaultThemes) && /*#__PURE__*/jsx(Typography, {
|
|
1906
1906
|
className: "text-center",
|
|
1907
|
-
"data-
|
|
1907
|
+
"data-testid": "no-data-title",
|
|
1908
1908
|
style: "body2",
|
|
1909
1909
|
children: t("neetoThemes.common.noResultsFound")
|
|
1910
1910
|
}), isNotEmpty(filteredDefaultThemes) && /*#__PURE__*/jsxs(Fragment, {
|
|
1911
1911
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
1912
1912
|
className: "my-4 px-6 uppercase lg:px-5 xl:px-6",
|
|
1913
|
-
"data-
|
|
1913
|
+
"data-testid": "system-themes-header",
|
|
1914
1914
|
style: "h6",
|
|
1915
1915
|
weight: "semibold",
|
|
1916
1916
|
children: t("neetoThemes.build.leftSideBar.themes.systemThemes")
|
|
1917
1917
|
}), /*#__PURE__*/jsx("div", {
|
|
1918
1918
|
className: "flex flex-col gap-4 px-6 pb-10 lg:px-5 xl:px-6",
|
|
1919
|
-
"data-
|
|
1919
|
+
"data-testid": "system-themes",
|
|
1920
1920
|
children: filteredDefaultThemes.map(function (theme) {
|
|
1921
1921
|
return /*#__PURE__*/createElement(Card$1, {
|
|
1922
1922
|
onApplyTheme: onApplyTheme,
|
|
@@ -1938,13 +1938,13 @@ var Themes = function Themes(_ref) {
|
|
|
1938
1938
|
className: "mb-6 space-y-3",
|
|
1939
1939
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
1940
1940
|
className: "my-4 px-6 uppercase",
|
|
1941
|
-
"data-
|
|
1941
|
+
"data-testid": "custom-themes-header",
|
|
1942
1942
|
style: "h6",
|
|
1943
1943
|
weight: "semibold",
|
|
1944
1944
|
children: t("neetoThemes.build.leftSideBar.themes.customThemes")
|
|
1945
1945
|
}), /*#__PURE__*/jsx("div", {
|
|
1946
1946
|
className: "flex flex-col gap-4 px-6",
|
|
1947
|
-
"data-
|
|
1947
|
+
"data-testid": "custom-themes",
|
|
1948
1948
|
children: filteredThemes.map(function (theme) {
|
|
1949
1949
|
var isActive = (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.id) === theme.id;
|
|
1950
1950
|
var isPreviewing = (previewingTheme === null || previewingTheme === void 0 ? void 0 : previewingTheme.id) === theme.id;
|
|
@@ -2001,7 +2001,7 @@ var TitleBar = function TitleBar(_ref) {
|
|
|
2001
2001
|
children: /*#__PURE__*/jsxs("div", {
|
|
2002
2002
|
className: "flex items-center justify-start space-x-2",
|
|
2003
2003
|
children: [/*#__PURE__*/jsx(Button, {
|
|
2004
|
-
"data-
|
|
2004
|
+
"data-testid": "customize-themes-back-button",
|
|
2005
2005
|
icon: BackButtonIcon,
|
|
2006
2006
|
iconPosition: "left",
|
|
2007
2007
|
style: "text",
|
|
@@ -2013,7 +2013,7 @@ var TitleBar = function TitleBar(_ref) {
|
|
|
2013
2013
|
return handleBackPress(themeId);
|
|
2014
2014
|
}
|
|
2015
2015
|
}), /*#__PURE__*/jsxs(Typography, {
|
|
2016
|
-
"data-
|
|
2016
|
+
"data-testid": "themes-header",
|
|
2017
2017
|
lineHeight: "normal",
|
|
2018
2018
|
style: "h3",
|
|
2019
2019
|
weight: "semibold",
|
|
@@ -2029,7 +2029,7 @@ var TitleBar = function TitleBar(_ref) {
|
|
|
2029
2029
|
children: [/*#__PURE__*/jsxs("div", {
|
|
2030
2030
|
className: "flex space-x-2",
|
|
2031
2031
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
2032
|
-
"data-
|
|
2032
|
+
"data-testid": "themes-header",
|
|
2033
2033
|
lineHeight: "normal",
|
|
2034
2034
|
style: "h3",
|
|
2035
2035
|
weight: "semibold",
|
|
@@ -2046,7 +2046,7 @@ var TitleBar = function TitleBar(_ref) {
|
|
|
2046
2046
|
}), /*#__PURE__*/jsx("div", {
|
|
2047
2047
|
className: "self-end",
|
|
2048
2048
|
children: /*#__PURE__*/jsx(Button, {
|
|
2049
|
-
"data-
|
|
2049
|
+
"data-testid": "customize-themes-add-theme-button",
|
|
2050
2050
|
icon: Plus,
|
|
2051
2051
|
iconPosition: "left",
|
|
2052
2052
|
style: "text",
|