@razorpay/blade 12.97.1 → 12.98.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/native/components/ActionList/ActionListItem.js +1 -0
- package/build/lib/native/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionListNoResults.js +1 -0
- package/build/lib/native/components/ActionList/ActionListNoResults.js.map +1 -1
- package/build/lib/native/components/Alert/Alert.js +1 -0
- package/build/lib/native/components/Alert/Alert.js.map +1 -1
- package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js +1 -0
- package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
- package/build/lib/native/components/BottomSheet/BottomSheetCommon.js +1 -0
- package/build/lib/native/components/BottomSheet/BottomSheetCommon.js.map +1 -1
- package/build/lib/native/components/Carousel/NavigationButton/NavigationButton.js +1 -0
- package/build/lib/native/components/Carousel/NavigationButton/NavigationButton.js.map +1 -1
- package/build/lib/native/components/Collapsible/CollapsibleChevronIcon.native.js +1 -0
- package/build/lib/native/components/Collapsible/CollapsibleChevronIcon.native.js.map +1 -1
- package/build/lib/native/components/FileUpload/FileUploadItem.js +1 -0
- package/build/lib/native/components/FileUpload/FileUploadItem.js.map +1 -1
- package/build/lib/native/components/Form/FormHint.js +1 -0
- package/build/lib/native/components/Form/FormHint.js.map +1 -1
- package/build/lib/native/components/Icons/ReticleIcon/ReticleIcon.js +13 -0
- package/build/lib/native/components/Icons/ReticleIcon/ReticleIcon.js.map +1 -0
- package/build/lib/native/components/Input/DropdownInputTriggers/Chevron.js +1 -0
- package/build/lib/native/components/Input/DropdownInputTriggers/Chevron.js.map +1 -1
- package/build/lib/native/components/Input/PasswordInput/PasswordInput.js +1 -0
- package/build/lib/native/components/Input/PasswordInput/PasswordInput.js.map +1 -1
- package/build/lib/native/components/Input/SearchInput/SearchInput.js +1 -0
- package/build/lib/native/components/Input/SearchInput/SearchInput.js.map +1 -1
- package/build/lib/native/components/Input/TextArea/TextArea.js +1 -0
- package/build/lib/native/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/native/components/Input/TextInput/TextInput.js +1 -0
- package/build/lib/native/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/native/components/Popover/PopoverCloseButton.js +1 -0
- package/build/lib/native/components/Popover/PopoverCloseButton.js.map +1 -1
- package/build/lib/native/components/QuickFilters/QuickFilter.js +1 -0
- package/build/lib/native/components/QuickFilters/QuickFilter.js.map +1 -1
- package/build/lib/native/components/Table/tokens.js +1 -0
- package/build/lib/native/components/Table/tokens.js.map +1 -1
- package/build/lib/native/components/Tag/Tag.js +1 -0
- package/build/lib/native/components/Tag/Tag.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/web/development/_virtual/cloneDeep.js +1 -1
- package/build/lib/web/development/_virtual/cloneDeep3.js +1 -1
- package/build/lib/web/development/components/ActionList/ActionListBox.web.js +45 -21
- package/build/lib/web/development/components/ActionList/ActionListBox.web.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/InputDropdownButton.web.js +4 -2
- package/build/lib/web/development/components/Dropdown/InputDropdownButton.web.js.map +1 -1
- package/build/lib/web/development/components/Icons/ReticleIcon/ReticleIcon.js +42 -0
- package/build/lib/web/development/components/Icons/ReticleIcon/ReticleIcon.js.map +1 -0
- package/build/lib/web/development/components/Icons/ReticleIcon/index.js +2 -0
- package/build/lib/web/development/components/Icons/ReticleIcon/index.js.map +1 -0
- package/build/lib/web/development/components/Icons/index.js +1 -0
- package/build/lib/web/development/components/Icons/index.js.map +1 -1
- package/build/lib/web/development/components/Input/PhoneNumberInput/CountrySelector.web.js +3 -2
- package/build/lib/web/development/components/Input/PhoneNumberInput/CountrySelector.web.js.map +1 -1
- package/build/lib/web/development/components/index.js +1 -0
- package/build/lib/web/development/components/index.js.map +1 -1
- package/build/lib/web/development/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +1 -1
- package/build/lib/web/development/node_modules/es-toolkit/dist/compat/predicate/matches.js +2 -2
- package/build/lib/web/development/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js +2 -2
- package/build/lib/web/development/node_modules/es-toolkit/dist/object/cloneDeep.js +1 -1
- package/build/lib/web/production/_virtual/cloneDeep.js +1 -1
- package/build/lib/web/production/_virtual/cloneDeep3.js +1 -1
- package/build/lib/web/production/components/ActionList/ActionListBox.web.js +45 -21
- package/build/lib/web/production/components/ActionList/ActionListBox.web.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/InputDropdownButton.web.js +4 -2
- package/build/lib/web/production/components/Dropdown/InputDropdownButton.web.js.map +1 -1
- package/build/lib/web/production/components/Icons/ReticleIcon/ReticleIcon.js +42 -0
- package/build/lib/web/production/components/Icons/ReticleIcon/ReticleIcon.js.map +1 -0
- package/build/lib/web/production/components/Icons/ReticleIcon/index.js +2 -0
- package/build/lib/web/production/components/Icons/ReticleIcon/index.js.map +1 -0
- package/build/lib/web/production/components/Icons/index.js +1 -0
- package/build/lib/web/production/components/Icons/index.js.map +1 -1
- package/build/lib/web/production/components/Input/PhoneNumberInput/CountrySelector.web.js +3 -2
- package/build/lib/web/production/components/Input/PhoneNumberInput/CountrySelector.web.js.map +1 -1
- package/build/lib/web/production/components/index.js +1 -0
- package/build/lib/web/production/components/index.js.map +1 -1
- package/build/lib/web/production/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +1 -1
- package/build/lib/web/production/node_modules/es-toolkit/dist/compat/predicate/matches.js +2 -2
- package/build/lib/web/production/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js +2 -2
- package/build/lib/web/production/node_modules/es-toolkit/dist/object/cloneDeep.js +1 -1
- package/build/types/components/index.d.ts +10 -2
- package/build/types/components/index.native.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.js","sources":["../../../../../../src/components/Input/TextInput/TextInput.tsx"],"sourcesContent":["import React, { useEffect, useState, useRef } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport type { TextInput as TextInputReactNative } from 'react-native';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport { getKeyboardAndAutocompleteProps } from '../BaseInput/utils';\nimport type { TaggedInputProps } from '../BaseInput/useTaggedInput';\nimport { useTaggedInput } from '../BaseInput/useTaggedInput';\nimport { useFormattedInput } from './useFormattedInput';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport type { IconComponent } from '~components/Icons';\nimport { CloseIcon } from '~components/Icons';\nimport { IconButton } from '~components/Button/IconButton';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { CharacterCounter } from '~components/Form/CharacterCounter';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type {\n BladeElementRef,\n BladeElementRefWithValue,\n ContainerElementType,\n DataAnalyticsAttribute,\n} from '~utils/types';\nimport { hintMarginTop } from '~components/Form/formTokens';\nimport { Divider } from '~components/Divider';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { DropdownOverlay } from '~components/Dropdown';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport type { FormInputOnEvent } from '~components/Form/FormTypes';\nimport { isIconComponent } from '~utils/isIconComponent';\nimport { useDatePickerContext } from '~components/DatePicker/DatePickerContext';\n\n// Users should use PasswordInput for input type password\ntype Type = Exclude<BaseInputProps['type'], 'password'>;\n\ntype TextInputCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'labelSuffix'\n | 'labelTrailing'\n | 'necessityIndicator'\n | 'validationState'\n | 'helpText'\n | 'errorText'\n | 'successText'\n | 'placeholder'\n | 'defaultValue'\n | 'name'\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'value'\n | 'isDisabled'\n | 'isRequired'\n | 'prefix'\n | 'suffix'\n | 'maxCharacters'\n | 'autoFocus'\n | 'keyboardReturnKeyType'\n | 'autoCompleteSuggestionType'\n | 'onSubmit'\n | 'autoCapitalize'\n | 'testID'\n | 'onClick'\n | 'size'\n | 'leadingIcon'\n | 'trailingButton'\n | 'trailingIcon'\n | 'textAlign'\n | 'popupId'\n | 'isPopupExpanded'\n | 'hasPopup'\n | 'componentName'\n | 'onKeyDown'\n | keyof DataAnalyticsAttribute\n> & {\n /**\n * Decides whether to render a clear icon button\n */\n showClearButton?: boolean;\n\n /**\n * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`\n */\n onClearButtonClick?: () => void;\n\n /**\n * Decides whether to show a loading spinner for the input field.\n */\n isLoading?: boolean;\n\n /**\n * Icon that will be rendered at the beginning of the input field\n * @deprecated Use `leading` instead. This prop will be removed in the next major version.\n */\n icon?: IconComponent;\n /**\n * Type of Input Field to be rendered. Use `PasswordInput` for type `password`\n *\n *\n * **Note on number type**\n *\n * `type=\"number\"` internally uses `inputMode=\"numeric\"` instead of HTML's `type=\"number\"` which also allows text characters.\n * If you have a usecase where you only want to support number input, you can handle it on validations end.\n *\n * Check out [Why the GOV.UK Design System team changed the input type for numbers](https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/) for reasoning\n *\n * @default text\n */\n type?: Type;\n /**\n *\n * Icon or React Element to be rendered at the end of the input field\n */\n trailing?: React.ReactElement | IconComponent;\n /**\n * Icon or React Element to be rendered at the beginning of the input field\n */\n leading?: React.ReactElement | IconComponent;\n /**\n * Format pattern where # represents input characters and other symbols act as delimiters\n * When provided, input will be automatically formatted and onChange will include rawValue\n *\n * **Note:**\n * 1. Format pattern should only contain # symbols and special characters as delimiters.\n * Alphanumeric characters (letters and numbers) are not allowed in the format pattern.\n * 2. When format is provided, user input is restricted to alphanumeric characters only.\n * Special characters and symbols will be filtered out automatically from user input.\n *\n * @example \"#### #### #### ####\" for card numbers\n * @example \"##/##\" for expiry dates\n * @example \"(###) ###-####\" for phone numbers\n */\n format?:\n | '#### #### #### ####'\n | '##/##'\n | '##/##/####'\n | '(###) ###-####'\n | '###-##-####'\n | '##:##'\n | '##:##:##'\n | '#### #### ####'\n | '###.###.###.###'\n | '## ## ####'\n | '##-###-##'\n // eslint-disable-next-line @typescript-eslint/ban-types\n | (string & {});\n} & TaggedInputProps &\n StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype TextInputPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype TextInputPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\ntype TextInputProps = (TextInputPropsWithA11yLabel | TextInputPropsWithLabel) &\n TextInputCommonProps;\n\n// need to do this to tell TS to infer type as TextInput of React Native and make it believe that `ref.current.clear()` exists\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isReactNative = (_textInputRef: any): _textInputRef is TextInputReactNative => {\n return getPlatformType() === 'react-native';\n};\n\nconst _TextInput: React.ForwardRefRenderFunction<BladeElementRef, TextInputProps> = (\n {\n label,\n accessibilityLabel,\n labelPosition = 'top',\n placeholder,\n type = 'text',\n defaultValue,\n name,\n value,\n maxCharacters,\n format,\n onChange,\n onClick,\n onFocus,\n onBlur,\n onSubmit,\n isDisabled,\n necessityIndicator,\n validationState,\n errorText,\n helpText,\n successText,\n isRequired,\n icon,\n prefix,\n showClearButton,\n onClearButtonClick,\n isLoading,\n suffix,\n autoFocus,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n testID,\n size = 'medium',\n leadingIcon,\n trailingIcon,\n isTaggedInput,\n tags,\n onTagChange,\n trailing,\n leading,\n labelSuffix,\n labelTrailing,\n onKeyDown,\n ...rest\n },\n ref,\n): ReactElement => {\n const textInputRef = React.useRef<BladeElementRefWithValue>(null);\n const mergedRef = useMergeRefs(ref, textInputRef);\n const [shouldShowClearButton, setShouldShowClearButton] = useState(false);\n const [isInputFocussed, setIsInputFocussed] = useState(autoFocus ?? false);\n const context = useDatePickerContext();\n const isDatePickerBodyOpen = context?.isDatePickerBodyOpen;\n\n if (__DEV__) {\n if (format) {\n const hasAlphanumeric = /[a-zA-Z0-9]/.test(format);\n if (hasAlphanumeric) {\n throw new Error(\n `[Blade: TextInput] Invalid format \"${format}\". Only # and special characters allowed, no letters/numbers.`,\n );\n }\n }\n }\n\n const formattingResult = useFormattedInput({\n format,\n onChange,\n value,\n defaultValue,\n });\n\n const inputValue = format ? formattingResult.formattedValue : value;\n const effectiveMaxCharacters = format ? formattingResult.maxLength : maxCharacters;\n\n const handleOnChange: FormInputOnEvent = React.useCallback(\n ({ name, value: inputValue }) => {\n if (format) {\n formattingResult.handleChange({ name, value: inputValue });\n } else {\n onChange?.({ name, value: inputValue });\n }\n },\n [format, formattingResult.handleChange, onChange],\n );\n\n const {\n activeTagIndex,\n setActiveTagIndex,\n getTags,\n handleTaggedInputKeydown,\n handleTaggedInputChange,\n handleTagsClear,\n } = useTaggedInput({\n isTaggedInput,\n tags,\n onTagChange,\n isDisabled,\n onChange: handleOnChange,\n name,\n value: inputValue,\n inputRef: textInputRef,\n });\n const [isTrailingDropDownOpen, setIsTrailingDropDownOpen] = React.useState(false);\n const [isLeadingDropDownOpen, setIsLeadingDropDownOpen] = React.useState(false);\n const textInputWrapperRef = useRef<ContainerElementType | null>(null);\n\n useEffect(() => {\n if (\n (isTrailingDropDownOpen && isLeadingDropDownOpen) ||\n (isDatePickerBodyOpen && isLeadingDropDownOpen)\n ) {\n setIsLeadingDropDownOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isTrailingDropDownOpen, isDatePickerBodyOpen]);\n\n useEffect(() => {\n if (isLeadingDropDownOpen && isTrailingDropDownOpen) {\n setIsTrailingDropDownOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isLeadingDropDownOpen]);\n\n const leadingDropDown =\n leading && getComponentId(leading as React.ReactElement) === 'Dropdown' ? leading : null;\n\n const trailingDropdown =\n trailing && getComponentId(trailing as React.ReactElement) === 'Dropdown' ? trailing : null;\n // we need to look into name of component and check if it 's and icon or a dropdown\n const _leadingIcon: IconComponent | undefined = isIconComponent(leading)\n ? (leading as IconComponent)\n : undefined;\n\n const _trailingIcon: IconComponent | undefined = isIconComponent(trailing)\n ? (trailing as IconComponent)\n : undefined;\n const hasLeadingInteractionElement = !_leadingIcon && !leadingDropDown && leading;\n\n const hasTrailingInteractionElement = !_trailingIcon && !trailingDropdown && trailing;\n\n const renderDropdown = (\n dropdown: React.ReactElement,\n isOpen: boolean,\n setIsOpen: (isOpen: boolean) => void,\n defaultPlacement: 'bottom-start' | 'bottom-end',\n ): React.ReactElement | null => {\n if (!dropdown) {\n return null;\n }\n return React.cloneElement(dropdown, {\n selectionType: 'single',\n isOpen,\n height: '100%',\n onOpenChange: (isOpen: boolean) => {\n setIsOpen(isOpen);\n },\n children: React.Children.map(dropdown.props.children, (child) => {\n if (child.type === DropdownOverlay) {\n return React.cloneElement(child, {\n referenceRef: textInputWrapperRef,\n _isNestedDropdown: true,\n defaultPlacement,\n });\n }\n // Pass size to InputDropdownButton\n if (getComponentId(child) === dropdownComponentIds.triggers.InputDropdownButton) {\n return React.cloneElement(child, {\n size,\n });\n }\n return child;\n }),\n });\n };\n\n const renderLeadingDropDown = renderDropdown(\n leadingDropDown as React.ReactElement,\n isLeadingDropDownOpen,\n setIsLeadingDropDownOpen,\n 'bottom-start',\n );\n const renderTrailingDropDown = renderDropdown(\n trailingDropdown as React.ReactElement,\n isTrailingDropDownOpen,\n setIsTrailingDropDownOpen,\n 'bottom-end',\n );\n\n React.useEffect(() => {\n setShouldShowClearButton(Boolean(showClearButton && (defaultValue ?? inputValue)));\n }, [showClearButton, defaultValue, inputValue]);\n\n const renderClearButton = (): React.ReactElement => {\n return (\n <IconButton\n size=\"medium\"\n icon={CloseIcon}\n onClick={() => {\n if (isEmpty(inputValue) && textInputRef.current) {\n // when the input field is uncontrolled take the ref and clear the input and then call the onClearButtonClick function\n if (isReactNative(textInputRef.current)) {\n textInputRef.current.clear();\n textInputRef.current.focus();\n } else if (textInputRef.current instanceof HTMLInputElement) {\n textInputRef.current.value = '';\n textInputRef.current.focus();\n }\n }\n handleTagsClear();\n // if the input field is controlled just call the click handler and the value change shall be left upto the consumer\n onClearButtonClick?.();\n textInputRef?.current?.focus();\n setShouldShowClearButton(false);\n }}\n isDisabled={isDisabled}\n accessibilityLabel=\"Clear Input Content\"\n />\n );\n };\n const hasTrailingDropDown = Boolean(trailingDropdown);\n\n const renderInteractionElement = (): ReactNode => {\n if (isLoading) {\n return <Spinner accessibilityLabel=\"Loading Content\" color=\"primary\" />;\n }\n\n if (shouldShowClearButton && hasTrailingDropDown) {\n return (\n <BaseBox display=\"flex\" gap=\"spacing.3\">\n {renderClearButton()} <Divider orientation=\"vertical\" />\n </BaseBox>\n );\n }\n\n if (showClearButton && hasTrailingInteractionElement) {\n return (\n <BaseBox display=\"flex\" gap=\"spacing.3\">\n {renderClearButton()} <Divider orientation=\"vertical\" /> {trailing as React.ReactElement}\n </BaseBox>\n );\n }\n\n if (shouldShowClearButton) {\n return renderClearButton();\n }\n\n if (hasTrailingInteractionElement) {\n return trailing as React.ReactElement;\n }\n return null;\n };\n return (\n <BaseInput\n id=\"textinput\"\n componentName={MetaConstants.TextInput}\n ref={mergedRef}\n setInputWrapperRef={(wrapperNode) => {\n textInputWrapperRef.current = wrapperNode;\n }}\n label={label as string}\n labelSuffix={labelSuffix}\n labelTrailing={labelTrailing}\n accessibilityLabel={accessibilityLabel}\n hideLabelText={!Boolean(label)}\n labelPosition={labelPosition}\n placeholder={placeholder}\n // CONTROLLED/UNCONTROLLED INPUT LOGIC:\n // For inputs WITHOUT format:\n // - Use standard React controlled/uncontrolled logic\n // - Controlled: user provides `value` prop → use `value` prop\n // - Uncontrolled: user provides `defaultValue` prop → use `defaultValue` prop\n //\n // For inputs WITH format:\n // - Formatting requires controlled mode to re-render and show formatted values\n // - Case 1: Only `value` provided → defaultValue: undefined, value: formattedValue (normal controlled)\n // - Case 2: Only `defaultValue` provided → defaultValue: undefined, value: formattedValue (convert to controlled)\n // - Case 3: Both `value` and `defaultValue` provided → defaultValue: defaultValue, value: formattedValue (let BaseInput detect conflict and throw error)\n //\n defaultValue={\n format\n ? value !== undefined && defaultValue !== undefined\n ? defaultValue\n : undefined\n : defaultValue\n }\n value={format ? inputValue : value}\n name={name}\n maxCharacters={effectiveMaxCharacters}\n isDropdownTrigger={isTaggedInput}\n tags={isTaggedInput ? getTags({ size }) : undefined}\n showAllTags={isInputFocussed}\n maxTagRows=\"single\"\n activeTagIndex={activeTagIndex}\n setActiveTagIndex={setActiveTagIndex}\n leadingDropDown={renderLeadingDropDown}\n trailingDropDown={renderTrailingDropDown}\n leadingInteractionElement={\n hasLeadingInteractionElement ? (leading as React.ReactElement) : null\n }\n onChange={({ name, value }: { name?: string; value?: string }) => {\n if (showClearButton && value?.length) {\n // show the clear button when the user starts typing in\n setShouldShowClearButton(true);\n }\n\n if (shouldShowClearButton && !value?.length) {\n // hide the clear button when the input field is empty\n setShouldShowClearButton(false);\n }\n\n handleTaggedInputChange({ name, value });\n handleOnChange({ name, value });\n }}\n onClick={onClick}\n onFocus={(e) => {\n setIsInputFocussed(true);\n onFocus?.(e);\n }}\n onBlur={(e) => {\n setIsInputFocussed(false);\n onBlur?.(e);\n }}\n onKeyDown={(e) => {\n handleTaggedInputKeydown(e);\n onKeyDown?.(e);\n if (format) {\n formattingResult.handleKeyDown(e.event);\n }\n }}\n onSubmit={onSubmit}\n isDisabled={isDisabled}\n necessityIndicator={necessityIndicator}\n isRequired={isRequired}\n leadingIcon={_leadingIcon ?? leadingIcon ?? icon}\n prefix={prefix}\n trailingInteractionElement={renderInteractionElement()}\n trailingIcon={_trailingIcon ?? trailingIcon}\n suffix={suffix}\n validationState={validationState}\n errorText={errorText}\n helpText={helpText}\n successText={successText}\n trailingFooterSlot={(value) => {\n return format ? null : effectiveMaxCharacters ? (\n <BaseBox marginTop={hintMarginTop[size]} marginRight=\"spacing.1\">\n <CharacterCounter\n currentCount={value?.length ?? 0}\n maxCount={effectiveMaxCharacters}\n size={size}\n />\n </BaseBox>\n ) : null;\n }}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n testID={testID}\n {...getKeyboardAndAutocompleteProps({\n type,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n })}\n size={size}\n {...rest}\n />\n );\n};\n\nconst TextInput = assignWithoutSideEffects(React.forwardRef(_TextInput), {\n displayName: 'TextInput',\n});\n\nexport type { TextInputProps };\nexport { TextInput };\n"],"names":["isReactNative","_textInputRef","getPlatformType","_TextInput","_ref","ref","_ref4","label","accessibilityLabel","_ref$labelPosition","labelPosition","placeholder","_ref$type","type","defaultValue","name","value","maxCharacters","format","onChange","onClick","onFocus","onBlur","onSubmit","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","icon","prefix","showClearButton","onClearButtonClick","isLoading","suffix","autoFocus","keyboardReturnKeyType","autoCompleteSuggestionType","autoCapitalize","testID","_ref$size","size","leadingIcon","trailingIcon","isTaggedInput","tags","onTagChange","trailing","leading","labelSuffix","labelTrailing","onKeyDown","rest","_objectWithoutProperties","_excluded","textInputRef","React","useRef","mergedRef","useMergeRefs","_useState","useState","_useState2","_slicedToArray","shouldShowClearButton","setShouldShowClearButton","_useState3","_useState4","isInputFocussed","setIsInputFocussed","context","useDatePickerContext","isDatePickerBodyOpen","__DEV__","hasAlphanumeric","test","Error","formattingResult","useFormattedInput","inputValue","formattedValue","effectiveMaxCharacters","maxLength","handleOnChange","useCallback","_ref2","handleChange","_useTaggedInput","useTaggedInput","inputRef","activeTagIndex","setActiveTagIndex","getTags","handleTaggedInputKeydown","handleTaggedInputChange","handleTagsClear","_React$useState","_React$useState2","isTrailingDropDownOpen","setIsTrailingDropDownOpen","_React$useState3","_React$useState4","isLeadingDropDownOpen","setIsLeadingDropDownOpen","textInputWrapperRef","useEffect","leadingDropDown","getComponentId","trailingDropdown","_leadingIcon","isIconComponent","undefined","_trailingIcon","hasLeadingInteractionElement","hasTrailingInteractionElement","renderDropdown","dropdown","isOpen","setIsOpen","defaultPlacement","cloneElement","selectionType","height","onOpenChange","children","Children","map","props","child","DropdownOverlay","referenceRef","_isNestedDropdown","dropdownComponentIds","triggers","InputDropdownButton","renderLeadingDropDown","renderTrailingDropDown","Boolean","renderClearButton","_jsx","IconButton","CloseIcon","_textInputRef$current","isEmpty","current","clear","focus","HTMLInputElement","hasTrailingDropDown","renderInteractionElement","Spinner","color","_jsxs","BaseBox","display","gap","Divider","orientation","BaseInput","Object","assign","id","componentName","MetaConstants","TextInput","setInputWrapperRef","wrapperNode","hideLabelText","isDropdownTrigger","showAllTags","maxTagRows","trailingDropDown","leadingInteractionElement","_ref3","length","e","handleKeyDown","event","trailingInteractionElement","trailingFooterSlot","_value$length","marginTop","hintMarginTop","marginRight","CharacterCounter","currentCount","maxCount","getKeyboardAndAutocompleteProps","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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A,CAAAA,aAAa,CAAIrE,YAAa,CAC5CT,MAAM,CAAEA,MAAO,CACfV,eAAe,CAAEA,eAAgB,CACjCC,SAAS,CAAEA,SAAU,CACrBC,QAAQ,CAAEA,QAAS,CACnBC,WAAW,CAAEA,WAAY,CACzBwJ,kBAAkB,CAAE,SAApBA,kBAAkBA,CAAGrK,KAAK,CAAK,KAAAsK,aAAA,CAC7B,OAAOpK,MAAM,CAAG,IAAI,CAAGiE,sBAAsB,CAC3C0D,GAAA,CAACc,OAAO,CAAA,CAAC4B,SAAS,CAAEC,aAAa,CAAC7I,IAAI,CAAE,CAAC8I,WAAW,CAAC,WAAW,CAAA3D,QAAA,CAC9De,GAAA,CAAC6C,gBAAgB,EACfC,YAAY,CAAA,CAAAL,aAAA,CAAEtK,KAAK,EAAA,IAAA,CAAA,KAAA,CAAA,CAALA,KAAK,CAAEgK,MAAM,GAAA,IAAA,CAAAM,aAAA,CAAI,CAAE,CACjCM,QAAQ,CAAEzG,sBAAuB,CACjCxC,IAAI,CAAEA,IAAK,CACZ,CAAC,CACK,CAAC,CACR,IAAI,CACV,CAAE,CAEFN,SAAS,CAAEA,SAAU,CACrBI,MAAM,CAAEA,MAAO,CACXoJ,CAAAA,+BAA+B,CAAC,CAClChL,IAAI,CAAJA,IAAI,CACJyB,qBAAqB,CAArBA,qBAAqB,CACrBC,0BAA0B,CAA1BA,0BAA0B,CAC1BC,cAAc,CAAdA,cACF,CAAC,CAAC,CAAA,CACFG,IAAI,CAAEA,IAAK,CACPW,CAAAA,IAAI,CACT,CAAC,CAEN,CAAC,CAEK,IAAAgH,SAAS,CAAGwB,wBAAwB,CAACpI,cAAK,CAACqI,UAAU,CAAC5L,UAAU,CAAC,CAAE,CACvE6L,WAAW,CAAE,WACf,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"TextInput.js","sources":["../../../../../../src/components/Input/TextInput/TextInput.tsx"],"sourcesContent":["import React, { useEffect, useState, useRef } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport type { TextInput as TextInputReactNative } from 'react-native';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport { getKeyboardAndAutocompleteProps } from '../BaseInput/utils';\nimport type { TaggedInputProps } from '../BaseInput/useTaggedInput';\nimport { useTaggedInput } from '../BaseInput/useTaggedInput';\nimport { useFormattedInput } from './useFormattedInput';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport type { IconComponent } from '~components/Icons';\nimport { CloseIcon } from '~components/Icons';\nimport { IconButton } from '~components/Button/IconButton';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { CharacterCounter } from '~components/Form/CharacterCounter';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type {\n BladeElementRef,\n BladeElementRefWithValue,\n ContainerElementType,\n DataAnalyticsAttribute,\n} from '~utils/types';\nimport { hintMarginTop } from '~components/Form/formTokens';\nimport { Divider } from '~components/Divider';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { DropdownOverlay } from '~components/Dropdown';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport type { FormInputOnEvent } from '~components/Form/FormTypes';\nimport { isIconComponent } from '~utils/isIconComponent';\nimport { useDatePickerContext } from '~components/DatePicker/DatePickerContext';\n\n// Users should use PasswordInput for input type password\ntype Type = Exclude<BaseInputProps['type'], 'password'>;\n\ntype TextInputCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'labelSuffix'\n | 'labelTrailing'\n | 'necessityIndicator'\n | 'validationState'\n | 'helpText'\n | 'errorText'\n | 'successText'\n | 'placeholder'\n | 'defaultValue'\n | 'name'\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'value'\n | 'isDisabled'\n | 'isRequired'\n | 'prefix'\n | 'suffix'\n | 'maxCharacters'\n | 'autoFocus'\n | 'keyboardReturnKeyType'\n | 'autoCompleteSuggestionType'\n | 'onSubmit'\n | 'autoCapitalize'\n | 'testID'\n | 'onClick'\n | 'size'\n | 'leadingIcon'\n | 'trailingButton'\n | 'trailingIcon'\n | 'textAlign'\n | 'popupId'\n | 'isPopupExpanded'\n | 'hasPopup'\n | 'componentName'\n | 'onKeyDown'\n | keyof DataAnalyticsAttribute\n> & {\n /**\n * Decides whether to render a clear icon button\n */\n showClearButton?: boolean;\n\n /**\n * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`\n */\n onClearButtonClick?: () => void;\n\n /**\n * Decides whether to show a loading spinner for the input field.\n */\n isLoading?: boolean;\n\n /**\n * Icon that will be rendered at the beginning of the input field\n * @deprecated Use `leading` instead. This prop will be removed in the next major version.\n */\n icon?: IconComponent;\n /**\n * Type of Input Field to be rendered. Use `PasswordInput` for type `password`\n *\n *\n * **Note on number type**\n *\n * `type=\"number\"` internally uses `inputMode=\"numeric\"` instead of HTML's `type=\"number\"` which also allows text characters.\n * If you have a usecase where you only want to support number input, you can handle it on validations end.\n *\n * Check out [Why the GOV.UK Design System team changed the input type for numbers](https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/) for reasoning\n *\n * @default text\n */\n type?: Type;\n /**\n *\n * Icon or React Element to be rendered at the end of the input field\n */\n trailing?: React.ReactElement | IconComponent;\n /**\n * Icon or React Element to be rendered at the beginning of the input field\n */\n leading?: React.ReactElement | IconComponent;\n /**\n * Format pattern where # represents input characters and other symbols act as delimiters\n * When provided, input will be automatically formatted and onChange will include rawValue\n *\n * **Note:**\n * 1. Format pattern should only contain # symbols and special characters as delimiters.\n * Alphanumeric characters (letters and numbers) are not allowed in the format pattern.\n * 2. When format is provided, user input is restricted to alphanumeric characters only.\n * Special characters and symbols will be filtered out automatically from user input.\n *\n * @example \"#### #### #### ####\" for card numbers\n * @example \"##/##\" for expiry dates\n * @example \"(###) ###-####\" for phone numbers\n */\n format?:\n | '#### #### #### ####'\n | '##/##'\n | '##/##/####'\n | '(###) ###-####'\n | '###-##-####'\n | '##:##'\n | '##:##:##'\n | '#### #### ####'\n | '###.###.###.###'\n | '## ## ####'\n | '##-###-##'\n // eslint-disable-next-line @typescript-eslint/ban-types\n | (string & {});\n} & TaggedInputProps &\n StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype TextInputPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype TextInputPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\ntype TextInputProps = (TextInputPropsWithA11yLabel | TextInputPropsWithLabel) &\n TextInputCommonProps;\n\n// need to do this to tell TS to infer type as TextInput of React Native and make it believe that `ref.current.clear()` exists\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isReactNative = (_textInputRef: any): _textInputRef is TextInputReactNative => {\n return getPlatformType() === 'react-native';\n};\n\nconst _TextInput: React.ForwardRefRenderFunction<BladeElementRef, TextInputProps> = (\n {\n label,\n accessibilityLabel,\n labelPosition = 'top',\n placeholder,\n type = 'text',\n defaultValue,\n name,\n value,\n maxCharacters,\n format,\n onChange,\n onClick,\n onFocus,\n onBlur,\n onSubmit,\n isDisabled,\n necessityIndicator,\n validationState,\n errorText,\n helpText,\n successText,\n isRequired,\n icon,\n prefix,\n showClearButton,\n onClearButtonClick,\n isLoading,\n suffix,\n autoFocus,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n testID,\n size = 'medium',\n leadingIcon,\n trailingIcon,\n isTaggedInput,\n tags,\n onTagChange,\n trailing,\n leading,\n labelSuffix,\n labelTrailing,\n onKeyDown,\n ...rest\n },\n ref,\n): ReactElement => {\n const textInputRef = React.useRef<BladeElementRefWithValue>(null);\n const mergedRef = useMergeRefs(ref, textInputRef);\n const [shouldShowClearButton, setShouldShowClearButton] = useState(false);\n const [isInputFocussed, setIsInputFocussed] = useState(autoFocus ?? false);\n const context = useDatePickerContext();\n const isDatePickerBodyOpen = context?.isDatePickerBodyOpen;\n\n if (__DEV__) {\n if (format) {\n const hasAlphanumeric = /[a-zA-Z0-9]/.test(format);\n if (hasAlphanumeric) {\n throw new Error(\n `[Blade: TextInput] Invalid format \"${format}\". Only # and special characters allowed, no letters/numbers.`,\n );\n }\n }\n }\n\n const formattingResult = useFormattedInput({\n format,\n onChange,\n value,\n defaultValue,\n });\n\n const inputValue = format ? formattingResult.formattedValue : value;\n const effectiveMaxCharacters = format ? formattingResult.maxLength : maxCharacters;\n\n const handleOnChange: FormInputOnEvent = React.useCallback(\n ({ name, value: inputValue }) => {\n if (format) {\n formattingResult.handleChange({ name, value: inputValue });\n } else {\n onChange?.({ name, value: inputValue });\n }\n },\n [format, formattingResult.handleChange, onChange],\n );\n\n const {\n activeTagIndex,\n setActiveTagIndex,\n getTags,\n handleTaggedInputKeydown,\n handleTaggedInputChange,\n handleTagsClear,\n } = useTaggedInput({\n isTaggedInput,\n tags,\n onTagChange,\n isDisabled,\n onChange: handleOnChange,\n name,\n value: inputValue,\n inputRef: textInputRef,\n });\n const [isTrailingDropDownOpen, setIsTrailingDropDownOpen] = React.useState(false);\n const [isLeadingDropDownOpen, setIsLeadingDropDownOpen] = React.useState(false);\n const textInputWrapperRef = useRef<ContainerElementType | null>(null);\n\n useEffect(() => {\n if (\n (isTrailingDropDownOpen && isLeadingDropDownOpen) ||\n (isDatePickerBodyOpen && isLeadingDropDownOpen)\n ) {\n setIsLeadingDropDownOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isTrailingDropDownOpen, isDatePickerBodyOpen]);\n\n useEffect(() => {\n if (isLeadingDropDownOpen && isTrailingDropDownOpen) {\n setIsTrailingDropDownOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isLeadingDropDownOpen]);\n\n const leadingDropDown =\n leading && getComponentId(leading as React.ReactElement) === 'Dropdown' ? leading : null;\n\n const trailingDropdown =\n trailing && getComponentId(trailing as React.ReactElement) === 'Dropdown' ? trailing : null;\n // we need to look into name of component and check if it 's and icon or a dropdown\n const _leadingIcon: IconComponent | undefined = isIconComponent(leading)\n ? (leading as IconComponent)\n : undefined;\n\n const _trailingIcon: IconComponent | undefined = isIconComponent(trailing)\n ? (trailing as IconComponent)\n : undefined;\n const hasLeadingInteractionElement = !_leadingIcon && !leadingDropDown && leading;\n\n const hasTrailingInteractionElement = !_trailingIcon && !trailingDropdown && trailing;\n\n const renderDropdown = (\n dropdown: React.ReactElement,\n isOpen: boolean,\n setIsOpen: (isOpen: boolean) => void,\n defaultPlacement: 'bottom-start' | 'bottom-end',\n ): React.ReactElement | null => {\n if (!dropdown) {\n return null;\n }\n return React.cloneElement(dropdown, {\n selectionType: 'single',\n isOpen,\n height: '100%',\n onOpenChange: (isOpen: boolean) => {\n setIsOpen(isOpen);\n },\n children: React.Children.map(dropdown.props.children, (child) => {\n if (child.type === DropdownOverlay) {\n return React.cloneElement(child, {\n referenceRef: textInputWrapperRef,\n _isNestedDropdown: true,\n defaultPlacement,\n });\n }\n // Pass size to InputDropdownButton\n if (getComponentId(child) === dropdownComponentIds.triggers.InputDropdownButton) {\n return React.cloneElement(child, {\n size,\n });\n }\n return child;\n }),\n });\n };\n\n const renderLeadingDropDown = renderDropdown(\n leadingDropDown as React.ReactElement,\n isLeadingDropDownOpen,\n setIsLeadingDropDownOpen,\n 'bottom-start',\n );\n const renderTrailingDropDown = renderDropdown(\n trailingDropdown as React.ReactElement,\n isTrailingDropDownOpen,\n setIsTrailingDropDownOpen,\n 'bottom-end',\n );\n\n React.useEffect(() => {\n setShouldShowClearButton(Boolean(showClearButton && (defaultValue ?? inputValue)));\n }, [showClearButton, defaultValue, inputValue]);\n\n const renderClearButton = (): React.ReactElement => {\n return (\n <IconButton\n size=\"medium\"\n icon={CloseIcon}\n onClick={() => {\n if (isEmpty(inputValue) && textInputRef.current) {\n // when the input field is uncontrolled take the ref and clear the input and then call the onClearButtonClick function\n if (isReactNative(textInputRef.current)) {\n textInputRef.current.clear();\n textInputRef.current.focus();\n } else if (textInputRef.current instanceof HTMLInputElement) {\n textInputRef.current.value = '';\n textInputRef.current.focus();\n }\n }\n handleTagsClear();\n // if the input field is controlled just call the click handler and the value change shall be left upto the consumer\n onClearButtonClick?.();\n textInputRef?.current?.focus();\n setShouldShowClearButton(false);\n }}\n isDisabled={isDisabled}\n accessibilityLabel=\"Clear Input Content\"\n />\n );\n };\n const hasTrailingDropDown = Boolean(trailingDropdown);\n\n const renderInteractionElement = (): ReactNode => {\n if (isLoading) {\n return <Spinner accessibilityLabel=\"Loading Content\" color=\"primary\" />;\n }\n\n if (shouldShowClearButton && hasTrailingDropDown) {\n return (\n <BaseBox display=\"flex\" gap=\"spacing.3\">\n {renderClearButton()} <Divider orientation=\"vertical\" />\n </BaseBox>\n );\n }\n\n if (showClearButton && hasTrailingInteractionElement) {\n return (\n <BaseBox display=\"flex\" gap=\"spacing.3\">\n {renderClearButton()} <Divider orientation=\"vertical\" /> {trailing as React.ReactElement}\n </BaseBox>\n );\n }\n\n if (shouldShowClearButton) {\n return renderClearButton();\n }\n\n if (hasTrailingInteractionElement) {\n return trailing as React.ReactElement;\n }\n return null;\n };\n return (\n <BaseInput\n id=\"textinput\"\n componentName={MetaConstants.TextInput}\n ref={mergedRef}\n setInputWrapperRef={(wrapperNode) => {\n textInputWrapperRef.current = wrapperNode;\n }}\n label={label as string}\n labelSuffix={labelSuffix}\n labelTrailing={labelTrailing}\n accessibilityLabel={accessibilityLabel}\n hideLabelText={!Boolean(label)}\n labelPosition={labelPosition}\n placeholder={placeholder}\n // CONTROLLED/UNCONTROLLED INPUT LOGIC:\n // For inputs WITHOUT format:\n // - Use standard React controlled/uncontrolled logic\n // - Controlled: user provides `value` prop → use `value` prop\n // - Uncontrolled: user provides `defaultValue` prop → use `defaultValue` prop\n //\n // For inputs WITH format:\n // - Formatting requires controlled mode to re-render and show formatted values\n // - Case 1: Only `value` provided → defaultValue: undefined, value: formattedValue (normal controlled)\n // - Case 2: Only `defaultValue` provided → defaultValue: undefined, value: formattedValue (convert to controlled)\n // - Case 3: Both `value` and `defaultValue` provided → defaultValue: defaultValue, value: formattedValue (let BaseInput detect conflict and throw error)\n //\n defaultValue={\n format\n ? value !== undefined && defaultValue !== undefined\n ? defaultValue\n : undefined\n : defaultValue\n }\n value={format ? inputValue : value}\n name={name}\n maxCharacters={effectiveMaxCharacters}\n isDropdownTrigger={isTaggedInput}\n tags={isTaggedInput ? getTags({ size }) : undefined}\n showAllTags={isInputFocussed}\n maxTagRows=\"single\"\n activeTagIndex={activeTagIndex}\n setActiveTagIndex={setActiveTagIndex}\n leadingDropDown={renderLeadingDropDown}\n trailingDropDown={renderTrailingDropDown}\n leadingInteractionElement={\n hasLeadingInteractionElement ? (leading as React.ReactElement) : null\n }\n onChange={({ name, value }: { name?: string; value?: string }) => {\n if (showClearButton && value?.length) {\n // show the clear button when the user starts typing in\n setShouldShowClearButton(true);\n }\n\n if (shouldShowClearButton && !value?.length) {\n // hide the clear button when the input field is empty\n setShouldShowClearButton(false);\n }\n\n handleTaggedInputChange({ name, value });\n handleOnChange({ name, value });\n }}\n onClick={onClick}\n onFocus={(e) => {\n setIsInputFocussed(true);\n onFocus?.(e);\n }}\n onBlur={(e) => {\n setIsInputFocussed(false);\n onBlur?.(e);\n }}\n onKeyDown={(e) => {\n handleTaggedInputKeydown(e);\n onKeyDown?.(e);\n if (format) {\n formattingResult.handleKeyDown(e.event);\n }\n }}\n onSubmit={onSubmit}\n isDisabled={isDisabled}\n necessityIndicator={necessityIndicator}\n isRequired={isRequired}\n leadingIcon={_leadingIcon ?? leadingIcon ?? icon}\n prefix={prefix}\n trailingInteractionElement={renderInteractionElement()}\n trailingIcon={_trailingIcon ?? trailingIcon}\n suffix={suffix}\n validationState={validationState}\n errorText={errorText}\n helpText={helpText}\n successText={successText}\n trailingFooterSlot={(value) => {\n return format ? null : effectiveMaxCharacters ? (\n <BaseBox marginTop={hintMarginTop[size]} marginRight=\"spacing.1\">\n <CharacterCounter\n currentCount={value?.length ?? 0}\n maxCount={effectiveMaxCharacters}\n size={size}\n />\n </BaseBox>\n ) : null;\n }}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n testID={testID}\n {...getKeyboardAndAutocompleteProps({\n type,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n })}\n size={size}\n {...rest}\n />\n );\n};\n\nconst TextInput = assignWithoutSideEffects(React.forwardRef(_TextInput), {\n displayName: 'TextInput',\n});\n\nexport type { TextInputProps };\nexport { TextInput };\n"],"names":["isReactNative","_textInputRef","getPlatformType","_TextInput","_ref","ref","_ref4","label","accessibilityLabel","_ref$labelPosition","labelPosition","placeholder","_ref$type","type","defaultValue","name","value","maxCharacters","format","onChange","onClick","onFocus","onBlur","onSubmit","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","icon","prefix","showClearButton","onClearButtonClick","isLoading","suffix","autoFocus","keyboardReturnKeyType","autoCompleteSuggestionType","autoCapitalize","testID","_ref$size","size","leadingIcon","trailingIcon","isTaggedInput","tags","onTagChange","trailing","leading","labelSuffix","labelTrailing","onKeyDown","rest","_objectWithoutProperties","_excluded","textInputRef","React","useRef","mergedRef","useMergeRefs","_useState","useState","_useState2","_slicedToArray","shouldShowClearButton","setShouldShowClearButton","_useState3","_useState4","isInputFocussed","setIsInputFocussed","context","useDatePickerContext","isDatePickerBodyOpen","__DEV__","hasAlphanumeric","test","Error","formattingResult","useFormattedInput","inputValue","formattedValue","effectiveMaxCharacters","maxLength","handleOnChange","useCallback","_ref2","handleChange","_useTaggedInput","useTaggedInput","inputRef","activeTagIndex","setActiveTagIndex","getTags","handleTaggedInputKeydown","handleTaggedInputChange","handleTagsClear","_React$useState","_React$useState2","isTrailingDropDownOpen","setIsTrailingDropDownOpen","_React$useState3","_React$useState4","isLeadingDropDownOpen","setIsLeadingDropDownOpen","textInputWrapperRef","useEffect","leadingDropDown","getComponentId","trailingDropdown","_leadingIcon","isIconComponent","undefined","_trailingIcon","hasLeadingInteractionElement","hasTrailingInteractionElement","renderDropdown","dropdown","isOpen","setIsOpen","defaultPlacement","cloneElement","selectionType","height","onOpenChange","children","Children","map","props","child","DropdownOverlay","referenceRef","_isNestedDropdown","dropdownComponentIds","triggers","InputDropdownButton","renderLeadingDropDown","renderTrailingDropDown","Boolean","renderClearButton","_jsx","IconButton","CloseIcon","_textInputRef$current","isEmpty","current","clear","focus","HTMLInputElement","hasTrailingDropDown","renderInteractionElement","Spinner","color","_jsxs","BaseBox","display","gap","Divider","orientation","BaseInput","Object","assign","id","componentName","MetaConstants","TextInput","setInputWrapperRef","wrapperNode","hideLabelText","isDropdownTrigger","showAllTags","maxTagRows","trailingDropDown","leadingInteractionElement","_ref3","length","e","handleKeyDown","event","trailingInteractionElement","trailingFooterSlot","_value$length","marginTop","hintMarginTop","marginRight","CharacterCounter","currentCount","maxCount","getKeyboardAndAutocompleteProps","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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T,MAAM,CAAEA,MAAO,CACfV,eAAe,CAAEA,eAAgB,CACjCC,SAAS,CAAEA,SAAU,CACrBC,QAAQ,CAAEA,QAAS,CACnBC,WAAW,CAAEA,WAAY,CACzBwJ,kBAAkB,CAAE,SAApBA,kBAAkBA,CAAGrK,KAAK,CAAK,KAAAsK,aAAA,CAC7B,OAAOpK,MAAM,CAAG,IAAI,CAAGiE,sBAAsB,CAC3C0D,GAAA,CAACc,OAAO,CAAA,CAAC4B,SAAS,CAAEC,aAAa,CAAC7I,IAAI,CAAE,CAAC8I,WAAW,CAAC,WAAW,CAAA3D,QAAA,CAC9De,GAAA,CAAC6C,gBAAgB,EACfC,YAAY,CAAA,CAAAL,aAAA,CAAEtK,KAAK,EAAA,IAAA,CAAA,KAAA,CAAA,CAALA,KAAK,CAAEgK,MAAM,GAAA,IAAA,CAAAM,aAAA,CAAI,CAAE,CACjCM,QAAQ,CAAEzG,sBAAuB,CACjCxC,IAAI,CAAEA,IAAK,CACZ,CAAC,CACK,CAAC,CACR,IAAI,CACV,CAAE,CAEFN,SAAS,CAAEA,SAAU,CACrBI,MAAM,CAAEA,MAAO,CACXoJ,CAAAA,+BAA+B,CAAC,CAClChL,IAAI,CAAJA,IAAI,CACJyB,qBAAqB,CAArBA,qBAAqB,CACrBC,0BAA0B,CAA1BA,0BAA0B,CAC1BC,cAAc,CAAdA,cACF,CAAC,CAAC,CAAA,CACFG,IAAI,CAAEA,IAAK,CACPW,CAAAA,IAAI,CACT,CAAC,CAEN,CAAC,CAEK,IAAAgH,SAAS,CAAGwB,wBAAwB,CAACpI,cAAK,CAACqI,UAAU,CAAC5L,UAAU,CAAC,CAAE,CACvE6L,WAAW,CAAE,WACf,CAAC;;;;"}
|
|
@@ -318,6 +318,7 @@ import '../Icons/RefreshIcon/RefreshIcon.js';
|
|
|
318
318
|
import '../Icons/RepeatIcon/RepeatIcon.js';
|
|
319
319
|
import '../Icons/ReportsIcon/ReportsIcon.js';
|
|
320
320
|
import '../Icons/ResizerIcon/ResizerIcon.js';
|
|
321
|
+
import '../Icons/ReticleIcon/ReticleIcon.js';
|
|
321
322
|
import '../Icons/RewindIcon/RewindIcon.js';
|
|
322
323
|
import '../Icons/RotateClockWiseIcon/RotateClockWiseIcon.js';
|
|
323
324
|
import '../Icons/RotateCounterClockWiseIcon/RotateCounterClockWiseIcon.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverCloseButton.js","sources":["../../../../../src/components/Popover/PopoverCloseButton.tsx"],"sourcesContent":["import { usePopoverContext } from './PopoverContext';\nimport { IconButton } from '~components/Button/IconButton';\nimport { CloseIcon } from '~components/Icons';\n\nconst PopoverCloseButton = (): React.ReactElement => {\n const { close, defaultInitialFocusRef } = usePopoverContext();\n\n return (\n <IconButton\n ref={defaultInitialFocusRef as never}\n size=\"medium\"\n icon={CloseIcon}\n accessibilityLabel=\"Close\"\n onClick={close}\n />\n );\n};\n\nexport { PopoverCloseButton };\n"],"names":["PopoverCloseButton","_usePopoverContext","usePopoverContext","close","defaultInitialFocusRef","_jsx","IconButton","ref","size","icon","CloseIcon","accessibilityLabel","onClick"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PopoverCloseButton.js","sources":["../../../../../src/components/Popover/PopoverCloseButton.tsx"],"sourcesContent":["import { usePopoverContext } from './PopoverContext';\nimport { IconButton } from '~components/Button/IconButton';\nimport { CloseIcon } from '~components/Icons';\n\nconst PopoverCloseButton = (): React.ReactElement => {\n const { close, defaultInitialFocusRef } = usePopoverContext();\n\n return (\n <IconButton\n ref={defaultInitialFocusRef as never}\n size=\"medium\"\n icon={CloseIcon}\n accessibilityLabel=\"Close\"\n onClick={close}\n />\n );\n};\n\nexport { PopoverCloseButton };\n"],"names":["PopoverCloseButton","_usePopoverContext","usePopoverContext","close","defaultInitialFocusRef","_jsx","IconButton","ref","size","icon","CloseIcon","accessibilityLabel","onClick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIM,IAAAA,kBAAkB,CAAG,SAArBA,kBAAkBA,EAA6B,CACnD,IAAAC,kBAAA,CAA0CC,iBAAiB,EAAE,CAArDC,KAAK,CAAAF,kBAAA,CAALE,KAAK,CAAEC,sBAAsB,CAAAH,kBAAA,CAAtBG,sBAAsB,CAErC,OACEC,GAAA,CAACC,UAAU,EACTC,GAAG,CAAEH,sBAAgC,CACrCI,IAAI,CAAC,QAAQ,CACbC,IAAI,CAAEC,SAAU,CAChBC,kBAAkB,CAAC,OAAO,CAC1BC,OAAO,CAAET,KAAM,CAChB,CAAC,CAEN;;;;"}
|
|
@@ -334,6 +334,7 @@ import '../Icons/RefreshIcon/RefreshIcon.js';
|
|
|
334
334
|
import '../Icons/RepeatIcon/RepeatIcon.js';
|
|
335
335
|
import '../Icons/ReportsIcon/ReportsIcon.js';
|
|
336
336
|
import '../Icons/ResizerIcon/ResizerIcon.js';
|
|
337
|
+
import '../Icons/ReticleIcon/ReticleIcon.js';
|
|
337
338
|
import '../Icons/RewindIcon/RewindIcon.js';
|
|
338
339
|
import '../Icons/RotateClockWiseIcon/RotateClockWiseIcon.js';
|
|
339
340
|
import '../Icons/RotateCounterClockWiseIcon/RotateCounterClockWiseIcon.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickFilter.js","sources":["../../../../../src/components/QuickFilters/QuickFilter.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport type { QuickFilterProps, QuickFilterContentProps } from './types';\nimport { useQuickFilterGroupContext } from './QuickFilterGroup';\nimport { StyledQuickFilterWrapper } from './StyledQuickFilterWrapper';\nimport { Box } from '~components/Box';\nimport { Text } from '~components/Typography';\nimport { Radio } from '~components/Radio';\nimport { Checkbox } from '~components/Checkbox';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { metaAttribute } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { BladeElementRef } from '~utils/types';\n\nconst QuickFilterContent = ({\n value,\n title,\n trailing,\n selectionType = 'single',\n isSelected = false,\n ...rest\n}: QuickFilterContentProps): React.ReactElement => {\n const isSingleSelection = selectionType === 'single';\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n gap=\"spacing.3\"\n width=\"fit-content\"\n justifyContent=\"center\"\n alignItems=\"center\"\n paddingY=\"spacing.3\"\n paddingLeft={isSingleSelection ? 'spacing.4' : 'spacing.3'}\n paddingRight=\"spacing.4\"\n >\n <Box\n display=\"flex\"\n flexDirection=\"row\"\n gap={isSingleSelection ? 'spacing.0' : 'spacing.2'}\n justifyContent=\"center\"\n alignItems=\"center\"\n >\n {isSingleSelection ? (\n <Radio value={value} _hideRadioIcon {...makeAnalyticsAttribute(rest)} />\n ) : (\n <Checkbox value={value} {...makeAnalyticsAttribute(rest)} />\n )}\n <BaseBox display={'grid' as never}>\n {/* Invisible bold text to reserve space and prevent layout shift */}\n <BaseBox gridArea={'1 / 1' as never} visibility={'hidden' as never} aria-hidden={true}>\n <Text variant=\"body\" size=\"medium\" weight=\"semibold\">\n {title}\n </Text>\n </BaseBox>\n {/* Visible text in the same grid cell */}\n <BaseBox gridArea={'1 / 1' as never}>\n <Text\n variant=\"body\"\n size=\"medium\"\n color={isSelected ? 'interactive.text.gray.normal' : 'interactive.text.gray.subtle'}\n weight={isSelected ? 'semibold' : 'medium'}\n >\n {title}\n </Text>\n </BaseBox>\n </BaseBox>\n </Box>\n\n {trailing}\n </BaseBox>\n );\n};\n\nconst QuickFilter = forwardRef<BladeElementRef, QuickFilterProps>(\n ({ title, value, trailing, testID, ...rest }, ref): React.ReactElement => {\n const { selectedQuickFilters, selectionType } = useQuickFilterGroupContext();\n\n const isQuickFilterSelected = selectedQuickFilters.includes(value);\n\n return (\n <StyledQuickFilterWrapper\n as=\"label\"\n ref={ref as React.Ref<HTMLLabelElement>}\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"flex-start\"\n borderRadius=\"small\"\n isSelected={isQuickFilterSelected}\n {...makeAnalyticsAttribute(rest)}\n {...metaAttribute({ testID })}\n >\n <QuickFilterContent\n value={value}\n title={title}\n trailing={trailing}\n selectionType={selectionType}\n isSelected={isQuickFilterSelected}\n {...rest}\n />\n </StyledQuickFilterWrapper>\n );\n },\n);\nexport { QuickFilter };\n"],"names":["QuickFilterContent","_ref","value","title","trailing","_ref$selectionType","selectionType","_ref$isSelected","isSelected","rest","_objectWithoutProperties","_excluded","isSingleSelection","_jsxs","BaseBox","display","flexDirection","gap","width","justifyContent","alignItems","paddingY","paddingLeft","paddingRight","children","Box","_jsx","Radio","Object","assign","_hideRadioIcon","makeAnalyticsAttribute","Checkbox","gridArea","visibility","Text","variant","size","weight","color","QuickFilter","forwardRef","_ref2","ref","testID","_excluded2","_useQuickFilterGroupC","useQuickFilterGroupContext","selectedQuickFilters","isQuickFilterSelected","includes","StyledQuickFilterWrapper","as","borderRadius","metaAttribute"],"mappings":"
|
|
1
|
+
{"version":3,"file":"QuickFilter.js","sources":["../../../../../src/components/QuickFilters/QuickFilter.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport type { QuickFilterProps, QuickFilterContentProps } from './types';\nimport { useQuickFilterGroupContext } from './QuickFilterGroup';\nimport { StyledQuickFilterWrapper } from './StyledQuickFilterWrapper';\nimport { Box } from '~components/Box';\nimport { Text } from '~components/Typography';\nimport { Radio } from '~components/Radio';\nimport { Checkbox } from '~components/Checkbox';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { metaAttribute } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { BladeElementRef } from '~utils/types';\n\nconst QuickFilterContent = ({\n value,\n title,\n trailing,\n selectionType = 'single',\n isSelected = false,\n ...rest\n}: QuickFilterContentProps): React.ReactElement => {\n const isSingleSelection = selectionType === 'single';\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n gap=\"spacing.3\"\n width=\"fit-content\"\n justifyContent=\"center\"\n alignItems=\"center\"\n paddingY=\"spacing.3\"\n paddingLeft={isSingleSelection ? 'spacing.4' : 'spacing.3'}\n paddingRight=\"spacing.4\"\n >\n <Box\n display=\"flex\"\n flexDirection=\"row\"\n gap={isSingleSelection ? 'spacing.0' : 'spacing.2'}\n justifyContent=\"center\"\n alignItems=\"center\"\n >\n {isSingleSelection ? (\n <Radio value={value} _hideRadioIcon {...makeAnalyticsAttribute(rest)} />\n ) : (\n <Checkbox value={value} {...makeAnalyticsAttribute(rest)} />\n )}\n <BaseBox display={'grid' as never}>\n {/* Invisible bold text to reserve space and prevent layout shift */}\n <BaseBox gridArea={'1 / 1' as never} visibility={'hidden' as never} aria-hidden={true}>\n <Text variant=\"body\" size=\"medium\" weight=\"semibold\">\n {title}\n </Text>\n </BaseBox>\n {/* Visible text in the same grid cell */}\n <BaseBox gridArea={'1 / 1' as never}>\n <Text\n variant=\"body\"\n size=\"medium\"\n color={isSelected ? 'interactive.text.gray.normal' : 'interactive.text.gray.subtle'}\n weight={isSelected ? 'semibold' : 'medium'}\n >\n {title}\n </Text>\n </BaseBox>\n </BaseBox>\n </Box>\n\n {trailing}\n </BaseBox>\n );\n};\n\nconst QuickFilter = forwardRef<BladeElementRef, QuickFilterProps>(\n ({ title, value, trailing, testID, ...rest }, ref): React.ReactElement => {\n const { selectedQuickFilters, selectionType } = useQuickFilterGroupContext();\n\n const isQuickFilterSelected = selectedQuickFilters.includes(value);\n\n return (\n <StyledQuickFilterWrapper\n as=\"label\"\n ref={ref as React.Ref<HTMLLabelElement>}\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"flex-start\"\n borderRadius=\"small\"\n isSelected={isQuickFilterSelected}\n {...makeAnalyticsAttribute(rest)}\n {...metaAttribute({ testID })}\n >\n <QuickFilterContent\n value={value}\n title={title}\n trailing={trailing}\n selectionType={selectionType}\n isSelected={isQuickFilterSelected}\n {...rest}\n />\n </StyledQuickFilterWrapper>\n );\n },\n);\nexport { QuickFilter };\n"],"names":["QuickFilterContent","_ref","value","title","trailing","_ref$selectionType","selectionType","_ref$isSelected","isSelected","rest","_objectWithoutProperties","_excluded","isSingleSelection","_jsxs","BaseBox","display","flexDirection","gap","width","justifyContent","alignItems","paddingY","paddingLeft","paddingRight","children","Box","_jsx","Radio","Object","assign","_hideRadioIcon","makeAnalyticsAttribute","Checkbox","gridArea","visibility","Text","variant","size","weight","color","QuickFilter","forwardRef","_ref2","ref","testID","_excluded2","_useQuickFilterGroupC","useQuickFilterGroupContext","selectedQuickFilters","isQuickFilterSelected","includes","StyledQuickFilterWrapper","as","borderRadius","metaAttribute"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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'../Icons/RepeatIcon/RepeatIcon.js';
|
|
317
317
|
import '../Icons/ReportsIcon/ReportsIcon.js';
|
|
318
318
|
import '../Icons/ResizerIcon/ResizerIcon.js';
|
|
319
|
+
import '../Icons/ReticleIcon/ReticleIcon.js';
|
|
319
320
|
import '../Icons/RewindIcon/RewindIcon.js';
|
|
320
321
|
import '../Icons/RotateClockWiseIcon/RotateClockWiseIcon.js';
|
|
321
322
|
import '../Icons/RotateCounterClockWiseIcon/RotateCounterClockWiseIcon.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sources":["../../../../../src/components/Table/tokens.ts"],"sourcesContent":["import { AlertCircleIcon, CheckIcon } from '~components/Icons';\nimport { size } from '~tokens/global';\n\nconst firstColumnStickyZIndex = 2;\n\nconst refreshWrapperZIndex = 3;\n\nconst checkboxCellWidth = size['44'];\n\nconst tableBackgroundColor = 'surface.background.gray.intense';\nconst tableHeader = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n backgroundColor: 'surface.background.gray.moderate',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n} as const;\n\nconst tableFooter = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n backgroundColor: 'interactive.background.gray.faded',\n} as const;\n\nconst tableRow = {\n paddingLeft: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n paddingRight: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n minHeight: {\n compact: '36',\n normal: '48',\n comfortable: '60',\n },\n nonStripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n // TODO: Rebranding - on design side: explore pressed state color change, right now both hover & active are same\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.gray.fadedHighlighted',\n backgroundColorSelectedHover: 'interactive.background.gray.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.gray.fadedHighlighted',\n backgroundColorSelectedActive: 'interactive.background.gray.fadedHighlighted',\n },\n nonStripeWrapper: {\n // not used anywhere\n backgroundColor: 'transparent',\n backgroundColorHover: 'transparent',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'transparent',\n backgroundColorSelectedHover: 'transparent',\n backgroundColorSelectedFocus: 'transparent',\n backgroundColorSelectedActive: 'transparent',\n },\n stripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.gray.fadedHighlighted',\n backgroundColorSelectedHover: 'interactive.background.gray.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.gray.fadedHighlighted',\n backgroundColorSelectedActive: 'interactive.background.gray.fadedHighlighted',\n },\n stripeWrapper: {\n backgroundColor: 'interactive.background.gray.default',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.gray.default',\n backgroundColorSelectedHover: 'interactive.background.gray.default',\n backgroundColorSelectedFocus: 'interactive.background.gray.default',\n backgroundColorSelectedActive: 'interactive.background.gray.default',\n },\n borderBottomWidth: 'thin',\n borderColor: 'surface.border.gray.muted',\n backgroundColorMotionEasing: 'easing.standard',\n backgroundColorMotionDuration: 'duration.xquick',\n groupHeaderBackgroundColor: 'surface.background.gray.moderate',\n} as const;\n\nconst tableToolbar = {\n backgroundColor: 'transparent',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorMotionEasing: 'easing.standard',\n backgroundColorMotionDuration: 'duration.xquick',\n minHeight: size[37], // 37px to accommodate 1px border, matching TableHeader height\n padding: ['spacing.3', 'spacing.3', 'spacing.3', 'spacing.4'],\n} as const;\n\nconst tablePagination = {\n defaultPageSize: 10,\n backgroundColor: 'surface.background.gray.moderate',\n} as const;\n\nconst tableEditableCellRowDensityToInputSizeMap = {\n compact: 'small',\n normal: 'medium',\n comfortable: 'large',\n} as const;\n\nconst validationStateToInputTrailingIconMap = {\n none: undefined,\n success: CheckIcon,\n error: AlertCircleIcon,\n};\n\nconst rowDensityToIsTableInputCellMapping = {\n comfortable: false,\n normal: true,\n compact: true,\n};\n\nconst classes = {\n HOVER_ACTIONS: 'hover-actions',\n HOVER_ACTIONS_LAYER2: 'hover-actions-layer-2',\n HOVER_ACTIONS_LAYER3: 'hover-actions-layer-3',\n HAS_ROW_SPANNING: 'has-row-spanning',\n};\n\nexport {\n tableHeader,\n tableFooter,\n tableRow,\n tableToolbar,\n tablePagination,\n refreshWrapperZIndex,\n tableBackgroundColor,\n firstColumnStickyZIndex,\n checkboxCellWidth,\n tableEditableCellRowDensityToInputSizeMap,\n validationStateToInputTrailingIconMap,\n rowDensityToIsTableInputCellMapping,\n classes,\n};\n"],"names":["tableEditableCellRowDensityToInputSizeMap","compact","normal","comfortable","validationStateToInputTrailingIconMap","none","undefined","success","CheckIcon","error","AlertCircleIcon","rowDensityToIsTableInputCellMapping"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tokens.js","sources":["../../../../../src/components/Table/tokens.ts"],"sourcesContent":["import { AlertCircleIcon, CheckIcon } from '~components/Icons';\nimport { size } from '~tokens/global';\n\nconst firstColumnStickyZIndex = 2;\n\nconst refreshWrapperZIndex = 3;\n\nconst checkboxCellWidth = size['44'];\n\nconst tableBackgroundColor = 'surface.background.gray.intense';\nconst tableHeader = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n backgroundColor: 'surface.background.gray.moderate',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n} as const;\n\nconst tableFooter = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n backgroundColor: 'interactive.background.gray.faded',\n} as const;\n\nconst tableRow = {\n paddingLeft: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n paddingRight: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n minHeight: {\n compact: '36',\n normal: '48',\n comfortable: '60',\n },\n nonStripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n // TODO: Rebranding - on design side: explore pressed state color change, right now both hover & active are same\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.gray.fadedHighlighted',\n backgroundColorSelectedHover: 'interactive.background.gray.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.gray.fadedHighlighted',\n backgroundColorSelectedActive: 'interactive.background.gray.fadedHighlighted',\n },\n nonStripeWrapper: {\n // not used anywhere\n backgroundColor: 'transparent',\n backgroundColorHover: 'transparent',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'transparent',\n backgroundColorSelectedHover: 'transparent',\n backgroundColorSelectedFocus: 'transparent',\n backgroundColorSelectedActive: 'transparent',\n },\n stripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.gray.fadedHighlighted',\n backgroundColorSelectedHover: 'interactive.background.gray.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.gray.fadedHighlighted',\n backgroundColorSelectedActive: 'interactive.background.gray.fadedHighlighted',\n },\n stripeWrapper: {\n backgroundColor: 'interactive.background.gray.default',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.gray.default',\n backgroundColorSelectedHover: 'interactive.background.gray.default',\n backgroundColorSelectedFocus: 'interactive.background.gray.default',\n backgroundColorSelectedActive: 'interactive.background.gray.default',\n },\n borderBottomWidth: 'thin',\n borderColor: 'surface.border.gray.muted',\n backgroundColorMotionEasing: 'easing.standard',\n backgroundColorMotionDuration: 'duration.xquick',\n groupHeaderBackgroundColor: 'surface.background.gray.moderate',\n} as const;\n\nconst tableToolbar = {\n backgroundColor: 'transparent',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorMotionEasing: 'easing.standard',\n backgroundColorMotionDuration: 'duration.xquick',\n minHeight: size[37], // 37px to accommodate 1px border, matching TableHeader height\n padding: ['spacing.3', 'spacing.3', 'spacing.3', 'spacing.4'],\n} as const;\n\nconst tablePagination = {\n defaultPageSize: 10,\n backgroundColor: 'surface.background.gray.moderate',\n} as const;\n\nconst tableEditableCellRowDensityToInputSizeMap = {\n compact: 'small',\n normal: 'medium',\n comfortable: 'large',\n} as const;\n\nconst validationStateToInputTrailingIconMap = {\n none: undefined,\n success: CheckIcon,\n error: AlertCircleIcon,\n};\n\nconst rowDensityToIsTableInputCellMapping = {\n comfortable: false,\n normal: true,\n compact: true,\n};\n\nconst classes = {\n HOVER_ACTIONS: 'hover-actions',\n HOVER_ACTIONS_LAYER2: 'hover-actions-layer-2',\n HOVER_ACTIONS_LAYER3: 'hover-actions-layer-3',\n HAS_ROW_SPANNING: 'has-row-spanning',\n};\n\nexport {\n tableHeader,\n tableFooter,\n tableRow,\n tableToolbar,\n tablePagination,\n refreshWrapperZIndex,\n tableBackgroundColor,\n firstColumnStickyZIndex,\n checkboxCellWidth,\n tableEditableCellRowDensityToInputSizeMap,\n validationStateToInputTrailingIconMap,\n rowDensityToIsTableInputCellMapping,\n classes,\n};\n"],"names":["tableEditableCellRowDensityToInputSizeMap","compact","normal","comfortable","validationStateToInputTrailingIconMap","none","undefined","success","CheckIcon","error","AlertCircleIcon","rowDensityToIsTableInputCellMapping"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6GM,IAAAA,yCAAyC,CAAG,CAChDC,OAAO,CAAE,OAAO,CAChBC,MAAM,CAAE,QAAQ,CAChBC,WAAW,CAAE,OACf,EAEM,IAAAC,qCAAqC,CAAG,CAC5CC,IAAI,CAAEC,SAAS,CACfC,OAAO,CAAEC,SAAS,CAClBC,KAAK,CAAEC,eACT,EAEM,IAAAC,mCAAmC,CAAG,CAC1CR,WAAW,CAAE,KAAK,CAClBD,MAAM,CAAE,IAAI,CACZD,OAAO,CAAE,IACX;;;;"}
|
|
@@ -330,6 +330,7 @@ import '../Icons/RefreshIcon/RefreshIcon.js';
|
|
|
330
330
|
import '../Icons/RepeatIcon/RepeatIcon.js';
|
|
331
331
|
import '../Icons/ReportsIcon/ReportsIcon.js';
|
|
332
332
|
import '../Icons/ResizerIcon/ResizerIcon.js';
|
|
333
|
+
import '../Icons/ReticleIcon/ReticleIcon.js';
|
|
333
334
|
import '../Icons/RewindIcon/RewindIcon.js';
|
|
334
335
|
import '../Icons/RotateClockWiseIcon/RotateClockWiseIcon.js';
|
|
335
336
|
import '../Icons/RotateCounterClockWiseIcon/RotateCounterClockWiseIcon.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","sources":["../../../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport type { TagProps } from './types';\nimport { Box } from '~components/Box';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { IconButton } from '~components/Button/IconButton';\nimport { CloseIcon } from '~components/Icons';\nimport { Text } from '~components/Typography';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { isReactNative, makeSize } from '~utils';\nimport { size as globalSizeTokens } from '~tokens/global';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { PaddingProps } from '~components/Box/BaseBox/types/spacingTypes';\nimport { useIsMobile } from '~utils/useIsMobile';\nimport type { BladeElementRef } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst FocussableTag = styled(BaseBox)<{ _isVirtuallyFocused: TagProps['_isVirtuallyFocused'] }>(\n (props) => {\n if (props._isVirtuallyFocused && !isReactNative()) {\n return {\n outline: `${makeSize(globalSizeTokens['1'])} solid ${\n props.theme.colors.surface.background.gray.subtle\n }`,\n boxShadow: `0px 0px 0px 4px ${props.theme.colors.interactive.background.primary.faded}`,\n };\n }\n\n return {};\n },\n);\n\nconst _Tag = (\n {\n size = 'medium',\n icon: Icon,\n onDismiss,\n children,\n isDisabled,\n testID,\n _isVirtuallyFocused,\n _isTagInsideInput,\n ...rest\n }: TagProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement | null => {\n const isMobile = useIsMobile();\n\n const textColor = isDisabled ? 'interactive.text.gray.disabled' : 'interactive.text.gray.subtle';\n const iconColor = isDisabled ? 'interactive.icon.gray.disabled' : 'interactive.icon.gray.muted';\n const backgroundColor = isDisabled\n ? 'interactive.background.gray.disabled'\n : 'interactive.background.gray.default';\n\n const mediumPadding: PaddingProps['padding'] = {\n base: ['spacing.2', 'spacing.3', 'spacing.2', 'spacing.4'],\n m: ['spacing.1', 'spacing.2', 'spacing.1', 'spacing.3'],\n };\n\n const largePadding: PaddingProps['padding'] = {\n base: ['spacing.2', 'spacing.3', 'spacing.2', 'spacing.4'],\n m: ['spacing.2', 'spacing.3', 'spacing.2', 'spacing.4'],\n };\n\n const assetSize = React.useMemo((): 'small' | 'medium' => {\n if (isMobile && size === 'large') {\n return 'medium';\n }\n\n return 'small';\n }, [isMobile, size]);\n\n return (\n <BaseBox\n ref={ref as never}\n display={(isReactNative() ? 'flex' : 'inline-flex') as never}\n {...getStyledProps(rest)}\n {...metaAttribute({ name: MetaConstants.Tag, testID })}\n {...makeAnalyticsAttribute(rest)}\n >\n <FocussableTag\n display={(isReactNative() ? 'flex' : 'inline-flex') as never}\n alignSelf={isReactNative() ? 'center' : undefined}\n flexDirection=\"row\"\n flexWrap=\"nowrap\"\n flexShrink={0}\n backgroundColor={backgroundColor}\n borderRadius=\"max\"\n padding={size === 'medium' ? mediumPadding : largePadding}\n _isVirtuallyFocused={_isVirtuallyFocused}\n >\n {/* Leading Icon */}\n {Icon ? (\n <Box display=\"flex\" flexDirection=\"row\" alignItems=\"center\">\n <Icon color={iconColor} size={assetSize} marginRight=\"spacing.2\" />\n </Box>\n ) : null}\n\n {/* Tag Text */}\n <Box display=\"flex\" flexDirection=\"row\">\n <Text\n textAlign=\"center\"\n truncateAfterLines={1}\n marginRight=\"spacing.2\"\n color={textColor}\n size=\"small\"\n >\n {children}\n </Text>\n </Box>\n\n {/* Dismiss Icon */}\n <Box display=\"flex\" flexDirection=\"row\" alignItems=\"center\" justifyContent=\"center\">\n <IconButton\n size={assetSize}\n icon={CloseIcon}\n accessibilityLabel={`Close ${children} tag`}\n isDisabled={isDisabled}\n _tabIndex={_isTagInsideInput ? -1 : undefined}\n onClick={(e) => {\n // Inside tag input, we stop propagation to avoid opening dropdown on click of close on tag\n if (_isTagInsideInput) {\n e.stopPropagation();\n }\n onDismiss();\n }}\n />\n </Box>\n </FocussableTag>\n </BaseBox>\n );\n};\n\n/**\n * ## Tags\n *\n * Tag component can be used to display selected items on UI.\n *\n * ### Usage\n *\n * ***Note:*** _Make sure to handle state when using Tag_\n *\n * ```jsx\n * const [showTag, setShowTag] = React.useState(true);\n *\n * // ...\n *\n * {showTag && (\n * <Tag\n * icon={CheckIcon}\n * onDismiss={() => setShowTag(false)}\n * >\n * Transactions\n * </Tag>\n * )}\n * ```\n *\n * Checkout [Tags Documentation](https://blade.razorpay.com/?path=/story/components-tag--default) for more info.\n *\n */\nconst Tag = React.forwardRef(_Tag);\n\nexport { Tag };\n"],"names":["FocussableTag","styled","BaseBox","props","_isVirtuallyFocused","isReactNative","outline","makeSize","globalSizeTokens","theme","colors","surface","background","gray","subtle","boxShadow","interactive","primary","faded","_Tag","_ref","ref","_ref$size","size","Icon","icon","onDismiss","children","isDisabled","testID","_isTagInsideInput","rest","_objectWithoutProperties","_excluded","isMobile","useIsMobile","textColor","iconColor","backgroundColor","mediumPadding","base","m","largePadding","assetSize","React","useMemo","_jsx","Object","assign","display","getStyledProps","metaAttribute","name","MetaConstants","Tag","makeAnalyticsAttribute","_jsxs","alignSelf","undefined","flexDirection","flexWrap","flexShrink","borderRadius","padding","Box","alignItems","color","marginRight","Text","textAlign","truncateAfterLines","justifyContent","IconButton","CloseIcon","accessibilityLabel","_tabIndex","onClick","e","stopPropagation","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AK,CAACM,UAAU,CAAC,QAAQ,CAACM,cAAc,CAAC,QAAQ,CAAA5C,QAAA,CACjFmB,GAAA,CAAC0B,UAAU,CAAA,CACTjD,IAAI,CAAEoB,SAAU,CAChBlB,IAAI,CAAEgD,SAAU,CAChBC,kBAAkB,CAAE,CAAS/C,MAAAA,EAAAA,QAAQ,MAAO,CAC5CC,UAAU,CAAEA,UAAW,CACvB+C,SAAS,CAAE7C,iBAAiB,CAAG,CAAC,CAAC,CAAG4B,SAAU,CAC9CkB,OAAO,CAAE,SAATA,OAAOA,CAAGC,CAAC,CAAK,CAEd,GAAI/C,iBAAiB,CAAE,CACrB+C,CAAC,CAACC,eAAe,EAAE,CACrB,CACApD,SAAS,EAAE,CACb,CAAE,CACH,CAAC,CACC,CAAC,CACO,CAAA,CAAC,EACT,CAAC,CAEd,CAAC,CA6BK,IAAA4B,GAAG,CAAGV,cAAK,CAACmC,UAAU,CAAC5D,IAAI;;;;"}
|
|
1
|
+
{"version":3,"file":"Tag.js","sources":["../../../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport type { TagProps } from './types';\nimport { Box } from '~components/Box';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { IconButton } from '~components/Button/IconButton';\nimport { CloseIcon } from '~components/Icons';\nimport { Text } from '~components/Typography';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { isReactNative, makeSize } from '~utils';\nimport { size as globalSizeTokens } from '~tokens/global';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { PaddingProps } from '~components/Box/BaseBox/types/spacingTypes';\nimport { useIsMobile } from '~utils/useIsMobile';\nimport type { BladeElementRef } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst FocussableTag = styled(BaseBox)<{ _isVirtuallyFocused: TagProps['_isVirtuallyFocused'] }>(\n (props) => {\n if (props._isVirtuallyFocused && !isReactNative()) {\n return {\n outline: `${makeSize(globalSizeTokens['1'])} solid ${\n props.theme.colors.surface.background.gray.subtle\n }`,\n boxShadow: `0px 0px 0px 4px ${props.theme.colors.interactive.background.primary.faded}`,\n };\n }\n\n return {};\n },\n);\n\nconst _Tag = (\n {\n size = 'medium',\n icon: Icon,\n onDismiss,\n children,\n isDisabled,\n testID,\n _isVirtuallyFocused,\n _isTagInsideInput,\n ...rest\n }: TagProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement | null => {\n const isMobile = useIsMobile();\n\n const textColor = isDisabled ? 'interactive.text.gray.disabled' : 'interactive.text.gray.subtle';\n const iconColor = isDisabled ? 'interactive.icon.gray.disabled' : 'interactive.icon.gray.muted';\n const backgroundColor = isDisabled\n ? 'interactive.background.gray.disabled'\n : 'interactive.background.gray.default';\n\n const mediumPadding: PaddingProps['padding'] = {\n base: ['spacing.2', 'spacing.3', 'spacing.2', 'spacing.4'],\n m: ['spacing.1', 'spacing.2', 'spacing.1', 'spacing.3'],\n };\n\n const largePadding: PaddingProps['padding'] = {\n base: ['spacing.2', 'spacing.3', 'spacing.2', 'spacing.4'],\n m: ['spacing.2', 'spacing.3', 'spacing.2', 'spacing.4'],\n };\n\n const assetSize = React.useMemo((): 'small' | 'medium' => {\n if (isMobile && size === 'large') {\n return 'medium';\n }\n\n return 'small';\n }, [isMobile, size]);\n\n return (\n <BaseBox\n ref={ref as never}\n display={(isReactNative() ? 'flex' : 'inline-flex') as never}\n {...getStyledProps(rest)}\n {...metaAttribute({ name: MetaConstants.Tag, testID })}\n {...makeAnalyticsAttribute(rest)}\n >\n <FocussableTag\n display={(isReactNative() ? 'flex' : 'inline-flex') as never}\n alignSelf={isReactNative() ? 'center' : undefined}\n flexDirection=\"row\"\n flexWrap=\"nowrap\"\n flexShrink={0}\n backgroundColor={backgroundColor}\n borderRadius=\"max\"\n padding={size === 'medium' ? mediumPadding : largePadding}\n _isVirtuallyFocused={_isVirtuallyFocused}\n >\n {/* Leading Icon */}\n {Icon ? (\n <Box display=\"flex\" flexDirection=\"row\" alignItems=\"center\">\n <Icon color={iconColor} size={assetSize} marginRight=\"spacing.2\" />\n </Box>\n ) : null}\n\n {/* Tag Text */}\n <Box display=\"flex\" flexDirection=\"row\">\n <Text\n textAlign=\"center\"\n truncateAfterLines={1}\n marginRight=\"spacing.2\"\n color={textColor}\n size=\"small\"\n >\n {children}\n </Text>\n </Box>\n\n {/* Dismiss Icon */}\n <Box display=\"flex\" flexDirection=\"row\" alignItems=\"center\" justifyContent=\"center\">\n <IconButton\n size={assetSize}\n icon={CloseIcon}\n accessibilityLabel={`Close ${children} tag`}\n isDisabled={isDisabled}\n _tabIndex={_isTagInsideInput ? -1 : undefined}\n onClick={(e) => {\n // Inside tag input, we stop propagation to avoid opening dropdown on click of close on tag\n if (_isTagInsideInput) {\n e.stopPropagation();\n }\n onDismiss();\n }}\n />\n </Box>\n </FocussableTag>\n </BaseBox>\n );\n};\n\n/**\n * ## Tags\n *\n * Tag component can be used to display selected items on UI.\n *\n * ### Usage\n *\n * ***Note:*** _Make sure to handle state when using Tag_\n *\n * ```jsx\n * const [showTag, setShowTag] = React.useState(true);\n *\n * // ...\n *\n * {showTag && (\n * <Tag\n * icon={CheckIcon}\n * onDismiss={() => setShowTag(false)}\n * >\n * Transactions\n * </Tag>\n * )}\n * ```\n *\n * Checkout [Tags Documentation](https://blade.razorpay.com/?path=/story/components-tag--default) for more info.\n *\n */\nconst Tag = React.forwardRef(_Tag);\n\nexport { Tag };\n"],"names":["FocussableTag","styled","BaseBox","props","_isVirtuallyFocused","isReactNative","outline","makeSize","globalSizeTokens","theme","colors","surface","background","gray","subtle","boxShadow","interactive","primary","faded","_Tag","_ref","ref","_ref$size","size","Icon","icon","onDismiss","children","isDisabled","testID","_isTagInsideInput","rest","_objectWithoutProperties","_excluded","isMobile","useIsMobile","textColor","iconColor","backgroundColor","mediumPadding","base","m","largePadding","assetSize","React","useMemo","_jsx","Object","assign","display","getStyledProps","metaAttribute","name","MetaConstants","Tag","makeAnalyticsAttribute","_jsxs","alignSelf","undefined","flexDirection","flexWrap","flexShrink","borderRadius","padding","Box","alignItems","color","marginRight","Text","textAlign","truncateAfterLines","justifyContent","IconButton","CloseIcon","accessibilityLabel","_tabIndex","onClick","e","stopPropagation","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,MAAA,CAAA,MAAA,CAAA,WAAA,CAAA,UAAA,CAAA,YAAA,CAAA,QAAA,CAAA,qBAAA,CAAA,mBAAA,CAAA,CAiBA,IAAMA,aAAa,CAAGC,MAAM,CAACC,OAAO,CAAC,CACnC,SAACC,KAAK,CAAK,CACT,GAAIA,KAAK,CAACC,mBAAmB,EAAI,CAACC,aAAa,EAAE,CAAE,CACjD,OAAO,CACLC,OAAO,CAAE,CAAGC,EAAAA,QAAQ,CAACC,IAAgB,CAAC,GAAG,CAAC,CAAC,CAAA,OAAA,EACzCL,KAAK,CAACM,KAAK,CAACC,MAAM,CAACC,OAAO,CAACC,UAAU,CAACC,IAAI,CAACC,MAAM,CACjD,CAAA,CACFC,SAAS,CAAE,CAAA,gBAAA,EAAmBZ,KAAK,CAACM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ChE,CAAC,CACJ,IAAI,CAGRrB,GAAA,CAACkB,GAAG,EAACf,OAAO,CAAC,MAAM,CAACU,aAAa,CAAC,KAAK,CAAAhC,QAAA,CACrCmB,GAAA,CAACsB,IAAI,CAAA,CACHC,SAAS,CAAC,QAAQ,CAClBC,kBAAkB,CAAE,CAAE,CACtBH,WAAW,CAAC,WAAW,CACvBD,KAAK,CAAE9B,SAAU,CACjBb,IAAI,CAAC,OAAO,CAAAI,QAAA,CAEXA,QAAQ,CACL,CAAC,CACJ,CAAC,CAGNmB,GAAA,CAACkB,GAAG,CAACf,CAAAA,OAAO,CAAC,MAAM,CAACU,aAAa,CAAC,KAAK,CAACM,UAAU,CAAC,QAAQ,CAACM,cAAc,CAAC,QAAQ,CAAA5C,QAAA,CACjFmB,GAAA,CAAC0B,UAAU,CAAA,CACTjD,IAAI,CAAEoB,SAAU,CAChBlB,IAAI,CAAEgD,SAAU,CAChBC,kBAAkB,CAAE,CAAS/C,MAAAA,EAAAA,QAAQ,MAAO,CAC5CC,UAAU,CAAEA,UAAW,CACvB+C,SAAS,CAAE7C,iBAAiB,CAAG,CAAC,CAAC,CAAG4B,SAAU,CAC9CkB,OAAO,CAAE,SAATA,OAAOA,CAAGC,CAAC,CAAK,CAEd,GAAI/C,iBAAiB,CAAE,CACrB+C,CAAC,CAACC,eAAe,EAAE,CACrB,CACApD,SAAS,EAAE,CACb,CAAE,CACH,CAAC,CACC,CAAC,CACO,CAAA,CAAC,EACT,CAAC,CAEd,CAAC,CA6BK,IAAA4B,GAAG,CAAGV,cAAK,CAACmC,UAAU,CAAC5D,IAAI;;;;"}
|
|
@@ -383,6 +383,7 @@ export { default as RefreshIcon } from './Icons/RefreshIcon/RefreshIcon.js';
|
|
|
383
383
|
export { default as RepeatIcon } from './Icons/RepeatIcon/RepeatIcon.js';
|
|
384
384
|
export { default as ReportsIcon } from './Icons/ReportsIcon/ReportsIcon.js';
|
|
385
385
|
export { default as ResizerIcon } from './Icons/ResizerIcon/ResizerIcon.js';
|
|
386
|
+
export { default as ReticleIcon } from './Icons/ReticleIcon/ReticleIcon.js';
|
|
386
387
|
export { default as RewindIcon } from './Icons/RewindIcon/RewindIcon.js';
|
|
387
388
|
export { default as RotateClockWiseIcon } from './Icons/RotateClockWiseIcon/RotateClockWiseIcon.js';
|
|
388
389
|
export { default as RotateCounterClockWiseIcon } from './Icons/RotateCounterClockWiseIcon/RotateCounterClockWiseIcon.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '../node_modules/es-toolkit/dist/object/cloneDeep.js';
|
|
1
|
+
import '../node_modules/es-toolkit/dist/compat/object/cloneDeep.js';
|
|
2
2
|
//# sourceMappingURL=cloneDeep.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '../node_modules/es-toolkit/dist/
|
|
1
|
+
import '../node_modules/es-toolkit/dist/object/cloneDeep.js';
|
|
2
2
|
//# sourceMappingURL=cloneDeep3.js.map
|
|
@@ -28,7 +28,8 @@ import { Divider } from '../Divider/Divider.js';
|
|
|
28
28
|
import useTheme from '../BladeProvider/useTheme.js';
|
|
29
29
|
|
|
30
30
|
var _excluded = ["childrenWithId", "actionListItemWrapperRole", "isMultiSelectable"],
|
|
31
|
-
_excluded2 = ["
|
|
31
|
+
_excluded2 = ["style"],
|
|
32
|
+
_excluded3 = ["childrenWithId", "actionListItemWrapperRole", "isMultiSelectable"];
|
|
32
33
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
33
34
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34
35
|
var _ActionListBox = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
@@ -152,11 +153,33 @@ var useFilteredItems = function useFilteredItems(children) {
|
|
|
152
153
|
itemCount: items.length
|
|
153
154
|
};
|
|
154
155
|
};
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Custom outer element for VirtualizedList that enables scrolling inside BottomSheet.
|
|
159
|
+
* - data-allow-scroll: tells BottomSheet's useDrag to not capture touch events on this element
|
|
160
|
+
* - data-body-scroll-lock-ignore: allows this element to scroll even when body scroll is locked
|
|
161
|
+
* - touchAction: 'pan-y' enables vertical touch scrolling (overrides parent's 'none')
|
|
162
|
+
* - overscrollBehavior: 'contain' prevents scroll chaining to parent elements
|
|
163
|
+
*/
|
|
164
|
+
var BottomSheetCompatibleOuterElement = /*#__PURE__*/React__default.forwardRef(function (_ref4, ref) {
|
|
165
|
+
var style = _ref4.style,
|
|
166
|
+
props = _objectWithoutProperties(_ref4, _excluded2);
|
|
167
|
+
return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({
|
|
168
|
+
ref: ref
|
|
169
|
+
}, props), {}, {
|
|
170
|
+
"data-allow-scroll": "true",
|
|
171
|
+
"data-body-scroll-lock-ignore": "true",
|
|
172
|
+
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
173
|
+
touchAction: 'pan-y',
|
|
174
|
+
overscrollBehavior: 'contain'
|
|
175
|
+
})
|
|
176
|
+
}));
|
|
177
|
+
});
|
|
178
|
+
var VirtualListItem = /*#__PURE__*/React__default.memo(function (_ref5) {
|
|
179
|
+
var index = _ref5.index,
|
|
180
|
+
style = _ref5.style,
|
|
181
|
+
data = _ref5.data,
|
|
182
|
+
onVirtualizedFocus = _ref5.onVirtualizedFocus;
|
|
160
183
|
var currentItem = data[index];
|
|
161
184
|
if (/*#__PURE__*/React__default.isValidElement(currentItem) && getComponentId(currentItem) === componentIds.ActionListItem) {
|
|
162
185
|
// Clone the element passed via `data` and add the `_virtualizedIndex` prop
|
|
@@ -177,11 +200,11 @@ var VirtualListItem = /*#__PURE__*/React__default.memo(function (_ref4) {
|
|
|
177
200
|
// Custom comparison function to determine if component should update
|
|
178
201
|
return prevProps.index === nextProps.index && prevProps.style === nextProps.style && prevProps.data[prevProps.index] === nextProps.data[nextProps.index];
|
|
179
202
|
});
|
|
180
|
-
var _ActionListVirtualizedBox = /*#__PURE__*/React__default.forwardRef(function (
|
|
181
|
-
var childrenWithId =
|
|
182
|
-
actionListItemWrapperRole =
|
|
183
|
-
isMultiSelectable =
|
|
184
|
-
rest = _objectWithoutProperties(
|
|
203
|
+
var _ActionListVirtualizedBox = /*#__PURE__*/React__default.forwardRef(function (_ref6, ref) {
|
|
204
|
+
var childrenWithId = _ref6.childrenWithId,
|
|
205
|
+
actionListItemWrapperRole = _ref6.actionListItemWrapperRole,
|
|
206
|
+
isMultiSelectable = _ref6.isMultiSelectable,
|
|
207
|
+
rest = _objectWithoutProperties(_ref6, _excluded3);
|
|
185
208
|
var virtualizedListRef = React__default.useRef(null);
|
|
186
209
|
var _React$useState = React__default.useState(0),
|
|
187
210
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -240,23 +263,24 @@ var _ActionListVirtualizedBox = /*#__PURE__*/React__default.forwardRef(function
|
|
|
240
263
|
itemCount: itemCount,
|
|
241
264
|
itemData: itemData,
|
|
242
265
|
itemKey: function itemKey(index) {
|
|
243
|
-
var
|
|
266
|
+
var _ref7, _itemData$index$props, _itemData$index2, _itemData$index3, _itemData$index4;
|
|
244
267
|
return (// @ts-expect-error: props does exist
|
|
245
|
-
(
|
|
246
|
-
(_itemData$index3 = itemData[index]) === null || _itemData$index3 === void 0 ? void 0 : _itemData$index3.props.title) !== null &&
|
|
268
|
+
(_ref7 = (_itemData$index$props = (_itemData$index2 = itemData[index]) === null || _itemData$index2 === void 0 ? void 0 : _itemData$index2.props.value) !== null && _itemData$index$props !== void 0 ? _itemData$index$props : // @ts-expect-error: props does exist
|
|
269
|
+
(_itemData$index3 = itemData[index]) === null || _itemData$index3 === void 0 ? void 0 : _itemData$index3.props.title) !== null && _ref7 !== void 0 ? _ref7 : // @ts-expect-error: props does exist
|
|
247
270
|
(_itemData$index4 = itemData[index]) === null || _itemData$index4 === void 0 ? void 0 : _itemData$index4.props.key
|
|
248
271
|
);
|
|
249
272
|
},
|
|
250
|
-
onItemsRendered: function onItemsRendered(
|
|
251
|
-
var visibleStartIndex =
|
|
252
|
-
visibleStopIndex =
|
|
273
|
+
onItemsRendered: function onItemsRendered(_ref8) {
|
|
274
|
+
var visibleStartIndex = _ref8.visibleStartIndex,
|
|
275
|
+
visibleStopIndex = _ref8.visibleStopIndex;
|
|
253
276
|
setVisibleStartIndex(visibleStartIndex);
|
|
254
277
|
setVisibleStopIndex(visibleStopIndex);
|
|
255
278
|
},
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
279
|
+
outerElementType: isInBottomSheet ? BottomSheetCompatibleOuterElement : undefined,
|
|
280
|
+
children: useCallback(function (_ref9) {
|
|
281
|
+
var index = _ref9.index,
|
|
282
|
+
style = _ref9.style,
|
|
283
|
+
data = _ref9.data;
|
|
260
284
|
return /*#__PURE__*/jsx(VirtualListItem, {
|
|
261
285
|
index: index,
|
|
262
286
|
style: style,
|