@elementor/editor-editing-panel 1.1.0 → 1.3.0

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/dist/index.js +868 -444
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +851 -403
  5. package/dist/index.mjs.map +1 -1
  6. package/package.json +15 -14
  7. package/src/components/css-class-selector.tsx +131 -0
  8. package/src/components/multi-combobox/multi-combobox.tsx +34 -32
  9. package/src/components/multi-combobox/types.ts +2 -0
  10. package/src/components/multi-combobox/use-combobox-actions.ts +4 -4
  11. package/src/components/style-sections/border-section/border-radius-field.tsx +4 -4
  12. package/src/components/style-sections/border-section/border-width-field.tsx +4 -4
  13. package/src/components/style-sections/layout-section/align-items-field.tsx +72 -0
  14. package/src/components/style-sections/layout-section/align-self-child-field.tsx +72 -0
  15. package/src/components/style-sections/layout-section/flex-direction-field.tsx +64 -0
  16. package/src/components/style-sections/layout-section/flex-order-field.tsx +120 -0
  17. package/src/components/style-sections/layout-section/flex-size-field.tsx +164 -0
  18. package/src/components/style-sections/layout-section/justify-content-field.tsx +62 -62
  19. package/src/components/style-sections/layout-section/layout-section.tsx +27 -3
  20. package/src/components/style-sections/layout-section/utils/rotated-icon.tsx +52 -0
  21. package/src/components/style-sections/layout-section/wrap-field.tsx +52 -0
  22. package/src/components/style-sections/position-section/position-section.tsx +3 -3
  23. package/src/components/style-sections/typography-section/line-height-field.tsx +21 -0
  24. package/src/components/style-sections/typography-section/text-stroke-field.tsx +41 -6
  25. package/src/components/style-sections/typography-section/text-style-field.tsx +31 -8
  26. package/src/components/style-sections/typography-section/typography-section.tsx +3 -1
  27. package/src/components/style-tab.tsx +2 -2
  28. package/src/controls-registry/controls-registry.tsx +4 -0
  29. package/src/dynamics/components/dynamic-selection-control.tsx +8 -5
  30. package/src/dynamics/components/dynamic-selection.tsx +10 -8
  31. package/src/dynamics/dynamic-control.tsx +9 -11
  32. package/src/dynamics/utils.ts +20 -3
  33. package/src/components/css-class-selector-section.tsx +0 -76
  34. package/src/components/style-sections/layout-section/utils/rotate-flex-icon.ts +0 -12
package/dist/index.js CHANGED
@@ -31,10 +31,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
33
  replaceControl: () => replaceControl,
34
- useBoundProp: () => import_editor_controls38.useBoundProp
34
+ useBoundProp: () => import_editor_controls46.useBoundProp
35
35
  });
36
36
  module.exports = __toCommonJS(src_exports);
37
- var import_editor_controls38 = require("@elementor/editor-controls");
37
+ var import_editor_controls46 = require("@elementor/editor-controls");
38
38
 
39
39
  // src/control-replacement.tsx
40
40
  var import_editor_controls = require("@elementor/editor-controls");
@@ -46,7 +46,7 @@ var import_editor_panels3 = require("@elementor/editor-panels");
46
46
  var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
47
47
 
48
48
  // src/hooks/use-close-editor-panel.ts
49
- var import_react14 = require("react");
49
+ var import_react15 = require("react");
50
50
  var import_editor_elements8 = require("@elementor/editor-elements");
51
51
  var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
52
52
 
@@ -54,12 +54,12 @@ var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
54
54
  var import_editor_panels2 = require("@elementor/editor-panels");
55
55
 
56
56
  // src/components/editing-panel.tsx
57
- var React51 = __toESM(require("react"));
58
- var import_editor_controls33 = require("@elementor/editor-controls");
57
+ var React58 = __toESM(require("react"));
58
+ var import_editor_controls41 = require("@elementor/editor-controls");
59
59
  var import_editor_elements6 = require("@elementor/editor-elements");
60
60
  var import_editor_panels = require("@elementor/editor-panels");
61
- var import_ui43 = require("@elementor/ui");
62
- var import_i18n31 = require("@wordpress/i18n");
61
+ var import_ui50 = require("@elementor/ui");
62
+ var import_i18n38 = require("@wordpress/i18n");
63
63
 
64
64
  // src/contexts/element-context.tsx
65
65
  var React = __toESM(require("react"));
@@ -130,10 +130,10 @@ function EditorPanelErrorFallback() {
130
130
  }
131
131
 
132
132
  // src/components/editing-panel-tabs.tsx
133
- var React50 = __toESM(require("react"));
134
- var import_react13 = require("react");
135
- var import_ui42 = require("@elementor/ui");
136
- var import_i18n30 = require("@wordpress/i18n");
133
+ var React57 = __toESM(require("react"));
134
+ var import_react14 = require("react");
135
+ var import_ui49 = require("@elementor/ui");
136
+ var import_i18n37 = require("@wordpress/i18n");
137
137
 
138
138
  // src/components/settings-tab.tsx
139
139
  var React9 = __toESM(require("react"));
@@ -150,7 +150,9 @@ var controlTypes = {
150
150
  text: { component: import_editor_controls2.TextControl, layout: "two-columns" },
151
151
  textarea: { component: import_editor_controls2.TextAreaControl, layout: "full" },
152
152
  size: { component: import_editor_controls2.SizeControl, layout: "two-columns" },
153
- select: { component: import_editor_controls2.SelectControl, layout: "two-columns" }
153
+ select: { component: import_editor_controls2.SelectControl, layout: "two-columns" },
154
+ link: { component: import_editor_controls2.LinkControl, layout: "full" },
155
+ url: { component: import_editor_controls2.UrlControl, layout: "full" }
154
156
  };
155
157
  var getControlByType = (type) => controlTypes[type]?.component;
156
158
  var getLayoutByType = (type) => controlTypes[type].layout;
@@ -283,13 +285,13 @@ var Control2 = ({ control }) => {
283
285
  };
284
286
 
285
287
  // src/components/style-tab.tsx
286
- var React49 = __toESM(require("react"));
287
- var import_react12 = require("react");
288
+ var React56 = __toESM(require("react"));
289
+ var import_react13 = require("react");
288
290
  var import_editor_elements5 = require("@elementor/editor-elements");
289
291
  var import_editor_responsive = require("@elementor/editor-responsive");
290
292
  var import_editor_styles = require("@elementor/editor-styles");
291
- var import_ui41 = require("@elementor/ui");
292
- var import_i18n29 = require("@wordpress/i18n");
293
+ var import_ui48 = require("@elementor/ui");
294
+ var import_i18n36 = require("@wordpress/i18n");
293
295
 
294
296
  // src/contexts/classes-prop-context.tsx
295
297
  var React10 = __toESM(require("react"));
@@ -321,9 +323,10 @@ function useStyle() {
321
323
  return context;
322
324
  }
323
325
 
324
- // src/components/css-class-selector-section.tsx
326
+ // src/components/css-class-selector.tsx
325
327
  var React13 = __toESM(require("react"));
326
328
  var import_editor_elements2 = require("@elementor/editor-elements");
329
+ var import_editor_props = require("@elementor/editor-props");
327
330
  var import_ui9 = require("@elementor/ui");
328
331
  var import_i18n = require("@wordpress/i18n");
329
332
 
@@ -333,9 +336,9 @@ var import_ui8 = require("@elementor/ui");
333
336
 
334
337
  // src/components/multi-combobox/use-combobox-actions.ts
335
338
  var import_ui7 = require("@elementor/ui");
336
- var useComboboxActions = (applied, actions, optionsLabel, onApply) => ({
339
+ var useComboboxActions = (applied, actions, optionsLabel, onSelect) => ({
337
340
  action: {
338
- is: (opt) => !!opt.action,
341
+ is: (opt) => typeof opt !== "string" && "action" in opt,
339
342
  getLabel: (option) => option.action.getLabel(option.label),
340
343
  groupBy: (option) => option.action.groupLabel,
341
344
  onChange: ({ action, label }) => action?.apply(label),
@@ -355,10 +358,10 @@ var useComboboxActions = (applied, actions, optionsLabel, onApply) => ({
355
358
  }
356
359
  },
357
360
  option: {
358
- is: (opt) => !("action" in opt),
361
+ is: (opt) => typeof opt !== "string" && !("action" in opt),
359
362
  getLabel: (option) => option.label,
360
363
  groupBy: () => optionsLabel ?? "",
361
- onChange: (optionValues) => onApply?.(optionValues),
364
+ onChange: (optionValues) => onSelect?.(optionValues),
362
365
  getFilteredOptions: (optionList, params) => {
363
366
  const appliedValues = applied.map((option) => option.value);
364
367
  const optionsWithoutApplied = optionList.filter((option) => !appliedValues.includes(option.value));
@@ -381,24 +384,19 @@ var createActionOption = (groupLabel, action, inputValue) => ({
381
384
  var MultiCombobox = ({
382
385
  actions = {},
383
386
  selected,
384
- options: options5,
387
+ options: options10,
385
388
  optionsLabel,
386
- onApply,
389
+ onSelect,
387
390
  onCreate,
388
391
  ...props
389
392
  }) => {
390
- const { action: actionProps, option: optionProps } = useComboboxActions(selected, actions, optionsLabel, onApply);
391
- const handleSelectOption = (values) => {
392
- const action = values.find((value) => actionProps.is(value));
393
- if (action) {
394
- return actionProps.onChange(action);
395
- }
396
- return optionProps.onChange(values);
397
- };
398
- const handleCreateOption = (values) => {
399
- const value = values.find((option) => typeof option === "string");
400
- onCreate?.(value);
401
- };
393
+ const { action: actionProps, option: optionProps } = useComboboxActions(
394
+ selected,
395
+ actions,
396
+ // TODO: make the group mechanism more generic, allow passing list of groups.
397
+ optionsLabel,
398
+ onSelect
399
+ );
402
400
  return /* @__PURE__ */ React12.createElement(
403
401
  import_ui8.Autocomplete,
404
402
  {
@@ -410,29 +408,36 @@ var MultiCombobox = ({
410
408
  disableClearable: true,
411
409
  handleHomeEndKeys: true,
412
410
  value: selected,
413
- options: options5,
411
+ options: options10,
414
412
  renderGroup,
415
413
  renderInput: (params) => /* @__PURE__ */ React12.createElement(import_ui8.TextField, { ...params }),
416
414
  getLimitTagsText: (more) => /* @__PURE__ */ React12.createElement(import_ui8.Chip, { size: "tiny", variant: "standard", label: `+${more}`, clickable: true }),
417
- onChange: (_, values, reason) => {
418
- if (reason === "selectOption") {
419
- return handleSelectOption(values);
420
- }
415
+ onChange: (_, selectedOrTypedValue, reason) => {
421
416
  if (reason === "createOption") {
422
- return handleCreateOption(values);
417
+ const typedValue = selectedOrTypedValue.find((option) => typeof option === "string");
418
+ return typedValue && onCreate?.(typedValue);
419
+ }
420
+ const action = selectedOrTypedValue.find((value) => actionProps.is(value));
421
+ if (reason === "selectOption" && action) {
422
+ return actionProps.onChange(action);
423
423
  }
424
- onApply?.(values);
424
+ const selectedValues = selectedOrTypedValue.filter((v) => typeof v !== "string");
425
+ const fixedValues = options10.filter((option) => option.fixed);
426
+ optionProps.onChange([.../* @__PURE__ */ new Set([...fixedValues, ...selectedValues])]);
425
427
  },
426
428
  getOptionLabel: (option) => {
427
429
  if (optionProps.is(option)) {
428
430
  return optionProps.getLabel(option);
429
431
  }
430
- return actionProps.getLabel(option) ?? "";
432
+ if (actionProps.is(option)) {
433
+ return actionProps.getLabel(option);
434
+ }
435
+ return "";
431
436
  },
432
437
  filterOptions: (optionList, params) => {
433
- const filteredoptions = optionProps.getFilteredOptions(optionList, params);
438
+ const filteredOptions = optionProps.getFilteredOptions(optionList, params);
434
439
  const actionOptions = actionProps.getFilteredActions(optionList, params);
435
- return [...actionOptions, ...filteredoptions];
440
+ return [...actionOptions, ...filteredOptions];
436
441
  },
437
442
  groupBy: (option) => (optionProps.is(option) ? optionProps.groupBy() : actionProps.groupBy(option)) ?? ""
438
443
  }
@@ -454,36 +459,40 @@ var GroupItems = (0, import_ui8.styled)("ul")`
454
459
  padding: 0;
455
460
  `;
456
461
 
457
- // src/components/css-class-selector-section.tsx
462
+ // src/components/css-class-selector.tsx
458
463
  var ID = "elementor-css-class-selector";
459
464
  var TAGS_LIMIT = 8;
460
- function CssClassSelectorSection() {
461
- const options5 = useOptions();
465
+ function CssClassSelector() {
466
+ const options10 = useOptions();
462
467
  const { id: activeId, setId: setActiveId } = useStyle();
463
- const appliedIds = useAppliedClassesIds();
464
- const applied = options5.filter((option) => appliedIds.includes(option.value));
465
- const active = options5.find((option) => option.value === activeId) || null;
468
+ const [appliedIds] = useAppliedClassesIds();
469
+ const handleApply = useHandleApply();
470
+ const handleActivate = ({ value }) => setActiveId(value);
471
+ const active = options10.find((option) => option.value === activeId) || null;
472
+ const applied = appliedIds.map((id) => options10.find((option) => option.value === id)).filter((option) => !!option);
466
473
  return /* @__PURE__ */ React13.createElement(import_ui9.Stack, { gap: 1, p: 2 }, /* @__PURE__ */ React13.createElement(import_ui9.Typography, { component: "label", variant: "caption", htmlFor: ID }, (0, import_i18n.__)("CSS Classes", "elementor")), /* @__PURE__ */ React13.createElement(
467
474
  MultiCombobox,
468
475
  {
469
476
  id: ID,
470
477
  size: "tiny",
471
- options: options5,
478
+ options: options10,
472
479
  selected: applied,
480
+ onSelect: handleApply,
473
481
  limitTags: TAGS_LIMIT,
474
482
  optionsLabel: (0, import_i18n.__)("Global CSS Classes", "elementor"),
475
- renderTags: (tagValue, getTagProps) => tagValue.map((option, index) => {
483
+ renderTags: (values, getTagProps) => values.map((value, index) => {
476
484
  const chipProps = getTagProps({ index });
485
+ const isActive = value.value === active?.value;
477
486
  return /* @__PURE__ */ React13.createElement(
478
487
  import_ui9.Chip,
479
488
  {
480
489
  ...chipProps,
481
490
  key: chipProps.key,
482
491
  size: "small",
483
- label: option.label,
484
- variant: option.value === active?.value ? "filled" : "standard",
485
- color: option.color ?? "default",
486
- onClick: () => setActiveId(option.value),
492
+ label: value.label,
493
+ variant: isActive ? "filled" : "standard",
494
+ color: isActive && value.color ? value.color : "default",
495
+ onClick: () => handleActivate(value),
487
496
  onDelete: null
488
497
  }
489
498
  );
@@ -491,20 +500,51 @@ function CssClassSelectorSection() {
491
500
  }
492
501
  ));
493
502
  }
494
- function useAppliedClassesIds() {
495
- const { element } = useElement();
496
- const currentClassesProp = useClassesProp();
497
- return (0, import_editor_elements2.useElementSetting)(element.id, currentClassesProp)?.value || [];
498
- }
499
503
  function useOptions() {
500
504
  const { element } = useElement();
501
505
  const styleDefs = (0, import_editor_elements2.useElementStyles)(element.id);
502
506
  return Object.values(styleDefs).map((styleDef) => ({
503
507
  label: styleDef.label,
504
508
  value: styleDef.id,
509
+ fixed: true,
505
510
  color: "primary"
506
511
  }));
507
512
  }
513
+ function useAppliedClassesIds() {
514
+ const { element } = useElement();
515
+ const currentClassesProp = useClassesProp();
516
+ const value = (0, import_editor_elements2.useElementSetting)(element.id, currentClassesProp)?.value || [];
517
+ const setValue = (ids) => {
518
+ (0, import_editor_elements2.updateSettings)({
519
+ id: element.id,
520
+ props: {
521
+ [currentClassesProp]: import_editor_props.classesPropTypeUtil.create(ids)
522
+ }
523
+ });
524
+ };
525
+ return [value, setValue];
526
+ }
527
+ function useHandleApply() {
528
+ const { id: activeId, setId: setActiveId } = useStyle();
529
+ const [appliedIds, setAppliedIds] = useAppliedClassesIds();
530
+ return (selectedOptions) => {
531
+ const selectedValues = selectedOptions.map(({ value }) => value);
532
+ const isSameClassesAlreadyApplied = selectedValues.length === appliedIds.length && selectedValues.every((value) => appliedIds.includes(value));
533
+ if (isSameClassesAlreadyApplied) {
534
+ return;
535
+ }
536
+ setAppliedIds(selectedValues);
537
+ const addedValue = selectedValues.find((id) => !appliedIds.includes(id));
538
+ if (addedValue) {
539
+ setActiveId(addedValue);
540
+ return;
541
+ }
542
+ const removedValue = appliedIds.find((id) => !selectedValues.includes(id));
543
+ if (removedValue && removedValue === activeId) {
544
+ setActiveId(selectedValues[0] ?? null);
545
+ }
546
+ };
547
+ }
508
548
 
509
549
  // src/components/style-sections/background-section/background-section.tsx
510
550
  var React16 = __toESM(require("react"));
@@ -632,6 +672,7 @@ var BorderStyleField = () => {
632
672
  // src/components/style-sections/border-section/border-width-field.tsx
633
673
  var React20 = __toESM(require("react"));
634
674
  var import_editor_controls11 = require("@elementor/editor-controls");
675
+ var import_editor_props2 = require("@elementor/editor-props");
635
676
  var import_icons4 = require("@elementor/icons");
636
677
  var import_i18n5 = require("@wordpress/i18n");
637
678
  var edges = [
@@ -660,10 +701,10 @@ var BorderWidthField = () => {
660
701
  return /* @__PURE__ */ React20.createElement(StylesField, { bind: "border-width" }, /* @__PURE__ */ React20.createElement(
661
702
  import_editor_controls11.EqualUnequalSizesControl,
662
703
  {
704
+ items: edges,
663
705
  label: (0, import_i18n5.__)("Border Width", "elementor"),
664
706
  icon: /* @__PURE__ */ React20.createElement(import_icons4.SideAllIcon, { fontSize: "tiny" }),
665
- items: edges,
666
- multiSizeType: "border-width"
707
+ multiSizePropTypeUtil: import_editor_props2.borderWidthPropTypeUtil
667
708
  }
668
709
  ));
669
710
  };
@@ -708,6 +749,7 @@ var BorderField = () => {
708
749
  // src/components/style-sections/border-section/border-radius-field.tsx
709
750
  var React22 = __toESM(require("react"));
710
751
  var import_editor_controls12 = require("@elementor/editor-controls");
752
+ var import_editor_props3 = require("@elementor/editor-props");
711
753
  var import_icons5 = require("@elementor/icons");
712
754
  var import_i18n7 = require("@wordpress/i18n");
713
755
  var corners = [
@@ -736,10 +778,10 @@ var BorderRadiusField = () => {
736
778
  return /* @__PURE__ */ React22.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React22.createElement(
737
779
  import_editor_controls12.EqualUnequalSizesControl,
738
780
  {
781
+ items: corners,
739
782
  label: (0, import_i18n7.__)("Border Radius", "elementor"),
740
783
  icon: /* @__PURE__ */ React22.createElement(import_icons5.BorderCornersIcon, { fontSize: "tiny" }),
741
- items: corners,
742
- multiSizeType: "border-radius"
784
+ multiSizePropTypeUtil: import_editor_props3.borderRadiusPropTypeUtil
743
785
  }
744
786
  ));
745
787
  };
@@ -756,139 +798,476 @@ var EffectsSection = () => {
756
798
  };
757
799
 
758
800
  // src/components/style-sections/layout-section/layout-section.tsx
759
- var React27 = __toESM(require("react"));
760
- var import_ui20 = require("@elementor/ui");
761
-
762
- // src/components/style-sections/layout-section/display-field.tsx
763
- var React25 = __toESM(require("react"));
764
- var import_editor_controls14 = require("@elementor/editor-controls");
765
- var import_ui17 = require("@elementor/ui");
766
- var import_i18n8 = require("@wordpress/i18n");
767
- var DisplayField = () => {
768
- const options5 = [
769
- {
770
- value: "block",
771
- renderContent: () => (0, import_i18n8.__)("Block", "elementor"),
772
- label: (0, import_i18n8.__)("Block", "elementor")
773
- },
774
- {
775
- value: "flex",
776
- renderContent: () => (0, import_i18n8.__)("Flex", "elementor"),
777
- label: (0, import_i18n8.__)("Flex", "elementor")
778
- }
779
- ];
780
- return /* @__PURE__ */ React25.createElement(StylesField, { bind: "display" }, /* @__PURE__ */ React25.createElement(import_ui17.Stack, { gap: 1 }, /* @__PURE__ */ React25.createElement(import_editor_controls14.ControlLabel, null, (0, import_i18n8.__)("Display", "elementor")), /* @__PURE__ */ React25.createElement(import_editor_controls14.ToggleControl, { options: options5, fullWidth: true })));
781
- };
801
+ var React34 = __toESM(require("react"));
802
+ var import_editor_controls22 = require("@elementor/editor-controls");
803
+ var import_ui27 = require("@elementor/ui");
804
+ var import_i18n16 = require("@wordpress/i18n");
782
805
 
783
- // src/components/style-sections/layout-section/justify-content-field.tsx
806
+ // src/components/style-sections/layout-section/align-items-field.tsx
784
807
  var React26 = __toESM(require("react"));
785
- var import_editor_controls15 = require("@elementor/editor-controls");
808
+ var import_editor_controls14 = require("@elementor/editor-controls");
786
809
  var import_icons6 = require("@elementor/icons");
787
810
  var import_ui19 = require("@elementor/ui");
788
- var import_i18n9 = require("@wordpress/i18n");
811
+ var import_i18n8 = require("@wordpress/i18n");
789
812
 
790
813
  // src/hooks/use-direction.ts
791
- var import_ui18 = require("@elementor/ui");
814
+ var import_ui17 = require("@elementor/ui");
792
815
  function useDirection() {
793
- const theme = (0, import_ui18.useTheme)(), extendedWindow = window;
816
+ const theme = (0, import_ui17.useTheme)(), extendedWindow = window;
794
817
  const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!extendedWindow.elementorFrontend?.config?.is_rtl;
795
818
  return { isSiteRtl, isUiRtl };
796
819
  }
797
820
 
798
- // src/components/style-sections/layout-section/utils/rotate-flex-icon.ts
799
- function rotateFlexIcon(direction = "row", initValue) {
800
- const rotationIndexMap = {
801
- row: 0,
802
- column: 1,
803
- "row-reverse": 2,
804
- "column-reverse": 3
805
- };
806
- const rotationIndex = initValue + (rotationIndexMap[direction || "row"] ?? 0);
807
- return `rotate(calc(90deg * ${rotationIndex}))`;
808
- }
809
-
810
- // src/components/style-sections/layout-section/justify-content-field.tsx
811
- var JustifyContentField = () => {
821
+ // src/components/style-sections/layout-section/utils/rotated-icon.tsx
822
+ var React25 = __toESM(require("react"));
823
+ var import_react7 = require("react");
824
+ var import_ui18 = require("@elementor/ui");
825
+ var CLOCKWISE_ANGLES = {
826
+ row: 0,
827
+ column: 90,
828
+ "row-reverse": 180,
829
+ "column-reverse": 270
830
+ };
831
+ var COUNTER_CLOCKWISE_ANGLES = {
832
+ row: 0,
833
+ column: -90,
834
+ "row-reverse": -180,
835
+ "column-reverse": -270
836
+ };
837
+ var RotatedIcon = ({ icon: Icon, size, isClockwise = true, offset = 0 }) => {
838
+ const rotate = (0, import_react7.useRef)(useGetTargetAngle(isClockwise, offset));
839
+ rotate.current = useGetTargetAngle(isClockwise, offset, rotate);
840
+ return /* @__PURE__ */ React25.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
841
+ };
842
+ var useGetTargetAngle = (isClockwise, offset, existingRef) => {
812
843
  const [direction] = useStylesField("flex-direction");
813
- const { isUiRtl, isSiteRtl } = useDirection(), sx = { transform: rotateFlexIcon(direction, -1) }, shouldReverseOrder = isSiteRtl !== isUiRtl;
814
- const StartIcon = isSiteRtl ? import_icons6.JustifyBottomIcon : import_icons6.JustifyTopIcon, EndIcon = isSiteRtl ? import_icons6.JustifyTopIcon : import_icons6.JustifyBottomIcon;
815
- const options5 = [
844
+ const isRtl = "rtl" === (0, import_ui18.useTheme)().direction;
845
+ const rotationMultiplier = isRtl ? -1 : 1;
846
+ const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
847
+ const currentAngle = existingRef ? existingRef.current * rotationMultiplier : angleMap[direction?.value || "row"] + offset;
848
+ const targetAngle = angleMap[direction?.value || "row"] + offset;
849
+ const diffToTargetAngle = (targetAngle - currentAngle + 360) % 360;
850
+ const formattedDiff = (diffToTargetAngle + 180) % 360 - 180;
851
+ return (currentAngle + formattedDiff) * rotationMultiplier;
852
+ };
853
+
854
+ // src/components/style-sections/layout-section/align-items-field.tsx
855
+ var StartIcon = (0, import_ui19.withDirection)(import_icons6.LayoutAlignLeftIcon);
856
+ var EndIcon = (0, import_ui19.withDirection)(import_icons6.LayoutAlignRightIcon);
857
+ var iconProps = {
858
+ isClockwise: false,
859
+ offset: 90
860
+ };
861
+ var options = [
862
+ {
863
+ value: "start",
864
+ label: (0, import_i18n8.__)("Start", "elementor"),
865
+ renderContent: ({ size }) => /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
866
+ showTooltip: true
867
+ },
868
+ {
869
+ value: "center",
870
+ label: (0, import_i18n8.__)("Center", "elementor"),
871
+ renderContent: ({ size }) => /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: import_icons6.LayoutAlignCenterIcon, size, ...iconProps }),
872
+ showTooltip: true
873
+ },
874
+ {
875
+ value: "end",
876
+ label: (0, import_i18n8.__)("End", "elementor"),
877
+ renderContent: ({ size }) => /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
878
+ showTooltip: true
879
+ },
880
+ {
881
+ value: "stretch",
882
+ label: (0, import_i18n8.__)("Stretch", "elementor"),
883
+ renderContent: ({ size }) => /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: import_icons6.LayoutDistributeVerticalIcon, size, ...iconProps }),
884
+ showTooltip: true
885
+ }
886
+ ];
887
+ var AlignItemsField = () => {
888
+ const { isSiteRtl } = useDirection();
889
+ return /* @__PURE__ */ React26.createElement(import_ui19.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React26.createElement(import_ui19.ThemeProvider, null, /* @__PURE__ */ React26.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React26.createElement(import_ui19.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React26.createElement(import_ui19.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React26.createElement(import_editor_controls14.ControlLabel, null, (0, import_i18n8.__)("Align items", "elementor"))), /* @__PURE__ */ React26.createElement(import_ui19.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React26.createElement(import_editor_controls14.ToggleControl, { options }))))));
890
+ };
891
+
892
+ // src/components/style-sections/layout-section/align-self-child-field.tsx
893
+ var React27 = __toESM(require("react"));
894
+ var import_editor_controls15 = require("@elementor/editor-controls");
895
+ var import_icons7 = require("@elementor/icons");
896
+ var import_ui20 = require("@elementor/ui");
897
+ var import_i18n9 = require("@wordpress/i18n");
898
+ var StartIcon2 = (0, import_ui20.withDirection)(import_icons7.LayoutAlignLeftIcon);
899
+ var EndIcon2 = (0, import_ui20.withDirection)(import_icons7.LayoutAlignRightIcon);
900
+ var iconProps2 = {
901
+ isClockwise: false,
902
+ offset: 90
903
+ };
904
+ var options2 = [
905
+ {
906
+ value: "start",
907
+ label: (0, import_i18n9.__)("Start", "elementor"),
908
+ renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
909
+ showTooltip: true
910
+ },
911
+ {
912
+ value: "center",
913
+ label: (0, import_i18n9.__)("Center", "elementor"),
914
+ renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: import_icons7.LayoutAlignCenterIcon, size, ...iconProps2 }),
915
+ showTooltip: true
916
+ },
917
+ {
918
+ value: "end",
919
+ label: (0, import_i18n9.__)("End", "elementor"),
920
+ renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
921
+ showTooltip: true
922
+ },
923
+ {
924
+ value: "stretch",
925
+ label: (0, import_i18n9.__)("Stretch", "elementor"),
926
+ renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: import_icons7.LayoutDistributeVerticalIcon, size, ...iconProps2 }),
927
+ showTooltip: true
928
+ }
929
+ ];
930
+ var AlignSelfChild = () => {
931
+ const { isSiteRtl } = useDirection();
932
+ return /* @__PURE__ */ React27.createElement(import_ui20.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React27.createElement(import_ui20.ThemeProvider, null, /* @__PURE__ */ React27.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React27.createElement(import_ui20.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React27.createElement(import_ui20.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React27.createElement(import_editor_controls15.ControlLabel, null, (0, import_i18n9.__)("Align self", "elementor"))), /* @__PURE__ */ React27.createElement(import_ui20.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React27.createElement(import_editor_controls15.ToggleControl, { options: options2 }))))));
933
+ };
934
+
935
+ // src/components/style-sections/layout-section/display-field.tsx
936
+ var React28 = __toESM(require("react"));
937
+ var import_editor_controls16 = require("@elementor/editor-controls");
938
+ var import_ui21 = require("@elementor/ui");
939
+ var import_i18n10 = require("@wordpress/i18n");
940
+ var DisplayField = () => {
941
+ const options10 = [
816
942
  {
817
- value: "start",
818
- label: (0, import_i18n9.__)("Start", "elementor"),
819
- renderContent: ({ size }) => /* @__PURE__ */ React26.createElement(StartIcon, { fontSize: size, sx }),
820
- showTooltip: true
943
+ value: "block",
944
+ renderContent: () => (0, import_i18n10.__)("Block", "elementor"),
945
+ label: (0, import_i18n10.__)("Block", "elementor")
821
946
  },
822
947
  {
823
- value: "center",
824
- label: (0, import_i18n9.__)("Center", "elementor"),
825
- renderContent: ({ size }) => /* @__PURE__ */ React26.createElement(import_icons6.JustifyCenterIcon, { fontSize: size, sx }),
826
- showTooltip: true
948
+ value: "flex",
949
+ renderContent: () => (0, import_i18n10.__)("Flex", "elementor"),
950
+ label: (0, import_i18n10.__)("Flex", "elementor")
951
+ }
952
+ ];
953
+ return /* @__PURE__ */ React28.createElement(StylesField, { bind: "display" }, /* @__PURE__ */ React28.createElement(import_ui21.Stack, { gap: 1 }, /* @__PURE__ */ React28.createElement(import_editor_controls16.ControlLabel, null, (0, import_i18n10.__)("Display", "elementor")), /* @__PURE__ */ React28.createElement(import_editor_controls16.ToggleControl, { options: options10, fullWidth: true })));
954
+ };
955
+
956
+ // src/components/style-sections/layout-section/flex-direction-field.tsx
957
+ var React29 = __toESM(require("react"));
958
+ var import_editor_controls17 = require("@elementor/editor-controls");
959
+ var import_icons8 = require("@elementor/icons");
960
+ var import_ui22 = require("@elementor/ui");
961
+ var import_i18n11 = require("@wordpress/i18n");
962
+ var options3 = [
963
+ {
964
+ value: "row",
965
+ label: (0, import_i18n11.__)("Row", "elementor"),
966
+ renderContent: ({ size }) => {
967
+ const StartIcon4 = (0, import_ui22.withDirection)(import_icons8.ArrowRightIcon);
968
+ return /* @__PURE__ */ React29.createElement(StartIcon4, { fontSize: size });
827
969
  },
828
- {
829
- value: "end",
830
- label: (0, import_i18n9.__)("End", "elementor"),
831
- renderContent: ({ size }) => /* @__PURE__ */ React26.createElement(EndIcon, { fontSize: size, sx }),
832
- showTooltip: true
970
+ showTooltip: true
971
+ },
972
+ {
973
+ value: "column",
974
+ label: (0, import_i18n11.__)("Column", "elementor"),
975
+ renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(import_icons8.ArrowDownSmallIcon, { fontSize: size }),
976
+ showTooltip: true
977
+ },
978
+ {
979
+ value: "row-reverse",
980
+ label: (0, import_i18n11.__)("Reversed row", "elementor"),
981
+ renderContent: ({ size }) => {
982
+ const EndIcon4 = (0, import_ui22.withDirection)(import_icons8.ArrowLeftIcon);
983
+ return /* @__PURE__ */ React29.createElement(EndIcon4, { fontSize: size });
833
984
  },
985
+ showTooltip: true
986
+ },
987
+ {
988
+ value: "column-reverse",
989
+ label: (0, import_i18n11.__)("Reversed column", "elementor"),
990
+ renderContent: ({ size }) => /* @__PURE__ */ React29.createElement(import_icons8.ArrowUpSmallIcon, { fontSize: size }),
991
+ showTooltip: true
992
+ }
993
+ ];
994
+ var FlexDirectionField = () => {
995
+ const { isSiteRtl } = useDirection();
996
+ return /* @__PURE__ */ React29.createElement(import_ui22.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React29.createElement(import_ui22.ThemeProvider, null, /* @__PURE__ */ React29.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React29.createElement(import_ui22.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React29.createElement(import_ui22.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React29.createElement(import_editor_controls17.ControlLabel, null, (0, import_i18n11.__)("Direction", "elementor"))), /* @__PURE__ */ React29.createElement(import_ui22.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React29.createElement(import_editor_controls17.ToggleControl, { options: options3 }))))));
997
+ };
998
+
999
+ // src/components/style-sections/layout-section/flex-order-field.tsx
1000
+ var React30 = __toESM(require("react"));
1001
+ var import_react8 = require("react");
1002
+ var import_editor_controls18 = require("@elementor/editor-controls");
1003
+ var import_icons9 = require("@elementor/icons");
1004
+ var import_ui23 = require("@elementor/ui");
1005
+ var import_i18n12 = require("@wordpress/i18n");
1006
+ var FIRST_DEFAULT_VALUE = -99999;
1007
+ var LAST_DEFAULT_VALUE = 99999;
1008
+ var FIRST = "first";
1009
+ var LAST = "last";
1010
+ var CUSTOM = "custom";
1011
+ var orderValueMap = {
1012
+ [FIRST]: FIRST_DEFAULT_VALUE,
1013
+ [LAST]: LAST_DEFAULT_VALUE
1014
+ };
1015
+ var items = [
1016
+ {
1017
+ value: FIRST,
1018
+ label: (0, import_i18n12.__)("First", "elementor"),
1019
+ renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(import_icons9.ArrowUpSmallIcon, { fontSize: size }),
1020
+ showTooltip: true
1021
+ },
1022
+ {
1023
+ value: LAST,
1024
+ label: (0, import_i18n12.__)("Last", "elementor"),
1025
+ renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(import_icons9.ArrowDownSmallIcon, { fontSize: size }),
1026
+ showTooltip: true
1027
+ },
1028
+ {
1029
+ value: CUSTOM,
1030
+ label: (0, import_i18n12.__)("Custom", "elementor"),
1031
+ renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(import_icons9.PencilIcon, { fontSize: size }),
1032
+ showTooltip: true
1033
+ }
1034
+ ];
1035
+ var FlexOrderField = () => {
1036
+ const { isSiteRtl } = useDirection(), [order, setOrder] = useStylesField("order");
1037
+ const [groupControlValue, setGroupControlValue] = (0, import_react8.useState)(getGroupControlValue(order?.value || null));
1038
+ const handleToggleButtonChange = (group) => {
1039
+ setGroupControlValue(group);
1040
+ if (!group || group === CUSTOM) {
1041
+ setOrder(null);
1042
+ return;
1043
+ }
1044
+ setOrder({ $$type: "number", value: orderValueMap[group] });
1045
+ };
1046
+ return /* @__PURE__ */ React30.createElement(import_ui23.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React30.createElement(import_ui23.ThemeProvider, null, /* @__PURE__ */ React30.createElement(import_ui23.Stack, { gap: 2 }, /* @__PURE__ */ React30.createElement(import_ui23.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React30.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(import_editor_controls18.ControlLabel, null, (0, import_i18n12.__)("Order", "elementor"))), /* @__PURE__ */ React30.createElement(import_ui23.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React30.createElement(
1047
+ import_editor_controls18.ControlToggleButtonGroup,
834
1048
  {
835
- value: "space-between",
836
- label: (0, import_i18n9.__)("Space Between", "elementor"),
837
- renderContent: ({ size }) => /* @__PURE__ */ React26.createElement(import_icons6.JustifySpaceBetweenVerticalIcon, { fontSize: size, sx }),
838
- showTooltip: true
839
- },
1049
+ items,
1050
+ value: groupControlValue,
1051
+ onChange: handleToggleButtonChange,
1052
+ exclusive: true
1053
+ }
1054
+ ))), CUSTOM === groupControlValue && /* @__PURE__ */ React30.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React30.createElement(import_ui23.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React30.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(import_editor_controls18.ControlLabel, null, (0, import_i18n12.__)("Custom order", "elementor"))), /* @__PURE__ */ React30.createElement(import_ui23.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React30.createElement(
1055
+ import_editor_controls18.NumberControl,
840
1056
  {
841
- value: "space-around",
842
- label: (0, import_i18n9.__)("Space Around", "elementor"),
843
- renderContent: ({ size }) => /* @__PURE__ */ React26.createElement(import_icons6.JustifySpaceAroundVerticalIcon, { fontSize: size, sx }),
844
- showTooltip: true
845
- },
1057
+ min: FIRST_DEFAULT_VALUE + 1,
1058
+ max: LAST_DEFAULT_VALUE - 1,
1059
+ shouldForceInt: true
1060
+ }
1061
+ )))))));
1062
+ };
1063
+ var getGroupControlValue = (order) => {
1064
+ if (LAST_DEFAULT_VALUE === order) {
1065
+ return LAST;
1066
+ }
1067
+ if (FIRST_DEFAULT_VALUE === order) {
1068
+ return FIRST;
1069
+ }
1070
+ return 0 === order || order ? CUSTOM : null;
1071
+ };
1072
+
1073
+ // src/components/style-sections/layout-section/flex-size-field.tsx
1074
+ var React31 = __toESM(require("react"));
1075
+ var import_editor_controls19 = require("@elementor/editor-controls");
1076
+ var import_icons10 = require("@elementor/icons");
1077
+ var import_ui24 = require("@elementor/ui");
1078
+ var import_i18n13 = require("@wordpress/i18n");
1079
+ var DEFAULT = 1;
1080
+ var items2 = [
1081
+ {
1082
+ value: "flex-grow",
1083
+ label: (0, import_i18n13.__)("Grow", "elementor"),
1084
+ renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(import_icons10.ExpandIcon, { fontSize: size }),
1085
+ showTooltip: true
1086
+ },
1087
+ {
1088
+ value: "flex-shrink",
1089
+ label: (0, import_i18n13.__)("Shrink", "elementor"),
1090
+ renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(import_icons10.ShrinkIcon, { fontSize: size }),
1091
+ showTooltip: true
1092
+ },
1093
+ {
1094
+ value: "custom",
1095
+ label: (0, import_i18n13.__)("Custom", "elementor"),
1096
+ renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(import_icons10.PencilIcon, { fontSize: size }),
1097
+ showTooltip: true
1098
+ }
1099
+ ];
1100
+ var FlexSizeField = () => {
1101
+ const { isSiteRtl } = useDirection(), [growField, setGrowField] = useStylesField("flex-grow"), [shrinkField, setShrinkField] = useStylesField("flex-shrink"), [basisField, setBasisField] = useStylesField("flex-basis");
1102
+ const grow = growField?.value || null, shrink = shrinkField?.value || null, basis = basisField?.value || null;
1103
+ const currentGroup = React31.useMemo(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = React31.useState(currentGroup);
1104
+ const onChangeGroup = (group = null) => {
1105
+ setActiveGroup(group);
1106
+ setBasisField(null);
1107
+ if (!group || group === "custom") {
1108
+ setGrowField(null);
1109
+ setShrinkField(null);
1110
+ return;
1111
+ }
1112
+ if (group === "flex-grow") {
1113
+ setGrowField({ $$type: "number", value: DEFAULT });
1114
+ setShrinkField(null);
1115
+ return;
1116
+ }
1117
+ setGrowField(null);
1118
+ setShrinkField({ $$type: "number", value: DEFAULT });
1119
+ };
1120
+ return /* @__PURE__ */ React31.createElement(import_ui24.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React31.createElement(import_ui24.ThemeProvider, null, /* @__PURE__ */ React31.createElement(import_ui24.Stack, { gap: 2 }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(import_editor_controls19.ControlLabel, null, (0, import_i18n13.__)("Size", "elementor"))), /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(
1121
+ import_editor_controls19.ControlToggleButtonGroup,
846
1122
  {
847
- value: "space-evenly",
848
- label: (0, import_i18n9.__)("Space Evenly", "elementor"),
849
- renderContent: ({ size }) => /* @__PURE__ */ React26.createElement(import_icons6.JustifyDistributeVerticalIcon, { fontSize: size, sx }),
850
- showTooltip: true
1123
+ value: activeGroup,
1124
+ onChange: onChangeGroup,
1125
+ items: items2,
1126
+ exclusive: true
851
1127
  }
852
- ];
853
- if (shouldReverseOrder) {
854
- options5.reverse();
1128
+ ))), "custom" === activeGroup && /* @__PURE__ */ React31.createElement(FlexCustomField, null))));
1129
+ };
1130
+ var FlexCustomField = () => /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(import_editor_controls19.ControlLabel, null, (0, import_i18n13.__)("Grow", "elementor"))), /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(import_editor_controls19.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React31.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(import_editor_controls19.ControlLabel, null, (0, import_i18n13.__)("Shrink", "elementor"))), /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(import_editor_controls19.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React31.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(import_editor_controls19.ControlLabel, null, (0, import_i18n13.__)("Basis", "elementor"))), /* @__PURE__ */ React31.createElement(import_ui24.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(import_editor_controls19.SizeControl, null)))));
1131
+ var getActiveGroup = ({
1132
+ grow,
1133
+ shrink,
1134
+ basis
1135
+ }) => {
1136
+ if (null === grow && null === shrink && !basis) {
1137
+ return null;
855
1138
  }
856
- return /* @__PURE__ */ React26.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React26.createElement(import_ui19.Stack, { gap: 1 }, /* @__PURE__ */ React26.createElement(import_editor_controls15.ControlLabel, null, (0, import_i18n9.__)("Justify Content", "elementor")), /* @__PURE__ */ React26.createElement(import_editor_controls15.ToggleControl, { options: options5, fullWidth: true })));
1139
+ if (shrink && grow || basis) {
1140
+ return "custom";
1141
+ }
1142
+ if (grow === DEFAULT) {
1143
+ return "flex-grow";
1144
+ }
1145
+ if (shrink === DEFAULT) {
1146
+ return "flex-shrink";
1147
+ }
1148
+ return "custom";
1149
+ };
1150
+
1151
+ // src/components/style-sections/layout-section/justify-content-field.tsx
1152
+ var React32 = __toESM(require("react"));
1153
+ var import_editor_controls20 = require("@elementor/editor-controls");
1154
+ var import_icons11 = require("@elementor/icons");
1155
+ var import_ui25 = require("@elementor/ui");
1156
+ var import_i18n14 = require("@wordpress/i18n");
1157
+ var StartIcon3 = (0, import_ui25.withDirection)(import_icons11.JustifyTopIcon);
1158
+ var EndIcon3 = (0, import_ui25.withDirection)(import_icons11.JustifyBottomIcon);
1159
+ var iconProps3 = {
1160
+ isClockwise: true,
1161
+ offset: -90
1162
+ };
1163
+ var options4 = [
1164
+ {
1165
+ value: "start",
1166
+ label: (0, import_i18n14.__)("Start", "elementor"),
1167
+ renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: StartIcon3, size, ...iconProps3 }),
1168
+ showTooltip: true
1169
+ },
1170
+ {
1171
+ value: "center",
1172
+ label: (0, import_i18n14.__)("Center", "elementor"),
1173
+ renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: import_icons11.JustifyCenterIcon, size, ...iconProps3 }),
1174
+ showTooltip: true
1175
+ },
1176
+ {
1177
+ value: "end",
1178
+ label: (0, import_i18n14.__)("End", "elementor"),
1179
+ renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: EndIcon3, size, ...iconProps3 }),
1180
+ showTooltip: true
1181
+ },
1182
+ {
1183
+ value: "space-between",
1184
+ label: (0, import_i18n14.__)("Space between", "elementor"),
1185
+ renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: import_icons11.JustifySpaceBetweenVerticalIcon, size, ...iconProps3 }),
1186
+ showTooltip: true
1187
+ },
1188
+ {
1189
+ value: "space-around",
1190
+ label: (0, import_i18n14.__)("Space around", "elementor"),
1191
+ renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: import_icons11.JustifySpaceAroundVerticalIcon, size, ...iconProps3 }),
1192
+ showTooltip: true
1193
+ },
1194
+ {
1195
+ value: "space-evenly",
1196
+ label: (0, import_i18n14.__)("Space evenly", "elementor"),
1197
+ renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: import_icons11.JustifyDistributeVerticalIcon, size, ...iconProps3 }),
1198
+ showTooltip: true
1199
+ }
1200
+ ];
1201
+ var JustifyContentField = () => {
1202
+ const { isSiteRtl } = useDirection();
1203
+ return /* @__PURE__ */ React32.createElement(import_ui25.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React32.createElement(import_ui25.ThemeProvider, null, /* @__PURE__ */ React32.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React32.createElement(import_ui25.Stack, { gap: 1 }, /* @__PURE__ */ React32.createElement(import_editor_controls20.ControlLabel, null, (0, import_i18n14.__)("Justify content", "elementor")), /* @__PURE__ */ React32.createElement(import_editor_controls20.ToggleControl, { options: options4, fullWidth: true })))));
1204
+ };
1205
+
1206
+ // src/components/style-sections/layout-section/wrap-field.tsx
1207
+ var React33 = __toESM(require("react"));
1208
+ var import_editor_controls21 = require("@elementor/editor-controls");
1209
+ var import_icons12 = require("@elementor/icons");
1210
+ var import_ui26 = require("@elementor/ui");
1211
+ var import_i18n15 = require("@wordpress/i18n");
1212
+ var options5 = [
1213
+ {
1214
+ value: "nowrap",
1215
+ label: (0, import_i18n15.__)("No wrap", "elementor"),
1216
+ renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(import_icons12.ArrowRightIcon, { fontSize: size }),
1217
+ showTooltip: true
1218
+ },
1219
+ {
1220
+ value: "wrap",
1221
+ label: (0, import_i18n15.__)("Wrap", "elementor"),
1222
+ renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(import_icons12.ArrowBackIcon, { fontSize: size }),
1223
+ showTooltip: true
1224
+ },
1225
+ {
1226
+ value: "wrap-reverse",
1227
+ label: (0, import_i18n15.__)("Reversed wrap", "elementor"),
1228
+ renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(import_icons12.ArrowForwardIcon, { fontSize: size }),
1229
+ showTooltip: true
1230
+ }
1231
+ ];
1232
+ var WrapField = () => {
1233
+ const { isSiteRtl } = useDirection();
1234
+ return /* @__PURE__ */ React33.createElement(import_ui26.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React33.createElement(import_ui26.ThemeProvider, null, /* @__PURE__ */ React33.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React33.createElement(import_ui26.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React33.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(import_editor_controls21.ControlLabel, null, (0, import_i18n15.__)("Wrap", "elementor"))), /* @__PURE__ */ React33.createElement(import_ui26.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React33.createElement(import_editor_controls21.ToggleControl, { options: options5 }))))));
857
1235
  };
858
1236
 
859
1237
  // src/components/style-sections/layout-section/layout-section.tsx
860
1238
  var LayoutSection = () => {
861
1239
  const [display] = useStylesField("display");
862
- return /* @__PURE__ */ React27.createElement(import_ui20.Stack, { gap: 2 }, /* @__PURE__ */ React27.createElement(DisplayField, null), "flex" === display && /* @__PURE__ */ React27.createElement(JustifyContentField, null));
1240
+ return /* @__PURE__ */ React34.createElement(import_ui27.Stack, { gap: 2 }, /* @__PURE__ */ React34.createElement(DisplayField, null), "flex" === display?.value && /* @__PURE__ */ React34.createElement(FlexFields, null));
863
1241
  };
1242
+ var FlexFields = () => /* @__PURE__ */ React34.createElement(React34.Fragment, null, /* @__PURE__ */ React34.createElement(FlexDirectionField, null), /* @__PURE__ */ React34.createElement(JustifyContentField, null), /* @__PURE__ */ React34.createElement(AlignItemsField, null), /* @__PURE__ */ React34.createElement(import_ui27.Divider, null), /* @__PURE__ */ React34.createElement(WrapField, null), /* @__PURE__ */ React34.createElement(import_ui27.Divider, null), /* @__PURE__ */ React34.createElement(import_editor_controls22.ControlLabel, null, (0, import_i18n16.__)("Flex child", "elementor")), /* @__PURE__ */ React34.createElement(AlignSelfChild, null), /* @__PURE__ */ React34.createElement(FlexOrderField, null), /* @__PURE__ */ React34.createElement(FlexSizeField, null));
864
1243
 
865
1244
  // src/components/style-sections/position-section/position-section.tsx
866
- var React31 = __toESM(require("react"));
867
- var import_react9 = require("react");
868
- var import_ui24 = require("@elementor/ui");
1245
+ var React38 = __toESM(require("react"));
1246
+ var import_react11 = require("react");
1247
+ var import_ui31 = require("@elementor/ui");
869
1248
 
870
1249
  // src/hooks/use-style-prop-history.ts
871
- var import_react8 = require("react");
1250
+ var import_react10 = require("react");
872
1251
  var import_editor_elements4 = require("@elementor/editor-elements");
873
1252
 
874
1253
  // src/hooks/use-prop-value-history.ts
875
- var import_react7 = require("react");
1254
+ var import_react9 = require("react");
876
1255
  var import_utils2 = require("@elementor/utils");
877
1256
  var PROPS_VALUES_HISTORY_PREFIX = "elementor/editor-editing-panel/prop-value-history";
878
1257
  var usePropValueHistory = () => {
879
1258
  const { element } = useElement();
880
1259
  const elementKey = `${PROPS_VALUES_HISTORY_PREFIX}/${element.id}`;
881
- const getElementPropsHistory = (0, import_react7.useCallback)(() => {
1260
+ const getElementPropsHistory = (0, import_react9.useCallback)(() => {
882
1261
  return (0, import_utils2.getSessionStorageItem)(elementKey);
883
1262
  }, [elementKey]);
884
- const getPropValue = (0, import_react7.useCallback)(
1263
+ const getPropValue = (0, import_react9.useCallback)(
885
1264
  (propKey) => {
886
1265
  const elementPropValues = getElementPropsHistory();
887
1266
  return elementPropValues?.[propKey] ?? null;
888
1267
  },
889
1268
  [getElementPropsHistory]
890
1269
  );
891
- const setPropValue = (0, import_react7.useCallback)(
1270
+ const setPropValue = (0, import_react9.useCallback)(
892
1271
  (propKey, propValue) => {
893
1272
  const elementPropValues = getElementPropsHistory();
894
1273
  const updatedElementPropValues = { ...elementPropValues, [propKey]: propValue };
@@ -896,7 +1275,7 @@ var usePropValueHistory = () => {
896
1275
  },
897
1276
  [getElementPropsHistory, elementKey]
898
1277
  );
899
- const removeProp = (0, import_react7.useCallback)(
1278
+ const removeProp = (0, import_react9.useCallback)(
900
1279
  (propKey) => {
901
1280
  const elementPropValues = getElementPropsHistory();
902
1281
  const updatedElementPropValues = Object.fromEntries(
@@ -906,7 +1285,7 @@ var usePropValueHistory = () => {
906
1285
  },
907
1286
  [getElementPropsHistory, elementKey]
908
1287
  );
909
- return (0, import_react7.useMemo)(() => ({ getPropValue, setPropValue, removeProp }), [getPropValue, removeProp, setPropValue]);
1288
+ return (0, import_react9.useMemo)(() => ({ getPropValue, setPropValue, removeProp }), [getPropValue, removeProp, setPropValue]);
910
1289
  };
911
1290
 
912
1291
  // src/hooks/use-style-prop-history.ts
@@ -917,7 +1296,7 @@ var useStylePropsHistory = (props) => {
917
1296
  const styleDef = (0, import_editor_elements4.getElementStyles)(element.id)?.[styleDefID];
918
1297
  const styleVariant = styleDef ? (0, import_editor_elements4.getVariantByMeta)(styleDef, meta) : null;
919
1298
  const styleVariantPath = `${styleDefID}-${styleVariant?.meta.breakpoint}-${styleVariant?.meta.state}`;
920
- const saveStylePropsHistory = (0, import_react8.useCallback)(() => {
1299
+ const saveStylePropsHistory = (0, import_react10.useCallback)(() => {
921
1300
  props.forEach((propKey) => {
922
1301
  const propValue = styleVariant?.props[propKey];
923
1302
  if (propValue) {
@@ -926,7 +1305,7 @@ var useStylePropsHistory = (props) => {
926
1305
  }
927
1306
  });
928
1307
  }, [props, setPropValue, styleVariant?.props, styleVariantPath]);
929
- const updateStylePropsFromHistory = (0, import_react8.useCallback)(() => {
1308
+ const updateStylePropsFromHistory = (0, import_react10.useCallback)(() => {
930
1309
  const propValuesFromHistory = props.reduce((allProps, currentPropKey) => {
931
1310
  const propPath = `${styleVariantPath}-${currentPropKey}`;
932
1311
  const propHistory = getPropValue(propPath);
@@ -946,7 +1325,7 @@ var useStylePropsHistory = (props) => {
946
1325
  });
947
1326
  }
948
1327
  }, [element.id, getPropValue, meta, props, removeProp, styleDefID, styleVariantPath]);
949
- const clearCurrentStyleProps = (0, import_react8.useCallback)(() => {
1328
+ const clearCurrentStyleProps = (0, import_react10.useCallback)(() => {
950
1329
  const resetValues = props.reduce(
951
1330
  (allProps, currentPropKey) => ({
952
1331
  ...allProps,
@@ -962,53 +1341,53 @@ var useStylePropsHistory = (props) => {
962
1341
  bind: "classes"
963
1342
  });
964
1343
  }, [element.id, meta, props, styleDefID]);
965
- return (0, import_react8.useMemo)(
1344
+ return (0, import_react10.useMemo)(
966
1345
  () => ({ saveStylePropsHistory, updateStylePropsFromHistory, clearCurrentStyleProps }),
967
1346
  [saveStylePropsHistory, updateStylePropsFromHistory, clearCurrentStyleProps]
968
1347
  );
969
1348
  };
970
1349
 
971
1350
  // src/components/style-sections/position-section/dimensions-field.tsx
972
- var React28 = __toESM(require("react"));
973
- var import_editor_controls16 = require("@elementor/editor-controls");
974
- var import_icons7 = require("@elementor/icons");
975
- var import_ui21 = require("@elementor/ui");
976
- var import_i18n10 = require("@wordpress/i18n");
1351
+ var React35 = __toESM(require("react"));
1352
+ var import_editor_controls23 = require("@elementor/editor-controls");
1353
+ var import_icons13 = require("@elementor/icons");
1354
+ var import_ui28 = require("@elementor/ui");
1355
+ var import_i18n17 = require("@wordpress/i18n");
977
1356
  var sideIcons = {
978
- left: /* @__PURE__ */ React28.createElement(import_icons7.SideLeftIcon, { fontSize: "tiny" }),
979
- right: /* @__PURE__ */ React28.createElement(import_icons7.SideRightIcon, { fontSize: "tiny" }),
980
- top: /* @__PURE__ */ React28.createElement(import_icons7.SideTopIcon, { fontSize: "tiny" }),
981
- bottom: /* @__PURE__ */ React28.createElement(import_icons7.SideBottomIcon, { fontSize: "tiny" })
1357
+ left: /* @__PURE__ */ React35.createElement(import_icons13.SideLeftIcon, { fontSize: "tiny" }),
1358
+ right: /* @__PURE__ */ React35.createElement(import_icons13.SideRightIcon, { fontSize: "tiny" }),
1359
+ top: /* @__PURE__ */ React35.createElement(import_icons13.SideTopIcon, { fontSize: "tiny" }),
1360
+ bottom: /* @__PURE__ */ React35.createElement(import_icons13.SideBottomIcon, { fontSize: "tiny" })
982
1361
  };
983
1362
  var DimensionsField = () => {
984
- return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(import_ui21.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React28.createElement(DimensionField, { side: "top", label: (0, import_i18n10.__)("Top", "elementor") }), /* @__PURE__ */ React28.createElement(DimensionField, { side: "right", label: (0, import_i18n10.__)("Right", "elementor") })), /* @__PURE__ */ React28.createElement(import_ui21.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React28.createElement(DimensionField, { side: "bottom", label: (0, import_i18n10.__)("Bottom", "elementor") }), /* @__PURE__ */ React28.createElement(DimensionField, { side: "left", label: (0, import_i18n10.__)("Left", "elementor") })));
1363
+ return /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement(import_ui28.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React35.createElement(DimensionField, { side: "top", label: (0, import_i18n17.__)("Top", "elementor") }), /* @__PURE__ */ React35.createElement(DimensionField, { side: "right", label: (0, import_i18n17.__)("Right", "elementor") })), /* @__PURE__ */ React35.createElement(import_ui28.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React35.createElement(DimensionField, { side: "bottom", label: (0, import_i18n17.__)("Bottom", "elementor") }), /* @__PURE__ */ React35.createElement(DimensionField, { side: "left", label: (0, import_i18n17.__)("Left", "elementor") })));
985
1364
  };
986
1365
  var DimensionField = ({ side, label }) => {
987
- return /* @__PURE__ */ React28.createElement(import_ui21.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React28.createElement(import_ui21.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React28.createElement(import_editor_controls16.ControlLabel, null, label)), /* @__PURE__ */ React28.createElement(import_ui21.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React28.createElement(StylesField, { bind: side }, /* @__PURE__ */ React28.createElement(import_editor_controls16.SizeControl, { startIcon: sideIcons[side] }))));
1366
+ return /* @__PURE__ */ React35.createElement(import_ui28.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React35.createElement(import_ui28.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React35.createElement(import_editor_controls23.ControlLabel, null, label)), /* @__PURE__ */ React35.createElement(import_ui28.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React35.createElement(StylesField, { bind: side }, /* @__PURE__ */ React35.createElement(import_editor_controls23.SizeControl, { startIcon: sideIcons[side] }))));
988
1367
  };
989
1368
 
990
1369
  // src/components/style-sections/position-section/position-field.tsx
991
- var React29 = __toESM(require("react"));
992
- var import_editor_controls17 = require("@elementor/editor-controls");
993
- var import_ui22 = require("@elementor/ui");
994
- var import_i18n11 = require("@wordpress/i18n");
1370
+ var React36 = __toESM(require("react"));
1371
+ var import_editor_controls24 = require("@elementor/editor-controls");
1372
+ var import_ui29 = require("@elementor/ui");
1373
+ var import_i18n18 = require("@wordpress/i18n");
995
1374
  var positionOptions = [
996
- { label: (0, import_i18n11.__)("Static", "elementor"), value: "static" },
997
- { label: (0, import_i18n11.__)("Relative", "elementor"), value: "relative" },
998
- { label: (0, import_i18n11.__)("Absolute", "elementor"), value: "absolute" },
999
- { label: (0, import_i18n11.__)("Fixed", "elementor"), value: "fixed" }
1375
+ { label: (0, import_i18n18.__)("Static", "elementor"), value: "static" },
1376
+ { label: (0, import_i18n18.__)("Relative", "elementor"), value: "relative" },
1377
+ { label: (0, import_i18n18.__)("Absolute", "elementor"), value: "absolute" },
1378
+ { label: (0, import_i18n18.__)("Fixed", "elementor"), value: "fixed" }
1000
1379
  ];
1001
1380
  var PositionField = () => {
1002
- return /* @__PURE__ */ React29.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React29.createElement(import_ui22.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React29.createElement(import_ui22.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React29.createElement(import_editor_controls17.ControlLabel, null, (0, import_i18n11.__)("Position", "elementor"))), /* @__PURE__ */ React29.createElement(import_ui22.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React29.createElement(import_editor_controls17.SelectControl, { options: positionOptions }))));
1381
+ return /* @__PURE__ */ React36.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React36.createElement(import_ui29.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(import_editor_controls24.ControlLabel, null, (0, import_i18n18.__)("Position", "elementor"))), /* @__PURE__ */ React36.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(import_editor_controls24.SelectControl, { options: positionOptions }))));
1003
1382
  };
1004
1383
 
1005
1384
  // src/components/style-sections/position-section/z-index-field.tsx
1006
- var React30 = __toESM(require("react"));
1007
- var import_editor_controls18 = require("@elementor/editor-controls");
1008
- var import_ui23 = require("@elementor/ui");
1009
- var import_i18n12 = require("@wordpress/i18n");
1385
+ var React37 = __toESM(require("react"));
1386
+ var import_editor_controls25 = require("@elementor/editor-controls");
1387
+ var import_ui30 = require("@elementor/ui");
1388
+ var import_i18n19 = require("@wordpress/i18n");
1010
1389
  var ZIndexField = () => {
1011
- return /* @__PURE__ */ React30.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React30.createElement(import_ui23.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React30.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(import_editor_controls18.ControlLabel, null, (0, import_i18n12.__)("Z-Index", "elementor"))), /* @__PURE__ */ React30.createElement(import_ui23.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(import_editor_controls18.NumberControl, null))));
1390
+ return /* @__PURE__ */ React37.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React37.createElement(import_ui30.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(import_editor_controls25.ControlLabel, null, (0, import_i18n19.__)("Z-Index", "elementor"))), /* @__PURE__ */ React37.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(import_editor_controls25.NumberControl, null))));
1012
1391
  };
1013
1392
 
1014
1393
  // src/components/style-sections/position-section/position-section.tsx
@@ -1016,12 +1395,12 @@ var dimensionsPropKeys = ["top", "bottom", "left", "right"];
1016
1395
  var PositionSection = () => {
1017
1396
  const [positionValue] = useStylesField("position");
1018
1397
  usePositionChangeHandler();
1019
- const isNotStatic = positionValue && positionValue !== "static";
1020
- return /* @__PURE__ */ React31.createElement(import_ui24.Stack, { gap: 1.5 }, /* @__PURE__ */ React31.createElement(PositionField, null), isNotStatic ? /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(DimensionsField, null), /* @__PURE__ */ React31.createElement(ZIndexField, null)) : null);
1398
+ const isNotStatic = positionValue && positionValue?.value !== "static";
1399
+ return /* @__PURE__ */ React38.createElement(import_ui31.Stack, { gap: 1.5 }, /* @__PURE__ */ React38.createElement(PositionField, null), isNotStatic ? /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement(DimensionsField, null), /* @__PURE__ */ React38.createElement(ZIndexField, null)) : null);
1021
1400
  };
1022
1401
  var usePositionChangeHandler = () => {
1023
1402
  const dimensionsHistory = useStylePropsHistory(dimensionsPropKeys);
1024
- const onPositionChange = (0, import_react9.useCallback)(
1403
+ const onPositionChange = (0, import_react11.useCallback)(
1025
1404
  (newPositionValue, previousPosition) => {
1026
1405
  if (!dimensionsHistory) {
1027
1406
  return;
@@ -1042,91 +1421,91 @@ var usePositionChangeHandler = () => {
1042
1421
  };
1043
1422
 
1044
1423
  // src/components/style-sections/size-section/size-section.tsx
1045
- var React33 = __toESM(require("react"));
1046
- var import_editor_controls20 = require("@elementor/editor-controls");
1047
- var import_ui26 = require("@elementor/ui");
1048
- var import_i18n14 = require("@wordpress/i18n");
1424
+ var React40 = __toESM(require("react"));
1425
+ var import_editor_controls27 = require("@elementor/editor-controls");
1426
+ var import_ui33 = require("@elementor/ui");
1427
+ var import_i18n21 = require("@wordpress/i18n");
1049
1428
 
1050
1429
  // src/components/style-sections/size-section/overflow-field.tsx
1051
- var React32 = __toESM(require("react"));
1052
- var import_editor_controls19 = require("@elementor/editor-controls");
1053
- var import_icons8 = require("@elementor/icons");
1054
- var import_ui25 = require("@elementor/ui");
1055
- var import_i18n13 = require("@wordpress/i18n");
1056
- var options = [
1430
+ var React39 = __toESM(require("react"));
1431
+ var import_editor_controls26 = require("@elementor/editor-controls");
1432
+ var import_icons14 = require("@elementor/icons");
1433
+ var import_ui32 = require("@elementor/ui");
1434
+ var import_i18n20 = require("@wordpress/i18n");
1435
+ var options6 = [
1057
1436
  {
1058
1437
  value: "visible",
1059
- label: (0, import_i18n13.__)("Visible", "elementor"),
1060
- renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(import_icons8.EyeIcon, { fontSize: size }),
1438
+ label: (0, import_i18n20.__)("Visible", "elementor"),
1439
+ renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(import_icons14.EyeIcon, { fontSize: size }),
1061
1440
  showTooltip: true
1062
1441
  },
1063
1442
  {
1064
1443
  value: "hidden",
1065
- label: (0, import_i18n13.__)("Hidden", "elementor"),
1066
- renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(import_icons8.EyeOffIcon, { fontSize: size }),
1444
+ label: (0, import_i18n20.__)("Hidden", "elementor"),
1445
+ renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(import_icons14.EyeOffIcon, { fontSize: size }),
1067
1446
  showTooltip: true
1068
1447
  },
1069
1448
  {
1070
1449
  value: "auto",
1071
- label: (0, import_i18n13.__)("Auto", "elementor"),
1072
- renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(import_icons8.ExpandBottomIcon, { fontSize: size }),
1450
+ label: (0, import_i18n20.__)("Auto", "elementor"),
1451
+ renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(import_icons14.ExpandBottomIcon, { fontSize: size }),
1073
1452
  showTooltip: true
1074
1453
  }
1075
1454
  ];
1076
1455
  var OverflowField = () => {
1077
- return /* @__PURE__ */ React32.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React32.createElement(import_ui25.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(import_ui25.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(import_editor_controls19.ControlLabel, null, (0, import_i18n13.__)("Overflow", "elementor"))), /* @__PURE__ */ React32.createElement(import_ui25.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React32.createElement(import_editor_controls19.ToggleControl, { options }))));
1456
+ return /* @__PURE__ */ React39.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React39.createElement(import_ui32.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(import_editor_controls26.ControlLabel, null, (0, import_i18n20.__)("Overflow", "elementor"))), /* @__PURE__ */ React39.createElement(import_ui32.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React39.createElement(import_editor_controls26.ToggleControl, { options: options6 }))));
1078
1457
  };
1079
1458
 
1080
1459
  // src/components/style-sections/size-section/size-section.tsx
1081
1460
  var SizeSection = () => {
1082
- return /* @__PURE__ */ React33.createElement(import_ui26.Stack, { gap: 1.5 }, /* @__PURE__ */ React33.createElement(import_ui26.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React33.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(SizeField, { bind: "width", label: (0, import_i18n14.__)("Width", "elementor") })), /* @__PURE__ */ React33.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(SizeField, { bind: "height", label: (0, import_i18n14.__)("Height", "elementor") }))), /* @__PURE__ */ React33.createElement(import_ui26.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React33.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(SizeField, { bind: "min-width", label: (0, import_i18n14.__)("Min. Width", "elementor") })), /* @__PURE__ */ React33.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(SizeField, { bind: "min-height", label: (0, import_i18n14.__)("Min. Height", "elementor") }))), /* @__PURE__ */ React33.createElement(import_ui26.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React33.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(SizeField, { bind: "max-width", label: (0, import_i18n14.__)("Max. Width", "elementor") })), /* @__PURE__ */ React33.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React33.createElement(SizeField, { bind: "max-height", label: (0, import_i18n14.__)("Max. Height", "elementor") }))), /* @__PURE__ */ React33.createElement(import_ui26.Divider, null), /* @__PURE__ */ React33.createElement(import_ui26.Stack, null, /* @__PURE__ */ React33.createElement(OverflowField, null)));
1461
+ return /* @__PURE__ */ React40.createElement(import_ui33.Stack, { gap: 1.5 }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(SizeField, { bind: "width", label: (0, import_i18n21.__)("Width", "elementor") })), /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(SizeField, { bind: "height", label: (0, import_i18n21.__)("Height", "elementor") }))), /* @__PURE__ */ React40.createElement(import_ui33.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(SizeField, { bind: "min-width", label: (0, import_i18n21.__)("Min. Width", "elementor") })), /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(SizeField, { bind: "min-height", label: (0, import_i18n21.__)("Min. Height", "elementor") }))), /* @__PURE__ */ React40.createElement(import_ui33.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(SizeField, { bind: "max-width", label: (0, import_i18n21.__)("Max. Width", "elementor") })), /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(SizeField, { bind: "max-height", label: (0, import_i18n21.__)("Max. Height", "elementor") }))), /* @__PURE__ */ React40.createElement(import_ui33.Divider, null), /* @__PURE__ */ React40.createElement(import_ui33.Stack, null, /* @__PURE__ */ React40.createElement(OverflowField, null)));
1083
1462
  };
1084
1463
  var SizeField = ({ label, bind }) => {
1085
- return /* @__PURE__ */ React33.createElement(StylesField, { bind }, /* @__PURE__ */ React33.createElement(import_ui26.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React33.createElement(import_ui26.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React33.createElement(import_editor_controls20.ControlLabel, null, label)), /* @__PURE__ */ React33.createElement(import_ui26.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React33.createElement(import_editor_controls20.SizeControl, null))));
1464
+ return /* @__PURE__ */ React40.createElement(StylesField, { bind }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React40.createElement(import_editor_controls27.ControlLabel, null, label)), /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React40.createElement(import_editor_controls27.SizeControl, null))));
1086
1465
  };
1087
1466
 
1088
1467
  // src/components/style-sections/spacing-section/spacing-section.tsx
1089
- var React34 = __toESM(require("react"));
1090
- var import_editor_controls21 = require("@elementor/editor-controls");
1091
- var import_ui27 = require("@elementor/ui");
1092
- var import_i18n15 = require("@wordpress/i18n");
1468
+ var React41 = __toESM(require("react"));
1469
+ var import_editor_controls28 = require("@elementor/editor-controls");
1470
+ var import_ui34 = require("@elementor/ui");
1471
+ var import_i18n22 = require("@wordpress/i18n");
1093
1472
  var SpacingSection = () => {
1094
- return /* @__PURE__ */ React34.createElement(import_ui27.Stack, { gap: 1.5 }, /* @__PURE__ */ React34.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React34.createElement(import_editor_controls21.LinkedDimensionsControl, { label: (0, import_i18n15.__)("Padding", "elementor") })), /* @__PURE__ */ React34.createElement(import_ui27.Divider, null), /* @__PURE__ */ React34.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React34.createElement(import_editor_controls21.LinkedDimensionsControl, { label: (0, import_i18n15.__)("Margin", "elementor") })));
1473
+ return /* @__PURE__ */ React41.createElement(import_ui34.Stack, { gap: 1.5 }, /* @__PURE__ */ React41.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React41.createElement(import_editor_controls28.LinkedDimensionsControl, { label: (0, import_i18n22.__)("Padding", "elementor") })), /* @__PURE__ */ React41.createElement(import_ui34.Divider, null), /* @__PURE__ */ React41.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React41.createElement(import_editor_controls28.LinkedDimensionsControl, { label: (0, import_i18n22.__)("Margin", "elementor") })));
1095
1474
  };
1096
1475
 
1097
1476
  // src/components/style-sections/typography-section/typography-section.tsx
1098
- var React48 = __toESM(require("react"));
1099
- var import_ui40 = require("@elementor/ui");
1477
+ var React55 = __toESM(require("react"));
1478
+ var import_ui47 = require("@elementor/ui");
1100
1479
 
1101
1480
  // src/components/collapsible-content.tsx
1102
- var React35 = __toESM(require("react"));
1103
- var import_react10 = require("react");
1104
- var import_ui28 = require("@elementor/ui");
1105
- var import_i18n16 = require("@wordpress/i18n");
1481
+ var React42 = __toESM(require("react"));
1482
+ var import_react12 = require("react");
1483
+ var import_ui35 = require("@elementor/ui");
1484
+ var import_i18n23 = require("@wordpress/i18n");
1106
1485
  var CollapsibleContent = ({ children, defaultOpen = false }) => {
1107
- const [open, setOpen] = (0, import_react10.useState)(defaultOpen);
1486
+ const [open, setOpen] = (0, import_react12.useState)(defaultOpen);
1108
1487
  const handleToggle = () => {
1109
1488
  setOpen((prevOpen) => !prevOpen);
1110
1489
  };
1111
- return /* @__PURE__ */ React35.createElement(import_ui28.Stack, { sx: { py: 0.5 } }, /* @__PURE__ */ React35.createElement(
1112
- import_ui28.Button,
1490
+ return /* @__PURE__ */ React42.createElement(import_ui35.Stack, { sx: { py: 0.5 } }, /* @__PURE__ */ React42.createElement(
1491
+ import_ui35.Button,
1113
1492
  {
1114
1493
  fullWidth: true,
1115
1494
  size: "small",
1116
1495
  color: "secondary",
1117
1496
  variant: "outlined",
1118
1497
  onClick: handleToggle,
1119
- endIcon: /* @__PURE__ */ React35.createElement(CollapseIcon, { open })
1498
+ endIcon: /* @__PURE__ */ React42.createElement(CollapseIcon, { open })
1120
1499
  },
1121
- open ? (0, import_i18n16.__)("Show less", "elementor") : (0, import_i18n16.__)("Show more", "elementor")
1122
- ), /* @__PURE__ */ React35.createElement(import_ui28.Collapse, { in: open, timeout: "auto", unmountOnExit: true }, children));
1500
+ open ? (0, import_i18n23.__)("Show less", "elementor") : (0, import_i18n23.__)("Show more", "elementor")
1501
+ ), /* @__PURE__ */ React42.createElement(import_ui35.Collapse, { in: open, timeout: "auto", unmountOnExit: true }, children));
1123
1502
  };
1124
1503
 
1125
1504
  // src/components/style-sections/typography-section/font-family-field.tsx
1126
- var React36 = __toESM(require("react"));
1127
- var import_editor_controls22 = require("@elementor/editor-controls");
1128
- var import_ui29 = require("@elementor/ui");
1129
- var import_i18n17 = require("@wordpress/i18n");
1505
+ var React43 = __toESM(require("react"));
1506
+ var import_editor_controls29 = require("@elementor/editor-controls");
1507
+ var import_ui36 = require("@elementor/ui");
1508
+ var import_i18n24 = require("@wordpress/i18n");
1130
1509
 
1131
1510
  // src/sync/get-elementor-config.ts
1132
1511
  var getElementorConfig = () => {
@@ -1140,184 +1519,220 @@ var FontFamilyField = () => {
1140
1519
  if (!fontFamilies) {
1141
1520
  return null;
1142
1521
  }
1143
- return /* @__PURE__ */ React36.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React36.createElement(import_ui29.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(import_editor_controls22.ControlLabel, null, (0, import_i18n17.__)("Font Family", "elementor"))), /* @__PURE__ */ React36.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(import_editor_controls22.FontFamilyControl, { fontFamilies }))));
1522
+ return /* @__PURE__ */ React43.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React43.createElement(import_ui36.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React43.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(import_editor_controls29.ControlLabel, null, (0, import_i18n24.__)("Font Family", "elementor"))), /* @__PURE__ */ React43.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(import_editor_controls29.FontFamilyControl, { fontFamilies }))));
1144
1523
  };
1145
1524
  var getFontFamilies = () => {
1146
1525
  const { controls } = getElementorConfig();
1147
- const options5 = controls?.font?.options;
1148
- if (!options5) {
1526
+ const options10 = controls?.font?.options;
1527
+ if (!options10) {
1149
1528
  return null;
1150
1529
  }
1151
- return options5;
1530
+ return options10;
1152
1531
  };
1153
1532
 
1154
1533
  // src/components/style-sections/typography-section/font-size-field.tsx
1155
- var React37 = __toESM(require("react"));
1156
- var import_editor_controls23 = require("@elementor/editor-controls");
1157
- var import_ui30 = require("@elementor/ui");
1158
- var import_i18n18 = require("@wordpress/i18n");
1534
+ var React44 = __toESM(require("react"));
1535
+ var import_editor_controls30 = require("@elementor/editor-controls");
1536
+ var import_ui37 = require("@elementor/ui");
1537
+ var import_i18n25 = require("@wordpress/i18n");
1159
1538
  var FontSizeField = () => {
1160
- return /* @__PURE__ */ React37.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React37.createElement(import_ui30.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(import_editor_controls23.ControlLabel, null, (0, import_i18n18.__)("Font Size", "elementor"))), /* @__PURE__ */ React37.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(import_editor_controls23.SizeControl, null))));
1539
+ return /* @__PURE__ */ React44.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React44.createElement(import_ui37.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(import_editor_controls30.ControlLabel, null, (0, import_i18n25.__)("Font Size", "elementor"))), /* @__PURE__ */ React44.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(import_editor_controls30.SizeControl, null))));
1161
1540
  };
1162
1541
 
1163
1542
  // src/components/style-sections/typography-section/font-weight-field.tsx
1164
- var React38 = __toESM(require("react"));
1165
- var import_editor_controls24 = require("@elementor/editor-controls");
1166
- var import_ui31 = require("@elementor/ui");
1167
- var import_i18n19 = require("@wordpress/i18n");
1543
+ var React45 = __toESM(require("react"));
1544
+ var import_editor_controls31 = require("@elementor/editor-controls");
1545
+ var import_ui38 = require("@elementor/ui");
1546
+ var import_i18n26 = require("@wordpress/i18n");
1168
1547
  var fontWeightOptions = [
1169
- { label: (0, import_i18n19.__)("Light - 400", "elementor"), value: "400" },
1170
- { label: (0, import_i18n19.__)("Regular - 500", "elementor"), value: "500" },
1171
- { label: (0, import_i18n19.__)("Semi Bold - 600", "elementor"), value: "600" },
1172
- { label: (0, import_i18n19.__)("Bold - 700", "elementor"), value: "700" },
1173
- { label: (0, import_i18n19.__)("Black - 900", "elementor"), value: "900" }
1548
+ { label: (0, import_i18n26.__)("Light - 400", "elementor"), value: "400" },
1549
+ { label: (0, import_i18n26.__)("Regular - 500", "elementor"), value: "500" },
1550
+ { label: (0, import_i18n26.__)("Semi Bold - 600", "elementor"), value: "600" },
1551
+ { label: (0, import_i18n26.__)("Bold - 700", "elementor"), value: "700" },
1552
+ { label: (0, import_i18n26.__)("Black - 900", "elementor"), value: "900" }
1174
1553
  ];
1175
1554
  var FontWeightField = () => {
1176
- return /* @__PURE__ */ React38.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React38.createElement(import_ui31.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(import_editor_controls24.ControlLabel, null, (0, import_i18n19.__)("Font Weight", "elementor"))), /* @__PURE__ */ React38.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(import_editor_controls24.SelectControl, { options: fontWeightOptions }))));
1555
+ return /* @__PURE__ */ React45.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React45.createElement(import_ui38.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(import_editor_controls31.ControlLabel, null, (0, import_i18n26.__)("Font Weight", "elementor"))), /* @__PURE__ */ React45.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(import_editor_controls31.SelectControl, { options: fontWeightOptions }))));
1177
1556
  };
1178
1557
 
1179
1558
  // src/components/style-sections/typography-section/letter-spacing-field.tsx
1180
- var React39 = __toESM(require("react"));
1181
- var import_editor_controls25 = require("@elementor/editor-controls");
1182
- var import_ui32 = require("@elementor/ui");
1183
- var import_i18n20 = require("@wordpress/i18n");
1559
+ var React46 = __toESM(require("react"));
1560
+ var import_editor_controls32 = require("@elementor/editor-controls");
1561
+ var import_ui39 = require("@elementor/ui");
1562
+ var import_i18n27 = require("@wordpress/i18n");
1184
1563
  var LetterSpacingField = () => {
1185
- return /* @__PURE__ */ React39.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React39.createElement(import_ui32.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(import_editor_controls25.ControlLabel, null, (0, import_i18n20.__)("Letter Spacing", "elementor"))), /* @__PURE__ */ React39.createElement(import_ui32.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(import_editor_controls25.SizeControl, null))));
1564
+ return /* @__PURE__ */ React46.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React46.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(import_editor_controls32.ControlLabel, null, (0, import_i18n27.__)("Letter Spacing", "elementor"))), /* @__PURE__ */ React46.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(import_editor_controls32.SizeControl, null))));
1565
+ };
1566
+
1567
+ // src/components/style-sections/typography-section/line-height-field.tsx
1568
+ var React47 = __toESM(require("react"));
1569
+ var import_editor_controls33 = require("@elementor/editor-controls");
1570
+ var import_ui40 = require("@elementor/ui");
1571
+ var import_i18n28 = require("@wordpress/i18n");
1572
+ var LineHeightField = () => {
1573
+ return /* @__PURE__ */ React47.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React47.createElement(import_ui40.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(import_editor_controls33.ControlLabel, null, (0, import_i18n28.__)("Line Height", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui40.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(import_editor_controls33.SizeControl, null))));
1186
1574
  };
1187
1575
 
1188
1576
  // src/components/style-sections/typography-section/text-alignment-field.tsx
1189
- var React40 = __toESM(require("react"));
1190
- var import_editor_controls26 = require("@elementor/editor-controls");
1191
- var import_icons9 = require("@elementor/icons");
1192
- var import_ui33 = require("@elementor/ui");
1193
- var import_i18n21 = require("@wordpress/i18n");
1194
- var options2 = [
1577
+ var React48 = __toESM(require("react"));
1578
+ var import_editor_controls34 = require("@elementor/editor-controls");
1579
+ var import_icons15 = require("@elementor/icons");
1580
+ var import_ui41 = require("@elementor/ui");
1581
+ var import_i18n29 = require("@wordpress/i18n");
1582
+ var options7 = [
1195
1583
  {
1196
1584
  value: "left",
1197
- label: (0, import_i18n21.__)("Left", "elementor"),
1198
- renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(import_icons9.AlignLeftIcon, { fontSize: size })
1585
+ label: (0, import_i18n29.__)("Left", "elementor"),
1586
+ renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons15.AlignLeftIcon, { fontSize: size })
1199
1587
  },
1200
1588
  {
1201
1589
  value: "center",
1202
- label: (0, import_i18n21.__)("Center", "elementor"),
1203
- renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(import_icons9.AlignCenterIcon, { fontSize: size })
1590
+ label: (0, import_i18n29.__)("Center", "elementor"),
1591
+ renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons15.AlignCenterIcon, { fontSize: size })
1204
1592
  },
1205
1593
  {
1206
1594
  value: "right",
1207
- label: (0, import_i18n21.__)("Right", "elementor"),
1208
- renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(import_icons9.AlignRightIcon, { fontSize: size })
1595
+ label: (0, import_i18n29.__)("Right", "elementor"),
1596
+ renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons15.AlignRightIcon, { fontSize: size })
1209
1597
  },
1210
1598
  {
1211
1599
  value: "justify",
1212
- label: (0, import_i18n21.__)("Justify", "elementor"),
1213
- renderContent: ({ size }) => /* @__PURE__ */ React40.createElement(import_icons9.AlignJustifiedIcon, { fontSize: size })
1600
+ label: (0, import_i18n29.__)("Justify", "elementor"),
1601
+ renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(import_icons15.AlignJustifiedIcon, { fontSize: size })
1214
1602
  }
1215
1603
  ];
1216
1604
  var TextAlignmentField = () => {
1217
- return /* @__PURE__ */ React40.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(import_editor_controls26.ControlLabel, null, (0, import_i18n21.__)("Alignment", "elementor"))), /* @__PURE__ */ React40.createElement(import_ui33.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React40.createElement(import_editor_controls26.ToggleControl, { options: options2 }))));
1605
+ return /* @__PURE__ */ React48.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React48.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(import_editor_controls34.ControlLabel, null, (0, import_i18n29.__)("Alignment", "elementor"))), /* @__PURE__ */ React48.createElement(import_ui41.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React48.createElement(import_editor_controls34.ToggleControl, { options: options7 }))));
1218
1606
  };
1219
1607
 
1220
1608
  // src/components/style-sections/typography-section/text-color-field.tsx
1221
- var React41 = __toESM(require("react"));
1222
- var import_editor_controls27 = require("@elementor/editor-controls");
1223
- var import_ui34 = require("@elementor/ui");
1224
- var import_i18n22 = require("@wordpress/i18n");
1609
+ var React49 = __toESM(require("react"));
1610
+ var import_editor_controls35 = require("@elementor/editor-controls");
1611
+ var import_ui42 = require("@elementor/ui");
1612
+ var import_i18n30 = require("@wordpress/i18n");
1225
1613
  var TextColorField = () => {
1226
- return /* @__PURE__ */ React41.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React41.createElement(import_ui34.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(import_ui34.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(import_editor_controls27.ControlLabel, null, (0, import_i18n22.__)("Text Color", "elementor"))), /* @__PURE__ */ React41.createElement(import_ui34.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(import_editor_controls27.ColorControl, null))));
1614
+ return /* @__PURE__ */ React49.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React49.createElement(import_ui42.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(import_editor_controls35.ControlLabel, null, (0, import_i18n30.__)("Text Color", "elementor"))), /* @__PURE__ */ React49.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(import_editor_controls35.ColorControl, null))));
1227
1615
  };
1228
1616
 
1229
1617
  // src/components/style-sections/typography-section/text-direction-field.tsx
1230
- var React42 = __toESM(require("react"));
1231
- var import_editor_controls28 = require("@elementor/editor-controls");
1232
- var import_icons10 = require("@elementor/icons");
1233
- var import_ui35 = require("@elementor/ui");
1234
- var import_i18n23 = require("@wordpress/i18n");
1235
- var options3 = [
1618
+ var React50 = __toESM(require("react"));
1619
+ var import_editor_controls36 = require("@elementor/editor-controls");
1620
+ var import_icons16 = require("@elementor/icons");
1621
+ var import_ui43 = require("@elementor/ui");
1622
+ var import_i18n31 = require("@wordpress/i18n");
1623
+ var options8 = [
1236
1624
  {
1237
1625
  value: "ltr",
1238
- label: (0, import_i18n23.__)("Left to Right", "elementor"),
1239
- renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(import_icons10.TextDirectionLtrIcon, { fontSize: size })
1626
+ label: (0, import_i18n31.__)("Left to Right", "elementor"),
1627
+ renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(import_icons16.TextDirectionLtrIcon, { fontSize: size })
1240
1628
  },
1241
1629
  {
1242
1630
  value: "rtl",
1243
- label: (0, import_i18n23.__)("Right to Left", "elementor"),
1244
- renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(import_icons10.TextDirectionRtlIcon, { fontSize: size })
1631
+ label: (0, import_i18n31.__)("Right to Left", "elementor"),
1632
+ renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(import_icons16.TextDirectionRtlIcon, { fontSize: size })
1245
1633
  }
1246
1634
  ];
1247
1635
  var TextDirectionField = () => {
1248
- return /* @__PURE__ */ React42.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React42.createElement(import_ui35.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(import_editor_controls28.ControlLabel, null, (0, import_i18n23.__)("Direction", "elementor"))), /* @__PURE__ */ React42.createElement(import_ui35.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React42.createElement(import_editor_controls28.ToggleControl, { options: options3 }))));
1636
+ return /* @__PURE__ */ React50.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React50.createElement(import_ui43.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(import_ui43.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(import_editor_controls36.ControlLabel, null, (0, import_i18n31.__)("Direction", "elementor"))), /* @__PURE__ */ React50.createElement(import_ui43.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React50.createElement(import_editor_controls36.ToggleControl, { options: options8 }))));
1249
1637
  };
1250
1638
 
1251
1639
  // src/components/style-sections/typography-section/text-stroke-field.tsx
1252
- var React44 = __toESM(require("react"));
1253
- var import_editor_controls29 = require("@elementor/editor-controls");
1254
- var import_i18n25 = require("@wordpress/i18n");
1255
-
1256
- // src/components/collapsible-field.tsx
1257
- var React43 = __toESM(require("react"));
1258
- var import_react11 = require("react");
1259
- var import_icons11 = require("@elementor/icons");
1260
- var import_ui36 = require("@elementor/ui");
1261
- var import_i18n24 = require("@wordpress/i18n");
1262
- var CollapsibleField = ({ label, children, defaultOpen = false }) => {
1263
- const [open, setOpen] = (0, import_react11.useState)(defaultOpen);
1264
- const handleToggle = () => {
1265
- setOpen((prevOpen) => !prevOpen);
1266
- };
1267
- return /* @__PURE__ */ React43.createElement(import_ui36.Stack, { gap: 1.5 }, /* @__PURE__ */ React43.createElement(import_ui36.Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", sx: { py: 0.5 } }, label, /* @__PURE__ */ React43.createElement(
1268
- import_ui36.IconButton,
1269
- {
1270
- onClick: handleToggle,
1271
- size: "tiny",
1272
- "aria-label": open ? (0, import_i18n24.__)("Close", "elementor") : (0, import_i18n24.__)("Expand", "elementor")
1640
+ var React51 = __toESM(require("react"));
1641
+ var import_editor_controls37 = require("@elementor/editor-controls");
1642
+ var import_i18n32 = require("@wordpress/i18n");
1643
+ var initTextStroke = {
1644
+ $$type: "stroke",
1645
+ value: {
1646
+ color: {
1647
+ $$type: "color",
1648
+ value: "#000000"
1273
1649
  },
1274
- open ? /* @__PURE__ */ React43.createElement(import_icons11.MinusIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React43.createElement(import_icons11.PlusIcon, { fontSize: "tiny" })
1275
- )), /* @__PURE__ */ React43.createElement(import_ui36.Collapse, { in: open, unmountOnExit: true }, children));
1650
+ width: {
1651
+ $$type: "size",
1652
+ value: {
1653
+ unit: "px",
1654
+ size: 1
1655
+ }
1656
+ }
1657
+ }
1276
1658
  };
1277
-
1278
- // src/components/style-sections/typography-section/text-stroke-field.tsx
1279
1659
  var TextStrokeField = () => {
1280
- return /* @__PURE__ */ React44.createElement(StylesField, { bind: "-webkit-text-stroke" }, /* @__PURE__ */ React44.createElement(CollapsibleField, { label: /* @__PURE__ */ React44.createElement(import_editor_controls29.ControlLabel, null, (0, import_i18n25.__)("Text Stroke", "elementor")) }, /* @__PURE__ */ React44.createElement(import_editor_controls29.StrokeControl, null)));
1660
+ const [textStroke, setTextStroke] = useStylesField("-webkit-text-stroke");
1661
+ const addTextStroke = () => {
1662
+ setTextStroke(initTextStroke);
1663
+ };
1664
+ const removeTextStroke = () => {
1665
+ setTextStroke(null);
1666
+ };
1667
+ const hasTextStroke = Boolean(textStroke);
1668
+ return /* @__PURE__ */ React51.createElement(
1669
+ AddOrRemoveContent,
1670
+ {
1671
+ label: (0, import_i18n32.__)("Text Stroke", "elementor"),
1672
+ isAdded: hasTextStroke,
1673
+ onAdd: addTextStroke,
1674
+ onRemove: removeTextStroke
1675
+ },
1676
+ /* @__PURE__ */ React51.createElement(StylesField, { bind: "-webkit-text-stroke" }, /* @__PURE__ */ React51.createElement(import_editor_controls37.StrokeControl, null))
1677
+ );
1281
1678
  };
1282
1679
 
1283
1680
  // src/components/style-sections/typography-section/text-style-field.tsx
1284
- var React45 = __toESM(require("react"));
1285
- var import_editor_controls30 = require("@elementor/editor-controls");
1286
- var import_icons12 = require("@elementor/icons");
1287
- var import_ui37 = require("@elementor/ui");
1288
- var import_i18n26 = require("@wordpress/i18n");
1681
+ var React52 = __toESM(require("react"));
1682
+ var import_editor_controls38 = require("@elementor/editor-controls");
1683
+ var import_icons17 = require("@elementor/icons");
1684
+ var import_ui44 = require("@elementor/ui");
1685
+ var import_i18n33 = require("@wordpress/i18n");
1289
1686
  var buttonSize = "tiny";
1290
1687
  var TextStyleField = () => {
1291
1688
  const [fontStyle, setFontStyle] = useStylesField("font-style");
1292
1689
  const [textDecoration, setTextDecoration] = useStylesField("text-decoration");
1293
- const formats = [fontStyle, ...(textDecoration || "").split(" ")];
1294
- return /* @__PURE__ */ React45.createElement(import_ui37.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(import_editor_controls30.ControlLabel, null, (0, import_i18n26.__)("Style", "elementor"))), /* @__PURE__ */ React45.createElement(import_ui37.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React45.createElement(import_ui37.ToggleButtonGroup, { value: formats }, /* @__PURE__ */ React45.createElement(
1690
+ const formats = [fontStyle?.value, ...(textDecoration?.value || "").split(" ")];
1691
+ const handleSetFontStyle = (newValue) => {
1692
+ if (newValue === null) {
1693
+ return setFontStyle(null);
1694
+ }
1695
+ setFontStyle({
1696
+ $$type: "string",
1697
+ value: newValue
1698
+ });
1699
+ };
1700
+ const handleSetTextDecoration = (newValue) => {
1701
+ if (newValue === null) {
1702
+ return setTextDecoration(null);
1703
+ }
1704
+ setTextDecoration({
1705
+ $$type: "string",
1706
+ value: newValue
1707
+ });
1708
+ };
1709
+ return /* @__PURE__ */ React52.createElement(import_ui44.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(import_editor_controls38.ControlLabel, null, (0, import_i18n33.__)("Style", "elementor"))), /* @__PURE__ */ React52.createElement(import_ui44.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React52.createElement(import_ui44.ToggleButtonGroup, { value: formats }, /* @__PURE__ */ React52.createElement(
1295
1710
  ToggleButton,
1296
1711
  {
1297
1712
  value: "italic",
1298
- onChange: (v) => setFontStyle(fontStyle === v ? null : v),
1713
+ onChange: (v) => handleSetFontStyle(fontStyle?.value === v ? null : v),
1299
1714
  "aria-label": "italic",
1300
1715
  sx: { marginLeft: "auto" }
1301
1716
  },
1302
- /* @__PURE__ */ React45.createElement(import_icons12.ItalicIcon, { fontSize: buttonSize })
1303
- ), /* @__PURE__ */ React45.createElement(
1717
+ /* @__PURE__ */ React52.createElement(import_icons17.ItalicIcon, { fontSize: buttonSize })
1718
+ ), /* @__PURE__ */ React52.createElement(
1304
1719
  ShorthandControl,
1305
1720
  {
1306
1721
  value: "line-through",
1307
- currentValues: textDecoration || "",
1308
- updateValues: setTextDecoration,
1722
+ currentValues: textDecoration?.value || "",
1723
+ updateValues: handleSetTextDecoration,
1309
1724
  "aria-label": "line-through"
1310
1725
  },
1311
- /* @__PURE__ */ React45.createElement(import_icons12.StrikethroughIcon, { fontSize: buttonSize })
1312
- ), /* @__PURE__ */ React45.createElement(
1726
+ /* @__PURE__ */ React52.createElement(import_icons17.StrikethroughIcon, { fontSize: buttonSize })
1727
+ ), /* @__PURE__ */ React52.createElement(
1313
1728
  ShorthandControl,
1314
1729
  {
1315
1730
  value: "underline",
1316
- currentValues: textDecoration || "",
1317
- updateValues: setTextDecoration,
1731
+ currentValues: textDecoration?.value || "",
1732
+ updateValues: handleSetTextDecoration,
1318
1733
  "aria-label": "underline"
1319
1734
  },
1320
- /* @__PURE__ */ React45.createElement(import_icons12.UnderlineIcon, { fontSize: buttonSize })
1735
+ /* @__PURE__ */ React52.createElement(import_icons17.UnderlineIcon, { fontSize: buttonSize })
1321
1736
  ))));
1322
1737
  };
1323
1738
  var ShorthandControl = ({
@@ -1336,52 +1751,52 @@ var ShorthandControl = ({
1336
1751
  updateValues([...valuesArr, newValue].join(" "));
1337
1752
  }
1338
1753
  };
1339
- return /* @__PURE__ */ React45.createElement(ToggleButton, { value, onChange: toggleValue, selected, "aria-label": ariaLabel }, children);
1754
+ return /* @__PURE__ */ React52.createElement(ToggleButton, { value, onChange: toggleValue, selected, "aria-label": ariaLabel }, children);
1340
1755
  };
1341
1756
  var ToggleButton = ({ onChange, ...props }) => {
1342
1757
  const handleChange = (_e, newValue) => {
1343
1758
  onChange(newValue);
1344
1759
  };
1345
- return /* @__PURE__ */ React45.createElement(import_ui37.ToggleButton, { ...props, onChange: handleChange, size: buttonSize });
1760
+ return /* @__PURE__ */ React52.createElement(import_ui44.ToggleButton, { ...props, onChange: handleChange, size: buttonSize });
1346
1761
  };
1347
1762
 
1348
1763
  // src/components/style-sections/typography-section/transform-field.tsx
1349
- var React46 = __toESM(require("react"));
1350
- var import_editor_controls31 = require("@elementor/editor-controls");
1351
- var import_icons13 = require("@elementor/icons");
1352
- var import_ui38 = require("@elementor/ui");
1353
- var import_i18n27 = require("@wordpress/i18n");
1354
- var options4 = [
1764
+ var React53 = __toESM(require("react"));
1765
+ var import_editor_controls39 = require("@elementor/editor-controls");
1766
+ var import_icons18 = require("@elementor/icons");
1767
+ var import_ui45 = require("@elementor/ui");
1768
+ var import_i18n34 = require("@wordpress/i18n");
1769
+ var options9 = [
1355
1770
  {
1356
1771
  value: "capitalize",
1357
- label: (0, import_i18n27.__)("Capitalize", "elementor"),
1358
- renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(import_icons13.LetterCaseIcon, { fontSize: size })
1772
+ label: (0, import_i18n34.__)("Capitalize", "elementor"),
1773
+ renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(import_icons18.LetterCaseIcon, { fontSize: size })
1359
1774
  },
1360
1775
  {
1361
1776
  value: "uppercase",
1362
- label: (0, import_i18n27.__)("Uppercase", "elementor"),
1363
- renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(import_icons13.LetterCaseUpperIcon, { fontSize: size })
1777
+ label: (0, import_i18n34.__)("Uppercase", "elementor"),
1778
+ renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(import_icons18.LetterCaseUpperIcon, { fontSize: size })
1364
1779
  },
1365
1780
  {
1366
1781
  value: "lowercase",
1367
- label: (0, import_i18n27.__)("Lowercase", "elementor"),
1368
- renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(import_icons13.LetterCaseLowerIcon, { fontSize: size })
1782
+ label: (0, import_i18n34.__)("Lowercase", "elementor"),
1783
+ renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(import_icons18.LetterCaseLowerIcon, { fontSize: size })
1369
1784
  }
1370
1785
  ];
1371
- var TransformField = () => /* @__PURE__ */ React46.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(import_editor_controls31.ControlLabel, null, (0, import_i18n27.__)("Transform", "elementor"))), /* @__PURE__ */ React46.createElement(import_ui38.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React46.createElement(import_editor_controls31.ToggleControl, { options: options4 }))));
1786
+ var TransformField = () => /* @__PURE__ */ React53.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React53.createElement(import_ui45.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(import_editor_controls39.ControlLabel, null, (0, import_i18n34.__)("Transform", "elementor"))), /* @__PURE__ */ React53.createElement(import_ui45.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React53.createElement(import_editor_controls39.ToggleControl, { options: options9 }))));
1372
1787
 
1373
1788
  // src/components/style-sections/typography-section/word-spacing-field.tsx
1374
- var React47 = __toESM(require("react"));
1375
- var import_editor_controls32 = require("@elementor/editor-controls");
1376
- var import_ui39 = require("@elementor/ui");
1377
- var import_i18n28 = require("@wordpress/i18n");
1789
+ var React54 = __toESM(require("react"));
1790
+ var import_editor_controls40 = require("@elementor/editor-controls");
1791
+ var import_ui46 = require("@elementor/ui");
1792
+ var import_i18n35 = require("@wordpress/i18n");
1378
1793
  var WordSpacingField = () => {
1379
- return /* @__PURE__ */ React47.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(import_editor_controls32.ControlLabel, null, (0, import_i18n28.__)("Word Spacing", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(import_editor_controls32.SizeControl, null))));
1794
+ return /* @__PURE__ */ React54.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React54.createElement(import_ui46.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(import_editor_controls40.ControlLabel, null, (0, import_i18n35.__)("Word Spacing", "elementor"))), /* @__PURE__ */ React54.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(import_editor_controls40.SizeControl, null))));
1380
1795
  };
1381
1796
 
1382
1797
  // src/components/style-sections/typography-section/typography-section.tsx
1383
1798
  var TypographySection = () => {
1384
- return /* @__PURE__ */ React48.createElement(import_ui40.Stack, { gap: 1.5 }, /* @__PURE__ */ React48.createElement(FontFamilyField, null), /* @__PURE__ */ React48.createElement(FontWeightField, null), /* @__PURE__ */ React48.createElement(FontSizeField, null), /* @__PURE__ */ React48.createElement(import_ui40.Divider, null), /* @__PURE__ */ React48.createElement(TextColorField, null), /* @__PURE__ */ React48.createElement(CollapsibleContent, null, /* @__PURE__ */ React48.createElement(import_ui40.Stack, { gap: 1.5, sx: { pt: 1.5 } }, /* @__PURE__ */ React48.createElement(LetterSpacingField, null), /* @__PURE__ */ React48.createElement(WordSpacingField, null), /* @__PURE__ */ React48.createElement(import_ui40.Divider, null), /* @__PURE__ */ React48.createElement(TextAlignmentField, null), /* @__PURE__ */ React48.createElement(TextStyleField, null), /* @__PURE__ */ React48.createElement(TransformField, null), /* @__PURE__ */ React48.createElement(TextDirectionField, null), /* @__PURE__ */ React48.createElement(TextStrokeField, null))));
1799
+ return /* @__PURE__ */ React55.createElement(import_ui47.Stack, { gap: 1.5 }, /* @__PURE__ */ React55.createElement(FontFamilyField, null), /* @__PURE__ */ React55.createElement(FontWeightField, null), /* @__PURE__ */ React55.createElement(FontSizeField, null), /* @__PURE__ */ React55.createElement(import_ui47.Divider, null), /* @__PURE__ */ React55.createElement(TextAlignmentField, null), /* @__PURE__ */ React55.createElement(TextColorField, null), /* @__PURE__ */ React55.createElement(CollapsibleContent, null, /* @__PURE__ */ React55.createElement(import_ui47.Stack, { gap: 1.5, sx: { pt: 1.5 } }, /* @__PURE__ */ React55.createElement(LineHeightField, null), /* @__PURE__ */ React55.createElement(LetterSpacingField, null), /* @__PURE__ */ React55.createElement(WordSpacingField, null), /* @__PURE__ */ React55.createElement(import_ui47.Divider, null), /* @__PURE__ */ React55.createElement(TextStyleField, null), /* @__PURE__ */ React55.createElement(TransformField, null), /* @__PURE__ */ React55.createElement(TextDirectionField, null), /* @__PURE__ */ React55.createElement(TextStrokeField, null))));
1385
1800
  };
1386
1801
 
1387
1802
  // src/components/style-tab.tsx
@@ -1390,10 +1805,10 @@ var StyleTab = () => {
1390
1805
  const currentClassesProp = useCurrentClassesProp();
1391
1806
  const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
1392
1807
  const breakpoint = (0, import_editor_responsive.useActiveBreakpoint)();
1393
- return /* @__PURE__ */ React49.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React49.createElement(StyleProvider, { meta: { breakpoint, state: null }, id: activeStyleDefId, setId: setActiveStyleDefId }, /* @__PURE__ */ React49.createElement(CssClassSelectorSection, null), /* @__PURE__ */ React49.createElement(import_ui41.Divider, null), /* @__PURE__ */ React49.createElement(SectionsList, null, /* @__PURE__ */ React49.createElement(Section, { title: (0, import_i18n29.__)("Layout", "elementor") }, /* @__PURE__ */ React49.createElement(LayoutSection, null)), /* @__PURE__ */ React49.createElement(Section, { title: (0, import_i18n29.__)("Spacing", "elementor") }, /* @__PURE__ */ React49.createElement(SpacingSection, null)), /* @__PURE__ */ React49.createElement(Section, { title: (0, import_i18n29.__)("Size", "elementor") }, /* @__PURE__ */ React49.createElement(SizeSection, null)), /* @__PURE__ */ React49.createElement(Section, { title: (0, import_i18n29.__)("Position", "elementor") }, /* @__PURE__ */ React49.createElement(PositionSection, null)), /* @__PURE__ */ React49.createElement(Section, { title: (0, import_i18n29.__)("Typography", "elementor") }, /* @__PURE__ */ React49.createElement(TypographySection, null)), /* @__PURE__ */ React49.createElement(Section, { title: (0, import_i18n29.__)("Background", "elementor") }, /* @__PURE__ */ React49.createElement(BackgroundSection, null)), /* @__PURE__ */ React49.createElement(Section, { title: (0, import_i18n29.__)("Border", "elementor") }, /* @__PURE__ */ React49.createElement(BorderSection, null)), /* @__PURE__ */ React49.createElement(Section, { title: (0, import_i18n29.__)("Effects", "elementor") }, /* @__PURE__ */ React49.createElement(EffectsSection, null)))));
1808
+ return /* @__PURE__ */ React56.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React56.createElement(StyleProvider, { meta: { breakpoint, state: null }, id: activeStyleDefId, setId: setActiveStyleDefId }, /* @__PURE__ */ React56.createElement(CssClassSelector, null), /* @__PURE__ */ React56.createElement(import_ui48.Divider, null), /* @__PURE__ */ React56.createElement(SectionsList, null, /* @__PURE__ */ React56.createElement(Section, { title: (0, import_i18n36.__)("Layout", "elementor") }, /* @__PURE__ */ React56.createElement(LayoutSection, null)), /* @__PURE__ */ React56.createElement(Section, { title: (0, import_i18n36.__)("Spacing", "elementor") }, /* @__PURE__ */ React56.createElement(SpacingSection, null)), /* @__PURE__ */ React56.createElement(Section, { title: (0, import_i18n36.__)("Size", "elementor") }, /* @__PURE__ */ React56.createElement(SizeSection, null)), /* @__PURE__ */ React56.createElement(Section, { title: (0, import_i18n36.__)("Position", "elementor") }, /* @__PURE__ */ React56.createElement(PositionSection, null)), /* @__PURE__ */ React56.createElement(Section, { title: (0, import_i18n36.__)("Typography", "elementor") }, /* @__PURE__ */ React56.createElement(TypographySection, null)), /* @__PURE__ */ React56.createElement(Section, { title: (0, import_i18n36.__)("Background", "elementor") }, /* @__PURE__ */ React56.createElement(BackgroundSection, null)), /* @__PURE__ */ React56.createElement(Section, { title: (0, import_i18n36.__)("Border", "elementor") }, /* @__PURE__ */ React56.createElement(BorderSection, null)), /* @__PURE__ */ React56.createElement(Section, { title: (0, import_i18n36.__)("Effects", "elementor") }, /* @__PURE__ */ React56.createElement(EffectsSection, null)))));
1394
1809
  };
1395
1810
  function useActiveStyleDefId(currentClassesProp) {
1396
- const [activeStyledDefId, setActiveStyledDefId] = (0, import_react12.useState)(null);
1811
+ const [activeStyledDefId, setActiveStyledDefId] = (0, import_react13.useState)(null);
1397
1812
  const fallback = useFirstElementStyleDef(currentClassesProp);
1398
1813
  const newId = useGeneratedId();
1399
1814
  return [activeStyledDefId || fallback?.id || newId, setActiveStyledDefId];
@@ -1423,11 +1838,11 @@ function useCurrentClassesProp() {
1423
1838
  // src/components/editing-panel-tabs.tsx
1424
1839
  var EditingPanelTabs = () => {
1425
1840
  const { element } = useElement();
1426
- const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui42.useTabs)("settings");
1841
+ const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui49.useTabs)("settings");
1427
1842
  return (
1428
1843
  // When switching between elements, the local states should be reset. We are using key to rerender the tabs.
1429
1844
  // Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
1430
- /* @__PURE__ */ React50.createElement(import_react13.Fragment, { key: element.id }, /* @__PURE__ */ React50.createElement(import_ui42.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React50.createElement(import_ui42.Tabs, { variant: "fullWidth", indicatorColor: "secondary", textColor: "inherit", ...getTabsProps() }, /* @__PURE__ */ React50.createElement(import_ui42.Tab, { label: (0, import_i18n30.__)("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React50.createElement(import_ui42.Tab, { label: (0, import_i18n30.__)("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React50.createElement(import_ui42.Divider, null), /* @__PURE__ */ React50.createElement(import_ui42.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React50.createElement(SettingsTab, null)), /* @__PURE__ */ React50.createElement(import_ui42.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React50.createElement(StyleTab, null))))
1845
+ /* @__PURE__ */ React57.createElement(import_react14.Fragment, { key: element.id }, /* @__PURE__ */ React57.createElement(import_ui49.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React57.createElement(import_ui49.Tabs, { variant: "fullWidth", indicatorColor: "secondary", textColor: "inherit", ...getTabsProps() }, /* @__PURE__ */ React57.createElement(import_ui49.Tab, { label: (0, import_i18n37.__)("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React57.createElement(import_ui49.Tab, { label: (0, import_i18n37.__)("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React57.createElement(import_ui49.Divider, null), /* @__PURE__ */ React57.createElement(import_ui49.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React57.createElement(SettingsTab, null)), /* @__PURE__ */ React57.createElement(import_ui49.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React57.createElement(StyleTab, null))))
1431
1846
  );
1432
1847
  };
1433
1848
 
@@ -1440,8 +1855,8 @@ var EditingPanel = () => {
1440
1855
  if (!element || !elementType) {
1441
1856
  return null;
1442
1857
  }
1443
- const panelTitle = (0, import_i18n31.__)("Edit %s", "elementor").replace("%s", elementType.title);
1444
- return /* @__PURE__ */ React51.createElement(import_ui43.ErrorBoundary, { fallback: /* @__PURE__ */ React51.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React51.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React51.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React51.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle)), /* @__PURE__ */ React51.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React51.createElement(import_editor_controls33.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React51.createElement(import_editor_controls33.ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React51.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React51.createElement(EditingPanelTabs, null)))))));
1858
+ const panelTitle = (0, import_i18n38.__)("Edit %s", "elementor").replace("%s", elementType.title);
1859
+ return /* @__PURE__ */ React58.createElement(import_ui50.ErrorBoundary, { fallback: /* @__PURE__ */ React58.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React58.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React58.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React58.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle)), /* @__PURE__ */ React58.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React58.createElement(import_editor_controls41.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React58.createElement(import_editor_controls41.ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React58.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React58.createElement(EditingPanelTabs, null)))))));
1445
1860
  };
1446
1861
 
1447
1862
  // src/panel.ts
@@ -1464,7 +1879,7 @@ var isAtomicWidgetSelected = () => {
1464
1879
  // src/hooks/use-close-editor-panel.ts
1465
1880
  var useCloseEditorPanel = () => {
1466
1881
  const { close } = usePanelActions();
1467
- return (0, import_react14.useEffect)(() => {
1882
+ return (0, import_react15.useEffect)(() => {
1468
1883
  return (0, import_editor_v1_adapters.__privateListenTo)((0, import_editor_v1_adapters.commandStartEvent)("document/elements/delete"), (e) => {
1469
1884
  const selectedElement = (0, import_editor_elements8.getSelectedElements)()[0];
1470
1885
  const { container: deletedContainer } = e?.args;
@@ -1477,11 +1892,11 @@ var useCloseEditorPanel = () => {
1477
1892
  };
1478
1893
 
1479
1894
  // src/hooks/use-open-editor-panel.ts
1480
- var import_react15 = require("react");
1895
+ var import_react16 = require("react");
1481
1896
  var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
1482
1897
  var useOpenEditorPanel = () => {
1483
1898
  const { open } = usePanelActions();
1484
- (0, import_react15.useEffect)(() => {
1899
+ (0, import_react16.useEffect)(() => {
1485
1900
  return (0, import_editor_v1_adapters2.__privateListenTo)((0, import_editor_v1_adapters2.commandStartEvent)("panel/editor/open"), () => {
1486
1901
  if (isAtomicWidgetSelected()) {
1487
1902
  open();
@@ -1498,22 +1913,23 @@ var EditingPanelHooks = () => {
1498
1913
  };
1499
1914
 
1500
1915
  // src/dynamics/components/dynamic-selection-control.tsx
1501
- var React54 = __toESM(require("react"));
1502
- var import_react19 = require("react");
1503
- var import_editor_controls36 = require("@elementor/editor-controls");
1504
- var import_icons15 = require("@elementor/icons");
1505
- var import_ui45 = require("@elementor/ui");
1506
- var import_i18n33 = require("@wordpress/i18n");
1916
+ var React61 = __toESM(require("react"));
1917
+ var import_react20 = require("react");
1918
+ var import_editor_controls44 = require("@elementor/editor-controls");
1919
+ var import_icons20 = require("@elementor/icons");
1920
+ var import_ui52 = require("@elementor/ui");
1921
+ var import_i18n40 = require("@wordpress/i18n");
1507
1922
 
1508
1923
  // src/dynamics/dynamic-control.tsx
1509
- var React52 = __toESM(require("react"));
1510
- var import_editor_controls34 = require("@elementor/editor-controls");
1924
+ var React59 = __toESM(require("react"));
1925
+ var import_editor_controls42 = require("@elementor/editor-controls");
1926
+ var import_editor_props5 = require("@elementor/editor-props");
1511
1927
 
1512
1928
  // src/dynamics/hooks/use-dynamic-tag.ts
1513
- var import_react17 = require("react");
1929
+ var import_react18 = require("react");
1514
1930
 
1515
1931
  // src/dynamics/hooks/use-prop-dynamic-tags.ts
1516
- var import_react16 = require("react");
1932
+ var import_react17 = require("react");
1517
1933
 
1518
1934
  // src/dynamics/sync/get-elementor-config.ts
1519
1935
  var getElementorConfig2 = () => {
@@ -1534,7 +1950,8 @@ var getAtomicDynamicTags = () => {
1534
1950
  };
1535
1951
 
1536
1952
  // src/dynamics/utils.ts
1537
- var import_editor_props = require("@elementor/editor-props");
1953
+ var import_editor_props4 = require("@elementor/editor-props");
1954
+ var import_schema = require("@elementor/schema");
1538
1955
  var DYNAMIC_PROP_TYPE_KEY = "dynamic";
1539
1956
  var isDynamicPropType = (prop) => prop.key === DYNAMIC_PROP_TYPE_KEY;
1540
1957
  var getDynamicPropType = (propType) => {
@@ -1542,11 +1959,18 @@ var getDynamicPropType = (propType) => {
1542
1959
  return dynamicPropType && isDynamicPropType(dynamicPropType) ? dynamicPropType : null;
1543
1960
  };
1544
1961
  var isDynamicPropValue = (prop) => {
1545
- return (0, import_editor_props.isTransformable)(prop) && prop.$$type === DYNAMIC_PROP_TYPE_KEY;
1962
+ return (0, import_editor_props4.isTransformable)(prop) && prop.$$type === DYNAMIC_PROP_TYPE_KEY;
1546
1963
  };
1547
1964
  var supportsDynamic = (propType) => {
1548
1965
  return !!getDynamicPropType(propType);
1549
1966
  };
1967
+ var dynamicPropTypeUtil = (0, import_editor_props4.createPropUtils)(
1968
+ DYNAMIC_PROP_TYPE_KEY,
1969
+ import_schema.z.strictObject({
1970
+ name: import_schema.z.string(),
1971
+ settings: import_schema.z.record(import_schema.z.any()).optional()
1972
+ })
1973
+ );
1550
1974
 
1551
1975
  // src/dynamics/hooks/use-prop-dynamic-tags.ts
1552
1976
  var usePropDynamicTags = (propName) => {
@@ -1557,7 +1981,7 @@ var usePropDynamicTags = (propName) => {
1557
1981
  const propDynamicType = getDynamicPropType(propType);
1558
1982
  categories = propDynamicType?.settings.categories || [];
1559
1983
  }
1560
- return (0, import_react16.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
1984
+ return (0, import_react17.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
1561
1985
  };
1562
1986
  var getDynamicTagsByCategories = (categories) => {
1563
1987
  const dynamicTags = getAtomicDynamicTags();
@@ -1573,13 +1997,13 @@ var getDynamicTagsByCategories = (categories) => {
1573
1997
  // src/dynamics/hooks/use-dynamic-tag.ts
1574
1998
  var useDynamicTag = (propName, tagName) => {
1575
1999
  const dynamicTags = usePropDynamicTags(propName);
1576
- return (0, import_react17.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
2000
+ return (0, import_react18.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
1577
2001
  };
1578
2002
 
1579
2003
  // src/dynamics/dynamic-control.tsx
1580
2004
  var DynamicControl = ({ bind, children }) => {
1581
- const { value, setValue, bind: propName } = (0, import_editor_controls34.useBoundProp)();
1582
- const { name = "", settings } = value?.value ?? {};
2005
+ const { value, setValue, bind: propName } = (0, import_editor_controls42.useBoundProp)(dynamicPropTypeUtil);
2006
+ const { name = "", settings } = value ?? {};
1583
2007
  const dynamicTag = useDynamicTag(propName, name);
1584
2008
  if (!dynamicTag) {
1585
2009
  throw new Error(`Dynamic tag ${name} not found`);
@@ -1588,60 +2012,59 @@ var DynamicControl = ({ bind, children }) => {
1588
2012
  const dynamicValue = settings?.[bind] ?? defaultValue;
1589
2013
  const setDynamicValue = (newValue) => {
1590
2014
  setValue({
1591
- $$type: "dynamic",
1592
- value: {
1593
- name,
1594
- settings: {
1595
- ...settings,
1596
- [bind]: newValue
1597
- }
2015
+ name,
2016
+ settings: {
2017
+ ...settings,
2018
+ // The value inside the dynamic is not a transformable value, so we need to store the whole object.
2019
+ [bind]: (0, import_editor_props5.isTransformable)(newValue) ? newValue.value : newValue
1598
2020
  }
1599
2021
  });
1600
2022
  };
1601
- return /* @__PURE__ */ React52.createElement(import_editor_controls34.BoundPropProvider, { setValue: setDynamicValue, value: dynamicValue, bind }, children);
2023
+ return /* @__PURE__ */ React59.createElement(import_editor_controls42.BoundPropProvider, { setValue: setDynamicValue, value: dynamicValue, bind }, children);
1602
2024
  };
1603
2025
 
1604
2026
  // src/dynamics/components/dynamic-selection.tsx
1605
- var React53 = __toESM(require("react"));
1606
- var import_react18 = require("react");
1607
- var import_editor_controls35 = require("@elementor/editor-controls");
1608
- var import_icons14 = require("@elementor/icons");
1609
- var import_ui44 = require("@elementor/ui");
1610
- var import_i18n32 = require("@wordpress/i18n");
2027
+ var React60 = __toESM(require("react"));
2028
+ var import_react19 = require("react");
2029
+ var import_editor_controls43 = require("@elementor/editor-controls");
2030
+ var import_icons19 = require("@elementor/icons");
2031
+ var import_ui51 = require("@elementor/ui");
2032
+ var import_i18n39 = require("@wordpress/i18n");
1611
2033
  var SIZE3 = "tiny";
1612
2034
  var DynamicSelection = ({ onSelect }) => {
1613
- const [searchValue, setSearchValue] = (0, import_react18.useState)("");
2035
+ const [searchValue, setSearchValue] = (0, import_react19.useState)("");
1614
2036
  const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
1615
- const { bind, value: currentValue, setValue } = (0, import_editor_controls35.useBoundProp)();
2037
+ const { value: anyValue } = (0, import_editor_controls43.useBoundProp)();
2038
+ const { bind, value: dynamicvalue, setValue } = (0, import_editor_controls43.useBoundProp)(dynamicPropTypeUtil);
1616
2039
  const { setPropValue: updatePropValueHistory } = usePropValueHistory();
1617
- const isCurrentValueDynamic = isDynamicPropValue(currentValue);
1618
- const options5 = useFilteredOptions(bind, searchValue);
2040
+ const isCurrentValueDynamic = !!dynamicvalue;
2041
+ const options10 = useFilteredOptions(bind, searchValue);
1619
2042
  const handleSearch = (event) => {
1620
2043
  setSearchValue(event.target.value);
1621
2044
  };
1622
2045
  const handleSetDynamicTag = (value) => {
1623
2046
  if (!isCurrentValueDynamic) {
1624
- updatePropValueHistory(bind, currentValue);
2047
+ updatePropValueHistory(bind, anyValue);
1625
2048
  }
1626
- setValue({ $$type: "dynamic", value: { name: value, settings: {} } });
2049
+ setValue({ name: value, settings: {} });
1627
2050
  onSelect?.();
1628
2051
  };
1629
- return /* @__PURE__ */ React53.createElement(import_ui44.Stack, null, /* @__PURE__ */ React53.createElement(import_ui44.Box, { px: 1.5, pb: 1 }, /* @__PURE__ */ React53.createElement(
1630
- import_ui44.TextField,
2052
+ return /* @__PURE__ */ React60.createElement(import_ui51.Stack, null, /* @__PURE__ */ React60.createElement(import_ui51.Box, { px: 1.5, pb: 1 }, /* @__PURE__ */ React60.createElement(
2053
+ import_ui51.TextField,
1631
2054
  {
1632
2055
  fullWidth: true,
1633
2056
  size: SIZE3,
1634
2057
  value: searchValue,
1635
2058
  onChange: handleSearch,
1636
- placeholder: (0, import_i18n32.__)("Search dynamic tag", "elementor"),
2059
+ placeholder: (0, import_i18n39.__)("Search dynamic tag", "elementor"),
1637
2060
  InputProps: {
1638
- startAdornment: /* @__PURE__ */ React53.createElement(import_ui44.InputAdornment, { position: "start" }, /* @__PURE__ */ React53.createElement(import_icons14.SearchIcon, { fontSize: SIZE3 }))
2061
+ startAdornment: /* @__PURE__ */ React60.createElement(import_ui51.InputAdornment, { position: "start" }, /* @__PURE__ */ React60.createElement(import_icons19.SearchIcon, { fontSize: SIZE3 }))
1639
2062
  }
1640
2063
  }
1641
- )), /* @__PURE__ */ React53.createElement(import_ui44.Divider, null), /* @__PURE__ */ React53.createElement(import_ui44.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, options5.length > 0 ? /* @__PURE__ */ React53.createElement(import_ui44.MenuList, { role: "listbox", tabIndex: 0 }, options5.map(([category, items], index) => /* @__PURE__ */ React53.createElement(import_react18.Fragment, { key: index }, /* @__PURE__ */ React53.createElement(import_ui44.ListSubheader, { sx: { typography: "caption", color: "text.tertiary" } }, dynamicGroups?.[category]?.title || category), items.map(({ value, label: tagLabel }) => {
1642
- const isSelected = isCurrentValueDynamic && value === currentValue?.value?.name;
1643
- return /* @__PURE__ */ React53.createElement(
1644
- import_ui44.MenuItem,
2064
+ )), /* @__PURE__ */ React60.createElement(import_ui51.Divider, null), /* @__PURE__ */ React60.createElement(import_ui51.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, options10.length > 0 ? /* @__PURE__ */ React60.createElement(import_ui51.MenuList, { role: "listbox", tabIndex: 0 }, options10.map(([category, items3], index) => /* @__PURE__ */ React60.createElement(import_react19.Fragment, { key: index }, /* @__PURE__ */ React60.createElement(import_ui51.ListSubheader, { sx: { typography: "caption", color: "text.tertiary" } }, dynamicGroups?.[category]?.title || category), items3.map(({ value, label: tagLabel }) => {
2065
+ const isSelected = isCurrentValueDynamic && value === dynamicvalue?.name;
2066
+ return /* @__PURE__ */ React60.createElement(
2067
+ import_ui51.MenuItem,
1645
2068
  {
1646
2069
  key: value,
1647
2070
  selected: isSelected,
@@ -1651,20 +2074,20 @@ var DynamicSelection = ({ onSelect }) => {
1651
2074
  },
1652
2075
  tagLabel
1653
2076
  );
1654
- })))) : /* @__PURE__ */ React53.createElement(import_ui44.Stack, { alignItems: "center", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React53.createElement(import_icons14.PhotoIcon, { fontSize: "large" }), /* @__PURE__ */ React53.createElement(import_ui44.Typography, { align: "center", variant: "caption", color: "text.secondary" }, (0, import_i18n32.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React53.createElement("br", null), "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React53.createElement(import_ui44.Typography, { align: "center", variant: "caption", color: "text.secondary" }, /* @__PURE__ */ React53.createElement(
1655
- import_ui44.Link,
2077
+ })))) : /* @__PURE__ */ React60.createElement(import_ui51.Stack, { alignItems: "center", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React60.createElement(import_icons19.PhotoIcon, { fontSize: "large" }), /* @__PURE__ */ React60.createElement(import_ui51.Typography, { align: "center", variant: "caption", color: "text.secondary" }, (0, import_i18n39.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React60.createElement("br", null), "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React60.createElement(import_ui51.Typography, { align: "center", variant: "caption", color: "text.secondary" }, /* @__PURE__ */ React60.createElement(
2078
+ import_ui51.Link,
1656
2079
  {
1657
2080
  color: "secondary",
1658
2081
  variant: "caption",
1659
2082
  component: "button",
1660
2083
  onClick: () => setSearchValue("")
1661
2084
  },
1662
- (0, import_i18n32.__)("Clear the filters", "elementor")
1663
- ), "\xA0", (0, import_i18n32.__)("and try again.", "elementor")))));
2085
+ (0, import_i18n39.__)("Clear the filters", "elementor")
2086
+ ), "\xA0", (0, import_i18n39.__)("and try again.", "elementor")))));
1664
2087
  };
1665
2088
  var useFilteredOptions = (bind, searchValue) => {
1666
2089
  const dynamicTags = usePropDynamicTags(bind);
1667
- const options5 = dynamicTags.reduce((categories, { name, label, group }) => {
2090
+ const options10 = dynamicTags.reduce((categories, { name, label, group }) => {
1668
2091
  const isVisible = label.toLowerCase().includes(searchValue.trim().toLowerCase());
1669
2092
  if (!isVisible) {
1670
2093
  return categories;
@@ -1675,89 +2098,90 @@ var useFilteredOptions = (bind, searchValue) => {
1675
2098
  categories.get(group)?.push({ label, value: name });
1676
2099
  return categories;
1677
2100
  }, /* @__PURE__ */ new Map());
1678
- return [...options5];
2101
+ return [...options10];
1679
2102
  };
1680
2103
 
1681
2104
  // src/dynamics/components/dynamic-selection-control.tsx
1682
2105
  var SIZE4 = "tiny";
1683
2106
  var DynamicSelectionControl = () => {
1684
- const { bind, value, setValue } = (0, import_editor_controls36.useBoundProp)();
2107
+ const { setValue: setAnyValue } = (0, import_editor_controls44.useBoundProp)();
2108
+ const { bind, value } = (0, import_editor_controls44.useBoundProp)(dynamicPropTypeUtil);
1685
2109
  const { getPropValue: getPropValueFromHistory } = usePropValueHistory();
1686
- const { name: tagName = "" } = value?.value || {};
1687
- const selectionPopoverId = (0, import_react19.useId)();
1688
- const selectionPopoverState = (0, import_ui45.usePopupState)({ variant: "popover", popupId: selectionPopoverId });
2110
+ const { name: tagName = "" } = value;
2111
+ const selectionPopoverId = (0, import_react20.useId)();
2112
+ const selectionPopoverState = (0, import_ui52.usePopupState)({ variant: "popover", popupId: selectionPopoverId });
1689
2113
  const dynamicTag = useDynamicTag(bind, tagName);
1690
2114
  const removeDynamicTag = () => {
1691
2115
  const propValue = getPropValueFromHistory(bind);
1692
- setValue(propValue ?? null);
2116
+ setAnyValue(propValue ?? null);
1693
2117
  };
1694
2118
  if (!dynamicTag) {
1695
2119
  throw new Error(`Dynamic tag ${tagName} not found`);
1696
2120
  }
1697
- return /* @__PURE__ */ React54.createElement(import_ui45.Box, null, /* @__PURE__ */ React54.createElement(
1698
- import_ui45.UnstableTag,
2121
+ return /* @__PURE__ */ React61.createElement(import_ui52.Box, null, /* @__PURE__ */ React61.createElement(
2122
+ import_ui52.UnstableTag,
1699
2123
  {
1700
2124
  fullWidth: true,
1701
2125
  showActionsOnHover: true,
1702
2126
  label: dynamicTag.label,
1703
- startIcon: /* @__PURE__ */ React54.createElement(import_icons15.DatabaseIcon, { fontSize: SIZE4 }),
1704
- ...(0, import_ui45.bindTrigger)(selectionPopoverState),
1705
- actions: /* @__PURE__ */ React54.createElement(React54.Fragment, null, /* @__PURE__ */ React54.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React54.createElement(
1706
- import_ui45.IconButton,
2127
+ startIcon: /* @__PURE__ */ React61.createElement(import_icons20.DatabaseIcon, { fontSize: SIZE4 }),
2128
+ ...(0, import_ui52.bindTrigger)(selectionPopoverState),
2129
+ actions: /* @__PURE__ */ React61.createElement(React61.Fragment, null, /* @__PURE__ */ React61.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React61.createElement(
2130
+ import_ui52.IconButton,
1707
2131
  {
1708
2132
  size: SIZE4,
1709
2133
  onClick: removeDynamicTag,
1710
- "aria-label": (0, import_i18n33.__)("Remove dynamic value", "elementor")
2134
+ "aria-label": (0, import_i18n40.__)("Remove dynamic value", "elementor")
1711
2135
  },
1712
- /* @__PURE__ */ React54.createElement(import_icons15.XIcon, { fontSize: SIZE4 })
2136
+ /* @__PURE__ */ React61.createElement(import_icons20.XIcon, { fontSize: SIZE4 })
1713
2137
  ))
1714
2138
  }
1715
- ), /* @__PURE__ */ React54.createElement(
1716
- import_ui45.Popover,
2139
+ ), /* @__PURE__ */ React61.createElement(
2140
+ import_ui52.Popover,
1717
2141
  {
1718
2142
  disablePortal: true,
1719
2143
  disableScrollLock: true,
1720
2144
  anchorOrigin: { vertical: "bottom", horizontal: "left" },
1721
- ...(0, import_ui45.bindPopover)(selectionPopoverState)
2145
+ ...(0, import_ui52.bindPopover)(selectionPopoverState)
1722
2146
  },
1723
- /* @__PURE__ */ React54.createElement(import_ui45.Stack, null, /* @__PURE__ */ React54.createElement(import_ui45.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React54.createElement(import_icons15.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React54.createElement(import_ui45.Typography, { variant: "subtitle2" }, (0, import_i18n33.__)("Dynamic Tags", "elementor")), /* @__PURE__ */ React54.createElement(import_ui45.IconButton, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React54.createElement(import_icons15.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React54.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
2147
+ /* @__PURE__ */ React61.createElement(import_ui52.Stack, null, /* @__PURE__ */ React61.createElement(import_ui52.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React61.createElement(import_icons20.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React61.createElement(import_ui52.Typography, { variant: "subtitle2" }, (0, import_i18n40.__)("Dynamic Tags", "elementor")), /* @__PURE__ */ React61.createElement(import_ui52.IconButton, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React61.createElement(import_icons20.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React61.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
1724
2148
  ));
1725
2149
  };
1726
2150
  var DynamicSettingsPopover = ({ dynamicTag }) => {
1727
- const popupId = (0, import_react19.useId)();
1728
- const settingsPopupState = (0, import_ui45.usePopupState)({ variant: "popover", popupId });
2151
+ const popupId = (0, import_react20.useId)();
2152
+ const settingsPopupState = (0, import_ui52.usePopupState)({ variant: "popover", popupId });
1729
2153
  const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
1730
2154
  if (!hasDynamicSettings) {
1731
2155
  return null;
1732
2156
  }
1733
- return /* @__PURE__ */ React54.createElement(React54.Fragment, null, /* @__PURE__ */ React54.createElement(
1734
- import_ui45.IconButton,
2157
+ return /* @__PURE__ */ React61.createElement(React61.Fragment, null, /* @__PURE__ */ React61.createElement(
2158
+ import_ui52.IconButton,
1735
2159
  {
1736
2160
  size: SIZE4,
1737
- ...(0, import_ui45.bindTrigger)(settingsPopupState),
1738
- "aria-label": (0, import_i18n33.__)("Settings", "elementor")
2161
+ ...(0, import_ui52.bindTrigger)(settingsPopupState),
2162
+ "aria-label": (0, import_i18n40.__)("Settings", "elementor")
1739
2163
  },
1740
- /* @__PURE__ */ React54.createElement(import_icons15.SettingsIcon, { fontSize: SIZE4 })
1741
- ), /* @__PURE__ */ React54.createElement(
1742
- import_ui45.Popover,
2164
+ /* @__PURE__ */ React61.createElement(import_icons20.SettingsIcon, { fontSize: SIZE4 })
2165
+ ), /* @__PURE__ */ React61.createElement(
2166
+ import_ui52.Popover,
1743
2167
  {
1744
2168
  disableScrollLock: true,
1745
2169
  anchorOrigin: { vertical: "bottom", horizontal: "center" },
1746
- ...(0, import_ui45.bindPopover)(settingsPopupState)
2170
+ ...(0, import_ui52.bindPopover)(settingsPopupState)
1747
2171
  },
1748
- /* @__PURE__ */ React54.createElement(import_ui45.Paper, { component: import_ui45.Stack, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React54.createElement(import_ui45.Stack, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React54.createElement(import_icons15.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React54.createElement(import_ui45.Typography, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React54.createElement(import_ui45.IconButton, { sx: { ml: "auto" }, size: SIZE4, onClick: settingsPopupState.close }, /* @__PURE__ */ React54.createElement(import_icons15.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React54.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
2172
+ /* @__PURE__ */ React61.createElement(import_ui52.Paper, { component: import_ui52.Stack, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React61.createElement(import_ui52.Stack, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React61.createElement(import_icons20.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React61.createElement(import_ui52.Typography, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React61.createElement(import_ui52.IconButton, { sx: { ml: "auto" }, size: SIZE4, onClick: settingsPopupState.close }, /* @__PURE__ */ React61.createElement(import_icons20.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React61.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
1749
2173
  ));
1750
2174
  };
1751
2175
  var DynamicSettings = ({ controls }) => {
1752
2176
  const tabs = controls.filter(({ type }) => type === "section");
1753
- const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui45.useTabs)(0);
2177
+ const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui52.useTabs)(0);
1754
2178
  if (!tabs.length) {
1755
2179
  return null;
1756
2180
  }
1757
- return /* @__PURE__ */ React54.createElement(React54.Fragment, null, /* @__PURE__ */ React54.createElement(import_ui45.Tabs, { indicatorColor: "secondary", textColor: "secondary", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React54.createElement(import_ui45.Tab, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React54.createElement(import_ui45.Divider, null), tabs.map(({ value }, index) => {
1758
- return /* @__PURE__ */ React54.createElement(import_ui45.TabPanel, { key: index, sx: { flexGrow: 1 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React54.createElement(import_ui45.Stack, { gap: 1, px: 2 }, value.items.map((item) => {
2181
+ return /* @__PURE__ */ React61.createElement(React61.Fragment, null, /* @__PURE__ */ React61.createElement(import_ui52.Tabs, { indicatorColor: "secondary", textColor: "secondary", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React61.createElement(import_ui52.Tab, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React61.createElement(import_ui52.Divider, null), tabs.map(({ value }, index) => {
2182
+ return /* @__PURE__ */ React61.createElement(import_ui52.TabPanel, { key: index, sx: { flexGrow: 1 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React61.createElement(import_ui52.Stack, { gap: 1, px: 2 }, value.items.map((item) => {
1759
2183
  if (item.type === "control") {
1760
- return /* @__PURE__ */ React54.createElement(Control3, { key: item.value.bind, control: item.value });
2184
+ return /* @__PURE__ */ React61.createElement(Control3, { key: item.value.bind, control: item.value });
1761
2185
  }
1762
2186
  return null;
1763
2187
  })));
@@ -1767,24 +2191,24 @@ var Control3 = ({ control }) => {
1767
2191
  if (!getControlByType(control.type)) {
1768
2192
  return null;
1769
2193
  }
1770
- return /* @__PURE__ */ React54.createElement(DynamicControl, { bind: control.bind }, control.label ? /* @__PURE__ */ React54.createElement(import_editor_controls36.ControlLabel, null, control.label) : null, /* @__PURE__ */ React54.createElement(Control, { type: control.type, props: control.props }));
2194
+ return /* @__PURE__ */ React61.createElement(DynamicControl, { bind: control.bind }, control.label ? /* @__PURE__ */ React61.createElement(import_editor_controls44.ControlLabel, null, control.label) : null, /* @__PURE__ */ React61.createElement(Control, { type: control.type, props: control.props }));
1771
2195
  };
1772
2196
 
1773
2197
  // src/dynamics/hooks/use-prop-dynamic-action.tsx
1774
- var React55 = __toESM(require("react"));
1775
- var import_editor_controls37 = require("@elementor/editor-controls");
1776
- var import_icons16 = require("@elementor/icons");
1777
- var import_i18n34 = require("@wordpress/i18n");
2198
+ var React62 = __toESM(require("react"));
2199
+ var import_editor_controls45 = require("@elementor/editor-controls");
2200
+ var import_icons21 = require("@elementor/icons");
2201
+ var import_i18n41 = require("@wordpress/i18n");
1778
2202
  var usePropDynamicAction = () => {
1779
- const { bind } = (0, import_editor_controls37.useBoundProp)();
2203
+ const { bind } = (0, import_editor_controls45.useBoundProp)();
1780
2204
  const { elementType } = useElement();
1781
2205
  const propType = elementType.propsSchema[bind];
1782
2206
  const visible = !!propType && supportsDynamic(propType);
1783
2207
  return {
1784
2208
  visible,
1785
- icon: import_icons16.DatabaseIcon,
1786
- title: (0, import_i18n34.__)("Dynamic Tags", "elementor"),
1787
- popoverContent: ({ closePopover }) => /* @__PURE__ */ React55.createElement(DynamicSelection, { onSelect: closePopover })
2209
+ icon: import_icons21.DatabaseIcon,
2210
+ title: (0, import_i18n41.__)("Dynamic Tags", "elementor"),
2211
+ popoverContent: ({ closePopover }) => /* @__PURE__ */ React62.createElement(DynamicSelection, { onSelect: closePopover })
1788
2212
  };
1789
2213
  };
1790
2214