@fluentui/react-infobutton 9.0.0-beta.53 → 9.0.0-beta.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,91 @@
2
2
  "name": "@fluentui/react-infobutton",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 23 Aug 2023 11:58:32 GMT",
5
+ "date": "Tue, 29 Aug 2023 12:53:34 GMT",
6
+ "tag": "@fluentui/react-infobutton_v9.0.0-beta.55",
7
+ "version": "9.0.0-beta.55",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "esteban.230@hotmail.com",
12
+ "package": "@fluentui/react-infobutton",
13
+ "commit": "0e33d8ebd9aecc1efe0cc664288ec433a8878ff8",
14
+ "comment": "fix(react-infobutton): Making InfoButton's PopoverSurface inline by default."
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-infobutton",
19
+ "comment": "Bump @fluentui/react-label to v9.1.30",
20
+ "commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-infobutton",
25
+ "comment": "Bump @fluentui/react-popover to v9.8.0",
26
+ "commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-infobutton",
31
+ "comment": "Bump @fluentui/react-tabster to v9.12.5",
32
+ "commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-infobutton",
37
+ "comment": "Bump @fluentui/react-utilities to v9.13.0",
38
+ "commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-infobutton",
43
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.3",
44
+ "commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
45
+ }
46
+ ]
47
+ }
48
+ },
49
+ {
50
+ "date": "Thu, 24 Aug 2023 10:26:35 GMT",
51
+ "tag": "@fluentui/react-infobutton_v9.0.0-beta.54",
52
+ "version": "9.0.0-beta.54",
53
+ "comments": {
54
+ "prerelease": [
55
+ {
56
+ "author": "beachball",
57
+ "package": "@fluentui/react-infobutton",
58
+ "comment": "Bump @fluentui/react-label to v9.1.29",
59
+ "commit": "3f6c5a749ef403c06b9c9e753df9afbb84a2ecb5"
60
+ },
61
+ {
62
+ "author": "beachball",
63
+ "package": "@fluentui/react-infobutton",
64
+ "comment": "Bump @fluentui/react-popover to v9.7.18",
65
+ "commit": "3f6c5a749ef403c06b9c9e753df9afbb84a2ecb5"
66
+ },
67
+ {
68
+ "author": "beachball",
69
+ "package": "@fluentui/react-infobutton",
70
+ "comment": "Bump @fluentui/react-tabster to v9.12.4",
71
+ "commit": "3f6c5a749ef403c06b9c9e753df9afbb84a2ecb5"
72
+ },
73
+ {
74
+ "author": "beachball",
75
+ "package": "@fluentui/react-infobutton",
76
+ "comment": "Bump @fluentui/react-utilities to v9.12.0",
77
+ "commit": "3f6c5a749ef403c06b9c9e753df9afbb84a2ecb5"
78
+ },
79
+ {
80
+ "author": "beachball",
81
+ "package": "@fluentui/react-infobutton",
82
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.2",
83
+ "commit": "3f6c5a749ef403c06b9c9e753df9afbb84a2ecb5"
84
+ }
85
+ ]
86
+ }
87
+ },
88
+ {
89
+ "date": "Wed, 23 Aug 2023 12:01:49 GMT",
6
90
  "tag": "@fluentui/react-infobutton_v9.0.0-beta.53",
7
91
  "version": "9.0.0-beta.53",
8
92
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,39 @@
1
1
  # Change Log - @fluentui/react-infobutton
2
2
 
3
- This log was last generated on Wed, 23 Aug 2023 11:58:32 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 29 Aug 2023 12:53:34 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0-beta.55](https://github.com/microsoft/fluentui/tree/@fluentui/react-infobutton_v9.0.0-beta.55)
8
+
9
+ Tue, 29 Aug 2023 12:53:34 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-infobutton_v9.0.0-beta.54..@fluentui/react-infobutton_v9.0.0-beta.55)
11
+
12
+ ### Changes
13
+
14
+ - fix(react-infobutton): Making InfoButton's PopoverSurface inline by default. ([PR #28605](https://github.com/microsoft/fluentui/pull/28605) by esteban.230@hotmail.com)
15
+ - Bump @fluentui/react-label to v9.1.30 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
16
+ - Bump @fluentui/react-popover to v9.8.0 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
17
+ - Bump @fluentui/react-tabster to v9.12.5 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
18
+ - Bump @fluentui/react-utilities to v9.13.0 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
19
+ - Bump @fluentui/react-jsx-runtime to v9.0.3 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
20
+
21
+ ## [9.0.0-beta.54](https://github.com/microsoft/fluentui/tree/@fluentui/react-infobutton_v9.0.0-beta.54)
22
+
23
+ Thu, 24 Aug 2023 10:26:35 GMT
24
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-infobutton_v9.0.0-beta.53..@fluentui/react-infobutton_v9.0.0-beta.54)
25
+
26
+ ### Changes
27
+
28
+ - Bump @fluentui/react-label to v9.1.29 ([PR #28973](https://github.com/microsoft/fluentui/pull/28973) by beachball)
29
+ - Bump @fluentui/react-popover to v9.7.18 ([PR #28973](https://github.com/microsoft/fluentui/pull/28973) by beachball)
30
+ - Bump @fluentui/react-tabster to v9.12.4 ([PR #28973](https://github.com/microsoft/fluentui/pull/28973) by beachball)
31
+ - Bump @fluentui/react-utilities to v9.12.0 ([PR #28973](https://github.com/microsoft/fluentui/pull/28973) by beachball)
32
+ - Bump @fluentui/react-jsx-runtime to v9.0.2 ([PR #28973](https://github.com/microsoft/fluentui/pull/28973) by beachball)
33
+
7
34
  ## [9.0.0-beta.53](https://github.com/microsoft/fluentui/tree/@fluentui/react-infobutton_v9.0.0-beta.53)
8
35
 
9
- Wed, 23 Aug 2023 11:58:32 GMT
36
+ Wed, 23 Aug 2023 12:01:49 GMT
10
37
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-infobutton_v9.0.0-beta.52..@fluentui/react-infobutton_v9.0.0-beta.53)
11
38
 
12
39
  ### Changes
package/dist/index.d.ts CHANGED
@@ -27,6 +27,12 @@ export declare type InfoButtonProps = Omit<ComponentProps<Partial<InfoButtonSlot
27
27
  * @default medium
28
28
  */
29
29
  size?: 'small' | 'medium' | 'large';
30
+ /**
31
+ * Whether the InfoButton should be rendered inline or on a Portal.
32
+ *
33
+ * @default true
34
+ */
35
+ inline?: boolean;
30
36
  };
31
37
 
32
38
  export declare type InfoButtonSlots = {
@@ -44,7 +50,7 @@ export declare type InfoButtonSlots = {
44
50
  /**
45
51
  * State used in rendering InfoButton
46
52
  */
47
- export declare type InfoButtonState = ComponentState<InfoButtonSlots> & Required<Pick<InfoButtonProps, 'size'>>;
53
+ export declare type InfoButtonState = ComponentState<InfoButtonSlots> & Required<Pick<InfoButtonProps, 'inline' | 'size'>>;
48
54
 
49
55
  /**
50
56
  * InfoLabel component
@@ -1 +1 @@
1
- {"version":3,"sources":["InfoButton.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { PopoverProps, PopoverSurface } from '@fluentui/react-popover';\n\nexport type InfoButtonSlots = {\n root: NonNullable<Slot<'button'>>;\n\n /**\n * The Popover element that wraps the info and root slots. Use this slot to pass props to the Popover.\n */\n popover: NonNullable<Slot<Partial<PopoverProps>>>;\n\n /**\n * The information to be displayed in the PopoverSurface when the button is pressed.\n */\n info: NonNullable<Slot<typeof PopoverSurface>>;\n};\n\n/**\n * InfoButton Props\n */\nexport type InfoButtonProps = Omit<ComponentProps<Partial<InfoButtonSlots>>, 'disabled'> & {\n /**\n * Size of the InfoButton.\n *\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n};\n\n/**\n * State used in rendering InfoButton\n */\nexport type InfoButtonState = ComponentState<InfoButtonSlots> & Required<Pick<InfoButtonProps, 'size'>>;\n"],"names":[],"mappings":"AAAA,WAgCwG"}
1
+ {"version":3,"sources":["InfoButton.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { PopoverProps, PopoverSurface } from '@fluentui/react-popover';\n\nexport type InfoButtonSlots = {\n root: NonNullable<Slot<'button'>>;\n\n /**\n * The Popover element that wraps the info and root slots. Use this slot to pass props to the Popover.\n */\n popover: NonNullable<Slot<Partial<PopoverProps>>>;\n\n /**\n * The information to be displayed in the PopoverSurface when the button is pressed.\n */\n info: NonNullable<Slot<typeof PopoverSurface>>;\n};\n\n/**\n * InfoButton Props\n */\nexport type InfoButtonProps = Omit<ComponentProps<Partial<InfoButtonSlots>>, 'disabled'> & {\n /**\n * Size of the InfoButton.\n *\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * Whether the InfoButton should be rendered inline or on a Portal.\n *\n * @default true\n */\n inline?: boolean;\n};\n\n/**\n * State used in rendering InfoButton\n */\nexport type InfoButtonState = ComponentState<InfoButtonSlots> & Required<Pick<InfoButtonProps, 'inline' | 'size'>>;\n"],"names":[],"mappings":"AAAA,WAuCmH"}
@@ -21,8 +21,9 @@ const popoverSizeMap = {
21
21
  * @param props - props from this instance of InfoButton
22
22
  * @param ref - reference to root HTMLElement of InfoButton
23
23
  */ export const useInfoButton_unstable = (props, ref)=>{
24
- const { size ='medium' } = props;
24
+ const { size ='medium' , inline =true } = props;
25
25
  const state = {
26
+ inline,
26
27
  size,
27
28
  components: {
28
29
  root: 'button',
@@ -40,6 +41,7 @@ const popoverSizeMap = {
40
41
  }),
41
42
  popover: slot.always(props.popover, {
42
43
  defaultProps: {
44
+ inline,
43
45
  positioning: 'above-start',
44
46
  size: popoverSizeMap[size],
45
47
  withArrow: true
@@ -1 +1 @@
1
- {"version":3,"sources":["useInfoButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { DefaultInfoButtonIcon12, DefaultInfoButtonIcon16, DefaultInfoButtonIcon20 } from './DefaultInfoButtonIcons';\nimport { getNativeElementProps, mergeCallbacks, useControllableState, slot } from '@fluentui/react-utilities';\nimport { Popover, PopoverSurface } from '@fluentui/react-popover';\nimport type { InfoButtonProps, InfoButtonState } from './InfoButton.types';\nimport type { PopoverProps } from '@fluentui/react-popover';\n\nconst infoButtonIconMap = {\n small: <DefaultInfoButtonIcon12 />,\n medium: <DefaultInfoButtonIcon16 />,\n large: <DefaultInfoButtonIcon20 />,\n} as const;\n\nconst popoverSizeMap = {\n small: 'small',\n medium: 'small',\n large: 'medium',\n} as const;\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 */\nexport const useInfoButton_unstable = (props: InfoButtonProps, ref: React.Ref<HTMLElement>): InfoButtonState => {\n const { size = 'medium' } = props;\n\n const state: InfoButtonState = {\n size,\n\n components: {\n root: 'button',\n popover: Popover as React.FC<Partial<PopoverProps>>,\n info: PopoverSurface,\n },\n\n root: slot.always(\n getNativeElementProps('button', {\n children: infoButtonIconMap[size],\n type: 'button',\n 'aria-label': 'information',\n ...props,\n ref,\n }),\n { elementType: 'button' },\n ),\n popover: slot.always(props.popover, {\n defaultProps: {\n positioning: 'above-start',\n size: popoverSizeMap[size],\n withArrow: true,\n },\n elementType: Popover as React.FC<Partial<PopoverProps>>,\n }),\n info: slot.always(props.info, {\n defaultProps: {\n role: 'note',\n tabIndex: -1,\n },\n elementType: PopoverSurface,\n }),\n };\n\n const [popoverOpen, setPopoverOpen] = useControllableState({\n state: state.popover.open,\n defaultState: state.popover.defaultOpen,\n initialState: false,\n });\n\n state.popover.open = popoverOpen;\n state.popover.onOpenChange = mergeCallbacks(state.popover.onOpenChange, (e, data) => setPopoverOpen(data.open));\n\n return state;\n};\n"],"names":["React","DefaultInfoButtonIcon12","DefaultInfoButtonIcon16","DefaultInfoButtonIcon20","getNativeElementProps","mergeCallbacks","useControllableState","slot","Popover","PopoverSurface","infoButtonIconMap","small","medium","large","popoverSizeMap","useInfoButton_unstable","props","ref","size","state","components","root","popover","info","always","children","type","elementType","defaultProps","positioning","withArrow","role","tabIndex","popoverOpen","setPopoverOpen","open","defaultState","defaultOpen","initialState","onOpenChange","e","data"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,uBAAuB,EAAEC,uBAAuB,EAAEC,uBAAuB,QAAQ,2BAA2B;AACrH,SAASC,qBAAqB,EAAEC,cAAc,EAAEC,oBAAoB,EAAEC,IAAI,QAAQ,4BAA4B;AAC9G,SAASC,OAAO,EAAEC,cAAc,QAAQ,0BAA0B;AAIlE,MAAMC,oBAAoB;IACxBC,qBAAO,oBAACV;IACRW,sBAAQ,oBAACV;IACTW,qBAAO,oBAACV;AACV;AAEA,MAAMW,iBAAiB;IACrBH,OAAO;IACPC,QAAQ;IACRC,OAAO;AACT;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAME,yBAAyB,CAACC,OAAwBC,MAAiD;IAC9G,MAAM,EAAEC,MAAO,SAAQ,EAAE,GAAGF;IAE5B,MAAMG,QAAyB;QAC7BD;QAEAE,YAAY;YACVC,MAAM;YACNC,SAASd;YACTe,MAAMd;QACR;QAEAY,MAAMd,KAAKiB,MAAM,CACfpB,sBAAsB,UAAU;YAC9BqB,UAAUf,iBAAiB,CAACQ,KAAK;YACjCQ,MAAM;YACN,cAAc;YACd,GAAGV,KAAK;YACRC;QACF,IACA;YAAEU,aAAa;QAAS;QAE1BL,SAASf,KAAKiB,MAAM,CAACR,MAAMM,OAAO,EAAE;YAClCM,cAAc;gBACZC,aAAa;gBACbX,MAAMJ,cAAc,CAACI,KAAK;gBAC1BY,WAAW,IAAI;YACjB;YACAH,aAAanB;QACf;QACAe,MAAMhB,KAAKiB,MAAM,CAACR,MAAMO,IAAI,EAAE;YAC5BK,cAAc;gBACZG,MAAM;gBACNC,UAAU,CAAC;YACb;YACAL,aAAalB;QACf;IACF;IAEA,MAAM,CAACwB,aAAaC,eAAe,GAAG5B,qBAAqB;QACzDa,OAAOA,MAAMG,OAAO,CAACa,IAAI;QACzBC,cAAcjB,MAAMG,OAAO,CAACe,WAAW;QACvCC,cAAc,KAAK;IACrB;IAEAnB,MAAMG,OAAO,CAACa,IAAI,GAAGF;IACrBd,MAAMG,OAAO,CAACiB,YAAY,GAAGlC,eAAec,MAAMG,OAAO,CAACiB,YAAY,EAAE,CAACC,GAAGC,OAASP,eAAeO,KAAKN,IAAI;IAE7G,OAAOhB;AACT,EAAE"}
1
+ {"version":3,"sources":["useInfoButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { DefaultInfoButtonIcon12, DefaultInfoButtonIcon16, DefaultInfoButtonIcon20 } from './DefaultInfoButtonIcons';\nimport { getNativeElementProps, mergeCallbacks, useControllableState, slot } from '@fluentui/react-utilities';\nimport { Popover, PopoverSurface } from '@fluentui/react-popover';\nimport type { InfoButtonProps, InfoButtonState } from './InfoButton.types';\nimport type { PopoverProps } from '@fluentui/react-popover';\n\nconst infoButtonIconMap = {\n small: <DefaultInfoButtonIcon12 />,\n medium: <DefaultInfoButtonIcon16 />,\n large: <DefaultInfoButtonIcon20 />,\n} as const;\n\nconst popoverSizeMap = {\n small: 'small',\n medium: 'small',\n large: 'medium',\n} as const;\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 */\nexport const useInfoButton_unstable = (props: InfoButtonProps, ref: React.Ref<HTMLElement>): InfoButtonState => {\n const { size = 'medium', inline = true } = props;\n\n const state: InfoButtonState = {\n inline,\n size,\n\n components: {\n root: 'button',\n popover: Popover as React.FC<Partial<PopoverProps>>,\n info: PopoverSurface,\n },\n\n root: slot.always(\n getNativeElementProps('button', {\n children: infoButtonIconMap[size],\n type: 'button',\n 'aria-label': 'information',\n ...props,\n 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 as React.FC<Partial<PopoverProps>>,\n }),\n info: slot.always(props.info, {\n defaultProps: {\n role: 'note',\n tabIndex: -1,\n },\n elementType: PopoverSurface,\n }),\n };\n\n const [popoverOpen, setPopoverOpen] = useControllableState({\n state: state.popover.open,\n defaultState: state.popover.defaultOpen,\n initialState: false,\n });\n\n state.popover.open = popoverOpen;\n state.popover.onOpenChange = mergeCallbacks(state.popover.onOpenChange, (e, data) => setPopoverOpen(data.open));\n\n return state;\n};\n"],"names":["React","DefaultInfoButtonIcon12","DefaultInfoButtonIcon16","DefaultInfoButtonIcon20","getNativeElementProps","mergeCallbacks","useControllableState","slot","Popover","PopoverSurface","infoButtonIconMap","small","medium","large","popoverSizeMap","useInfoButton_unstable","props","ref","size","inline","state","components","root","popover","info","always","children","type","elementType","defaultProps","positioning","withArrow","role","tabIndex","popoverOpen","setPopoverOpen","open","defaultState","defaultOpen","initialState","onOpenChange","e","data"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,uBAAuB,EAAEC,uBAAuB,EAAEC,uBAAuB,QAAQ,2BAA2B;AACrH,SAASC,qBAAqB,EAAEC,cAAc,EAAEC,oBAAoB,EAAEC,IAAI,QAAQ,4BAA4B;AAC9G,SAASC,OAAO,EAAEC,cAAc,QAAQ,0BAA0B;AAIlE,MAAMC,oBAAoB;IACxBC,qBAAO,oBAACV;IACRW,sBAAQ,oBAACV;IACTW,qBAAO,oBAACV;AACV;AAEA,MAAMW,iBAAiB;IACrBH,OAAO;IACPC,QAAQ;IACRC,OAAO;AACT;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAME,yBAAyB,CAACC,OAAwBC,MAAiD;IAC9G,MAAM,EAAEC,MAAO,SAAQ,EAAEC,QAAS,IAAI,CAAA,EAAE,GAAGH;IAE3C,MAAMI,QAAyB;QAC7BD;QACAD;QAEAG,YAAY;YACVC,MAAM;YACNC,SAASf;YACTgB,MAAMf;QACR;QAEAa,MAAMf,KAAKkB,MAAM,CACfrB,sBAAsB,UAAU;YAC9BsB,UAAUhB,iBAAiB,CAACQ,KAAK;YACjCS,MAAM;YACN,cAAc;YACd,GAAGX,KAAK;YACRC;QACF,IACA;YAAEW,aAAa;QAAS;QAE1BL,SAAShB,KAAKkB,MAAM,CAACT,MAAMO,OAAO,EAAE;YAClCM,cAAc;gBACZV;gBACAW,aAAa;gBACbZ,MAAMJ,cAAc,CAACI,KAAK;gBAC1Ba,WAAW,IAAI;YACjB;YACAH,aAAapB;QACf;QACAgB,MAAMjB,KAAKkB,MAAM,CAACT,MAAMQ,IAAI,EAAE;YAC5BK,cAAc;gBACZG,MAAM;gBACNC,UAAU,CAAC;YACb;YACAL,aAAanB;QACf;IACF;IAEA,MAAM,CAACyB,aAAaC,eAAe,GAAG7B,qBAAqB;QACzDc,OAAOA,MAAMG,OAAO,CAACa,IAAI;QACzBC,cAAcjB,MAAMG,OAAO,CAACe,WAAW;QACvCC,cAAc,KAAK;IACrB;IAEAnB,MAAMG,OAAO,CAACa,IAAI,GAAGF;IACrBd,MAAMG,OAAO,CAACiB,YAAY,GAAGnC,eAAee,MAAMG,OAAO,CAACiB,YAAY,EAAE,CAACC,GAAGC,OAASP,eAAeO,KAAKN,IAAI;IAE7G,OAAOhB;AACT,EAAE"}
@@ -22,8 +22,9 @@ const popoverSizeMap = {
22
22
  large: 'medium'
23
23
  };
24
24
  const useInfoButton_unstable = (props, ref)=>{
25
- const { size ='medium' } = props;
25
+ const { size ='medium' , inline =true } = props;
26
26
  const state = {
27
+ inline,
27
28
  size,
28
29
  components: {
29
30
  root: 'button',
@@ -41,6 +42,7 @@ const useInfoButton_unstable = (props, ref)=>{
41
42
  }),
42
43
  popover: _reactUtilities.slot.always(props.popover, {
43
44
  defaultProps: {
45
+ inline,
44
46
  positioning: 'above-start',
45
47
  size: popoverSizeMap[size],
46
48
  withArrow: true
@@ -1 +1 @@
1
- {"version":3,"sources":["useInfoButton.js"],"sourcesContent":["import * as React from 'react';\nimport { DefaultInfoButtonIcon12, DefaultInfoButtonIcon16, DefaultInfoButtonIcon20 } from './DefaultInfoButtonIcons';\nimport { getNativeElementProps, mergeCallbacks, useControllableState, slot } 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 */ export const useInfoButton_unstable = (props, ref)=>{\n const { size ='medium' } = props;\n const state = {\n size,\n components: {\n root: 'button',\n popover: Popover,\n info: PopoverSurface\n },\n root: slot.always(getNativeElementProps('button', {\n children: infoButtonIconMap[size],\n type: 'button',\n 'aria-label': 'information',\n ...props,\n ref\n }), {\n elementType: 'button'\n }),\n popover: slot.always(props.popover, {\n defaultProps: {\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 return state;\n};\n"],"names":["useInfoButton_unstable","infoButtonIconMap","small","React","createElement","DefaultInfoButtonIcon12","medium","DefaultInfoButtonIcon16","large","DefaultInfoButtonIcon20","popoverSizeMap","props","ref","size","state","components","root","popover","Popover","info","PopoverSurface","slot","always","getNativeElementProps","children","type","elementType","defaultProps","positioning","withArrow","role","tabIndex","popoverOpen","setPopoverOpen","useControllableState","open","defaultState","defaultOpen","initialState","onOpenChange","mergeCallbacks","e","data"],"mappings":";;;;+BAsBiBA;;aAAAA;;;6DAtBM;wCACmE;gCACR;8BAC1C;AACxC,MAAMC,oBAAoB;IACtBC,OAAO,WAAW,GAAGC,OAAMC,aAAa,CAACC,+CAAuB,EAAE,IAAI;IACtEC,QAAQ,WAAW,GAAGH,OAAMC,aAAa,CAACG,+CAAuB,EAAE,IAAI;IACvEC,OAAO,WAAW,GAAGL,OAAMC,aAAa,CAACK,+CAAuB,EAAE,IAAI;AAC1E;AACA,MAAMC,iBAAiB;IACnBR,OAAO;IACPI,QAAQ;IACRE,OAAO;AACX;AASW,MAAMR,yBAAyB,CAACW,OAAOC,MAAM;IACpD,MAAM,EAAEC,MAAM,SAAQ,EAAG,GAAGF;IAC5B,MAAMG,QAAQ;QACVD;QACAE,YAAY;YACRC,MAAM;YACNC,SAASC,qBAAO;YAChBC,MAAMC,4BAAc;QACxB;QACAJ,MAAMK,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAAC,UAAU;YAC9CC,UAAUvB,iBAAiB,CAACY,KAAK;YACjCY,MAAM;YACN,cAAc;YACd,GAAGd,KAAK;YACRC;QACJ,IAAI;YACAc,aAAa;QACjB;QACAT,SAASI,oBAAI,CAACC,MAAM,CAACX,MAAMM,OAAO,EAAE;YAChCU,cAAc;gBACVC,aAAa;gBACbf,MAAMH,cAAc,CAACG,KAAK;gBAC1BgB,WAAW,IAAI;YACnB;YACAH,aAAaR,qBAAO;QACxB;QACAC,MAAME,oBAAI,CAACC,MAAM,CAACX,MAAMQ,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,KAAK;IACvB;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,OAAOrB;AACX"}
1
+ {"version":3,"sources":["useInfoButton.js"],"sourcesContent":["import * as React from 'react';\nimport { DefaultInfoButtonIcon12, DefaultInfoButtonIcon16, DefaultInfoButtonIcon20 } from './DefaultInfoButtonIcons';\nimport { getNativeElementProps, mergeCallbacks, useControllableState, slot } 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 */ 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(getNativeElementProps('button', {\n children: infoButtonIconMap[size],\n type: 'button',\n 'aria-label': 'information',\n ...props,\n 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 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","getNativeElementProps","children","type","elementType","defaultProps","positioning","withArrow","role","tabIndex","popoverOpen","setPopoverOpen","useControllableState","open","defaultState","defaultOpen","initialState","onOpenChange","mergeCallbacks","e","data"],"mappings":";;;;+BAsBiBA;;aAAAA;;;6DAtBM;wCACmE;gCACR;8BAC1C;AACxC,MAAMC,oBAAoB;IACtBC,OAAO,WAAW,GAAGC,OAAMC,aAAa,CAACC,+CAAuB,EAAE,IAAI;IACtEC,QAAQ,WAAW,GAAGH,OAAMC,aAAa,CAACG,+CAAuB,EAAE,IAAI;IACvEC,OAAO,WAAW,GAAGL,OAAMC,aAAa,CAACK,+CAAuB,EAAE,IAAI;AAC1E;AACA,MAAMC,iBAAiB;IACnBR,OAAO;IACPI,QAAQ;IACRE,OAAO;AACX;AASW,MAAMR,yBAAyB,CAACW,OAAOC,MAAM;IACpD,MAAM,EAAEC,MAAM,SAAQ,EAAGC,QAAQ,IAAI,CAAA,EAAG,GAAGH;IAC3C,MAAMI,QAAQ;QACVD;QACAD;QACAG,YAAY;YACRC,MAAM;YACNC,SAASC,qBAAO;YAChBC,MAAMC,4BAAc;QACxB;QACAJ,MAAMK,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAAC,UAAU;YAC9CC,UAAUxB,iBAAiB,CAACY,KAAK;YACjCa,MAAM;YACN,cAAc;YACd,GAAGf,KAAK;YACRC;QACJ,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,IAAI;YACnB;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,KAAK;IACvB;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,OAAOrB;AACX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-infobutton",
3
- "version": "9.0.0-beta.53",
3
+ "version": "9.0.0-beta.55",
4
4
  "description": "React components for building web experiences",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -34,12 +34,12 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@fluentui/react-icons": "^2.0.207",
37
- "@fluentui/react-label": "^9.1.28",
38
- "@fluentui/react-popover": "^9.7.17",
39
- "@fluentui/react-tabster": "^9.12.3",
37
+ "@fluentui/react-label": "^9.1.30",
38
+ "@fluentui/react-popover": "^9.8.0",
39
+ "@fluentui/react-tabster": "^9.12.5",
40
40
  "@fluentui/react-theme": "^9.1.11",
41
- "@fluentui/react-utilities": "^9.11.2",
42
- "@fluentui/react-jsx-runtime": "^9.0.1",
41
+ "@fluentui/react-utilities": "^9.13.0",
42
+ "@fluentui/react-jsx-runtime": "^9.0.3",
43
43
  "@griffel/react": "^1.5.14",
44
44
  "@swc/helpers": "^0.4.14"
45
45
  },