@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.cjs.js
CHANGED
|
@@ -7122,11 +7122,12 @@ var buildInitialValues = function buildInitialValues(theme, themeConfig) {
|
|
|
7122
7122
|
name: i18next.t("neetoThemes.build.leftSideBar.themes.createTheme.newThemeName"),
|
|
7123
7123
|
properties: themeConfig.map(function (_ref) {
|
|
7124
7124
|
var key = _ref.key,
|
|
7125
|
-
kind = _ref.kind
|
|
7125
|
+
kind = _ref.kind,
|
|
7126
|
+
defaultValue = _ref.defaultValue;
|
|
7126
7127
|
switch (kind) {
|
|
7127
7128
|
case "color":
|
|
7128
7129
|
return {
|
|
7129
|
-
value:
|
|
7130
|
+
value: defaultValue,
|
|
7130
7131
|
kind: "color",
|
|
7131
7132
|
key: key
|
|
7132
7133
|
};
|
|
@@ -7235,6 +7236,77 @@ var Customize = function Customize(_ref) {
|
|
|
7235
7236
|
});
|
|
7236
7237
|
};
|
|
7237
7238
|
|
|
7239
|
+
var Thumbnail = function Thumbnail(_ref) {
|
|
7240
|
+
var _theme$snakeToCamelCa, _findBy, _findBy2;
|
|
7241
|
+
var active = _ref.active,
|
|
7242
|
+
isPreviewing = _ref.isPreviewing,
|
|
7243
|
+
isHighLightedTheme = _ref.isHighLightedTheme,
|
|
7244
|
+
theme = _ref.theme;
|
|
7245
|
+
var _useConfigStore = useConfigStore(function (store) {
|
|
7246
|
+
return {
|
|
7247
|
+
themeConfig: store["themeConfig"]
|
|
7248
|
+
};
|
|
7249
|
+
}, shallow.shallow),
|
|
7250
|
+
_useConfigStore$theme = _useConfigStore.themeConfig,
|
|
7251
|
+
themeConfig = _useConfigStore$theme === void 0 ? [] : _useConfigStore$theme;
|
|
7252
|
+
var _themeConfig = _slicedToArray$3(themeConfig, 2),
|
|
7253
|
+
colorObject1 = _themeConfig[0],
|
|
7254
|
+
colorObject2 = _themeConfig[1];
|
|
7255
|
+
var primaryLabel = neetoCist.humanize(colorObject1 === null || colorObject1 === void 0 ? void 0 : colorObject1.key);
|
|
7256
|
+
var secondaryLabel = neetoCist.humanize(colorObject2 === null || colorObject2 === void 0 ? void 0 : colorObject2.key);
|
|
7257
|
+
var primaryColor = neetoCist.findBy({
|
|
7258
|
+
key: colorObject1.key
|
|
7259
|
+
}, theme.properties).value;
|
|
7260
|
+
var secondaryColor = neetoCist.findBy({
|
|
7261
|
+
key: colorObject2.key
|
|
7262
|
+
}, theme.properties).value;
|
|
7263
|
+
var backgroundImageUrl = (_theme$snakeToCamelCa = theme[neetoCist.snakeToCamelCase(neetoCist.findBy({
|
|
7264
|
+
useAsCardBackground: true
|
|
7265
|
+
}, themeConfig).key)]) === null || _theme$snakeToCamelCa === void 0 ? void 0 : _theme$snakeToCamelCa.url;
|
|
7266
|
+
var buttonBackgroundColor = (_findBy = neetoCist.findBy({
|
|
7267
|
+
key: (_findBy2 = neetoCist.findBy({
|
|
7268
|
+
useAsCardButtonBackground: true
|
|
7269
|
+
}, themeConfig)) === null || _findBy2 === void 0 ? void 0 : _findBy2.key
|
|
7270
|
+
}, theme.properties)) === null || _findBy === void 0 ? void 0 : _findBy.value;
|
|
7271
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7272
|
+
className: classnames__default["default"]("neeto-themes-theme-thumbnail neeto-ui-rounded-lg border transition-all duration-300 ease-in-out", {
|
|
7273
|
+
"neeto-ui-border-gray-400": !active,
|
|
7274
|
+
"neeto-ui-border-gray-800 neeto-themes-theme-thumbnail--active": active,
|
|
7275
|
+
"neeto-themes-theme-thumbnail--preview-active": isPreviewing,
|
|
7276
|
+
"neeto-themes-theme-thumbnail--highlight-active": isHighLightedTheme
|
|
7277
|
+
}),
|
|
7278
|
+
style: {
|
|
7279
|
+
backgroundImage: backgroundImageUrl ? "url(".concat(backgroundImageUrl, ")") : "initial",
|
|
7280
|
+
backgroundSize: "cover"
|
|
7281
|
+
}
|
|
7282
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7283
|
+
className: "neeto-ui-rounded-lg cursor-pointer p-3 transition-all duration-300 ease-in-out group-hover:opacity-85"
|
|
7284
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7285
|
+
className: "neeto-ui-rounded-lg p-3"
|
|
7286
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7287
|
+
className: "mb-3"
|
|
7288
|
+
}, /*#__PURE__*/React__default["default"].createElement(Typography__default["default"], {
|
|
7289
|
+
style: "h3",
|
|
7290
|
+
weight: "semibold"
|
|
7291
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
7292
|
+
style: {
|
|
7293
|
+
color: primaryColor
|
|
7294
|
+
}
|
|
7295
|
+
}, primaryLabel)), /*#__PURE__*/React__default["default"].createElement(Typography__default["default"], {
|
|
7296
|
+
className: "neeto-ui-text-gray-600",
|
|
7297
|
+
style: "body2"
|
|
7298
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
7299
|
+
style: {
|
|
7300
|
+
color: secondaryColor
|
|
7301
|
+
}
|
|
7302
|
+
}, secondaryLabel))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7303
|
+
className: "neeto-ui-rounded-lg h-5 w-12",
|
|
7304
|
+
style: {
|
|
7305
|
+
backgroundColor: buttonBackgroundColor
|
|
7306
|
+
}
|
|
7307
|
+
}))));
|
|
7308
|
+
};
|
|
7309
|
+
|
|
7238
7310
|
var Card = function Card(_ref) {
|
|
7239
7311
|
var _ref$active = _ref.active,
|
|
7240
7312
|
active = _ref$active === void 0 ? false : _ref$active,
|
|
@@ -7248,7 +7320,7 @@ var Card = function Card(_ref) {
|
|
|
7248
7320
|
onCloneTheme = _ref.onCloneTheme,
|
|
7249
7321
|
isHighLightedTheme = _ref.isHighLightedTheme,
|
|
7250
7322
|
setThemeBeingApplied = _ref.setThemeBeingApplied,
|
|
7251
|
-
Thumbnail = _ref.thumbnail;
|
|
7323
|
+
Thumbnail$1 = _ref.thumbnail;
|
|
7252
7324
|
var _useTranslation = reactI18next.useTranslation(),
|
|
7253
7325
|
t = _useTranslation.t;
|
|
7254
7326
|
var id = theme.id,
|
|
@@ -7287,7 +7359,12 @@ var Card = function Card(_ref) {
|
|
|
7287
7359
|
onClick: function onClick() {
|
|
7288
7360
|
return onSetPreviewTheme(theme);
|
|
7289
7361
|
}
|
|
7290
|
-
}, Thumbnail
|
|
7362
|
+
}, Thumbnail$1 ? /*#__PURE__*/React__default["default"].createElement(Thumbnail$1, {
|
|
7363
|
+
active: active,
|
|
7364
|
+
isHighLightedTheme: isHighLightedTheme,
|
|
7365
|
+
isPreviewing: isPreviewing,
|
|
7366
|
+
theme: theme
|
|
7367
|
+
}) : /*#__PURE__*/React__default["default"].createElement(Thumbnail, {
|
|
7291
7368
|
active: active,
|
|
7292
7369
|
isHighLightedTheme: isHighLightedTheme,
|
|
7293
7370
|
isPreviewing: isPreviewing,
|