@fluentui/react-infobutton 9.0.0-beta.4 → 9.0.0-beta.41

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 (129) hide show
  1. package/CHANGELOG.json +1255 -1
  2. package/CHANGELOG.md +436 -2
  3. package/dist/index.d.ts +152 -4
  4. package/lib/InfoButton.js +0 -1
  5. package/lib/InfoButton.js.map +1 -1
  6. package/lib/InfoIcon.js +1 -0
  7. package/lib/InfoIcon.js.map +1 -0
  8. package/lib/InfoIconLabel.js +1 -0
  9. package/lib/InfoIconLabel.js.map +1 -0
  10. package/lib/InfoLabel.js +1 -0
  11. package/lib/InfoLabel.js.map +1 -0
  12. package/lib/components/InfoButton/DefaultInfoButtonIcons.js +3 -4
  13. package/lib/components/InfoButton/DefaultInfoButtonIcons.js.map +1 -1
  14. package/lib/components/InfoButton/InfoButton.js +5 -8
  15. package/lib/components/InfoButton/InfoButton.js.map +1 -1
  16. package/lib/components/InfoButton/InfoButton.types.js +1 -2
  17. package/lib/components/InfoButton/InfoButton.types.js.map +1 -1
  18. package/lib/components/InfoButton/index.js +1 -2
  19. package/lib/components/InfoButton/index.js.map +1 -1
  20. package/lib/components/InfoButton/renderInfoButton.js +5 -14
  21. package/lib/components/InfoButton/renderInfoButton.js.map +1 -1
  22. package/lib/components/InfoButton/useInfoButton.js +46 -50
  23. package/lib/components/InfoButton/useInfoButton.js.map +1 -1
  24. package/lib/components/InfoButton/useInfoButtonStyles.styles.js +153 -0
  25. package/lib/components/InfoButton/useInfoButtonStyles.styles.js.map +1 -0
  26. package/lib/components/InfoIcon/InfoIcon.js +12 -0
  27. package/lib/components/InfoIcon/InfoIcon.js.map +1 -0
  28. package/lib/components/InfoIcon/InfoIcon.types.js +2 -0
  29. package/lib/components/InfoIcon/InfoIcon.types.js.map +1 -0
  30. package/lib/components/InfoIcon/index.js +5 -0
  31. package/lib/components/InfoIcon/index.js.map +1 -0
  32. package/lib/components/InfoIcon/renderInfoIcon.js +9 -0
  33. package/lib/components/InfoIcon/renderInfoIcon.js.map +1 -0
  34. package/lib/components/InfoIcon/useInfoIcon.js +25 -0
  35. package/lib/components/InfoIcon/useInfoIcon.js.map +1 -0
  36. package/lib/components/InfoIcon/useInfoIconStyles.styles.js +21 -0
  37. package/lib/components/InfoIcon/useInfoIconStyles.styles.js.map +1 -0
  38. package/lib/components/InfoIconLabel/InfoIconLabel.js +12 -0
  39. package/lib/components/InfoIconLabel/InfoIconLabel.js.map +1 -0
  40. package/lib/components/InfoIconLabel/InfoIconLabel.types.js +2 -0
  41. package/lib/components/InfoIconLabel/InfoIconLabel.types.js.map +1 -0
  42. package/lib/components/InfoIconLabel/index.js +5 -0
  43. package/lib/components/InfoIconLabel/index.js.map +1 -0
  44. package/lib/components/InfoIconLabel/renderInfoIconLabel.js +9 -0
  45. package/lib/components/InfoIconLabel/renderInfoIconLabel.js.map +1 -0
  46. package/lib/components/InfoIconLabel/useInfoIconLabel.js +25 -0
  47. package/lib/components/InfoIconLabel/useInfoIconLabel.js.map +1 -0
  48. package/lib/components/InfoIconLabel/useInfoIconLabelStyles.styles.js +21 -0
  49. package/lib/components/InfoIconLabel/useInfoIconLabelStyles.styles.js.map +1 -0
  50. package/lib/components/InfoLabel/InfoLabel.js +12 -0
  51. package/lib/components/InfoLabel/InfoLabel.js.map +1 -0
  52. package/lib/components/InfoLabel/InfoLabel.types.js +1 -0
  53. package/lib/components/InfoLabel/InfoLabel.types.js.map +1 -0
  54. package/lib/components/InfoLabel/index.js +5 -0
  55. package/lib/components/InfoLabel/index.js.map +1 -0
  56. package/lib/components/InfoLabel/renderInfoLabel.js +8 -0
  57. package/lib/components/InfoLabel/renderInfoLabel.js.map +1 -0
  58. package/lib/components/InfoLabel/useInfoLabel.js +64 -0
  59. package/lib/components/InfoLabel/useInfoLabel.js.map +1 -0
  60. package/lib/components/InfoLabel/useInfoLabelStyles.styles.js +43 -0
  61. package/lib/components/InfoLabel/useInfoLabelStyles.styles.js.map +1 -0
  62. package/lib/index.js +3 -1
  63. package/lib/index.js.map +1 -1
  64. package/lib-commonjs/InfoButton.js +3 -7
  65. package/lib-commonjs/InfoButton.js.map +1 -1
  66. package/lib-commonjs/InfoIcon.js +6 -0
  67. package/lib-commonjs/InfoIcon.js.map +1 -0
  68. package/lib-commonjs/InfoIconLabel.js +6 -0
  69. package/lib-commonjs/InfoIconLabel.js.map +1 -0
  70. package/lib-commonjs/InfoLabel.js +6 -0
  71. package/lib-commonjs/InfoLabel.js.map +1 -0
  72. package/lib-commonjs/components/InfoButton/DefaultInfoButtonIcons.js +16 -10
  73. package/lib-commonjs/components/InfoButton/DefaultInfoButtonIcons.js.map +1 -1
  74. package/lib-commonjs/components/InfoButton/InfoButton.js +15 -22
  75. package/lib-commonjs/components/InfoButton/InfoButton.js.map +1 -1
  76. package/lib-commonjs/components/InfoButton/InfoButton.types.js +1 -3
  77. package/lib-commonjs/components/InfoButton/InfoButton.types.js.map +1 -1
  78. package/lib-commonjs/components/InfoButton/index.js +7 -15
  79. package/lib-commonjs/components/InfoButton/index.js.map +1 -1
  80. package/lib-commonjs/components/InfoButton/renderInfoButton.js +12 -27
  81. package/lib-commonjs/components/InfoButton/renderInfoButton.js.map +1 -1
  82. package/lib-commonjs/components/InfoButton/useInfoButton.js +56 -74
  83. package/lib-commonjs/components/InfoButton/useInfoButton.js.map +1 -1
  84. package/lib-commonjs/components/InfoButton/useInfoButtonStyles.styles.js +340 -0
  85. package/lib-commonjs/components/InfoButton/useInfoButtonStyles.styles.js.map +1 -0
  86. package/lib-commonjs/components/InfoIcon/InfoIcon.js +19 -0
  87. package/lib-commonjs/components/InfoIcon/InfoIcon.js.map +1 -0
  88. package/lib-commonjs/components/InfoIcon/InfoIcon.types.js +6 -0
  89. package/lib-commonjs/components/InfoIcon/InfoIcon.types.js.map +1 -0
  90. package/lib-commonjs/components/InfoIcon/index.js +10 -0
  91. package/lib-commonjs/components/InfoIcon/index.js.map +1 -0
  92. package/lib-commonjs/components/InfoIcon/renderInfoIcon.js +15 -0
  93. package/lib-commonjs/components/InfoIcon/renderInfoIcon.js.map +1 -0
  94. package/lib-commonjs/components/InfoIcon/useInfoIcon.js +26 -0
  95. package/lib-commonjs/components/InfoIcon/useInfoIcon.js.map +1 -0
  96. package/lib-commonjs/components/InfoIcon/useInfoIconStyles.styles.js +30 -0
  97. package/lib-commonjs/components/InfoIcon/useInfoIconStyles.styles.js.map +1 -0
  98. package/lib-commonjs/components/InfoIconLabel/InfoIconLabel.js +19 -0
  99. package/lib-commonjs/components/InfoIconLabel/InfoIconLabel.js.map +1 -0
  100. package/lib-commonjs/components/InfoIconLabel/InfoIconLabel.types.js +6 -0
  101. package/lib-commonjs/components/InfoIconLabel/InfoIconLabel.types.js.map +1 -0
  102. package/lib-commonjs/components/InfoIconLabel/index.js +10 -0
  103. package/lib-commonjs/components/InfoIconLabel/index.js.map +1 -0
  104. package/lib-commonjs/components/InfoIconLabel/renderInfoIconLabel.js +15 -0
  105. package/lib-commonjs/components/InfoIconLabel/renderInfoIconLabel.js.map +1 -0
  106. package/lib-commonjs/components/InfoIconLabel/useInfoIconLabel.js +26 -0
  107. package/lib-commonjs/components/InfoIconLabel/useInfoIconLabel.js.map +1 -0
  108. package/lib-commonjs/components/InfoIconLabel/useInfoIconLabelStyles.styles.js +30 -0
  109. package/lib-commonjs/components/InfoIconLabel/useInfoIconLabelStyles.styles.js.map +1 -0
  110. package/lib-commonjs/components/InfoLabel/InfoLabel.js +19 -0
  111. package/lib-commonjs/components/InfoLabel/InfoLabel.js.map +1 -0
  112. package/lib-commonjs/components/InfoLabel/InfoLabel.types.js +4 -0
  113. package/lib-commonjs/components/InfoLabel/InfoLabel.types.js.map +1 -0
  114. package/lib-commonjs/components/InfoLabel/index.js +10 -0
  115. package/lib-commonjs/components/InfoLabel/index.js.map +1 -0
  116. package/lib-commonjs/components/InfoLabel/renderInfoLabel.js +14 -0
  117. package/lib-commonjs/components/InfoLabel/renderInfoLabel.js.map +1 -0
  118. package/lib-commonjs/components/InfoLabel/useInfoLabel.js +65 -0
  119. package/lib-commonjs/components/InfoLabel/useInfoLabel.js.map +1 -0
  120. package/lib-commonjs/components/InfoLabel/useInfoLabelStyles.styles.js +62 -0
  121. package/lib-commonjs/components/InfoLabel/useInfoLabelStyles.styles.js.map +1 -0
  122. package/lib-commonjs/index.js +32 -36
  123. package/lib-commonjs/index.js.map +1 -1
  124. package/package.json +17 -12
  125. package/Spec.md +0 -143
  126. package/lib/components/InfoButton/useInfoButtonStyles.js +0 -187
  127. package/lib/components/InfoButton/useInfoButtonStyles.js.map +0 -1
  128. package/lib-commonjs/components/InfoButton/useInfoButtonStyles.js +0 -200
  129. package/lib-commonjs/components/InfoButton/useInfoButtonStyles.js.map +0 -1
package/Spec.md DELETED
@@ -1,143 +0,0 @@
1
- # @fluentui/react-infobutton Spec
2
-
3
- Convergence epic issue: [#25062](https://github.com/microsoft/fluentui/issues/25062)
4
-
5
- ## Background
6
-
7
- An InfoButton provides a way for users to get more information about a particular UI element. It is a button containing an icon that, when clicked, displays a Popover with the additional information. InfoButton may contain focusable items inside the Popover.
8
-
9
- Because the Popover isn't always visible, it should not contain information that people must know in order to complete the field.
10
-
11
- ### Anatomy
12
-
13
- ![Anatomy](./etc/images/anatomy.png)
14
-
15
- ## Prior Art
16
-
17
- | Name | library | Notes |
18
- | --------------------------------------------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
19
- | IconButtonTooltip | [Carbon Design System](https://www.carbondesignsystem.com/components/tooltip/usage) | This is an example within the tooltip component. |
20
- | Tooltip with card appearance and general tooltip | [EverGreen](https://evergreen.segment.com/components/tooltip) | This are examples within the tooltip component. This library doesn't use a button, instead just an icon. |
21
- | Input and guidance to add info button | [Salesforce](https://www.lightningdesignsystem.com/components/input/) | This component lives within Input and shows how to build an info button instead. |
22
- | TextField with example on how to add an info button | [v8](https://developer.microsoft.com/en-us/fluentui#/controls/web/textfield) | This is just an example and on how to implement it. |
23
- | ContextualHelp | [React Spectrum](https://react-spectrum.adobe.com/react-spectrum/ContextualHelp.html) | It's a full component and uses a Popover instead of tooltip. |
24
-
25
- #### Comparison with v0 and v8
26
-
27
- - v0 does not have an InfoButton component.
28
- - v8 does not have an InfoButton component, but does have a TextField component that has an example of how to add an info button to a TextField, see "Prior Art" section above for more details.
29
-
30
- ## Sample Code
31
-
32
- ```jsx
33
- <InfoButton content="This is some additional information." />
34
- ```
35
-
36
- ## API
37
-
38
- #### Props
39
-
40
- ```ts
41
- export type InfoButtonSlots = {
42
- root: NonNullable<Slot<'button'>>;
43
-
44
- /**
45
- * The Popover element that wraps the content and root. Use this slot to pass props to the Popover.
46
- */
47
- popover: NonNullable<Slot<PopoverProps>>;
48
-
49
- /**
50
- * The content to be displayed in the PopoverSurface when the button is pressed.
51
- */
52
- content: NonNullable<Slot<typeof PopoverSurface>>;
53
- };
54
-
55
- /**
56
- * InfoButton Props
57
- */
58
- export type InfoButtonProps = ComponentProps<Partial<InfoButtonSlots>>;
59
-
60
- /**
61
- * State used in rendering InfoButton
62
- */
63
- export type InfoButtonState = ComponentState<InfoButtonSlots>;
64
- ```
65
-
66
- ## Structure
67
-
68
- _**Public**_
69
-
70
- ```jsx
71
- <InfoButton
72
- content={
73
- <>
74
- Popover above-start lorem ipsum dolor sit amet consectetur.
75
- <Link href="https://react.fluentui.dev">Learn more</Link>
76
- </>
77
- }
78
- />
79
- ```
80
-
81
- _**Internal**_
82
-
83
- ```jsx
84
- return (
85
- <slots.popover {...(slotProps.popover as PopoverProps)}>
86
- <PopoverTrigger>
87
- <slots.root {...slotProps.root} />
88
- </PopoverTrigger>
89
- <slots.content {...slotProps.content} />
90
- </slots.popover>
91
- );
92
- ```
93
-
94
- _**DOM**_
95
-
96
- ```html
97
- <button type="button" class="fui-Button fui-InfoButton__button">
98
- <!-- icon -->
99
- </button>
100
-
101
- <!-- on document.body -->
102
- <div role="tooltip" class="fui-PopoverSurface fui-InfoButton__content">
103
- Popover above-start lorem ipsum dolor sit amet consectetur.
104
- <a href="https://react.fluentui.dev">Learn more</a>
105
- </div>
106
- ```
107
-
108
- ## Migration
109
-
110
- There's no migration guide as `v0` and `v8` do not have an InfoButton component.
111
-
112
- ## Behaviors
113
-
114
- > Note: The behavior will change when used in conjunction with the `Field` component. It is mentioned that when a form has many InfoButtons, it may be better to not make a full tab stop in the button. The idea is to have each field have a "shortcut" that will let you focus on the infobutton. This will be implemented by Field if needed.
115
-
116
- - _Component States_
117
- - Popover open: The Popover is open and content visible.
118
- - _Interaction_
119
- - _Keyboard_
120
- - `Enter` or `Space` key: Opens the Popover.
121
- - Focusable items in Popover: Item should trap focus within the Popover.
122
- - No focusable items in Popover: Focus should stay on the button.
123
- - `Escape` key: Closes the Popover.
124
- - _Cursor_
125
- - `Click`: Opens the Popover.
126
- - `Click` outside of Popover: Closes the Popover.
127
- - _Touch_
128
- - `Tap`: Opens the Popover.
129
- - `Tap` outside of Popover: Closes the Popover.
130
- - _Screen readers_
131
- - When screen reader is on the button, it should announce that it is a button, that it can be used to open a Popover, and read out the aria-label of the button.
132
- - When screen reader is on the Popover, it should announce that it is a dialog, and read out the content of the Popover.
133
-
134
- ## Accessibility
135
-
136
- - `role="tooltip"` is used on the PopoverSurface.
137
- - Tab order
138
- - When tabbing through the page, the button should be a tab stop.
139
- - When focused on the button, pressing `Enter` or `Space` should open the Popover.
140
- - If the popover does not contain any focusable items, focus should stay on the button.
141
- - When focused on the button, pressing `Escape` should close the Popover.
142
- - When the Popover is open and it has focusable items, tabbing should move to the next focusable item.
143
- - When focused on an item inside the Popover, pressing `Escape` should close the Popover and return to the button.
@@ -1,187 +0,0 @@
1
- import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
2
- import { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';
3
- import { __styles, mergeClasses, shorthands } from '@griffel/react';
4
- import { tokens, typographyStyles } from '@fluentui/react-theme';
5
- export const infoButtonClassNames = {
6
- root: 'fui-InfoButton',
7
- // this className won't be used, but it's needed to satisfy the type checker
8
- popover: 'fui-InfoButton__popover',
9
- content: 'fui-InfoButton__content'
10
- };
11
- /**
12
- * Styles for the root slot
13
- */
14
-
15
- const useButtonStyles = /*#__PURE__*/__styles({
16
- "base": {
17
- "Bt984gj": "f122n59",
18
- "B7ck84d": "f1ewtqcl",
19
- "mc9l5x": "ftuwxu6",
20
- "Brf1p80": "f4d9j23",
21
- "w71qe1": "f1iuv45f",
22
- "ha4doy": "fmrv4ls",
23
- "De3pzq": "f1c21dwh",
24
- "sj55zd": "fkfq4zb",
25
- "B68tc82": "f1p9o1ba",
26
- "Bmxbyg5": "f1sil6mw",
27
- "B4j52fo": "f192inf7",
28
- "Bekrc4i": ["f5tn483", "f1ojsxk5"],
29
- "Bn0qgzm": "f1vxd6vx",
30
- "ibv6hh": ["f1ojsxk5", "f5tn483"],
31
- "icvyot": "fzkkow9",
32
- "vrafjx": ["fcdblym", "fjik90z"],
33
- "oivjwe": "fg706s2",
34
- "wvpqe5": ["fjik90z", "fcdblym"],
35
- "g2u3we": "fghlq4f",
36
- "h3c5rm": ["f1gn591s", "fjscplz"],
37
- "B9xav0g": "fb073pr",
38
- "zhjwy3": ["fjscplz", "f1gn591s"],
39
- "Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
40
- "Beyfa6y": ["f16jpd5f", "f1aa9q02"],
41
- "B7oj6ja": ["f1jar5jt", "fyu767a"],
42
- "Btl43ni": ["fyu767a", "f1jar5jt"],
43
- "B6of3ja": "f1hu3pq6",
44
- "t21cq0": ["f11qmguv", "f1tyq0we"],
45
- "jrapky": "f19f4twv",
46
- "Frg6f3": ["f1tyq0we", "f11qmguv"],
47
- "z8tnut": "f1ywm7hm",
48
- "z189sj": ["f7x41pl", "fruq291"],
49
- "Byoj8tv": "f14wxoun",
50
- "uwmqm3": ["fruq291", "f7x41pl"],
51
- "D0sxk3": "f16u1re",
52
- "t6yez3": "f1rw4040",
53
- "Jwef8y": "fjxutwb",
54
- "Bi91k9c": "f139oj5f",
55
- "Bk3fhr4": "f1jpd6y0",
56
- "Bmfj8id": "fuxngvv",
57
- "iro3zm": "fwiml72",
58
- "B2d53fq": "f1fg1p5m"
59
- },
60
- "selected": {
61
- "De3pzq": "f1q9pm1r",
62
- "sj55zd": "f1qj7y59",
63
- "D0sxk3": "fgzdkf0",
64
- "t6yez3": "f15q0o9g",
65
- "Bsw6fvg": "f1rirnrt",
66
- "Bjwas2f": "f14pvji2",
67
- "Bn1d65q": ["f1xeojaw", "f1hodmrf"],
68
- "Bxeuatn": "fcbbwn3",
69
- "n51gp8": ["f1hodmrf", "f1xeojaw"],
70
- "Bbusuzp": "f1cg6951"
71
- },
72
- "highContrast": {
73
- "Bjwas2f": "f14pvji2",
74
- "Bn1d65q": ["f1xeojaw", "f1hodmrf"],
75
- "Bxeuatn": "fcbbwn3",
76
- "n51gp8": ["f1hodmrf", "f1xeojaw"],
77
- "Bbusuzp": "fn0tkbb",
78
- "w76p1f": "f18rpr9v",
79
- "B3sm7at": "f5mt1fw",
80
- "fe9h6n": "f17188ff",
81
- "Bmhq1k7": ["fzyms9j", "f12bfk5t"],
82
- "E428ku": "f1ucftwv",
83
- "Bipfp3": ["f12bfk5t", "fzyms9j"],
84
- "nrfbsj": "f10s0nbj"
85
- },
86
- "focusIndicator": {
87
- "Brovlpu": "ftqa4ok",
88
- "B486eqv": "f2hkw1w",
89
- "kdpuga": ["f1o2ludy", "f1kjnpwc"],
90
- "Bw81rd7": ["f1kjnpwc", "f1o2ludy"],
91
- "B6xbmo0": ["fxmnebo", "f1witrsb"],
92
- "dm238s": ["f1witrsb", "fxmnebo"],
93
- "B8q5s1w": "f1rzxaq5",
94
- "Bci5o5g": ["fipsau9", "f6jszy8"],
95
- "n8qw10": "f1emqxbc",
96
- "Bdrgwmp": ["f6jszy8", "fipsau9"],
97
- "Bfpq7zp": "fr1u5pk",
98
- "Bn4voq9": "f1p7hgxw",
99
- "g9k6zt": "f9znhxp",
100
- "j6ew2k": ["fvbipq7", "fvbipq7"],
101
- "Bhxq17a": "f1vjpng2"
102
- },
103
- "large": {
104
- "z8tnut": "fclwglc",
105
- "z189sj": ["f1w3695s", "f1b0r8ql"],
106
- "Byoj8tv": "fywfov9",
107
- "uwmqm3": ["f1b0r8ql", "f1w3695s"]
108
- }
109
- }, {
110
- "d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f1ewtqcl{box-sizing:border-box;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f1iuv45f{text-decoration-line:none;}", ".fmrv4ls{vertical-align:middle;}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".f1ywm7hm{padding-top:var(--spacingVerticalXS);}", ".f7x41pl{padding-right:var(--spacingHorizontalXS);}", ".fruq291{padding-left:var(--spacingHorizontalXS);}", ".f14wxoun{padding-bottom:var(--spacingVerticalXS);}", ".f16u1re .fui-Icon-filled{display:none;}", ".f1rw4040 .fui-Icon-regular{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f1q9pm1r{background-color:var(--colorTransparentBackgroundSelected);}", ".f1qj7y59{color:var(--colorNeutralForeground2BrandSelected);}", ".fgzdkf0 .fui-Icon-filled{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f15q0o9g .fui-Icon-regular{display:none;}", ".f1o2ludy[data-fui-focus-visible]{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f1kjnpwc[data-fui-focus-visible]{border-bottom-left-radius:var(--borderRadiusMedium);}", ".fxmnebo[data-fui-focus-visible]{border-top-right-radius:var(--borderRadiusMedium);}", ".f1witrsb[data-fui-focus-visible]{border-top-left-radius:var(--borderRadiusMedium);}", ".f1rzxaq5[data-fui-focus-visible]{border-top-color:var(--colorTransparentStroke);}", ".fipsau9[data-fui-focus-visible]{border-right-color:var(--colorTransparentStroke);}", ".f6jszy8[data-fui-focus-visible]{border-left-color:var(--colorTransparentStroke);}", ".f1emqxbc[data-fui-focus-visible]{border-bottom-color:var(--colorTransparentStroke);}", ".fr1u5pk[data-fui-focus-visible]{outline-color:var(--colorTransparentStroke);}", ".f1p7hgxw[data-fui-focus-visible]{outline-width:var(--strokeWidthThick);}", ".f9znhxp[data-fui-focus-visible]{outline-style:solid;}", ".fvbipq7[data-fui-focus-visible]{box-shadow:var(--shadow4),0 0 0 2px var(--colorStrokeFocus2);}", ".f1vjpng2[data-fui-focus-visible]{z-index:1;}", ".fclwglc{padding-top:var(--spacingVerticalXXS);}", ".f1w3695s{padding-right:var(--spacingVerticalXXS);}", ".f1b0r8ql{padding-left:var(--spacingVerticalXXS);}", ".fywfov9{padding-bottom:var(--spacingVerticalXXS);}"],
111
- "h": [".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}", ".f139oj5f:hover{color:var(--colorNeutralForeground2BrandHover);}", ".f1jpd6y0:hover .fui-Icon-filled{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".fuxngvv:hover .fui-Icon-regular{display:none;}", ".fwiml72:hover:active{background-color:var(--colorTransparentBackgroundPressed);}", ".f1fg1p5m:hover:active{color:var(--colorNeutralForeground2BrandPressed);}"],
112
- "m": [["@media (forced-colors: active){.f1rirnrt{background-color:Highlight;}}", {
113
- "m": "(forced-colors: active)"
114
- }], ["@media (forced-colors: active){.f14pvji2{border-top-color:Canvas;}}", {
115
- "m": "(forced-colors: active)"
116
- }], ["@media (forced-colors: active){.f1xeojaw{border-right-color:Canvas;}.f1hodmrf{border-left-color:Canvas;}}", {
117
- "m": "(forced-colors: active)"
118
- }], ["@media (forced-colors: active){.fcbbwn3{border-bottom-color:Canvas;}}", {
119
- "m": "(forced-colors: active)"
120
- }], ["@media (forced-colors: active){.f1hodmrf{border-left-color:Canvas;}.f1xeojaw{border-right-color:Canvas;}}", {
121
- "m": "(forced-colors: active)"
122
- }], ["@media (forced-colors: active){.f1cg6951{color:Canvas;}}", {
123
- "m": "(forced-colors: active)"
124
- }], ["@media (forced-colors: active){.f14pvji2{border-top-color:Canvas;}}", {
125
- "m": "(forced-colors: active)"
126
- }], ["@media (forced-colors: active){.f1xeojaw{border-right-color:Canvas;}.f1hodmrf{border-left-color:Canvas;}}", {
127
- "m": "(forced-colors: active)"
128
- }], ["@media (forced-colors: active){.fcbbwn3{border-bottom-color:Canvas;}}", {
129
- "m": "(forced-colors: active)"
130
- }], ["@media (forced-colors: active){.f1hodmrf{border-left-color:Canvas;}.f1xeojaw{border-right-color:Canvas;}}", {
131
- "m": "(forced-colors: active)"
132
- }], ["@media (forced-colors: active){.fn0tkbb{color:CanvasText;}}", {
133
- "m": "(forced-colors: active)"
134
- }], ["@media (forced-colors: active){.f18rpr9v:hover,.f18rpr9v :hover:active{forced-color-adjust:none;}}", {
135
- "m": "(forced-colors: active)"
136
- }], ["@media (forced-colors: active){.f5mt1fw:hover,.f5mt1fw :hover:active{background-color:Highlight;}}", {
137
- "m": "(forced-colors: active)"
138
- }], ["@media (forced-colors: active){.f17188ff:hover,.f17188ff :hover:active{border-top-color:Canvas;}}", {
139
- "m": "(forced-colors: active)"
140
- }], ["@media (forced-colors: active){.fzyms9j:hover,.fzyms9j :hover:active{border-right-color:Canvas;}.f12bfk5t:hover,.f12bfk5t :hover:active{border-left-color:Canvas;}}", {
141
- "m": "(forced-colors: active)"
142
- }], ["@media (forced-colors: active){.f1ucftwv:hover,.f1ucftwv :hover:active{border-bottom-color:Canvas;}}", {
143
- "m": "(forced-colors: active)"
144
- }], ["@media (forced-colors: active){.f12bfk5t:hover,.f12bfk5t :hover:active{border-left-color:Canvas;}.fzyms9j:hover,.fzyms9j :hover:active{border-right-color:Canvas;}}", {
145
- "m": "(forced-colors: active)"
146
- }], ["@media (forced-colors: active){.f10s0nbj:hover,.f10s0nbj :hover:active{color:Canvas;}}", {
147
- "m": "(forced-colors: active)"
148
- }]],
149
- "f": [".ftqa4ok:focus{outline-style:none;}"],
150
- "i": [".f2hkw1w:focus-visible{outline-style:none;}"]
151
- });
152
-
153
- const usePopoverSurfaceStyles = /*#__PURE__*/__styles({
154
- "smallMedium": {
155
- "Bahqtrf": "fk6fouc",
156
- "Be2twd7": "fy9rknc",
157
- "Bhrd7zp": "figsok6",
158
- "Bg96gwp": "fwrc4pm"
159
- },
160
- "large": {
161
- "Bahqtrf": "fk6fouc",
162
- "Be2twd7": "fkhj508",
163
- "Bhrd7zp": "figsok6",
164
- "Bg96gwp": "f1i3iumi"
165
- }
166
- }, {
167
- "d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}"]
168
- });
169
- /**
170
- * Apply styling to the InfoButton slots based on the state
171
- */
172
-
173
-
174
- export const useInfoButtonStyles_unstable = state => {
175
- const {
176
- size
177
- } = state;
178
- const {
179
- open
180
- } = state.popover;
181
- const buttonStyles = useButtonStyles();
182
- const popoverSurfaceStyles = usePopoverSurfaceStyles();
183
- state.content.className = mergeClasses(infoButtonClassNames.content, size === 'large' && popoverSurfaceStyles.large, state.content.className);
184
- state.root.className = mergeClasses(infoButtonClassNames.root, buttonStyles.base, buttonStyles.highContrast, buttonStyles.focusIndicator, open && buttonStyles.selected, size === 'large' && buttonStyles.large, state.root.className);
185
- return state;
186
- };
187
- //# sourceMappingURL=useInfoButtonStyles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["packages/react-components/react-infobutton/src/components/InfoButton/useInfoButtonStyles.ts"],"names":[],"mappings":"AAAA,SAAS,+BAAT,QAAgD,yBAAhD;AACA,SAAS,mBAAT,EAA8B,oBAA9B,QAA0D,uBAA1D;AACA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AACA,SAAS,MAAT,EAAiB,gBAAjB,QAAyC,uBAAzC;AAIA,OAAO,MAAM,oBAAoB,GAAoC;EACnE,IAAI,EAAE,gBAD6D;EAEnE;EACA,OAAO,EAAE,yBAH0D;EAInE,OAAO,EAAE;AAJ0D,CAA9D;AAOP;;AAEG;;AACH,MAAM,eAAe,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;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;EAAA;EAAA;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;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;EAAA;EAAA;AAAA,EAAxB;;AA4FA,MAAM,uBAAuB,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAhC;AAKA;;AAEG;;;AACH,OAAO,MAAM,4BAA4B,GAAI,KAAD,IAA4C;EACtF,MAAM;IAAE;EAAF,IAAW,KAAjB;EACA,MAAM;IAAE;EAAF,IAAW,KAAK,CAAC,OAAvB;EACA,MAAM,YAAY,GAAG,eAAe,EAApC;EACA,MAAM,oBAAoB,GAAG,uBAAuB,EAApD;EAEA,KAAK,CAAC,OAAN,CAAc,SAAd,GAA0B,YAAY,CACpC,oBAAoB,CAAC,OADe,EAEpC,IAAI,KAAK,OAAT,IAAoB,oBAAoB,CAAC,KAFL,EAGpC,KAAK,CAAC,OAAN,CAAc,SAHsB,CAAtC;EAMA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,oBAAoB,CAAC,IADY,EAEjC,YAAY,CAAC,IAFoB,EAGjC,YAAY,CAAC,YAHoB,EAIjC,YAAY,CAAC,cAJoB,EAKjC,IAAI,IAAI,YAAY,CAAC,QALY,EAMjC,IAAI,KAAK,OAAT,IAAoB,YAAY,CAAC,KANA,EAOjC,KAAK,CAAC,IAAN,CAAW,SAPsB,CAAnC;EAUA,OAAO,KAAP;AACD,CAvBM","sourcesContent":["import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { InfoButtonSlots, InfoButtonState } from './InfoButton.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const infoButtonClassNames: SlotClassNames<InfoButtonSlots> = {\n root: 'fui-InfoButton',\n // this className won't be used, but it's needed to satisfy the type checker\n popover: 'fui-InfoButton__popover',\n content: 'fui-InfoButton__content',\n};\n\n/**\n * Styles for the root slot\n */\nconst useButtonStyles = makeStyles({\n base: {\n alignItems: 'center',\n boxSizing: 'border-box',\n display: 'inline-flex',\n justifyContent: 'center',\n textDecorationLine: 'none',\n verticalAlign: 'middle',\n\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorNeutralForeground2,\n\n ...shorthands.overflow('hidden'),\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorTransparentStroke),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n ...shorthands.margin(0),\n ...shorthands.padding(tokens.spacingVerticalXS, tokens.spacingHorizontalXS),\n\n [`& .${iconFilledClassName}`]: {\n display: 'none',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'inline-flex',\n },\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n color: tokens.colorNeutralForeground2BrandHover,\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline-flex',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n },\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n\n selected: {\n backgroundColor: tokens.colorTransparentBackgroundSelected,\n color: tokens.colorNeutralForeground2BrandSelected,\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline-flex',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n ...shorthands.borderColor('Canvas'),\n color: 'Canvas',\n },\n },\n\n highContrast: {\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('Canvas'),\n color: 'CanvasText',\n\n ':hover, :hover:active': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n ...shorthands.borderColor('Canvas'),\n color: 'Canvas',\n },\n },\n },\n\n focusIndicator: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n outlineColor: tokens.colorTransparentStroke,\n outlineWidth: tokens.strokeWidthThick,\n outlineStyle: 'solid',\n boxShadow: `\n ${tokens.shadow4},\n 0 0 0 2px ${tokens.colorStrokeFocus2}\n `,\n zIndex: 1,\n }),\n\n large: {\n ...shorthands.padding(tokens.spacingVerticalXXS, tokens.spacingVerticalXXS),\n },\n});\n\nconst usePopoverSurfaceStyles = makeStyles({\n smallMedium: typographyStyles.caption1,\n large: typographyStyles.body1,\n});\n\n/**\n * Apply styling to the InfoButton slots based on the state\n */\nexport const useInfoButtonStyles_unstable = (state: InfoButtonState): InfoButtonState => {\n const { size } = state;\n const { open } = state.popover;\n const buttonStyles = useButtonStyles();\n const popoverSurfaceStyles = usePopoverSurfaceStyles();\n\n state.content.className = mergeClasses(\n infoButtonClassNames.content,\n size === 'large' && popoverSurfaceStyles.large,\n state.content.className,\n );\n\n state.root.className = mergeClasses(\n infoButtonClassNames.root,\n buttonStyles.base,\n buttonStyles.highContrast,\n buttonStyles.focusIndicator,\n open && buttonStyles.selected,\n size === 'large' && buttonStyles.large,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1,200 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useInfoButtonStyles_unstable = exports.infoButtonClassNames = void 0;
7
-
8
- const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
9
-
10
- const react_icons_1 = /*#__PURE__*/require("@fluentui/react-icons");
11
-
12
- const react_1 = /*#__PURE__*/require("@griffel/react");
13
-
14
- const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
15
-
16
- exports.infoButtonClassNames = {
17
- root: 'fui-InfoButton',
18
- // this className won't be used, but it's needed to satisfy the type checker
19
- popover: 'fui-InfoButton__popover',
20
- content: 'fui-InfoButton__content'
21
- };
22
- /**
23
- * Styles for the root slot
24
- */
25
-
26
- const useButtonStyles = /*#__PURE__*/react_1.__styles({
27
- "base": {
28
- "Bt984gj": "f122n59",
29
- "B7ck84d": "f1ewtqcl",
30
- "mc9l5x": "ftuwxu6",
31
- "Brf1p80": "f4d9j23",
32
- "w71qe1": "f1iuv45f",
33
- "ha4doy": "fmrv4ls",
34
- "De3pzq": "f1c21dwh",
35
- "sj55zd": "fkfq4zb",
36
- "B68tc82": "f1p9o1ba",
37
- "Bmxbyg5": "f1sil6mw",
38
- "B4j52fo": "f192inf7",
39
- "Bekrc4i": ["f5tn483", "f1ojsxk5"],
40
- "Bn0qgzm": "f1vxd6vx",
41
- "ibv6hh": ["f1ojsxk5", "f5tn483"],
42
- "icvyot": "fzkkow9",
43
- "vrafjx": ["fcdblym", "fjik90z"],
44
- "oivjwe": "fg706s2",
45
- "wvpqe5": ["fjik90z", "fcdblym"],
46
- "g2u3we": "fghlq4f",
47
- "h3c5rm": ["f1gn591s", "fjscplz"],
48
- "B9xav0g": "fb073pr",
49
- "zhjwy3": ["fjscplz", "f1gn591s"],
50
- "Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
51
- "Beyfa6y": ["f16jpd5f", "f1aa9q02"],
52
- "B7oj6ja": ["f1jar5jt", "fyu767a"],
53
- "Btl43ni": ["fyu767a", "f1jar5jt"],
54
- "B6of3ja": "f1hu3pq6",
55
- "t21cq0": ["f11qmguv", "f1tyq0we"],
56
- "jrapky": "f19f4twv",
57
- "Frg6f3": ["f1tyq0we", "f11qmguv"],
58
- "z8tnut": "f1ywm7hm",
59
- "z189sj": ["f7x41pl", "fruq291"],
60
- "Byoj8tv": "f14wxoun",
61
- "uwmqm3": ["fruq291", "f7x41pl"],
62
- "D0sxk3": "f16u1re",
63
- "t6yez3": "f1rw4040",
64
- "Jwef8y": "fjxutwb",
65
- "Bi91k9c": "f139oj5f",
66
- "Bk3fhr4": "f1jpd6y0",
67
- "Bmfj8id": "fuxngvv",
68
- "iro3zm": "fwiml72",
69
- "B2d53fq": "f1fg1p5m"
70
- },
71
- "selected": {
72
- "De3pzq": "f1q9pm1r",
73
- "sj55zd": "f1qj7y59",
74
- "D0sxk3": "fgzdkf0",
75
- "t6yez3": "f15q0o9g",
76
- "Bsw6fvg": "f1rirnrt",
77
- "Bjwas2f": "f14pvji2",
78
- "Bn1d65q": ["f1xeojaw", "f1hodmrf"],
79
- "Bxeuatn": "fcbbwn3",
80
- "n51gp8": ["f1hodmrf", "f1xeojaw"],
81
- "Bbusuzp": "f1cg6951"
82
- },
83
- "highContrast": {
84
- "Bjwas2f": "f14pvji2",
85
- "Bn1d65q": ["f1xeojaw", "f1hodmrf"],
86
- "Bxeuatn": "fcbbwn3",
87
- "n51gp8": ["f1hodmrf", "f1xeojaw"],
88
- "Bbusuzp": "fn0tkbb",
89
- "w76p1f": "f18rpr9v",
90
- "B3sm7at": "f5mt1fw",
91
- "fe9h6n": "f17188ff",
92
- "Bmhq1k7": ["fzyms9j", "f12bfk5t"],
93
- "E428ku": "f1ucftwv",
94
- "Bipfp3": ["f12bfk5t", "fzyms9j"],
95
- "nrfbsj": "f10s0nbj"
96
- },
97
- "focusIndicator": {
98
- "Brovlpu": "ftqa4ok",
99
- "B486eqv": "f2hkw1w",
100
- "kdpuga": ["f1o2ludy", "f1kjnpwc"],
101
- "Bw81rd7": ["f1kjnpwc", "f1o2ludy"],
102
- "B6xbmo0": ["fxmnebo", "f1witrsb"],
103
- "dm238s": ["f1witrsb", "fxmnebo"],
104
- "B8q5s1w": "f1rzxaq5",
105
- "Bci5o5g": ["fipsau9", "f6jszy8"],
106
- "n8qw10": "f1emqxbc",
107
- "Bdrgwmp": ["f6jszy8", "fipsau9"],
108
- "Bfpq7zp": "fr1u5pk",
109
- "Bn4voq9": "f1p7hgxw",
110
- "g9k6zt": "f9znhxp",
111
- "j6ew2k": ["fvbipq7", "fvbipq7"],
112
- "Bhxq17a": "f1vjpng2"
113
- },
114
- "large": {
115
- "z8tnut": "fclwglc",
116
- "z189sj": ["f1w3695s", "f1b0r8ql"],
117
- "Byoj8tv": "fywfov9",
118
- "uwmqm3": ["f1b0r8ql", "f1w3695s"]
119
- }
120
- }, {
121
- "d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f1ewtqcl{box-sizing:border-box;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f1iuv45f{text-decoration-line:none;}", ".fmrv4ls{vertical-align:middle;}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".f1ywm7hm{padding-top:var(--spacingVerticalXS);}", ".f7x41pl{padding-right:var(--spacingHorizontalXS);}", ".fruq291{padding-left:var(--spacingHorizontalXS);}", ".f14wxoun{padding-bottom:var(--spacingVerticalXS);}", ".f16u1re .fui-Icon-filled{display:none;}", ".f1rw4040 .fui-Icon-regular{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f1q9pm1r{background-color:var(--colorTransparentBackgroundSelected);}", ".f1qj7y59{color:var(--colorNeutralForeground2BrandSelected);}", ".fgzdkf0 .fui-Icon-filled{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f15q0o9g .fui-Icon-regular{display:none;}", ".f1o2ludy[data-fui-focus-visible]{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f1kjnpwc[data-fui-focus-visible]{border-bottom-left-radius:var(--borderRadiusMedium);}", ".fxmnebo[data-fui-focus-visible]{border-top-right-radius:var(--borderRadiusMedium);}", ".f1witrsb[data-fui-focus-visible]{border-top-left-radius:var(--borderRadiusMedium);}", ".f1rzxaq5[data-fui-focus-visible]{border-top-color:var(--colorTransparentStroke);}", ".fipsau9[data-fui-focus-visible]{border-right-color:var(--colorTransparentStroke);}", ".f6jszy8[data-fui-focus-visible]{border-left-color:var(--colorTransparentStroke);}", ".f1emqxbc[data-fui-focus-visible]{border-bottom-color:var(--colorTransparentStroke);}", ".fr1u5pk[data-fui-focus-visible]{outline-color:var(--colorTransparentStroke);}", ".f1p7hgxw[data-fui-focus-visible]{outline-width:var(--strokeWidthThick);}", ".f9znhxp[data-fui-focus-visible]{outline-style:solid;}", ".fvbipq7[data-fui-focus-visible]{box-shadow:var(--shadow4),0 0 0 2px var(--colorStrokeFocus2);}", ".f1vjpng2[data-fui-focus-visible]{z-index:1;}", ".fclwglc{padding-top:var(--spacingVerticalXXS);}", ".f1w3695s{padding-right:var(--spacingVerticalXXS);}", ".f1b0r8ql{padding-left:var(--spacingVerticalXXS);}", ".fywfov9{padding-bottom:var(--spacingVerticalXXS);}"],
122
- "h": [".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}", ".f139oj5f:hover{color:var(--colorNeutralForeground2BrandHover);}", ".f1jpd6y0:hover .fui-Icon-filled{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".fuxngvv:hover .fui-Icon-regular{display:none;}", ".fwiml72:hover:active{background-color:var(--colorTransparentBackgroundPressed);}", ".f1fg1p5m:hover:active{color:var(--colorNeutralForeground2BrandPressed);}"],
123
- "m": [["@media (forced-colors: active){.f1rirnrt{background-color:Highlight;}}", {
124
- "m": "(forced-colors: active)"
125
- }], ["@media (forced-colors: active){.f14pvji2{border-top-color:Canvas;}}", {
126
- "m": "(forced-colors: active)"
127
- }], ["@media (forced-colors: active){.f1xeojaw{border-right-color:Canvas;}.f1hodmrf{border-left-color:Canvas;}}", {
128
- "m": "(forced-colors: active)"
129
- }], ["@media (forced-colors: active){.fcbbwn3{border-bottom-color:Canvas;}}", {
130
- "m": "(forced-colors: active)"
131
- }], ["@media (forced-colors: active){.f1hodmrf{border-left-color:Canvas;}.f1xeojaw{border-right-color:Canvas;}}", {
132
- "m": "(forced-colors: active)"
133
- }], ["@media (forced-colors: active){.f1cg6951{color:Canvas;}}", {
134
- "m": "(forced-colors: active)"
135
- }], ["@media (forced-colors: active){.f14pvji2{border-top-color:Canvas;}}", {
136
- "m": "(forced-colors: active)"
137
- }], ["@media (forced-colors: active){.f1xeojaw{border-right-color:Canvas;}.f1hodmrf{border-left-color:Canvas;}}", {
138
- "m": "(forced-colors: active)"
139
- }], ["@media (forced-colors: active){.fcbbwn3{border-bottom-color:Canvas;}}", {
140
- "m": "(forced-colors: active)"
141
- }], ["@media (forced-colors: active){.f1hodmrf{border-left-color:Canvas;}.f1xeojaw{border-right-color:Canvas;}}", {
142
- "m": "(forced-colors: active)"
143
- }], ["@media (forced-colors: active){.fn0tkbb{color:CanvasText;}}", {
144
- "m": "(forced-colors: active)"
145
- }], ["@media (forced-colors: active){.f18rpr9v:hover,.f18rpr9v :hover:active{forced-color-adjust:none;}}", {
146
- "m": "(forced-colors: active)"
147
- }], ["@media (forced-colors: active){.f5mt1fw:hover,.f5mt1fw :hover:active{background-color:Highlight;}}", {
148
- "m": "(forced-colors: active)"
149
- }], ["@media (forced-colors: active){.f17188ff:hover,.f17188ff :hover:active{border-top-color:Canvas;}}", {
150
- "m": "(forced-colors: active)"
151
- }], ["@media (forced-colors: active){.fzyms9j:hover,.fzyms9j :hover:active{border-right-color:Canvas;}.f12bfk5t:hover,.f12bfk5t :hover:active{border-left-color:Canvas;}}", {
152
- "m": "(forced-colors: active)"
153
- }], ["@media (forced-colors: active){.f1ucftwv:hover,.f1ucftwv :hover:active{border-bottom-color:Canvas;}}", {
154
- "m": "(forced-colors: active)"
155
- }], ["@media (forced-colors: active){.f12bfk5t:hover,.f12bfk5t :hover:active{border-left-color:Canvas;}.fzyms9j:hover,.fzyms9j :hover:active{border-right-color:Canvas;}}", {
156
- "m": "(forced-colors: active)"
157
- }], ["@media (forced-colors: active){.f10s0nbj:hover,.f10s0nbj :hover:active{color:Canvas;}}", {
158
- "m": "(forced-colors: active)"
159
- }]],
160
- "f": [".ftqa4ok:focus{outline-style:none;}"],
161
- "i": [".f2hkw1w:focus-visible{outline-style:none;}"]
162
- });
163
-
164
- const usePopoverSurfaceStyles = /*#__PURE__*/react_1.__styles({
165
- "smallMedium": {
166
- "Bahqtrf": "fk6fouc",
167
- "Be2twd7": "fy9rknc",
168
- "Bhrd7zp": "figsok6",
169
- "Bg96gwp": "fwrc4pm"
170
- },
171
- "large": {
172
- "Bahqtrf": "fk6fouc",
173
- "Be2twd7": "fkhj508",
174
- "Bhrd7zp": "figsok6",
175
- "Bg96gwp": "f1i3iumi"
176
- }
177
- }, {
178
- "d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}"]
179
- });
180
- /**
181
- * Apply styling to the InfoButton slots based on the state
182
- */
183
-
184
-
185
- const useInfoButtonStyles_unstable = state => {
186
- const {
187
- size
188
- } = state;
189
- const {
190
- open
191
- } = state.popover;
192
- const buttonStyles = useButtonStyles();
193
- const popoverSurfaceStyles = usePopoverSurfaceStyles();
194
- state.content.className = react_1.mergeClasses(exports.infoButtonClassNames.content, size === 'large' && popoverSurfaceStyles.large, state.content.className);
195
- state.root.className = react_1.mergeClasses(exports.infoButtonClassNames.root, buttonStyles.base, buttonStyles.highContrast, buttonStyles.focusIndicator, open && buttonStyles.selected, size === 'large' && buttonStyles.large, state.root.className);
196
- return state;
197
- };
198
-
199
- exports.useInfoButtonStyles_unstable = useInfoButtonStyles_unstable;
200
- //# sourceMappingURL=useInfoButtonStyles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["packages/react-components/react-infobutton/src/components/InfoButton/useInfoButtonStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAIa,OAAA,CAAA,oBAAA,GAAwD;EACnE,IAAI,EAAE,gBAD6D;EAEnE;EACA,OAAO,EAAE,yBAH0D;EAInE,OAAO,EAAE;AAJ0D,CAAxD;AAOb;;AAEG;;AACH,MAAM,eAAe,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;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;EAAA;EAAA;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;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;EAAA;EAAA;AAAA,EAAxB;;AA4FA,MAAM,uBAAuB,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAhC;AAKA;;AAEG;;;AACI,MAAM,4BAA4B,GAAI,KAAD,IAA4C;EACtF,MAAM;IAAE;EAAF,IAAW,KAAjB;EACA,MAAM;IAAE;EAAF,IAAW,KAAK,CAAC,OAAvB;EACA,MAAM,YAAY,GAAG,eAAe,EAApC;EACA,MAAM,oBAAoB,GAAG,uBAAuB,EAApD;EAEA,KAAK,CAAC,OAAN,CAAc,SAAd,GAA0B,OAAA,CAAA,YAAA,CACxB,OAAA,CAAA,oBAAA,CAAqB,OADG,EAExB,IAAI,KAAK,OAAT,IAAoB,oBAAoB,CAAC,KAFjB,EAGxB,KAAK,CAAC,OAAN,CAAc,SAHU,CAA1B;EAMA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,oBAAA,CAAqB,IADA,EAErB,YAAY,CAAC,IAFQ,EAGrB,YAAY,CAAC,YAHQ,EAIrB,YAAY,CAAC,cAJQ,EAKrB,IAAI,IAAI,YAAY,CAAC,QALA,EAMrB,IAAI,KAAK,OAAT,IAAoB,YAAY,CAAC,KANZ,EAOrB,KAAK,CAAC,IAAN,CAAW,SAPU,CAAvB;EAUA,OAAO,KAAP;AACD,CAvBM;;AAAM,OAAA,CAAA,4BAAA,GAA4B,4BAA5B","sourcesContent":["import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { InfoButtonSlots, InfoButtonState } from './InfoButton.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const infoButtonClassNames: SlotClassNames<InfoButtonSlots> = {\n root: 'fui-InfoButton',\n // this className won't be used, but it's needed to satisfy the type checker\n popover: 'fui-InfoButton__popover',\n content: 'fui-InfoButton__content',\n};\n\n/**\n * Styles for the root slot\n */\nconst useButtonStyles = makeStyles({\n base: {\n alignItems: 'center',\n boxSizing: 'border-box',\n display: 'inline-flex',\n justifyContent: 'center',\n textDecorationLine: 'none',\n verticalAlign: 'middle',\n\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorNeutralForeground2,\n\n ...shorthands.overflow('hidden'),\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorTransparentStroke),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n ...shorthands.margin(0),\n ...shorthands.padding(tokens.spacingVerticalXS, tokens.spacingHorizontalXS),\n\n [`& .${iconFilledClassName}`]: {\n display: 'none',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'inline-flex',\n },\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n color: tokens.colorNeutralForeground2BrandHover,\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline-flex',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n },\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n\n selected: {\n backgroundColor: tokens.colorTransparentBackgroundSelected,\n color: tokens.colorNeutralForeground2BrandSelected,\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline-flex',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n ...shorthands.borderColor('Canvas'),\n color: 'Canvas',\n },\n },\n\n highContrast: {\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('Canvas'),\n color: 'CanvasText',\n\n ':hover, :hover:active': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n ...shorthands.borderColor('Canvas'),\n color: 'Canvas',\n },\n },\n },\n\n focusIndicator: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n outlineColor: tokens.colorTransparentStroke,\n outlineWidth: tokens.strokeWidthThick,\n outlineStyle: 'solid',\n boxShadow: `\n ${tokens.shadow4},\n 0 0 0 2px ${tokens.colorStrokeFocus2}\n `,\n zIndex: 1,\n }),\n\n large: {\n ...shorthands.padding(tokens.spacingVerticalXXS, tokens.spacingVerticalXXS),\n },\n});\n\nconst usePopoverSurfaceStyles = makeStyles({\n smallMedium: typographyStyles.caption1,\n large: typographyStyles.body1,\n});\n\n/**\n * Apply styling to the InfoButton slots based on the state\n */\nexport const useInfoButtonStyles_unstable = (state: InfoButtonState): InfoButtonState => {\n const { size } = state;\n const { open } = state.popover;\n const buttonStyles = useButtonStyles();\n const popoverSurfaceStyles = usePopoverSurfaceStyles();\n\n state.content.className = mergeClasses(\n infoButtonClassNames.content,\n size === 'large' && popoverSurfaceStyles.large,\n state.content.className,\n );\n\n state.root.className = mergeClasses(\n infoButtonClassNames.root,\n buttonStyles.base,\n buttonStyles.highContrast,\n buttonStyles.focusIndicator,\n open && buttonStyles.selected,\n size === 'large' && buttonStyles.large,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}