@fluentui/react-button 9.1.12 → 9.1.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. package/CHANGELOG.json +81 -1
  2. package/CHANGELOG.md +26 -2
  3. package/lib/components/Button/Button.js +3 -2
  4. package/lib/components/Button/Button.js.map +1 -1
  5. package/lib/components/Button/renderButton.js +6 -4
  6. package/lib/components/Button/renderButton.js.map +1 -1
  7. package/lib/components/Button/useButton.js +0 -1
  8. package/lib/components/Button/useButton.js.map +1 -1
  9. package/lib/components/Button/useButtonStyles.js +309 -315
  10. package/lib/components/Button/useButtonStyles.js.map +1 -1
  11. package/lib/components/CompoundButton/CompoundButton.js +3 -2
  12. package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
  13. package/lib/components/CompoundButton/renderCompoundButton.js +10 -6
  14. package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
  15. package/lib/components/CompoundButton/useCompoundButton.js +4 -5
  16. package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
  17. package/lib/components/CompoundButton/useCompoundButtonStyles.js +124 -129
  18. package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  19. package/lib/components/MenuButton/MenuButton.js +3 -2
  20. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  21. package/lib/components/MenuButton/renderMenuButton.js +6 -4
  22. package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
  23. package/lib/components/MenuButton/useMenuButton.js +2 -3
  24. package/lib/components/MenuButton/useMenuButton.js.map +1 -1
  25. package/lib/components/MenuButton/useMenuButtonStyles.js +61 -67
  26. package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  27. package/lib/components/SplitButton/SplitButton.js +3 -2
  28. package/lib/components/SplitButton/SplitButton.js.map +1 -1
  29. package/lib/components/SplitButton/renderSplitButton.js +6 -4
  30. package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
  31. package/lib/components/SplitButton/useSplitButton.js +2 -4
  32. package/lib/components/SplitButton/useSplitButton.js.map +1 -1
  33. package/lib/components/SplitButton/useSplitButtonStyles.js +56 -62
  34. package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  35. package/lib/components/ToggleButton/ToggleButton.js +3 -2
  36. package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
  37. package/lib/components/ToggleButton/useToggleButton.js +0 -1
  38. package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
  39. package/lib/components/ToggleButton/useToggleButtonStyles.js +246 -249
  40. package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  41. package/lib/index.js.map +1 -1
  42. package/lib/utils/useToggleState.js +4 -3
  43. package/lib/utils/useToggleState.js.map +1 -1
  44. package/lib-commonjs/Button.js +0 -2
  45. package/lib-commonjs/Button.js.map +1 -1
  46. package/lib-commonjs/CompoundButton.js +0 -2
  47. package/lib-commonjs/CompoundButton.js.map +1 -1
  48. package/lib-commonjs/MenuButton.js +0 -2
  49. package/lib-commonjs/MenuButton.js.map +1 -1
  50. package/lib-commonjs/SplitButton.js +0 -2
  51. package/lib-commonjs/SplitButton.js.map +1 -1
  52. package/lib-commonjs/ToggleButton.js +0 -2
  53. package/lib-commonjs/ToggleButton.js.map +1 -1
  54. package/lib-commonjs/components/Button/Button.js +3 -7
  55. package/lib-commonjs/components/Button/Button.js.map +1 -1
  56. package/lib-commonjs/components/Button/Button.types.js.map +1 -1
  57. package/lib-commonjs/components/Button/index.js +0 -6
  58. package/lib-commonjs/components/Button/index.js.map +1 -1
  59. package/lib-commonjs/components/Button/renderButton.js +6 -8
  60. package/lib-commonjs/components/Button/renderButton.js.map +1 -1
  61. package/lib-commonjs/components/Button/useButton.js +0 -5
  62. package/lib-commonjs/components/Button/useButton.js.map +1 -1
  63. package/lib-commonjs/components/Button/useButtonStyles.js +309 -321
  64. package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -1
  65. package/lib-commonjs/components/CompoundButton/CompoundButton.js +3 -7
  66. package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
  67. package/lib-commonjs/components/CompoundButton/CompoundButton.types.js.map +1 -1
  68. package/lib-commonjs/components/CompoundButton/index.js +0 -7
  69. package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
  70. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js +10 -10
  71. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
  72. package/lib-commonjs/components/CompoundButton/useCompoundButton.js +4 -9
  73. package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
  74. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js +124 -134
  75. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  76. package/lib-commonjs/components/MenuButton/MenuButton.js +3 -7
  77. package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
  78. package/lib-commonjs/components/MenuButton/MenuButton.types.js.map +1 -1
  79. package/lib-commonjs/components/MenuButton/index.js +0 -7
  80. package/lib-commonjs/components/MenuButton/index.js.map +1 -1
  81. package/lib-commonjs/components/MenuButton/renderMenuButton.js +6 -8
  82. package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
  83. package/lib-commonjs/components/MenuButton/useMenuButton.js +2 -9
  84. package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
  85. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js +61 -73
  86. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  87. package/lib-commonjs/components/SplitButton/SplitButton.js +3 -7
  88. package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
  89. package/lib-commonjs/components/SplitButton/SplitButton.types.js.map +1 -1
  90. package/lib-commonjs/components/SplitButton/index.js +0 -7
  91. package/lib-commonjs/components/SplitButton/index.js.map +1 -1
  92. package/lib-commonjs/components/SplitButton/renderSplitButton.js +6 -8
  93. package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -1
  94. package/lib-commonjs/components/SplitButton/useSplitButton.js +2 -9
  95. package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
  96. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +56 -67
  97. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  98. package/lib-commonjs/components/ToggleButton/ToggleButton.js +3 -7
  99. package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
  100. package/lib-commonjs/components/ToggleButton/ToggleButton.types.js.map +1 -1
  101. package/lib-commonjs/components/ToggleButton/index.js +0 -7
  102. package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
  103. package/lib-commonjs/components/ToggleButton/renderToggleButton.js +0 -2
  104. package/lib-commonjs/components/ToggleButton/renderToggleButton.js.map +1 -1
  105. package/lib-commonjs/components/ToggleButton/useToggleButton.js +0 -5
  106. package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
  107. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js +246 -256
  108. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  109. package/lib-commonjs/index.js +0 -12
  110. package/lib-commonjs/index.js.map +1 -1
  111. package/lib-commonjs/utils/index.js +0 -2
  112. package/lib-commonjs/utils/index.js.map +1 -1
  113. package/lib-commonjs/utils/useToggleState.js +4 -7
  114. package/lib-commonjs/utils/useToggleState.js.map +1 -1
  115. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-button/src/components/Button/useButtonStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAIa,OAAA,CAAA,gBAAA,GAAgD;EAC3D,IAAI,EAAE,YADqD;EAE3D,IAAI,EAAE;AAFqD,CAAhD;AAKb,MAAM,cAAc,GAAG,6BAAv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KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,gBAAA,CAAiB,IADI,EAErB,iBAFqB,EAGrB,KAAK,CAAC,IAAN,CAAW,QAAX,KAAwB,SAAxB,IAAqC,KAAK,CAAC,IAAN,CAAW,QAAX,KAAwB,IAA7D,IAAqE,UAAU,CAAC,YAAD,CAH1D,EAIrB,UAAU,CAAC,IAAD,CAJW,EAKrB,KAAK,CAAC,IAAN,CAAW,SALU,CAAvB;EAOD;;EAED,OAAO,KAAP;AACD,CAjDM;;AAAM,OAAA,CAAA,wBAAA,GAAwB,wBAAxB","sourcesContent":["import { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { shorthands, makeStyles, makeResetStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { ButtonSlots, ButtonState } from './Button.types';\n\nexport const buttonClassNames: SlotClassNames<ButtonSlots> = {\n root: 'fui-Button',\n icon: 'fui-Button__icon',\n};\n\nconst iconSpacingVar = '--fui-Button__icon--spacing';\n\nconst buttonSpacingSmall = '3px';\nconst buttonSpacingMedium = '5px';\n\nconst useRootBaseClassName = makeResetStyles({\n alignItems: 'center',\n boxSizing: 'border-box',\n display: 'inline-flex',\n justifyContent: 'center',\n textDecorationLine: 'none',\n verticalAlign: 'middle',\n\n margin: 0,\n overflow: 'hidden',\n\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n\n fontFamily: tokens.fontFamilyBase,\n outlineStyle: 'none',\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n borderColor: tokens.colorNeutralStroke1Hover,\n color: tokens.colorNeutralForeground1Hover,\n\n cursor: 'pointer',\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n borderColor: tokens.colorNeutralStroke1Pressed,\n color: tokens.colorNeutralForeground1Pressed,\n\n outlineStyle: 'none',\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n },\n\n padding: `${buttonSpacingMedium} ${tokens.spacingHorizontalM}`,\n minWidth: '96px',\n borderRadius: tokens.borderRadiusMedium,\n\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightSemibold,\n lineHeight: tokens.lineHeightBase300,\n\n // Transition styles\n\n transitionDuration: tokens.durationFaster,\n transitionProperty: 'background, border, color',\n transitionTimingFunction: tokens.curveEasyEase,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n },\n\n // High contrast styles\n\n '@media (forced-colors: active)': {\n ':focus': {\n borderColor: 'ButtonText',\n },\n\n ':hover': {\n backgroundColor: 'HighlightText',\n borderColor: 'Highlight',\n color: 'Highlight',\n forcedColorAdjust: 'none',\n },\n\n ':hover:active': {\n backgroundColor: 'HighlightText',\n borderColor: 'Highlight',\n color: 'Highlight',\n forcedColorAdjust: 'none',\n },\n },\n\n // Focus styles\n\n ...createCustomFocusIndicatorStyle({\n borderColor: tokens.colorTransparentStroke,\n borderRadius: tokens.borderRadiusMedium,\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorTransparentStroke}`,\n boxShadow: `\n ${tokens.shadow4},\n 0 0 0 2px ${tokens.colorStrokeFocus2}\n `,\n zIndex: 1,\n }),\n});\n\nconst useIconBaseClassName = makeResetStyles({\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n\n fontSize: '20px',\n height: '20px',\n width: '20px',\n\n [iconSpacingVar]: tokens.spacingHorizontalSNudge,\n});\n\nconst useRootStyles = makeStyles({\n // Appearance variations\n outline: {\n backgroundColor: tokens.colorTransparentBackground,\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n },\n },\n primary: {\n backgroundColor: tokens.colorBrandBackground,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForegroundOnBrand,\n\n ':hover': {\n backgroundColor: tokens.colorBrandBackgroundHover,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForegroundOnBrand,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorBrandBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForegroundOnBrand,\n },\n },\n secondary: {\n /* The secondary styles are exactly the same as the base styles. */\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackground,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2,\n\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2Hover,\n\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2Pressed,\n\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2,\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2BrandHover,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n\n // Shape variations\n circular: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n },\n rounded: {\n /* The borderRadius rounded styles are handled in the size variations */\n },\n square: {\n ...shorthands.borderRadius(tokens.borderRadiusNone),\n },\n\n // Size variations\n small: {\n ...shorthands.padding(buttonSpacingSmall, tokens.spacingHorizontalS),\n\n minWidth: '64px',\n\n ...shorthands.borderRadius(buttonSpacingSmall),\n\n fontSize: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n lineHeight: tokens.lineHeightBase200,\n },\n medium: {\n /* defined in base styles */\n },\n large: {\n ...shorthands.padding(tokens.spacingVerticalS, tokens.spacingHorizontalL),\n\n minWidth: '96px',\n\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n\n fontSize: tokens.fontSizeBase400,\n fontWeight: tokens.fontWeightSemibold,\n lineHeight: tokens.lineHeightBase400,\n },\n});\n\nconst useRootDisabledStyles = makeStyles({\n // Base styles\n base: {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n\n cursor: 'not-allowed',\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n\n cursor: 'not-allowed',\n\n [`& .${iconFilledClassName}`]: {\n display: 'none',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'inline',\n },\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n\n cursor: 'not-allowed',\n\n [`& .${iconFilledClassName}`]: {\n display: 'none',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'inline',\n },\n },\n },\n\n // High contrast styles\n highContrast: {\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n color: 'GrayText',\n\n ':focus': {\n ...shorthands.borderColor('GrayText'),\n },\n\n ':hover': {\n ...shorthands.borderColor('GrayText'),\n color: 'GrayText',\n },\n\n ':hover:active': {\n ...shorthands.borderColor('GrayText'),\n color: 'GrayText',\n },\n },\n },\n\n // Appearance variations\n outline: {\n backgroundColor: tokens.colorTransparentBackground,\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackground,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackground,\n },\n },\n primary: {\n ...shorthands.borderColor('transparent'),\n\n ':hover': {\n ...shorthands.borderColor('transparent'),\n },\n\n ':hover:active': {\n ...shorthands.borderColor('transparent'),\n },\n },\n secondary: {\n /* The secondary styles are exactly the same as the base styles. */\n },\n subtle: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n },\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n },\n },\n});\n\nconst useRootFocusStyles = makeStyles({\n // Shape variations\n circular: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n }),\n rounded: {\n /* The rounded styles are exactly the same as the base styles. */\n },\n square: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusNone),\n }),\n\n // Primary styles\n primary: createCustomFocusIndicatorStyle({\n ...shorthands.borderColor(tokens.colorNeutralForegroundOnBrand),\n boxShadow: `${tokens.shadow2}, 0 0 0 2px ${tokens.colorStrokeFocus2}`,\n }),\n\n // Size variations\n small: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusSmall),\n }),\n medium: {\n /* defined in base styles */\n },\n large: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusLarge),\n }),\n});\n\nconst useRootIconOnlyStyles = makeStyles({\n // Size variations\n small: {\n ...shorthands.padding(tokens.spacingHorizontalXS),\n\n minWidth: '28px',\n maxWidth: '28px',\n },\n medium: {\n ...shorthands.padding(tokens.spacingHorizontalXS),\n\n minWidth: '32px',\n maxWidth: '32px',\n },\n large: {\n ...shorthands.padding(tokens.spacingHorizontalSNudge),\n\n minWidth: '40px',\n maxWidth: '40px',\n },\n});\n\nconst useIconStyles = makeStyles({\n // Size variations\n small: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n\n [iconSpacingVar]: tokens.spacingHorizontalXS,\n },\n medium: {\n /* defined in base styles */\n },\n large: {\n fontSize: '24px',\n height: '24px',\n width: '24px',\n\n [iconSpacingVar]: tokens.spacingHorizontalSNudge,\n },\n\n // Icon position variations\n before: {\n marginRight: `var(${iconSpacingVar})`,\n },\n after: {\n marginLeft: `var(${iconSpacingVar})`,\n },\n});\n\nexport const useButtonStyles_unstable = (state: ButtonState): ButtonState => {\n const rootBaseClassName = useRootBaseClassName();\n const iconBaseClassName = useIconBaseClassName();\n\n const rootStyles = useRootStyles();\n const rootDisabledStyles = useRootDisabledStyles();\n const rootFocusStyles = useRootFocusStyles();\n const rootIconOnlyStyles = useRootIconOnlyStyles();\n const iconStyles = useIconStyles();\n\n const { appearance, disabled, disabledFocusable, iconOnly, iconPosition, shape, size } = state;\n\n state.root.className = mergeClasses(\n buttonClassNames.root,\n rootBaseClassName,\n\n appearance && rootStyles[appearance],\n\n rootStyles[size],\n rootStyles[shape],\n\n // Disabled styles\n (disabled || disabledFocusable) && rootDisabledStyles.base,\n (disabled || disabledFocusable) && rootDisabledStyles.highContrast,\n appearance && (disabled || disabledFocusable) && rootDisabledStyles[appearance],\n\n // Focus styles\n appearance === 'primary' && rootFocusStyles.primary,\n rootFocusStyles[size],\n rootFocusStyles[shape],\n\n // Icon-only styles\n iconOnly && rootIconOnlyStyles[size],\n\n // User provided class name\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n buttonClassNames.icon,\n iconBaseClassName,\n state.root.children !== undefined && state.root.children !== null && iconStyles[iconPosition],\n iconStyles[size],\n state.icon.className,\n );\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAIaA,wBAAgB,GAAgC;EAC3DC,IAAI,EAAE,YAAY;EAClBC,IAAI,EAAE;CACP;AAED,MAAMC,cAAc,GAAG,6BAA6B;AAEpD,MAAMC,kBAAkB,GAAG,KAAK;AAChC,MAAMC,mBAAmB,GAAG,KAAK;AAEjC,MAAMC,oBAAoB,gBAAGC,qBAAe,m+IAoG1C;AAEF,MAAMC,oBAAoB,gBAAGD,qBAAe,waAU1C;AAEF,MAAME,aAAa,gBAAGF,gBAAU;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;AAAA,EAiH9B;AAEF,MAAMG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AIC,iBAAiB,CAAC,IAAIN,kBAAkB,CAACI,UAAU,CAAC;EAE/E;EACAA,UAAU,KAAK,SAAS,IAAIH,eAAe,CAACa,OAAO,EACnDb,eAAe,CAACS,IAAI,CAAC,EACrBT,eAAe,CAACQ,KAAK,CAAC;EAEtB;EACAF,QAAQ,IAAIL,kBAAkB,CAACQ,IAAI,CAAC;EAEpC;EACAd,KAAK,CAACd,IAAI,CAAC6B,SAAS,CACrB;EAED,IAAIf,KAAK,CAACb,IAAI,EAAE;IACda,KAAK,CAACb,IAAI,CAAC4B,SAAS,GAAGvB,oBAAY,CACjCP,wBAAgB,CAACE,IAAI,EACrBe,iBAAiB,EACjBF,KAAK,CAACd,IAAI,CAACiC,QAAQ,KAAKC,SAAS,IAAIpB,KAAK,CAACd,IAAI,CAACiC,QAAQ,KAAK,IAAI,IAAIZ,UAAU,CAACK,YAAY,CAAC,EAC7FL,UAAU,CAACO,IAAI,CAAC,EAChBd,KAAK,CAACb,IAAI,CAAC4B,SAAS,CACrB;;EAGH,OAAOf,KAAK;AACd,CAAC;AAjDYf,gCAAwB","names":["exports","root","icon","iconSpacingVar","buttonSpacingSmall","buttonSpacingMedium","useRootBaseClassName","react_1","useIconBaseClassName","useRootStyles","useRootDisabledStyles","useRootFocusStyles","useRootIconOnlyStyles","useIconStyles","useButtonStyles_unstable","state","rootBaseClassName","iconBaseClassName","rootStyles","rootDisabledStyles","rootFocusStyles","rootIconOnlyStyles","iconStyles","appearance","disabled","disabledFocusable","iconOnly","iconPosition","shape","size","className","base","highContrast","primary","children","undefined"],"sourceRoot":"../src/","sources":["packages/react-components/react-button/src/components/Button/useButtonStyles.ts"],"sourcesContent":["import { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { shorthands, makeStyles, makeResetStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { ButtonSlots, ButtonState } from './Button.types';\n\nexport const buttonClassNames: SlotClassNames<ButtonSlots> = {\n root: 'fui-Button',\n icon: 'fui-Button__icon',\n};\n\nconst iconSpacingVar = '--fui-Button__icon--spacing';\n\nconst buttonSpacingSmall = '3px';\nconst buttonSpacingMedium = '5px';\n\nconst useRootBaseClassName = makeResetStyles({\n alignItems: 'center',\n boxSizing: 'border-box',\n display: 'inline-flex',\n justifyContent: 'center',\n textDecorationLine: 'none',\n verticalAlign: 'middle',\n\n margin: 0,\n overflow: 'hidden',\n\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n\n fontFamily: tokens.fontFamilyBase,\n outlineStyle: 'none',\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n borderColor: tokens.colorNeutralStroke1Hover,\n color: tokens.colorNeutralForeground1Hover,\n\n cursor: 'pointer',\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n borderColor: tokens.colorNeutralStroke1Pressed,\n color: tokens.colorNeutralForeground1Pressed,\n\n outlineStyle: 'none',\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n },\n\n padding: `${buttonSpacingMedium} ${tokens.spacingHorizontalM}`,\n minWidth: '96px',\n borderRadius: tokens.borderRadiusMedium,\n\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightSemibold,\n lineHeight: tokens.lineHeightBase300,\n\n // Transition styles\n\n transitionDuration: tokens.durationFaster,\n transitionProperty: 'background, border, color',\n transitionTimingFunction: tokens.curveEasyEase,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n },\n\n // High contrast styles\n\n '@media (forced-colors: active)': {\n ':focus': {\n borderColor: 'ButtonText',\n },\n\n ':hover': {\n backgroundColor: 'HighlightText',\n borderColor: 'Highlight',\n color: 'Highlight',\n forcedColorAdjust: 'none',\n },\n\n ':hover:active': {\n backgroundColor: 'HighlightText',\n borderColor: 'Highlight',\n color: 'Highlight',\n forcedColorAdjust: 'none',\n },\n },\n\n // Focus styles\n\n ...createCustomFocusIndicatorStyle({\n borderColor: tokens.colorTransparentStroke,\n borderRadius: tokens.borderRadiusMedium,\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorTransparentStroke}`,\n boxShadow: `\n ${tokens.shadow4},\n 0 0 0 2px ${tokens.colorStrokeFocus2}\n `,\n zIndex: 1,\n }),\n});\n\nconst useIconBaseClassName = makeResetStyles({\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n\n fontSize: '20px',\n height: '20px',\n width: '20px',\n\n [iconSpacingVar]: tokens.spacingHorizontalSNudge,\n});\n\nconst useRootStyles = makeStyles({\n // Appearance variations\n outline: {\n backgroundColor: tokens.colorTransparentBackground,\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n },\n },\n primary: {\n backgroundColor: tokens.colorBrandBackground,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForegroundOnBrand,\n\n ':hover': {\n backgroundColor: tokens.colorBrandBackgroundHover,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForegroundOnBrand,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorBrandBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForegroundOnBrand,\n },\n },\n secondary: {\n /* The secondary styles are exactly the same as the base styles. */\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackground,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2,\n\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2Hover,\n\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2Pressed,\n\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2,\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2BrandHover,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n\n // Shape variations\n circular: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n },\n rounded: {\n /* The borderRadius rounded styles are handled in the size variations */\n },\n square: {\n ...shorthands.borderRadius(tokens.borderRadiusNone),\n },\n\n // Size variations\n small: {\n ...shorthands.padding(buttonSpacingSmall, tokens.spacingHorizontalS),\n\n minWidth: '64px',\n\n ...shorthands.borderRadius(buttonSpacingSmall),\n\n fontSize: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n lineHeight: tokens.lineHeightBase200,\n },\n medium: {\n /* defined in base styles */\n },\n large: {\n ...shorthands.padding(tokens.spacingVerticalS, tokens.spacingHorizontalL),\n\n minWidth: '96px',\n\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n\n fontSize: tokens.fontSizeBase400,\n fontWeight: tokens.fontWeightSemibold,\n lineHeight: tokens.lineHeightBase400,\n },\n});\n\nconst useRootDisabledStyles = makeStyles({\n // Base styles\n base: {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n\n cursor: 'not-allowed',\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n\n cursor: 'not-allowed',\n\n [`& .${iconFilledClassName}`]: {\n display: 'none',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'inline',\n },\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n\n cursor: 'not-allowed',\n\n [`& .${iconFilledClassName}`]: {\n display: 'none',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'inline',\n },\n },\n },\n\n // High contrast styles\n highContrast: {\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n color: 'GrayText',\n\n ':focus': {\n ...shorthands.borderColor('GrayText'),\n },\n\n ':hover': {\n ...shorthands.borderColor('GrayText'),\n color: 'GrayText',\n },\n\n ':hover:active': {\n ...shorthands.borderColor('GrayText'),\n color: 'GrayText',\n },\n },\n },\n\n // Appearance variations\n outline: {\n backgroundColor: tokens.colorTransparentBackground,\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackground,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackground,\n },\n },\n primary: {\n ...shorthands.borderColor('transparent'),\n\n ':hover': {\n ...shorthands.borderColor('transparent'),\n },\n\n ':hover:active': {\n ...shorthands.borderColor('transparent'),\n },\n },\n secondary: {\n /* The secondary styles are exactly the same as the base styles. */\n },\n subtle: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n },\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n },\n },\n});\n\nconst useRootFocusStyles = makeStyles({\n // Shape variations\n circular: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n }),\n rounded: {\n /* The rounded styles are exactly the same as the base styles. */\n },\n square: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusNone),\n }),\n\n // Primary styles\n primary: createCustomFocusIndicatorStyle({\n ...shorthands.borderColor(tokens.colorNeutralForegroundOnBrand),\n boxShadow: `${tokens.shadow2}, 0 0 0 2px ${tokens.colorStrokeFocus2}`,\n }),\n\n // Size variations\n small: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusSmall),\n }),\n medium: {\n /* defined in base styles */\n },\n large: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusLarge),\n }),\n});\n\nconst useRootIconOnlyStyles = makeStyles({\n // Size variations\n small: {\n ...shorthands.padding(tokens.spacingHorizontalXS),\n\n minWidth: '28px',\n maxWidth: '28px',\n },\n medium: {\n ...shorthands.padding(tokens.spacingHorizontalXS),\n\n minWidth: '32px',\n maxWidth: '32px',\n },\n large: {\n ...shorthands.padding(tokens.spacingHorizontalSNudge),\n\n minWidth: '40px',\n maxWidth: '40px',\n },\n});\n\nconst useIconStyles = makeStyles({\n // Size variations\n small: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n\n [iconSpacingVar]: tokens.spacingHorizontalXS,\n },\n medium: {\n /* defined in base styles */\n },\n large: {\n fontSize: '24px',\n height: '24px',\n width: '24px',\n\n [iconSpacingVar]: tokens.spacingHorizontalSNudge,\n },\n\n // Icon position variations\n before: {\n marginRight: `var(${iconSpacingVar})`,\n },\n after: {\n marginLeft: `var(${iconSpacingVar})`,\n },\n});\n\nexport const useButtonStyles_unstable = (state: ButtonState): ButtonState => {\n const rootBaseClassName = useRootBaseClassName();\n const iconBaseClassName = useIconBaseClassName();\n\n const rootStyles = useRootStyles();\n const rootDisabledStyles = useRootDisabledStyles();\n const rootFocusStyles = useRootFocusStyles();\n const rootIconOnlyStyles = useRootIconOnlyStyles();\n const iconStyles = useIconStyles();\n\n const { appearance, disabled, disabledFocusable, iconOnly, iconPosition, shape, size } = state;\n\n state.root.className = mergeClasses(\n buttonClassNames.root,\n rootBaseClassName,\n\n appearance && rootStyles[appearance],\n\n rootStyles[size],\n rootStyles[shape],\n\n // Disabled styles\n (disabled || disabledFocusable) && rootDisabledStyles.base,\n (disabled || disabledFocusable) && rootDisabledStyles.highContrast,\n appearance && (disabled || disabledFocusable) && rootDisabledStyles[appearance],\n\n // Focus styles\n appearance === 'primary' && rootFocusStyles.primary,\n rootFocusStyles[size],\n rootFocusStyles[shape],\n\n // Icon-only styles\n iconOnly && rootIconOnlyStyles[size],\n\n // User provided class name\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n buttonClassNames.icon,\n iconBaseClassName,\n state.root.children !== undefined && state.root.children !== null && iconStyles[iconPosition],\n iconStyles[size],\n state.icon.className,\n );\n }\n\n return state;\n};\n"]}
@@ -4,23 +4,19 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.CompoundButton = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const renderCompoundButton_1 = /*#__PURE__*/require("./renderCompoundButton");
11
-
12
9
  const useCompoundButton_1 = /*#__PURE__*/require("./useCompoundButton");
13
-
14
10
  const useCompoundButtonStyles_1 = /*#__PURE__*/require("./useCompoundButtonStyles");
15
11
  /**
16
12
  * CompoundButtons are buttons that can have secondary content that adds extra information to the user.
17
13
  */
18
-
19
-
20
14
  exports.CompoundButton = /*#__PURE__*/React.forwardRef((props, ref) => {
21
15
  const state = useCompoundButton_1.useCompoundButton_unstable(props, ref);
22
16
  useCompoundButtonStyles_1.useCompoundButtonStyles_unstable(state);
23
- return renderCompoundButton_1.renderCompoundButton_unstable(state); // Casting is required due to lack of distributive union to support unions on @types/react
17
+ return renderCompoundButton_1.renderCompoundButton_unstable(state);
18
+ // Casting is required due to lack of distributive union to support unions on @types/react
24
19
  });
20
+
25
21
  exports.CompoundButton.displayName = 'CompoundButton';
26
22
  //# sourceMappingURL=CompoundButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-button/src/components/CompoundButton/CompoundButton.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AACA,MAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,cAAA,gBAA2D,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACtG,MAAM,KAAK,GAAG,mBAAA,CAAA,0BAAA,CAA2B,KAA3B,EAAkC,GAAlC,CAAd;EAEA,yBAAA,CAAA,gCAAA,CAAiC,KAAjC;EAEA,OAAO,sBAAA,CAAA,6BAAA,CAA8B,KAA9B,CAAP,CALsG,CAMtG;AACD,CAPuE,CAA3D;AASb,OAAA,CAAA,cAAA,CAAe,WAAf,GAA6B,gBAA7B","sourcesContent":["import * as React from 'react';\nimport { renderCompoundButton_unstable } from './renderCompoundButton';\nimport { useCompoundButton_unstable } from './useCompoundButton';\nimport { useCompoundButtonStyles_unstable } from './useCompoundButtonStyles';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { CompoundButtonProps } from './CompoundButton.types';\n\n/**\n * CompoundButtons are buttons that can have secondary content that adds extra information to the user.\n */\nexport const CompoundButton: ForwardRefComponent<CompoundButtonProps> = React.forwardRef((props, ref) => {\n const state = useCompoundButton_unstable(props, ref);\n\n useCompoundButtonStyles_unstable(state);\n\n return renderCompoundButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<CompoundButtonProps>;\n\nCompoundButton.displayName = 'CompoundButton';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAIA;;;AAGaA,sBAAc,gBAA6CC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACtG,MAAMC,KAAK,GAAGC,8CAA0B,CAACH,KAAK,EAAEC,GAAG,CAAC;EAEpDG,0DAAgC,CAACF,KAAK,CAAC;EAEvC,OAAOG,oDAA6B,CAACH,KAAK,CAAC;EAC3C;AACF,CAAC,CAA6C;;AAE9CL,sBAAc,CAACS,WAAW,GAAG,gBAAgB","names":["exports","React","forwardRef","props","ref","state","useCompoundButton_1","useCompoundButtonStyles_1","renderCompoundButton_1","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-button/src/components/CompoundButton/CompoundButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderCompoundButton_unstable } from './renderCompoundButton';\nimport { useCompoundButton_unstable } from './useCompoundButton';\nimport { useCompoundButtonStyles_unstable } from './useCompoundButtonStyles';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { CompoundButtonProps } from './CompoundButton.types';\n\n/**\n * CompoundButtons are buttons that can have secondary content that adds extra information to the user.\n */\nexport const CompoundButton: ForwardRefComponent<CompoundButtonProps> = React.forwardRef((props, ref) => {\n const state = useCompoundButton_unstable(props, ref);\n\n useCompoundButtonStyles_unstable(state);\n\n return renderCompoundButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<CompoundButtonProps>;\n\nCompoundButton.displayName = 'CompoundButton';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
@@ -4,19 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useCompoundButtonStyles_unstable = exports.compoundButtonClassNames = void 0;
7
-
8
7
  const tslib_1 = /*#__PURE__*/require("tslib");
9
-
10
8
  tslib_1.__exportStar(require("./CompoundButton"), exports);
11
-
12
9
  tslib_1.__exportStar(require("./CompoundButton.types"), exports);
13
-
14
10
  tslib_1.__exportStar(require("./renderCompoundButton"), exports);
15
-
16
11
  tslib_1.__exportStar(require("./useCompoundButton"), exports);
17
-
18
12
  var useCompoundButtonStyles_1 = /*#__PURE__*/require("./useCompoundButtonStyles");
19
-
20
13
  Object.defineProperty(exports, "compoundButtonClassNames", {
21
14
  enumerable: true,
22
15
  get: function () {
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-button/src/components/CompoundButton/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,IAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,0BAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,yBAAA,CAAA,wBAAA;EAAwB;AAAxB,CAAA;AAA0B,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,kCAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,yBAAA,CAAA,gCAAA;EAAgC;AAAhC,CAAA","sourcesContent":["export * from './CompoundButton';\nexport * from './CompoundButton.types';\nexport * from './renderCompoundButton';\nexport * from './useCompoundButton';\nexport { compoundButtonClassNames, useCompoundButtonStyles_unstable } from './useCompoundButtonStyles';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;;AAAAA;AACAA;AACAA;AACAA;AACA;AAASC;EAAAC;EAAAC;IAAA,yDAAwB;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,iEAAgC;EAAA;AAAA","names":["tslib_1","Object","enumerable","get"],"sourceRoot":"../src/","sources":["packages/react-components/react-button/src/components/CompoundButton/index.ts"],"sourcesContent":["export * from './CompoundButton';\nexport * from './CompoundButton.types';\nexport * from './renderCompoundButton';\nexport * from './useCompoundButton';\nexport { compoundButtonClassNames, useCompoundButtonStyles_unstable } from './useCompoundButtonStyles';\n"]}
@@ -4,15 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.renderCompoundButton_unstable = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
9
  /**
12
10
  * Renders a CompoundButton component by passing the state defined props to the appropriate slots.
13
11
  */
14
-
15
-
16
12
  const renderCompoundButton_unstable = state => {
17
13
  const {
18
14
  slots,
@@ -22,13 +18,17 @@ const renderCompoundButton_unstable = state => {
22
18
  iconOnly,
23
19
  iconPosition
24
20
  } = state;
25
- return React.createElement(slots.root, { ...slotProps.root
26
- }, iconPosition !== 'after' && slots.icon && React.createElement(slots.icon, { ...slotProps.icon
27
- }), !iconOnly && React.createElement(slots.contentContainer, { ...slotProps.contentContainer
28
- }, slotProps.root.children, slots.secondaryContent && React.createElement(slots.secondaryContent, { ...slotProps.secondaryContent
29
- })), iconPosition === 'after' && slots.icon && React.createElement(slots.icon, { ...slotProps.icon
21
+ return React.createElement(slots.root, {
22
+ ...slotProps.root
23
+ }, iconPosition !== 'after' && slots.icon && React.createElement(slots.icon, {
24
+ ...slotProps.icon
25
+ }), !iconOnly && React.createElement(slots.contentContainer, {
26
+ ...slotProps.contentContainer
27
+ }, slotProps.root.children, slots.secondaryContent && React.createElement(slots.secondaryContent, {
28
+ ...slotProps.secondaryContent
29
+ })), iconPosition === 'after' && slots.icon && React.createElement(slots.icon, {
30
+ ...slotProps.icon
30
31
  }));
31
32
  };
32
-
33
33
  exports.renderCompoundButton_unstable = renderCompoundButton_unstable;
34
34
  //# sourceMappingURL=renderCompoundButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-button/src/components/CompoundButton/renderCompoundButton.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,6BAA6B,GAAI,KAAD,IAA+B;EAC1E,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAA8B,KAA9B,CAA7B;EACA,MAAM;IAAE,QAAF;IAAY;EAAZ,IAA6B,KAAnC;EAEA,OACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,YAAY,KAAK,OAAjB,IAA4B,KAAK,CAAC,IAAlC,IAA0C,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAD7C,EAEG,CAAC,QAAD,IACC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAvB,EACG,SAAS,CAAC,IAAV,CAAe,QADlB,EAEG,KAAK,CAAC,gBAAN,IAA0B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,gBAAP,EAAuB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAvB,CAF7B,CAHJ,EAQG,YAAY,KAAK,OAAjB,IAA4B,KAAK,CAAC,IAAlC,IAA0C,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAR7C,CADF;AAYD,CAhBM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { CompoundButtonSlots, CompoundButtonState } from './CompoundButton.types';\n\n/**\n * Renders a CompoundButton component by passing the state defined props to the appropriate slots.\n */\nexport const renderCompoundButton_unstable = (state: CompoundButtonState) => {\n const { slots, slotProps } = getSlots<CompoundButtonSlots>(state);\n const { iconOnly, iconPosition } = state;\n\n return (\n <slots.root {...slotProps.root}>\n {iconPosition !== 'after' && slots.icon && <slots.icon {...slotProps.icon} />}\n {!iconOnly && (\n <slots.contentContainer {...slotProps.contentContainer}>\n {slotProps.root.children}\n {slots.secondaryContent && <slots.secondaryContent {...slotProps.secondaryContent} />}\n </slots.contentContainer>\n )}\n {iconPosition === 'after' && slots.icon && <slots.icon {...slotProps.icon} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AAGA;;;AAGO,MAAMA,6BAA6B,GAAIC,KAA0B,IAAI;EAC1E,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAsBH,KAAK,CAAC;EACjE,MAAM;IAAEI,QAAQ;IAAEC;EAAY,CAAE,GAAGL,KAAK;EAExC,OACEM,oBAACL,KAAK,CAACM,IAAI;IAAA,GAAKL,SAAS,CAACK;EAAI,GAC3BF,YAAY,KAAK,OAAO,IAAIJ,KAAK,CAACO,IAAI,IAAIF,oBAACL,KAAK,CAACO,IAAI;IAAA,GAAKN,SAAS,CAACM;EAAI,EAAI,EAC5E,CAACJ,QAAQ,IACRE,oBAACL,KAAK,CAACQ,gBAAgB;IAAA,GAAKP,SAAS,CAACO;EAAgB,GACnDP,SAAS,CAACK,IAAI,CAACG,QAAQ,EACvBT,KAAK,CAACU,gBAAgB,IAAIL,oBAACL,KAAK,CAACU,gBAAgB;IAAA,GAAKT,SAAS,CAACS;EAAgB,EAAI,CAExF,EACAN,YAAY,KAAK,OAAO,IAAIJ,KAAK,CAACO,IAAI,IAAIF,oBAACL,KAAK,CAACO,IAAI;IAAA,GAAKN,SAAS,CAACM;EAAI,EAAI,CAClE;AAEjB,CAAC;AAhBYI,qCAA6B","names":["renderCompoundButton_unstable","state","slots","slotProps","react_utilities_1","iconOnly","iconPosition","React","root","icon","contentContainer","children","secondaryContent","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-button/src/components/CompoundButton/renderCompoundButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { CompoundButtonSlots, CompoundButtonState } from './CompoundButton.types';\n\n/**\n * Renders a CompoundButton component by passing the state defined props to the appropriate slots.\n */\nexport const renderCompoundButton_unstable = (state: CompoundButtonState) => {\n const { slots, slotProps } = getSlots<CompoundButtonSlots>(state);\n const { iconOnly, iconPosition } = state;\n\n return (\n <slots.root {...slotProps.root}>\n {iconPosition !== 'after' && slots.icon && <slots.icon {...slotProps.icon} />}\n {!iconOnly && (\n <slots.contentContainer {...slotProps.contentContainer}>\n {slotProps.root.children}\n {slots.secondaryContent && <slots.secondaryContent {...slotProps.secondaryContent} />}\n </slots.contentContainer>\n )}\n {iconPosition === 'after' && slots.icon && <slots.icon {...slotProps.icon} />}\n </slots.root>\n );\n};\n"]}
@@ -4,25 +4,21 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useCompoundButton_unstable = void 0;
7
-
8
7
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
-
10
8
  const index_1 = /*#__PURE__*/require("../Button/index");
11
9
  /**
12
10
  * Given user props, defines default props for the CompoundButton, calls useButtonState, and returns processed state.
13
11
  * @param props - User provided props to the CompoundButton component.
14
12
  * @param ref - User provided ref to be passed to the CompoundButton component.
15
13
  */
16
-
17
-
18
14
  const useCompoundButton_unstable = ({
19
15
  contentContainer,
20
16
  secondaryContent,
21
17
  ...props
22
18
  }, ref) => {
23
19
  var _a, _b;
24
-
25
- const state = { // Button state
20
+ const state = {
21
+ // Button state
26
22
  ...index_1.useButton_unstable(props, ref),
27
23
  // Slots definition
28
24
  components: {
@@ -35,11 +31,10 @@ const useCompoundButton_unstable = ({
35
31
  required: true
36
32
  }),
37
33
  secondaryContent: react_utilities_1.resolveShorthand(secondaryContent)
38
- }; // Recalculate iconOnly to take into account secondaryContent.
39
-
34
+ };
35
+ // Recalculate iconOnly to take into account secondaryContent.
40
36
  state.iconOnly = Boolean(((_a = state.icon) === null || _a === void 0 ? void 0 : _a.children) && !props.children && !((_b = state.secondaryContent) === null || _b === void 0 ? void 0 : _b.children));
41
37
  return state;
42
38
  };
43
-
44
39
  exports.useCompoundButton_unstable = useCompoundButton_unstable;
45
40
  //# sourceMappingURL=useCompoundButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-button/src/components/CompoundButton/useCompoundButton.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;AAGA;;;;AAIG;;;AACI,MAAM,0BAA0B,GAAG,CACxC;EAAE,gBAAF;EAAoB,gBAApB;EAAsC,GAAG;AAAzC,CADwC,EAExC,GAFwC,KAGjB;;;EACvB,MAAM,KAAK,GAAwB,EACjC;IACA,GAAG,OAAA,CAAA,kBAAA,CAAmB,KAAnB,EAA0B,GAA1B,CAF8B;IAIjC;IACA,UAAU,EAAE;MACV,IAAI,EAAE,QADI;MAEV,IAAI,EAAE,MAFI;MAGV,gBAAgB,EAAE,MAHR;MAIV,gBAAgB,EAAE;IAJR,CALqB;IAWjC,gBAAgB,EAAE,iBAAA,CAAA,gBAAA,CAAiB,gBAAjB,EAAmC;MAAE,QAAQ,EAAE;IAAZ,CAAnC,CAXe;IAYjC,gBAAgB,EAAE,iBAAA,CAAA,gBAAA,CAAiB,gBAAjB;EAZe,CAAnC,CADuB,CAgBvB;;EACA,KAAK,CAAC,QAAN,GAAiB,OAAO,CAAC,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,IAAN,MAAU,IAAV,IAAU,EAAA,KAAA,KAAA,CAAV,GAAU,KAAA,CAAV,GAAU,EAAA,CAAE,QAAZ,KAAwB,CAAC,KAAK,CAAC,QAA/B,IAA2C,EAAC,CAAA,EAAA,GAAA,KAAK,CAAC,gBAAN,MAAsB,IAAtB,IAAsB,EAAA,KAAA,KAAA,CAAtB,GAAsB,KAAA,CAAtB,GAAsB,EAAA,CAAE,QAAzB,CAA5C,CAAxB;EAEA,OAAO,KAAP;AACD,CAvBM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","sourcesContent":["import * as React from 'react';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { useButton_unstable } from '../Button/index';\nimport type { CompoundButtonProps, CompoundButtonState } from './CompoundButton.types';\n\n/**\n * Given user props, defines default props for the CompoundButton, calls useButtonState, and returns processed state.\n * @param props - User provided props to the CompoundButton component.\n * @param ref - User provided ref to be passed to the CompoundButton component.\n */\nexport const useCompoundButton_unstable = (\n { contentContainer, secondaryContent, ...props }: CompoundButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): CompoundButtonState => {\n const state: CompoundButtonState = {\n // Button state\n ...useButton_unstable(props, ref),\n\n // Slots definition\n components: {\n root: 'button',\n icon: 'span',\n contentContainer: 'span',\n secondaryContent: 'span',\n },\n contentContainer: resolveShorthand(contentContainer, { required: true }),\n secondaryContent: resolveShorthand(secondaryContent),\n };\n\n // Recalculate iconOnly to take into account secondaryContent.\n state.iconOnly = Boolean(state.icon?.children && !props.children && !state.secondaryContent?.children);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AACA;AACA;AAGA;;;;;AAKO,MAAMA,0BAA0B,GAAG,CACxC;EAAEC,gBAAgB;EAAEC,gBAAgB;EAAE,GAAGC;AAAK,CAAuB,EACrEC,GAAqD,KAC9B;;EACvB,MAAMC,KAAK,GAAwB;IACjC;IACA,GAAGC,0BAAkB,CAACH,KAAK,EAAEC,GAAG,CAAC;IAEjC;IACAG,UAAU,EAAE;MACVC,IAAI,EAAE,QAAQ;MACdC,IAAI,EAAE,MAAM;MACZR,gBAAgB,EAAE,MAAM;MACxBC,gBAAgB,EAAE;KACnB;IACDD,gBAAgB,EAAES,kCAAgB,CAACT,gBAAgB,EAAE;MAAEU,QAAQ,EAAE;IAAI,CAAE,CAAC;IACxET,gBAAgB,EAAEQ,kCAAgB,CAACR,gBAAgB;GACpD;EAED;EACAG,KAAK,CAACO,QAAQ,GAAGC,OAAO,CAAC,YAAK,CAACJ,IAAI,0CAAEK,QAAQ,KAAI,CAACX,KAAK,CAACW,QAAQ,IAAI,EAAC,WAAK,CAACZ,gBAAgB,0CAAEY,QAAQ,EAAC;EAEtG,OAAOT,KAAK;AACd,CAAC;AAvBYU,kCAA0B","names":["useCompoundButton_unstable","contentContainer","secondaryContent","props","ref","state","index_1","components","root","icon","react_utilities_1","required","iconOnly","Boolean","children","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-button/src/components/CompoundButton/useCompoundButton.ts"],"sourcesContent":["import * as React from 'react';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { useButton_unstable } from '../Button/index';\nimport type { CompoundButtonProps, CompoundButtonState } from './CompoundButton.types';\n\n/**\n * Given user props, defines default props for the CompoundButton, calls useButtonState, and returns processed state.\n * @param props - User provided props to the CompoundButton component.\n * @param ref - User provided ref to be passed to the CompoundButton component.\n */\nexport const useCompoundButton_unstable = (\n { contentContainer, secondaryContent, ...props }: CompoundButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): CompoundButtonState => {\n const state: CompoundButtonState = {\n // Button state\n ...useButton_unstable(props, ref),\n\n // Slots definition\n components: {\n root: 'button',\n icon: 'span',\n contentContainer: 'span',\n secondaryContent: 'span',\n },\n contentContainer: resolveShorthand(contentContainer, { required: true }),\n secondaryContent: resolveShorthand(secondaryContent),\n };\n\n // Recalculate iconOnly to take into account secondaryContent.\n state.iconOnly = Boolean(state.icon?.children && !props.children && !state.secondaryContent?.children);\n\n return state;\n};\n"]}
@@ -4,171 +4,161 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useCompoundButtonStyles_unstable = exports.compoundButtonClassNames = void 0;
7
-
8
7
  const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
9
-
10
8
  const react_1 = /*#__PURE__*/require("@griffel/react");
11
-
12
9
  const useButtonStyles_1 = /*#__PURE__*/require("../Button/useButtonStyles");
13
-
14
10
  exports.compoundButtonClassNames = {
15
11
  root: 'fui-CompoundButton',
16
12
  icon: 'fui-CompoundButton__icon',
17
13
  contentContainer: 'fui-CompoundButton__contentContainer',
18
14
  secondaryContent: 'fui-CompoundButton__secondaryContent'
19
15
  };
20
-
21
16
  const useRootStyles = /*#__PURE__*/react_1.__styles({
22
- "base": {
23
- "Bqenvij": "f11ysow2",
24
- "J657lq": "f1um431h",
25
- "Jlnjib": "fte7hqw",
26
- "Bc29nj9": "f1yh8ef3"
27
- },
28
- "highContrast": {
29
- "pu7qz5": "fi3u9nm",
30
- "B10010i": "f1tdgb9w"
31
- },
32
- "outline": {},
33
- "primary": {
34
- "J657lq": "foe7gw6",
35
- "Jlnjib": "fvxlz81",
36
- "Bc29nj9": "f1c2mdy"
37
- },
38
- "secondary": {},
39
- "subtle": {
40
- "J657lq": "f1um431h",
41
- "Jlnjib": "fte7hqw",
42
- "Bc29nj9": "f1yh8ef3"
43
- },
44
- "transparent": {
45
- "J657lq": "f1um431h",
46
- "Jlnjib": "f1wn9xqz",
47
- "Bc29nj9": "f1a8q4d0"
48
- },
49
- "small": {
50
- "z8tnut": "f17mpqex",
51
- "z189sj": ["f1vdfbxk", "f1f5gg8d"],
52
- "Byoj8tv": "f1quwm26",
53
- "uwmqm3": ["f1f5gg8d", "f1vdfbxk"],
54
- "Be2twd7": "fkhj508",
55
- "Bg96gwp": "f1i3iumi"
56
- },
57
- "medium": {
58
- "z8tnut": "fbtff6s",
59
- "z189sj": ["fw5db7e", "f1uw59to"],
60
- "Byoj8tv": "flw3t2g",
61
- "uwmqm3": ["f1uw59to", "fw5db7e"],
62
- "Be2twd7": "fkhj508",
63
- "Bg96gwp": "f1i3iumi"
64
- },
65
- "large": {
66
- "z8tnut": "fm4bm3s",
67
- "z189sj": ["fjodcmx", "fhx4nu"],
68
- "Byoj8tv": "fdt8xvx",
69
- "uwmqm3": ["fhx4nu", "fjodcmx"],
70
- "Be2twd7": "fod5ikn",
71
- "Bg96gwp": "faaz57k"
72
- },
73
- "disabled": {
74
- "J657lq": "f1rlv8bf",
75
- "Jlnjib": "fd1dbtm",
76
- "Bc29nj9": "f1vqmdmi"
77
- },
78
- "disabledHighContrast": {
79
- "B8ia98v": "f1csacz4",
80
- "pu7qz5": "f1s5tkfe",
81
- "B10010i": "fs0rda3"
17
+ base: {
18
+ Bqenvij: "f11ysow2",
19
+ J657lq: "f1um431h",
20
+ Jlnjib: "fte7hqw",
21
+ Bc29nj9: "f1yh8ef3"
22
+ },
23
+ highContrast: {
24
+ pu7qz5: "fi3u9nm",
25
+ B10010i: "f1tdgb9w"
26
+ },
27
+ outline: {},
28
+ primary: {
29
+ J657lq: "foe7gw6",
30
+ Jlnjib: "fvxlz81",
31
+ Bc29nj9: "f1c2mdy"
32
+ },
33
+ secondary: {},
34
+ subtle: {
35
+ J657lq: "f1um431h",
36
+ Jlnjib: "fte7hqw",
37
+ Bc29nj9: "f1yh8ef3"
38
+ },
39
+ transparent: {
40
+ J657lq: "f1um431h",
41
+ Jlnjib: "f1wn9xqz",
42
+ Bc29nj9: "f1a8q4d0"
43
+ },
44
+ small: {
45
+ z8tnut: "f17mpqex",
46
+ z189sj: ["f1vdfbxk", "f1f5gg8d"],
47
+ Byoj8tv: "f1quwm26",
48
+ uwmqm3: ["f1f5gg8d", "f1vdfbxk"],
49
+ Be2twd7: "fkhj508",
50
+ Bg96gwp: "f1i3iumi"
51
+ },
52
+ medium: {
53
+ z8tnut: "fbtff6s",
54
+ z189sj: ["fw5db7e", "f1uw59to"],
55
+ Byoj8tv: "flw3t2g",
56
+ uwmqm3: ["f1uw59to", "fw5db7e"],
57
+ Be2twd7: "fkhj508",
58
+ Bg96gwp: "f1i3iumi"
59
+ },
60
+ large: {
61
+ z8tnut: "fm4bm3s",
62
+ z189sj: ["fjodcmx", "fhx4nu"],
63
+ Byoj8tv: "fdt8xvx",
64
+ uwmqm3: ["fhx4nu", "fjodcmx"],
65
+ Be2twd7: "fod5ikn",
66
+ Bg96gwp: "faaz57k"
67
+ },
68
+ disabled: {
69
+ J657lq: "f1rlv8bf",
70
+ Jlnjib: "fd1dbtm",
71
+ Bc29nj9: "f1vqmdmi"
72
+ },
73
+ disabledHighContrast: {
74
+ B8ia98v: "f1csacz4",
75
+ pu7qz5: "f1s5tkfe",
76
+ B10010i: "fs0rda3"
82
77
  }
83
78
  }, {
84
- "d": [".f11ysow2{height:auto;}", ".f1um431h .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForeground2);}", ".foe7gw6 .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".f17mpqex{padding-top:var(--spacingHorizontalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f1quwm26{padding-bottom:var(--spacingHorizontalMNudge);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".fbtff6s{padding-top:14px;}", ".fw5db7e{padding-right:var(--spacingHorizontalM);}", ".f1uw59to{padding-left:var(--spacingHorizontalM);}", ".flw3t2g{padding-bottom:var(--spacingHorizontalL);}", ".fm4bm3s{padding-top:18px;}", ".fjodcmx{padding-right:var(--spacingHorizontalL);}", ".fhx4nu{padding-left:var(--spacingHorizontalL);}", ".fdt8xvx{padding-bottom:var(--spacingHorizontalXL);}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".f1rlv8bf .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForegroundDisabled);}"],
85
- "h": [".fte7hqw:hover .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForeground2Hover);}", ".f1yh8ef3:hover:active .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForeground2Pressed);}", ".fvxlz81:hover .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".f1c2mdy:hover:active .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".f1wn9xqz:hover .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForeground2BrandHover);}", ".f1a8q4d0:hover:active .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForeground2BrandPressed);}", ".fd1dbtm:hover .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForegroundDisabled);}", ".f1vqmdmi:hover:active .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForegroundDisabled);}"],
86
- "m": [["@media (forced-colors: active){.fi3u9nm:hover .fui-CompoundButton__secondaryContent{color:Highlight;}}", {
87
- "m": "(forced-colors: active)"
79
+ d: [".f11ysow2{height:auto;}", ".f1um431h .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForeground2);}", ".foe7gw6 .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".f17mpqex{padding-top:var(--spacingHorizontalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f1quwm26{padding-bottom:var(--spacingHorizontalMNudge);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".fbtff6s{padding-top:14px;}", ".fw5db7e{padding-right:var(--spacingHorizontalM);}", ".f1uw59to{padding-left:var(--spacingHorizontalM);}", ".flw3t2g{padding-bottom:var(--spacingHorizontalL);}", ".fm4bm3s{padding-top:18px;}", ".fjodcmx{padding-right:var(--spacingHorizontalL);}", ".fhx4nu{padding-left:var(--spacingHorizontalL);}", ".fdt8xvx{padding-bottom:var(--spacingHorizontalXL);}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".f1rlv8bf .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForegroundDisabled);}"],
80
+ h: [".fte7hqw:hover .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForeground2Hover);}", ".f1yh8ef3:hover:active .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForeground2Pressed);}", ".fvxlz81:hover .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".f1c2mdy:hover:active .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".f1wn9xqz:hover .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForeground2BrandHover);}", ".f1a8q4d0:hover:active .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForeground2BrandPressed);}", ".fd1dbtm:hover .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForegroundDisabled);}", ".f1vqmdmi:hover:active .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForegroundDisabled);}"],
81
+ m: [["@media (forced-colors: active){.fi3u9nm:hover .fui-CompoundButton__secondaryContent{color:Highlight;}}", {
82
+ m: "(forced-colors: active)"
88
83
  }], ["@media (forced-colors: active){.f1tdgb9w:hover:active .fui-CompoundButton__secondaryContent{color:Highlight;}}", {
89
- "m": "(forced-colors: active)"
84
+ m: "(forced-colors: active)"
90
85
  }], ["@media (forced-colors: active){.f1csacz4 .fui-CompoundButton__secondaryContent{color:GrayText;}}", {
91
- "m": "(forced-colors: active)"
86
+ m: "(forced-colors: active)"
92
87
  }], ["@media (forced-colors: active){.f1s5tkfe:hover .fui-CompoundButton__secondaryContent{color:GrayText;}}", {
93
- "m": "(forced-colors: active)"
88
+ m: "(forced-colors: active)"
94
89
  }], ["@media (forced-colors: active){.fs0rda3:hover:active .fui-CompoundButton__secondaryContent{color:GrayText;}}", {
95
- "m": "(forced-colors: active)"
90
+ m: "(forced-colors: active)"
96
91
  }]]
97
92
  });
98
-
99
93
  const useRootIconOnlyStyles = /*#__PURE__*/react_1.__styles({
100
- "small": {
101
- "z8tnut": "f1x4af0m",
102
- "z189sj": ["f7x41pl", "fruq291"],
103
- "Byoj8tv": "fd55psn",
104
- "uwmqm3": ["fruq291", "f7x41pl"],
105
- "B2u0y6b": "ft5vyj6",
106
- "Bf4jedk": "f17suaiq"
107
- },
108
- "medium": {
109
- "z8tnut": "f16k8034",
110
- "z189sj": ["fdw0yi8", "fk8j09s"],
111
- "Byoj8tv": "f1angvds",
112
- "uwmqm3": ["fk8j09s", "fdw0yi8"],
113
- "B2u0y6b": "fdczgix",
114
- "Bf4jedk": "fjdcg9m"
115
- },
116
- "large": {
117
- "z8tnut": "f17mpqex",
118
- "z189sj": ["f1vdfbxk", "f1f5gg8d"],
119
- "Byoj8tv": "fdvome7",
120
- "uwmqm3": ["f1f5gg8d", "f1vdfbxk"],
121
- "B2u0y6b": "fww51uw",
122
- "Bf4jedk": "f1qhsl2h"
94
+ small: {
95
+ z8tnut: "f1x4af0m",
96
+ z189sj: ["f7x41pl", "fruq291"],
97
+ Byoj8tv: "fd55psn",
98
+ uwmqm3: ["fruq291", "f7x41pl"],
99
+ B2u0y6b: "ft5vyj6",
100
+ Bf4jedk: "f17suaiq"
101
+ },
102
+ medium: {
103
+ z8tnut: "f16k8034",
104
+ z189sj: ["fdw0yi8", "fk8j09s"],
105
+ Byoj8tv: "f1angvds",
106
+ uwmqm3: ["fk8j09s", "fdw0yi8"],
107
+ B2u0y6b: "fdczgix",
108
+ Bf4jedk: "fjdcg9m"
109
+ },
110
+ large: {
111
+ z8tnut: "f17mpqex",
112
+ z189sj: ["f1vdfbxk", "f1f5gg8d"],
113
+ Byoj8tv: "fdvome7",
114
+ uwmqm3: ["f1f5gg8d", "f1vdfbxk"],
115
+ B2u0y6b: "fww51uw",
116
+ Bf4jedk: "f1qhsl2h"
123
117
  }
124
118
  }, {
125
- "d": [".f1x4af0m{padding-top:var(--spacingHorizontalXS);}", ".f7x41pl{padding-right:var(--spacingHorizontalXS);}", ".fruq291{padding-left:var(--spacingHorizontalXS);}", ".fd55psn{padding-bottom:var(--spacingHorizontalXS);}", ".ft5vyj6{max-width:48px;}", ".f17suaiq{min-width:48px;}", ".f16k8034{padding-top:var(--spacingHorizontalSNudge);}", ".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}", ".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}", ".f1angvds{padding-bottom:var(--spacingHorizontalSNudge);}", ".fdczgix{max-width:52px;}", ".fjdcg9m{min-width:52px;}", ".f17mpqex{padding-top:var(--spacingHorizontalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".fdvome7{padding-bottom:var(--spacingHorizontalS);}", ".fww51uw{max-width:56px;}", ".f1qhsl2h{min-width:56px;}"]
119
+ d: [".f1x4af0m{padding-top:var(--spacingHorizontalXS);}", ".f7x41pl{padding-right:var(--spacingHorizontalXS);}", ".fruq291{padding-left:var(--spacingHorizontalXS);}", ".fd55psn{padding-bottom:var(--spacingHorizontalXS);}", ".ft5vyj6{max-width:48px;}", ".f17suaiq{min-width:48px;}", ".f16k8034{padding-top:var(--spacingHorizontalSNudge);}", ".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}", ".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}", ".f1angvds{padding-bottom:var(--spacingHorizontalSNudge);}", ".fdczgix{max-width:52px;}", ".fjdcg9m{min-width:52px;}", ".f17mpqex{padding-top:var(--spacingHorizontalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".fdvome7{padding-bottom:var(--spacingHorizontalS);}", ".fww51uw{max-width:56px;}", ".f1qhsl2h{min-width:56px;}"]
126
120
  });
127
-
128
121
  const useIconStyles = /*#__PURE__*/react_1.__styles({
129
- "base": {
130
- "Be2twd7": "fndrnj9",
131
- "Bqenvij": "fbhnoac",
132
- "a9b677": "feqmc2u"
122
+ base: {
123
+ Be2twd7: "fndrnj9",
124
+ Bqenvij: "fbhnoac",
125
+ a9b677: "feqmc2u"
133
126
  },
134
- "before": {
135
- "t21cq0": ["fkujibs", "f199hnxi"]
127
+ before: {
128
+ t21cq0: ["fkujibs", "f199hnxi"]
136
129
  },
137
- "after": {
138
- "Frg6f3": ["f199hnxi", "fkujibs"]
130
+ after: {
131
+ Frg6f3: ["f199hnxi", "fkujibs"]
139
132
  }
140
133
  }, {
141
- "d": [".fndrnj9{font-size:40px;}", ".fbhnoac{height:40px;}", ".feqmc2u{width:40px;}", ".fkujibs{margin-right:var(--spacingHorizontalM);}", ".f199hnxi{margin-left:var(--spacingHorizontalM);}"]
134
+ d: [".fndrnj9{font-size:40px;}", ".fbhnoac{height:40px;}", ".feqmc2u{width:40px;}", ".fkujibs{margin-right:var(--spacingHorizontalM);}", ".f199hnxi{margin-left:var(--spacingHorizontalM);}"]
142
135
  });
143
-
144
136
  const useContentContainerStyles = /*#__PURE__*/react_1.__styles({
145
- "base": {
146
- "mc9l5x": "f22iagw",
147
- "Beiy3e4": "f1vx9l62",
148
- "fsow6f": ["f1o700av", "fes3tcz"]
137
+ base: {
138
+ mc9l5x: "f22iagw",
139
+ Beiy3e4: "f1vx9l62",
140
+ fsow6f: ["f1o700av", "fes3tcz"]
149
141
  }
150
142
  }, {
151
- "d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f1o700av{text-align:left;}", ".fes3tcz{text-align:right;}"]
143
+ d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f1o700av{text-align:left;}", ".fes3tcz{text-align:right;}"]
152
144
  });
153
-
154
145
  const useSecondaryContentStyles = /*#__PURE__*/react_1.__styles({
155
- "base": {
156
- "Bg96gwp": "flkuc6h",
157
- "Bhrd7zp": "figsok6"
146
+ base: {
147
+ Bg96gwp: "flkuc6h",
148
+ Bhrd7zp: "figsok6"
158
149
  },
159
- "small": {
160
- "Be2twd7": "fy9rknc"
150
+ small: {
151
+ Be2twd7: "fy9rknc"
161
152
  },
162
- "medium": {
163
- "Be2twd7": "fy9rknc"
153
+ medium: {
154
+ Be2twd7: "fy9rknc"
164
155
  },
165
- "large": {
166
- "Be2twd7": "fkhj508"
156
+ large: {
157
+ Be2twd7: "fkhj508"
167
158
  }
168
159
  }, {
169
- "d": [".flkuc6h{line-height:100%;}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fkhj508{font-size:var(--fontSizeBase300);}"]
160
+ d: [".flkuc6h{line-height:100%;}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fkhj508{font-size:var(--fontSizeBase300);}"]
170
161
  });
171
-
172
162
  const useCompoundButtonStyles_unstable = state => {
173
163
  const rootStyles = useRootStyles();
174
164
  const rootIconOnlyStyles = useRootIconOnlyStyles();
@@ -183,24 +173,24 @@ const useCompoundButtonStyles_unstable = state => {
183
173
  iconPosition,
184
174
  size
185
175
  } = state;
186
- state.root.className = react_1.mergeClasses(exports.compoundButtonClassNames.root, // Root styles
187
- rootStyles.base, rootStyles.highContrast, appearance && rootStyles[appearance], rootStyles[size], // Disabled styles
188
- (disabled || disabledFocusable) && rootStyles.disabled, (disabled || disabledFocusable) && rootStyles.disabledHighContrast, // Icon-only styles
189
- iconOnly && rootIconOnlyStyles[size], // User provided class name
176
+ state.root.className = react_1.mergeClasses(exports.compoundButtonClassNames.root,
177
+ // Root styles
178
+ rootStyles.base, rootStyles.highContrast, appearance && rootStyles[appearance], rootStyles[size],
179
+ // Disabled styles
180
+ (disabled || disabledFocusable) && rootStyles.disabled, (disabled || disabledFocusable) && rootStyles.disabledHighContrast,
181
+ // Icon-only styles
182
+ iconOnly && rootIconOnlyStyles[size],
183
+ // User provided class name
190
184
  state.root.className);
191
185
  state.contentContainer.className = react_1.mergeClasses(exports.compoundButtonClassNames.contentContainer, contentContainerStyles.base, state.contentContainer.className);
192
-
193
186
  if (state.icon) {
194
187
  state.icon.className = react_1.mergeClasses(exports.compoundButtonClassNames.icon, iconStyles.base, state.root.children !== undefined && state.root.children !== null && iconStyles[iconPosition], state.icon.className);
195
188
  }
196
-
197
189
  if (state.secondaryContent) {
198
190
  state.secondaryContent.className = react_1.mergeClasses(exports.compoundButtonClassNames.secondaryContent, secondaryContentStyles.base, secondaryContentStyles[size], state.secondaryContent.className);
199
191
  }
200
-
201
192
  useButtonStyles_1.useButtonStyles_unstable(state);
202
193
  return state;
203
194
  };
204
-
205
195
  exports.useCompoundButtonStyles_unstable = useCompoundButtonStyles_unstable;
206
196
  //# sourceMappingURL=useCompoundButtonStyles.js.map