diff --git a/.circleci/comment.js b/.circleci/comment.js index 696139ddd7b..36f7221444b 100644 --- a/.circleci/comment.js +++ b/.circleci/comment.js @@ -57,7 +57,8 @@ async function run() { [Publish stats](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/publish-stats/publish.json) [Size diff since last release](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/publish-stats/size-diff.txt) [Docs](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/docs/index.html) - [Storybook](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook/index.html)` + [Storybook](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook/index.html) + [S2 Storybook](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook-s2/index.html)` }); } } catch (error) { @@ -79,6 +80,7 @@ async function run() { * [View the storybook-19](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook-19/index.html) * [View the storybook-17](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook-17/index.html) * [View the storybook-16](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook-16/index.html) + * [View the S2 storybook](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook-s2/index.html) * [View the documentation](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/docs/index.html)` }); } catch (err) { diff --git a/.circleci/config.yml b/.circleci/config.yml index 241354253b8..54de1f353f3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -288,7 +288,6 @@ jobs: name: test command: | make build - yarn workspaces foreach --all -pt run prepublishOnly node --loader ./scripts/esm-support/loader.mjs ./scripts/esm-support/testESM.mjs lint: @@ -423,6 +422,21 @@ jobs: paths: - '*/storybook-19/' + storybook-s2: + executor: rsp-large + steps: + - restore_cache: + key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} + + - run: + name: build s2 storybook + command: yarn build:storybook-s2 + + - persist_to_workspace: + root: dist + paths: + - '*/storybook-s2/' + docs: executor: rsp-xlarge steps: @@ -609,6 +623,9 @@ workflows: - storybook-19: requires: - install-19 + - storybook-s2: + requires: + - install - docs: requires: - install @@ -632,6 +649,7 @@ workflows: - storybook-16 - storybook-17 - storybook-19 + - storybook-s2 - docs - deploy-verdaccio: requires: diff --git a/.eslintignore b/.eslintignore index cb8de1b8759..ab08baca57b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -16,3 +16,4 @@ packages/dev/storybook-builder-parcel/preview.js packages/dev/optimize-locales-plugin/LocalesPlugin.d.ts examples/** starters/** +packages/@react-spectrum/s2/icon.d.ts diff --git a/.eslintrc.js b/.eslintrc.js index 1e5df7aafad..d6fce72a85b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -97,6 +97,12 @@ module.exports = { } ] } + }, + { + files: ['packages/@react-spectrum/s2/**'], + rules: { + 'react/react-in-jsx-scope': OFF + } }], env: { 'browser': true, diff --git a/.parcelrc-build b/.parcelrc-build index cdb627010eb..bc269b7ac3a 100644 --- a/.parcelrc-build +++ b/.parcelrc-build @@ -3,13 +3,17 @@ "resolvers": ["@parcel/resolver-glob", "parcel-resolver-build", "..."], "bundler": "@parcel/bundler-library", "transformers": { + "style-types:*.ts": ["@parcel/transformer-typescript-types"], "packages/**/intl/*.json": ["parcel-transformer-intl"], "bundle-text:*.svg": ["@parcel/transformer-svg", "@parcel/transformer-inline-string"], + "packages/@react-spectrum/s2/s2wf-icons/*.svg": ["parcel-transformer-icon"], + // Disable PostCSS from running over style macro output + "packages/@react-spectrum/s2/**/*.css": ["@parcel/transformer-css"], "*.svg": ["@parcel/transformer-svg-react"], "*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}": [ "@parcel/transformer-js", "@parcel/transformer-react-refresh-wrap" ] }, - "namers": ["parcel-namer-intl", "..."] + "namers": ["parcel-namer-icon", "parcel-namer-intl", "..."] } diff --git a/.storybook-s2/.parcelrc b/.storybook-s2/.parcelrc new file mode 100644 index 00000000000..f20d4c80269 --- /dev/null +++ b/.storybook-s2/.parcelrc @@ -0,0 +1,18 @@ +{ + "extends": "@parcel/config-default", + "resolvers": ["@parcel/resolver-glob", "parcel-resolver-storybook", "..."], + "transformers": { + "packages/@react-spectrum/s2/{src,stories}/*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}": ["parcel-transformer-react-docgen-typescript", "..."], + "packages/@react-spectrum/s2/s2wf-icons/*.svg": ["parcel-transformer-icon"], + "packages/*/*/intl/*.json": ["parcel-transformer-intl"], + // Disable PostCSS from running over style macro output + "*.css": ["@parcel/transformer-css"], + "*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}": [ + "@parcel/transformer-js", + "@parcel/transformer-react-refresh-wrap" + ], + "*.svg": ["@parcel/transformer-svg-react"], + "*.{mdx,md}": ["parcel-transformer-mdx-storybook"], + "raw:*": ["@parcel/transformer-raw"] + } +} diff --git a/.storybook-s2/docs/Icons.jsx b/.storybook-s2/docs/Icons.jsx new file mode 100644 index 00000000000..d1c6dc7019f --- /dev/null +++ b/.storybook-s2/docs/Icons.jsx @@ -0,0 +1,35 @@ +import icons from '@react-spectrum/s2/s2wf-icons/*.svg'; +import { style } from '../../packages/@react-spectrum/s2/style/spectrum-theme' with {type: 'macro'}; +import {ActionButton, Text} from '@react-spectrum/s2'; +import {P, Code, Pre} from './typography'; +import {highlight} from './highlight' with {type: 'macro'}; + +export function Icons() { + return ( +
+
+

+ Workflow icons +

+

Spectrum 2 offers a subset of the icons currently available in React Spectrum v3. These icons can be imported from @react-spectrum/s2/icons.

+
{highlight("import Add from '@react-spectrum/s2/icons/Add';")}
+

See below for a full list of available icons. Click to copy import statement.

+
+ {Object.keys(icons).map(icon => { + let Icon = icons[icon].default; + let name = icon.replace(/^S2_Icon_(.*?)_2.*/, '$1'); + let importName = name.replace(/^(\d)/, '_$1'); + return ( + navigator.clipboard.writeText(`import ${importName} from '@react-spectrum/s2/icons/${name}';`)}> + + {name} + + ); + })} +
+
+
+ ); +} diff --git a/.storybook-s2/docs/Intro.jsx b/.storybook-s2/docs/Intro.jsx new file mode 100644 index 00000000000..6e94c202e3f --- /dev/null +++ b/.storybook-s2/docs/Intro.jsx @@ -0,0 +1,269 @@ +import { style } from '../../packages/@react-spectrum/s2/style/spectrum-theme' with {type: 'macro'}; +import {Button, LinkButton, ButtonGroup, Checkbox, Content, Dialog, DialogTrigger, Footer, Header, Heading, Image, InlineAlert, Menu, MenuItem, MenuSection, MenuTrigger, SubmenuTrigger, Switch, Link, Text} from '@react-spectrum/s2'; +import NewIcon from '@react-spectrum/s2/s2wf-icons/S2_Icon_New_20_N.svg'; +import ImgIcon from '@react-spectrum/s2/s2wf-icons/S2_Icon_Image_20_N.svg'; +import CopyIcon from '@react-spectrum/s2/s2wf-icons/S2_Icon_Copy_20_N.svg'; +import CommentTextIcon from '@react-spectrum/s2/s2wf-icons/S2_Icon_CommentText_20_N.svg'; +import ClockPendingIcon from '@react-spectrum/s2/s2wf-icons/S2_Icon_ClockPending_20_N.svg'; +import CommunityIcon from '@react-spectrum/s2/s2wf-icons/S2_Icon_Community_20_N.svg'; +import DeviceTabletIcon from '@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceTablet_20_N.svg'; +import DeviceDesktopIcon from '@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceDesktop_20_N.svg'; +import {highlight} from './highlight' with {type: 'macro'}; +import {H2, H3, H4, P, Pre, Code} from './typography'; + +export function Docs() { + return ( +
+
+

+ Spectrum 2 in React Spectrum +

+
+
+

Introducing Spectrum 2 – a new update to Adobe's design system, now in pre-release! Designed to support our growing suite of products, Spectrum 2 aims to work seamlessly across experiences by balancing personality and function.

+

The React Spectrum team has been hard at work to bring the Spectrum 2 design to our components. Spectrum 2 in React Spectrum is built on React Aria Components and a new styling foundation powered by Spectrum Tokens. This gives you access to Spectrum design fundamentals such as colors, spacing, sizing, and typography in your own applications and custom components. Spectrum 2 also brings new features such as t-shirt sizing, improved form layout, dynamic new press interactions, and more.

+

Check out the new Button design, with fresh new colors and icons, a fun new press scaling interaction, and support for t-shirt sizes.

+ + + + + +

Spectrum 2 switches have a more accessible design, with a solid border and new animations.

+ + Wi-Fi + +

Dialogs have a refreshed design with more pronounced rounding, and improved layout.

+ + + + + {({close}) => ( + <> + + Dialog title +
Header
+ +

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in

+
+
Don't show this again
+ + + + + + )} +
+
+
+

Menus received a major design update, with new styles for sections, links, selection, focus rings, and submenus.

+ + + + + +
+ Publish and export + Social media, other formats +
+ + + Quick Export + Share a low-res snapshot. + + + + + Open a copy + Illustrator for iPad or desktop + + + +
+ Open a copy in +
+ + + Illustrator for iPad + + + + Illustrator for desktop + +
+
+
+
+ +
+ Menu section header + Menu section description +
+ + + Share link + Enable comments and downloads + + + + Preview Timelapse + + + + Livestream + Start streaming + +
+
+
+
+

Getting started

+

Installation

+

Spectrum 2 in React Spectrum can be installed from npm:

+
yarn add @react-spectrum/s2
+

Configuring your bundler

+

React Spectrum supports styling via macros, a new bundler feature that enables functions to run at build time. Currently, Parcel v2.12.0 and newer supports macros out of the box. When using other build tools, you can install a plugin to enable them.

+

See below to learn more about using the React Spectrum style macro.

+

Webpack, Next.js, Vite, Rollup, or ESBuild

+

First, install unplugin-parcel-macros using your package manager:

+
yarn add unplugin-parcel-macros --dev
+

Then, configure your bundler according to the steps documented in the readme. Note that plugin order is important: unplugin-parcel-macros must run before other plugins like Babel.

+

You may also need to configure other tools such as TypeScript, Babel, ESLint, and Jest to support parsing import attributes. See these docs for details.

+

See the examples folder in our repo for working setups with various build tools.

+

Setting up your app

+

Unlike React Spectrum v3, a Provider is not required. Instead, import @react-spectrum/s2/page.css in the entry component of your app to apply the background color and color scheme to the {''} element. This ensures that the entire page has the proper styles even before your JavaScript runs.

+
{highlight(`import '@react-spectrum/s2/page.css';
+import {Button} from '@react-spectrum/s2';
+
+function App() {
+  return (
+    
+  );
+}`)}
+ + + +

Note: If you’re embedding Spectrum 2 as a section of a larger page rather than taking over the whole window, follow the directions below instead of using page.css.

+

Overriding the color scheme

+

By default, the page follows the user’s operating system color scheme setting, supporting both light and dark mode. The page background is set to the base Spectrum background layer by default. This can be configured by setting the data-color-scheme and data-background attributes on the {''} element. For example, to force the application to only render in light mode, set data-color-scheme="light".

+
{highlight(`
+  
+`)}
+

Overriding the locale

+

By default, React Spectrum uses the browser/operating system language setting for localized strings, date and number formatting, and to determine the layout direction (left-to-right or right-to-left). This can be overridden by rendering a {''} component at the root of your app, and setting the locale prop.

+
{highlight(`import {Provider} from '@react-spectrum/s2';
+
+  {/* your app */}
+`)}
+

Embedded sections

+

If you’re building an embedded section of a larger page using Spectrum 2, use the {''} component to set the background instead of importing page.css. The background prop should be set to the Spectrum background layer appropriate for your app, and the colorScheme can be overridden as well.

+
{highlight(`import {Provider} from '@react-spectrum/s2';
+
+  {/* your app */}
+`)}
+

Styling

+

React Spectrum v3 supported a limited set of style props for layout and positioning using Spectrum-defined values. In Spectrum 2, we’re improving on this by offering a much more flexible style macro. This offers additional Spectrum tokens, improves performance by generating CSS at build time rather than runtime, and works with any DOM element for use in custom components.

+

Macros are a new bundler feature that enable functions to run at build time. The React Spectrum style macro uses this to generate CSS that can be applied to any DOM element or component. Import the style macro using the with {`{type: 'macro'}`} import attribute, and pass the result to the styles prop of any React Spectrum component to provide it with styles.

+
{highlight(`import {style} from '@react-spectrum/s2/style' with {type: 'macro'};
+import {ActionButton} from '@react-spectrum/s2';
+
+
+  Edit
+`)}
+

The styles prop accepts a limited set of CSS properties, including layout, spacing, sizing, and positioning. Other styles such as colors and internal padding cannot be customized within Spectrum components.

+ + Learn more about styling + See the full docs to learn about using the style macro to build custom components. + +

Supported CSS properties on Spectrum components

+ +

UNSAFE Style Overrides

+

We highly discourage overriding the styles of React Spectrum components because it may break at any time when we change our implementation, making it difficult for you to update in the future. Consider using React Aria Components with our style macro to build a custom component with Spectrum styles instead.

+

That said, just like in React Spectrum v3, the UNSAFE_className and UNSAFE_style props are supported on Spectrum 2 components as last-resort escape hatches. However, unlike in v3, UNSAFE_classNames must be placed in a special UNSAFE_overrides CSS cascade layer. This guarentees that your overrides will always win over other styles on the page, no matter the order or specificity of the selector.

+
{highlight(`/* YourComponent.tsx */
+import {Button} from '@react-spectrum/s2';
+import './YourComponent.css';
+
+function YourComponent() {
+  return ;
+}`)}
+
{highlight(`/* YourComponent.css */
+@layer UNSAFE_overrides {
+  /* Wrap all UNSAFE_className rules in this layer. */
+  .your-unsafe-class {
+    background: red;
+  }
+}`, 'CSS')}
+
+
+ ) +} + +function Example({children}) { + return ( +
+ {children} +
+ ); +} diff --git a/.storybook-s2/docs/Intro.mdx b/.storybook-s2/docs/Intro.mdx new file mode 100644 index 00000000000..fd03e950979 --- /dev/null +++ b/.storybook-s2/docs/Intro.mdx @@ -0,0 +1,3 @@ +import {Docs} from './Intro.jsx'; + + diff --git a/.storybook-s2/docs/Style Macro.mdx b/.storybook-s2/docs/Style Macro.mdx new file mode 100644 index 00000000000..39b171db10a --- /dev/null +++ b/.storybook-s2/docs/Style Macro.mdx @@ -0,0 +1,3 @@ +import {StyleMacro} from './StyleMacro.jsx'; + + diff --git a/.storybook-s2/docs/StyleMacro.jsx b/.storybook-s2/docs/StyleMacro.jsx new file mode 100644 index 00000000000..31a3e33fc10 --- /dev/null +++ b/.storybook-s2/docs/StyleMacro.jsx @@ -0,0 +1,132 @@ +import { style } from '../../packages/@react-spectrum/s2/style/spectrum-theme' with {type: 'macro'}; +import {Link, LinkButton} from '@react-spectrum/s2'; +import {highlight} from './highlight' with {type: 'macro'}; +import {H2, H3, H3, P, Pre, Code} from './typography'; + +export function StyleMacro() { + return ( +
+
+

+ Style Macro +

+
+
+

The React Spectrum style macro generates atomic CSS at build time, which can be applied to any DOM element or Spectrum component. Style properties use Spectrum tokens such as colors, spacing, sizing, and typography, helping you work more quickly with TypeScript autocomplete, reduce the design choices you need to make, and improve consistency between Adobe applications.

+
{highlight(`import {style} from '@react-spectrum/s2/style' with {type: 'macro'};
+
+
+ {/* ... */} +
`)}
+

Atomic CSS scales as your application grows because it outputs a separate rule for each CSS property you write, ensuring there is no duplication across your whole app. The above example generates two CSS rules:

+
{highlight(`.bJ { background-color: #ffbcb4 }
+.ac { color: #fff }`, 'CSS')}
+

These rules are reused across your app wherever the same values are used, which keeps your bundle size small even as you add features. In addition, you only pay for the values you use – there’s no unnecessary CSS custom properties for colors and other tokens that aren’t used.

+

The style macro colocates your styles with your component code, rather than in separate CSS files. Colocation enables you to:

+
    +
  • Develop more efficiently – No need to switch between multiple files when working on a component, or spend time writing CSS selectors.
  • +
  • Refactor with confidence – Changing the styles in a component is guaranteed to never unintentionally affect any other parts of your application. When you delete a component, the corresponding styles are also removed, reducing technical debt.
  • +
+

Values

+

The style macro supports a constrained set of values for each CSS property, which conform to the Spectrum design system. For example, the backgroundColor property supports Spectrum colors, and does not allow arbitrary hex or rgb values by default. This helps make it easier to build consistent UIs that are maintainable over time.

+

Colors

+

The Spectrum 2 color palette is available across all color properties. The backgroundColor property also supports Spectrum’s background layers. In addition, semantic colors such as accent and negative are available across all properties, and automatically update according to states such as isHovered (see runtime conditions below).

+

Spacing and sizing

+

Spacing properties such as margin and padding, and sizing properties such as width and height support a limited set of values. The API is represented in pixels, however, only values conforming to a 4px grid are allowed. This helps ensure that spacing and sizing are visually consistent.

+

Internally, spacing and sizing values are converted from pixels to rems, which scale according to the user’s font size preference. In addition, sizing values are multiplied by 1.25x on touch screen devices to help increase the size of hit targets. Spacing values do not scale and remain fixed.

+

Conditional styles

+

The style macro also supports conditional styles, such as media queries, UI states such as hover and press, and component variants. Conditional values are defined as an object where each key is a condition. This keeps all values for each property together in one place so it is easy to see where overrides are coming from.

+

This example sets the padding of a div to 8px by default, and 32px at the large media query breakpoint (1024px) defined by Spectrum.

+
{highlight(`
`)}
+

Conditions are mutually exclusive, following object property order. The style macro uses CSS cascade layers to ensure that there are no specificity issues to worry about. The last matching condition always wins.

+

Runtime conditions

+

The style macro also supports conditions that are resolved in JavaScript at runtime, such as variant props and UI states. When a runtime condition is detected, the style macro returns a function that can be called at runtime to determine which styles to apply.

+

Runtime conditions can be named however you like, and values are defined as an object. This example changes the background color depending on a variant prop:

+
{highlight(`let styles = style({
+  backgroundColor: {
+    variant: {
+      primary: 'accent',
+      secondary: 'neutral'
+    }
+  }
+});
+function MyComponent({variant}) {
+  return 
+}`)}
+

Boolean conditions starting with is do not need to be nested in an object:

+
{highlight(`let styles = style({
+  backgroundColor: {
+    default: 'gray-100',
+    isSelected: 'gray-900'
+  }
+});
+
`)}
+

Runtime conditions also work well with the render props in React Aria Components. If you define your styles inline, you’ll even get autocomplete for all of the available conditions.

+
{highlight(`import {Checkbox} from 'react-aria-components';
+`)}
+

Nesting conditions

+

Conditions can be nested to apply styles when multiple conditions are true. Keep in mind that conditions at the same level are mutually exclusive, with the last matching condition winning. Since only one value can apply at a time, there are no specificity issues to worry about.

+
{highlight(`let styles = style({
+  backgroundColor: {
+    default: 'gray-25',
+    isSelected: {
+      default: 'neutral',
+      isEmphasized: 'accent',
+      forcedColors: 'Highlight',
+      isDisabled: {
+        default: 'gray-400',
+        forcedColors: 'GrayText'
+      }
+    }
+  }
+});
+
`)}
+

The above example has three runtime conditions (isSelected, isEmphasized, and isDisabled), and uses the forcedColors condition to apply styles for Windows High Contrast Mode (WHCM). The order of precedence follows the order the conditions are defined in the object, with the isSelected + isDisabled + forcedColors state having the highest priority.

+

Reusing styles

+

Styles can be reused by extracting common properties into objects, and spreading them into style calls. These must either be constants (declared with const) in the same file, or imported from another file as a macro ({"with {type: 'macro'}"}). Properties can be overridden just like normal JS objects – the last value always wins.

+
{highlight(`const horizontalStack = {
+  display: 'flex',
+  alignItems: 'center',
+  columnGap: 8
+};
+const styles = style({
+  ...horizontalStack,
+  columnGap: 4
+});`)}
+

You can also create custom utilities by defining your own macros. These are normal functions so you can do whatever computations you like to generate styles.

+
{highlight(`// style-utils.ts
+export function horizontalStack(gap: number) {
+  return {
+    display: 'flex',
+    alignItems: 'center',
+    columnGap: gap
+  };
+}`)}
+

Then, import your macro and use it in a component.

+
{highlight(`// component.tsx
+import {horizontalStack} from './style-utils' with {type: 'macro'};
+const styles = style({
+  ...horizontalStack(4),
+  backgroundColor: 'base'
+});`)}
+
+
+ ) +} diff --git a/.storybook-s2/docs/Workflow Icons.mdx b/.storybook-s2/docs/Workflow Icons.mdx new file mode 100644 index 00000000000..8703f29b549 --- /dev/null +++ b/.storybook-s2/docs/Workflow Icons.mdx @@ -0,0 +1,3 @@ +import {Icons} from './Icons.jsx'; + + diff --git a/.storybook-s2/docs/highlight.js b/.storybook-s2/docs/highlight.js new file mode 100644 index 00000000000..c74f3c33671 --- /dev/null +++ b/.storybook-s2/docs/highlight.js @@ -0,0 +1,38 @@ +const treeSitter = require('tree-sitter-highlight'); +const tokens = require('@adobe/spectrum-tokens/dist/json/variables.json'); + +function colorToken(name) { + let token = tokens[name]; + return `light-dark(${token.sets.light.value}, ${token.sets.dark.value})`; +} + +exports.highlight = function(code, lang = 'JSX') { + this.addAsset({ + type: 'css', + content: ` +.keyword { + color: ${colorToken('magenta-1000')} +} +.string { + color: ${colorToken('green-1000')} +} +.number { + color: ${colorToken('pink-1000')} +} +.property, .attribute { + color: ${colorToken('indigo-1000')} +} +.function, .tag, .constructor { + color: ${colorToken('red-1000')} +} +.comment { + color: ${colorToken('gray-700')} +} +.variable { + color: ${colorToken('fuchsia-1000')} +} +` + }); + + return treeSitter.highlight(code, treeSitter.Language[lang]); +} diff --git a/.storybook-s2/docs/typography.js b/.storybook-s2/docs/typography.js new file mode 100644 index 00000000000..8ec984c32e2 --- /dev/null +++ b/.storybook-s2/docs/typography.js @@ -0,0 +1,37 @@ +import { style } from '../../packages/@react-spectrum/s2/style/spectrum-theme' with {type: 'macro'}; +import {Link} from '@react-spectrum/s2'; + +export function H2({children}) { + let id = anchorId(children); + return

{children}

+} + +export function H3({children}) { + let id = anchorId(children); + return

{children}

+} + +export function H4({children}) { + let id = anchorId(children); + return

{children}

+} + +export function P({children}) { + return

{children}

+} + +export function Code({children}) { + return {children}; +} + +export function Pre({children}) { + return ( +
+      
+    
+ ); +} + +function anchorId(children) { + return children.replace(/\s/g, '-').replace(/[^a-zA-Z0-9-_]/g, '').toLowerCase(); +} diff --git a/.storybook-s2/docs/wallpaper_collaborative_S2_desktop.webp b/.storybook-s2/docs/wallpaper_collaborative_S2_desktop.webp new file mode 100644 index 00000000000..14a94ca9b04 Binary files /dev/null and b/.storybook-s2/docs/wallpaper_collaborative_S2_desktop.webp differ diff --git a/.storybook-s2/global.css b/.storybook-s2/global.css new file mode 100644 index 00000000000..a53cb262002 --- /dev/null +++ b/.storybook-s2/global.css @@ -0,0 +1,3 @@ + .sbdocs-preview { + isolation: isolate; + } \ No newline at end of file diff --git a/.storybook-s2/logo-dark.svg b/.storybook-s2/logo-dark.svg new file mode 100644 index 00000000000..5eabb925e97 --- /dev/null +++ b/.storybook-s2/logo-dark.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/.storybook-s2/logo.svg b/.storybook-s2/logo.svg new file mode 100644 index 00000000000..614d1aa2807 --- /dev/null +++ b/.storybook-s2/logo.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/.storybook-s2/main.ts b/.storybook-s2/main.ts new file mode 100644 index 00000000000..1ce3a845997 --- /dev/null +++ b/.storybook-s2/main.ts @@ -0,0 +1,46 @@ +import type { StorybookConfig } from "@storybook/types"; + +// const excludedProps = new Set([ +// 'id', +// 'slot', +// 'onCopy', +// 'onCut', +// 'onPaste', +// 'onCompositionStart', +// 'onCompositionEnd', +// 'onCompositionUpdate', +// 'onSelect', +// 'onBeforeInput', +// 'onInput' +// ]); + +const config: StorybookConfig = { + stories: [ + './docs/*.mdx', + "../packages/@react-spectrum/s2/stories/*.stories.@(js|jsx|mjs|ts|tsx)", + ], + addons: [ + "@storybook/addon-links", + "@storybook/addon-essentials", + "@storybook/addon-interactions", + // "@storybook/addon-styling-webpack", + "storybook-dark-mode" + ], + framework: { + name: "storybook-react-parcel", + options: {}, + } + // typescript: { + // reactDocgen: 'react-docgen-typescript', + // reactDocgenTypescriptOptions: { + // tsconfigPath: '../tsconfig.json', + // shouldExtractLiteralValuesFromEnum: true, + // compilerOptions: { + // allowSyntheticDefaultImports: false, + // esModuleInterop: false, + // }, + // propFilter: (prop) => !prop.name.startsWith('aria-') && !excludedProps.has(prop.name), + // }, + // }, +}; +export default config; diff --git a/.storybook-s2/manager-head.html b/.storybook-s2/manager-head.html new file mode 100644 index 00000000000..0cacfd94aab --- /dev/null +++ b/.storybook-s2/manager-head.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/.storybook-s2/preview-head.html b/.storybook-s2/preview-head.html new file mode 100644 index 00000000000..3901b66fd7c --- /dev/null +++ b/.storybook-s2/preview-head.html @@ -0,0 +1,24 @@ + + + diff --git a/.storybook-s2/preview.tsx b/.storybook-s2/preview.tsx new file mode 100644 index 00000000000..09ca460420b --- /dev/null +++ b/.storybook-s2/preview.tsx @@ -0,0 +1,100 @@ +import '@react-spectrum/s2/src/page'; +import { themes } from '@storybook/theming'; +import { DARK_MODE_EVENT_NAME } from 'storybook-dark-mode'; +import { store } from 'storybook-dark-mode/dist/esm/Tool'; +import { addons } from '@storybook/preview-api'; +import { DocsContainer } from '@storybook/addon-docs'; +import React, { useEffect, useState } from 'react'; +import './global.css'; + +const channel = addons.getChannel(); +document.documentElement.dataset.colorScheme = store().current === 'dark' ? 'dark' : 'light'; +channel.on(DARK_MODE_EVENT_NAME, isDark => document.documentElement.dataset.colorScheme = isDark ? 'dark' : 'light'); + +/** @type { import('@storybook/react').Preview } */ +const preview = { + parameters: { + actions: { argTypesRegex: "^on[A-Z].*" }, + controls: { + matchers: {}, + exclude: ['key', 'ref'] + }, + docs: { + container: (props) => { + let [dark, setDark] = useState(store().current === 'dark'); + useEffect(() => { + channel.on(DARK_MODE_EVENT_NAME, setDark); + return () => channel.removeListener(DARK_MODE_EVENT_NAME, setDark); + }, []); + return ; + }, + source: { + // code: null, // Will disable code button, and show "No code available" + transform: (code: string) => { + // Replace any <_ with < + code = code.replace(/<\s?_/g, '<'); + // Replace any with + code = code.replace(/<([a-z])\s?\/>/g, ''); + // Replace with + code = code.replace(//g, ''); + // Move any lines with just a > to the previous line + code = code.replace(/\n\s*>/g, '>'); + return code; + } + } + }, + darkMode: { + light: { + ...themes.light, + brandTitle: 'React Spectrum - Spectrum 2 Preview', + brandImage: new URL('raw:logo.svg', import.meta.url).toString() + }, + dark: { + ...themes.dark, + brandTitle: 'React Spectrum - Spectrum 2 Preview', + brandImage: new URL('raw:logo-dark.svg', import.meta.url).toString() + } + } + }, + argTypes: { + styles: { + table: {category: 'Styles'}, + control: {disable: true}, + }, + UNSAFE_className: { + table: {category: 'Styles'}, + control: {disable: true}, + }, + UNSAFE_style: { + table: {category: 'Styles'}, + control: {disable: true}, + } + } +}; + +export const parameters = { + options: { + storySort: (a: any, b: any) => a[1].kind === b[1].kind ? 0 : a[1].id.localeCompare(b[1].id, undefined, { numeric: true }), + }, + a11y: { + config: { + rules: [ + { + id: 'aria-hidden-focus', + selector: 'body *:not([data-a11y-ignore="aria-hidden-focus"])', + } + ] + } + }, + layout: 'fullscreen', +}; + +export default preview; diff --git a/.storybook/main.js b/.storybook/main.js index e5706910e2a..95b64e2cdbb 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -1,6 +1,10 @@ module.exports = { - stories: ['../packages/**/stories/*.stories.{js,jsx,ts,tsx}'], + stories: [ + '../packages/@{react-aria,react-stately,spectrum-icons}/*/stories/*.stories.{js,jsx,ts,tsx}', + '../packages/@react-spectrum/!(s2)/stories/*.stories.{js,jsx,ts,tsx}', + '../packages/react-aria-components/stories/*.stories.{js,jsx,ts,tsx}' + ], addons: [ "@storybook/addon-actions", diff --git a/Makefile b/Makefile index 5ae053faac8..499671a3942 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,7 @@ clean_dist: rm -rf packages/{react-aria,react-aria-components,react-stately}/i18n rm -rf packages/@adobe/react-spectrum/i18n rm -rf packages/@react-aria/i18n/server + rm -rf packages/@react-spectrum/s2/style/dist packages/@react-spectrum/s2/page.css packages/@react-spectrum/s2/icons clean_parcel: rm -rf .parcel-cache @@ -116,6 +117,7 @@ website-production: cp packages/dev/docs/pages/robots.txt dist/production/docs/robots.txt $(MAKE) starter-zip $(MAKE) tailwind-starter + $(MAKE) s2-docs check-examples: node scripts/extractExamples.mjs @@ -139,3 +141,10 @@ tailwind-starter: mv starters/tailwind/react-aria-tailwind-starter.zip dist/production/docs/react-aria-tailwind-starter.$$(git rev-parse --short HEAD).zip cd starters/tailwind && yarn build-storybook mv starters/tailwind/storybook-static dist/production/docs/react-aria-tailwind-starter + +s2-docs: + yarn build:s2-docs -o dist/production/docs/s2 + +s2-api-diff: + node scripts/buildBranchAPI.js + node scripts/api-diff.js --skip-same --skip-style-props diff --git a/bin/imports.js b/bin/imports.js index 07b4a78514f..05c8e628631 100644 --- a/bin/imports.js +++ b/bin/imports.js @@ -18,7 +18,9 @@ const substrings = ['-', '+']; const devDependencies = new Set([ '@adobe/spectrum-css-temp', - '@react-spectrum/style-macro-s1' + '@react-spectrum/style-macro-s1', + '@parcel/macros', + '@adobe/spectrum-tokens' ]); module.exports = { diff --git a/examples/s2-esbuild-starter-app/.gitignore b/examples/s2-esbuild-starter-app/.gitignore new file mode 100644 index 00000000000..67b673395a0 --- /dev/null +++ b/examples/s2-esbuild-starter-app/.gitignore @@ -0,0 +1,2 @@ +dist +yarn.lock diff --git a/examples/s2-esbuild-starter-app/README.md b/examples/s2-esbuild-starter-app/README.md new file mode 100644 index 00000000000..194da1d5a3c --- /dev/null +++ b/examples/s2-esbuild-starter-app/README.md @@ -0,0 +1,54 @@ +# Esbuild example + +This is a [Esbuild](https://esbuild.github.io/) project. + +## Getting Started + +First, run the development server: + +```bash +yarn install +yarn start +python -m http.server +``` + +Open [http://localhost:8000/index.html](http://localhost:8000/index.html) with your browser to see the result. + +style-macro and React Spectrum - Spectrum 2 have been added to `src/app.tsx` to show an example of a Spectrum 2 styled component. You'll need to re-run yarn start and refresh the page to see updates. There are many ways to start an esbuild hmr server, you can google for those. + +## Macros config + +Edit the settings.mjs to add an import for the plugin and add the plugin to `plugins` as the first one. + +``` +import macrosPlugin from 'unplugin-parcel-macros'; +... + plugins: [ + macros.esbuild(), + esbuildPluginTsc({ + force: true + }), + ] +``` + +To use the spectrum-theme via macros, pass your styles object to the style() macro and set the result as a new function. This new function or style() should be used within a `className` prop to style your html elements. Use the `styles` prop on React Spectrum components. + +```jsx +
+ Hello Spectrum 2! +
+``` + +```jsx + +``` + +## Application setup + +Please include the page level CSS in the root of your application to configure and support the light and dark themes. + +``` +import "@react-spectrum/s2/page.css"; +``` diff --git a/examples/s2-esbuild-starter-app/build.mjs b/examples/s2-esbuild-starter-app/build.mjs new file mode 100644 index 00000000000..f05b8659737 --- /dev/null +++ b/examples/s2-esbuild-starter-app/build.mjs @@ -0,0 +1,42 @@ +import * as esbuild from 'esbuild'; +import { createBuildSettings } from './settings.mjs'; +import fs from 'fs'; + +const outdirectory = "dist"; + +//clear out any old JS or CSS +if (fs.existsSync(outdirectory)) { + fs.rmSync(outdirectory, { recursive: true }) +} +fs.mkdirSync(outdirectory); +fs.copyFileSync('index.html', outdirectory + '/index.html'); + +//defaults to build +let config = "-build"; +if (process.argv.length > 2) { + config = process.argv[2]; +} + +let settings; +if (config === '-watch') { + settings = createBuildSettings({ + outdir: outdirectory, + minify: false + }); + let ctx = await esbuild.context(settings); + + await ctx.watch() + + let { host, port } = await ctx.serve({ + servedir: outdirectory, + }); + console.log('serving on', host, port); +} else if (config === '-build') { + settings = createBuildSettings({ + outdir: outdirectory, + minify: true + }); + await esbuild.build(settings); +} + + diff --git a/examples/s2-esbuild-starter-app/index.html b/examples/s2-esbuild-starter-app/index.html new file mode 100644 index 00000000000..f69bb12a280 --- /dev/null +++ b/examples/s2-esbuild-starter-app/index.html @@ -0,0 +1,13 @@ + + + + + ESBuild example + + + + +
+ + + diff --git a/examples/s2-esbuild-starter-app/index.jsx b/examples/s2-esbuild-starter-app/index.jsx new file mode 100644 index 00000000000..2f70ac0a091 --- /dev/null +++ b/examples/s2-esbuild-starter-app/index.jsx @@ -0,0 +1,5 @@ +import React from 'react'; +import ReactDOM from "react-dom"; +import App from './src/app'; + +ReactDOM.render(, document.getElementById("root")); \ No newline at end of file diff --git a/examples/s2-esbuild-starter-app/package.json b/examples/s2-esbuild-starter-app/package.json new file mode 100644 index 00000000000..610a01a948b --- /dev/null +++ b/examples/s2-esbuild-starter-app/package.json @@ -0,0 +1,28 @@ +{ + "name": "esbuild-rainbow", + "version": "1.0.0", + "description": "Test app using macros", + "main": "index.js", + "scripts": { + "build": "node build.mjs -build", + "start": "node build.mjs -watch", + "test": "test", + "postinstall": "patch-package" + }, + "author": "", + "license": "ISC", + "dependencies": { + "react": "^18.2.0", + "react-dom": "^18.2.0", + "@react-spectrum/s2": "0.0.0" + }, + "devDependencies": { + "esbuild": "^0.20.2", + "@types/react": "^18.2.22", + "@types/react-dom": "^18.2.22", + "patch-package": "^8.0.0", + "typescript": "^5.4.3", + "unplugin-parcel-macros": "^0.0.3", + "esbuild-plugin-tsc": "^0.4.0" + } +} diff --git a/examples/s2-esbuild-starter-app/settings.mjs b/examples/s2-esbuild-starter-app/settings.mjs new file mode 100644 index 00000000000..1c047e44fe1 --- /dev/null +++ b/examples/s2-esbuild-starter-app/settings.mjs @@ -0,0 +1,16 @@ +import esbuildPluginTsc from 'esbuild-plugin-tsc'; +import macros from 'unplugin-parcel-macros'; + +export function createBuildSettings(options) { + return { + entryPoints: ['./index.jsx'], + bundle: true, + plugins: [ + macros.esbuild(), + esbuildPluginTsc({ + force: true + }), + ], + ...options + }; +} diff --git a/examples/s2-esbuild-starter-app/src/app.tsx b/examples/s2-esbuild-starter-app/src/app.tsx new file mode 100644 index 00000000000..d37245142e1 --- /dev/null +++ b/examples/s2-esbuild-starter-app/src/app.tsx @@ -0,0 +1,32 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + + +import "@react-spectrum/s2/page.css"; +import { style } from "@react-spectrum/s2/style" with { type: "macro" }; +import { Button } from "@react-spectrum/s2"; + +function App() { + return ( +
+ +
+ ); +} + +export default App; diff --git a/examples/s2-esbuild-starter-app/tsconfig.json b/examples/s2-esbuild-starter-app/tsconfig.json new file mode 100644 index 00000000000..554e640ede2 --- /dev/null +++ b/examples/s2-esbuild-starter-app/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "target": "ES2022", + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], + "allowJs": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx" + }, + "include": [ + "src" + ], + "exclude": [ + "icon.d.ts" + ] +} \ No newline at end of file diff --git a/examples/s2-next-macros/.eslintrc.json b/examples/s2-next-macros/.eslintrc.json new file mode 100644 index 00000000000..bffb357a712 --- /dev/null +++ b/examples/s2-next-macros/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/examples/s2-next-macros/.gitignore b/examples/s2-next-macros/.gitignore new file mode 100644 index 00000000000..75c3ac96d74 --- /dev/null +++ b/examples/s2-next-macros/.gitignore @@ -0,0 +1,38 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js +.yarn/install-state.gz + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem +yarn.lock +package-lock.json + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/examples/s2-next-macros/README.md b/examples/s2-next-macros/README.md new file mode 100644 index 00000000000..a0955efabf8 --- /dev/null +++ b/examples/s2-next-macros/README.md @@ -0,0 +1,57 @@ +# Next.js example + +This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). + +## Getting Started + +First, run the development server: + +```bash +yarn install +yarn dev +``` + +Open [http://localhost:3456](http://localhost:3456) with your browser to see the result. + +style-macro and React Spectrum - Spectrum 2 have been added to `src/app/page.tsx` to show an example of a Spectrum 2 styled component. This file does client side rendering. The page auto-updates as you edit the file. + +## Macros config + +Edit the next.config.mjs to add an import for the plugin and add a webpack config that adds the webpack version of the macros plugin. An empty config file would be updated to look like the following. + +``` +import macrosPlugin from 'unplugin-parcel-macros'; + +/** @type {import('next').NextConfig} */ +const nextConfig = { + webpack(config, {}) { + config.plugins.push(macrosPlugin.webpack()); + + return config; + } +}; + +export default nextConfig; +``` + +To use the spectrum-theme via macros, pass your styles object to the style() macro and set the result as a new function. This new function or style() should be used within a `className` prop to style your html elements. Use the `styles` prop on React Spectrum components. + +```jsx +
+ Hello Spectrum 2! +
+``` + +```jsx + +``` + +## Application setup + +Please include the page level CSS in the root of your application to configure and support the light and dark themes. + +``` +import "@react-spectrum/s2/page.css"; +``` diff --git a/examples/s2-next-macros/next.config.mjs b/examples/s2-next-macros/next.config.mjs new file mode 100644 index 00000000000..3e42e221005 --- /dev/null +++ b/examples/s2-next-macros/next.config.mjs @@ -0,0 +1,21 @@ +import macrosPlugin from 'unplugin-parcel-macros'; + +// Create a single instance of the plugin that's shared between server and client builds. +let macrosWebpack = macrosPlugin.webpack(); + +/** @type {import('next').NextConfig} */ +const nextConfig = { + webpack(config, {}) { + config.plugins.push(macrosWebpack); + + config.module.rules.push({ + test: /\.svg$/i, + issuer: /\.[jt]sx?$/, + use: ['@svgr/webpack'], + }); + + return config; + } +}; + +export default nextConfig; diff --git a/examples/s2-next-macros/package.json b/examples/s2-next-macros/package.json new file mode 100644 index 00000000000..e6a9807c317 --- /dev/null +++ b/examples/s2-next-macros/package.json @@ -0,0 +1,27 @@ +{ + "name": "next-macros", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev -p 3456", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "@react-spectrum/s2": "^0.0.0", + "next": "14.1.3", + "react": "^18", + "react-dom": "^18", + "unplugin-parcel-macros": "0.0.3" + }, + "devDependencies": { + "@svgr/webpack": "^8.1.0", + "@types/node": "^20", + "@types/react": "^18", + "@types/react-dom": "^18", + "eslint": "^8", + "eslint-config-next": "14.1.3", + "typescript": "^5" + } +} diff --git a/examples/s2-next-macros/src/app/layout.tsx b/examples/s2-next-macros/src/app/layout.tsx new file mode 100644 index 00000000000..9597f95357d --- /dev/null +++ b/examples/s2-next-macros/src/app/layout.tsx @@ -0,0 +1,30 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import type { Metadata } from "next"; + +export const metadata: Metadata = { + title: "React Spectrum's Spectrum 2 Next Example App", + description: "Generated by create next app", +}; + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + return ( + + {children} + + ); +} diff --git a/examples/s2-next-macros/src/app/page.tsx b/examples/s2-next-macros/src/app/page.tsx new file mode 100644 index 00000000000..3abd8f55c08 --- /dev/null +++ b/examples/s2-next-macros/src/app/page.tsx @@ -0,0 +1,33 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +'use client' + +import "@react-spectrum/s2/page.css"; +import { style } from "@react-spectrum/s2/style" with { type: "macro" }; +import { Button } from "@react-spectrum/s2"; + +function App() { + return ( +
+ +
+ ); +} + +export default App; diff --git a/examples/s2-next-macros/tsconfig.json b/examples/s2-next-macros/tsconfig.json new file mode 100644 index 00000000000..7b285893049 --- /dev/null +++ b/examples/s2-next-macros/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./src/*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/examples/s2-parcel-example/.gitignore b/examples/s2-parcel-example/.gitignore new file mode 100644 index 00000000000..9e24cc6b5fe --- /dev/null +++ b/examples/s2-parcel-example/.gitignore @@ -0,0 +1,4 @@ +.DS_Store +node_modules +package-lock.json +yarn.lock \ No newline at end of file diff --git a/examples/s2-parcel-example/README.md b/examples/s2-parcel-example/README.md new file mode 100644 index 00000000000..87a4a507f92 --- /dev/null +++ b/examples/s2-parcel-example/README.md @@ -0,0 +1,42 @@ +# Parcel example + +This is a [Parcel](https://parceljs.org/) project with a minimal React configuration. + +## Getting Started + +First, run the development server: + +```bash +yarn install +yarn dev +``` + +Open [http://localhost:1234](http://localhost:1234) with your browser to see the result. + +style-macro and React Spectrum - Spectrum 2 have been added to `src/App.js` to show an example of a Spectrum 2 styled component. This file does client side rendering. The page auto-updates as you edit the file. + +## Macros + +Macros work out-of-the-box with Parcel, as of [v2.12.0](https://parceljs.org/blog/v2-12-0/#macros) + +To use the spectrum-theme via macros, pass your styles object to the style() macro and set the result as a new function. This new function or style() should be used within a `className` prop to style your html elements. Use the `styles` prop on React Spectrum components. + +```jsx +
+ Hello Spectrum 2! +
+``` + +```jsx + +``` + +## Application setup + +Please include the page level CSS in the root of your application to configure and support the light and dark themes. + +``` +import "@react-spectrum/s2/page.css"; +``` diff --git a/examples/s2-parcel-example/package.json b/examples/s2-parcel-example/package.json new file mode 100644 index 00000000000..a09623fc0e5 --- /dev/null +++ b/examples/s2-parcel-example/package.json @@ -0,0 +1,14 @@ +{ + "devDependencies": { + "parcel": "^2.12.0", + "process": "^0.11.10" + }, + "dependencies": { + "@react-spectrum/s2": "^0.0.0", + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "scripts": { + "dev": "parcel src/index.html" + } +} diff --git a/examples/s2-parcel-example/src/App.js b/examples/s2-parcel-example/src/App.js new file mode 100644 index 00000000000..48490f7a343 --- /dev/null +++ b/examples/s2-parcel-example/src/App.js @@ -0,0 +1,31 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import "@react-spectrum/s2/page.css"; +import { style } from "@react-spectrum/s2/style" with { type: "macro" }; +import { Button } from "@react-spectrum/s2"; + +function App() { + return ( +
+ +
+ ); +} + +export default App; diff --git a/examples/s2-parcel-example/src/index.html b/examples/s2-parcel-example/src/index.html new file mode 100644 index 00000000000..61ec55a3bdb --- /dev/null +++ b/examples/s2-parcel-example/src/index.html @@ -0,0 +1,11 @@ + + + + + My test parcel app + + +
+ + + diff --git a/examples/s2-parcel-example/src/index.js b/examples/s2-parcel-example/src/index.js new file mode 100644 index 00000000000..330202b3f73 --- /dev/null +++ b/examples/s2-parcel-example/src/index.js @@ -0,0 +1,18 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import { createRoot } from "react-dom/client"; +import App from "./App"; + +const container = document.getElementById("app"); +const root = createRoot(container); +root.render(); diff --git a/examples/s2-rollup-starter-app/.gitignore b/examples/s2-rollup-starter-app/.gitignore new file mode 100644 index 00000000000..415760d0744 --- /dev/null +++ b/examples/s2-rollup-starter-app/.gitignore @@ -0,0 +1,5 @@ +.DS_Store +node_modules +package-lock.json +public/bundle* +yarn.lock \ No newline at end of file diff --git a/examples/s2-rollup-starter-app/LICENSE b/examples/s2-rollup-starter-app/LICENSE new file mode 100644 index 00000000000..a6e887f8e85 --- /dev/null +++ b/examples/s2-rollup-starter-app/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2017 [these people](https://github.com/rollup/rollup-starter-app/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/examples/s2-rollup-starter-app/README.md b/examples/s2-rollup-starter-app/README.md new file mode 100644 index 00000000000..9eae08229db --- /dev/null +++ b/examples/s2-rollup-starter-app/README.md @@ -0,0 +1,76 @@ +# Rollup example + +This is a [Rollup](https://rollupjs.org/) project bootstrapped with the [`rollup-starter-app`](https://github.com/rollup/rollup-starter-app) project template. + +## Getting Started + +First, run the development server: + +```bash +yarn install +yarn dev +``` + +Open [http://localhost:5678](http://localhost:5678) with your browser to see the result. + +style-macro and React Spectrum - Spectrum 2 have been added to `src/App.jsx` to show an example of a Spectrum 2 styled component. This file does client side rendering. The page auto-updates as you edit the file. + +## Macros config + +Edit the rollup.config.js to add an import for the plugin and add a rollup config that adds the rollup version of the macros plugin. An empty config file would be updated to look like the following. + +``` +import macrosPlugin from 'unplugin-parcel-macros'; + +export default { + input: 'src/main.js', + output: { + file: 'public/bundle.js', + format: 'iife', // immediately-invoked function expression — suitable for + + \ No newline at end of file diff --git a/examples/s2-rollup-starter-app/rollup.config.js b/examples/s2-rollup-starter-app/rollup.config.js new file mode 100644 index 00000000000..9b05e987c02 --- /dev/null +++ b/examples/s2-rollup-starter-app/rollup.config.js @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import commonjs from '@rollup/plugin-commonjs'; +import {terser} from 'rollup-plugin-terser'; +import nodeResolve from '@rollup/plugin-node-resolve'; +import babel from '@rollup/plugin-babel'; +import replace from '@rollup/plugin-replace'; +import css from 'rollup-plugin-import-css'; +import macros from 'unplugin-parcel-macros'; +import reactSvg from "rollup-plugin-react-svg"; + +// `npm run build` -> `production` is true +// `npm run dev` -> `production` is false +const production = !process.env.ROLLUP_WATCH; + +export default { + input: 'src/main.js', + output: { + file: 'public/bundle.js', + format: 'iife', // immediately-invoked function expression — suitable for + + diff --git a/examples/s2-vite-project/package.json b/examples/s2-vite-project/package.json new file mode 100644 index 00000000000..8f5ffa557ad --- /dev/null +++ b/examples/s2-vite-project/package.json @@ -0,0 +1,32 @@ +{ + "name": "vite-project", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "preview": "vite preview" + }, + "dependencies": { + "@babel/plugin-syntax-import-attributes": "^7.24.1", + "@react-spectrum/s2": "^0.0.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "unplugin-parcel-macros": "latest" + }, + "devDependencies": { + "@types/react": "^18.2.66", + "@types/react-dom": "^18.2.22", + "@typescript-eslint/eslint-plugin": "^7.2.0", + "@typescript-eslint/parser": "^7.2.0", + "@vitejs/plugin-react": "^4.2.1", + "eslint": "^8.57.0", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-refresh": "^0.4.6", + "typescript": "^5.2.2", + "vite": "^5.2.0", + "vite-plugin-svgr": "^4.2.0" + } +} diff --git a/examples/s2-vite-project/src/App.tsx b/examples/s2-vite-project/src/App.tsx new file mode 100644 index 00000000000..48490f7a343 --- /dev/null +++ b/examples/s2-vite-project/src/App.tsx @@ -0,0 +1,31 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import "@react-spectrum/s2/page.css"; +import { style } from "@react-spectrum/s2/style" with { type: "macro" }; +import { Button } from "@react-spectrum/s2"; + +function App() { + return ( +
+ +
+ ); +} + +export default App; diff --git a/examples/s2-vite-project/src/main.tsx b/examples/s2-vite-project/src/main.tsx new file mode 100644 index 00000000000..9e250b2f573 --- /dev/null +++ b/examples/s2-vite-project/src/main.tsx @@ -0,0 +1,21 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import React from 'react' +import ReactDOM from 'react-dom/client' +import App from './App.tsx' + +ReactDOM.createRoot(document.getElementById('root')!).render( + + + , +) diff --git a/examples/s2-vite-project/src/vite-env.d.ts b/examples/s2-vite-project/src/vite-env.d.ts new file mode 100644 index 00000000000..f18f194a22e --- /dev/null +++ b/examples/s2-vite-project/src/vite-env.d.ts @@ -0,0 +1,23 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +/// +declare module '*.svg' { + import * as React from 'react'; + + export const ReactComponent: React.FunctionComponent & { title?: string }>; + + const src: string; + export default src; +} diff --git a/examples/s2-vite-project/tsconfig.json b/examples/s2-vite-project/tsconfig.json new file mode 100644 index 00000000000..a7fc6fbf23d --- /dev/null +++ b/examples/s2-vite-project/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/examples/s2-vite-project/tsconfig.node.json b/examples/s2-vite-project/tsconfig.node.json new file mode 100644 index 00000000000..97ede7ee6f2 --- /dev/null +++ b/examples/s2-vite-project/tsconfig.node.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true, + "strict": true + }, + "include": ["vite.config.ts"] +} diff --git a/examples/s2-vite-project/vite.config.ts b/examples/s2-vite-project/vite.config.ts new file mode 100644 index 00000000000..074378235a7 --- /dev/null +++ b/examples/s2-vite-project/vite.config.ts @@ -0,0 +1,28 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' +import macros from 'unplugin-parcel-macros'; +import svgr from "vite-plugin-svgr"; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [ + macros.vite(), + svgr({ + svgrOptions: { exportType: 'named', ref: true, svgo: false, titleProp: true }, + include: '**/*.svg', + }), + react() + ], +}) diff --git a/examples/s2-webpack-5-example/.gitignore b/examples/s2-webpack-5-example/.gitignore new file mode 100644 index 00000000000..b3b23b83606 --- /dev/null +++ b/examples/s2-webpack-5-example/.gitignore @@ -0,0 +1,9 @@ +node_modules +build +.DS_Store +npm-debug.log +yarn-error.log +yarn.lock +.yarnclean +.vscode +.idea \ No newline at end of file diff --git a/examples/s2-webpack-5-example/README.md b/examples/s2-webpack-5-example/README.md new file mode 100644 index 00000000000..13525dc3e29 --- /dev/null +++ b/examples/s2-webpack-5-example/README.md @@ -0,0 +1,55 @@ +# Webpack 5 example + +This is a [Webpack](https://webpack.js.org/) project with a minimal React configuration. + +## Getting Started + +First, run the development server: + +```bash +yarn install +yarn dev +``` + +Open [http://localhost:8080](http://localhost:8080) with your browser to see the result. + +style-macro and React Spectrum - Spectrum 2 have been added to `src/App.js` to show an example of a Spectrum 2 styled component. This file does client side rendering. The page auto-updates as you edit the file. + +## Macros config + +Edit the webpack.config.js to add an import for the plugin and add a webpack config that adds the webpack version of the macros plugin. An empty config file would be updated to look like the following. + +``` +const macros = require("unplugin-parcel-macros"); + +module.exports = { + // ... + plugins: [ + // ... + macros.webpack(), + // ... + ], +}; +``` + +To use the spectrum-theme via macros, pass your styles object to the style() macro and set the result as a new function. This new function or style() should be used within a `className` prop to style your html elements. Use the `styles` prop on React Spectrum components. + +```jsx +
+ Hello Spectrum 2! +
+``` + +```jsx + +``` + +## Application setup + +Please include the page level CSS in the root of your application to configure and support the light and dark themes. + +``` +import "@react-spectrum/s2/page.css"; +``` diff --git a/examples/s2-webpack-5-example/package.json b/examples/s2-webpack-5-example/package.json new file mode 100644 index 00000000000..40186da0c9e --- /dev/null +++ b/examples/s2-webpack-5-example/package.json @@ -0,0 +1,28 @@ +{ + "name": "webpack-5-example", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "dev": "webpack serve", + "build": "webpack" + }, + "dependencies": { + "@react-spectrum/s2": "^0.0.0", + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "devDependencies": { + "@babel/core": "^7.24.3", + "@babel/preset-env": "^7.24.3", + "@babel/preset-react": "^7.24.1", + "babel-loader": "^9.1.3", + "css-loader": "^6.10.0", + "html-webpack-plugin": "^5.6.0", + "style-loader": "^3.3.4", + "unplugin-parcel-macros": "0.0.3", + "webpack": "^5.91.0", + "webpack-cli": "^5.1.4", + "webpack-dev-server": "^5.0.4" + } +} diff --git a/examples/s2-webpack-5-example/src/App.js b/examples/s2-webpack-5-example/src/App.js new file mode 100644 index 00000000000..f9ee28c4a2e --- /dev/null +++ b/examples/s2-webpack-5-example/src/App.js @@ -0,0 +1,32 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import "@react-spectrum/s2/page.css"; +import { style } from "@react-spectrum/s2/style" with { type: "macro" }; +import { Button } from "@react-spectrum/s2"; +import React from "react"; + +function App() { + return ( +
+ +
+ ); +} + +export default App; diff --git a/examples/s2-webpack-5-example/src/index.html b/examples/s2-webpack-5-example/src/index.html new file mode 100644 index 00000000000..6252f08e495 --- /dev/null +++ b/examples/s2-webpack-5-example/src/index.html @@ -0,0 +1,12 @@ + + + + + + React App + + + +
+ + diff --git a/examples/s2-webpack-5-example/src/index.js b/examples/s2-webpack-5-example/src/index.js new file mode 100644 index 00000000000..0374329056e --- /dev/null +++ b/examples/s2-webpack-5-example/src/index.js @@ -0,0 +1,18 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import React from 'react'; +import { render } from 'react-dom'; +import App from "./App"; + +const root = document.getElementById('root'); +render(, root); diff --git a/examples/s2-webpack-5-example/webpack.config.js b/examples/s2-webpack-5-example/webpack.config.js new file mode 100644 index 00000000000..2a2d76ab71c --- /dev/null +++ b/examples/s2-webpack-5-example/webpack.config.js @@ -0,0 +1,48 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +const path = require("path"); +const HtmlWebpackPlugin = require("html-webpack-plugin"); + +const macros = require("unplugin-parcel-macros"); + +module.exports = { + entry: path.join(__dirname, "src", "index.js"), + output: { + path: path.resolve(__dirname, "dist"), + }, + mode: "development", + module: { + rules: [ + { + test: /\.?js$/, + exclude: /node_modules/, + use: { + loader: "babel-loader", + options: { + presets: ["@babel/preset-env", "@babel/preset-react"], + }, + }, + }, + { + test: /\.css$/i, + use: ["style-loader", "css-loader"], + } + ], + }, + plugins: [ + new HtmlWebpackPlugin({ + template: path.join(__dirname, "src", "index.html"), + }), + macros.webpack(), + ], +}; diff --git a/lib/svg.d.ts b/lib/svg.d.ts new file mode 100644 index 00000000000..6d7c0a20c88 --- /dev/null +++ b/lib/svg.d.ts @@ -0,0 +1,22 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +declare module 'bundle-text:*' { + const content: string; + export default content; +} + +declare module '*.svg' { + import {FunctionComponent, SVGProps} from 'react'; + const content: FunctionComponent> ; + export default content; +} diff --git a/package.json b/package.json index 9d8df2706a2..83ee46648bd 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,10 @@ "build:chromatic": "CHROMATIC=1 storybook build -c .chromatic -o dist/$(git rev-parse HEAD)/chromatic", "start:chromatic-fc": "CHROMATIC=1 NODE_ENV=storybook storybook dev -p 9005 --ci -c '.chromatic-fc'", "build:chromatic-fc": "CHROMATIC=1 storybook build -c .chromatic-fc -o dist/$(git rev-parse HEAD)/chromatic-fc", + "start:s2": "NODE_ENV=storybook storybook dev -p 6006 --ci -c '.storybook-s2'", + "build:storybook-s2": "NODE_ENV=storybook storybook build -c .storybook-s2 -o dist/$(git rev-parse HEAD)/storybook-s2", + "build:s2-docs": "NODE_ENV=storybook storybook build -c .storybook-s2 --docs", + "build:chromatic-s2": "CHROMATIC=1 NODE_ENV=storybook storybook build -c .storybook-s2 --test", "start:docs": "DOCS_ENV=dev parcel 'packages/@react-{spectrum,aria,stately}/*/docs/*.mdx' 'packages/react-aria-components/docs/**/*.mdx' 'packages/@internationalized/*/docs/*.mdx' 'packages/dev/docs/pages/**/*.mdx'", "build:docs": "DOCS_ENV=staging parcel build 'packages/@react-{spectrum,aria,stately}/*/docs/*.mdx' 'packages/react-aria-components/docs/**/*.mdx' 'packages/@internationalized/*/docs/*.mdx' 'packages/dev/docs/pages/**/*.mdx'", "test": "cross-env STRICT_MODE=1 yarn jest", @@ -39,6 +43,7 @@ "plop": "plop --plopfile scripts/plopfile.js", "chromatic": "NODE_ENV=production CHROMATIC=1 chromatic --project-token $CHROMATIC_PROJECT_TOKEN --build-script-name 'build:chromatic'", "chromatic:forced-colors": "NODE_ENV=production CHROMATIC=1 chromatic --project-token $CHROMATIC_FC_PROJECT_TOKEN --build-script-name 'build:chromatic-fc'", + "chromatic:s2": "NODE_ENV=production CHROMATIC=1 chromatic --buildScriptName='build:chromatic-s2' --project-token=$RAINBOW_CHROMATIC_PROJECT_TOKEN", "merge:css": "babel-node --presets @babel/env ./scripts/merge-spectrum-css.js", "release": "lerna publish from-package --yes", "publish:nightly": "lerna publish -y --canary --preid nightly --dist-tag=nightly --exact --force-publish=* --no-push --no-verify-access", @@ -93,7 +98,11 @@ "@storybook/addon-a11y": "^7.6.19", "@storybook/addon-actions": "^7.6.19", "@storybook/addon-controls": "^7.6.19", + "@storybook/addon-essentials": "7.6.19", + "@storybook/addon-interactions": "7.6.19", "@storybook/addon-links": "^7.6.19", + "@storybook/addon-onboarding": "1.0.8", + "@storybook/addon-themes": "7.6.19", "@storybook/api": "^7.6.19", "@storybook/components": "^7.6.19", "@storybook/manager-api": "^7.6.19", @@ -228,7 +237,9 @@ "@parcel/utils": "2.0.0-dev.1601", "@parcel/workers": "2.0.0-dev.1601", "@types/react": "npm:types-react@19.0.0-rc.0", - "@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" + "@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", + "recast": "0.23.6", + "ast-types": "0.16.1" }, "@parcel/transformer-css": { "cssModules": { @@ -238,7 +249,9 @@ "packages/@react-aria/example-theme/**", "packages/@react-spectrum/style-macro-s1/**", "packages/@react-spectrum/tree/**", - "packages/@react-spectrum/color/src/*.tsx" + "packages/@react-spectrum/color/src/*.tsx", + "packages/@react-spectrum/s2/**", + ".storybook-s2/**" ] }, "drafts": { diff --git a/packages/@react-spectrum/s2/.gitignore b/packages/@react-spectrum/s2/.gitignore new file mode 100644 index 00000000000..bf2eb701bbe --- /dev/null +++ b/packages/@react-spectrum/s2/.gitignore @@ -0,0 +1,2 @@ +icons +page.css diff --git a/packages/@react-spectrum/s2/README.md b/packages/@react-spectrum/s2/README.md new file mode 100644 index 00000000000..71a71b90df0 --- /dev/null +++ b/packages/@react-spectrum/s2/README.md @@ -0,0 +1,3 @@ +# @react-spectrum/s2 + +This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details. \ No newline at end of file diff --git a/packages/@react-spectrum/s2/api-diff.md b/packages/@react-spectrum/s2/api-diff.md new file mode 100644 index 00000000000..c2d73f8a076 --- /dev/null +++ b/packages/@react-spectrum/s2/api-diff.md @@ -0,0 +1,454 @@ + + +# API Changelog + +This changelog documents the differences between React Spectrum v3 and Spectrum 2. + +## All + +React Spectrum v3 [style props](https://react-spectrum.adobe.com/react-spectrum/styling.html) have been replaced by the [style macro](https://react-spectrum.corp.adobe.com/s2/#styling) across all components. + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| styles | 🟢 `StylesProp` | – | Pass the result of the `style` macro to this prop. | +| margin | – | 🔴 `Responsive` | | +| marginStart | – | 🔴 `Responsive` | | +| marginEnd | – | 🔴 `Responsive` | | +| marginTop | – | 🔴 `Responsive` | | +| marginBottom | – | 🔴 `Responsive` | | +| marginX | – | 🔴 `Responsive` | | +| marginY | – | 🔴 `Responsive` | | +| width | – | 🔴 `Responsive` | | +| height | – | 🔴 `Responsive` | | +| minWidth | – | 🔴 `Responsive` | | +| minHeight | – | 🔴 `Responsive` | | +| maxWidth | – | 🔴 `Responsive` | | +| maxHeight | – | 🔴 `Responsive` | | +| flex | – | 🔴 `Responsive` | | +| flexGrow | – | 🔴 `Responsive` | | +| flexShrink | – | 🔴 `Responsive` | | +| flexBasis | – | 🔴 `Responsive` | | +| justifySelf | – | 🔴 `Responsive<'auto' \| 'center' \| 'end' \| 'flex-end' \| 'flex-start' \| 'left' \| 'normal' \| 'right' \| 'self-end' \| 'self-start' \| 'start' \| 'stretch'>` | | +| alignSelf | – | 🔴 `Responsive<'auto' \| 'center' \| 'end' \| 'flex-end' \| 'flex-start' \| 'normal' \| 'self-end' \| 'self-start' \| 'start' \| 'stretch'>` | | +| order | – | 🔴 `Responsive` | | +| gridArea | – | 🔴 `Responsive` | | +| gridColumn | – | 🔴 `Responsive` | | +| gridRow | – | 🔴 `Responsive` | | +| gridColumnStart | – | 🔴 `Responsive` | | +| gridColumnEnd | – | 🔴 `Responsive` | | +| gridRowStart | – | 🔴 `Responsive` | | +| gridRowEnd | – | 🔴 `Responsive` | | +| position | – | 🔴 `Responsive<'absolute' \| 'fixed' \| 'relative' \| 'static' \| 'sticky'>` | | +| zIndex | – | 🔴 `Responsive` | | +| top | – | 🔴 `Responsive` | | +| bottom | – | 🔴 `Responsive` | | +| start | – | 🔴 `Responsive` | | +| end | – | 🔴 `Responsive` | | +| left | – | 🔴 `Responsive` | | +| right | – | 🔴 `Responsive` | | +| isHidden | – | 🔴 `Responsive` | | +## Badge + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | – | | +| variant | 🟢 `'accent' \| 'blue' \| 'brown' \| 'celery' \| 'charteuse' \| 'cinnamon' \| 'cyan' \| 'fuchsia' \| 'gray' \| 'green' \| 'indigo' \| 'informative' \| 'magenta' \| 'negative' \| 'neutral' \| 'notice' \| 'orange' \| 'pink' \| 'positive' \| 'purple' \| 'red' \| 'seafoam' \| 'silver' \| 'turquoise' \| 'yellow'` | 🔴 `'fuchsia' \| 'indigo' \| 'info' \| 'magenta' \| 'negative' \| 'neutral' \| 'positive' \| 'purple' \| 'seafoam' \| 'yellow'` | | +## Button + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| form | 🟢 `string` | – | | +| formAction | 🟢 `string` | – | | +| formEncType | 🟢 `string` | – | | +| formMethod | 🟢 `string` | – | | +| formNoValidate | 🟢 `boolean` | – | | +| formTarget | 🟢 `string` | – | | +| name | 🟢 `string` | – | | +| value | 🟢 `string` | – | | +| slot | 🟢 `null \| string` | – | | +| variant | 🟢 `'accent' \| 'negative' \| 'primary' \| 'secondary'` | 🔴 `'accent' \| 'negative' \| 'primary' \| 'secondary' \| LegacyButtonVariant` | Note that the deprecated `cta` and `overBackground` variants are no longer supported. Please use `accent` and `primary` + `staticColor: 'white'` as replacements respectively. | +| fillStyle | 🟢 `'fill' \| 'outline'` | – | This prop replaces v3's `style` prop. | +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | – | | +| style | – | 🔴 `'fill' \| 'outline'` | This prop is replaced by the `fillStyle` prop. | +| isPending | – | 🔴 `boolean` | Not yet implemented in S2. | +| isQuiet | – | 🔴 `boolean` | Not supported in S2 design. | +| href | – | 🔴 `string` | This prop has been removed in favor of the new LinkButton component. | +| target | – | 🔴 `string` | This prop has been removed in favor of the new LinkButton component. | +| rel | – | 🔴 `string` | This prop has been removed in favor of the new LinkButton component. | +| elementType | – | 🔴 `ElementType \| JSXElementConstructor` | Not supported in S2. | +## ActionButton + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| form | 🟢 `string` | – | | +| formAction | 🟢 `string` | – | | +| formEncType | 🟢 `string` | – | | +| formMethod | 🟢 `string` | – | | +| formNoValidate | 🟢 `boolean` | – | | +| formTarget | 🟢 `string` | – | | +| name | 🟢 `string` | – | | +| value | 🟢 `string` | – | | +| slot | 🟢 `null \| string` | – | | +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL' \| 'XS'` | – | | +## ToggleButton + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| slot | 🟢 `null \| string` | – | | +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL' \| 'XS'` | – | | +## Avatar + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| isDisabled | – | 🔴 `boolean` | Focusable/interactive Avatars aren't supported in S2 yet. | +| size | – | 🔴 `'avatar-size-100' \| 'avatar-size-200' \| 'avatar-size-300' \| 'avatar-size-400' \| 'avatar-size-50' \| 'avatar-size-500' \| 'avatar-size-600' \| 'avatar-size-700' \| 'avatar-size-75' \| (string & {

}) \| number` | This prop has been removed in favor of providing a size via the `styles` prop. | +## Breadcrumbs + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| dependencies | 🟢 `Array` | – | | +| slot | 🟢 `null \| string` | – | | +| size | 🟢 `'L' \| 'M'` | 🔴 `'L' \| 'M' \| 'S'` | Small is no longer supported in Spectrum Design. | +| showRoot | – | 🔴 `boolean` | Not yet implemented in S2. | +| isMultiline | – | 🔴 `boolean` | Not yet implemented in S2. | +| autoFocusCurrent | – | 🔴 `boolean` | Not yet implemented in S2. | +## ButtonGroup + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | – | | +| slot | 🟢 `null \| string` | – | | +## Checkbox + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| inputRef | 🟢 `MutableRefObject` | – | | +| slot | 🟢 `null \| string` | – | | +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | – | | +## CheckboxGroup + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | – | | +## ColorArea + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| slot | 🟢 `null \| string` | – | | +| size | – | 🔴 `DimensionValue` | Set size via `style` macro instead. | +## ColorWheel + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| size | 🟢 `number` | 🔴 `DimensionValue` | Use pixel values instead. | +| slot | 🟢 `null \| string` | – | | +## ColorSlider + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| label | 🟢 `string` | 🔴 `ReactNode` | | +| slot | 🟢 `null \| string` | – | | +| showValueLabel | – | 🔴 `boolean` | Removed for accessibility reasons. | +## ColorField + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | – | | +| isInvalid | 🟢 `boolean` | – | | +| slot | 🟢 `null \| string` | – | | +| isQuiet | – | 🔴 `boolean` | Not supported in S2 design. | +| placeholder | – | 🔴 `string` | Removed for accessibility reasons. | +| validationState | – | 🔴 `ValidationState` | Use `isInvalid` instead. | +## ColorSwatch + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| slot | 🟢 `null \| string` | – | | +## ComboBox + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| menuWidth | 🟢 `number` | 🔴 `DimensionValue` | This accepts pixel values in S2. | +| isInvalid | 🟢 `boolean` | – | | +| slot | 🟢 `null \| string` | – | | +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | – | | +| isQuiet | – | 🔴 `boolean` | Not supported in S2 design. | +| loadingState | – | 🔴 `LoadingState` | Not yet implemented in S2. | +| placeholder | – | 🔴 `string` | Removed for accessibility reasons. | +| validationState | – | 🔴 `ValidationState` | Use `isInvalid` instead. | +| onLoadMore | – | 🔴 `() => any` | Not yet implemented in S2. | +## ContextualHelp + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| size | 🟢 `'S' \| 'XS'` | – | | +## Dialog + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| children | 🟢 `(DialogRenderProps) => ReactNode \| ReactNode` | 🔴 `ReactNode` | Close function moved from `DialogTrigger` to `Dialog`. | +| slot | 🟢 `null \| string` | – | | +| onDismiss | – | 🔴 `() => void` | Use `onOpenChange` on the DialogTrigger or `onDismiss` on the DialogContainer instead. | +## DialogTrigger + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| type | 🟢 `'fullscreen' \| 'fullscreenTakeover' \| 'modal' \| 'popover'` | 🔴 `'fullscreen' \| 'fullscreenTakeover' \| 'modal' \| 'popover' \| 'tray'` | Tray not yet implemented in S2. | +| mobileType | – | 🔴 `'fullscreen' \| 'fullscreenTakeover' \| 'modal' \| 'tray'` | Not yet implemented in S2. | +| targetRef | – | 🔴 `RefObject` | No longer supported in S2. | +| children | 🟢 `ReactNode` | 🔴 `[ReactElement, ReactElement \| SpectrumDialogClose]` | Close function moved from `DialogTrigger` to `Dialog`. | + +## Divider + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| staticColor | 🟢 `'black' \| 'white'` | – | | + +## Form + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | – | | +| isQuiet | – | 🔴 `boolean` | Not supported in S2 design. | +| isReadOnly | – | 🔴 `boolean` | Not yet implemented in S2. | +| validationState | – | 🔴 `ValidationState` | No longer supported in S2. | +| validationBehavior | – | 🔴 `'aria' \| 'native'` | Not yet implemented in S2. | +## IllustratedMessage + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| size | 🟢 `'L' \| 'M' \| 'S'` | – | | +| orientation | 🟢 `'horizontal' \| 'vertical'` | – | | +## InlineAlert + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| variant | 🟢 `'informative' \| 'negative' \| 'neutral' \| 'notice' \| 'positive'` | 🔴 `'info' \| 'negative' \| 'neutral' \| 'notice' \| 'positive'` | | +| fillStyle | 🟢 `'boldFill' \| 'border' \| 'subtleFill'` | – | | +## Link + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| slot | 🟢 `null \| string` | – | | +| variant | 🟢 `'primary' \| 'secondary'` | 🔴 `'overBackground' \| 'primary' \| 'secondary'` | Use `staticColor` to replace `overBackground`. | +| staticColor | 🟢 `'black' \| 'white'` | – | | +| isStandalone | 🟢 `boolean` | – | | +## Meter + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| slot | 🟢 `null \| string` | – | | +| variant | 🟢 `'informative' \| 'negative' \| 'notice' \| 'positive'` | 🔴 `'critical' \| 'informative' \| 'positive' \| 'warning'` | | +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | 🔴 `'L' \| 'S'` | | +| staticColor | 🟢 `'black' \| 'white'` | – | | +| labelPosition | – | 🔴 `LabelPosition` | Not yet implemented in S2. | +| showValueLabel | – | 🔴 `boolean` | Removed for accessibility reasons. | +## MenuTrigger + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| closeOnSelect | – | 🔴 `boolean` | Not yet implemented in S2. | +## SubmenuTrigger + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| targetKey | – | 🔴 `Key` | | +## Menu + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | – | | +| slot | 🟢 `null \| string` | – | | +| onScroll | 🟢 `(UIEvent) => void` | – | | +## ActionMenu + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | – | | +| closeOnSelect | – | 🔴 `boolean` | Not yet implemented in S2. | +| trigger | – | 🔴 `MenuTriggerType` | Not yet implemented in S2. | +## Picker + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| menuWidth | 🟢 `number` | 🔴 `DimensionValue` | This accepts pixel values in S2. | +| slot | 🟢 `null \| string` | – | | +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | – | | +| isQuiet | – | 🔴 `boolean` | Not supported in S2 design. | +| validationState | – | 🔴 `ValidationState` | Use `isInvalid` instead. | +| isLoading | – | 🔴 `boolean` | Not yet implemented in S2. | +| onLoadMore | – | 🔴 `() => any` | Not yet implemented in S2. | +## ProgressBar + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| slot | 🟢 `null \| string` | – | | +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | 🔴 `'L' \| 'S'` | | +| variant | – | 🔴 `'overBackground'` | Use `staticColor` to replace `overBackground`. | +| labelPosition | – | 🔴 `LabelPosition` | Not yet implemented in S2. | +| showValueLabel | – | 🔴 `boolean` | Removed for accessibility reasons. | +## ProgressCircle + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| slot | 🟢 `null \| string` | – | | +| variant | – | 🔴 `'overBackground'` | Use `staticColor` to replace `overBackground`. | +## Radio + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| inputRef | 🟢 `MutableRefObject` | – | | +| slot | 🟢 `null \| string` | – | | +## RadioGroup + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | – | | +| slot | 🟢 `null \| string` | – | | +| validationState | – | 🔴 `ValidationState` | Use `isInvalid` instead. | +| showErrorIcon | – | 🔴 `boolean` | Removed for accessibility reasons. | +## SearchField + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | – | | +| isInvalid | 🟢 `boolean` | – | | +| slot | 🟢 `null \| string` | – | | +| placeholder | – | 🔴 `string` | Removed for accessibility reasons. | +| icon | – | 🔴 `ReactElement \| null` | Not yet implemented in S2. | +| isQuiet | – | 🔴 `boolean` | Not supported in S2 design. | +| validationState | – | 🔴 `ValidationState` | Use `isInvalid` instead. | +## Slider + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | – | | +| labelAlign | 🟢 `Alignment` | – | | +| isEmphasized | 🟢 `boolean` | – | | +| trackStyle | 🟢 `'thick' \| 'thin'` | – | | +| thumbStyle | 🟢 `'default' \| 'precise'` | – | | +| slot | 🟢 `null \| string` | – | | +| isFilled | – | 🔴 `boolean` | Always filled in S2 design. | +| trackGradient | – | 🔴 `Array` | Not supported in S2 design. | +| showValueLabel | – | 🔴 `boolean` | Removed for accessibility reasons. | +| getValueLabel | – | 🔴 `(number) => string` | Not yet implemented in S2. | +| orientation | – | 🔴 `Orientation` | Not yet implemented in S2. | +## RangeSlider + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | – | | +| labelAlign | 🟢 `Alignment` | – | | +| isEmphasized | 🟢 `boolean` | – | | +| trackStyle | 🟢 `'thick' \| 'thin'` | – | | +| thumbStyle | 🟢 `'default' \| 'precise'` | – | | +| slot | 🟢 `null \| string` | – | | +| showValueLabel | – | 🔴 `boolean` | Removed for accessibility reasons. | +| getValueLabel | – | 🔴 `(RangeValue) => string` | Not yet implemented in S2. | +| orientation | – | 🔴 `Orientation` | Not yet implemented in S2. | +## StatusLight + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| variant | 🟢 `'brown' \| 'celery' \| 'chartreuse' \| 'cinnamon' \| 'cyan' \| 'fuchsia' \| 'indigo' \| 'informative' \| 'magenta' \| 'negative' \| 'neutral' \| 'notice' \| 'pink' \| 'positive' \| 'purple' \| 'seafoam' \| 'silver' \| 'turquoise' \| 'yellow'` | 🔴 `'celery' \| 'chartreuse' \| 'fuchsia' \| 'indigo' \| 'info' \| 'magenta' \| 'negative' \| 'neutral' \| 'notice' \| 'positive' \| 'purple' \| 'seafoam' \| 'yellow'` | | +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | – | | +| isDisabled | – | 🔴 `boolean` | Not supported in S2 design. | +## Switch + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| inputRef | 🟢 `MutableRefObject` | – | | +| slot | 🟢 `null \| string` | – | | +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | – | | +## TagGroup + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| size | 🟢 `'L' \| 'M' \| 'S'` | – | | +| isEmphasized | 🟢 `boolean` | – | | +| selectionBehavior | 🟢 `SelectionBehavior` | – | | +| disabledKeys | 🟢 `Iterable` | – | | +| selectionMode | 🟢 `SelectionMode` | – | | +| disallowEmptySelection | 🟢 `boolean` | – | | +| selectedKeys | 🟢 `'all' \| Iterable` | – | | +| defaultSelectedKeys | 🟢 `'all' \| Iterable` | – | | +| onSelectionChange | 🟢 `(Selection) => void` | – | | +| slot | 🟢 `null \| string` | – | | +| actionLabel | – | 🔴 `string` | Not yet implemented in S2.| +| onAction | – | 🔴 `() => void` | Not yet implemented in S2. | +| maxRows | – | 🔴 `number` | Not yet implemented in S2. | +| validationState | – | 🔴 `ValidationState` | Use `isInvalid` instead. | +## TextArea + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | – | | +| isInvalid | 🟢 `boolean` | – | | +| slot | 🟢 `null \| string` | – | | +| icon | – | 🔴 `ReactElement \| null` | Not yet implemented in S2. | +| isQuiet | – | 🔴 `boolean` | Not supported in S2 design. | +| placeholder | – | 🔴 `string` | Removed for accessibility reasons. | +| validationState | – | 🔴 `ValidationState` | Use `isInvalid` instead. | +## TextField + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| size | 🟢 `'L' \| 'M' \| 'S' \| 'XL'` | – | | +| isInvalid | 🟢 `boolean` | – | | +| slot | 🟢 `null \| string` | – | | +| icon | – | 🔴 `ReactElement \| null` | Not yet implemented in S2. | +| isQuiet | – | 🔴 `boolean` | Not supported in S2 design. | +| placeholder | – | 🔴 `string` | Removed for accessibility reasons. | +| validationState | – | 🔴 `ValidationState` | Use `isInvalid` instead. | +## Tooltip + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| variant | – | 🔴 `'info' \| 'negative' \| 'neutral' \| 'positive'` | Not supported in S2 design. | +| placement | – | 🔴 `'bottom' \| 'end' \| 'left' \| 'right' \| 'start' \| 'top'` | Use TooltipTrigger's `placement` instead | +| showIcon | – | 🔴 `boolean` | Not supported in S2 design. | +| isOpen | – | 🔴 `boolean` | Should be passed to TooltipTrigger instead. | +| id | – | 🔴 `string` | | +## TooltipTrigger + +| Prop | Spectrum 2 | RSP v3 | Comments | +|------|------------|--------|----------| +| placement | 🟢 `'bottom' \| 'end' \| 'left' \| 'right' \| 'start' \| 'top'` | 🔴 `'bottom' \| 'bottom left' \| 'bottom right' \| 'bottom start' \| 'bottom end' \| 'top' \| 'top left' \| 'top right' \| 'top start' \| 'top end' \| 'left' \| 'left top' \| 'left bottom' \| 'start' \| 'start top' \| 'start bottom' \| 'right' \| 'right top' \| 'right bottom' \| 'end' \| 'end top' \| 'end bottom'` | | +## Item + +The v3 `Item` component has been split into multiple components depending on the type of collection it is within. These include: + +* MenuItem +* PickerItem +* ComboBoxItem +* Breadcrumb +* Tag + +In addition, the `key` prop has been renamed to `id` on all item components. + +## Section + +The v3 `Section` component has been split into multiple components depending on the type of collection it is within. These include: + +* MenuSection +* PickerSection +* ComboBoxSection + +The section components accept a `Header` as a child instead of a `title` prop. Both a heading and description are now supported within a section header. + +```jsx + +
+ Publish and export + Social media, other formats +
+ Item +
+``` diff --git a/packages/@react-spectrum/s2/icon.d.ts b/packages/@react-spectrum/s2/icon.d.ts new file mode 100644 index 00000000000..768a2827aff --- /dev/null +++ b/packages/@react-spectrum/s2/icon.d.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import type {IconProps} from './dist/types'; +import type {ReactNode} from 'react'; + +declare function Icon(props: IconProps): ReactNode; +export default Icon; diff --git a/packages/@react-spectrum/s2/index.ts b/packages/@react-spectrum/s2/index.ts new file mode 100644 index 00000000000..dc59658a5da --- /dev/null +++ b/packages/@react-spectrum/s2/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +export * from './src'; diff --git a/packages/@react-spectrum/s2/package.json b/packages/@react-spectrum/s2/package.json new file mode 100644 index 00000000000..fbd5b602ebf --- /dev/null +++ b/packages/@react-spectrum/s2/package.json @@ -0,0 +1,118 @@ +{ + "name": "@react-spectrum/s2", + "version": "0.2.0", + "description": "Spectrum 2 UI components in React", + "license": "Apache-2.0", + "private": true, + "repository": { + "type": "git", + "url": "https://github.com/adobe/react-spectrum" + }, + "main": "dist/main.cjs", + "module": "dist/module.mjs", + "types": "dist/types.d.ts", + "page": "dist/page.cjs", + "style-module": "style/dist/module.mjs", + "style-main": "style/dist/main.cjs", + "style-types": "style/dist/types.d.ts", + "source": "src/index.ts", + "exports": { + ".": { + "types": "./dist/types.d.ts", + "module": "./dist/module.mjs", + "import": "./dist/module.mjs", + "require": "./dist/main.cjs" + }, + "./page.css": "./page.css", + "./style": { + "types": "./style/dist/types.d.ts", + "module": "./style/dist/module.mjs", + "import": "./style/dist/module.mjs", + "require": "./style/dist/main.cjs" + }, + "./icons/*": { + "types": "./icon.d.ts", + "module": "./icons/*.mjs", + "import": "./icons/*.mjs", + "require": "./icons/*.cjs" + } + }, + "targets": { + "module": {}, + "main": {}, + "types": {}, + "page": { + "source": "src/page.ts", + "isLibrary": true + }, + "style-module": { + "source": "style/spectrum-theme.ts", + "isLibrary": true, + "outputFormat": "esmodule", + "context": "node" + }, + "style-main": { + "source": "style/spectrum-theme.ts", + "isLibrary": true, + "outputFormat": "commonjs", + "context": "node" + }, + "style-types": { + "source": "style/spectrum-theme.ts" + }, + "icons-module": { + "source": "s2wf-icons/*.svg", + "distDir": "icons", + "isLibrary": true, + "outputFormat": "esmodule", + "includeNodeModules": false + }, + "icons-main": { + "source": "s2wf-icons/*.svg", + "distDir": "icons", + "isLibrary": true, + "outputFormat": "commonjs", + "includeNodeModules": false + } + }, + "browserslist": "last 2 Chrome versions, last 2 Safari versions, last 2 Firefox versions, last 2 Edge versions", + "sideEffects": [ + "*.css" + ], + "files": [ + "dist", + "style/dist", + "style/package.json", + "page.css", + "icons", + "icon.d.ts", + "src" + ], + "scripts": { + "prepublishOnly": "rm -rf dist/page.cjs* && mv dist/page*.css page.css || true", + "prepack": "npm pkg delete scripts devDependencies resolutions alias targets", + "postpack": "git checkout -- package.json" + }, + "devDependencies": { + "@adobe/spectrum-tokens": "^13.0.0-beta.34", + "@parcel/macros": "2.12.1-canary.3165" + }, + "dependencies": { + "@react-aria/i18n": "^3.11.0", + "@react-aria/interactions": "^3.22.0", + "@react-aria/utils": "^3.23.0", + "@react-spectrum/utils": "^3.11.3", + "@react-types/color": "3.0.0-rc.1", + "@react-types/dialog": "^3.5.8", + "@react-types/provider": "^3.7.2", + "@react-types/shared": "^3.22.1", + "@react-types/textfield": "^3.9.1", + "csstype": "^3.0.2", + "react-aria": "^3.31.1", + "react-aria-components": "^1.2.0" + }, + "peerDependencies": { + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + } +} diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_3DAsset_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_3DAsset_20_N.svg new file mode 100644 index 00000000000..0a4f36c4f90 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_3DAsset_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_3DMaterial_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_3DMaterial_20_N.svg new file mode 100644 index 00000000000..e5df0671f63 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_3DMaterial_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_3D_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_3D_20_N.svg new file mode 100644 index 00000000000..f742abceebc --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_3D_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Accessibility_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Accessibility_20_N.svg new file mode 100644 index 00000000000..e64d82bfb5b --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Accessibility_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AddCircle_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AddCircle_20_N.svg new file mode 100644 index 00000000000..70a6a6286ad --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AddCircle_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AddContent_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AddContent_20_N.svg new file mode 100644 index 00000000000..8778f90c64c --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AddContent_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Add_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Add_20_N.svg new file mode 100644 index 00000000000..c56b40c252a --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Add_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlertDiamond_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlertDiamond_20_N.svg new file mode 100644 index 00000000000..14c10f08fe9 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlertDiamond_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlertTriangle_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlertTriangle_20_N.svg new file mode 100644 index 00000000000..c3d38d9b456 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlertTriangle_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlignBottom_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlignBottom_20_N.svg new file mode 100644 index 00000000000..c6623225dab --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlignBottom_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlignCenter_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlignCenter_20_N.svg new file mode 100644 index 00000000000..4ee2f9c5b9c --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlignCenter_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlignLeft_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlignLeft_20_N.svg new file mode 100644 index 00000000000..2fce3cccce8 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlignLeft_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlignMiddle_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlignMiddle_20_N.svg new file mode 100644 index 00000000000..9c26344b367 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlignMiddle_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlignRight_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlignRight_20_N.svg new file mode 100644 index 00000000000..8e4fee50662 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlignRight_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlignTop_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlignTop_20_N.svg new file mode 100644 index 00000000000..12f20493154 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AlignTop_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AnimationNo_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AnimationNo_20_N.svg new file mode 100644 index 00000000000..086d6b2c77e --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AnimationNo_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Animation_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Animation_20_N.svg new file mode 100644 index 00000000000..0ae19138a83 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Animation_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AppsAll_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AppsAll_20_N.svg new file mode 100644 index 00000000000..2db5c0ebcbb --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AppsAll_20_N.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Apps_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Apps_20_N.svg new file mode 100644 index 00000000000..8140d4030dc --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Apps_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Archive_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Archive_20_N.svg new file mode 100644 index 00000000000..e74836599e7 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Archive_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ArrowHeadTool_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ArrowHeadTool_20_N.svg new file mode 100644 index 00000000000..4b2821283f9 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ArrowHeadTool_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Artboard_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Artboard_20_N.svg new file mode 100644 index 00000000000..1b4ef1cec24 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Artboard_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AspectRatio_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AspectRatio_20_N.svg new file mode 100644 index 00000000000..a8a7198a38c --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AspectRatio_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Asset_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Asset_20_N.svg new file mode 100644 index 00000000000..7ec46a6a17b --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Asset_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Attach_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Attach_20_N.svg new file mode 100644 index 00000000000..089f8679df8 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Attach_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AudioWave_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AudioWave_20_N.svg new file mode 100644 index 00000000000..3847d28a233 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AudioWave_20_N.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AutoSelectSubject_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AutoSelectSubject_20_N.svg new file mode 100644 index 00000000000..d58100d982f --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_AutoSelectSubject_20_N.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Background_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Background_20_N.svg new file mode 100644 index 00000000000..2e20d68d0c8 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Background_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_BadgeVerified_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_BadgeVerified_20_N.svg new file mode 100644 index 00000000000..92af8d2e074 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_BadgeVerified_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_BellRotated_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_BellRotated_20_N.svg new file mode 100644 index 00000000000..05d1e1aafa1 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_BellRotated_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Bell_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Bell_20_N.svg new file mode 100644 index 00000000000..a3ff61847f8 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Bell_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_BetaApp_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_BetaApp_20_N.svg new file mode 100644 index 00000000000..baaafa47786 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_BetaApp_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Binoculars_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Binoculars_20_N.svg new file mode 100644 index 00000000000..41aec2b6f2a --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Binoculars_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Blur_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Blur_20_N.svg new file mode 100644 index 00000000000..d4784b20a81 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Blur_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Brand_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Brand_20_N.svg new file mode 100644 index 00000000000..fec14ac6709 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Brand_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Briefcase_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Briefcase_20_N.svg new file mode 100644 index 00000000000..39a1b26ef47 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Briefcase_20_N.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_BrightnessContrast_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_BrightnessContrast_20_N.svg new file mode 100644 index 00000000000..3f9595311b8 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_BrightnessContrast_20_N.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Brush_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Brush_20_N.svg new file mode 100644 index 00000000000..78655d0cf44 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Brush_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Bug_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Bug_20_N.svg new file mode 100644 index 00000000000..f07bc42e2c4 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Bug_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Buildings_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Buildings_20_N.svg new file mode 100644 index 00000000000..1a1888f6fc3 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Buildings_20_N.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CCLibrary_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CCLibrary_20_N.svg new file mode 100644 index 00000000000..f08d323e6c8 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CCLibrary_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CalendarAdd_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CalendarAdd_20_N.svg new file mode 100644 index 00000000000..441fdeafeee --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CalendarAdd_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CalendarDay_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CalendarDay_20_N.svg new file mode 100644 index 00000000000..5ce7cd2330b --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CalendarDay_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CalendarEdit_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CalendarEdit_20_N.svg new file mode 100644 index 00000000000..4067135c46f --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CalendarEdit_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CalendarWeek_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CalendarWeek_20_N.svg new file mode 100644 index 00000000000..61a4de13819 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CalendarWeek_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Calendar_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Calendar_20_N.svg new file mode 100644 index 00000000000..48055041a5c --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Calendar_20_N.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CameraProperties_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CameraProperties_20_N.svg new file mode 100644 index 00000000000..5e50ba79004 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CameraProperties_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Camera_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Camera_20_N.svg new file mode 100644 index 00000000000..7bc94c959e8 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Camera_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Cancel_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Cancel_20_N.svg new file mode 100644 index 00000000000..e6028722905 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Cancel_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CheckBox_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CheckBox_20_N.svg new file mode 100644 index 00000000000..eb61498ac4e --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CheckBox_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CheckmarkCircle_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CheckmarkCircle_20_N.svg new file mode 100644 index 00000000000..a374312d549 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CheckmarkCircle_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Circle_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Circle_20_N.svg new file mode 100644 index 00000000000..90c07ed9064 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Circle_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ClockPending_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ClockPending_20_N.svg new file mode 100644 index 00000000000..58f59b11014 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ClockPending_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Clock_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Clock_20_N.svg new file mode 100644 index 00000000000..3588694774f --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Clock_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloseCaptions_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloseCaptions_20_N.svg new file mode 100644 index 00000000000..bf646fce61a --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloseCaptions_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStateDefault_22x20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStateDefault_22x20_N.svg new file mode 100644 index 00000000000..1b6103bc174 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStateDefault_22x20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStateDisconnected_22x20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStateDisconnected_22x20_N.svg new file mode 100644 index 00000000000..31424e07803 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStateDisconnected_22x20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStateErrorRed_22x20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStateErrorRed_22x20_N.svg new file mode 100644 index 00000000000..ed06eb20e03 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStateErrorRed_22x20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStateError_22x20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStateError_22x20_N.svg new file mode 100644 index 00000000000..fd3ede20868 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStateError_22x20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStateInProgress_22x20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStateInProgress_22x20_N.svg new file mode 100644 index 00000000000..6bc023b47b6 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStateInProgress_22x20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStatePaused_22x20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStatePaused_22x20_N.svg new file mode 100644 index 00000000000..108f89f05bd --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStatePaused_22x20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStatePending_22x20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStatePending_22x20_N.svg new file mode 100644 index 00000000000..9a2ab295933 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStatePending_22x20_N.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStateSlowConnection_22x20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStateSlowConnection_22x20_N.svg new file mode 100644 index 00000000000..0543489ded0 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CloudStateSlowConnection_22x20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Cloud_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Cloud_20_N.svg new file mode 100644 index 00000000000..c73b90ddf9f --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Cloud_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Collection_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Collection_20_N.svg new file mode 100644 index 00000000000..e139c6041db --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Collection_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ColorFill_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ColorFill_20_N.svg new file mode 100644 index 00000000000..4e4391ce853 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ColorFill_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ColorHarmony_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ColorHarmony_20_N.svg new file mode 100644 index 00000000000..456c5053795 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ColorHarmony_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Color_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Color_20_N.svg new file mode 100644 index 00000000000..2f7ab1c0bf8 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Color_20_N.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CommentShow_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CommentShow_20_N.svg new file mode 100644 index 00000000000..b82e33a7f84 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CommentShow_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CommentText_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CommentText_20_N.svg new file mode 100644 index 00000000000..34fd7d29de5 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CommentText_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Comment_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Comment_20_N.svg new file mode 100644 index 00000000000..4c11eb096c6 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Comment_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Community_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Community_20_N.svg new file mode 100644 index 00000000000..72a94b30ce6 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Community_20_N.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ContextualTaskBar_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ContextualTaskBar_20_N.svg new file mode 100644 index 00000000000..95242b1ceca --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ContextualTaskBar_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Contrast_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Contrast_20_N.svg new file mode 100644 index 00000000000..e395c2c16cd --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Contrast_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Copy_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Copy_20_N.svg new file mode 100644 index 00000000000..d6fb0ed9249 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Copy_20_N.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CornerRadiusBottomLeft_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CornerRadiusBottomLeft_20_N.svg new file mode 100644 index 00000000000..b2abc61cac3 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CornerRadiusBottomLeft_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CornerRadiusBottomRight_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CornerRadiusBottomRight_20_N.svg new file mode 100644 index 00000000000..10f97b62609 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CornerRadiusBottomRight_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CornerRadiusEach_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CornerRadiusEach_20_N.svg new file mode 100644 index 00000000000..11aac7d3e66 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CornerRadiusEach_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CornerRadiusTopLeft_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CornerRadiusTopLeft_20_N.svg new file mode 100644 index 00000000000..d50672c8cbe --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CornerRadiusTopLeft_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CornerRadiusTopRight_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CornerRadiusTopRight_20_N.svg new file mode 100644 index 00000000000..d73b41c22d4 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CornerRadiusTopRight_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CornerRadius_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CornerRadius_20_N.svg new file mode 100644 index 00000000000..e02f9fa27b2 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CornerRadius_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CropRotate_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CropRotate_20_N.svg new file mode 100644 index 00000000000..45f296cf2a2 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_CropRotate_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Crop_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Crop_20_N.svg new file mode 100644 index 00000000000..d63427de53b --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Crop_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Cut_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Cut_20_N.svg new file mode 100644 index 00000000000..3aa4e9d886d --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Cut_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Delete_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Delete_20_N.svg new file mode 100644 index 00000000000..8b92f705c25 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Delete_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceAll_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceAll_20_N.svg new file mode 100644 index 00000000000..dc753d22378 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceAll_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceDesktopMobile_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceDesktopMobile_20_N.svg new file mode 100644 index 00000000000..d60c8abe714 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceDesktopMobile_20_N.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceDesktop_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceDesktop_20_N.svg new file mode 100644 index 00000000000..d48ee1ff73d --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceDesktop_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceLaptop_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceLaptop_20_N.svg new file mode 100644 index 00000000000..821c74cde73 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceLaptop_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceMobile_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceMobile_20_N.svg new file mode 100644 index 00000000000..1f4ee04f3f8 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceMobile_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceMultiscreen_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceMultiscreen_20_N.svg new file mode 100644 index 00000000000..e73669f4bd3 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceMultiscreen_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DevicePhone_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DevicePhone_20_N.svg new file mode 100644 index 00000000000..0a47ddeafd5 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DevicePhone_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceTablet_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceTablet_20_N.svg new file mode 100644 index 00000000000..f53afa838b9 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DeviceTablet_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DirectSelect_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DirectSelect_20_N.svg new file mode 100644 index 00000000000..c6bedd17262 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DirectSelect_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Discover_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Discover_20_N.svg new file mode 100644 index 00000000000..28c295040e3 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Discover_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeBottomEdge_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeBottomEdge_20_N.svg new file mode 100644 index 00000000000..c3eb84e1cc1 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeBottomEdge_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeHorizontalCenter_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeHorizontalCenter_20_N.svg new file mode 100644 index 00000000000..9d44098d986 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeHorizontalCenter_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeLeftEdge_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeLeftEdge_20_N.svg new file mode 100644 index 00000000000..43f797954b7 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeLeftEdge_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeRightEdge_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeRightEdge_20_N.svg new file mode 100644 index 00000000000..fb6284c8e3e --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeRightEdge_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeSpaceHorizontally_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeSpaceHorizontally_20_N.svg new file mode 100644 index 00000000000..4a99570e284 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeSpaceHorizontally_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeSpaceVertically_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeSpaceVertically_20_N.svg new file mode 100644 index 00000000000..8fa8ec9c227 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeSpaceVertically_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeTopEdge_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeTopEdge_20_N.svg new file mode 100644 index 00000000000..35169fbacc4 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeTopEdge_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeVerticalCenter_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeVerticalCenter_20_N.svg new file mode 100644 index 00000000000..04addcb94cd --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_DistributeVerticalCenter_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Download_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Download_20_N.svg new file mode 100644 index 00000000000..69b367dad02 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Download_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Draw_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Draw_20_N.svg new file mode 100644 index 00000000000..66b66928d9c --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Draw_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Duplicate_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Duplicate_20_N.svg new file mode 100644 index 00000000000..2a6e48e6721 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Duplicate_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_EditNo_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_EditNo_20_N.svg new file mode 100644 index 00000000000..82aa327d1d8 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_EditNo_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Edit_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Edit_20_N.svg new file mode 100644 index 00000000000..e8cd259b497 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Edit_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Education_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Education_20_N.svg new file mode 100644 index 00000000000..820ba203f98 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Education_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Effects_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Effects_20_N.svg new file mode 100644 index 00000000000..01f6ad98d01 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Effects_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Email_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Email_20_N.svg new file mode 100644 index 00000000000..46182e1122a --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Email_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Emoji_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Emoji_20_N.svg new file mode 100644 index 00000000000..69606b02de9 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Emoji_20_N.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Erase_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Erase_20_N.svg new file mode 100644 index 00000000000..bb9a510b84a --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Erase_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ExportTo_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ExportTo_20_N.svg new file mode 100644 index 00000000000..b04a6e4081d --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ExportTo_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Exposure_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Exposure_20_N.svg new file mode 100644 index 00000000000..092fff9138c --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Exposure_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Eyedropper_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Eyedropper_20_N.svg new file mode 100644 index 00000000000..55bd6cf2c43 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Eyedropper_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FileAdd_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FileAdd_20_N.svg new file mode 100644 index 00000000000..ca66f9328d3 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FileAdd_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FileConvert_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FileConvert_20_N.svg new file mode 100644 index 00000000000..16ffa00e15d --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FileConvert_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FileText_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FileText_20_N.svg new file mode 100644 index 00000000000..1c558243f49 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FileText_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FileUser_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FileUser_20_N.svg new file mode 100644 index 00000000000..5c58ff4b5ec --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FileUser_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_File_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_File_20_N.svg new file mode 100644 index 00000000000..4983df0d316 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_File_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Files_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Files_20_N.svg new file mode 100644 index 00000000000..573a83cdd6d --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Files_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Filmstrip_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Filmstrip_20_N.svg new file mode 100644 index 00000000000..aa55b423816 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Filmstrip_20_N.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Filter_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Filter_20_N.svg new file mode 100644 index 00000000000..f684d0339ff --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Filter_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Filters_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Filters_20_N.svg new file mode 100644 index 00000000000..96b28ca5916 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Filters_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FindAndReplace_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FindAndReplace_20_N.svg new file mode 100644 index 00000000000..69f34061f6b --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FindAndReplace_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Flag_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Flag_20_N.svg new file mode 100644 index 00000000000..0f0f622caea --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Flag_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FlipHorizontal_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FlipHorizontal_20_N.svg new file mode 100644 index 00000000000..aa8985ff15c --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FlipHorizontal_20_N.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FlipVertical_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FlipVertical_20_N.svg new file mode 100644 index 00000000000..9f3866d137e --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FlipVertical_20_N.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FolderAdd_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FolderAdd_20_N.svg new file mode 100644 index 00000000000..ba34823060e --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FolderAdd_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FolderBreadcrumb_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FolderBreadcrumb_20_N.svg new file mode 100644 index 00000000000..6a64944aceb --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FolderBreadcrumb_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FolderClock_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FolderClock_20_N.svg new file mode 100644 index 00000000000..3e2e51c0ee1 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FolderClock_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FolderOpen_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FolderOpen_20_N.svg new file mode 100644 index 00000000000..4c37028a1b6 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FolderOpen_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Folder_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Folder_20_N.svg new file mode 100644 index 00000000000..267eeaebd43 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Folder_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FontPicker_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FontPicker_20_N.svg new file mode 100644 index 00000000000..3b212af41d9 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FontPicker_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FullScreenExit_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FullScreenExit_20_N.svg new file mode 100644 index 00000000000..ce84a28d306 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FullScreenExit_20_N.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FullScreen_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FullScreen_20_N.svg new file mode 100644 index 00000000000..4a8a6e83e69 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_FullScreen_20_N.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Gift_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Gift_20_N.svg new file mode 100644 index 00000000000..402525285c7 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Gift_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_GlobeGrid_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_GlobeGrid_20_N.svg new file mode 100644 index 00000000000..0d31469c46a --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_GlobeGrid_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_GridTypeDots_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_GridTypeDots_20_N.svg new file mode 100644 index 00000000000..520fe5401e5 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_GridTypeDots_20_N.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_GridTypeLines_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_GridTypeLines_20_N.svg new file mode 100644 index 00000000000..1fe89c3339b --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_GridTypeLines_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_GridsAndRulers_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_GridsAndRulers_20_N.svg new file mode 100644 index 00000000000..515275a8163 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_GridsAndRulers_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_GroupNo_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_GroupNo_20_N.svg new file mode 100644 index 00000000000..946fbebf20d --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_GroupNo_20_N.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Group_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Group_20_N.svg new file mode 100644 index 00000000000..af63a00d03e --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Group_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Hand_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Hand_20_N.svg new file mode 100644 index 00000000000..318a2a4a7da --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Hand_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Heart_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Heart_20_N.svg new file mode 100644 index 00000000000..5a706181064 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Heart_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_HelpCircle_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_HelpCircle_20_N.svg new file mode 100644 index 00000000000..3157c051324 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_HelpCircle_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_History_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_History_20_N.svg new file mode 100644 index 00000000000..fe6a38552a0 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_History_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Home_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Home_20_N.svg new file mode 100644 index 00000000000..31f8d051fe7 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Home_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ImageAdd_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ImageAdd_20_N.svg new file mode 100644 index 00000000000..223f46f3e78 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ImageAdd_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ImageBackgroundRemove_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ImageBackgroundRemove_20_N.svg new file mode 100644 index 00000000000..28aa2d54ac2 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ImageBackgroundRemove_20_N.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Image_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Image_20_N.svg new file mode 100644 index 00000000000..c7557924972 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Image_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Images_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Images_20_N.svg new file mode 100644 index 00000000000..2f85b7d541a --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Images_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_InfoCircle_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_InfoCircle_20_N.svg new file mode 100644 index 00000000000..f436c057ca6 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_InfoCircle_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Interaction_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Interaction_20_N.svg new file mode 100644 index 00000000000..2570d30cba6 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Interaction_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Invert_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Invert_20_N.svg new file mode 100644 index 00000000000..a2fc0ed4b7c --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Invert_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Invite_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Invite_20_N.svg new file mode 100644 index 00000000000..2e7695f342d --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Invite_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Keyboard_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Keyboard_20_N.svg new file mode 100644 index 00000000000..51af4b47a11 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Keyboard_20_N.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_LassoSelect_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_LassoSelect_20_N.svg new file mode 100644 index 00000000000..46a8a2845a7 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_LassoSelect_20_N.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Layers_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Layers_20_N.svg new file mode 100644 index 00000000000..f676c6cc1aa --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Layers_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Layout_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Layout_20_N.svg new file mode 100644 index 00000000000..9952c9a9cf9 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Layout_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Leave_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Leave_20_N.svg new file mode 100644 index 00000000000..714a0e12c71 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Leave_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Lightbulb_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Lightbulb_20_N.svg new file mode 100644 index 00000000000..94ebcc87527 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Lightbulb_20_N.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Lighten_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Lighten_20_N.svg new file mode 100644 index 00000000000..79b8124bd97 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Lighten_20_N.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_LineHeight_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_LineHeight_20_N.svg new file mode 100644 index 00000000000..1ce00ed4b09 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_LineHeight_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Line_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Line_20_N.svg new file mode 100644 index 00000000000..962d26ba18a --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Line_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_LinkVertical_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_LinkVertical_20_N.svg new file mode 100644 index 00000000000..a51e3d78110 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_LinkVertical_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Link_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Link_20_N.svg new file mode 100644 index 00000000000..5118cb0fc9a --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Link_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ListBulleted_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ListBulleted_20_N.svg new file mode 100644 index 00000000000..13bca730ce4 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ListBulleted_20_N.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ListMultiSelect_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ListMultiSelect_20_N.svg new file mode 100644 index 00000000000..1474bf7d806 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ListMultiSelect_20_N.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ListNumbered_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ListNumbered_20_N.svg new file mode 100644 index 00000000000..f08acec9008 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ListNumbered_20_N.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Location_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Location_20_N.svg new file mode 100644 index 00000000000..0820c441ef6 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Location_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_LockOpen_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_LockOpen_20_N.svg new file mode 100644 index 00000000000..45b5383b30e --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_LockOpen_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Lock_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Lock_20_N.svg new file mode 100644 index 00000000000..af6b9b6bf00 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Lock_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Logo_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Logo_20_N.svg new file mode 100644 index 00000000000..cf47feb5b9e --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Logo_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MagicWand_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MagicWand_20_N.svg new file mode 100644 index 00000000000..96844574ef3 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MagicWand_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Market_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Market_20_N.svg new file mode 100644 index 00000000000..17d73de016b --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Market_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MaskDisable_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MaskDisable_20_N.svg new file mode 100644 index 00000000000..d1418eac86e --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MaskDisable_20_N.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Mask_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Mask_20_N.svg new file mode 100644 index 00000000000..aa370b83a3b --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Mask_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Maximize_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Maximize_20_N.svg new file mode 100644 index 00000000000..d5714ae7176 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Maximize_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MediaOffline_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MediaOffline_N.svg new file mode 100644 index 00000000000..5c6ba2887ab --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MediaOffline_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Mention_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Mention_20_N.svg new file mode 100644 index 00000000000..40a321a007f --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Mention_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MenuHamburger_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MenuHamburger_20_N.svg new file mode 100644 index 00000000000..d7f503ed680 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MenuHamburger_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MicrophoneOff_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MicrophoneOff_20_N.svg new file mode 100644 index 00000000000..b345947fa46 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MicrophoneOff_20_N.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Microphone_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Microphone_20_N.svg new file mode 100644 index 00000000000..aca64099ccf --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Microphone_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Minimize_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Minimize_20_N.svg new file mode 100644 index 00000000000..fe5b84dcd3f --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Minimize_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_More_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_More_20_N.svg new file mode 100644 index 00000000000..239ac78a6d9 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_More_20_N.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Move_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Move_20_N.svg new file mode 100644 index 00000000000..9409a512071 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Move_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MovieCamera_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MovieCamera_20_N.svg new file mode 100644 index 00000000000..dc7f8bb8cde --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MovieCamera_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MusicNote_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MusicNote_20_N.svg new file mode 100644 index 00000000000..522b1461c36 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MusicNote_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_New_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_New_20_N.svg new file mode 100644 index 00000000000..f62e42bceb9 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_New_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Nudge_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Nudge_20_N.svg new file mode 100644 index 00000000000..971e9f2eda4 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Nudge_20_N.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OpenIn_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OpenIn_20_N.svg new file mode 100644 index 00000000000..d1196e45c7b --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OpenIn_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OrderBottom_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OrderBottom_20_N.svg new file mode 100644 index 00000000000..e23c41d2661 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OrderBottom_20_N.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OrderOneDown_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OrderOneDown_20_N.svg new file mode 100644 index 00000000000..03b6831102a --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OrderOneDown_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OrderOneUp_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OrderOneUp_20_N.svg new file mode 100644 index 00000000000..4acd414c4b5 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OrderOneUp_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OrderTop_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OrderTop_20_N.svg new file mode 100644 index 00000000000..f750475ed94 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OrderTop_20_N.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Order_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Order_20_N.svg new file mode 100644 index 00000000000..50f7846c1cc --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Order_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OrientationLandscape_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OrientationLandscape_20_N.svg new file mode 100644 index 00000000000..b8c93cd5e23 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OrientationLandscape_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OrientationPortrait_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OrientationPortrait_20_N.svg new file mode 100644 index 00000000000..f3e8e1b0730 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_OrientationPortrait_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Paste_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Paste_20_N.svg new file mode 100644 index 00000000000..9ae002b7216 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Paste_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Path_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Path_20_N.svg new file mode 100644 index 00000000000..8e16e962a1d --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Path_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Pattern_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Pattern_20_N.svg new file mode 100644 index 00000000000..2cebd09eaa0 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Pattern_20_N.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Pause_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Pause_20_N.svg new file mode 100644 index 00000000000..e9ac3a1de96 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Pause_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_PenBrush_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_PenBrush_20_N.svg new file mode 100644 index 00000000000..cff3d33262e --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_PenBrush_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_People_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_People_20_N.svg new file mode 100644 index 00000000000..beb67666536 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_People_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Percentage_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Percentage_20_N.svg new file mode 100644 index 00000000000..ffa991f3acc --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Percentage_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Play_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Play_20_N.svg new file mode 100644 index 00000000000..68fa2bf2f95 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Play_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_PluginGear_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_PluginGear_20_N.svg new file mode 100644 index 00000000000..1ec4f788fe3 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_PluginGear_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Plugin_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Plugin_20_N.svg new file mode 100644 index 00000000000..b5d5b40e7df --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Plugin_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Polygon3_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Polygon3_20_N.svg new file mode 100644 index 00000000000..0b2c93b0ffd --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Polygon3_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Polygon4_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Polygon4_20_N.svg new file mode 100644 index 00000000000..acc5b8cdce5 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Polygon4_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Polygon5_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Polygon5_20_N.svg new file mode 100644 index 00000000000..0688ea262e6 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Polygon5_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Polygon6_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Polygon6_20_N.svg new file mode 100644 index 00000000000..288eacf23ec --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Polygon6_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Preview_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Preview_20_N.svg new file mode 100644 index 00000000000..fa3ce51b6b9 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Preview_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Print_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Print_20_N.svg new file mode 100644 index 00000000000..27302bb9a0a --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Print_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ProjectAddInto_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ProjectAddInto_20_N.svg new file mode 100644 index 00000000000..702f36eda85 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ProjectAddInto_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ProjectCreate_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ProjectCreate_20_N.svg new file mode 100644 index 00000000000..9d2f6b54567 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ProjectCreate_20_N.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Project_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Project_20_N.svg new file mode 100644 index 00000000000..f36c0216002 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Project_20_N.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Promote_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Promote_20_N.svg new file mode 100644 index 00000000000..e37237085ae --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Promote_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Prompt_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Prompt_20_N.svg new file mode 100644 index 00000000000..f5beeaed486 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Prompt_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Properties_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Properties_20_N.svg new file mode 100644 index 00000000000..cedfb8a149c --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Properties_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Prototyping_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Prototyping_20_N.svg new file mode 100644 index 00000000000..fed6cdfc46e --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Prototyping_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_PublishNo_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_PublishNo_20_N.svg new file mode 100644 index 00000000000..3b7a6ad7acc --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_PublishNo_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Publish_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Publish_20_N.svg new file mode 100644 index 00000000000..6a7ef023af5 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Publish_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RadioButton_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RadioButton_20_N.svg new file mode 100644 index 00000000000..e34d4a4a3ea --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RadioButton_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RectangleHoriz_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RectangleHoriz_20_N.svg new file mode 100644 index 00000000000..26731bfbb0b --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RectangleHoriz_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Redo_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Redo_20_N.svg new file mode 100644 index 00000000000..b5ce0719926 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Redo_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Refresh_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Refresh_20_N.svg new file mode 100644 index 00000000000..198fb6050bd --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Refresh_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RemoveCircle_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RemoveCircle_20_N.svg new file mode 100644 index 00000000000..31aaeed5d2e --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RemoveCircle_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Rename_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Rename_20_N.svg new file mode 100644 index 00000000000..311a2904d9d --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Rename_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Replace_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Replace_20_N.svg new file mode 100644 index 00000000000..9009e3b0eec --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Replace_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ReportAbuse_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ReportAbuse_20_N.svg new file mode 100644 index 00000000000..dd928cdf6ff --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ReportAbuse_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Resize_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Resize_20_N.svg new file mode 100644 index 00000000000..06f82ec41cf --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Resize_20_N.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Revert_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Revert_20_N.svg new file mode 100644 index 00000000000..79b4b4628a1 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Revert_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ReviewLink_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ReviewLink_20_N.svg new file mode 100644 index 00000000000..f0aee72438f --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ReviewLink_20_N.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Ribbon_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Ribbon_20_N.svg new file mode 100644 index 00000000000..f62753f069c --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Ribbon_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RocketQuickActions_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RocketQuickActions_20_N.svg new file mode 100644 index 00000000000..aa079005d35 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RocketQuickActions_20_N.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RotateCCW_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RotateCCW_20_N.svg new file mode 100644 index 00000000000..c954df90740 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RotateCCW_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RotateCW_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RotateCW_20_N.svg new file mode 100644 index 00000000000..b980ef5fdb8 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RotateCW_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RotateOrientation_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RotateOrientation_20_N.svg new file mode 100644 index 00000000000..871205237e9 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_RotateOrientation_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Saturation_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Saturation_20_N.svg new file mode 100644 index 00000000000..99b8eeec7b7 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Saturation_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Search_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Search_20_N.svg new file mode 100644 index 00000000000..db112b196e8 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Search_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SelectAllItems_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SelectAllItems_20_N.svg new file mode 100644 index 00000000000..4b22085eddc --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SelectAllItems_20_N.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SelectAndMove_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SelectAndMove_20_N.svg new file mode 100644 index 00000000000..203b599219b --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SelectAndMove_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SelectNo_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SelectNo_20_N.svg new file mode 100644 index 00000000000..72e8da6e448 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SelectNo_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SelectRectangle_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SelectRectangle_20_N.svg new file mode 100644 index 00000000000..f0876e23459 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SelectRectangle_20_N.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Select_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Select_20_N.svg new file mode 100644 index 00000000000..abe8cf93a22 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Select_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Send_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Send_20_N.svg new file mode 100644 index 00000000000..c1849e7d733 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Send_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Settings_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Settings_20_N.svg new file mode 100644 index 00000000000..d9ca378b3ca --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Settings_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Shapes_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Shapes_20_N.svg new file mode 100644 index 00000000000..cf0501e2acc --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Shapes_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ShareAndroid_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ShareAndroid_20_N.svg new file mode 100644 index 00000000000..38942fba363 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ShareAndroid_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Share_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Share_20_N.svg new file mode 100644 index 00000000000..8e1f2acdfe6 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Share_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ShoppingCart_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ShoppingCart_20_N.svg new file mode 100644 index 00000000000..6c0fe535b0c --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ShoppingCart_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Shuffle_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Shuffle_20_N.svg new file mode 100644 index 00000000000..5b3e9987990 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Shuffle_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Similar_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Similar_20_N.svg new file mode 100644 index 00000000000..ba0c1a7c936 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Similar_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Slideshow_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Slideshow_20_N.svg new file mode 100644 index 00000000000..4fac6b0073b --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Slideshow_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SocialNetwork_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SocialNetwork_20_N.svg new file mode 100644 index 00000000000..8cf3550bf31 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SocialNetwork_20_N.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SortDown_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SortDown_20_N.svg new file mode 100644 index 00000000000..182c0b4729b --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SortDown_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SortUp_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SortUp_20_N.svg new file mode 100644 index 00000000000..a690a2233a5 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SortUp_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Sort_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Sort_20_N.svg new file mode 100644 index 00000000000..4746278999e --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Sort_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StampClone_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StampClone_20_N.svg new file mode 100644 index 00000000000..378f2388998 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StampClone_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StarFilled_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StarFilled_20_N.svg new file mode 100644 index 00000000000..bada9b127f0 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StarFilled_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Star_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Star_20_N.svg new file mode 100644 index 00000000000..52ca6a4f7eb --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Star_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StepBackward_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StepBackward_20_N.svg new file mode 100644 index 00000000000..265b8280282 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StepBackward_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StepForward_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StepForward_20_N.svg new file mode 100644 index 00000000000..1c2f86469e2 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StepForward_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StickyNote_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StickyNote_20_N.svg new file mode 100644 index 00000000000..8f91a9ec2b4 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StickyNote_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StrokeDotted_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StrokeDotted_20_N.svg new file mode 100644 index 00000000000..ee6ab04da0f --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StrokeDotted_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StrokeSolid_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StrokeSolid_20_N.svg new file mode 100644 index 00000000000..2df488d49ef --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StrokeSolid_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StrokeWidth_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StrokeWidth_20_N.svg new file mode 100644 index 00000000000..cbf70f127d0 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_StrokeWidth_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SwitchVertical_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SwitchVertical_20_N.svg new file mode 100644 index 00000000000..fb2605722c4 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_SwitchVertical_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Switch_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Switch_20_N.svg new file mode 100644 index 00000000000..4d4bc38c923 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Switch_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Tag_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Tag_20_N.svg new file mode 100644 index 00000000000..f9b0a5417a2 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Tag_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Target_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Target_20_N.svg new file mode 100644 index 00000000000..916e77c89da --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Target_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Temperature_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Temperature_20_N.svg new file mode 100644 index 00000000000..52bc0c0f2ad --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Temperature_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Template_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Template_20_N.svg new file mode 100644 index 00000000000..5718cc30e35 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Template_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAdd_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAdd_20_N.svg new file mode 100644 index 00000000000..7332ebb59b7 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAdd_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignCenter_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignCenter_20_N.svg new file mode 100644 index 00000000000..a00dadb7fc6 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignCenter_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignJustifyLastCenter_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignJustifyLastCenter_20_N.svg new file mode 100644 index 00000000000..13a2aa21701 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignJustifyLastCenter_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignJustifyLastLeft_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignJustifyLastLeft_20_N.svg new file mode 100644 index 00000000000..c3e9f437d20 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignJustifyLastLeft_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignJustifyLastRight_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignJustifyLastRight_20_N.svg new file mode 100644 index 00000000000..6cdd0eae004 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignJustifyLastRight_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignJustify_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignJustify_20_N.svg new file mode 100644 index 00000000000..e661c63d3bf --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignJustify_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignLeft_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignLeft_20_N.svg new file mode 100644 index 00000000000..6dcbc4ff60e --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignLeft_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignRight_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignRight_20_N.svg new file mode 100644 index 00000000000..eaf51fa716a --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextAlignRight_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextBold_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextBold_20_N.svg new file mode 100644 index 00000000000..5a29543d32a --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextBold_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextItalic_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextItalic_20_N.svg new file mode 100644 index 00000000000..8c79f63d2bd --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextItalic_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextNumbers_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextNumbers_20_N.svg new file mode 100644 index 00000000000..23dbb6ec9c0 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextNumbers_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextParagraph_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextParagraph_20_N.svg new file mode 100644 index 00000000000..fb0e5e9de30 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextParagraph_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextSize_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextSize_20_N.svg new file mode 100644 index 00000000000..a90afb4a0e7 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextSize_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextStrikeThrough_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextStrikeThrough_20_N.svg new file mode 100644 index 00000000000..5bf8e2db97f --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextStrikeThrough_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextSubscript_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextSubscript_20_N.svg new file mode 100644 index 00000000000..849819de76d --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextSubscript_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextSuperscript_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextSuperscript_20_N.svg new file mode 100644 index 00000000000..5224b1d5c40 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextSuperscript_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextUnderline_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextUnderline_20_N.svg new file mode 100644 index 00000000000..f34d0456c5b --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextUnderline_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextVariableFontSettings_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextVariableFontSettings_20_N.svg new file mode 100644 index 00000000000..e947983df2b --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TextVariableFontSettings_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Text_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Text_20_N.svg new file mode 100644 index 00000000000..cb8ebbe315d --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Text_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ThumbDown_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ThumbDown_20_N.svg new file mode 100644 index 00000000000..7d0ecf9009d --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ThumbDown_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ThumbUp_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ThumbUp_20_N.svg new file mode 100644 index 00000000000..506272cf695 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ThumbUp_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Toggle_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Toggle_20_N.svg new file mode 100644 index 00000000000..a289e226dde --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Toggle_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TouchOneFingerSwipeLeftRight_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TouchOneFingerSwipeLeftRight_20_N.svg new file mode 100644 index 00000000000..abf750eb8f7 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TouchOneFingerSwipeLeftRight_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Transcript_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Transcript_20_N.svg new file mode 100644 index 00000000000..7f2d9c1b549 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Transcript_20_N.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TransformDistort_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TransformDistort_20_N.svg new file mode 100644 index 00000000000..8d5d569d61c --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TransformDistort_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TransformGeneric_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TransformGeneric_20_N.svg new file mode 100644 index 00000000000..191370ad743 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TransformGeneric_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TransformPerspective_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TransformPerspective_20_N.svg new file mode 100644 index 00000000000..bc62e5a8a91 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TransformPerspective_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TransformSkew_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TransformSkew_20_N.svg new file mode 100644 index 00000000000..f5419589fc1 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TransformSkew_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TransformWarp_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TransformWarp_20_N.svg new file mode 100644 index 00000000000..4295471647a --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_TransformWarp_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Translate_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Translate_20_N.svg new file mode 100644 index 00000000000..42844a24332 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Translate_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Tutorials_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Tutorials_20_N.svg new file mode 100644 index 00000000000..cdcc36ba557 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Tutorials_20_N.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UnLink_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UnLink_20_N.svg new file mode 100644 index 00000000000..9d1df308dc1 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UnLink_20_N.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Undo_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Undo_20_N.svg new file mode 100644 index 00000000000..460e4676c0e --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Undo_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UnlinkHoriz_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UnlinkHoriz_20_N.svg new file mode 100644 index 00000000000..6bfc6945c5a --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UnlinkHoriz_20_N.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UnlinkVertical_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UnlinkVertical_20_N.svg new file mode 100644 index 00000000000..1671751e0b2 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UnlinkVertical_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UploadToCloud_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UploadToCloud_20_N.svg new file mode 100644 index 00000000000..000bb6bbc67 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UploadToCloud_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Upload_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Upload_20_N.svg new file mode 100644 index 00000000000..5b4a963479b --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Upload_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UserAdd_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UserAdd_20_N.svg new file mode 100644 index 00000000000..11c5b21d84e --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UserAdd_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UserAvatar_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UserAvatar_20_N.svg new file mode 100644 index 00000000000..0d29f6c62a7 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UserAvatar_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UserEdit_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UserEdit_20_N.svg new file mode 100644 index 00000000000..e66d2bac967 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UserEdit_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UserFollowing_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UserFollowing_20_N.svg new file mode 100644 index 00000000000..510ce116d00 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UserFollowing_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UserGroup_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UserGroup_20_N.svg new file mode 100644 index 00000000000..e1fca1e2889 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UserGroup_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UserLock_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UserLock_20_N.svg new file mode 100644 index 00000000000..869af9656f4 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UserLock_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_User_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_User_20_N.svg new file mode 100644 index 00000000000..96efe26814e --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_User_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UsersLock_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UsersLock_20_N.svg new file mode 100644 index 00000000000..e3761b10d48 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_UsersLock_20_N.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_VectorDraw_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_VectorDraw_20_N.svg new file mode 100644 index 00000000000..4507330c426 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_VectorDraw_20_N.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Video_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Video_20_N.svg new file mode 100644 index 00000000000..476aacf0fcb --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Video_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ViewGrid_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ViewGrid_20_N.svg new file mode 100644 index 00000000000..cf317f62af2 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ViewGrid_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ViewList_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ViewList_20_N.svg new file mode 100644 index 00000000000..61e723325c2 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ViewList_20_N.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_VisibilityOff_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_VisibilityOff_20_N.svg new file mode 100644 index 00000000000..0ebbe6ba426 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_VisibilityOff_20_N.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Visibility_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Visibility_20_N.svg new file mode 100644 index 00000000000..4f1415c9598 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_Visibility_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_VolumeOff_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_VolumeOff_20_N.svg new file mode 100644 index 00000000000..ee73797c2a6 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_VolumeOff_20_N.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_VolumeOne_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_VolumeOne_20_N.svg new file mode 100644 index 00000000000..986167d4140 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_VolumeOne_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_VolumeTwo_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_VolumeTwo_20_N.svg new file mode 100644 index 00000000000..5fceed4f8d2 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_VolumeTwo_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_WebNavBar_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_WebNavBar_20_N.svg new file mode 100644 index 00000000000..38b4abc1bbe --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_WebNavBar_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_WebPage_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_WebPage_20_N.svg new file mode 100644 index 00000000000..2b20327d681 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_WebPage_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ZoomIn_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ZoomIn_20_N.svg new file mode 100644 index 00000000000..8d16c1482a1 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ZoomIn_20_N.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ZoomOut_20_N.svg b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ZoomOut_20_N.svg new file mode 100644 index 00000000000..0d6a2767181 --- /dev/null +++ b/packages/@react-spectrum/s2/s2wf-icons/S2_Icon_ZoomOut_20_N.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/@react-spectrum/s2/spectrum-illustrations/Cloud.svg b/packages/@react-spectrum/s2/spectrum-illustrations/Cloud.svg new file mode 100644 index 00000000000..afd9fa40f66 --- /dev/null +++ b/packages/@react-spectrum/s2/spectrum-illustrations/Cloud.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/@react-spectrum/s2/spectrum-illustrations/DropToUpload.svg b/packages/@react-spectrum/s2/spectrum-illustrations/DropToUpload.svg new file mode 100644 index 00000000000..76824d0bd96 --- /dev/null +++ b/packages/@react-spectrum/s2/spectrum-illustrations/DropToUpload.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/@react-spectrum/s2/src/ActionButton.tsx b/packages/@react-spectrum/s2/src/ActionButton.tsx new file mode 100644 index 00000000000..e9468932e57 --- /dev/null +++ b/packages/@react-spectrum/s2/src/ActionButton.tsx @@ -0,0 +1,210 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import {baseColor, fontRelative, style} from '../style/spectrum-theme' with { type: 'macro' }; +import {ButtonProps, ButtonRenderProps, OverlayTriggerStateContext, Provider, Button as RACButton, Text} from 'react-aria-components'; +import {centerBaseline} from './CenterBaseline'; +import {FocusableRef} from '@react-types/shared'; +import {focusRing, getAllowedOverrides, StyleProps} from './style-utils' with { type: 'macro' }; +import {forwardRef, ReactNode, useContext} from 'react'; +import {IconContext} from './Icon'; +import {pressScale} from './pressScale'; +import {TextContext} from './Content'; +import {useFocusableRef} from '@react-spectrum/utils'; + +export interface ActionButtonStyleProps { + /** + * The size of the ActionButton. + * + * @default 'M' + */ + size?: 'XS' | 'S' | 'M' | 'L' | 'XL', + /** The static color style to apply. Useful when the ActionButton appears over a color background. */ + staticColor?: 'black' | 'white', + /** Whether the button should be displayed with a [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */ + isQuiet?: boolean +} + +interface ToggleButtonStyleProps { + /** Whether the ActionButton should be selected (controlled). */ + isSelected?: boolean, + /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */ + isEmphasized?: boolean +} + +export interface ActionButtonProps extends Omit, StyleProps, ActionButtonStyleProps { + /** The content to display in the ActionButton. */ + children?: ReactNode +} + +// These styles handle both ActionButton and ToggleButton +export const btnStyles = style({ + ...focusRing(), + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + columnGap: 'text-to-visual', + fontFamily: 'sans', + fontWeight: 'medium', + fontSize: 'control', + userSelect: 'none', + height: 'control', + minWidth: 'control', + transition: 'default', + forcedColorAdjust: 'none', + backgroundColor: { + default: { + ...baseColor('gray-100'), + default: { + default: 'gray-100', + isQuiet: 'transparent' + } + }, + isSelected: { + default: 'neutral', + isEmphasized: 'accent', + isDisabled: { + default: 'gray-100', + isQuiet: 'transparent' + } + }, + staticColor: { + white: { + ...baseColor('transparent-white-100'), + default: { + default: 'transparent-white-100', + isQuiet: 'transparent' + }, + isSelected: { + default: baseColor('transparent-white-800'), + isDisabled: { + default: 'transparent-white-100', + isQuiet: 'transparent' + } + } + }, + black: { + ...baseColor('transparent-black-100'), + default: { + default: 'transparent-black-100', + isQuiet: 'transparent' + }, + isSelected: { + default: baseColor('transparent-black-800'), + isDisabled: { + default: 'transparent-black-100', + isQuiet: 'transparent' + } + } + } + }, + forcedColors: { + default: 'ButtonFace', + isSelected: { + default: 'Highlight', + isDisabled: 'ButtonFace' + } + } + }, + color: { + default: 'neutral', + isSelected: { + default: 'gray-25', + isEmphasized: 'white' + }, + isDisabled: 'disabled', + staticColor: { + white: { + default: baseColor('transparent-white-800'), + isSelected: 'black', + isDisabled: 'transparent-white-400' + }, + black: { + default: baseColor('transparent-black-800'), + isSelected: 'white', + isDisabled: 'transparent-black-400' + } + }, + forcedColors: { + default: 'ButtonText', + isSelected: 'HighlightText', + isDisabled: { + default: 'GrayText' + } + } + }, + '--iconPrimary': { + type: 'fill', + value: 'currentColor' + }, + outlineColor: { + default: 'focus-ring', + staticColor: { + white: 'white', + black: 'black' + }, + forcedColors: 'Highlight' + }, + borderStyle: 'none', + paddingX: { + default: 'edge-to-text', + ':has([slot=icon]:only-child)': 0 + }, + paddingY: 0, + borderRadius: 'control', + '--iconMargin': { + type: 'marginTop', + value: { + default: fontRelative(-2), + ':has([slot=icon]:only-child)': 0 + } + }, + disableTapHighlight: true +}, getAllowedOverrides()); + +function ActionButton(props: ActionButtonProps, ref: FocusableRef) { + let domRef = useFocusableRef(ref); + let overlayTriggerState = useContext(OverlayTriggerStateContext); + + return ( + (props.UNSAFE_className || '') + btnStyles({ + ...renderProps, + // Retain hover styles when an overlay is open. + isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false, + staticColor: props.staticColor, + size: props.size || 'M', + isQuiet: props.isQuiet + }, props.styles)}> + + {typeof props.children === 'string' ? {props.children} : props.children} + + + ); +} + +/** + * ActionButtons allow users to perform an action. + * They’re used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren’t meant to draw a lot of attention. + */ +let _ActionButton = forwardRef(ActionButton); +export {_ActionButton as ActionButton}; diff --git a/packages/@react-spectrum/s2/src/ActionMenu.tsx b/packages/@react-spectrum/s2/src/ActionMenu.tsx new file mode 100644 index 00000000000..0bbec20b1ad --- /dev/null +++ b/packages/@react-spectrum/s2/src/ActionMenu.tsx @@ -0,0 +1,67 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import {ActionButton, ActionButtonProps} from './ActionButton'; +import {AriaLabelingProps, DOMProps, FocusableRef} from '@react-types/shared'; +import {filterDOMProps} from '@react-aria/utils'; +import {forwardRef} from 'react'; +import {forwardRefType} from './types'; +import {Menu, MenuProps, MenuTrigger, MenuTriggerProps} from './Menu'; +import MoreIcon from '../s2wf-icons/S2_Icon_More_20_N.svg'; +import {StyleProps} from './style-utils' with { type: 'macro' }; + +export interface ActionMenuProps extends + Pick, + Pick, 'children' | 'items' | 'disabledKeys' | 'onAction' | 'size'>, + Pick, + StyleProps, DOMProps, AriaLabelingProps { + } + +function ActionMenu(props: ActionMenuProps, ref: FocusableRef) { + let buttonProps = filterDOMProps(props, {labelable: true}); + + // size independently controlled? + return ( + + + + + + {/* @ts-ignore TODO: fix type, right now this component is the same as Menu */} + {props.children} + + + ); +} + +/** + * ActionMenu combines an ActionButton with a Menu for simple "more actions" use cases. + */ +let _ActionMenu = /*#__PURE__*/(forwardRef as forwardRefType)(ActionMenu); +export {_ActionMenu as ActionMenu}; diff --git a/packages/@react-spectrum/s2/src/AlertDialog.tsx b/packages/@react-spectrum/s2/src/AlertDialog.tsx new file mode 100644 index 00000000000..7187e6d7845 --- /dev/null +++ b/packages/@react-spectrum/s2/src/AlertDialog.tsx @@ -0,0 +1,158 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import AlertTriangle from '../s2wf-icons/S2_Icon_AlertTriangle_20_N.svg'; +import {Button} from './Button'; +import {ButtonGroup} from './ButtonGroup'; +import {CenterBaseline} from './CenterBaseline'; +import {chain} from '@react-aria/utils'; +import {Content, Heading} from './Content'; +import {Dialog} from './Dialog'; +import {DOMProps, DOMRef} from '@react-types/shared'; +import {forwardRef, ReactNode} from 'react'; +import {IconContext} from './Icon'; +import NoticeSquare from '../s2wf-icons/S2_Icon_AlertDiamond_20_N.svg'; +import {Provider} from 'react-aria-components'; +import {style} from '../style/spectrum-theme' with {type: 'macro'}; +import {UnsafeStyles} from './style-utils' with {type: 'macro'}; + +export interface AlertDialogProps extends DOMProps, UnsafeStyles { + /** The [visual style](https://spectrum.adobe.com/page/alert-dialog/#Options) of the AlertDialog. */ + variant?: 'confirmation' | 'information' | 'destructive' | 'error' | 'warning', + /** The title of the AlertDialog. */ + title: string, + /** The contents of the AlertDialog. */ + children: ReactNode, + /** The label to display within the cancel button. */ + cancelLabel?: string, + /** The label to display within the confirm button. */ + primaryActionLabel: string, + /** The label to display within the secondary button. */ + secondaryActionLabel?: string, + /** Whether the primary button is disabled. */ + isPrimaryActionDisabled?: boolean, + /** Whether the secondary button is disabled. */ + isSecondaryActionDisabled?: boolean, + /** Handler that is called when the cancel button is pressed. */ + onCancel?: () => void, + /** Handler that is called when the primary button is pressed. */ + onPrimaryAction?: () => void, + /** Handler that is called when the secondary button is pressed. */ + onSecondaryAction?: () => void, + /** Button to focus by default when the dialog opens. */ + autoFocusButton?: 'cancel' | 'primary' | 'secondary', + /** + * The size of the Dialog. + * + * @default 'M' + */ + size?: 'S' | 'M' | 'L' +} + +const icon = style({ + marginEnd: 8, + '--iconPrimary': { + type: 'fill', + value: { + variant: { + error: 'negative', + warning: 'notice' + } + } + } +}); + +function AlertDialog(props: AlertDialogProps, ref: DOMRef) { + let { + autoFocusButton, + cancelLabel, + secondaryActionLabel, + primaryActionLabel, + isSecondaryActionDisabled, + isPrimaryActionDisabled, + onCancel = () => {}, + onPrimaryAction = () => {}, + onSecondaryAction = () => {}, + title, + children, + variant = 'confirmation' + } = props; + + let buttonVariant = 'primary'; + if (variant === 'confirmation') { + buttonVariant = 'accent'; + } else if (variant === 'destructive') { + buttonVariant = 'negative'; + } + + return ( + + {({close}) => ( + <> + + + + {/* TODO: Add translations */} + {variant === 'error' && } + {variant === 'warning' && } + {title} + + + + {children} + + {cancelLabel && + + } + {secondaryActionLabel && + + } + + + + )} + + ); +} + +/** + * AlertDialogs are a specific type of Dialog. They display important information that users need to acknowledge. + */ +let _AlertDialog = forwardRef(AlertDialog); +export {_AlertDialog as AlertDialog}; diff --git a/packages/@react-spectrum/s2/src/Avatar.tsx b/packages/@react-spectrum/s2/src/Avatar.tsx new file mode 100644 index 00000000000..c4ae485e038 --- /dev/null +++ b/packages/@react-spectrum/s2/src/Avatar.tsx @@ -0,0 +1,72 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import {ContextValue, useContextProps} from 'react-aria-components'; +import {createContext, forwardRef} from 'react'; +import {DOMProps, DOMRef} from '@react-types/shared'; +import {filterDOMProps} from '@react-aria/utils'; +import {getAllowedOverrides, StyleProps, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'}; +import {style} from '../style/spectrum-theme' with { type: 'macro' }; +import {useDOMRef} from '@react-spectrum/utils'; + +export interface AvatarProps extends StyleProps, DOMProps { + /** Text description of the avatar. */ + alt?: string, + /** The image URL for the avatar. */ + src?: string +} + +export interface AvatarContextProps extends UnsafeStyles, DOMProps { + /** Text description of the avatar. */ + alt?: string, + /** The image URL for the avatar. */ + src?: string, + /** Spectrum-defined styles, returned by the `style()` macro. */ + styles?: StylesPropWithHeight +} + +const imageStyles = style({ + borderRadius: 'full', + size: 20, + disableTapHighlight: true +}, getAllowedOverrides({height: true})); + +export const AvatarContext = createContext>({}); + +function Avatar(props: AvatarProps, ref: DOMRef) { + let domRef = useDOMRef(ref); + [props, domRef] = useContextProps(props, domRef, AvatarContext); + let { + alt = '', + src, + UNSAFE_style, + UNSAFE_className = '', + ...otherProps + } = props; + const domProps = filterDOMProps(otherProps); + + return ( + {alt} + ); +} + +/** + * An avatar is a thumbnail representation of an entity, such as a user or an organization. + */ +let _Avatar = forwardRef(Avatar); +export {_Avatar as Avatar}; diff --git a/packages/@react-spectrum/s2/src/Badge.tsx b/packages/@react-spectrum/s2/src/Badge.tsx new file mode 100644 index 00000000000..1239a555750 --- /dev/null +++ b/packages/@react-spectrum/s2/src/Badge.tsx @@ -0,0 +1,156 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import {AriaLabelingProps, DOMProps, DOMRef} from '@react-types/shared'; +import {centerBaseline} from './CenterBaseline'; +import {centerPadding, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'}; +import {filterDOMProps} from '@react-aria/utils'; +import {fontRelative, style} from '../style/spectrum-theme' with {type: 'macro'}; +import {IconContext} from './Icon'; +import {Provider} from 'react-aria-components'; +import React, {forwardRef, ReactNode} from 'react'; +import {Text, TextContext} from './Content'; +import {useDOMRef} from '@react-spectrum/utils'; + +export interface BadgeStyleProps { + /** + * The size of the badge. + * + * @default 'S' + */ + size?: 'S' | 'M' | 'L' | 'XL', + /** + * The variant changes the background color of the badge. When badge has a semantic meaning, they should use the variant for semantic colors. + * + * @default 'neutral' + */ + variant: 'accent' | 'informative' | 'neutral' | 'positive' | 'notice' | 'negative' | 'gray' | 'red' | 'orange' | 'yellow' | 'charteuse' | 'celery' | 'green' | 'seafoam' | 'cyan' | 'blue' | 'indigo' | 'purple' | 'fuchsia' | 'magenta' | 'pink' | 'turquoise' | 'brown' | 'cinnamon' | 'silver' +} + +export interface BadgeProps extends DOMProps, AriaLabelingProps, StyleProps, BadgeStyleProps{ + /** + * The content to display in the badge. + */ + children: ReactNode +} + +const badge = style({ + display: 'flex', + fontFamily: 'sans', + fontSize: 'control', + justifyContent: 'center', + alignItems: 'center', + borderRadius: 'control', + minHeight: 'control', + paddingX: { + default: 'edge-to-text', + ':has([slot=icon]:only-child)': 0 + }, + '--labelPadding': { + type: 'paddingTop', + value: centerPadding() + }, + aspectRatio: { + ':has([slot=icon]:only-child)': 'square' + }, + '--iconMargin': { + type: 'marginTop', + value: { + default: fontRelative(-2), + ':has([slot=icon]:only-child)': 0 + } + }, + columnGap: 'text-to-visual', + color: { + default: 'white', + variant: { + notice: 'black', + orange: 'black', + yellow: 'black', + charteuse: 'black', + celery: 'black' + } + }, + backgroundColor: { + variant: { + accent: 'accent', + informative: 'informative', + neutral: 'neutral-subdued', + positive: 'positive', + notice: 'notice', + negative: 'negative', + gray: 'gray', + red: 'red', + orange: 'orange', + yellow: 'yellow', + charteuse: 'chartreuse', + celery: 'celery', + green: 'green', + seafoam: 'seafoam', + cyan: 'cyan', + blue: 'blue', + indigo: 'indigo', + purple: 'purple', + fuchsia: 'fuchsia', + magenta: 'magenta', + pink: 'pink', + turquoise: 'turquoise', + brown: 'brown', + cinnamon: 'cinnamon', + silver: 'silver' + } + }, + '--iconPrimary': { + type: 'fill', + value: 'currentColor' + } +}, getAllowedOverrides()); + +function Badge(props: BadgeProps, ref: DOMRef) { + let { + children, + variant = 'neutral', + size = 'S', + ...otherProps + } = props; // useProviderProps(props) in v3 + let domRef = useDOMRef(ref); + let isTextOnly = React.Children.toArray(props.children).every(c => !React.isValidElement(c)); + + return ( + + + { + typeof children === 'string' || isTextOnly + ? {children} + : children + } + + + ); +} + +/** + * Badges are used for showing a small amount of color-categorized metadata, ideal for getting a user's attention. + */ +let _Badge = forwardRef(Badge); +export {_Badge as Badge}; diff --git a/packages/@react-spectrum/s2/src/Breadcrumbs.tsx b/packages/@react-spectrum/s2/src/Breadcrumbs.tsx new file mode 100644 index 00000000000..62d06b7157c --- /dev/null +++ b/packages/@react-spectrum/s2/src/Breadcrumbs.tsx @@ -0,0 +1,266 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import {Breadcrumb as AriaBreadcrumb, BreadcrumbsProps as AriaBreadcrumbsProps, HeadingContext, Link, Provider, Breadcrumbs as RACBreadcrumbs} from 'react-aria-components'; +import {AriaBreadcrumbItemProps} from 'react-aria'; +import ChevronIcon from '../ui-icons/Chevron'; +import {Children, cloneElement, createContext, forwardRef, isValidElement, ReactElement, ReactNode, useContext, useRef} from 'react'; +import {focusRing, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'}; +import {forwardRefType} from './types'; +import {LinkDOMProps} from '@react-types/shared'; +import {size, style} from '../style/spectrum-theme' with { type: 'macro' }; + +interface BreadcrumbsStyleProps { + /** + * Size of the Breadcrumbs including spacing and layout. + * + * @default 'M' + */ + size?: 'M' | 'L', + /** Whether the breadcrumbs are disabled. */ + isDisabled?: boolean + /** + * Whether to place the last Breadcrumb item onto a new line. + */ + // TODO: isMultiline?: boolean + /** Whether to always show the root item if the items are collapsed. */ + // TODO: showRoot?: boolean, +} + +export interface BreadcrumbsProps extends Omit, 'children' | 'items' | 'style' | 'className'>, BreadcrumbsStyleProps, StyleProps { + /** The children of the Breadcrumbs. */ + children?: ReactNode +} + +const wrapper = style({ + display: 'flex', + justifyContent: 'start', + listStyleType: 'none', + flexWrap: 'nowrap', + flexGrow: 1, + flexShrink: 0, + flexBasis: 0, + gap: { + size: { + M: size(6), // breadcrumbs-text-to-separator-medium + L: size(9) // breadcrumbs-text-to-separator-large + } + }, + padding: 0, + transition: 'default', + marginTop: 0, + marginBottom: 0, + marginStart: { + size: { + M: size(6), + L: size(9) + } + } +}, getAllowedOverrides()); + +const BreadcrumbsInternalContext = createContext & {length: number}>({length: 0}); + +function Breadcrumbs({ + UNSAFE_className = '', + UNSAFE_style, + styles, + ...props +}: BreadcrumbsProps) { + let {size = 'M', isDisabled} = props; + let ref = useRef(null); + // TODO: Remove when https://github.com/adobe/react-spectrum/pull/6440 is released + let childArray: ReactElement[] = []; + Children.forEach(props.children, (child, index) => { + if (isValidElement<{index: number}>(child)) { + child = cloneElement(child, {key: index, index}); + childArray.push(child); + } + }); + return ( + + + {childArray} + + + ); +} + +/** Breadcrumbs show hierarchy and navigational context for a user’s location within an application. */ +let _Breadcrumbs = /*#__PURE__*/ (forwardRef as forwardRefType)(Breadcrumbs); +export {_Breadcrumbs as Breadcrumbs}; + +const breadcrumbStyles = style({ + display: 'inline-flex', + alignItems: 'center', + justifyContent: 'start', + height: 'control', + transition: 'default', + position: 'relative', + color: { + default: 'neutral', + isDisabled: 'disabled', + forcedColors: { + default: 'ButtonText', + isDisabled: 'GrayText' + } + }, + borderStyle: 'none' +}); + +const chevronStyles = style({ + marginStart: 'text-to-visual', + '--iconPrimary': { + type: 'fill', + value: 'currentColor' + } +}); + +const linkStyles = style({ + ...focusRing(), + borderRadius: 'sm', + color: { + default: 'neutral-subdued', + isDisabled: 'disabled', + isCurrent: 'neutral', + forcedColors: { + default: 'LinkText', + isDisabled: 'GrayText' + } + }, + transition: 'default', + fontFamily: 'sans', + fontSize: 'control', + fontWeight: { + default: 'normal', + isCurrent: 'bold' + }, + textDecoration: { + default: 'none', + isHovered: 'underline', + isFocusVisible: 'underline', + isDisabled: 'none' + }, + cursor: { + default: 'pointer', + isDisabled: 'default' + }, + outlineColor: { + default: 'focus-ring', + forcedColors: 'Highlight' + }, + disableTapHighlight: true, + marginTop: { + size: { + M: size(6), // component-top-to-text-100 + L: size(9) // component-top-to-text-200 + } + }, + marginBottom: { + size: { + M: size(8), // component-bottom-to-text-100 + L: size(11) // component-bottom-to-text-200 + } + } +}); + +const currentStyles = style({ + color: { + default: 'neutral', + forcedColors: 'ButtonText' + }, + transition: 'default', + fontFamily: 'sans', + fontSize: 'control', + fontWeight: 'bold', + marginTop: { + default: { + size: { + M: size(6), // component-top-to-text-100 + L: size(9) // component-top-to-text-200 + } + } + }, + marginBottom: { + default: { + size: { + M: size(9), // component-bottom-to-text-100 + L: size(11) // component-bottom-to-text-200 + } + } + } +}); + +// TODO: support user heading size customization, for now just set it to large +const heading = style({ + margin: 0, + fontFamily: 'sans', + fontSize: 'heading-lg', + fontWeight: 'extra-bold' +}); + +export interface BreadcrumbProps extends Omit, LinkDOMProps { + /** The children of the breadcrumb item. */ + children?: ReactNode +} + +export function Breadcrumb({children, ...props}: BreadcrumbProps) { + let {href, target, rel, download, ping, referrerPolicy, ...other} = props; + let {size = 'M', length, isDisabled} = useContext(BreadcrumbsInternalContext); + let ref = useRef(null); + // TODO: use isCurrent render prop when https://github.com/adobe/react-spectrum/pull/6440 is released + let isCurrent = (props as BreadcrumbProps & {index: number}).index === length - 1; + return ( + + {isCurrent ? + + + {children} + + + : ( + <> + ({clipPath: isFocusVisible ? 'none' : 'margin-box'})} + href={href} + target={target} + rel={rel} + download={download} + ping={ping} + referrerPolicy={referrerPolicy} + isDisabled={isDisabled || isCurrent} + className={({isFocused, isFocusVisible, isHovered, isDisabled, isPressed}) => linkStyles({isFocused, isFocusVisible, isHovered, isDisabled, size, isCurrent, isPressed})}> + {children} + + + + )} + + ); +} diff --git a/packages/@react-spectrum/s2/src/Button.tsx b/packages/@react-spectrum/s2/src/Button.tsx new file mode 100644 index 00000000000..a03dd2f45ce --- /dev/null +++ b/packages/@react-spectrum/s2/src/Button.tsx @@ -0,0 +1,358 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import {baseColor, fontRelative, style} from '../style/spectrum-theme' with {type: 'macro'}; +import {ButtonRenderProps, Link, LinkProps, OverlayTriggerStateContext, Provider, Button as RACButton, ButtonProps as RACButtonProps} from 'react-aria-components'; +import {centerBaseline} from './CenterBaseline'; +import {centerPadding, focusRing, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'}; +import {createContext, forwardRef, ReactNode, useContext} from 'react'; +import {FocusableRef} from '@react-types/shared'; +import {IconContext} from './Icon'; +import {mergeProps} from 'react-aria'; +import {pressScale} from './pressScale'; +import {Text, TextContext} from './Content'; +import {useFocusableRef} from '@react-spectrum/utils'; + +interface ButtonStyleProps { + /** + * The [visual style](https://spectrum.adobe.com/page/button/#Options) of the button. + * + * @default 'primary' + */ + variant?: 'primary' | 'secondary' | 'accent' | 'negative', + /** + * The background style of the Button. + * + * @default 'fill' + */ + fillStyle?: 'fill' | 'outline', + /** + * The size of the Button. + * + * @default 'M' + */ + size?: 'S' | 'M' | 'L' | 'XL', + /** The static color style to apply. Useful when the Button appears over a color background. */ + staticColor?: 'white' | 'black' +} + +export interface ButtonProps extends Omit, StyleProps, ButtonStyleProps { + /** The content to display in the Button. */ + children?: ReactNode +} + +export interface LinkButtonProps extends Omit, StyleProps, ButtonStyleProps { + /** The content to display in the Button. */ + children?: ReactNode +} + +interface ButtonContextValue extends ButtonStyleProps, StyleProps { + /** Whether the Button is disabled. */ + isDisabled?: boolean +} + +export const ButtonContext = createContext({}); + +const button = style({ + ...focusRing(), + display: 'flex', + alignItems: { + default: 'baseline', + ':has([slot=icon]:only-child)': 'center' + }, + justifyContent: 'center', + textAlign: 'start', + columnGap: 'text-to-visual', + fontFamily: 'sans', + fontWeight: 'bold', + fontSize: 'control', + userSelect: 'none', + minHeight: 'control', + minWidth: { + ':has([slot=icon]:only-child)': 'control' + }, + borderRadius: 'pill', + boxSizing: 'border-box', + width: 'fit', + textDecoration: 'none', // for link buttons + paddingX: { + default: 'pill', + ':has([slot=icon]:only-child)': 0 + }, + paddingY: 0, + aspectRatio: { + ':has([slot=icon]:only-child)': 'square' + }, + transition: 'default', + borderStyle: 'solid', + borderWidth: { + fillStyle: { + fill: 0, + outline: 2 + } + }, + '--labelPadding': { + type: 'paddingTop', + value: centerPadding() + }, + '--iconMargin': { + type: 'marginTop', + value: { + default: fontRelative(-2), + ':has([slot=icon]:only-child)': 0 + } + }, + borderColor: { + variant: { + primary: baseColor('gray-800'), + secondary: baseColor('gray-300') + }, + isDisabled: 'disabled', + staticColor: { + white: { + variant: { + primary: baseColor('transparent-white-800'), + secondary: baseColor('transparent-white-300') + }, + isDisabled: 'transparent-white-300' + }, + black: { + variant: { + primary: baseColor('transparent-black-800'), + secondary: baseColor('transparent-black-300') + }, + isDisabled: 'transparent-black-300' + } + }, + forcedColors: { + default: 'ButtonBorder', + isHovered: 'Highlight', + isDisabled: 'GrayText' + } + }, + backgroundColor: { + fillStyle: { + fill: { + variant: { + primary: 'neutral', + secondary: baseColor('gray-100'), + accent: 'accent', + negative: 'negative' + }, + isDisabled: 'disabled' + }, + outline: { + default: 'transparent', + isHovered: 'gray-100', + isPressed: 'gray-100', + isFocusVisible: 'gray-100' + } + }, + staticColor: { + white: { + fillStyle: { + fill: { + variant: { + primary: baseColor('transparent-white-800'), + secondary: baseColor('transparent-white-100') + }, + isDisabled: 'transparent-white-100' + }, + outline: { + default: 'transparent', + isHovered: 'transparent-white-100', + isPressed: 'transparent-white-100', + isFocusVisible: 'transparent-white-100' + } + } + }, + black: { + fillStyle: { + fill: { + variant: { + primary: baseColor('transparent-black-800'), + secondary: baseColor('transparent-black-100') + }, + isDisabled: 'transparent-black-100' + }, + outline: { + default: 'transparent', + isHovered: 'transparent-black-100', + isPressed: 'transparent-black-100', + isFocusVisible: 'transparent-black-100' + } + } + } + }, + forcedColors: { + fillStyle: { + fill: { + default: 'ButtonText', + isHovered: 'Highlight', + isDisabled: 'GrayText' + }, + outline: 'ButtonFace' + } + } + }, + color: { + fillStyle: { + fill: { + variant: { + primary: 'gray-25', + secondary: 'neutral', + accent: 'white', + negative: 'white' + }, + isDisabled: 'disabled' + }, + outline: { + default: 'neutral', + isDisabled: 'disabled' + } + }, + staticColor: { + white: { + fillStyle: { + fill: { + variant: { + primary: 'black', + secondary: baseColor('transparent-white-800') + } + }, + outline: baseColor('transparent-white-800') + }, + isDisabled: 'transparent-white-400' + }, + black: { + fillStyle: { + fill: { + variant: { + primary: 'white', + secondary: baseColor('transparent-black-800') + } + }, + outline: baseColor('transparent-black-800') + }, + isDisabled: 'transparent-black-400' + } + }, + forcedColors: { + fillStyle: { + fill: { + default: 'ButtonFace', + isDisabled: 'HighlightText' + }, + outline: { + default: 'ButtonText', + isDisabled: 'GrayText' + } + } + } + }, + '--iconPrimary': { + type: 'fill', + value: 'currentColor' + }, + outlineColor: { + default: 'focus-ring', + staticColor: { + white: 'white', + black: 'black' + }, + forcedColors: 'Highlight' + }, + forcedColorAdjust: 'none', + disableTapHighlight: true +}, getAllowedOverrides()); + +function Button(props: ButtonProps, ref: FocusableRef) { + let domRef = useFocusableRef(ref); + let ctx = useContext(ButtonContext); + props = mergeProps(ctx, props); + let overlayTriggerState = useContext(OverlayTriggerStateContext); + + return ( + (props.UNSAFE_className || '') + button({ + ...renderProps, + // Retain hover styles when an overlay is open. + isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false, + variant: props.variant || 'primary', + fillStyle: props.fillStyle || 'fill', + size: props.size || 'M', + staticColor: props.staticColor + }, props.styles)}> + + {typeof props.children === 'string' ? {props.children} : props.children} + + + ); +} + +/** + * Buttons allow users to perform an action. + * They have multiple styles for various needs, and are ideal for calling attention to + * where a user needs to do something in order to move forward in a flow. + */ +let _Button = forwardRef(Button); +export {_Button as Button}; + +function LinkButton(props: LinkButtonProps, ref: FocusableRef) { + let domRef = useFocusableRef(ref); + let ctx = useContext(ButtonContext); + props = mergeProps(ctx, props); + let overlayTriggerState = useContext(OverlayTriggerStateContext); + + return ( + (props.UNSAFE_className || '') + button({ + ...renderProps, + // Retain hover styles when an overlay is open. + isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false, + variant: props.variant || 'primary', + fillStyle: props.fillStyle || 'fill', + size: props.size || 'M', + staticColor: props.staticColor + }, props.styles)}> + + {typeof props.children === 'string' ? {props.children} : props.children} + + + ); +} + +/** + * A LinkButton combines the functionality of a link with the appearance of a button. Useful for allowing users to navigate to another page. + */ +let _LinkButton = forwardRef(LinkButton); +export {_LinkButton as LinkButton}; diff --git a/packages/@react-spectrum/s2/src/ButtonGroup.tsx b/packages/@react-spectrum/s2/src/ButtonGroup.tsx new file mode 100644 index 00000000000..10acf7c9e4a --- /dev/null +++ b/packages/@react-spectrum/s2/src/ButtonGroup.tsx @@ -0,0 +1,184 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import {ButtonContext} from './Button'; +import {ContextValue} from './Content'; +import {createContext, forwardRef, ReactNode, useCallback, useRef} from 'react'; +import {DOMProps, DOMRef} from '@react-types/shared'; +import {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'}; +import {Provider, SlotProps, useContextProps} from 'react-aria-components'; +import {style} from '../style/spectrum-theme' with {type: 'macro'}; +import { + useDOMRef, + useResizeObserver +} from '@react-spectrum/utils'; +import {useLayoutEffect, useValueEffect} from '@react-aria/utils'; + +interface ButtonGroupStyleProps { + /** + * The axis the ButtonGroup should align with. Setting this to 'vertical' will prevent + * any switching behaviors between 'vertical' and 'horizontal'. + * + * @default 'horizontal' + */ + orientation?: 'horizontal' | 'vertical', + /** + * The alignment of the Buttons within the ButtonGroup. + * + * @default 'start' + */ + align?: 'start' | 'end' | 'center', + /** + * The size of the Buttons within the ButtonGroup. + * + * @default 'M' + */ + size?: 'S' | 'M' | 'L' | 'XL' +} + +export interface ButtonGroupProps extends ButtonGroupStyleProps, SlotProps, StyleProps, DOMProps { + /** The Buttons contained within the ButtonGroup. */ + children: ReactNode, + /** Whether the Buttons in the ButtonGroup are all disabled. */ + isDisabled?: boolean +} + +interface ButtonGroupContextValue extends Omit { + /** Whether the ButtonGroup shouldn't be rendered. */ + hidden?: boolean +} + +export const ButtonGroupContext = createContext>({}); + +const buttongroup = style({ + display: 'inline-flex', + position: 'relative', + gap: { + size: { + S: 8, + M: 12, + L: 12, + XL: 12 + } + }, + flexDirection: { + default: 'row', + orientation: { + vertical: 'column' + } + }, + alignItems: { + default: 'center', + orientation: { + vertical: { + default: 'start', + align: { + end: 'end', + center: 'center' + } + } + } + }, + justifyContent: { + orientation: { + vertical: { + default: 'start', + align: { + end: 'end', + center: 'center' + } + } + } + } +}, getAllowedOverrides()); + +function ButtonGroup(props: ButtonGroupProps, ref: DOMRef) { + let domRef = useDOMRef(ref); + [props, domRef] = useContextProps(props, domRef, ButtonGroupContext); + let { + size = 'M', + orientation = 'horizontal', + align = 'start', + children, + isDisabled + } = props; + + let [hasOverflow, setHasOverflow] = useValueEffect(false); + + let checkForOverflow = useCallback(() => { + let computeHasOverflow = () => { + if (domRef.current && orientation === 'horizontal') { + let buttonGroupChildren = Array.from(domRef.current.children) as HTMLElement[]; + let maxX = domRef.current.offsetWidth + 1; // + 1 to account for rounding errors + // If any buttons have negative X positions (align="end") or extend beyond + // the width of the button group (align="start"), then switch to vertical. + if (buttonGroupChildren.some(child => child.offsetLeft < 0 || child.offsetLeft + child.offsetWidth > maxX)) { + return true; + } + return false; + } + }; + if (orientation === 'horizontal') { + setHasOverflow(function* () { + // Force to horizontal for measurement. + yield false; + + // Measure, and update if there is overflow. + yield computeHasOverflow(); + }); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [domRef, orientation, setHasOverflow, children]); + + // There are two main reasons we need to remeasure: + // 1. Internal changes: Check for initial overflow or when orientation/scale/children change (from checkForOverflow dep array) + useLayoutEffect(() => { + checkForOverflow(); + }, [checkForOverflow]); + + // 2. External changes: buttongroup won't change size due to any parents changing size, so listen to its container for size changes to figure out if we should remeasure + let parent = useRef(null); + useLayoutEffect(() => { + if (domRef.current) { + parent.current = domRef.current.parentElement as HTMLElement; + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [domRef.current]); + useResizeObserver({ref: parent, onResize: checkForOverflow}); + + if ((props as ButtonGroupContextValue).hidden) { + return null; + } + return ( +
+ + {children} + +
+ ); +} + +/** + * ButtonGroup handles overflow for a grouping of buttons whose actions are related to each other. + */ +const _ButtonGroup = forwardRef(ButtonGroup); +export {_ButtonGroup as ButtonGroup}; diff --git a/packages/@react-spectrum/s2/src/Calendar.tsx b/packages/@react-spectrum/s2/src/Calendar.tsx new file mode 100644 index 00000000000..0572cc786d8 --- /dev/null +++ b/packages/@react-spectrum/s2/src/Calendar.tsx @@ -0,0 +1,46 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import { + Calendar as AriaCalendar, + CalendarProps as AriaCalendarProps, + Button, + CalendarCell, + CalendarGrid, + DateValue, + Heading, + Text +} from 'react-aria-components'; + + +export interface CalendarProps + extends AriaCalendarProps { + errorMessage?: string +} + +export function Calendar( + {errorMessage, ...props}: CalendarProps +) { + return ( + +
+ + + +
+ + {(date) => } + + {errorMessage && {errorMessage}} +
+ ); +} diff --git a/packages/@react-spectrum/s2/src/CenterBaseline.tsx b/packages/@react-spectrum/s2/src/CenterBaseline.tsx new file mode 100644 index 00000000000..7fe07fcacc4 --- /dev/null +++ b/packages/@react-spectrum/s2/src/CenterBaseline.tsx @@ -0,0 +1,35 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import {CSSProperties, ReactNode} from 'react'; +import {raw} from '../style/style-macro' with {type: 'macro'}; + +interface CenterBaselineProps { + style?: CSSProperties, + className?: string, + children: ReactNode, + slot?: string +} + +export function CenterBaseline(props: CenterBaselineProps) { + return ( + + ); +} + +export const centerBaselineBefore = raw('&::before { content: "\u00a0"; width: 0; visibility: hidden }'); + +export function centerBaseline(props: Omit = {}): (icon: ReactNode) => ReactNode { + return (icon: ReactNode) => {icon}; +} diff --git a/packages/@react-spectrum/s2/src/Checkbox.tsx b/packages/@react-spectrum/s2/src/Checkbox.tsx new file mode 100644 index 00000000000..312296acbef --- /dev/null +++ b/packages/@react-spectrum/s2/src/Checkbox.tsx @@ -0,0 +1,169 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import {Checkbox as AriaCheckbox, CheckboxProps as AriaCheckboxProps, CheckboxGroupStateContext, CheckboxRenderProps, ContextValue, useContextProps} from 'react-aria-components'; +import {baseColor, style} from '../style/spectrum-theme' with {type: 'macro'}; +import {CenterBaseline} from './CenterBaseline'; +import CheckmarkIcon from '../ui-icons/Checkmark'; +import {createContext, forwardRef, ReactNode, useContext, useRef} from 'react'; +import DashIcon from '../ui-icons/Dash'; +import {FocusableRef} from '@react-types/shared'; +import {focusRing, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'}; +import {FormContext, useFormProps} from './Form'; +import {pressScale} from './pressScale'; +import {useFocusableRef} from '@react-spectrum/utils'; + +interface CheckboxStyleProps { + /** + * The size of the Checkbox. + * + * @default 'M' + */ + size?: 'S' | 'M' | 'L' | 'XL', + /** Whether the Checkbox should be displayed with an emphasized style. */ + isEmphasized?: boolean +} + +interface RenderProps extends CheckboxRenderProps, CheckboxStyleProps {} + +export interface CheckboxProps extends Omit, StyleProps, CheckboxStyleProps { + /** The label for the element. */ + children?: ReactNode +} + +interface CheckboxContextValue extends CheckboxProps, CheckboxStyleProps {} + +export const CheckboxContext = createContext>(null); + +const wrapper = style({ + display: 'flex', + columnGap: 'text-to-control', + alignItems: 'baseline', + width: 'fit', + fontFamily: 'sans', + fontSize: 'control', + transition: 'colors', + color: { + default: 'neutral', + isDisabled: { + default: 'disabled', + forcedColors: 'GrayText' + } + }, + gridColumnStart: { + isInForm: 'field' + }, + disableTapHighlight: true +}, getAllowedOverrides()); + +export const box = style({ + ...focusRing(), + size: 'control-sm', + borderRadius: 'control-sm', + flexShrink: 0, + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + borderWidth: 2, + boxSizing: 'border-box', + borderStyle: 'solid', + transition: 'default', + forcedColorAdjust: 'none', + backgroundColor: { + default: 'gray-25', + isSelected: { + default: 'neutral', + isEmphasized: baseColor('accent-900'), + forcedColors: 'Highlight', + isInvalid: { + default: baseColor('negative-900'), + forcedColors: 'Mark' + }, + isDisabled: { + default: 'gray-400', + forcedColors: 'GrayText' + } + } + }, + borderColor: { + default: baseColor('gray-800'), + forcedColors: 'ButtonBorder', + isInvalid: { + default: 'negative', + forcedColors: 'Mark' + }, + isDisabled: { + default: 'gray-400', + forcedColors: 'GrayText' + }, + isSelected: 'transparent' + } +}); + +export const iconStyles = style({ + '--iconPrimary': { + type: 'fill', + value: { + default: 'gray-25', + forcedColors: 'HighlightText' + } + } +}); + +function Checkbox({children, ...props}: CheckboxProps, ref: FocusableRef) { + let boxRef = useRef(null); + let domRef = useFocusableRef(ref); + let isInForm = !!useContext(FormContext); + [props, domRef] = useContextProps(props, domRef, CheckboxContext); + props = useFormProps(props); + let isInCheckboxGroup = !!useContext(CheckboxGroupStateContext); + let ctx = useContext(CheckboxContext) as CheckboxContextValue; + + return ( + (props.UNSAFE_className || '') + wrapper({...renderProps, isInForm, size: props.size || 'M'}, props.styles)}> + {renderProps => ( + <> + +
+ {renderProps.isIndeterminate && + + } + {renderProps.isSelected && !renderProps.isIndeterminate && + + } +
+
+ {children} + + )} +
+ ); +} + +/** + * Checkboxes allow users to select multiple items from a list of individual items, + * or to mark one individual item as selected. + */ +let _Checkbox = forwardRef(Checkbox); +export {_Checkbox as Checkbox}; diff --git a/packages/@react-spectrum/s2/src/CheckboxGroup.tsx b/packages/@react-spectrum/s2/src/CheckboxGroup.tsx new file mode 100644 index 00000000000..46d9473108f --- /dev/null +++ b/packages/@react-spectrum/s2/src/CheckboxGroup.tsx @@ -0,0 +1,138 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import { + CheckboxGroup as AriaCheckboxGroup, + CheckboxGroupProps as AriaCheckboxGroupProps +} from 'react-aria-components'; +import {CheckboxContext} from './Checkbox'; +import {DOMRef, HelpTextProps, Orientation, SpectrumLabelableProps} from '@react-types/shared'; +import {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'}; +import {FieldLabel, HelpText} from './Field'; +import {FormContext, useFormProps} from './Form'; +import {forwardRef, ReactNode, useContext} from 'react'; +import {style} from '../style/spectrum-theme' with {type: 'macro'}; +import {useDOMRef} from '@react-spectrum/utils'; + +export interface CheckboxGroupProps extends Omit, StyleProps, SpectrumLabelableProps, HelpTextProps { + /** + * The size of the Checkboxes in the CheckboxGroup. + * + * @default 'M' + */ + size?: 'S' | 'M' | 'L' | 'XL', + /** + * The axis the checkboxes should align with. + * + * @default 'vertical' + */ + orientation?: Orientation, + /** + * The Checkboxes contained within the CheckboxGroup. + */ + children?: ReactNode, + /** + * By default, checkboxes are not emphasized (gray). + * The emphasized (blue) version provides visual prominence. + */ + isEmphasized?: boolean +} + +function CheckboxGroup(props: CheckboxGroupProps, ref: DOMRef) { + let formContext = useContext(FormContext); + props = useFormProps(props); + let { + label, + description, + errorMessage, + children, + labelPosition = 'top', + labelAlign = 'start', + necessityIndicator = 'icon', + size = 'M', + orientation = 'vertical', + UNSAFE_className = '', + UNSAFE_style, + isEmphasized, + ...groupProps + } = props; + let domRef = useDOMRef(ref); + + return ( + + {({isDisabled, isInvalid}) => (<> + + {label} + +
+ + + {children} + + +
+ + {errorMessage} + + )} +
+ ); +} + +/** + * A CheckboxGroup allows users to select one or more items from a list of choices. + */ +let _CheckboxGroup = forwardRef(CheckboxGroup); +export {_CheckboxGroup as CheckboxGroup}; diff --git a/packages/@react-spectrum/s2/src/ClearButton.tsx b/packages/@react-spectrum/s2/src/ClearButton.tsx new file mode 100644 index 00000000000..cbde28f0cc5 --- /dev/null +++ b/packages/@react-spectrum/s2/src/ClearButton.tsx @@ -0,0 +1,66 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import { + Button, + ButtonProps, + ButtonRenderProps +} from 'react-aria-components'; +import CrossIcon from '../ui-icons/Cross'; +import {FocusableRef} from '@react-types/shared'; +import {forwardRef} from 'react'; +import {style} from '../style/spectrum-theme' with {type: 'macro'}; +import {useFocusableRef} from '@react-spectrum/utils'; + +interface ClearButtonStyleProps { + /** + * The size of the ClearButton. + * + * @default 'M' + */ + size?: 'S' | 'M' | 'L' | 'XL' +} + +interface ClearButtonRenderProps extends ButtonRenderProps, ClearButtonStyleProps {} +interface ClearButtonProps extends ButtonProps, ClearButtonStyleProps {} + +function ClearButton(props: ClearButtonProps, ref: FocusableRef) { + let domRef = useFocusableRef(ref); + + return ( + + ); +} + +let _ClearButton = forwardRef(ClearButton); +export {_ClearButton as ClearButton}; diff --git a/packages/@react-spectrum/s2/src/CloseButton.tsx b/packages/@react-spectrum/s2/src/CloseButton.tsx new file mode 100644 index 00000000000..12bd5aec70e --- /dev/null +++ b/packages/@react-spectrum/s2/src/CloseButton.tsx @@ -0,0 +1,99 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import {baseColor, style} from '../style/spectrum-theme' with {type: 'macro'}; +import {Button, ButtonProps} from 'react-aria-components'; +import CrossIcon from '../ui-icons/Cross'; +import {FocusableRef} from '@react-types/shared'; +import {focusRing, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'}; +import {forwardRef} from 'react'; +import {pressScale} from './pressScale'; +import {useFocusableRef} from '@react-spectrum/utils'; + +interface CloseButtonProps extends Omit, StyleProps { + /** + * The size of the CloseButton. + * + * @default 'M' + */ + size?: 'S' | 'M' | 'L' | 'XL', + /** The static color style to apply. Useful when the Button appears over a color background. */ + staticColor?: 'white' | 'black' +} + +const hoverBackground = { + default: 'gray-100', + staticColor: { + white: 'transparent-white-100', + black: 'transparent-black-100' + } +} as const; + +const styles = style({ + ...focusRing(), + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + size: 'control', + borderRadius: 'full', + padding: 0, + borderStyle: 'none', + transition: 'default', + backgroundColor: { + default: 'transparent', + isHovered: hoverBackground, + isFocusVisible: hoverBackground, + isPressed: hoverBackground + }, + '--iconPrimary': { + type: 'color', + value: { + default: 'neutral', + isDisabled: 'disabled', + staticColor: { + white: { + default: baseColor('transparent-white-800'), + isDisabled: 'transparent-white-400' + }, + black: { + default: baseColor('transparent-black-800'), + isDisabled: 'transparent-black-400' + } + } + } + }, + outlineColor: { + default: 'focus-ring', + staticColor: { + white: 'white', + black: 'black' + }, + forcedColors: 'Highlight' + } +}, getAllowedOverrides()); + +function CloseButton(props: CloseButtonProps, ref: FocusableRef) { + let {UNSAFE_style, UNSAFE_className = ''} = props; + let domRef = useFocusableRef(ref); + return ( + + ); +} + +let _CloseButton = forwardRef(CloseButton); +export {_CloseButton as CloseButton}; diff --git a/packages/@react-spectrum/s2/src/ColorArea.tsx b/packages/@react-spectrum/s2/src/ColorArea.tsx new file mode 100644 index 00000000000..090fe7ed321 --- /dev/null +++ b/packages/@react-spectrum/s2/src/ColorArea.tsx @@ -0,0 +1,72 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import { + ColorArea as AriaColorArea, + ColorAreaProps as AriaColorAreaProps +} from 'react-aria-components'; +import {ColorHandle} from './ColorHandle'; +import {DOMRef} from '@react-types/shared'; +import {forwardRef} from 'react'; +import {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'}; +import {style} from '../style/spectrum-theme' with {type: 'macro'}; +import {useDOMRef} from '@react-spectrum/utils'; + +export interface ColorAreaProps extends Omit, StyleProps {} + +function ColorArea(props: ColorAreaProps, ref: DOMRef) { + let {UNSAFE_className = '', UNSAFE_style, styles} = props; + let containerRef = useDOMRef(ref); + return ( + ({ + ...defaultStyle, + background: isDisabled ? undefined : defaultStyle.background, + // Move position: relative to style macro so it can be overridden. + position: undefined, + ...UNSAFE_style + })} + className={renderProps => UNSAFE_className + style({ + position: 'relative', + size: 192, + minSize: 64, + borderRadius: 'default', + outlineColor: { + default: 'gray-1000/10', + forcedColors: 'ButtonBorder' + }, + outlineWidth: 1, + outlineOffset: -1, + outlineStyle: { + default: 'solid', + isDisabled: 'none' + }, + backgroundColor: { + isDisabled: 'disabled' + } + }, getAllowedOverrides({height: true}))(renderProps, styles)}> + {({state}) => + ( state.getThumbPosition()} />) + } + + ); +} + +/** + * A ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background. + */ +let _ColorArea = forwardRef(ColorArea); +export {_ColorArea as ColorArea}; diff --git a/packages/@react-spectrum/s2/src/ColorField.tsx b/packages/@react-spectrum/s2/src/ColorField.tsx new file mode 100644 index 00000000000..d6bf74020c5 --- /dev/null +++ b/packages/@react-spectrum/s2/src/ColorField.tsx @@ -0,0 +1,107 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import { + ColorField as AriaColorField, + ColorFieldProps as AriaColorFieldProps +} from 'react-aria-components'; +import {createFocusableRef} from '@react-spectrum/utils'; +import {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'}; +import {FieldErrorIcon, FieldGroup, FieldLabel, HelpText, Input} from './Field'; +import {FormContext, useFormProps} from './Form'; +import {forwardRef, Ref, useContext, useImperativeHandle, useRef} from 'react'; +import {HelpTextProps, SpectrumLabelableProps} from '@react-types/shared'; +import {style} from '../style/spectrum-theme' with {type: 'macro'}; +import {TextFieldRef} from '@react-types/textfield'; + +export interface ColorFieldProps extends Omit, StyleProps, SpectrumLabelableProps, HelpTextProps { + /** + * The size of the color field. + * + * @default 'M' + */ + size?: 'S' | 'M' | 'L' | 'XL' +} + +function ColorField(props: ColorFieldProps, ref: Ref) { + let formContext = useContext(FormContext); + props = useFormProps(props); + let { + label, + description, + errorMessage, + necessityIndicator, + labelPosition = 'top', + labelAlign = 'start', + UNSAFE_style, + UNSAFE_className = '', + styles, + ...fieldProps + } = props; + + // Expose imperative interface for ref + let domRef = useRef(null); + let inputRef = useRef(null); + useImperativeHandle(ref, () => ({ + ...createFocusableRef(domRef, inputRef), + select() { + if (inputRef.current) { + inputRef.current.select(); + } + }, + getInputElement() { + return inputRef.current; + } + })); + + return ( + + {({isDisabled, isInvalid}) => (<> + + {label} + + + + {isInvalid && } + + + {errorMessage} + + )} + + ); +} + +/** + * A color field allows users to edit a hex color or individual color channel value. + */ +const _ColorField = forwardRef(ColorField); +export {_ColorField as ColorField}; diff --git a/packages/@react-spectrum/s2/src/ColorHandle.tsx b/packages/@react-spectrum/s2/src/ColorHandle.tsx new file mode 100644 index 00000000000..51daf55dce5 --- /dev/null +++ b/packages/@react-spectrum/s2/src/ColorHandle.tsx @@ -0,0 +1,188 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import {cloneElement, JSX, RefObject, useState} from 'react'; +import {ColorThumb} from 'react-aria-components'; +import {createPortal} from 'react-dom'; +import {keyframes} from '../style/style-macro' with {type: 'macro'}; +import {style} from '../style/spectrum-theme' with {type: 'macro'}; +import {useId, useLayoutEffect} from '@react-aria/utils'; + +const HANDLE_SIZE = 16; +const LOUPE_HEIGHT = 64; // Does not include borders +const LOUPE_WIDTH = 48; +const LOUPE_BORDER_WIDTH = 1; +const LOUPE_OFFSET = 12; // Offset from handle to loupe + +interface ColorHandleProps { + containerRef: RefObject, + getPosition: () => {x: number, y: number} +} + +export function ColorHandle({containerRef, getPosition}: ColorHandleProps) { + return ( + ({ + background: isDisabled ? undefined : `linear-gradient(${defaultStyle.backgroundColor}, ${defaultStyle.backgroundColor}), repeating-conic-gradient(#E1E1E1 0% 25%, white 0% 50%) 50% / 16px 16px`, + backgroundColor: undefined, + top: defaultStyle.top || '50%', + left: defaultStyle.left || '50%' + })}> + {({isDragging, color}) => (<> +
+ + + + )} + + ); +} + +// ColorLoupe is rendered in a portal so that it breaks out of clipped/scrolling containers (e.g. popovers). +function ColorLoupePortal({isOpen, children}: { isOpen: boolean, children: JSX.Element }) { + let [state, setState] = useState(isOpen ? 'open' : 'closed'); + if (isOpen && state === 'closed') { + setState('open'); + } + + if (!isOpen && state === 'open') { + setState('exiting'); + } + + if (isOpen || state === 'exiting') { + return createPortal(cloneElement(children, {isExiting: state === 'exiting', onExited: () => setState('closed')}), document.body); + } + + return null; +} + +function ColorLoupe({isExiting, onExited, containerRef, loupeRef, getPosition, color}: any) { + let patternId = useId(); + + // Get the bounding rectangle of the container (e.g. ColorArea/ColorSlider). + let [containerRect, setContainerRect] = useState({top: 0, left: 0, width: 0, height: 0}); + useLayoutEffect(() => { + let rect = containerRef.current?.getBoundingClientRect(); + setContainerRect({ + top: rect?.top || 0, + left: rect?.left || 0, + width: rect?.width || 0, + height: rect?.height || 0 + }); + }, [containerRef]); + + // Compute the pixel position of the thumb. + let {x: thumbLeft, y: thumbTop} = getPosition(); + thumbTop *= containerRect.height; + thumbLeft *= containerRect.width; + + let enterAnimation = keyframes(` + from { + transform: translateY(8px); + opacity: 0; + } + `); + + let exitAnimation = keyframes(` + to { + transform: translateY(8px); + opacity: 0; + } + `); + + return ( + { + if (e.animationName === exitAnimation) { + onExited(); + } + }} + width={LOUPE_WIDTH + LOUPE_BORDER_WIDTH * 2} + height={LOUPE_HEIGHT + LOUPE_BORDER_WIDTH * 2} + ref={loupeRef} + aria-hidden="true"> + + + + + + + + + + ); +} diff --git a/packages/@react-spectrum/s2/src/ColorSlider.tsx b/packages/@react-spectrum/s2/src/ColorSlider.tsx new file mode 100644 index 00000000000..9633681adf9 --- /dev/null +++ b/packages/@react-spectrum/s2/src/ColorSlider.tsx @@ -0,0 +1,144 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import { + ColorSlider as AriaColorSlider, + ColorSliderProps as AriaColorSliderProps, + SliderOutput, + SliderTrack, + useLocale +} from 'react-aria-components'; +import {ColorHandle} from './ColorHandle'; +import {DOMRef, SpectrumLabelableProps} from '@react-types/shared'; +import {FieldLabel} from './Field'; +import {forwardRef, useRef} from 'react'; +import {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'}; +import {style} from '../style/spectrum-theme' with {type: 'macro'}; +import {useDOMRef} from '@react-spectrum/utils'; + +export interface ColorSliderProps extends Omit, Pick, StyleProps { + label?: string +} + +function ColorSlider(props: ColorSliderProps, ref: DOMRef) { + let {UNSAFE_className = '', UNSAFE_style, styles} = props; + let containerRef = useDOMRef(ref); + let trackRef = useRef(null); + let {locale} = useLocale(); + + return ( + + ); +} + +/** + * A ColorSlider allows users to adjust an individual channel of a color value. + */ +let _ColorSlider = forwardRef(ColorSlider); +export {_ColorSlider as ColorSlider}; diff --git a/packages/@react-spectrum/s2/src/ColorSwatch.tsx b/packages/@react-spectrum/s2/src/ColorSwatch.tsx new file mode 100644 index 00000000000..efb6a65d673 --- /dev/null +++ b/packages/@react-spectrum/s2/src/ColorSwatch.tsx @@ -0,0 +1,112 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import { + ColorSwatch as AriaColorSwatch, + ColorSwatchProps as AriaColorSwatchProps, + ColorSwatchContext, + parseColor, + useContextProps +} from 'react-aria-components'; +import {Color} from '@react-types/color'; +import {createContext, forwardRef, JSX, ReactElement, useContext, useMemo} from 'react'; +import {DOMRef} from '@react-types/shared'; +import {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'}; +import {style} from '../style/spectrum-theme' with {type: 'macro'}; +import {useDOMRef} from '@react-spectrum/utils'; + +export interface ColorSwatchProps extends Omit, UnsafeStyles { + /** + * The size of the ColorSwatch. + * @default "M" + */ + size?: 'XS' | 'S' | 'M' | 'L', + /** + * The corner rounding of the ColorSwatch. + * @default "default" + */ + rounding?: 'default' | 'none' | 'full', + /** Spectrum-defined styles, returned by the `style()` macro. */ + styles?: StylesPropWithHeight +} + +interface SpectrumColorSwatchContextValue extends Pick { + useWrapper: (swatch: ReactElement, color: Color, rounding: ColorSwatchProps['rounding']) => JSX.Element +} + +export const SpectrumColorSwatchContext = createContext(null); + +function ColorSwatch(props: ColorSwatchProps, ref: DOMRef): JSX.Element { + let domRef = useDOMRef(ref); + [props, domRef] = useContextProps(props, domRef, ColorSwatchContext); + let ctx = useContext(SpectrumColorSwatchContext); + let { + size = ctx?.size || 'M', + rounding = ctx?.rounding || 'default', + color + } = props; + let nonNullValue = color || '#fff0'; + color = useMemo(() => typeof nonNullValue === 'string' ? parseColor(nonNullValue) : nonNullValue, [nonNullValue]); + + let swatch = ( + ({ + // TODO: should there be a distinction between transparent and no value (e.g. null)? + background: color.getChannelValue('alpha') > 0 + ? `linear-gradient(${color}, ${color}), repeating-conic-gradient(#e6e6e6 0% 25%, white 0% 50%) 0% 50% / 16px 16px` + // Red slash to indicate there is no selected color. + : 'linear-gradient(to bottom right, transparent calc(50% - 2px), var(--slash-color) calc(50% - 2px) calc(50% + 2px), transparent calc(50% + 2px)) no-repeat' + })} + className={style({ + size: { + size: { + XS: 16, + S: 24, + M: 32, + L: 40 + } + }, + borderRadius: { + rounding: { + default: 'sm', + none: 'none', + full: 'full' + } + }, + borderColor: 'gray-1000/42', + borderWidth: 1, + borderStyle: 'solid', + boxSizing: 'border-box', + forcedColorAdjust: 'none', + '--slash-color': { + type: 'color', + value: 'red-900' + } + }, getAllowedOverrides({height: true}))({size, rounding}, props.styles)} /> + ); + + // ColorSwatchPicker needs to wrap the swatch in a ListBoxItem. + if (ctx) { + return ctx.useWrapper(swatch, color, rounding); + } + + return swatch; +} + +/** + * A ColorSwatch displays a preview of a selected color. + */ +let _ColorSwatch = forwardRef(ColorSwatch); +export {_ColorSwatch as ColorSwatch}; diff --git a/packages/@react-spectrum/s2/src/ColorSwatchPicker.tsx b/packages/@react-spectrum/s2/src/ColorSwatchPicker.tsx new file mode 100644 index 00000000000..555108c7683 --- /dev/null +++ b/packages/@react-spectrum/s2/src/ColorSwatchPicker.tsx @@ -0,0 +1,118 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import {ColorSwatchPicker as AriaColorSwatchPicker, ColorSwatchPickerItem as AriaColorSwatchPickerItem} from 'react-aria-components'; +import {Color} from '@react-types/color'; +import {ColorSwatchProps, SpectrumColorSwatchContext} from './ColorSwatch'; +import {DOMRef, ValueBase} from '@react-types/shared'; +import {focusRing, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'}; +import {forwardRef, ReactElement, ReactNode} from 'react'; +import {size as sizeValue, style} from '../style/spectrum-theme' with {type: 'macro'}; +import {useDOMRef} from '@react-spectrum/utils'; + +export interface ColorSwatchPickerProps extends ValueBase, StyleProps { + /** The ColorSwatches within the ColorSwatchPicker. */ + children: ReactNode, + /** + * The amount of padding between the swatches. + * @default "regular" + */ + density?: 'compact' | 'regular' | 'spacious', + /** + * The size of the color swatches. + * @default "M" + */ + size?: 'XS' | 'S' | 'M' | 'L', + /** + * The corner rounding of the color swatches. + * @default "none" + */ + rounding?: 'none' | 'default' | 'full' +} + +function ColorSwatchPicker(props: ColorSwatchPickerProps, ref: DOMRef) { + let { + density = 'regular', + size = 'M', + rounding = 'none', + ...otherProps + } = props; + let domRef = useDOMRef(ref); + + return ( + + + {props.children} + + + ); +} + +/** + * A ColorSwatchPicker displays a list of color swatches and allows a user to select one of them. + */ +let _ColorSwatchPicker = forwardRef(ColorSwatchPicker); +export {_ColorSwatchPicker as ColorSwatchPicker}; + +function useWrapper(swatch: ReactElement, color: Color, rounding: ColorSwatchProps['rounding']) { + return ( + style({ + ...focusRing(), + position: 'relative', + borderRadius: { + rounding: { + none: 'none', + default: 'sm', + full: 'full' + } + } + })({...renderProps, rounding})}> + {({isSelected}) => (<> + {swatch} + {isSelected && ( +
+ )} + )} + + ); +} diff --git a/packages/@react-spectrum/s2/src/ColorWheel.tsx b/packages/@react-spectrum/s2/src/ColorWheel.tsx new file mode 100644 index 00000000000..30a09516673 --- /dev/null +++ b/packages/@react-spectrum/s2/src/ColorWheel.tsx @@ -0,0 +1,105 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import { + ColorWheel as AriaColorWheel, + ColorWheelProps as AriaColorWheelProps, + ColorWheelTrack +} from 'react-aria-components'; +import {ColorHandle} from './ColorHandle'; +import {DOMRef} from '@react-types/shared'; +import {forwardRef} from 'react'; +import {style} from '../style/spectrum-theme' with {type: 'macro'}; +import {StyleProps} from './style-utils'; +import {useDOMRef} from '@react-spectrum/utils'; + +export interface ColorWheelProps extends Omit, StyleProps { + /** + * @default 192 + */ + size?: number +} + +function ColorWheel(props: ColorWheelProps, ref: DOMRef) { + let {UNSAFE_className = '', UNSAFE_style, styles = ''} = props; + let containerRef = useDOMRef(ref); + // TODO: how to do mobile scaling? + let {size = 192} = props; + let outerRadius = Math.max(size, 175) / 2; + let thickness = 24; + let innerRadius = outerRadius - 24; + return ( + + {({isDisabled, state}) => (<> + ({ + background: isDisabled ? undefined : defaultStyle.background + })} + className={style({ + // Outer border + borderRadius: 'full', + outlineColor: { + default: 'gray-1000/10', + forcedColors: 'ButtonBorder' + }, + outlineWidth: 1, + outlineOffset: -1, + outlineStyle: { + default: 'solid', + isDisabled: 'none' + }, + backgroundColor: { + isDisabled: 'disabled' + } + })} /> +
+ { + let {x, y} = state.getThumbPosition(outerRadius - thickness / 2); + return { + x: (outerRadius + x) / (outerRadius * 2), + y: (outerRadius + y) / (outerRadius * 2) + }; + }} /> + )} + + ); +} + +/** + * A ColorWheel allows users to adjust the hue of an HSL or HSB color value on a circular track. + */ +let _ColorWheel = forwardRef(ColorWheel); +export {_ColorWheel as ColorWheel}; diff --git a/packages/@react-spectrum/s2/src/ComboBox.tsx b/packages/@react-spectrum/s2/src/ComboBox.tsx new file mode 100644 index 00000000000..37852d87315 --- /dev/null +++ b/packages/@react-spectrum/s2/src/ComboBox.tsx @@ -0,0 +1,386 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import { + ComboBox as AriaComboBox, + ComboBoxProps as AriaComboBoxProps, + PopoverProps as AriaPopoverProps, + Section as AriaSection, + Button, + InputContext, + ListBox, + ListBoxItem, + ListBoxItemProps, + ListBoxProps, + Provider, + SectionProps +} from 'react-aria-components'; +import {baseColor, style} from '../style/spectrum-theme' with {type: 'macro'}; +import {centerBaseline} from './CenterBaseline'; +import { + checkmark, + description, + Divider, + icon, + iconCenterWrapper, + label, + menuitem, + section, + sectionHeader, + sectionHeading +} from './Menu'; +import CheckmarkIcon from '../ui-icons/Checkmark'; +import ChevronIcon from '../ui-icons/Chevron'; +import {createContext, CSSProperties, forwardRef, ReactNode, useCallback, useContext, useImperativeHandle, useRef, useState} from 'react'; +import {createFocusableRef, useFocusableRef} from '@react-spectrum/utils'; +import {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'}; +import {FieldErrorIcon, FieldGroup, FieldLabel, HelpText, Input} from './Field'; +import {FocusableRef, HelpTextProps, SpectrumLabelableProps} from '@react-types/shared'; +import {FormContext, useFormProps} from './Form'; +import {forwardRefType} from './types'; +import {HeaderContext, HeadingContext, Text, TextContext} from './Content'; +import {IconContext} from './Icon'; +import {menu} from './Picker'; +import {mergeRefs, useResizeObserver} from '@react-aria/utils'; +import {Placement} from 'react-aria'; +import {Popover} from './Popover'; +import {pressScale} from './pressScale'; + + +export interface ComboboxStyleProps { + /** + * The size of the Combobox. + * + * @default "M" + */ + size?: 'S' | 'M' | 'L' | 'XL' +} +export interface ComboBoxProps extends + Omit, 'children' | 'style' | 'className' | 'defaultFilter' | 'allowsEmptyCollection'>, + ComboboxStyleProps, + StyleProps, + SpectrumLabelableProps, + HelpTextProps, + Pick, 'items'>, + Pick { + /** The contents of the collection. */ + children: ReactNode | ((item: T) => ReactNode), + /** + * Direction the menu will render relative to the Picker. + * + * @default "bottom" + */ + direction?: 'bottom' | 'top', + /** + * Alignment of the menu relative to the input target. + * + * @default "start" + */ + align?: 'start' | 'end', + /** Width of the menu. By default, matches width of the trigger. Note that the minimum width of the dropdown is always equal to the trigger's width. */ + menuWidth?: number +} + +const inputButton = style({ + display: 'flex', + outlineStyle: 'none', + textAlign: 'center', + borderStyle: 'none', + borderRadius: 'control-sm', + alignItems: 'center', + justifyContent: 'center', + size: { + size: { + S: 16, + M: 20, + L: 24, + XL: 32 + } + }, + marginStart: 'text-to-control', + aspectRatio: 'square', + flexShrink: 0, + transition: { + default: 'default', + forcedColors: 'none' + }, + backgroundColor: { + default: baseColor('gray-100'), + isOpen: 'gray-200', + isDisabled: 'disabled', + forcedColors: { + default: 'ButtonText', + isHovered: 'Highlight', + isOpen: 'Highlight', + isDisabled: 'GrayText' + } + }, + color: { + default: 'neutral', + isDisabled: 'disabled', + forcedColors: { + default: 'ButtonFace' + } + } +}); + +const iconStyles = style({ + flexShrink: 0, + rotate: 90, + '--iconPrimary': { + type: 'fill', + value: 'currentColor' + } +}); + +let InternalComboboxContext = createContext<{size: 'S' | 'M' | 'L' | 'XL'}>({size: 'M'}); + +function ComboBox(props: ComboBoxProps, ref: FocusableRef) { + let domRef = useFocusableRef(ref); + let inputRef = useRef(null); + let buttonRef = useRef(null); + let formContext = useContext(FormContext); + props = useFormProps(props); + let { + direction = 'bottom', + align = 'start', + shouldFlip = true, + menuWidth, + label, + description: descriptionMessage, + errorMessage, + children, + items, + size = 'M', + labelPosition = 'top', + labelAlign = 'start', + necessityIndicator, + UNSAFE_className = '', + UNSAFE_style, + ...pickerProps + } = props; + + // Expose imperative interface for ref + useImperativeHandle(ref, () => ({ + ...createFocusableRef(domRef, inputRef), + select() { + if (inputRef.current) { + inputRef.current.select(); + } + }, + getInputElement() { + return inputRef.current; + } + })); + + // Better way to encode this into a style? need to account for flipping + let menuOffset: number; + if (size === 'S') { + menuOffset = 6; + } else if (size === 'M') { + menuOffset = 6; + } else if (size === 'L') { + menuOffset = 7; + } else { + menuOffset = 8; + } + + let triggerRef = useRef(null); + // Make menu width match input + button + let [triggerWidth, setTriggerWidth] = useState(null); + let onResize = useCallback(() => { + if (triggerRef.current) { + let inputRect = triggerRef.current.getBoundingClientRect(); + let minX = inputRect.left; + let maxX = inputRect.right; + setTriggerWidth((maxX - minX) + 'px'); + } + }, [triggerRef, setTriggerWidth]); + + useResizeObserver({ + ref: triggerRef, + onResize: onResize + }); + + return ( + + {({isDisabled, isOpen, isRequired, isInvalid}) => ( + <> + + + {label} + + + + {ctx => ( + + + + )} + + {isInvalid && } + + + + {errorMessage} + + + + + {children} + + + + + + )} + + ); +} + +/** + * ComboBox allow users to choose a single option from a collapsible list of options when space is limited. + */ +let _ComboBox = /*#__PURE__*/ (forwardRef as forwardRefType)(ComboBox); +export {_ComboBox as ComboBox}; + + +export interface ComboBoxItemProps extends Omit, StyleProps { + children: ReactNode +} + +export function ComboBoxItem(props: ComboBoxItemProps) { + let ref = useRef(null); + let isLink = props.href != null; + let {size} = useContext(InternalComboboxContext); + return ( + (props.UNSAFE_className || '') + menuitem({...renderProps, size, isLink}, props.styles)}> + {(renderProps) => { + let {children} = props; + return ( + <> + + {!isLink && } + {typeof children === 'string' ? {children} : children} + + + ); + }} + + ); +} + +export interface ComboBoxSectionProps extends SectionProps {} +export function ComboBoxSection(props: ComboBoxSectionProps) { + return ( + <> + + {props.children} + + + + ); +} diff --git a/packages/@react-spectrum/s2/src/Content.tsx b/packages/@react-spectrum/s2/src/Content.tsx new file mode 100644 index 00000000000..da56110f8e2 --- /dev/null +++ b/packages/@react-spectrum/s2/src/Content.tsx @@ -0,0 +1,132 @@ +/* + * Copyright 2024 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import {createContext, ForwardedRef, forwardRef, HTMLAttributes, ImgHTMLAttributes} from 'react'; +import {DOMRef} from '@react-types/shared'; +import {HeadingProps, Keyboard as KeyboardAria, Header as RACHeader, Heading as RACHeading, Text as TextAria, useContextProps} from 'react-aria-components'; +import {useDOMRef} from '@react-spectrum/utils'; + +// TODO: export these types from RAC? +interface SlottedValue { + slots?: Record +} + +export type SlottedContextValue = SlottedValue | T | null | undefined; +export type ContextValue = SlottedContextValue>; +export type WithRef = T & {ref?: ForwardedRef}; + +export const HeadingContext = createContext>({}); + +// Wrapper around RAC Heading to unmount when hidden. +function Heading(props: HeadingProps, ref: ForwardedRef) { + [props, ref] = useContextProps(props, ref, HeadingContext); + if (props.hidden) { + return null; + } + + return ; +} + +const _Heading = forwardRef(Heading); +export {_Heading as Heading}; + +export const HeaderContext = createContext, HTMLElement>>({}); + +function Header(props: HTMLAttributes, ref: DOMRef) { + let domRef = useDOMRef(ref); + [props, domRef] = useContextProps(props, domRef, HeaderContext); + if (props.hidden) { + return null; + } + + return ; +} + +const _Header = forwardRef(Header); +export {_Header as Header}; + +export const ContentContext = createContext, HTMLDivElement>>({}); + +function Content(props: HTMLAttributes, ref: DOMRef) { + let domRef = useDOMRef(ref); + [props, domRef] = useContextProps(props, domRef, ContentContext); + if (props.hidden) { + return null; + } + return
; +} + +const _Content = forwardRef(Content); +export {_Content as Content}; + +export const TextContext = createContext, HTMLDivElement>>({}); + +function Text(props: HTMLAttributes, ref: ForwardedRef) { + [props, ref] = useContextProps(props, ref, TextContext); + if (props.hidden) { + return null; + } + return ; +} + +const _Text = forwardRef(Text); +export {_Text as Text}; + +export const KeyboardContext = createContext, HTMLDivElement>>({}); + +function Keyboard(props: HTMLAttributes, ref: ForwardedRef) { + [props, ref] = useContextProps(props, ref, KeyboardContext); + if (props.hidden) { + return null; + } + return ; +} + +const _Keyboard = forwardRef(Keyboard); +export {_Keyboard as Keyboard}; + +export const FooterContext = createContext, HTMLElement>>({}); + +function Footer(props: HTMLAttributes, ref: DOMRef) { + let domRef = useDOMRef(ref); + [props, domRef] = useContextProps(props, domRef, FooterContext); + if (props.hidden) { + return null; + } + return