471 lines
28 KiB
JavaScript
471 lines
28 KiB
JavaScript
"use strict";
|
|
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[8913],{
|
|
|
|
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/base-control/index.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Ay: () => (/* binding */ base_control)
|
|
});
|
|
|
|
// UNUSED EXPORTS: BaseControl, VisualLabel
|
|
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js
|
|
var react = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js
|
|
var classnames = __webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js");
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/visually-hidden/component.js + 1 modules
|
|
var component = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/visually-hidden/component.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@emotion+styled@11.11.0_@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2__@types+react@17.0.71_react@17.0.2/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js
|
|
var emotion_styled_base_browser_esm = __webpack_require__("../../node_modules/.pnpm/@emotion+styled@11.11.0_@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2__@types+react@17.0.71_react@17.0.2/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2/node_modules/@emotion/react/dist/emotion-react.browser.esm.js
|
|
var emotion_react_browser_esm = __webpack_require__("../../node_modules/.pnpm/@emotion+react@11.11.1_@types+react@17.0.71_react@17.0.2/node_modules/@emotion/react/dist/emotion-react.browser.esm.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/font.js + 1 modules
|
|
var font = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/font.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/colors-values.js + 1 modules
|
|
var colors_values = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/colors-values.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/utils/space.js
|
|
var space = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/ui/utils/space.js");
|
|
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/base-control/styles/base-control-styles.js
|
|
|
|
|
|
function _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)."; }
|
|
|
|
/**
|
|
* External dependencies
|
|
*/
|
|
|
|
/**
|
|
* Internal dependencies
|
|
*/
|
|
|
|
|
|
|
|
const Wrapper = (0,emotion_styled_base_browser_esm/* default */.A)("div", true ? {
|
|
target: "ej5x27r4"
|
|
} : 0)("font-family:", (0,font/* font */.g)('default.fontFamily'), ";font-size:", (0,font/* font */.g)('default.fontSize'), ";" + ( true ? "" : 0));
|
|
|
|
const deprecatedMarginField = _ref2 => {
|
|
let {
|
|
__nextHasNoMarginBottom = false
|
|
} = _ref2;
|
|
return !__nextHasNoMarginBottom && /*#__PURE__*/(0,emotion_react_browser_esm/* css */.AH)("margin-bottom:", (0,space/* space */.x)(2), ";" + ( true ? "" : 0), true ? "" : 0);
|
|
};
|
|
|
|
const StyledField = (0,emotion_styled_base_browser_esm/* default */.A)("div", true ? {
|
|
target: "ej5x27r3"
|
|
} : 0)(deprecatedMarginField, " .components-panel__row &{margin-bottom:inherit;}" + ( true ? "" : 0));
|
|
const labelStyles = /*#__PURE__*/(0,emotion_react_browser_esm/* css */.AH)("display:inline-block;margin-bottom:", (0,space/* space */.x)(2), ";" + ( true ? "" : 0), true ? "" : 0);
|
|
const StyledLabel = (0,emotion_styled_base_browser_esm/* default */.A)("label", true ? {
|
|
target: "ej5x27r2"
|
|
} : 0)(labelStyles, ";" + ( true ? "" : 0));
|
|
|
|
var _ref = true ? {
|
|
name: "11yad0w",
|
|
styles: "margin-bottom:revert"
|
|
} : 0;
|
|
|
|
const deprecatedMarginHelp = _ref3 => {
|
|
let {
|
|
__nextHasNoMarginBottom = false
|
|
} = _ref3;
|
|
return !__nextHasNoMarginBottom && _ref;
|
|
};
|
|
|
|
const StyledHelp = (0,emotion_styled_base_browser_esm/* default */.A)("p", true ? {
|
|
target: "ej5x27r1"
|
|
} : 0)("margin-top:", (0,space/* space */.x)(2), ";margin-bottom:0;font-size:", (0,font/* font */.g)('helpText.fontSize'), ";font-style:normal;color:", colors_values/* COLORS */.lm.mediumGray.text, ";", deprecatedMarginHelp, ";" + ( true ? "" : 0));
|
|
const StyledVisualLabel = (0,emotion_styled_base_browser_esm/* default */.A)("span", true ? {
|
|
target: "ej5x27r0"
|
|
} : 0)(labelStyles, ";" + ( true ? "" : 0));
|
|
//# sourceMappingURL=base-control-styles.js.map
|
|
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/base-control/index.js
|
|
|
|
|
|
/**
|
|
* External dependencies
|
|
*/
|
|
|
|
|
|
/**
|
|
* Internal dependencies
|
|
*/
|
|
|
|
|
|
/**
|
|
* `BaseControl` is a component used to generate labels and help text for components handling user inputs.
|
|
*
|
|
* @example
|
|
* // Render a `BaseControl` for a textarea input
|
|
* import { BaseControl } from '@wordpress/components';
|
|
*
|
|
* // The `id` prop is necessary to accessibly associate the label with the textarea
|
|
* const MyBaseControl = () => (
|
|
* <BaseControl id="textarea-1" label="Text" help="Enter some text" __nextHasNoMarginBottom={ true }>
|
|
* <textarea id="textarea-1" />
|
|
* </BaseControl>
|
|
* );
|
|
*/
|
|
|
|
const BaseControl = _ref => {
|
|
let {
|
|
__nextHasNoMarginBottom = false,
|
|
id,
|
|
label,
|
|
hideLabelFromVision = false,
|
|
help,
|
|
className,
|
|
children
|
|
} = _ref;
|
|
return (0,react.createElement)(Wrapper, {
|
|
className: classnames_default()('components-base-control', className)
|
|
}, (0,react.createElement)(StyledField, {
|
|
className: "components-base-control__field" // TODO: Official deprecation for this should start after all internal usages have been migrated
|
|
,
|
|
__nextHasNoMarginBottom: __nextHasNoMarginBottom
|
|
}, label && id && (hideLabelFromVision ? (0,react.createElement)(component/* default */.A, {
|
|
as: "label",
|
|
htmlFor: id
|
|
}, label) : (0,react.createElement)(StyledLabel, {
|
|
className: "components-base-control__label",
|
|
htmlFor: id
|
|
}, label)), label && !id && (hideLabelFromVision ? (0,react.createElement)(component/* default */.A, {
|
|
as: "label"
|
|
}, label) : (0,react.createElement)(BaseControl.VisualLabel, null, label)), children), !!help && (0,react.createElement)(StyledHelp, {
|
|
id: id ? id + '__help' : undefined,
|
|
className: "components-base-control__help",
|
|
__nextHasNoMarginBottom: __nextHasNoMarginBottom
|
|
}, help));
|
|
};
|
|
/**
|
|
* `BaseControl.VisualLabel` is used to render a purely visual label inside a `BaseControl` component.
|
|
*
|
|
* It should only be used in cases where the children being rendered inside `BaseControl` are already accessibly labeled,
|
|
* e.g., a button, but we want an additional visual label for that section equivalent to the labels `BaseControl` would
|
|
* otherwise use if the `label` prop was passed.
|
|
*
|
|
* @example
|
|
* import { BaseControl } from '@wordpress/components';
|
|
*
|
|
* const MyBaseControl = () => (
|
|
* <BaseControl help="This button is already accessibly labeled.">
|
|
* <BaseControl.VisualLabel>Author</BaseControl.VisualLabel>
|
|
* <Button>Select an author</Button>
|
|
* </BaseControl>
|
|
* );
|
|
*/
|
|
|
|
const VisualLabel = _ref2 => {
|
|
let {
|
|
className,
|
|
children
|
|
} = _ref2;
|
|
return (0,react.createElement)(StyledVisualLabel, {
|
|
className: classnames_default()('components-base-control__label', className)
|
|
}, children);
|
|
};
|
|
BaseControl.VisualLabel = VisualLabel;
|
|
/* harmony default export */ const base_control = (BaseControl);
|
|
//# sourceMappingURL=index.js.map
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/colors-values.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
lm: () => (/* binding */ COLORS)
|
|
});
|
|
|
|
// UNUSED EXPORTS: ADMIN, ALERT, BASE, BLUE, DARK_GRAY, DARK_OPACITY, DARK_OPACITY_LIGHT, G2, LIGHT_GRAY, LIGHT_OPACITY_LIGHT, UI, default
|
|
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js
|
|
var lodash = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/index.mjs
|
|
var colord = __webpack_require__("../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/index.mjs");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/plugins/names.mjs
|
|
var names = __webpack_require__("../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/plugins/names.mjs");
|
|
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/colors.js
|
|
/**
|
|
* External dependencies
|
|
*/
|
|
|
|
|
|
(0,colord/* extend */.X$)([names/* default */.A]);
|
|
/**
|
|
* Generating a CSS compliant rgba() color value.
|
|
*
|
|
* @param {string} hexValue The hex value to convert to rgba().
|
|
* @param {number} alpha The alpha value for opacity.
|
|
* @return {string} The converted rgba() color value.
|
|
*
|
|
* @example
|
|
* rgba( '#000000', 0.5 )
|
|
* // rgba(0, 0, 0, 0.5)
|
|
*/
|
|
|
|
function rgba() {
|
|
let hexValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
return (0,colord/* colord */.Mj)(hexValue).alpha(alpha).toRgbString();
|
|
}
|
|
//# sourceMappingURL=colors.js.map
|
|
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/colors-values.js
|
|
/**
|
|
* External dependencies
|
|
*/
|
|
|
|
/**
|
|
* Internal dependencies
|
|
*/
|
|
|
|
|
|
const BASE = {
|
|
black: '#000',
|
|
white: '#fff'
|
|
};
|
|
/**
|
|
* TODO: Continue to update values as "G2" design evolves.
|
|
*
|
|
* "G2" refers to the movement to advance the interface of the block editor.
|
|
* https://github.com/WordPress/gutenberg/issues/18667
|
|
*/
|
|
|
|
const G2 = {
|
|
blue: {
|
|
medium: {
|
|
focus: '#007cba',
|
|
focusDark: '#fff'
|
|
}
|
|
},
|
|
gray: {
|
|
900: '#1e1e1e',
|
|
700: '#757575',
|
|
// Meets 4.6:1 text contrast against white.
|
|
600: '#949494',
|
|
// Meets 3:1 UI or large text contrast against white.
|
|
400: '#ccc',
|
|
300: '#ddd',
|
|
// Used for most borders.
|
|
200: '#e0e0e0',
|
|
// Used sparingly for light borders.
|
|
100: '#f0f0f0' // Used for light gray backgrounds.
|
|
|
|
},
|
|
darkGray: {
|
|
primary: '#1e1e1e',
|
|
heading: '#050505'
|
|
},
|
|
mediumGray: {
|
|
text: '#757575'
|
|
},
|
|
lightGray: {
|
|
ui: '#949494',
|
|
secondary: '#ccc',
|
|
tertiary: '#e7e8e9'
|
|
}
|
|
};
|
|
const DARK_GRAY = {
|
|
900: '#191e23',
|
|
800: '#23282d',
|
|
700: '#32373c',
|
|
600: '#40464d',
|
|
500: '#555d66',
|
|
// Use this most of the time for dark items.
|
|
400: '#606a73',
|
|
300: '#6c7781',
|
|
// Lightest gray that can be used for AA text contrast.
|
|
200: '#7e8993',
|
|
150: '#8d96a0',
|
|
// Lightest gray that can be used for AA non-text contrast.
|
|
100: '#8f98a1',
|
|
placeholder: rgba(G2.gray[900], 0.62)
|
|
};
|
|
const DARK_OPACITY = {
|
|
900: rgba('#000510', 0.9),
|
|
800: rgba('#00000a', 0.85),
|
|
700: rgba('#06060b', 0.8),
|
|
600: rgba('#000913', 0.75),
|
|
500: rgba('#0a1829', 0.7),
|
|
400: rgba('#0a1829', 0.65),
|
|
300: rgba('#0e1c2e', 0.62),
|
|
200: rgba('#162435', 0.55),
|
|
100: rgba('#223443', 0.5),
|
|
backgroundFill: rgba(DARK_GRAY[700], 0.7)
|
|
};
|
|
const DARK_OPACITY_LIGHT = {
|
|
900: rgba('#304455', 0.45),
|
|
800: rgba('#425863', 0.4),
|
|
700: rgba('#667886', 0.35),
|
|
600: rgba('#7b86a2', 0.3),
|
|
500: rgba('#9197a2', 0.25),
|
|
400: rgba('#95959c', 0.2),
|
|
300: rgba('#829493', 0.15),
|
|
200: rgba('#8b8b96', 0.1),
|
|
100: rgba('#747474', 0.05)
|
|
};
|
|
const LIGHT_GRAY = {
|
|
900: '#a2aab2',
|
|
800: '#b5bcc2',
|
|
700: '#ccd0d4',
|
|
600: '#d7dade',
|
|
500: '#e2e4e7',
|
|
// Good for "grayed" items and borders.
|
|
400: '#e8eaeb',
|
|
// Good for "readonly" input fields and special text selection.
|
|
300: '#edeff0',
|
|
200: '#f3f4f5',
|
|
100: '#f8f9f9',
|
|
placeholder: rgba(BASE.white, 0.65)
|
|
};
|
|
const LIGHT_OPACITY_LIGHT = {
|
|
900: rgba(BASE.white, 0.5),
|
|
800: rgba(BASE.white, 0.45),
|
|
700: rgba(BASE.white, 0.4),
|
|
600: rgba(BASE.white, 0.35),
|
|
500: rgba(BASE.white, 0.3),
|
|
400: rgba(BASE.white, 0.25),
|
|
300: rgba(BASE.white, 0.2),
|
|
200: rgba(BASE.white, 0.15),
|
|
100: rgba(BASE.white, 0.1),
|
|
backgroundFill: rgba(LIGHT_GRAY[300], 0.8)
|
|
}; // Additional colors.
|
|
// Some are from https://make.wordpress.org/design/handbook/foundations/colors/.
|
|
|
|
const BLUE = {
|
|
wordpress: {
|
|
700: '#00669b'
|
|
},
|
|
dark: {
|
|
900: '#0071a1'
|
|
},
|
|
medium: {
|
|
900: '#006589',
|
|
800: '#00739c',
|
|
700: '#007fac',
|
|
600: '#008dbe',
|
|
500: '#00a0d2',
|
|
400: '#33b3db',
|
|
300: '#66c6e4',
|
|
200: '#bfe7f3',
|
|
100: '#e5f5fa',
|
|
highlight: '#b3e7fe',
|
|
focus: '#007cba'
|
|
}
|
|
};
|
|
const ALERT = {
|
|
yellow: '#f0b849',
|
|
red: '#d94f4f',
|
|
green: '#4ab866'
|
|
};
|
|
const ADMIN = {
|
|
theme: `var( --wp-admin-theme-color, ${BLUE.wordpress[700]})`,
|
|
themeDark10: `var( --wp-admin-theme-color-darker-10, ${BLUE.medium.focus})`
|
|
}; // Namespaced values for raw colors hex codes.
|
|
|
|
const UI = {
|
|
theme: ADMIN.theme,
|
|
background: BASE.white,
|
|
backgroundDisabled: LIGHT_GRAY[200],
|
|
border: G2.gray[700],
|
|
borderHover: G2.gray[700],
|
|
borderFocus: ADMIN.themeDark10,
|
|
borderDisabled: G2.gray[400],
|
|
borderLight: G2.gray[300],
|
|
label: DARK_GRAY[500],
|
|
textDisabled: DARK_GRAY[150],
|
|
textDark: BASE.white,
|
|
textLight: BASE.black
|
|
}; // Using Object.assign instead of { ...spread } syntax helps TypeScript
|
|
// to extract the correct type defs here.
|
|
|
|
const COLORS = Object.assign({}, BASE, {
|
|
darkGray: (0,lodash.merge)({}, DARK_GRAY, G2.darkGray),
|
|
darkOpacity: DARK_OPACITY,
|
|
darkOpacityLight: DARK_OPACITY_LIGHT,
|
|
mediumGray: G2.mediumGray,
|
|
gray: G2.gray,
|
|
lightGray: (0,lodash.merge)({}, LIGHT_GRAY, G2.lightGray),
|
|
lightGrayLight: LIGHT_OPACITY_LIGHT,
|
|
blue: (0,lodash.merge)({}, BLUE, G2.blue),
|
|
alert: ALERT,
|
|
admin: ADMIN,
|
|
ui: UI
|
|
});
|
|
/* harmony default export */ const colors_values = ((/* unused pure expression or super */ null && (COLORS)));
|
|
//# sourceMappingURL=colors-values.js.map
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/font.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
g: () => (/* binding */ font)
|
|
});
|
|
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js
|
|
var lodash = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js");
|
|
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/font-values.js
|
|
/* harmony default export */ const font_values = ({
|
|
'default.fontFamily': "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif",
|
|
'default.fontSize': '13px',
|
|
'helpText.fontSize': '12px',
|
|
mobileTextMinFontSize: '16px'
|
|
});
|
|
//# sourceMappingURL=font-values.js.map
|
|
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/utils/font.js
|
|
/**
|
|
* External dependencies
|
|
*/
|
|
|
|
/**
|
|
* Internal dependencies
|
|
*/
|
|
|
|
|
|
/**
|
|
*
|
|
* @param {keyof FONT} value Path of value from `FONT`
|
|
* @return {string} Font rule value
|
|
*/
|
|
|
|
function font(value) {
|
|
return (0,lodash.get)(font_values, value, '');
|
|
}
|
|
//# sourceMappingURL=font.js.map
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/index.mjs":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Mj: () => (/* binding */ w),
|
|
/* harmony export */ X$: () => (/* binding */ k)
|
|
/* harmony export */ });
|
|
/* unused harmony exports Colord, getFormat, random */
|
|
var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return{r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o=function(r){return{r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},i=/^#([0-9a-f]{3,8})$/i,s=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},g=function(r){return{h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},d=function(r){return{h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},f=function(r){return b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},c=function(r){return{h:(t=h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},l=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y={string:[[function(r){var t=i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(t){var n=l.exec(t)||p.exec(t);if(!n)return null;var e,u,a=g({h:(e=n[1],u=n[2],void 0===u&&(u="deg"),Number(e)*(r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(a)},"hsl"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},"rgb"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return f(i)},"hsl"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return{h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return b(h)},"hsv"]]},N=function(r,t){for(var n=0;n<t.length;n++){var e=t[n][0](r);if(e)return[e,t[n][1]]}return[null,void 0]},x=function(r){return"string"==typeof r?N(r.trim(),y.string):"object"==typeof r&&null!==r?N(r,y.object):[null,void 0]},I=function(r){return x(r)[1]},M=function(r,t){var n=c(r);return{h:n.h,s:e(n.s+100*t,0,100),l:n.l,a:n.a}},H=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},$=function(r,t){var n=c(r);return{h:n.h,s:n.s,l:e(n.l+100*t,0,100),a:n.a}},j=function(){function r(r){this.parsed=x(r)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return null!==this.parsed},r.prototype.brightness=function(){return n(H(this.rgba),2)},r.prototype.isDark=function(){return H(this.rgba)<.5},r.prototype.isLight=function(){return H(this.rgba)>=.5},r.prototype.toHex=function(){return r=o(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?s(n(255*a)):"","#"+s(t)+s(e)+s(u)+i;var r,t,e,u,a,i},r.prototype.toRgb=function(){return o(this.rgba)},r.prototype.toRgbString=function(){return r=o(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?"rgba("+t+", "+n+", "+e+", "+u+")":"rgb("+t+", "+n+", "+e+")";var r,t,n,e,u},r.prototype.toHsl=function(){return d(c(this.rgba))},r.prototype.toHslString=function(){return r=d(c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?"hsla("+t+", "+n+"%, "+e+"%, "+u+")":"hsl("+t+", "+n+"%, "+e+"%)";var r,t,n,e,u},r.prototype.toHsv=function(){return r=h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r},r.prototype.invert=function(){return w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,-r))},r.prototype.grayscale=function(){return w(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),w($(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),w($(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return"number"==typeof r?w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=c(this.rgba);return"number"==typeof r?w({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===w(r).toHex()},r}(),w=function(r){return r instanceof j?r:new j(r)},S=[],k=function(r){r.forEach(function(r){S.indexOf(r)<0&&(r(j,y),S.push(r))})},E=function(){return new j({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/colord@2.9.3/node_modules/colord/plugins/names.mjs":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ A: () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(e,f){var a={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var d,i,n=r[this.toHex()];if(n)return n;if(null==f?void 0:f.closest){var o=this.toRgb(),t=1/0,b="black";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=o,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));u<t&&(t=u,b=g)}return b}};f.string.push([function(f){var r=f.toLowerCase(),d="transparent"===r?"#0000":a[r];return d?new e(d).toRgb():null},"name"])}
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |