@react-types/provider
Advanced tools
Comparing version 3.0.0-rc.1 to 3.0.0-rc.2
{ | ||
"name": "@react-types/provider", | ||
"version": "3.0.0-rc.1", | ||
"version": "3.0.0-rc.2", | ||
"description": "Spectrum UI components in React", | ||
@@ -12,3 +12,3 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-types/shared": "^3.0.0-rc.1" | ||
"@react-types/shared": "^3.0.0-rc.2" | ||
}, | ||
@@ -21,3 +21,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "5a9784f0bb6c25af7422215efb31ef72caeb9600" | ||
"gitHead": "207e6ee9076905c96638a7f81a367758872e1410" | ||
} |
@@ -0,1 +1,13 @@ | ||
/* | ||
* Copyright 2020 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 {DOMProps, StyleProps, ValidationState} from '@react-types/shared'; | ||
@@ -23,8 +35,18 @@ import {ReactNode} from 'react'; | ||
interface ContextProps { | ||
/** | ||
* Set the placement of the toast alerts. | ||
* @default "bottom" | ||
*/ | ||
toastPlacement?: ToastPlacement, | ||
/** Whether children components should be displayed with the quiet style. */ | ||
isQuiet?: boolean, | ||
/** Whether children components should be displayed with the emphasized style. */ | ||
isEmphasized?: boolean, | ||
/** Whether children components should be disabled. */ | ||
isDisabled?: boolean, | ||
/** Whether children components should be displayed with the required style. */ | ||
isRequired?: boolean, | ||
/** Whether children components should be read only. */ | ||
isReadOnly?: boolean, | ||
/** Whether children components should be displayed with the validation state style. */ | ||
validationState?: ValidationState | ||
@@ -34,8 +56,35 @@ } | ||
export interface ProviderProps extends ContextProps, DOMProps, StyleProps { | ||
/** The children components to receive Provider props and context. */ | ||
children: ReactNode, | ||
/** | ||
* Theme scoped to this provider and its children components. | ||
* Sets the CSS variables for scale and color scheme values. | ||
*/ | ||
theme?: Theme, | ||
colorScheme?: ColorScheme, // by default, chooses based on OS setting | ||
defaultColorScheme?: ColorScheme, // if no OS setting, which to choose | ||
scale?: Scale, // by default, chooses based on touch/mouse | ||
/** | ||
* Color scheme scoped to this provider and its children components. | ||
* Defaults to the color scheme set by the OS. | ||
*/ | ||
colorScheme?: ColorScheme, | ||
/** | ||
* If there is not an OS/browser color scheme this is the default. | ||
* @default "light" | ||
*/ | ||
defaultColorScheme?: ColorScheme, | ||
/** | ||
* Spectrum scale scoped to this provider and its children components. | ||
* By default this is selected based on touch or mouse pointer type of the OS. | ||
*/ | ||
scale?: Scale, | ||
/** | ||
* A Typekit ID is required to use the suggested fonts. | ||
* Visit https://typekit.com/account/kits to create one. | ||
* The default is only intended for prototyping work. | ||
*/ | ||
typekitId?: string, | ||
/** | ||
* Locale (language specific format) of this provider and its children. | ||
* Using the format primary-region, ex. en-US, fr-CA, ar-AE. | ||
* @default "en-US" | ||
*/ | ||
locale?: string | ||
@@ -42,0 +91,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15226
4
88