@bigbinary/neeto-themes-frontend 1.1.20 → 1.1.21

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 CHANGED
@@ -668,6 +668,7 @@ var useThemeUtils = function useThemeUtils() {
668
668
  var root = document.querySelector(":root");
669
669
  var setVariable = function setVariable(name, value) {
670
670
  var variableName = variableNamesMap[name];
671
+ if (!variableName) return;
671
672
  root.style.setProperty(variableName, value);
672
673
  };
673
674
  var setTheme = function setTheme(theme) {
@@ -23335,7 +23336,7 @@ var Slider$1 = Slider;
23335
23336
  var SliderBlock = function SliderBlock(_ref) {
23336
23337
  var label = _ref.label,
23337
23338
  onChange = _ref.onChange,
23338
- defaultValue = _ref.defaultValue,
23339
+ value = _ref.value,
23339
23340
  min = _ref.min,
23340
23341
  max = _ref.max,
23341
23342
  marks = _ref.marks;
@@ -23347,11 +23348,11 @@ var SliderBlock = function SliderBlock(_ref) {
23347
23348
  style: "body2",
23348
23349
  children: label
23349
23350
  }), /*#__PURE__*/jsxRuntime.jsx(Slider$1, {
23350
- defaultValue: defaultValue,
23351
23351
  marks: marks,
23352
23352
  max: max,
23353
23353
  min: min,
23354
23354
  onChange: onChange,
23355
+ value: value,
23355
23356
  className: "my-2 w-20",
23356
23357
  tooltip: {
23357
23358
  formatter: null
@@ -23443,8 +23444,12 @@ var Properties = function Properties() {
23443
23444
  setVariable(neetoCist.snakeToCamelCase(name), variableValue !== null && variableValue !== void 0 ? variableValue : value);
23444
23445
  };
23445
23446
  var handleOverlayChange = function handleOverlayChange(key, value) {
23447
+ var index = neetoCist.findIndexBy({
23448
+ key: key
23449
+ }, values.properties);
23446
23450
  var overlayColorVariable = "".concat(key, "_overlay_color");
23447
- handleChange("".concat(key, "_overlay_opacity"), value, Math.abs(value / 100));
23451
+ setFieldValue("properties[".concat(index, "].value"), value);
23452
+ setVariable("".concat(key, "_overlay_opacity"), Math.abs(value / 100));
23448
23453
  if (value < 0) {
23449
23454
  handleChange(overlayColorVariable, "#000000", "0, 0, 0");
23450
23455
  } else {
@@ -23498,11 +23503,11 @@ var Properties = function Properties() {
23498
23503
  value = _ref5.value,
23499
23504
  kind = _ref5.kind;
23500
23505
  return isPropertyVisible(key, values, themeConfig) && /*#__PURE__*/jsxRuntime.jsx(SliderBlock, {
23501
- defaultValue: Number(value) || 0,
23502
23506
  label: buildLabel(key, kind),
23503
23507
  marks: OVERLAY_OPACITY_SLIDER_MARKS,
23504
23508
  max: HUNDRED,
23505
23509
  min: ramda.negate(HUNDRED),
23510
+ value: Number(value) || 0,
23506
23511
  onChange: function onChange(opacity) {
23507
23512
  return handleOverlayChange(key, opacity);
23508
23513
  }