@razorpay/blade 11.17.1 → 11.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/native/components/ActionList/ActionListItem.js +2 -1
- package/build/lib/native/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/native/components/Avatar/Avatar.native.js +7 -0
- package/build/lib/native/components/Avatar/Avatar.native.js.map +1 -0
- package/build/lib/native/components/Avatar/AvatarGroup.native.js +7 -0
- package/build/lib/native/components/Avatar/AvatarGroup.native.js.map +1 -0
- package/build/lib/native/components/Button/BaseButton/BaseButton.js +1 -1
- package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/native/components/Dropdown/DropdownHeaderFooter.js +1 -1
- package/build/lib/native/components/Dropdown/DropdownHeaderFooter.js.map +1 -1
- package/build/lib/native/components/Dropdown/dropdownComponentIds.js +1 -1
- package/build/lib/native/components/Dropdown/dropdownComponentIds.js.map +1 -1
- package/build/lib/native/components/Dropdown/dropdownUtils.js +1 -1
- package/build/lib/native/components/Dropdown/dropdownUtils.js.map +1 -1
- package/build/lib/native/components/Dropdown/useDropdown.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/native/components/Input/SearchInput/SearchInput.js +34 -0
- package/build/lib/native/components/Input/SearchInput/SearchInput.js.map +1 -0
- package/build/lib/native/components/ProgressBar/ProgressBar.js +1 -1
- package/build/lib/native/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/native/components/index.js +3 -0
- package/build/lib/native/components/index.js.map +1 -1
- package/build/lib/native/tokens/global/size.js +1 -1
- package/build/lib/native/tokens/global/size.js.map +1 -1
- package/build/lib/native/tokens/theme/bladeTheme.js +1 -1
- package/build/lib/native/tokens/theme/bladeTheme.js.map +1 -1
- package/build/lib/native/utils/metaAttribute/metaConstants.js +1 -1
- package/build/lib/native/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/lib/web/development/components/ActionList/ActionListItem.js +3 -1
- package/build/lib/web/development/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/web/development/components/Avatar/Avatar.web.js +125 -0
- package/build/lib/web/development/components/Avatar/Avatar.web.js.map +1 -0
- package/build/lib/web/development/components/Avatar/AvatarButton.js +86 -0
- package/build/lib/web/development/components/Avatar/AvatarButton.js.map +1 -0
- package/build/lib/web/development/components/Avatar/AvatarGroup.web.js +114 -0
- package/build/lib/web/development/components/Avatar/AvatarGroup.web.js.map +1 -0
- package/build/lib/web/development/components/Avatar/AvatarGroupContext.js +11 -0
- package/build/lib/web/development/components/Avatar/AvatarGroupContext.js.map +1 -0
- package/build/lib/web/development/components/Avatar/StyledAvatar.js +30 -0
- package/build/lib/web/development/components/Avatar/StyledAvatar.js.map +1 -0
- package/build/lib/web/development/components/Avatar/StyledAvatarButton.js +48 -0
- package/build/lib/web/development/components/Avatar/StyledAvatarButton.js.map +1 -0
- package/build/lib/web/development/components/Avatar/StyledAvatarGroup.js +24 -0
- package/build/lib/web/development/components/Avatar/StyledAvatarGroup.js.map +1 -0
- package/build/lib/web/development/components/Avatar/avatarTokens.js +49 -0
- package/build/lib/web/development/components/Avatar/avatarTokens.js.map +1 -0
- package/build/lib/web/development/components/Avatar/index.js +3 -0
- package/build/lib/web/development/components/Avatar/index.js.map +1 -0
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +1 -1
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js +4 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/DropdownHeaderFooter.js +2 -16
- package/build/lib/web/development/components/Dropdown/DropdownHeaderFooter.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/DropdownOverlay.web.js +1 -1
- package/build/lib/web/development/components/Dropdown/DropdownOverlay.web.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/dropdownComponentIds.js +2 -1
- package/build/lib/web/development/components/Dropdown/dropdownComponentIds.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/dropdownUtils.js +1 -1
- package/build/lib/web/development/components/Dropdown/dropdownUtils.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/useDropdown.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/development/components/Input/SearchInput/SearchInput.js +180 -0
- package/build/lib/web/development/components/Input/SearchInput/SearchInput.js.map +1 -0
- package/build/lib/web/development/components/Input/SearchInput/index.js +2 -0
- package/build/lib/web/development/components/Input/SearchInput/index.js.map +1 -0
- package/build/lib/web/development/components/ProgressBar/CircularProgressBar.web.js +5 -3
- package/build/lib/web/development/components/ProgressBar/CircularProgressBar.web.js.map +1 -1
- package/build/lib/web/development/components/ProgressBar/ProgressBar.js +1 -1
- package/build/lib/web/development/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/web/development/components/index.js +5 -0
- package/build/lib/web/development/components/index.js.map +1 -1
- package/build/lib/web/development/tokens/global/size.js +2 -0
- package/build/lib/web/development/tokens/global/size.js.map +1 -1
- package/build/lib/web/development/tokens/theme/bladeTheme.js +6 -6
- package/build/lib/web/development/tokens/theme/bladeTheme.js.map +1 -1
- package/build/lib/web/development/utils/metaAttribute/metaConstants.js +3 -0
- package/build/lib/web/development/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/lib/web/production/components/ActionList/ActionListItem.js +3 -1
- package/build/lib/web/production/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/web/production/components/Avatar/Avatar.web.js +125 -0
- package/build/lib/web/production/components/Avatar/Avatar.web.js.map +1 -0
- package/build/lib/web/production/components/Avatar/AvatarButton.js +86 -0
- package/build/lib/web/production/components/Avatar/AvatarButton.js.map +1 -0
- package/build/lib/web/production/components/Avatar/AvatarGroup.web.js +114 -0
- package/build/lib/web/production/components/Avatar/AvatarGroup.web.js.map +1 -0
- package/build/lib/web/production/components/Avatar/AvatarGroupContext.js +11 -0
- package/build/lib/web/production/components/Avatar/AvatarGroupContext.js.map +1 -0
- package/build/lib/web/production/components/Avatar/StyledAvatar.js +30 -0
- package/build/lib/web/production/components/Avatar/StyledAvatar.js.map +1 -0
- package/build/lib/web/production/components/Avatar/StyledAvatarButton.js +48 -0
- package/build/lib/web/production/components/Avatar/StyledAvatarButton.js.map +1 -0
- package/build/lib/web/production/components/Avatar/StyledAvatarGroup.js +24 -0
- package/build/lib/web/production/components/Avatar/StyledAvatarGroup.js.map +1 -0
- package/build/lib/web/production/components/Avatar/avatarTokens.js +49 -0
- package/build/lib/web/production/components/Avatar/avatarTokens.js.map +1 -0
- package/build/lib/web/production/components/Avatar/index.js +3 -0
- package/build/lib/web/production/components/Avatar/index.js.map +1 -0
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +1 -1
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js +4 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/DropdownHeaderFooter.js +2 -16
- package/build/lib/web/production/components/Dropdown/DropdownHeaderFooter.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/DropdownOverlay.web.js +1 -1
- package/build/lib/web/production/components/Dropdown/DropdownOverlay.web.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/dropdownComponentIds.js +2 -1
- package/build/lib/web/production/components/Dropdown/dropdownComponentIds.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/dropdownUtils.js +1 -1
- package/build/lib/web/production/components/Dropdown/dropdownUtils.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/useDropdown.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/production/components/Input/SearchInput/SearchInput.js +180 -0
- package/build/lib/web/production/components/Input/SearchInput/SearchInput.js.map +1 -0
- package/build/lib/web/production/components/Input/SearchInput/index.js +2 -0
- package/build/lib/web/production/components/Input/SearchInput/index.js.map +1 -0
- package/build/lib/web/production/components/ProgressBar/CircularProgressBar.web.js +5 -3
- package/build/lib/web/production/components/ProgressBar/CircularProgressBar.web.js.map +1 -1
- package/build/lib/web/production/components/ProgressBar/ProgressBar.js +1 -1
- package/build/lib/web/production/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/web/production/components/index.js +5 -0
- package/build/lib/web/production/components/index.js.map +1 -1
- package/build/lib/web/production/tokens/global/size.js +2 -0
- package/build/lib/web/production/tokens/global/size.js.map +1 -1
- package/build/lib/web/production/tokens/theme/bladeTheme.js +6 -6
- package/build/lib/web/production/tokens/theme/bladeTheme.js.map +1 -1
- package/build/lib/web/production/utils/metaAttribute/metaConstants.js +3 -0
- package/build/lib/web/production/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/types/components/index.d.ts +328 -147
- package/build/types/components/index.native.d.ts +282 -147
- package/build/types/tokens/index.d.ts +2 -0
- package/build/types/tokens/index.native.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
+
import React__default, { useState } from 'react';
|
|
4
|
+
import { BaseInput } from '../BaseInput/BaseInput.js';
|
|
5
|
+
import { getKeyboardAndAutocompleteProps } from '../BaseInput/utils.js';
|
|
6
|
+
import isEmpty from '../../../utils/lodashButBetter/isEmpty.js';
|
|
7
|
+
import 'react-native-svg';
|
|
8
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
9
|
+
import { MetaConstants } from '../../../utils/metaAttribute/metaConstants.js';
|
|
10
|
+
import { jsx } from 'react/jsx-runtime';
|
|
11
|
+
import '../../Icons/_Svg/Svg/Svg.native.js';
|
|
12
|
+
import 'styled-components/native';
|
|
13
|
+
import '@gorhom/portal';
|
|
14
|
+
import 'react-native-gesture-handler';
|
|
15
|
+
import '../../BladeProvider/useTheme.js';
|
|
16
|
+
import 'react-native';
|
|
17
|
+
import { getPlatformType } from '../../../utils/getPlatformType/getPlatformType.js';
|
|
18
|
+
import '../../BottomSheet/BottomSheetStack.js';
|
|
19
|
+
import '../../../tokens/global/typography.js';
|
|
20
|
+
import '../../../tokens/global/motion.js';
|
|
21
|
+
import CloseIcon from '../../Icons/CloseIcon/CloseIcon.js';
|
|
22
|
+
import SearchIcon from '../../Icons/SearchIcon/SearchIcon.js';
|
|
23
|
+
import { IconButton } from '../../Button/IconButton/IconButton.js';
|
|
24
|
+
import { BaseBox } from '../../Box/BaseBox/BaseBox.native.js';
|
|
25
|
+
import { Spinner } from '../../Spinner/Spinner/Spinner.js';
|
|
26
|
+
import { assignWithoutSideEffects } from '../../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
27
|
+
import { useMergeRefs } from '../../../utils/useMergeRefs.js';
|
|
28
|
+
import { dropdownComponentIds } from '../../Dropdown/dropdownComponentIds.js';
|
|
29
|
+
import { useDropdown } from '../../Dropdown/useDropdown.js';
|
|
30
|
+
|
|
31
|
+
var _excluded=["label","accessibilityLabel","labelPosition","placeholder","defaultValue","name","value","onChange","onClick","onFocus","onBlur","onSubmit","isDisabled","helpText","onClearButtonClick","isLoading","autoCapitalize","autoFocus","testID","size","showSearchIcon"];var isReactNative=function isReactNative(_textInputRef){return getPlatformType()==='react-native';};var _SearchInput=function _SearchInput(_ref,ref){var label=_ref.label,accessibilityLabel=_ref.accessibilityLabel,_ref$labelPosition=_ref.labelPosition,labelPosition=_ref$labelPosition===void 0?'top':_ref$labelPosition,placeholder=_ref.placeholder,defaultValue=_ref.defaultValue,name=_ref.name,value=_ref.value,_onChange=_ref.onChange,_onClick=_ref.onClick,onFocus=_ref.onFocus,onBlur=_ref.onBlur,onSubmit=_ref.onSubmit,isDisabled=_ref.isDisabled,helpText=_ref.helpText,onClearButtonClick=_ref.onClearButtonClick,isLoading=_ref.isLoading,autoCapitalize=_ref.autoCapitalize,autoFocus=_ref.autoFocus,testID=_ref.testID,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,_ref$showSearchIcon=_ref.showSearchIcon,showSearchIcon=_ref$showSearchIcon===void 0?true:_ref$showSearchIcon,styledProps=_objectWithoutProperties(_ref,_excluded);var textInputRef=React__default.useRef(null);var mergedRef=useMergeRefs(ref,textInputRef);var _useState=useState(false),_useState2=_slicedToArray(_useState,2),shouldShowClearButton=_useState2[0],setShouldShowClearButton=_useState2[1];var _useDropdown=useDropdown(),triggererWrapperRef=_useDropdown.triggererWrapperRef,onTriggerKeydown=_useDropdown.onTriggerKeydown,onTriggerClick=_useDropdown.onTriggerClick,dropdownTriggerer=_useDropdown.dropdownTriggerer;var isInsideDropdown=dropdownTriggerer==='SearchInput';React__default.useEffect(function(){setShouldShowClearButton(Boolean(defaultValue!=null?defaultValue:value));},[defaultValue,value]);var renderInteractionElement=function renderInteractionElement(){if(isLoading){return jsx(Spinner,{accessibilityLabel:"Loading Content",color:"primary"});}if(shouldShowClearButton){return jsx(IconButton,{size:"medium",icon:CloseIcon,onClick:function onClick(){var _textInputRef$current;if(isEmpty(value)&&textInputRef.current){if(isReactNative(textInputRef.current)){textInputRef.current.clear();textInputRef.current.focus();}else if(textInputRef.current instanceof HTMLInputElement){textInputRef.current.value='';textInputRef.current.focus();}}onClearButtonClick==null?void 0:onClearButtonClick();textInputRef==null?void 0:(_textInputRef$current=textInputRef.current)==null?void 0:_textInputRef$current.focus();setShouldShowClearButton(false);},isDisabled:isDisabled,accessibilityLabel:"Clear Input Content"});}return null;};return jsx(BaseBox,{position:"relative",children:jsx(BaseInput,Object.assign({id:"searchinput",componentName:MetaConstants.SearchInput,ref:mergedRef,isDropdownTrigger:true,setInputWrapperRef:isInsideDropdown?function(wrapperNode){triggererWrapperRef.current=wrapperNode;}:undefined,label:label,accessibilityLabel:accessibilityLabel,hideLabelText:!Boolean(label),labelPosition:labelPosition,placeholder:placeholder,defaultValue:defaultValue,value:value,name:name,onKeyDown:isInsideDropdown?onTriggerKeydown:undefined,onChange:function onChange(_ref2){var name=_ref2.name,value=_ref2.value;if(value!=null&&value.length){setShouldShowClearButton(true);}if(shouldShowClearButton&&!(value!=null&&value.length)){setShouldShowClearButton(false);}_onChange==null?void 0:_onChange({name:name,value:value});},onClick:function onClick(e){if(isDisabled)return;if(isInsideDropdown){onTriggerClick();}_onClick==null?void 0:_onClick(e);},onFocus:onFocus,onBlur:onBlur,onSubmit:onSubmit,isDisabled:isDisabled,leadingIcon:showSearchIcon?SearchIcon:undefined,trailingInteractionElement:renderInteractionElement(),helpText:helpText,autoFocus:autoFocus,testID:testID},getKeyboardAndAutocompleteProps({type:'search',autoCapitalize:autoCapitalize}),{size:size},styledProps))});};var SearchInput=assignWithoutSideEffects(React__default.forwardRef(_SearchInput),{displayName:'SearchInput',componentId:dropdownComponentIds.triggers.SearchInput});
|
|
32
|
+
|
|
33
|
+
export { SearchInput };
|
|
34
|
+
//# sourceMappingURL=SearchInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchInput.js","sources":["../../../../../../src/components/Input/SearchInput/SearchInput.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport type { TextInput as TextInputReactNative } from 'react-native';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport { getKeyboardAndAutocompleteProps } from '../BaseInput/utils';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport { CloseIcon, SearchIcon } from '~components/Icons';\nimport { IconButton } from '~components/Button/IconButton';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type { BladeElementRef, BladeElementRefWithValue } from '~utils/types';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\n\ntype SearchInputCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'helpText'\n | 'placeholder'\n | 'defaultValue'\n | 'name'\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'value'\n | 'isDisabled'\n | 'autoFocus'\n | 'onSubmit'\n | 'autoCapitalize'\n | 'testID'\n | 'onClick'\n | 'size'\n> & {\n /**\n * Event handler to handle the onClick event for clear button.\n */\n onClearButtonClick?: () => void;\n\n /**\n * Decides whether to show a loading spinner for the input field.\n */\n isLoading?: boolean;\n /**\n * Toggle the visibility of the search icon.\n *\n * @default true\n */\n showSearchIcon?: boolean;\n} & StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype SearchInputPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype SearchInputPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\ntype SearchInputProps = (SearchInputPropsWithA11yLabel | SearchInputPropsWithLabel) &\n SearchInputCommonProps;\n\n// need to do this to tell TS to infer type as SearchInput of React Native and make it believe that `ref.current.clear()` exists\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isReactNative = (_textInputRef?: any): _textInputRef is TextInputReactNative => {\n return getPlatformType() === 'react-native';\n};\n\nconst _SearchInput: React.ForwardRefRenderFunction<BladeElementRef, SearchInputProps> = (\n {\n label,\n accessibilityLabel,\n labelPosition = 'top',\n placeholder,\n defaultValue,\n name,\n value,\n onChange,\n onClick,\n onFocus,\n onBlur,\n onSubmit,\n isDisabled,\n helpText,\n onClearButtonClick,\n isLoading,\n autoCapitalize,\n autoFocus,\n testID,\n size = 'medium',\n showSearchIcon = true,\n ...styledProps\n },\n ref,\n): ReactElement => {\n const textInputRef = React.useRef<BladeElementRefWithValue>(null);\n const mergedRef = useMergeRefs(ref, textInputRef);\n const [shouldShowClearButton, setShouldShowClearButton] = useState(false);\n const {\n triggererWrapperRef,\n onTriggerKeydown,\n onTriggerClick,\n dropdownTriggerer,\n } = useDropdown();\n const isInsideDropdown = dropdownTriggerer === 'SearchInput';\n\n React.useEffect(() => {\n setShouldShowClearButton(Boolean(defaultValue ?? value));\n }, [defaultValue, value]);\n\n const renderInteractionElement = (): ReactNode => {\n if (isLoading) {\n return <Spinner accessibilityLabel=\"Loading Content\" color=\"primary\" />;\n }\n\n if (shouldShowClearButton) {\n return (\n <IconButton\n size=\"medium\"\n icon={CloseIcon}\n onClick={() => {\n if (isEmpty(value) && textInputRef.current) {\n // when the input field is uncontrolled take the ref and clear the input and then call the onClearButtonClick function\n if (isReactNative(textInputRef.current)) {\n textInputRef.current.clear();\n textInputRef.current.focus();\n } else if (textInputRef.current instanceof HTMLInputElement) {\n textInputRef.current.value = '';\n textInputRef.current.focus();\n }\n }\n\n // if the input field is controlled just call the click handler and the value change shall be left upto the consumer\n onClearButtonClick?.();\n textInputRef?.current?.focus();\n setShouldShowClearButton(false);\n }}\n isDisabled={isDisabled}\n accessibilityLabel=\"Clear Input Content\"\n />\n );\n }\n\n return null;\n };\n\n return (\n <BaseBox position=\"relative\">\n <BaseInput\n id=\"searchinput\"\n componentName={MetaConstants.SearchInput}\n ref={mergedRef}\n isDropdownTrigger={true}\n setInputWrapperRef={\n isInsideDropdown\n ? (wrapperNode) => {\n triggererWrapperRef.current = wrapperNode;\n }\n : undefined\n }\n label={label as string}\n accessibilityLabel={accessibilityLabel}\n hideLabelText={!Boolean(label)}\n labelPosition={labelPosition}\n placeholder={placeholder}\n defaultValue={defaultValue}\n value={value}\n name={name}\n onKeyDown={isInsideDropdown ? onTriggerKeydown : undefined}\n onChange={({ name, value }) => {\n if (value?.length) {\n // show the clear button when the user starts typing in\n setShouldShowClearButton(true);\n }\n\n if (shouldShowClearButton && !value?.length) {\n // hide the clear button when the input field is empty\n setShouldShowClearButton(false);\n }\n\n onChange?.({ name, value });\n }}\n onClick={(e) => {\n if (isDisabled) return;\n if (isInsideDropdown) {\n onTriggerClick();\n }\n onClick?.(e);\n }}\n onFocus={onFocus}\n onBlur={onBlur}\n onSubmit={onSubmit}\n isDisabled={isDisabled}\n leadingIcon={showSearchIcon ? SearchIcon : undefined}\n trailingInteractionElement={renderInteractionElement()}\n helpText={helpText}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n testID={testID}\n {...getKeyboardAndAutocompleteProps({\n type: 'search',\n autoCapitalize,\n })}\n size={size}\n {...styledProps}\n />\n </BaseBox>\n );\n};\n\nconst SearchInput = assignWithoutSideEffects(React.forwardRef(_SearchInput), {\n displayName: 'SearchInput',\n componentId: dropdownComponentIds.triggers.SearchInput,\n});\n\nexport type { SearchInputProps };\nexport { SearchInput };\n"],"names":["isReactNative","_textInputRef","getPlatformType","_SearchInput","_ref","ref","label","accessibilityLabel","_ref$labelPosition","labelPosition","placeholder","defaultValue","name","value","onChange","onClick","onFocus","onBlur","onSubmit","isDisabled","helpText","onClearButtonClick","isLoading","autoCapitalize","autoFocus","testID","_ref$size","size","_ref$showSearchIcon","showSearchIcon","styledProps","_objectWithoutProperties","_excluded","textInputRef","React","useRef","mergedRef","useMergeRefs","_useState","useState","_useState2","_slicedToArray","shouldShowClearButton","setShouldShowClearButton","_useDropdown","useDropdown","triggererWrapperRef","onTriggerKeydown","onTriggerClick","dropdownTriggerer","isInsideDropdown","useEffect","Boolean","renderInteractionElement","_jsx","Spinner","color","IconButton","icon","CloseIcon","_textInputRef$current","isEmpty","current","clear","focus","HTMLInputElement","BaseBox","position","children","BaseInput","Object","assign","id","componentName","MetaConstants","SearchInput","isDropdownTrigger","setInputWrapperRef","wrapperNode","undefined","hideLabelText","onKeyDown","_ref2","length","e","leadingIcon","SearchIcon","trailingInteractionElement","getKeyboardAndAutocompleteProps","type","assignWithoutSideEffects","forwardRef","displayName","componentId","dropdownComponentIds","triggers"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mRA2FA,IAAMA,aAAa,CAAG,SAAhBA,aAAaA,CAAIC,aAAmB,CAA4C,CACpF,OAAOC,eAAe,EAAE,GAAK,cAAc,CAC7C,CAAC,CAED,IAAMC,YAA+E,CAAG,SAAlFA,YAA+EA,CAAAC,IAAA,CAyBnFC,GAAG,CACc,CAxBf,IAAAC,KAAK,CAAAF,IAAA,CAALE,KAAK,CACLC,kBAAkB,CAAAH,IAAA,CAAlBG,kBAAkB,CAAAC,kBAAA,CAAAJ,IAAA,CAClBK,aAAa,CAAbA,aAAa,CAAAD,kBAAA,GAAA,KAAA,CAAA,CAAG,KAAK,CAAAA,kBAAA,CACrBE,WAAW,CAAAN,IAAA,CAAXM,WAAW,CACXC,YAAY,CAAAP,IAAA,CAAZO,YAAY,CACZC,IAAI,CAAAR,IAAA,CAAJQ,IAAI,CACJC,KAAK,CAAAT,IAAA,CAALS,KAAK,CACLC,SAAQ,CAAAV,IAAA,CAARU,QAAQ,CACRC,QAAO,CAAAX,IAAA,CAAPW,OAAO,CACPC,OAAO,CAAAZ,IAAA,CAAPY,OAAO,CACPC,MAAM,CAAAb,IAAA,CAANa,MAAM,CACNC,QAAQ,CAAAd,IAAA,CAARc,QAAQ,CACRC,UAAU,CAAAf,IAAA,CAAVe,UAAU,CACVC,QAAQ,CAAAhB,IAAA,CAARgB,QAAQ,CACRC,kBAAkB,CAA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AAE,CACpBF,cAAc,EAAE,CAClB,CACAjC,QAAO,EAAA,IAAA,CAAA,KAAA,CAAA,CAAPA,QAAO,CAAGqE,CAAC,CAAC,CACd,CAAE,CACFpE,OAAO,CAAEA,OAAQ,CACjBC,MAAM,CAAEA,MAAO,CACfC,QAAQ,CAAEA,QAAS,CACnBC,UAAU,CAAEA,UAAW,CACvBkE,WAAW,CAAExD,cAAc,CAAGyD,UAAU,CAAGP,SAAU,CACrDQ,0BAA0B,CAAElC,wBAAwB,EAAG,CACvDjC,QAAQ,CAAEA,QAAS,CAEnBI,SAAS,CAAEA,SAAU,CACrBC,MAAM,CAAEA,MAAO,CAAA,CACX+D,+BAA+B,CAAC,CAClCC,IAAI,CAAE,QAAQ,CACdlE,cAAc,CAAdA,cACF,CAAC,CAAC,CAAA,CACFI,IAAI,CAAEA,IAAK,CAAA,CACPG,WAAW,CAChB,CAAC,CACK,CAAC,CAEd,CAAC,CAEK,IAAA6C,WAAW,CAAGe,wBAAwB,CAACxD,cAAK,CAACyD,UAAU,CAACxF,YAAY,CAAC,CAAE,CAC3EyF,WAAW,CAAE,aAAa,CAC1BC,WAAW,CAAEC,oBAAoB,CAACC,QAAQ,CAACpB,WAC7C,CAAC;;;;"}
|
|
@@ -24,7 +24,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
24
24
|
import { BaseBox } from '../Box/BaseBox/BaseBox.native.js';
|
|
25
25
|
import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.native.js';
|
|
26
26
|
|
|
27
|
-
var _excluded=["accessibilityLabel","color","type","isIndeterminate","label","showPercentage","size","value","variant","min","max","testID"];var progressBarHeight={small:size[2],medium:size[4],large:size[0]};var ProgressBar=function ProgressBar(_ref){var _label$trim;var accessibilityLabel=_ref.accessibilityLabel,color=_ref.color,type=_ref.type,_ref$isIndeterminate=_ref.isIndeterminate,isIndeterminate=_ref$isIndeterminate===void 0?false:_ref$isIndeterminate,label=_ref.label,_ref$showPercentage=_ref.showPercentage,showPercentage=_ref$showPercentage===void 0?true:_ref$showPercentage,_ref$size=_ref.size,size=_ref$size===void 0?'small':_ref$size,_ref$value=_ref.value,value=_ref$value===void 0?0:_ref$value,_ref$variant=_ref.variant,variant=_ref$variant===void 0?'progress':_ref$variant,_ref$min=_ref.min,min=_ref$min===void 0?0:_ref$min,_ref$max=_ref.max,max=_ref$max===void 0?100:_ref$max,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var progressType=!type&&(variant==='meter'||variant==='progress')?variant:type;var progressVariant=variant==='meter'||variant==='progress'?'linear':variant;var id=useId(`${progressType}-${progressVariant}`);if(__DEV__){if(progressType==='meter'&&isIndeterminate){throwBladeError({moduleName:'ProgressBar',message:`Cannot set 'isIndeterminate' when 'type' or 'variant' is 'meter'.`});}if(progressVariant==='circular'&&isIndeterminate){throwBladeError({moduleName:'ProgressBar',message:`Cannot set 'isIndeterminate' when 'variant' is 'circular'.`});}if(progressVariant==='linear'&&size==='large'){throwBladeError({moduleName:'ProgressBar',message:`Large size isn't available when 'variant' is 'linear'.`});}if(type&&(variant==='progress'||variant==='meter')){throwBladeError({moduleName:'ProgressBar',message:`variant can only be 'linear' or 'circular' when 'type=${type}'.`});}}var unfilledBackgroundColor=theme.colors.feedback.background.neutral.subtle;var filledBackgroundColor=color?theme.colors.feedback.background[color].intense:theme.colors.surface.background.primary.intense;var hasLabel=label&&((_label$trim=label.trim())==null?void 0:_label$trim.length)>0;var isMeter=progressType==='meter';var isCircular=progressVariant==='circular';var progressValue=clamp(value,min,max);var percentageProgressValue=Math.floor((progressValue-min)*100/(max-min));var shouldShowPercentage=showPercentage&&!isMeter&&!isIndeterminate;var accessibilityProps={role:'progressbar',label:accessibilityLabel!=null?accessibilityLabel:label,valueNow:percentageProgressValue,valueText:`${percentageProgressValue}%`,valueMin:min,valueMax:max};if(isMeter){accessibilityProps.role='meter';accessibilityProps.valueNow=progressValue;accessibilityProps.valueText=`${progressValue}`;}if(isIndeterminate){accessibilityProps.valueNow=undefined;accessibilityProps.valueMin=undefined;accessibilityProps.valueMax=undefined;accessibilityProps.valueText=undefined;}return jsx(BaseBox,Object.assign({},getStyledProps(styledProps),metaAttribute({name:MetaConstants.ProgressBar,testID:testID}),{children:jsxs(BaseBox,{display:"flex",flexDirection:"column",width:"100%",children:[!isCircular?jsxs(BaseBox,{display:"flex",flexDirection:"row",justifyContent:hasLabel?'space-between':'flex-end',children:[hasLabel?jsx(Text,{as:"label",variant:"body",size:"small",color:"surface.text.gray.subtle",children:label}):null,shouldShowPercentage?jsx(BaseBox,{marginBottom:"spacing.2",children:jsx(Text,{variant:"body",size:"small",color:"surface.text.gray.subtle",children:`${percentageProgressValue}%`})}):null]}):null,jsx(BaseBox,Object.assign({id:id},makeAccessible({role:accessibilityProps.role,label:accessibilityProps.label,valueNow:accessibilityProps.valueNow,valueText:accessibilityProps.valueText,valueMin:accessibilityProps.valueMin,valueMax:accessibilityProps.valueMax}),{children:isCircular?jsx(CircularProgressBarFilled,{size:size,label:label,progressPercent:percentageProgressValue,isMeter:isMeter,showPercentage:
|
|
27
|
+
var _excluded=["accessibilityLabel","color","type","isIndeterminate","label","showPercentage","size","value","variant","min","max","testID"];var progressBarHeight={small:size[2],medium:size[4],large:size[0]};var ProgressBar=function ProgressBar(_ref){var _label$trim;var accessibilityLabel=_ref.accessibilityLabel,color=_ref.color,type=_ref.type,_ref$isIndeterminate=_ref.isIndeterminate,isIndeterminate=_ref$isIndeterminate===void 0?false:_ref$isIndeterminate,label=_ref.label,_ref$showPercentage=_ref.showPercentage,showPercentage=_ref$showPercentage===void 0?true:_ref$showPercentage,_ref$size=_ref.size,size=_ref$size===void 0?'small':_ref$size,_ref$value=_ref.value,value=_ref$value===void 0?0:_ref$value,_ref$variant=_ref.variant,variant=_ref$variant===void 0?'progress':_ref$variant,_ref$min=_ref.min,min=_ref$min===void 0?0:_ref$min,_ref$max=_ref.max,max=_ref$max===void 0?100:_ref$max,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var progressType=!type&&(variant==='meter'||variant==='progress')?variant:type;var progressVariant=variant==='meter'||variant==='progress'?'linear':variant;var id=useId(`${progressType}-${progressVariant}`);if(__DEV__){if(progressType==='meter'&&isIndeterminate){throwBladeError({moduleName:'ProgressBar',message:`Cannot set 'isIndeterminate' when 'type' or 'variant' is 'meter'.`});}if(progressVariant==='circular'&&isIndeterminate){throwBladeError({moduleName:'ProgressBar',message:`Cannot set 'isIndeterminate' when 'variant' is 'circular'.`});}if(progressVariant==='linear'&&size==='large'){throwBladeError({moduleName:'ProgressBar',message:`Large size isn't available when 'variant' is 'linear'.`});}if(type&&(variant==='progress'||variant==='meter')){throwBladeError({moduleName:'ProgressBar',message:`variant can only be 'linear' or 'circular' when 'type=${type}'.`});}}var unfilledBackgroundColor=theme.colors.feedback.background.neutral.subtle;var filledBackgroundColor=color?theme.colors.feedback.background[color].intense:theme.colors.surface.background.primary.intense;var hasLabel=label&&((_label$trim=label.trim())==null?void 0:_label$trim.length)>0;var isMeter=progressType==='meter';var isCircular=progressVariant==='circular';var progressValue=clamp(value,min,max);var percentageProgressValue=Math.floor((progressValue-min)*100/(max-min));var shouldShowPercentage=showPercentage&&!isMeter&&!isIndeterminate;var accessibilityProps={role:'progressbar',label:accessibilityLabel!=null?accessibilityLabel:label,valueNow:percentageProgressValue,valueText:`${percentageProgressValue}%`,valueMin:min,valueMax:max};if(isMeter){accessibilityProps.role='meter';accessibilityProps.valueNow=progressValue;accessibilityProps.valueText=`${progressValue}`;}if(isIndeterminate){accessibilityProps.valueNow=undefined;accessibilityProps.valueMin=undefined;accessibilityProps.valueMax=undefined;accessibilityProps.valueText=undefined;}return jsx(BaseBox,Object.assign({},getStyledProps(styledProps),metaAttribute({name:MetaConstants.ProgressBar,testID:testID}),{children:jsxs(BaseBox,{display:"flex",flexDirection:"column",width:"100%",children:[!isCircular?jsxs(BaseBox,{display:"flex",flexDirection:"row",justifyContent:hasLabel?'space-between':'flex-end',children:[hasLabel?jsx(Text,{as:"label",variant:"body",size:"small",color:"surface.text.gray.subtle",children:label}):null,shouldShowPercentage?jsx(BaseBox,{marginBottom:"spacing.2",children:jsx(Text,{variant:"body",size:"small",color:"surface.text.gray.subtle",children:`${percentageProgressValue}%`})}):null]}):null,jsx(BaseBox,Object.assign({id:id},makeAccessible({role:accessibilityProps.role,label:accessibilityProps.label,valueNow:accessibilityProps.valueNow,valueText:accessibilityProps.valueText,valueMin:accessibilityProps.valueMin,valueMax:accessibilityProps.valueMax}),{children:isCircular?jsx(CircularProgressBarFilled,{size:size,label:label,progressPercent:percentageProgressValue,isMeter:isMeter,showPercentage:showPercentage,backgroundColor:unfilledBackgroundColor,fillColor:filledBackgroundColor,pulseMotionDuration:"duration.2xgentle",fillMotionDuration:"duration.2xgentle",pulseMotionDelay:"delay.long",motionEasing:"easing.standard.revealing"}):jsx(BaseBox,{backgroundColor:unfilledBackgroundColor,height:makeSize(progressBarHeight[size]),overflow:"hidden",position:"relative",children:jsx(ProgressBarFilled,{backgroundColor:filledBackgroundColor,progress:percentageProgressValue,fillMotionDuration:"duration.2xgentle",pulseMotionDuration:"duration.2xgentle",indeterminateMotionDuration:"duration.2xgentle",pulseMotionDelay:"delay.long",motionEasing:"easing.standard.revealing",type:progressType,isIndeterminate:isIndeterminate})})}))]})}));};
|
|
28
28
|
|
|
29
29
|
export { ProgressBar };
|
|
30
30
|
//# sourceMappingURL=ProgressBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","sources":["../../../../../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { ProgressBarFilled } from './ProgressBarFilled';\nimport { CircularProgressBarFilled } from './CircularProgressBar';\nimport clamp from '~utils/lodashButBetter/clamp';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { Text } from '~components/Typography/Text';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { useId } from '~utils/useId';\nimport { useTheme } from '~components/BladeProvider';\nimport type { BaseBoxProps } from '~components/Box/BaseBox';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { size } from '~tokens/global';\nimport type { TestID } from '~utils/types';\nimport { makeSize } from '~utils/makeSize';\nimport type { AccessibilityProps } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\n\ntype ProgressBarCommonProps = {\n /**\n * Sets aria-label to help users know what the progress bar is for. Default value is the same as the `label` passed.\n */\n accessibilityLabel?: string;\n /**\n * Sets the color of the progress bar which changes the feedback color.\n */\n color?: FeedbackColors;\n /**\n * Sets the type of the progress bar.\n * @default 'progress'\n */\n type?: 'meter' | 'progress';\n /**\n * Sets the label to be rendered for the progress bar. This value will also be used as default for `accessibilityLabel`.\n */\n label?: string;\n /**\n * Sets the size of the progress bar.\n * Note: 'large' size isn't available when the variant is 'linear'.\n * @default 'small'\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * Sets the progress value of the progress bar.\n * @default 'small'\n */\n value?: number;\n /**\n * Sets the minimum value for the progress bar.\n * @default 0\n */\n min?: number;\n /**\n * Sets the maximum value for the progress bar.\n * @default 100\n */\n max?: number;\n} & TestID &\n StyledPropsBlade;\n\ntype ProgressBarVariant = 'progress' | 'meter' | 'linear' | 'circular';\n\ntype ProgressBarProgressProps = ProgressBarCommonProps & {\n /**\n * Sets the variant to be rendered for the progress bar.\n * @default 'progress'\n */\n variant?: Extract<ProgressBarVariant, 'progress' | 'linear' | 'circular'>;\n /**\n * Sets whether the progress bar is in an indeterminate state.\n * @default false\n */\n isIndeterminate?: boolean;\n /**\n * Sets whether or not to show the progress percentage for the progress bar. Percentage is hidden by default for the `meter` variant.\n * @default true\n */\n showPercentage?: boolean;\n};\n\ntype ProgressBarMeterProps = ProgressBarCommonProps & {\n /**\n * Sets the variant to be rendered for thr progress bar.\n * @default 'progress'\n */\n variant?: Extract<ProgressBarVariant, 'meter' | 'linear' | 'circular'>;\n /**\n * Sets whether the progress bar is in an indeterminate state.\n * @default false\n */\n isIndeterminate?: undefined;\n /**\n * Sets whether or not to show the progress percentage for the progress bar. Percentage is hidden by default for the `meter` variant.\n * @default false\n */\n showPercentage?: undefined;\n};\n\ntype ProgressBarProps = ProgressBarProgressProps | ProgressBarMeterProps;\n\nconst progressBarHeight: Record<NonNullable<ProgressBarProps['size']>, 2 | 4 | 0> = {\n small: size[2],\n medium: size[4],\n // Large size isn't available when variant is 'linear'\n large: size[0],\n};\n\nconst ProgressBar = ({\n accessibilityLabel,\n color,\n type,\n isIndeterminate = false,\n label,\n showPercentage = true,\n size = 'small',\n value = 0,\n variant = 'progress',\n min = 0,\n max = 100,\n testID,\n ...styledProps\n}: ProgressBarProps): ReactElement => {\n const { theme } = useTheme();\n const progressType = !type && (variant === 'meter' || variant === 'progress') ? variant : type;\n const progressVariant = variant === 'meter' || variant === 'progress' ? 'linear' : variant;\n const id = useId(`${progressType}-${progressVariant}`);\n\n if (__DEV__) {\n if (progressType === 'meter' && isIndeterminate) {\n throwBladeError({\n moduleName: 'ProgressBar',\n message: `Cannot set 'isIndeterminate' when 'type' or 'variant' is 'meter'.`,\n });\n }\n\n if (progressVariant === 'circular' && isIndeterminate) {\n throwBladeError({\n moduleName: 'ProgressBar',\n message: `Cannot set 'isIndeterminate' when 'variant' is 'circular'.`,\n });\n }\n\n if (progressVariant === 'linear' && size === 'large') {\n throwBladeError({\n moduleName: 'ProgressBar',\n message: `Large size isn't available when 'variant' is 'linear'.`,\n });\n }\n\n if (type && (variant === 'progress' || variant === 'meter')) {\n throwBladeError({\n moduleName: 'ProgressBar',\n message: `variant can only be 'linear' or 'circular' when 'type=${type}'.`,\n });\n }\n }\n\n const unfilledBackgroundColor = theme.colors.feedback.background.neutral\n .subtle as BaseBoxProps['backgroundColor'];\n const filledBackgroundColor = color\n ? theme.colors.feedback.background[color].intense\n : theme.colors.surface.background.primary.intense;\n const hasLabel = label && label.trim()?.length > 0;\n const isMeter = progressType === 'meter';\n const isCircular = progressVariant === 'circular';\n const progressValue = clamp(value, min, max);\n const percentageProgressValue = Math.floor(((progressValue - min) * 100) / (max - min));\n const shouldShowPercentage = showPercentage && !isMeter && !isIndeterminate;\n const accessibilityProps: Pick<\n AccessibilityProps,\n 'role' | 'label' | 'valueMax' | 'valueNow' | 'valueMin' | 'valueText'\n > = {\n role: 'progressbar',\n label: accessibilityLabel ?? label,\n valueNow: percentageProgressValue,\n valueText: `${percentageProgressValue}%`,\n valueMin: min,\n valueMax: max,\n };\n\n if (isMeter) {\n accessibilityProps.role = 'meter';\n accessibilityProps.valueNow = progressValue;\n accessibilityProps.valueText = `${progressValue}`;\n }\n\n if (isIndeterminate) {\n accessibilityProps.valueNow = undefined;\n accessibilityProps.valueMin = undefined;\n accessibilityProps.valueMax = undefined;\n accessibilityProps.valueText = undefined;\n }\n\n return (\n <BaseBox\n {...getStyledProps(styledProps)}\n {...metaAttribute({ name: MetaConstants.ProgressBar, testID })}\n >\n <BaseBox display=\"flex\" flexDirection=\"column\" width=\"100%\">\n {!isCircular ? (\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent={hasLabel ? 'space-between' : 'flex-end'}\n >\n {hasLabel ? (\n <Text as=\"label\" variant=\"body\" size=\"small\" color=\"surface.text.gray.subtle\">\n {label}\n </Text>\n ) : null}\n {shouldShowPercentage ? (\n <BaseBox marginBottom=\"spacing.2\">\n <Text\n variant=\"body\"\n size=\"small\"\n color=\"surface.text.gray.subtle\"\n >{`${percentageProgressValue}%`}</Text>\n </BaseBox>\n ) : null}\n </BaseBox>\n ) : null}\n\n <BaseBox\n id={id}\n {...makeAccessible({\n role: accessibilityProps.role,\n label: accessibilityProps.label,\n valueNow: accessibilityProps.valueNow,\n valueText: accessibilityProps.valueText,\n valueMin: accessibilityProps.valueMin,\n valueMax: accessibilityProps.valueMax,\n })}\n >\n {isCircular ? (\n <CircularProgressBarFilled\n size={size}\n label={label}\n progressPercent={percentageProgressValue}\n isMeter={isMeter}\n showPercentage={shouldShowPercentage}\n backgroundColor={unfilledBackgroundColor as string}\n fillColor={filledBackgroundColor}\n pulseMotionDuration=\"duration.2xgentle\"\n fillMotionDuration=\"duration.2xgentle\"\n pulseMotionDelay=\"delay.long\"\n motionEasing=\"easing.standard.revealing\"\n />\n ) : (\n <BaseBox\n backgroundColor={unfilledBackgroundColor}\n height={makeSize(progressBarHeight[size])}\n overflow=\"hidden\"\n position=\"relative\"\n >\n <ProgressBarFilled\n backgroundColor={filledBackgroundColor}\n progress={percentageProgressValue}\n fillMotionDuration=\"duration.2xgentle\"\n pulseMotionDuration=\"duration.2xgentle\"\n indeterminateMotionDuration=\"duration.2xgentle\"\n pulseMotionDelay=\"delay.long\"\n motionEasing=\"easing.standard.revealing\"\n type={progressType}\n isIndeterminate={isIndeterminate}\n />\n </BaseBox>\n )}\n </BaseBox>\n </BaseBox>\n </BaseBox>\n );\n};\n\nexport type { ProgressBarProps, ProgressBarVariant };\nexport { ProgressBar };\n"],"names":["progressBarHeight","small","size","medium","large","ProgressBar","_ref","_label$trim","accessibilityLabel","color","type","_ref$isIndeterminate","isIndeterminate","label","_ref$showPercentage","showPercentage","_ref$size","_ref$value","value","_ref$variant","variant","_ref$min","min","_ref$max","max","testID","styledProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","progressType","progressVariant","id","useId","__DEV__","throwBladeError","moduleName","message","unfilledBackgroundColor","colors","feedback","background","neutral","subtle","filledBackgroundColor","intense","surface","primary","hasLabel","trim","length","isMeter","isCircular","progressValue","clamp","percentageProgressValue","Math","floor","shouldShowPercentage","accessibilityProps","role","valueNow","valueText","valueMin","valueMax","undefined","_jsx","BaseBox","Object","assign","getStyledProps","metaAttribute","name","MetaConstants","children","_jsxs","display","flexDirection","width","justifyContent","Text","as","marginBottom","makeAccessible","CircularProgressBarFilled","progressPercent","backgroundColor","fillColor","pulseMotionDuration","fillMotionDuration","pulseMotionDelay","motionEasing","height","makeSize","overflow","position","ProgressBarFilled","progress","indeterminateMotionDuration"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;6IAsGA,IAAMA,iBAA2E,CAAG,CAClFC,KAAK,CAAEC,IAAI,CAAC,CAAC,CAAC,CACdC,MAAM,CAAED,IAAI,CAAC,CAAC,CAAC,CAEfE,KAAK,CAAEF,IAAI,CAAC,CAAC,CACf,CAAC,CAEK,IAAAG,WAAW,CAAG,SAAdA,WAAWA,CAAAC,IAAA,CAcqB,CAAAC,IAAAA,WAAA,CAbpC,IAAAC,kBAAkB,CAAAF,IAAA,CAAlBE,kBAAkB,CAClBC,KAAK,CAAAH,IAAA,CAALG,KAAK,CACLC,IAAI,CAAAJ,IAAA,CAAJI,IAAI,CAAAC,oBAAA,CAAAL,IAAA,CACJM,eAAe,CAAfA,eAAe,CAAAD,oBAAA,GAAA,KAAA,CAAA,CAAG,KAAK,CAAAA,oBAAA,CACvBE,KAAK,CAAAP,IAAA,CAALO,KAAK,CAAAC,mBAAA,CAAAR,IAAA,CACLS,cAAc,CAAdA,cAAc,CAAAD,mBAAA,GAAA,KAAA,CAAA,CAAG,IAAI,CAAAA,mBAAA,CAAAE,SAAA,CAAAV,IAAA,CACrBJ,IAAI,CAAJA,IAAI,CAAAc,SAAA,GAAG,KAAA,CAAA,CAAA,OAAO,CAAAA,SAAA,CAAAC,UAAA,CAAAX,IAAA,CACdY,KAAK,CAALA,KAAK,CAAAD,UAAA,GAAA,KAAA,CAAA,CAAG,CAAC,CAAAA,UAAA,CAAAE,YAAA,CAAAb,IAAA,CACTc,OAAO,CAAPA,OAAO,CAAAD,YAAA,GAAG,KAAA,CAAA,CAAA,UAAU,CAAAA,YAAA,CAAAE,QAAA,CAAAf,IAAA,CACpBgB,GAAG,CAAHA,GAAG,CAAAD,QAAA,GAAA,KAAA,CAAA,CAAG,CAAC,CAAAA,QAAA,CAAAE,QAAA,C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AE1C,uBAAwB,CAClCkC,kBAAkB,CAAC,mBAAmB,CACtCD,mBAAmB,CAAC,mBAAmB,CACvCU,2BAA2B,CAAC,mBAAmB,CAC/CR,gBAAgB,CAAC,YAAY,CAC7BC,YAAY,CAAC,2BAA2B,CACxCnF,IAAI,CAAEsB,YAAa,CACnBpB,eAAe,CAAEA,eAAgB,CAClC,CAAC,CACK,CACV,CACM,CAAA,CAAC,CACH,CAAA,CAAC,CACH,CAAA,CAAC,CAEd;;;;"}
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","sources":["../../../../../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { ProgressBarFilled } from './ProgressBarFilled';\nimport { CircularProgressBarFilled } from './CircularProgressBar';\nimport clamp from '~utils/lodashButBetter/clamp';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { Text } from '~components/Typography/Text';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { useId } from '~utils/useId';\nimport { useTheme } from '~components/BladeProvider';\nimport type { BaseBoxProps } from '~components/Box/BaseBox';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { size } from '~tokens/global';\nimport type { TestID } from '~utils/types';\nimport { makeSize } from '~utils/makeSize';\nimport type { AccessibilityProps } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\n\ntype ProgressBarCommonProps = {\n /**\n * Sets aria-label to help users know what the progress bar is for. Default value is the same as the `label` passed.\n */\n accessibilityLabel?: string;\n /**\n * Sets the color of the progress bar which changes the feedback color.\n */\n color?: FeedbackColors;\n /**\n * Sets the type of the progress bar.\n * @default 'progress'\n */\n type?: 'meter' | 'progress';\n /**\n * Sets the label to be rendered for the progress bar. This value will also be used as default for `accessibilityLabel`.\n */\n label?: string;\n /**\n * Sets the size of the progress bar.\n * Note: 'large' size isn't available when the variant is 'linear'.\n * @default 'small'\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * Sets the progress value of the progress bar.\n * @default 'small'\n */\n value?: number;\n /**\n * Sets the minimum value for the progress bar.\n * @default 0\n */\n min?: number;\n /**\n * Sets the maximum value for the progress bar.\n * @default 100\n */\n max?: number;\n} & TestID &\n StyledPropsBlade;\n\ntype ProgressBarVariant = 'progress' | 'meter' | 'linear' | 'circular';\n\ntype ProgressBarProgressProps = ProgressBarCommonProps & {\n /**\n * Sets the variant to be rendered for the progress bar.\n * @default 'progress'\n */\n variant?: Extract<ProgressBarVariant, 'progress' | 'linear' | 'circular'>;\n /**\n * Sets whether the progress bar is in an indeterminate state.\n * @default false\n */\n isIndeterminate?: boolean;\n /**\n * Sets whether or not to show the progress percentage for the progress bar. Percentage is hidden by default for the `meter` variant.\n * @default true\n */\n showPercentage?: boolean;\n};\n\ntype ProgressBarMeterProps = ProgressBarCommonProps & {\n /**\n * Sets the variant to be rendered for thr progress bar.\n * @default 'progress'\n */\n variant?: Extract<ProgressBarVariant, 'meter' | 'linear' | 'circular'>;\n /**\n * Sets whether the progress bar is in an indeterminate state.\n * @default false\n */\n isIndeterminate?: undefined;\n /**\n * Sets whether or not to show the progress percentage for the progress bar. Percentage is hidden by default for the `meter` variant.\n * @default false\n */\n showPercentage?: undefined;\n};\n\ntype ProgressBarProps = ProgressBarProgressProps | ProgressBarMeterProps;\n\nconst progressBarHeight: Record<NonNullable<ProgressBarProps['size']>, 2 | 4 | 0> = {\n small: size[2],\n medium: size[4],\n // Large size isn't available when variant is 'linear'\n large: size[0],\n};\n\nconst ProgressBar = ({\n accessibilityLabel,\n color,\n type,\n isIndeterminate = false,\n label,\n showPercentage = true,\n size = 'small',\n value = 0,\n variant = 'progress',\n min = 0,\n max = 100,\n testID,\n ...styledProps\n}: ProgressBarProps): ReactElement => {\n const { theme } = useTheme();\n const progressType = !type && (variant === 'meter' || variant === 'progress') ? variant : type;\n const progressVariant = variant === 'meter' || variant === 'progress' ? 'linear' : variant;\n const id = useId(`${progressType}-${progressVariant}`);\n\n if (__DEV__) {\n if (progressType === 'meter' && isIndeterminate) {\n throwBladeError({\n moduleName: 'ProgressBar',\n message: `Cannot set 'isIndeterminate' when 'type' or 'variant' is 'meter'.`,\n });\n }\n\n if (progressVariant === 'circular' && isIndeterminate) {\n throwBladeError({\n moduleName: 'ProgressBar',\n message: `Cannot set 'isIndeterminate' when 'variant' is 'circular'.`,\n });\n }\n\n if (progressVariant === 'linear' && size === 'large') {\n throwBladeError({\n moduleName: 'ProgressBar',\n message: `Large size isn't available when 'variant' is 'linear'.`,\n });\n }\n\n if (type && (variant === 'progress' || variant === 'meter')) {\n throwBladeError({\n moduleName: 'ProgressBar',\n message: `variant can only be 'linear' or 'circular' when 'type=${type}'.`,\n });\n }\n }\n\n const unfilledBackgroundColor = theme.colors.feedback.background.neutral\n .subtle as BaseBoxProps['backgroundColor'];\n const filledBackgroundColor = color\n ? theme.colors.feedback.background[color].intense\n : theme.colors.surface.background.primary.intense;\n const hasLabel = label && label.trim()?.length > 0;\n const isMeter = progressType === 'meter';\n const isCircular = progressVariant === 'circular';\n const progressValue = clamp(value, min, max);\n const percentageProgressValue = Math.floor(((progressValue - min) * 100) / (max - min));\n const shouldShowPercentage = showPercentage && !isMeter && !isIndeterminate;\n const accessibilityProps: Pick<\n AccessibilityProps,\n 'role' | 'label' | 'valueMax' | 'valueNow' | 'valueMin' | 'valueText'\n > = {\n role: 'progressbar',\n label: accessibilityLabel ?? label,\n valueNow: percentageProgressValue,\n valueText: `${percentageProgressValue}%`,\n valueMin: min,\n valueMax: max,\n };\n\n if (isMeter) {\n accessibilityProps.role = 'meter';\n accessibilityProps.valueNow = progressValue;\n accessibilityProps.valueText = `${progressValue}`;\n }\n\n if (isIndeterminate) {\n accessibilityProps.valueNow = undefined;\n accessibilityProps.valueMin = undefined;\n accessibilityProps.valueMax = undefined;\n accessibilityProps.valueText = undefined;\n }\n\n return (\n <BaseBox\n {...getStyledProps(styledProps)}\n {...metaAttribute({ name: MetaConstants.ProgressBar, testID })}\n >\n <BaseBox display=\"flex\" flexDirection=\"column\" width=\"100%\">\n {!isCircular ? (\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent={hasLabel ? 'space-between' : 'flex-end'}\n >\n {hasLabel ? (\n <Text as=\"label\" variant=\"body\" size=\"small\" color=\"surface.text.gray.subtle\">\n {label}\n </Text>\n ) : null}\n {shouldShowPercentage ? (\n <BaseBox marginBottom=\"spacing.2\">\n <Text\n variant=\"body\"\n size=\"small\"\n color=\"surface.text.gray.subtle\"\n >{`${percentageProgressValue}%`}</Text>\n </BaseBox>\n ) : null}\n </BaseBox>\n ) : null}\n\n <BaseBox\n id={id}\n {...makeAccessible({\n role: accessibilityProps.role,\n label: accessibilityProps.label,\n valueNow: accessibilityProps.valueNow,\n valueText: accessibilityProps.valueText,\n valueMin: accessibilityProps.valueMin,\n valueMax: accessibilityProps.valueMax,\n })}\n >\n {isCircular ? (\n <CircularProgressBarFilled\n size={size}\n label={label}\n progressPercent={percentageProgressValue}\n isMeter={isMeter}\n showPercentage={showPercentage}\n backgroundColor={unfilledBackgroundColor as string}\n fillColor={filledBackgroundColor}\n pulseMotionDuration=\"duration.2xgentle\"\n fillMotionDuration=\"duration.2xgentle\"\n pulseMotionDelay=\"delay.long\"\n motionEasing=\"easing.standard.revealing\"\n />\n ) : (\n <BaseBox\n backgroundColor={unfilledBackgroundColor}\n height={makeSize(progressBarHeight[size])}\n overflow=\"hidden\"\n position=\"relative\"\n >\n <ProgressBarFilled\n backgroundColor={filledBackgroundColor}\n progress={percentageProgressValue}\n fillMotionDuration=\"duration.2xgentle\"\n pulseMotionDuration=\"duration.2xgentle\"\n indeterminateMotionDuration=\"duration.2xgentle\"\n pulseMotionDelay=\"delay.long\"\n motionEasing=\"easing.standard.revealing\"\n type={progressType}\n isIndeterminate={isIndeterminate}\n />\n </BaseBox>\n )}\n </BaseBox>\n </BaseBox>\n </BaseBox>\n );\n};\n\nexport type { ProgressBarProps, ProgressBarVariant };\nexport { ProgressBar };\n"],"names":["progressBarHeight","small","size","medium","large","ProgressBar","_ref","_label$trim","accessibilityLabel","color","type","_ref$isIndeterminate","isIndeterminate","label","_ref$showPercentage","showPercentage","_ref$size","_ref$value","value","_ref$variant","variant","_ref$min","min","_ref$max","max","testID","styledProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","progressType","progressVariant","id","useId","__DEV__","throwBladeError","moduleName","message","unfilledBackgroundColor","colors","feedback","background","neutral","subtle","filledBackgroundColor","intense","surface","primary","hasLabel","trim","length","isMeter","isCircular","progressValue","clamp","percentageProgressValue","Math","floor","shouldShowPercentage","accessibilityProps","role","valueNow","valueText","valueMin","valueMax","undefined","_jsx","BaseBox","Object","assign","getStyledProps","metaAttribute","name","MetaConstants","children","_jsxs","display","flexDirection","width","justifyContent","Text","as","marginBottom","makeAccessible","CircularProgressBarFilled","progressPercent","backgroundColor","fillColor","pulseMotionDuration","fillMotionDuration","pulseMotionDelay","motionEasing","height","makeSize","overflow","position","ProgressBarFilled","progress","indeterminateMotionDuration"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;6IAsGA,IAAMA,iBAA2E,CAAG,CAClFC,KAAK,CAAEC,IAAI,CAAC,CAAC,CAAC,CACdC,MAAM,CAAED,IAAI,CAAC,CAAC,CAAC,CAEfE,KAAK,CAAEF,IAAI,CAAC,CAAC,CACf,CAAC,CAEK,IAAAG,WAAW,CAAG,SAAdA,WAAWA,CAAAC,IAAA,CAcqB,CAAAC,IAAAA,WAAA,CAbpC,IAAAC,kBAAkB,CAAAF,IAAA,CAAlBE,kBAAkB,CAClBC,KAAK,CAAAH,IAAA,CAALG,KAAK,CACLC,IAAI,CAAAJ,IAAA,CAAJI,IAAI,CAAAC,oBAAA,CAAAL,IAAA,CACJM,eAAe,CAAfA,eAAe,CAAAD,oBAAA,GAAA,KAAA,CAAA,CAAG,KAAK,CAAAA,oBAAA,CACvBE,KAAK,CAAAP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AAEA,KAAM,CACb0E,eAAe,CAAE9B,uBAAwB,CACzCJ,OAAO,CAAEA,OAAQ,CACjBtC,cAAc,CAAEA,cAAe,CAC/ByE,eAAe,CAAEhD,uBAAkC,CACnDiD,SAAS,CAAE3C,qBAAsB,CACjC4C,mBAAmB,CAAC,mBAAmB,CACvCC,kBAAkB,CAAC,mBAAmB,CACtCC,gBAAgB,CAAC,YAAY,CAC7BC,YAAY,CAAC,2BAA2B,CACzC,CAAC,CAEFzB,GAAA,CAACC,OAAO,CAAA,CACNmB,eAAe,CAAEhD,uBAAwB,CACzCsD,MAAM,CAAEC,QAAQ,CAAC/F,iBAAiB,CAACE,IAAI,CAAC,CAAE,CAC1C8F,QAAQ,CAAC,QAAQ,CACjBC,QAAQ,CAAC,UAAU,CAAArB,QAAA,CAEnBR,GAAA,CAAC8B,iBAAiB,CAAA,CAChBV,eAAe,CAAE1C,qBAAsB,CACvCqD,QAAQ,CAAE1C,uBAAwB,CAClCkC,kBAAkB,CAAC,mBAAmB,CACtCD,mBAAmB,CAAC,mBAAmB,CACvCU,2BAA2B,CAAC,mBAAmB,CAC/CR,gBAAgB,CAAC,YAAY,CAC7BC,YAAY,CAAC,2BAA2B,CACxCnF,IAAI,CAAEsB,YAAa,CACnBpB,eAAe,CAAEA,eAAgB,CAClC,CAAC,CACK,CACV,CACM,CAAA,CAAC,CACH,CAAA,CAAC,CACH,CAAA,CAAC,CAEd;;;;"}
|
|
@@ -7,6 +7,8 @@ export { ActionListItem, ActionListItemBadge, ActionListItemBadgeGroup, ActionLi
|
|
|
7
7
|
export { ActionListItemAsset } from './ActionList/ActionListItemAsset.native.js';
|
|
8
8
|
export { Alert } from './Alert/Alert.js';
|
|
9
9
|
export { Amount } from './Amount/Amount.js';
|
|
10
|
+
export { Avatar } from './Avatar/Avatar.native.js';
|
|
11
|
+
export { AvatarGroup } from './Avatar/AvatarGroup.native.js';
|
|
10
12
|
export { Badge } from './Badge/Badge.js';
|
|
11
13
|
export { BladeProvider } from './BladeProvider/BladeProvider.native.js';
|
|
12
14
|
export { default as useTheme } from './BladeProvider/useTheme.js';
|
|
@@ -390,6 +392,7 @@ export { OTPInput } from './Input/OTPInput/OTPInput.js';
|
|
|
390
392
|
export { PasswordInput } from './Input/PasswordInput/PasswordInput.js';
|
|
391
393
|
export { TextArea } from './Input/TextArea/TextArea.js';
|
|
392
394
|
export { TextInput } from './Input/TextInput/TextInput.js';
|
|
395
|
+
export { SearchInput } from './Input/SearchInput/SearchInput.js';
|
|
393
396
|
export { PhoneNumberInput } from './Input/PhoneNumberInput/PhoneNumberInput.native.js';
|
|
394
397
|
export { default as Link } from './Link/Link/Link.js';
|
|
395
398
|
export { List } from './List/List.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var size={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,10:10,12:12,16:16,18:18,20:20,24:24,28:28,32:32,33:33,36:36,40:40,44:44,48:48,56:56,60:60,64:64,72:72,100:100,120:120,140:140,160:160,176:176,200:200,240:240,300:300,314:314,360:360,400:400,584:584,640:640,760:760,800:800,1024:1024,1136:1136};
|
|
1
|
+
var size={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,10:10,12:12,16:16,18:18,20:20,24:24,28:28,30:30,32:32,33:33,36:36,40:40,44:44,48:48,56:56,60:60,64:64,72:72,100:100,120:120,140:140,160:160,176:176,200:200,240:240,300:300,314:314,360:360,400:400,584:584,640:640,760:760,800:800,1024:1024,1136:1136};
|
|
2
2
|
|
|
3
3
|
export { size };
|
|
4
4
|
//# sourceMappingURL=size.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"size.js","sources":["../../../../../src/tokens/global/size.ts"],"sourcesContent":["/**\n * Size tokens are currently not exposed for users (therefore not available in theme)\n */\nexport const size = {\n /** 0 px */\n 0: 0,\n /** 1 px */\n 1: 1,\n /** 2 px */\n 2: 2,\n /** 3 px */\n 3: 3,\n /** 4 px */\n 4: 4,\n /** 5 px */\n 5: 5,\n /** 6 px */\n 6: 6,\n /** 7 px */\n 7: 7,\n /** 8 px */\n 8: 8,\n /** 10 px */\n 10: 10,\n /** 12 px */\n 12: 12,\n /** 16 px */\n 16: 16,\n /** 18 px */\n 18: 18,\n /** 20 px */\n 20: 20,\n /** 24 px */\n 24: 24,\n /** 28 px */\n 28: 28,\n /** 32 px */\n 32: 32,\n /** 33 px */\n 33: 33,\n /** 36 px */\n 36: 36,\n /** 40 px */\n 40: 40,\n /** 44 px */\n 44: 44,\n /** 48 px */\n 48: 48,\n /** 56 px */\n 56: 56,\n /** 60 px */\n 60: 60,\n /** 64 px */\n 64: 64,\n /** 72 px */\n 72: 72,\n /** 100 px */\n 100: 100,\n /** 120 px */\n 120: 120,\n /** 140 px */\n 140: 140,\n /** 160 px */\n 160: 160,\n /** 176 px */\n 176: 176,\n /** 200 px */\n 200: 200,\n /** 240 px */\n 240: 240,\n /** 300 px */\n 300: 300,\n /** 314 px */\n 314: 314,\n /** 360 px */\n 360: 360,\n /** 400 px */\n 400: 400,\n /** 584 px */\n 584: 584,\n /** 640 px */\n 640: 640,\n /** 760 px */\n 760: 760,\n /** 800 px */\n 800: 800,\n /** 1024 px */\n 1024: 1024,\n /** 1136 px */\n 1136: 1136,\n} as const;\n\nexport type Size = typeof size;\n"],"names":["size"],"mappings":"AAGa,IAAAA,IAAI,CAAG,CAElB,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,IAAI,CAAE,IAAI,CAEV,IAAI,CAAE,IACR;;;;"}
|
|
1
|
+
{"version":3,"file":"size.js","sources":["../../../../../src/tokens/global/size.ts"],"sourcesContent":["/**\n * Size tokens are currently not exposed for users (therefore not available in theme)\n */\nexport const size = {\n /** 0 px */\n 0: 0,\n /** 1 px */\n 1: 1,\n /** 2 px */\n 2: 2,\n /** 3 px */\n 3: 3,\n /** 4 px */\n 4: 4,\n /** 5 px */\n 5: 5,\n /** 6 px */\n 6: 6,\n /** 7 px */\n 7: 7,\n /** 8 px */\n 8: 8,\n /** 10 px */\n 10: 10,\n /** 12 px */\n 12: 12,\n /** 16 px */\n 16: 16,\n /** 18 px */\n 18: 18,\n /** 20 px */\n 20: 20,\n /** 24 px */\n 24: 24,\n /** 28 px */\n 28: 28,\n /** 32 px */\n 30: 30,\n /** 32 px */\n 32: 32,\n /** 33 px */\n 33: 33,\n /** 36 px */\n 36: 36,\n /** 40 px */\n 40: 40,\n /** 44 px */\n 44: 44,\n /** 48 px */\n 48: 48,\n /** 56 px */\n 56: 56,\n /** 60 px */\n 60: 60,\n /** 64 px */\n 64: 64,\n /** 72 px */\n 72: 72,\n /** 100 px */\n 100: 100,\n /** 120 px */\n 120: 120,\n /** 140 px */\n 140: 140,\n /** 160 px */\n 160: 160,\n /** 176 px */\n 176: 176,\n /** 200 px */\n 200: 200,\n /** 240 px */\n 240: 240,\n /** 300 px */\n 300: 300,\n /** 314 px */\n 314: 314,\n /** 360 px */\n 360: 360,\n /** 400 px */\n 400: 400,\n /** 584 px */\n 584: 584,\n /** 640 px */\n 640: 640,\n /** 760 px */\n 760: 760,\n /** 800 px */\n 800: 800,\n /** 1024 px */\n 1024: 1024,\n /** 1136 px */\n 1136: 1136,\n} as const;\n\nexport type Size = typeof size;\n"],"names":["size"],"mappings":"AAGa,IAAAA,IAAI,CAAG,CAElB,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,CAAC,CAAE,CAAC,CAEJ,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,EAAE,CAAE,EAAE,CAEN,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,IAAI,CAAE,IAAI,CAEV,IAAI,CAAE,IACR;;;;"}
|
|
@@ -7,7 +7,7 @@ import { spacing } from '../global/spacing.js';
|
|
|
7
7
|
import { motion } from '../global/motion.js';
|
|
8
8
|
import { elevation } from '../global/elevation/elevation.native.js';
|
|
9
9
|
|
|
10
|
-
var colors={onLight:{surface:{background:{gray:{subtle:colors$1.neutral.blueGrayLight[100],moderate:colors$1.neutral.blueGrayLight[50],intense:colors$1.neutral.blueGrayLight[0]},primary:{subtle:colors$1.chromatic.azure.a50,intense:colors$1.chromatic.azure[500]},sea:{subtle:colors$1.chromatic.sea[50],intense:colors$1.chromatic.sea[800]},cloud:{subtle:colors$1.chromatic.cloud[50],intense:colors$1.chromatic.cloud[800]}},border:{gray:{normal:colors$1.neutral.blueGrayLight[500],subtle:colors$1.neutral.blueGrayLight[300],muted:colors$1.neutral.blueGrayLight.a100},primary:{normal:colors$1.chromatic.azure[500],muted:colors$1.chromatic.azure.a100}},text:{gray:{normal:colors$1.neutral.blueGrayLight[1200],subtle:colors$1.neutral.blueGrayLight[900],muted:colors$1.neutral.blueGrayLight[600],disabled:colors$1.neutral.blueGrayLight.a200},primary:{normal:colors$1.chromatic.azure[500]},onSea:{onSubtle:colors$1.chromatic.forest[800],onIntense:colors$1.chromatic.forest[200]},onCloud:{onSubtle:colors$1.chromatic.azure[600],onIntense:colors$1.chromatic.azure[200]},staticWhite:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[450],muted:colors$1.neutral.white[200],disabled:colors$1.neutral.white[100]},staticBlack:{normal:colors$1.neutral.black[500],subtle:colors$1.neutral.black[300],muted:colors$1.neutral.black[200],disabled:colors$1.neutral.black[100]}},icon:{gray:{normal:colors$1.neutral.blueGrayLight[1200],subtle:colors$1.neutral.blueGrayLight[900],muted:colors$1.neutral.blueGrayLight[600],disabled:colors$1.neutral.blueGrayLight.a200},primary:{normal:colors$1.chromatic.azure[500]},onSea:{onSubtle:colors$1.chromatic.forest[600],onIntense:colors$1.chromatic.forest[400]},onCloud:{onSubtle:colors$1.chromatic.azure[400],onIntense:colors$1.chromatic.azure[300]},staticWhite:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[450],muted:colors$1.neutral.white[200],disabled:colors$1.neutral.white[100]},staticBlack:{normal:colors$1.neutral.black[500],subtle:colors$1.neutral.black[300],muted:colors$1.neutral.black[200],disabled:colors$1.neutral.black[100]}}},feedback:{background:{positive:{subtle:colors$1.chromatic.emerald.a50,intense:colors$1.chromatic.emerald[600]},negative:{subtle:colors$1.chromatic.crimson.a50,intense:colors$1.chromatic.crimson[600]},notice:{subtle:colors$1.chromatic.cider.a50,intense:colors$1.chromatic.cider[600]},information:{subtle:colors$1.chromatic.sapphire.a50,intense:colors$1.chromatic.sapphire[600]},neutral:{subtle:colors$1.neutral.blueGrayLight.a50,intense:colors$1.neutral.blueGrayLight[1000]}},border:{positive:{subtle:colors$1.chromatic.emerald.a100,intense:colors$1.chromatic.emerald[700]},negative:{subtle:colors$1.chromatic.crimson.a100,intense:colors$1.chromatic.crimson[700]},notice:{subtle:colors$1.chromatic.cider.a100,intense:colors$1.chromatic.cider[700]},information:{subtle:colors$1.chromatic.sapphire.a100,intense:colors$1.chromatic.sapphire[700]},neutral:{subtle:colors$1.neutral.blueGrayLight.a100,intense:colors$1.neutral.blueGrayLight[1100]}},text:{positive:{subtle:colors$1.chromatic.emerald[100],intense:colors$1.chromatic.emerald[700]},negative:{subtle:colors$1.chromatic.crimson[100],intense:colors$1.chromatic.crimson[600]},notice:{subtle:colors$1.chromatic.cider[100],intense:colors$1.chromatic.cider[700]},information:{subtle:colors$1.chromatic.sapphire[100],intense:colors$1.chromatic.sapphire[700]},neutral:{subtle:colors$1.neutral.blueGrayLight[500],intense:colors$1.neutral.blueGrayLight[1100]}},icon:{positive:{subtle:colors$1.chromatic.emerald[100],intense:colors$1.chromatic.emerald[700]},negative:{subtle:colors$1.chromatic.crimson[100],intense:colors$1.chromatic.crimson[600]},notice:{subtle:colors$1.chromatic.cider[100],intense:colors$1.chromatic.cider[700]},information:{subtle:colors$1.chromatic.sapphire[100],intense:colors$1.chromatic.sapphire[700]},neutral:{subtle:colors$1.neutral.blueGrayLight[500],intense:colors$1.neutral.blueGrayLight[1100]}}},interactive:{background:{positive:{default:colors$1.chromatic.emerald[600],highlighted:colors$1.chromatic.emerald[700],disabled:colors$1.chromatic.emerald.a50,faded:colors$1.chromatic.emerald.a50,fadedHighlighted:colors$1.chromatic.emerald.a100},negative:{default:colors$1.chromatic.crimson[600],highlighted:colors$1.chromatic.crimson[700],disabled:colors$1.chromatic.crimson.a50,faded:colors$1.chromatic.crimson.a50,fadedHighlighted:colors$1.chromatic.crimson.a100},notice:{default:colors$1.chromatic.cider[600],highlighted:colors$1.chromatic.cider[700],disabled:colors$1.chromatic.cider.a50,faded:colors$1.chromatic.cider.a50,fadedHighlighted:colors$1.chromatic.cider.a100},information:{default:colors$1.chromatic.sapphire[600],highlighted:colors$1.chromatic.sapphire[700],disabled:colors$1.chromatic.sapphire.a50,faded:colors$1.chromatic.sapphire.a50,fadedHighlighted:colors$1.chromatic.sapphire.a100},neutral:{default:colors$1.neutral.blueGrayLight[1000],highlighted:colors$1.neutral.blueGrayLight[1100],disabled:colors$1.neutral.blueGrayLight.a100,faded:colors$1.neutral.blueGrayLight.a100,fadedHighlighted:colors$1.neutral.blueGrayLight.a200},gray:{default:colors$1.neutral.blueGrayLight.a75,highlighted:colors$1.neutral.blueGrayLight.a100,disabled:colors$1.neutral.blueGrayLight.a50,faded:colors$1.neutral.blueGrayLight.a25,fadedHighlighted:colors$1.neutral.blueGrayLight.a75},primary:{default:colors$1.chromatic.azure[500],highlighted:colors$1.chromatic.azure[600],disabled:colors$1.chromatic.azure.a50,faded:colors$1.chromatic.azure.a50,fadedHighlighted:colors$1.chromatic.azure.a100},staticBlack:{default:colors$1.neutral.black[500],highlighted:colors$1.neutral.black[500],disabled:colors$1.neutral.black[200],faded:colors$1.neutral.black[50],fadedHighlighted:colors$1.neutral.black[100]},staticWhite:{default:colors$1.neutral.white[500],highlighted:colors$1.neutral.white[400],disabled:colors$1.neutral.white[50],faded:colors$1.neutral.white[50],fadedHighlighted:colors$1.neutral.white[100]}},border:{positive:{default:colors$1.chromatic.emerald[600],highlighted:colors$1.chromatic.emerald[700],disabled:colors$1.chromatic.emerald.a100,faded:colors$1.chromatic.emerald.a100},negative:{default:colors$1.chromatic.crimson[600],highlighted:colors$1.chromatic.crimson[700],disabled:colors$1.chromatic.crimson.a100,faded:colors$1.chromatic.crimson.a100},notice:{default:colors$1.chromatic.cider[600],highlighted:colors$1.chromatic.cider[700],disabled:colors$1.chromatic.cider.a100,faded:colors$1.chromatic.cider.a100},information:{default:colors$1.chromatic.sapphire[600],highlighted:colors$1.chromatic.sapphire[700],disabled:colors$1.chromatic.sapphire.a100,faded:colors$1.chromatic.sapphire.a100},neutral:{default:colors$1.neutral.blueGrayLight[700],highlighted:colors$1.neutral.blueGrayLight[700],disabled:colors$1.neutral.blueGrayLight[300],faded:colors$1.neutral.blueGrayLight.a100},gray:{default:colors$1.neutral.blueGrayLight[400],highlighted:colors$1.neutral.blueGrayLight[400],disabled:colors$1.neutral.blueGrayLight[200],faded:colors$1.neutral.blueGrayLight.a100},primary:{default:colors$1.chromatic.azure[500],highlighted:colors$1.chromatic.azure[500],disabled:colors$1.chromatic.azure.a100,faded:colors$1.chromatic.azure.a100},staticWhite:{default:colors$1.neutral.white[500],highlighted:colors$1.neutral.white[400],disabled:colors$1.neutral.white[100],faded:colors$1.neutral.white[50]},staticBlack:{default:colors$1.neutral.black[500],highlighted:colors$1.neutral.black[500],disabled:colors$1.neutral.black[100],faded:colors$1.neutral.black[100]}},text:{positive:{normal:colors$1.chromatic.emerald[700],subtle:colors$1.chromatic.emerald[600],muted:colors$1.chromatic.emerald[400],disabled:colors$1.chromatic.emerald.a200},negative:{normal:colors$1.chromatic.crimson[600],subtle:colors$1.chromatic.crimson[500],muted:colors$1.chromatic.crimson[400],disabled:colors$1.chromatic.crimson.a200},notice:{normal:colors$1.chromatic.cider[700],subtle:colors$1.chromatic.cider[600],muted:colors$1.chromatic.cider[400],disabled:colors$1.chromatic.cider.a200},information:{normal:colors$1.chromatic.sapphire[700],subtle:colors$1.chromatic.sapphire[600],muted:colors$1.chromatic.sapphire[400],disabled:colors$1.chromatic.sapphire.a200},neutral:{normal:colors$1.neutral.blueGrayLight[1100],subtle:colors$1.neutral.blueGrayLight[900],muted:colors$1.neutral.blueGrayLight[600],disabled:colors$1.neutral.blueGrayLight.a200},gray:{normal:colors$1.neutral.blueGrayLight[1200],subtle:colors$1.neutral.blueGrayLight[900],muted:colors$1.neutral.blueGrayLight[600],disabled:colors$1.neutral.blueGrayLight.a200},primary:{normal:colors$1.chromatic.azure[600],subtle:colors$1.chromatic.azure[500],muted:colors$1.chromatic.azure[400],disabled:colors$1.chromatic.azure.a100},onPrimary:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[400],muted:colors$1.neutral.white[300],disabled:colors$1.neutral.white[100]},staticWhite:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[400],muted:colors$1.neutral.white[300],disabled:colors$1.neutral.white[100]},staticBlack:{normal:colors$1.neutral.black[500],subtle:colors$1.neutral.black[400],muted:colors$1.neutral.black[300],disabled:colors$1.neutral.black[100]}},icon:{positive:{normal:colors$1.chromatic.emerald[700],subtle:colors$1.chromatic.emerald[600],muted:colors$1.chromatic.emerald[400],disabled:colors$1.chromatic.emerald.a200},negative:{normal:colors$1.chromatic.crimson[600],subtle:colors$1.chromatic.crimson[500],muted:colors$1.chromatic.crimson[400],disabled:colors$1.chromatic.crimson.a200},notice:{normal:colors$1.chromatic.cider[700],subtle:colors$1.chromatic.cider[600],muted:colors$1.chromatic.cider[400],disabled:colors$1.chromatic.cider.a200},information:{normal:colors$1.chromatic.sapphire[700],subtle:colors$1.chromatic.sapphire[600],muted:colors$1.chromatic.sapphire[400],disabled:colors$1.chromatic.sapphire.a200},neutral:{normal:colors$1.neutral.blueGrayLight[1100],subtle:colors$1.neutral.blueGrayLight[900],muted:colors$1.neutral.blueGrayLight[600],disabled:colors$1.neutral.blueGrayLight.a200},gray:{normal:colors$1.neutral.blueGrayLight[1200],subtle:colors$1.neutral.blueGrayLight[900],muted:colors$1.neutral.blueGrayLight[600],disabled:colors$1.neutral.blueGrayLight.a200},primary:{normal:colors$1.chromatic.azure[600],subtle:colors$1.chromatic.azure[500],muted:colors$1.chromatic.azure[400],disabled:colors$1.chromatic.azure.a100},onPrimary:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[400],muted:colors$1.neutral.white[300],disabled:colors$1.neutral.white[100]},staticWhite:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[400],muted:colors$1.neutral.white[300],disabled:colors$1.neutral.white[100]},staticBlack:{normal:colors$1.neutral.black[500],subtle:colors$1.neutral.black[400],muted:colors$1.neutral.black[300],disabled:colors$1.neutral.black[100]}}},overlay:{background:{moderate:colors$1.neutral.blueGrayLight.a200,subtle:colors$1.neutral.black[200]}},popup:{background:{subtle:colors$1.neutral.blueGrayLight[0],intense:colors$1.neutral.blueGrayLight[1000]},border:{subtle:colors$1.neutral.blueGrayLight.a100,intense:colors$1.neutral.blueGrayLight[900]}},transparent:`hsla(0, 0%, 100%, ${opacity[0]})`},onDark:{surface:{background:{gray:{subtle:colors$1.neutral.blueGrayDark[1300],moderate:colors$1.neutral.blueGrayDark[1100],intense:colors$1.neutral.blueGrayDark[1000]},primary:{subtle:colors$1.chromatic.azure.a200,intense:colors$1.chromatic.azure[500]},sea:{subtle:colors$1.chromatic.sea[900],intense:colors$1.chromatic.sea[100]},cloud:{subtle:colors$1.chromatic.cloud[900],intense:colors$1.chromatic.cloud[100]}},border:{gray:{normal:colors$1.neutral.blueGrayDark[600],subtle:colors$1.neutral.blueGrayDark[800],muted:colors$1.neutral.blueGrayDark.a100},primary:{normal:colors$1.chromatic.azure[500],muted:colors$1.chromatic.azure.a200}},text:{gray:{normal:colors$1.neutral.blueGrayDark[0],subtle:colors$1.neutral.blueGrayDark[50],muted:colors$1.neutral.blueGrayDark[300],disabled:colors$1.neutral.blueGrayDark.a200},primary:{normal:colors$1.chromatic.azure[300]},onSea:{onSubtle:colors$1.chromatic.forest[200],onIntense:colors$1.chromatic.forest[800]},onCloud:{onSubtle:colors$1.chromatic.azure[200],onIntense:colors$1.chromatic.azure[600]},staticWhite:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[450],muted:colors$1.neutral.white[200],disabled:colors$1.neutral.white[100]},staticBlack:{normal:colors$1.neutral.black[500],subtle:colors$1.neutral.black[300],muted:colors$1.neutral.black[200],disabled:colors$1.neutral.black[100]}},icon:{gray:{normal:colors$1.neutral.blueGrayDark[0],subtle:colors$1.neutral.blueGrayDark[50],muted:colors$1.neutral.blueGrayDark[300],disabled:colors$1.neutral.blueGrayDark.a200},primary:{normal:colors$1.chromatic.azure[300]},onSea:{onSubtle:colors$1.chromatic.forest[400],onIntense:colors$1.chromatic.forest[600]},onCloud:{onSubtle:colors$1.chromatic.azure[300],onIntense:colors$1.chromatic.azure[400]},staticWhite:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[450],muted:colors$1.neutral.white[200],disabled:colors$1.neutral.white[100]},staticBlack:{normal:colors$1.neutral.black[500],subtle:colors$1.neutral.black[300],muted:colors$1.neutral.black[200],disabled:colors$1.neutral.black[100]}}},feedback:{background:{positive:{subtle:colors$1.chromatic.emerald.a100,intense:colors$1.chromatic.emerald[700]},negative:{subtle:colors$1.chromatic.crimson.a100,intense:colors$1.chromatic.crimson[700]},notice:{subtle:colors$1.chromatic.cider.a100,intense:colors$1.chromatic.cider[700]},information:{subtle:colors$1.chromatic.sapphire.a100,intense:colors$1.chromatic.sapphire[700]},neutral:{subtle:colors$1.neutral.blueGrayDark.a100,intense:colors$1.neutral.blueGrayDark[800]}},border:{positive:{subtle:colors$1.chromatic.emerald.a200,intense:colors$1.chromatic.emerald[800]},negative:{subtle:colors$1.chromatic.crimson.a200,intense:colors$1.chromatic.crimson[800]},notice:{subtle:colors$1.chromatic.cider.a200,intense:colors$1.chromatic.cider[800]},information:{subtle:colors$1.chromatic.sapphire.a200,intense:colors$1.chromatic.sapphire[800]},neutral:{subtle:colors$1.neutral.blueGrayDark.a100,intense:colors$1.neutral.blueGrayDark[900]}},text:{positive:{subtle:colors$1.chromatic.emerald[50],intense:colors$1.chromatic.emerald[400]},negative:{subtle:colors$1.chromatic.crimson[50],intense:colors$1.chromatic.crimson[400]},notice:{subtle:colors$1.chromatic.cider[50],intense:colors$1.chromatic.cider[400]},information:{subtle:colors$1.chromatic.sapphire[50],intense:colors$1.chromatic.sapphire[400]},neutral:{subtle:colors$1.neutral.blueGrayDark[700],intense:colors$1.neutral.blueGrayDark[50]}},icon:{positive:{subtle:colors$1.chromatic.emerald[50],intense:colors$1.chromatic.emerald[400]},negative:{subtle:colors$1.chromatic.crimson[50],intense:colors$1.chromatic.crimson[400]},notice:{subtle:colors$1.chromatic.cider[50],intense:colors$1.chromatic.cider[400]},information:{subtle:colors$1.chromatic.sapphire[50],intense:colors$1.chromatic.sapphire[400]},neutral:{subtle:colors$1.neutral.blueGrayDark[700],intense:colors$1.neutral.blueGrayDark[50]}}},interactive:{background:{positive:{default:colors$1.chromatic.emerald[600],highlighted:colors$1.chromatic.emerald[700],disabled:colors$1.chromatic.emerald.a100,faded:colors$1.chromatic.emerald.a150,fadedHighlighted:colors$1.chromatic.emerald.a200},negative:{default:colors$1.chromatic.crimson[600],highlighted:colors$1.chromatic.crimson[700],disabled:colors$1.chromatic.crimson.a100,faded:colors$1.chromatic.crimson.a150,fadedHighlighted:colors$1.chromatic.crimson.a200},notice:{default:colors$1.chromatic.cider[600],highlighted:colors$1.chromatic.cider[700],disabled:colors$1.chromatic.cider.a100,faded:colors$1.chromatic.cider.a150,fadedHighlighted:colors$1.chromatic.cider.a200},information:{default:colors$1.chromatic.sapphire[600],highlighted:colors$1.chromatic.sapphire[700],disabled:colors$1.chromatic.sapphire.a100,faded:colors$1.chromatic.sapphire.a150,fadedHighlighted:colors$1.chromatic.sapphire.a200},neutral:{default:colors$1.neutral.blueGrayDark[50],highlighted:colors$1.neutral.blueGrayDark[200],disabled:colors$1.neutral.blueGrayDark.a100,faded:colors$1.neutral.blueGrayDark.a75,fadedHighlighted:colors$1.neutral.blueGrayDark.a100},gray:{default:colors$1.neutral.blueGrayDark.a75,highlighted:colors$1.neutral.blueGrayDark.a100,disabled:colors$1.neutral.blueGrayDark.a50,faded:colors$1.neutral.blueGrayDark.a25,fadedHighlighted:colors$1.neutral.blueGrayDark.a75},primary:{default:colors$1.chromatic.azure[400],highlighted:colors$1.chromatic.azure[500],disabled:colors$1.chromatic.azure.a100,faded:colors$1.chromatic.azure.a150,fadedHighlighted:colors$1.chromatic.azure.a200},staticBlack:{default:colors$1.neutral.black[500],highlighted:colors$1.neutral.black[500],disabled:colors$1.neutral.black[200],faded:colors$1.neutral.black[50],fadedHighlighted:colors$1.neutral.black[100]},staticWhite:{default:colors$1.neutral.white[500],highlighted:colors$1.neutral.white[400],disabled:colors$1.neutral.white[50],faded:colors$1.neutral.white[50],fadedHighlighted:colors$1.neutral.white[100]}},border:{positive:{default:colors$1.chromatic.emerald[600],highlighted:colors$1.chromatic.emerald[700],disabled:colors$1.chromatic.emerald.a100,faded:colors$1.chromatic.emerald.a100},negative:{default:colors$1.chromatic.crimson[600],highlighted:colors$1.chromatic.crimson[700],disabled:colors$1.chromatic.crimson.a100,faded:colors$1.chromatic.crimson.a100},notice:{default:colors$1.chromatic.cider[600],highlighted:colors$1.chromatic.cider[700],disabled:colors$1.chromatic.cider.a100,faded:colors$1.chromatic.cider.a100},information:{default:colors$1.chromatic.sapphire[600],highlighted:colors$1.chromatic.sapphire[700],disabled:colors$1.chromatic.sapphire.a100,faded:colors$1.chromatic.sapphire.a100},neutral:{default:colors$1.neutral.blueGrayDark[200],highlighted:colors$1.neutral.blueGrayDark[200],disabled:colors$1.neutral.blueGrayDark[800],faded:colors$1.neutral.blueGrayDark.a100},gray:{default:colors$1.neutral.blueGrayDark[600],highlighted:colors$1.neutral.blueGrayDark[800],disabled:colors$1.neutral.blueGrayDark[1000],faded:colors$1.neutral.blueGrayDark.a100},primary:{default:colors$1.chromatic.azure[400],highlighted:colors$1.chromatic.azure[500],disabled:colors$1.chromatic.azure.a200,faded:colors$1.chromatic.azure.a150},staticWhite:{default:colors$1.neutral.white[500],highlighted:colors$1.neutral.white[400],disabled:colors$1.neutral.white[100],faded:colors$1.neutral.white[50]},staticBlack:{default:colors$1.neutral.black[500],highlighted:colors$1.neutral.black[500],disabled:colors$1.neutral.black[100],faded:colors$1.neutral.black[100]}},text:{positive:{normal:colors$1.chromatic.emerald[400],subtle:colors$1.chromatic.emerald[500],muted:colors$1.chromatic.emerald[700],disabled:colors$1.chromatic.emerald.a200},negative:{normal:colors$1.chromatic.crimson[400],subtle:colors$1.chromatic.crimson[500],muted:colors$1.chromatic.crimson[700],disabled:colors$1.chromatic.crimson.a200},notice:{normal:colors$1.chromatic.cider[400],subtle:colors$1.chromatic.cider[500],muted:colors$1.chromatic.cider[700],disabled:colors$1.chromatic.cider.a200},information:{normal:colors$1.chromatic.sapphire[400],subtle:colors$1.chromatic.sapphire[500],muted:colors$1.chromatic.sapphire[700],disabled:colors$1.chromatic.sapphire.a200},neutral:{normal:colors$1.neutral.blueGrayDark[50],subtle:colors$1.neutral.blueGrayDark[300],muted:colors$1.neutral.blueGrayDark[600],disabled:colors$1.neutral.blueGrayDark.a200},gray:{normal:colors$1.neutral.blueGrayDark[0],subtle:colors$1.neutral.blueGrayDark[50],muted:colors$1.neutral.blueGrayDark[300],disabled:colors$1.neutral.blueGrayDark.a200},primary:{normal:colors$1.chromatic.azure[300],subtle:colors$1.chromatic.azure[400],muted:colors$1.chromatic.azure[600],disabled:colors$1.chromatic.azure.a200},onPrimary:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[400],muted:colors$1.neutral.white[300],disabled:colors$1.neutral.white[100]},staticWhite:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[400],muted:colors$1.neutral.white[300],disabled:colors$1.neutral.white[100]},staticBlack:{normal:colors$1.neutral.black[500],subtle:colors$1.neutral.black[400],muted:colors$1.neutral.black[300],disabled:colors$1.neutral.black[100]}},icon:{positive:{normal:colors$1.chromatic.emerald[400],subtle:colors$1.chromatic.emerald[500],muted:colors$1.chromatic.emerald[700],disabled:colors$1.chromatic.emerald.a200},negative:{normal:colors$1.chromatic.crimson[400],subtle:colors$1.chromatic.crimson[500],muted:colors$1.chromatic.crimson[700],disabled:colors$1.chromatic.crimson.a200},notice:{normal:colors$1.chromatic.cider[400],subtle:colors$1.chromatic.cider[500],muted:colors$1.chromatic.cider[700],disabled:colors$1.chromatic.cider.a200},information:{normal:colors$1.chromatic.sapphire[400],subtle:colors$1.chromatic.sapphire[500],muted:colors$1.chromatic.sapphire[700],disabled:colors$1.chromatic.sapphire.a200},neutral:{normal:colors$1.neutral.blueGrayDark[50],subtle:colors$1.neutral.blueGrayDark[300],muted:colors$1.neutral.blueGrayDark[600],disabled:colors$1.neutral.blueGrayDark.a200},gray:{normal:colors$1.neutral.blueGrayDark[0],subtle:colors$1.neutral.blueGrayDark[50],muted:colors$1.neutral.blueGrayDark[300],disabled:colors$1.neutral.blueGrayDark.a200},primary:{normal:colors$1.chromatic.azure[300],subtle:colors$1.chromatic.azure[400],muted:colors$1.chromatic.azure[600],disabled:colors$1.chromatic.azure.a200},onPrimary:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[400],muted:colors$1.neutral.white[300],disabled:colors$1.neutral.white[100]},staticWhite:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[400],muted:colors$1.neutral.white[300],disabled:colors$1.neutral.white[100]},staticBlack:{normal:colors$1.neutral.black[500],subtle:colors$1.neutral.black[400],muted:colors$1.neutral.black[300],disabled:colors$1.neutral.black[100]}}},overlay:{background:{moderate:colors$1.neutral.blueGrayDark.a200,subtle:colors$1.neutral.black[400]}},popup:{background:{subtle:colors$1.neutral.blueGrayDark[1000],intense:colors$1.neutral.blueGrayDark[1000]},border:{subtle:colors$1.neutral.blueGrayDark.a100,intense:colors$1.neutral.blueGrayDark.a100}},transparent:`hsla(0, 0%, 100%, ${opacity[0]})`}};var bladeTheme={name:'bladeTheme',border:border,breakpoints:breakpoints,colors:colors,motion:motion,spacing:spacing,elevation:elevation,typography:typography};
|
|
10
|
+
var colors={onLight:{surface:{background:{gray:{subtle:colors$1.neutral.blueGrayLight[100],moderate:colors$1.neutral.blueGrayLight[50],intense:colors$1.neutral.blueGrayLight[0]},primary:{subtle:colors$1.chromatic.azure.a50,intense:colors$1.chromatic.azure[500]},sea:{subtle:colors$1.chromatic.sea[50],intense:colors$1.chromatic.sea[800]},cloud:{subtle:colors$1.chromatic.cloud[50],intense:colors$1.chromatic.cloud[800]}},border:{gray:{normal:colors$1.neutral.blueGrayLight[400],subtle:colors$1.neutral.blueGrayLight[300],muted:colors$1.neutral.blueGrayLight.a100},primary:{normal:colors$1.chromatic.azure[500],muted:colors$1.chromatic.azure.a100}},text:{gray:{normal:colors$1.neutral.blueGrayLight[1200],subtle:colors$1.neutral.blueGrayLight[900],muted:colors$1.neutral.blueGrayLight[600],disabled:colors$1.neutral.blueGrayLight.a200},primary:{normal:colors$1.chromatic.azure[500]},onSea:{onSubtle:colors$1.chromatic.forest[800],onIntense:colors$1.chromatic.forest[200]},onCloud:{onSubtle:colors$1.chromatic.azure[600],onIntense:colors$1.chromatic.azure[200]},staticWhite:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[450],muted:colors$1.neutral.white[200],disabled:colors$1.neutral.white[100]},staticBlack:{normal:colors$1.neutral.black[500],subtle:colors$1.neutral.black[300],muted:colors$1.neutral.black[200],disabled:colors$1.neutral.black[100]}},icon:{gray:{normal:colors$1.neutral.blueGrayLight[1200],subtle:colors$1.neutral.blueGrayLight[900],muted:colors$1.neutral.blueGrayLight[600],disabled:colors$1.neutral.blueGrayLight.a200},primary:{normal:colors$1.chromatic.azure[500]},onSea:{onSubtle:colors$1.chromatic.forest[600],onIntense:colors$1.chromatic.forest[400]},onCloud:{onSubtle:colors$1.chromatic.azure[400],onIntense:colors$1.chromatic.azure[300]},staticWhite:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[450],muted:colors$1.neutral.white[200],disabled:colors$1.neutral.white[100]},staticBlack:{normal:colors$1.neutral.black[500],subtle:colors$1.neutral.black[300],muted:colors$1.neutral.black[200],disabled:colors$1.neutral.black[100]}}},feedback:{background:{positive:{subtle:colors$1.chromatic.emerald.a50,intense:colors$1.chromatic.emerald[600]},negative:{subtle:colors$1.chromatic.crimson.a50,intense:colors$1.chromatic.crimson[600]},notice:{subtle:colors$1.chromatic.cider.a50,intense:colors$1.chromatic.cider[600]},information:{subtle:colors$1.chromatic.sapphire.a50,intense:colors$1.chromatic.sapphire[600]},neutral:{subtle:colors$1.neutral.blueGrayLight.a50,intense:colors$1.neutral.blueGrayLight[1000]}},border:{positive:{subtle:colors$1.chromatic.emerald.a100,intense:colors$1.chromatic.emerald[700]},negative:{subtle:colors$1.chromatic.crimson.a100,intense:colors$1.chromatic.crimson[700]},notice:{subtle:colors$1.chromatic.cider.a100,intense:colors$1.chromatic.cider[700]},information:{subtle:colors$1.chromatic.sapphire.a100,intense:colors$1.chromatic.sapphire[700]},neutral:{subtle:colors$1.neutral.blueGrayLight.a100,intense:colors$1.neutral.blueGrayLight[1100]}},text:{positive:{subtle:colors$1.chromatic.emerald[100],intense:colors$1.chromatic.emerald[700]},negative:{subtle:colors$1.chromatic.crimson[100],intense:colors$1.chromatic.crimson[600]},notice:{subtle:colors$1.chromatic.cider[100],intense:colors$1.chromatic.cider[700]},information:{subtle:colors$1.chromatic.sapphire[100],intense:colors$1.chromatic.sapphire[700]},neutral:{subtle:colors$1.neutral.blueGrayLight[500],intense:colors$1.neutral.blueGrayLight[1100]}},icon:{positive:{subtle:colors$1.chromatic.emerald[100],intense:colors$1.chromatic.emerald[700]},negative:{subtle:colors$1.chromatic.crimson[100],intense:colors$1.chromatic.crimson[600]},notice:{subtle:colors$1.chromatic.cider[100],intense:colors$1.chromatic.cider[700]},information:{subtle:colors$1.chromatic.sapphire[100],intense:colors$1.chromatic.sapphire[700]},neutral:{subtle:colors$1.neutral.blueGrayLight[500],intense:colors$1.neutral.blueGrayLight[1100]}}},interactive:{background:{positive:{default:colors$1.chromatic.emerald[600],highlighted:colors$1.chromatic.emerald[700],disabled:colors$1.chromatic.emerald.a50,faded:colors$1.chromatic.emerald.a50,fadedHighlighted:colors$1.chromatic.emerald.a100},negative:{default:colors$1.chromatic.crimson[600],highlighted:colors$1.chromatic.crimson[700],disabled:colors$1.chromatic.crimson.a50,faded:colors$1.chromatic.crimson.a50,fadedHighlighted:colors$1.chromatic.crimson.a100},notice:{default:colors$1.chromatic.cider[600],highlighted:colors$1.chromatic.cider[700],disabled:colors$1.chromatic.cider.a50,faded:colors$1.chromatic.cider.a50,fadedHighlighted:colors$1.chromatic.cider.a100},information:{default:colors$1.chromatic.sapphire[600],highlighted:colors$1.chromatic.sapphire[700],disabled:colors$1.chromatic.sapphire.a50,faded:colors$1.chromatic.sapphire.a50,fadedHighlighted:colors$1.chromatic.sapphire.a100},neutral:{default:colors$1.neutral.blueGrayLight[1000],highlighted:colors$1.neutral.blueGrayLight[1100],disabled:colors$1.neutral.blueGrayLight.a100,faded:colors$1.neutral.blueGrayLight.a100,fadedHighlighted:colors$1.neutral.blueGrayLight.a200},gray:{default:colors$1.neutral.blueGrayLight.a75,highlighted:colors$1.neutral.blueGrayLight.a100,disabled:colors$1.neutral.blueGrayLight.a50,faded:colors$1.neutral.blueGrayLight.a25,fadedHighlighted:colors$1.neutral.blueGrayLight.a75},primary:{default:colors$1.chromatic.azure[500],highlighted:colors$1.chromatic.azure[600],disabled:colors$1.chromatic.azure.a50,faded:colors$1.chromatic.azure.a50,fadedHighlighted:colors$1.chromatic.azure.a100},staticBlack:{default:colors$1.neutral.black[500],highlighted:colors$1.neutral.black[500],disabled:colors$1.neutral.black[200],faded:colors$1.neutral.black[50],fadedHighlighted:colors$1.neutral.black[100]},staticWhite:{default:colors$1.neutral.white[500],highlighted:colors$1.neutral.white[400],disabled:colors$1.neutral.white[50],faded:colors$1.neutral.white[50],fadedHighlighted:colors$1.neutral.white[100]}},border:{positive:{default:colors$1.chromatic.emerald[600],highlighted:colors$1.chromatic.emerald[700],disabled:colors$1.chromatic.emerald.a100,faded:colors$1.chromatic.emerald.a100},negative:{default:colors$1.chromatic.crimson[600],highlighted:colors$1.chromatic.crimson[700],disabled:colors$1.chromatic.crimson.a100,faded:colors$1.chromatic.crimson.a100},notice:{default:colors$1.chromatic.cider[600],highlighted:colors$1.chromatic.cider[700],disabled:colors$1.chromatic.cider.a100,faded:colors$1.chromatic.cider.a100},information:{default:colors$1.chromatic.sapphire[600],highlighted:colors$1.chromatic.sapphire[700],disabled:colors$1.chromatic.sapphire.a100,faded:colors$1.chromatic.sapphire.a100},neutral:{default:colors$1.neutral.blueGrayLight[700],highlighted:colors$1.neutral.blueGrayLight[700],disabled:colors$1.neutral.blueGrayLight[300],faded:colors$1.neutral.blueGrayLight.a100},gray:{default:colors$1.neutral.blueGrayLight[300],highlighted:colors$1.neutral.blueGrayLight[300],disabled:colors$1.neutral.blueGrayLight[200],faded:colors$1.neutral.blueGrayLight.a100},primary:{default:colors$1.chromatic.azure[500],highlighted:colors$1.chromatic.azure[500],disabled:colors$1.chromatic.azure.a100,faded:colors$1.chromatic.azure.a100},staticWhite:{default:colors$1.neutral.white[500],highlighted:colors$1.neutral.white[400],disabled:colors$1.neutral.white[100],faded:colors$1.neutral.white[50]},staticBlack:{default:colors$1.neutral.black[500],highlighted:colors$1.neutral.black[500],disabled:colors$1.neutral.black[100],faded:colors$1.neutral.black[100]}},text:{positive:{normal:colors$1.chromatic.emerald[700],subtle:colors$1.chromatic.emerald[600],muted:colors$1.chromatic.emerald[400],disabled:colors$1.chromatic.emerald.a200},negative:{normal:colors$1.chromatic.crimson[600],subtle:colors$1.chromatic.crimson[500],muted:colors$1.chromatic.crimson[400],disabled:colors$1.chromatic.crimson.a200},notice:{normal:colors$1.chromatic.cider[700],subtle:colors$1.chromatic.cider[600],muted:colors$1.chromatic.cider[400],disabled:colors$1.chromatic.cider.a200},information:{normal:colors$1.chromatic.sapphire[700],subtle:colors$1.chromatic.sapphire[600],muted:colors$1.chromatic.sapphire[400],disabled:colors$1.chromatic.sapphire.a200},neutral:{normal:colors$1.neutral.blueGrayLight[1100],subtle:colors$1.neutral.blueGrayLight[900],muted:colors$1.neutral.blueGrayLight[600],disabled:colors$1.neutral.blueGrayLight.a200},gray:{normal:colors$1.neutral.blueGrayLight[1200],subtle:colors$1.neutral.blueGrayLight[900],muted:colors$1.neutral.blueGrayLight[600],disabled:colors$1.neutral.blueGrayLight.a200},primary:{normal:colors$1.chromatic.azure[600],subtle:colors$1.chromatic.azure[500],muted:colors$1.chromatic.azure[400],disabled:colors$1.chromatic.azure.a100},onPrimary:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[400],muted:colors$1.neutral.white[300],disabled:colors$1.neutral.white[100]},staticWhite:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[400],muted:colors$1.neutral.white[300],disabled:colors$1.neutral.white[100]},staticBlack:{normal:colors$1.neutral.black[500],subtle:colors$1.neutral.black[400],muted:colors$1.neutral.black[300],disabled:colors$1.neutral.black[100]}},icon:{positive:{normal:colors$1.chromatic.emerald[700],subtle:colors$1.chromatic.emerald[600],muted:colors$1.chromatic.emerald[400],disabled:colors$1.chromatic.emerald.a200},negative:{normal:colors$1.chromatic.crimson[600],subtle:colors$1.chromatic.crimson[500],muted:colors$1.chromatic.crimson[400],disabled:colors$1.chromatic.crimson.a200},notice:{normal:colors$1.chromatic.cider[700],subtle:colors$1.chromatic.cider[600],muted:colors$1.chromatic.cider[400],disabled:colors$1.chromatic.cider.a200},information:{normal:colors$1.chromatic.sapphire[700],subtle:colors$1.chromatic.sapphire[600],muted:colors$1.chromatic.sapphire[400],disabled:colors$1.chromatic.sapphire.a200},neutral:{normal:colors$1.neutral.blueGrayLight[1100],subtle:colors$1.neutral.blueGrayLight[900],muted:colors$1.neutral.blueGrayLight[600],disabled:colors$1.neutral.blueGrayLight.a200},gray:{normal:colors$1.neutral.blueGrayLight[1200],subtle:colors$1.neutral.blueGrayLight[900],muted:colors$1.neutral.blueGrayLight[600],disabled:colors$1.neutral.blueGrayLight.a200},primary:{normal:colors$1.chromatic.azure[600],subtle:colors$1.chromatic.azure[500],muted:colors$1.chromatic.azure[400],disabled:colors$1.chromatic.azure.a100},onPrimary:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[400],muted:colors$1.neutral.white[300],disabled:colors$1.neutral.white[100]},staticWhite:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[400],muted:colors$1.neutral.white[300],disabled:colors$1.neutral.white[100]},staticBlack:{normal:colors$1.neutral.black[500],subtle:colors$1.neutral.black[400],muted:colors$1.neutral.black[300],disabled:colors$1.neutral.black[100]}}},overlay:{background:{moderate:colors$1.neutral.blueGrayLight.a200,subtle:colors$1.neutral.black[200]}},popup:{background:{subtle:colors$1.neutral.blueGrayLight[0],intense:colors$1.neutral.blueGrayLight[1000]},border:{subtle:colors$1.neutral.blueGrayLight.a100,intense:colors$1.neutral.blueGrayLight[900]}},transparent:`hsla(0, 0%, 100%, ${opacity[0]})`},onDark:{surface:{background:{gray:{subtle:colors$1.neutral.blueGrayDark[1300],moderate:colors$1.neutral.blueGrayDark[1100],intense:colors$1.neutral.blueGrayDark[1000]},primary:{subtle:colors$1.chromatic.azure.a200,intense:colors$1.chromatic.azure[500]},sea:{subtle:colors$1.chromatic.sea[900],intense:colors$1.chromatic.sea[100]},cloud:{subtle:colors$1.chromatic.cloud[900],intense:colors$1.chromatic.cloud[100]}},border:{gray:{normal:colors$1.neutral.blueGrayDark[600],subtle:colors$1.neutral.blueGrayDark[800],muted:colors$1.neutral.blueGrayDark.a100},primary:{normal:colors$1.chromatic.azure[500],muted:colors$1.chromatic.azure.a200}},text:{gray:{normal:colors$1.neutral.blueGrayDark[0],subtle:colors$1.neutral.blueGrayDark[50],muted:colors$1.neutral.blueGrayDark[300],disabled:colors$1.neutral.blueGrayDark.a200},primary:{normal:colors$1.chromatic.azure[300]},onSea:{onSubtle:colors$1.chromatic.forest[200],onIntense:colors$1.chromatic.forest[800]},onCloud:{onSubtle:colors$1.chromatic.azure[200],onIntense:colors$1.chromatic.azure[600]},staticWhite:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[450],muted:colors$1.neutral.white[200],disabled:colors$1.neutral.white[100]},staticBlack:{normal:colors$1.neutral.black[500],subtle:colors$1.neutral.black[300],muted:colors$1.neutral.black[200],disabled:colors$1.neutral.black[100]}},icon:{gray:{normal:colors$1.neutral.blueGrayDark[0],subtle:colors$1.neutral.blueGrayDark[50],muted:colors$1.neutral.blueGrayDark[300],disabled:colors$1.neutral.blueGrayDark.a200},primary:{normal:colors$1.chromatic.azure[300]},onSea:{onSubtle:colors$1.chromatic.forest[400],onIntense:colors$1.chromatic.forest[600]},onCloud:{onSubtle:colors$1.chromatic.azure[300],onIntense:colors$1.chromatic.azure[400]},staticWhite:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[450],muted:colors$1.neutral.white[200],disabled:colors$1.neutral.white[100]},staticBlack:{normal:colors$1.neutral.black[500],subtle:colors$1.neutral.black[300],muted:colors$1.neutral.black[200],disabled:colors$1.neutral.black[100]}}},feedback:{background:{positive:{subtle:colors$1.chromatic.emerald.a100,intense:colors$1.chromatic.emerald[700]},negative:{subtle:colors$1.chromatic.crimson.a100,intense:colors$1.chromatic.crimson[700]},notice:{subtle:colors$1.chromatic.cider.a100,intense:colors$1.chromatic.cider[700]},information:{subtle:colors$1.chromatic.sapphire.a100,intense:colors$1.chromatic.sapphire[700]},neutral:{subtle:colors$1.neutral.blueGrayDark.a100,intense:colors$1.neutral.blueGrayDark[900]}},border:{positive:{subtle:colors$1.chromatic.emerald.a200,intense:colors$1.chromatic.emerald[800]},negative:{subtle:colors$1.chromatic.crimson.a200,intense:colors$1.chromatic.crimson[800]},notice:{subtle:colors$1.chromatic.cider.a200,intense:colors$1.chromatic.cider[800]},information:{subtle:colors$1.chromatic.sapphire.a200,intense:colors$1.chromatic.sapphire[800]},neutral:{subtle:colors$1.neutral.blueGrayDark.a100,intense:colors$1.neutral.blueGrayDark[900]}},text:{positive:{subtle:colors$1.chromatic.emerald[50],intense:colors$1.chromatic.emerald[400]},negative:{subtle:colors$1.chromatic.crimson[50],intense:colors$1.chromatic.crimson[400]},notice:{subtle:colors$1.chromatic.cider[50],intense:colors$1.chromatic.cider[400]},information:{subtle:colors$1.chromatic.sapphire[50],intense:colors$1.chromatic.sapphire[400]},neutral:{subtle:colors$1.neutral.blueGrayDark[700],intense:colors$1.neutral.blueGrayDark[50]}},icon:{positive:{subtle:colors$1.chromatic.emerald[50],intense:colors$1.chromatic.emerald[400]},negative:{subtle:colors$1.chromatic.crimson[50],intense:colors$1.chromatic.crimson[400]},notice:{subtle:colors$1.chromatic.cider[50],intense:colors$1.chromatic.cider[400]},information:{subtle:colors$1.chromatic.sapphire[50],intense:colors$1.chromatic.sapphire[400]},neutral:{subtle:colors$1.neutral.blueGrayDark[700],intense:colors$1.neutral.blueGrayDark[50]}}},interactive:{background:{positive:{default:colors$1.chromatic.emerald[600],highlighted:colors$1.chromatic.emerald[700],disabled:colors$1.chromatic.emerald.a100,faded:colors$1.chromatic.emerald.a150,fadedHighlighted:colors$1.chromatic.emerald.a200},negative:{default:colors$1.chromatic.crimson[600],highlighted:colors$1.chromatic.crimson[700],disabled:colors$1.chromatic.crimson.a100,faded:colors$1.chromatic.crimson.a150,fadedHighlighted:colors$1.chromatic.crimson.a200},notice:{default:colors$1.chromatic.cider[600],highlighted:colors$1.chromatic.cider[700],disabled:colors$1.chromatic.cider.a100,faded:colors$1.chromatic.cider.a150,fadedHighlighted:colors$1.chromatic.cider.a200},information:{default:colors$1.chromatic.sapphire[600],highlighted:colors$1.chromatic.sapphire[700],disabled:colors$1.chromatic.sapphire.a100,faded:colors$1.chromatic.sapphire.a150,fadedHighlighted:colors$1.chromatic.sapphire.a200},neutral:{default:colors$1.neutral.blueGrayDark[50],highlighted:colors$1.neutral.blueGrayDark[200],disabled:colors$1.neutral.blueGrayDark.a100,faded:colors$1.neutral.blueGrayDark.a75,fadedHighlighted:colors$1.neutral.blueGrayDark.a100},gray:{default:colors$1.neutral.blueGrayDark.a75,highlighted:colors$1.neutral.blueGrayDark.a100,disabled:colors$1.neutral.blueGrayDark.a50,faded:colors$1.neutral.blueGrayDark.a25,fadedHighlighted:colors$1.neutral.blueGrayDark.a75},primary:{default:colors$1.chromatic.azure[400],highlighted:colors$1.chromatic.azure[500],disabled:colors$1.chromatic.azure.a100,faded:colors$1.chromatic.azure.a150,fadedHighlighted:colors$1.chromatic.azure.a200},staticBlack:{default:colors$1.neutral.black[500],highlighted:colors$1.neutral.black[500],disabled:colors$1.neutral.black[200],faded:colors$1.neutral.black[50],fadedHighlighted:colors$1.neutral.black[100]},staticWhite:{default:colors$1.neutral.white[500],highlighted:colors$1.neutral.white[400],disabled:colors$1.neutral.white[50],faded:colors$1.neutral.white[50],fadedHighlighted:colors$1.neutral.white[100]}},border:{positive:{default:colors$1.chromatic.emerald[600],highlighted:colors$1.chromatic.emerald[700],disabled:colors$1.chromatic.emerald.a100,faded:colors$1.chromatic.emerald.a100},negative:{default:colors$1.chromatic.crimson[600],highlighted:colors$1.chromatic.crimson[700],disabled:colors$1.chromatic.crimson.a100,faded:colors$1.chromatic.crimson.a100},notice:{default:colors$1.chromatic.cider[600],highlighted:colors$1.chromatic.cider[700],disabled:colors$1.chromatic.cider.a100,faded:colors$1.chromatic.cider.a100},information:{default:colors$1.chromatic.sapphire[600],highlighted:colors$1.chromatic.sapphire[700],disabled:colors$1.chromatic.sapphire.a100,faded:colors$1.chromatic.sapphire.a100},neutral:{default:colors$1.neutral.blueGrayDark[200],highlighted:colors$1.neutral.blueGrayDark[200],disabled:colors$1.neutral.blueGrayDark[800],faded:colors$1.neutral.blueGrayDark.a100},gray:{default:colors$1.neutral.blueGrayDark[600],highlighted:colors$1.neutral.blueGrayDark[600],disabled:colors$1.neutral.blueGrayDark[800],faded:colors$1.neutral.blueGrayDark.a100},primary:{default:colors$1.chromatic.azure[400],highlighted:colors$1.chromatic.azure[500],disabled:colors$1.chromatic.azure.a200,faded:colors$1.chromatic.azure.a150},staticWhite:{default:colors$1.neutral.white[500],highlighted:colors$1.neutral.white[400],disabled:colors$1.neutral.white[100],faded:colors$1.neutral.white[50]},staticBlack:{default:colors$1.neutral.black[500],highlighted:colors$1.neutral.black[500],disabled:colors$1.neutral.black[100],faded:colors$1.neutral.black[100]}},text:{positive:{normal:colors$1.chromatic.emerald[400],subtle:colors$1.chromatic.emerald[500],muted:colors$1.chromatic.emerald[700],disabled:colors$1.chromatic.emerald.a200},negative:{normal:colors$1.chromatic.crimson[400],subtle:colors$1.chromatic.crimson[500],muted:colors$1.chromatic.crimson[700],disabled:colors$1.chromatic.crimson.a200},notice:{normal:colors$1.chromatic.cider[400],subtle:colors$1.chromatic.cider[500],muted:colors$1.chromatic.cider[700],disabled:colors$1.chromatic.cider.a200},information:{normal:colors$1.chromatic.sapphire[400],subtle:colors$1.chromatic.sapphire[500],muted:colors$1.chromatic.sapphire[700],disabled:colors$1.chromatic.sapphire.a200},neutral:{normal:colors$1.neutral.blueGrayDark[50],subtle:colors$1.neutral.blueGrayDark[300],muted:colors$1.neutral.blueGrayDark[600],disabled:colors$1.neutral.blueGrayDark.a200},gray:{normal:colors$1.neutral.blueGrayDark[0],subtle:colors$1.neutral.blueGrayDark[50],muted:colors$1.neutral.blueGrayDark[300],disabled:colors$1.neutral.blueGrayDark.a200},primary:{normal:colors$1.chromatic.azure[300],subtle:colors$1.chromatic.azure[400],muted:colors$1.chromatic.azure[600],disabled:colors$1.chromatic.azure.a200},onPrimary:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[400],muted:colors$1.neutral.white[300],disabled:colors$1.neutral.white[100]},staticWhite:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[400],muted:colors$1.neutral.white[300],disabled:colors$1.neutral.white[100]},staticBlack:{normal:colors$1.neutral.black[500],subtle:colors$1.neutral.black[400],muted:colors$1.neutral.black[300],disabled:colors$1.neutral.black[100]}},icon:{positive:{normal:colors$1.chromatic.emerald[400],subtle:colors$1.chromatic.emerald[500],muted:colors$1.chromatic.emerald[700],disabled:colors$1.chromatic.emerald.a200},negative:{normal:colors$1.chromatic.crimson[400],subtle:colors$1.chromatic.crimson[500],muted:colors$1.chromatic.crimson[700],disabled:colors$1.chromatic.crimson.a200},notice:{normal:colors$1.chromatic.cider[400],subtle:colors$1.chromatic.cider[500],muted:colors$1.chromatic.cider[700],disabled:colors$1.chromatic.cider.a200},information:{normal:colors$1.chromatic.sapphire[400],subtle:colors$1.chromatic.sapphire[500],muted:colors$1.chromatic.sapphire[700],disabled:colors$1.chromatic.sapphire.a200},neutral:{normal:colors$1.neutral.blueGrayDark[50],subtle:colors$1.neutral.blueGrayDark[300],muted:colors$1.neutral.blueGrayDark[600],disabled:colors$1.neutral.blueGrayDark.a200},gray:{normal:colors$1.neutral.blueGrayDark[0],subtle:colors$1.neutral.blueGrayDark[50],muted:colors$1.neutral.blueGrayDark[300],disabled:colors$1.neutral.blueGrayDark.a200},primary:{normal:colors$1.chromatic.azure[300],subtle:colors$1.chromatic.azure[400],muted:colors$1.chromatic.azure[600],disabled:colors$1.chromatic.azure.a200},onPrimary:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[400],muted:colors$1.neutral.white[300],disabled:colors$1.neutral.white[100]},staticWhite:{normal:colors$1.neutral.white[500],subtle:colors$1.neutral.white[400],muted:colors$1.neutral.white[300],disabled:colors$1.neutral.white[100]},staticBlack:{normal:colors$1.neutral.black[500],subtle:colors$1.neutral.black[400],muted:colors$1.neutral.black[300],disabled:colors$1.neutral.black[100]}}},overlay:{background:{moderate:colors$1.neutral.blueGrayDark.a200,subtle:colors$1.neutral.black[400]}},popup:{background:{subtle:colors$1.neutral.blueGrayDark[1000],intense:colors$1.neutral.blueGrayDark[1000]},border:{subtle:colors$1.neutral.blueGrayDark.a100,intense:colors$1.neutral.blueGrayDark.a100}},transparent:`hsla(0, 0%, 100%, ${opacity[0]})`}};var bladeTheme={name:'bladeTheme',border:border,breakpoints:breakpoints,colors:colors,motion:motion,spacing:spacing,elevation:elevation,typography:typography};
|
|
11
11
|
|
|
12
12
|
export { bladeTheme as default };
|
|
13
13
|
//# sourceMappingURL=bladeTheme.js.map
|