@fluentui/react-infobutton 9.0.0-beta.99 → 9.0.1-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/CHANGELOG.md +258 -7
  2. package/dist/index.d.cts +175 -0
  3. package/dist/index.d.ts +9 -7
  4. package/lib/InfoButton.js +1 -1
  5. package/lib/InfoButton.js.map +1 -1
  6. package/lib/InfoLabel.js +1 -1
  7. package/lib/InfoLabel.js.map +1 -1
  8. package/lib/components/InfoButton/DefaultInfoButtonIcons.js +1 -1
  9. package/lib/components/InfoButton/DefaultInfoButtonIcons.js.map +1 -1
  10. package/lib/components/InfoButton/InfoButton.js +5 -4
  11. package/lib/components/InfoButton/InfoButton.js.map +1 -1
  12. package/lib/components/InfoButton/InfoButton.types.js +5 -1
  13. package/lib/components/InfoButton/InfoButton.types.js.map +1 -1
  14. package/lib/components/InfoButton/index.js +4 -5
  15. package/lib/components/InfoButton/index.js.map +1 -1
  16. package/lib/components/InfoButton/renderInfoButton.js +3 -3
  17. package/lib/components/InfoButton/renderInfoButton.js.map +1 -1
  18. package/lib/components/InfoButton/useInfoButton.js +9 -8
  19. package/lib/components/InfoButton/useInfoButton.js.map +1 -1
  20. package/lib/components/InfoButton/useInfoButtonStyles.styles.js +55 -42
  21. package/lib/components/InfoButton/useInfoButtonStyles.styles.js.map +1 -1
  22. package/lib/components/InfoButton/useInfoButtonStyles.styles.raw.js +100 -0
  23. package/lib/components/InfoButton/useInfoButtonStyles.styles.raw.js.map +1 -0
  24. package/lib/components/InfoLabel/InfoLabel.js +5 -4
  25. package/lib/components/InfoLabel/InfoLabel.js.map +1 -1
  26. package/lib/components/InfoLabel/InfoLabel.types.js +5 -1
  27. package/lib/components/InfoLabel/InfoLabel.types.js.map +1 -1
  28. package/lib/components/InfoLabel/index.js +4 -5
  29. package/lib/components/InfoLabel/index.js.map +1 -1
  30. package/lib/components/InfoLabel/renderInfoLabel.js +2 -2
  31. package/lib/components/InfoLabel/renderInfoLabel.js.map +1 -1
  32. package/lib/components/InfoLabel/useInfoLabel.js +5 -4
  33. package/lib/components/InfoLabel/useInfoLabel.js.map +1 -1
  34. package/lib/components/InfoLabel/useInfoLabelStyles.styles.js +8 -4
  35. package/lib/components/InfoLabel/useInfoLabelStyles.styles.js.map +1 -1
  36. package/lib/components/InfoLabel/useInfoLabelStyles.styles.raw.js +47 -0
  37. package/lib/components/InfoLabel/useInfoLabelStyles.styles.raw.js.map +1 -0
  38. package/lib/index.js +2 -2
  39. package/lib/index.js.map +1 -1
  40. package/lib-commonjs/InfoButton.cjs +28 -0
  41. package/lib-commonjs/InfoButton.cjs.map +1 -0
  42. package/lib-commonjs/InfoLabel.cjs +28 -0
  43. package/lib-commonjs/InfoLabel.cjs.map +1 -0
  44. package/lib-commonjs/components/InfoButton/DefaultInfoButtonIcons.cjs.map +1 -0
  45. package/lib-commonjs/components/InfoButton/{InfoButton.js → InfoButton.cjs} +5 -4
  46. package/lib-commonjs/components/InfoButton/InfoButton.cjs.map +1 -0
  47. package/lib-commonjs/components/InfoButton/InfoButton.types.cjs +8 -0
  48. package/lib-commonjs/components/InfoButton/InfoButton.types.cjs.map +1 -0
  49. package/lib-commonjs/components/InfoButton/index.cjs +31 -0
  50. package/lib-commonjs/components/InfoButton/index.cjs.map +1 -0
  51. package/lib-commonjs/components/InfoButton/{renderInfoButton.js → renderInfoButton.cjs} +1 -1
  52. package/lib-commonjs/components/InfoButton/renderInfoButton.cjs.map +1 -0
  53. package/lib-commonjs/components/InfoButton/{useInfoButton.js → useInfoButton.cjs} +7 -6
  54. package/lib-commonjs/components/InfoButton/useInfoButton.cjs.map +1 -0
  55. package/lib-commonjs/components/InfoButton/{useInfoButtonStyles.styles.js → useInfoButtonStyles.styles.cjs} +62 -87
  56. package/lib-commonjs/components/InfoButton/useInfoButtonStyles.styles.cjs.map +1 -0
  57. package/lib-commonjs/components/InfoButton/useInfoButtonStyles.styles.raw.cjs +114 -0
  58. package/lib-commonjs/components/InfoButton/useInfoButtonStyles.styles.raw.cjs.map +1 -0
  59. package/lib-commonjs/components/InfoLabel/{InfoLabel.js → InfoLabel.cjs} +5 -4
  60. package/lib-commonjs/components/InfoLabel/InfoLabel.cjs.map +1 -0
  61. package/lib-commonjs/components/InfoLabel/InfoLabel.types.cjs +8 -0
  62. package/lib-commonjs/components/InfoLabel/InfoLabel.types.cjs.map +1 -0
  63. package/lib-commonjs/components/InfoLabel/index.cjs +31 -0
  64. package/lib-commonjs/components/InfoLabel/index.cjs.map +1 -0
  65. package/lib-commonjs/components/InfoLabel/{renderInfoLabel.js → renderInfoLabel.cjs} +1 -1
  66. package/lib-commonjs/components/InfoLabel/renderInfoLabel.cjs.map +1 -0
  67. package/lib-commonjs/components/InfoLabel/{useInfoLabel.js → useInfoLabel.cjs} +3 -2
  68. package/lib-commonjs/components/InfoLabel/useInfoLabel.cjs.map +1 -0
  69. package/lib-commonjs/components/InfoLabel/{useInfoLabelStyles.styles.js → useInfoLabelStyles.styles.cjs} +6 -2
  70. package/lib-commonjs/components/InfoLabel/useInfoLabelStyles.styles.cjs.map +1 -0
  71. package/lib-commonjs/components/InfoLabel/useInfoLabelStyles.styles.raw.cjs +59 -0
  72. package/lib-commonjs/components/InfoLabel/useInfoLabelStyles.styles.raw.cjs.map +1 -0
  73. package/lib-commonjs/{index.js → index.cjs} +12 -12
  74. package/lib-commonjs/index.cjs.map +1 -0
  75. package/package.json +25 -42
  76. package/lib-commonjs/InfoButton.js +0 -6
  77. package/lib-commonjs/InfoButton.js.map +0 -1
  78. package/lib-commonjs/InfoLabel.js +0 -6
  79. package/lib-commonjs/InfoLabel.js.map +0 -1
  80. package/lib-commonjs/components/InfoButton/DefaultInfoButtonIcons.js.map +0 -1
  81. package/lib-commonjs/components/InfoButton/InfoButton.js.map +0 -1
  82. package/lib-commonjs/components/InfoButton/InfoButton.types.js +0 -4
  83. package/lib-commonjs/components/InfoButton/InfoButton.types.js.map +0 -1
  84. package/lib-commonjs/components/InfoButton/index.js +0 -10
  85. package/lib-commonjs/components/InfoButton/index.js.map +0 -1
  86. package/lib-commonjs/components/InfoButton/renderInfoButton.js.map +0 -1
  87. package/lib-commonjs/components/InfoButton/useInfoButton.js.map +0 -1
  88. package/lib-commonjs/components/InfoButton/useInfoButtonStyles.styles.js.map +0 -1
  89. package/lib-commonjs/components/InfoLabel/InfoLabel.js.map +0 -1
  90. package/lib-commonjs/components/InfoLabel/InfoLabel.types.js +0 -4
  91. package/lib-commonjs/components/InfoLabel/InfoLabel.types.js.map +0 -1
  92. package/lib-commonjs/components/InfoLabel/index.js +0 -10
  93. package/lib-commonjs/components/InfoLabel/index.js.map +0 -1
  94. package/lib-commonjs/components/InfoLabel/renderInfoLabel.js.map +0 -1
  95. package/lib-commonjs/components/InfoLabel/useInfoLabel.js.map +0 -1
  96. package/lib-commonjs/components/InfoLabel/useInfoLabelStyles.styles.js.map +0 -1
  97. package/lib-commonjs/index.js.map +0 -1
  98. /package/lib-commonjs/components/InfoButton/{DefaultInfoButtonIcons.js → DefaultInfoButtonIcons.cjs} +0 -0
@@ -0,0 +1,114 @@
1
+ /* eslint-disable @typescript-eslint/no-deprecated */ 'use client';
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ function _export(target, all) {
7
+ for(var name in all)Object.defineProperty(target, name, {
8
+ enumerable: true,
9
+ get: all[name]
10
+ });
11
+ }
12
+ _export(exports, {
13
+ infoButtonClassNames: function() {
14
+ return infoButtonClassNames;
15
+ },
16
+ useInfoButtonStyles_unstable: function() {
17
+ return useInfoButtonStyles_unstable;
18
+ }
19
+ });
20
+ const _reacttabster = require("@fluentui/react-tabster");
21
+ const _reacticons = require("@fluentui/react-icons");
22
+ const _react = require("@griffel/react");
23
+ const _reacttheme = require("@fluentui/react-theme");
24
+ const infoButtonClassNames = {
25
+ root: 'fui-InfoButton',
26
+ // this className won't be used, but it's needed to satisfy the type checker
27
+ popover: 'fui-InfoButton__popover',
28
+ info: 'fui-InfoButton__info'
29
+ };
30
+ /**
31
+ * Styles for the root slot
32
+ *
33
+ * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\@fluentui/react-components` or `\@fluentui/react-infolabel` instead
34
+ */ const useButtonStyles = (0, _react.makeStyles)({
35
+ base: {
36
+ alignItems: 'center',
37
+ boxSizing: 'border-box',
38
+ display: 'inline-flex',
39
+ justifyContent: 'center',
40
+ textDecorationLine: 'none',
41
+ verticalAlign: 'middle',
42
+ position: 'relative',
43
+ backgroundColor: _reacttheme.tokens.colorTransparentBackground,
44
+ color: _reacttheme.tokens.colorNeutralForeground2,
45
+ ..._react.shorthands.borderStyle('none'),
46
+ ..._react.shorthands.borderRadius(_reacttheme.tokens.borderRadiusMedium),
47
+ ..._react.shorthands.margin(0),
48
+ ..._react.shorthands.padding(_reacttheme.tokens.spacingVerticalXS, _reacttheme.tokens.spacingHorizontalXS),
49
+ [`& .${_reacticons.iconFilledClassName}`]: {
50
+ display: 'none'
51
+ },
52
+ [`& .${_reacticons.iconRegularClassName}`]: {
53
+ display: 'inline-flex'
54
+ },
55
+ ':hover': {
56
+ backgroundColor: _reacttheme.tokens.colorTransparentBackgroundHover,
57
+ color: _reacttheme.tokens.colorNeutralForeground2BrandHover,
58
+ cursor: 'pointer',
59
+ [`& .${_reacticons.iconFilledClassName}`]: {
60
+ display: 'inline-flex'
61
+ },
62
+ [`& .${_reacticons.iconRegularClassName}`]: {
63
+ display: 'none'
64
+ }
65
+ },
66
+ ':hover:active': {
67
+ backgroundColor: _reacttheme.tokens.colorTransparentBackgroundPressed,
68
+ color: _reacttheme.tokens.colorNeutralForeground2BrandPressed
69
+ }
70
+ },
71
+ selected: {
72
+ backgroundColor: _reacttheme.tokens.colorTransparentBackgroundSelected,
73
+ color: _reacttheme.tokens.colorNeutralForeground2BrandSelected,
74
+ [`& .${_reacticons.iconFilledClassName}`]: {
75
+ display: 'inline-flex'
76
+ },
77
+ [`& .${_reacticons.iconRegularClassName}`]: {
78
+ display: 'none'
79
+ },
80
+ '@media (forced-colors: active)': {
81
+ backgroundColor: 'Highlight',
82
+ color: 'Canvas'
83
+ }
84
+ },
85
+ highContrast: {
86
+ '@media (forced-colors: active)': {
87
+ color: 'CanvasText',
88
+ ':hover,:hover:active': {
89
+ forcedColorAdjust: 'none',
90
+ backgroundColor: 'Highlight',
91
+ color: 'Canvas'
92
+ }
93
+ }
94
+ },
95
+ focusIndicator: (0, _reacttabster.createFocusOutlineStyle)(),
96
+ large: {
97
+ ..._react.shorthands.padding(_reacttheme.tokens.spacingVerticalXXS, _reacttheme.tokens.spacingVerticalXXS)
98
+ }
99
+ });
100
+ const usePopoverSurfaceStyles = (0, _react.makeStyles)({
101
+ smallMedium: _reacttheme.typographyStyles.caption1,
102
+ large: _reacttheme.typographyStyles.body1
103
+ });
104
+ const useInfoButtonStyles_unstable = (state)=>{
105
+ const { size } = state;
106
+ const { open } = state.popover;
107
+ const buttonStyles = useButtonStyles();
108
+ const popoverSurfaceStyles = usePopoverSurfaceStyles();
109
+ // eslint-disable-next-line react-hooks/immutability -- deprecated component, not worth refactoring
110
+ state.info.className = (0, _react.mergeClasses)(infoButtonClassNames.info, size === 'large' ? popoverSurfaceStyles.large : popoverSurfaceStyles.smallMedium, state.info.className);
111
+ // eslint-disable-next-line react-hooks/immutability -- deprecated component, not worth refactoring
112
+ state.root.className = (0, _react.mergeClasses)(infoButtonClassNames.root, buttonStyles.base, buttonStyles.highContrast, buttonStyles.focusIndicator, open && buttonStyles.selected, size === 'large' && buttonStyles.large, state.root.className);
113
+ return state;
114
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/InfoButton/useInfoButtonStyles.styles.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-deprecated */\n\n'use client';\n\nimport { createFocusOutlineStyle } 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\n/**\n * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\\@fluentui/react-components` or `\\@fluentui/react-infolabel` instead\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 info: 'fui-InfoButton__info',\n};\n\n/**\n * Styles for the root slot\n *\n * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\\@fluentui/react-components` or `\\@fluentui/react-infolabel` instead\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 position: 'relative',\n\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorNeutralForeground2,\n\n ...shorthands.borderStyle('none'),\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 cursor: 'pointer',\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 color: 'Canvas',\n },\n },\n\n highContrast: {\n '@media (forced-colors: active)': {\n color: 'CanvasText',\n\n ':hover,:hover:active': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n color: 'Canvas',\n },\n },\n },\n\n focusIndicator: createFocusOutlineStyle(),\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 // eslint-disable-next-line react-hooks/immutability -- deprecated component, not worth refactoring\n state.info.className = mergeClasses(\n infoButtonClassNames.info,\n size === 'large' ? popoverSurfaceStyles.large : popoverSurfaceStyles.smallMedium,\n state.info.className,\n );\n\n // eslint-disable-next-line react-hooks/immutability -- deprecated component, not worth refactoring\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"],"names":["createFocusOutlineStyle","iconFilledClassName","iconRegularClassName","makeStyles","mergeClasses","shorthands","tokens","typographyStyles","infoButtonClassNames","root","popover","info","useButtonStyles","base","alignItems","boxSizing","display","justifyContent","textDecorationLine","verticalAlign","position","backgroundColor","colorTransparentBackground","color","colorNeutralForeground2","borderStyle","borderRadius","borderRadiusMedium","margin","padding","spacingVerticalXS","spacingHorizontalXS","colorTransparentBackgroundHover","colorNeutralForeground2BrandHover","cursor","colorTransparentBackgroundPressed","colorNeutralForeground2BrandPressed","selected","colorTransparentBackgroundSelected","colorNeutralForeground2BrandSelected","highContrast","forcedColorAdjust","focusIndicator","large","spacingVerticalXXS","usePopoverSurfaceStyles","smallMedium","caption1","body1","useInfoButtonStyles_unstable","state","size","open","buttonStyles","popoverSurfaceStyles","className"],"mappings":"AAAA,mDAAmD,GAEnD;;;;;;;;;;;;IAYaQ,oBAAAA;;;IAmGAyC,4BAAAA;;;;8BA7G2B,0BAA0B;4BACR,wBAAwB;uBAC7B,iBAAiB;4BAC7B,wBAAwB;AAO1D,6BAA8D;IACnExC,MAAM;IACN,4EAA4E;IAC5EC,SAAS;IACTC,MAAM;AACR,EAAE;AAEF;;;;CAIC,GACD,MAAMC,sBAAkBT,iBAAAA,EAAW;IACjCU,MAAM;QACJC,YAAY;QACZC,WAAW;QACXC,SAAS;QACTC,gBAAgB;QAChBC,oBAAoB;QACpBC,eAAe;QACfC,UAAU;QAEVC,iBAAiBf,kBAAAA,CAAOgB,0BAA0B;QAClDC,OAAOjB,kBAAAA,CAAOkB,uBAAuB;QAErC,GAAGnB,iBAAAA,CAAWoB,WAAW,CAAC,OAAO;QACjC,GAAGpB,iBAAAA,CAAWqB,YAAY,CAACpB,kBAAAA,CAAOqB,kBAAkB,CAAC;QACrD,GAAGtB,iBAAAA,CAAWuB,MAAM,CAAC,EAAE;QACvB,GAAGvB,iBAAAA,CAAWwB,OAAO,CAACvB,kBAAAA,CAAOwB,iBAAiB,EAAExB,kBAAAA,CAAOyB,mBAAmB,CAAC;QAE3E,CAAC,CAAC,GAAG,EAAE9B,+BAAAA,EAAqB,CAAC,EAAE;YAC7Be,SAAS;QACX;QACA,CAAC,CAAC,GAAG,EAAEd,gCAAAA,EAAsB,CAAC,EAAE;YAC9Bc,SAAS;QACX;QAEA,UAAU;YACRK,iBAAiBf,kBAAAA,CAAO0B,+BAA+B;YACvDT,OAAOjB,kBAAAA,CAAO2B,iCAAiC;YAC/CC,QAAQ;YAER,CAAC,CAAC,GAAG,EAAEjC,+BAAAA,EAAqB,CAAC,EAAE;gBAC7Be,SAAS;YACX;YACA,CAAC,CAAC,GAAG,EAAEd,gCAAAA,EAAsB,CAAC,EAAE;gBAC9Bc,SAAS;YACX;QACF;QACA,iBAAiB;YACfK,iBAAiBf,kBAAAA,CAAO6B,iCAAiC;YACzDZ,OAAOjB,kBAAAA,CAAO8B,mCAAmC;QACnD;IACF;IAEAC,UAAU;QACRhB,iBAAiBf,kBAAAA,CAAOgC,kCAAkC;QAC1Df,OAAOjB,kBAAAA,CAAOiC,oCAAoC;QAElD,CAAC,CAAC,GAAG,EAAEtC,+BAAAA,EAAqB,CAAC,EAAE;YAC7Be,SAAS;QACX;QACA,CAAC,CAAC,GAAG,EAAEd,gCAAAA,EAAsB,CAAC,EAAE;YAC9Bc,SAAS;QACX;QAEA,kCAAkC;YAChCK,iBAAiB;YACjBE,OAAO;QACT;IACF;IAEAiB,cAAc;QACZ,kCAAkC;YAChCjB,OAAO;YAEP,wBAAwB;gBACtBkB,mBAAmB;gBACnBpB,iBAAiB;gBACjBE,OAAO;YACT;QACF;IACF;IAEAmB,oBAAgB1C,qCAAAA;IAEhB2C,OAAO;QACL,GAAGtC,iBAAAA,CAAWwB,OAAO,CAACvB,kBAAAA,CAAOsC,kBAAkB,EAAEtC,kBAAAA,CAAOsC,kBAAkB,CAAC;IAC7E;AACF;AAEA,MAAMC,8BAA0B1C,iBAAAA,EAAW;IACzC2C,aAAavC,4BAAAA,CAAiBwC,QAAQ;IACtCJ,OAAOpC,4BAAAA,CAAiByC,KAAK;AAC/B;AAKO,qCAAqC,CAACE;IAC3C,MAAM,EAAEC,IAAI,EAAE,GAAGD;IACjB,MAAM,EAAEE,IAAI,EAAE,GAAGF,MAAMxC,OAAO;IAC9B,MAAM2C,eAAezC;IACrB,MAAM0C,uBAAuBT;IAE7B,mGAAmG;IACnGK,MAAMvC,IAAI,CAAC4C,SAAS,OAAGnD,mBAAAA,EACrBI,qBAAqBG,IAAI,EACzBwC,SAAS,UAAUG,qBAAqBX,KAAK,GAAGW,qBAAqBR,WAAW,EAChFI,MAAMvC,IAAI,CAAC4C,SAAS;IAGtB,mGAAmG;IACnGL,MAAMzC,IAAI,CAAC8C,SAAS,OAAGnD,mBAAAA,EACrBI,qBAAqBC,IAAI,EACzB4C,aAAaxC,IAAI,EACjBwC,aAAab,YAAY,EACzBa,aAAaX,cAAc,EAC3BU,QAAQC,aAAahB,QAAQ,EAC7Bc,SAAS,WAAWE,aAAaV,KAAK,EACtCO,MAAMzC,IAAI,CAAC8C,SAAS;IAGtB,OAAOL;AACT,EAAE"}
@@ -1,4 +1,5 @@
1
- /* eslint-disable deprecation/deprecation */ "use strict";
1
+ /* eslint-disable @typescript-eslint/no-deprecated */ 'use client';
2
+ "use strict";
2
3
  Object.defineProperty(exports, "__esModule", {
3
4
  value: true
4
5
  });
@@ -10,9 +11,9 @@ Object.defineProperty(exports, "InfoLabel", {
10
11
  });
11
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
- const _renderInfoLabel = require("./renderInfoLabel");
14
- const _useInfoLabel = require("./useInfoLabel");
15
- const _useInfoLabelStylesstyles = require("./useInfoLabelStyles.styles");
14
+ const _renderInfoLabel = require("./renderInfoLabel.cjs");
15
+ const _useInfoLabel = require("./useInfoLabel.cjs");
16
+ const _useInfoLabelStylesstyles = require("./useInfoLabelStyles.styles.cjs");
16
17
  const InfoLabel = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
17
18
  const state = (0, _useInfoLabel.useInfoLabel_unstable)(props, ref);
18
19
  (0, _useInfoLabelStylesstyles.useInfoLabelStyles_unstable)(state);
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/InfoLabel/InfoLabel.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-deprecated */\n\n'use client';\n\nimport * as React from 'react';\n\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { InfoLabelProps } from './InfoLabel.types';\nimport { renderInfoLabel_unstable } from './renderInfoLabel';\nimport { useInfoLabel_unstable } from './useInfoLabel';\nimport { useInfoLabelStyles_unstable } from './useInfoLabelStyles.styles';\n\n/**\n * InfoLabel component\n *\n * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\\@fluentui/react-components` or `\\@fluentui/react-infolabel` instead\n */\nexport const InfoLabel: ForwardRefComponent<InfoLabelProps> = React.forwardRef((props, ref) => {\n const state = useInfoLabel_unstable(props, ref);\n\n useInfoLabelStyles_unstable(state);\n return renderInfoLabel_unstable(state);\n});\n\nInfoLabel.displayName = 'InfoLabel';\n"],"names":["React","renderInfoLabel_unstable","useInfoLabel_unstable","useInfoLabelStyles_unstable","InfoLabel","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,mDAAmD,GAEnD;;;;;;;;;;;;iEAEuB,QAAQ;iCAIU,uBAAoB;8BACvB,oBAAiB;0CACX,iCAA8B;AAOnE,MAAMI,YAAAA,WAAAA,GAAiDJ,OAAMK,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,YAAQN,mCAAAA,EAAsBI,OAAOC;QAE3CJ,qDAAAA,EAA4BK;IAC5B,WAAOP,yCAAAA,EAAyBO;AAClC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
@@ -0,0 +1,8 @@
1
+ /* eslint-disable @typescript-eslint/no-deprecated */ /**
2
+ * State used in rendering InfoLabel
3
+ *
4
+ * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\@fluentui/react-components` or `\@fluentui/react-infolabel` instead
5
+ */ "use strict";
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/InfoLabel/InfoLabel.types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-deprecated */\nimport type { Label } from '@fluentui/react-label';\nimport type { InfoButton } from '../InfoButton';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { InfoButtonProps } from '../InfoButton';\n\n/**\n * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\\@fluentui/react-components` or `\\@fluentui/react-infolabel` instead\n */\nexport type InfoLabelSlots = {\n root: NonNullable<Slot<'span'>>;\n\n /**\n * The Label component.\n *\n * It is not typically necessary to use this prop. The label text is the child of the `<InfoLabel>`, and other props\n * such as `size` and `required` should be set directly on the `InfoLabel`.\n *\n * This is the PRIMARY slot: all native properties specified directly on `<InfoLabel>` will be applied to this slot,\n * except `className` and `style`, which remain on the root slot.\n */\n label: NonNullable<Slot<typeof Label>>;\n\n /**\n * The InfoButton component.\n *\n * It is not typically necessary to use this prop. The content can be set using the `info` prop of the InfoLabel.\n */\n infoButton: Slot<typeof InfoButton>;\n};\n\n/**\n * InfoLabel Props\n *\n * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\\@fluentui/react-components` or `\\@fluentui/react-infolabel` instead\n */\nexport type InfoLabelProps = ComponentProps<Partial<InfoLabelSlots>, 'label'> & {\n /**\n * The content of the InfoButton's popover.\n */\n info?: InfoButtonProps['info'];\n};\n\n/**\n * State used in rendering InfoLabel\n *\n * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\\@fluentui/react-components` or `\\@fluentui/react-infolabel` instead\n */\nexport type InfoLabelState = ComponentState<InfoLabelSlots> & Pick<InfoLabelProps, 'size'>;\n"],"names":[],"mappings":"AAAA,mDAAmD,GA2CnD;;;;CAIC,GACD,WAA2F"}
@@ -0,0 +1,31 @@
1
+ /* eslint-disable @typescript-eslint/no-deprecated */ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ InfoLabel: function() {
13
+ return _InfoLabel.InfoLabel;
14
+ },
15
+ infoLabelClassNames: function() {
16
+ return _useInfoLabelStylesstyles.infoLabelClassNames;
17
+ },
18
+ renderInfoLabel_unstable: function() {
19
+ return _renderInfoLabel.renderInfoLabel_unstable;
20
+ },
21
+ useInfoLabelStyles_unstable: function() {
22
+ return _useInfoLabelStylesstyles.useInfoLabelStyles_unstable;
23
+ },
24
+ useInfoLabel_unstable: function() {
25
+ return _useInfoLabel.useInfoLabel_unstable;
26
+ }
27
+ });
28
+ const _InfoLabel = require("./InfoLabel.cjs");
29
+ const _renderInfoLabel = require("./renderInfoLabel.cjs");
30
+ const _useInfoLabel = require("./useInfoLabel.cjs");
31
+ const _useInfoLabelStylesstyles = require("./useInfoLabelStyles.styles.cjs");
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/InfoLabel/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-deprecated */\nexport { InfoLabel } from './InfoLabel';\nexport type { InfoLabelProps, InfoLabelSlots, InfoLabelState } from './InfoLabel.types';\nexport { renderInfoLabel_unstable } from './renderInfoLabel';\nexport { useInfoLabel_unstable } from './useInfoLabel';\nexport { infoLabelClassNames, useInfoLabelStyles_unstable } from './useInfoLabelStyles.styles';\n"],"names":["InfoLabel","renderInfoLabel_unstable","useInfoLabel_unstable","infoLabelClassNames","useInfoLabelStyles_unstable"],"mappings":"AAAA,mDAAmD,GACnD;;;;;;;;;;;;eAASA,oBAAS;;;eAITG,6CAAmB;;;eAFnBF,yCAAwB;;;eAEHG,qDAA2B;;;eADhDF,mCAAqB;;;2BAHJ,iBAAc;iCAEC,uBAAoB;8BACvB,oBAAiB;0CACU,iCAA8B"}
@@ -1,4 +1,4 @@
1
- /* eslint-disable deprecation/deprecation */ "use strict";
1
+ /* eslint-disable @typescript-eslint/no-deprecated */ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/InfoLabel/renderInfoLabel.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-deprecated */\n/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport type * as React from 'react';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { InfoLabelSlots, InfoLabelState } from './InfoLabel.types';\n\n/**\n * Render the final JSX of InfoLabel\n *\n * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\\@fluentui/react-components` or `\\@fluentui/react-infolabel` instead\n */\nexport const renderInfoLabel_unstable = (state: InfoLabelState): React.ReactElement => {\n assertSlots<InfoLabelSlots>(state);\n\n return (\n <state.root>\n <state.label />\n {state.infoButton && <state.infoButton />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderInfoLabel_unstable","state","root","label","infoButton"],"mappings":"AAAA,mDAAmD,GACnD,0BAA0B,GAC1B;;;;;;;;;;4BAAA,iCAAiD;gCAGrB,4BAA4B;AAQjD,MAAMC,2BAA2B,CAACC;QACvCF,2BAAAA,EAA4BE;IAE5B,OAAA,WAAA,OACE,gBAAA,EAACA,MAAMC,IAAI,EAAA;;8BACT,eAAA,EAACD,MAAME,KAAK,EAAA,CAAA;YACXF,MAAMG,UAAU,IAAA,WAAA,OAAI,eAAA,EAACH,MAAMG,UAAU,EAAA,CAAA;;;AAG5C,EAAE"}
@@ -1,4 +1,5 @@
1
- /* eslint-disable deprecation/deprecation */ "use strict";
1
+ /* eslint-disable @typescript-eslint/no-deprecated */ 'use client';
2
+ "use strict";
2
3
  Object.defineProperty(exports, "__esModule", {
3
4
  value: true
4
5
  });
@@ -12,7 +13,7 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
12
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
14
  const _reactlabel = require("@fluentui/react-label");
14
15
  const _reactutilities = require("@fluentui/react-utilities");
15
- const _InfoButton = require("../InfoButton/InfoButton");
16
+ const _InfoButton = require("../InfoButton/InfoButton.cjs");
16
17
  const useInfoLabel_unstable = (props, ref)=>{
17
18
  const { root: rootShorthand, label: labelShorthand, infoButton: infoButtonShorthand, info, size, className, style, ...labelProps } = props;
18
19
  const baseId = (0, _reactutilities.useId)('infolabel-');
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/InfoLabel/useInfoLabel.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-deprecated */\n\n'use client';\n\nimport * as React from 'react';\n\nimport { Label } from '@fluentui/react-label';\nimport { mergeCallbacks, useEventCallback, useId, slot } from '@fluentui/react-utilities';\nimport { InfoButton } from '../InfoButton/InfoButton';\nimport type { InfoLabelProps, InfoLabelState } from './InfoLabel.types';\n\n/**\n * Create the state required to render InfoLabel.\n *\n * The returned state can be modified with hooks such as useInfoLabelStyles_unstable,\n * before being passed to renderInfoLabel_unstable.\n *\n * @param props - props from this instance of InfoLabel\n * @param ref - reference to label element of InfoLabel\n *\n * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\\@fluentui/react-components` or `\\@fluentui/react-infolabel` instead\n */\nexport const useInfoLabel_unstable = (props: InfoLabelProps, ref: React.Ref<HTMLLabelElement>): InfoLabelState => {\n const {\n root: rootShorthand,\n label: labelShorthand,\n infoButton: infoButtonShorthand,\n info,\n size,\n className,\n style,\n ...labelProps\n } = props;\n const baseId = useId('infolabel-');\n const [open, setOpen] = React.useState(false);\n\n const root = slot.always(rootShorthand, {\n defaultProps: {\n className,\n style,\n },\n elementType: 'span',\n });\n\n const label = slot.always(labelShorthand, {\n defaultProps: {\n id: baseId + '__label',\n ref,\n size,\n ...labelProps,\n },\n elementType: Label,\n });\n\n const infoButton = slot.optional(infoButtonShorthand, {\n renderByDefault: !!info,\n defaultProps: {\n id: baseId + '__infoButton',\n size,\n info,\n },\n elementType: InfoButton,\n });\n\n const infoButtonPopover = slot.always(infoButton?.popover, {\n elementType: 'div',\n });\n infoButtonPopover.onOpenChange = useEventCallback(\n mergeCallbacks(infoButtonPopover.onOpenChange, (e, data) => {\n setOpen(data.open);\n }),\n );\n\n if (infoButton) {\n infoButton.popover = infoButtonPopover;\n infoButton.info = slot.optional(infoButton?.info, {\n defaultProps: {\n id: baseId + '__info',\n },\n elementType: 'div',\n });\n\n infoButton['aria-labelledby'] ??= `${label.id} ${infoButton.id}`;\n\n if (open) {\n root['aria-owns'] ??= infoButton.info?.id;\n }\n }\n\n return {\n size,\n components: {\n root: 'span',\n label: Label,\n infoButton: InfoButton,\n },\n root,\n label,\n infoButton,\n };\n};\n"],"names":["React","Label","mergeCallbacks","useEventCallback","useId","slot","InfoButton","useInfoLabel_unstable","props","ref","root","rootShorthand","label","labelShorthand","infoButton","infoButtonShorthand","info","size","className","style","labelProps","baseId","open","setOpen","useState","always","defaultProps","elementType","id","optional","renderByDefault","infoButtonPopover","popover","onOpenChange","e","data","components"],"mappings":"AAAA,mDAAmD,GAEnD;;;;;+BAoBaO;;;;;;;iEAlBU,QAAQ;4BAET,wBAAwB;gCACgB,4BAA4B;4BAC/D,8BAA2B;AAc/C,8BAA8B,CAACC,OAAuBC;IAC3D,MAAM,EACJC,MAAMC,aAAa,EACnBC,OAAOC,cAAc,EACrBC,YAAYC,mBAAmB,EAC/BC,IAAI,EACJC,IAAI,EACJC,SAAS,EACTC,KAAK,EACL,GAAGC,YACJ,GAAGZ;IACJ,MAAMa,aAASjB,qBAAAA,EAAM;IACrB,MAAM,CAACkB,MAAMC,QAAQ,GAAGvB,OAAMwB,QAAQ,CAAC;IAEvC,MAAMd,OAAOL,oBAAAA,CAAKoB,MAAM,CAACd,eAAe;QACtCe,cAAc;YACZR;YACAC;QACF;QACAQ,aAAa;IACf;IAEA,MAAMf,QAAQP,oBAAAA,CAAKoB,MAAM,CAACZ,gBAAgB;QACxCa,cAAc;YACZE,IAAIP,SAAS;YACbZ;YACAQ;YACA,GAAGG,UAAU;QACf;QACAO,aAAa1B,iBAAAA;IACf;IAEA,MAAMa,aAAaT,oBAAAA,CAAKwB,QAAQ,CAACd,qBAAqB;QACpDe,iBAAiB,CAAC,CAACd;QACnBU,cAAc;YACZE,IAAIP,SAAS;YACbJ;YACAD;QACF;QACAW,aAAarB,sBAAAA;IACf;IAEA,MAAMyB,oBAAoB1B,oBAAAA,CAAKoB,MAAM,CAACX,eAAAA,QAAAA,eAAAA,KAAAA,IAAAA,KAAAA,IAAAA,WAAYkB,OAAO,EAAE;QACzDL,aAAa;IACf;IACAI,kBAAkBE,YAAY,OAAG9B,gCAAAA,MAC/BD,8BAAAA,EAAe6B,kBAAkBE,YAAY,EAAE,CAACC,GAAGC;QACjDZ,QAAQY,KAAKb,IAAI;IACnB;IAGF,IAAIR,YAAY;YASdA,aAAW;QARXA,WAAWkB,OAAO,GAAGD;QACrBjB,WAAWE,IAAI,GAAGX,oBAAAA,CAAKwB,QAAQ,CAACf,eAAAA,QAAAA,eAAAA,KAAAA,IAAAA,KAAAA,IAAAA,WAAYE,IAAI,EAAE;YAChDU,cAAc;gBACZE,IAAIP,SAAS;YACf;YACAM,aAAa;QACf;;QAEAb,CAAAA,IAAAA,CAAAA,cAAAA,UAAAA,CAAU,CAAC,kBAAA,kBAAA,AAAkB,MAAA,QAAA,MAAA,KAAA,IAAA,IAA7BA,WAAU,CAAC,gBAAkB,GAAK,GAAGF,MAAMgB,EAAE,CAAC,CAAC,EAAEd,WAAWc,EAAE,EAAE;QAEhE,IAAIN,MAAM;gBACcR;gBAAtBJ,OAAK;;YAALA,CAAAA,KAAAA,CAAAA,QAAAA,IAAAA,CAAI,CAAC,YAAA,YAAA,AAAY,MAAA,QAAA,OAAA,KAAA,IAAA,KAAjBA,KAAI,CAAC,UAAY,GAAA,CAAKI,mBAAAA,WAAWE,IAAAA,AAAI,MAAA,QAAfF,qBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,iBAAiBc,EAAE;QAC3C;IACF;IAEA,OAAO;QACLX;QACAmB,YAAY;YACV1B,MAAM;YACNE,OAAOX,iBAAAA;YACPa,YAAYR,sBAAAA;QACd;QACAI;QACAE;QACAE;IACF;AACF,EAAE"}
@@ -1,4 +1,5 @@
1
- /* eslint-disable deprecation/deprecation */ "use strict";
1
+ /* eslint-disable @typescript-eslint/no-deprecated */ 'use client';
2
+ "use strict";
2
3
  Object.defineProperty(exports, "__esModule", {
3
4
  value: true
4
5
  });
@@ -55,12 +56,15 @@ const useInfoButtonStyles = /*#__PURE__*/ (0, _react.__styles)({
55
56
  ]
56
57
  });
57
58
  const useInfoLabelStyles_unstable = (state)=>{
59
+ // eslint-disable-next-line react-hooks/immutability -- deprecated component, not worth refactoring
58
60
  state.root.className = (0, _react.mergeClasses)(infoLabelClassNames.root, state.root.className);
59
61
  const labelStyles = useLabelStyles();
62
+ // eslint-disable-next-line react-hooks/immutability -- deprecated component, not worth refactoring
60
63
  state.label.className = (0, _react.mergeClasses)(infoLabelClassNames.label, labelStyles.base, state.label.className);
61
64
  const infoButtonStyles = useInfoButtonStyles();
62
65
  if (state.infoButton) {
66
+ // eslint-disable-next-line react-hooks/immutability -- deprecated component, not worth refactoring
63
67
  state.infoButton.className = (0, _react.mergeClasses)(infoLabelClassNames.infoButton, infoButtonStyles.base, state.size === 'large' && infoButtonStyles.large, state.infoButton.className);
64
68
  }
65
69
  return state;
66
- }; //# sourceMappingURL=useInfoLabelStyles.styles.js.map
70
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useInfoLabelStyles.styles.js"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-deprecated */ 'use client';\nimport { tokens } from \"@fluentui/react-theme\";\nimport { makeStyles, mergeClasses } from \"@griffel/react\";\n/**\n * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\\@fluentui/react-components` or `\\@fluentui/react-infolabel` instead\n */ export const infoLabelClassNames = {\n root: 'fui-InfoLabel',\n label: 'fui-InfoLabel__label',\n infoButton: 'fui-InfoLabel__infoButton'\n};\nconst useLabelStyles = makeStyles({\n base: {\n verticalAlign: 'top',\n cursor: 'inherit',\n color: 'inherit'\n }\n});\nconst useInfoButtonStyles = makeStyles({\n base: {\n verticalAlign: 'top',\n // Negative margin to align with the text\n marginTop: `calc(0px - ${tokens.spacingVerticalXXS})`,\n marginBottom: `calc(0px - ${tokens.spacingVerticalXXS})`\n },\n large: {\n // Negative margin to align with the text\n marginTop: '-1px',\n marginBottom: '-1px'\n }\n});\n/**\n * Apply styling to the InfoLabel slots based on the state\n *\n * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\\@fluentui/react-components` or `\\@fluentui/react-infolabel` instead\n */ export const useInfoLabelStyles_unstable = (state)=>{\n // eslint-disable-next-line react-hooks/immutability -- deprecated component, not worth refactoring\n state.root.className = mergeClasses(infoLabelClassNames.root, state.root.className);\n const labelStyles = useLabelStyles();\n // eslint-disable-next-line react-hooks/immutability -- deprecated component, not worth refactoring\n state.label.className = mergeClasses(infoLabelClassNames.label, labelStyles.base, state.label.className);\n const infoButtonStyles = useInfoButtonStyles();\n if (state.infoButton) {\n // eslint-disable-next-line react-hooks/immutability -- deprecated component, not worth refactoring\n state.infoButton.className = mergeClasses(infoLabelClassNames.infoButton, infoButtonStyles.base, state.size === 'large' && infoButtonStyles.large, state.infoButton.className);\n }\n return state;\n};\n"],"names":["tokens","__styles","mergeClasses","infoLabelClassNames","root","label","infoButton","useLabelStyles","base","ha4doy","Bceei9c","sj55zd","d","useInfoButtonStyles","B6of3ja","jrapky","large","useInfoLabelStyles_unstable","state","className","labelStyles","infoButtonStyles","size"],"mappings":"AAAA,mDAAA,GAAsD,YAAY;;;;;;;;;;;;uBAK9B;;;+BA6BQ;eAA3BiB;;;uBAhCwB,gBAAgB;AAG9C,MAAMd,sBAAsB;IACnCC,IAAI,EAAE,eAAe;IACrBC,KAAK,EAAE,sBAAsB;IAC7BC,UAAU,EAAE;AAChB,CAAC;AACD,MAAMC,cAAc,GAAA,WAAA,GAAGN,mBAAA,EAAA;IAAAO,IAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;QAAA;KAAA;AAAA,CAMtB,CAAC;AACF,MAAMC,mBAAmB,GAAA,WAAA,OAAGZ,eAAA,EAAA;IAAAO,IAAA,EAAA;QAAAC,MAAA,EAAA;QAAAK,OAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;IAAAC,KAAA,EAAA;QAAAF,OAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;AAAA,GAAA;IAAAH,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA,CAY3B,CAAC;AAKS,qCAAqCM,KAAK,IAAG;IACpD,mGAAA;IACAA,KAAK,CAACd,IAAI,CAACe,SAAS,OAAGjB,mBAAY,EAACC,mBAAmB,CAACC,IAAI,EAAEc,KAAK,CAACd,IAAI,CAACe,SAAS,CAAC;IACnF,MAAMC,WAAW,GAAGb,cAAc,CAAC,CAAC;IACpC,mGAAA;IACAW,KAAK,CAACb,KAAK,CAACc,SAAS,OAAGjB,mBAAY,EAACC,mBAAmB,CAACE,KAAK,EAAEe,WAAW,CAACZ,IAAI,EAAEU,KAAK,CAACb,KAAK,CAACc,SAAS,CAAC;IACxG,MAAME,gBAAgB,GAAGR,mBAAmB,CAAC,CAAC;IAC9C,IAAIK,KAAK,CAACZ,UAAU,EAAE;QAClB,mGAAA;QACAY,KAAK,CAACZ,UAAU,CAACa,SAAS,OAAGjB,mBAAY,EAACC,mBAAmB,CAACG,UAAU,EAAEe,gBAAgB,CAACb,IAAI,EAAEU,KAAK,CAACI,IAAI,KAAK,OAAO,IAAID,gBAAgB,CAACL,KAAK,EAAEE,KAAK,CAACZ,UAAU,CAACa,SAAS,CAAC;IAClL;IACA,OAAOD,KAAK;AAChB,CAAC"}
@@ -0,0 +1,59 @@
1
+ /* eslint-disable @typescript-eslint/no-deprecated */ 'use client';
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ function _export(target, all) {
7
+ for(var name in all)Object.defineProperty(target, name, {
8
+ enumerable: true,
9
+ get: all[name]
10
+ });
11
+ }
12
+ _export(exports, {
13
+ infoLabelClassNames: function() {
14
+ return infoLabelClassNames;
15
+ },
16
+ useInfoLabelStyles_unstable: function() {
17
+ return useInfoLabelStyles_unstable;
18
+ }
19
+ });
20
+ const _reacttheme = require("@fluentui/react-theme");
21
+ const _react = require("@griffel/react");
22
+ const infoLabelClassNames = {
23
+ root: 'fui-InfoLabel',
24
+ label: 'fui-InfoLabel__label',
25
+ infoButton: 'fui-InfoLabel__infoButton'
26
+ };
27
+ const useLabelStyles = (0, _react.makeStyles)({
28
+ base: {
29
+ verticalAlign: 'top',
30
+ cursor: 'inherit',
31
+ color: 'inherit'
32
+ }
33
+ });
34
+ const useInfoButtonStyles = (0, _react.makeStyles)({
35
+ base: {
36
+ verticalAlign: 'top',
37
+ // Negative margin to align with the text
38
+ marginTop: `calc(0px - ${_reacttheme.tokens.spacingVerticalXXS})`,
39
+ marginBottom: `calc(0px - ${_reacttheme.tokens.spacingVerticalXXS})`
40
+ },
41
+ large: {
42
+ // Negative margin to align with the text
43
+ marginTop: '-1px',
44
+ marginBottom: '-1px'
45
+ }
46
+ });
47
+ const useInfoLabelStyles_unstable = (state)=>{
48
+ // eslint-disable-next-line react-hooks/immutability -- deprecated component, not worth refactoring
49
+ state.root.className = (0, _react.mergeClasses)(infoLabelClassNames.root, state.root.className);
50
+ const labelStyles = useLabelStyles();
51
+ // eslint-disable-next-line react-hooks/immutability -- deprecated component, not worth refactoring
52
+ state.label.className = (0, _react.mergeClasses)(infoLabelClassNames.label, labelStyles.base, state.label.className);
53
+ const infoButtonStyles = useInfoButtonStyles();
54
+ if (state.infoButton) {
55
+ // eslint-disable-next-line react-hooks/immutability -- deprecated component, not worth refactoring
56
+ state.infoButton.className = (0, _react.mergeClasses)(infoLabelClassNames.infoButton, infoButtonStyles.base, state.size === 'large' && infoButtonStyles.large, state.infoButton.className);
57
+ }
58
+ return state;
59
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/InfoLabel/useInfoLabelStyles.styles.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-deprecated */\n\n'use client';\n\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { InfoLabelSlots, InfoLabelState } from './InfoLabel.types';\n\n/**\n * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\\@fluentui/react-components` or `\\@fluentui/react-infolabel` instead\n */\nexport const infoLabelClassNames: SlotClassNames<InfoLabelSlots> = {\n root: 'fui-InfoLabel',\n label: 'fui-InfoLabel__label',\n infoButton: 'fui-InfoLabel__infoButton',\n};\n\nconst useLabelStyles = makeStyles({\n base: {\n verticalAlign: 'top',\n cursor: 'inherit',\n color: 'inherit',\n },\n});\n\nconst useInfoButtonStyles = makeStyles({\n base: {\n verticalAlign: 'top',\n\n // Negative margin to align with the text\n marginTop: `calc(0px - ${tokens.spacingVerticalXXS})`,\n marginBottom: `calc(0px - ${tokens.spacingVerticalXXS})`,\n },\n\n large: {\n // Negative margin to align with the text\n marginTop: '-1px',\n marginBottom: '-1px',\n },\n});\n\n/**\n * Apply styling to the InfoLabel slots based on the state\n *\n * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\\@fluentui/react-components` or `\\@fluentui/react-infolabel` instead\n */\nexport const useInfoLabelStyles_unstable = (state: InfoLabelState): InfoLabelState => {\n // eslint-disable-next-line react-hooks/immutability -- deprecated component, not worth refactoring\n state.root.className = mergeClasses(infoLabelClassNames.root, state.root.className);\n\n const labelStyles = useLabelStyles();\n // eslint-disable-next-line react-hooks/immutability -- deprecated component, not worth refactoring\n state.label.className = mergeClasses(infoLabelClassNames.label, labelStyles.base, state.label.className);\n\n const infoButtonStyles = useInfoButtonStyles();\n if (state.infoButton) {\n // eslint-disable-next-line react-hooks/immutability -- deprecated component, not worth refactoring\n state.infoButton.className = mergeClasses(\n infoLabelClassNames.infoButton,\n infoButtonStyles.base,\n state.size === 'large' && infoButtonStyles.large,\n state.infoButton.className,\n );\n }\n\n return state;\n};\n"],"names":["tokens","makeStyles","mergeClasses","infoLabelClassNames","root","label","infoButton","useLabelStyles","base","verticalAlign","cursor","color","useInfoButtonStyles","marginTop","spacingVerticalXXS","marginBottom","large","useInfoLabelStyles_unstable","state","className","labelStyles","infoButtonStyles","size"],"mappings":"AAAA,mDAAmD,GAEnD;;;;;;;;;;;;uBAUaG;;;+BAmCAc;eAAAA;;;4BA3CU,wBAAwB;uBAEN,iBAAiB;AAMnD,MAAMd,sBAAsD;IACjEC,MAAM;IACNC,OAAO;IACPC,YAAY;AACd,EAAE;AAEF,MAAMC,qBAAiBN,iBAAAA,EAAW;IAChCO,MAAM;QACJC,eAAe;QACfC,QAAQ;QACRC,OAAO;IACT;AACF;AAEA,MAAMC,0BAAsBX,iBAAAA,EAAW;IACrCO,MAAM;QACJC,eAAe;QAEf,yCAAyC;QACzCI,WAAW,CAAC,WAAW,EAAEb,kBAAAA,CAAOc,kBAAkB,CAAC,CAAC,CAAC;QACrDC,cAAc,CAAC,WAAW,EAAEf,kBAAAA,CAAOc,kBAAkB,CAAC,CAAC,CAAC;IAC1D;IAEAE,OAAO;QACL,yCAAyC;QACzCH,WAAW;QACXE,cAAc;IAChB;AACF;AAOO,oCAAoC,CAACG;IAC1C,mGAAmG;IACnGA,MAAMd,IAAI,CAACe,SAAS,GAAGjB,uBAAAA,EAAaC,oBAAoBC,IAAI,EAAEc,MAAMd,IAAI,CAACe,SAAS;IAElF,MAAMC,cAAcb;IACpB,mGAAmG;IACnGW,MAAMb,KAAK,CAACc,SAAS,OAAGjB,mBAAAA,EAAaC,oBAAoBE,KAAK,EAAEe,YAAYZ,IAAI,EAAEU,MAAMb,KAAK,CAACc,SAAS;IAEvG,MAAME,mBAAmBT;IACzB,IAAIM,MAAMZ,UAAU,EAAE;QACpB,mGAAmG;QACnGY,MAAMZ,UAAU,CAACa,SAAS,OAAGjB,mBAAAA,EAC3BC,oBAAoBG,UAAU,EAC9Be,iBAAiBb,IAAI,EACrBU,MAAMI,IAAI,KAAK,WAAWD,iBAAiBL,KAAK,EAChDE,MAAMZ,UAAU,CAACa,SAAS;IAE9B;IAEA,OAAOD;AACT,EAAE"}
@@ -1,4 +1,4 @@
1
- /* eslint-disable deprecation/deprecation */ "use strict";
1
+ /* eslint-disable @typescript-eslint/no-deprecated */ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
@@ -12,27 +12,27 @@ _export(exports, {
12
12
  InfoButton: function() {
13
13
  return _InfoButton.InfoButton;
14
14
  },
15
+ InfoLabel: function() {
16
+ return _InfoLabel.InfoLabel;
17
+ },
15
18
  infoButtonClassNames: function() {
16
19
  return _InfoButton.infoButtonClassNames;
17
20
  },
21
+ infoLabelClassNames: function() {
22
+ return _InfoLabel.infoLabelClassNames;
23
+ },
18
24
  renderInfoButton_unstable: function() {
19
25
  return _InfoButton.renderInfoButton_unstable;
20
26
  },
27
+ renderInfoLabel_unstable: function() {
28
+ return _InfoLabel.renderInfoLabel_unstable;
29
+ },
21
30
  useInfoButtonStyles_unstable: function() {
22
31
  return _InfoButton.useInfoButtonStyles_unstable;
23
32
  },
24
33
  useInfoButton_unstable: function() {
25
34
  return _InfoButton.useInfoButton_unstable;
26
35
  },
27
- InfoLabel: function() {
28
- return _InfoLabel.InfoLabel;
29
- },
30
- infoLabelClassNames: function() {
31
- return _InfoLabel.infoLabelClassNames;
32
- },
33
- renderInfoLabel_unstable: function() {
34
- return _InfoLabel.renderInfoLabel_unstable;
35
- },
36
36
  useInfoLabelStyles_unstable: function() {
37
37
  return _InfoLabel.useInfoLabelStyles_unstable;
38
38
  },
@@ -40,5 +40,5 @@ _export(exports, {
40
40
  return _InfoLabel.useInfoLabel_unstable;
41
41
  }
42
42
  });
43
- const _InfoButton = require("./InfoButton");
44
- const _InfoLabel = require("./InfoLabel");
43
+ const _InfoButton = require("./InfoButton.cjs");
44
+ const _InfoLabel = require("./InfoLabel.cjs");
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-deprecated */\nexport {\n InfoButton,\n infoButtonClassNames,\n renderInfoButton_unstable,\n useInfoButtonStyles_unstable,\n useInfoButton_unstable,\n} from './InfoButton';\nexport type { InfoButtonProps, InfoButtonSlots, InfoButtonState } from './InfoButton';\nexport {\n InfoLabel,\n infoLabelClassNames,\n renderInfoLabel_unstable,\n useInfoLabelStyles_unstable,\n useInfoLabel_unstable,\n} from './InfoLabel';\nexport type { InfoLabelProps, InfoLabelSlots, InfoLabelState } from './InfoLabel';\n"],"names":["InfoButton","infoButtonClassNames","renderInfoButton_unstable","useInfoButtonStyles_unstable","useInfoButton_unstable","InfoLabel","infoLabelClassNames","renderInfoLabel_unstable","useInfoLabelStyles_unstable","useInfoLabel_unstable"],"mappings":"AAAA,mDAAmD,GACnD;;;;;;;;;;;;eACEA,sBAAU;;IAQVK;mCAAS;;;eAPTJ,gCAAoB;;uBAQD;eAAnBK;;IAPAJ;oDAAyB;;;eAQzBK,mCAAwB;;;eAPxBJ,wCAA4B;;;eAC5BC,kCAAsB;;;eAOtBI,sCAA2B;;;eAC3BC,gCAAqB;;;4BAPhB,kBAAe;2BAQf,iBAAc"}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@fluentui/react-infobutton",
3
- "version": "9.0.0-beta.99",
3
+ "version": "9.0.1-0",
4
4
  "description": "React components for building web experiences",
5
- "main": "lib-commonjs/index.js",
5
+ "main": "lib-commonjs/index.cjs",
6
6
  "module": "lib/index.js",
7
7
  "typings": "./dist/index.d.ts",
8
8
  "sideEffects": false,
@@ -11,45 +11,22 @@
11
11
  "url": "https://github.com/microsoft/fluentui"
12
12
  },
13
13
  "license": "MIT",
14
- "scripts": {
15
- "build": "just-scripts build",
16
- "bundle-size": "monosize measure",
17
- "clean": "just-scripts clean",
18
- "code-style": "just-scripts code-style",
19
- "just": "just-scripts",
20
- "lint": "just-scripts lint",
21
- "test": "jest --passWithNoTests",
22
- "generate-api": "just-scripts generate-api",
23
- "type-check": "tsc -b tsconfig.json",
24
- "storybook": "start-storybook",
25
- "start": "yarn storybook",
26
- "e2e": "cypress run --component",
27
- "e2e:local": "cypress open --component",
28
- "test-ssr": "test-ssr \"./stories/**/*.stories.tsx\""
29
- },
30
- "devDependencies": {
31
- "@fluentui/eslint-plugin": "*",
32
- "@fluentui/react-conformance": "*",
33
- "@fluentui/react-conformance-griffel": "*",
34
- "@fluentui/scripts-api-extractor": "*",
35
- "@fluentui/scripts-tasks": "*"
36
- },
37
14
  "dependencies": {
38
- "@fluentui/react-icons": "^2.0.224",
39
- "@fluentui/react-label": "^9.1.67",
40
- "@fluentui/react-popover": "^9.9.3",
41
- "@fluentui/react-tabster": "^9.19.6",
42
- "@fluentui/react-theme": "^9.1.19",
43
- "@fluentui/react-utilities": "^9.18.6",
44
- "@fluentui/react-jsx-runtime": "^9.0.35",
45
- "@griffel/react": "^1.5.14",
15
+ "@fluentui/react-icons": "^2.0.237",
16
+ "@fluentui/react-jsx-runtime": "^9.4.5",
17
+ "@fluentui/react-label": "^9.4.4",
18
+ "@fluentui/react-popover": "^9.14.7",
19
+ "@fluentui/react-tabster": "^9.26.17",
20
+ "@fluentui/react-theme": "^9.2.2",
21
+ "@fluentui/react-utilities": "^9.26.6",
22
+ "@griffel/react": "^1.5.32",
46
23
  "@swc/helpers": "^0.5.1"
47
24
  },
48
25
  "peerDependencies": {
49
- "@types/react": ">=16.14.0 <19.0.0",
50
- "@types/react-dom": ">=16.9.0 <19.0.0",
51
- "react": ">=16.14.0 <19.0.0",
52
- "react-dom": ">=16.14.0 <19.0.0"
26
+ "@types/react": ">=16.14.0 <20.0.0",
27
+ "@types/react-dom": ">=16.9.0 <20.0.0",
28
+ "react": ">=16.14.0 <20.0.0",
29
+ "react-dom": ">=16.14.0 <20.0.0"
53
30
  },
54
31
  "beachball": {
55
32
  "disallowedChangeTypes": [
@@ -60,17 +37,23 @@
60
37
  },
61
38
  "exports": {
62
39
  ".": {
63
- "types": "./dist/index.d.ts",
64
- "node": "./lib-commonjs/index.js",
65
- "import": "./lib/index.js",
66
- "require": "./lib-commonjs/index.js"
40
+ "import": {
41
+ "types": "./dist/index.d.ts",
42
+ "default": "./lib/index.js"
43
+ },
44
+ "require": {
45
+ "types": "./dist/index.d.cts",
46
+ "default": "./lib-commonjs/index.cjs"
47
+ }
67
48
  },
68
49
  "./package.json": "./package.json"
69
50
  },
70
51
  "files": [
71
52
  "*.md",
72
53
  "dist/*.d.ts",
54
+ "dist/*.d.cts",
73
55
  "lib",
74
56
  "lib-commonjs"
75
- ]
57
+ ],
58
+ "type": "module"
76
59
  }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./components/InfoButton/index"), exports);
@@ -1 +0,0 @@
1
- {"version":3,"sources":["InfoButton.js"],"sourcesContent":["export * from './components/InfoButton/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./components/InfoLabel/index"), exports);
@@ -1 +0,0 @@
1
- {"version":3,"sources":["InfoLabel.js"],"sourcesContent":["export * from './components/InfoLabel/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["DefaultInfoButtonIcons.js"],"sourcesContent":["import { Info12Regular, Info12Filled, Info16Regular, Info16Filled, Info20Regular, Info20Filled, bundleIcon } from '@fluentui/react-icons';\nexport const DefaultInfoButtonIcon12 = bundleIcon(Info12Filled, Info12Regular);\nexport const DefaultInfoButtonIcon16 = bundleIcon(Info16Filled, Info16Regular);\nexport const DefaultInfoButtonIcon20 = bundleIcon(Info20Filled, Info20Regular);\n"],"names":["DefaultInfoButtonIcon12","DefaultInfoButtonIcon16","DefaultInfoButtonIcon20","bundleIcon","Info12Filled","Info12Regular","Info16Filled","Info16Regular","Info20Filled","Info20Regular"],"mappings":";;;;;;;;;;;IACaA,uBAAuB;eAAvBA;;IACAC,uBAAuB;eAAvBA;;IACAC,uBAAuB;eAAvBA;;;4BAHqG;AAC3G,MAAMF,0BAA0BG,IAAAA,sBAAU,EAACC,wBAAY,EAAEC,yBAAa;AACtE,MAAMJ,0BAA0BE,IAAAA,sBAAU,EAACG,wBAAY,EAAEC,yBAAa;AACtE,MAAML,0BAA0BC,IAAAA,sBAAU,EAACK,wBAAY,EAAEC,yBAAa"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["InfoButton.js"],"sourcesContent":["/* eslint-disable deprecation/deprecation */ import * as React from 'react';\nimport { renderInfoButton_unstable } from './renderInfoButton';\nimport { useInfoButton_unstable } from './useInfoButton';\nimport { useInfoButtonStyles_unstable } from './useInfoButtonStyles.styles';\n/**\n * InfoButtons provide a way to display additional information about a form field or an area in the UI.\n *\n * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\\@fluentui/react-components` or `\\@fluentui/react-infolabel` instead\n */ export const InfoButton = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useInfoButton_unstable(props, ref);\n useInfoButtonStyles_unstable(state);\n return renderInfoButton_unstable(state);\n});\nInfoButton.displayName = 'InfoButton';\n"],"names":["InfoButton","React","forwardRef","props","ref","state","useInfoButton_unstable","useInfoButtonStyles_unstable","renderInfoButton_unstable","displayName"],"mappings":"AAAA,0CAA0C;;;;+BAQzBA;;;eAAAA;;;;iEARmD;kCAC1B;+BACH;2CACM;AAKlC,MAAMA,aAAa,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACjE,MAAMC,QAAQC,IAAAA,qCAAsB,EAACH,OAAOC;IAC5CG,IAAAA,uDAA4B,EAACF;IAC7B,OAAOG,IAAAA,2CAAyB,EAACH;AACrC;AACAL,WAAWS,WAAW,GAAG"}
@@ -1,4 +0,0 @@
1
- /* eslint-disable deprecation/deprecation */ "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
@@ -1 +0,0 @@
1
- {"version":3,"sources":["InfoButton.types.js"],"sourcesContent":["/* eslint-disable deprecation/deprecation */ export { };\n"],"names":[],"mappings":"AAAA,0CAA0C"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./InfoButton"), exports);
7
- _export_star._(require("./InfoButton.types"), exports);
8
- _export_star._(require("./renderInfoButton"), exports);
9
- _export_star._(require("./useInfoButton"), exports);
10
- _export_star._(require("./useInfoButtonStyles.styles"), exports);
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './InfoButton';\nexport * from './InfoButton.types';\nexport * from './renderInfoButton';\nexport * from './useInfoButton';\nexport * from './useInfoButtonStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["renderInfoButton.js"],"sourcesContent":["/* eslint-disable deprecation/deprecation */ import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { PopoverTrigger } from '@fluentui/react-popover';\n/**\n * Render the final JSX of InfoButton\n *\n * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\\@fluentui/react-components` or `\\@fluentui/react-infolabel` instead\n */ export const renderInfoButton_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsxs(state.popover, {\n children: [\n /*#__PURE__*/ _jsx(PopoverTrigger, {\n children: /*#__PURE__*/ _jsx(state.root, {})\n }),\n /*#__PURE__*/ _jsx(state.info, {})\n ]\n });\n};\n"],"names":["renderInfoButton_unstable","state","assertSlots","_jsxs","popover","children","_jsx","PopoverTrigger","root","info"],"mappings":"AAAA,0CAA0C;;;;+BAOzBA;;;eAAAA;;;4BAPyE;gCAC9D;8BACG;AAKpB,MAAMA,4BAA4B,CAACC;IAC1CC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,gBAAK,EAACF,MAAMG,OAAO,EAAE;QACtCC,UAAU;YACN,WAAW,GAAGC,IAAAA,eAAI,EAACC,4BAAc,EAAE;gBAC/BF,UAAU,WAAW,GAAGC,IAAAA,eAAI,EAACL,MAAMO,IAAI,EAAE,CAAC;YAC9C;YACA,WAAW,GAAGF,IAAAA,eAAI,EAACL,MAAMQ,IAAI,EAAE,CAAC;SACnC;IACL;AACJ"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["useInfoButton.js"],"sourcesContent":["/* eslint-disable deprecation/deprecation */ import * as React from 'react';\nimport { DefaultInfoButtonIcon12, DefaultInfoButtonIcon16, DefaultInfoButtonIcon20 } from './DefaultInfoButtonIcons';\nimport { getIntrinsicElementProps, mergeCallbacks, useControllableState, slot, useMergedRefs, isHTMLElement, elementContains } from '@fluentui/react-utilities';\nimport { Popover, PopoverSurface } from '@fluentui/react-popover';\nconst infoButtonIconMap = {\n small: /*#__PURE__*/ React.createElement(DefaultInfoButtonIcon12, null),\n medium: /*#__PURE__*/ React.createElement(DefaultInfoButtonIcon16, null),\n large: /*#__PURE__*/ React.createElement(DefaultInfoButtonIcon20, null)\n};\nconst popoverSizeMap = {\n small: 'small',\n medium: 'small',\n large: 'medium'\n};\n/**\n * Create the state required to render InfoButton.\n *\n * The returned state can be modified with hooks such as useInfoButtonStyles_unstable,\n * before being passed to renderInfoButton_unstable.\n *\n * @param props - props from this instance of InfoButton\n * @param ref - reference to root HTMLElement of InfoButton\n *\n * @deprecated use {@link @fluentui/react-components#InfoLabel} from `\\@fluentui/react-components` or `\\@fluentui/react-infolabel` instead\n */ export const useInfoButton_unstable = (props, ref)=>{\n const { size = 'medium', inline = true } = props;\n const state = {\n inline,\n size,\n components: {\n root: 'button',\n popover: Popover,\n info: PopoverSurface\n },\n root: slot.always(getIntrinsicElementProps('button', {\n children: infoButtonIconMap[size],\n type: 'button',\n 'aria-label': 'information',\n ...props,\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLButtonElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref\n }), {\n elementType: 'button'\n }),\n popover: slot.always(props.popover, {\n defaultProps: {\n inline,\n positioning: 'above-start',\n size: popoverSizeMap[size],\n withArrow: true\n },\n elementType: Popover\n }),\n info: slot.always(props.info, {\n defaultProps: {\n role: 'note',\n tabIndex: -1\n },\n elementType: PopoverSurface\n })\n };\n const [popoverOpen, setPopoverOpen] = useControllableState({\n state: state.popover.open,\n defaultState: state.popover.defaultOpen,\n initialState: false\n });\n state.popover.open = popoverOpen;\n state.popover.onOpenChange = mergeCallbacks(state.popover.onOpenChange, (e, data)=>setPopoverOpen(data.open));\n const focusOutRef = React.useCallback((el)=>{\n if (!el) {\n return;\n }\n el.addEventListener('focusout', (e)=>{\n const nextFocused = e.relatedTarget;\n if (isHTMLElement(nextFocused) && !elementContains(el, nextFocused)) {\n setPopoverOpen(false);\n }\n });\n }, [\n setPopoverOpen\n ]);\n state.info.ref = useMergedRefs(state.info.ref, focusOutRef);\n return state;\n};\n"],"names":["useInfoButton_unstable","infoButtonIconMap","small","React","createElement","DefaultInfoButtonIcon12","medium","DefaultInfoButtonIcon16","large","DefaultInfoButtonIcon20","popoverSizeMap","props","ref","size","inline","state","components","root","popover","Popover","info","PopoverSurface","slot","always","getIntrinsicElementProps","children","type","elementType","defaultProps","positioning","withArrow","role","tabIndex","popoverOpen","setPopoverOpen","useControllableState","open","defaultState","defaultOpen","initialState","onOpenChange","mergeCallbacks","e","data","focusOutRef","useCallback","el","addEventListener","nextFocused","relatedTarget","isHTMLElement","elementContains","useMergedRefs"],"mappings":"AAAA,0CAA0C;;;;+BAwBzBA;;;eAAAA;;;;iEAxBmD;wCACsB;gCAC0C;8BAC5F;AACxC,MAAMC,oBAAoB;IACtBC,OAAO,WAAW,GAAGC,OAAMC,aAAa,CAACC,+CAAuB,EAAE;IAClEC,QAAQ,WAAW,GAAGH,OAAMC,aAAa,CAACG,+CAAuB,EAAE;IACnEC,OAAO,WAAW,GAAGL,OAAMC,aAAa,CAACK,+CAAuB,EAAE;AACtE;AACA,MAAMC,iBAAiB;IACnBR,OAAO;IACPI,QAAQ;IACRE,OAAO;AACX;AAWW,MAAMR,yBAAyB,CAACW,OAAOC;IAC9C,MAAM,EAAEC,OAAO,QAAQ,EAAEC,SAAS,IAAI,EAAE,GAAGH;IAC3C,MAAMI,QAAQ;QACVD;QACAD;QACAG,YAAY;YACRC,MAAM;YACNC,SAASC,qBAAO;YAChBC,MAAMC,4BAAc;QACxB;QACAJ,MAAMK,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAAC,UAAU;YACjDC,UAAUxB,iBAAiB,CAACY,KAAK;YACjCa,MAAM;YACN,cAAc;YACd,GAAGf,KAAK;YACR,SAAS;YACT,+EAA+E;YAC/E,4FAA4F;YAC5FC,KAAKA;QACT,IAAI;YACAe,aAAa;QACjB;QACAT,SAASI,oBAAI,CAACC,MAAM,CAACZ,MAAMO,OAAO,EAAE;YAChCU,cAAc;gBACVd;gBACAe,aAAa;gBACbhB,MAAMH,cAAc,CAACG,KAAK;gBAC1BiB,WAAW;YACf;YACAH,aAAaR,qBAAO;QACxB;QACAC,MAAME,oBAAI,CAACC,MAAM,CAACZ,MAAMS,IAAI,EAAE;YAC1BQ,cAAc;gBACVG,MAAM;gBACNC,UAAU,CAAC;YACf;YACAL,aAAaN,4BAAc;QAC/B;IACJ;IACA,MAAM,CAACY,aAAaC,eAAe,GAAGC,IAAAA,oCAAoB,EAAC;QACvDpB,OAAOA,MAAMG,OAAO,CAACkB,IAAI;QACzBC,cAActB,MAAMG,OAAO,CAACoB,WAAW;QACvCC,cAAc;IAClB;IACAxB,MAAMG,OAAO,CAACkB,IAAI,GAAGH;IACrBlB,MAAMG,OAAO,CAACsB,YAAY,GAAGC,IAAAA,8BAAc,EAAC1B,MAAMG,OAAO,CAACsB,YAAY,EAAE,CAACE,GAAGC,OAAOT,eAAeS,KAAKP,IAAI;IAC3G,MAAMQ,cAAczC,OAAM0C,WAAW,CAAC,CAACC;QACnC,IAAI,CAACA,IAAI;YACL;QACJ;QACAA,GAAGC,gBAAgB,CAAC,YAAY,CAACL;YAC7B,MAAMM,cAAcN,EAAEO,aAAa;YACnC,IAAIC,IAAAA,6BAAa,EAACF,gBAAgB,CAACG,IAAAA,+BAAe,EAACL,IAAIE,cAAc;gBACjEd,eAAe;YACnB;QACJ;IACJ,GAAG;QACCA;KACH;IACDnB,MAAMK,IAAI,CAACR,GAAG,GAAGwC,IAAAA,6BAAa,EAACrC,MAAMK,IAAI,CAACR,GAAG,EAAEgC;IAC/C,OAAO7B;AACX"}