fix: prevent asset conflicts between React and Grid.js versions

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>
This commit is contained in:
dwindown
2026-04-18 17:02:14 +07:00
parent bd9cdac02e
commit e8fbfb14c1
74973 changed files with 6658406 additions and 71 deletions

2095
node_modules/@wordpress/components/CHANGELOG.md generated vendored Normal file

File diff suppressed because it is too large Load Diff

593
node_modules/@wordpress/components/CONTRIBUTING.md generated vendored Normal file
View File

@@ -0,0 +1,593 @@
# Contributing
Thank you for taking the time to contribute.
The following is a set of guidelines for contributing to the `@wordpress/components` package to be considered in addition to the general ones described in our [Contributing Policy](/CONTRIBUTING.md).
This set of guidelines should apply especially to newly introduced components. In fact, while these guidelines should also be retroactively applied to existing components, it is sometimes impossible to do so for legacy/compatibility reasons.
For an example of a component that follows these requirements, take a look at [`ItemGroup`](/packages/components/src/item-group).
- [Introducing new components](#introducing-new-components)
- [Compatibility](#compatibility)
- [Compound components](#compound-components)
- [Components & Hooks](#components--hooks)
- [TypeScript](#typescript)
- [Styling](#styling)
- [Context system](#context-system)
- [Unit tests](#unit-tests)
- [Storybook](#storybook)
- [Documentation](#documentation)
- [README example](#README-example)
- [Folder structure](#folder-structure)
## Introducing new components
### Does it belong in the component library?
A component library should include components that are generic and flexible enough to work across a variety of products. It should include whats shared across many products and omit whats not.
To determine if a component should be added, ask yourself:
- Could this component be used by other products/plugins?
- Does the new component overlap (in functionality or visual design) with any existing components?
- How much effort will be required to make and maintain?
- Is there a clear purpose for the component?
Heres a flowchart that can help determine if a new component is necessary:
[![New component flowchart](https://wordpress.org/gutenberg/files/2019/07/New_component_flowchart.png)](https://coggle.it/diagram/WtUSrld3uAYZHsn-/t/new-ui-component/992b38cbe685d897b4aec6d0dd93cc4b47c06e0d4484eeb0d7d9a47fb2c48d94)
### First steps
If you have a component you'd like added or changed, start by opening a GitHub issue. Include a detailed description in which you:
- Explain the rationale
- Detail the intended behavior
- Clarify whether its a variation of an existing component, or a new asset
- Include mockups of any fidelity (optional)
- Include any inspirations from other products (optional)
This issue will be used to discuss the proposed changes and track progress. Reviewers start by discussing the proposal to determine if it's appropriate for WordPress Components, or if there's overlap with an existing component.
Its encouraged to surface works-in-progress. If youre not able to complete all of the parts yourself, someone in the community may be able to pick up where you left off.
### Next steps
Once the team has discussed and approved the change, it's time to start implementing it.
1. **Provide a rationale**: Explain how your component will add value to the system and the greater product ecosystem. Be sure to include any user experience and interaction descriptions.
2. **Draft documentation**: New components need development, design, and accessibility guidelines. Additionally, if your change adds additional behavior or expands a components features, those changes will need to be fully documented as well. Read through existing component documentation for examples. Start with a rough draft, and reviewers will help polish documentation.
3. **Provide working code**: The component or enhancement must be built in React. See the [developer contribution guidelines](https://github.com/WordPress/gutenberg/blob/HEAD/docs/contributors/code/README.md).
4. **Create a design spec**: Create sizing and styling annotations for all aspects of the component. This spec should provide a developer with everything they need to create the design in code. [Figma automatically does this for you](https://help.figma.com/article/32-developer-handoff).
Remember, its unlikely that all parts will be done by one person. Contribute where you can, and others will help.
### Component refinement
Before a component is published it will need to be fine-tuned:
1. **Expand** the features of the component to a minimum. Agree on what features should be included.
2. **Reduce** scope and leave off features lacking consensus.
3. **Quality assurance**: each contribution must adhere to system standards.
#### Quality assurance
To ensure quality, each component should be tested. The testing process should be done during the development of the component and before the component is published.
- **Accessibility**: Has the design and implementation accounted for accessibility? Please use the [WordPress accessibility guidelines](https://make.wordpress.org/accessibility/handbook/best-practices/). You must use the "Needs Accessibility Feedback" label and get a review from the accessibility team. It's best to request a review early (at the documentation stage) in order to ensure the component is designed inclusively from the outset.
- **Visual quality**: Does the component apply visual stylecolor, typography, icons, space, borders, and moreusing appropriate variables, and does it follow [visual guidelines](https://make.wordpress.org/design/handbook/design-guide/)? You must use the "Needs Design Feedback" label and get a review from the design team.
- **Documentation**: Ensure that the component has proper documentation for development, design, and accessibility.
- **Sufficient states & variations**: Does it cover all the necessary variations (primary, secondary, dense, etc.) and states (default, hover, active, disabled, loading, etc.), within the intended scope?
- **Functionality**: Do all behaviors function as expected?
- **Responsiveness**: Does it incorporate responsive behaviors as needed? Is the component designed from a mobile-first perspective? Do all touch interactions work as expected?
- **Content resilience**: Is each dynamic word or image element resilient to too much, too little, and no content at all, respectively? How long can labels be, and what happens when you run out of space?
- **Composability**: Does it fit well when placed next to or layered with other components to form a larger composition?
- **Browser support**: Has the component visual quality and accuracy been checked across Safari, Chrome, Firefox, IE, etc? Please adhere to our [browser support requirements](https://github.com/WordPress/gutenberg/blob/HEAD/packages/browserslist-config/index.js).
## Compatibility
The `@wordpress/components` package includes components that are relied upon by many developers across different projects. It is, therefore, very important to avoid introducing breaking changes.
In these situations, one possible approach is to "soft-deprecate" a given legacy API. This is achieved by:
1. Removing traces of the API from the docs, while still supporting it in code.
2. Updating all places in Gutenberg that use that API.
3. Adding deprecation warnings (only after the previous point is completed, otherwise the Browser Console will be polluted by all those warnings and some e2e tests may fail).
When adding new components or new props to existing components, it's recommended to prefix them with `__unstable` or `__experimental` until they're stable enough to be exposed as part of the public API.
### Learn more
- [How to preserve backward compatibility for a React Component](/docs/contributors/code/backward-compatibility.md#how-to-preserve-backward-compatibility-for-a-react-component)
- [Experimental and Unstable APIs](/docs/contributors/code/coding-guidelines.md#experimental-and-unstable-apis)
- [Deprecating styles](#deprecating-styles)
<!-- ## Polymorphic Components (i.e. the `as` prop)
The primary way to compose components is through the `as` prop. This prop can be used to change the underlying element used to render a component, e.g.:
```tsx
function LinkButton( { href, children } ) {
return <Button variant="primary" as="a" href={href}>{ children }</Button>;
}
```
-->
## Compound components
When creating components that render a list of subcomponents, prefer to expose the API using the [Compound Components](https://kentcdodds.com/blog/compound-components-with-react-hooks) technique over array props like `items` or `options`:
```jsx
// ❌ Don't:
<List
items={ [
{ value: 'Item 1' },
{ value: 'Item 2' },
{ value: 'Item 3' },
] }
/>
```
```jsx
// ✅ Do:
<List>
<ListItem value="Item 1" />
<ListItem value="Item 2" />
<ListItem value="Item 3" />
</List>
```
When implementing this pattern, avoid using `React.Children.map` and `React.cloneElement` to map through the children and augment them. Instead, use React Context to provide state to subcomponents and connect them:
```jsx
// ❌ Don't:
function List ( props ) {
const [ state, setState ] = useState();
return (
<div { ...props }>
{ Children.map( props.children, ( child ) => cloneElement( child, { state } ) ) ) }
</div>
);
}
```
```jsx
// ✅ Do:
const ListContext = createContext();
function List( props ) {
const [ state, setState ] = useState();
return (
<ListContext.Provider value={ state }>
<div { ...props } />
</ListContext.Provider>
);
}
function ListItem( props ) {
const state = useContext( ListContext );
...
}
```
<!-- ## (Semi-)Controlled components
TBD
## Layout "responsibilities"
TBD — Components' layout responsibilities and boundaries (i.e., a component should only affect the layout of its children, not its own) -->
## Components & Hooks
One way to enable reusability and composition is to extract a component's underlying logic into a hook (living in a separate `hook.ts` file). The actual component (usually defined in a `component.tsx` file) can then invoke the hook and use its output to render the required DOM elements. For example:
```tsx
// in `hook.ts`
function useExampleComponent( props: PolymorphicComponentProps< ExampleProps, 'div' > ) {
// Merge received props with the context system.
const { isVisible, className, ...otherProps } = useContextSystem( props, 'Example' );
// Any other reusable rendering logic (e.g. computing className, state, event listeners...)
const cx = useCx();
const classes = useMemo(
() =>
cx(
styles.example,
isVisible && styles.visible,
className
),
[ className, isVisible ]
);
return {
...otherProps,
className: classes
};
}
// in `component.tsx`
function Example(
props: PolymorphicComponentProps< ExampleProps, 'div' >,
forwardedRef: React.ForwardedRef< any >
) {
const exampleProps = useExampleComponent( props );
return <View { ...spacerProps } ref={ forwardedRef } />;
}
```
A couple of good examples of how hooks are used for composition are:
- the `Card` component, which builds on top of the `Surface` component by [calling the `useSurface` hook inside its own hook](/packages/components/src/card/card/hook.ts);
- the `HStack` component, which builds on top of the `Flex` component and [calls the `useFlex` hook inside its own hook](/packages/components/src/h-stack/hook.tsx).
<!-- ## API Consinstency
[To be expanded] E.g.:
- Boolean component props should be prefixed with `is*` (e.g. `isChecked`), `has*` (e.g. `hasValue`) or `enable*` (e.g. `enableScroll`)
- Event callback props should be prefixed with `on*` (e.g. `onChanged`)
- Subcomponents naming conventions (e.g `CardBody` instead of `Card.Body`)
- ...
## Performance
TDB -->
## TypeScript
We strongly encourage using TypeScript for all new components.
Extend existing components props if possible, especially when a component internally forwards its props to another component in the package:
```ts
type NumberControlProps = Omit<
InputControlProps,
'isDragEnabled' | 'min' | 'max'
> & {
/* Additional props specific to NumberControl */
};
```
Use JSDocs syntax for each TypeScript property that is part of the public API of a component. The docs used here should be aligned with the components README. Add `@default` values where appropriate:
```ts
/**
* Renders with elevation styles (box shadow).
*
* @default false
* @deprecated
*/
isElevated?: boolean;
```
Prefer `unknown` to `any`, and in general avoid it when possible.
If the component forwards its `...restProps` to an underlying element/component, you should use the `WordPressComponentProps` type for the component's props:
```ts
import type { WordPressComponentProps } from '../context';
import type { ComponentOwnProps } from './types';
function UnconnectedMyComponent(
// The resulting type will include:
// - all props defined in `ComponentOwnProps`
// - all HTML props/attributes from the component specified as the second
// parameter (`div` in this example)
// - the special `as` prop (which marks the component as polymorphic),
// unless the third parameter is `false`
props: WordPressComponentProps< ComponentOwnProps, 'div', true >
) { /* ... */ }
```
### Considerations for the docgen
Make sure you have a **named** export for the component, not just the default export ([example](https://github.com/WordPress/gutenberg/blob/trunk/packages/components/src/divider/component.tsx)). This ensures that the docgen can properly extract the types data. The naming should be so that the connected/forwarded component has the plain component name (`MyComponent`), and the raw component is prefixed (`UnconnectedMyComponent` or `UnforwardedMyComponent`). This makes the component's `displayName` look nicer in React devtools and in the autogenerated Storybook code snippets.
```js
function UnconnectedMyComponent() { /* ... */ }
// 👇 Without this named export, the docgen will not work!
export const MyComponent = contextConnect( UnconnectedMyComponent, 'MyComponent' );
export default MyComponent;
```
On the component's main named export, add a JSDoc comment that includes the main description and the example code snippet from the README ([example](https://github.com/WordPress/gutenberg/blob/43d9c82922619c1d1ff6b454f86f75c3157d3de6/packages/components/src/date-time/date-time/index.tsx#L193-L217)). _At the time of writing, the `@example` JSDoc keyword is not recognized by StoryBook's docgen, so please avoid using it_.
<!-- TODO: add to the previous paragraph once the composision section gets added to this document.
(more details about polymorphism can be found above in the "Components composition" section). -->
## Styling
All new component should be styled using [Emotion](https://emotion.sh/docs/introduction).
Note: Instead of using Emotion's standard `cx` function, the custom [`useCx` hook](/packages/components/src/utils/hooks/use-cx.ts) should be used instead.
### Deprecating styles
Changing the styles of a non-experimental component must be done with care. To prevent serious breakage in third-party usage, in some cases we may want a grace period before fully removing the old styles. This can be done by temporarily placing the new styles behind a feature flag prop prefixed by `__next`, accompanied by a `deprecate()` warning in the console. The feature flag should be opt-in (false by default), and have a reasonably descriptive name (**not** `__nextHasNewStyles`). A descriptive name allows for multiple deprecations to proceed in parallel, separated by concerns or by deprecation version.
```jsx
// component.tsx
import deprecated from '@wordpress/deprecated';
import { Wrapper } from './styles.ts';
function MyComponent({ __nextHasNoOuterMargins = false }) {
if ( ! __nextHasNoOuterMargins ) {
deprecated( 'Outer margin styles for wp.components.MyComponent', {
since: '6.0',
version: '6.2', // Set a reasonable grace period depending on impact
hint:
'Set the `__nextHasNoOuterMargins` prop to true to start opting into the new styles, which will become the default in a future version.',
} );
}
return <Wrapper __nextHasNoOuterMargins={__nextHasNoOuterMargins} />
}
```
Styles should be structured so the deprecated styles are cleanly encapsulated, and can be easily removed when the deprecation version arrives.
```js
// styles.ts
const deprecatedMargins = ({ __nextHasNoOuterMargins }) => {
if ( ! __nextHasNoOuterMargins ) {
return css`
margin: 8px;
`;
}
};
export const Wrapper = styled.div`
margin: 0;
${deprecatedMargins}
`;
```
Once deprecated, code examples in docs/stories should include the opt-in prop set to `true` so that new consumers are encouraged to adopt it from the start.
Remember to [add a **Needs Dev Note** label](/docs/contributors/code/backward-compatibility.md##dev-notes) to the pull request so third-party developers can be informed of the deprecation.
When the grace period is over and the deprecation version arrives, the `__next*` prop, deprecation notice, and deprecated styles should all be completely removed from the codebase.
#### Criteria for putting styles changes behind a feature flag
Not all style changes justify a formal deprecation process. The main thing to look for is whether the changes could cause layouts to break in an obvious or harmful way, given that the component is being used in a standard fashion.
##### DOES need formal deprecation
- Removing an outer margin.
- Substantial changes to width/height, such as adding or removing a size restriction.
##### DOES NOT need formal deprecation
- Breakage only occurs in non-standard usage, such as when the consumer is overriding component internals.
- Minor layout shifts of a few pixels.
- Internal layout changes of a higher-level component.
## Context system
The `@wordpress/components` context system is based on [React's `Context` API](https://reactjs.org/docs/context.html), and is a way for components to adapt to the "context" they're being rendered in.
Components can use this system via a couple of functions:
- they can provide values using a shared `ContextSystemProvider` component
- they can connect to the Context via `contextConnect`
- they can read the "computed" values from the context via `useContextSystem`
An example of how this is used can be found in the [`Card` component family](/packages/components/src/card). For example, this is how the `Card` component injects the `size` and `isBorderless` props down to its `CardBody` subcomponent — which makes it use the correct spacing and border settings "auto-magically".
```jsx
//=========================================================================
// Simplified snippet from `packages/components/src/card/card/hook.ts`
//=========================================================================
import { useContextSystem } from '../../context';
export function useCard( props ) {
// Read any derived registered prop from the Context System in the `Card` namespace
const derivedProps = useContextSystem( props, 'Card' );
// [...]
return computedHookProps;
}
//=========================================================================
// Simplified snippet from `packages/components/src/card/card/component.ts`
//=========================================================================
import { contextConnect, ContextSystemProvider } from '../../context';
function Card( props, forwardedRef ) {
const {
size,
isBorderless,
...otherComputedHookProps
} = useCard( props );
// [...]
// Prepare the additional props that should be passed to subcomponents via the Context System.
const contextProviderValue = useMemo( () => {
return {
// Each key in this object should match a component's registered namespace.
CardBody: {
size,
isBorderless,
},
};
}, [ isBorderless, size ] );
return (
/* Write additional values to the Context System */
<ContextSystemProvider value={ contextProviderValue }>
{ /* [...] */ }
</ContextSystemProvider>
);
}
// Connect to the Context System under the `Card` namespace
const ConnectedCard = contextConnect( Card, 'Card' );
export default ConnectedCard;
//=========================================================================
// Simplified snippet from `packages/components/src/card/card-body/hook.ts`
//=========================================================================
import { useContextSystem } from '../../context';
export function useCardBody( props ) {
// Read any derived registered prop from the Context System in the `CardBody` namespace.
// If a `CardBody` component is rendered as a child of a `Card` component, the value of
// the `size` prop will be the one set by the parent `Card` component via the Context
// System (unless the prop gets explicitely set on the `CardBody` component).
const { size = 'medium', ...otherDerivedProps } = useContextSystem( props, 'CardBody' );
// [...]
return computedHookProps;
}
```
## Unit tests
Please refer to the [JavaScript Testing Overview docs](/docs/contributors/code/testing-overview.md#snapshot-testing).
## Storybook
All new components should add stories to the project's [Storybook](https://storybook.js.org/). Each [story](https://storybook.js.org/docs/react/get-started/whats-a-story) captures the rendered state of a UI component in isolation. This greatly simplifies working on a given component, while also serving as an interactive form of documentation.
A component's story should be showcasing its different states — for example, the different variants of a `Button`:
```jsx
import Button from '../';
export default { title: 'Components/Button', component: Button };
const Template = ( args ) => <Button { ...args } />;
export const Default = Template.bind( {} );
Default.args = {
text: 'Default Button',
isBusy: false,
isSmall: false,
};
export const Primary = Template.bind( {} );
Primary.args = {
...Default.args,
text: 'Primary Button',
variant: 'primary',
};
```
A great tool to use when writing stories is the [Storybook Controls addon](https://storybook.js.org/addons/@storybook/addon-controls). Ideally props should be exposed by using this addon, which provides a graphical UI to interact dynamically with the component without needing to write code. Historically, we used [Knobs](https://storybook.js.org/addons/@storybook/addon-knobs), but it was deprecated and later removed in [#47152](https://github.com/WordPress/gutenberg/pull/47152).
The default value of each control should coincide with the default value of the props (i.e. it should be `undefined` if a prop is not required). A story should, therefore, also explicitly show how values from the Context System are applied to (sub)components. A good example of how this may look like is the [`Card` story](https://wordpress.github.io/gutenberg/?path=/story/components-card--default) (code [here](/packages/components/src/card/stories/index.tsx)).
Storybook can be started on a local machine by running `npm run storybook:dev`. Alternatively, the components' catalogue (up to date with the latest code on `trunk`) can be found at [wordpress.github.io/gutenberg/](https://wordpress.github.io/gutenberg/).
## Documentation
All components, in addition to being typed, should be using JSDoc when necessary — as explained in the [Coding Guidelines](/docs/contributors/code/coding-guidelines.md#javascript-documentation-using-jsdoc).
Each component that is exported from the `@wordpress/components` package should include a `README.md` file, explaining how to use the component, showing examples, and documenting all the props.
## README example
````markdown
# `ComponentName`
<!-- If component is experimental, add the following section: -->
<div class="callout callout-alert">
This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.
</div>
<!-- If component is deprecated, add the following section: -->
<div class="callout callout-alert">
This component is deprecated. Please use `{other component}` from the `{other package}` package instead.
</div>
Description of the component.
## Usage
Code example using correct markdown syntax and formatted using project's formatting rules. See [ItemGroup](/packages/components/src/item-group/item-group/README.md#usage) for a real-world example.
```jsx
import { ExampleComponent } from '@wordpress/components';
function Example() {
return (
<ExampleComponent>
<p>Code is poetry</p>
</ExampleComponent>
);
}
```
## Props
The component accepts the following props:
### `propName`: Typescript style type i.e `string`, `number`, `( nextValue: string ) => void`
Prop description. With a new line before and after the description and before and after type/required blocks.
- Required: Either `Yes` or `No`
<!-- If the prop has a default value, add the following line: -->
- Default: [default value]
### Inherited props
Add this section when there are props that are drilled down into an internal component. See [ClipboardButton](/packages/components/src/clipboard-button/README.md) for an example.
<!-- Only add the next section if the component relies on the [Context System](#context-system) -->
## Context
See examples for this section for the [ItemGroup](/packages/components/src/item-group/item-group/README.md#context) and [`Card`](/packages/components/src/card/card/README.md#context) components.
````
## Folder structure
As a result of the above guidelines, all new components (except for shared utilities) should _generally_ follow this folder structure:
```text
component-name/
├── stories
│ └── index.js
├── test
│ └── index.js
├── component.tsx
├── context.ts
├── hook.ts
├── index.ts
├── README.md
├── styles.ts
└── types.ts
```
In case of a family of components (e.g. `Card` and `CardBody`, `CardFooter`, `CardHeader` ...), each component's implementation should live in a separate subfolder, while code common to the whole family of components (e.g types, utils, context...) should live in the family of components root folder:
```text
component-family-name/
├── sub-component-name/
│ ├── index.ts
│ ├── component.tsx
│ ├── hook.ts
│ ├── README.md
│ └── styles.ts
├── sub-component-name/
│ ├── index.ts
│ ├── component.tsx
│ ├── hook.ts
│ ├── README.md
│ └── styles.ts
├── stories
│ └── index.js
├── test
│ └── index.js
├── context.ts
├── index.ts
├── types.ts
└── utils.ts
```

788
node_modules/@wordpress/components/LICENSE.md generated vendored Normal file
View File

@@ -0,0 +1,788 @@
## Gutenberg
Copyright 2016-2024 by the contributors
**License for Contributions (on and after April 15, 2021)**
All code contributed to the Gutenberg project is dual-licensed,
and released under both of the following licenses:
the GNU General Public License as published by the Free Software Foundation;
either version 2 of the License or (at your option) any later version (the “GPL”)
and the Mozilla Public License, Version 2.0 (the “MPL”).
**Project License**
The Gutenberg project license is not affected by the License for Contributions (as
discussed in the [Dual License section](#dual-license) below). The Gutenberg project
continues to be free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License or (at your option) any
later version (the “GPL”).
This program incorporates work covered by the following copyright and
permission notices:
b2 is (c) 2001, 2002 Michel Valdrighi - m@tidakada.com -
http://tidakada.com
Wherever third party code has been used, credit has been given in the code's
comments.
b2 is released under the GPL
and
WordPress - Web publishing software
Copyright 2003-2010 by the contributors
WordPress is released under the GPL
### Dual License
**We are currently in the process of changing Gutenbergs software license from
GPL to a dual license: GPL and MPL.**
**This process involves two independent steps (1) obtaining permission for dual
licensing from contributors of already contributed Gutenberg code and (2)
dual licensing of all contributions to Gutenberg that are made on or after
April 15, 2021.**
**For part (1): Were reaching out to everyone who has contributed code, prior
to April 15, 2021, and asking that they agree to dual license their
contribution to the project. We expect this process to be completed by
mid-year, 2021.**
**For part (2): We have changed the license for contributed code to this
repository to make clear that all contributions on or after April 15, 2021
will be made under the dual-license.**
**When we have received all necessary rights and permissions to dual license
the pre-April 15, 2021 code of the Gutenberg project (Part 1 above), you will
have the option to use and distribute all of the Gutenberg project under
either the GPL or MPL license. At this time we will change the “Project
License” to the following:**
The Gutenberg project is free software; you can redistribute it and/or modify
it under the terms of either of the following licenses:
1. the GNU General Public License as published by the Free Software Foundation;
either version 2 of the License or (at your option) any later version (the
“GPL”) OR
2. the Mozilla Public License Version 2.0 (the “MPL”).
---
## Full Text of Referenced Licenses
1. [GNU General Public License, Version 2](#gnu-general-public-license-version-2)
2. [Mozilla Public License, Version 2.0](#mozilla-public-license-version-20)
## GNU General Public License, Version 2
### GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
### Preamble
The licenses for most software are designed to take away your freedom
to share and change it. By contrast, the GNU General Public License is
intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on,
we want its recipients to know that what they have is not the
original, so that any problems introduced by others will not reflect
on the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at
all.
The precise terms and conditions for copying, distribution and
modification follow.
### TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
**0.** This License applies to any program or other work which
contains a notice placed by the copyright holder saying it may be
distributed under the terms of this General Public License. The
"Program", below, refers to any such program or work, and a "work
based on the Program" means either the Program or any derivative work
under copyright law: that is to say, a work containing the Program or
a portion of it, either verbatim or with modifications and/or
translated into another language. (Hereinafter, translation is
included without limitation in the term "modification".) Each licensee
is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the Program
(independent of having been made by running the Program). Whether that
is true depends on what the Program does.
**1.** You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a
fee.
**2.** You may modify your copy or copies of the Program or any
portion of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
**a)** You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
**b)** You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any part
thereof, to be licensed as a whole at no charge to all third parties
under the terms of this License.
**c)** If the modified program normally reads commands interactively
when run, you must cause it, when started running for such interactive
use in the most ordinary way, to print or display an announcement
including an appropriate copyright notice and a notice that there is
no warranty (or else, saying that you provide a warranty) and that
users may redistribute the program under these conditions, and telling
the user how to view a copy of this License. (Exception: if the
Program itself is interactive but does not normally print such an
announcement, your work based on the Program is not required to print
an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
**3.** You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
**a)** Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections 1
and 2 above on a medium customarily used for software interchange; or,
**b)** Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your cost of
physically performing source distribution, a complete machine-readable
copy of the corresponding source code, to be distributed under the
terms of Sections 1 and 2 above on a medium customarily used for
software interchange; or,
**c)** Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is allowed
only for noncommercial distribution and only if you received the
program in object code or executable form with such an offer, in
accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
**4.** You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt otherwise
to copy, modify, sublicense or distribute the Program is void, and
will automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.
**5.** You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
**6.** Each time you redistribute the Program (or any work based on
the Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
**7.** If, as a consequence of a court judgment or allegation of
patent infringement or for any other reason (not limited to patent
issues), conditions are imposed on you (whether by court order,
agreement or otherwise) that contradict the conditions of this
License, they do not excuse you from the conditions of this License.
If you cannot distribute so as to satisfy simultaneously your
obligations under this License and any other pertinent obligations,
then as a consequence you may not distribute the Program at all. For
example, if a patent license would not permit royalty-free
redistribution of the Program by all those who receive copies directly
or indirectly through you, then the only way you could satisfy both it
and this License would be to refrain entirely from distribution of the
Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
**8.** If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
**9.** The Free Software Foundation may publish revised and/or new
versions of the General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Program does not specify a
version number of this License, you may choose any version ever
published by the Free Software Foundation.
**10.** If you wish to incorporate parts of the Program into other
free programs whose distribution conditions are different, write to
the author to ask for permission. For software which is copyrighted by
the Free Software Foundation, write to the Free Software Foundation;
we sometimes make exceptions for this. Our decision will be guided by
the two goals of preserving the free status of all derivatives of our
free software and of promoting the sharing and reuse of software
generally.
**NO WARRANTY**
**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
### END OF TERMS AND CONDITIONS
### How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
one line to give the program's name and an idea of what it does.
Copyright (C) yyyy name of author
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Also add information on how to contact you by electronic and paper
mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
type `show w'. This is free software, and you are welcome
to redistribute it under certain conditions; type `show c'
for details.
The hypothetical commands \`show w' and \`show c' should show the
appropriate parts of the General Public License. Of course, the
commands you use may be called something other than \`show w' and
\`show c'; they could even be mouse-clicks or menu items--whatever
suits your program.
You should also get your employer (if you work as a programmer) or
your school, if any, to sign a "copyright disclaimer" for the program,
if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright
interest in the program `Gnomovision'
(which makes passes at compilers) written
by James Hacker.
signature of Ty Coon, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library,
you may consider it more useful to permit linking proprietary
applications with the library. If this is what you want to do, use the
[GNU Lesser General Public
License](http://www.gnu.org/licenses/lgpl.html) instead of this
License.
---
## Mozilla Public License, Version 2.0
### 1. Definitions
**1.1. “Contributor”**
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
**1.2. “Contributor Version”**
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
**1.3. “Contribution”**
means Covered Software of a particular Contributor.
**1.4. “Covered Software”**
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
**1.5. “Incompatible With Secondary Licenses”**
means
- **(a)** that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
- **(b)** that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
**1.6. “Executable Form”**
means any form of the work other than Source Code Form.
**1.7. “Larger Work”**
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
**1.8. “License”**
means this document.
**1.9. “Licensable”**
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
**1.10. “Modifications”**
means any of the following:
- **(a)** any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
- **(b)** any new file in Source Code Form that contains any Covered
Software.
**1.11. “Patent Claims” of a Contributor**
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
**1.12. “Secondary License”**
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
**1.13. “Source Code Form”**
means the form of the work preferred for making modifications.
**1.14. “You” (or “Your”)**
means an individual or a legal entity exercising rights under this
License. For legal entities, “You” includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, “control” means **(a)** the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or **(b)** ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
### 2. License Grants and Conditions
#### 2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
- **(a)** under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
- **(b)** under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
#### 2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
#### 2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
- **(a)** for any code that a Contributor has removed from Covered Software;
or
- **(b)** for infringements caused by: **(i)** Your and any other third party's
modifications of Covered Software, or **(ii)** the combination of its
Contributions with other software (except as part of its Contributor
Version); or
- **(c)** under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
#### 2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
#### 2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
#### 2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
#### 2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
### 3. Responsibilities
#### 3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
#### 3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
- **(a)** such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
- **(b)** You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
#### 3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
#### 3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
#### 3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
### 4. Inability to Comply Due to Statute or Regulation
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: **(a)** comply with
the terms of this License to the maximum extent possible; and **(b)**
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
### 5. Termination
**5.1.** The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated **(a)** provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and **(b)** on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
**5.2.** If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
### 6. Disclaimer of Warranty
> Covered Software is provided under this License on an “as is”
> basis, without warranty of any kind, either expressed, implied, or
> statutory, including, without limitation, warranties that the
> Covered Software is free of defects, merchantable, fit for a
> particular purpose or non-infringing. The entire risk as to the
> quality and performance of the Covered Software is with You.
> Should any Covered Software prove defective in any respect, You
> (not any Contributor) assume the cost of any necessary servicing,
> repair, or correction. This disclaimer of warranty constitutes an
> essential part of this License. No use of any Covered Software is
> authorized under this License except under this disclaimer.
### 7. Limitation of Liability
> Under no circumstances and under no legal theory, whether tort
> (including negligence), contract, or otherwise, shall any
> Contributor, or anyone who distributes Covered Software as
> permitted above, be liable to You for any direct, indirect,
> special, incidental, or consequential damages of any character
> including, without limitation, damages for lost profits, loss of
> goodwill, work stoppage, computer failure or malfunction, or any
> and all other commercial damages or losses, even if such party
> shall have been informed of the possibility of such damages. This
> limitation of liability shall not apply to liability for death or
> personal injury resulting from such party's negligence to the
> extent applicable law prohibits such limitation. Some
> jurisdictions do not allow the exclusion or limitation of
> incidental or consequential damages, so this exclusion and
> limitation may not apply to You.
### 8. Litigation
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
### 9. Miscellaneous
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
### 10. Versions of the License
#### 10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
#### 10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
#### 10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
## Exhibit A - Source Code Form License Notice
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
## Exhibit B - “Incompatible With Secondary Licenses” Notice
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

72
node_modules/@wordpress/components/README.md generated vendored Normal file
View File

@@ -0,0 +1,72 @@
# Component Reference
This package includes a library of generic WordPress components to be used for creating common UI elements shared between screens and features of the WordPress dashboard.
## Installation
```bash
npm install @wordpress/components --save
```
_This package assumes that your code will run in an **ES2015+** environment. If you're using an environment that has limited or no support for such language features and APIs, you should include [the polyfill shipped in `@wordpress/babel-preset-default`](https://github.com/WordPress/gutenberg/tree/HEAD/packages/babel-preset-default#polyfill) in your code._
## Usage
Within Gutenberg, these components can be accessed by importing from the `components` root directory:
```jsx
/**
* WordPress dependencies
*/
import { Button } from '@wordpress/components';
export default function MyButton() {
return <Button>Click Me!</Button>;
}
```
Many components include CSS to add styles, which you will need to load in order for them to appear correctly. Within WordPress, add the `wp-components` stylesheet as a dependency of your plugin's stylesheet. See [wp_enqueue_style documentation](https://developer.wordpress.org/reference/functions/wp_enqueue_style/#parameters) for how to specify dependencies.
In non-WordPress projects, link to the `build-style/style.css` file directly, it is located at `node_modules/@wordpress/components/build-style/style.css`.
### Popovers
By default, the `Popover` component will render within an extra element appended to the body of the document.
If you want to precisely contol where the popovers render, you will need to use the `Popover.Slot` component.
The following example illustrates how you can wrap a component using a
`Popover` and have those popovers render to a single location in the DOM.
```jsx
/**
* External dependencies
*/
import { Popover, SlotFillProvider } from '@wordpress/components';
/**
* Internal dependencies
*/
import { MyComponentWithPopover } from './my-component';
const Example = () => {
<SlotFillProvider>
<MyComponentWithPopover />
<Popover.Slot />
</SlotFillProvider>;
};
```
## Docs & examples
You can browse the components docs and examples at [https://wordpress.github.io/gutenberg/](https://wordpress.github.io/gutenberg/)
## Contributing to this package
This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to [npm](https://www.npmjs.com/) and used by [WordPress](https://make.wordpress.org/core/) as well as other software projects.
To find out more about contributing to this package or Gutenberg as a whole, please read the project's main [contributor guide](https://github.com/WordPress/gutenberg/tree/HEAD/CONTRIBUTING.md).
This package also has its own [contributing information](https://github.com/WordPress/gutenberg/tree/HEAD/packages/components/CONTRIBUTING.md) where you can find additional details.
<br /><br /><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>

View File

@@ -0,0 +1,34 @@
import { createElement } from "react";
/**
* Internal dependencies
*/
import { CompositeItem } from '../composite/v2';
import Tooltip from '../tooltip';
import { VisuallyHidden } from '../visually-hidden';
/**
* Internal dependencies
*/
import { ALIGNMENT_LABEL } from './utils';
import { Cell as CellView, Point } from './styles/alignment-matrix-control-styles';
export default function Cell({
id,
isActive = false,
value,
...props
}) {
const tooltipText = ALIGNMENT_LABEL[value];
return createElement(Tooltip, {
text: tooltipText
}, createElement(CompositeItem, {
id: id,
render: createElement(CellView, {
...props,
role: "gridcell"
})
}, createElement(VisuallyHidden, null, value), createElement(Point, {
isActive: isActive,
role: "presentation"
})));
}
//# sourceMappingURL=cell.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["CompositeItem","Tooltip","VisuallyHidden","ALIGNMENT_LABEL","Cell","CellView","Point","id","isActive","value","props","tooltipText","createElement","text","render","role"],"sources":["@wordpress/components/src/alignment-matrix-control/cell.tsx"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { CompositeItem } from '../composite/v2';\nimport Tooltip from '../tooltip';\nimport { VisuallyHidden } from '../visually-hidden';\n\n/**\n * Internal dependencies\n */\nimport { ALIGNMENT_LABEL } from './utils';\nimport {\n\tCell as CellView,\n\tPoint,\n} from './styles/alignment-matrix-control-styles';\nimport type { AlignmentMatrixControlCellProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nexport default function Cell( {\n\tid,\n\tisActive = false,\n\tvalue,\n\t...props\n}: WordPressComponentProps< AlignmentMatrixControlCellProps, 'span', false > ) {\n\tconst tooltipText = ALIGNMENT_LABEL[ value ];\n\n\treturn (\n\t\t<Tooltip text={ tooltipText }>\n\t\t\t<CompositeItem\n\t\t\t\tid={ id }\n\t\t\t\trender={ <CellView { ...props } role=\"gridcell\" /> }\n\t\t\t>\n\t\t\t\t{ /* VoiceOver needs a text content to be rendered within grid cell,\n\t\t\totherwise it'll announce the content as \"blank\". So we use a visually\n\t\t\thidden element instead of aria-label. */ }\n\t\t\t\t<VisuallyHidden>{ value }</VisuallyHidden>\n\t\t\t\t<Point isActive={ isActive } role=\"presentation\" />\n\t\t\t</CompositeItem>\n\t\t</Tooltip>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,iBAAiB;AAC/C,OAAOC,OAAO,MAAM,YAAY;AAChC,SAASC,cAAc,QAAQ,oBAAoB;;AAEnD;AACA;AACA;AACA,SAASC,eAAe,QAAQ,SAAS;AACzC,SACCC,IAAI,IAAIC,QAAQ,EAChBC,KAAK,QACC,0CAA0C;AAIjD,eAAe,SAASF,IAAIA,CAAE;EAC7BG,EAAE;EACFC,QAAQ,GAAG,KAAK;EAChBC,KAAK;EACL,GAAGC;AACuE,CAAC,EAAG;EAC9E,MAAMC,WAAW,GAAGR,eAAe,CAAEM,KAAK,CAAE;EAE5C,OACCG,aAAA,CAACX,OAAO;IAACY,IAAI,EAAGF;EAAa,GAC5BC,aAAA,CAACZ,aAAa;IACbO,EAAE,EAAGA,EAAI;IACTO,MAAM,EAAGF,aAAA,CAACP,QAAQ;MAAA,GAAMK,KAAK;MAAGK,IAAI,EAAC;IAAU,CAAE;EAAG,GAKpDH,aAAA,CAACV,cAAc,QAAGO,KAAuB,CAAC,EAC1CG,aAAA,CAACN,KAAK;IAACE,QAAQ,EAAGA,QAAU;IAACO,IAAI,EAAC;EAAc,CAAE,CACpC,CACP,CAAC;AAEZ"}

View File

@@ -0,0 +1,44 @@
import { createElement } from "react";
/**
* External dependencies
*/
import classnames from 'classnames';
/**
* Internal dependencies
*/
import { ALIGNMENTS, getAlignmentIndex } from './utils';
import { Root, Cell, Point } from './styles/alignment-matrix-control-icon-styles';
const BASE_SIZE = 24;
function AlignmentMatrixControlIcon({
className,
disablePointerEvents = true,
size = BASE_SIZE,
style = {},
value = 'center',
...props
}) {
const alignIndex = getAlignmentIndex(value);
const scale = (size / BASE_SIZE).toFixed(2);
const classes = classnames('component-alignment-matrix-control-icon', className);
const styles = {
...style,
transform: `scale(${scale})`
};
return createElement(Root, {
...props,
className: classes,
disablePointerEvents: disablePointerEvents,
role: "presentation",
style: styles
}, ALIGNMENTS.map((align, index) => {
const isActive = alignIndex === index;
return createElement(Cell, {
key: align
}, createElement(Point, {
isActive: isActive
}));
}));
}
export default AlignmentMatrixControlIcon;
//# sourceMappingURL=icon.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["classnames","ALIGNMENTS","getAlignmentIndex","Root","Cell","Point","BASE_SIZE","AlignmentMatrixControlIcon","className","disablePointerEvents","size","style","value","props","alignIndex","scale","toFixed","classes","styles","transform","createElement","role","map","align","index","isActive","key"],"sources":["@wordpress/components/src/alignment-matrix-control/icon.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport { ALIGNMENTS, getAlignmentIndex } from './utils';\nimport {\n\tRoot,\n\tCell,\n\tPoint,\n} from './styles/alignment-matrix-control-icon-styles';\nimport type { AlignmentMatrixControlIconProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nconst BASE_SIZE = 24;\n\nfunction AlignmentMatrixControlIcon( {\n\tclassName,\n\tdisablePointerEvents = true,\n\tsize = BASE_SIZE,\n\tstyle = {},\n\tvalue = 'center',\n\t...props\n}: WordPressComponentProps< AlignmentMatrixControlIconProps, 'div', false > ) {\n\tconst alignIndex = getAlignmentIndex( value );\n\tconst scale = ( size / BASE_SIZE ).toFixed( 2 );\n\n\tconst classes = classnames(\n\t\t'component-alignment-matrix-control-icon',\n\t\tclassName\n\t);\n\n\tconst styles = {\n\t\t...style,\n\t\ttransform: `scale(${ scale })`,\n\t};\n\n\treturn (\n\t\t<Root\n\t\t\t{ ...props }\n\t\t\tclassName={ classes }\n\t\t\tdisablePointerEvents={ disablePointerEvents }\n\t\t\trole=\"presentation\"\n\t\t\tstyle={ styles }\n\t\t>\n\t\t\t{ ALIGNMENTS.map( ( align, index ) => {\n\t\t\t\tconst isActive = alignIndex === index;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Cell key={ align }>\n\t\t\t\t\t\t<Point isActive={ isActive } />\n\t\t\t\t\t</Cell>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Root>\n\t);\n}\n\nexport default AlignmentMatrixControlIcon;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,UAAU,EAAEC,iBAAiB,QAAQ,SAAS;AACvD,SACCC,IAAI,EACJC,IAAI,EACJC,KAAK,QACC,+CAA+C;AAItD,MAAMC,SAAS,GAAG,EAAE;AAEpB,SAASC,0BAA0BA,CAAE;EACpCC,SAAS;EACTC,oBAAoB,GAAG,IAAI;EAC3BC,IAAI,GAAGJ,SAAS;EAChBK,KAAK,GAAG,CAAC,CAAC;EACVC,KAAK,GAAG,QAAQ;EAChB,GAAGC;AACsE,CAAC,EAAG;EAC7E,MAAMC,UAAU,GAAGZ,iBAAiB,CAAEU,KAAM,CAAC;EAC7C,MAAMG,KAAK,GAAG,CAAEL,IAAI,GAAGJ,SAAS,EAAGU,OAAO,CAAE,CAAE,CAAC;EAE/C,MAAMC,OAAO,GAAGjB,UAAU,CACzB,yCAAyC,EACzCQ,SACD,CAAC;EAED,MAAMU,MAAM,GAAG;IACd,GAAGP,KAAK;IACRQ,SAAS,EAAG,SAASJ,KAAO;EAC7B,CAAC;EAED,OACCK,aAAA,CAACjB,IAAI;IAAA,GACCU,KAAK;IACVL,SAAS,EAAGS,OAAS;IACrBR,oBAAoB,EAAGA,oBAAsB;IAC7CY,IAAI,EAAC,cAAc;IACnBV,KAAK,EAAGO;EAAQ,GAEdjB,UAAU,CAACqB,GAAG,CAAE,CAAEC,KAAK,EAAEC,KAAK,KAAM;IACrC,MAAMC,QAAQ,GAAGX,UAAU,KAAKU,KAAK;IAErC,OACCJ,aAAA,CAAChB,IAAI;MAACsB,GAAG,EAAGH;IAAO,GAClBH,aAAA,CAACf,KAAK;MAACoB,QAAQ,EAAGA;IAAU,CAAE,CACzB,CAAC;EAET,CAAE,CACG,CAAC;AAET;AAEA,eAAelB,0BAA0B"}

View File

@@ -0,0 +1,91 @@
import { createElement } from "react";
/**
* External dependencies
*/
import classnames from 'classnames';
/**
* WordPress dependencies
*/
import { __, isRTL } from '@wordpress/i18n';
import { useInstanceId } from '@wordpress/compose';
/**
* Internal dependencies
*/
import Cell from './cell';
import { Composite, CompositeRow, useCompositeStore } from '../composite/v2';
import { Root, Row } from './styles/alignment-matrix-control-styles';
import AlignmentMatrixControlIcon from './icon';
import { GRID, getItemId, getItemValue } from './utils';
/**
*
* AlignmentMatrixControl components enable adjustments to horizontal and vertical alignments for UI.
*
* ```jsx
* import { __experimentalAlignmentMatrixControl as AlignmentMatrixControl } from '@wordpress/components';
* import { useState } from '@wordpress/element';
*
* const Example = () => {
* const [ alignment, setAlignment ] = useState( 'center center' );
*
* return (
* <AlignmentMatrixControl
* value={ alignment }
* onChange={ setAlignment }
* />
* );
* };
* ```
*/
export function AlignmentMatrixControl({
className,
id,
label = __('Alignment Matrix Control'),
defaultValue = 'center center',
value,
onChange,
width = 92,
...props
}) {
const baseId = useInstanceId(AlignmentMatrixControl, 'alignment-matrix-control', id);
const compositeStore = useCompositeStore({
defaultActiveId: getItemId(baseId, defaultValue),
activeId: getItemId(baseId, value),
setActiveId: nextActiveId => {
const nextValue = getItemValue(baseId, nextActiveId);
if (nextValue) onChange?.(nextValue);
},
rtl: isRTL()
});
const activeId = compositeStore.useState('activeId');
const classes = classnames('component-alignment-matrix-control', className);
return createElement(Composite, {
store: compositeStore,
render: createElement(Root, {
...props,
"aria-label": label,
className: classes,
id: baseId,
role: "grid",
size: width
})
}, GRID.map((cells, index) => createElement(CompositeRow, {
render: createElement(Row, {
role: "row"
}),
key: index
}, cells.map(cell => {
const cellId = getItemId(baseId, cell);
const isActive = cellId === activeId;
return createElement(Cell, {
id: cellId,
isActive: isActive,
key: cell,
value: cell
});
}))));
}
AlignmentMatrixControl.Icon = AlignmentMatrixControlIcon;
export default AlignmentMatrixControl;
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,63 @@
import _styled from "@emotion/styled/base";
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
*/
import { css } from '@emotion/react';
/**
* Internal dependencies
*/
import { rootBase, pointBase, Cell as CellBase } from './alignment-matrix-control-styles';
const rootSize = () => {
const padding = 1.5;
const size = 24;
return /*#__PURE__*/css({
gridTemplateRows: `repeat( 3, calc( ${size - padding * 2}px / 3))`,
padding,
maxHeight: size,
maxWidth: size
}, process.env.NODE_ENV === "production" ? "" : ";label:rootSize;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYWxpZ25tZW50LW1hdHJpeC1jb250cm9sL3N0eWxlcy9hbGlnbm1lbnQtbWF0cml4LWNvbnRyb2wtaWNvbi1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdUJRIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYWxpZ25tZW50LW1hdHJpeC1jb250cm9sL3N0eWxlcy9hbGlnbm1lbnQtbWF0cml4LWNvbnRyb2wtaWNvbi1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7XG5cdHJvb3RCYXNlLFxuXHRwb2ludEJhc2UsXG5cdENlbGwgYXMgQ2VsbEJhc2UsXG59IGZyb20gJy4vYWxpZ25tZW50LW1hdHJpeC1jb250cm9sLXN0eWxlcyc7XG5pbXBvcnQgdHlwZSB7XG5cdEFsaWdubWVudE1hdHJpeENvbnRyb2xJY29uUHJvcHMsXG5cdEFsaWdubWVudE1hdHJpeENvbnRyb2xDZWxsUHJvcHMsXG59IGZyb20gJy4uL3R5cGVzJztcblxuY29uc3Qgcm9vdFNpemUgPSAoKSA9PiB7XG5cdGNvbnN0IHBhZGRpbmcgPSAx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JyZW50Q29sb3JgIDogbnVsbDtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdGJveC1zaGFkb3c6ICR7IGJveFNoYWRvdyB9O1xuXHRcdGNvbG9yOiBjdXJyZW50Q29sb3I7XG5cblx0XHQqOmhvdmVyID4gJiB7XG5cdFx0XHRjb2xvcjogY3VycmVudENvbG9yO1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBQb2ludCA9IHN0eWxlZC5zcGFuYFxuXHRoZWlnaHQ6IDJweDtcblx0d2lkdGg6IDJweDtcblx0JHsgcG9pbnRCYXNlIH07XG5cdCR7IHBvaW50QWN0aXZlIH07XG5gO1xuXG5leHBvcnQgY29uc3QgQ2VsbCA9IENlbGxCYXNlO1xuIl19 */");
};
const rootPointerEvents = ({
disablePointerEvents
}) => {
return /*#__PURE__*/css({
pointerEvents: disablePointerEvents ? 'none' : undefined
}, process.env.NODE_ENV === "production" ? "" : ";label:rootPointerEvents;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYWxpZ25tZW50LW1hdHJpeC1jb250cm9sL3N0eWxlcy9hbGlnbm1lbnQtbWF0cml4LWNvbnRyb2wtaWNvbi1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBa0NRIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYWxpZ25tZW50LW1hdHJpeC1jb250cm9sL3N0eWxlcy9hbGlnbm1lbnQtbWF0cml4LWNvbnRyb2wtaWNvbi1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9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uZXhwb3J0IGNvbnN0IFJvb3QgPSBzdHlsZWQuZGl2YFxuXHR0cmFuc2Zvcm0tb3JpZ2luOiB0b3AgbGVmdDtcblx0aGVpZ2h0OiAxMDAlO1xuXHR3aWR0aDogMTAwJTtcblxuXHQkeyByb290QmFzZSB9O1xuXHQkeyByb290U2l6ZSB9O1xuXHQkeyByb290UG9pbnRlckV2ZW50cyB9O1xuYDtcblxuY29uc3QgcG9pbnRBY3RpdmUgPSAoIHtcblx0aXNBY3RpdmUsXG59OiBQaWNrPCBBbGlnbm1lbnRNYXRyaXhDb250cm9sQ2VsbFByb3BzLCAnaXNBY3RpdmUnID4gKSA9PiB7XG5cdGNvbnN0IGJveFNoYWRvdyA9IGlzQWN0aXZlID8gYDAgMCAwIDFweCBjdXJyZW50Q29sb3JgIDogbnVsbDtcblxuXHRyZXR1cm4gY3NzYFxuXHRcdGJveC1zaGFkb3c6ICR7IGJveFNoYWRvdyB9O1xuXHRcdGNvbG9yOiBjdXJyZW50Q29sb3I7XG5cblx0XHQqOmhvdmVyID4gJiB7XG5cdFx0XHRjb2xvcjogY3VycmVudENvbG9yO1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBQb2ludCA9IHN0eWxlZC5zcGFuYFxuXHRoZWlnaHQ6IDJweDtcblx0d2lkdGg6IDJweDtcblx0JHsgcG9pbnRCYXNlIH07XG5cdCR7IHBvaW50QWN0aXZlIH07XG5gO1xuXG5leHBvcnQgY29uc3QgQ2VsbCA9IENlbGxCYXNlO1xuIl19 */");
};
export const Wrapper = _styled("div", process.env.NODE_ENV === "production" ? {
target: "erowt52"
} : {
target: "erowt52",
label: "Wrapper"
})(process.env.NODE_ENV === "production" ? {
name: "ogl07i",
styles: "box-sizing:border-box;padding:2px"
} : {
name: "ogl07i",
styles: "box-sizing:border-box;padding:2px",
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc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c3QgUG9pbnQgPSBzdHlsZWQuc3BhbmBcblx0aGVpZ2h0OiAycHg7XG5cdHdpZHRoOiAycHg7XG5cdCR7IHBvaW50QmFzZSB9O1xuXHQkeyBwb2ludEFjdGl2ZSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IENlbGwgPSBDZWxsQmFzZTtcbiJdfQ== */",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
});
export const Root = _styled("div", process.env.NODE_ENV === "production" ? {
target: "erowt51"
} : {
target: "erowt51",
label: "Root"
})("transform-origin:top left;height:100%;width:100%;", rootBase, ";", rootSize, ";", rootPointerEvents, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYWxpZ25tZW50LW1hdHJpeC1jb250cm9sL3N0eWxlcy9hbGlnbm1lbnQtbWF0cml4LWNvbnRyb2wtaWNvbi1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNEM4QiIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2FsaWdubWVudC1tYXRyaXgtY29udHJvbC9zdHlsZXMvYWxpZ25tZW50LW1hdHJpeC1jb250cm9sLWljb24tc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQge1xuXHRyb290QmFzZSxcblx0cG9pbnRCYXNlLFxuXHRDZWxsIGFzIENlbGxCYXNlLFxufSBmcm9tICcuL2FsaWdubWVudC1tYXRyaXg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XJFdmVudHMgfTtcbmA7XG5cbmNvbnN0IHBvaW50QWN0aXZlID0gKCB7XG5cdGlzQWN0aXZlLFxufTogUGljazwgQWxpZ25tZW50TWF0cml4Q29udHJvbENlbGxQcm9wcywgJ2lzQWN0aXZlJyA+ICkgPT4ge1xuXHRjb25zdCBib3hTaGFkb3cgPSBpc0FjdGl2ZSA/IGAwIDAgMCAxcHggY3VycmVudENvbG9yYCA6IG51bGw7XG5cblx0cmV0dXJuIGNzc2Bcblx0XHRib3gtc2hhZG93OiAkeyBib3hTaGFkb3cgfTtcblx0XHRjb2xvcjogY3VycmVudENvbG9yO1xuXG5cdFx0Kjpob3ZlciA+ICYge1xuXHRcdFx0Y29sb3I6IGN1cnJlbnRDb2xvcjtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgUG9pbnQgPSBzdHlsZWQuc3BhbmBcblx0aGVpZ2h0OiAycHg7XG5cdHdpZHRoOiAycHg7XG5cdCR7IHBvaW50QmFzZSB9O1xuXHQkeyBwb2ludEFjdGl2ZSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IENlbGwgPSBDZWxsQmFzZTtcbiJdfQ== */"));
const pointActive = ({
isActive
}) => {
const boxShadow = isActive ? `0 0 0 1px currentColor` : null;
return /*#__PURE__*/css("box-shadow:", boxShadow, ";color:currentColor;*:hover>&{color:currentColor;}" + (process.env.NODE_ENV === "production" ? "" : ";label:pointActive;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYWxpZ25tZW50LW1hdHJpeC1jb250cm9sL3N0eWxlcy9hbGlnbm1lbnQtbWF0cml4LWNvbnRyb2wtaWNvbi1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMkRXIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zc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19 */");
};
export const Point = _styled("span", process.env.NODE_ENV === "production" ? {
target: "erowt50"
} : {
target: "erowt50",
label: "Point"
})("height:2px;width:2px;", pointBase, ";", pointActive, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYWxpZ25tZW50LW1hdHJpeC1jb250cm9sL3N0eWxlcy9hbGlnbm1lbnQtbWF0cml4LWNvbnRyb2wtaWNvbi1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBcUVnQyIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2FsaWdubWVudC1tYXRyaXgtY29udHJvbC9zdHlsZXMvYWxpZ25tZW50LW1hdHJpeC1jb250cm9sLWljb24tc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQge1xuXHRyb290QmFzZSxcblx0cG9pbnRCYXNlLFxuXHRDZWxsIGFzIENlbGxCYXNlLFxufSBmcm9tICcuL2FsaWdubWVudC1tYXRyaXgtY29udHJvbC1zdHlsZXMnO1xuaW1wb3J0IHR5cGUge1xuXHRBbGlnbm1lbnRNYXRyaXhDb250cm9sSWNvblByb3BzLFxuXHRBbGlnbm1lbnRNYXRyaXhDb250cm9sQ2VsbFByb3BzLFxufSBmcm9tICcuLi90eXBlcyc7XG5cbmNvbnN0IHJvb3RTaXplID0gKCkgPT4ge1xuXHRjb25zdCBwYWRkaW5nID0gMS41O1xuXHRjb25z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G5cblx0cmV0dXJuIGNzc2Bcblx0XHRib3gtc2hhZG93OiAkeyBib3hTaGFkb3cgfTtcblx0XHRjb2xvcjogY3VycmVudENvbG9yO1xuXG5cdFx0Kjpob3ZlciA+ICYge1xuXHRcdFx0Y29sb3I6IGN1cnJlbnRDb2xvcjtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgUG9pbnQgPSBzdHlsZWQuc3BhbmBcblx0aGVpZ2h0OiAycHg7XG5cdHdpZHRoOiAycHg7XG5cdCR7IHBvaW50QmFzZSB9O1xuXHQkeyBwb2ludEFjdGl2ZSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IENlbGwgPSBDZWxsQmFzZTtcbiJdfQ== */"));
export const Cell = CellBase;
//# sourceMappingURL=alignment-matrix-control-icon-styles.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["css","rootBase","pointBase","Cell","CellBase","rootSize","padding","size","gridTemplateRows","maxHeight","maxWidth","process","env","NODE_ENV","rootPointerEvents","disablePointerEvents","pointerEvents","undefined","Wrapper","_styled","target","label","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","Root","pointActive","isActive","boxShadow","Point"],"sources":["@wordpress/components/src/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport {\n\trootBase,\n\tpointBase,\n\tCell as CellBase,\n} from './alignment-matrix-control-styles';\nimport type {\n\tAlignmentMatrixControlIconProps,\n\tAlignmentMatrixControlCellProps,\n} from '../types';\n\nconst rootSize = () => {\n\tconst padding = 1.5;\n\tconst size = 24;\n\n\treturn css( {\n\t\tgridTemplateRows: `repeat( 3, calc( ${ size - padding * 2 }px / 3))`,\n\t\tpadding,\n\t\tmaxHeight: size,\n\t\tmaxWidth: size,\n\t} );\n};\n\nconst rootPointerEvents = ( {\n\tdisablePointerEvents,\n}: Pick< AlignmentMatrixControlIconProps, 'disablePointerEvents' > ) => {\n\treturn css( {\n\t\tpointerEvents: disablePointerEvents ? 'none' : undefined,\n\t} );\n};\n\nexport const Wrapper = styled.div`\n\tbox-sizing: border-box;\n\tpadding: 2px;\n`;\n\nexport const Root = styled.div`\n\ttransform-origin: top left;\n\theight: 100%;\n\twidth: 100%;\n\n\t${ rootBase };\n\t${ rootSize };\n\t${ rootPointerEvents };\n`;\n\nconst pointActive = ( {\n\tisActive,\n}: Pick< AlignmentMatrixControlCellProps, 'isActive' > ) => {\n\tconst boxShadow = isActive ? `0 0 0 1px currentColor` : null;\n\n\treturn css`\n\t\tbox-shadow: ${ boxShadow };\n\t\tcolor: currentColor;\n\n\t\t*:hover > & {\n\t\t\tcolor: currentColor;\n\t\t}\n\t`;\n};\n\nexport const Point = styled.span`\n\theight: 2px;\n\twidth: 2px;\n\t${ pointBase };\n\t${ pointActive };\n`;\n\nexport const Cell = CellBase;\n"],"mappings":";;AAAA;AACA;AACA;;AAEA,SAASA,GAAG,QAAQ,gBAAgB;;AAEpC;AACA;AACA;AACA,SACCC,QAAQ,EACRC,SAAS,EACTC,IAAI,IAAIC,QAAQ,QACV,mCAAmC;AAM1C,MAAMC,QAAQ,GAAGA,CAAA,KAAM;EACtB,MAAMC,OAAO,GAAG,GAAG;EACnB,MAAMC,IAAI,GAAG,EAAE;EAEf,oBAAOP,GAAG,CAAE;IACXQ,gBAAgB,EAAG,oBAAoBD,IAAI,GAAGD,OAAO,GAAG,CAAG,UAAS;IACpEA,OAAO;IACPG,SAAS,EAAEF,IAAI;IACfG,QAAQ,EAAEH;EACX,CAAC,EAAAI,OAAA,CAAAC,GAAA,CAAAC,QAAA,6CAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,k9EAAC,CAAC;AACJ,CAAC;AAED,MAAMC,iBAAiB,GAAGA,CAAE;EAC3BC;AACgE,CAAC,KAAM;EACvE,oBAAOf,GAAG,CAAE;IACXgB,aAAa,EAAED,oBAAoB,GAAG,MAAM,GAAGE;EAChD,CAAC,EAAAN,OAAA,CAAAC,GAAA,CAAAC,QAAA,sDAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,k9EAAC,CAAC;AACJ,CAAC;AAED,OAAO,MAAMK,OAAO,GAAAC,OAAA,QAAAR,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAO,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GAAAV,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAS,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,EAGnB;AAED,OAAO,MAAMC,IAAI,GAAAR,OAAA,QAAAR,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAO,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,wDAKbpB,QAAQ,OACRI,QAAQ,OACRS,iBAAiB,SAAAH,OAAA,CAAAC,GAAA,CAAAC,QAAA,w9EACpB;AAED,MAAMe,WAAW,GAAGA,CAAE;EACrBC;AACoD,CAAC,KAAM;EAC3D,MAAMC,SAAS,GAAGD,QAAQ,GAAI,wBAAuB,GAAG,IAAI;EAE5D,oBAAO7B,GAAG,gBACM8B,SAAS,0DAAAnB,OAAA,CAAAC,GAAA,CAAAC,QAAA,iDAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA;AAO1B,CAAC;AAED,OAAO,MAAMkB,KAAK,GAAAZ,OAAA,SAAAR,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAO,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,4BAGdnB,SAAS,OACT0B,WAAW,SAAAjB,OAAA,CAAAC,GAAA,CAAAC,QAAA,w9EACd;AAED,OAAO,MAAMV,IAAI,GAAGC,QAAQ"}

View File

@@ -0,0 +1,81 @@
import _styled from "@emotion/styled/base";
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
*/
import { css } from '@emotion/react';
/**
* Internal dependencies
*/
import { COLORS, reduceMotion } from '../../utils';
var _ref = process.env.NODE_ENV === "production" ? {
name: "93uojk",
styles: "border-radius:2px;box-sizing:border-box;direction:ltr;display:grid;grid-template-columns:repeat( 3, 1fr );outline:none"
} : {
name: "kh2f2w-rootBase",
styles: "border-radius:2px;box-sizing:border-box;direction:ltr;display:grid;grid-template-columns:repeat( 3, 1fr );outline:none;label:rootBase;",
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYWxpZ25tZW50LW1hdHJpeC1jb250cm9sL3N0eWxlcy9hbGlnbm1lbnQtbWF0cml4LWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWdCVyIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2FsaWdubWVudC1tYXRyaXgtY29udHJvbC9zdHlsZXMvYWxpZ25tZW50LW1hdHJpeC1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCByZWR1Y2VNb3Rpb24gfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7XG5cdEFsaWdubWVudE1hdHJpeENvbnRyb2xQcm9wcyxcblx0QWxpZ25tZW50TWF0cml4Q29udHJv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uXHR3aWR0aDogNnB4O1xuXHQkeyBwb2ludEJhc2UgfVxuYDtcblxuZXhwb3J0IGNvbnN0IENlbGwgPSBzdHlsZWQuc3BhbmBcblx0YXBwZWFyYW5jZTogbm9uZTtcblx0Ym9yZGVyOiBub25lO1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRtYXJnaW46IDA7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0b3V0bGluZTogbm9uZTtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdHBhZGRpbmc6IDA7XG5gO1xuIl19 */",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
export const rootBase = () => {
return _ref;
};
const rootSize = ({
size = 92
}) => {
return /*#__PURE__*/css("grid-template-rows:repeat( 3, calc( ", size, "px / 3 ) );width:", size, "px;" + (process.env.NODE_ENV === "production" ? "" : ";label:rootSize;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYWxpZ25tZW50LW1hdHJpeC1jb250cm9sL3N0eWxlcy9hbGlnbm1lbnQtbWF0cml4LWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTJCVyIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2FsaWdubWVudC1tYXRyaXgtY29udHJvbC9zdHlsZXMvYWxpZ25tZW50LW1hdHJpeC1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IG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dG1hcmdpbjogYXV0bztcblx0XHR0cmFuc2l0aW9uOiBhbGwgMTIwbXMgbGluZWFyO1xuXG5cdFx0JHsgcmVkdWNlTW90aW9uKCAndHJhbnNpdGlvbicgKSB9XG5cdFx0JHsgcG9pbnRBY3RpdmUoIHByb3BzICkgfVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFBvaW50ID0gc3R5bGVkLnNwYW5gXG5cdGhlaWdodDogNnB4O1xuXHR3aWR0aDogNnB4O1xuXHQkeyBwb2ludEJhc2UgfVxuYDtcblxuZXhwb3J0IGNvbnN0IENlbGwgPSBzdHlsZWQuc3BhbmBcblx0YXBwZWFyYW5jZTogbm9uZTtcblx0Ym9yZGVyOiBub25lO1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRtYXJnaW46IDA7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0b3V0bGluZTogbm9uZTtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdHBhZGRpbmc6IDA7XG5gO1xuIl19 */");
};
export const Root = _styled("div", process.env.NODE_ENV === "production" ? {
target: "ecapk1j3"
} : {
target: "ecapk1j3",
label: "Root"
})(rootBase, ";border:1px solid transparent;cursor:pointer;grid-template-columns:auto;", rootSize, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYWxpZ25tZW50LW1hdHJpeC1jb250cm9sL3N0eWxlcy9hbGlnbm1lbnQtbWF0cml4LWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1DRyIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2FsaWdubWVudC1tYXRyaXgtY29udHJvb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wgQWxpZ25tZW50TWF0cml4Q29udHJvbENlbGxQcm9wcywgJ2lzQWN0aXZlJyA+XG4pID0+IHtcblx0cmV0dXJuIGNzc2Bcblx0XHRiYWNrZ3JvdW5kOiBjdXJyZW50Q29sb3I7XG5cdFx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0XHRkaXNwbGF5OiBncmlkO1xuXHRcdG1hcmdpbjogYXV0bztcblx0XHR0cmFuc2l0aW9uOiBhbGwgMTIwbXMgbGluZWFyO1xuXG5cdFx0JHsgcmVkdWNlTW90aW9uKCAndHJhbnNpdGlvbicgKSB9XG5cdFx0JHsgcG9pbnRBY3RpdmUoIHByb3BzICkgfVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFBvaW50ID0gc3R5bGVkLnNwYW5gXG5cdGhlaWdodDogNnB4O1xuXHR3aWR0aDogNnB4O1xuXHQkeyBwb2ludEJhc2UgfVxuYDtcblxuZXhwb3J0IGNvbnN0IENlbGwgPSBzdHlsZWQuc3BhbmBcblx0YXBwZWFyYW5jZTogbm9uZTtcblx0Ym9yZGVyOiBub25lO1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRtYXJnaW46IDA7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0b3V0bGluZTogbm9uZTtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdHBhZGRpbmc6IDA7XG5gO1xuIl19 */"));
export const Row = _styled("div", process.env.NODE_ENV === "production" ? {
target: "ecapk1j2"
} : {
target: "ecapk1j2",
label: "Row"
})(process.env.NODE_ENV === "production" ? {
name: "1x5gbbj",
styles: "box-sizing:border-box;display:grid;grid-template-columns:repeat( 3, 1fr )"
} : {
name: "1x5gbbj",
styles: "box-sizing:border-box;display:grid;grid-template-columns:repeat( 3, 1fr )",
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2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XHRwYWRkaW5nOiAwO1xuYDtcbiJdfQ== */",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
});
const pointActive = ({
isActive
}) => {
const boxShadow = isActive ? `0 0 0 2px ${COLORS.gray[900]}` : null;
const pointColor = isActive ? COLORS.gray[900] : COLORS.gray[400];
const pointColorHover = isActive ? COLORS.gray[900] : COLORS.theme.accent;
return /*#__PURE__*/css("box-shadow:", boxShadow, ";color:", pointColor, ";*:hover>&{color:", pointColorHover, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:pointActive;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYWxpZ25tZW50LW1hdHJpeC1jb250cm9sL3N0eWxlcy9hbGlnbm1lbnQtbWF0cml4LWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTBEVyIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2FsaWdubWVudC1tYXRyaXgtY29udHJvbC9zdHlsZXMvYWxpZ25tZW50LW1hdHJpeC1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCByZWR1Y2VNb3Rpb24gfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgdHlwZSB7XG5cdEFsaWdubWVudE1hdHJpeENvbnRyb2xQcm9wcyxcblx0QWxpZ25tZW50TWF0cml4Q29udHJv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uXHR3aWR0aDogNnB4O1xuXHQkeyBwb2ludEJhc2UgfVxuYDtcblxuZXhwb3J0IGNvbnN0IENlbGwgPSBzdHlsZWQuc3BhbmBcblx0YXBwZWFyYW5jZTogbm9uZTtcblx0Ym9yZGVyOiBub25lO1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRtYXJnaW46IDA7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0b3V0bGluZTogbm9uZTtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdHBhZGRpbmc6IDA7XG5gO1xuIl19 */");
};
export const pointBase = props => {
return /*#__PURE__*/css("background:currentColor;box-sizing:border-box;display:grid;margin:auto;transition:all 120ms linear;", reduceMotion('transition'), " ", pointActive(props), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:pointBase;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYWxpZ25tZW50LW1hdHJpeC1jb250cm9sL3N0eWxlcy9hbGlnbm1lbnQtbWF0cml4LWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXVFVyIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2FsaWdubWVudC1tYXRyaXgtY29udHJvbC9zdHlsZXMvYWxpZ25tZW50LW1hdHJpeC1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuL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0aW9uOiBhbGwgMTIwbXMgbGluZWFyO1xuXG5cdFx0JHsgcmVkdWNlTW90aW9uKCAndHJhbnNpdGlvbicgKSB9XG5cdFx0JHsgcG9pbnRBY3RpdmUoIHByb3BzICkgfVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFBvaW50ID0gc3R5bGVkLnNwYW5gXG5cdGhlaWdodDogNnB4O1xuXHR3aWR0aDogNnB4O1xuXHQkeyBwb2ludEJhc2UgfVxuYDtcblxuZXhwb3J0IGNvbnN0IENlbGwgPSBzdHlsZWQuc3BhbmBcblx0YXBwZWFyYW5jZTogbm9uZTtcblx0Ym9yZGVyOiBub25lO1xuXHRib3gtc2l6aW5nOiBib3JkZXItYm94O1xuXHRtYXJnaW46IDA7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0b3V0bGluZTogbm9uZTtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdHBhZGRpbmc6IDA7XG5gO1xuIl19 */");
};
export const Point = _styled("span", process.env.NODE_ENV === "production" ? {
target: "ecapk1j1"
} : {
target: "ecapk1j1",
label: "Point"
})("height:6px;width:6px;", pointBase, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYWxpZ25tZW50LW1hdHJpeC1jb250cm9sL3N0eWxlcy9hbGlnbm1lbnQtbWF0cml4LWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1GZ0MiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9hbGlnbm1lbnQtbWF0cml4LWNvbnRyb2wvc3R5bGVzL2FsaWdubWVudC1tYXRyaXgtY29udHJvbC1zdHlsZXMudH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jdGl2ZScgPlxuKSA9PiB7XG5cdHJldHVybiBjc3NgXG5cdFx0YmFja2dyb3VuZDogY3VycmVudENvbG9yO1xuXHRcdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdFx0ZGlzcGxheTogZ3JpZDtcblx0XHRtYXJnaW46IGF1dG87XG5cdFx0dHJhbnNpdGlvbjogYWxsIDEyMG1zIGxpbmVhcjtcblxuXHRcdCR7IHJlZHVjZU1vdGlvbiggJ3RyYW5zaXRpb24nICkgfVxuXHRcdCR7IHBvaW50QWN0aXZlKCBwcm9wcyApIH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBQb2ludCA9IHN0eWxlZC5zcGFuYFxuXHRoZWlnaHQ6IDZweDtcblx0d2lkdGg6IDZweDtcblx0JHsgcG9pbnRCYXNlIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBDZWxsID0gc3R5bGVkLnNwYW5gXG5cdGFwcGVhcmFuY2U6IG5vbmU7XG5cdGJvcmRlcjogbm9uZTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0bWFyZ2luOiAwO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdG91dGxpbmU6IG5vbmU7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRwYWRkaW5nOiAwO1xuYDtcbiJdfQ== */"));
export const Cell = _styled("span", process.env.NODE_ENV === "production" ? {
target: "ecapk1j0"
} : {
target: "ecapk1j0",
label: "Cell"
})(process.env.NODE_ENV === "production" ? {
name: "rjf3ub",
styles: "appearance:none;border:none;box-sizing:border-box;margin:0;display:flex;position:relative;outline:none;align-items:center;justify-content:center;padding:0"
} : {
name: "rjf3ub",
styles: "appearance:none;border:none;box-sizing:border-box;margin:0;display:flex;position:relative;outline:none;align-items:center;justify-content:center;padding:0",
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2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XHRwYWRkaW5nOiAwO1xuYDtcbiJdfQ== */",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
});
//# sourceMappingURL=alignment-matrix-control-styles.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["css","COLORS","reduceMotion","_ref","process","env","NODE_ENV","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","rootBase","rootSize","size","Root","_styled","target","label","Row","pointActive","isActive","boxShadow","gray","pointColor","pointColorHover","theme","accent","pointBase","props","Point","Cell"],"sources":["@wordpress/components/src/alignment-matrix-control/styles/alignment-matrix-control-styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, reduceMotion } from '../../utils';\nimport type {\n\tAlignmentMatrixControlProps,\n\tAlignmentMatrixControlCellProps,\n} from '../types';\n\nexport const rootBase = () => {\n\treturn css`\n\t\tborder-radius: 2px;\n\t\tbox-sizing: border-box;\n\t\tdirection: ltr;\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat( 3, 1fr );\n\t\toutline: none;\n\t`;\n};\n\nconst rootSize = ( { size = 92 } ) => {\n\treturn css`\n\t\tgrid-template-rows: repeat( 3, calc( ${ size }px / 3 ) );\n\t\twidth: ${ size }px;\n\t`;\n};\n\nexport const Root = styled.div< {\n\tsize: AlignmentMatrixControlProps[ 'width' ];\n} >`\n\t${ rootBase };\n\n\tborder: 1px solid transparent;\n\tcursor: pointer;\n\tgrid-template-columns: auto;\n\n\t${ rootSize };\n`;\n\nexport const Row = styled.div`\n\tbox-sizing: border-box;\n\tdisplay: grid;\n\tgrid-template-columns: repeat( 3, 1fr );\n`;\n\nconst pointActive = ( {\n\tisActive,\n}: Pick< AlignmentMatrixControlCellProps, 'isActive' > ) => {\n\tconst boxShadow = isActive ? `0 0 0 2px ${ COLORS.gray[ 900 ] }` : null;\n\tconst pointColor = isActive ? COLORS.gray[ 900 ] : COLORS.gray[ 400 ];\n\tconst pointColorHover = isActive ? COLORS.gray[ 900 ] : COLORS.theme.accent;\n\n\treturn css`\n\t\tbox-shadow: ${ boxShadow };\n\t\tcolor: ${ pointColor };\n\n\t\t*:hover > & {\n\t\t\tcolor: ${ pointColorHover };\n\t\t}\n\t`;\n};\n\nexport const pointBase = (\n\tprops: Pick< AlignmentMatrixControlCellProps, 'isActive' >\n) => {\n\treturn css`\n\t\tbackground: currentColor;\n\t\tbox-sizing: border-box;\n\t\tdisplay: grid;\n\t\tmargin: auto;\n\t\ttransition: all 120ms linear;\n\n\t\t${ reduceMotion( 'transition' ) }\n\t\t${ pointActive( props ) }\n\t`;\n};\n\nexport const Point = styled.span`\n\theight: 6px;\n\twidth: 6px;\n\t${ pointBase }\n`;\n\nexport const Cell = styled.span`\n\tappearance: none;\n\tborder: none;\n\tbox-sizing: border-box;\n\tmargin: 0;\n\tdisplay: flex;\n\tposition: relative;\n\toutline: none;\n\talign-items: center;\n\tjustify-content: center;\n\tpadding: 0;\n`;\n"],"mappings":";;AAAA;AACA;AACA;;AAEA,SAASA,GAAG,QAAQ,gBAAgB;;AAEpC;AACA;AACA;AACA,SAASC,MAAM,EAAEC,YAAY,QAAQ,aAAa;AAAC,IAAAC,IAAA,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA;AAMnD,OAAO,MAAMC,QAAQ,GAAGA,CAAA,KAAM;EAC7B,OAAAT,IAAA;AAQD,CAAC;AAED,MAAMU,QAAQ,GAAGA,CAAE;EAAEC,IAAI,GAAG;AAAG,CAAC,KAAM;EACrC,oBAAOd,GAAG,yCAC+Bc,IAAI,uBAClCA,IAAI,WAAAV,OAAA,CAAAC,GAAA,CAAAC,QAAA,8CAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA;AAEhB,CAAC;AAED,OAAO,MAAMS,IAAI,GAAAC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B,CAAC;AAED,OAAO,MAAMwB,KAAK,GAAAd,OAAA,SAAAZ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAW,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,4BAGdU,SAAS,SAAAxB,OAAA,CAAAC,GAAA,CAAAC,QAAA,ozGACZ;AAED,OAAO,MAAMyB,IAAI,GAAAf,OAAA,SAAAZ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAW,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GAAAd,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,EAWhB"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":[],"sources":["@wordpress/components/src/alignment-matrix-control/types.ts"],"sourcesContent":["export type AlignmentMatrixControlValue =\n\t| 'top left'\n\t| 'top center'\n\t| 'top right'\n\t| 'center left'\n\t| 'center'\n\t| 'center center'\n\t| 'center right'\n\t| 'bottom left'\n\t| 'bottom center'\n\t| 'bottom right';\n\nexport type AlignmentMatrixControlProps = {\n\t/**\n\t * Accessible label. If provided, sets the `aria-label` attribute of the\n\t * underlying `grid` widget.\n\t *\n\t * @default 'Alignment Matrix Control'\n\t */\n\tlabel?: string;\n\t/**\n\t * If provided, sets the default alignment value.\n\t *\n\t * @default 'center center'\n\t */\n\tdefaultValue?: AlignmentMatrixControlValue;\n\t/**\n\t * The current alignment value.\n\t */\n\tvalue?: AlignmentMatrixControlValue;\n\t/**\n\t * A function that receives the updated alignment value.\n\t */\n\tonChange?: ( newValue: AlignmentMatrixControlValue ) => void;\n\t/**\n\t * If provided, sets the width of the control.\n\t *\n\t * @default 92\n\t */\n\twidth?: number;\n};\n\nexport type AlignmentMatrixControlIconProps = Pick<\n\tAlignmentMatrixControlProps,\n\t'value'\n> & {\n\tdisablePointerEvents?: boolean;\n\tsize?: number;\n};\n\nexport type AlignmentMatrixControlCellProps = {\n\tisActive?: boolean;\n\tvalue: NonNullable< AlignmentMatrixControlProps[ 'value' ] >;\n};\n"],"mappings":""}

View File

@@ -0,0 +1,86 @@
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
export const GRID = [['top left', 'top center', 'top right'], ['center left', 'center center', 'center right'], ['bottom left', 'bottom center', 'bottom right']];
// Stored as map as i18n __() only accepts strings (not variables)
export const ALIGNMENT_LABEL = {
'top left': __('Top Left'),
'top center': __('Top Center'),
'top right': __('Top Right'),
'center left': __('Center Left'),
'center center': __('Center'),
center: __('Center'),
'center right': __('Center Right'),
'bottom left': __('Bottom Left'),
'bottom center': __('Bottom Center'),
'bottom right': __('Bottom Right')
};
// Transforms GRID into a flat Array of values.
export const ALIGNMENTS = GRID.flat();
/**
* Normalizes and transforms an incoming value to better match the alignment values
*
* @param value An alignment value to parse.
*
* @return The parsed value.
*/
function normalize(value) {
const normalized = value === 'center' ? 'center center' : value;
// Strictly speaking, this could be `string | null | undefined`,
// but will be validated shortly, so we're typecasting to an
// `AlignmentMatrixControlValue` to keep TypeScript happy.
const transformed = normalized?.replace('-', ' ');
return ALIGNMENTS.includes(transformed) ? transformed : undefined;
}
/**
* Creates an item ID based on a prefix ID and an alignment value.
*
* @param prefixId An ID to prefix.
* @param value An alignment value.
*
* @return The item id.
*/
export function getItemId(prefixId, value) {
const normalized = normalize(value);
if (!normalized) return;
const id = normalized.replace(' ', '-');
return `${prefixId}-${id}`;
}
/**
* Extracts an item value from its ID
*
* @param prefixId An ID prefix to remove
* @param id An item ID
* @return The item value
*/
export function getItemValue(prefixId, id) {
const value = id?.replace(prefixId + '-', '');
return normalize(value);
}
/**
* Retrieves the alignment index from a value.
*
* @param alignment Value to check.
*
* @return The index of a matching alignment.
*/
export function getAlignmentIndex(alignment = 'center') {
const normalized = normalize(alignment);
if (!normalized) return undefined;
const index = ALIGNMENTS.indexOf(normalized);
return index > -1 ? index : undefined;
}
//# sourceMappingURL=utils.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["__","GRID","ALIGNMENT_LABEL","center","ALIGNMENTS","flat","normalize","value","normalized","transformed","replace","includes","undefined","getItemId","prefixId","id","getItemValue","getAlignmentIndex","alignment","index","indexOf"],"sources":["@wordpress/components/src/alignment-matrix-control/utils.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { AlignmentMatrixControlValue } from './types';\n\nexport const GRID: AlignmentMatrixControlValue[][] = [\n\t[ 'top left', 'top center', 'top right' ],\n\t[ 'center left', 'center center', 'center right' ],\n\t[ 'bottom left', 'bottom center', 'bottom right' ],\n];\n\n// Stored as map as i18n __() only accepts strings (not variables)\nexport const ALIGNMENT_LABEL: Record< AlignmentMatrixControlValue, string > = {\n\t'top left': __( 'Top Left' ),\n\t'top center': __( 'Top Center' ),\n\t'top right': __( 'Top Right' ),\n\t'center left': __( 'Center Left' ),\n\t'center center': __( 'Center' ),\n\tcenter: __( 'Center' ),\n\t'center right': __( 'Center Right' ),\n\t'bottom left': __( 'Bottom Left' ),\n\t'bottom center': __( 'Bottom Center' ),\n\t'bottom right': __( 'Bottom Right' ),\n};\n\n// Transforms GRID into a flat Array of values.\nexport const ALIGNMENTS = GRID.flat();\n\n/**\n * Normalizes and transforms an incoming value to better match the alignment values\n *\n * @param value An alignment value to parse.\n *\n * @return The parsed value.\n */\nfunction normalize( value?: string | null ) {\n\tconst normalized = value === 'center' ? 'center center' : value;\n\n\t// Strictly speaking, this could be `string | null | undefined`,\n\t// but will be validated shortly, so we're typecasting to an\n\t// `AlignmentMatrixControlValue` to keep TypeScript happy.\n\tconst transformed = normalized?.replace(\n\t\t'-',\n\t\t' '\n\t) as AlignmentMatrixControlValue;\n\n\treturn ALIGNMENTS.includes( transformed ) ? transformed : undefined;\n}\n\n/**\n * Creates an item ID based on a prefix ID and an alignment value.\n *\n * @param prefixId An ID to prefix.\n * @param value An alignment value.\n *\n * @return The item id.\n */\nexport function getItemId(\n\tprefixId: string,\n\tvalue?: AlignmentMatrixControlValue\n) {\n\tconst normalized = normalize( value );\n\tif ( ! normalized ) return;\n\n\tconst id = normalized.replace( ' ', '-' );\n\treturn `${ prefixId }-${ id }`;\n}\n\n/**\n * Extracts an item value from its ID\n *\n * @param prefixId An ID prefix to remove\n * @param id An item ID\n * @return The item value\n */\nexport function getItemValue( prefixId: string, id?: string | null ) {\n\tconst value = id?.replace( prefixId + '-', '' );\n\treturn normalize( value );\n}\n\n/**\n * Retrieves the alignment index from a value.\n *\n * @param alignment Value to check.\n *\n * @return The index of a matching alignment.\n */\nexport function getAlignmentIndex(\n\talignment: AlignmentMatrixControlValue = 'center'\n) {\n\tconst normalized = normalize( alignment );\n\tif ( ! normalized ) return undefined;\n\n\tconst index = ALIGNMENTS.indexOf( normalized );\n\treturn index > -1 ? index : undefined;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;;AAGA,OAAO,MAAMC,IAAqC,GAAG,CACpD,CAAE,UAAU,EAAE,YAAY,EAAE,WAAW,CAAE,EACzC,CAAE,aAAa,EAAE,eAAe,EAAE,cAAc,CAAE,EAClD,CAAE,aAAa,EAAE,eAAe,EAAE,cAAc,CAAE,CAClD;;AAED;AACA,OAAO,MAAMC,eAA8D,GAAG;EAC7E,UAAU,EAAEF,EAAE,CAAE,UAAW,CAAC;EAC5B,YAAY,EAAEA,EAAE,CAAE,YAAa,CAAC;EAChC,WAAW,EAAEA,EAAE,CAAE,WAAY,CAAC;EAC9B,aAAa,EAAEA,EAAE,CAAE,aAAc,CAAC;EAClC,eAAe,EAAEA,EAAE,CAAE,QAAS,CAAC;EAC/BG,MAAM,EAAEH,EAAE,CAAE,QAAS,CAAC;EACtB,cAAc,EAAEA,EAAE,CAAE,cAAe,CAA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EV,UAAU,EAAG,OAAOI,SAAS;EAEpC,MAAMO,KAAK,GAAGf,UAAU,CAACgB,OAAO,CAAEZ,UAAW,CAAC;EAC9C,OAAOW,KAAK,GAAG,CAAC,CAAC,GAAGA,KAAK,GAAGP,SAAS;AACtC"}

View File

@@ -0,0 +1,96 @@
import { createElement } from "react";
/**
* WordPress dependencies
*/
import { useEffect, useRef } from '@wordpress/element';
import { __experimentalUseDragging as useDragging } from '@wordpress/compose';
/**
* Internal dependencies
*/
import { CircleRoot, CircleIndicatorWrapper, CircleIndicator } from './styles/angle-picker-control-styles';
function AngleCircle({
value,
onChange,
...props
}) {
const angleCircleRef = useRef(null);
const angleCircleCenter = useRef();
const previousCursorValue = useRef();
const setAngleCircleCenter = () => {
if (angleCircleRef.current === null) {
return;
}
const rect = angleCircleRef.current.getBoundingClientRect();
angleCircleCenter.current = {
x: rect.x + rect.width / 2,
y: rect.y + rect.height / 2
};
};
const changeAngleToPosition = event => {
if (event === undefined) {
return;
}
// Prevent (drag) mouse events from selecting and accidentally
// triggering actions from other elements.
event.preventDefault();
// Input control needs to lose focus and by preventDefault above, it doesn't.
event.target?.focus();
if (angleCircleCenter.current !== undefined && onChange !== undefined) {
const {
x: centerX,
y: centerY
} = angleCircleCenter.current;
onChange(getAngle(centerX, centerY, event.clientX, event.clientY));
}
};
const {
startDrag,
isDragging
} = useDragging({
onDragStart: event => {
setAngleCircleCenter();
changeAngleToPosition(event);
},
onDragMove: changeAngleToPosition,
onDragEnd: changeAngleToPosition
});
useEffect(() => {
if (isDragging) {
if (previousCursorValue.current === undefined) {
previousCursorValue.current = document.body.style.cursor;
}
document.body.style.cursor = 'grabbing';
} else {
document.body.style.cursor = previousCursorValue.current || '';
previousCursorValue.current = undefined;
}
}, [isDragging]);
return createElement(CircleRoot, {
ref: angleCircleRef,
onMouseDown: startDrag,
className: "components-angle-picker-control__angle-circle",
...props
}, createElement(CircleIndicatorWrapper, {
style: value ? {
transform: `rotate(${value}deg)`
} : undefined,
className: "components-angle-picker-control__angle-circle-indicator-wrapper",
tabIndex: -1
}, createElement(CircleIndicator, {
className: "components-angle-picker-control__angle-circle-indicator"
})));
}
function getAngle(centerX, centerY, pointX, pointY) {
const y = pointY - centerY;
const x = pointX - centerX;
const angleInRadians = Math.atan2(y, x);
const angleInDeg = Math.round(angleInRadians * (180 / Math.PI)) + 90;
if (angleInDeg < 0) {
return 360 + angleInDeg;
}
return angleInDeg;
}
export default AngleCircle;
//# sourceMappingURL=angle-circle.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,100 @@
import { createElement } from "react";
/**
* External dependencies
*/
import classnames from 'classnames';
/**
* WordPress dependencies
*/
import deprecated from '@wordpress/deprecated';
import { forwardRef } from '@wordpress/element';
import { isRTL, __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import { FlexBlock } from '../flex';
import { Spacer } from '../spacer';
import NumberControl from '../number-control';
import AngleCircle from './angle-circle';
import { Root, UnitText } from './styles/angle-picker-control-styles';
function UnforwardedAnglePickerControl(props, ref) {
const {
__nextHasNoMarginBottom = false,
className,
label = __('Angle'),
onChange,
value,
...restProps
} = props;
if (!__nextHasNoMarginBottom) {
deprecated('Bottom margin styles for wp.components.AnglePickerControl', {
since: '6.1',
hint: 'Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version.'
});
}
const handleOnNumberChange = unprocessedValue => {
if (onChange === undefined) {
return;
}
const inputValue = unprocessedValue !== undefined && unprocessedValue !== '' ? parseInt(unprocessedValue, 10) : 0;
onChange(inputValue);
};
const classes = classnames('components-angle-picker-control', className);
const unitText = createElement(UnitText, null, "\xB0");
const [prefixedUnitText, suffixedUnitText] = isRTL() ? [unitText, null] : [null, unitText];
return createElement(Root, {
...restProps,
ref: ref,
__nextHasNoMarginBottom: __nextHasNoMarginBottom,
className: classes,
gap: 2
}, createElement(FlexBlock, null, createElement(NumberControl, {
label: label,
className: "components-angle-picker-control__input-field",
max: 360,
min: 0,
onChange: handleOnNumberChange,
size: "__unstable-large",
step: "1",
value: value,
spinControls: "none",
prefix: prefixedUnitText,
suffix: suffixedUnitText
})), createElement(Spacer, {
marginBottom: "1",
marginTop: "auto"
}, createElement(AngleCircle, {
"aria-hidden": "true",
value: value,
onChange: onChange
})));
}
/**
* `AnglePickerControl` is a React component to render a UI that allows users to
* pick an angle. Users can choose an angle in a visual UI with the mouse by
* dragging an angle indicator inside a circle or by directly inserting the
* desired angle in a text field.
*
* ```jsx
* import { useState } from '@wordpress/element';
* import { AnglePickerControl } from '@wordpress/components';
*
* function Example() {
* const [ angle, setAngle ] = useState( 0 );
* return (
* <AnglePickerControl
* value={ angle }
* onChange={ setAngle }
* __nextHasNoMarginBottom
* </>
* );
* }
* ```
*/
export const AnglePickerControl = forwardRef(UnforwardedAnglePickerControl);
export default AnglePickerControl;
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,60 @@
import _styled from "@emotion/styled/base";
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
*/
import { css } from '@emotion/react';
/**
* Internal dependencies
*/
import { Flex } from '../../flex';
import { COLORS } from '../../utils';
import { space } from '../../utils/space';
import { Text } from '../../text';
import CONFIG from '../../utils/config-values';
const CIRCLE_SIZE = 32;
const INNER_CIRCLE_SIZE = 6;
const deprecatedBottomMargin = ({
__nextHasNoMarginBottom
}) => {
return !__nextHasNoMarginBottom ? /*#__PURE__*/css("margin-bottom:", space(2), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:deprecatedBottomMargin;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYW5nbGUtcGlja2VyLWNvbnRyb2wvc3R5bGVzL2F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ZnQ6IDUwJTtcblx0dG9wOiA0cHg7XG5cdHRyYW5zZm9ybTogdHJhbnNsYXRlWCggLTUwJSApO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHdpZHRoOiAkeyBJTk5FUl9DSVJDTEVfU0laRSB9cHg7XG5cdGhlaWdodDogJHsgSU5ORVJfQ0lSQ0xFX1NJWkUgfXB4O1xuYDtcblxuZXhwb3J0IGNvbnN0IFVuaXRUZXh0ID0gc3R5bGVkKCBUZXh0IClgXG5cdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdG1hcmdpbi1yaWdodDogJHsgc3BhY2UoIDMgKSB9O1xuYDtcbiJdfQ== */") : '';
};
export const Root = /*#__PURE__*/_styled(Flex, process.env.NODE_ENV === "production" ? {
target: "eln3bjz4"
} : {
target: "eln3bjz4",
label: "Root"
})(deprecatedBottomMargin, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYW5nbGUtcGlja2VyLWNvbnRyb2wvc3R5bGVzL2FuZ2xlLXBpY2tlci1jb250cm9sLXN0eWxlcy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBOEJrQyIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2FuZ2xlLXBpY2tlci1jb250cm9sL3N0eWxlcy9hbmdsZS1waWNrZXItY29udHJvbC1zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc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3bjz3"
} : {
target: "eln3bjz3",
label: "CircleRoot"
})("border-radius:50%;border:", CONFIG.borderWidth, " solid ", COLORS.ui.border, ";box-sizing:border-box;cursor:grab;height:", CIRCLE_SIZE, "px;overflow:hidden;width:", CIRCLE_SIZE, "px;:active{cursor:grabbing;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYW5nbGUtcGlja2VyLWNvbnRyb2wvc3R5bGVzL2FuZ2xlLXBpY2tlci1jb250cm9sLXN0eWxlcy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBa0NvQyIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2FuZ2xlLXBpY2tlci1jb250cm9sL3N0eWxlcy9hbmdsZS1waWNrZXItY29udHJvbC1zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBGbGV4IH0gZnJvbSAnLi4vLi4vZmxleCc7XG5pbXBvcnQgeyBDT0xPUlMgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IFRleHQgfSBmcm9tICcuLi8uLi90ZXh0JztcbmltcG9ydCBDT05GSUcgZnJvbSAnLi4vLi4vdXRpbHMvY29uZmlnLXZhbHVlcyc7XG5cbmltcG9ydCB0eXBlIHsgQW5nbGVQaWNrZXJDb250cm9sUH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uXHR3aWR0aDogMTAwJTtcblx0aGVpZ2h0OiAxMDAlO1xuXG5cdDpmb2N1cy12aXNpYmxlIHtcblx0XHRvdXRsaW5lOiBub25lO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgQ2lyY2xlSW5kaWNhdG9yID0gc3R5bGVkLmRpdmBcblx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRib3JkZXItcmFkaXVzOiA1MCU7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRsZWZ0OiA1MCU7XG5cdHRvcDogNHB4O1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIC01MCUgKTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR3aWR0aDogJHsgSU5ORVJfQ0lSQ0xFX1NJWkUgfXB4O1xuXHRoZWlnaHQ6ICR7IElOTkVSX0NJUkNMRV9TSVpFIH1weDtcbmA7XG5cbmV4cG9ydCBjb25zdCBVbml0VGV4dCA9IHN0eWxlZCggVGV4dCApYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAzICkgfTtcbmA7XG4iXX0= */"));
export const CircleIndicatorWrapper = _styled("div", process.env.NODE_ENV === "production" ? {
target: "eln3bjz2"
} : {
target: "eln3bjz2",
label: "CircleIndicatorWrapper"
})(process.env.NODE_ENV === "production" ? {
name: "1r307gh",
styles: "box-sizing:border-box;position:relative;width:100%;height:100%;:focus-visible{outline:none;}"
} : {
name: "1r307gh",
styles: "box-sizing:border-box;position:relative;width:100%;height:100%;:focus-visible{outline:none;}",
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYW5nbGUtcGlja2VyLWNvbnRyb2wvc3R5bG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1xuXHRsZWZ0OiA1MCU7XG5cdHRvcDogNHB4O1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIC01MCUgKTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR3aWR0aDogJHsgSU5ORVJfQ0lSQ0xFX1NJWkUgfXB4O1xuXHRoZWlnaHQ6ICR7IElOTkVSX0NJUkNMRV9TSVpFIH1weDtcbmA7XG5cbmV4cG9ydCBjb25zdCBVbml0VGV4dCA9IHN0eWxlZCggVGV4dCApYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAzICkgfTtcbmA7XG4iXX0= */",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
});
export const CircleIndicator = _styled("div", process.env.NODE_ENV === "production" ? {
target: "eln3bjz1"
} : {
target: "eln3bjz1",
label: "CircleIndicator"
})("background:", COLORS.theme.accent, ";border-radius:50%;box-sizing:border-box;display:block;left:50%;top:4px;transform:translateX( -50% );position:absolute;width:", INNER_CIRCLE_SIZE, "px;height:", INNER_CIRCLE_SIZE, "px;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYW5nbGUtcGlja2VyLWNvbnRyb2wvc3R5bGVzL2FuZ2xlLXBpY2tlci1jb250cm9sLXN0eWxlcy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMkR5QyIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2FuZ2xlLXBpY2tlci1jb250cm9sL3N0eWxlcy9hbmdsZS1waWNrZXItY29udHJvbC1zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsg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MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAzICkgfTtcbmA7XG4iXX0= */"));
export const UnitText = /*#__PURE__*/_styled(Text, process.env.NODE_ENV === "production" ? {
target: "eln3bjz0"
} : {
target: "eln3bjz0",
label: "UnitText"
})("color:", COLORS.theme.accent, ";margin-right:", space(3), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYW5nbGUtcGlja2VyLWNvbnRyb2wvc3R5bGVzL2FuZ2xlLXBpY2tlci1jb250cm9sLXN0eWxlcy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBd0VzQyIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2FuZ2xlLXBpY2tlci1jb250cm9sL3N0eWxlcy9hbmdsZS1waWNrZXItY29udHJvbC1zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBGbGV4IH0gZnJvbSAnLi4vLi4vZmxleCc7XG5pbXBvcnQgeyBDT0xPUlMgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcbmltcG9ydCB7IFRleHQgfSBmcm9tICcuLi8uLi90ZXh0JztcbmltcG9ydCBDT05GSUcgZnJvbSAnLi4vLi4vdXRpbHMvY29uZmlnLXZhbHVlcyc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emluZzogYm9yZGVyLWJveDtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHR3aWR0aDogMTAwJTtcblx0aGVpZ2h0OiAxMDAlO1xuXG5cdDpmb2N1cy12aXNpYmxlIHtcblx0XHRvdXRsaW5lOiBub25lO1xuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgQ2lyY2xlSW5kaWNhdG9yID0gc3R5bGVkLmRpdmBcblx0YmFja2dyb3VuZDogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRib3JkZXItcmFkaXVzOiA1MCU7XG5cdGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG5cdGRpc3BsYXk6IGJsb2NrO1xuXHRsZWZ0OiA1MCU7XG5cdHRvcDogNHB4O1xuXHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoIC01MCUgKTtcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR3aWR0aDogJHsgSU5ORVJfQ0lSQ0xFX1NJWkUgfXB4O1xuXHRoZWlnaHQ6ICR7IElOTkVSX0NJUkNMRV9TSVpFIH1weDtcbmA7XG5cbmV4cG9ydCBjb25zdCBVbml0VGV4dCA9IHN0eWxlZCggVGV4dCApYFxuXHRjb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXHRtYXJnaW4tcmlnaHQ6ICR7IHNwYWNlKCAzICkgfTtcbmA7XG4iXX0= */"));
//# sourceMappingURL=angle-picker-control-styles.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["css","Flex","COLORS","space","Text","CONFIG","CIRCLE_SIZE","INNER_CIRCLE_SIZE","deprecatedBottomMargin","__nextHasNoMarginBottom","process","env","NODE_ENV","Root","_styled","target","label","CircleRoot","borderWidth","ui","border","CircleIndicatorWrapper","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","CircleIndicator","theme","accent","UnitText"],"sources":["@wordpress/components/src/angle-picker-control/styles/angle-picker-control-styles.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { Flex } from '../../flex';\nimport { COLORS } from '../../utils';\nimport { space } from '../../utils/space';\nimport { Text } from '../../text';\nimport CONFIG from '../../utils/config-values';\n\nimport type { AnglePickerControlProps } from '../types';\n\nconst CIRCLE_SIZE = 32;\nconst INNER_CIRCLE_SIZE = 6;\n\nconst deprecatedBottomMargin = ( {\n\t__nextHasNoMarginBottom,\n}: Pick< AnglePickerControlProps, '__nextHasNoMarginBottom' > ) => {\n\treturn ! __nextHasNoMarginBottom\n\t\t? css`\n\t\t\t\tmargin-bottom: ${ space( 2 ) };\n\t\t `\n\t\t: '';\n};\n\nexport const Root = styled( Flex )`\n\t${ deprecatedBottomMargin }\n`;\n\nexport const CircleRoot = styled.div`\n\tborder-radius: 50%;\n\tborder: ${ CONFIG.borderWidth } solid ${ COLORS.ui.border };\n\tbox-sizing: border-box;\n\tcursor: grab;\n\theight: ${ CIRCLE_SIZE }px;\n\toverflow: hidden;\n\twidth: ${ CIRCLE_SIZE }px;\n\n\t:active {\n\t\tcursor: grabbing;\n\t}\n`;\n\nexport const CircleIndicatorWrapper = styled.div`\n\tbox-sizing: border-box;\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n\n\t:focus-visible {\n\t\toutline: none;\n\t}\n`;\n\nexport const CircleIndicator = styled.div`\n\tbackground: ${ COLORS.theme.accent };\n\tborder-radius: 50%;\n\tbox-sizing: border-box;\n\tdisplay: block;\n\tleft: 50%;\n\ttop: 4px;\n\ttransform: translateX( -50% );\n\tposition: absolute;\n\twidth: ${ INNER_CIRCLE_SIZE }px;\n\theight: ${ INNER_CIRCLE_SIZE }px;\n`;\n\nexport const UnitText = styled( Text )`\n\tcolor: ${ COLORS.theme.accent };\n\tmargin-right: ${ space( 3 ) };\n`;\n"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,GAAG,QAAQ,gBAAgB;AAGpC;AACA;AACA;AACA,SAASC,IAA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AAED,OAAO,MAAMC,eAAe,GAAAb,OAAA,QAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,kBACZd,MAAM,CAAC0B,KAAK,CAACC,MAAM,mIAQxBtB,iBAAiB,gBAChBA,iBAAiB,WAAAG,OAAA,CAAAC,GAAA,CAAAC,QAAA,grFAC5B;AAED,OAAO,MAAMkB,QAAQ,GAAG,aAAAhB,OAAA,CAAQV,IAAI,EAAAM,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,WAC3Bd,MAAM,CAAC0B,KAAK,CAACC,MAAM,oBACZ1B,KAAK,CAAE,CAAE,CAAC,SAAAO,OAAA,CAAAC,GAAA,CAAAC,QAAA,grFAC3B"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":[],"sources":["@wordpress/components/src/angle-picker-control/types.ts"],"sourcesContent":["export type AnglePickerControlProps = {\n\t/**\n\t * Start opting into the new margin-free styles that will become the default\n\t * in a future version.\n\t *\n\t * @default false\n\t */\n\t__nextHasNoMarginBottom?: boolean;\n\t/**\n\t * Label to use for the angle picker.\n\t *\n\t * @default __( 'Angle' )\n\t */\n\tlabel?: string;\n\t/**\n\t * A function that receives the new value of the input.\n\t */\n\tonChange: ( value: number ) => void;\n\t/**\n\t * The current value of the input. The value represents an angle in degrees\n\t * and should be a value between 0 and 360.\n\t */\n\tvalue: number | string;\n};\n\nexport type AngleCircleProps = Pick<\n\tAnglePickerControlProps,\n\t'value' | 'onChange'\n>;\n"],"mappings":""}

View File

@@ -0,0 +1,74 @@
/**
* External dependencies
*/
import classnames from 'classnames';
/**
* Internal dependencies
*/
/**
* @param type The animation type
* @return Default origin
*/
function getDefaultOrigin(type) {
return type === 'appear' ? 'top' : 'left';
}
/**
* @param options
*
* @return ClassName that applies the animations
*/
export function getAnimateClassName(options) {
if (options.type === 'loading') {
return classnames('components-animate__loading');
}
const {
type,
origin = getDefaultOrigin(type)
} = options;
if (type === 'appear') {
const [yAxis, xAxis = 'center'] = origin.split(' ');
return classnames('components-animate__appear', {
['is-from-' + xAxis]: xAxis !== 'center',
['is-from-' + yAxis]: yAxis !== 'middle'
});
}
if (type === 'slide-in') {
return classnames('components-animate__slide-in', 'is-from-' + origin);
}
return undefined;
}
/**
* Simple interface to introduce animations to components.
*
* ```jsx
* import { Animate, Notice } from '@wordpress/components';
*
* const MyAnimatedNotice = () => (
* <Animate type="slide-in" options={ { origin: 'top' } }>
* { ( { className } ) => (
* <Notice className={ className } status="success">
* <p>Animation finished.</p>
* </Notice>
* ) }
* </Animate>
* );
* ```
*/
export function Animate({
type,
options = {},
children
}) {
return children({
className: getAnimateClassName({
type,
...options
})
});
}
export default Animate;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["classnames","getDefaultOrigin","type","getAnimateClassName","options","origin","yAxis","xAxis","split","undefined","Animate","children","className"],"sources":["@wordpress/components/src/animate/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport type { AnimateProps, GetAnimateOptions } from './types';\n\n/**\n * @param type The animation type\n * @return Default origin\n */\nfunction getDefaultOrigin( type?: GetAnimateOptions[ 'type' ] ) {\n\treturn type === 'appear' ? 'top' : 'left';\n}\n\n/**\n * @param options\n *\n * @return ClassName that applies the animations\n */\nexport function getAnimateClassName( options: GetAnimateOptions ) {\n\tif ( options.type === 'loading' ) {\n\t\treturn classnames( 'components-animate__loading' );\n\t}\n\n\tconst { type, origin = getDefaultOrigin( type ) } = options;\n\n\tif ( type === 'appear' ) {\n\t\tconst [ yAxis, xAxis = 'center' ] = origin.split( ' ' );\n\t\treturn classnames( 'components-animate__appear', {\n\t\t\t[ 'is-from-' + xAxis ]: xAxis !== 'center',\n\t\t\t[ 'is-from-' + yAxis ]: yAxis !== 'middle',\n\t\t} );\n\t}\n\n\tif ( type === 'slide-in' ) {\n\t\treturn classnames(\n\t\t\t'components-animate__slide-in',\n\t\t\t'is-from-' + origin\n\t\t);\n\t}\n\n\treturn undefined;\n}\n\n/**\n * Simple interface to introduce animations to components.\n *\n * ```jsx\n * import { Animate, Notice } from '@wordpress/components';\n *\n * const MyAnimatedNotice = () => (\n * \t<Animate type=\"slide-in\" options={ { origin: 'top' } }>\n * \t\t{ ( { className } ) => (\n * \t\t\t<Notice className={ className } status=\"success\">\n * \t\t\t\t<p>Animation finished.</p>\n * \t\t\t</Notice>\n * \t\t) }\n * \t</Animate>\n * );\n * ```\n */\nexport function Animate( { type, options = {}, children }: AnimateProps ) {\n\treturn children( {\n\t\tclassName: getAnimateClassName( {\n\t\t\ttype,\n\t\t\t...options,\n\t\t} as GetAnimateOptions ),\n\t} );\n}\n\nexport default Animate;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CAAEC,IAAkC,EAAG;EAC/D,OAAOA,IAAI,KAAK,QAAQ,GAAG,KAAK,GAAG,MAAM;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAAEC,OAA0B,EAAG;EACjE,IAAKA,OAAO,CAACF,IAAI,KAAK,SAAS,EAAG;IACjC,OAAOF,UAAU,CAAE,6BAA8B,CAAC;EACnD;EAEA,MAAM;IAAEE,IAAI;IAAEG,MAAM,GAAGJ,gBAAgB,CAAEC,IAAK;EAAE,CAAC,GAAGE,OAAO;EAE3D,IAAKF,IAAI,KAAK,QAAQ,EAAG;IACxB,MAAM,CAAEI,KAAK,EAAEC,KAAK,GAAG,QAAQ,CAAE,GAAGF,MAAM,CAACG,KAAK,CAAE,GAAI,CAAC;IACvD,OAAOR,UAAU,CAAE,4BAA4B,EAAE;MAChD,CAAE,UAAU,GAAGO,KAAK,GAAIA,KAAK,KAAK,QAAQ;MAC1C,CAAE,UAAU,GAAGD,KAAK,GAAIA,KAAK,KAAK;IACnC,CAAE,CAAC;EACJ;EAEA,IAAKJ,IAAI,KAAK,UAAU,EAAG;IAC1B,OAAOF,UAAU,CAChB,8BAA8B,EAC9B,UAAU,GAAGK,MACd,CAAC;EACF;EAEA,OAAOI,SAAS;AACjB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,OAAOA,CAAE;EAAER,IAAI;EAAEE,OAAO,GAAG,CAAC,CAAC;EAAEO;AAAuB,CAAC,EAAG;EACzE,OAAOA,QAAQ,CAAE;IAChBC,SAAS,EAAET,mBAAmB,CAAE;MAC/BD,IAAI;MACJ,GAAGE;IACJ,CAAuB;EACxB,CAAE,CAAC;AACJ;AAEA,eAAeM,OAAO"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":[],"sources":["@wordpress/components/src/animate/types.ts"],"sourcesContent":["export type AppearOptions = {\n\ttype: 'appear';\n\torigin?:\n\t\t| 'top'\n\t\t| 'top left'\n\t\t| 'top right'\n\t\t| 'middle'\n\t\t| 'middle left'\n\t\t| 'middle right'\n\t\t| 'bottom'\n\t\t| 'bottom left'\n\t\t| 'bottom right';\n};\ntype SlideInOptions = { type: 'slide-in'; origin?: 'left' | 'right' };\ntype LoadingOptions = { type: 'loading'; origin?: never };\ntype NoAnimationOptions = { type?: never; origin?: never };\n\nexport type GetAnimateOptions =\n\t| AppearOptions\n\t| SlideInOptions\n\t| LoadingOptions\n\t| NoAnimationOptions;\n\n// Create a new type that and distributes the `Pick` operator separately to\n// every individual type of a union, thus preserving that same union.\ntype DistributiveTypeAndOptions< T extends { type?: any } > = T extends any\n\t? Pick< T, 'type' > & { options?: Omit< T, 'type' > }\n\t: never;\n\nexport type AnimateProps = DistributiveTypeAndOptions< GetAnimateOptions > & {\n\tchildren: ( props: { className?: string } ) => JSX.Element;\n};\n"],"mappings":""}

View File

@@ -0,0 +1,11 @@
/**
* Framer Motion is used to create animated, interactive interfaces. The package is roughly ~30kb so
* this should ideally be loaded once across all Gutenberg packages. To give ourselves more flexibility
* in trying animation options, we avoid making this public API.
*
* @see https://www.framer.com/docs/animation/
*/
// eslint-disable-next-line no-restricted-imports
export { motion as __unstableMotion, AnimatePresence as __unstableAnimatePresence, MotionContext as __unstableMotionContext } from 'framer-motion';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["motion","__unstableMotion","AnimatePresence","__unstableAnimatePresence","MotionContext","__unstableMotionContext"],"sources":["@wordpress/components/src/animation/index.tsx"],"sourcesContent":["/**\n * Framer Motion is used to create animated, interactive interfaces. The package is roughly ~30kb so\n * this should ideally be loaded once across all Gutenberg packages. To give ourselves more flexibility\n * in trying animation options, we avoid making this public API.\n *\n * @see https://www.framer.com/docs/animation/\n */\n\n// eslint-disable-next-line no-restricted-imports\nexport {\n\tmotion as __unstableMotion,\n\tAnimatePresence as __unstableAnimatePresence,\n\tMotionContext as __unstableMotionContext,\n} from 'framer-motion';\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SACCA,MAAM,IAAIC,gBAAgB,EAC1BC,eAAe,IAAIC,yBAAyB,EAC5CC,aAAa,IAAIC,uBAAuB,QAClC,eAAe"}

View File

@@ -0,0 +1,131 @@
import { createElement, Fragment } from "react";
/**
* External dependencies
*/
import classnames from 'classnames';
/**
* WordPress dependencies
*/
import { useLayoutEffect, useRef, useEffect, useState } from '@wordpress/element';
import { useAnchor } from '@wordpress/rich-text';
import { useDebounce, useMergeRefs, useRefEffect } from '@wordpress/compose';
import { speak } from '@wordpress/a11y';
import { __, _n, sprintf } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import getDefaultUseItems from './get-default-use-items';
import Button from '../button';
import Popover from '../popover';
import { VisuallyHidden } from '../visually-hidden';
import { createPortal } from 'react-dom';
export function getAutoCompleterUI(autocompleter) {
const useItems = autocompleter.useItems ? autocompleter.useItems : getDefaultUseItems(autocompleter);
function AutocompleterUI({
filterValue,
instanceId,
listBoxId,
className,
selectedIndex,
onChangeOptions,
onSelect,
onReset,
reset,
contentRef
}) {
const [items] = useItems(filterValue);
const popoverAnchor = useAnchor({
editableContentElement: contentRef.current
});
const [needsA11yCompat, setNeedsA11yCompat] = useState(false);
const popoverRef = useRef(null);
const popoverRefs = useMergeRefs([popoverRef, useRefEffect(node => {
if (!contentRef.current) return;
// If the popover is rendered in a different document than
// the content, we need to duplicate the options list in the
// content document so that it's available to the screen
// readers, which check the DOM ID based aira-* attributes.
setNeedsA11yCompat(node.ownerDocument !== contentRef.current.ownerDocument);
}, [contentRef])]);
useOnClickOutside(popoverRef, reset);
const debouncedSpeak = useDebounce(speak, 500);
function announce(options) {
if (!debouncedSpeak) {
return;
}
if (!!options.length) {
if (filterValue) {
debouncedSpeak(sprintf( /* translators: %d: number of results. */
_n('%d result found, use up and down arrow keys to navigate.', '%d results found, use up and down arrow keys to navigate.', options.length), options.length), 'assertive');
} else {
debouncedSpeak(sprintf( /* translators: %d: number of results. */
_n('Initial %d result loaded. Type to filter all available results. Use up and down arrow keys to navigate.', 'Initial %d results loaded. Type to filter all available results. Use up and down arrow keys to navigate.', options.length), options.length), 'assertive');
}
} else {
debouncedSpeak(__('No results.'), 'assertive');
}
}
useLayoutEffect(() => {
onChangeOptions(items);
announce(items);
// Temporarily disabling exhaustive-deps to avoid introducing unexpected side effecst.
// See https://github.com/WordPress/gutenberg/pull/41820
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [items]);
if (items.length === 0) {
return null;
}
const ListBox = ({
Component = 'div'
}) => createElement(Component, {
id: listBoxId,
role: "listbox",
className: "components-autocomplete__results"
}, items.map((option, index) => createElement(Button, {
key: option.key,
id: `components-autocomplete-item-${instanceId}-${option.key}`,
role: "option",
"aria-selected": index === selectedIndex,
disabled: option.isDisabled,
className: classnames('components-autocomplete__result', className, {
'is-selected': index === selectedIndex
}),
onClick: () => onSelect(option)
}, option.label)));
return createElement(Fragment, null, createElement(Popover, {
focusOnMount: false,
onClose: onReset,
placement: "top-start",
className: "components-autocomplete__popover",
anchor: popoverAnchor,
ref: popoverRefs
}, createElement(ListBox, null)), contentRef.current && needsA11yCompat && createPortal(createElement(ListBox, {
Component: VisuallyHidden
}), contentRef.current.ownerDocument.body));
}
return AutocompleterUI;
}
function useOnClickOutside(ref, handler) {
useEffect(() => {
const listener = event => {
// Do nothing if clicking ref's element or descendent elements, or if the ref is not referencing an element
if (!ref.current || ref.current.contains(event.target)) {
return;
}
handler(event);
};
document.addEventListener('mousedown', listener);
document.addEventListener('touchstart', listener);
return () => {
document.removeEventListener('mousedown', listener);
document.removeEventListener('touchstart', listener);
};
// Disable reason: `ref` is a ref object and should not be included in a
// hook's dependency list.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [handler]);
}
//# sourceMappingURL=autocompleter-ui.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,138 @@
import { createElement } from "react";
/**
* External dependencies
*/
import { View, Animated, StyleSheet, Text, TouchableOpacity, ScrollView } from 'react-native';
/**
* WordPress dependencies
*/
import { useLayoutEffect, useEffect, useRef, useState, useCallback } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';
import { Icon, __unstableAutocompletionItemsFill as AutocompletionItemsFill } from '@wordpress/components';
import { usePreferredColorSchemeStyle } from '@wordpress/compose';
/**
* Internal dependencies
*/
import BackgroundView from './background-view';
import getDefaultUseItems from './get-default-use-items';
import styles from './style.scss';
const {
compose: stylesCompose
} = StyleSheet;
export function getAutoCompleterUI(autocompleter) {
const useItems = autocompleter.useItems ? autocompleter.useItems : getDefaultUseItems(autocompleter);
function AutocompleterUI({
filterValue,
selectedIndex,
onChangeOptions,
onSelect,
value,
reset
}) {
const [items] = useItems(filterValue);
const filteredItems = items.filter(item => !item.isDisabled);
const scrollViewRef = useRef();
const animationValue = useRef(new Animated.Value(0)).current;
const [isVisible, setIsVisible] = useState(false);
const {
text
} = value;
useEffect(() => {
if (!isVisible && text.length > 0) {
setIsVisible(true);
}
}, [isVisible, text]);
useLayoutEffect(() => {
onChangeOptions(items);
scrollViewRef.current?.scrollTo({
x: 0,
animated: false
});
if (isVisible && text.length > 0) {
startAnimation(true);
} else if (isVisible && text.length === 0) {
startAnimation(false);
}
// Temporarily disabling exhaustive-deps to avoid introducing unexpected side effecst.
// See https://github.com/WordPress/gutenberg/pull/41820
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [items, isVisible, text]);
const activeItemStyles = usePreferredColorSchemeStyle(styles['components-autocomplete__item-active'], styles['components-autocomplete__item-active-dark']);
const iconStyles = usePreferredColorSchemeStyle(styles['components-autocomplete__icon'], styles['components-autocomplete__icon-active-dark']);
const activeIconStyles = usePreferredColorSchemeStyle(styles['components-autocomplete__icon-active '], styles['components-autocomplete__icon-active-dark']);
const textStyles = usePreferredColorSchemeStyle(styles['components-autocomplete__text'], styles['components-autocomplete__text-dark']);
const activeTextStyles = usePreferredColorSchemeStyle(styles['components-autocomplete__text-active'], styles['components-autocomplete__text-active-dark']);
const startAnimation = useCallback(show => {
Animated.timing(animationValue, {
toValue: show ? 1 : 0,
duration: show ? 200 : 100,
useNativeDriver: true
}).start(({
finished
}) => {
if (finished && !show && isVisible) {
setIsVisible(false);
reset();
}
});
},
// Temporarily disabling exhaustive-deps to avoid introducing unexpected side effecst.
// See https://github.com/WordPress/gutenberg/pull/41820
// eslint-disable-next-line react-hooks/exhaustive-deps
[isVisible]);
const contentStyles = {
transform: [{
translateY: animationValue.interpolate({
inputRange: [0, 1],
outputRange: [styles['components-autocomplete'].height, 0]
})
}]
};
if (!filteredItems.length > 0 || !isVisible) {
return null;
}
return createElement(AutocompletionItemsFill, null, createElement(View, {
style: styles['components-autocomplete']
}, createElement(Animated.View, {
style: contentStyles
}, createElement(BackgroundView, null, createElement(ScrollView, {
testID: "autocompleter",
ref: scrollViewRef,
horizontal: true,
contentContainerStyle: styles['components-autocomplete__content'],
showsHorizontalScrollIndicator: false,
keyboardShouldPersistTaps: "always",
accessibilityLabel:
// translators: Slash inserter autocomplete results
__('Slash inserter results')
}, filteredItems.map((option, index) => {
const isActive = index === selectedIndex;
const itemStyle = stylesCompose(styles['components-autocomplete__item'], isActive && activeItemStyles);
const textStyle = stylesCompose(textStyles, isActive && activeTextStyles);
const iconStyle = stylesCompose(iconStyles, isActive && activeIconStyles);
const iconSource = option?.value?.icon?.src || option?.value?.icon;
return createElement(TouchableOpacity, {
activeOpacity: 0.5,
style: itemStyle,
key: index,
onPress: () => onSelect(option),
accessibilityLabel: sprintf(
// translators: %s: Block name e.g. "Image block"
__('%s block'), option?.value?.title)
}, createElement(View, {
style: styles['components-autocomplete__icon']
}, createElement(Icon, {
icon: iconSource,
size: 24,
style: iconStyle
})), createElement(Text, {
style: textStyle
}, option?.value?.title));
}))))));
}
return AutocompleterUI;
}
export default getAutoCompleterUI;
//# sourceMappingURL=autocompleter-ui.native.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,25 @@
import { createElement } from "react";
/**
* External dependencies
*/
import { View } from 'react-native';
/**
* WordPress dependencies
*/
import { usePreferredColorSchemeStyle } from '@wordpress/compose';
/**
* Internal dependencies
*/
import styles from './style.scss';
const BackgroundView = ({
children
}) => {
const backgroundStyles = usePreferredColorSchemeStyle(styles['components-autocomplete__background'], styles['components-autocomplete__background-dark']);
return createElement(View, {
style: backgroundStyles
}, children);
};
export default BackgroundView;
//# sourceMappingURL=background-view.android.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["View","usePreferredColorSchemeStyle","styles","BackgroundView","children","backgroundStyles","createElement","style"],"sources":["@wordpress/components/src/autocomplete/background-view.android.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nconst BackgroundView = ( { children } ) => {\n\tconst backgroundStyles = usePreferredColorSchemeStyle(\n\t\tstyles[ 'components-autocomplete__background' ],\n\t\tstyles[ 'components-autocomplete__background-dark' ]\n\t);\n\n\treturn <View style={ backgroundStyles }>{ children }</View>;\n};\n\nexport default BackgroundView;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;;AAEnC;AACA;AACA;AACA,SAASC,4BAA4B,QAAQ,oBAAoB;;AAEjE;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AAEjC,MAAMC,cAAc,GAAGA,CAAE;EAAEC;AAAS,CAAC,KAAM;EAC1C,MAAMC,gBAAgB,GAAGJ,4BAA4B,CACpDC,MAAM,CAAE,qCAAqC,CAAE,EAC/CA,MAAM,CAAE,0CAA0C,CACnD,CAAC;EAED,OAAOI,aAAA,CAACN,IAAI;IAACO,KAAK,EAAGF;EAAkB,GAAGD,QAAgB,CAAC;AAC5D,CAAC;AAED,eAAeD,cAAc"}

View File

@@ -0,0 +1,21 @@
import { createElement } from "react";
/**
* External dependencies
*/
import { BlurView } from '@react-native-community/blur';
/**
* Internal dependencies
*/
import styles from './style.scss';
const BackgroundView = ({
children
}) => {
return createElement(BlurView, {
style: styles['components-autocomplete__background-blur'],
blurType: "prominent",
blurAmount: 10
}, children);
};
export default BackgroundView;
//# sourceMappingURL=background-view.ios.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["BlurView","styles","BackgroundView","children","createElement","style","blurType","blurAmount"],"sources":["@wordpress/components/src/autocomplete/background-view.ios.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { BlurView } from '@react-native-community/blur';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nconst BackgroundView = ( { children } ) => {\n\treturn (\n\t\t<BlurView\n\t\t\tstyle={ styles[ 'components-autocomplete__background-blur' ] }\n\t\t\tblurType=\"prominent\"\n\t\t\tblurAmount={ 10 }\n\t\t>\n\t\t\t{ children }\n\t\t</BlurView>\n\t);\n};\n\nexport default BackgroundView;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,8BAA8B;;AAEvD;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AAEjC,MAAMC,cAAc,GAAGA,CAAE;EAAEC;AAAS,CAAC,KAAM;EAC1C,OACCC,aAAA,CAACJ,QAAQ;IACRK,KAAK,EAAGJ,MAAM,CAAE,0CAA0C,CAAI;IAC9DK,QAAQ,EAAC,WAAW;IACpBC,UAAU,EAAG;EAAI,GAEfJ,QACO,CAAC;AAEb,CAAC;AAED,eAAeD,cAAc"}

View File

@@ -0,0 +1,90 @@
/**
* External dependencies
*/
import removeAccents from 'remove-accents';
/**
* WordPress dependencies
*/
import { debounce } from '@wordpress/compose';
import { useLayoutEffect, useState } from '@wordpress/element';
/**
* Internal dependencies
*/
import { escapeRegExp } from '../utils/strings';
function filterOptions(search, options = [], maxResults = 10) {
const filtered = [];
for (let i = 0; i < options.length; i++) {
const option = options[i];
// Merge label into keywords.
let {
keywords = []
} = option;
if ('string' === typeof option.label) {
keywords = [...keywords, option.label];
}
const isMatch = keywords.some(keyword => search.test(removeAccents(keyword)));
if (!isMatch) {
continue;
}
filtered.push(option);
// Abort early if max reached.
if (filtered.length === maxResults) {
break;
}
}
return filtered;
}
export default function getDefaultUseItems(autocompleter) {
return filterValue => {
const [items, setItems] = useState([]);
/*
* We support both synchronous and asynchronous retrieval of completer options
* but internally treat all as async so we maintain a single, consistent code path.
*
* Because networks can be slow, and the internet is wonderfully unpredictable,
* we don't want two promises updating the state at once. This ensures that only
* the most recent promise will act on `optionsData`. This doesn't use the state
* because `setState` is batched, and so there's no guarantee that setting
* `activePromise` in the state would result in it actually being in `this.state`
* before the promise resolves and we check to see if this is the active promise or not.
*/
useLayoutEffect(() => {
const {
options,
isDebounced
} = autocompleter;
const loadOptions = debounce(() => {
const promise = Promise.resolve(typeof options === 'function' ? options(filterValue) : options).then(optionsData => {
if (promise.canceled) {
return;
}
const keyedOptions = optionsData.map((optionData, optionIndex) => ({
key: `${autocompleter.name}-${optionIndex}`,
value: optionData,
label: autocompleter.getOptionLabel(optionData),
keywords: autocompleter.getOptionKeywords ? autocompleter.getOptionKeywords(optionData) : [],
isDisabled: autocompleter.isOptionDisabled ? autocompleter.isOptionDisabled(optionData) : false
}));
// Create a regular expression to filter the options.
const search = new RegExp('(?:\\b|\\s|^)' + escapeRegExp(filterValue), 'i');
setItems(filterOptions(search, keyedOptions));
});
return promise;
}, isDebounced ? 250 : 0);
const promise = loadOptions();
return () => {
loadOptions.cancel();
if (promise) {
promise.canceled = true;
}
};
}, [filterValue]);
return [items];
};
}
//# sourceMappingURL=get-default-use-items.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,357 @@
import { createElement, Fragment } from "react";
/**
* External dependencies
*/
import removeAccents from 'remove-accents';
/**
* WordPress dependencies
*/
import { renderToString, useEffect, useState, useRef, useMemo } from '@wordpress/element';
import { useInstanceId, useMergeRefs, useRefEffect } from '@wordpress/compose';
import { create, slice, insert, isCollapsed, getTextContent } from '@wordpress/rich-text';
import { speak } from '@wordpress/a11y';
import { isAppleOS } from '@wordpress/keycodes';
/**
* Internal dependencies
*/
import { getAutoCompleterUI } from './autocompleter-ui';
import { escapeRegExp } from '../utils/strings';
const getNodeText = node => {
if (node === null) {
return '';
}
switch (typeof node) {
case 'string':
case 'number':
return node.toString();
break;
case 'boolean':
return '';
break;
case 'object':
{
if (node instanceof Array) {
return node.map(getNodeText).join('');
}
if ('props' in node) {
return getNodeText(node.props.children);
}
break;
}
default:
return '';
}
return '';
};
const EMPTY_FILTERED_OPTIONS = [];
export function useAutocomplete({
record,
onChange,
onReplace,
completers,
contentRef
}) {
const instanceId = useInstanceId(useAutocomplete);
const [selectedIndex, setSelectedIndex] = useState(0);
const [filteredOptions, setFilteredOptions] = useState(EMPTY_FILTERED_OPTIONS);
const [filterValue, setFilterValue] = useState('');
const [autocompleter, setAutocompleter] = useState(null);
const [AutocompleterUI, setAutocompleterUI] = useState(null);
const backspacing = useRef(false);
function insertCompletion(replacement) {
if (autocompleter === null) {
return;
}
const end = record.start;
const start = end - autocompleter.triggerPrefix.length - filterValue.length;
const toInsert = create({
html: renderToString(replacement)
});
onChange(insert(record, toInsert, start, end));
}
function select(option) {
const {
getOptionCompletion
} = autocompleter || {};
if (option.isDisabled) {
return;
}
if (getOptionCompletion) {
const completion = getOptionCompletion(option.value, filterValue);
const isCompletionObject = obj => {
return obj !== null && typeof obj === 'object' && 'action' in obj && obj.action !== undefined && 'value' in obj && obj.value !== undefined;
};
const completionObject = isCompletionObject(completion) ? completion : {
action: 'insert-at-caret',
value: completion
};
if ('replace' === completionObject.action) {
onReplace([completionObject.value]);
// When replacing, the component will unmount, so don't reset
// state (below) on an unmounted component.
return;
} else if ('insert-at-caret' === completionObject.action) {
insertCompletion(completionObject.value);
}
}
// Reset autocomplete state after insertion rather than before
// so insertion events don't cause the completion menu to redisplay.
reset();
}
function reset() {
setSelectedIndex(0);
setFilteredOptions(EMPTY_FILTERED_OPTIONS);
setFilterValue('');
setAutocompleter(null);
setAutocompleterUI(null);
}
/**
* Load options for an autocompleter.
*
* @param {Array} options
*/
function onChangeOptions(options) {
setSelectedIndex(options.length === filteredOptions.length ? selectedIndex : 0);
setFilteredOptions(options);
}
function handleKeyDown(event) {
backspacing.current = event.key === 'Backspace';
if (!autocompleter) {
return;
}
if (filteredOptions.length === 0) {
return;
}
if (event.defaultPrevented ||
// Ignore keydowns from IMEs
event.isComposing ||
// Workaround for Mac Safari where the final Enter/Backspace of an IME composition
// is `isComposing=false`, even though it's technically still part of the composition.
// These can only be detected by keyCode.
event.keyCode === 229) {
return;
}
switch (event.key) {
case 'ArrowUp':
{
const newIndex = (selectedIndex === 0 ? filteredOptions.length : selectedIndex) - 1;
setSelectedIndex(newIndex);
// See the related PR as to why this is necessary: https://github.com/WordPress/gutenberg/pull/54902.
if (isAppleOS()) {
speak(getNodeText(filteredOptions[newIndex].label), 'assertive');
}
break;
}
case 'ArrowDown':
{
const newIndex = (selectedIndex + 1) % filteredOptions.length;
setSelectedIndex(newIndex);
if (isAppleOS()) {
speak(getNodeText(filteredOptions[newIndex].label), 'assertive');
}
break;
}
case 'Escape':
setAutocompleter(null);
setAutocompleterUI(null);
event.preventDefault();
break;
case 'Enter':
select(filteredOptions[selectedIndex]);
break;
case 'ArrowLeft':
case 'ArrowRight':
reset();
return;
default:
return;
}
// Any handled key should prevent original behavior. This relies on
// the early return in the default case.
event.preventDefault();
}
// textContent is a primitive (string), memoizing is not strictly necessary
// but this is a preemptive performance improvement, since the autocompleter
// is a potential bottleneck for the editor type metric.
const textContent = useMemo(() => {
if (isCollapsed(record)) {
return getTextContent(slice(record, 0));
}
return '';
}, [record]);
useEffect(() => {
if (!textContent) {
if (autocompleter) reset();
return;
}
// Find the completer with the highest triggerPrefix index in the
// textContent.
const completer = completers.reduce((lastTrigger, currentCompleter) => {
const triggerIndex = textContent.lastIndexOf(currentCompleter.triggerPrefix);
const lastTriggerIndex = lastTrigger !== null ? textContent.lastIndexOf(lastTrigger.triggerPrefix) : -1;
return triggerIndex > lastTriggerIndex ? currentCompleter : lastTrigger;
}, null);
if (!completer) {
if (autocompleter) reset();
return;
}
const {
allowContext,
triggerPrefix
} = completer;
const triggerIndex = textContent.lastIndexOf(triggerPrefix);
const textWithoutTrigger = textContent.slice(triggerIndex + triggerPrefix.length);
const tooDistantFromTrigger = textWithoutTrigger.length > 50; // 50 chars seems to be a good limit.
// This is a final barrier to prevent the effect from completing with
// an extremely long string, which causes the editor to slow-down
// significantly. This could happen, for example, if `matchingWhileBackspacing`
// is true and one of the "words" end up being too long. If that's the case,
// it will be caught by this guard.
if (tooDistantFromTrigger) return;
const mismatch = filteredOptions.length === 0;
const wordsFromTrigger = textWithoutTrigger.split(/\s/);
// We need to allow the effect to run when not backspacing and if there
// was a mismatch. i.e when typing a trigger + the match string or when
// clicking in an existing trigger word on the page. We do that if we
// detect that we have one word from trigger in the current textual context.
//
// Ex.: "Some text @a" <-- "@a" will be detected as the trigger word and
// allow the effect to run. It will run until there's a mismatch.
const hasOneTriggerWord = wordsFromTrigger.length === 1;
// This is used to allow the effect to run when backspacing and if
// "touching" a word that "belongs" to a trigger. We consider a "trigger
// word" any word up to the limit of 3 from the trigger character.
// Anything beyond that is ignored if there's a mismatch. This allows
// us to "escape" a mismatch when backspacing, but still imposing some
// sane limits.
//
// Ex: "Some text @marcelo sekkkk" <--- "kkkk" caused a mismatch, but
// if the user presses backspace here, it will show the completion popup again.
const matchingWhileBackspacing = backspacing.current && wordsFromTrigger.length <= 3;
if (mismatch && !(matchingWhileBackspacing || hasOneTriggerWord)) {
if (autocompleter) reset();
return;
}
const textAfterSelection = getTextContent(slice(record, undefined, getTextContent(record).length));
if (allowContext && !allowContext(textContent.slice(0, triggerIndex), textAfterSelection)) {
if (autocompleter) reset();
return;
}
if (/^\s/.test(textWithoutTrigger) || /\s\s+$/.test(textWithoutTrigger)) {
if (autocompleter) reset();
return;
}
if (!/[\u0000-\uFFFF]*$/.test(textWithoutTrigger)) {
if (autocompleter) reset();
return;
}
const safeTrigger = escapeRegExp(completer.triggerPrefix);
const text = removeAccents(textContent);
const match = text.slice(text.lastIndexOf(completer.triggerPrefix)).match(new RegExp(`${safeTrigger}([\u0000-\uFFFF]*)$`));
const query = match && match[1];
setAutocompleter(completer);
setAutocompleterUI(() => completer !== autocompleter ? getAutoCompleterUI(completer) : AutocompleterUI);
setFilterValue(query === null ? '' : query);
// Temporarily disabling exhaustive-deps to avoid introducing unexpected side effecst.
// See https://github.com/WordPress/gutenberg/pull/41820
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [textContent]);
const {
key: selectedKey = ''
} = filteredOptions[selectedIndex] || {};
const {
className
} = autocompleter || {};
const isExpanded = !!autocompleter && filteredOptions.length > 0;
const listBoxId = isExpanded ? `components-autocomplete-listbox-${instanceId}` : undefined;
const activeId = isExpanded ? `components-autocomplete-item-${instanceId}-${selectedKey}` : null;
const hasSelection = record.start !== undefined;
return {
listBoxId,
activeId,
onKeyDown: handleKeyDown,
popover: hasSelection && AutocompleterUI && createElement(AutocompleterUI, {
className: className,
filterValue: filterValue,
instanceId: instanceId,
listBoxId: listBoxId,
selectedIndex: selectedIndex,
onChangeOptions: onChangeOptions,
onSelect: select,
value: record,
contentRef: contentRef,
reset: reset
})
};
}
function useLastDifferentValue(value) {
const history = useRef(new Set());
history.current.add(value);
// Keep the history size to 2.
if (history.current.size > 2) {
history.current.delete(Array.from(history.current)[0]);
}
return Array.from(history.current)[0];
}
export function useAutocompleteProps(options) {
const ref = useRef(null);
const onKeyDownRef = useRef();
const {
record
} = options;
const previousRecord = useLastDifferentValue(record);
const {
popover,
listBoxId,
activeId,
onKeyDown
} = useAutocomplete({
...options,
contentRef: ref
});
onKeyDownRef.current = onKeyDown;
const mergedRefs = useMergeRefs([ref, useRefEffect(element => {
function _onKeyDown(event) {
onKeyDownRef.current?.(event);
}
element.addEventListener('keydown', _onKeyDown);
return () => {
element.removeEventListener('keydown', _onKeyDown);
};
}, [])]);
// We only want to show the popover if the user has typed something.
const didUserInput = record.text !== previousRecord?.text;
if (!didUserInput) {
return {
ref: mergedRefs
};
}
return {
ref: mergedRefs,
children: popover,
'aria-autocomplete': listBoxId ? 'list' : undefined,
'aria-owns': listBoxId,
'aria-activedescendant': activeId
};
}
export default function Autocomplete({
children,
isSelected,
...options
}) {
const {
popover,
...props
} = useAutocomplete(options);
return createElement(Fragment, null, children(props), isSelected && popover);
}
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=types.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,41 @@
/**
* WordPress dependencies
*/
import { useInstanceId } from '@wordpress/compose';
/**
* Internal dependencies
*/
import BaseControl from '.';
/**
* Generate props for the `BaseControl` and the inner control itself.
*
* Namely, it takes care of generating a unique `id`, properly associating it with the `label` and `help` elements.
*
* @param props
*/
export function useBaseControlProps(props) {
const {
help,
id: preferredId,
...restProps
} = props;
const uniqueId = useInstanceId(BaseControl, 'wp-components-base-control', preferredId);
// ARIA descriptions can only contain plain text, so fall back to aria-details if not.
const helpPropName = typeof help === 'string' ? 'aria-describedby' : 'aria-details';
return {
baseControlProps: {
id: uniqueId,
help,
...restProps
},
controlProps: {
id: uniqueId,
...(!!help ? {
[helpPropName]: `${uniqueId}__help`
} : {})
}
};
}
//# sourceMappingURL=hooks.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["useInstanceId","BaseControl","useBaseControlProps","props","help","id","preferredId","restProps","uniqueId","helpPropName","baseControlProps","controlProps"],"sources":["@wordpress/components/src/base-control/hooks.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '.';\nimport type { BaseControlProps } from './types';\n\n/**\n * Generate props for the `BaseControl` and the inner control itself.\n *\n * Namely, it takes care of generating a unique `id`, properly associating it with the `label` and `help` elements.\n *\n * @param props\n */\nexport function useBaseControlProps(\n\tprops: Omit< BaseControlProps, 'children' >\n) {\n\tconst { help, id: preferredId, ...restProps } = props;\n\n\tconst uniqueId = useInstanceId(\n\t\tBaseControl,\n\t\t'wp-components-base-control',\n\t\tpreferredId\n\t);\n\n\t// ARIA descriptions can only contain plain text, so fall back to aria-details if not.\n\tconst helpPropName =\n\t\ttypeof help === 'string' ? 'aria-describedby' : 'aria-details';\n\n\treturn {\n\t\tbaseControlProps: {\n\t\t\tid: uniqueId,\n\t\t\thelp,\n\t\t\t...restProps,\n\t\t},\n\t\tcontrolProps: {\n\t\t\tid: uniqueId,\n\t\t\t...( !! help ? { [ helpPropName ]: `${ uniqueId }__help` } : {} ),\n\t\t},\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,oBAAoB;;AAElD;AACA;AACA;AACA,OAAOC,WAAW,MAAM,GAAG;AAG3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAClCC,KAA2C,EAC1C;EACD,MAAM;IAAEC,IAAI;IAAEC,EAAE,EAAEC,WAAW;IAAE,GAAGC;EAAU,CAAC,GAAGJ,KAAK;EAErD,MAAMK,QAAQ,GAAGR,aAAa,CAC7BC,WAAW,EACX,4BAA4B,EAC5BK,WACD,CAAC;;EAED;EACA,MAAMG,YAAY,GACjB,OAAOL,IAAI,KAAK,QAAQ,GAAG,kBAAkB,GAAG,cAAc;EAE/D,OAAO;IACNM,gBAAgB,EAAE;MACjBL,EAAE,EAAEG,QAAQ;MACZJ,IAAI;MACJ,GAAGG;IACJ,CAAC;IACDI,YAAY,EAAE;MACbN,EAAE,EAAEG,QAAQ;MACZ,IAAK,CAAC,CAAEJ,IAAI,GAAG;QAAE,CAAEK,YAAY,GAAK,GAAGD,QAAU;MAAQ,CAAC,GAAG,CAAC,CAAC;IAChE;EACD,CAAC;AACF"}

View File

@@ -0,0 +1,101 @@
import { createElement } from "react";
/**
* External dependencies
*/
import classnames from 'classnames';
/**
* Internal dependencies
*/
import { VisuallyHidden } from '../visually-hidden';
import { Wrapper, StyledField, StyledLabel, StyledHelp, StyledVisualLabel } from './styles/base-control-styles';
import { contextConnectWithoutRef, useContextSystem } from '../context';
export { useBaseControlProps } from './hooks';
/**
* `BaseControl` is a component used to generate labels and help text for components handling user inputs.
*
* ```jsx
* import { BaseControl, useBaseControlProps } from '@wordpress/components';
*
* // Render a `BaseControl` for a textarea input
* const MyCustomTextareaControl = ({ children, ...baseProps }) => (
* // `useBaseControlProps` is a convenience hook to get the props for the `BaseControl`
* // and the inner control itself. Namely, it takes care of generating a unique `id`,
* // properly associating it with the `label` and `help` elements.
* const { baseControlProps, controlProps } = useBaseControlProps( baseProps );
*
* return (
* <BaseControl { ...baseControlProps } __nextHasNoMarginBottom={ true }>
* <textarea { ...controlProps }>
* { children }
* </textarea>
* </BaseControl>
* );
* );
* ```
*/
const UnconnectedBaseControl = props => {
const {
__nextHasNoMarginBottom = false,
id,
label,
hideLabelFromVision = false,
help,
className,
children
} = useContextSystem(props, 'BaseControl');
return createElement(Wrapper, {
className: className
}, 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 ? createElement(VisuallyHidden, {
as: "label",
htmlFor: id
}, label) : createElement(StyledLabel, {
className: "components-base-control__label",
htmlFor: id
}, label)), label && !id && (hideLabelFromVision ? createElement(VisuallyHidden, {
as: "label"
}, label) : createElement(VisualLabel, null, label)), children), !!help && 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>
* );
*/
export const VisualLabel = ({
className,
children,
...props
}) => {
return createElement(StyledVisualLabel, {
...props,
className: classnames('components-base-control__label', className)
}, children);
};
export const BaseControl = Object.assign(contextConnectWithoutRef(UnconnectedBaseControl, 'BaseControl'), {
VisualLabel
});
export default BaseControl;
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,16 @@
import { createElement } from "react";
/**
* External dependencies
*/
import { Text, View } from 'react-native';
export default function BaseControl({
label,
help,
children
}) {
return createElement(View, {
accessible: true,
accessibilityLabel: label
}, label && createElement(Text, null, label), children, help && createElement(Text, null, help));
}
//# sourceMappingURL=index.native.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["Text","View","BaseControl","label","help","children","createElement","accessible","accessibilityLabel"],"sources":["@wordpress/components/src/base-control/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Text, View } from 'react-native';\n\nexport default function BaseControl( { label, help, children } ) {\n\treturn (\n\t\t<View accessible={ true } accessibilityLabel={ label }>\n\t\t\t{ label && <Text>{ label }</Text> }\n\t\t\t{ children }\n\t\t\t{ help && <Text>{ help }</Text> }\n\t\t</View>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAEzC,eAAe,SAASC,WAAWA,CAAE;EAAEC,KAAK;EAAEC,IAAI;EAAEC;AAAS,CAAC,EAAG;EAChE,OACCC,aAAA,CAACL,IAAI;IAACM,UAAU,EAAG,IAAM;IAACC,kBAAkB,EAAGL;EAAO,GACnDA,KAAK,IAAIG,aAAA,CAACN,IAAI,QAAGG,KAAa,CAAC,EAC/BE,QAAQ,EACRD,IAAI,IAAIE,aAAA,CAACN,IAAI,QAAGI,IAAY,CACzB,CAAC;AAET"}

View File

@@ -0,0 +1,64 @@
import _styled from "@emotion/styled/base";
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
*/
import { css } from '@emotion/react';
/**
* Internal dependencies
*/
import { baseLabelTypography, boxSizingReset, font, COLORS } from '../../utils';
import { space } from '../../utils/space';
export const Wrapper = _styled("div", process.env.NODE_ENV === "production" ? {
target: "ej5x27r4"
} : {
target: "ej5x27r4",
label: "Wrapper"
})("font-family:", font('default.fontFamily'), ";font-size:", font('default.fontSize'), ";", boxSizingReset, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29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07XG5cdGZvbnQtc3R5bGU6IG5vcm1hbDtcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXG5cdCR7IGRlcHJlY2F0ZWRNYXJnaW5IZWxwIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRWaXN1YWxMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHQkeyBsYWJlbFN0eWxlcyB9XG5gO1xuIl19 */"));
const deprecatedMarginField = ({
__nextHasNoMarginBottom = false
}) => {
return !__nextHasNoMarginBottom && /*#__PURE__*/css("margin-bottom:", space(2), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:deprecatedMarginField;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYmFzZS1jb250cm9sL3N0eWxlcy9iYXNlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXNCSyIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2Jhc2UtY29udHJvbC9zdHlsZXMvYmFzZS1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgYmFzZUxhYmVsVHlwb2dyYXBoeSwgYm94U2l6aW5nUmVzZXQsIGZvbnQsIENPTE9SUyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbH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ID0gc3R5bGVkLmxhYmVsYFxuXHQkeyBsYWJlbFN0eWxlcyB9XG5gO1xuXG5jb25zdCBkZXByZWNhdGVkTWFyZ2luSGVscCA9ICggeyBfX25leHRIYXNOb01hcmdpbkJvdHRvbSA9IGZhbHNlIH0gKSA9PiB7XG5cdHJldHVybiAoXG5cdFx0ISBfX25leHRIYXNOb01hcmdpbkJvdHRvbSAmJlxuXHRcdGNzc2Bcblx0XHRcdG1hcmdpbi1ib3R0b206IHJldmVydDtcblx0XHRgXG5cdCk7XG59O1xuXG5leHBvcnQgY29uc3QgU3R5bGVkSGVscCA9IHN0eWxlZC5wYFxuXHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggMiApIH07XG5cdG1hcmdpbi1ib3R0b206IDA7XG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2hlbHBUZXh0LmZvbnRTaXplJyApIH07XG5cdGZvbnQtc3R5bGU6IG5vcm1hbDtcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXG5cdCR7IGRlcHJlY2F0ZWRNYXJnaW5IZWxwIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRWaXN1YWxMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHQkeyBsYWJlbFN0eWxlcyB9XG5gO1xuIl19 */");
};
export const StyledField = _styled("div", process.env.NODE_ENV === "production" ? {
target: "ej5x27r3"
} : {
target: "ej5x27r3",
label: "StyledField"
})(deprecatedMarginField, " .components-panel__row &{margin-bottom:inherit;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYmFzZS1jb250cm9sL3N0eWxlcy9iYXNlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTRCcUMiLCJmaWxlIjoiQHdvcmRwcmVz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G5leHBvcnQgY29uc3QgU3R5bGVkVmlzdWFsTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0JHsgbGFiZWxTdHlsZXMgfVxuYDtcbiJdfQ== */"));
const labelStyles = /*#__PURE__*/css(baseLabelTypography, ";display:inline-block;margin-bottom:", space(2), ";padding:0;" + (process.env.NODE_ENV === "production" ? "" : ";label:labelStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYmFzZS1jb250cm9sL3N0eWxlcy9iYXNlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9DdUIiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9iYXNlLWNvbnRyb2wvc3R5bGVzL2Jhc2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGJhc2VMYWJlbFR5cG9ncmFwaHksIGJveFNpemluZ1Jlc2V0LCBmb250LCBDT0xPUlMgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRmb250LWZhbWlseTogJHsgZm9udCggJ2RlZmF1bHQuZm9udEZhbWlseScgKSB9O1xuXHRmb250LXNpemU6ICR7IGZvbnQoICdkZ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ge1xuXHRyZXR1cm4gKFxuXHRcdCEgX19uZXh0SGFzTm9NYXJnaW5Cb3R0b20gJiZcblx0XHRjc3NgXG5cdFx0XHRtYXJnaW4tYm90dG9tOiByZXZlcnQ7XG5cdFx0YFxuXHQpO1xufTtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZEhlbHAgPSBzdHlsZWQucGBcblx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDIgKSB9O1xuXHRtYXJnaW4tYm90dG9tOiAwO1xuXHRmb250LXNpemU6ICR7IGZvbnQoICdoZWxwVGV4dC5mb250U2l6ZScgKSB9O1xuXHRmb250LXN0eWxlOiBub3JtYWw7XG5cdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNzAwIF0gfTtcblxuXHQkeyBkZXByZWNhdGVkTWFyZ2luSGVscCB9XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkVmlzdWFsTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0JHsgbGFiZWxTdHlsZXMgfVxuYDtcbiJdfQ== */");
export const StyledLabel = _styled("label", process.env.NODE_ENV === "production" ? {
target: "ej5x27r2"
} : {
target: "ej5x27r2",
label: "StyledLabel"
})(labelStyles, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYmFzZS1jb250cm9sL3N0eWxlcy9iYXNlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWdEdUMiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9iYXNlLWNvbnRyb2wvc3R5bGVzL2Jhc2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgc3R5bGVkIGZ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ob-deprecatedMarginHelp",
styles: "margin-bottom:revert;label:deprecatedMarginHelp;",
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYmFzZS1jb250cm9sL3N0eWxlcy9iYXNlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXVESyIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL2Jhc2UtY29udHJvbC9zdHlsZXMvYmFzZS1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgYmFzZUxhYmVsVHlwb2dyYXBoeSwgYm94U2l6aW5nUmVzZXQsIGZvbnQsIENPTE9SUyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdXRpbHMvc3BhY2UnO1xuXG5leHBvcnQgY29uc3QgV3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdGZvbnQtZmFtaWx5OiAkeyBmb250KCAnZGVmYXVsdC5mb250RmFtaWx5JyApIH07XG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2RlZmF1bHQuZm9udFNpemUnICkgfTtcblxuXHQkeyBib3hTaXppbmdSZXNldCB9XG5gO1xuXG5jb25zdCBkZXByZWNhdGVkTWFyZ2luRmllbGQgPSAoIHsgX19uZXh0SGFzTm9NYXJnaW5Cb3R0b20gPSBmYWxzZSB9ICkgPT4ge1xuXHR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5wYFxuXHRtYXJnaW4tdG9wOiAkeyBzcGFjZSggMiApIH07XG5cdG1hcmdpbi1ib3R0b206IDA7XG5cdGZvbnQtc2l6ZTogJHsgZm9udCggJ2hlbHBUZXh0LmZvbnRTaXplJyApIH07XG5cdGZvbnQtc3R5bGU6IG5vcm1hbDtcblx0Y29sb3I6ICR7IENPTE9SUy5ncmF5WyA3MDAgXSB9O1xuXG5cdCR7IGRlcHJlY2F0ZWRNYXJnaW5IZWxwIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRWaXN1YWxMYWJlbCA9IHN0eWxlZC5zcGFuYFxuXHQkeyBsYWJlbFN0eWxlcyB9XG5gO1xuIl19 */",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
const deprecatedMarginHelp = ({
__nextHasNoMarginBottom = false
}) => {
return !__nextHasNoMarginBottom && _ref;
};
export const StyledHelp = _styled("p", process.env.NODE_ENV === "production" ? {
target: "ej5x27r1"
} : {
target: "ej5x27r1",
label: "StyledHelp"
})("margin-top:", space(2), ";margin-bottom:0;font-size:", font('helpText.fontSize'), ";font-style:normal;color:", COLORS.gray[700], ";", deprecatedMarginHelp, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYmFzZS1jb250cm9sL3N0eWxlcy9iYXNlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTZEa0MiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9iYXNlLWNvbnRyb2wvc3R5bGVzL2Jhc2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3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JHsgc3BhY2UoIDIgKSB9O1xuXHQvKipcblx0ICogUmVtb3ZlcyBDaHJvbWUvU2FmYXJpL0ZpcmVmb3ggdXNlciBhZ2VudCBzdHlsZXNoZWV0IHBhZGRpbmcgZnJvbVxuXHQgKiBTdHlsZWRMYWJlbCB3aGVuIGl0IGlzIHJlbmRlcmVkIGFzIGEgbGVnZW5kLlxuXHQgKi9cblx0cGFkZGluZzogMDtcbmA7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRMYWJlbCA9IHN0eWxlZC5sYWJlbGBcblx0JHsgbGFiZWxTdHlsZXMgfVxuYDtcblxuY29uc3QgZGVwcmVjYXRlZE1hcmdpbkhlbHAgPSAoIHsgX19uZXh0SGFzTm9NYXJnaW5Cb3R0b20gPSBmYWxzZSB9ICkgPT4ge1xuXHRyZXR1cm4gKFxuXHRcdCEgX19uZXh0SGFzTm9NYXJnaW5Cb3R0b20gJiZcblx0XHRjc3NgXG5cdFx0XHRtYXJnaW4tYm90dG9tOiByZXZlcnQ7XG5cdFx0YFxuXHQpO1xufTtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZEhlbHAgPSBzdHlsZWQucGBcblx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDIgKSB9O1xuXHRtYXJnaW4tYm90dG9tOiAwO1xuXHRmb250LXNpemU6ICR7IGZvbnQoICdoZWxwVGV4dC5mb250U2l6ZScgKSB9O1xuXHRmb250LXN0eWxlOiBub3JtYWw7XG5cdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNzAwIF0gfTtcblxuXHQkeyBkZXByZWNhdGVkTWFyZ2luSGVscCB9XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkVmlzdWFsTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0JHsgbGFiZWxTdHlsZXMgfVxuYDtcbiJdfQ== */"));
export const StyledVisualLabel = _styled("span", process.env.NODE_ENV === "production" ? {
target: "ej5x27r0"
} : {
target: "ej5x27r0",
label: "StyledVisualLabel"
})(labelStyles, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYmFzZS1jb250cm9sL3N0eWxlcy9iYXNlLWNvbnRyb2wtc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXVFNEMiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9iYXNlLWNvbnRyb2wvc3R5bGVzL2Jhc2UtY29udHJvbC1zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGJhc2VMYWJlbFR5cG9ncmFwaHksIGJveFNpemluZ1Jlc2V0LCBmb250LCBDT0xPUlMgfSBmcm9tICcuLi8uLi91dGlscyc7XG5pbXBvcnQgeyBzcGFjZSB9IGZyb20gJy4uLy4uL3V0aWxzL3NwYWNlJztcblxuZXhwb3J0IGNvbnN0IFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRmb250LWZhbWlseTogJHsgZm9udCggJ2RlZmF1bHQuZm9udEZhbWlseScgKSB9O1xuXHRmb250LXNpemU6ICR7IGZvbnQoICdkZWZhdWx0LmZvbnRTaXplJyApIH07XG5cblx0JHsgYm94U2l6aW5nUmVzZXQgfVxuYDtcblxuY29uc3QgZGVwcmVjYXRlZE1hcmdpbkZpZWxkID0gKCB7IF9fbmV4dEhhc05vTWFyZ2luQm90dG9tID0gZmFsc2UgfSApID0+IHtcblx0cmV0dXJuIChcblx0XHQhIF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WQucGBcblx0bWFyZ2luLXRvcDogJHsgc3BhY2UoIDIgKSB9O1xuXHRtYXJnaW4tYm90dG9tOiAwO1xuXHRmb250LXNpemU6ICR7IGZvbnQoICdoZWxwVGV4dC5mb250U2l6ZScgKSB9O1xuXHRmb250LXN0eWxlOiBub3JtYWw7XG5cdGNvbG9yOiAkeyBDT0xPUlMuZ3JheVsgNzAwIF0gfTtcblxuXHQkeyBkZXByZWNhdGVkTWFyZ2luSGVscCB9XG5gO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkVmlzdWFsTGFiZWwgPSBzdHlsZWQuc3BhbmBcblx0JHsgbGFiZWxTdHlsZXMgfVxuYDtcbiJdfQ== */"));
//# sourceMappingURL=base-control-styles.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["css","baseLabelTypography","boxSizingReset","font","COLORS","space","Wrapper","_styled","process","env","NODE_ENV","target","label","deprecatedMarginField","__nextHasNoMarginBottom","StyledField","labelStyles","StyledLabel","_ref","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","deprecatedMarginHelp","StyledHelp","gray","StyledVisualLabel"],"sources":["@wordpress/components/src/base-control/styles/base-control-styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { baseLabelTypography, boxSizingReset, font, COLORS } from '../../utils';\nimport { space } from '../../utils/space';\n\nexport const Wrapper = styled.div`\n\tfont-family: ${ font( 'default.fontFamily' ) };\n\tfont-size: ${ font( 'default.fontSize' ) };\n\n\t${ boxSizingReset }\n`;\n\nconst deprecatedMarginField = ( { __nextHasNoMarginBottom = false } ) => {\n\treturn (\n\t\t! __nextHasNoMarginBottom &&\n\t\tcss`\n\t\t\tmargin-bottom: ${ space( 2 ) };\n\t\t`\n\t);\n};\n\nexport const StyledField = styled.div`\n\t${ deprecatedMarginField }\n\n\t.components-panel__row & {\n\t\tmargin-bottom: inherit;\n\t}\n`;\n\nconst labelStyles = css`\n\t${ baseLabelTypography };\n\n\tdisplay: inline-block;\n\tmargin-bottom: ${ space( 2 ) };\n\t/**\n\t * Removes Chrome/Safari/Firefox user agent stylesheet padding from\n\t * StyledLabel when it is rendered as a legend.\n\t */\n\tpadding: 0;\n`;\n\nexport const StyledLabel = styled.label`\n\t${ labelStyles }\n`;\n\nconst deprecatedMarginHelp = ( { __nextHasNoMarginBottom = false } ) => {\n\treturn (\n\t\t! __nextHasNoMarginBottom &&\n\t\tcss`\n\t\t\tmargin-bottom: revert;\n\t\t`\n\t);\n};\n\nexport const StyledHelp = styled.p`\n\tmargin-top: ${ space( 2 ) };\n\tmargin-bottom: 0;\n\tfont-size: ${ font( 'helpText.fontSize' ) };\n\tfont-style: normal;\n\tcolor: ${ COLORS.gray[ 700 ] };\n\n\t${ deprecatedMarginHelp }\n`;\n\nexport const StyledVisualLabel = styled.span`\n\t${ labelStyles }\n`;\n"],"mappings":";;AAAA;AACA;AACA;;AAEA,SAASA,GAAG,QAAQ,gBAAgB;;AAEpC;AACA;AACA;AACA,SAASC,mBAAmB,EAAEC,cAAc,EAAEC,IAAI,EAAEC,MAAM,QAAQ,aAAa;AAC/E,SAASC,KAAK,QAAQ,mBAAmB;AAEzC,OAAO,MAAMC,OAAO,GAAAC,OAAA,QAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,mBACHT,IAAI,CAAE,oBAAqB,CAAC,iBAC9BA,IAAI,CAAE,kBAAmB,CAAC,OAErCD,cAAc,SAAAM,OAAA,CAAAC,GAAA,CAAAC,QAAA,w+EACjB;AAED,MAAMG,qBAAqB,GAAGA,CAAE;EAAEC,uBAAuB,GAAG;AAAM,CAAC,KAAM;EACxE,OACC,CAAEA,uBAAuB,iBACzBd,GAAG,mBACgBK,KAAK,CAAE,CAAE,CAAC,SAAAG,OAAA,CAAAC,GAAA,CAAAC,QAAA,2DAAAF,OAAA,CAAAC,GAAA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AAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GAC1BI,WAAW,SAAAR,OAAA,CAAAC,GAAA,CAAAC,QAAA,4+EACd"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":[],"sources":["@wordpress/components/src/base-control/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactNode } from 'react';\n\nexport type BaseControlProps = {\n\t/**\n\t * Start opting into the new margin-free styles that will become the default in a future version.\n\t *\n\t * @default false\n\t */\n\t__nextHasNoMarginBottom?: boolean;\n\t/**\n\t * The HTML `id` of the control element (passed in as a child to `BaseControl`) to which labels and help text are being generated.\n\t * This is necessary to accessibly associate the label with that element.\n\t *\n\t * The recommended way is to use the `useBaseControlProps` hook, which takes care of generating a unique `id` for you.\n\t * Otherwise, if you choose to pass an explicit `id` to this prop, you are responsible for ensuring the uniqueness of the `id`.\n\t */\n\tid?: string;\n\t/**\n\t * Additional description for the control.\n\t *\n\t * It is preferable to use plain text for `help`, as it can be accessibly associated with the control using `aria-describedby`.\n\t * When the `help` contains links, or otherwise non-plain text content, it will be associated with the control using `aria-details`.\n\t */\n\thelp?: ReactNode;\n\t/**\n\t * If this property is added, a label will be generated using label property as the content.\n\t */\n\tlabel?: ReactNode;\n\t/**\n\t * If true, the label will only be visible to screen readers.\n\t *\n\t * @default false\n\t */\n\thideLabelFromVision?: boolean;\n\tclassName?: string;\n\t/**\n\t * The content to be displayed within the `BaseControl`.\n\t */\n\tchildren: ReactNode;\n};\n\nexport type BaseControlVisualLabelProps = {\n\tchildren: ReactNode;\n};\n"],"mappings":""}

View File

@@ -0,0 +1,38 @@
import { createElement } from "react";
/**
* WordPress dependencies
*/
import { link, linkOff } from '@wordpress/icons';
import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import Button from '../../button';
import Tooltip from '../../tooltip';
import { View } from '../../view';
import { contextConnect } from '../../context';
import { useBorderBoxControlLinkedButton } from './hook';
const BorderBoxControlLinkedButton = (props, forwardedRef) => {
const {
className,
isLinked,
...buttonProps
} = useBorderBoxControlLinkedButton(props);
const label = isLinked ? __('Unlink sides') : __('Link sides');
return createElement(Tooltip, {
text: label
}, createElement(View, {
className: className
}, createElement(Button, {
...buttonProps,
size: "small",
icon: isLinked ? link : linkOff,
iconSize: 24,
"aria-label": label,
ref: forwardedRef
})));
};
const ConnectedBorderBoxControlLinkedButton = contextConnect(BorderBoxControlLinkedButton, 'BorderBoxControlLinkedButton');
export default ConnectedBorderBoxControlLinkedButton;
//# sourceMappingURL=component.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["link","linkOff","__","Button","Tooltip","View","contextConnect","useBorderBoxControlLinkedButton","BorderBoxControlLinkedButton","props","forwardedRef","className","isLinked","buttonProps","label","createElement","text","size","icon","iconSize","ref","ConnectedBorderBoxControlLinkedButton"],"sources":["@wordpress/components/src/border-box-control/border-box-control-linked-button/component.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { link, linkOff } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport Tooltip from '../../tooltip';\nimport { View } from '../../view';\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { useBorderBoxControlLinkedButton } from './hook';\n\nimport type { LinkedButtonProps } from '../types';\n\nconst BorderBoxControlLinkedButton = (\n\tprops: WordPressComponentProps< LinkedButtonProps, 'button' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst { className, isLinked, ...buttonProps } =\n\t\tuseBorderBoxControlLinkedButton( props );\n\tconst label = isLinked ? __( 'Unlink sides' ) : __( 'Link sides' );\n\n\treturn (\n\t\t<Tooltip text={ label }>\n\t\t\t<View className={ className }>\n\t\t\t\t<Button\n\t\t\t\t\t{ ...buttonProps }\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\ticon={ isLinked ? link : linkOff }\n\t\t\t\t\ticonSize={ 24 }\n\t\t\t\t\taria-label={ label }\n\t\t\t\t\tref={ forwardedRef }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</Tooltip>\n\t);\n};\n\nconst ConnectedBorderBoxControlLinkedButton = contextConnect(\n\tBorderBoxControlLinkedButton,\n\t'BorderBoxControlLinkedButton'\n);\nexport default ConnectedBorderBoxControlLinkedButton;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,OAAO,QAAQ,kBAAkB;AAChD,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,OAAOC,OAAO,MAAM,eAAe;AACnC,SAASC,IAAI,QAAQ,YAAY;AAEjC,SAASC,cAAc,QAAQ,eAAe;AAC9C,SAASC,+BAA+B,QAAQ,QAAQ;AAIxD,MAAMC,4BAA4B,GAAGA,CACpCC,KAA6D,EAC7DC,YAAuC,KACnC;EACJ,MAAM;IAAEC,SAAS;IAAEC,QAAQ;IAAE,GAAGC;EAAY,CAAC,GAC5CN,+BAA+B,CAAEE,KAAM,CAAC;EACzC,MAAMK,KAAK,GAAGF,QAAQ,GAAGV,EAAE,CAAE,cAAe,CAAC,GAAGA,EAAE,CAAE,YAAa,CAAC;EAElE,OACCa,aAAA,CAACX,OAAO;IAACY,IAAI,EAAGF;EAAO,GACtBC,aAAA,CAACV,IAAI;IAACM,SAAS,EAAGA;EAAW,GAC5BI,aAAA,CAACZ,MAAM;IAAA,GACDU,WAAW;IAChBI,IAAI,EAAC,OAAO;IACZC,IAAI,EAAGN,QAAQ,GAAGZ,IAAI,GAAGC,OAAS;IAClCkB,QAAQ,EAAG,EAAI;IACf,cAAaL,KAAO;IACpBM,GAAG,EAAGV;EAAc,CACpB,CACI,CACE,CAAC;AAEZ,CAAC;AAED,MAAMW,qCAAqC,GAAGf,cAAc,CAC3DE,4BAA4B,EAC5B,8BACD,CAAC;AACD,eAAea,qCAAqC"}

View File

@@ -0,0 +1,29 @@
/**
* WordPress dependencies
*/
import { useMemo } from '@wordpress/element';
/**
* Internal dependencies
*/
import * as styles from '../styles';
import { useContextSystem } from '../../context';
import { useCx } from '../../utils/hooks/use-cx';
export function useBorderBoxControlLinkedButton(props) {
const {
className,
size = 'default',
...otherProps
} = useContextSystem(props, 'BorderBoxControlLinkedButton');
// Generate class names.
const cx = useCx();
const classes = useMemo(() => {
return cx(styles.borderBoxControlLinkedButton(size), className);
}, [className, cx, size]);
return {
...otherProps,
className: classes
};
}
//# sourceMappingURL=hook.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["useMemo","styles","useContextSystem","useCx","useBorderBoxControlLinkedButton","props","className","size","otherProps","cx","classes","borderBoxControlLinkedButton"],"sources":["@wordpress/components/src/border-box-control/border-box-control-linked-button/hook.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport { useCx } from '../../utils/hooks/use-cx';\n\nimport type { LinkedButtonProps } from '../types';\n\nexport function useBorderBoxControlLinkedButton(\n\tprops: WordPressComponentProps< LinkedButtonProps, 'button' >\n) {\n\tconst {\n\t\tclassName,\n\t\tsize = 'default',\n\t\t...otherProps\n\t} = useContextSystem( props, 'BorderBoxControlLinkedButton' );\n\n\t// Generate class names.\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\treturn cx( styles.borderBoxControlLinkedButton( size ), className );\n\t}, [ className, cx, size ] );\n\n\treturn { ...otherProps, className: classes };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;;AAE5C;AACA;AACA;AACA,OAAO,KAAKC,MAAM,MAAM,WAAW;AAEnC,SAASC,gBAAgB,QAAQ,eAAe;AAChD,SAASC,KAAK,QAAQ,0BAA0B;AAIhD,OAAO,SAASC,+BAA+BA,CAC9CC,KAA6D,EAC5D;EACD,MAAM;IACLC,SAAS;IACTC,IAAI,GAAG,SAAS;IAChB,GAAGC;EACJ,CAAC,GAAGN,gBAAgB,CAAEG,KAAK,EAAE,8BAA+B,CAAC;;EAE7D;EACA,MAAMI,EAAE,GAAGN,KAAK,CAAC,CAAC;EAClB,MAAMO,OAAO,GAAGV,OAAO,CAAE,MAAM;IAC9B,OAAOS,EAAE,CAAER,MAAM,CAACU,4BAA4B,CAAEJ,IAAK,CAAC,EAAED,SAAU,CAAC;EACpE,CAAC,EAAE,CAAEA,SAAS,EAAEG,EAAE,EAAEF,IAAI,CAAG,CAAC;EAE5B,OAAO;IAAE,GAAGC,UAAU;IAAEF,SAAS,EAAEI;EAAQ,CAAC;AAC7C"}

View File

@@ -0,0 +1,2 @@
export { default } from './component';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["default"],"sources":["@wordpress/components/src/border-box-control/border-box-control-linked-button/index.ts"],"sourcesContent":["export { default } from './component';\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,aAAa"}

View File

@@ -0,0 +1,97 @@
import { createElement } from "react";
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { useMemo, useState } from '@wordpress/element';
import { useMergeRefs } from '@wordpress/compose';
/**
* Internal dependencies
*/
import BorderBoxControlVisualizer from '../border-box-control-visualizer';
import { BorderControl } from '../../border-control';
import { Grid } from '../../grid';
import { contextConnect } from '../../context';
import { useBorderBoxControlSplitControls } from './hook';
const BorderBoxControlSplitControls = (props, forwardedRef) => {
const {
centeredClassName,
colors,
disableCustomColors,
enableAlpha,
enableStyle,
onChange,
popoverPlacement,
popoverOffset,
rightAlignedClassName,
size = 'default',
value,
__experimentalIsRenderedInSidebar,
...otherProps
} = useBorderBoxControlSplitControls(props);
// Use internal state instead of a ref to make sure that the component
// re-renders when the popover's anchor updates.
const [popoverAnchor, setPopoverAnchor] = useState(null);
// Memoize popoverProps to avoid returning a new object every time.
const popoverProps = useMemo(() => popoverPlacement ? {
placement: popoverPlacement,
offset: popoverOffset,
anchor: popoverAnchor,
shift: true
} : undefined, [popoverPlacement, popoverOffset, popoverAnchor]);
const sharedBorderControlProps = {
colors,
disableCustomColors,
enableAlpha,
enableStyle,
isCompact: true,
__experimentalIsRenderedInSidebar,
size
};
const mergedRef = useMergeRefs([setPopoverAnchor, forwardedRef]);
return createElement(Grid, {
...otherProps,
ref: mergedRef,
gap: 4
}, createElement(BorderBoxControlVisualizer, {
value: value,
size: size
}), createElement(BorderControl, {
className: centeredClassName,
hideLabelFromVision: true,
label: __('Top border'),
onChange: newBorder => onChange(newBorder, 'top'),
__unstablePopoverProps: popoverProps,
value: value?.top,
...sharedBorderControlProps
}), createElement(BorderControl, {
hideLabelFromVision: true,
label: __('Left border'),
onChange: newBorder => onChange(newBorder, 'left'),
__unstablePopoverProps: popoverProps,
value: value?.left,
...sharedBorderControlProps
}), createElement(BorderControl, {
className: rightAlignedClassName,
hideLabelFromVision: true,
label: __('Right border'),
onChange: newBorder => onChange(newBorder, 'right'),
__unstablePopoverProps: popoverProps,
value: value?.right,
...sharedBorderControlProps
}), createElement(BorderControl, {
className: centeredClassName,
hideLabelFromVision: true,
label: __('Bottom border'),
onChange: newBorder => onChange(newBorder, 'bottom'),
__unstablePopoverProps: popoverProps,
value: value?.bottom,
...sharedBorderControlProps
}));
};
const ConnectedBorderBoxControlSplitControls = contextConnect(BorderBoxControlSplitControls, 'BorderBoxControlSplitControls');
export default ConnectedBorderBoxControlSplitControls;
//# sourceMappingURL=component.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,46 @@
/**
* WordPress dependencies
*/
import { useMemo } from '@wordpress/element';
/**
* Internal dependencies
*/
import * as styles from '../styles';
import { useContextSystem } from '../../context';
import { useCx } from '../../utils/';
export function useBorderBoxControlSplitControls(props) {
const {
className,
colors = [],
enableAlpha = false,
enableStyle = true,
size = 'default',
__experimentalIsRenderedInSidebar = false,
...otherProps
} = useContextSystem(props, 'BorderBoxControlSplitControls');
// Generate class names.
const cx = useCx();
const classes = useMemo(() => {
return cx(styles.borderBoxControlSplitControls(size), className);
}, [cx, className, size]);
const centeredClassName = useMemo(() => {
return cx(styles.centeredBorderControl, className);
}, [cx, className]);
const rightAlignedClassName = useMemo(() => {
return cx(styles.rightBorderControl(), className);
}, [cx, className]);
return {
...otherProps,
centeredClassName,
className: classes,
colors,
enableAlpha,
enableStyle,
rightAlignedClassName,
size,
__experimentalIsRenderedInSidebar
};
}
//# sourceMappingURL=hook.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["useMemo","styles","useContextSystem","useCx","useBorderBoxControlSplitControls","props","className","colors","enableAlpha","enableStyle","size","__experimentalIsRenderedInSidebar","otherProps","cx","classes","borderBoxControlSplitControls","centeredClassName","centeredBorderControl","rightAlignedClassName","rightBorderControl"],"sources":["@wordpress/components/src/border-box-control/border-box-control-split-controls/hook.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport { useCx } from '../../utils/';\n\nimport type { SplitControlsProps } from '../types';\n\nexport function useBorderBoxControlSplitControls(\n\tprops: WordPressComponentProps< SplitControlsProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tcolors = [],\n\t\tenableAlpha = false,\n\t\tenableStyle = true,\n\t\tsize = 'default',\n\t\t__experimentalIsRenderedInSidebar = false,\n\t\t...otherProps\n\t} = useContextSystem( props, 'BorderBoxControlSplitControls' );\n\n\t// Generate class names.\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\treturn cx( styles.borderBoxControlSplitControls( size ), className );\n\t}, [ cx, className, size ] );\n\n\tconst centeredClassName = useMemo( () => {\n\t\treturn cx( styles.centeredBorderControl, className );\n\t}, [ cx, className ] );\n\n\tconst rightAlignedClassName = useMemo( () => {\n\t\treturn cx( styles.rightBorderControl(), className );\n\t}, [ cx, className ] );\n\n\treturn {\n\t\t...otherProps,\n\t\tcenteredClassName,\n\t\tclassName: classes,\n\t\tcolors,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\trightAlignedClassName,\n\t\tsize,\n\t\t__experimentalIsRenderedInSidebar,\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;;AAE5C;AACA;AACA;AACA,OAAO,KAAKC,MAAM,MAAM,WAAW;AAEnC,SAASC,gBAAgB,QAAQ,eAAe;AAChD,SAASC,KAAK,QAAQ,cAAc;AAIpC,OAAO,SAASC,gCAAgCA,CAC/CC,KAA2D,EAC1D;EACD,MAAM;IACLC,SAAS;IACTC,MAAM,GAAG,EAAE;IACXC,WAAW,GAAG,KAAK;IACnBC,WAAW,GAAG,IAAI;IAClBC,IAAI,GAAG,SAAS;IAChBC,iCAAiC,GAAG,KAAK;IACzC,GAAGC;EACJ,CAAC,GAAGV,gBAAgB,CAAEG,KAAK,EAAE,+BAAgC,CAAC;;EAE9D;EACA,MAAMQ,EAAE,GAAGV,KAAK,CAAC,CAAC;EAClB,MAAMW,OAAO,GAAGd,OAAO,CAAE,MAAM;IAC9B,OAAOa,EAAE,CAAEZ,MAAM,CAACc,6BAA6B,CAAEL,IAAK,CAAC,EAAEJ,SAAU,CAAC;EACrE,CAAC,EAAE,CAAEO,EAAE,EAAEP,SAAS,EAAEI,IAAI,CAAG,CAAC;EAE5B,MAAMM,iBAAiB,GAAGhB,OAAO,CAAE,MAAM;IACxC,OAAOa,EAAE,CAAEZ,MAAM,CAACgB,qBAAqB,EAAEX,SAAU,CAAC;EACrD,CAAC,EAAE,CAAEO,EAAE,EAAEP,SAAS,CAAG,CAAC;EAEtB,MAAMY,qBAAqB,GAAGlB,OAAO,CAAE,MAAM;IAC5C,OAAOa,EAAE,CAAEZ,MAAM,CAACkB,kBAAkB,CAAC,CAAC,EAAEb,SAAU,CAAC;EACpD,CAAC,EAAE,CAAEO,EAAE,EAAEP,SAAS,CAAG,CAAC;EAEtB,OAAO;IACN,GAAGM,UAAU;IACbI,iBAAiB;IACjBV,SAAS,EAAEQ,OAAO;IAClBP,MAAM;IACNC,WAAW;IACXC,WAAW;IACXS,qBAAqB;IACrBR,IAAI;IACJC;EACD,CAAC;AACF"}

View File

@@ -0,0 +1,2 @@
export { default } from './component';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["default"],"sources":["@wordpress/components/src/border-box-control/border-box-control-split-controls/index.ts"],"sourcesContent":["export { default } from './component';\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,aAAa"}

View File

@@ -0,0 +1,24 @@
import { createElement } from "react";
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
import { View } from '../../view';
import { contextConnect } from '../../context';
import { useBorderBoxControlVisualizer } from './hook';
const BorderBoxControlVisualizer = (props, forwardedRef) => {
const {
value,
...otherProps
} = useBorderBoxControlVisualizer(props);
return createElement(View, {
...otherProps,
ref: forwardedRef
});
};
const ConnectedBorderBoxControlVisualizer = contextConnect(BorderBoxControlVisualizer, 'BorderBoxControlVisualizer');
export default ConnectedBorderBoxControlVisualizer;
//# sourceMappingURL=component.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["View","contextConnect","useBorderBoxControlVisualizer","BorderBoxControlVisualizer","props","forwardedRef","value","otherProps","createElement","ref","ConnectedBorderBoxControlVisualizer"],"sources":["@wordpress/components/src/border-box-control/border-box-control-visualizer/component.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { View } from '../../view';\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { useBorderBoxControlVisualizer } from './hook';\n\nimport type { VisualizerProps } from '../types';\n\nconst BorderBoxControlVisualizer = (\n\tprops: WordPressComponentProps< VisualizerProps, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst { value, ...otherProps } = useBorderBoxControlVisualizer( props );\n\n\treturn <View { ...otherProps } ref={ forwardedRef } />;\n};\n\nconst ConnectedBorderBoxControlVisualizer = contextConnect(\n\tBorderBoxControlVisualizer,\n\t'BorderBoxControlVisualizer'\n);\nexport default ConnectedBorderBoxControlVisualizer;\n"],"mappings":";AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,YAAY;AAEjC,SAASC,cAAc,QAAQ,eAAe;AAC9C,SAASC,6BAA6B,QAAQ,QAAQ;AAItD,MAAMC,0BAA0B,GAAGA,CAClCC,KAAwD,EACxDC,YAAuC,KACnC;EACJ,MAAM;IAAEC,KAAK;IAAE,GAAGC;EAAW,CAAC,GAAGL,6BAA6B,CAAEE,KAAM,CAAC;EAEvE,OAAOI,aAAA,CAACR,IAAI;IAAA,GAAMO,UAAU;IAAGE,GAAG,EAAGJ;EAAc,CAAE,CAAC;AACvD,CAAC;AAED,MAAMK,mCAAmC,GAAGT,cAAc,CACzDE,0BAA0B,EAC1B,4BACD,CAAC;AACD,eAAeO,mCAAmC"}

View File

@@ -0,0 +1,31 @@
/**
* WordPress dependencies
*/
import { useMemo } from '@wordpress/element';
/**
* Internal dependencies
*/
import * as styles from '../styles';
import { useContextSystem } from '../../context';
import { useCx } from '../../utils';
export function useBorderBoxControlVisualizer(props) {
const {
className,
value,
size = 'default',
...otherProps
} = useContextSystem(props, 'BorderBoxControlVisualizer');
// Generate class names.
const cx = useCx();
const classes = useMemo(() => {
return cx(styles.borderBoxControlVisualizer(value, size), className);
}, [cx, className, value, size]);
return {
...otherProps,
className: classes,
value
};
}
//# sourceMappingURL=hook.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["useMemo","styles","useContextSystem","useCx","useBorderBoxControlVisualizer","props","className","value","size","otherProps","cx","classes","borderBoxControlVisualizer"],"sources":["@wordpress/components/src/border-box-control/border-box-control-visualizer/hook.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport type { WordPressComponentProps } from '../../context';\nimport { useContextSystem } from '../../context';\nimport { useCx } from '../../utils';\n\nimport type { VisualizerProps } from '../types';\n\nexport function useBorderBoxControlVisualizer(\n\tprops: WordPressComponentProps< VisualizerProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tvalue,\n\t\tsize = 'default',\n\t\t...otherProps\n\t} = useContextSystem( props, 'BorderBoxControlVisualizer' );\n\n\t// Generate class names.\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\treturn cx(\n\t\t\tstyles.borderBoxControlVisualizer( value, size ),\n\t\t\tclassName\n\t\t);\n\t}, [ cx, className, value, size ] );\n\n\treturn { ...otherProps, className: classes, value };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;;AAE5C;AACA;AACA;AACA,OAAO,KAAKC,MAAM,MAAM,WAAW;AAEnC,SAASC,gBAAgB,QAAQ,eAAe;AAChD,SAASC,KAAK,QAAQ,aAAa;AAInC,OAAO,SAASC,6BAA6BA,CAC5CC,KAAwD,EACvD;EACD,MAAM;IACLC,SAAS;IACTC,KAAK;IACLC,IAAI,GAAG,SAAS;IAChB,GAAGC;EACJ,CAAC,GAAGP,gBAAgB,CAAEG,KAAK,EAAE,4BAA6B,CAAC;;EAE3D;EACA,MAAMK,EAAE,GAAGP,KAAK,CAAC,CAAC;EAClB,MAAMQ,OAAO,GAAGX,OAAO,CAAE,MAAM;IAC9B,OAAOU,EAAE,CACRT,MAAM,CAACW,0BAA0B,CAAEL,KAAK,EAAEC,IAAK,CAAC,EAChDF,SACD,CAAC;EACF,CAAC,EAAE,CAAEI,EAAE,EAAEJ,SAAS,EAAEC,KAAK,EAAEC,IAAI,CAAG,CAAC;EAEnC,OAAO;IAAE,GAAGC,UAAU;IAAEH,SAAS,EAAEK,OAAO;IAAEJ;EAAM,CAAC;AACpD"}

View File

@@ -0,0 +1,2 @@
export { default } from './component';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["default"],"sources":["@wordpress/components/src/border-box-control/border-box-control-visualizer/index.ts"],"sourcesContent":["export { default } from './component';\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,aAAa"}

View File

@@ -0,0 +1,165 @@
import { createElement } from "react";
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { useMemo, useState } from '@wordpress/element';
import { useMergeRefs } from '@wordpress/compose';
/**
* Internal dependencies
*/
import BorderBoxControlLinkedButton from '../border-box-control-linked-button';
import BorderBoxControlSplitControls from '../border-box-control-split-controls';
import { BorderControl } from '../../border-control';
import { StyledLabel } from '../../base-control/styles/base-control-styles';
import { View } from '../../view';
import { VisuallyHidden } from '../../visually-hidden';
import { contextConnect } from '../../context';
import { useBorderBoxControl } from './hook';
const BorderLabel = props => {
const {
label,
hideLabelFromVision
} = props;
if (!label) {
return null;
}
return hideLabelFromVision ? createElement(VisuallyHidden, {
as: "label"
}, label) : createElement(StyledLabel, null, label);
};
const UnconnectedBorderBoxControl = (props, forwardedRef) => {
const {
className,
colors,
disableCustomColors,
disableUnits,
enableAlpha,
enableStyle,
hasMixedBorders,
hideLabelFromVision,
isLinked,
label,
linkedControlClassName,
linkedValue,
onLinkedChange,
onSplitChange,
popoverPlacement,
popoverOffset,
size,
splitValue,
toggleLinked,
wrapperClassName,
__experimentalIsRenderedInSidebar,
...otherProps
} = useBorderBoxControl(props);
// Use internal state instead of a ref to make sure that the component
// re-renders when the popover's anchor updates.
const [popoverAnchor, setPopoverAnchor] = useState(null);
// Memoize popoverProps to avoid returning a new object every time.
const popoverProps = useMemo(() => popoverPlacement ? {
placement: popoverPlacement,
offset: popoverOffset,
anchor: popoverAnchor,
shift: true
} : undefined, [popoverPlacement, popoverOffset, popoverAnchor]);
const mergedRef = useMergeRefs([setPopoverAnchor, forwardedRef]);
return createElement(View, {
className: className,
...otherProps,
ref: mergedRef
}, createElement(BorderLabel, {
label: label,
hideLabelFromVision: hideLabelFromVision
}), createElement(View, {
className: wrapperClassName
}, isLinked ? createElement(BorderControl, {
className: linkedControlClassName,
colors: colors,
disableUnits: disableUnits,
disableCustomColors: disableCustomColors,
enableAlpha: enableAlpha,
enableStyle: enableStyle,
onChange: onLinkedChange,
placeholder: hasMixedBorders ? __('Mixed') : undefined,
__unstablePopoverProps: popoverProps,
shouldSanitizeBorder: false // This component will handle that.
,
value: linkedValue,
withSlider: true,
width: size === '__unstable-large' ? '116px' : '110px',
__experimentalIsRenderedInSidebar: __experimentalIsRenderedInSidebar,
size: size
}) : createElement(BorderBoxControlSplitControls, {
colors: colors,
disableCustomColors: disableCustomColors,
enableAlpha: enableAlpha,
enableStyle: enableStyle,
onChange: onSplitChange,
popoverPlacement: popoverPlacement,
popoverOffset: popoverOffset,
value: splitValue,
__experimentalIsRenderedInSidebar: __experimentalIsRenderedInSidebar,
size: size
}), createElement(BorderBoxControlLinkedButton, {
onClick: toggleLinked,
isLinked: isLinked,
size: size
})));
};
/**
* The `BorderBoxControl` effectively has two view states. The first, a "linked"
* view, allows configuration of a flat border via a single `BorderControl`.
* The second, a "split" view, contains a `BorderControl` for each side
* as well as a visualizer for the currently selected borders. Each view also
* contains a button to toggle between the two.
*
* When switching from the "split" view to "linked", if the individual side
* borders are not consistent, the "linked" view will display any border
* properties selections that are consistent while showing a mixed state for
* those that aren't. For example, if all borders had the same color and style
* but different widths, then the border dropdown in the "linked" view's
* `BorderControl` would show that consistent color and style but the "linked"
* view's width input would show "Mixed" placeholder text.
*
* ```jsx
* import { __experimentalBorderBoxControl as BorderBoxControl } from '@wordpress/components';
* import { __ } from '@wordpress/i18n';
*
* const colors = [
* { name: 'Blue 20', color: '#72aee6' },
* // ...
* ];
*
* const MyBorderBoxControl = () => {
* const defaultBorder = {
* color: '#72aee6',
* style: 'dashed',
* width: '1px',
* };
* const [ borders, setBorders ] = useState( {
* top: defaultBorder,
* right: defaultBorder,
* bottom: defaultBorder,
* left: defaultBorder,
* } );
* const onChange = ( newBorders ) => setBorders( newBorders );
*
* return (
* <BorderBoxControl
* colors={ colors }
* label={ __( 'Borders' ) }
* onChange={ onChange }
* value={ borders }
* />
* );
* };
* ```
*/
export const BorderBoxControl = contextConnect(UnconnectedBorderBoxControl, 'BorderBoxControl');
export default BorderBoxControl;
//# sourceMappingURL=component.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,116 @@
/**
* WordPress dependencies
*/
import { useMemo, useState } from '@wordpress/element';
/**
* Internal dependencies
*/
import * as styles from '../styles';
import { getBorderDiff, getCommonBorder, getSplitBorders, hasMixedBorders, hasSplitBorders, isCompleteBorder, isEmptyBorder } from '../utils';
import { useContextSystem } from '../../context';
import { useCx } from '../../utils/hooks/use-cx';
export function useBorderBoxControl(props) {
const {
className,
colors = [],
onChange,
enableAlpha = false,
enableStyle = true,
size = 'default',
value,
__experimentalIsRenderedInSidebar = false,
__next40pxDefaultSize,
...otherProps
} = useContextSystem(props, 'BorderBoxControl');
const computedSize = size === 'default' && __next40pxDefaultSize ? '__unstable-large' : size;
const mixedBorders = hasMixedBorders(value);
const splitBorders = hasSplitBorders(value);
const linkedValue = splitBorders ? getCommonBorder(value) : value;
const splitValue = splitBorders ? value : getSplitBorders(value);
// If no numeric width value is set, the unit select will be disabled.
const hasWidthValue = !isNaN(parseFloat(`${linkedValue?.width}`));
const [isLinked, setIsLinked] = useState(!mixedBorders);
const toggleLinked = () => setIsLinked(!isLinked);
const onLinkedChange = newBorder => {
if (!newBorder) {
return onChange(undefined);
}
// If we have all props defined on the new border apply it.
if (!mixedBorders || isCompleteBorder(newBorder)) {
return onChange(isEmptyBorder(newBorder) ? undefined : newBorder);
}
// If we had mixed borders we might have had some shared border props
// that we need to maintain. For example; we could have mixed borders
// with all the same color but different widths. Then from the linked
// control we change the color. We should keep the separate widths.
const changes = getBorderDiff(linkedValue, newBorder);
const updatedBorders = {
top: {
...value?.top,
...changes
},
right: {
...value?.right,
...changes
},
bottom: {
...value?.bottom,
...changes
},
left: {
...value?.left,
...changes
}
};
if (hasMixedBorders(updatedBorders)) {
return onChange(updatedBorders);
}
const filteredResult = isEmptyBorder(updatedBorders.top) ? undefined : updatedBorders.top;
onChange(filteredResult);
};
const onSplitChange = (newBorder, side) => {
const updatedBorders = {
...splitValue,
[side]: newBorder
};
if (hasMixedBorders(updatedBorders)) {
onChange(updatedBorders);
} else {
onChange(newBorder);
}
};
const cx = useCx();
const classes = useMemo(() => {
return cx(styles.borderBoxControl, className);
}, [cx, className]);
const linkedControlClassName = useMemo(() => {
return cx(styles.linkedBorderControl());
}, [cx]);
const wrapperClassName = useMemo(() => {
return cx(styles.wrapper);
}, [cx]);
return {
...otherProps,
className: classes,
colors,
disableUnits: mixedBorders && !hasWidthValue,
enableAlpha,
enableStyle,
hasMixedBorders: mixedBorders,
isLinked,
linkedControlClassName,
onLinkedChange,
onSplitChange,
toggleLinked,
linkedValue,
size: computedSize,
splitValue,
wrapperClassName,
__experimentalIsRenderedInSidebar
};
}
//# sourceMappingURL=hook.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
export { default as BorderBoxControl } from './component';
export { useBorderBoxControl } from './hook';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["default","BorderBoxControl","useBorderBoxControl"],"sources":["@wordpress/components/src/border-box-control/border-box-control/index.ts"],"sourcesContent":["export { default as BorderBoxControl } from './component';\nexport { useBorderBoxControl } from './hook';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,gBAAgB,QAAQ,aAAa;AACzD,SAASC,mBAAmB,QAAQ,QAAQ"}

View File

@@ -0,0 +1,4 @@
export { default as BorderBoxControl } from './border-box-control/component';
export { useBorderBoxControl } from './border-box-control/hook';
export { hasSplitBorders, isEmptyBorder, isDefinedBorder } from './utils';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["default","BorderBoxControl","useBorderBoxControl","hasSplitBorders","isEmptyBorder","isDefinedBorder"],"sources":["@wordpress/components/src/border-box-control/index.ts"],"sourcesContent":["export { default as BorderBoxControl } from './border-box-control/component';\nexport { useBorderBoxControl } from './border-box-control/hook';\nexport { hasSplitBorders, isEmptyBorder, isDefinedBorder } from './utils';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,gBAAgB,QAAQ,gCAAgC;AAC5E,SAASC,mBAAmB,QAAQ,2BAA2B;AAC/D,SAASC,eAAe,EAAEC,aAAa,EAAEC,eAAe,QAAQ,SAAS"}

View File

@@ -0,0 +1,60 @@
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
*/
import { css } from '@emotion/react';
/**
* Internal dependencies
*/
import { COLORS, CONFIG, rtl } from '../utils';
export const borderBoxControl = /*#__PURE__*/css(process.env.NODE_ENV === "production" ? "" : ";label:borderBoxControl;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYm9yZGVyLWJveC1jb250cm9sL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFhbUMiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9ib3JkZXItYm94LWNvbnRyb2wvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vdXRpbHMnO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x0Ym9yZGVyTGVmdDogYm9yZGVyQm94U3R5bGVXaXRoRmFsbGJhY2soIGJvcmRlcnM/LmxlZnQgKSxcblx0XHR9ICkoKSB9XG5cdFx0JHsgcnRsKCB7XG5cdFx0XHRib3JkZXJSaWdodDogYm9yZGVyQm94U3R5bGVXaXRoRmFsbGJhY2soIGJvcmRlcnM/LnJpZ2h0ICksXG5cdFx0fSApKCkgfVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckJveENvbnRyb2xTcGxpdENvbnRyb2xzID0gKFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IGNzc2Bcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRmbGV4OiAxO1xuXHR3aWR0aDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gdW5kZWZpbmVkIDogJzgwJScgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBjZW50ZXJlZEJvcmRlckNvbnRyb2wgPSBjc3NgXG5cdGdyaWQtY29sdW1uOiBzcGFuIDI7XG5cdG1hcmdpbjogMCBhdXRvO1xuYDtcblxuZXhwb3J0IGNvbnN0IHJpZ2h0Qm9yZGVyQ29udHJvbCA9ICgpID0+IGNzc2Bcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6ICdhdXRvJyB9ICkoKSB9XG5gO1xuIl19 */");
export const linkedBorderControl = () => /*#__PURE__*/css("flex:1;", rtl({
marginRight: '24px'
})(), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:linkedBorderControl;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYm9yZGVyLWJveC1jb250cm9sL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFlNEMiLCJmaWxlI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1xuIl19 */");
export const wrapper = process.env.NODE_ENV === "production" ? {
name: "bjn8wh",
styles: "position:relative"
} : {
name: "memc06-wrapper",
styles: "position:relative;label:wrapper;",
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYm9yZGVyLWJveC1jb250cm9sL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvQjBCIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYm9yZGVyLWJveC1jb250cm9sL3N0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcblxuaW1wb3J0IHR5cGUgeyBCb3JkZXIgfSBmcm9tICcuLi9ib3JkZXItY29udHJvbC90eXBlcyc7XG5pbXBvcnQgdHlwZSB7IEJvcmRlcnMgfSBmcm9tICcuL3R5cGVzJztcblxuZXhwb3J0IGNvbnN0IGJvcmRlckJveENvbnRyb2wgPSBjc3NgYDtcblxuZXhwb3J0IGNvbnN0IGxpbmtlZEJvcmRlckNvbnRyb2wgPSAoKSA9PiBjc3NgXG5cdGZsZXg6IDE7XG5cdCR7IHJ0bCggeyBtYXJnaW5SaWdodDogJzI0cHgnIH0gKSgpIH1cbmA7XG5cbmV4cG9ydCBjb25zdCB3cmFwcGVyID0gY3NzYFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQm94Q29udHJvbExpbmtlZEJ1dHRvbiA9I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lJyA/IHVuZGVmaW5lZCA6ICc4MCUnIH07XG5gO1xuXG5leHBvcnQgY29uc3QgY2VudGVyZWRCb3JkZXJDb250cm9sID0gY3NzYFxuXHRncmlkLWNvbHVtbjogc3BhbiAyO1xuXHRtYXJnaW46IDAgYXV0bztcbmA7XG5cbmV4cG9ydCBjb25zdCByaWdodEJvcmRlckNvbnRyb2wgPSAoKSA9PiBjc3NgXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAnYXV0bycgfSApKCkgfVxuYDtcbiJdfQ== */",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
export const borderBoxControlLinkedButton = size => {
return /*#__PURE__*/css("position:absolute;top:", size === '__unstable-large' ? '8px' : '3px', ";", rtl({
right: 0
})(), " line-height:0;" + (process.env.NODE_ENV === "production" ? "" : ";label:borderBoxControlLinkedButton;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYm9yZGVyLWJveC1jb250cm9sL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyQlciLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9ib3JkZXItYm94LWNvbnRyb2wvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5pbXBvcnQgdHlwZSB7IEJvcmRlciB9IGZyb20gJy4uL2JvcmRlci1jb250cm9sL3R5cGVzJztcbmltcG9ydCB0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ICkoKSB9XG5cdFx0JHsgcnRsKCB7XG5cdFx0XHRib3JkZXJSaWdodDogYm9yZGVyQm94U3R5bGVXaXRoRmFsbGJhY2soIGJvcmRlcnM/LnJpZ2h0ICksXG5cdFx0fSApKCkgfVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckJveENvbnRyb2xTcGxpdENvbnRyb2xzID0gKFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IGNzc2Bcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRmbGV4OiAxO1xuXHR3aWR0aDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gdW5kZWZpbmVkIDogJzgwJScgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBjZW50ZXJlZEJvcmRlckNvbnRyb2wgPSBjc3NgXG5cdGdyaWQtY29sdW1uOiBzcGFuIDI7XG5cdG1hcmdpbjogMCBhdXRvO1xuYDtcblxuZXhwb3J0IGNvbnN0IHJpZ2h0Qm9yZGVyQ29udHJvbCA9ICgpID0+IGNzc2Bcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6ICdhdXRvJyB9ICkoKSB9XG5gO1xuIl19 */");
};
const borderBoxStyleWithFallback = border => {
const {
color = COLORS.gray[200],
style = 'solid',
width = CONFIG.borderWidth
} = border || {};
const clampedWidth = width !== CONFIG.borderWidth ? `clamp(1px, ${width}, 10px)` : width;
const hasVisibleBorder = !!width && width !== '0' || !!color;
const borderStyle = hasVisibleBorder ? style || 'solid' : style;
return `${color} ${borderStyle} ${clampedWidth}`;
};
export const borderBoxControlVisualizer = (borders, size) => {
return /*#__PURE__*/css("position:absolute;top:", size === '__unstable-large' ? '20px' : '15px', ";right:", size === '__unstable-large' ? '39px' : '29px', ";bottom:", size === '__unstable-large' ? '20px' : '15px', ";left:", size === '__unstable-large' ? '39px' : '29px', ";border-top:", borderBoxStyleWithFallback(borders?.top), ";border-bottom:", borderBoxStyleWithFallback(borders?.bottom), ";", rtl({
borderLeft: borderBoxStyleWithFallback(borders?.left)
})(), " ", rtl({
borderRight: borderBoxStyleWithFallback(borders?.right)
})(), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:borderBoxControlVisualizer;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYm9yZGVyLWJveC1jb250cm9sL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzRFciLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9ib3JkZXItYm94LWNvbnRyb2wvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5pbXBvcnQgdHlwZSB7IEJvcmRlciB9IGZyb20gJy4uL2JvcmRlci1jb250cm9sL3R5cGVzJztcbmltcG9ydCB0eXBlIHsgQm9yZGVycyB9IGZyb20gJy4vdHlwZXMnO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQm94Q29udHJvbCA9IGNzc2BgO1xuXG5leHBvcnQgY29uc3QgbGlua2VkQm9yZGVyQ29udHJvbCA9ICgpID0+IGNzc2Bcblx0ZmxleDogMTtcblx0JHsgcnRsKCB7IG1hcmdpblJpZ2h0OiAnMjRweCcgfSApKCkgfVxuYDtcblxuZXhwb3J0IGNvbnN0IHdyYXBwZXIgPSBjc3NgXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTt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1xuXHRmbGV4OiAxO1xuXHR3aWR0aDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gdW5kZWZpbmVkIDogJzgwJScgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBjZW50ZXJlZEJvcmRlckNvbnRyb2wgPSBjc3NgXG5cdGdyaWQtY29sdW1uOiBzcGFuIDI7XG5cdG1hcmdpbjogMCBhdXRvO1xuYDtcblxuZXhwb3J0IGNvbnN0IHJpZ2h0Qm9yZGVyQ29udHJvbCA9ICgpID0+IGNzc2Bcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6ICdhdXRvJyB9ICkoKSB9XG5gO1xuIl19 */");
};
export const borderBoxControlSplitControls = size => /*#__PURE__*/css("position:relative;flex:1;width:", size === '__unstable-large' ? undefined : '80%', ";" + (process.env.NODE_ENV === "production" ? "" : ";label:borderBoxControlSplitControls;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYm9yZGVyLWJveC1jb250cm9sL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5RVEiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9ib3JkZXItYm94LWNvbnRyb2wvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRywgcnRsIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5pbXBvcnQgdHlwZSB7IEJvcmRlciB9IGZyb20gJy4uL2JvcmRlci1jb250cm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cnM/LmxlZnQgKSxcblx0XHR9ICkoKSB9XG5cdFx0JHsgcnRsKCB7XG5cdFx0XHRib3JkZXJSaWdodDogYm9yZGVyQm94U3R5bGVXaXRoRmFsbGJhY2soIGJvcmRlcnM/LnJpZ2h0ICksXG5cdFx0fSApKCkgfVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IGJvcmRlckJveENvbnRyb2xTcGxpdENvbnRyb2xzID0gKFxuXHRzaXplPzogJ2RlZmF1bHQnIHwgJ19fdW5zdGFibGUtbGFyZ2UnXG4pID0+IGNzc2Bcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHRmbGV4OiAxO1xuXHR3aWR0aDogJHsgc2l6ZSA9PT0gJ19fdW5zdGFibGUtbGFyZ2UnID8gdW5kZWZpbmVkIDogJzgwJScgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBjZW50ZXJlZEJvcmRlckNvbnRyb2wgPSBjc3NgXG5cdGdyaWQtY29sdW1uOiBzcGFuIDI7XG5cdG1hcmdpbjogMCBhdXRvO1xuYDtcblxuZXhwb3J0IGNvbnN0IHJpZ2h0Qm9yZGVyQ29udHJvbCA9ICgpID0+IGNzc2Bcblx0JHsgcnRsKCB7IG1hcmdpbkxlZnQ6ICdhdXRvJyB9ICkoKSB9XG5gO1xuIl19 */");
export const centeredBorderControl = process.env.NODE_ENV === "production" ? {
name: "1nwbfnf",
styles: "grid-column:span 2;margin:0 auto"
} : {
name: "gedmrr-centeredBorderControl",
styles: "grid-column:span 2;margin:0 auto;label:centeredBorderControl;",
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYm9yZGVyLWJveC1jb250cm9sL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUErRXdDIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYm9yZGVyLW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0OiAkeyBzaXplID09PSAnX191bnN0YWJsZS1sYXJnZScgPyAnMzlweCcgOiAnMjlweCcgfTtcblx0XHRib3JkZXItdG9wOiAkeyBib3JkZXJCb3hTdHlsZVdpdGhGYWxsYmFjayggYm9yZGVycz8udG9wICkgfTtcblx0XHRib3JkZXItYm90dG9tOiAkeyBib3JkZXJCb3hTdHlsZVdpdGhGYWxsYmFjayggYm9yZGVycz8uYm90dG9tICkgfTtcblx0XHQkeyBydGwoIHtcblx0XHRcdGJvcmRlckxlZnQ6IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrKCBib3JkZXJzPy5sZWZ0ICksXG5cdFx0fSApKCkgfVxuXHRcdCR7IHJ0bCgge1xuXHRcdFx0Ym9yZGVyUmlnaHQ6IGJvcmRlckJveFN0eWxlV2l0aEZhbGxiYWNrKCBib3JkZXJzPy5yaWdodCApLFxuXHRcdH0gKSgpIH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBib3JkZXJCb3hDb250cm9sU3BsaXRDb250cm9scyA9IChcblx0c2l6ZT86ICdkZWZhdWx0JyB8ICdfX3Vuc3RhYmxlLWxhcmdlJ1xuKSA9PiBjc3NgXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0ZmxleDogMTtcblx0d2lkdGg6ICR7IHNpemUgPT09ICdfX3Vuc3RhYmxlLWxhcmdlJyA/IHVuZGVmaW5lZCA6ICc4MCUnIH07XG5gO1xuXG5leHBvcnQgY29uc3QgY2VudGVyZWRCb3JkZXJDb250cm9sID0gY3NzYFxuXHRncmlkLWNvbHVtbjogc3BhbiAyO1xuXHRtYXJnaW46IDAgYXV0bztcbmA7XG5cbmV4cG9ydCBjb25zdCByaWdodEJvcmRlckNvbnRyb2wgPSAoKSA9PiBjc3NgXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAnYXV0bycgfSApKCkgfVxuYDtcbiJdfQ== */",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
export const rightBorderControl = () => /*#__PURE__*/css(rtl({
marginLeft: 'auto'
})(), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:rightBorderControl;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYm9yZGVyLWJveC1jb250cm9sL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvRjJDIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvYm9yZGVyLWJveC1jb250cm9sL3N0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTLCBDT05GSUcsIHJ0bCB9IGZyb20gJy4uL3V0aWxzJztcblxuaW1wb3J0IHR5cGUgeyBCb3JkZXIgfSBmcm9tICcuLi9ib3JkZXItY29udHJvbC90eXBlcyc7XG5pbXBvcnQgdHlwZSB7IEJvcmRlcnMgfSBmcm9tICcuL3R5cGVzJztcblxuZXhwb3J0IGNvbnN0IGJvcmRlckJveENvbnRyb2wgPSBjc3NgYDtcblxuZXhwb3J0IGNvbnN0IGxpbmtlZEJvcmRlckNvbnRyb2wgPSAoKSA9PiBjc3NgXG5cdGZsZXg6IDE7XG5cdCR7IHJ0bCggeyBtYXJnaW5SaWdodDogJzI0cHgnIH0gKSgpIH1cbmA7XG5cbmV4cG9ydCBjb25zdCB3cmFwcGVyID0gY3NzYFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5gO1xuXG5leHBvcnQgY29uc3QgYm9yZGVyQm94Q29udHJvbExpbmtlZEJ1dHRvbiA9IChc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yA/IHVuZGVmaW5lZCA6ICc4MCUnIH07XG5gO1xuXG5leHBvcnQgY29uc3QgY2VudGVyZWRCb3JkZXJDb250cm9sID0gY3NzYFxuXHRncmlkLWNvbHVtbjogc3BhbiAyO1xuXHRtYXJnaW46IDAgYXV0bztcbmA7XG5cbmV4cG9ydCBjb25zdCByaWdodEJvcmRlckNvbnRyb2wgPSAoKSA9PiBjc3NgXG5cdCR7IHJ0bCggeyBtYXJnaW5MZWZ0OiAnYXV0bycgfSApKCkgfVxuYDtcbiJdfQ== */");
//# sourceMappingURL=styles.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":[],"sources":["@wordpress/components/src/border-box-control/types.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type {\n\tBorder,\n\tColorProps,\n\tLabelProps,\n\tBorderControlProps,\n} from '../border-control/types';\nimport type { PopoverProps } from '../popover/types';\n\nexport type Borders = {\n\ttop?: Border;\n\tright?: Border;\n\tbottom?: Border;\n\tleft?: Border;\n};\n\nexport type AnyBorder = Border | Borders | undefined;\nexport type BorderProp = keyof Border;\nexport type BorderSide = keyof Borders;\n\nexport type BorderBoxControlProps = ColorProps &\n\tLabelProps &\n\tPick< BorderControlProps, 'enableStyle' | 'size' > & {\n\t\t/**\n\t\t * A callback function invoked when any border value is changed. The value\n\t\t * received may be a \"flat\" border object, one that has properties defining\n\t\t * individual side borders, or `undefined`.\n\t\t */\n\t\tonChange: ( value: AnyBorder ) => void;\n\t\t/**\n\t\t * The position of the color popovers compared to the control wrapper.\n\t\t */\n\t\tpopoverPlacement?: PopoverProps[ 'placement' ];\n\t\t/**\n\t\t * The space between the popover and the control wrapper.\n\t\t */\n\t\tpopoverOffset?: PopoverProps[ 'offset' ];\n\t\t/**\n\t\t * An object representing the current border configuration.\n\t\t *\n\t\t * This may be a \"flat\" border where the object has `color`, `style`, and\n\t\t * `width` properties or a \"split\" border which defines the previous\n\t\t * properties but for each side; `top`, `right`, `bottom`, and `left`.\n\t\t */\n\t\tvalue: AnyBorder;\n\t\t/**\n\t\t * Start opting into the larger default height that will become the default size in a future version.\n\t\t *\n\t\t * @default false\n\t\t */\n\t\t__next40pxDefaultSize?: boolean;\n\t};\n\nexport type LinkedButtonProps = Pick< BorderBoxControlProps, 'size' > & {\n\t/**\n\t * This prop allows the `LinkedButton` to reflect whether the parent\n\t * `BorderBoxControl` is currently displaying \"linked\" or \"unlinked\"\n\t * border controls.\n\t */\n\tisLinked: boolean;\n\t/**\n\t * A callback invoked when this `LinkedButton` is clicked. It is used to\n\t * toggle display between linked or split border controls within the parent\n\t * `BorderBoxControl`.\n\t */\n\tonClick: () => void;\n};\n\nexport type VisualizerProps = Pick< BorderBoxControlProps, 'size' > & {\n\t/**\n\t * An object representing the current border configuration. It contains\n\t * properties for each side, with each side an object reflecting the border\n\t * color, style, and width.\n\t */\n\tvalue?: Borders;\n};\n\nexport type SplitControlsProps = ColorProps &\n\tPick< BorderBoxControlProps, 'enableStyle' | 'size' > & {\n\t\t/**\n\t\t * A callback that is invoked whenever an individual side's border has\n\t\t * changed.\n\t\t */\n\t\tonChange: ( value: Border | undefined, side: BorderSide ) => void;\n\t\t/**\n\t\t * The position of the color popovers compared to the control wrapper.\n\t\t */\n\t\tpopoverPlacement?: PopoverProps[ 'placement' ];\n\t\t/**\n\t\t * The space between the popover and the control wrapper.\n\t\t */\n\t\tpopoverOffset?: PopoverProps[ 'offset' ];\n\t\t/**\n\t\t * An object representing the current border configuration. It contains\n\t\t * properties for each side, with each side an object reflecting the border\n\t\t * color, style, and width.\n\t\t */\n\t\tvalue?: Borders;\n\t};\n"],"mappings":""}

View File

@@ -0,0 +1,148 @@
/**
* External dependencies
*/
/**
* Internal dependencies
*/
import { parseCSSUnitValue } from '../utils/unit-values';
const sides = ['top', 'right', 'bottom', 'left'];
const borderProps = ['color', 'style', 'width'];
export const isEmptyBorder = border => {
if (!border) {
return true;
}
return !borderProps.some(prop => border[prop] !== undefined);
};
export const isDefinedBorder = border => {
// No border, no worries :)
if (!border) {
return false;
}
// If we have individual borders per side within the border object we
// need to check whether any of those side borders have been set.
if (hasSplitBorders(border)) {
const allSidesEmpty = sides.every(side => isEmptyBorder(border[side]));
return !allSidesEmpty;
}
// If we have a top-level border only, check if that is empty. e.g.
// { color: undefined, style: undefined, width: undefined }
// Border radius can still be set within the border object as it is
// handled separately.
return !isEmptyBorder(border);
};
export const isCompleteBorder = border => {
if (!border) {
return false;
}
return borderProps.every(prop => border[prop] !== undefined);
};
export const hasSplitBorders = (border = {}) => {
return Object.keys(border).some(side => sides.indexOf(side) !== -1);
};
export const hasMixedBorders = borders => {
if (!hasSplitBorders(borders)) {
return false;
}
const shorthandBorders = sides.map(side => getShorthandBorderStyle(borders?.[side]));
return !shorthandBorders.every(border => border === shorthandBorders[0]);
};
export const getSplitBorders = border => {
if (!border || isEmptyBorder(border)) {
return undefined;
}
return {
top: border,
right: border,
bottom: border,
left: border
};
};
export const getBorderDiff = (original, updated) => {
const diff = {};
if (original.color !== updated.color) {
diff.color = updated.color;
}
if (original.style !== updated.style) {
diff.style = updated.style;
}
if (original.width !== updated.width) {
diff.width = updated.width;
}
return diff;
};
export const getCommonBorder = borders => {
if (!borders) {
return undefined;
}
const colors = [];
const styles = [];
const widths = [];
sides.forEach(side => {
colors.push(borders[side]?.color);
styles.push(borders[side]?.style);
widths.push(borders[side]?.width);
});
const allColorsMatch = colors.every(value => value === colors[0]);
const allStylesMatch = styles.every(value => value === styles[0]);
const allWidthsMatch = widths.every(value => value === widths[0]);
return {
color: allColorsMatch ? colors[0] : undefined,
style: allStylesMatch ? styles[0] : undefined,
width: allWidthsMatch ? widths[0] : getMostCommonUnit(widths)
};
};
export const getShorthandBorderStyle = (border, fallbackBorder) => {
if (isEmptyBorder(border)) {
return fallbackBorder;
}
const {
color: fallbackColor,
style: fallbackStyle,
width: fallbackWidth
} = fallbackBorder || {};
const {
color = fallbackColor,
style = fallbackStyle,
width = fallbackWidth
} = border;
const hasVisibleBorder = !!width && width !== '0' || !!color;
const borderStyle = hasVisibleBorder ? style || 'solid' : style;
return [width, borderStyle, color].filter(Boolean).join(' ');
};
export const getMostCommonUnit = values => {
// Collect all the CSS units.
const units = values.map(value => value === undefined ? undefined : parseCSSUnitValue(`${value}`)[1]);
// Return the most common unit out of only the defined CSS units.
const filteredUnits = units.filter(value => value !== undefined);
return mode(filteredUnits);
};
/**
* Finds the mode value out of the array passed favouring the first value
* as a tiebreaker.
*
* @param values Values to determine the mode from.
*
* @return The mode value.
*/
function mode(values) {
if (values.length === 0) {
return undefined;
}
const map = {};
let maxCount = 0;
let currentMode;
values.forEach(value => {
map[value] = map[value] === undefined ? 1 : map[value] + 1;
if (map[value] > maxCount) {
currentMode = value;
maxCount = map[value];
}
});
return currentMode;
}
//# sourceMappingURL=utils.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,176 @@
import { createElement, Fragment } from "react";
/**
* External dependencies
*/
/**
* WordPress dependencies
*/
import { __, sprintf } from '@wordpress/i18n';
import { closeSmall } from '@wordpress/icons';
/**
* Internal dependencies
*/
import BorderControlStylePicker from '../border-control-style-picker';
import Button from '../../button';
import ColorIndicator from '../../color-indicator';
import ColorPalette from '../../color-palette';
import Dropdown from '../../dropdown';
import { HStack } from '../../h-stack';
import { VStack } from '../../v-stack';
import { contextConnect } from '../../context';
import { useBorderControlDropdown } from './hook';
import { StyledLabel } from '../../base-control/styles/base-control-styles';
import DropdownContentWrapper from '../../dropdown/dropdown-content-wrapper';
import { isMultiplePaletteArray } from '../../color-palette/utils';
const getAriaLabelColorValue = colorValue => {
// Leave hex values as-is. Remove the `var()` wrapper from CSS vars.
return colorValue.replace(/^var\((.+)\)$/, '$1');
};
const getColorObject = (colorValue, colors) => {
if (!colorValue || !colors) {
return;
}
if (isMultiplePaletteArray(colors)) {
// Multiple origins
let matchedColor;
colors.some(origin => origin.colors.some(color => {
if (color.color === colorValue) {
matchedColor = color;
return true;
}
return false;
}));
return matchedColor;
}
// Single origin
return colors.find(color => color.color === colorValue);
};
const getToggleAriaLabel = (colorValue, colorObject, style, isStyleEnabled) => {
if (isStyleEnabled) {
if (colorObject) {
const ariaLabelValue = getAriaLabelColorValue(colorObject.color);
return style ? sprintf(
// translators: %1$s: The name of the color e.g. "vivid red". %2$s: The color's hex code e.g.: "#f00:". %3$s: The current border style selection e.g. "solid".
'Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s". The currently selected style is "%3$s".', colorObject.name, ariaLabelValue, style) : sprintf(
// translators: %1$s: The name of the color e.g. "vivid red". %2$s: The color's hex code e.g.: "#f00:".
'Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s".', colorObject.name, ariaLabelValue);
}
if (colorValue) {
const ariaLabelValue = getAriaLabelColorValue(colorValue);
return style ? sprintf(
// translators: %1$s: The color's hex code e.g.: "#f00:". %2$s: The current border style selection e.g. "solid".
'Border color and style picker. The currently selected color has a value of "%1$s". The currently selected style is "%2$s".', ariaLabelValue, style) : sprintf(
// translators: %1$s: The color's hex code e.g: "#f00".
'Border color and style picker. The currently selected color has a value of "%1$s".', ariaLabelValue);
}
return __('Border color and style picker.');
}
if (colorObject) {
return sprintf(
// translators: %1$s: The name of the color e.g. "vivid red". %2$s: The color's hex code e.g: "#f00".
'Border color picker. The currently selected color is called "%1$s" and has a value of "%2$s".', colorObject.name, getAriaLabelColorValue(colorObject.color));
}
if (colorValue) {
return sprintf(
// translators: %1$s: The color's hex code e.g: "#f00".
'Border color picker. The currently selected color has a value of "%1$s".', getAriaLabelColorValue(colorValue));
}
return __('Border color picker.');
};
const BorderControlDropdown = (props, forwardedRef) => {
const {
__experimentalIsRenderedInSidebar,
border,
colors,
disableCustomColors,
enableAlpha,
enableStyle,
indicatorClassName,
indicatorWrapperClassName,
isStyleSettable,
onReset,
onColorChange,
onStyleChange,
popoverContentClassName,
popoverControlsClassName,
resetButtonClassName,
showDropdownHeader,
size,
__unstablePopoverProps,
...otherProps
} = useBorderControlDropdown(props);
const {
color,
style
} = border || {};
const colorObject = getColorObject(color, colors);
const toggleAriaLabel = getToggleAriaLabel(color, colorObject, style, enableStyle);
const showResetButton = color || style && style !== 'none';
const dropdownPosition = __experimentalIsRenderedInSidebar ? 'bottom left' : undefined;
const renderToggle = ({
onToggle
}) => createElement(Button, {
onClick: onToggle,
variant: "tertiary",
"aria-label": toggleAriaLabel,
tooltipPosition: dropdownPosition,
label: __('Border color and style picker'),
showTooltip: true,
__next40pxDefaultSize: size === '__unstable-large' ? true : false
}, createElement("span", {
className: indicatorWrapperClassName
}, createElement(ColorIndicator, {
className: indicatorClassName,
colorValue: color
})));
const renderContent = ({
onClose
}) => createElement(Fragment, null, createElement(DropdownContentWrapper, {
paddingSize: "medium"
}, createElement(VStack, {
className: popoverControlsClassName,
spacing: 6
}, showDropdownHeader ? createElement(HStack, null, createElement(StyledLabel, null, __('Border color')), createElement(Button, {
size: "small",
label: __('Close border color'),
icon: closeSmall,
onClick: onClose
})) : undefined, createElement(ColorPalette, {
className: popoverContentClassName,
value: color,
onChange: onColorChange,
colors,
disableCustomColors,
__experimentalIsRenderedInSidebar: __experimentalIsRenderedInSidebar,
clearable: false,
enableAlpha: enableAlpha
}), enableStyle && isStyleSettable && createElement(BorderControlStylePicker, {
label: __('Style'),
value: style,
onChange: onStyleChange
}))), showResetButton && createElement(DropdownContentWrapper, {
paddingSize: "none"
}, createElement(Button, {
className: resetButtonClassName,
variant: "tertiary",
onClick: () => {
onReset();
onClose();
}
}, __('Reset'))));
return createElement(Dropdown, {
renderToggle: renderToggle,
renderContent: renderContent,
popoverProps: {
...__unstablePopoverProps
},
...otherProps,
ref: forwardedRef
});
};
const ConnectedBorderControlDropdown = contextConnect(BorderControlDropdown, 'BorderControlDropdown');
export default ConnectedBorderControlDropdown;
//# sourceMappingURL=component.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,92 @@
/**
* WordPress dependencies
*/
import { useMemo } from '@wordpress/element';
/**
* Internal dependencies
*/
import * as styles from '../styles';
import { parseQuantityAndUnitFromRawValue } from '../../unit-control/utils';
import { useContextSystem } from '../../context';
import { useCx } from '../../utils/hooks/use-cx';
export function useBorderControlDropdown(props) {
const {
border,
className,
colors = [],
enableAlpha = false,
enableStyle = true,
onChange,
previousStyleSelection,
size = 'default',
__experimentalIsRenderedInSidebar = false,
...otherProps
} = useContextSystem(props, 'BorderControlDropdown');
const [widthValue] = parseQuantityAndUnitFromRawValue(border?.width);
const hasZeroWidth = widthValue === 0;
const onColorChange = color => {
const style = border?.style === 'none' ? previousStyleSelection : border?.style;
const width = hasZeroWidth && !!color ? '1px' : border?.width;
onChange({
color,
style,
width
});
};
const onStyleChange = style => {
const width = hasZeroWidth && !!style ? '1px' : border?.width;
onChange({
...border,
style,
width
});
};
const onReset = () => {
onChange({
...border,
color: undefined,
style: undefined
});
};
// Generate class names.
const cx = useCx();
const classes = useMemo(() => {
return cx(styles.borderControlDropdown, className);
}, [className, cx]);
const indicatorClassName = useMemo(() => {
return cx(styles.borderColorIndicator);
}, [cx]);
const indicatorWrapperClassName = useMemo(() => {
return cx(styles.colorIndicatorWrapper(border, size));
}, [border, cx, size]);
const popoverControlsClassName = useMemo(() => {
return cx(styles.borderControlPopoverControls);
}, [cx]);
const popoverContentClassName = useMemo(() => {
return cx(styles.borderControlPopoverContent);
}, [cx]);
const resetButtonClassName = useMemo(() => {
return cx(styles.resetButton);
}, [cx]);
return {
...otherProps,
border,
className: classes,
colors,
enableAlpha,
enableStyle,
indicatorClassName,
indicatorWrapperClassName,
onColorChange,
onStyleChange,
onReset,
popoverContentClassName,
popoverControlsClassName,
resetButtonClassName,
size,
__experimentalIsRenderedInSidebar
};
}
//# sourceMappingURL=hook.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
export { default } from './component';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["default"],"sources":["@wordpress/components/src/border-control/border-control-dropdown/index.ts"],"sourcesContent":["export { default } from './component';\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,aAAa"}

View File

@@ -0,0 +1,48 @@
import { createElement } from "react";
/**
* WordPress dependencies
*/
import { lineDashed, lineDotted, lineSolid } from '@wordpress/icons';
import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import { contextConnect } from '../../context';
import { ToggleGroupControl, ToggleGroupControlOptionIcon } from '../../toggle-group-control';
const BORDER_STYLES = [{
label: __('Solid'),
icon: lineSolid,
value: 'solid'
}, {
label: __('Dashed'),
icon: lineDashed,
value: 'dashed'
}, {
label: __('Dotted'),
icon: lineDotted,
value: 'dotted'
}];
function UnconnectedBorderControlStylePicker({
onChange,
...restProps
}, forwardedRef) {
return createElement(ToggleGroupControl, {
__nextHasNoMarginBottom: true,
__next40pxDefaultSize: true,
ref: forwardedRef,
isDeselectable: true,
onChange: value => {
onChange?.(value);
},
...restProps
}, BORDER_STYLES.map(borderStyle => createElement(ToggleGroupControlOptionIcon, {
key: borderStyle.value,
value: borderStyle.value,
icon: borderStyle.icon,
label: borderStyle.label
})));
}
const BorderControlStylePicker = contextConnect(UnconnectedBorderControlStylePicker, 'BorderControlStylePicker');
export default BorderControlStylePicker;
//# sourceMappingURL=component.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["lineDashed","lineDotted","lineSolid","__","contextConnect","ToggleGroupControl","ToggleGroupControlOptionIcon","BORDER_STYLES","label","icon","value","UnconnectedBorderControlStylePicker","onChange","restProps","forwardedRef","createElement","__nextHasNoMarginBottom","__next40pxDefaultSize","ref","isDeselectable","map","borderStyle","key","BorderControlStylePicker"],"sources":["@wordpress/components/src/border-control/border-control-style-picker/component.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { lineDashed, lineDotted, lineSolid } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect } from '../../context';\nimport type { StylePickerProps } from '../types';\nimport {\n\tToggleGroupControl,\n\tToggleGroupControlOptionIcon,\n} from '../../toggle-group-control';\n\nconst BORDER_STYLES = [\n\t{ label: __( 'Solid' ), icon: lineSolid, value: 'solid' },\n\t{ label: __( 'Dashed' ), icon: lineDashed, value: 'dashed' },\n\t{ label: __( 'Dotted' ), icon: lineDotted, value: 'dotted' },\n];\n\nfunction UnconnectedBorderControlStylePicker(\n\t{ onChange, ...restProps }: StylePickerProps,\n\tforwardedRef: React.ForwardedRef< any >\n) {\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\t__next40pxDefaultSize\n\t\t\tref={ forwardedRef }\n\t\t\tisDeselectable\n\t\t\tonChange={ ( value ) => {\n\t\t\t\tonChange?.( value as string | undefined );\n\t\t\t} }\n\t\t\t{ ...restProps }\n\t\t>\n\t\t\t{ BORDER_STYLES.map( ( borderStyle ) => (\n\t\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\t\tkey={ borderStyle.value }\n\t\t\t\t\tvalue={ borderStyle.value }\n\t\t\t\t\ticon={ borderStyle.icon }\n\t\t\t\t\tlabel={ borderStyle.label }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</ToggleGroupControl>\n\t);\n}\n\nconst BorderControlStylePicker = contextConnect(\n\tUnconnectedBorderControlStylePicker,\n\t'BorderControlStylePicker'\n);\n\nexport default BorderControlStylePicker;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,UAAU,EAAEC,UAAU,EAAEC,SAAS,QAAQ,kBAAkB;AACpE,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,cAAc,QAAQ,eAAe;AAE9C,SACCC,kBAAkB,EAClBC,4BAA4B,QACtB,4BAA4B;AAEnC,MAAMC,aAAa,GAAG,CACrB;EAAEC,KAAK,EAAEL,EAAE,CAAE,OAAQ,CAAC;EAAEM,IAAI,EAAEP,SAAS;EAAEQ,KAAK,EAAE;AAAQ,CAAC,EACzD;EAAEF,KAAK,EAAEL,EAAE,CAAE,QAAS,CAAC;EAAEM,IAAI,EAAET,UAAU;EAAEU,KAAK,EAAE;AAAS,CAAC,EAC5D;EAAEF,KAAK,EAAEL,EAAE,CAAE,QAAS,CAAC;EAAEM,IAAI,EAAER,UAAU;EAAES,KAAK,EAAE;AAAS,CAAC,CAC5D;AAED,SAASC,mCAAmCA,CAC3C;EAAEC,QAAQ;EAAE,GAAGC;AAA4B,CAAC,EAC5CC,YAAuC,EACtC;EACD,OACCC,aAAA,CAACV,kBAAkB;IAClBW,uBAAuB;IACvBC,qBAAqB;IACrBC,GAAG,EAAGJ,YAAc;IACpBK,cAAc;IACdP,QAAQ,EAAKF,KAAK,IAAM;MACvBE,QAAQ,GAAIF,KAA4B,CAAC;IAC1C,CAAG;IAAA,GACEG;EAAS,GAEZN,aAAa,CAACa,GAAG,CAAIC,WAAW,IACjCN,aAAA,CAACT,4BAA4B;IAC5BgB,GAAG,EAAGD,WAAW,CAACX,KAAO;IACzBA,KAAK,EAAGW,WAAW,CAACX,KAAO;IAC3BD,IAAI,EAAGY,WAAW,CAACZ,IAAM;IACzBD,KAAK,EAAGa,WAAW,CAACb;EAAO,CAC3B,CACA,CACiB,CAAC;AAEvB;AAEA,MAAMe,wBAAwB,GAAGnB,cAAc,CAC9CO,mCAAmC,EACnC,0BACD,CAAC;AAED,eAAeY,wBAAwB"}

View File

@@ -0,0 +1,2 @@
export { default } from './component';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["default"],"sources":["@wordpress/components/src/border-control/border-control-style-picker/index.ts"],"sourcesContent":["export { default } from './component';\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,aAAa"}

View File

@@ -0,0 +1,148 @@
import { createElement } from "react";
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import BorderControlDropdown from '../border-control-dropdown';
import UnitControl from '../../unit-control';
import RangeControl from '../../range-control';
import { HStack } from '../../h-stack';
import { StyledLabel } from '../../base-control/styles/base-control-styles';
import { View } from '../../view';
import { VisuallyHidden } from '../../visually-hidden';
import { contextConnect } from '../../context';
import { useBorderControl } from './hook';
const BorderLabel = props => {
const {
label,
hideLabelFromVision
} = props;
if (!label) {
return null;
}
return hideLabelFromVision ? createElement(VisuallyHidden, {
as: "legend"
}, label) : createElement(StyledLabel, {
as: "legend"
}, label);
};
const UnconnectedBorderControl = (props, forwardedRef) => {
const {
__next40pxDefaultSize = false,
colors,
disableCustomColors,
disableUnits,
enableAlpha,
enableStyle,
hideLabelFromVision,
innerWrapperClassName,
inputWidth,
isStyleSettable,
label,
onBorderChange,
onSliderChange,
onWidthChange,
placeholder,
__unstablePopoverProps,
previousStyleSelection,
showDropdownHeader,
size,
sliderClassName,
value: border,
widthUnit,
widthValue,
withSlider,
__experimentalIsRenderedInSidebar,
...otherProps
} = useBorderControl(props);
return createElement(View, {
as: "fieldset",
...otherProps,
ref: forwardedRef
}, createElement(BorderLabel, {
label: label,
hideLabelFromVision: hideLabelFromVision
}), createElement(HStack, {
spacing: 4,
className: innerWrapperClassName
}, createElement(UnitControl, {
prefix: createElement(BorderControlDropdown, {
border: border,
colors: colors,
__unstablePopoverProps: __unstablePopoverProps,
disableCustomColors: disableCustomColors,
enableAlpha: enableAlpha,
enableStyle: enableStyle,
isStyleSettable: isStyleSettable,
onChange: onBorderChange,
previousStyleSelection: previousStyleSelection,
showDropdownHeader: showDropdownHeader,
__experimentalIsRenderedInSidebar: __experimentalIsRenderedInSidebar,
size: size
}),
label: __('Border width'),
hideLabelFromVision: true,
min: 0,
onChange: onWidthChange,
value: border?.width || '',
placeholder: placeholder,
disableUnits: disableUnits,
__unstableInputWidth: inputWidth,
size: size
}), withSlider && createElement(RangeControl, {
__nextHasNoMarginBottom: true,
label: __('Border width'),
hideLabelFromVision: true,
className: sliderClassName,
initialPosition: 0,
max: 100,
min: 0,
onChange: onSliderChange,
step: ['px', '%'].includes(widthUnit) ? 1 : 0.1,
value: widthValue || undefined,
withInputField: false,
__next40pxDefaultSize: __next40pxDefaultSize
})));
};
/**
* The `BorderControl` brings together internal sub-components which allow users to
* set the various properties of a border. The first sub-component, a
* `BorderDropdown` contains options representing border color and style. The
* border width is controlled via a `UnitControl` and an optional `RangeControl`.
*
* Border radius is not covered by this control as it may be desired separate to
* color, style, and width. For example, the border radius may be absorbed under
* a "shape" abstraction.
*
* ```jsx
* import { __experimentalBorderControl as BorderControl } from '@wordpress/components';
* import { __ } from '@wordpress/i18n';
*
* const colors = [
* { name: 'Blue 20', color: '#72aee6' },
* // ...
* ];
*
* const MyBorderControl = () => {
* const [ border, setBorder ] = useState();
* const onChange = ( newBorder ) => setBorder( newBorder );
*
* return (
* <BorderControl
* colors={ colors }
* label={ __( 'Border' ) }
* onChange={ onChange }
* value={ border }
* />
* );
* };
* ```
*/
export const BorderControl = contextConnect(UnconnectedBorderControl, 'BorderControl');
export default BorderControl;
//# sourceMappingURL=component.js.map

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More