@razorpay/blade 11.24.3 → 11.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/native/components/Avatar/TrustedBadgeIcon.native.js +7 -0
- package/build/lib/native/components/Avatar/TrustedBadgeIcon.native.js.map +1 -0
- package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js +1 -1
- package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js.map +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/native/components/Indicator/Indicator.js +2 -1
- package/build/lib/native/components/Indicator/Indicator.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +4 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js +1 -1
- package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/native/components/StepGroup/StepItemMarker.js +1 -1
- package/build/lib/native/components/StepGroup/StepItemMarker.js.map +1 -1
- package/build/lib/native/components/Table/TableBody.native.js +2 -2
- package/build/lib/native/components/Table/TableBody.native.js.map +1 -1
- package/build/lib/native/components/Table/TableContext.js +6 -0
- package/build/lib/native/components/Table/TableContext.js.map +1 -0
- package/build/lib/native/components/Table/TableEditableCell.native.js +16 -0
- package/build/lib/native/components/Table/TableEditableCell.native.js.map +1 -0
- package/build/lib/native/components/Table/TableEditableCellContext.js +6 -0
- package/build/lib/native/components/Table/TableEditableCellContext.js.map +1 -0
- package/build/lib/native/components/Table/TablePagination.native.js +2 -2
- package/build/lib/native/components/Table/TablePagination.native.js.map +1 -1
- package/build/lib/native/components/Table/TableToolbar.native.js +2 -2
- package/build/lib/native/components/Table/TableToolbar.native.js.map +1 -1
- package/build/lib/native/components/Table/tokens.js +22 -0
- package/build/lib/native/components/Table/tokens.js.map +1 -0
- package/build/lib/native/components/index.js +5 -3
- package/build/lib/native/components/index.js.map +1 -1
- package/build/lib/native/tokens/theme/createTheme.js +1 -1
- package/build/lib/native/tokens/theme/createTheme.js.map +1 -1
- package/build/lib/web/development/components/Avatar/Avatar.web.js +42 -3
- package/build/lib/web/development/components/Avatar/Avatar.web.js.map +1 -1
- package/build/lib/web/development/components/Avatar/AvatarButton.js +8 -3
- package/build/lib/web/development/components/Avatar/AvatarButton.js.map +1 -1
- package/build/lib/web/development/components/Avatar/StyledAvatar.js +11 -5
- package/build/lib/web/development/components/Avatar/StyledAvatar.js.map +1 -1
- package/build/lib/web/development/components/Avatar/StyledAvatarButton.js +10 -6
- package/build/lib/web/development/components/Avatar/StyledAvatarButton.js.map +1 -1
- package/build/lib/web/development/components/Avatar/TrustedBadgeIcon.web.js +195 -0
- package/build/lib/web/development/components/Avatar/TrustedBadgeIcon.web.js.map +1 -0
- package/build/lib/web/development/components/Avatar/avatarTokens.js +61 -1
- package/build/lib/web/development/components/Avatar/avatarTokens.js.map +1 -1
- package/build/lib/web/development/components/Avatar/index.js +1 -0
- package/build/lib/web/development/components/Avatar/index.js.map +1 -1
- package/build/lib/web/development/components/BaseMenu/BaseMenuItem/BaseMenuItem.js +1 -1
- package/build/lib/web/development/components/BaseMenu/BaseMenuItem/BaseMenuItem.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js +3 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/development/components/Indicator/Indicator.js +7 -2
- package/build/lib/web/development/components/Indicator/Indicator.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +1 -1
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +5 -3
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js +55 -33
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js +4 -4
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js +4 -2
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +22 -4
- package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js +3 -3
- package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/web/development/components/StepGroup/StepItemMarker.js +0 -1
- package/build/lib/web/development/components/StepGroup/StepItemMarker.js.map +1 -1
- package/build/lib/web/development/components/Table/TableBody.web.js +26 -166
- package/build/lib/web/development/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableEditableCell.web.js +194 -0
- package/build/lib/web/development/components/Table/TableEditableCell.web.js.map +1 -0
- package/build/lib/web/development/components/Table/TableEditableCellContext.js +12 -0
- package/build/lib/web/development/components/Table/TableEditableCellContext.js.map +1 -0
- package/build/lib/web/development/components/Table/TablePagination.web.js +3 -2
- package/build/lib/web/development/components/Table/TablePagination.web.js.map +1 -1
- package/build/lib/web/development/components/Table/index.js +2 -2
- package/build/lib/web/development/components/Table/tokens.js +14 -2
- package/build/lib/web/development/components/Table/tokens.js.map +1 -1
- package/build/lib/web/development/components/index.js +3 -1
- package/build/lib/web/development/components/index.js.map +1 -1
- package/build/lib/web/development/tokens/theme/createTheme.js +5 -2
- package/build/lib/web/development/tokens/theme/createTheme.js.map +1 -1
- package/build/lib/web/production/components/Avatar/Avatar.web.js +42 -3
- package/build/lib/web/production/components/Avatar/Avatar.web.js.map +1 -1
- package/build/lib/web/production/components/Avatar/AvatarButton.js +8 -3
- package/build/lib/web/production/components/Avatar/AvatarButton.js.map +1 -1
- package/build/lib/web/production/components/Avatar/StyledAvatar.js +11 -5
- package/build/lib/web/production/components/Avatar/StyledAvatar.js.map +1 -1
- package/build/lib/web/production/components/Avatar/StyledAvatarButton.js +10 -6
- package/build/lib/web/production/components/Avatar/StyledAvatarButton.js.map +1 -1
- package/build/lib/web/production/components/Avatar/TrustedBadgeIcon.web.js +195 -0
- package/build/lib/web/production/components/Avatar/TrustedBadgeIcon.web.js.map +1 -0
- package/build/lib/web/production/components/Avatar/avatarTokens.js +61 -1
- package/build/lib/web/production/components/Avatar/avatarTokens.js.map +1 -1
- package/build/lib/web/production/components/Avatar/index.js +1 -0
- package/build/lib/web/production/components/Avatar/index.js.map +1 -1
- package/build/lib/web/production/components/BaseMenu/BaseMenuItem/BaseMenuItem.js +1 -1
- package/build/lib/web/production/components/BaseMenu/BaseMenuItem/BaseMenuItem.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js +3 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/production/components/Indicator/Indicator.js +7 -2
- package/build/lib/web/production/components/Indicator/Indicator.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +1 -1
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +5 -3
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js +55 -33
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js +4 -4
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js +4 -2
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +22 -4
- package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js +3 -3
- package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/web/production/components/StepGroup/StepItemMarker.js +0 -1
- package/build/lib/web/production/components/StepGroup/StepItemMarker.js.map +1 -1
- package/build/lib/web/production/components/Table/TableBody.web.js +26 -166
- package/build/lib/web/production/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableEditableCell.web.js +194 -0
- package/build/lib/web/production/components/Table/TableEditableCell.web.js.map +1 -0
- package/build/lib/web/production/components/Table/TableEditableCellContext.js +12 -0
- package/build/lib/web/production/components/Table/TableEditableCellContext.js.map +1 -0
- package/build/lib/web/production/components/Table/TablePagination.web.js +3 -2
- package/build/lib/web/production/components/Table/TablePagination.web.js.map +1 -1
- package/build/lib/web/production/components/Table/index.js +2 -2
- package/build/lib/web/production/components/Table/tokens.js +14 -2
- package/build/lib/web/production/components/Table/tokens.js.map +1 -1
- package/build/lib/web/production/components/index.js +3 -1
- package/build/lib/web/production/components/index.js.map +1 -1
- package/build/lib/web/production/tokens/theme/createTheme.js +5 -2
- package/build/lib/web/production/tokens/theme/createTheme.js.map +1 -1
- package/build/types/components/index.d.ts +38 -20
- package/build/types/components/index.native.d.ts +37 -22
- package/build/types/tokens/index.d.ts +6 -3
- package/build/types/tokens/index.native.d.ts +6 -3
- package/package.json +1 -1
- package/build/lib/web/development/components/Table/types.js +0 -2
- package/build/lib/web/development/components/Table/types.js.map +0 -1
- package/build/lib/web/production/components/Table/types.js +0 -2
- package/build/lib/web/production/components/Table/types.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTheme.js","sources":["../../../../../../src/tokens/theme/createTheme.ts"],"sourcesContent":["import tinycolor from 'tinycolor2';\nimport type { WCAG2Options, ColorInput } from 'tinycolor2';\nimport type { ThemeTokens } from './theme';\nimport overrideTheme from './overrideTheme';\nimport bladeTheme from './bladeTheme';\nimport { colors as globalColors, opacity } from '~tokens/global';\nimport type { ColorChromaticScale } from '~tokens/global/colors';\nimport { throwBladeError } from '~utils/logger';\nimport type { DeepPartial } from '~utils/isPartialMatchObjectKeys';\n\n// WCAG2ContrastOptions are the options used to determine if a color is readable\nconst WCAG2ContrastOptions: WCAG2Options = {\n level: 'AAA',\n size: 'large',\n};\n\n/**\n * getColorWithOpacity\n * @param color - The color to add opacity to\n * @param opacity - The opacity to add to the color\n * @returns The color with the opacity added\n * @example\n * getColorWithOpacity('#fff', 0.5) // returns 'hsla(0, 0%, 100%, 0.5)'\n *\n **/\nconst getColorWithOpacity = (color: ColorInput, opacity: number): string => {\n return tinycolor(color).setAlpha(opacity).toHslString();\n};\n\n/**\n *\n * @description\n * Generates a chromatic color palette based on the base color passed in.\n * The base color is used to generate a palette of 11 colors, 5 shades lighter and 5 shades darker than the base color.\n * @param baseColorInput - The base color to generate the chromatic color palette from in hex, rgb, or hsl format\n * @returns Array of chromatic color palette\n */\nconst generateChromaticBrandColors = (baseColorInput: ColorInput): ColorChromaticScale => {\n const baseColor = tinycolor(baseColorInput);\n const baseColorHslString = baseColor.toHslString();\n if (__DEV__) {\n if (!baseColor.isValid()) {\n throwBladeError({\n message: 'Invalid brandColor passed',\n moduleName: 'createTheme',\n });\n }\n }\n\n const palette = [baseColorHslString]; // Include the original color\n const brightness = tinycolor(baseColor).getBrightness();\n // Determine how much to lighten or darken the colors depending on the brightness of the base color\n const lightnessFactor = brightness > 150 ? 3 : 6;\n const darknessFactor = brightness < 50 ? 3 : 5;\n\n let currentColor = baseColor;\n\n // Generate shades lighter\n for (let lightShadeIndex = 0; lightShadeIndex < 6; lightShadeIndex++) {\n currentColor = currentColor.brighten(lightnessFactor);\n palette.push(currentColor.toHslString());\n }\n\n currentColor = tinycolor(baseColorHslString); // Reset to the base color\n\n // Generate shades darker\n for (let darkShadeIndex = 0; darkShadeIndex < 4; darkShadeIndex++) {\n currentColor = currentColor.darken(darknessFactor);\n palette.unshift(currentColor.toHslString()); // Add shades at the beginning of the palette\n }\n\n const colorPalette = palette.reverse();\n const brandPrimaryColor = colorPalette[6];\n\n const brandColors: ColorChromaticScale = {\n '50': colorPalette[0],\n '100': colorPalette[1],\n '200': colorPalette[2],\n '300': colorPalette[3],\n '400': colorPalette[4],\n '500': colorPalette[5],\n '600': brandPrimaryColor,\n '700': colorPalette[7],\n '800': colorPalette[8],\n '900': colorPalette[9],\n '1000': colorPalette[10],\n a50: getColorWithOpacity(brandPrimaryColor, opacity[100]),\n a150: getColorWithOpacity(brandPrimaryColor, opacity[100]),\n a100: getColorWithOpacity(brandPrimaryColor, opacity[200]),\n a200: getColorWithOpacity(brandPrimaryColor, opacity[300]),\n };\n\n return brandColors;\n};\n\n/**\n *\n * @param brandColors - The brand colors to use to override the light theme\n * @description Returns overrides for the light theme with the brand colors passed in\n * @returns Overrides for the light theme with the custom brand colors\n */\nconst getOnLightOverrides = (\n brandColors: ColorChromaticScale,\n): DeepPartial<ThemeTokens['colors']['onLight']> => {\n // Select the most readable color to use as the foreground color on top of surface color\n // For example: On Secondary Button where the background color is surface color, the text color should be either the brand color or dark color depending on which is more readable on top of that surface color\n const foregroundOnSurface = tinycolor.isReadable(\n globalColors.neutral.blueGrayLight[50],\n brandColors[600],\n WCAG2ContrastOptions,\n )\n ? brandColors[600]\n : globalColors.neutral.blueGrayLight[1100];\n\n const foregroundOnBrand = tinycolor\n .mostReadable(\n brandColors[900],\n [globalColors.neutral.white[500], globalColors.neutral.black[500]],\n WCAG2ContrastOptions,\n )\n .toHslString();\n\n // Overrides for the light theme with the brand colors passed in\n const lightThemeOverrides: DeepPartial<ThemeTokens['colors']['onLight']> = {\n interactive: {\n background: {\n primary: {\n default: brandColors[600],\n highlighted: brandColors[700],\n disabled: brandColors.a100,\n faded: brandColors.a100,\n fadedHighlighted: brandColors.a150,\n },\n },\n border: {\n primary: {\n default: brandColors[600],\n highlighted: brandColors[700],\n disabled: brandColors.a100,\n faded: brandColors.a100,\n },\n },\n text: {\n primary: {\n normal: foregroundOnSurface,\n disabled: foregroundOnSurface,\n muted: foregroundOnSurface,\n subtle: foregroundOnSurface,\n },\n onPrimary: {\n normal: foregroundOnBrand,\n disabled: foregroundOnBrand,\n muted: foregroundOnBrand,\n subtle: foregroundOnBrand,\n },\n },\n icon: {\n primary: {\n normal: foregroundOnSurface,\n disabled: foregroundOnSurface,\n muted: foregroundOnSurface,\n subtle: foregroundOnSurface,\n },\n onPrimary: {\n normal: foregroundOnBrand,\n disabled: foregroundOnBrand,\n muted: foregroundOnBrand,\n subtle: foregroundOnBrand,\n },\n },\n },\n surface: {\n background: {\n primary: {\n intense: brandColors[600],\n subtle: brandColors[200],\n },\n },\n icon: {\n primary: {\n normal: brandColors[600],\n },\n },\n text: {\n primary: {\n normal: brandColors[600],\n },\n },\n },\n };\n\n return lightThemeOverrides;\n};\n\n/**\n *\n * @param brandColors - The brand colors to use to override the dark theme\n * @description Returns overrides for the dark theme with the brand colors passed in\n * @returns Overrides for the dark theme with the custom brand colors\n */\nconst getOnDarkOverrides = (\n brandColors: ColorChromaticScale,\n): DeepPartial<ThemeTokens['colors']['onDark']> => {\n // Select the most readable color to use as the foreground color on top of surface color\n // For example: On Secondary Button where the background color is surface color, the text color should be either the brand color or dark color depending on which is more readable on top of that surface color\n const foregroundOnSurface = tinycolor.isReadable(\n globalColors.neutral.blueGrayDark[1100],\n brandColors[400],\n WCAG2ContrastOptions,\n )\n ? brandColors[400]\n : globalColors.neutral.blueGrayDark[0];\n\n const foregroundOnBrand = tinycolor\n .mostReadable(\n brandColors[900],\n [globalColors.neutral.white[500], globalColors.neutral.black[500]],\n WCAG2ContrastOptions,\n )\n .toHslString();\n\n // Overrides for the dark theme with the brand colors passed in\n const darkThemeOverrides: DeepPartial<ThemeTokens['colors']['onDark']> = {\n interactive: {\n background: {\n primary: {\n default: brandColors[600],\n highlighted: brandColors[700],\n disabled: brandColors.a100,\n faded: brandColors.a100,\n fadedHighlighted: brandColors.a150,\n },\n },\n border: {\n primary: {\n default: brandColors[600],\n highlighted: brandColors[700],\n disabled: brandColors.a100,\n faded: brandColors.a100,\n },\n },\n text: {\n primary: {\n normal: foregroundOnSurface,\n disabled: foregroundOnSurface,\n muted: foregroundOnSurface,\n subtle: foregroundOnSurface,\n },\n onPrimary: {\n normal: foregroundOnBrand,\n disabled: foregroundOnBrand,\n muted: foregroundOnBrand,\n subtle: foregroundOnBrand,\n },\n },\n icon: {\n primary: {\n normal: foregroundOnSurface,\n disabled: foregroundOnSurface,\n muted: foregroundOnSurface,\n subtle: foregroundOnSurface,\n },\n onPrimary: {\n normal: foregroundOnBrand,\n disabled: foregroundOnBrand,\n muted: foregroundOnBrand,\n subtle: foregroundOnBrand,\n },\n },\n },\n surface: {\n background: {\n primary: {\n intense: brandColors[600],\n subtle: brandColors[200],\n },\n },\n icon: {\n primary: {\n normal: brandColors[600],\n },\n },\n },\n };\n\n return darkThemeOverrides;\n};\n\n/**\n * @param {Object} themeConfig - The brand color and overrides to apply to the theme\n * @param {string} themeConfig.brandColor - The brand color to use to generate the theme. Can be in hex, rgb, or hsl format.\n * @description\n * Creates a Blade Theme based on the custom brand color\n * @returns The Theme Tokens with the custom brand colors\n * @example\n * const theme = createTheme({ brandColor: '#19BEA2'})\n **/\nexport const createTheme = ({ brandColor }: { brandColor: ColorInput }): ThemeTokens => {\n const chromaticBrandColors = generateChromaticBrandColors(brandColor);\n // Get onLight overrides\n const brandedLightTheme = getOnLightOverrides(chromaticBrandColors);\n // Get onDark overrides\n const brandedDarkTheme = getOnDarkOverrides(chromaticBrandColors);\n // Override the payment theme with the brand colors\n const brandedThemeTokens = overrideTheme({\n baseThemeTokens: bladeTheme,\n overrides: {\n name: `custom-${tinycolor(brandColor).toHex()}`,\n colors: {\n onLight: {\n ...brandedLightTheme,\n },\n onDark: {\n ...brandedDarkTheme,\n },\n },\n },\n });\n\n return brandedThemeTokens;\n};\n"],"names":["WCAG2ContrastOptions","level","size","getColorWithOpacity","color","opacity","tinycolor","setAlpha","toHslString","generateChromaticBrandColors","baseColorInput","baseColor","baseColorHslString","isValid","throwBladeError","message","moduleName","palette","brightness","getBrightness","lightnessFactor","darknessFactor","currentColor","lightShadeIndex","brighten","push","darkShadeIndex","darken","unshift","colorPalette","reverse","brandPrimaryColor","brandColors","a50","a150","a100","a200","getOnLightOverrides","foregroundOnSurface","isReadable","globalColors","neutral","blueGrayLight","foregroundOnBrand","mostReadable","white","black","lightThemeOverrides","interactive","background","primary","highlighted","disabled","faded","fadedHighlighted","border","text","normal","muted","subtle","onPrimary","icon","surface","intense","getOnDarkOverrides","blueGrayDark","darkThemeOverrides","createTheme","_ref","brandColor","chromaticBrandColors","brandedLightTheme","brandedDarkTheme","brandedThemeTokens","overrideTheme","baseThemeTokens","bladeTheme","overrides","name","concat","toHex","colors","onLight","_objectSpread","onDark"],"mappings":";;;;;;;;;;;;AAUA;AACA,IAAMA,oBAAkC,GAAG;AACzCC,EAAAA,KAAK,EAAE,KAAK;AACZC,EAAAA,IAAI,EAAE,OAAA;AACR,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIC,KAAiB,EAAEC,OAAe,EAAa;AAC1E,EAAA,OAA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B,WAAW,CAAC,GAAG,CAAA;AACzB,SAAA;AACF,OAAA;AACF,KAAA;GACD,CAAA;AAED,EAAA,OAAOkC,kBAAkB,CAAA;AAC3B,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACaC,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAAgE;AAAA,EAAA,IAA1DC,UAAU,GAAAD,IAAA,CAAVC,UAAU,CAAA;AACtC,EAAA,IAAMC,oBAAoB,GAAG7D,4BAA4B,CAAC4D,UAAU,CAAC,CAAA;AACrE;AACA,EAAA,IAAME,iBAAiB,GAAGlC,mBAAmB,CAACiC,oBAAoB,CAAC,CAAA;AACnE;AACA,EAAA,IAAME,gBAAgB,GAAGR,kBAAkB,CAACM,oBAAoB,CAAC,CAAA;AACjE;EACA,IAAMG,kBAAkB,GAAGC,aAAa,CAAC;AACvCC,IAAAA,eAAe,EAAEC,UAAU;AAC3BC,IAAAA,SAAS,EAAE;MACTC,IAAI,EAAA,SAAA,CAAAC,MAAA,CAAYzE,SAAS,CAAC+D,UAAU,CAAC,CAACW,KAAK,EAAE,CAAE;AAC/CC,MAAAA,MAAM,EAAE;AACNC,QAAAA,OAAO,EAAAC,aAAA,CACFZ,EAAAA,EAAAA,iBAAiB,CACrB;QACDa,MAAM,EAAAD,aAAA,CAAA,EAAA,EACDX,gBAAgB,CAAA;AAEvB,OAAA;AACF,KAAA;AACF,GAAC,CAAC,CAAA;AAEF,EAAA,OAAOC,kBAAkB,CAAA;AAC3B;;;;"}
|
|
1
|
+
{"version":3,"file":"createTheme.js","sources":["../../../../../../src/tokens/theme/createTheme.ts"],"sourcesContent":["import tinycolor from 'tinycolor2';\nimport type { WCAG2Options, ColorInput } from 'tinycolor2';\nimport type { ThemeTokens } from './theme';\nimport overrideTheme from './overrideTheme';\nimport bladeTheme from './bladeTheme';\nimport { colors as globalColors, opacity } from '~tokens/global';\nimport type { ColorChromaticScale } from '~tokens/global/colors';\nimport { throwBladeError } from '~utils/logger';\nimport type { DeepPartial } from '~utils/isPartialMatchObjectKeys';\n\n// WCAG2ContrastOptions are the options used to determine if a color is readable\nconst WCAG2ContrastOptions: WCAG2Options = {\n level: 'AAA',\n size: 'large',\n};\n\n/**\n * getColorWithOpacity\n * @param color - The color to add opacity to\n * @param opacity - The opacity to add to the color\n * @returns The color with the opacity added\n * @example\n * getColorWithOpacity('#fff', 0.5) // returns 'hsla(0, 0%, 100%, 0.5)'\n *\n **/\nconst getColorWithOpacity = (color: ColorInput, opacity: number): string => {\n return tinycolor(color).setAlpha(opacity).toHslString();\n};\n\n/**\n *\n * @description\n * Generates a chromatic color palette based on the base color passed in.\n * The base color is used to generate a palette of 11 colors, 5 shades lighter and 5 shades darker than the base color.\n * @param baseColorInput - The base color to generate the chromatic color palette from in hex, rgb, or hsl format\n * @returns Array of chromatic color palette\n */\nconst generateChromaticBrandColors = (baseColorInput: ColorInput): ColorChromaticScale => {\n const baseColor = tinycolor(baseColorInput);\n const baseColorHslString = baseColor.toHslString();\n if (__DEV__) {\n if (!baseColor.isValid()) {\n throwBladeError({\n message: 'Invalid brandColor passed',\n moduleName: 'createTheme',\n });\n }\n }\n\n const palette = [baseColorHslString]; // Include the original color\n const brightness = tinycolor(baseColor).getBrightness();\n // Determine how much to lighten or darken the colors depending on the brightness of the base color\n const lightnessFactor = brightness > 150 ? 3 : 6;\n const darknessFactor = brightness < 50 ? 3 : 5;\n\n let currentColor = baseColor;\n\n // Generate shades lighter\n for (let lightShadeIndex = 0; lightShadeIndex < 6; lightShadeIndex++) {\n currentColor = currentColor.brighten(lightnessFactor);\n palette.push(currentColor.toHslString());\n }\n\n currentColor = tinycolor(baseColorHslString); // Reset to the base color\n\n // Generate shades darker\n for (let darkShadeIndex = 0; darkShadeIndex < 4; darkShadeIndex++) {\n currentColor = currentColor.darken(darknessFactor);\n palette.unshift(currentColor.toHslString()); // Add shades at the beginning of the palette\n }\n\n const colorPalette = palette.reverse();\n const brandPrimaryColor = colorPalette[6];\n\n const brandColors: ColorChromaticScale = {\n '50': colorPalette[0],\n '100': colorPalette[1],\n '200': colorPalette[2],\n '300': colorPalette[3],\n '400': colorPalette[4],\n '500': colorPalette[5],\n '600': brandPrimaryColor,\n '700': colorPalette[7],\n '800': colorPalette[8],\n '900': colorPalette[9],\n '1000': colorPalette[10],\n a50: getColorWithOpacity(brandPrimaryColor, opacity[100]),\n a150: getColorWithOpacity(brandPrimaryColor, opacity[100]),\n a100: getColorWithOpacity(brandPrimaryColor, opacity[200]),\n a200: getColorWithOpacity(brandPrimaryColor, opacity[300]),\n };\n\n return brandColors;\n};\n\n/**\n *\n * @param brandColors - The brand colors to use to override the light theme\n * @description Returns overrides for the light theme with the brand colors passed in\n * @returns Overrides for the light theme with the custom brand colors\n */\nconst getOnLightOverrides = (\n brandColors: ColorChromaticScale,\n): DeepPartial<ThemeTokens['colors']['onLight']> => {\n // Select the most readable color to use as the foreground color on top of surface color\n // For example: On Secondary Button where the background color is surface color, the text color should be either the brand color or dark color depending on which is more readable on top of that surface color\n const foregroundOnSurface = tinycolor.isReadable(\n globalColors.neutral.blueGrayLight[50],\n brandColors[600],\n WCAG2ContrastOptions,\n )\n ? brandColors[600]\n : globalColors.neutral.blueGrayLight[1100];\n\n const foregroundOnBrand = tinycolor\n .mostReadable(\n brandColors[900],\n [globalColors.neutral.white[500], globalColors.neutral.black[500]],\n WCAG2ContrastOptions,\n )\n .toHslString();\n\n // Overrides for the light theme with the brand colors passed in\n const lightThemeOverrides: DeepPartial<ThemeTokens['colors']['onLight']> = {\n interactive: {\n background: {\n primary: {\n default: brandColors[600],\n highlighted: brandColors[700],\n disabled: brandColors.a100,\n faded: brandColors.a100,\n fadedHighlighted: brandColors.a150,\n },\n },\n border: {\n primary: {\n default: brandColors[600],\n highlighted: brandColors[700],\n disabled: brandColors.a100,\n faded: brandColors.a100,\n },\n },\n text: {\n primary: {\n normal: foregroundOnSurface,\n disabled: foregroundOnSurface,\n muted: foregroundOnSurface,\n subtle: foregroundOnSurface,\n },\n onPrimary: {\n normal: foregroundOnBrand,\n disabled: foregroundOnBrand,\n muted: foregroundOnBrand,\n subtle: foregroundOnBrand,\n },\n },\n icon: {\n primary: {\n normal: foregroundOnSurface,\n disabled: foregroundOnSurface,\n muted: foregroundOnSurface,\n subtle: foregroundOnSurface,\n },\n onPrimary: {\n normal: foregroundOnBrand,\n disabled: foregroundOnBrand,\n muted: foregroundOnBrand,\n subtle: foregroundOnBrand,\n },\n },\n },\n surface: {\n background: {\n primary: {\n intense: brandColors[600],\n subtle: brandColors[200],\n },\n },\n icon: {\n primary: {\n normal: brandColors[600],\n },\n },\n text: {\n primary: {\n normal: brandColors[600],\n },\n },\n },\n };\n\n return lightThemeOverrides;\n};\n\n/**\n *\n * @param brandColors - The brand colors to use to override the dark theme\n * @description Returns overrides for the dark theme with the brand colors passed in\n * @returns Overrides for the dark theme with the custom brand colors\n */\nconst getOnDarkOverrides = (\n brandColors: ColorChromaticScale,\n): DeepPartial<ThemeTokens['colors']['onDark']> => {\n // Select the most readable color to use as the foreground color on top of surface color\n // For example: On Secondary Button where the background color is surface color, the text color should be either the brand color or dark color depending on which is more readable on top of that surface color\n const foregroundOnSurface = tinycolor.isReadable(\n globalColors.neutral.blueGrayDark[1100],\n brandColors[400],\n WCAG2ContrastOptions,\n )\n ? brandColors[400]\n : globalColors.neutral.blueGrayDark[0];\n\n const foregroundOnBrand = tinycolor\n .mostReadable(\n brandColors[900],\n [globalColors.neutral.white[500], globalColors.neutral.black[500]],\n WCAG2ContrastOptions,\n )\n .toHslString();\n\n // Overrides for the dark theme with the brand colors passed in\n const darkThemeOverrides: DeepPartial<ThemeTokens['colors']['onDark']> = {\n interactive: {\n background: {\n primary: {\n default: brandColors[600],\n highlighted: brandColors[700],\n disabled: brandColors.a100,\n faded: brandColors.a100,\n fadedHighlighted: brandColors.a150,\n },\n },\n border: {\n primary: {\n default: brandColors[600],\n highlighted: brandColors[700],\n disabled: brandColors.a100,\n faded: brandColors.a100,\n },\n },\n text: {\n primary: {\n normal: foregroundOnSurface,\n disabled: foregroundOnSurface,\n muted: foregroundOnSurface,\n subtle: foregroundOnSurface,\n },\n onPrimary: {\n normal: foregroundOnBrand,\n disabled: foregroundOnBrand,\n muted: foregroundOnBrand,\n subtle: foregroundOnBrand,\n },\n },\n icon: {\n primary: {\n normal: foregroundOnSurface,\n disabled: foregroundOnSurface,\n muted: foregroundOnSurface,\n subtle: foregroundOnSurface,\n },\n onPrimary: {\n normal: foregroundOnBrand,\n disabled: foregroundOnBrand,\n muted: foregroundOnBrand,\n subtle: foregroundOnBrand,\n },\n },\n },\n surface: {\n background: {\n primary: {\n intense: brandColors[600],\n subtle: brandColors[200],\n },\n },\n icon: {\n primary: {\n normal: brandColors[600],\n },\n },\n },\n };\n\n return darkThemeOverrides;\n};\n\n/**\n * @param {Object} themeConfig - The brand color and overrides to apply to the theme\n * @param {string} themeConfig.brandColor - The brand color to use to generate the theme. Can be in hex, rgb, or hsl format.\n * @description\n * Creates a Blade Theme based on the custom brand color\n * @returns The Theme Tokens with the custom brand colors\n * @example\n * const { theme, brandColors } = createTheme({ brandColor: '#19BEA2'})\n **/\nexport const createTheme = ({\n brandColor,\n}: {\n brandColor: ColorInput;\n}): { theme: ThemeTokens; brandColors: ColorChromaticScale } => {\n const chromaticBrandColors = generateChromaticBrandColors(brandColor);\n // Get onLight overrides\n const brandedLightTheme = getOnLightOverrides(chromaticBrandColors);\n // Get onDark overrides\n const brandedDarkTheme = getOnDarkOverrides(chromaticBrandColors);\n // Override the payment theme with the brand colors\n const brandedThemeTokens = overrideTheme({\n baseThemeTokens: bladeTheme,\n overrides: {\n name: `custom-${tinycolor(brandColor).toHex()}`,\n colors: {\n onLight: {\n ...brandedLightTheme,\n },\n onDark: {\n ...brandedDarkTheme,\n },\n },\n },\n });\n\n return { theme: brandedThemeTokens, brandColors: chromaticBrandColors };\n};\n"],"names":["WCAG2ContrastOptions","level","size","getColorWithOpacity","color","opacity","tinycolor","setAlpha","toHslString","generateChromaticBrandColors","baseColorInput","baseColor","baseColorHslString","isValid","throwBladeError","message","moduleName","palette","brightness","getBrightness","lightnessFactor","darknessFactor","currentColor","lightShadeIndex","brighten","push","darkShadeIndex","darken","unshift","colorPalette","reverse","brandPrimaryColor","brandColors","a50","a150","a100","a200","getOnLightOverrides","foregroundOnSurface","isReadable","globalColors","neutral","blueGrayLight","foregroundOnBrand","mostReadable","white","black","lightThemeOverrides","interactive","background","primary","highlighted","disabled","faded","fadedHighlighted","border","text","normal","muted","subtle","onPrimary","icon","surface","intense","getOnDarkOverrides","blueGrayDark","darkThemeOverrides","createTheme","_ref","brandColor","chromaticBrandColors","brandedLightTheme","brandedDarkTheme","brandedThemeTokens","overrideTheme","baseThemeTokens","bladeTheme","overrides","name","concat","toHex","colors","onLight","_objectSpread","onDark","theme"],"mappings":";;;;;;;;;;;;AAUA;AACA,IAAMA,oBAAkC,GAAG;AACzCC,EAAAA,KAAK,EAAE,KAAK;AACZC,EAAAA,IAAI,EAAE,OAAA;AACR,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIC,KAAiB,EAAEC,OAAe,EAAa;AAC1E,EAAA,OAAOC,SAAS,CAACF,KAAK,CAAC,CAACG,QAAQ,CAACF,OAAO,CAAC,CAACG,WAAW,EAAE,CAAA;AACzD,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,4BAA4B,GAAG,SAA/BA,4BAA4BA,CAAIC,cAA0B,EAA0B;AACxF,EAAA,IAAMC,SAAS,GAAGL,SAAS,CAACI,cAAc,CAAC,CAAA;AAC3C,EAAA,IAAME,kBAAkB,GAAGD,SAAS,CAACH,WAAW,EAAE,CAAA;AAClD,EAAA,IAAI,KAAO,EAAE;AACX,IAAA,IAAI,CAACG,SAAS,CAACE,OAAO,EAAE,EAAE;AACxBC,MAAAA,eAAe,CAAC;AACdC,QAAA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gB,GAAGR,kBAAkB,CAACM,oBAAoB,CAAC,CAAA;AACjE;EACA,IAAMG,kBAAkB,GAAGC,aAAa,CAAC;AACvCC,IAAAA,eAAe,EAAEC,UAAU;AAC3BC,IAAAA,SAAS,EAAE;MACTC,IAAI,EAAA,SAAA,CAAAC,MAAA,CAAYzE,SAAS,CAAC+D,UAAU,CAAC,CAACW,KAAK,EAAE,CAAE;AAC/CC,MAAAA,MAAM,EAAE;AACNC,QAAAA,OAAO,EAAAC,aAAA,CACFZ,EAAAA,EAAAA,iBAAiB,CACrB;QACDa,MAAM,EAAAD,aAAA,CAAA,EAAA,EACDX,gBAAgB,CAAA;AAEvB,OAAA;AACF,KAAA;AACF,GAAC,CAAC,CAAA;EAEF,OAAO;AAAEa,IAAAA,KAAK,EAAEZ,kBAAkB;AAAEzC,IAAAA,WAAW,EAAEsC,oBAAAA;GAAsB,CAAA;AACzE;;;;"}
|
|
@@ -3658,6 +3658,20 @@ type AvatarCommonProps = {
|
|
|
3658
3658
|
* Click handler for the avatar.
|
|
3659
3659
|
*/
|
|
3660
3660
|
onClick?: (event: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
3661
|
+
isSelected?: boolean;
|
|
3662
|
+
/**
|
|
3663
|
+
* Custom icon component to render at bottom of the avatar.
|
|
3664
|
+
* Only accepts:
|
|
3665
|
+
* - IconComponent
|
|
3666
|
+
*/
|
|
3667
|
+
bottomAddon?: IconComponent;
|
|
3668
|
+
/**
|
|
3669
|
+
* Custom component to render at top of the avatar.
|
|
3670
|
+
*
|
|
3671
|
+
* Only accepts:
|
|
3672
|
+
* - Indicator
|
|
3673
|
+
*/
|
|
3674
|
+
topAddon?: React__default.ReactElement;
|
|
3661
3675
|
testID?: string;
|
|
3662
3676
|
} & BladeCommonEvents & StyledPropsBlade;
|
|
3663
3677
|
type AvatarProps = AvatarCommonProps & AvatarImgProps;
|
|
@@ -3690,6 +3704,9 @@ declare const Avatar: React__default.ForwardRefExoticComponent<{
|
|
|
3690
3704
|
target?: string | undefined;
|
|
3691
3705
|
rel?: string | undefined;
|
|
3692
3706
|
onClick?: ((event: React__default.MouseEvent<HTMLButtonElement, MouseEvent>) => void) | undefined;
|
|
3707
|
+
isSelected?: boolean | undefined;
|
|
3708
|
+
bottomAddon?: IconComponent | undefined;
|
|
3709
|
+
topAddon?: React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | undefined;
|
|
3693
3710
|
testID?: string | undefined;
|
|
3694
3711
|
} & BladeCommonEvents & Partial<Omit<MarginProps & Pick<FlexboxProps, "alignSelf" | "justifySelf" | "order" | "placeSelf"> & {
|
|
3695
3712
|
bottom: SpacingValueType | {
|
|
@@ -4285,6 +4302,8 @@ declare const Avatar: React__default.ForwardRefExoticComponent<{
|
|
|
4285
4302
|
*/
|
|
4286
4303
|
declare const AvatarGroup: ({ children, size, maxCount, testID, ...styledProps }: AvatarGroupProps) => React__default.ReactElement;
|
|
4287
4304
|
|
|
4305
|
+
declare const TrustedBadgeIcon: IconComponent;
|
|
4306
|
+
|
|
4288
4307
|
type SnapPoints = [number, number, number];
|
|
4289
4308
|
|
|
4290
4309
|
type BaseFooterProps = {
|
|
@@ -7185,6 +7204,10 @@ type BaseInputCommonProps = FormInputLabelProps & FormInputValidationProps & {
|
|
|
7185
7204
|
* @default true
|
|
7186
7205
|
**/
|
|
7187
7206
|
isTableInputCell?: boolean;
|
|
7207
|
+
/**
|
|
7208
|
+
* Hides the form hints and shows them as tooltip of trailing
|
|
7209
|
+
*/
|
|
7210
|
+
showHintsAsTooltip?: boolean;
|
|
7188
7211
|
} & TestID & Platform.Select<{
|
|
7189
7212
|
native: {
|
|
7190
7213
|
/**
|
|
@@ -8056,6 +8079,12 @@ type DropdownProps = {
|
|
|
8056
8079
|
onOpenChange?: (isOpen: boolean) => void;
|
|
8057
8080
|
selectionType?: 'single' | 'multiple';
|
|
8058
8081
|
children: React__default.ReactNode[];
|
|
8082
|
+
/**
|
|
8083
|
+
* @private
|
|
8084
|
+
*
|
|
8085
|
+
* width prop for outer relative container of Dropdown. Use width prop on DropdownOverlay to change width of menu
|
|
8086
|
+
*/
|
|
8087
|
+
_width?: BoxProps['width'];
|
|
8059
8088
|
} & TestID & StyledPropsBlade;
|
|
8060
8089
|
type DropdownOverlayProps = {
|
|
8061
8090
|
children: React__default.ReactElement[] | React__default.ReactElement;
|
|
@@ -8098,7 +8127,7 @@ type DropdownOverlayProps = {
|
|
|
8098
8127
|
defaultPlacement?: Placement;
|
|
8099
8128
|
} & TestID;
|
|
8100
8129
|
|
|
8101
|
-
declare const Dropdown: ({ children, isOpen: isOpenControlled, onOpenChange, selectionType, testID, ...styledProps }: DropdownProps) => React__default.ReactElement;
|
|
8130
|
+
declare const Dropdown: ({ children, isOpen: isOpenControlled, onOpenChange, selectionType, testID, _width, ...styledProps }: DropdownProps) => React__default.ReactElement;
|
|
8102
8131
|
|
|
8103
8132
|
declare const DropdownOverlay: ({ children, testID, zIndex, width, minWidth, maxWidth, referenceRef, defaultPlacement, }: DropdownOverlayProps) => React__default.ReactElement | null;
|
|
8104
8133
|
|
|
@@ -8320,7 +8349,7 @@ type FileUploadProps = (FileUploadPropsWithA11yLabel | FileUploadPropsWithLabel)
|
|
|
8320
8349
|
*/
|
|
8321
8350
|
declare const FileUpload: React$1.ForwardRefExoticComponent<FileUploadProps & React$1.RefAttributes<BladeElementRef>>;
|
|
8322
8351
|
|
|
8323
|
-
type
|
|
8352
|
+
type IndicatorProps = {
|
|
8324
8353
|
/**
|
|
8325
8354
|
* Sets the color tone
|
|
8326
8355
|
*
|
|
@@ -8341,28 +8370,15 @@ type IndicatorCommonProps = {
|
|
|
8341
8370
|
* @default medium
|
|
8342
8371
|
*/
|
|
8343
8372
|
size?: 'small' | 'medium' | 'large';
|
|
8344
|
-
} & TestID & StyledPropsBlade;
|
|
8345
|
-
type IndicatorWithoutA11yLabel = {
|
|
8346
8373
|
/**
|
|
8347
8374
|
* A text label to show alongside the indicator dot
|
|
8348
8375
|
*/
|
|
8349
|
-
children
|
|
8376
|
+
children?: StringChildrenType;
|
|
8350
8377
|
/**
|
|
8351
8378
|
* a11y label for screen readers
|
|
8352
8379
|
*/
|
|
8353
8380
|
accessibilityLabel?: string;
|
|
8354
|
-
};
|
|
8355
|
-
type IndicatorWithA11yLabel = {
|
|
8356
|
-
/**
|
|
8357
|
-
* a11y label for screen readers
|
|
8358
|
-
*/
|
|
8359
|
-
accessibilityLabel: string;
|
|
8360
|
-
/**
|
|
8361
|
-
* A text label to show alongside the indicator dot
|
|
8362
|
-
*/
|
|
8363
|
-
children?: StringChildrenType;
|
|
8364
|
-
};
|
|
8365
|
-
type IndicatorProps = IndicatorCommonProps & (IndicatorWithA11yLabel | IndicatorWithoutA11yLabel);
|
|
8381
|
+
} & TestID & StyledPropsBlade;
|
|
8366
8382
|
declare const Indicator: ({ accessibilityLabel, children, size, color, emphasis, testID, ...styledProps }: IndicatorProps) => ReactElement;
|
|
8367
8383
|
|
|
8368
8384
|
/**
|
|
@@ -12530,7 +12546,6 @@ type TableNode<Item> = Item & {
|
|
|
12530
12546
|
type TableData<Item> = {
|
|
12531
12547
|
nodes: TableNode<Item>[];
|
|
12532
12548
|
};
|
|
12533
|
-
type TableBackgroundColors = `surface.background.gray.${DotNotationToken<Theme['colors']['surface']['background']['gray']>}`;
|
|
12534
12549
|
type TableHeaderProps = {
|
|
12535
12550
|
/**
|
|
12536
12551
|
* The children of TableHeader should be TableHeaderRow
|
|
@@ -12761,6 +12776,7 @@ type TableCellProps = {
|
|
|
12761
12776
|
type TableEditableCellProps = Pick<BaseInputProps, 'validationState' | 'placeholder' | 'defaultValue' | 'name' | 'onChange' | 'onFocus' | 'onBlur' | 'value' | 'isDisabled' | 'isRequired' | 'prefix' | 'suffix' | 'maxCharacters' | 'autoFocus' | 'keyboardReturnKeyType' | 'autoCompleteSuggestionType' | 'onSubmit' | 'autoCapitalize' | 'testID' | 'onClick' | 'leadingIcon' | 'trailingButton' | 'errorText' | 'successText'> & {
|
|
12762
12777
|
accessibilityLabel: NonNullable<BaseInputProps['accessibilityLabel']>;
|
|
12763
12778
|
};
|
|
12779
|
+
type TableEditableDropdownCellProps = Pick<DropdownProps, 'children' | 'isOpen' | 'onOpenChange' | 'selectionType' | 'zIndex'>;
|
|
12764
12780
|
type TableFooterProps = {
|
|
12765
12781
|
/**
|
|
12766
12782
|
* The children of TableFooter should be TableFooterRow
|
|
@@ -12901,7 +12917,6 @@ declare const TableHeaderRow: ({ children, rowDensity }: TableHeaderRowProps) =>
|
|
|
12901
12917
|
|
|
12902
12918
|
declare const TableBody: ({ children }: TableBodyProps) => React__default.ReactElement;
|
|
12903
12919
|
declare const TableCell: ({ children }: TableCellProps) => React__default.ReactElement;
|
|
12904
|
-
declare const TableEditableCell: ({ validationState, accessibilityLabel, autoCapitalize, autoCompleteSuggestionType, autoFocus, defaultValue, isDisabled, isRequired, keyboardReturnKeyType, leadingIcon, maxCharacters, name, onBlur, onChange, onClick, onFocus, onSubmit, placeholder, prefix, suffix, value, testID, trailingButton, errorText, successText, }: TableEditableCellProps) => React__default.ReactElement;
|
|
12905
12920
|
declare const TableRow: <Item>({ children, item, isDisabled, onHover, onClick, }: TableRowProps<Item>) => React__default.ReactElement;
|
|
12906
12921
|
|
|
12907
12922
|
declare const TableFooter: ({ children }: TableFooterProps) => React__default.ReactElement;
|
|
@@ -12913,6 +12928,9 @@ declare const TablePagination: ({ currentPage: controlledCurrentPage, onPageChan
|
|
|
12913
12928
|
declare const TableToolbarActions: ({ children, ...styledProps }: TableToolbarActionsProps) => React__default.ReactElement;
|
|
12914
12929
|
declare const TableToolbar: ({ children, title, selectedTitle: controlledSelectedTitle, }: TableToolbarProps) => React__default.ReactElement;
|
|
12915
12930
|
|
|
12931
|
+
declare const TableEditableDropdownCell: (dropdownProps: TableEditableDropdownCellProps) => React.ReactElement;
|
|
12932
|
+
declare const TableEditableCell: ({ validationState, accessibilityLabel, autoCapitalize, autoCompleteSuggestionType, autoFocus, defaultValue, isDisabled, isRequired, keyboardReturnKeyType, leadingIcon, maxCharacters, name, onBlur, onChange, onClick, onFocus, onSubmit, placeholder, prefix, suffix, value, testID, trailingButton, errorText, successText, }: TableEditableCellProps) => React.ReactElement;
|
|
12933
|
+
|
|
12916
12934
|
type TabsProps = {
|
|
12917
12935
|
/**
|
|
12918
12936
|
* The content of the component, accepts `TabsList` and `TabsPanel` components.
|
|
@@ -13889,4 +13907,4 @@ declare const VisuallyHidden: ({ children, testID }: VisuallyHiddenProps) => Rea
|
|
|
13889
13907
|
*/
|
|
13890
13908
|
declare const screenReaderStyles: CSSObject;
|
|
13891
13909
|
|
|
13892
|
-
export { AcceptPaymentsIcon, Accordion, AccordionItem, AccordionItemBody, AccordionItemHeader, AccordionItemProps, AccordionProps, ActionList, ActionListItem, ActionListItemAsset, ActionListItemAssetProps, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemProps, ActionListItemText, ActionListProps, ActionListSection, ActionListSectionProps, ActivityIcon, AddressBookIcon, AffordabilityIcon, AirplayIcon, Alert, AlertCircleIcon, AlertOctagonIcon, AlertOnlyIcon, AlertProps, AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, Amount, AmountProps, AnchorIcon, AnnouncementIcon, ApertureIcon, AppStoreIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, AttachmentIcon, AutoComplete, AutoCompleteProps, AutomateAccountingIcon, AutomatePayrollIcon, Avatar, AvatarGroup, AvatarGroupProps, AvatarProps, AwardIcon, Badge, BadgeProps, BankAccountVerificationIcon, BankIcon, BarChartAltIcon, BarChartIcon, BarCodeIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BfsiIcon, BillIcon, BladeCommonEvents, BladeFile, BladeFileList, BladeProvider, BladeProviderProps, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BottomSheet, BottomSheetBody, BottomSheetBodyProps, BottomSheetFooter, BottomSheetFooterProps, BottomSheetHeader, BottomSheetHeaderProps, BottomSheetProps, Box, BoxIcon, BoxProps, BoxRefType, Breadcrumb, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbProps, BriefcaseIcon, BugIcon, BuildingIcon, BulkPayoutsIcon, BusinessBankingIcon, BusinessSpendManagementIcon, Button, ButtonGroup, ButtonGroupProps, ButtonProps, CalendarIcon, CameraIcon, CameraOffIcon, Card, CardBody, CardFooter, CardFooterAction, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderAmount, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CardProps, Carousel, CarouselItem, CarouselProps, CashIcon, CastIcon, CheckCircle2Icon, CheckCircleIcon, CheckIcon, CheckSquareIcon, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, Chip, ChipGroup, ChipGroupProps, ChipProps, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, ClosedCaptioningIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, Code, CodeProps, CodeSnippetIcon, CodepenIcon, CoinIcon, CoinsIcon, Collapsible, CollapsibleBody, CollapsibleBodyProps, CollapsibleButton, CollapsibleButtonProps, CollapsibleLink, CollapsibleLinkProps, CollapsibleProps, CommandIcon, CompanyRegistrationIcon, CompassIcon, ComponentIds, ConfettiIcon, ContactlessPaymentIcon, CookieIcon, CopyIcon, CopyrightIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, Counter, CounterProps, CpuIcon, CreditCardIcon, CreditsAndLoansIcon, CropIcon, CrosshairIcon, CurrentAccountIcon, CustomersIcon, CutIcon, DashboardIcon, DatePicker, DatePickerProps, DeleteIcon, DigitalLendingIcon, DisbursePaymentsIcon, DiscIcon, Display, DisplayProps, Divider, DividerProps, DollarIcon, DollarsIcon, DotIcon, DownloadCloudIcon, DownloadIcon, Drawer, DrawerBody, DrawerHeader, DrawerHeaderProps, DrawerProps, Dropdown, DropdownButton, DropdownFooter, DropdownHeader, DropdownLink, DropdownOverlay, DropdownOverlayProps, DropdownProps, DropletIcon, EcommerceIcon, EditComposeIcon, EditIcon, EditInlineIcon, EducationIcon, EscrowAccountIcon, ExportIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, FastForwardIcon, FeatherIcon, FigmaIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileTextIcon, FileUpload, FileUploadProps, FileZipIcon, FilmIcon, FilterIcon, FlagIcon, FolderIcon, ForexManagementIcon, FreelanceIcon, FullScreenEnterIcon, FullScreenExitIcon, GithubIcon, GitlabIcon, GlobeIcon, GridIcon, HashIcon, Heading, HeadingProps, HeadphoneIcon, HeadphonesIcon, HeadsetIcon, HeartIcon, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconColors, IconComponent, IconProps, IconSize,
|
|
13910
|
+
export { AcceptPaymentsIcon, Accordion, AccordionItem, AccordionItemBody, AccordionItemHeader, AccordionItemProps, AccordionProps, ActionList, ActionListItem, ActionListItemAsset, ActionListItemAssetProps, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemProps, ActionListItemText, ActionListProps, ActionListSection, ActionListSectionProps, ActivityIcon, AddressBookIcon, AffordabilityIcon, AirplayIcon, Alert, AlertCircleIcon, AlertOctagonIcon, AlertOnlyIcon, AlertProps, AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, Amount, AmountProps, AnchorIcon, AnnouncementIcon, ApertureIcon, AppStoreIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, AttachmentIcon, AutoComplete, AutoCompleteProps, AutomateAccountingIcon, AutomatePayrollIcon, Avatar, AvatarGroup, AvatarGroupProps, AvatarProps, AwardIcon, Badge, BadgeProps, BankAccountVerificationIcon, BankIcon, BarChartAltIcon, BarChartIcon, BarCodeIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BfsiIcon, BillIcon, BladeCommonEvents, BladeFile, BladeFileList, BladeProvider, BladeProviderProps, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BottomSheet, BottomSheetBody, BottomSheetBodyProps, BottomSheetFooter, BottomSheetFooterProps, BottomSheetHeader, BottomSheetHeaderProps, BottomSheetProps, Box, BoxIcon, BoxProps, BoxRefType, Breadcrumb, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbProps, BriefcaseIcon, BugIcon, BuildingIcon, BulkPayoutsIcon, BusinessBankingIcon, BusinessSpendManagementIcon, Button, ButtonGroup, ButtonGroupProps, ButtonProps, CalendarIcon, CameraIcon, CameraOffIcon, Card, CardBody, CardFooter, CardFooterAction, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderAmount, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CardProps, Carousel, CarouselItem, CarouselProps, CashIcon, CastIcon, CheckCircle2Icon, CheckCircleIcon, CheckIcon, CheckSquareIcon, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, Chip, ChipGroup, ChipGroupProps, ChipProps, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, ClosedCaptioningIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, Code, CodeProps, CodeSnippetIcon, CodepenIcon, CoinIcon, CoinsIcon, Collapsible, CollapsibleBody, CollapsibleBodyProps, CollapsibleButton, CollapsibleButtonProps, CollapsibleLink, CollapsibleLinkProps, CollapsibleProps, CommandIcon, CompanyRegistrationIcon, CompassIcon, ComponentIds, ConfettiIcon, ContactlessPaymentIcon, CookieIcon, CopyIcon, CopyrightIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, Counter, CounterProps, CpuIcon, CreditCardIcon, CreditsAndLoansIcon, CropIcon, CrosshairIcon, CurrentAccountIcon, CustomersIcon, CutIcon, DashboardIcon, DatePicker, DatePickerProps, DeleteIcon, DigitalLendingIcon, DisbursePaymentsIcon, DiscIcon, Display, DisplayProps, Divider, DividerProps, DollarIcon, DollarsIcon, DotIcon, DownloadCloudIcon, DownloadIcon, Drawer, DrawerBody, DrawerHeader, DrawerHeaderProps, DrawerProps, Dropdown, DropdownButton, DropdownFooter, DropdownHeader, DropdownLink, DropdownOverlay, DropdownOverlayProps, DropdownProps, DropletIcon, EcommerceIcon, EditComposeIcon, EditIcon, EditInlineIcon, EducationIcon, EscrowAccountIcon, ExportIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, FastForwardIcon, FeatherIcon, FigmaIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileTextIcon, FileUpload, FileUploadProps, FileZipIcon, FilmIcon, FilterIcon, FlagIcon, FolderIcon, ForexManagementIcon, FreelanceIcon, FullScreenEnterIcon, FullScreenExitIcon, GithubIcon, GitlabIcon, GlobeIcon, GridIcon, HashIcon, Heading, HeadingProps, HeadphoneIcon, HeadphonesIcon, HeadsetIcon, HeartIcon, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconColors, IconComponent, IconProps, IconSize, ImageIcon, InboxIcon, Indicator, IndicatorProps, InfoIcon, InstagramIcon, InstantSettlementIcon, InternationalPaymentsIcon, InvoicesIcon, ItalicIcon, LayersIcon, LayoutIcon, LifeBuoyIcon, Link, LinkButtonVariantProps, LinkIcon, LinkProps, List, ListIcon, ListItem, ListItemCode, ListItemCodeProps, ListItemLink, ListItemLinkProps, ListItemProps, ListItemText, ListItemTextProps, ListProps, LoaderIcon, LoansForBusinessesIcon, LockIcon, LogInIcon, LogOutIcon, MagicCheckoutIcon, MailIcon, MailOpenIcon, MapIcon, MapPinIcon, MaximizeIcon, Menu, MenuDivider, MenuDotsIcon, MenuFooter, MenuFooterProps, MenuHeader, MenuHeaderProps, MenuIcon, MenuItem, MenuItemProps, MenuOverlay, MenuOverlayProps, MenuProps, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, MobileAppIcon, Modal, ModalBody, ModalBodyProps, ModalFooter, ModalFooterProps, ModalHeader, ModalHeaderProps, ModalProps, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoreIcon, MoreVerticalIcon, MoveIcon, MusicIcon, MyAccountIcon, NavigationIcon, OTPInput, OTPInputCommonProps, OTPInputProps, OctagonIcon, OffersIcon, OptimizerIcon, PackageIcon, PaperclipIcon, PasswordInput, PasswordInputProps, PauseCircleIcon, PauseIcon, PaymentButtonIcon, PaymentButtonsIcon, PaymentGatewayIcon, PaymentLinkIcon, PaymentLinksIcon, PaymentPagesIcon, PayoutLinkIcon, PayrollAddonsIcon, PayrollForCaIcon, PayrollForStartupOrSmeIcon, PercentIcon, PettyCashBudgetIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneNumberInput, PhoneNumberInputProps, PhoneOffIcon, PhoneOutgoingIcon, PictureInPictureIcon, PieChartIcon, PinIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, Popover, PopoverInteractiveWrapper, PopoverProps, PopoverTriggerProps, PosIcon, PowerIcon, PrinterIcon, ProgressBar, ProgressBarProps, ProgressBarVariant, QRCodeIcon, Radio, RadioGroup, RadioGroupProps, RadioIcon, RadioProps, RazorpayIcon, RazorpayXIcon, RazorpayxPayrollIcon, RefreshIcon, RepeatIcon, ReportsIcon, ResizerIcon, RewindIcon, RotateClockWiseIcon, RotateCounterClockWiseIcon, RouteIcon, RoutesIcon, RupeeIcon, RupeesIcon, SIDE_NAV_EXPANDED_L1_WIDTH_BASE, SIDE_NAV_EXPANDED_L1_WIDTH_XL, SaasIcon, SaveIcon, ScissorsIcon, SearchIcon, SearchInput, SearchInputProps, SelectInput, SelectInputProps, SendIcon, ServerIcon, SettingsIcon, SettlementsIcon, ShareIcon, ShieldIcon, ShoppingBagIcon, ShoppingCartIcon, ShuffleIcon, SideNav, SideNavBody, SideNavFooter, SideNavFooterProps, SideNavItem, SideNavItemProps, SideNavLevel, SideNavLink, SideNavLinkProps, SideNavProps, SideNavSection, SideNavSectionProps, SidebarIcon, Skeleton, SkeletonProps, SkipBackIcon, SkipForwardIcon, SkipNavContent, SkipNavLink, SlackIcon, SlashIcon, SlidersIcon, SmartCollectIcon, SmartphoneIcon, SolutionsIcon, SourceToPayIcon, SparklesIcon, SpeakerIcon, Spinner, SpinnerProps, SpotlightPopoverStepRenderProps, SpotlightPopoverTour, SpotlightPopoverTourFooter, SpotlightPopoverTourProps, SpotlightPopoverTourStep, SpotlightPopoverTourSteps, SquareIcon, StampIcon, StarIcon, StepGroup, StepGroupProps, StepItem, StepItemIcon, StepItemIndicator, StepItemProps, StopCircleIcon, StorefrontIcon, SubscriptionsIcon, SunIcon, SunriseIcon, SunsetIcon, Switch, SwitchProps, TabItem, TabItemProps, TabList, TabNav, TabNavItem, TabNavItemProps, TabPanel, TabPanelProps, Table, TableBody, TableBodyProps, TableCell, TableCellProps, TableData, TableEditableCell, TableEditableCellProps, TableEditableDropdownCell, TableEditableDropdownCellProps, TableFooter, TableFooterCell, TableFooterCellProps, TableFooterProps, TableFooterRow, TableFooterRowProps, TableHeader, TableHeaderCell, TableHeaderCellProps, TableHeaderProps, TableHeaderRow, TableHeaderRowProps, TableNode, TablePagination, TablePaginationProps, TableProps, TableRow, TableRowProps, TableToolbar, TableToolbarActions, TableToolbarActionsProps, TableToolbarProps, TabletIcon, Tabs, TabsProps, Tag, TagIcon, TagProps, TargetIcon, TaxPaymentsIcon, TestIcon, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, TextVariant, Theme, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, TicketIcon, ToastContainer, ToastProps, ToggleLeftIcon, ToggleRightIcon, TokenHqIcon, Tooltip, TooltipInteractiveWrapper, TooltipProps, TopNav, TopNavActions, TopNavBrand, TopNavContent, TopNavProps, TrademarkIcon, TrademarkRegisteredIcon, TransactionsIcon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TrustedBadgeIcon, TvIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UpiAutopayIcon, UploadCloudIcon, UploadIcon, UseToastReturn, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UserXIcon, UsersIcon, VendorPaymentsIcon, VideoIcon, VideoOffIcon, ViewLiveDemoIcon, VisuallyHidden, VisuallyHiddenProps, VoicemailIcon, VolumeHighIcon, VolumeIcon, VolumeLowIcon, VolumeMuteIcon, WalletIcon, WatchIcon, WifiIcon, WifiOffIcon, WindIcon, XCircleIcon, XSquareIcon, ZapIcon, ZoomInIcon, ZoomOutIcon, announce, clearAnnouncer, destroyAnnouncer, drawerPadding, getHeadingProps, getTextProps, screenReaderStyles, useTheme, useToast };
|
|
@@ -3442,6 +3442,20 @@ type AvatarCommonProps = {
|
|
|
3442
3442
|
* Click handler for the avatar.
|
|
3443
3443
|
*/
|
|
3444
3444
|
onClick?: (event: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
3445
|
+
isSelected?: boolean;
|
|
3446
|
+
/**
|
|
3447
|
+
* Custom icon component to render at bottom of the avatar.
|
|
3448
|
+
* Only accepts:
|
|
3449
|
+
* - IconComponent
|
|
3450
|
+
*/
|
|
3451
|
+
bottomAddon?: IconComponent;
|
|
3452
|
+
/**
|
|
3453
|
+
* Custom component to render at top of the avatar.
|
|
3454
|
+
*
|
|
3455
|
+
* Only accepts:
|
|
3456
|
+
* - Indicator
|
|
3457
|
+
*/
|
|
3458
|
+
topAddon?: React__default.ReactElement;
|
|
3445
3459
|
testID?: string;
|
|
3446
3460
|
} & BladeCommonEvents & StyledPropsBlade;
|
|
3447
3461
|
type AvatarProps = AvatarCommonProps & AvatarImgProps;
|
|
@@ -3450,6 +3464,8 @@ declare const Avatar: (_props: AvatarProps) => React.ReactElement;
|
|
|
3450
3464
|
|
|
3451
3465
|
declare const AvatarGroup: (_props: AvatarGroupProps) => React.ReactElement;
|
|
3452
3466
|
|
|
3467
|
+
declare const TrustedBadgeIcon: IconComponent;
|
|
3468
|
+
|
|
3453
3469
|
type SnapPoints = [number, number, number];
|
|
3454
3470
|
|
|
3455
3471
|
type BaseFooterProps = {
|
|
@@ -5836,6 +5852,10 @@ type BaseInputCommonProps = FormInputLabelProps & FormInputValidationProps & {
|
|
|
5836
5852
|
* @default true
|
|
5837
5853
|
**/
|
|
5838
5854
|
isTableInputCell?: boolean;
|
|
5855
|
+
/**
|
|
5856
|
+
* Hides the form hints and shows them as tooltip of trailing
|
|
5857
|
+
*/
|
|
5858
|
+
showHintsAsTooltip?: boolean;
|
|
5839
5859
|
} & TestID & Platform.Select<{
|
|
5840
5860
|
native: {
|
|
5841
5861
|
/**
|
|
@@ -6123,6 +6143,12 @@ type DropdownProps = {
|
|
|
6123
6143
|
onOpenChange?: (isOpen: boolean) => void;
|
|
6124
6144
|
selectionType?: 'single' | 'multiple';
|
|
6125
6145
|
children: React__default.ReactNode[];
|
|
6146
|
+
/**
|
|
6147
|
+
* @private
|
|
6148
|
+
*
|
|
6149
|
+
* width prop for outer relative container of Dropdown. Use width prop on DropdownOverlay to change width of menu
|
|
6150
|
+
*/
|
|
6151
|
+
_width?: BoxProps['width'];
|
|
6126
6152
|
} & TestID & StyledPropsBlade;
|
|
6127
6153
|
type DropdownOverlayProps = {
|
|
6128
6154
|
children: React__default.ReactElement[] | React__default.ReactElement;
|
|
@@ -6165,7 +6191,7 @@ type DropdownOverlayProps = {
|
|
|
6165
6191
|
defaultPlacement?: Placement;
|
|
6166
6192
|
} & TestID;
|
|
6167
6193
|
|
|
6168
|
-
declare const Dropdown: ({ children, isOpen: isOpenControlled, onOpenChange, selectionType, testID, ...styledProps }: DropdownProps) => React__default.ReactElement;
|
|
6194
|
+
declare const Dropdown: ({ children, isOpen: isOpenControlled, onOpenChange, selectionType, testID, _width, ...styledProps }: DropdownProps) => React__default.ReactElement;
|
|
6169
6195
|
|
|
6170
6196
|
declare const DropdownOverlay: ({ children, testID }: DropdownOverlayProps) => React__default.ReactElement;
|
|
6171
6197
|
|
|
@@ -6337,7 +6363,7 @@ type FileUploadProps = (FileUploadPropsWithA11yLabel | FileUploadPropsWithLabel)
|
|
|
6337
6363
|
|
|
6338
6364
|
declare const FileUpload: (_props: FileUploadProps) => React.ReactElement;
|
|
6339
6365
|
|
|
6340
|
-
type
|
|
6366
|
+
type IndicatorProps = {
|
|
6341
6367
|
/**
|
|
6342
6368
|
* Sets the color tone
|
|
6343
6369
|
*
|
|
@@ -6358,28 +6384,15 @@ type IndicatorCommonProps = {
|
|
|
6358
6384
|
* @default medium
|
|
6359
6385
|
*/
|
|
6360
6386
|
size?: 'small' | 'medium' | 'large';
|
|
6361
|
-
} & TestID & StyledPropsBlade;
|
|
6362
|
-
type IndicatorWithoutA11yLabel = {
|
|
6363
6387
|
/**
|
|
6364
6388
|
* A text label to show alongside the indicator dot
|
|
6365
6389
|
*/
|
|
6366
|
-
children
|
|
6390
|
+
children?: StringChildrenType;
|
|
6367
6391
|
/**
|
|
6368
6392
|
* a11y label for screen readers
|
|
6369
6393
|
*/
|
|
6370
6394
|
accessibilityLabel?: string;
|
|
6371
|
-
};
|
|
6372
|
-
type IndicatorWithA11yLabel = {
|
|
6373
|
-
/**
|
|
6374
|
-
* a11y label for screen readers
|
|
6375
|
-
*/
|
|
6376
|
-
accessibilityLabel: string;
|
|
6377
|
-
/**
|
|
6378
|
-
* A text label to show alongside the indicator dot
|
|
6379
|
-
*/
|
|
6380
|
-
children?: StringChildrenType;
|
|
6381
|
-
};
|
|
6382
|
-
type IndicatorProps = IndicatorCommonProps & (IndicatorWithA11yLabel | IndicatorWithoutA11yLabel);
|
|
6395
|
+
} & TestID & StyledPropsBlade;
|
|
6383
6396
|
declare const Indicator: ({ accessibilityLabel, children, size, color, emphasis, testID, ...styledProps }: IndicatorProps) => ReactElement;
|
|
6384
6397
|
|
|
6385
6398
|
/**
|
|
@@ -8670,7 +8683,6 @@ type TableNode<Item> = Item & {
|
|
|
8670
8683
|
type TableData<Item> = {
|
|
8671
8684
|
nodes: TableNode<Item>[];
|
|
8672
8685
|
};
|
|
8673
|
-
type TableBackgroundColors = `surface.background.gray.${DotNotationToken<Theme['colors']['surface']['background']['gray']>}`;
|
|
8674
8686
|
type TableHeaderProps = {
|
|
8675
8687
|
/**
|
|
8676
8688
|
* The children of TableHeader should be TableHeaderRow
|
|
@@ -8901,6 +8913,7 @@ type TableCellProps = {
|
|
|
8901
8913
|
type TableEditableCellProps = Pick<BaseInputProps, 'validationState' | 'placeholder' | 'defaultValue' | 'name' | 'onChange' | 'onFocus' | 'onBlur' | 'value' | 'isDisabled' | 'isRequired' | 'prefix' | 'suffix' | 'maxCharacters' | 'autoFocus' | 'keyboardReturnKeyType' | 'autoCompleteSuggestionType' | 'onSubmit' | 'autoCapitalize' | 'testID' | 'onClick' | 'leadingIcon' | 'trailingButton' | 'errorText' | 'successText'> & {
|
|
8902
8914
|
accessibilityLabel: NonNullable<BaseInputProps['accessibilityLabel']>;
|
|
8903
8915
|
};
|
|
8916
|
+
type TableEditableDropdownCellProps = Pick<DropdownProps, 'children' | 'isOpen' | 'onOpenChange' | 'selectionType' | 'zIndex'>;
|
|
8904
8917
|
type TableFooterProps = {
|
|
8905
8918
|
/**
|
|
8906
8919
|
* The children of TableFooter should be TableFooterRow
|
|
@@ -9042,17 +9055,19 @@ declare const TableHeaderCell: (props: TableHeaderCellProps) => React__default.R
|
|
|
9042
9055
|
declare const TableBody: (props: TableBodyProps) => React__default.ReactElement;
|
|
9043
9056
|
declare const TableRow: (props: TableRowProps<unknown>) => React__default.ReactElement;
|
|
9044
9057
|
declare const TableCell: (props: TableCellProps) => React__default.ReactElement;
|
|
9045
|
-
declare const TableEditableCell: (props: TableEditableCellProps) => React__default.ReactElement;
|
|
9046
9058
|
|
|
9047
9059
|
declare const TableFooter: (props: unknown) => React__default.ReactElement;
|
|
9048
9060
|
declare const TableFooterRow: (props: unknown) => React__default.ReactElement;
|
|
9049
9061
|
declare const TableFooterCell: (props: unknown) => React__default.ReactElement;
|
|
9050
9062
|
|
|
9063
|
+
type TablePaginationProps = unknown;
|
|
9064
|
+
declare const TablePagination: (props: TablePaginationProps) => React__default.ReactElement;
|
|
9065
|
+
|
|
9051
9066
|
declare const TableToolbar: (props: unknown) => React__default.ReactElement;
|
|
9052
9067
|
declare const TableToolbarActions: (props: unknown) => React__default.ReactElement;
|
|
9053
9068
|
|
|
9054
|
-
|
|
9055
|
-
declare const
|
|
9069
|
+
declare const TableEditableCell: (props: TableEditableCellProps) => React.ReactElement;
|
|
9070
|
+
declare const TableEditableDropdownCell: (props: TableEditableDropdownCellProps) => React.ReactElement;
|
|
9056
9071
|
|
|
9057
9072
|
type TabsProps = {
|
|
9058
9073
|
/**
|
|
@@ -9399,4 +9414,4 @@ declare const VisuallyHidden: ({ children, testID }: VisuallyHiddenProps) => Rea
|
|
|
9399
9414
|
*/
|
|
9400
9415
|
declare const screenReaderStyles: CSSObject;
|
|
9401
9416
|
|
|
9402
|
-
export { AcceptPaymentsIcon, Accordion, AccordionItem, AccordionItemBody, AccordionItemHeader, AccordionItemProps, AccordionProps, ActionList, ActionListItem, ActionListItemAsset, ActionListItemAssetProps, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemProps, ActionListItemText, ActionListProps, ActionListSection, ActionListSectionProps, ActivityIcon, AddressBookIcon, AffordabilityIcon, AirplayIcon, Alert, AlertCircleIcon, AlertOctagonIcon, AlertOnlyIcon, AlertProps, AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, Amount, AmountProps, AnchorIcon, AnnouncementIcon, ApertureIcon, AppStoreIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, AttachmentIcon, AutoComplete, AutoCompleteProps, AutomateAccountingIcon, AutomatePayrollIcon, Avatar, AvatarGroup, AwardIcon, Badge, BadgeProps, BankAccountVerificationIcon, BankIcon, BarChartAltIcon, BarChartIcon, BarCodeIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BfsiIcon, BillIcon, BladeCommonEvents, BladeProvider, BladeProviderProps, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BottomSheet, BottomSheetBody, BottomSheetBodyProps, BottomSheetFooter, BottomSheetFooterProps, BottomSheetHeader, BottomSheetHeaderProps, BottomSheetProps, Box, BoxIcon, BoxProps, BoxRefType, Breadcrumb, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbProps, BriefcaseIcon, BugIcon, BuildingIcon, BulkPayoutsIcon, BusinessBankingIcon, BusinessSpendManagementIcon, Button, ButtonGroup, ButtonProps, CalendarIcon, CameraIcon, CameraOffIcon, Card, CardBody, CardFooter, CardFooterAction, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderAmount, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CardProps, Carousel, CarouselItem, CarouselProps, CashIcon, CastIcon, CheckCircle2Icon, CheckCircleIcon, CheckIcon, CheckSquareIcon, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, Chip, ChipGroup, ChipGroupProps, ChipProps, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, ClosedCaptioningIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, Code, CodeProps, CodeSnippetIcon, CodepenIcon, CoinIcon, CoinsIcon, Collapsible, CollapsibleBody, CollapsibleBodyProps, CollapsibleButton, CollapsibleButtonProps, CollapsibleLink, CollapsibleLinkProps, CollapsibleProps, CommandIcon, CompanyRegistrationIcon, CompassIcon, ComponentIds, ConfettiIcon, ContactlessPaymentIcon, CookieIcon, CopyIcon, CopyrightIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, Counter, CounterProps, CpuIcon, CreditCardIcon, CreditsAndLoansIcon, CropIcon, CrosshairIcon, CurrentAccountIcon, CustomersIcon, CutIcon, DashboardIcon, DatePicker, DatePickerProps, DeleteIcon, DigitalLendingIcon, DisbursePaymentsIcon, DiscIcon, Display, DisplayProps, Divider, DividerProps, DollarIcon, DollarsIcon, DotIcon, DownloadCloudIcon, DownloadIcon, Drawer, DrawerBody, DrawerHeader, DrawerHeaderProps, DrawerProps, Dropdown, DropdownButton, DropdownFooter, DropdownHeader, DropdownLink, DropdownOverlay, DropdownOverlayProps, DropdownProps, DropletIcon, EcommerceIcon, EditComposeIcon, EditIcon, EditInlineIcon, EducationIcon, EscrowAccountIcon, ExportIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, FastForwardIcon, FeatherIcon, FigmaIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileTextIcon, FileUpload, FileZipIcon, FilmIcon, FilterIcon, FlagIcon, FolderIcon, ForexManagementIcon, FreelanceIcon, FullScreenEnterIcon, FullScreenExitIcon, GithubIcon, GitlabIcon, GlobeIcon, GridIcon, HashIcon, Heading, HeadingProps, HeadphoneIcon, HeadphonesIcon, HeadsetIcon, HeartIcon, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconColors, IconComponent, IconProps, IconSize,
|
|
9417
|
+
export { AcceptPaymentsIcon, Accordion, AccordionItem, AccordionItemBody, AccordionItemHeader, AccordionItemProps, AccordionProps, ActionList, ActionListItem, ActionListItemAsset, ActionListItemAssetProps, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemProps, ActionListItemText, ActionListProps, ActionListSection, ActionListSectionProps, ActivityIcon, AddressBookIcon, AffordabilityIcon, AirplayIcon, Alert, AlertCircleIcon, AlertOctagonIcon, AlertOnlyIcon, AlertProps, AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, Amount, AmountProps, AnchorIcon, AnnouncementIcon, ApertureIcon, AppStoreIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, AttachmentIcon, AutoComplete, AutoCompleteProps, AutomateAccountingIcon, AutomatePayrollIcon, Avatar, AvatarGroup, AwardIcon, Badge, BadgeProps, BankAccountVerificationIcon, BankIcon, BarChartAltIcon, BarChartIcon, BarCodeIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BfsiIcon, BillIcon, BladeCommonEvents, BladeProvider, BladeProviderProps, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BottomSheet, BottomSheetBody, BottomSheetBodyProps, BottomSheetFooter, BottomSheetFooterProps, BottomSheetHeader, BottomSheetHeaderProps, BottomSheetProps, Box, BoxIcon, BoxProps, BoxRefType, Breadcrumb, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbProps, BriefcaseIcon, BugIcon, BuildingIcon, BulkPayoutsIcon, BusinessBankingIcon, BusinessSpendManagementIcon, Button, ButtonGroup, ButtonProps, CalendarIcon, CameraIcon, CameraOffIcon, Card, CardBody, CardFooter, CardFooterAction, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderAmount, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CardProps, Carousel, CarouselItem, CarouselProps, CashIcon, CastIcon, CheckCircle2Icon, CheckCircleIcon, CheckIcon, CheckSquareIcon, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, Chip, ChipGroup, ChipGroupProps, ChipProps, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, ClosedCaptioningIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, Code, CodeProps, CodeSnippetIcon, CodepenIcon, CoinIcon, CoinsIcon, Collapsible, CollapsibleBody, CollapsibleBodyProps, CollapsibleButton, CollapsibleButtonProps, CollapsibleLink, CollapsibleLinkProps, CollapsibleProps, CommandIcon, CompanyRegistrationIcon, CompassIcon, ComponentIds, ConfettiIcon, ContactlessPaymentIcon, CookieIcon, CopyIcon, CopyrightIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, Counter, CounterProps, CpuIcon, CreditCardIcon, CreditsAndLoansIcon, CropIcon, CrosshairIcon, CurrentAccountIcon, CustomersIcon, CutIcon, DashboardIcon, DatePicker, DatePickerProps, DeleteIcon, DigitalLendingIcon, DisbursePaymentsIcon, DiscIcon, Display, DisplayProps, Divider, DividerProps, DollarIcon, DollarsIcon, DotIcon, DownloadCloudIcon, DownloadIcon, Drawer, DrawerBody, DrawerHeader, DrawerHeaderProps, DrawerProps, Dropdown, DropdownButton, DropdownFooter, DropdownHeader, DropdownLink, DropdownOverlay, DropdownOverlayProps, DropdownProps, DropletIcon, EcommerceIcon, EditComposeIcon, EditIcon, EditInlineIcon, EducationIcon, EscrowAccountIcon, ExportIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, FastForwardIcon, FeatherIcon, FigmaIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileTextIcon, FileUpload, FileZipIcon, FilmIcon, FilterIcon, FlagIcon, FolderIcon, ForexManagementIcon, FreelanceIcon, FullScreenEnterIcon, FullScreenExitIcon, GithubIcon, GitlabIcon, GlobeIcon, GridIcon, HashIcon, Heading, HeadingProps, HeadphoneIcon, HeadphonesIcon, HeadsetIcon, HeartIcon, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconColors, IconComponent, IconProps, IconSize, ImageIcon, InboxIcon, Indicator, IndicatorProps, InfoIcon, InstagramIcon, InstantSettlementIcon, InternationalPaymentsIcon, InvoicesIcon, ItalicIcon, LayersIcon, LayoutIcon, LifeBuoyIcon, Link, LinkButtonVariantProps, LinkIcon, LinkProps, List, ListIcon, ListItem, ListItemCode, ListItemCodeProps, ListItemLink, ListItemLinkProps, ListItemProps, ListItemText, ListItemTextProps, ListProps, LoaderIcon, LoansForBusinessesIcon, LockIcon, LogInIcon, LogOutIcon, MagicCheckoutIcon, MailIcon, MailOpenIcon, MapIcon, MapPinIcon, MaximizeIcon, Menu, MenuDivider, MenuDotsIcon, MenuFooter, MenuFooterProps, MenuHeader, MenuHeaderProps, MenuIcon, MenuItem, MenuItemProps, MenuOverlay, MenuOverlayProps, MenuProps, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, MobileAppIcon, Modal, ModalBody, ModalBodyProps, ModalFooter, ModalFooterProps, ModalHeader, ModalHeaderProps, ModalProps, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoreIcon, MoreVerticalIcon, MoveIcon, MusicIcon, MyAccountIcon, NavigationIcon, OTPInput, OTPInputCommonProps, OTPInputProps, OctagonIcon, OffersIcon, OptimizerIcon, PackageIcon, PaperclipIcon, PasswordInput, PasswordInputProps, PauseCircleIcon, PauseIcon, PaymentButtonIcon, PaymentButtonsIcon, PaymentGatewayIcon, PaymentLinkIcon, PaymentLinksIcon, PaymentPagesIcon, PayoutLinkIcon, PayrollAddonsIcon, PayrollForCaIcon, PayrollForStartupOrSmeIcon, PercentIcon, PettyCashBudgetIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneNumberInput, PhoneNumberInputProps, PhoneOffIcon, PhoneOutgoingIcon, PictureInPictureIcon, PieChartIcon, PinIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, Popover, PopoverInteractiveWrapper, PopoverProps, PopoverTriggerProps, PosIcon, PowerIcon, PrinterIcon, ProgressBar, ProgressBarProps, ProgressBarVariant, QRCodeIcon, Radio, RadioGroup, RadioGroupProps, RadioIcon, RadioProps, RazorpayIcon, RazorpayXIcon, RazorpayxPayrollIcon, RefreshIcon, RepeatIcon, ReportsIcon, ResizerIcon, RewindIcon, RotateClockWiseIcon, RotateCounterClockWiseIcon, RouteIcon, RoutesIcon, RupeeIcon, RupeesIcon, SIDE_NAV_EXPANDED_L1_WIDTH_BASE, SIDE_NAV_EXPANDED_L1_WIDTH_XL, SaasIcon, SaveIcon, ScissorsIcon, SearchIcon, SearchInput, SearchInputProps, SelectInput, SelectInputProps, SendIcon, ServerIcon, SettingsIcon, SettlementsIcon, ShareIcon, ShieldIcon, ShoppingBagIcon, ShoppingCartIcon, ShuffleIcon, SideNav, SideNavBody, SideNavFooter, SideNavFooterProps, SideNavItem, SideNavItemProps, SideNavLevel, SideNavLink, SideNavLinkProps, SideNavProps, SideNavSection, SideNavSectionProps, SidebarIcon, Skeleton, SkeletonProps, SkipBackIcon, SkipForwardIcon, SkipNavContent, SkipNavLink, SlackIcon, SlashIcon, SlidersIcon, SmartCollectIcon, SmartphoneIcon, SolutionsIcon, SourceToPayIcon, SparklesIcon, SpeakerIcon, Spinner, SpinnerProps, SpotlightPopoverStepRenderProps, SpotlightPopoverTourFooter, SpotlightPopoverTourProps, SpotlightPopoverTourStep, SpotlightPopoverTourSteps, SquareIcon, StampIcon, StarIcon, StepGroup, StepGroupProps, StepItem, StepItemIcon, StepItemIndicator, StepItemProps, StopCircleIcon, StorefrontIcon, SubscriptionsIcon, SunIcon, SunriseIcon, SunsetIcon, Switch, SwitchProps, TabItem, TabItemProps, TabList, TabNav, TabNavItem, TabNavItemProps, TabPanel, TabPanelProps, Table, TableBody, TableBodyProps, TableCell, TableCellProps, TableData, TableEditableCell, TableEditableCellProps, TableEditableDropdownCell, TableEditableDropdownCellProps, TableFooter, TableFooterCell, TableFooterCellProps, TableFooterProps, TableFooterRow, TableFooterRowProps, TableHeader, TableHeaderCell, TableHeaderCellProps, TableHeaderProps, TableHeaderRow, TableHeaderRowProps, TableNode, TablePagination, TablePaginationProps$1 as TablePaginationProps, TableProps, TableRow, TableRowProps, TableToolbar, TableToolbarActions, TableToolbarActionsProps, TableToolbarProps, TabletIcon, Tabs, TabsProps, Tag, TagIcon, TagProps, TargetIcon, TaxPaymentsIcon, TestIcon, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, TextVariant, Theme, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, TicketIcon, ToastContainer, ToastProps, ToggleLeftIcon, ToggleRightIcon, TokenHqIcon, Tooltip, TooltipInteractiveWrapper, TooltipProps, TopNav, Tour, TrademarkIcon, TrademarkRegisteredIcon, TransactionsIcon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TrustedBadgeIcon, TvIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UpiAutopayIcon, UploadCloudIcon, UploadIcon, UseToastReturn, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UserXIcon, UsersIcon, VendorPaymentsIcon, VideoIcon, VideoOffIcon, ViewLiveDemoIcon, VisuallyHidden, VisuallyHiddenProps, VoicemailIcon, VolumeHighIcon, VolumeIcon, VolumeLowIcon, VolumeMuteIcon, WalletIcon, WatchIcon, WifiIcon, WifiOffIcon, WindIcon, XCircleIcon, XSquareIcon, ZapIcon, ZoomInIcon, ZoomOutIcon, announce, clearAnnouncer, destroyAnnouncer, getHeadingProps, getTextProps, screenReaderStyles, useTheme, useToast };
|
|
@@ -569,11 +569,14 @@ declare const overrideTheme: ({ baseThemeTokens, overrides }: OverrideTheme) =>
|
|
|
569
569
|
* Creates a Blade Theme based on the custom brand color
|
|
570
570
|
* @returns The Theme Tokens with the custom brand colors
|
|
571
571
|
* @example
|
|
572
|
-
* const theme = createTheme({ brandColor: '#19BEA2'})
|
|
572
|
+
* const { theme, brandColors } = createTheme({ brandColor: '#19BEA2'})
|
|
573
573
|
**/
|
|
574
|
-
declare const createTheme: ({ brandColor }: {
|
|
574
|
+
declare const createTheme: ({ brandColor, }: {
|
|
575
575
|
brandColor: ColorInput;
|
|
576
|
-
}) =>
|
|
576
|
+
}) => {
|
|
577
|
+
theme: ThemeTokens;
|
|
578
|
+
brandColors: ColorChromaticScale;
|
|
579
|
+
};
|
|
577
580
|
|
|
578
581
|
/**
|
|
579
582
|
* Brands a type making them act as nominal
|
|
@@ -569,11 +569,14 @@ declare const overrideTheme: ({ baseThemeTokens, overrides }: OverrideTheme) =>
|
|
|
569
569
|
* Creates a Blade Theme based on the custom brand color
|
|
570
570
|
* @returns The Theme Tokens with the custom brand colors
|
|
571
571
|
* @example
|
|
572
|
-
* const theme = createTheme({ brandColor: '#19BEA2'})
|
|
572
|
+
* const { theme, brandColors } = createTheme({ brandColor: '#19BEA2'})
|
|
573
573
|
**/
|
|
574
|
-
declare const createTheme: ({ brandColor }: {
|
|
574
|
+
declare const createTheme: ({ brandColor, }: {
|
|
575
575
|
brandColor: ColorInput;
|
|
576
|
-
}) =>
|
|
576
|
+
}) => {
|
|
577
|
+
theme: ThemeTokens;
|
|
578
|
+
brandColors: ColorChromaticScale;
|
|
579
|
+
};
|
|
577
580
|
|
|
578
581
|
/**
|
|
579
582
|
* Brands a type making them act as nominal
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|