@elementor/editor-controls 4.1.0-748 → 4.1.0-750

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -279,12 +279,12 @@ type SelectOption = {
279
279
  value: StringPropValue['value'];
280
280
  disabled?: boolean;
281
281
  };
282
- type Props$5 = {
282
+ type Props$5 = ControlProps<{
283
283
  options: SelectOption[];
284
284
  onChange?: (newValue: string | null, previousValue: string | null | undefined) => void;
285
285
  fallbackLabels?: Record<string, string>;
286
- };
287
- declare const HtmlTagControl: ControlComponent$1<({ options, onChange, fallbackLabels }: Props$5) => React$1.JSX.Element>;
286
+ }>;
287
+ declare const HtmlTagControl: ControlComponent$1<(props: Props$5) => React$1.JSX.Element>;
288
288
 
289
289
  type Props$4 = {
290
290
  queryOptions: {
package/dist/index.d.ts CHANGED
@@ -279,12 +279,12 @@ type SelectOption = {
279
279
  value: StringPropValue['value'];
280
280
  disabled?: boolean;
281
281
  };
282
- type Props$5 = {
282
+ type Props$5 = ControlProps<{
283
283
  options: SelectOption[];
284
284
  onChange?: (newValue: string | null, previousValue: string | null | undefined) => void;
285
285
  fallbackLabels?: Record<string, string>;
286
- };
287
- declare const HtmlTagControl: ControlComponent$1<({ options, onChange, fallbackLabels }: Props$5) => React$1.JSX.Element>;
286
+ }>;
287
+ declare const HtmlTagControl: ControlComponent$1<(props: Props$5) => React$1.JSX.Element>;
288
288
 
289
289
  type Props$4 = {
290
290
  queryOptions: {
package/dist/index.js CHANGED
@@ -3813,14 +3813,20 @@ var ConditionalControlInfotip = React66.forwardRef(
3813
3813
 
3814
3814
  // src/controls/html-tag-control.tsx
3815
3815
  var StyledSelect = (0, import_ui52.styled)(import_ui52.Select)(() => ({ ".MuiSelect-select.Mui-disabled": { cursor: "not-allowed" } }));
3816
- var HtmlTagControl = createControl(({ options, onChange, fallbackLabels = {} }) => {
3816
+ var HtmlTagControl = createControl((props) => {
3817
+ const {
3818
+ options,
3819
+ onChange,
3820
+ fallbackLabels = {},
3821
+ context: { elementId }
3822
+ } = props;
3817
3823
  const { value, setValue, disabled, placeholder } = useBoundProp(import_editor_props25.stringPropTypeUtil);
3818
3824
  const handleChange = (event) => {
3819
3825
  const newValue = event.target.value || null;
3820
3826
  onChange?.(newValue, value);
3821
3827
  setValue(newValue);
3822
3828
  };
3823
- const elementLabel = (0, import_editor_elements3.getElementLabel)() ?? "element";
3829
+ const elementLabel = (0, import_editor_elements3.getElementLabel)(elementId) ?? "element";
3824
3830
  const infoTipProps = {
3825
3831
  title: (0, import_i18n24.__)("HTML Tag", "elementor"),
3826
3832
  /* translators: %s is the element name. */
@@ -3854,7 +3860,7 @@ var HtmlTagControl = createControl(({ options, onChange, fallbackLabels = {} })
3854
3860
  disabled,
3855
3861
  fullWidth: true
3856
3862
  },
3857
- options.map(({ label, ...props }) => /* @__PURE__ */ React67.createElement(import_editor_ui7.MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, label))
3863
+ options.map(({ label, ...itemProps }) => /* @__PURE__ */ React67.createElement(import_editor_ui7.MenuListItem, { key: itemProps.value, ...itemProps, value: itemProps.value ?? "" }, label))
3858
3864
  )));
3859
3865
  });
3860
3866