@razorpay/blade 12.59.0 → 12.60.0
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/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/native/components/CounterInput/CounterInput.native.js +12 -0
- package/build/lib/native/components/CounterInput/CounterInput.native.js.map +1 -0
- package/build/lib/native/components/CounterInput/CounterInputContext.js +6 -0
- package/build/lib/native/components/CounterInput/CounterInputContext.js.map +1 -0
- package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
- package/build/lib/native/components/Form/FormHint.js.map +1 -1
- package/build/lib/native/components/Form/FormLabel.js.map +1 -1
- package/build/lib/native/components/Form/formTokens.js +1 -1
- package/build/lib/native/components/Form/formTokens.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js +2 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.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/BaseInput/baseInputStyles.js +2 -2
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputTokens.js +2 -2
- package/build/lib/native/components/Input/BaseInput/baseInputTokens.js.map +1 -1
- 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 +1 -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/utils/metaAttribute/metaConstants.js +1 -1
- package/build/lib/native/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/lib/web/development/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/web/development/components/CounterInput/CounterInput.web.js +348 -0
- package/build/lib/web/development/components/CounterInput/CounterInput.web.js.map +1 -0
- package/build/lib/web/development/components/CounterInput/CounterInputContext.js +12 -0
- package/build/lib/web/development/components/CounterInput/CounterInputContext.js.map +1 -0
- package/build/lib/web/development/components/CounterInput/StyledCounterInput.js +22 -0
- package/build/lib/web/development/components/CounterInput/StyledCounterInput.js.map +1 -0
- package/build/lib/web/development/components/CounterInput/index.js +2 -0
- package/build/lib/web/development/components/CounterInput/index.js.map +1 -0
- package/build/lib/web/development/components/CounterInput/token.js +50 -0
- package/build/lib/web/development/components/CounterInput/token.js.map +1 -0
- package/build/lib/web/development/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
- package/build/lib/web/development/components/Form/FormHint.js.map +1 -1
- package/build/lib/web/development/components/Form/FormLabel.js.map +1 -1
- package/build/lib/web/development/components/Form/formTokens.js +9 -0
- package/build/lib/web/development/components/Form/formTokens.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +13 -3
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js +2 -0
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js +12 -3
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js +80 -30
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js +30 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js.map +1 -1
- package/build/lib/web/development/components/Input/PhoneNumberInput/CountrySelector.web.js +1 -0
- package/build/lib/web/development/components/Input/PhoneNumberInput/CountrySelector.web.js.map +1 -1
- package/build/lib/web/development/components/ProgressBar/ProgressBar.js +6 -2
- package/build/lib/web/development/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/web/development/components/ProgressBar/ProgressBarFilled.web.js +10 -4
- package/build/lib/web/development/components/ProgressBar/ProgressBarFilled.web.js.map +1 -1
- package/build/lib/web/development/components/index.js +2 -0
- package/build/lib/web/development/components/index.js.map +1 -1
- package/build/lib/web/development/tokens/global/size.js +28 -0
- package/build/lib/web/development/tokens/global/size.js.map +1 -1
- package/build/lib/web/development/utils/metaAttribute/metaConstants.js +1 -0
- package/build/lib/web/development/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/lib/web/production/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/web/production/components/CounterInput/CounterInput.web.js +348 -0
- package/build/lib/web/production/components/CounterInput/CounterInput.web.js.map +1 -0
- package/build/lib/web/production/components/CounterInput/CounterInputContext.js +12 -0
- package/build/lib/web/production/components/CounterInput/CounterInputContext.js.map +1 -0
- package/build/lib/web/production/components/CounterInput/StyledCounterInput.js +22 -0
- package/build/lib/web/production/components/CounterInput/StyledCounterInput.js.map +1 -0
- package/build/lib/web/production/components/CounterInput/index.js +2 -0
- package/build/lib/web/production/components/CounterInput/index.js.map +1 -0
- package/build/lib/web/production/components/CounterInput/token.js +50 -0
- package/build/lib/web/production/components/CounterInput/token.js.map +1 -0
- package/build/lib/web/production/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
- package/build/lib/web/production/components/Form/FormHint.js.map +1 -1
- package/build/lib/web/production/components/Form/FormLabel.js.map +1 -1
- package/build/lib/web/production/components/Form/formTokens.js +9 -0
- package/build/lib/web/production/components/Form/formTokens.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +13 -3
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js +2 -0
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js +12 -3
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js +80 -30
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js +30 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js.map +1 -1
- package/build/lib/web/production/components/Input/PhoneNumberInput/CountrySelector.web.js +1 -0
- package/build/lib/web/production/components/Input/PhoneNumberInput/CountrySelector.web.js.map +1 -1
- package/build/lib/web/production/components/ProgressBar/ProgressBar.js +6 -2
- package/build/lib/web/production/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/web/production/components/ProgressBar/ProgressBarFilled.web.js +10 -4
- package/build/lib/web/production/components/ProgressBar/ProgressBarFilled.web.js.map +1 -1
- package/build/lib/web/production/components/index.js +2 -0
- package/build/lib/web/production/components/index.js.map +1 -1
- package/build/lib/web/production/tokens/global/size.js +28 -0
- package/build/lib/web/production/tokens/global/size.js.map +1 -1
- package/build/lib/web/production/utils/metaAttribute/metaConstants.js +1 -0
- package/build/lib/web/production/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/types/components/index.d.ts +1052 -577
- package/build/types/components/index.native.d.ts +324 -254
- package/build/types/tokens/index.d.ts +28 -0
- package/build/types/tokens/index.native.d.ts +28 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseInputStyles.js","sources":["../../../../../../src/components/Input/BaseInput/baseInputStyles.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components';\nimport type { BaseInputProps } from './BaseInput';\nimport { getBaseInputBorderStyles } from './getBaseInputBorderStyles';\nimport {\n baseInputBackgroundColor,\n baseInputBorderColor,\n baseInputBorderWidth,\n baseInputBorderlessBackgroundColor,\n baseInputHeight,\n baseInputPaddingTokens,\n baseInputWrapperMaxHeight,\n} from './baseInputTokens';\nimport { getInputVisualsToBeRendered } from './BaseInputVisuals';\nimport type { BaseInputWrapperProps } from './types';\nimport type { Theme } from '~components/BladeProvider';\nimport getTextStyles from '~components/Typography/Text/getTextStyles';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeBorderSize } from '~utils/makeBorderSize';\nimport { getPlatformType } from '~utils';\nimport getIn from '~utils/lodashButBetter/get';\nimport getHeadingStyles from '~components/Typography/Heading/getHeadingStyles';\n\ntype GetInputStyles = Pick<\n BaseInputProps,\n | 'isDisabled'\n | 'validationState'\n | 'leadingIcon'\n | 'prefix'\n | 'trailingInteractionElement'\n | 'leadingInteractionElement'\n | 'suffix'\n | 'trailingIcon'\n | 'textAlign'\n | 'isDropdownTrigger'\n | 'valueComponentType'\n> & {\n isHovered?: boolean;\n isFocused?: boolean;\n isTextArea?: boolean;\n hasTags?: boolean;\n theme: Theme;\n size: NonNullable<BaseInputProps['size']>;\n isTableInputCell: NonNullable<BaseInputProps['isTableInputCell']>;\n hasLeadingDropdown?: boolean;\n};\n\nexport const getBaseInputState = ({\n isFocused,\n isHovered,\n isDisabled,\n}: {\n isFocused?: boolean;\n isHovered?: boolean;\n isDisabled?: boolean;\n}): 'focused' | 'hovered' | 'disabled' | 'default' => {\n if (isDisabled) {\n return 'disabled';\n } else if (isFocused) {\n return 'focused';\n } else if (isHovered) {\n return 'hovered';\n } else {\n return 'default';\n }\n};\n\nexport const getInputBackgroundAndBorderStyles = ({\n theme,\n isHovered,\n isFocused,\n isDisabled,\n validationState,\n isTextArea,\n isDropdownTrigger,\n isTableInputCell,\n}: Pick<\n GetInputStyles,\n | 'theme'\n | 'isFocused'\n | 'isDisabled'\n | 'validationState'\n | 'isHovered'\n | 'isTextArea'\n | 'isDropdownTrigger'\n | 'isTableInputCell'\n>): CSSObject => {\n // normal state\n const backgroundColorTokens = isTableInputCell\n ? baseInputBorderlessBackgroundColor\n : baseInputBackgroundColor;\n let backgroundColor = getIn(theme.colors, backgroundColorTokens.default);\n let borderColor = isTableInputCell\n ? theme.colors.transparent\n : getIn(theme.colors, baseInputBorderColor.default);\n let borderWidth = getIn(theme.border.width, baseInputBorderWidth.default);\n let zIndex: number | undefined;\n\n const baseInputState = getBaseInputState({ isFocused, isHovered, isDisabled });\n\n backgroundColor = getIn(theme.colors, backgroundColorTokens[baseInputState]);\n borderColor =\n isTableInputCell && baseInputState !== 'focused'\n ? theme.colors.transparent\n : getIn(theme.colors, baseInputBorderColor[baseInputState]);\n borderWidth = getIn(theme.border.width, baseInputBorderWidth[baseInputState]);\n\n if (!isTableInputCell && validationState && validationState !== 'none') {\n borderColor = getIn(theme.colors, baseInputBorderColor[validationState]);\n borderWidth = getIn(theme.border.width, baseInputBorderWidth[validationState]);\n zIndex = 1; // Prevent validation ring clipping by adjacent inputs in InputGroup\n } else if (validationState && validationState !== 'none') {\n backgroundColor = getIn(theme.colors, baseInputBorderlessBackgroundColor[validationState]);\n }\n return {\n backgroundColor,\n borderRadius: makeBorderSize(\n isTableInputCell ? theme.border.radius.none : theme.border.radius.medium,\n ),\n borderStyle: 'solid',\n display: 'flex',\n flexDirection: 'row',\n width: '100%',\n alignItems: isTextArea ? 'flex-start' : undefined,\n position: 'relative',\n height: isDropdownTrigger && !isTextArea ? 'auto' : undefined,\n border: 'none',\n zIndex,\n ...getBaseInputBorderStyles({ theme, borderColor, borderWidth, isFocused }),\n };\n};\n\nconst getLeftPadding = ({\n theme,\n isDropdownTrigger,\n hasLeadingIcon,\n hasPrefix,\n size,\n hasLeadingDropdown,\n}: {\n theme: Theme;\n hasLeadingIcon: boolean;\n hasPrefix: boolean;\n isDropdownTrigger: GetInputStyles['isDropdownTrigger'];\n size: GetInputStyles['size'];\n hasLeadingDropdown: boolean;\n}): number => {\n if (isDropdownTrigger) {\n return theme.spacing[0];\n }\n\n if (hasLeadingIcon || hasPrefix || hasLeadingDropdown) {\n return theme.spacing[3];\n }\n\n return theme.spacing[baseInputPaddingTokens.left[size]];\n};\n\nconst getRightPadding = ({\n theme,\n hasTrailingInteractionElement,\n hasSuffix,\n hasTrailingIcon,\n size,\n}: {\n theme: Theme;\n hasTrailingInteractionElement: boolean;\n hasSuffix: boolean;\n hasTrailingIcon: boolean;\n size: GetInputStyles['size'];\n}): number => {\n if (hasTrailingInteractionElement || hasSuffix || hasTrailingIcon) {\n return theme.spacing[3];\n }\n return theme.spacing[baseInputPaddingTokens.right[size]];\n};\n\nexport const getBaseInputStyles = ({\n theme,\n isDisabled,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n textAlign,\n isTextArea,\n hasTags,\n isDropdownTrigger,\n size,\n valueComponentType,\n hasLeadingDropdown = false,\n}: GetInputStyles): CSSObject => {\n const {\n hasLeadingIcon,\n hasPrefix,\n hasTrailingInteractionElement,\n hasSuffix,\n hasTrailingIcon,\n } = getInputVisualsToBeRendered({\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n size,\n });\n\n const isDropdownWithTags = isDropdownTrigger && hasTags;\n const isReactNative = getPlatformType() === 'react-native';\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n const shouldHaveFlexibleHeight = isTextArea || isDropdownWithTags;\n\n return {\n ...(valueComponentType === 'heading'\n ? getHeadingStyles({\n size,\n weight: 'regular',\n color: isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.subtle',\n theme,\n })\n : getTextStyles({\n size,\n variant: 'body',\n weight: 'regular',\n color: isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.subtle',\n theme,\n })),\n\n // take the full available width of parent container for input field\n flex: 1,\n backgroundColor: theme.colors.transparent,\n\n paddingTop: makeSpace(theme.spacing[baseInputPaddingTokens.top[size]]),\n paddingBottom: makeSpace(theme.spacing[baseInputPaddingTokens.bottom[size]]),\n paddingLeft: makeSpace(\n getLeftPadding({\n theme,\n isDropdownTrigger,\n hasLeadingIcon,\n hasPrefix,\n size,\n hasLeadingDropdown,\n }),\n ),\n paddingRight: getRightPadding({\n theme,\n hasTrailingInteractionElement,\n hasSuffix,\n hasTrailingIcon,\n size,\n }),\n\n textAlign,\n width: '100%',\n height: shouldHaveFlexibleHeight ? undefined : makeSpace(baseInputHeight[size]),\n minHeight: shouldHaveFlexibleHeight ? undefined : makeSpace(baseInputHeight[size]),\n ...(isReactNative ? {} : { resize: 'none' }),\n };\n};\n\nexport const getAnimatedBaseInputWrapperMaxHeight = ({\n maxTagRows,\n showAllTags,\n size,\n}: Pick<BaseInputWrapperProps, 'maxTagRows' | 'showAllTags' | 'size'>): number => {\n if (maxTagRows === 'single') {\n return baseInputHeight[size];\n }\n\n if (maxTagRows === 'multiple') {\n return baseInputWrapperMaxHeight[size];\n }\n\n // In expandable, max-height depends on the state\n return showAllTags ? baseInputWrapperMaxHeight[size] : baseInputHeight[size];\n};\n"],"names":["getBaseInputState","_ref","isFocused","isHovered","isDisabled","getInputBackgroundAndBorderStyles","_ref2","theme","validationState","isTextArea","isDropdownTrigger","isTableInputCell","backgroundColorTokens","baseInputBorderlessBackgroundColor","baseInputBackgroundColor","backgroundColor","getIn","colors","default","borderColor","transparent","baseInputBorderColor","borderWidth","border","width","baseInputBorderWidth","zIndex","baseInputState","Object","assign","borderRadius","makeBorderSize","radius","none","medium","borderStyle","display","flexDirection","alignItems","undefined","position","height","getBaseInputBorderStyles","getLeftPadding","_ref3","hasLeadingIcon","hasPrefix","size","hasLeadingDropdown","spacing","baseInputPaddingTokens","left","getRightPadding","_ref4","hasTrailingInteractionElement","hasSuffix","hasTrailingIcon","right","getBaseInputStyles","_ref5","leadingIcon","prefix","trailingInteractionElement","leadingInteractionElement","suffix","trailingIcon","textAlign","hasTags","valueComponentType","_ref5$hasLeadingDropd","_getInputVisualsToBeR","getInputVisualsToBeRendered","isDropdownWithTags","isReactNative","getPlatformType","shouldHaveFlexibleHeight","getHeadingStyles","weight","color","getTextStyles","variant","flex","paddingTop","makeSpace","top","paddingBottom","bottom","paddingLeft","paddingRight","baseInputHeight","minHeight","resize","getAnimatedBaseInputWrapperMaxHeight","_ref6","maxTagRows","showAllTags","base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":["../../../../../../src/components/Input/BaseInput/baseInputStyles.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components';\nimport type { BaseInputProps } from './BaseInput';\nimport { getBaseInputBorderStyles } from './getBaseInputBorderStyles';\nimport {\n baseInputBackgroundColor,\n baseInputBorderColor,\n baseInputBorderWidth,\n baseInputBorderlessBackgroundColor,\n baseInputCounterInputPaddingTokens,\n baseInputHeight,\n baseInputPaddingTokens,\n baseInputWrapperMaxHeight,\n} from './baseInputTokens';\nimport { getInputVisualsToBeRendered } from './BaseInputVisuals';\nimport type { BaseInputWrapperProps } from './types';\nimport type { Theme } from '~components/BladeProvider';\nimport getTextStyles from '~components/Typography/Text/getTextStyles';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeBorderSize } from '~utils/makeBorderSize';\nimport { getPlatformType } from '~utils';\nimport getIn from '~utils/lodashButBetter/get';\nimport getHeadingStyles from '~components/Typography/Heading/getHeadingStyles';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\n\ntype GetInputStyles = Pick<\n BaseInputProps,\n | 'isDisabled'\n | 'validationState'\n | 'leadingIcon'\n | 'prefix'\n | 'trailingInteractionElement'\n | 'leadingInteractionElement'\n | 'suffix'\n | 'trailingIcon'\n | 'textAlign'\n | 'isDropdownTrigger'\n | 'valueComponentType'\n> & {\n isHovered?: boolean;\n isFocused?: boolean;\n isTextArea?: boolean;\n hasTags?: boolean;\n theme: Theme;\n size: NonNullable<BaseInputProps['size']>;\n isTableInputCell: NonNullable<BaseInputProps['isTableInputCell']>;\n hasLeadingDropdown?: boolean;\n color?: BaseTextProps['color'];\n disabledColor?: BaseTextProps['color'];\n isInsideCounterInput?: boolean;\n};\n\nexport const getBaseInputState = ({\n isFocused,\n isHovered,\n isDisabled,\n}: {\n isFocused?: boolean;\n isHovered?: boolean;\n isDisabled?: boolean;\n}): 'focused' | 'hovered' | 'disabled' | 'default' => {\n if (isDisabled) {\n return 'disabled';\n } else if (isFocused) {\n return 'focused';\n } else if (isHovered) {\n return 'hovered';\n } else {\n return 'default';\n }\n};\n\nexport const getInputBackgroundAndBorderStyles = ({\n theme,\n isHovered,\n isFocused,\n isDisabled,\n validationState,\n isTextArea,\n isDropdownTrigger,\n isTableInputCell,\n}: Pick<\n GetInputStyles,\n | 'theme'\n | 'isFocused'\n | 'isDisabled'\n | 'validationState'\n | 'isHovered'\n | 'isTextArea'\n | 'isDropdownTrigger'\n | 'isTableInputCell'\n>): CSSObject => {\n // normal state\n const backgroundColorTokens = isTableInputCell\n ? baseInputBorderlessBackgroundColor\n : baseInputBackgroundColor;\n let backgroundColor = getIn(theme.colors, backgroundColorTokens.default);\n let borderColor = isTableInputCell\n ? theme.colors.transparent\n : getIn(theme.colors, baseInputBorderColor.default);\n let borderWidth = getIn(theme.border.width, baseInputBorderWidth.default);\n let zIndex: number | undefined;\n\n const baseInputState = getBaseInputState({ isFocused, isHovered, isDisabled });\n\n backgroundColor = getIn(theme.colors, backgroundColorTokens[baseInputState]);\n borderColor =\n isTableInputCell && baseInputState !== 'focused'\n ? theme.colors.transparent\n : getIn(theme.colors, baseInputBorderColor[baseInputState]);\n borderWidth = getIn(theme.border.width, baseInputBorderWidth[baseInputState]);\n\n if (!isTableInputCell && validationState && validationState !== 'none') {\n borderColor = getIn(theme.colors, baseInputBorderColor[validationState]);\n borderWidth = getIn(theme.border.width, baseInputBorderWidth[validationState]);\n zIndex = 1; // Prevent validation ring clipping by adjacent inputs in InputGroup\n } else if (validationState && validationState !== 'none') {\n backgroundColor = getIn(theme.colors, baseInputBorderlessBackgroundColor[validationState]);\n }\n return {\n backgroundColor,\n borderRadius: makeBorderSize(\n isTableInputCell ? theme.border.radius.none : theme.border.radius.medium,\n ),\n borderStyle: 'solid',\n display: 'flex',\n flexDirection: 'row',\n width: '100%',\n alignItems: isTextArea ? 'flex-start' : undefined,\n position: 'relative',\n height: isDropdownTrigger && !isTextArea ? 'auto' : undefined,\n border: 'none',\n zIndex,\n ...getBaseInputBorderStyles({ theme, borderColor, borderWidth, isFocused }),\n };\n};\n\nconst getLeftPadding = ({\n theme,\n isDropdownTrigger,\n hasLeadingIcon,\n hasPrefix,\n size,\n hasLeadingDropdown,\n isInsideCounterInput,\n}: {\n theme: Theme;\n hasLeadingIcon: boolean;\n hasPrefix: boolean;\n isDropdownTrigger: GetInputStyles['isDropdownTrigger'];\n size: GetInputStyles['size'];\n hasLeadingDropdown: boolean;\n isInsideCounterInput?: boolean;\n}): number => {\n if (isDropdownTrigger) {\n return theme.spacing[0];\n }\n\n if (hasLeadingIcon || hasPrefix || hasLeadingDropdown) {\n return theme.spacing[3];\n }\n\n /**\n * CounterInput uses tighter padding (4px vs 8-12px) for compact design\n */\n if (isInsideCounterInput) {\n return theme.spacing[baseInputCounterInputPaddingTokens.left[size]];\n }\n\n return theme.spacing[baseInputPaddingTokens.left[size]];\n};\n\nconst getRightPadding = ({\n theme,\n hasTrailingInteractionElement,\n hasSuffix,\n hasTrailingIcon,\n size,\n isInsideCounterInput,\n}: {\n theme: Theme;\n hasTrailingInteractionElement: boolean;\n hasSuffix: boolean;\n hasTrailingIcon: boolean;\n size: GetInputStyles['size'];\n isInsideCounterInput?: boolean;\n}): number => {\n if (hasTrailingInteractionElement || hasSuffix || hasTrailingIcon) {\n return theme.spacing[3];\n }\n\n // CounterInput uses compact padding\n if (isInsideCounterInput) {\n return theme.spacing[baseInputCounterInputPaddingTokens.right[size]];\n }\n return theme.spacing[baseInputPaddingTokens.right[size]];\n};\n\nconst getTopPadding = ({\n theme,\n size,\n isInsideCounterInput,\n}: {\n theme: Theme;\n size: GetInputStyles['size'];\n isInsideCounterInput?: boolean;\n}): number => {\n // CounterInput uses compact padding\n if (isInsideCounterInput) {\n return theme.spacing[baseInputCounterInputPaddingTokens.top[size]];\n }\n return theme.spacing[baseInputPaddingTokens.top[size]];\n};\n\nconst getBottomPadding = ({\n theme,\n size,\n isInsideCounterInput,\n}: {\n theme: Theme;\n size: GetInputStyles['size'];\n isInsideCounterInput?: boolean;\n}): number => {\n // CounterInput uses compact padding\n if (isInsideCounterInput) {\n return theme.spacing[baseInputCounterInputPaddingTokens.top[size]];\n }\n return theme.spacing[baseInputPaddingTokens.bottom[size]];\n};\n\nexport const getBaseInputStyles = ({\n theme,\n isDisabled,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n textAlign,\n isTextArea,\n hasTags,\n isDropdownTrigger,\n size,\n valueComponentType,\n hasLeadingDropdown = false,\n color,\n disabledColor,\n isInsideCounterInput,\n}: GetInputStyles): CSSObject => {\n const {\n hasLeadingIcon,\n hasPrefix,\n hasTrailingInteractionElement,\n hasSuffix,\n hasTrailingIcon,\n } = getInputVisualsToBeRendered({\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n size,\n });\n\n const isDropdownWithTags = isDropdownTrigger && hasTags;\n const isReactNative = getPlatformType() === 'react-native';\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n const shouldHaveFlexibleHeight = isTextArea || isDropdownWithTags;\n\n return {\n ...(valueComponentType === 'heading'\n ? getHeadingStyles({\n size: size === 'xsmall' ? 'small' : size,\n weight: 'regular',\n color: isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.subtle',\n theme,\n })\n : getTextStyles({\n /**\n * CounterInput: uses 'small' size for xsmall and 'semibold' weight for prominence\n */\n size: isInsideCounterInput && size === 'xsmall' ? 'small' : size,\n variant: 'body',\n weight: isInsideCounterInput ? 'semibold' : 'regular',\n color: isDisabled\n ? disabledColor ?? 'surface.text.gray.disabled'\n : color ?? 'surface.text.gray.subtle',\n theme,\n })),\n\n // take the full available width of parent container for input field\n flex: 1,\n backgroundColor: theme.colors.transparent,\n\n paddingTop: makeSpace(getTopPadding({ theme, size, isInsideCounterInput })),\n paddingBottom: makeSpace(getBottomPadding({ theme, size, isInsideCounterInput })),\n paddingLeft: makeSpace(\n getLeftPadding({\n theme,\n isDropdownTrigger,\n hasLeadingIcon,\n hasPrefix,\n size,\n hasLeadingDropdown,\n isInsideCounterInput,\n }),\n ),\n paddingRight: getRightPadding({\n theme,\n hasTrailingInteractionElement,\n hasSuffix,\n hasTrailingIcon,\n size,\n isInsideCounterInput,\n }),\n\n textAlign,\n width: '100%',\n height: shouldHaveFlexibleHeight ? undefined : makeSpace(baseInputHeight[size]),\n minHeight: shouldHaveFlexibleHeight ? undefined : makeSpace(baseInputHeight[size]),\n ...(isReactNative ? {} : { resize: 'none' }),\n };\n};\n\nexport const getAnimatedBaseInputWrapperMaxHeight = ({\n maxTagRows,\n showAllTags,\n size,\n}: Pick<BaseInputWrapperProps, 'maxTagRows' | 'showAllTags' | 'size'>): number => {\n if (maxTagRows === 'single') {\n return baseInputHeight[size];\n }\n\n if (maxTagRows === 'multiple') {\n return baseInputWrapperMaxHeight[size];\n }\n\n // In expandable, max-height depends on the state\n return showAllTags ? baseInputWrapperMaxHeight[size] : baseInputHeight[size];\n};\n"],"names":["getBaseInputState","_ref","isFocused","isHovered","isDisabled","getInputBackgroundAndBorderStyles","_ref2","theme","validationState","isTextArea","isDropdownTrigger","isTableInputCell","backgroundColorTokens","baseInputBorderlessBackgroundColor","baseInputBackgroundColor","backgroundColor","getIn","colors","default","borderColor","transparent","baseInputBorderColor","borderWidth","border","width","baseInputBorderWidth","zIndex","baseInputState","Object","assign","borderRadius","makeBorderSize","radius","none","medium","borderStyle","display","flexDirection","alignItems","undefined","position","height","getBaseInputBorderStyles","getLeftPadding","_ref3","hasLeadingIcon","hasPrefix","size","hasLeadingDropdown","isInsideCounterInput","spacing","baseInputCounterInputPaddingTokens","left","baseInputPaddingTokens","getRightPadding","_ref4","hasTrailingInteractionElement","hasSuffix","hasTrailingIcon","right","getTopPadding","_ref5","top","getBottomPadding","_ref6","bottom","getBaseInputStyles","_ref7","leadingIcon","prefix","trailingInteractionElement","leadingInteractionElement","suffix","trailingIcon","textAlign","hasTags","valueComponentType","_ref7$hasLeadingDropd","color","disabledColor","_getInputVisualsToBeR","getInputVisualsToBeRendered","isDropdownWithTags","isReactNative","getPlatformType","shouldHaveFlexibleHeight","getHeadingStyles","weight","getTextStyles","variant","flex","paddingTop","makeSpace","paddingBottom","paddingLeft","paddingRight","baseInputHeight","minHeight","resize","getAnimatedBaseInputWrapperMaxHeight","_ref8","maxTagRows","showAllTags","baseInputWrapperMaxHeight"],"mappings":";;;;;;;;;;;;;;AAmDa,IAAAA,iBAAiB,CAAG,SAApBA,iBAAiBA,CAAAC,IAAA,CAQwB,KAPpDC,SAAS,CAAAD,IAAA,CAATC,SAAS,CACTC,SAAS,CAAAF,IAAA,CAATE,SAAS,CACTC,UAAU,CAAAH,IAAA,CAAVG,UAAU,CAMV,GAAIA,UAAU,CAAE,CACd,OAAO,UAAU,CACnB,CAAC,KAAUF,GAAAA,SAAS,CAAE,CACpB,OAAO,SAAS,CAClB,CAAC,KAAM,GAAIC,SAAS,CAAE,CACpB,OAAO,SAAS,CAClB,CAAC,KAAM,CACL,OAAO,SAAS,CAClB,CACF,EAEa,IAAAE,iCAAiC,CAAG,SAApCA,iCAAiCA,CAAAC,KAAA,CAmB7B,CAAA,IAlBfC,KAAK,CAAAD,KAAA,CAALC,KAAK,CACLJ,SAAS,CAAAG,KAAA,CAATH,SAAS,CACTD,SAAS,CAAAI,KAAA,CAATJ,SAAS,CACTE,UAAU,CAAAE,KAAA,CAAVF,UAAU,CACVI,eAAe,CAAAF,KAAA,CAAfE,eAAe,CACfC,UAAU,CAAAH,KAAA,CAAVG,UAAU,CACVC,iBAAiB,CAAAJ,KAAA,CAAjBI,iBAAiB,CACjBC,gBAAgB,CAAAL,KAAA,CAAhBK,gBAAgB,CAahB,IAAMC,qBAAqB,CAAGD,gBAAgB,CAC1CE,kCAAkC,CAClCC,wBAAwB,CAC5B,IAAIC,eAAe,CAAGC,KAAK,CAACT,KAAK,CAACU,MAAM,CAAEL,qBAAqB,CAACM,OAAO,CAAC,CACxE,IAAIC,WAAW,CAAGR,gBAAgB,CAC9BJ,KAAK,CAACU,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E,CAAG,CAAEe,MAAM,CAAE,MAAO,CAAC,CAAA,CAE/C,EAEa,IAAAC,oCAAoC,CAAG,SAAvCA,oCAAoCA,CAAAC,KAAA,CAIiC,KAHhFC,UAAU,CAAAD,KAAA,CAAVC,UAAU,CACVC,WAAW,CAAAF,KAAA,CAAXE,WAAW,CACXvD,IAAI,CAAAqD,KAAA,CAAJrD,IAAI,CAEJ,GAAIsD,UAAU,GAAK,QAAQ,CAAE,CAC3B,OAAOL,eAAe,CAACjD,IAAI,CAAC,CAC9B,CAEA,GAAIsD,UAAU,GAAK,UAAU,CAAE,CAC7B,OAAOE,yBAAyB,CAACxD,IAAI,CAAC,CACxC,CAGA,OAAOuD,WAAW,CAAGC,yBAAyB,CAACxD,IAAI,CAAC,CAAGiD,eAAe,CAACjD,IAAI,CAAC,CAC9E;;;;"}
|
|
@@ -2,7 +2,7 @@ import '../../../tokens/global/typography.js';
|
|
|
2
2
|
import '../../../tokens/global/motion.js';
|
|
3
3
|
import { size } from '../../../tokens/global/size.js';
|
|
4
4
|
|
|
5
|
-
var BASEINPUT_MAX_ROWS=4;var baseInputHeight={medium:size['36'],large:size['48']};var baseInputWrapperMaxHeight={medium:baseInputHeight.medium*BASEINPUT_MAX_ROWS,large:baseInputHeight.large*BASEINPUT_MAX_ROWS};var baseInputBorderColor={default:'interactive.border.gray.default',hovered:'interactive.border.gray.highlighted',focused:'interactive.border.primary.default',disabled:'interactive.border.gray.disabled',error:'interactive.border.negative.default',success:'interactive.border.positive.default'};var baseInputBackgroundColor={default:'surface.background.gray.intense',hovered:'surface.background.gray.moderate',focused:'surface.background.gray.moderate',disabled:'surface.background.gray.subtle',error:'surface.background.gray.intense',success:'surface.background.gray.intense'};var baseInputBorderlessBackgroundColor={default:'transparent',hovered:'surface.background.gray.moderate',focused:'surface.background.gray.moderate',disabled:'surface.background.gray.intense',error:'feedback.background.negative.subtle',success:'feedback.background.positive.subtle'};var baseInputBorderWidth={default:'thin',hovered:'thin',disabled:'thin',focused:'thick',error:'thick',success:'thick'};var baseInputBorderBackgroundMotion={enter:{duration:'xgentle',easing:'emphasized'},exit:{duration:'gentle',easing:'standard'}};var baseInputPaddingTokens={top:{medium:3,large:4},bottom:{medium:3,large:4},left:{medium:4,large:4},right:{medium:4,large:4}};var formHintLeftLabelMarginLeft={medium:136,large:192};
|
|
5
|
+
var BASEINPUT_MAX_ROWS=4;var baseInputHeight={xsmall:size['26'],medium:size['36'],large:size['48']};var baseInputWrapperMaxHeight={xsmall:baseInputHeight.xsmall*BASEINPUT_MAX_ROWS,medium:baseInputHeight.medium*BASEINPUT_MAX_ROWS,large:baseInputHeight.large*BASEINPUT_MAX_ROWS};var baseInputBorderColor={default:'interactive.border.gray.default',hovered:'interactive.border.gray.highlighted',focused:'interactive.border.primary.default',disabled:'interactive.border.gray.disabled',error:'interactive.border.negative.default',success:'interactive.border.positive.default'};var baseInputBackgroundColor={default:'surface.background.gray.intense',hovered:'surface.background.gray.moderate',focused:'surface.background.gray.moderate',disabled:'surface.background.gray.subtle',error:'surface.background.gray.intense',success:'surface.background.gray.intense'};var baseInputBorderlessBackgroundColor={default:'transparent',hovered:'surface.background.gray.moderate',focused:'surface.background.gray.moderate',disabled:'surface.background.gray.intense',error:'feedback.background.negative.subtle',success:'feedback.background.positive.subtle'};var baseInputBorderWidth={default:'thin',hovered:'thin',disabled:'thin',focused:'thick',error:'thick',success:'thick'};var baseInputBorderBackgroundMotion={enter:{duration:'xgentle',easing:'emphasized'},exit:{duration:'gentle',easing:'standard'}};var baseInputPaddingTokens={top:{xsmall:2,medium:3,large:4},bottom:{xsmall:2,medium:3,large:4},left:{xsmall:3,medium:4,large:4},right:{xsmall:3,medium:4,large:4}};var formHintLeftLabelMarginLeft={xsmall:136,medium:136,large:192};var baseInputCounterInputPaddingTokens={top:{xsmall:2,medium:2,large:2},bottom:{xsmall:2,medium:2,large:2},left:{xsmall:2,medium:2,large:2},right:{xsmall:2,medium:2,large:2}};
|
|
6
6
|
|
|
7
|
-
export { BASEINPUT_MAX_ROWS, baseInputBackgroundColor, baseInputBorderBackgroundMotion, baseInputBorderColor, baseInputBorderWidth, baseInputBorderlessBackgroundColor, baseInputHeight, baseInputPaddingTokens, baseInputWrapperMaxHeight, formHintLeftLabelMarginLeft };
|
|
7
|
+
export { BASEINPUT_MAX_ROWS, baseInputBackgroundColor, baseInputBorderBackgroundMotion, baseInputBorderColor, baseInputBorderWidth, baseInputBorderlessBackgroundColor, baseInputCounterInputPaddingTokens, baseInputHeight, baseInputPaddingTokens, baseInputWrapperMaxHeight, formHintLeftLabelMarginLeft };
|
|
8
8
|
//# sourceMappingURL=baseInputTokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseInputTokens.js","sources":["../../../../../../src/components/Input/BaseInput/baseInputTokens.ts"],"sourcesContent":["import type { BaseInputProps } from './BaseInput';\nimport { size, spacing } from '~tokens/global';\n\nexport const BASEINPUT_MAX_ROWS = 4;\n\nexport const TAG_HEIGHT = size['20'];\nexport const TAG_GAP = spacing['3'];\n\n/**\n * 36px\n */\nexport const baseInputHeight: Record<\n NonNullable<BaseInputProps['size']>,\n typeof size[keyof typeof size]\n> = {\n medium: size['36'],\n large: size['48'],\n};\n\n/**\n * medium - 144px (36px height * 4 rows)\n * large - 192px (48px height * 4 rows)\n */\n// we don't want exact number but rough number to be able to animate correctly in height.\nexport const baseInputWrapperMaxHeight = {\n medium: baseInputHeight.medium * BASEINPUT_MAX_ROWS,\n large: baseInputHeight.large * BASEINPUT_MAX_ROWS,\n} as const;\n\nexport const baseInputBorderColor = {\n default: 'interactive.border.gray.default',\n hovered: 'interactive.border.gray.highlighted',\n focused: 'interactive.border.primary.default',\n disabled: 'interactive.border.gray.disabled',\n error: 'interactive.border.negative.default',\n success: 'interactive.border.positive.default',\n} as const;\n\nexport const baseInputBackgroundColor = {\n default: 'surface.background.gray.intense',\n hovered: 'surface.background.gray.moderate',\n focused: 'surface.background.gray.moderate',\n disabled: 'surface.background.gray.subtle',\n error: 'surface.background.gray.intense',\n success: 'surface.background.gray.intense',\n} as const;\n\nexport const baseInputBorderlessBackgroundColor = {\n default: 'transparent',\n hovered: 'surface.background.gray.moderate',\n focused: 'surface.background.gray.moderate',\n disabled: 'surface.background.gray.intense',\n error: 'feedback.background.negative.subtle',\n success: 'feedback.background.positive.subtle',\n} as const;\n\nexport const baseInputBorderWidth = {\n default: 'thin',\n hovered: 'thin',\n disabled: 'thin',\n focused: 'thick',\n error: 'thick',\n success: 'thick',\n} as const;\n\nexport const baseInputBorderBackgroundMotion = {\n enter: { duration: 'xgentle', easing: 'emphasized' },\n exit: { duration: 'gentle', easing: 'standard' },\n} as const;\n\nexport const baseInputPaddingTokens = {\n top: {\n medium: 3,\n large: 4,\n },\n bottom: {\n medium: 3,\n large: 4,\n },\n left: {\n medium: 4,\n large: 4,\n },\n right: {\n medium: 4,\n large: 4,\n },\n} as const;\n\n/* the magic number 192 is basically max-width of label \ni.e 176 and then right margin \ni.e 16 which is the spacing between label and input field */\nexport const formHintLeftLabelMarginLeft = {\n medium: 136,\n large: 192,\n} as const;\n"],"names":["BASEINPUT_MAX_ROWS","baseInputHeight","
|
|
1
|
+
{"version":3,"file":"baseInputTokens.js","sources":["../../../../../../src/components/Input/BaseInput/baseInputTokens.ts"],"sourcesContent":["import type { BaseInputProps } from './BaseInput';\nimport { size, spacing } from '~tokens/global';\n\nexport const BASEINPUT_MAX_ROWS = 4;\n\nexport const TAG_HEIGHT = size['20'];\nexport const TAG_GAP = spacing['3'];\n\n/**\n * 36px\n */\nexport const baseInputHeight: Record<\n NonNullable<BaseInputProps['size']>,\n typeof size[keyof typeof size]\n> = {\n xsmall: size['26'],\n medium: size['36'],\n large: size['48'],\n};\n\n/**\n * medium - 144px (36px height * 4 rows)\n * large - 192px (48px height * 4 rows)\n */\n// we don't want exact number but rough number to be able to animate correctly in height.\nexport const baseInputWrapperMaxHeight = {\n xsmall: baseInputHeight.xsmall * BASEINPUT_MAX_ROWS,\n medium: baseInputHeight.medium * BASEINPUT_MAX_ROWS,\n large: baseInputHeight.large * BASEINPUT_MAX_ROWS,\n} as const;\n\nexport const baseInputBorderColor = {\n default: 'interactive.border.gray.default',\n hovered: 'interactive.border.gray.highlighted',\n focused: 'interactive.border.primary.default',\n disabled: 'interactive.border.gray.disabled',\n error: 'interactive.border.negative.default',\n success: 'interactive.border.positive.default',\n} as const;\n\nexport const baseInputBackgroundColor = {\n default: 'surface.background.gray.intense',\n hovered: 'surface.background.gray.moderate',\n focused: 'surface.background.gray.moderate',\n disabled: 'surface.background.gray.subtle',\n error: 'surface.background.gray.intense',\n success: 'surface.background.gray.intense',\n} as const;\n\nexport const baseInputBorderlessBackgroundColor = {\n default: 'transparent',\n hovered: 'surface.background.gray.moderate',\n focused: 'surface.background.gray.moderate',\n disabled: 'surface.background.gray.intense',\n error: 'feedback.background.negative.subtle',\n success: 'feedback.background.positive.subtle',\n} as const;\n\nexport const baseInputBorderWidth = {\n default: 'thin',\n hovered: 'thin',\n disabled: 'thin',\n focused: 'thick',\n error: 'thick',\n success: 'thick',\n} as const;\n\nexport const baseInputBorderBackgroundMotion = {\n enter: { duration: 'xgentle', easing: 'emphasized' },\n exit: { duration: 'gentle', easing: 'standard' },\n} as const;\n\nexport const baseInputPaddingTokens = {\n top: {\n xsmall: 2,\n medium: 3,\n large: 4,\n },\n bottom: {\n xsmall: 2,\n medium: 3,\n large: 4,\n },\n left: {\n xsmall: 3,\n medium: 4,\n large: 4,\n },\n right: {\n xsmall: 3,\n medium: 4,\n large: 4,\n },\n} as const;\n\n/* the magic number 192 is basically max-width of label \ni.e 176 and then right margin \ni.e 16 which is the spacing between label and input field */\nexport const formHintLeftLabelMarginLeft = {\n xsmall: 136,\n medium: 136,\n large: 192,\n} as const;\n\nexport const baseInputCounterInputPaddingTokens = {\n top: {\n xsmall: 2,\n medium: 2,\n large: 2,\n },\n bottom: {\n xsmall: 2,\n medium: 2,\n large: 2,\n },\n left: {\n xsmall: 2,\n medium: 2,\n large: 2,\n },\n right: {\n xsmall: 2,\n medium: 2,\n large: 2,\n },\n} as const;\n"],"names":["BASEINPUT_MAX_ROWS","baseInputHeight","xsmall","size","medium","large","baseInputWrapperMaxHeight","baseInputBorderColor","default","hovered","focused","disabled","error","success","baseInputBackgroundColor","baseInputBorderlessBackgroundColor","baseInputBorderWidth","baseInputBorderBackgroundMotion","enter","duration","easing","exit","baseInputPaddingTokens","top","bottom","left","right","formHintLeftLabelMarginLeft","baseInputCounterInputPaddingTokens"],"mappings":";;;;AAGa,IAAAA,kBAAkB,CAAG,EAQrB,IAAAC,eAGZ,CAAG,CACFC,MAAM,CAAEC,IAAI,CAAC,IAAI,CAAC,CAClBC,MAAM,CAAED,IAAI,CAAC,IAAI,CAAC,CAClBE,KAAK,CAAEF,IAAI,CAAC,IAAI,CAClB,EAOa,IAAAG,yBAAyB,CAAG,CACvCJ,MAAM,CAAED,eAAe,CAACC,MAAM,CAAGF,kBAAkB,CACnDI,MAAM,CAAEH,eAAe,CAACG,MAAM,CAAGJ,kBAAkB,CACnDK,KAAK,CAAEJ,eAAe,CAACI,KAAK,CAAGL,kBACjC,EAEa,IAAAO,oBAAoB,CAAG,CAClCC,OAAO,CAAE,iCAAiC,CAC1CC,OAAO,CAAE,qCAAqC,CAC9CC,OAAO,CAAE,oCAAoC,CAC7CC,QAAQ,CAAE,kCAAkC,CAC5CC,KAAK,CAAE,qCAAqC,CAC5CC,OAAO,CAAE,qCACX,EAEa,IAAAC,wBAAwB,CAAG,CACtCN,OAAO,CAAE,iCAAiC,CAC1CC,OAAO,CAAE,kCAAkC,CAC3CC,OAAO,CAAE,kCAAkC,CAC3CC,QAAQ,CAAE,gCAAgC,CAC1CC,KAAK,CAAE,iCAAiC,CACxCC,OAAO,CAAE,iCACX,EAEa,IAAAE,kCAAkC,CAAG,CAChDP,OAAO,CAAE,aAAa,CACtBC,OAAO,CAAE,kCAAkC,CAC3CC,OAAO,CAAE,kCAAkC,CAC3CC,QAAQ,CAAE,iCAAiC,CAC3CC,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AE,CACT,CAAC,CACDqB,KAAK,CAAE,CACLxB,MAAM,CAAE,CAAC,CACTE,MAAM,CAAE,CAAC,CACTC,KAAK,CAAE,CACT,CACF;;;;"}
|
|
@@ -25,7 +25,7 @@ import { BaseBox } from '../Box/BaseBox/BaseBox.native.js';
|
|
|
25
25
|
import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.native.js';
|
|
26
26
|
import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
|
|
27
27
|
|
|
28
|
-
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,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,rest=_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 percentageValue=(progressValue-min)*100/(max-min);var percentageProgressValue=isMeter?parseFloat(percentageValue.toFixed(1)):Math.floor(percentageValue);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({ref:ref},getStyledProps(rest),metaAttribute({name:MetaConstants.ProgressBar,testID:testID}),makeAnalyticsAttribute(rest),{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.emphasized"}):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.emphasized",type:progressType,isIndeterminate:isIndeterminate})})}))]})}));};var ProgressBar=React__default.forwardRef(_ProgressBar);
|
|
28
|
+
var _excluded=["accessibilityLabel","color","type","isIndeterminate","label","showPercentage","size","value","variant","min","max","_oscillation","testID"];var progressBarHeight={small:size[2],medium:size[4],large:size[0]};var _ProgressBar=function _ProgressBar(_ref,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,_ref$_oscillation=_ref._oscillation,_oscillation=_ref$_oscillation===void 0?false:_ref$_oscillation,testID=_ref.testID,rest=_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 percentageValue=(progressValue-min)*100/(max-min);var percentageProgressValue=isMeter?parseFloat(percentageValue.toFixed(1)):Math.floor(percentageValue);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({ref:ref},getStyledProps(rest),metaAttribute({name:MetaConstants.ProgressBar,testID:testID}),makeAnalyticsAttribute(rest),{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.emphasized"}):jsx(BaseBox,{className:"__blade-progress-bar-track",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.emphasized",type:progressType,isIndeterminate:isIndeterminate,_oscillation:_oscillation})})}))]})}));};var ProgressBar=React__default.forwardRef(_ProgressBar);
|
|
29
29
|
|
|
30
30
|
export { ProgressBar };
|
|
31
31
|
//# sourceMappingURL=ProgressBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","sources":["../../../../../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":["import React from 'react';\nimport type { ReactElement, Ref } 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 { DataAnalyticsAttribute, BladeElementRef, 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';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\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 DataAnalyticsAttribute &\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 {\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 ...rest\n }: ProgressBarProps,\n ref: Ref<BladeElementRef>,\n): 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 percentageValue = ((progressValue - min) * 100) / (max - min);\n const percentageProgressValue = isMeter\n ? parseFloat(percentageValue.toFixed(1))\n : Math.floor(percentageValue);\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 ref={ref as never}\n {...getStyledProps(rest)}\n {...metaAttribute({ name: MetaConstants.ProgressBar, testID })}\n {...makeAnalyticsAttribute(rest)}\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.emphasized\"\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.emphasized\"\n type={progressType}\n isIndeterminate={isIndeterminate}\n />\n </BaseBox>\n )}\n </BaseBox>\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst ProgressBar = React.forwardRef(_ProgressBar);\n\nexport type { ProgressBarProps, ProgressBarVariant };\nexport { ProgressBar };\n"],"names":["progressBarHeight","small","size","medium","large","_ProgressBar","_ref","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","rest","_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","percentageValue","percentageProgressValue","parseFloat","toFixed","Math","floor","shouldShowPercentage","accessibilityProps","role","valueNow","valueText","valueMin","valueMax","undefined","_jsx","BaseBox","Object","assign","getStyledProps","metaAttribute","name","MetaConstants","ProgressBar","makeAnalyticsAttribute","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","React","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;6IAyGA,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,CAED,IAAMG,YAAY,CAAG,SAAfA,YAAYA,CAAAC,IAAA,CAgBhBC,GAAyB,CACR,CAAAC,IAAAA,WAAA,CAff,IAAAC,kBAAkB,CAAAH,IAAA,CAAlBG,kBAAkB,CAClBC,KAAK,CAAAJ,IAAA,CAALI,KAAK,CACLC,IAAI,CAAAL,IAAA,CAAJK,IAAI,CAAAC,oBAAA,CAAAN,IAAA,CACJO,eAAe,CAAfA,eAAe,CAAAD,oBAAA,GAAG,KAAA,CAAA,CAAA,KAAK,CAAAA,oBAAA,CACvBE,KAAK,CAAAR,IAAA,CAALQ,KAAK,CAAAC,mBAAA,CAAAT,IAAA,CACLU,cAAc,CAAdA,cAAc,CAAAD,mBAAA,GAAG,KAAA,CAAA,CAAA,IAAI,CAAAA,mBAAA,CAAAE,SAAA,CAAAX,IAAA,CACrB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IAAK,CACXY,KAAK,CAAEA,KAAM,CACb+E,eAAe,CAAElC,uBAAwB,CACzCL,OAAO,CAAEA,OAAQ,CACjBtC,cAAc,CAAEA,cAAe,CAC/B8E,eAAe,CAAErD,uBAAkC,CACnDsD,SAAS,CAAEhD,qBAAsB,CACjCiD,mBAAmB,CAAC,mBAAmB,CACvCC,kBAAkB,CAAC,mBAAmB,CACtCC,gBAAgB,CAAC,YAAY,CAC7BC,YAAY,CAAC,mBAAmB,CACjC,CAAC,CAEF3B,GAAA,CAACC,OAAO,CACNqB,CAAAA,eAAe,CAAErD,uBAAwB,CACzC2D,MAAM,CAAEC,QAAQ,CAACrG,iBAAiB,CAACE,IAAI,CAAC,CAAE,CAC1CoG,QAAQ,CAAC,QAAQ,CACjBC,QAAQ,CAAC,UAAU,CAAArB,QAAA,CAEnBV,GAAA,CAACgC,iBAAiB,EAChBV,eAAe,CAAE/C,qBAAsB,CACvC0D,QAAQ,CAAE9C,uBAAwB,CAClCsC,kBAAkB,CAAC,mBAAmB,CACtCD,mBAAmB,CAAC,mBAAmB,CACvCU,2BAA2B,CAAC,mBAAmB,CAC/CR,gBAAgB,CAAC,YAAY,CAC7BC,YAAY,CAAC,mBAAmB,CAChCxF,IAAI,CAAEsB,YAAa,CACnBpB,eAAe,CAAEA,eAAgB,CAClC,CAAC,CACK,CACV,CAAA,CACM,CAAC,CAAA,CACH,CAAC,CAAA,CACH,CAAC,CAEd,CAAC,CAEK,IAAAmE,WAAW,CAAG2B,cAAK,CAACC,UAAU,CAACvG,YAAY;;;;"}
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","sources":["../../../../../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":["import React from 'react';\nimport type { ReactElement, Ref } 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 { DataAnalyticsAttribute, BladeElementRef, 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';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\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 DataAnalyticsAttribute &\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 * Private property for Blade.\n *\n * Should not be used by consumers.\n *\n * Sets whether the indeterminate progress bar should oscillate (left-to-right-to-left).\n * When false, uses standard left-to-right animation.\n *\n * @private\n * @default false\n */\n _oscillation?: 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 * Sets whether the indeterminate progress bar should oscillate.\n * @default undefined\n */\n _oscillation?: 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 {\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 _oscillation = false,\n testID,\n ...rest\n }: ProgressBarProps,\n ref: Ref<BladeElementRef>,\n): 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 percentageValue = ((progressValue - min) * 100) / (max - min);\n const percentageProgressValue = isMeter\n ? parseFloat(percentageValue.toFixed(1))\n : Math.floor(percentageValue);\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 ref={ref as never}\n {...getStyledProps(rest)}\n {...metaAttribute({ name: MetaConstants.ProgressBar, testID })}\n {...makeAnalyticsAttribute(rest)}\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.emphasized\"\n />\n ) : (\n <BaseBox\n className=\"__blade-progress-bar-track\"\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.emphasized\"\n type={progressType}\n isIndeterminate={isIndeterminate}\n _oscillation={_oscillation}\n />\n </BaseBox>\n )}\n </BaseBox>\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst ProgressBar = React.forwardRef(_ProgressBar);\n\nexport type { ProgressBarProps, ProgressBarVariant };\nexport { ProgressBar };\n"],"names":["progressBarHeight","small","size","medium","large","_ProgressBar","_ref","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","_ref$_oscillation","_oscillation","testID","rest","_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","percentageValue","percentageProgressValue","parseFloat","toFixed","Math","floor","shouldShowPercentage","accessibilityProps","role","valueNow","valueText","valueMin","valueMax","undefined","_jsx","BaseBox","Object","assign","getStyledProps","metaAttribute","name","MetaConstants","ProgressBar","makeAnalyticsAttribute","children","_jsxs","display","flexDirection","width","justifyContent","Text","as","marginBottom","makeAccessible","CircularProgressBarFilled","progressPercent","backgroundColor","fillColor","pulseMotionDuration","fillMotionDuration","pulseMotionDelay","motionEasing","className","height","makeSize","overflow","position","ProgressBarFilled","progress","indeterminateMotionDuration","React","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,oBAAA,CAAA,OAAA,CAAA,MAAA,CAAA,iBAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,MAAA,CAAA,OAAA,CAAA,SAAA,CAAA,KAAA,CAAA,KAAA,CAAA,cAAA,CAAA,QAAA,CAAA,CA0HA,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,CAED,IAAMG,YAAY,CAAG,SAAfA,YAAYA,CAAAC,IAAA,CAiBhBC,GAAyB,CACR,CAAA,IAAAC,WAAA,CAAA,IAhBfC,kBAAkB,CAAAH,IAAA,CAAlBG,kBAAkB,CA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CT,gBAAgB,CAAC,YAAY,CAC7BC,YAAY,CAAC,mBAAmB,CAChC1F,IAAI,CAAEwB,YAAa,CACnBtB,eAAe,CAAEA,eAAgB,CACjCc,YAAY,CAAEA,YAAa,CAC5B,CAAC,CACK,CACV,CAAA,CACM,CAAC,CAAA,CACH,CAAC,CAAA,CACH,CAAC,CAEd,CAAC,CAEK,IAAAuD,WAAW,CAAG4B,cAAK,CAACC,UAAU,CAAC1G,YAAY;;;;"}
|
|
@@ -42,6 +42,7 @@ export { CollapsibleLink } from './Collapsible/CollapsibleLink.js';
|
|
|
42
42
|
export { CollapsibleButton } from './Collapsible/CollapsibleButton.js';
|
|
43
43
|
export { CollapsibleBody } from './Collapsible/CollapsibleBody.js';
|
|
44
44
|
export { Counter } from './Counter/Counter.js';
|
|
45
|
+
export { CounterInput } from './CounterInput/CounterInput.native.js';
|
|
45
46
|
export { Divider } from './Divider/Divider.js';
|
|
46
47
|
export { Drawer } from './Drawer/Drawer.native.js';
|
|
47
48
|
export { DrawerBody, DrawerHeader } from './Drawer/DrawerSubcomponents.native.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,14:14,15:15,16:16,18:18,20:20,24:24,28:28,30:30,31:31,32:32,33:33,36:36,40:40,44:44,48:48,52:52,56:56,60:60,64:64,66:66,72:72,80:80,82:82,100:100,120:120,132:132,140:140,160:160,172:172,176:176,196:196,192:192,198:198,200:200,208:208,240:240,245:245,250:250,256:256,264:264,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,14:14,15:15,16:16,18:18,20:20,24:24,26:26,28:28,30:30,31:31,32:32,33:33,34:34,36:36,38:38,40:40,44:44,46:46,48:48,50:50,52:52,56:56,60:60,64:64,66:66,72:72,78:78,80:80,82:82,84:84,86:86,90:90,94:94,96:96,100:100,114:114,120:120,122:122,124:124,132:132,140:140,160:160,172:172,176:176,196:196,192:192,198:198,200:200,208:208,240:240,245:245,250:250,256:256,264:264,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 /** 14 px */\n 14: 14,\n /** 15 px */\n 15: 15,\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 /** 30 px */\n 30: 30,\n /** 31 px */\n 31: 31,\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 /** 52 px */\n 52: 52,\n /** 56 px */\n 56: 56,\n /** 60 px */\n 60: 60,\n /** 64 px */\n 64: 64,\n /** 66 px */\n 66: 66,\n /** 72 px */\n 72: 72,\n /** 80 px */\n 80: 80,\n /** 82 px */\n 82: 82,\n /** 100 px */\n 100: 100,\n /** 120 px */\n 120: 120,\n /** 132 px */\n 132: 132,\n /** 140 px */\n 140: 140,\n /** 160 px */\n 160: 160,\n /** 172 px */\n 172: 172,\n /** 176 px */\n 176: 176,\n /** 196 px */\n 196: 196,\n /** 192 px */\n 192: 192,\n /** 198 px */\n 198: 198,\n /** 200 px */\n 200: 200,\n /** 208 px */\n 208: 208,\n /** 240 px */\n 240: 240,\n /** 245 px */\n 245: 245,\n /** 250 px */\n 250: 250,\n /** 256 px */\n 256: 256,\n /** 264 px */\n 264: 264,\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 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ER,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 /** 14 px */\n 14: 14,\n /** 15 px */\n 15: 15,\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 /** 26 px */\n 26: 26,\n /** 28 px */\n 28: 28,\n /** 30 px */\n 30: 30,\n /** 31 px */\n 31: 31,\n /** 32 px */\n 32: 32,\n /** 33 px */\n 33: 33,\n /** 34 px */\n 34: 34,\n /** 36 px */\n 36: 36,\n /** 38 px */\n 38: 38,\n /** 40 px */\n 40: 40,\n /** 44 px */\n 44: 44,\n /** 46 px */\n 46: 46,\n /** 48 px */\n 48: 48,\n /** 50 px */\n 50: 50,\n /** 52 px */\n 52: 52,\n /** 56 px */\n 56: 56,\n /** 60 px */\n 60: 60,\n /** 64 px */\n 64: 64,\n /** 66 px */\n 66: 66,\n /** 72 px */\n 72: 72,\n /** 78px */\n 78: 78,\n /** 80 px */\n 80: 80,\n /** 82 px */\n 82: 82,\n /** 84 px */\n 84: 84,\n /** 86 px */\n 86: 86,\n /** 90 px */\n 90: 90,\n /** 94 px */\n 94: 94,\n /** 96 px */\n 96: 96,\n /** 100 px */\n 100: 100,\n /** 114 px */\n 114: 114,\n /** 120 px */\n 120: 120,\n /** 122 px */\n 122: 122,\n /** 124 px */\n 124: 124,\n /** 132 px */\n 132: 132,\n /** 140 px */\n 140: 140,\n /** 160 px */\n 160: 160,\n /** 172 px */\n 172: 172,\n /** 176 px */\n 176: 176,\n /** 196 px */\n 196: 196,\n /** 192 px */\n 192: 192,\n /** 198 px */\n 198: 198,\n /** 200 px */\n 200: 200,\n /** 208 px */\n 208: 208,\n /** 240 px */\n 240: 240,\n /** 245 px */\n 245: 245,\n /** 250 px */\n 250: 250,\n /** 256 px */\n 256: 256,\n /** 264 px */\n 264: 264,\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,CAA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AER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,GAAG,CAAE,GAAG,CAER,IAAI,CAAE,IAAI,CAEV,IAAI,CAAE,IACR;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var MetaConstants={Accordion:'accordion',AccordionButton:'accordion-button',AccordionItem:'accordion-item',AccordionItemHeader:'accordion-item-header',AccordionItemBody:'accordion-item-body',ActionList:'action-list',ActionListItem:'action-list-item',ActionListSection:'action-list-section',Alert:'alert',Amount:'amount',AutoComplete:'autocomplete',Avatar:'avatar',AvatarGroup:'avatar-group',Badge:'badge',BaseFilterChip:'base-filter-chip',Box:'box',BaseBox:'base-box',BaseText:'base-text',Button:'button',ButtonGroup:'button-group',Breadcrumb:'breadcrumb',BreadcrumbItem:'breadcrumb-item',BottomNav:'bottomnav',BottomNavItem:'bottomnav-item',Carousel:'carousel',ChatMessage:'chat-message',Checkbox:'checkbox',CheckboxGroup:'checkbox-group',CheckboxLabel:'checkbox-label',Chip:'chip',ChipGroup:'chip-group',ChipLabel:'chip-label',Code:'code',Component:'blade-component',Counter:'counter',Display:'display',Divider:'divider',Drawer:'drawer',EmptyState:'empty-state',Dropdown:'dropdown',DropdownOverlay:'dropdown-overlay',DropdownFooter:'dropdown-footer',DropdownHeader:'dropdown-header',DatePicker:'datepicker',Calendar:'calendar',FileUpload:'file-upload',FileUploadItem:'file-upload-item',FileUploadLabel:'file-upload-label',FilterChipGroup:'filter-chip-group',Icon:'icon',IconButton:'icon-button',InfoGroup:'info-group',InfoItem:'info-item',InfoItemKey:'info-item-key',InfoItemValue:'info-item-value',InfoItemIcon:'info-item-icon',Indicator:'indicator',InputGroup:'input-group',Link:'link',List:'list',ListItem:'list-item',ListItemCode:'list-item-code',ListItemLink:'list-item-link',ListItemText:'list-item-text',ListView:'list-view',ListViewFilter:'list-view-filter',OTPInput:'otp-input',PasswordInput:'password-input',SearchInput:'search-input',TextArea:'textarea',TextInput:'textinput',PhoneNumberInput:'phone-number-input',Toast:'toast',ToastContainer:'toast-container',TopNav:'top-nav',TopNavBrand:'top-nav-brand',TopNavContent:'top-nav-content',TopNavActions:'top-nav-actions',TabNav:'tab-nav',TabNavItems:'tab-nav-items',TabNavItem:'tab-nav-item',TabNavItemLink:'tab-nav-item-link',ProgressBar:'progress-bar',Radio:'radio',RadioGroup:'radio-group',RadioLabel:'radio-label',SkipNav:'skipnav',Spinner:'spinner',SideNav:'sidenav',SelectInput:'select-input',Tag:'tag',Tooltip:'tooltip',TooltipInteractiveWrapper:'tooltip-interactive-wrapper',Tabs:'tabs',TabList:'tab-list',TabItem:'tab-item',TabPanel:'tab-panel',TabIndicator:'tab-indicator',Table:'table',TableBody:'table-body',TableRow:'table-row',TableCell:'table-cell',TableCellWrapper:'table-cell-wrapper',TableSortButton:'table-sort-button',TableHeader:'table-header',TableHeaderRow:'table-header-row',TableHeaderCell:'table-header-cell',TableFooter:'table-footer',TableFooterRow:'table-footer-row',TableFooterCell:'table-footer-cell',TableElement:'table-element',TablePageSelectionButton:'table-page-selection-button',TourPopover:'tour-popover',TourMask:'tour-mask',Popover:'popover',PopoverInteractiveWrapper:'popover-interactive-wrapper',BottomSheet:'bottom-sheet',BottomSheetBody:'bottom-sheet-body',BottomSheetHeader:'bottom-sheet-header',BottomSheetFooter:'bottom-sheet-footer',BottomSheetGrabHandle:'bottomsheet-grab-handle',Card:'card',CardBody:'card-body',CardHeader:'card-header',CardFooter:'card-footer',Collapsible:'collapsible',CollapsibleBody:'collapsible-body',CollapsibleButton:'collapsible-button',CollapsibleLink:'collapsible-link',Menu:'menu',MenuHeader:'menu-header',MenuFooter:'menu-footer',Modal:'modal',ModalBody:'modal-body',ModalHeader:'modal-header',ModalFooter:'modal-footer',ModalBackdrop:'modal-backdrop',ModalScrollOverlay:'modal-scroll-overlay',VisuallyHidden:'visually-hidden',FormLabel:'form-label',Switch:'switch',SwitchLabel:'switch-label',StyledBaseInput:'styled-base-input',Skeleton:'skeleton',StepGroup:'step-group',StepItem:'step-item',PreviewWindow:'preview-window',PreviewHeader:'preview-header',PreviewBody:'preview-body',PreviewFooter:'preview-footer',TimePicker:'time-picker'};
|
|
1
|
+
var MetaConstants={Accordion:'accordion',AccordionButton:'accordion-button',AccordionItem:'accordion-item',AccordionItemHeader:'accordion-item-header',AccordionItemBody:'accordion-item-body',ActionList:'action-list',ActionListItem:'action-list-item',ActionListSection:'action-list-section',Alert:'alert',Amount:'amount',AutoComplete:'autocomplete',Avatar:'avatar',AvatarGroup:'avatar-group',Badge:'badge',BaseFilterChip:'base-filter-chip',Box:'box',BaseBox:'base-box',BaseText:'base-text',Button:'button',ButtonGroup:'button-group',Breadcrumb:'breadcrumb',BreadcrumbItem:'breadcrumb-item',BottomNav:'bottomnav',BottomNavItem:'bottomnav-item',Carousel:'carousel',ChatMessage:'chat-message',Checkbox:'checkbox',CheckboxGroup:'checkbox-group',CheckboxLabel:'checkbox-label',Chip:'chip',ChipGroup:'chip-group',ChipLabel:'chip-label',Code:'code',Component:'blade-component',Counter:'counter',CounterInput:'counter-input',Display:'display',Divider:'divider',Drawer:'drawer',EmptyState:'empty-state',Dropdown:'dropdown',DropdownOverlay:'dropdown-overlay',DropdownFooter:'dropdown-footer',DropdownHeader:'dropdown-header',DatePicker:'datepicker',Calendar:'calendar',FileUpload:'file-upload',FileUploadItem:'file-upload-item',FileUploadLabel:'file-upload-label',FilterChipGroup:'filter-chip-group',Icon:'icon',IconButton:'icon-button',InfoGroup:'info-group',InfoItem:'info-item',InfoItemKey:'info-item-key',InfoItemValue:'info-item-value',InfoItemIcon:'info-item-icon',Indicator:'indicator',InputGroup:'input-group',Link:'link',List:'list',ListItem:'list-item',ListItemCode:'list-item-code',ListItemLink:'list-item-link',ListItemText:'list-item-text',ListView:'list-view',ListViewFilter:'list-view-filter',OTPInput:'otp-input',PasswordInput:'password-input',SearchInput:'search-input',TextArea:'textarea',TextInput:'textinput',PhoneNumberInput:'phone-number-input',Toast:'toast',ToastContainer:'toast-container',TopNav:'top-nav',TopNavBrand:'top-nav-brand',TopNavContent:'top-nav-content',TopNavActions:'top-nav-actions',TabNav:'tab-nav',TabNavItems:'tab-nav-items',TabNavItem:'tab-nav-item',TabNavItemLink:'tab-nav-item-link',ProgressBar:'progress-bar',Radio:'radio',RadioGroup:'radio-group',RadioLabel:'radio-label',SkipNav:'skipnav',Spinner:'spinner',SideNav:'sidenav',SelectInput:'select-input',Tag:'tag',Tooltip:'tooltip',TooltipInteractiveWrapper:'tooltip-interactive-wrapper',Tabs:'tabs',TabList:'tab-list',TabItem:'tab-item',TabPanel:'tab-panel',TabIndicator:'tab-indicator',Table:'table',TableBody:'table-body',TableRow:'table-row',TableCell:'table-cell',TableCellWrapper:'table-cell-wrapper',TableSortButton:'table-sort-button',TableHeader:'table-header',TableHeaderRow:'table-header-row',TableHeaderCell:'table-header-cell',TableFooter:'table-footer',TableFooterRow:'table-footer-row',TableFooterCell:'table-footer-cell',TableElement:'table-element',TablePageSelectionButton:'table-page-selection-button',TourPopover:'tour-popover',TourMask:'tour-mask',Popover:'popover',PopoverInteractiveWrapper:'popover-interactive-wrapper',BottomSheet:'bottom-sheet',BottomSheetBody:'bottom-sheet-body',BottomSheetHeader:'bottom-sheet-header',BottomSheetFooter:'bottom-sheet-footer',BottomSheetGrabHandle:'bottomsheet-grab-handle',Card:'card',CardBody:'card-body',CardHeader:'card-header',CardFooter:'card-footer',Collapsible:'collapsible',CollapsibleBody:'collapsible-body',CollapsibleButton:'collapsible-button',CollapsibleLink:'collapsible-link',Menu:'menu',MenuHeader:'menu-header',MenuFooter:'menu-footer',Modal:'modal',ModalBody:'modal-body',ModalHeader:'modal-header',ModalFooter:'modal-footer',ModalBackdrop:'modal-backdrop',ModalScrollOverlay:'modal-scroll-overlay',VisuallyHidden:'visually-hidden',FormLabel:'form-label',Switch:'switch',SwitchLabel:'switch-label',StyledBaseInput:'styled-base-input',Skeleton:'skeleton',StepGroup:'step-group',StepItem:'step-item',PreviewWindow:'preview-window',PreviewHeader:'preview-header',PreviewBody:'preview-body',PreviewFooter:'preview-footer',TimePicker:'time-picker'};
|
|
2
2
|
|
|
3
3
|
export { MetaConstants };
|
|
4
4
|
//# sourceMappingURL=metaConstants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metaConstants.js","sources":["../../../../../src/utils/metaAttribute/metaConstants.ts"],"sourcesContent":["export const MetaConstants = {\n Accordion: 'accordion',\n AccordionButton: 'accordion-button',\n AccordionItem: 'accordion-item',\n AccordionItemHeader: 'accordion-item-header',\n AccordionItemBody: 'accordion-item-body',\n ActionList: 'action-list',\n ActionListItem: 'action-list-item',\n ActionListSection: 'action-list-section',\n Alert: 'alert',\n Amount: 'amount',\n AutoComplete: 'autocomplete',\n Avatar: 'avatar',\n AvatarGroup: 'avatar-group',\n Badge: 'badge',\n BaseFilterChip: 'base-filter-chip',\n Box: 'box',\n BaseBox: 'base-box',\n BaseText: 'base-text',\n Button: 'button',\n ButtonGroup: 'button-group',\n Breadcrumb: 'breadcrumb',\n BreadcrumbItem: 'breadcrumb-item',\n BottomNav: 'bottomnav',\n BottomNavItem: 'bottomnav-item',\n Carousel: 'carousel',\n ChatMessage: 'chat-message',\n Checkbox: 'checkbox',\n CheckboxGroup: 'checkbox-group',\n CheckboxLabel: 'checkbox-label',\n Chip: 'chip',\n ChipGroup: 'chip-group',\n ChipLabel: 'chip-label',\n Code: 'code',\n Component: 'blade-component',\n Counter: 'counter',\n Display: 'display',\n Divider: 'divider',\n Drawer: 'drawer',\n EmptyState: 'empty-state',\n Dropdown: 'dropdown',\n DropdownOverlay: 'dropdown-overlay',\n DropdownFooter: 'dropdown-footer',\n DropdownHeader: 'dropdown-header',\n DatePicker: 'datepicker',\n Calendar: 'calendar',\n FileUpload: 'file-upload',\n FileUploadItem: 'file-upload-item',\n FileUploadLabel: 'file-upload-label',\n FilterChipGroup: 'filter-chip-group',\n Icon: 'icon',\n IconButton: 'icon-button',\n InfoGroup: 'info-group',\n InfoItem: 'info-item',\n InfoItemKey: 'info-item-key',\n InfoItemValue: 'info-item-value',\n InfoItemIcon: 'info-item-icon',\n Indicator: 'indicator',\n InputGroup: 'input-group',\n Link: 'link',\n List: 'list',\n ListItem: 'list-item',\n ListItemCode: 'list-item-code',\n ListItemLink: 'list-item-link',\n ListItemText: 'list-item-text',\n ListView: 'list-view',\n ListViewFilter: 'list-view-filter',\n OTPInput: 'otp-input',\n PasswordInput: 'password-input',\n SearchInput: 'search-input',\n TextArea: 'textarea',\n TextInput: 'textinput',\n PhoneNumberInput: 'phone-number-input',\n Toast: 'toast',\n ToastContainer: 'toast-container',\n TopNav: 'top-nav',\n TopNavBrand: 'top-nav-brand',\n TopNavContent: 'top-nav-content',\n TopNavActions: 'top-nav-actions',\n TabNav: 'tab-nav',\n TabNavItems: 'tab-nav-items',\n TabNavItem: 'tab-nav-item',\n TabNavItemLink: 'tab-nav-item-link',\n ProgressBar: 'progress-bar',\n Radio: 'radio',\n RadioGroup: 'radio-group',\n RadioLabel: 'radio-label',\n SkipNav: 'skipnav',\n Spinner: 'spinner',\n SideNav: 'sidenav',\n SelectInput: 'select-input',\n Tag: 'tag',\n Tooltip: 'tooltip',\n TooltipInteractiveWrapper: 'tooltip-interactive-wrapper',\n Tabs: 'tabs',\n TabList: 'tab-list',\n TabItem: 'tab-item',\n TabPanel: 'tab-panel',\n TabIndicator: 'tab-indicator',\n Table: 'table',\n TableBody: 'table-body',\n TableRow: 'table-row',\n TableCell: 'table-cell',\n TableCellWrapper: 'table-cell-wrapper',\n TableSortButton: 'table-sort-button',\n TableHeader: 'table-header',\n TableHeaderRow: 'table-header-row',\n TableHeaderCell: 'table-header-cell',\n TableFooter: 'table-footer',\n TableFooterRow: 'table-footer-row',\n TableFooterCell: 'table-footer-cell',\n TableElement: 'table-element',\n TablePageSelectionButton: 'table-page-selection-button',\n TourPopover: 'tour-popover',\n TourMask: 'tour-mask',\n Popover: 'popover',\n PopoverInteractiveWrapper: 'popover-interactive-wrapper',\n BottomSheet: 'bottom-sheet',\n BottomSheetBody: 'bottom-sheet-body',\n BottomSheetHeader: 'bottom-sheet-header',\n BottomSheetFooter: 'bottom-sheet-footer',\n BottomSheetGrabHandle: 'bottomsheet-grab-handle',\n Card: 'card',\n CardBody: 'card-body',\n CardHeader: 'card-header',\n CardFooter: 'card-footer',\n Collapsible: 'collapsible',\n CollapsibleBody: 'collapsible-body',\n CollapsibleButton: 'collapsible-button',\n CollapsibleLink: 'collapsible-link',\n Menu: 'menu',\n MenuHeader: 'menu-header',\n MenuFooter: 'menu-footer',\n Modal: 'modal',\n ModalBody: 'modal-body',\n ModalHeader: 'modal-header',\n ModalFooter: 'modal-footer',\n ModalBackdrop: 'modal-backdrop',\n ModalScrollOverlay: 'modal-scroll-overlay',\n VisuallyHidden: 'visually-hidden',\n FormLabel: 'form-label',\n Switch: 'switch',\n SwitchLabel: 'switch-label',\n StyledBaseInput: 'styled-base-input',\n Skeleton: 'skeleton',\n StepGroup: 'step-group',\n StepItem: 'step-item',\n PreviewWindow: 'preview-window',\n PreviewHeader: 'preview-header',\n PreviewBody: 'preview-body',\n PreviewFooter: 'preview-footer',\n TimePicker: 'time-picker',\n} as const;\n"],"names":["MetaConstants","Accordion","AccordionButton","AccordionItem","AccordionItemHeader","AccordionItemBody","ActionList","ActionListItem","ActionListSection","Alert","Amount","AutoComplete","Avatar","AvatarGroup","Badge","BaseFilterChip","Box","BaseBox","BaseText","Button","ButtonGroup","Breadcrumb","BreadcrumbItem","BottomNav","BottomNavItem","Carousel","ChatMessage","Checkbox","CheckboxGroup","CheckboxLabel","Chip","ChipGroup","ChipLabel","Code","Component","Counter","Display","Divider","Drawer","EmptyState","Dropdown","DropdownOverlay","DropdownFooter","DropdownHeader","DatePicker","Calendar","FileUpload","FileUploadItem","FileUploadLabel","FilterChipGroup","Icon","IconButton","InfoGroup","InfoItem","InfoItemKey","InfoItemValue","InfoItemIcon","Indicator","InputGroup","Link","List","ListItem","ListItemCode","ListItemLink","ListItemText","ListView","ListViewFilter","OTPInput","PasswordInput","SearchInput","TextArea","TextInput","PhoneNumberInput","Toast","ToastContainer","TopNav","TopNavBrand","TopNavContent","TopNavActions","TabNav","TabNavItems","TabNavItem","TabNavItemLink","ProgressBar","Radio","RadioGroup","RadioLabel","SkipNav","Spinner","SideNav","SelectInput","Tag","Tooltip","TooltipInteractiveWrapper","Tabs","TabList","TabItem","TabPanel","TabIndicator","Table","TableBody","TableRow","TableCell","TableCellWrapper","TableSortButton","TableHeader","TableHeaderRow","TableHeaderCell","TableFooter","TableFooterRow","TableFooterCell","TableElement","TablePageSelectionButton","TourPopover","TourMask","Popover","PopoverInteractiveWrapper","BottomSheet","BottomSheetBody","BottomSheetHeader","BottomSheetFooter","BottomSheetGrabHandle","Card","CardBody","CardHeader","CardFooter","Collapsible","CollapsibleBody","CollapsibleButton","CollapsibleLink","Menu","MenuHeader","MenuFooter","Modal","ModalBody","ModalHeader","ModalFooter","ModalBackdrop","ModalScrollOverlay","VisuallyHidden","FormLabel","Switch","SwitchLabel","StyledBaseInput","Skeleton","StepGroup","StepItem","PreviewWindow","PreviewHeader","PreviewBody","PreviewFooter","TimePicker"],"mappings":"AAAa,IAAAA,aAAa,CAAG,CAC3BC,SAAS,CAAE,WAAW,CACtBC,eAAe,CAAE,kBAAkB,CACnCC,aAAa,CAAE,gBAAgB,CAC/BC,mBAAmB,CAAE,uBAAuB,CAC5CC,iBAAiB,CAAE,qBAAqB,CACxCC,UAAU,CAAE,aAAa,CACzBC,cAAc,CAAE,kBAAkB,CAClCC,iBAAiB,CAAE,qBAAqB,CACxCC,KAAK,CAAE,OAAO,CACdC,MAAM,CAAE,QAAQ,CAChBC,YAAY,CAAE,cAAc,CAC5BC,MAAM,CAAE,QAAQ,CAChBC,WAAW,CAAE,cAAc,CAC3BC,KAAK,CAAE,OAAO,CACdC,cAAc,CAAE,kBAAkB,CAClCC,GAAG,CAAE,KAAK,CACVC,OAAO,CAAE,UAAU,CACnBC,QAAQ,CAAE,WAAW,CACrBC,MAAM,CAAE,Q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A6B,CACvDC,WAAW,CAAE,cAAc,CAC3BC,QAAQ,CAAE,WAAW,CACrBC,OAAO,CAAE,SAAS,CAClBC,yBAAyB,CAAE,6BAA6B,CACxDC,WAAW,CAAE,cAAc,CAC3BC,eAAe,CAAE,mBAAmB,CACpCC,iBAAiB,CAAE,qBAAqB,CACxCC,iBAAiB,CAAE,qBAAqB,CACxCC,qBAAqB,CAAE,yBAAyB,CAChDC,IAAI,CAAE,MAAM,CACZC,QAAQ,CAAE,WAAW,CACrBC,UAAU,CAAE,aAAa,CACzBC,UAAU,CAAE,aAAa,CACzBC,WAAW,CAAE,aAAa,CAC1BC,eAAe,CAAE,kBAAkB,CACnCC,iBAAiB,CAAE,oBAAoB,CACvCC,eAAe,CAAE,kBAAkB,CACnCC,IAAI,CAAE,MAAM,CACZC,UAAU,CAAE,aAAa,CACzBC,UAAU,CAAE,aAAa,CACzBC,KAAK,CAAE,OAAO,CACdC,SAAS,CAAE,YAAY,CACvBC,WAAW,CAAE,cAAc,CAC3BC,WAAW,CAAE,cAAc,CAC3BC,aAAa,CAAE,gBAAgB,CAC/BC,kBAAkB,CAAE,sBAAsB,CAC1CC,cAAc,CAAE,iBAAiB,CACjCC,SAAS,CAAE,YAAY,CACvBC,MAAM,CAAE,QAAQ,CAChBC,WAAW,CAAE,cAAc,CAC3BC,eAAe,CAAE,mBAAmB,CACpCC,QAAQ,CAAE,UAAU,CACpBC,SAAS,CAAE,YAAY,CACvBC,QAAQ,CAAE,WAAW,CACrBC,aAAa,CAAE,gBAAgB,CAC/BC,aAAa,CAAE,gBAAgB,CAC/BC,WAAW,CAAE,cAAc,CAC3BC,aAAa,CAAE,gBAAgB,CAC/BC,UAAU,CAAE,aACd;;;;"}
|
|
1
|
+
{"version":3,"file":"metaConstants.js","sources":["../../../../../src/utils/metaAttribute/metaConstants.ts"],"sourcesContent":["export const MetaConstants = {\n Accordion: 'accordion',\n AccordionButton: 'accordion-button',\n AccordionItem: 'accordion-item',\n AccordionItemHeader: 'accordion-item-header',\n AccordionItemBody: 'accordion-item-body',\n ActionList: 'action-list',\n ActionListItem: 'action-list-item',\n ActionListSection: 'action-list-section',\n Alert: 'alert',\n Amount: 'amount',\n AutoComplete: 'autocomplete',\n Avatar: 'avatar',\n AvatarGroup: 'avatar-group',\n Badge: 'badge',\n BaseFilterChip: 'base-filter-chip',\n Box: 'box',\n BaseBox: 'base-box',\n BaseText: 'base-text',\n Button: 'button',\n ButtonGroup: 'button-group',\n Breadcrumb: 'breadcrumb',\n BreadcrumbItem: 'breadcrumb-item',\n BottomNav: 'bottomnav',\n BottomNavItem: 'bottomnav-item',\n Carousel: 'carousel',\n ChatMessage: 'chat-message',\n Checkbox: 'checkbox',\n CheckboxGroup: 'checkbox-group',\n CheckboxLabel: 'checkbox-label',\n Chip: 'chip',\n ChipGroup: 'chip-group',\n ChipLabel: 'chip-label',\n Code: 'code',\n Component: 'blade-component',\n Counter: 'counter',\n CounterInput: 'counter-input',\n Display: 'display',\n Divider: 'divider',\n Drawer: 'drawer',\n EmptyState: 'empty-state',\n Dropdown: 'dropdown',\n DropdownOverlay: 'dropdown-overlay',\n DropdownFooter: 'dropdown-footer',\n DropdownHeader: 'dropdown-header',\n DatePicker: 'datepicker',\n Calendar: 'calendar',\n FileUpload: 'file-upload',\n FileUploadItem: 'file-upload-item',\n FileUploadLabel: 'file-upload-label',\n FilterChipGroup: 'filter-chip-group',\n Icon: 'icon',\n IconButton: 'icon-button',\n InfoGroup: 'info-group',\n InfoItem: 'info-item',\n InfoItemKey: 'info-item-key',\n InfoItemValue: 'info-item-value',\n InfoItemIcon: 'info-item-icon',\n Indicator: 'indicator',\n InputGroup: 'input-group',\n Link: 'link',\n List: 'list',\n ListItem: 'list-item',\n ListItemCode: 'list-item-code',\n ListItemLink: 'list-item-link',\n ListItemText: 'list-item-text',\n ListView: 'list-view',\n ListViewFilter: 'list-view-filter',\n OTPInput: 'otp-input',\n PasswordInput: 'password-input',\n SearchInput: 'search-input',\n TextArea: 'textarea',\n TextInput: 'textinput',\n PhoneNumberInput: 'phone-number-input',\n Toast: 'toast',\n ToastContainer: 'toast-container',\n TopNav: 'top-nav',\n TopNavBrand: 'top-nav-brand',\n TopNavContent: 'top-nav-content',\n TopNavActions: 'top-nav-actions',\n TabNav: 'tab-nav',\n TabNavItems: 'tab-nav-items',\n TabNavItem: 'tab-nav-item',\n TabNavItemLink: 'tab-nav-item-link',\n ProgressBar: 'progress-bar',\n Radio: 'radio',\n RadioGroup: 'radio-group',\n RadioLabel: 'radio-label',\n SkipNav: 'skipnav',\n Spinner: 'spinner',\n SideNav: 'sidenav',\n SelectInput: 'select-input',\n Tag: 'tag',\n Tooltip: 'tooltip',\n TooltipInteractiveWrapper: 'tooltip-interactive-wrapper',\n Tabs: 'tabs',\n TabList: 'tab-list',\n TabItem: 'tab-item',\n TabPanel: 'tab-panel',\n TabIndicator: 'tab-indicator',\n Table: 'table',\n TableBody: 'table-body',\n TableRow: 'table-row',\n TableCell: 'table-cell',\n TableCellWrapper: 'table-cell-wrapper',\n TableSortButton: 'table-sort-button',\n TableHeader: 'table-header',\n TableHeaderRow: 'table-header-row',\n TableHeaderCell: 'table-header-cell',\n TableFooter: 'table-footer',\n TableFooterRow: 'table-footer-row',\n TableFooterCell: 'table-footer-cell',\n TableElement: 'table-element',\n TablePageSelectionButton: 'table-page-selection-button',\n TourPopover: 'tour-popover',\n TourMask: 'tour-mask',\n Popover: 'popover',\n PopoverInteractiveWrapper: 'popover-interactive-wrapper',\n BottomSheet: 'bottom-sheet',\n BottomSheetBody: 'bottom-sheet-body',\n BottomSheetHeader: 'bottom-sheet-header',\n BottomSheetFooter: 'bottom-sheet-footer',\n BottomSheetGrabHandle: 'bottomsheet-grab-handle',\n Card: 'card',\n CardBody: 'card-body',\n CardHeader: 'card-header',\n CardFooter: 'card-footer',\n Collapsible: 'collapsible',\n CollapsibleBody: 'collapsible-body',\n CollapsibleButton: 'collapsible-button',\n CollapsibleLink: 'collapsible-link',\n Menu: 'menu',\n MenuHeader: 'menu-header',\n MenuFooter: 'menu-footer',\n Modal: 'modal',\n ModalBody: 'modal-body',\n ModalHeader: 'modal-header',\n ModalFooter: 'modal-footer',\n ModalBackdrop: 'modal-backdrop',\n ModalScrollOverlay: 'modal-scroll-overlay',\n VisuallyHidden: 'visually-hidden',\n FormLabel: 'form-label',\n Switch: 'switch',\n SwitchLabel: 'switch-label',\n StyledBaseInput: 'styled-base-input',\n Skeleton: 'skeleton',\n StepGroup: 'step-group',\n StepItem: 'step-item',\n PreviewWindow: 'preview-window',\n PreviewHeader: 'preview-header',\n PreviewBody: 'preview-body',\n PreviewFooter: 'preview-footer',\n TimePicker: 'time-picker',\n} as const;\n"],"names":["MetaConstants","Accordion","AccordionButton","AccordionItem","AccordionItemHeader","AccordionItemBody","ActionList","ActionListItem","ActionListSection","Alert","Amount","AutoComplete","Avatar","AvatarGroup","Badge","BaseFilterChip","Box","BaseBox","BaseText","Button","ButtonGroup","Breadcrumb","BreadcrumbItem","BottomNav","BottomNavItem","Carousel","ChatMessage","Checkbox","CheckboxGroup","CheckboxLabel","Chip","ChipGroup","ChipLabel","Code","Component","Counter","CounterInput","Display","Divider","Drawer","EmptyState","Dropdown","DropdownOverlay","DropdownFooter","DropdownHeader","DatePicker","Calendar","FileUpload","FileUploadItem","FileUploadLabel","FilterChipGroup","Icon","IconButton","InfoGroup","InfoItem","InfoItemKey","InfoItemValue","InfoItemIcon","Indicator","InputGroup","Link","List","ListItem","ListItemCode","ListItemLink","ListItemText","ListView","ListViewFilter","OTPInput","PasswordInput","SearchInput","TextArea","TextInput","PhoneNumberInput","Toast","ToastContainer","TopNav","TopNavBrand","TopNavContent","TopNavActions","TabNav","TabNavItems","TabNavItem","TabNavItemLink","ProgressBar","Radio","RadioGroup","RadioLabel","SkipNav","Spinner","SideNav","SelectInput","Tag","Tooltip","TooltipInteractiveWrapper","Tabs","TabList","TabItem","TabPanel","TabIndicator","Table","TableBody","TableRow","TableCell","TableCellWrapper","TableSortButton","TableHeader","TableHeaderRow","TableHeaderCell","TableFooter","TableFooterRow","TableFooterCell","TableElement","TablePageSelectionButton","TourPopover","TourMask","Popover","PopoverInteractiveWrapper","BottomSheet","BottomSheetBody","BottomSheetHeader","BottomSheetFooter","BottomSheetGrabHandle","Card","CardBody","CardHeader","CardFooter","Collapsible","CollapsibleBody","CollapsibleButton","CollapsibleLink","Menu","MenuHeader","MenuFooter","Modal","ModalBody","ModalHeader","ModalFooter","ModalBackdrop","ModalScrollOverlay","VisuallyHidden","FormLabel","Switch","SwitchLabel","StyledBaseInput","Skeleton","StepGroup","StepItem","PreviewWindow","PreviewHeader","PreviewBody","PreviewFooter","TimePicker"],"mappings":"AAAa,IAAAA,aAAa,CAAG,CAC3BC,SAAS,CAAE,WAAW,CACtBC,eAAe,CAAE,kBAAkB,CACnCC,aAAa,CAAE,gBAAgB,CAC/BC,mBAAmB,CAAE,uBAAuB,CAC5CC,iBAAiB,CAAE,qBAAqB,CACxCC,UAAU,CAAE,aAAa,CACzBC,cAAc,CAAE,kBAAkB,CAClCC,iBAAiB,CAAE,qBAAqB,CACxCC,KAAK,CAAE,OAAO,CACdC,MAAM,CAAE,QAAQ,CAChBC,YAAY,CAAE,cAAc,CAC5BC,MAAM,CAAE,QAAQ,CAChBC,WAAW,CAAE,cAAc,CAC3BC,KAAK,CAAE,OAAO,CACdC,cAAc,CAAE,kBAAkB,CAClCC,GAAG,CAAE,KAAK,CACVC,OAAO,CAAE,UAAU,CACnBC,QAAQ,CAAE,WAAW,CACrBC,MAAM,CAAE,QAAQ,CAChBC,WAAW,CAAE,cAAc,CAC3BC,UAAU,CAAE,YAAY,CACxBC,cAAc,CAAE,iBAAiB,CACjCC,SAAS,CAAE,WAAW,CACtBC,aAAa,CAAE,gBAAgB,CAC/BC,QAAQ,CAAE,UAAU,CACpBC,WAAW,CAAE,cAAc,CAC3BC,QAAQ,CAAE,UAAU,CACpBC,aAAa,CAAE,gBAAgB,CAC/BC,aAAa,CAAE,gBAAgB,CAC/BC,IAAI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C,IAAI,CAAE,MAAM,CACZC,QAAQ,CAAE,WAAW,CACrBC,UAAU,CAAE,aAAa,CACzBC,UAAU,CAAE,aAAa,CACzBC,WAAW,CAAE,aAAa,CAC1BC,eAAe,CAAE,kBAAkB,CACnCC,iBAAiB,CAAE,oBAAoB,CACvCC,eAAe,CAAE,kBAAkB,CACnCC,IAAI,CAAE,MAAM,CACZC,UAAU,CAAE,aAAa,CACzBC,UAAU,CAAE,aAAa,CACzBC,KAAK,CAAE,OAAO,CACdC,SAAS,CAAE,YAAY,CACvBC,WAAW,CAAE,cAAc,CAC3BC,WAAW,CAAE,cAAc,CAC3BC,aAAa,CAAE,gBAAgB,CAC/BC,kBAAkB,CAAE,sBAAsB,CAC1CC,cAAc,CAAE,iBAAiB,CACjCC,SAAS,CAAE,YAAY,CACvBC,MAAM,CAAE,QAAQ,CAChBC,WAAW,CAAE,cAAc,CAC3BC,eAAe,CAAE,mBAAmB,CACpCC,QAAQ,CAAE,UAAU,CACpBC,SAAS,CAAE,YAAY,CACvBC,QAAQ,CAAE,WAAW,CACrBC,aAAa,CAAE,gBAAgB,CAC/BC,aAAa,CAAE,gBAAgB,CAC/BC,WAAW,CAAE,cAAc,CAC3BC,aAAa,CAAE,gBAAgB,CAC/BC,UAAU,CAAE,aACd;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propsTypes.js","sources":["../../../../../../../../src/components/Box/BaseBox/types/propsTypes.ts"],"sourcesContent":["import type { View } from 'react-native';\nimport type { CSSObject } from 'styled-components';\nimport type { MarginProps, PaddingProps, SpacingValueType } from './spacingTypes';\nimport type { MakeObjectResponsive } from './responsiveTypes';\nimport type { Theme } from '~components/BladeProvider';\nimport type { Border, Elevation } from '~tokens/global';\nimport type { DataAnalyticsAttribute, PickCSSByPlatform, TestID } from '~utils/types';\nimport type { Platform } from '~utils';\nimport type { BladeCommonEvents } from '~components/types';\nimport type { DotNotationToken } from '~utils/lodashButBetter/get';\n\ntype LayoutProps = MakeObjectResponsive<\n {\n height: SpacingValueType;\n minHeight: SpacingValueType;\n maxHeight: SpacingValueType;\n width: SpacingValueType;\n minWidth: SpacingValueType;\n maxWidth: SpacingValueType;\n } & PickCSSByPlatform<\n 'display' | 'overflow' | 'overflowX' | 'overflowY' | 'textAlign' | 'whiteSpace'\n >\n>;\n\ntype FlexboxProps = MakeObjectResponsive<\n {\n /**\n * This uses the native gap property which might not work on older browsers.\n * If you want to support older browsers, you might want to use `margin` instead.\n *\n * @see https://caniuse.com/?search=gap\n */\n gap: SpacingValueType;\n /**\n * This uses the native row-gap property which might not work on older browsers.\n * If you want to support older browsers, you might want to use `margin` instead.\n *\n * @see https://caniuse.com/?search=row-gap\n */\n rowGap: SpacingValueType;\n /**\n * This uses the native column-gap property which might not work on older browsers.\n * If you want to support older browsers, you might want to use `margin` instead.\n *\n * @see https://caniuse.com/?search=column-gap\n */\n columnGap: SpacingValueType;\n /**\n * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container.\n *\n * @see https://developer.mozilla.org/docs/Web/CSS/flex\n */\n flex: string | number;\n } & PickCSSByPlatform<\n | 'flexWrap'\n | 'flexDirection'\n | 'flexGrow'\n | 'flexShrink'\n | 'flexBasis'\n | 'alignItems'\n | 'alignContent'\n | 'alignSelf'\n | 'justifyItems'\n | 'justifyContent'\n | 'justifySelf'\n | 'placeSelf'\n | 'placeItems'\n | 'order'\n >\n>;\n\ntype PositionProps = MakeObjectResponsive<\n {\n top: SpacingValueType;\n right: SpacingValueType;\n bottom: SpacingValueType;\n left: SpacingValueType;\n } & PickCSSByPlatform<'position' | 'zIndex'>\n>;\n\ntype GridProps = MakeObjectResponsive<\n PickCSSByPlatform<\n | 'grid'\n | 'gridColumn'\n | 'gridRow'\n | 'gridRowStart'\n | 'gridRowEnd'\n | 'gridColumnStart'\n | 'gridColumnEnd'\n | 'gridArea'\n | 'gridAutoFlow'\n | 'gridAutoRows'\n | 'gridAutoColumns'\n | 'gridTemplate'\n | 'gridTemplateAreas'\n | 'gridTemplateColumns'\n | 'gridTemplateRows'\n >\n>;\n\ntype ColorObjects = 'feedback' | 'surface' | 'interactive';\ntype BorderOnlyColorObjects = 'popup';\ntype BackgroundOnlyColorObjects = 'popup' | 'overlay';\ntype BackgroundColorString<\n T extends ColorObjects | BackgroundOnlyColorObjects\n> = `${T}.background.${DotNotationToken<Theme['colors'][T]['background']>}`;\ntype BorderColorString<\n T extends ColorObjects | BorderOnlyColorObjects\n> = `${T}.border.${DotNotationToken<Theme['colors'][T]['border']>}`;\n\n// Created this as an array so I can reuse it for runtime validation\nconst validBoxAsValues = [\n 'div',\n 'section',\n 'footer',\n 'header',\n 'main',\n 'aside',\n 'nav',\n 'span',\n 'label',\n] as const;\n\ntype BoxAsType = typeof validBoxAsValues[number];\n\n// Visual props that are common for both Box and BaseBox\ntype CommonBoxVisualProps = MakeObjectResponsive<\n {\n borderRadius: keyof Border['radius'];\n borderWidth: keyof Border['width'];\n borderColor: BorderColorString<'surface'> | BorderColorString<'popup'>;\n borderTopWidth: keyof Border['width'];\n borderTopColor: BorderColorString<'surface'>;\n borderRightWidth: keyof Border['width'];\n borderRightColor: BorderColorString<'surface'>;\n borderBottomWidth: keyof Border['width'];\n borderBottomColor: BorderColorString<'surface'>;\n borderLeftWidth: keyof Border['width'];\n borderLeftColor: BorderColorString<'surface'>;\n borderTopLeftRadius: keyof Border['radius'];\n borderTopRightRadius: keyof Border['radius'];\n borderBottomRightRadius: keyof Border['radius'];\n borderBottomLeftRadius: keyof Border['radius'];\n } & PickCSSByPlatform<\n | 'backgroundImage'\n | 'backgroundSize'\n | 'backgroundPosition'\n | 'backgroundOrigin'\n | 'backgroundRepeat'\n | 'pointerEvents'\n | 'opacity'\n | 'visibility'\n | 'transform'\n | 'transformOrigin'\n | 'clipPath'\n | 'borderStyle'\n | 'borderTopStyle'\n | 'borderBottomStyle'\n | 'borderLeftStyle'\n | 'borderRightStyle'\n | 'backdropFilter'\n | 'transition'\n > & {\n /**\n * Sets the elevation for Box\n *\n * eg: `theme.elevation.midRaised`\n *\n * @default `theme.elevation.lowRaised`\n *\n * **Links:**\n * - Docs: https://blade.razorpay.com/?path=/docs/tokens-elevation--docs\n */\n elevation?: keyof Elevation;\n }\n>;\n\n// Visual props that are specific BaseBox\n// This is used to ensure some of the more flexible BaseBox props are not passed to Box\ntype BaseBoxVisualProps = MakeObjectResponsive<\n {\n backgroundColor:\n | BackgroundColorString<'feedback'>\n | BackgroundColorString<'surface'>\n | BackgroundColorString<'interactive'>\n | BackgroundColorString<'overlay'>\n | BackgroundColorString<'popup'>\n | 'transparent'\n | (string & Record<never, never>);\n lineHeight: SpacingValueType;\n touchAction: CSSObject['touchAction'];\n userSelect: CSSObject['userSelect'];\n } & PickCSSByPlatform<\n | 'border'\n | 'borderLeft'\n | 'borderRight'\n | 'borderTop'\n | 'borderBottom'\n | 'opacity'\n | 'pointerEvents'\n | 'cursor'\n >\n>;\n\n// Visual props that are specific to Box\ntype BoxVisualProps = MakeObjectResponsive<{\n backgroundColor:\n | BackgroundColorString<'surface'>\n | BackgroundColorString<'overlay'>\n | BackgroundColorString<'feedback'>\n | 'transparent';\n}> & {\n // Intentionally keeping this outside of MakeObjectResponsive since we only want as to be string and not responsive object\n // styled-components do not support passing `as` prop as an object\n as: BoxAsType;\n};\n\ntype StyledPropsBlade = Partial<\n Omit<\n MarginProps &\n Pick<FlexboxProps, 'alignSelf' | 'justifySelf' | 'placeSelf' | 'order' | 'flexWrap'> &\n PositionProps &\n Pick<\n GridProps,\n | 'gridColumn'\n | 'gridRow'\n | 'gridRowStart'\n | 'gridRowEnd'\n | 'gridColumnStart'\n | 'gridColumnEnd'\n | 'gridArea'\n > &\n Pick<LayoutProps, 'display'> &\n Pick<CommonBoxVisualProps, 'visibility'>,\n '__brand__'\n >\n>;\n\ntype BoxCallbackProps = Omit<\n Platform.Select<{\n web: {\n /**\n * **Warning**\n *\n * Make sure to not use Box when you want to create a trigger that performs action on hover.\n * You would probably want to render it as `button` using `styled.button` instead.\n *\n * Use this for hoverable containers in cases like custom menus.\n */\n onMouseOver: React.MouseEventHandler<HTMLElement>;\n /**\n * **Warning**\n *\n * Make sure to not use Box when you want to create a trigger that performs action on hover.\n * You would probably want to render it as `button` using `styled.button` instead.\n *\n * Use this for hoverable containers in cases like custom menus.\n */\n onMouseEnter: React.MouseEventHandler<HTMLElement>;\n /**\n * **Warning**\n *\n * Make sure to not use Box when you want to create a trigger that performs action on hover.\n * You would probably want to render it as `button` using `styled.button` instead.\n *\n * Use this for hoverable containers in cases like custom menus.\n */\n onMouseLeave: React.MouseEventHandler<HTMLElement>;\n onScroll: React.UIEventHandler<HTMLElement>;\n };\n native: Record<'onMouseOver' | 'onMouseEnter' | 'onMouseLeave' | 'onScroll', undefined>;\n }>,\n '__brand__'\n>;\n\ntype BoxDragAndDropProps = Omit<\n Platform.Select<{\n web: {\n draggable: boolean;\n onDragStart: React.DragEventHandler<HTMLElement>;\n onDragEnter: React.DragEventHandler<HTMLElement>;\n onDragLeave: React.DragEventHandler<HTMLElement>;\n onDragOver: React.DragEventHandler<HTMLElement>;\n onDragEnd: React.DragEventHandler<HTMLElement>;\n onDrop: React.DragEventHandler<HTMLElement>;\n };\n native: Record<\n | 'draggable'\n | 'onDragStart'\n | 'onDragEnter'\n | 'onDragLeave'\n | 'onDragOver'\n | 'onDragEnd'\n | 'onDrop',\n undefined\n >;\n }>,\n '__brand__'\n>;\n\ntype BoxProps = Partial<\n PaddingProps &\n MarginProps &\n LayoutProps &\n FlexboxProps &\n PositionProps &\n GridProps &\n BoxCallbackProps &\n BoxDragAndDropProps &\n CommonBoxVisualProps &\n BoxVisualProps & {\n children?: React.ReactNode | React.ReactNode[];\n tabIndex?: number;\n id?: string;\n } & TestID &\n DataAnalyticsAttribute\n>;\n\n// Visual props have different types for BaseBox and Box. BaseBox has more flexible types and more props exposed.\n// So first we Omit Visual props of Box\n// Then we append BaseBoxVisualProps and some other props for styled-components like class and id\ntype BaseBoxProps = Omit<BoxProps, keyof BoxVisualProps> &\n Partial<\n DataAnalyticsAttribute &\n BaseBoxVisualProps & {\n className?: string;\n id?: string;\n tabIndex?: number;\n }\n > &\n BladeCommonEvents;\n\n// ref prop type\ntype BoxRefType = Platform.Select<{\n web: Omit<HTMLElement, 'style'>;\n native: View;\n}>;\n\nexport type { BaseBoxProps, BoxProps, BoxRefType, StyledPropsBlade, FlexboxProps, GridProps };\nexport { validBoxAsValues };\n"],"names":["validBoxAsValues"],"mappings":"AA8GA;AACMA,IAAAA,gBAAgB,GAAG,CACvB,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,OAAO,EACP,KAAK,EACL,MAAM,EACN,OAAO;;;;"}
|
|
1
|
+
{"version":3,"file":"propsTypes.js","sources":["../../../../../../../../src/components/Box/BaseBox/types/propsTypes.ts"],"sourcesContent":["import type { View } from 'react-native';\nimport type { CSSObject } from 'styled-components';\nimport type { MarginProps, PaddingProps, SpacingValueType } from './spacingTypes';\nimport type { MakeObjectResponsive } from './responsiveTypes';\nimport type { Theme } from '~components/BladeProvider';\nimport type { Border, Elevation } from '~tokens/global';\nimport type { DataAnalyticsAttribute, PickCSSByPlatform, TestID } from '~utils/types';\nimport type { Platform } from '~utils';\nimport type { BladeCommonEvents } from '~components/types';\nimport type { DotNotationToken } from '~utils/lodashButBetter/get';\n\ntype LayoutProps = MakeObjectResponsive<\n {\n height: SpacingValueType;\n minHeight: SpacingValueType;\n maxHeight: SpacingValueType;\n width: SpacingValueType;\n minWidth: SpacingValueType;\n maxWidth: SpacingValueType;\n } & PickCSSByPlatform<\n 'display' | 'overflow' | 'overflowX' | 'overflowY' | 'textAlign' | 'whiteSpace'\n >\n>;\n\ntype FlexboxProps = MakeObjectResponsive<\n {\n /**\n * This uses the native gap property which might not work on older browsers.\n * If you want to support older browsers, you might want to use `margin` instead.\n *\n * @see https://caniuse.com/?search=gap\n */\n gap: SpacingValueType;\n /**\n * This uses the native row-gap property which might not work on older browsers.\n * If you want to support older browsers, you might want to use `margin` instead.\n *\n * @see https://caniuse.com/?search=row-gap\n */\n rowGap: SpacingValueType;\n /**\n * This uses the native column-gap property which might not work on older browsers.\n * If you want to support older browsers, you might want to use `margin` instead.\n *\n * @see https://caniuse.com/?search=column-gap\n */\n columnGap: SpacingValueType;\n /**\n * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container.\n *\n * @see https://developer.mozilla.org/docs/Web/CSS/flex\n */\n flex: string | number;\n } & PickCSSByPlatform<\n | 'flexWrap'\n | 'flexDirection'\n | 'flexGrow'\n | 'flexShrink'\n | 'flexBasis'\n | 'alignItems'\n | 'alignContent'\n | 'alignSelf'\n | 'justifyItems'\n | 'justifyContent'\n | 'justifySelf'\n | 'placeSelf'\n | 'placeItems'\n | 'order'\n >\n>;\n\ntype PositionProps = MakeObjectResponsive<\n {\n top: SpacingValueType;\n right: SpacingValueType;\n bottom: SpacingValueType;\n left: SpacingValueType;\n } & PickCSSByPlatform<'position' | 'zIndex'>\n>;\n\ntype GridProps = MakeObjectResponsive<\n PickCSSByPlatform<\n | 'grid'\n | 'gridColumn'\n | 'gridRow'\n | 'gridRowStart'\n | 'gridRowEnd'\n | 'gridColumnStart'\n | 'gridColumnEnd'\n | 'gridArea'\n | 'gridAutoFlow'\n | 'gridAutoRows'\n | 'gridAutoColumns'\n | 'gridTemplate'\n | 'gridTemplateAreas'\n | 'gridTemplateColumns'\n | 'gridTemplateRows'\n >\n>;\n\ntype ColorObjects = 'feedback' | 'surface' | 'interactive';\ntype BorderOnlyColorObjects = 'popup';\ntype BackgroundOnlyColorObjects = 'popup' | 'overlay';\ntype BackgroundColorString<\n T extends ColorObjects | BackgroundOnlyColorObjects\n> = `${T}.background.${DotNotationToken<Theme['colors'][T]['background']>}`;\ntype BorderColorString<\n T extends ColorObjects | BorderOnlyColorObjects\n> = `${T}.border.${DotNotationToken<Theme['colors'][T]['border']>}`;\n\n// Created this as an array so I can reuse it for runtime validation\nconst validBoxAsValues = [\n 'div',\n 'section',\n 'footer',\n 'header',\n 'main',\n 'aside',\n 'nav',\n 'span',\n 'label',\n] as const;\n\ntype BoxAsType = typeof validBoxAsValues[number];\n\n// Visual props that are common for both Box and BaseBox\ntype CommonBoxVisualProps = MakeObjectResponsive<\n {\n borderRadius: keyof Border['radius'];\n borderWidth: keyof Border['width'];\n borderColor:\n | BorderColorString<'surface'>\n | BorderColorString<'popup'>\n | BorderColorString<'interactive'>;\n borderTopWidth: keyof Border['width'];\n borderTopColor: BorderColorString<'surface'>;\n borderRightWidth: keyof Border['width'];\n borderRightColor: BorderColorString<'surface'>;\n borderBottomWidth: keyof Border['width'];\n borderBottomColor: BorderColorString<'surface'>;\n borderLeftWidth: keyof Border['width'];\n borderLeftColor: BorderColorString<'surface'>;\n borderTopLeftRadius: keyof Border['radius'];\n borderTopRightRadius: keyof Border['radius'];\n borderBottomRightRadius: keyof Border['radius'];\n borderBottomLeftRadius: keyof Border['radius'];\n } & PickCSSByPlatform<\n | 'backgroundImage'\n | 'backgroundSize'\n | 'backgroundPosition'\n | 'backgroundOrigin'\n | 'backgroundRepeat'\n | 'pointerEvents'\n | 'opacity'\n | 'visibility'\n | 'transform'\n | 'transformOrigin'\n | 'clipPath'\n | 'borderStyle'\n | 'borderTopStyle'\n | 'borderBottomStyle'\n | 'borderLeftStyle'\n | 'borderRightStyle'\n | 'backdropFilter'\n | 'transition'\n > & {\n /**\n * Sets the elevation for Box\n *\n * eg: `theme.elevation.midRaised`\n *\n * @default `theme.elevation.lowRaised`\n *\n * **Links:**\n * - Docs: https://blade.razorpay.com/?path=/docs/tokens-elevation--docs\n */\n elevation?: keyof Elevation;\n }\n>;\n\n// Visual props that are specific BaseBox\n// This is used to ensure some of the more flexible BaseBox props are not passed to Box\ntype BaseBoxVisualProps = MakeObjectResponsive<\n {\n backgroundColor:\n | BackgroundColorString<'feedback'>\n | BackgroundColorString<'surface'>\n | BackgroundColorString<'interactive'>\n | BackgroundColorString<'overlay'>\n | BackgroundColorString<'popup'>\n | 'transparent'\n | (string & Record<never, never>);\n lineHeight: SpacingValueType;\n touchAction: CSSObject['touchAction'];\n userSelect: CSSObject['userSelect'];\n } & PickCSSByPlatform<\n | 'border'\n | 'borderLeft'\n | 'borderRight'\n | 'borderTop'\n | 'borderBottom'\n | 'opacity'\n | 'pointerEvents'\n | 'cursor'\n >\n>;\n\n// Visual props that are specific to Box\ntype BoxVisualProps = MakeObjectResponsive<{\n backgroundColor:\n | BackgroundColorString<'surface'>\n | BackgroundColorString<'overlay'>\n | BackgroundColorString<'feedback'>\n | 'transparent';\n}> & {\n // Intentionally keeping this outside of MakeObjectResponsive since we only want as to be string and not responsive object\n // styled-components do not support passing `as` prop as an object\n as: BoxAsType;\n};\n\ntype StyledPropsBlade = Partial<\n Omit<\n MarginProps &\n Pick<FlexboxProps, 'alignSelf' | 'justifySelf' | 'placeSelf' | 'order' | 'flexWrap'> &\n PositionProps &\n Pick<\n GridProps,\n | 'gridColumn'\n | 'gridRow'\n | 'gridRowStart'\n | 'gridRowEnd'\n | 'gridColumnStart'\n | 'gridColumnEnd'\n | 'gridArea'\n > &\n Pick<LayoutProps, 'display'> &\n Pick<CommonBoxVisualProps, 'visibility'>,\n '__brand__'\n >\n>;\n\ntype BoxCallbackProps = Omit<\n Platform.Select<{\n web: {\n /**\n * **Warning**\n *\n * Make sure to not use Box when you want to create a trigger that performs action on hover.\n * You would probably want to render it as `button` using `styled.button` instead.\n *\n * Use this for hoverable containers in cases like custom menus.\n */\n onMouseOver: React.MouseEventHandler<HTMLElement>;\n /**\n * **Warning**\n *\n * Make sure to not use Box when you want to create a trigger that performs action on hover.\n * You would probably want to render it as `button` using `styled.button` instead.\n *\n * Use this for hoverable containers in cases like custom menus.\n */\n onMouseEnter: React.MouseEventHandler<HTMLElement>;\n /**\n * **Warning**\n *\n * Make sure to not use Box when you want to create a trigger that performs action on hover.\n * You would probably want to render it as `button` using `styled.button` instead.\n *\n * Use this for hoverable containers in cases like custom menus.\n */\n onMouseLeave: React.MouseEventHandler<HTMLElement>;\n onScroll: React.UIEventHandler<HTMLElement>;\n };\n native: Record<'onMouseOver' | 'onMouseEnter' | 'onMouseLeave' | 'onScroll', undefined>;\n }>,\n '__brand__'\n>;\n\ntype BoxDragAndDropProps = Omit<\n Platform.Select<{\n web: {\n draggable: boolean;\n onDragStart: React.DragEventHandler<HTMLElement>;\n onDragEnter: React.DragEventHandler<HTMLElement>;\n onDragLeave: React.DragEventHandler<HTMLElement>;\n onDragOver: React.DragEventHandler<HTMLElement>;\n onDragEnd: React.DragEventHandler<HTMLElement>;\n onDrop: React.DragEventHandler<HTMLElement>;\n };\n native: Record<\n | 'draggable'\n | 'onDragStart'\n | 'onDragEnter'\n | 'onDragLeave'\n | 'onDragOver'\n | 'onDragEnd'\n | 'onDrop',\n undefined\n >;\n }>,\n '__brand__'\n>;\n\ntype BoxProps = Partial<\n PaddingProps &\n MarginProps &\n LayoutProps &\n FlexboxProps &\n PositionProps &\n GridProps &\n BoxCallbackProps &\n BoxDragAndDropProps &\n CommonBoxVisualProps &\n BoxVisualProps & {\n children?: React.ReactNode | React.ReactNode[];\n tabIndex?: number;\n id?: string;\n } & TestID &\n DataAnalyticsAttribute\n>;\n\n// Visual props have different types for BaseBox and Box. BaseBox has more flexible types and more props exposed.\n// So first we Omit Visual props of Box\n// Then we append BaseBoxVisualProps and some other props for styled-components like class and id\ntype BaseBoxProps = Omit<BoxProps, keyof BoxVisualProps> &\n Partial<\n DataAnalyticsAttribute &\n BaseBoxVisualProps & {\n className?: string;\n id?: string;\n tabIndex?: number;\n }\n > &\n BladeCommonEvents;\n\n// ref prop type\ntype BoxRefType = Platform.Select<{\n web: Omit<HTMLElement, 'style'>;\n native: View;\n}>;\n\nexport type { BaseBoxProps, BoxProps, BoxRefType, StyledPropsBlade, FlexboxProps, GridProps };\nexport { validBoxAsValues };\n"],"names":["validBoxAsValues"],"mappings":"AA8GA;AACMA,IAAAA,gBAAgB,GAAG,CACvB,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,OAAO,EACP,KAAK,EACL,MAAM,EACN,OAAO;;;;"}
|