Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: components.js
* @param {Array} [props.options=CSS_UNITS] Available units to select from.
[19500] Fix | Delete
* @param {Function} [props.onChange=noop] A callback function invoked when the value is changed.
[19501] Fix | Delete
* @param {string} [props.size="default"] Size of the control option. Supports "default" and "small".
[19502] Fix | Delete
* @param {string} [props.value="px"] Current unit.
[19503] Fix | Delete
*/
[19504] Fix | Delete
[19505] Fix | Delete
function UnitSelectControl(_ref) {
[19506] Fix | Delete
var className = _ref.className,
[19507] Fix | Delete
_ref$isTabbable = _ref.isTabbable,
[19508] Fix | Delete
isTabbable = _ref$isTabbable === void 0 ? true : _ref$isTabbable,
[19509] Fix | Delete
_ref$options = _ref.options,
[19510] Fix | Delete
options = _ref$options === void 0 ? CSS_UNITS : _ref$options,
[19511] Fix | Delete
_ref$onChange = _ref.onChange,
[19512] Fix | Delete
onChange = _ref$onChange === void 0 ? external_lodash_["noop"] : _ref$onChange,
[19513] Fix | Delete
_ref$size = _ref.size,
[19514] Fix | Delete
size = _ref$size === void 0 ? 'default' : _ref$size,
[19515] Fix | Delete
_ref$value = _ref.value,
[19516] Fix | Delete
value = _ref$value === void 0 ? 'px' : _ref$value,
[19517] Fix | Delete
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["className", "isTabbable", "options", "onChange", "size", "value"]);
[19518] Fix | Delete
[19519] Fix | Delete
if (!utils_hasUnits(options)) {
[19520] Fix | Delete
return Object(external_wp_element_["createElement"])(UnitLabel, {
[19521] Fix | Delete
className: "components-unit-control__unit-label",
[19522] Fix | Delete
size: size
[19523] Fix | Delete
}, value);
[19524] Fix | Delete
}
[19525] Fix | Delete
[19526] Fix | Delete
var handleOnChange = function handleOnChange(event) {
[19527] Fix | Delete
var unitValue = event.target.value;
[19528] Fix | Delete
var data = options.find(function (option) {
[19529] Fix | Delete
return option.value === unitValue;
[19530] Fix | Delete
});
[19531] Fix | Delete
onChange(unitValue, {
[19532] Fix | Delete
event: event,
[19533] Fix | Delete
data: data
[19534] Fix | Delete
});
[19535] Fix | Delete
};
[19536] Fix | Delete
[19537] Fix | Delete
var classes = classnames_default()('components-unit-control__select', className);
[19538] Fix | Delete
return Object(external_wp_element_["createElement"])(UnitSelect, Object(esm_extends["a" /* default */])({
[19539] Fix | Delete
className: classes,
[19540] Fix | Delete
onChange: handleOnChange,
[19541] Fix | Delete
size: size,
[19542] Fix | Delete
tabIndex: isTabbable ? null : '-1',
[19543] Fix | Delete
value: value
[19544] Fix | Delete
}, props), options.map(function (option) {
[19545] Fix | Delete
return Object(external_wp_element_["createElement"])("option", {
[19546] Fix | Delete
value: option.value,
[19547] Fix | Delete
key: option.value
[19548] Fix | Delete
}, option.label);
[19549] Fix | Delete
}));
[19550] Fix | Delete
}
[19551] Fix | Delete
[19552] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/utils/hooks/use-controlled-state.js
[19553] Fix | Delete
[19554] Fix | Delete
[19555] Fix | Delete
[19556] Fix | Delete
function use_controlled_state_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
[19557] Fix | Delete
[19558] Fix | Delete
function use_controlled_state_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { use_controlled_state_ownKeys(Object(source), true).forEach(function (key) { Object(esm_defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { use_controlled_state_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
[19559] Fix | Delete
[19560] Fix | Delete
/**
[19561] Fix | Delete
* WordPress dependencies
[19562] Fix | Delete
*/
[19563] Fix | Delete
[19564] Fix | Delete
/**
[19565] Fix | Delete
* Internal dependencies
[19566] Fix | Delete
*/
[19567] Fix | Delete
[19568] Fix | Delete
[19569] Fix | Delete
/**
[19570] Fix | Delete
* @template T
[19571] Fix | Delete
* @typedef Options
[19572] Fix | Delete
* @property {T | undefined} initial Initial value
[19573] Fix | Delete
* @property {T | ""} fallback Fallback value
[19574] Fix | Delete
*/
[19575] Fix | Delete
[19576] Fix | Delete
/** @type {Readonly<{ initial: undefined, fallback: '' }>} */
[19577] Fix | Delete
[19578] Fix | Delete
var defaultOptions = {
[19579] Fix | Delete
initial: undefined,
[19580] Fix | Delete
[19581] Fix | Delete
/**
[19582] Fix | Delete
* Defaults to empty string, as that is preferred for usage with
[19583] Fix | Delete
* <input />, <textarea />, and <select /> form elements.
[19584] Fix | Delete
*/
[19585] Fix | Delete
fallback: ''
[19586] Fix | Delete
};
[19587] Fix | Delete
/**
[19588] Fix | Delete
* Custom hooks for "controlled" components to track and consolidate internal
[19589] Fix | Delete
* state and incoming values. This is useful for components that render
[19590] Fix | Delete
* `input`, `textarea`, or `select` HTML elements.
[19591] Fix | Delete
*
[19592] Fix | Delete
* https://reactjs.org/docs/forms.html#controlled-components
[19593] Fix | Delete
*
[19594] Fix | Delete
* At first, a component using useControlledState receives an initial prop
[19595] Fix | Delete
* value, which is used as initial internal state.
[19596] Fix | Delete
*
[19597] Fix | Delete
* This internal state can be maintained and updated without
[19598] Fix | Delete
* relying on new incoming prop values.
[19599] Fix | Delete
*
[19600] Fix | Delete
* Unlike the basic useState hook, useControlledState's state can
[19601] Fix | Delete
* be updated if a new incoming prop value is changed.
[19602] Fix | Delete
*
[19603] Fix | Delete
* @template T
[19604] Fix | Delete
*
[19605] Fix | Delete
* @param {T | undefined} currentState The current value.
[19606] Fix | Delete
* @param {Options<T>} [options=defaultOptions] Additional options for the hook.
[19607] Fix | Delete
*
[19608] Fix | Delete
* @return {[T | "", (nextState: T) => void]} The controlled value and the value setter.
[19609] Fix | Delete
*/
[19610] Fix | Delete
[19611] Fix | Delete
function useControlledState(currentState) {
[19612] Fix | Delete
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultOptions;
[19613] Fix | Delete
[19614] Fix | Delete
var _defaultOptions$optio = use_controlled_state_objectSpread(use_controlled_state_objectSpread({}, defaultOptions), options),
[19615] Fix | Delete
initial = _defaultOptions$optio.initial,
[19616] Fix | Delete
fallback = _defaultOptions$optio.fallback;
[19617] Fix | Delete
[19618] Fix | Delete
var _useState = Object(external_wp_element_["useState"])(currentState),
[19619] Fix | Delete
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
[19620] Fix | Delete
internalState = _useState2[0],
[19621] Fix | Delete
setInternalState = _useState2[1];
[19622] Fix | Delete
[19623] Fix | Delete
var hasCurrentState = isValueDefined(currentState);
[19624] Fix | Delete
/*
[19625] Fix | Delete
* Resets internal state if value every changes from uncontrolled <-> controlled.
[19626] Fix | Delete
*/
[19627] Fix | Delete
[19628] Fix | Delete
Object(external_wp_element_["useEffect"])(function () {
[19629] Fix | Delete
if (hasCurrentState && internalState) {
[19630] Fix | Delete
setInternalState(undefined);
[19631] Fix | Delete
}
[19632] Fix | Delete
}, [hasCurrentState, internalState]);
[19633] Fix | Delete
var state = getDefinedValue([currentState, internalState, initial], fallback);
[19634] Fix | Delete
/* eslint-disable jsdoc/no-undefined-types */
[19635] Fix | Delete
[19636] Fix | Delete
/** @type {(nextState: T) => void} */
[19637] Fix | Delete
[19638] Fix | Delete
var setState = function setState(nextState) {
[19639] Fix | Delete
if (!hasCurrentState) {
[19640] Fix | Delete
setInternalState(nextState);
[19641] Fix | Delete
}
[19642] Fix | Delete
};
[19643] Fix | Delete
/* eslint-enable jsdoc/no-undefined-types */
[19644] Fix | Delete
[19645] Fix | Delete
[19646] Fix | Delete
return [state, setState];
[19647] Fix | Delete
}
[19648] Fix | Delete
[19649] Fix | Delete
/* harmony default export */ var use_controlled_state = (useControlledState);
[19650] Fix | Delete
[19651] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/unit-control/index.js
[19652] Fix | Delete
[19653] Fix | Delete
[19654] Fix | Delete
[19655] Fix | Delete
[19656] Fix | Delete
[19657] Fix | Delete
/**
[19658] Fix | Delete
* External dependencies
[19659] Fix | Delete
*/
[19660] Fix | Delete
[19661] Fix | Delete
[19662] Fix | Delete
/**
[19663] Fix | Delete
* WordPress dependencies
[19664] Fix | Delete
*/
[19665] Fix | Delete
[19666] Fix | Delete
[19667] Fix | Delete
[19668] Fix | Delete
[19669] Fix | Delete
/**
[19670] Fix | Delete
* Internal dependencies
[19671] Fix | Delete
*/
[19672] Fix | Delete
[19673] Fix | Delete
[19674] Fix | Delete
[19675] Fix | Delete
[19676] Fix | Delete
[19677] Fix | Delete
[19678] Fix | Delete
[19679] Fix | Delete
function UnitControl(_ref, ref) {
[19680] Fix | Delete
var _ref$__unstableStateR = _ref.__unstableStateReducer,
[19681] Fix | Delete
stateReducer = _ref$__unstableStateR === void 0 ? function (state) {
[19682] Fix | Delete
return state;
[19683] Fix | Delete
} : _ref$__unstableStateR,
[19684] Fix | Delete
_ref$autoComplete = _ref.autoComplete,
[19685] Fix | Delete
autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
[19686] Fix | Delete
className = _ref.className,
[19687] Fix | Delete
_ref$disabled = _ref.disabled,
[19688] Fix | Delete
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
[19689] Fix | Delete
_ref$disableUnits = _ref.disableUnits,
[19690] Fix | Delete
disableUnits = _ref$disableUnits === void 0 ? false : _ref$disableUnits,
[19691] Fix | Delete
_ref$isPressEnterToCh = _ref.isPressEnterToChange,
[19692] Fix | Delete
isPressEnterToChange = _ref$isPressEnterToCh === void 0 ? false : _ref$isPressEnterToCh,
[19693] Fix | Delete
_ref$isResetValueOnUn = _ref.isResetValueOnUnitChange,
[19694] Fix | Delete
isResetValueOnUnitChange = _ref$isResetValueOnUn === void 0 ? false : _ref$isResetValueOnUn,
[19695] Fix | Delete
_ref$isUnitSelectTabb = _ref.isUnitSelectTabbable,
[19696] Fix | Delete
isUnitSelectTabbable = _ref$isUnitSelectTabb === void 0 ? true : _ref$isUnitSelectTabb,
[19697] Fix | Delete
label = _ref.label,
[19698] Fix | Delete
_ref$onChange = _ref.onChange,
[19699] Fix | Delete
onChange = _ref$onChange === void 0 ? external_lodash_["noop"] : _ref$onChange,
[19700] Fix | Delete
_ref$onUnitChange = _ref.onUnitChange,
[19701] Fix | Delete
onUnitChange = _ref$onUnitChange === void 0 ? external_lodash_["noop"] : _ref$onUnitChange,
[19702] Fix | Delete
_ref$size = _ref.size,
[19703] Fix | Delete
size = _ref$size === void 0 ? 'default' : _ref$size,
[19704] Fix | Delete
style = _ref.style,
[19705] Fix | Delete
unitProp = _ref.unit,
[19706] Fix | Delete
_ref$units = _ref.units,
[19707] Fix | Delete
units = _ref$units === void 0 ? CSS_UNITS : _ref$units,
[19708] Fix | Delete
valueProp = _ref.value,
[19709] Fix | Delete
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["__unstableStateReducer", "autoComplete", "className", "disabled", "disableUnits", "isPressEnterToChange", "isResetValueOnUnitChange", "isUnitSelectTabbable", "label", "onChange", "onUnitChange", "size", "style", "unit", "units", "value"]);
[19710] Fix | Delete
[19711] Fix | Delete
var _getParsedValue = getParsedValue(valueProp, unitProp, units),
[19712] Fix | Delete
_getParsedValue2 = Object(slicedToArray["a" /* default */])(_getParsedValue, 2),
[19713] Fix | Delete
value = _getParsedValue2[0],
[19714] Fix | Delete
initialUnit = _getParsedValue2[1];
[19715] Fix | Delete
[19716] Fix | Delete
var _useControlledState = use_controlled_state(unitProp, {
[19717] Fix | Delete
initial: initialUnit
[19718] Fix | Delete
}),
[19719] Fix | Delete
_useControlledState2 = Object(slicedToArray["a" /* default */])(_useControlledState, 2),
[19720] Fix | Delete
unit = _useControlledState2[0],
[19721] Fix | Delete
setUnit = _useControlledState2[1]; // Stores parsed value for hand-off in state reducer
[19722] Fix | Delete
[19723] Fix | Delete
[19724] Fix | Delete
var refParsedValue = Object(external_wp_element_["useRef"])(null);
[19725] Fix | Delete
var classes = classnames_default()('components-unit-control', className);
[19726] Fix | Delete
[19727] Fix | Delete
var handleOnChange = function handleOnChange(next, changeProps) {
[19728] Fix | Delete
if (next === '') {
[19729] Fix | Delete
onChange('', changeProps);
[19730] Fix | Delete
return;
[19731] Fix | Delete
}
[19732] Fix | Delete
/*
[19733] Fix | Delete
* Customizing the onChange callback.
[19734] Fix | Delete
* This allows as to broadcast a combined value+unit to onChange.
[19735] Fix | Delete
*/
[19736] Fix | Delete
[19737] Fix | Delete
[19738] Fix | Delete
next = getValidParsedUnit(next, units, value, unit).join('');
[19739] Fix | Delete
onChange(next, changeProps);
[19740] Fix | Delete
};
[19741] Fix | Delete
[19742] Fix | Delete
var handleOnUnitChange = function handleOnUnitChange(next, changeProps) {
[19743] Fix | Delete
var data = changeProps.data;
[19744] Fix | Delete
var nextValue = "".concat(value).concat(next);
[19745] Fix | Delete
[19746] Fix | Delete
if (isResetValueOnUnitChange && (data === null || data === void 0 ? void 0 : data.default) !== undefined) {
[19747] Fix | Delete
nextValue = "".concat(data.default).concat(next);
[19748] Fix | Delete
}
[19749] Fix | Delete
[19750] Fix | Delete
onChange(nextValue, changeProps);
[19751] Fix | Delete
onUnitChange(next, changeProps);
[19752] Fix | Delete
setUnit(next);
[19753] Fix | Delete
};
[19754] Fix | Delete
[19755] Fix | Delete
var mayUpdateUnit = function mayUpdateUnit(event) {
[19756] Fix | Delete
if (!isNaN(event.target.value)) {
[19757] Fix | Delete
refParsedValue.current = null;
[19758] Fix | Delete
return;
[19759] Fix | Delete
}
[19760] Fix | Delete
[19761] Fix | Delete
var _getValidParsedUnit = getValidParsedUnit(event.target.value, units, value, unit),
[19762] Fix | Delete
_getValidParsedUnit2 = Object(slicedToArray["a" /* default */])(_getValidParsedUnit, 2),
[19763] Fix | Delete
parsedValue = _getValidParsedUnit2[0],
[19764] Fix | Delete
parsedUnit = _getValidParsedUnit2[1];
[19765] Fix | Delete
[19766] Fix | Delete
refParsedValue.current = parsedValue;
[19767] Fix | Delete
[19768] Fix | Delete
if (isPressEnterToChange && parsedUnit !== unit) {
[19769] Fix | Delete
var data = units.find(function (option) {
[19770] Fix | Delete
return option.value === parsedUnit;
[19771] Fix | Delete
});
[19772] Fix | Delete
var changeProps = {
[19773] Fix | Delete
event: event,
[19774] Fix | Delete
data: data
[19775] Fix | Delete
};
[19776] Fix | Delete
onChange("".concat(parsedValue).concat(parsedUnit), changeProps);
[19777] Fix | Delete
onUnitChange(parsedUnit, changeProps);
[19778] Fix | Delete
setUnit(parsedUnit);
[19779] Fix | Delete
}
[19780] Fix | Delete
};
[19781] Fix | Delete
[19782] Fix | Delete
var handleOnBlur = mayUpdateUnit;
[19783] Fix | Delete
[19784] Fix | Delete
var handleOnKeyDown = function handleOnKeyDown(event) {
[19785] Fix | Delete
var keyCode = event.keyCode;
[19786] Fix | Delete
[19787] Fix | Delete
if (keyCode === external_wp_keycodes_["ENTER"]) {
[19788] Fix | Delete
mayUpdateUnit(event);
[19789] Fix | Delete
}
[19790] Fix | Delete
};
[19791] Fix | Delete
/**
[19792] Fix | Delete
* "Middleware" function that intercepts updates from InputControl.
[19793] Fix | Delete
* This allows us to tap into actions to transform the (next) state for
[19794] Fix | Delete
* InputControl.
[19795] Fix | Delete
*
[19796] Fix | Delete
* @param {Object} state State from InputControl
[19797] Fix | Delete
* @param {Object} action Action triggering state change
[19798] Fix | Delete
* @return {Object} The updated state to apply to InputControl
[19799] Fix | Delete
*/
[19800] Fix | Delete
[19801] Fix | Delete
[19802] Fix | Delete
var unitControlStateReducer = function unitControlStateReducer(state, action) {
[19803] Fix | Delete
/*
[19804] Fix | Delete
* On commits (when pressing ENTER and on blur if
[19805] Fix | Delete
* isPressEnterToChange is true), if a parse has been performed
[19806] Fix | Delete
* then use that result to update the state.
[19807] Fix | Delete
*/
[19808] Fix | Delete
if (action.type === inputControlActionTypes.COMMIT) {
[19809] Fix | Delete
if (refParsedValue.current !== null) {
[19810] Fix | Delete
state.value = refParsedValue.current;
[19811] Fix | Delete
refParsedValue.current = null;
[19812] Fix | Delete
}
[19813] Fix | Delete
}
[19814] Fix | Delete
[19815] Fix | Delete
return state;
[19816] Fix | Delete
};
[19817] Fix | Delete
[19818] Fix | Delete
var inputSuffix = !disableUnits ? Object(external_wp_element_["createElement"])(UnitSelectControl, {
[19819] Fix | Delete
"aria-label": Object(external_wp_i18n_["__"])('Select unit'),
[19820] Fix | Delete
disabled: disabled,
[19821] Fix | Delete
isTabbable: isUnitSelectTabbable,
[19822] Fix | Delete
options: units,
[19823] Fix | Delete
onChange: handleOnUnitChange,
[19824] Fix | Delete
size: size,
[19825] Fix | Delete
value: unit
[19826] Fix | Delete
}) : null;
[19827] Fix | Delete
return Object(external_wp_element_["createElement"])(unit_control_styles_Root, {
[19828] Fix | Delete
className: "components-unit-control-wrapper",
[19829] Fix | Delete
style: style
[19830] Fix | Delete
}, Object(external_wp_element_["createElement"])(ValueInput, Object(esm_extends["a" /* default */])({
[19831] Fix | Delete
"aria-label": label,
[19832] Fix | Delete
type: isPressEnterToChange ? 'text' : 'number'
[19833] Fix | Delete
}, Object(external_lodash_["omit"])(props, ['children']), {
[19834] Fix | Delete
autoComplete: autoComplete,
[19835] Fix | Delete
className: classes,
[19836] Fix | Delete
disabled: disabled,
[19837] Fix | Delete
disableUnits: disableUnits,
[19838] Fix | Delete
isPressEnterToChange: isPressEnterToChange,
[19839] Fix | Delete
label: label,
[19840] Fix | Delete
onBlur: handleOnBlur,
[19841] Fix | Delete
onKeyDown: handleOnKeyDown,
[19842] Fix | Delete
onChange: handleOnChange,
[19843] Fix | Delete
ref: ref,
[19844] Fix | Delete
size: size,
[19845] Fix | Delete
suffix: inputSuffix,
[19846] Fix | Delete
value: value,
[19847] Fix | Delete
__unstableStateReducer: state_composeStateReducers(unitControlStateReducer, stateReducer)
[19848] Fix | Delete
})));
[19849] Fix | Delete
}
[19850] Fix | Delete
[19851] Fix | Delete
var ForwardedUnitControl = Object(external_wp_element_["forwardRef"])(UnitControl);
[19852] Fix | Delete
/* harmony default export */ var unit_control = (ForwardedUnitControl);
[19853] Fix | Delete
[19854] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/box-control/styles/box-control-styles.js
[19855] Fix | Delete
[19856] Fix | Delete
[19857] Fix | Delete
function box_control_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
[19858] Fix | Delete
[19859] Fix | Delete
/**
[19860] Fix | Delete
* External dependencies
[19861] Fix | Delete
*/
[19862] Fix | Delete
[19863] Fix | Delete
[19864] Fix | Delete
/**
[19865] Fix | Delete
* Internal dependencies
[19866] Fix | Delete
*/
[19867] Fix | Delete
[19868] Fix | Delete
[19869] Fix | Delete
[19870] Fix | Delete
var box_control_styles_Root = styled_base_browser_esm("div", {
[19871] Fix | Delete
target: "e7pk0lh0",
[19872] Fix | Delete
label: "Root"
[19873] Fix | Delete
})( true ? {
[19874] Fix | Delete
name: "vho1ao",
[19875] Fix | Delete
styles: "box-sizing:border-box;max-width:235px;padding-bottom:12px;width:100%;"
[19876] Fix | Delete
} : undefined);
[19877] Fix | Delete
var Header = /*#__PURE__*/styled_base_browser_esm(flex_Flex, {
[19878] Fix | Delete
target: "e7pk0lh1",
[19879] Fix | Delete
label: "Header"
[19880] Fix | Delete
})("color:", colors_color('ui.label'), ";padding-bottom:8px;" + ( true ? "" : undefined));
[19881] Fix | Delete
var HeaderControlWrapper = /*#__PURE__*/styled_base_browser_esm(flex_Flex, {
[19882] Fix | Delete
target: "e7pk0lh2",
[19883] Fix | Delete
label: "HeaderControlWrapper"
[19884] Fix | Delete
})( true ? {
[19885] Fix | Delete
name: "19de7qh",
[19886] Fix | Delete
styles: "min-height:30px;"
[19887] Fix | Delete
} : undefined);
[19888] Fix | Delete
var UnitControlWrapper = styled_base_browser_esm("div", {
[19889] Fix | Delete
target: "e7pk0lh3",
[19890] Fix | Delete
label: "UnitControlWrapper"
[19891] Fix | Delete
})( true ? {
[19892] Fix | Delete
name: "zypm0w",
[19893] Fix | Delete
styles: "box-sizing:border-box;max-width:80px;"
[19894] Fix | Delete
} : undefined);
[19895] Fix | Delete
var LayoutContainer = /*#__PURE__*/styled_base_browser_esm(flex_Flex, {
[19896] Fix | Delete
target: "e7pk0lh4",
[19897] Fix | Delete
label: "LayoutContainer"
[19898] Fix | Delete
})( true ? {
[19899] Fix | Delete
name: "39f89t",
[19900] Fix | Delete
styles: "justify-content:center;padding-top:8px;"
[19901] Fix | Delete
} : undefined);
[19902] Fix | Delete
var Layout = /*#__PURE__*/styled_base_browser_esm(flex_Flex, {
[19903] Fix | Delete
target: "e7pk0lh5",
[19904] Fix | Delete
label: "Layout"
[19905] Fix | Delete
})( true ? {
[19906] Fix | Delete
name: "ojqyia",
[19907] Fix | Delete
styles: "position:relative;height:100%;width:100%;"
[19908] Fix | Delete
} : undefined);
[19909] Fix | Delete
[19910] Fix | Delete
var box_control_styles_ref = true ? {
[19911] Fix | Delete
name: "icip60",
[19912] Fix | Delete
styles: "border-radius:2px;"
[19913] Fix | Delete
} : undefined;
[19914] Fix | Delete
[19915] Fix | Delete
var box_control_styles_ref2 = true ? {
[19916] Fix | Delete
name: "1k07npk",
[19917] Fix | Delete
styles: "border-radius:0;"
[19918] Fix | Delete
} : undefined;
[19919] Fix | Delete
[19920] Fix | Delete
var box_control_styles_unitControlBorderRadiusStyles = function unitControlBorderRadiusStyles(_ref3) {
[19921] Fix | Delete
var isFirst = _ref3.isFirst,
[19922] Fix | Delete
isLast = _ref3.isLast,
[19923] Fix | Delete
isOnly = _ref3.isOnly;
[19924] Fix | Delete
[19925] Fix | Delete
if (isFirst) {
[19926] Fix | Delete
return rtl_rtl({
[19927] Fix | Delete
borderTopRightRadius: 0,
[19928] Fix | Delete
borderBottomRightRadius: 0
[19929] Fix | Delete
})();
[19930] Fix | Delete
}
[19931] Fix | Delete
[19932] Fix | Delete
if (isLast) {
[19933] Fix | Delete
return rtl_rtl({
[19934] Fix | Delete
borderTopLeftRadius: 0,
[19935] Fix | Delete
borderBottomLeftRadius: 0
[19936] Fix | Delete
})();
[19937] Fix | Delete
}
[19938] Fix | Delete
[19939] Fix | Delete
if (isOnly) {
[19940] Fix | Delete
return box_control_styles_ref;
[19941] Fix | Delete
}
[19942] Fix | Delete
[19943] Fix | Delete
return box_control_styles_ref2;
[19944] Fix | Delete
};
[19945] Fix | Delete
[19946] Fix | Delete
var box_control_styles_unitControlMarginStyles = function unitControlMarginStyles(_ref4) {
[19947] Fix | Delete
var isFirst = _ref4.isFirst;
[19948] Fix | Delete
var marginLeft = isFirst ? 0 : -1;
[19949] Fix | Delete
return rtl_rtl({
[19950] Fix | Delete
marginLeft: marginLeft
[19951] Fix | Delete
})();
[19952] Fix | Delete
};
[19953] Fix | Delete
[19954] Fix | Delete
var box_control_styles_UnitControl = /*#__PURE__*/styled_base_browser_esm(unit_control, {
[19955] Fix | Delete
target: "e7pk0lh6",
[19956] Fix | Delete
label: "UnitControl"
[19957] Fix | Delete
})("max-width:60px;", box_control_styles_unitControlBorderRadiusStyles, ";", box_control_styles_unitControlMarginStyles, ";" + ( true ? "" : undefined));
[19958] Fix | Delete
[19959] Fix | Delete
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/box-control/unit-control.js
[19960] Fix | Delete
[19961] Fix | Delete
[19962] Fix | Delete
[19963] Fix | Delete
[19964] Fix | Delete
/**
[19965] Fix | Delete
* External dependencies
[19966] Fix | Delete
*/
[19967] Fix | Delete
[19968] Fix | Delete
[19969] Fix | Delete
/**
[19970] Fix | Delete
* Internal dependencies
[19971] Fix | Delete
*/
[19972] Fix | Delete
[19973] Fix | Delete
[19974] Fix | Delete
[19975] Fix | Delete
function BoxUnitControl(_ref) {
[19976] Fix | Delete
var isFirst = _ref.isFirst,
[19977] Fix | Delete
isLast = _ref.isLast,
[19978] Fix | Delete
isOnly = _ref.isOnly,
[19979] Fix | Delete
_ref$onHoverOn = _ref.onHoverOn,
[19980] Fix | Delete
onHoverOn = _ref$onHoverOn === void 0 ? external_lodash_["noop"] : _ref$onHoverOn,
[19981] Fix | Delete
_ref$onHoverOff = _ref.onHoverOff,
[19982] Fix | Delete
onHoverOff = _ref$onHoverOff === void 0 ? external_lodash_["noop"] : _ref$onHoverOff,
[19983] Fix | Delete
label = _ref.label,
[19984] Fix | Delete
value = _ref.value,
[19985] Fix | Delete
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["isFirst", "isLast", "isOnly", "onHoverOn", "onHoverOff", "label", "value"]);
[19986] Fix | Delete
[19987] Fix | Delete
var bindHoverGesture = useHover(function (_ref2) {
[19988] Fix | Delete
var event = _ref2.event,
[19989] Fix | Delete
state = Object(objectWithoutProperties["a" /* default */])(_ref2, ["event"]);
[19990] Fix | Delete
[19991] Fix | Delete
if (state.hovering) {
[19992] Fix | Delete
onHoverOn(event, state);
[19993] Fix | Delete
} else {
[19994] Fix | Delete
onHoverOff(event, state);
[19995] Fix | Delete
}
[19996] Fix | Delete
});
[19997] Fix | Delete
return Object(external_wp_element_["createElement"])(UnitControlWrapper, bindHoverGesture(), Object(external_wp_element_["createElement"])(Tooltip, {
[19998] Fix | Delete
text: label
[19999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function