@bigbinary/neeto-themes-frontend 1.1.15 → 1.1.16
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.cjs.js +81 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +81 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7081,11 +7081,12 @@ var buildInitialValues = function buildInitialValues(theme, themeConfig) {
|
|
|
7081
7081
|
name: t$2("neetoThemes.build.leftSideBar.themes.createTheme.newThemeName"),
|
|
7082
7082
|
properties: themeConfig.map(function (_ref) {
|
|
7083
7083
|
var key = _ref.key,
|
|
7084
|
-
kind = _ref.kind
|
|
7084
|
+
kind = _ref.kind,
|
|
7085
|
+
defaultValue = _ref.defaultValue;
|
|
7085
7086
|
switch (kind) {
|
|
7086
7087
|
case "color":
|
|
7087
7088
|
return {
|
|
7088
|
-
value:
|
|
7089
|
+
value: defaultValue,
|
|
7089
7090
|
kind: "color",
|
|
7090
7091
|
key: key
|
|
7091
7092
|
};
|
|
@@ -7194,6 +7195,77 @@ var Customize = function Customize(_ref) {
|
|
|
7194
7195
|
});
|
|
7195
7196
|
};
|
|
7196
7197
|
|
|
7198
|
+
var Thumbnail = function Thumbnail(_ref) {
|
|
7199
|
+
var _theme$snakeToCamelCa, _findBy, _findBy2;
|
|
7200
|
+
var active = _ref.active,
|
|
7201
|
+
isPreviewing = _ref.isPreviewing,
|
|
7202
|
+
isHighLightedTheme = _ref.isHighLightedTheme,
|
|
7203
|
+
theme = _ref.theme;
|
|
7204
|
+
var _useConfigStore = useConfigStore(function (store) {
|
|
7205
|
+
return {
|
|
7206
|
+
themeConfig: store["themeConfig"]
|
|
7207
|
+
};
|
|
7208
|
+
}, shallow),
|
|
7209
|
+
_useConfigStore$theme = _useConfigStore.themeConfig,
|
|
7210
|
+
themeConfig = _useConfigStore$theme === void 0 ? [] : _useConfigStore$theme;
|
|
7211
|
+
var _themeConfig = _slicedToArray$3(themeConfig, 2),
|
|
7212
|
+
colorObject1 = _themeConfig[0],
|
|
7213
|
+
colorObject2 = _themeConfig[1];
|
|
7214
|
+
var primaryLabel = humanize(colorObject1 === null || colorObject1 === void 0 ? void 0 : colorObject1.key);
|
|
7215
|
+
var secondaryLabel = humanize(colorObject2 === null || colorObject2 === void 0 ? void 0 : colorObject2.key);
|
|
7216
|
+
var primaryColor = findBy({
|
|
7217
|
+
key: colorObject1.key
|
|
7218
|
+
}, theme.properties).value;
|
|
7219
|
+
var secondaryColor = findBy({
|
|
7220
|
+
key: colorObject2.key
|
|
7221
|
+
}, theme.properties).value;
|
|
7222
|
+
var backgroundImageUrl = (_theme$snakeToCamelCa = theme[snakeToCamelCase(findBy({
|
|
7223
|
+
useAsCardBackground: true
|
|
7224
|
+
}, themeConfig).key)]) === null || _theme$snakeToCamelCa === void 0 ? void 0 : _theme$snakeToCamelCa.url;
|
|
7225
|
+
var buttonBackgroundColor = (_findBy = findBy({
|
|
7226
|
+
key: (_findBy2 = findBy({
|
|
7227
|
+
useAsCardButtonBackground: true
|
|
7228
|
+
}, themeConfig)) === null || _findBy2 === void 0 ? void 0 : _findBy2.key
|
|
7229
|
+
}, theme.properties)) === null || _findBy === void 0 ? void 0 : _findBy.value;
|
|
7230
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7231
|
+
className: classnames("neeto-themes-theme-thumbnail neeto-ui-rounded-lg border transition-all duration-300 ease-in-out", {
|
|
7232
|
+
"neeto-ui-border-gray-400": !active,
|
|
7233
|
+
"neeto-ui-border-gray-800 neeto-themes-theme-thumbnail--active": active,
|
|
7234
|
+
"neeto-themes-theme-thumbnail--preview-active": isPreviewing,
|
|
7235
|
+
"neeto-themes-theme-thumbnail--highlight-active": isHighLightedTheme
|
|
7236
|
+
}),
|
|
7237
|
+
style: {
|
|
7238
|
+
backgroundImage: backgroundImageUrl ? "url(".concat(backgroundImageUrl, ")") : "initial",
|
|
7239
|
+
backgroundSize: "cover"
|
|
7240
|
+
}
|
|
7241
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7242
|
+
className: "neeto-ui-rounded-lg cursor-pointer p-3 transition-all duration-300 ease-in-out group-hover:opacity-85"
|
|
7243
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7244
|
+
className: "neeto-ui-rounded-lg p-3"
|
|
7245
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
7246
|
+
className: "mb-3"
|
|
7247
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
7248
|
+
style: "h3",
|
|
7249
|
+
weight: "semibold"
|
|
7250
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
7251
|
+
style: {
|
|
7252
|
+
color: primaryColor
|
|
7253
|
+
}
|
|
7254
|
+
}, primaryLabel)), /*#__PURE__*/React.createElement(Typography, {
|
|
7255
|
+
className: "neeto-ui-text-gray-600",
|
|
7256
|
+
style: "body2"
|
|
7257
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
7258
|
+
style: {
|
|
7259
|
+
color: secondaryColor
|
|
7260
|
+
}
|
|
7261
|
+
}, secondaryLabel))), /*#__PURE__*/React.createElement("div", {
|
|
7262
|
+
className: "neeto-ui-rounded-lg h-5 w-12",
|
|
7263
|
+
style: {
|
|
7264
|
+
backgroundColor: buttonBackgroundColor
|
|
7265
|
+
}
|
|
7266
|
+
}))));
|
|
7267
|
+
};
|
|
7268
|
+
|
|
7197
7269
|
var Card = function Card(_ref) {
|
|
7198
7270
|
var _ref$active = _ref.active,
|
|
7199
7271
|
active = _ref$active === void 0 ? false : _ref$active,
|
|
@@ -7207,7 +7279,7 @@ var Card = function Card(_ref) {
|
|
|
7207
7279
|
onCloneTheme = _ref.onCloneTheme,
|
|
7208
7280
|
isHighLightedTheme = _ref.isHighLightedTheme,
|
|
7209
7281
|
setThemeBeingApplied = _ref.setThemeBeingApplied,
|
|
7210
|
-
Thumbnail = _ref.thumbnail;
|
|
7282
|
+
Thumbnail$1 = _ref.thumbnail;
|
|
7211
7283
|
var _useTranslation = useTranslation(),
|
|
7212
7284
|
t = _useTranslation.t;
|
|
7213
7285
|
var id = theme.id,
|
|
@@ -7246,7 +7318,12 @@ var Card = function Card(_ref) {
|
|
|
7246
7318
|
onClick: function onClick() {
|
|
7247
7319
|
return onSetPreviewTheme(theme);
|
|
7248
7320
|
}
|
|
7249
|
-
}, Thumbnail
|
|
7321
|
+
}, Thumbnail$1 ? /*#__PURE__*/React.createElement(Thumbnail$1, {
|
|
7322
|
+
active: active,
|
|
7323
|
+
isHighLightedTheme: isHighLightedTheme,
|
|
7324
|
+
isPreviewing: isPreviewing,
|
|
7325
|
+
theme: theme
|
|
7326
|
+
}) : /*#__PURE__*/React.createElement(Thumbnail, {
|
|
7250
7327
|
active: active,
|
|
7251
7328
|
isHighLightedTheme: isHighLightedTheme,
|
|
7252
7329
|
isPreviewing: isPreviewing,
|