Add coexistence checks to all enqueue methods to prevent loading both React and Grid.js assets simultaneously. Changes: - ReactAdmin.php: Only enqueue React assets when ?react=1 - Init.php: Skip Grid.js when React active on admin pages - Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0 - Customer.php, Product.php, License.php: Add coexistence checks Now the toggle between Classic and React versions works correctly. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
90 lines
3.5 KiB
JavaScript
90 lines
3.5 KiB
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = void 0;
|
|
var _space = require("./space");
|
|
var _colorsValues = require("./colors-values");
|
|
/**
|
|
* Internal dependencies
|
|
*/
|
|
|
|
const CONTROL_HEIGHT = '36px';
|
|
const CONTROL_PADDING_X = '12px';
|
|
const CONTROL_PROPS = {
|
|
controlSurfaceColor: _colorsValues.COLORS.white,
|
|
controlTextActiveColor: _colorsValues.COLORS.theme.accent,
|
|
controlPaddingX: CONTROL_PADDING_X,
|
|
controlPaddingXLarge: `calc(${CONTROL_PADDING_X} * 1.3334)`,
|
|
controlPaddingXSmall: `calc(${CONTROL_PADDING_X} / 1.3334)`,
|
|
controlBackgroundColor: _colorsValues.COLORS.white,
|
|
controlBorderRadius: '2px',
|
|
controlBoxShadow: 'transparent',
|
|
controlBoxShadowFocus: `0 0 0 0.5px ${_colorsValues.COLORS.theme.accent}`,
|
|
controlDestructiveBorderColor: _colorsValues.COLORS.alert.red,
|
|
controlHeight: CONTROL_HEIGHT,
|
|
controlHeightXSmall: `calc( ${CONTROL_HEIGHT} * 0.6 )`,
|
|
controlHeightSmall: `calc( ${CONTROL_HEIGHT} * 0.8 )`,
|
|
controlHeightLarge: `calc( ${CONTROL_HEIGHT} * 1.2 )`,
|
|
controlHeightXLarge: `calc( ${CONTROL_HEIGHT} * 1.4 )`
|
|
};
|
|
const TOGGLE_GROUP_CONTROL_PROPS = {
|
|
toggleGroupControlBackgroundColor: CONTROL_PROPS.controlBackgroundColor,
|
|
toggleGroupControlBorderColor: _colorsValues.COLORS.ui.border,
|
|
toggleGroupControlBackdropBackgroundColor: CONTROL_PROPS.controlSurfaceColor,
|
|
toggleGroupControlBackdropBorderColor: _colorsValues.COLORS.ui.border,
|
|
toggleGroupControlButtonColorActive: CONTROL_PROPS.controlBackgroundColor
|
|
};
|
|
|
|
// Using Object.assign to avoid creating circular references when emitting
|
|
// TypeScript type declarations.
|
|
var _default = Object.assign({}, CONTROL_PROPS, TOGGLE_GROUP_CONTROL_PROPS, {
|
|
colorDivider: 'rgba(0, 0, 0, 0.1)',
|
|
colorScrollbarThumb: 'rgba(0, 0, 0, 0.2)',
|
|
colorScrollbarThumbHover: 'rgba(0, 0, 0, 0.5)',
|
|
colorScrollbarTrack: 'rgba(0, 0, 0, 0.04)',
|
|
elevationIntensity: 1,
|
|
radiusBlockUi: '2px',
|
|
borderWidth: '1px',
|
|
borderWidthFocus: '1.5px',
|
|
borderWidthTab: '4px',
|
|
spinnerSize: 16,
|
|
fontSize: '13px',
|
|
fontSizeH1: 'calc(2.44 * 13px)',
|
|
fontSizeH2: 'calc(1.95 * 13px)',
|
|
fontSizeH3: 'calc(1.56 * 13px)',
|
|
fontSizeH4: 'calc(1.25 * 13px)',
|
|
fontSizeH5: '13px',
|
|
fontSizeH6: 'calc(0.8 * 13px)',
|
|
fontSizeInputMobile: '16px',
|
|
fontSizeMobile: '15px',
|
|
fontSizeSmall: 'calc(0.92 * 13px)',
|
|
fontSizeXSmall: 'calc(0.75 * 13px)',
|
|
fontLineHeightBase: '1.2',
|
|
fontWeight: 'normal',
|
|
fontWeightHeading: '600',
|
|
gridBase: '4px',
|
|
cardBorderRadius: '2px',
|
|
cardPaddingXSmall: `${(0, _space.space)(2)}`,
|
|
cardPaddingSmall: `${(0, _space.space)(4)}`,
|
|
cardPaddingMedium: `${(0, _space.space)(4)} ${(0, _space.space)(6)}`,
|
|
cardPaddingLarge: `${(0, _space.space)(6)} ${(0, _space.space)(8)}`,
|
|
popoverShadow: `0 0.7px 1px rgba(0, 0, 0, 0.1), 0 1.2px 1.7px -0.2px rgba(0, 0, 0, 0.1), 0 2.3px 3.3px -0.5px rgba(0, 0, 0, 0.1)`,
|
|
surfaceBackgroundColor: _colorsValues.COLORS.white,
|
|
surfaceBackgroundSubtleColor: '#F3F3F3',
|
|
surfaceBackgroundTintColor: '#F5F5F5',
|
|
surfaceBorderColor: 'rgba(0, 0, 0, 0.1)',
|
|
surfaceBorderBoldColor: 'rgba(0, 0, 0, 0.15)',
|
|
surfaceBorderSubtleColor: 'rgba(0, 0, 0, 0.05)',
|
|
surfaceBackgroundTertiaryColor: _colorsValues.COLORS.white,
|
|
surfaceColor: _colorsValues.COLORS.white,
|
|
transitionDuration: '200ms',
|
|
transitionDurationFast: '160ms',
|
|
transitionDurationFaster: '120ms',
|
|
transitionDurationFastest: '100ms',
|
|
transitionTimingFunction: 'cubic-bezier(0.08, 0.52, 0.52, 1)',
|
|
transitionTimingFunctionControl: 'cubic-bezier(0.12, 0.8, 0.32, 1)'
|
|
});
|
|
exports.default = _default;
|
|
//# sourceMappingURL=config-values.js.map
|