@razorpay/blade 12.120.0 → 12.121.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.
Files changed (42) hide show
  1. package/build/lib/native/components/Button/BaseButton/BaseButton.js +2 -2
  2. package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
  3. package/build/lib/native/components/Button/BaseButton/buttonTokens.js +1 -1
  4. package/build/lib/native/components/Button/BaseButton/buttonTokens.js.map +1 -1
  5. package/build/lib/native/components/FloatingActionButton/FloatingActionButton.js +1 -1
  6. package/build/lib/native/components/FloatingActionButton/FloatingActionButton.js.map +1 -1
  7. package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js +1 -1
  8. package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  9. package/build/lib/native/components/Spinner/Spinner/Spinner.js.map +1 -1
  10. package/build/lib/web/development/_virtual/cloneDeep.js +1 -1
  11. package/build/lib/web/development/_virtual/cloneDeep3.js +1 -1
  12. package/build/lib/web/development/_virtual/flatten.js +1 -1
  13. package/build/lib/web/development/_virtual/flatten3.js +1 -1
  14. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +23 -31
  15. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
  16. package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js +8 -18
  17. package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js.map +1 -1
  18. package/build/lib/web/development/components/FloatingActionButton/FloatingActionButton.js +1 -1
  19. package/build/lib/web/development/components/FloatingActionButton/FloatingActionButton.js.map +1 -1
  20. package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js +5 -0
  21. package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  22. package/build/lib/web/development/components/Spinner/Spinner/Spinner.js.map +1 -1
  23. package/build/lib/web/development/node_modules/es-toolkit/dist/array/flatten.js +1 -1
  24. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/array/flatten.js +1 -1
  25. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/array/sortBy.js +2 -2
  26. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +1 -1
  27. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/object/omit.js +2 -2
  28. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/predicate/matches.js +2 -2
  29. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js +2 -2
  30. package/build/lib/web/development/node_modules/es-toolkit/dist/object/cloneDeep.js +1 -1
  31. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +23 -31
  32. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
  33. package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js +8 -18
  34. package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js.map +1 -1
  35. package/build/lib/web/production/components/FloatingActionButton/FloatingActionButton.js +1 -1
  36. package/build/lib/web/production/components/FloatingActionButton/FloatingActionButton.js.map +1 -1
  37. package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js +5 -0
  38. package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  39. package/build/lib/web/production/components/Spinner/Spinner/Spinner.js.map +1 -1
  40. package/build/types/components/index.d.ts +6 -11
  41. package/build/types/components/index.native.d.ts +6 -11
  42. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"buttonTokens.js","sources":["../../../../../../src/components/Button/BaseButton/buttonTokens.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-function-return-type */\nimport type { BaseButtonProps } from './BaseButton';\nimport type { Theme } from '~components/BladeProvider';\nimport type { IconSize } from '~components/Icons';\nimport type { SpinnerProps } from '~components/Spinner';\nimport type { Size } from '~tokens/global';\nimport { size } from '~tokens/global';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { makeSize } from '~utils';\nimport type { DotNotationToken } from '~utils/lodashButBetter/get';\n\nexport type ButtonMinHeight = Size[28] | Size[32] | Size[36] | Size[48];\n\nexport type ButtonTypography = {\n fonts: {\n size: Record<NonNullable<BaseButtonProps['size']>, keyof Theme['typography']['fonts']['size']>;\n };\n lineHeights: Record<\n NonNullable<BaseButtonProps['size']>,\n keyof Theme['typography']['lineHeights']\n >;\n};\n\nconst backgroundGradient = (color: FeedbackColors | 'primary') => {\n return {\n base: {\n primary: {\n default: `interactive.background.${color}.default`,\n highlighted: `interactive.background.${color}.highlighted`,\n disabled: `interactive.background.${color}.disabled`,\n },\n secondary: {\n default: 'surface.background.gray.intense',\n highlighted: 'surface.background.gray.intense',\n disabled: 'interactive.background.staticWhite.ghost',\n },\n tertiary: {\n default: 'surface.background.gray.intense',\n highlighted: 'surface.background.gray.intense',\n disabled: 'interactive.background.staticWhite.ghost',\n },\n transparent: {\n default: 'transparent',\n highlighted: 'interactive.background.gray.faded',\n disabled: 'interactive.background.gray.disabled',\n },\n },\n white: {\n primary: {\n default: 'interactive.background.staticWhite.default',\n highlighted: 'interactive.background.staticWhite.highlighted',\n disabled: 'interactive.background.staticWhite.disabled',\n },\n secondary: {\n default: 'interactive.background.staticWhite.faded',\n highlighted: 'interactive.background.staticBlack.faded',\n disabled: 'interactive.background.gray.disabled',\n },\n tertiary: {\n default: 'interactive.background.staticWhite.faded',\n highlighted: 'interactive.background.staticBlack.faded',\n disabled: 'interactive.background.gray.disabled',\n },\n },\n // Only the `primary` emphasis exists in the design for the black color, which\n // is currently used by FloatingActionButton and is not exposed on `Button`.\n black: {\n primary: {\n default: 'interactive.background.staticBlack.default',\n highlighted: 'interactive.background.staticBlack.highlighted',\n disabled: 'interactive.background.staticBlack.fadedHighlighted',\n },\n },\n } as const;\n};\n\ntype BoxShadowValue = {\n y: number;\n blur: number;\n spread: number;\n color: DotNotationToken<Theme['colors']>;\n};\n\ntype ButtonBoxShadow = BoxShadowValue[];\n\n/**\n * Box-shadow tokens for buttons (includes border + 3D effects)\n * Each shadow is: inset 0 {y}px {blur}px {spread}px {color}\n */\nconst boxShadow = (\n color: FeedbackColors | 'primary',\n): {\n base: Record<\n 'primary' | 'secondary' | 'tertiary' | 'transparent',\n Record<'default' | 'highlighted' | 'disabled', ButtonBoxShadow>\n >;\n white: Record<\n 'primary' | 'secondary' | 'tertiary',\n Record<'default' | 'highlighted' | 'disabled', ButtonBoxShadow>\n >;\n black: Record<'primary', Record<'default' | 'highlighted' | 'disabled', ButtonBoxShadow>>;\n} => {\n return {\n base: {\n primary: {\n default: [\n { y: -1.5, blur: 0, spread: 0, color: `interactive.border.${color}.highlighted` },\n { y: 0, blur: 0, spread: 0.5, color: `interactive.border.${color}.default` },\n { y: 1.5, blur: 0, spread: 0, color: 'interactive.border.staticWhite.faded' },\n { y: -2, blur: 0, spread: 0, color: 'interactive.border.staticWhite.faded' },\n ],\n highlighted: [\n { y: -1.5, blur: 0, spread: 0, color: `interactive.border.${color}.highlighted` },\n { y: 0, blur: 0, spread: 0.5, color: `interactive.border.${color}.highlighted` },\n { y: 1.5, blur: 0, spread: 0, color: 'interactive.border.staticWhite.faded' },\n { y: -2, blur: 0, spread: 0, color: 'interactive.border.staticWhite.faded' },\n ],\n disabled: [],\n },\n secondary: {\n default: [\n { y: -1, blur: 0.5, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n { y: 0, blur: 0, spread: 1, color: 'interactive.border.gray.default' },\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.gray.default' },\n ],\n highlighted: [\n { y: -1, blur: 0.5, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n { y: 0, blur: 0, spread: 1, color: 'interactive.border.gray.highlighted' },\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.gray.default' },\n ],\n disabled: [{ y: 0, blur: 0, spread: 1, color: 'interactive.border.gray.disabled' }],\n },\n tertiary: {\n default: [\n { y: -1, blur: 0.5, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n { y: 0, blur: 0, spread: 1, color: 'interactive.border.gray.default' },\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.gray.default' },\n ],\n highlighted: [\n { y: -1, blur: 0.5, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n { y: 0, blur: 0, spread: 1, color: 'interactive.border.gray.highlighted' },\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.gray.default' },\n ],\n disabled: [{ y: 0, blur: 0, spread: 1, color: 'interactive.border.gray.disabled' }],\n },\n transparent: {\n default: [],\n highlighted: [],\n disabled: [],\n },\n },\n white: {\n primary: {\n default: [\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n {\n y: 0,\n blur: 0,\n spread: 0.5,\n color: 'interactive.border.staticBlack.fadedHighlighted',\n },\n ],\n highlighted: [\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n {\n y: 0,\n blur: 0,\n spread: 0.5,\n color: 'interactive.border.staticBlack.fadedHighlighted',\n },\n ],\n disabled: [],\n },\n secondary: {\n default: [\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n { y: 0, blur: 0, spread: 1, color: 'interactive.border.staticWhite.highlighted' },\n ],\n highlighted: [\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n { y: 0, blur: 0, spread: 1, color: 'interactive.border.staticWhite.highlighted' },\n ],\n disabled: [{ y: 0, blur: 0, spread: 1, color: 'interactive.border.staticWhite.disabled' }],\n },\n tertiary: {\n default: [\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n { y: 0, blur: 0, spread: 1, color: 'interactive.border.staticWhite.highlighted' },\n ],\n highlighted: [\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n { y: 0, blur: 0, spread: 1, color: 'interactive.border.staticWhite.highlighted' },\n ],\n disabled: [{ y: 0, blur: 0, spread: 1, color: 'interactive.border.staticWhite.disabled' }],\n },\n },\n black: {\n primary: {\n default: [\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.staticBlack.highlighted' },\n { y: 0, blur: 0, spread: 0.5, color: 'interactive.border.staticBlack.highlighted' },\n { y: 1.5, blur: 0, spread: 0, color: 'interactive.border.staticWhite.fadedHighlighted' },\n { y: -2, blur: 0, spread: 0, color: 'interactive.border.staticWhite.fadedHighlighted' },\n ],\n highlighted: [\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.staticBlack.highlighted' },\n { y: 0, blur: 0, spread: 0.5, color: 'interactive.border.staticBlack.highlighted' },\n { y: 1.5, blur: 0, spread: 0, color: 'interactive.border.staticWhite.fadedHighlighted' },\n { y: -2, blur: 0, spread: 0, color: 'interactive.border.staticWhite.fadedHighlighted' },\n ],\n disabled: [],\n },\n },\n };\n};\n\nconst textColor = (property: 'icon' | 'text') => {\n return {\n base: {\n primary: {\n default: `interactive.${property}.onPrimary.normal`,\n highlighted: `interactive.${property}.onPrimary.normal`,\n disabled: `interactive.${property}.primary.disabled`,\n },\n secondary: {\n default: `interactive.${property}.gray.normal`,\n highlighted: `interactive.${property}.gray.normal`,\n disabled: `interactive.${property}.gray.disabled`,\n },\n tertiary: {\n default: `interactive.${property}.gray.normal`,\n highlighted: `interactive.${property}.gray.normal`,\n disabled: `interactive.${property}.gray.disabled`,\n },\n },\n white: {\n primary: {\n default: `interactive.${property}.staticBlack.muted`,\n highlighted: `interactive.${property}.staticBlack.muted`,\n disabled: `interactive.${property}.staticBlack.disabled`,\n },\n secondary: {\n default: `interactive.${property}.staticWhite.normal`,\n highlighted: `interactive.${property}.staticWhite.normal`,\n disabled: `interactive.${property}.staticWhite.disabled`,\n },\n tertiary: {\n default: `interactive.${property}.staticWhite.normal`,\n highlighted: `interactive.${property}.staticWhite.normal`,\n disabled: `interactive.${property}.staticWhite.disabled`,\n },\n },\n black: {\n primary: {\n default: `interactive.${property}.staticWhite.normal`,\n highlighted: `interactive.${property}.staticWhite.normal`,\n disabled: `interactive.${property}.staticWhite.disabled`,\n },\n },\n transparent: {\n tertiary: {\n default: property === 'icon' ? 'interactive.icon.gray.muted' : 'surface.text.gray.normal',\n highlighted:\n property === 'icon' ? 'interactive.icon.gray.subtle' : 'surface.text.gray.normal',\n disabled: `interactive.${property}.gray.disabled`,\n },\n },\n\n color: (color: FeedbackColors) => {\n return {\n primary: {\n default: `interactive.${property}.staticWhite.normal`,\n highlighted: `interactive.${property}.staticWhite.normal`,\n disabled: `interactive.${property}.${color}.disabled`,\n },\n secondary: {\n default: `interactive.${property}.${color}.normal`,\n highlighted: `interactive.${property}.${color}.normal`,\n disabled: `interactive.${property}.${color}.disabled`,\n },\n } as const;\n },\n } as const;\n};\n\nconst typography: ButtonTypography = {\n fonts: {\n size: {\n xsmall: 75,\n small: 75,\n medium: 100,\n large: 200,\n },\n },\n lineHeights: {\n xsmall: 75,\n small: 75,\n medium: 100,\n large: 200,\n },\n};\n\nconst minHeight: Record<NonNullable<BaseButtonProps['size']>, ButtonMinHeight> = {\n xsmall: size[28],\n small: size[32],\n medium: size[36],\n large: size[48],\n};\n\nconst buttonPadding: Record<\n NonNullable<BaseButtonProps['size']>,\n Record<'top' | 'bottom' | 'left' | 'right', keyof Theme['spacing']>\n> = {\n xsmall: {\n top: 0,\n bottom: 0,\n left: 3,\n right: 3,\n },\n small: {\n top: 0,\n bottom: 0,\n left: 3,\n right: 3,\n },\n medium: {\n top: 0,\n bottom: 0,\n left: 4,\n right: 4,\n },\n large: {\n top: 0,\n bottom: 0,\n left: 5,\n right: 5,\n },\n};\n\nconst buttonBorderRadius = {\n xsmall: 'small',\n small: 'small',\n medium: 'small',\n large: 'medium',\n} as const;\n\nconst buttonIconOnlyHeightWidth = {\n xsmall: makeSize(size['28']),\n small: makeSize(size['32']),\n medium: makeSize(size['36']),\n large: makeSize(size['48']),\n} as const;\n\nconst buttonSizeToIconSizeMap: Record<NonNullable<BaseButtonProps['size']>, IconSize> = {\n xsmall: 'small',\n small: 'small',\n medium: 'medium',\n large: 'medium',\n};\n\nconst buttonIconOnlySizeToIconSizeMap: Record<NonNullable<BaseButtonProps['size']>, IconSize> = {\n xsmall: 'medium',\n small: 'medium',\n medium: 'medium',\n large: 'medium',\n};\n\nconst buttonSizeToSpinnerSizeMap: Record<\n NonNullable<BaseButtonProps['size']>,\n SpinnerProps['size']\n> = {\n xsmall: 'medium',\n small: 'medium',\n medium: 'medium',\n large: 'large',\n};\n\n/**\n * Spinner color mapping based on button variant and color\n */\nconst spinnerColor = {\n base: {\n primary: 'primary',\n secondary: 'neutral',\n tertiary: 'neutral',\n transparent: 'primary',\n },\n white: {\n primary: 'white',\n secondary: 'white',\n tertiary: 'white',\n },\n black: {\n primary: 'white',\n },\n positive: {\n primary: 'positive',\n secondary: 'positive',\n },\n negative: {\n primary: 'negative',\n secondary: 'negative',\n },\n notice: {\n primary: 'notice',\n secondary: 'notice',\n },\n information: {\n primary: 'information',\n secondary: 'information',\n },\n neutral: {\n primary: 'neutral',\n secondary: 'neutral',\n },\n} as const;\n\nexport {\n boxShadow,\n backgroundGradient,\n textColor,\n spinnerColor,\n typography,\n minHeight,\n buttonSizeToIconSizeMap,\n buttonIconOnlySizeToIconSizeMap,\n buttonSizeToSpinnerSizeMap,\n buttonPadding,\n buttonIconOnlyHeightWidth,\n buttonBorderRadius,\n};\n\nexport type { ButtonBoxShadow };\n"],"names":["backgroundGradient","color","base","primary","default","highlighted","disabled","secondary","tertiary","transparent","white","black","boxShadow","y","blur","spread","textColor","property","typography","fonts","size","xsmall","small","medium","large","lineHeights","minHeight","buttonPadding","top","bottom","left","right","buttonBorderRadius","buttonIconOnlyHeightWidth","makeSize","buttonSizeToIconSizeMap","buttonIconOnlySizeToIconSizeMap","buttonSizeToSpinnerSizeMap","spinnerColor","positive","negative","notice","information","neutral"],"mappings":";;;;;AAuBM,IAAAA,kBAAkB,CAAG,SAArBA,kBAAkBA,CAAIC,KAAiC,CAAK,CAChE,OAAO,C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"}
1
+ {"version":3,"file":"buttonTokens.js","sources":["../../../../../../src/components/Button/BaseButton/buttonTokens.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-function-return-type */\nimport type { BaseButtonProps } from './BaseButton';\nimport type { Theme } from '~components/BladeProvider';\nimport type { IconSize } from '~components/Icons';\nimport type { SpinnerProps } from '~components/Spinner';\nimport type { Size } from '~tokens/global';\nimport { size } from '~tokens/global';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { makeSize } from '~utils';\nimport type { DotNotationToken } from '~utils/lodashButBetter/get';\n\nexport type ButtonMinHeight = Size[28] | Size[32] | Size[36] | Size[48];\n\nexport type ButtonTypography = {\n fonts: {\n size: Record<NonNullable<BaseButtonProps['size']>, keyof Theme['typography']['fonts']['size']>;\n };\n lineHeights: Record<\n NonNullable<BaseButtonProps['size']>,\n keyof Theme['typography']['lineHeights']\n >;\n};\n\nconst backgroundGradient = (color: FeedbackColors | 'primary') => {\n return {\n base: {\n primary: {\n default: `interactive.background.${color}.default`,\n highlighted: `interactive.background.${color}.highlighted`,\n disabled: `interactive.background.${color}.disabled`,\n },\n secondary: {\n default: 'surface.background.gray.intense',\n highlighted: 'surface.background.gray.intense',\n disabled: 'interactive.background.staticWhite.ghost',\n },\n tertiary: {\n default: 'surface.background.gray.intense',\n highlighted: 'surface.background.gray.intense',\n disabled: 'interactive.background.staticWhite.ghost',\n },\n transparent: {\n default: 'transparent',\n highlighted: 'interactive.background.gray.faded',\n disabled: 'interactive.background.gray.disabled',\n },\n },\n white: {\n primary: {\n default: 'interactive.background.staticWhite.default',\n highlighted: 'interactive.background.staticWhite.highlighted',\n disabled: 'interactive.background.staticWhite.disabled',\n },\n secondary: {\n default: 'interactive.background.staticWhite.faded',\n highlighted: 'interactive.background.staticBlack.faded',\n disabled: 'interactive.background.gray.disabled',\n },\n tertiary: {\n default: 'interactive.background.staticWhite.faded',\n highlighted: 'interactive.background.staticBlack.faded',\n disabled: 'interactive.background.gray.disabled',\n },\n },\n } as const;\n};\n\ntype BoxShadowValue = {\n y: number;\n blur: number;\n spread: number;\n color: DotNotationToken<Theme['colors']>;\n};\n\ntype ButtonBoxShadow = BoxShadowValue[];\n\n/**\n * Box-shadow tokens for buttons (includes border + 3D effects)\n * Each shadow is: inset 0 {y}px {blur}px {spread}px {color}\n */\nconst boxShadow = (\n color: FeedbackColors | 'primary',\n): {\n base: Record<\n 'primary' | 'secondary' | 'tertiary' | 'transparent',\n Record<'default' | 'highlighted' | 'disabled', ButtonBoxShadow>\n >;\n white: Record<\n 'primary' | 'secondary' | 'tertiary',\n Record<'default' | 'highlighted' | 'disabled', ButtonBoxShadow>\n >;\n neutral: Record<'primary', Record<'default' | 'highlighted' | 'disabled', ButtonBoxShadow>>;\n} => {\n return {\n base: {\n primary: {\n default: [\n { y: -1.5, blur: 0, spread: 0, color: `interactive.border.${color}.highlighted` },\n { y: 0, blur: 0, spread: 0.5, color: `interactive.border.${color}.default` },\n { y: 1.5, blur: 0, spread: 0, color: 'interactive.border.staticWhite.faded' },\n { y: -2, blur: 0, spread: 0, color: 'interactive.border.staticWhite.faded' },\n ],\n highlighted: [\n { y: -1.5, blur: 0, spread: 0, color: `interactive.border.${color}.highlighted` },\n { y: 0, blur: 0, spread: 0.5, color: `interactive.border.${color}.highlighted` },\n { y: 1.5, blur: 0, spread: 0, color: 'interactive.border.staticWhite.faded' },\n { y: -2, blur: 0, spread: 0, color: 'interactive.border.staticWhite.faded' },\n ],\n disabled: [],\n },\n secondary: {\n default: [\n { y: -1, blur: 0.5, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n { y: 0, blur: 0, spread: 1, color: 'interactive.border.gray.default' },\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.gray.default' },\n ],\n highlighted: [\n { y: -1, blur: 0.5, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n { y: 0, blur: 0, spread: 1, color: 'interactive.border.gray.highlighted' },\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.gray.default' },\n ],\n disabled: [{ y: 0, blur: 0, spread: 1, color: 'interactive.border.gray.disabled' }],\n },\n tertiary: {\n default: [\n { y: -1, blur: 0.5, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n { y: 0, blur: 0, spread: 1, color: 'interactive.border.gray.default' },\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.gray.default' },\n ],\n highlighted: [\n { y: -1, blur: 0.5, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n { y: 0, blur: 0, spread: 1, color: 'interactive.border.gray.highlighted' },\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.gray.default' },\n ],\n disabled: [{ y: 0, blur: 0, spread: 1, color: 'interactive.border.gray.disabled' }],\n },\n transparent: {\n default: [],\n highlighted: [],\n disabled: [],\n },\n },\n white: {\n primary: {\n default: [\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n {\n y: 0,\n blur: 0,\n spread: 0.5,\n color: 'interactive.border.staticBlack.fadedHighlighted',\n },\n ],\n highlighted: [\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n {\n y: 0,\n blur: 0,\n spread: 0.5,\n color: 'interactive.border.staticBlack.fadedHighlighted',\n },\n ],\n disabled: [],\n },\n secondary: {\n default: [\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n { y: 0, blur: 0, spread: 1, color: 'interactive.border.staticWhite.highlighted' },\n ],\n highlighted: [\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n { y: 0, blur: 0, spread: 1, color: 'interactive.border.staticWhite.highlighted' },\n ],\n disabled: [{ y: 0, blur: 0, spread: 1, color: 'interactive.border.staticWhite.disabled' }],\n },\n tertiary: {\n default: [\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n { y: 0, blur: 0, spread: 1, color: 'interactive.border.staticWhite.highlighted' },\n ],\n highlighted: [\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.staticBlack.fadedHighlighted' },\n { y: 0, blur: 0, spread: 1, color: 'interactive.border.staticWhite.highlighted' },\n ],\n disabled: [{ y: 0, blur: 0, spread: 1, color: 'interactive.border.staticWhite.disabled' }],\n },\n },\n neutral: {\n primary: {\n default: [\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.staticBlack.highlighted' },\n { y: 0, blur: 0, spread: 0.5, color: 'interactive.border.staticBlack.highlighted' },\n { y: 1.5, blur: 0, spread: 0, color: 'interactive.border.staticWhite.fadedHighlighted' },\n { y: -2, blur: 0, spread: 0, color: 'interactive.border.staticWhite.fadedHighlighted' },\n ],\n highlighted: [\n { y: -1.5, blur: 0, spread: 0, color: 'interactive.border.staticBlack.highlighted' },\n { y: 0, blur: 0, spread: 0.5, color: 'interactive.border.staticBlack.highlighted' },\n { y: 1.5, blur: 0, spread: 0, color: 'interactive.border.staticWhite.fadedHighlighted' },\n { y: -2, blur: 0, spread: 0, color: 'interactive.border.staticWhite.fadedHighlighted' },\n ],\n disabled: [],\n },\n },\n };\n};\n\nconst textColor = (property: 'icon' | 'text') => {\n return {\n base: {\n primary: {\n default: `interactive.${property}.onPrimary.normal`,\n highlighted: `interactive.${property}.onPrimary.normal`,\n disabled: `interactive.${property}.primary.disabled`,\n },\n secondary: {\n default: `interactive.${property}.gray.normal`,\n highlighted: `interactive.${property}.gray.normal`,\n disabled: `interactive.${property}.gray.disabled`,\n },\n tertiary: {\n default: `interactive.${property}.gray.normal`,\n highlighted: `interactive.${property}.gray.normal`,\n disabled: `interactive.${property}.gray.disabled`,\n },\n },\n white: {\n primary: {\n default: `interactive.${property}.staticBlack.muted`,\n highlighted: `interactive.${property}.staticBlack.muted`,\n disabled: `interactive.${property}.staticBlack.disabled`,\n },\n secondary: {\n default: `interactive.${property}.staticWhite.normal`,\n highlighted: `interactive.${property}.staticWhite.normal`,\n disabled: `interactive.${property}.staticWhite.disabled`,\n },\n tertiary: {\n default: `interactive.${property}.staticWhite.normal`,\n highlighted: `interactive.${property}.staticWhite.normal`,\n disabled: `interactive.${property}.staticWhite.disabled`,\n },\n },\n neutral: {\n primary: {\n default: `interactive.${property}.onNeutral.normal`,\n highlighted: `interactive.${property}.onNeutral.normal`,\n disabled: `interactive.${property}.onNeutral.disabled`,\n },\n },\n transparent: {\n tertiary: {\n default: property === 'icon' ? 'interactive.icon.gray.muted' : 'surface.text.gray.normal',\n highlighted:\n property === 'icon' ? 'interactive.icon.gray.subtle' : 'surface.text.gray.normal',\n disabled: `interactive.${property}.gray.disabled`,\n },\n },\n\n color: (color: FeedbackColors) => {\n return {\n primary: {\n default: `interactive.${property}.staticWhite.normal`,\n highlighted: `interactive.${property}.staticWhite.normal`,\n disabled: `interactive.${property}.${color}.disabled`,\n },\n secondary: {\n default: `interactive.${property}.${color}.normal`,\n highlighted: `interactive.${property}.${color}.normal`,\n disabled: `interactive.${property}.${color}.disabled`,\n },\n } as const;\n },\n } as const;\n};\n\nconst typography: ButtonTypography = {\n fonts: {\n size: {\n xsmall: 75,\n small: 75,\n medium: 100,\n large: 200,\n },\n },\n lineHeights: {\n xsmall: 75,\n small: 75,\n medium: 100,\n large: 200,\n },\n};\n\nconst minHeight: Record<NonNullable<BaseButtonProps['size']>, ButtonMinHeight> = {\n xsmall: size[28],\n small: size[32],\n medium: size[36],\n large: size[48],\n};\n\nconst buttonPadding: Record<\n NonNullable<BaseButtonProps['size']>,\n Record<'top' | 'bottom' | 'left' | 'right', keyof Theme['spacing']>\n> = {\n xsmall: {\n top: 0,\n bottom: 0,\n left: 3,\n right: 3,\n },\n small: {\n top: 0,\n bottom: 0,\n left: 3,\n right: 3,\n },\n medium: {\n top: 0,\n bottom: 0,\n left: 4,\n right: 4,\n },\n large: {\n top: 0,\n bottom: 0,\n left: 5,\n right: 5,\n },\n};\n\nconst buttonBorderRadius = {\n xsmall: 'small',\n small: 'small',\n medium: 'small',\n large: 'medium',\n} as const;\n\nconst buttonIconOnlyHeightWidth = {\n xsmall: makeSize(size['28']),\n small: makeSize(size['32']),\n medium: makeSize(size['36']),\n large: makeSize(size['48']),\n} as const;\n\nconst buttonSizeToIconSizeMap: Record<NonNullable<BaseButtonProps['size']>, IconSize> = {\n xsmall: 'small',\n small: 'small',\n medium: 'medium',\n large: 'medium',\n};\n\nconst buttonIconOnlySizeToIconSizeMap: Record<NonNullable<BaseButtonProps['size']>, IconSize> = {\n xsmall: 'medium',\n small: 'medium',\n medium: 'medium',\n large: 'medium',\n};\n\nconst buttonSizeToSpinnerSizeMap: Record<\n NonNullable<BaseButtonProps['size']>,\n SpinnerProps['size']\n> = {\n xsmall: 'medium',\n small: 'medium',\n medium: 'medium',\n large: 'large',\n};\n\n/**\n * Spinner color mapping based on button variant and color\n */\nconst spinnerColor = {\n base: {\n primary: 'primary',\n secondary: 'neutral',\n tertiary: 'neutral',\n transparent: 'primary',\n },\n white: {\n primary: 'white',\n secondary: 'white',\n tertiary: 'white',\n },\n positive: {\n primary: 'positive',\n secondary: 'positive',\n },\n negative: {\n primary: 'negative',\n secondary: 'negative',\n },\n notice: {\n primary: 'notice',\n secondary: 'notice',\n },\n information: {\n primary: 'information',\n secondary: 'information',\n },\n neutral: {\n // The primary emphasis renders content on a filled neutral surface, so the\n // spinner follows the same inverted treatment as the label.\n primary: 'onNeutral',\n secondary: 'neutral',\n },\n} as const;\n\nexport {\n boxShadow,\n backgroundGradient,\n textColor,\n spinnerColor,\n typography,\n minHeight,\n buttonSizeToIconSizeMap,\n buttonIconOnlySizeToIconSizeMap,\n buttonSizeToSpinnerSizeMap,\n buttonPadding,\n buttonIconOnlyHeightWidth,\n buttonBorderRadius,\n};\n\nexport type { ButtonBoxShadow };\n"],"names":["backgroundGradient","color","base","primary","default","highlighted","disabled","secondary","tertiary","transparent","white","boxShadow","y","blur","spread","neutral","textColor","property","typography","fonts","size","xsmall","small","medium","large","lineHeights","minHeight","buttonPadding","top","bottom","left","right","buttonBorderRadius","buttonIconOnlyHeightWidth","makeSize","buttonSizeToIconSizeMap","buttonIconOnlySizeToIconSizeMap","buttonSizeToSpinnerSizeMap","spinnerColor","positive","negative","notice","information"],"mappings":";;;;;AAuBM,IAAAA,kBAAkB,CAAG,SAArBA,kBAAkBA,CAAIC,KAAiC,CAAK,CAChE,OAAO,CACLC,IAAI,CAAE,CACJC,OAAO,CAAE,CACPC,OAAO,CAAE,0BAA0BH,KAAK,CAAA,QAAA,CAAU,CAClDI,WAAW,CAAE,CAAA,uBAAA,EAA0BJ,KAAK,CAAc,YAAA,CAAA,CAC1DK,QAAQ,CAAE,CAA0BL,uBAAAA,EAAAA,KAAK,WAC3C,CAAC,CACDM,SAAS,CAAE,CACTH,OAAO,CAAE,iCAAiC,CAC1CC,WAAW,CAAE,iCAAiC,CAC9CC,QAAQ,CAAE,0CACZ,CAAC,CACDE,QAAQ,CAAE,CACRJ,OAAO,CAAE,iCAAiC,CAC1CC,WAAW,CAAE,iCAAiC,CAC9CC,QAAQ,CAAE,0CACZ,CAAC,CACDG,WAAW,CAAE,CACXL,OAAO,CAAE,aAAa,CACtBC,WAAW,CAAE,mCAAmC,CAChDC,QAAQ,CAAE,sCACZ,CACF,CAAC,CACDI,KAAK,CAAE,CACLP,OAAO,CAAE,CACPC,OAAO,CAAE,4CAA4C,CACrDC,WAAW,CAAE,gDAAgD,CAC7DC,QAAQ,CAAE,6CACZ,CAAC,CACDC,SAAS,CAAE,CACTH,OAAO,CAAE,0CAA0C,CACnDC,WAAW,CAAE,0CAA0C,CACvDC,QAAQ,CAAE,sCACZ,CAAC,CACDE,QAAQ,CAAE,CACRJ,OAAO,CAAE,0CAA0C,CACnDC,WAAW,CAAE,0CAA0C,CACvDC,QAAQ,CAAE,sCACZ,CACF,CACF,CAAC,CACH,EAeM,IAAAK,SAAS,CAAG,SAAZA,SAASA,CACbV,KAAiC,CAW9B,CACH,OAAO,CACLC,IAAI,CAAE,CACJC,OAAO,CAAE,CACPC,OAAO,CAAE,CAC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,SAAS,CAAE,SACb,CACF;;;;"}
@@ -8,7 +8,7 @@ import { jsx } from 'react/jsx-runtime';
8
8
  import BaseButton from '../Button/BaseButton/BaseButton.js';
9
9
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
10
10
 
11
- var _excluded=["children","icon","color","placement","offset","zIndex","isDisabled","isLoading","href","target","rel","type","accessibilityLabel","onClick","onBlur","onFocus","onMouseLeave","onMouseMove","onMouseDown","onPointerDown","onPointerEnter","onTouchStart","onTouchEnd","testID"];var _this=undefined,_jsxFileName="/home/runner/work/blade/blade/packages/blade/src/components/FloatingActionButton/FloatingActionButton.tsx";var colorToSpinnerColor={primary:'white',black:'white',white:'neutral'};var _FloatingActionButton=function _FloatingActionButton(_ref,ref){var children=_ref.children,icon=_ref.icon,_ref$color=_ref.color,color=_ref$color===void 0?'primary':_ref$color,_ref$placement=_ref.placement,placement=_ref$placement===void 0?'bottom-end':_ref$placement,_ref$offset=_ref.offset,offset=_ref$offset===void 0?'spacing.5':_ref$offset,_ref$zIndex=_ref.zIndex,zIndex=_ref$zIndex===void 0?componentZIndices.fab:_ref$zIndex,_ref$isDisabled=_ref.isDisabled,isDisabled=_ref$isDisabled===void 0?false:_ref$isDisabled,_ref$isLoading=_ref.isLoading,isLoading=_ref$isLoading===void 0?false:_ref$isLoading,href=_ref.href,target=_ref.target,rel=_ref.rel,_ref$type=_ref.type,type=_ref$type===void 0?'button':_ref$type,accessibilityLabel=_ref.accessibilityLabel,onClick=_ref.onClick,onBlur=_ref.onBlur,onFocus=_ref.onFocus,onMouseLeave=_ref.onMouseLeave,onMouseMove=_ref.onMouseMove,onMouseDown=_ref.onMouseDown,onPointerDown=_ref.onPointerDown,onPointerEnter=_ref.onPointerEnter,onTouchStart=_ref.onTouchStart,onTouchEnd=_ref.onTouchEnd,testID=_ref.testID,rest=_objectWithoutProperties(_ref,_excluded);return jsx(FloatingActionButtonContainer,Object.assign({placement:placement,offset:offset,zIndex:zIndex,testID:testID},rest,{children:jsx(BaseButton,{ref:ref,icon:icon,variant:"primary",color:color,size:"large",_borderRadius:"max",_iconSize:"xlarge",_spinnerColor:colorToSpinnerColor[color],accessibilityProps:{label:accessibilityLabel},href:href,target:target,rel:rel,type:type,isDisabled:isDisabled,isLoading:isLoading,onClick:onClick,onBlur:onBlur,onFocus:onFocus,onMouseLeave:onMouseLeave,onMouseMove:onMouseMove,onMouseDown:onMouseDown,onPointerDown:onPointerDown,onPointerEnter:onPointerEnter,onTouchStart:onTouchStart,onTouchEnd:onTouchEnd,children:children})}));};var FloatingActionButton=assignWithoutSideEffects(React__default.forwardRef(_FloatingActionButton),{displayName:'FloatingActionButton',componentId:'FloatingActionButton'});
11
+ var _excluded=["children","icon","color","placement","offset","zIndex","isDisabled","isLoading","href","target","rel","type","accessibilityLabel","onClick","onBlur","onFocus","onMouseLeave","onMouseMove","onMouseDown","onPointerDown","onPointerEnter","onTouchStart","onTouchEnd","testID"];var _this=undefined,_jsxFileName="/home/runner/work/blade/blade/packages/blade/src/components/FloatingActionButton/FloatingActionButton.tsx";var colorToSpinnerColor={primary:'white',neutral:'onNeutral',white:'neutral'};var _FloatingActionButton=function _FloatingActionButton(_ref,ref){var children=_ref.children,icon=_ref.icon,_ref$color=_ref.color,color=_ref$color===void 0?'primary':_ref$color,_ref$placement=_ref.placement,placement=_ref$placement===void 0?'bottom-end':_ref$placement,_ref$offset=_ref.offset,offset=_ref$offset===void 0?'spacing.5':_ref$offset,_ref$zIndex=_ref.zIndex,zIndex=_ref$zIndex===void 0?componentZIndices.fab:_ref$zIndex,_ref$isDisabled=_ref.isDisabled,isDisabled=_ref$isDisabled===void 0?false:_ref$isDisabled,_ref$isLoading=_ref.isLoading,isLoading=_ref$isLoading===void 0?false:_ref$isLoading,href=_ref.href,target=_ref.target,rel=_ref.rel,_ref$type=_ref.type,type=_ref$type===void 0?'button':_ref$type,accessibilityLabel=_ref.accessibilityLabel,onClick=_ref.onClick,onBlur=_ref.onBlur,onFocus=_ref.onFocus,onMouseLeave=_ref.onMouseLeave,onMouseMove=_ref.onMouseMove,onMouseDown=_ref.onMouseDown,onPointerDown=_ref.onPointerDown,onPointerEnter=_ref.onPointerEnter,onTouchStart=_ref.onTouchStart,onTouchEnd=_ref.onTouchEnd,testID=_ref.testID,rest=_objectWithoutProperties(_ref,_excluded);return jsx(FloatingActionButtonContainer,Object.assign({placement:placement,offset:offset,zIndex:zIndex,testID:testID},rest,{children:jsx(BaseButton,{ref:ref,icon:icon,variant:"primary",color:color,size:"large",_borderRadius:"max",_iconSize:"xlarge",_spinnerColor:colorToSpinnerColor[color],accessibilityProps:{label:accessibilityLabel},href:href,target:target,rel:rel,type:type,isDisabled:isDisabled,isLoading:isLoading,onClick:onClick,onBlur:onBlur,onFocus:onFocus,onMouseLeave:onMouseLeave,onMouseMove:onMouseMove,onMouseDown:onMouseDown,onPointerDown:onPointerDown,onPointerEnter:onPointerEnter,onTouchStart:onTouchStart,onTouchEnd:onTouchEnd,children:children})}));};var FloatingActionButton=assignWithoutSideEffects(React__default.forwardRef(_FloatingActionButton),{displayName:'FloatingActionButton',componentId:'FloatingActionButton'});
12
12
 
13
13
  export { FloatingActionButton };
14
14
  //# sourceMappingURL=FloatingActionButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FloatingActionButton.js","sources":["../../../../../src/components/FloatingActionButton/FloatingActionButton.tsx"],"sourcesContent":["import React from 'react';\nimport { FloatingActionButtonContainer } from './FloatingActionButtonContainer';\nimport type { FloatingActionButtonProps } from './types';\nimport BaseButton from '~components/Button/BaseButton';\nimport { componentZIndices } from '~utils/componentZIndices';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { BladeElementRef } from '~utils/types';\n\n/**\n * The shared spinner map would render a white spinner on the white button, where\n * it is invisible.\n */\nconst colorToSpinnerColor = {\n primary: 'white',\n black: 'white',\n white: 'neutral',\n} as const;\n\n/**\n * ### FloatingActionButton component\n *\n * A persistent, elevated button anchored to the bottom of the viewport, used for the single most important action on a screen.\n *\n * ---\n *\n * #### Usage\n *\n * ```jsx\n * <FloatingActionButton icon={PlusIcon} onClick={() => createPayment()}>\n * Create payment\n * </FloatingActionButton>\n *\n * // icon-only, accessibilityLabel is required\n * <FloatingActionButton\n * icon={PlusIcon}\n * accessibilityLabel=\"Create payment\"\n * onClick={() => createPayment()}\n * />\n * ```\n *\n * Checkout {@link https://blade.razorpay.com/?path=/docs/components-floatingactionbutton--docs FloatingActionButton Documentation}\n */\nconst _FloatingActionButton: React.ForwardRefRenderFunction<\n BladeElementRef,\n FloatingActionButtonProps\n> = (\n {\n children,\n icon,\n color = 'primary',\n placement = 'bottom-end',\n offset = 'spacing.5',\n zIndex = componentZIndices.fab,\n isDisabled = false,\n isLoading = false,\n href,\n target,\n rel,\n type = 'button',\n accessibilityLabel,\n onClick,\n onBlur,\n onFocus,\n onMouseLeave,\n onMouseMove,\n onMouseDown,\n onPointerDown,\n onPointerEnter,\n onTouchStart,\n onTouchEnd,\n testID,\n ...rest\n },\n ref,\n) => {\n return (\n <FloatingActionButtonContainer\n placement={placement}\n offset={offset}\n zIndex={zIndex}\n testID={testID}\n {...rest}\n >\n <BaseButton\n ref={ref}\n icon={icon}\n variant=\"primary\"\n color={color}\n size=\"large\"\n _borderRadius=\"max\"\n _iconSize=\"xlarge\"\n _spinnerColor={colorToSpinnerColor[color]}\n accessibilityProps={{ label: accessibilityLabel }}\n href={href}\n target={target}\n rel={rel}\n type={type}\n isDisabled={isDisabled}\n isLoading={isLoading}\n onClick={onClick}\n onBlur={onBlur}\n onFocus={onFocus}\n onMouseLeave={onMouseLeave}\n onMouseMove={onMouseMove}\n onMouseDown={onMouseDown}\n onPointerDown={onPointerDown}\n onPointerEnter={onPointerEnter}\n onTouchStart={onTouchStart}\n onTouchEnd={onTouchEnd}\n >\n {children}\n </BaseButton>\n </FloatingActionButtonContainer>\n );\n};\n\nconst FloatingActionButton = assignWithoutSideEffects(React.forwardRef(_FloatingActionButton), {\n displayName: 'FloatingActionButton',\n componentId: 'FloatingActionButton',\n});\n\nexport { FloatingActionButton };\n"],"names":["colorToSpinnerColor","primary","black","white","_FloatingActionButton","_ref","ref","children","icon","_ref$color","color","_ref$placement","placement","_ref$offset","offset","_ref$zIndex","zIndex","componentZIndices","fab","_ref$isDisabled","isDisabled","_ref$isLoading","isLoading","href","target","rel","_ref$type","type","accessibilityLabel","onClick","onBlur","onFocus","onMouseLeave","onMouseMove","onMouseDown","onPointerDown","onPointerEnter","onTouchStart","onTouchEnd","testID","rest","_objectWithoutProperties","_excluded","_jsx","FloatingActionButtonContainer","Object","assign","BaseButton","variant","size","_borderRadius","_iconSize","_spinnerColor","accessibilityProps","label","FloatingActionButton","assignWithoutSideEffects","React","forwardRef","displayName","componentId"],"mappings":";;;;;;;;;;8aAYA,IAAMA,mBAAmB,CAAG,CAC1BC,OAAO,CAAE,OAAO,CAChBC,KAAK,CAAE,OAAO,CACdC,KAAK,CAAE,SACT,CAAU,CA0BV,IAAMC,qBAGL,CAAG,SAHEA,qBAGLA,CAAAC,IAAA,CA4BCC,GAAG,CACA,KA3BDC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CACRC,IAAI,CAAAH,IAAA,CAAJG,IAAI,CAAAC,UAAA,CAAAJ,IAAA,CACJK,KAAK,CAALA,KAAK,CAAAD,UAAA,GAAA,KAAA,CAAA,CAAG,SAAS,CAAAA,UAAA,CAAAE,cAAA,CAAAN,IAAA,CACjBO,SAAS,CAATA,SAAS,CAAAD,cAAA,GAAA,KAAA,CAAA,CAAG,YAAY,CAAAA,cAAA,CAAAE,WAAA,CAAAR,IAAA,CACxBS,MAAM,CAANA,MAAM,CAAAD,WAAA,GAAA,KAAA,CAAA,CAAG,WAAW,CAAAA,WAAA,CAAAE,WAAA,CAAAV,IAAA,CACpBW,MAAM,CAANA,MAAM,CAAAD,WAAA,GAAGE,KAAAA,CAAAA,CAAAA,iBAAiB,CAACC,GAAG,CAAAH,WAAA,CAAAI,eAAA,CAAAd,IAAA,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C,GAAG,CAAEA,GAAI,CACTE,IAAI,CAAEA,IAAK,CACXwC,OAAO,CAAC,SAAS,CACjBtC,KAAK,CAAEA,KAAM,CACbuC,IAAI,CAAC,OAAO,CACZC,aAAa,CAAC,KAAK,CACnBC,SAAS,CAAC,QAAQ,CAClBC,aAAa,CAAEpD,mBAAmB,CAACU,KAAK,CAAE,CAC1C2C,kBAAkB,CAAE,CAAEC,KAAK,CAAE1B,kBAAmB,CAAE,CAClDL,IAAI,CAAEA,IAAK,CACXC,MAAM,CAAEA,MAAO,CACfC,GAAG,CAAEA,GAAI,CACTE,IAAI,CAAEA,IAAK,CACXP,UAAU,CAAEA,UAAW,CACvBE,SAAS,CAAEA,SAAU,CACrBO,OAAO,CAAEA,OAAQ,CACjBC,MAAM,CAAEA,MAAO,CACfC,OAAO,CAAEA,OAAQ,CACjBC,YAAY,CAAEA,YAAa,CAC3BC,WAAW,CAAEA,WAAY,CACzBC,WAAW,CAAEA,WAAY,CACzBC,aAAa,CAAEA,aAAc,CAC7BC,cAAc,CAAEA,cAAe,CAC/BC,YAAY,CAAEA,YAAa,CAC3BC,UAAU,CAAEA,UAAW,CAAA/B,QAAA,CAEtBA,QAAQ,CACC,CAAC,CACgB,CAAA,CAAC,CAEpC,CAAC,CAEK,IAAAgD,oBAAoB,CAAGC,wBAAwB,CAACC,cAAK,CAACC,UAAU,CAACtD,qBAAqB,CAAC,CAAE,CAC7FuD,WAAW,CAAE,sBAAsB,CACnCC,WAAW,CAAE,sBACf,CAAC;;;;"}
1
+ {"version":3,"file":"FloatingActionButton.js","sources":["../../../../../src/components/FloatingActionButton/FloatingActionButton.tsx"],"sourcesContent":["import React from 'react';\nimport { FloatingActionButtonContainer } from './FloatingActionButtonContainer';\nimport type { FloatingActionButtonProps } from './types';\nimport BaseButton from '~components/Button/BaseButton';\nimport { componentZIndices } from '~utils/componentZIndices';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { BladeElementRef } from '~utils/types';\n\n/**\n * The shared spinner map would render a white spinner on the white button, where\n * it is invisible.\n */\nconst colorToSpinnerColor = {\n primary: 'white',\n neutral: 'onNeutral',\n white: 'neutral',\n} as const;\n\n/**\n * ### FloatingActionButton component\n *\n * A persistent, elevated button anchored to the bottom of the viewport, used for the single most important action on a screen.\n *\n * ---\n *\n * #### Usage\n *\n * ```jsx\n * <FloatingActionButton icon={PlusIcon} onClick={() => createPayment()}>\n * Create payment\n * </FloatingActionButton>\n *\n * // icon-only, accessibilityLabel is required\n * <FloatingActionButton\n * icon={PlusIcon}\n * accessibilityLabel=\"Create payment\"\n * onClick={() => createPayment()}\n * />\n * ```\n *\n * Checkout {@link https://blade.razorpay.com/?path=/docs/components-floatingactionbutton--docs FloatingActionButton Documentation}\n */\nconst _FloatingActionButton: React.ForwardRefRenderFunction<\n BladeElementRef,\n FloatingActionButtonProps\n> = (\n {\n children,\n icon,\n color = 'primary',\n placement = 'bottom-end',\n offset = 'spacing.5',\n zIndex = componentZIndices.fab,\n isDisabled = false,\n isLoading = false,\n href,\n target,\n rel,\n type = 'button',\n accessibilityLabel,\n onClick,\n onBlur,\n onFocus,\n onMouseLeave,\n onMouseMove,\n onMouseDown,\n onPointerDown,\n onPointerEnter,\n onTouchStart,\n onTouchEnd,\n testID,\n ...rest\n },\n ref,\n) => {\n return (\n <FloatingActionButtonContainer\n placement={placement}\n offset={offset}\n zIndex={zIndex}\n testID={testID}\n {...rest}\n >\n <BaseButton\n ref={ref}\n icon={icon}\n variant=\"primary\"\n color={color}\n size=\"large\"\n _borderRadius=\"max\"\n _iconSize=\"xlarge\"\n _spinnerColor={colorToSpinnerColor[color]}\n accessibilityProps={{ label: accessibilityLabel }}\n href={href}\n target={target}\n rel={rel}\n type={type}\n isDisabled={isDisabled}\n isLoading={isLoading}\n onClick={onClick}\n onBlur={onBlur}\n onFocus={onFocus}\n onMouseLeave={onMouseLeave}\n onMouseMove={onMouseMove}\n onMouseDown={onMouseDown}\n onPointerDown={onPointerDown}\n onPointerEnter={onPointerEnter}\n onTouchStart={onTouchStart}\n onTouchEnd={onTouchEnd}\n >\n {children}\n </BaseButton>\n </FloatingActionButtonContainer>\n );\n};\n\nconst FloatingActionButton = assignWithoutSideEffects(React.forwardRef(_FloatingActionButton), {\n displayName: 'FloatingActionButton',\n componentId: 'FloatingActionButton',\n});\n\nexport { FloatingActionButton };\n"],"names":["colorToSpinnerColor","primary","neutral","white","_FloatingActionButton","_ref","ref","children","icon","_ref$color","color","_ref$placement","placement","_ref$offset","offset","_ref$zIndex","zIndex","componentZIndices","fab","_ref$isDisabled","isDisabled","_ref$isLoading","isLoading","href","target","rel","_ref$type","type","accessibilityLabel","onClick","onBlur","onFocus","onMouseLeave","onMouseMove","onMouseDown","onPointerDown","onPointerEnter","onTouchStart","onTouchEnd","testID","rest","_objectWithoutProperties","_excluded","_jsx","FloatingActionButtonContainer","Object","assign","BaseButton","variant","size","_borderRadius","_iconSize","_spinnerColor","accessibilityProps","label","FloatingActionButton","assignWithoutSideEffects","React","forwardRef","displayName","componentId"],"mappings":";;;;;;;;;;8aAYA,IAAMA,mBAAmB,CAAG,CAC1BC,OAAO,CAAE,OAAO,CAChBC,OAAO,CAAE,WAAW,CACpBC,KAAK,CAAE,SACT,CAAU,CA0BV,IAAMC,qBAGL,CAAG,SAHEA,qBAGLA,CAAAC,IAAA,CA4BCC,GAAG,CACA,KA3BDC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CACRC,IAAI,CAAAH,IAAA,CAAJG,IAAI,CAAAC,UAAA,CAAAJ,IAAA,CACJK,KAAK,CAALA,KAAK,CAAAD,UAAA,GAAA,KAAA,CAAA,CAAG,SAAS,CAAAA,UAAA,CAAAE,cAAA,CAAAN,IAAA,CACjBO,SAAS,CAATA,SAAS,CAAAD,cAAA,GAAA,KAAA,CAAA,CAAG,YAAY,CAAAA,cAAA,CAAAE,WAAA,CAAAR,IAAA,CACxBS,MAAM,CAANA,MAAM,CAAAD,WAAA,GAAA,KAAA,CAAA,CAAG,WAAW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CAAEA,SAAU,CACrBE,MAAM,CAAEA,MAAO,CACfE,MAAM,CAAEA,MAAO,CACfuB,MAAM,CAAEA,MAAO,CACXC,CAAAA,IAAI,CAAAjC,CAAAA,QAAA,CAERoC,GAAA,CAACI,UAAU,CAAA,CACTzC,GAAG,CAAEA,GAAI,CACTE,IAAI,CAAEA,IAAK,CACXwC,OAAO,CAAC,SAAS,CACjBtC,KAAK,CAAEA,KAAM,CACbuC,IAAI,CAAC,OAAO,CACZC,aAAa,CAAC,KAAK,CACnBC,SAAS,CAAC,QAAQ,CAClBC,aAAa,CAAEpD,mBAAmB,CAACU,KAAK,CAAE,CAC1C2C,kBAAkB,CAAE,CAAEC,KAAK,CAAE1B,kBAAmB,CAAE,CAClDL,IAAI,CAAEA,IAAK,CACXC,MAAM,CAAEA,MAAO,CACfC,GAAG,CAAEA,GAAI,CACTE,IAAI,CAAEA,IAAK,CACXP,UAAU,CAAEA,UAAW,CACvBE,SAAS,CAAEA,SAAU,CACrBO,OAAO,CAAEA,OAAQ,CACjBC,MAAM,CAAEA,MAAO,CACfC,OAAO,CAAEA,OAAQ,CACjBC,YAAY,CAAEA,YAAa,CAC3BC,WAAW,CAAEA,WAAY,CACzBC,WAAW,CAAEA,WAAY,CACzBC,aAAa,CAAEA,aAAc,CAC7BC,cAAc,CAAEA,cAAe,CAC/BC,YAAY,CAAEA,YAAa,CAC3BC,UAAU,CAAEA,UAAW,CAAA/B,QAAA,CAEtBA,QAAQ,CACC,CAAC,CACgB,CAAA,CAAC,CAEpC,CAAC,CAEK,IAAAgD,oBAAoB,CAAGC,wBAAwB,CAACC,cAAK,CAACC,UAAU,CAACtD,qBAAqB,CAAC,CAAE,CAC7FuD,WAAW,CAAE,sBAAsB,CACnCC,WAAW,CAAE,sBACf,CAAC;;;;"}
@@ -21,7 +21,7 @@ import { makeAccessible } from '../../../utils/makeAccessible/makeAccessible.nat
21
21
  import { makeSize } from '../../../utils/makeSize/makeSize.js';
22
22
  import { Text } from '../../Typography/Text/Text.js';
23
23
 
24
- var _excluded=["label","labelPosition","accessibilityLabel","color","size","testID"];var _this=undefined,_jsxFileName="/home/runner/work/blade/blade/packages/blade/src/components/Spinner/BaseSpinner/BaseSpinner.tsx";var getColor=function getColor(_ref){var color=_ref.color,theme=_ref.theme;if(color&&color==='white'){return getIn(theme.colors,'interactive.icon.staticWhite.subtle');}if(color&&color!=='neutral'){return getIn(theme.colors,`interactive.icon.${color}.subtle`);}return getIn(theme.colors,'interactive.icon.gray.muted');};var _BaseSpinner=function _BaseSpinner(_ref2,ref){var label=_ref2.label,_ref2$labelPosition=_ref2.labelPosition,labelPosition=_ref2$labelPosition===void 0?'right':_ref2$labelPosition,accessibilityLabel=_ref2.accessibilityLabel,_ref2$color=_ref2.color,color=_ref2$color===void 0?'neutral':_ref2$color,_ref2$size=_ref2.size,size=_ref2$size===void 0?'medium':_ref2$size,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;return jsx(BaseBox,Object.assign({ref:ref},metaAttribute({name:MetaConstants.Spinner,testID:testID}),getStyledProps(styledProps),{children:jsxs(BaseBox,Object.assign({display:"flex",alignItems:"center",flexDirection:labelPosition==='right'?'row':'column'},makeAccessible({label:accessibilityLabel,role:'progressbar'}),{children:[jsx(SpinningBox,{children:jsx(SpinnerIcon,{dimensions:makeSize(dimensions[size]),color:getColor({color:color,theme:theme})})}),label&&label.trim().length>0?jsx(BaseBox,{marginLeft:labelPosition==='right'?'spacing.3':'spacing.0',marginTop:labelPosition==='bottom'?'spacing.3':'spacing.0',children:jsx(Text,{variant:"body",weight:"regular",size:"small",color:"surface.text.gray.muted",children:label})}):null]}))}));};var BaseSpinner=React__default.forwardRef(_BaseSpinner);
24
+ var _excluded=["label","labelPosition","accessibilityLabel","color","size","testID"];var _this=undefined,_jsxFileName="/home/runner/work/blade/blade/packages/blade/src/components/Spinner/BaseSpinner/BaseSpinner.tsx";var getColor=function getColor(_ref){var color=_ref.color,theme=_ref.theme;if(color&&color==='white'){return getIn(theme.colors,'interactive.icon.staticWhite.subtle');}if(color&&color==='onNeutral'){return getIn(theme.colors,'interactive.icon.onNeutral.normal');}if(color&&color!=='neutral'){return getIn(theme.colors,`interactive.icon.${color}.subtle`);}return getIn(theme.colors,'interactive.icon.gray.muted');};var _BaseSpinner=function _BaseSpinner(_ref2,ref){var label=_ref2.label,_ref2$labelPosition=_ref2.labelPosition,labelPosition=_ref2$labelPosition===void 0?'right':_ref2$labelPosition,accessibilityLabel=_ref2.accessibilityLabel,_ref2$color=_ref2.color,color=_ref2$color===void 0?'neutral':_ref2$color,_ref2$size=_ref2.size,size=_ref2$size===void 0?'medium':_ref2$size,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;return jsx(BaseBox,Object.assign({ref:ref},metaAttribute({name:MetaConstants.Spinner,testID:testID}),getStyledProps(styledProps),{children:jsxs(BaseBox,Object.assign({display:"flex",alignItems:"center",flexDirection:labelPosition==='right'?'row':'column'},makeAccessible({label:accessibilityLabel,role:'progressbar'}),{children:[jsx(SpinningBox,{children:jsx(SpinnerIcon,{dimensions:makeSize(dimensions[size]),color:getColor({color:color,theme:theme})})}),label&&label.trim().length>0?jsx(BaseBox,{marginLeft:labelPosition==='right'?'spacing.3':'spacing.0',marginTop:labelPosition==='bottom'?'spacing.3':'spacing.0',children:jsx(Text,{variant:"body",weight:"regular",size:"small",color:"surface.text.gray.muted",children:label})}):null]}))}));};var BaseSpinner=React__default.forwardRef(_BaseSpinner);
25
25
 
26
26
  export { BaseSpinner };
27
27
  //# sourceMappingURL=BaseSpinner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseSpinner.js","sources":["../../../../../../src/components/Spinner/BaseSpinner/BaseSpinner.tsx"],"sourcesContent":["import React from 'react';\nimport { dimensions } from './spinnerTokens';\nimport SpinnerIcon from './SpinnerIcon';\nimport { SpinningBox } from './SpinningBox';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { Theme } from '~components/BladeProvider';\nimport { useTheme } from '~components/BladeProvider';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography';\nimport type { BladeElementRef, TestID } from '~utils/types';\nimport { makeSize } from '~utils/makeSize';\nimport { makeAccessible } from '~utils/makeAccessible';\n\ntype BaseSpinnerProps = {\n /**\n * Sets the color of the spinner.\n *\n * @default 'default'\n */\n color?: 'primary' | 'white' | FeedbackColors;\n /**\n * Sets the label of the spinner.\n *\n * @default 'right'\n */\n label?: string;\n /**\n * Sets the label of the spinner.\n *\n */\n labelPosition?: 'right' | 'bottom';\n /**\n * Sets the size of the spinner.\n *\n * @default 'medium'\n */\n size?: 'medium' | 'large' | 'xlarge';\n /**\n * Sets the aria-label for web & accessibilityLabel react-native.\n *\n */\n accessibilityLabel: string;\n} & TestID &\n StyledPropsBlade;\n\nconst getColor = ({ color, theme }: { color: BaseSpinnerProps['color']; theme: Theme }): string => {\n if (color && color === 'white') {\n return getIn(theme.colors, 'interactive.icon.staticWhite.subtle');\n }\n if (color && color !== 'neutral') {\n return getIn(theme.colors, `interactive.icon.${color}.subtle`);\n }\n return getIn(theme.colors, 'interactive.icon.gray.muted');\n};\n\nconst _BaseSpinner = (\n {\n label,\n labelPosition = 'right',\n accessibilityLabel,\n color = 'neutral',\n size = 'medium',\n testID,\n ...styledProps\n }: BaseSpinnerProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n const { theme } = useTheme();\n return (\n <BaseBox\n ref={ref as never}\n {...metaAttribute({ name: MetaConstants.Spinner, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseBox\n display=\"flex\"\n alignItems=\"center\"\n flexDirection={labelPosition === 'right' ? 'row' : 'column'}\n {...makeAccessible({\n label: accessibilityLabel,\n role: 'progressbar',\n })}\n >\n <SpinningBox>\n <SpinnerIcon dimensions={makeSize(dimensions[size])} color={getColor({ color, theme })} />\n </SpinningBox>\n {label && label.trim().length > 0 ? (\n <BaseBox\n marginLeft={labelPosition === 'right' ? 'spacing.3' : 'spacing.0'}\n marginTop={labelPosition === 'bottom' ? 'spacing.3' : 'spacing.0'}\n >\n <Text variant=\"body\" weight=\"regular\" size=\"small\" color=\"surface.text.gray.muted\">\n {label}\n </Text>\n </BaseBox>\n ) : null}\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst BaseSpinner = React.forwardRef(_BaseSpinner);\n\nexport type { BaseSpinnerProps };\nexport { BaseSpinner };\n"],"names":["getColor","_ref","color","theme","getIn","colors","_BaseSpinner","_ref2","ref","label","_ref2$labelPosition","labelPosition","accessibilityLabel","_ref2$color","_ref2$size","size","testID","styledProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","_jsx","BaseBox","Object","assign","metaAttribute","name","MetaConstants","Spinner","getStyledProps","children","_jsxs","display","alignItems","flexDirection","makeAccessible","role","SpinningBox","SpinnerIcon","dimensions","makeSize","trim","length","marginLeft","marginTop","Text","variant","weight","BaseSpinner","React","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;wNAiDA,IAAMA,QAAQ,CAAG,SAAXA,QAAQA,CAAAC,IAAA,CAAqF,CAAA,IAA/EC,KAAK,CAAAD,IAAA,CAALC,KAAK,CAAEC,KAAK,CAAAF,IAAA,CAALE,KAAK,CAC9B,GAAID,KAAK,EAAIA,KAAK,GAAK,OAAO,CAAE,CAC9B,OAAOE,KAAK,CAACD,KAAK,CAACE,MAAM,CAAE,qCAAqC,CAAC,CACnE,CACA,GAAIH,KAAK,EAAIA,KAAK,GAAK,SAAS,CAAE,CAChC,OAAOE,KAAK,CAACD,KAAK,CAACE,MAAM,CAAE,oBAAoBH,KAAK,CAAA,OAAA,CAAS,CAAC,CAChE,CACA,OAAOE,KAAK,CAACD,KAAK,CAACE,MA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,WAAW,CAAAP,CAAAA,QAAA,CACVT,GAAA,CAACiB,WAAW,CAAA,CAACC,UAAU,CAAEC,QAAQ,CAACD,UAAU,CAACzB,IAAI,CAAC,CAAE,CAACb,KAAK,CAAEF,QAAQ,CAAC,CAAEE,KAAK,CAALA,KAAK,CAAEC,KAAK,CAALA,KAAM,CAAC,CAAE,CAAE,CAAC,CAC/E,CAAC,CACbM,KAAK,EAAIA,KAAK,CAACiC,IAAI,EAAE,CAACC,MAAM,CAAG,CAAC,CAC/BrB,GAAA,CAACC,OAAO,CAAA,CACNqB,UAAU,CAAEjC,aAAa,GAAK,OAAO,CAAG,WAAW,CAAG,WAAY,CAClEkC,SAAS,CAAElC,aAAa,GAAK,QAAQ,CAAG,WAAW,CAAG,WAAY,CAAAoB,QAAA,CAElET,GAAA,CAACwB,IAAI,CAACC,CAAAA,OAAO,CAAC,MAAM,CAACC,MAAM,CAAC,SAAS,CAACjC,IAAI,CAAC,OAAO,CAACb,KAAK,CAAC,yBAAyB,CAAA6B,QAAA,CAC/EtB,KAAK,CACF,CAAC,CACA,CAAC,CACR,IAAI,GACD,CAAC,CAAA,CACH,CAAC,CAEd,CAAC,CAEK,IAAAwC,WAAW,CAAGC,cAAK,CAACC,UAAU,CAAC7C,YAAY;;;;"}
1
+ {"version":3,"file":"BaseSpinner.js","sources":["../../../../../../src/components/Spinner/BaseSpinner/BaseSpinner.tsx"],"sourcesContent":["import React from 'react';\nimport { dimensions } from './spinnerTokens';\nimport SpinnerIcon from './SpinnerIcon';\nimport { SpinningBox } from './SpinningBox';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { Theme } from '~components/BladeProvider';\nimport { useTheme } from '~components/BladeProvider';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography';\nimport type { BladeElementRef, TestID } from '~utils/types';\nimport { makeSize } from '~utils/makeSize';\nimport { makeAccessible } from '~utils/makeAccessible';\n\ntype BaseSpinnerProps = {\n /**\n * Sets the color of the spinner.\n *\n * @default 'default'\n */\n color?: 'primary' | 'white' | 'onNeutral' | FeedbackColors;\n /**\n * Sets the label of the spinner.\n *\n * @default 'right'\n */\n label?: string;\n /**\n * Sets the label of the spinner.\n *\n */\n labelPosition?: 'right' | 'bottom';\n /**\n * Sets the size of the spinner.\n *\n * @default 'medium'\n */\n size?: 'medium' | 'large' | 'xlarge';\n /**\n * Sets the aria-label for web & accessibilityLabel react-native.\n *\n */\n accessibilityLabel: string;\n} & TestID &\n StyledPropsBlade;\n\nconst getColor = ({ color, theme }: { color: BaseSpinnerProps['color']; theme: Theme }): string => {\n if (color && color === 'white') {\n return getIn(theme.colors, 'interactive.icon.staticWhite.subtle');\n }\n // `onNeutral` renders on a filled neutral surface, which inverts with the\n // theme, so it tracks the surface instead of resolving to a static color.\n if (color && color === 'onNeutral') {\n return getIn(theme.colors, 'interactive.icon.onNeutral.normal');\n }\n if (color && color !== 'neutral') {\n return getIn(theme.colors, `interactive.icon.${color}.subtle`);\n }\n return getIn(theme.colors, 'interactive.icon.gray.muted');\n};\n\nconst _BaseSpinner = (\n {\n label,\n labelPosition = 'right',\n accessibilityLabel,\n color = 'neutral',\n size = 'medium',\n testID,\n ...styledProps\n }: BaseSpinnerProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n const { theme } = useTheme();\n return (\n <BaseBox\n ref={ref as never}\n {...metaAttribute({ name: MetaConstants.Spinner, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseBox\n display=\"flex\"\n alignItems=\"center\"\n flexDirection={labelPosition === 'right' ? 'row' : 'column'}\n {...makeAccessible({\n label: accessibilityLabel,\n role: 'progressbar',\n })}\n >\n <SpinningBox>\n <SpinnerIcon dimensions={makeSize(dimensions[size])} color={getColor({ color, theme })} />\n </SpinningBox>\n {label && label.trim().length > 0 ? (\n <BaseBox\n marginLeft={labelPosition === 'right' ? 'spacing.3' : 'spacing.0'}\n marginTop={labelPosition === 'bottom' ? 'spacing.3' : 'spacing.0'}\n >\n <Text variant=\"body\" weight=\"regular\" size=\"small\" color=\"surface.text.gray.muted\">\n {label}\n </Text>\n </BaseBox>\n ) : null}\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst BaseSpinner = React.forwardRef(_BaseSpinner);\n\nexport type { BaseSpinnerProps };\nexport { BaseSpinner };\n"],"names":["getColor","_ref","color","theme","getIn","colors","_BaseSpinner","_ref2","ref","label","_ref2$labelPosition","labelPosition","accessibilityLabel","_ref2$color","_ref2$size","size","testID","styledProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","_jsx","BaseBox","Object","assign","metaAttribute","name","MetaConstants","Spinner","getStyledProps","children","_jsxs","display","alignItems","flexDirection","makeAccessible","role","SpinningBox","SpinnerIcon","dimensions","makeSize","trim","length","marginLeft","marginTop","Text","variant","weight","BaseSpinner","React","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;wNAiDA,IAAMA,QAAQ,CAAG,SAAXA,QAAQA,CAAAC,IAAA,CAAqF,CAA/E,IAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CAAEC,KAAK,CAAAF,IAAA,CAALE,KAAK,CAC9B,GAAID,KAAK,EAAIA,KAAK,GAAK,OAAO,CAAE,CAC9B,OAAOE,KAAK,CAACD,KAAK,CAACE,MAAM,CAAE,qCAAqC,CAAC,CACnE,CAGA,GAAIH,KAAK,EAAIA,KAAK,GAAK,WAAW,CAAE,CAClC,OAAOE,KAAK,CAACD,KAAK,CAACE,MAAM,CAAE,mCAAmC,CAAC,CACjE,CACA,GAAIH,KAAK,EAAIA,KAAK,GAAK,SAAS,CAAE,CAChC,OAAOE,KAAK,CAACD,KAAK,CAACE,MAAM,CAAE,oBAAoBH,KAAK,CAAA,OAAA,CAAS,CAAC,CAChE,CACA,OAAOE,KAAK,CAACD,KAAK,CA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,QAAA,EAEFT,GAAA,CAACgB,WAAW,CAAA,CAAAP,QAAA,CACVT,GAAA,CAACiB,WAAW,CAAA,CAACC,UAAU,CAAEC,QAAQ,CAACD,UAAU,CAACzB,IAAI,CAAC,CAAE,CAACb,KAAK,CAAEF,QAAQ,CAAC,CAAEE,KAAK,CAALA,KAAK,CAAEC,KAAK,CAALA,KAAM,CAAC,CAAE,CAAE,CAAC,CAC/E,CAAC,CACbM,KAAK,EAAIA,KAAK,CAACiC,IAAI,EAAE,CAACC,MAAM,CAAG,CAAC,CAC/BrB,GAAA,CAACC,OAAO,CACNqB,CAAAA,UAAU,CAAEjC,aAAa,GAAK,OAAO,CAAG,WAAW,CAAG,WAAY,CAClEkC,SAAS,CAAElC,aAAa,GAAK,QAAQ,CAAG,WAAW,CAAG,WAAY,CAAAoB,QAAA,CAElET,GAAA,CAACwB,IAAI,CAACC,CAAAA,OAAO,CAAC,MAAM,CAACC,MAAM,CAAC,SAAS,CAACjC,IAAI,CAAC,OAAO,CAACb,KAAK,CAAC,yBAAyB,CAAA6B,QAAA,CAC/EtB,KAAK,CACF,CAAC,CACA,CAAC,CACR,IAAI,CACD,CAAA,CAAA,CAAC,CACH,CAAA,CAAC,CAEd,CAAC,CAEK,IAAAwC,WAAW,CAAGC,cAAK,CAACC,UAAU,CAAC7C,YAAY;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Spinner.js","sources":["../../../../../../src/components/Spinner/Spinner/Spinner.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseSpinner } from '../BaseSpinner';\nimport type { BaseSpinnerProps } from '../BaseSpinner';\nimport type { BladeElementRef } from '~utils/types';\n\ntype SpinnerProps = BaseSpinnerProps & {\n /**\n * Sets the color of the spinner.\n *\n * @default 'default'\n */\n color?: 'primary' | 'neutral' | 'white';\n};\n\nconst _Spinner = (\n {\n label,\n labelPosition,\n accessibilityLabel,\n color = 'neutral',\n size = 'medium',\n testID,\n ...styledProps\n }: SpinnerProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n return (\n <BaseSpinner\n ref={ref as never}\n label={label}\n labelPosition={labelPosition}\n accessibilityLabel={accessibilityLabel ?? label ?? 'Loading'}\n color={color}\n size={size}\n testID={testID}\n {...styledProps}\n />\n );\n};\n\nconst Spinner = React.forwardRef(_Spinner);\n\nexport type { SpinnerProps };\nexport { Spinner };\n"],"names":["this","_Spinner","_ref","ref","_ref2","label","labelPosition","accessibilityLabel","_ref$color","color","_ref$size","size","testID","styledProps","_objectWithoutProperties","_excluded","_jsx","BaseSpinner","Object","assign","Spinner","React","forwardRef"],"mappings":";;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,OAAA,CAAA,eAAA,CAAA,oBAAA,CAAA,OAAA,CAAA,MAAA,CAAA,QAAA,CAAA,CAAA,IAAA,KAAA,CAAAA,SAAA,CAAA,YAAA,CAAA,yFAAA,CAcA,IAAMC,QAAQ,CAAG,SAAXA,QAAQA,CAAAC,IAAA,CAUZC,GAA+B,CACR,CAAAC,IAAAA,KAAA,CATrB,IAAAC,KAAK,CAAAH,IAAA,CAALG,KAAK,CACLC,aAAa,CAAAJ,IAAA,CAAbI,aAAa,CACbC,kBAAkB,CAAAL,IAAA,CAAlBK,kBAAkB,CAAAC,UAAA,CAAAN,IAAA,CAClBO,KAAK,CAALA,KAAK,CAAAD,UAAA,GAAA,KAAA,CAAA,CAAG,SAAS,CAAAA,UAAA,CAAAE,SAAA,CAAAR,IAAA,CACjBS,IAAI,CAAJA,IAAI,CAAAD,SAAA,GAAG,KAAA,CAAA,CAAA,QAAQ,CAAAA,SAAA,CACfE,MAAM,CAAAV,IAAA,CAANU,MAAM,CACHC,WAAW,CAAAC,wBAAA,CAAAZ,IAAA,CAAAa,SAAA,CAAA,CAIhB,OACEC,GAAA,CAACC,WAAW,CAAAC,MAAA,CAAAC,MAAA,CAAA,CACVhB,GAAG,CAAEA,GAAa,CAClBE,KAAK,CAAEA,KAAM,CACbC,aAAa,CAAEA,aAAc,CAC7BC,kBAAkB,CAAAH,CAAAA,KAAA,CAAEG,kBAAkB,EAAA,IAAA,CAAlBA,kBAAkB,CAAIF,KAAK,GAAAD,IAAAA,CAAAA,KAAA,CAAI,SAAU,CAC7DK,KAAK,CAAEA,KAAM,CACbE,IAAI,CAAEA,IAAK,CACXC,MAAM,CAAEA,MAAO,CAAA,CACXC,WAAW,CAChB,CAAC,CAEN,CAAC,CAEK,IAAAO,OAAO,CAAGC,cAAK,CAACC,UAAU,CAACrB,QAAQ;;;;"}
1
+ {"version":3,"file":"Spinner.js","sources":["../../../../../../src/components/Spinner/Spinner/Spinner.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseSpinner } from '../BaseSpinner';\nimport type { BaseSpinnerProps } from '../BaseSpinner';\nimport type { BladeElementRef } from '~utils/types';\n\ntype SpinnerProps = BaseSpinnerProps & {\n /**\n * Sets the color of the spinner.\n *\n * @default 'default'\n */\n color?: 'primary' | 'neutral' | 'white' | 'onNeutral';\n};\n\nconst _Spinner = (\n {\n label,\n labelPosition,\n accessibilityLabel,\n color = 'neutral',\n size = 'medium',\n testID,\n ...styledProps\n }: SpinnerProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n return (\n <BaseSpinner\n ref={ref as never}\n label={label}\n labelPosition={labelPosition}\n accessibilityLabel={accessibilityLabel ?? label ?? 'Loading'}\n color={color}\n size={size}\n testID={testID}\n {...styledProps}\n />\n );\n};\n\nconst Spinner = React.forwardRef(_Spinner);\n\nexport type { SpinnerProps };\nexport { Spinner };\n"],"names":["this","_Spinner","_ref","ref","_ref2","label","labelPosition","accessibilityLabel","_ref$color","color","_ref$size","size","testID","styledProps","_objectWithoutProperties","_excluded","_jsx","BaseSpinner","Object","assign","Spinner","React","forwardRef"],"mappings":";;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,OAAA,CAAA,eAAA,CAAA,oBAAA,CAAA,OAAA,CAAA,MAAA,CAAA,QAAA,CAAA,CAAA,IAAA,KAAA,CAAAA,SAAA,CAAA,YAAA,CAAA,yFAAA,CAcA,IAAMC,QAAQ,CAAG,SAAXA,QAAQA,CAAAC,IAAA,CAUZC,GAA+B,CACR,CAAAC,IAAAA,KAAA,CATrB,IAAAC,KAAK,CAAAH,IAAA,CAALG,KAAK,CACLC,aAAa,CAAAJ,IAAA,CAAbI,aAAa,CACbC,kBAAkB,CAAAL,IAAA,CAAlBK,kBAAkB,CAAAC,UAAA,CAAAN,IAAA,CAClBO,KAAK,CAALA,KAAK,CAAAD,UAAA,GAAA,KAAA,CAAA,CAAG,SAAS,CAAAA,UAAA,CAAAE,SAAA,CAAAR,IAAA,CACjBS,IAAI,CAAJA,IAAI,CAAAD,SAAA,GAAG,KAAA,CAAA,CAAA,QAAQ,CAAAA,SAAA,CACfE,MAAM,CAAAV,IAAA,CAANU,MAAM,CACHC,WAAW,CAAAC,wBAAA,CAAAZ,IAAA,CAAAa,SAAA,CAAA,CAIhB,OACEC,GAAA,CAACC,WAAW,CAAAC,MAAA,CAAAC,MAAA,CAAA,CACVhB,GAAG,CAAEA,GAAa,CAClBE,KAAK,CAAEA,KAAM,CACbC,aAAa,CAAEA,aAAc,CAC7BC,kBAAkB,CAAAH,CAAAA,KAAA,CAAEG,kBAAkB,EAAA,IAAA,CAAlBA,kBAAkB,CAAIF,KAAK,GAAAD,IAAAA,CAAAA,KAAA,CAAI,SAAU,CAC7DK,KAAK,CAAEA,KAAM,CACbE,IAAI,CAAEA,IAAK,CACXC,MAAM,CAAEA,MAAO,CAAA,CACXC,WAAW,CAChB,CAAC,CAEN,CAAC,CAEK,IAAAO,OAAO,CAAGC,cAAK,CAACC,UAAU,CAACrB,QAAQ;;;;"}
@@ -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/compat/object/cloneDeep.js';
1
+ import '../node_modules/es-toolkit/dist/object/cloneDeep.js';
2
2
  //# sourceMappingURL=cloneDeep3.js.map
@@ -1,2 +1,2 @@
1
- import '../node_modules/es-toolkit/dist/array/flatten.js';
1
+ import '../node_modules/es-toolkit/dist/compat/array/flatten.js';
2
2
  //# sourceMappingURL=flatten.js.map
@@ -1,2 +1,2 @@
1
- import '../node_modules/es-toolkit/dist/compat/array/flatten.js';
1
+ import '../node_modules/es-toolkit/dist/array/flatten.js';
2
2
  //# sourceMappingURL=flatten3.js.map
@@ -26,8 +26,8 @@ import '../../../utils/getStringChildren/index.js';
26
26
  import '../../../utils/logger/index.js';
27
27
  import '../../../utils/makeAnalyticsAttribute/index.js';
28
28
  import { jsx, jsxs } from 'react/jsx-runtime';
29
- import { throwBladeError } from '../../../utils/logger/logger.js';
30
29
  import { isReactNative } from '../../../utils/platform/isReactNative.js';
30
+ import { throwBladeError } from '../../../utils/logger/logger.js';
31
31
  import { makeSize } from '../../../utils/makeSize/makeSize.js';
32
32
  import { makeSpace } from '../../../utils/makeSpace/makeSpace.js';
33
33
  import { makeBorderSize } from '../../../utils/makeBorderSize/makeBorderSize.js';
@@ -52,34 +52,30 @@ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol
52
52
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
53
53
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
54
54
  /**
55
- * `white`, `black` and `transparent` are not feedback colors, so the token
56
- * factories are still called with `primary` and the value is looked up under its
57
- * own key instead of under `base`.
55
+ * `white` and `transparent` are not feedback colors, so the token factories are
56
+ * still called with `primary` and the value is looked up under its own key
57
+ * instead of under `base`.
58
58
  */
59
59
  var isStaticOrTransparentColor = function isStaticOrTransparentColor(color) {
60
- return color === 'white' || color === 'black' || color === 'transparent';
60
+ return color === 'white' || color === 'transparent';
61
+ };
62
+
63
+ /**
64
+ * The filled `neutral` surface needs inverted content and a heavier inner shadow
65
+ * than the shared feedback treatment, so its `primary` emphasis is looked up
66
+ * under a dedicated key. The remaining emphases fall back to `base`.
67
+ */
68
+ var isFilledNeutral = function isFilledNeutral(color, variant) {
69
+ return color === 'neutral' && variant === 'primary';
61
70
  };
62
71
  var getSpinnerColor = function getSpinnerColor(_ref) {
63
72
  var variant = _ref.variant,
64
73
  color = _ref.color;
65
- // `black` only exists as a primary button, so it is looked up separately from
66
- // the colors that carry a full variant record.
67
- if (color === 'black') {
68
- return spinnerColor.black.primary;
69
- }
70
74
  if (color !== 'primary' && color !== 'transparent' && color in spinnerColor) {
71
75
  return spinnerColor[color][variant];
72
76
  }
73
77
  return spinnerColor.base[variant];
74
78
  };
75
- var assertBlackIsPrimary = function assertBlackIsPrimary(variant) {
76
- if (variant !== 'primary') {
77
- throwBladeError({
78
- moduleName: 'BaseButton',
79
- message: "Black color can only be used with primary variant but received \"".concat(variant, "\"")
80
- });
81
- }
82
- };
83
79
  var getRenderElement = function getRenderElement(href) {
84
80
  if (isReactNative()) {
85
81
  return undefined; // as property doesn't work with react native
@@ -95,17 +91,13 @@ var getBackgroundColorToken = function getBackgroundColorToken(_ref2) {
95
91
  color = _ref2.color;
96
92
  var _state = state === 'focus' || state === 'hover' ? 'highlighted' : state;
97
93
 
98
- // For white, black and transparent colors, we use 'primary' as the base color
99
- // since the actual token lookup uses the white/black/transparent specific paths
94
+ // For white and transparent colors, we use 'primary' as the base color
95
+ // since the actual token lookup uses the white/transparent specific paths
100
96
  var gradientColor = isStaticOrTransparentColor(color) || !color ? 'primary' : color;
101
97
  var tokens = backgroundGradient(gradientColor);
102
98
  if (color === 'white') {
103
99
  return tokens.white[variant][_state];
104
100
  }
105
- if (color === 'black') {
106
- assertBlackIsPrimary(variant);
107
- return tokens.black.primary[_state];
108
- }
109
101
  if (color === 'transparent') {
110
102
  if (variant !== 'tertiary') {
111
103
  throw new Error("Transparent color can only be used with tertiary variant but received \"".concat(variant, "\""));
@@ -129,9 +121,8 @@ var getBoxShadowToken = function getBoxShadowToken(_ref3) {
129
121
  if (color === 'white') {
130
122
  return tokens.white[variant][_state];
131
123
  }
132
- if (color === 'black') {
133
- assertBlackIsPrimary(variant);
134
- return tokens.black.primary[_state];
124
+ if (isFilledNeutral(color, variant)) {
125
+ return tokens.neutral.primary[_state];
135
126
  }
136
127
  if (color === 'transparent') {
137
128
  if (variant !== 'tertiary') {
@@ -151,9 +142,8 @@ var getTextColorToken = function getTextColorToken(_ref4) {
151
142
  if (color === 'white') {
152
143
  return tokens.white[variant][_state];
153
144
  }
154
- if (color === 'black') {
155
- assertBlackIsPrimary(variant);
156
- return tokens.black.primary[_state];
145
+ if (isFilledNeutral(color, variant)) {
146
+ return tokens.neutral.primary[_state];
157
147
  }
158
148
  if (color === 'transparent') {
159
149
  if (variant !== 'tertiary') {
@@ -323,7 +313,9 @@ var getProps = function getProps(_ref5) {
323
313
  state: 'focus'
324
314
  })),
325
315
  focusBoxShadow: getBoxShadow('focus', color),
326
- focusRingColor: getIn(theme.colors, 'surface.border.primary.muted'),
316
+ // The system focus ring is a faded primary blue, which the design replaces
317
+ // with a faded neutral ring on the filled neutral surface.
318
+ focusRingColor: getIn(theme.colors, isFilledNeutral(color, variant) ? 'interactive.border.neutral.faded' : 'surface.border.primary.muted'),
327
319
  borderRadius: makeBorderSize(theme.border.radius[_borderRadius !== null && _borderRadius !== void 0 ? _borderRadius : buttonBorderRadius[size]]),
328
320
  motionDuration: 'duration.xquick',
329
321
  motionEasing: 'easing.standard'