@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.
- package/CHANGELOG.json +1255 -1
- package/CHANGELOG.md +436 -2
- package/dist/index.d.ts +152 -4
- package/lib/InfoButton.js +0 -1
- package/lib/InfoButton.js.map +1 -1
- package/lib/InfoIcon.js +1 -0
- package/lib/InfoIcon.js.map +1 -0
- package/lib/InfoIconLabel.js +1 -0
- package/lib/InfoIconLabel.js.map +1 -0
- package/lib/InfoLabel.js +1 -0
- package/lib/InfoLabel.js.map +1 -0
- package/lib/components/InfoButton/DefaultInfoButtonIcons.js +3 -4
- package/lib/components/InfoButton/DefaultInfoButtonIcons.js.map +1 -1
- package/lib/components/InfoButton/InfoButton.js +5 -8
- package/lib/components/InfoButton/InfoButton.js.map +1 -1
- package/lib/components/InfoButton/InfoButton.types.js +1 -2
- package/lib/components/InfoButton/InfoButton.types.js.map +1 -1
- package/lib/components/InfoButton/index.js +1 -2
- package/lib/components/InfoButton/index.js.map +1 -1
- package/lib/components/InfoButton/renderInfoButton.js +5 -14
- package/lib/components/InfoButton/renderInfoButton.js.map +1 -1
- package/lib/components/InfoButton/useInfoButton.js +46 -50
- package/lib/components/InfoButton/useInfoButton.js.map +1 -1
- package/lib/components/InfoButton/useInfoButtonStyles.styles.js +153 -0
- package/lib/components/InfoButton/useInfoButtonStyles.styles.js.map +1 -0
- package/lib/components/InfoIcon/InfoIcon.js +12 -0
- package/lib/components/InfoIcon/InfoIcon.js.map +1 -0
- package/lib/components/InfoIcon/InfoIcon.types.js +2 -0
- package/lib/components/InfoIcon/InfoIcon.types.js.map +1 -0
- package/lib/components/InfoIcon/index.js +5 -0
- package/lib/components/InfoIcon/index.js.map +1 -0
- package/lib/components/InfoIcon/renderInfoIcon.js +9 -0
- package/lib/components/InfoIcon/renderInfoIcon.js.map +1 -0
- package/lib/components/InfoIcon/useInfoIcon.js +25 -0
- package/lib/components/InfoIcon/useInfoIcon.js.map +1 -0
- package/lib/components/InfoIcon/useInfoIconStyles.styles.js +21 -0
- package/lib/components/InfoIcon/useInfoIconStyles.styles.js.map +1 -0
- package/lib/components/InfoIconLabel/InfoIconLabel.js +12 -0
- package/lib/components/InfoIconLabel/InfoIconLabel.js.map +1 -0
- package/lib/components/InfoIconLabel/InfoIconLabel.types.js +2 -0
- package/lib/components/InfoIconLabel/InfoIconLabel.types.js.map +1 -0
- package/lib/components/InfoIconLabel/index.js +5 -0
- package/lib/components/InfoIconLabel/index.js.map +1 -0
- package/lib/components/InfoIconLabel/renderInfoIconLabel.js +9 -0
- package/lib/components/InfoIconLabel/renderInfoIconLabel.js.map +1 -0
- package/lib/components/InfoIconLabel/useInfoIconLabel.js +25 -0
- package/lib/components/InfoIconLabel/useInfoIconLabel.js.map +1 -0
- package/lib/components/InfoIconLabel/useInfoIconLabelStyles.styles.js +21 -0
- package/lib/components/InfoIconLabel/useInfoIconLabelStyles.styles.js.map +1 -0
- package/lib/components/InfoLabel/InfoLabel.js +12 -0
- package/lib/components/InfoLabel/InfoLabel.js.map +1 -0
- package/lib/components/InfoLabel/InfoLabel.types.js +1 -0
- package/lib/components/InfoLabel/InfoLabel.types.js.map +1 -0
- package/lib/components/InfoLabel/index.js +5 -0
- package/lib/components/InfoLabel/index.js.map +1 -0
- package/lib/components/InfoLabel/renderInfoLabel.js +8 -0
- package/lib/components/InfoLabel/renderInfoLabel.js.map +1 -0
- package/lib/components/InfoLabel/useInfoLabel.js +64 -0
- package/lib/components/InfoLabel/useInfoLabel.js.map +1 -0
- package/lib/components/InfoLabel/useInfoLabelStyles.styles.js +43 -0
- package/lib/components/InfoLabel/useInfoLabelStyles.styles.js.map +1 -0
- package/lib/index.js +3 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/InfoButton.js +3 -7
- package/lib-commonjs/InfoButton.js.map +1 -1
- package/lib-commonjs/InfoIcon.js +6 -0
- package/lib-commonjs/InfoIcon.js.map +1 -0
- package/lib-commonjs/InfoIconLabel.js +6 -0
- package/lib-commonjs/InfoIconLabel.js.map +1 -0
- package/lib-commonjs/InfoLabel.js +6 -0
- package/lib-commonjs/InfoLabel.js.map +1 -0
- package/lib-commonjs/components/InfoButton/DefaultInfoButtonIcons.js +16 -10
- package/lib-commonjs/components/InfoButton/DefaultInfoButtonIcons.js.map +1 -1
- package/lib-commonjs/components/InfoButton/InfoButton.js +15 -22
- package/lib-commonjs/components/InfoButton/InfoButton.js.map +1 -1
- package/lib-commonjs/components/InfoButton/InfoButton.types.js +1 -3
- package/lib-commonjs/components/InfoButton/InfoButton.types.js.map +1 -1
- package/lib-commonjs/components/InfoButton/index.js +7 -15
- package/lib-commonjs/components/InfoButton/index.js.map +1 -1
- package/lib-commonjs/components/InfoButton/renderInfoButton.js +12 -27
- package/lib-commonjs/components/InfoButton/renderInfoButton.js.map +1 -1
- package/lib-commonjs/components/InfoButton/useInfoButton.js +56 -74
- package/lib-commonjs/components/InfoButton/useInfoButton.js.map +1 -1
- package/lib-commonjs/components/InfoButton/useInfoButtonStyles.styles.js +340 -0
- package/lib-commonjs/components/InfoButton/useInfoButtonStyles.styles.js.map +1 -0
- package/lib-commonjs/components/InfoIcon/InfoIcon.js +19 -0
- package/lib-commonjs/components/InfoIcon/InfoIcon.js.map +1 -0
- package/lib-commonjs/components/InfoIcon/InfoIcon.types.js +6 -0
- package/lib-commonjs/components/InfoIcon/InfoIcon.types.js.map +1 -0
- package/lib-commonjs/components/InfoIcon/index.js +10 -0
- package/lib-commonjs/components/InfoIcon/index.js.map +1 -0
- package/lib-commonjs/components/InfoIcon/renderInfoIcon.js +15 -0
- package/lib-commonjs/components/InfoIcon/renderInfoIcon.js.map +1 -0
- package/lib-commonjs/components/InfoIcon/useInfoIcon.js +26 -0
- package/lib-commonjs/components/InfoIcon/useInfoIcon.js.map +1 -0
- package/lib-commonjs/components/InfoIcon/useInfoIconStyles.styles.js +30 -0
- package/lib-commonjs/components/InfoIcon/useInfoIconStyles.styles.js.map +1 -0
- package/lib-commonjs/components/InfoIconLabel/InfoIconLabel.js +19 -0
- package/lib-commonjs/components/InfoIconLabel/InfoIconLabel.js.map +1 -0
- package/lib-commonjs/components/InfoIconLabel/InfoIconLabel.types.js +6 -0
- package/lib-commonjs/components/InfoIconLabel/InfoIconLabel.types.js.map +1 -0
- package/lib-commonjs/components/InfoIconLabel/index.js +10 -0
- package/lib-commonjs/components/InfoIconLabel/index.js.map +1 -0
- package/lib-commonjs/components/InfoIconLabel/renderInfoIconLabel.js +15 -0
- package/lib-commonjs/components/InfoIconLabel/renderInfoIconLabel.js.map +1 -0
- package/lib-commonjs/components/InfoIconLabel/useInfoIconLabel.js +26 -0
- package/lib-commonjs/components/InfoIconLabel/useInfoIconLabel.js.map +1 -0
- package/lib-commonjs/components/InfoIconLabel/useInfoIconLabelStyles.styles.js +30 -0
- package/lib-commonjs/components/InfoIconLabel/useInfoIconLabelStyles.styles.js.map +1 -0
- package/lib-commonjs/components/InfoLabel/InfoLabel.js +19 -0
- package/lib-commonjs/components/InfoLabel/InfoLabel.js.map +1 -0
- package/lib-commonjs/components/InfoLabel/InfoLabel.types.js +4 -0
- package/lib-commonjs/components/InfoLabel/InfoLabel.types.js.map +1 -0
- package/lib-commonjs/components/InfoLabel/index.js +10 -0
- package/lib-commonjs/components/InfoLabel/index.js.map +1 -0
- package/lib-commonjs/components/InfoLabel/renderInfoLabel.js +14 -0
- package/lib-commonjs/components/InfoLabel/renderInfoLabel.js.map +1 -0
- package/lib-commonjs/components/InfoLabel/useInfoLabel.js +65 -0
- package/lib-commonjs/components/InfoLabel/useInfoLabel.js.map +1 -0
- package/lib-commonjs/components/InfoLabel/useInfoLabelStyles.styles.js +62 -0
- package/lib-commonjs/components/InfoLabel/useInfoLabelStyles.styles.js.map +1 -0
- package/lib-commonjs/index.js +32 -36
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +17 -12
- package/Spec.md +0 -143
- package/lib/components/InfoButton/useInfoButtonStyles.js +0 -187
- package/lib/components/InfoButton/useInfoButtonStyles.js.map +0 -1
- package/lib-commonjs/components/InfoButton/useInfoButtonStyles.js +0 -200
- package/lib-commonjs/components/InfoButton/useInfoButtonStyles.js.map +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
|
|
2
|
+
import { getSlotsNext } from '@fluentui/react-utilities';
|
|
3
|
+
/**
|
|
4
|
+
* Render the final JSX of InfoIconLabel
|
|
5
|
+
*/ export const renderInfoIconLabel_unstable = (state)=>{
|
|
6
|
+
const { slots , slotProps } = getSlotsNext(state);
|
|
7
|
+
// TODO Add additional slots in the appropriate place
|
|
8
|
+
return /*#__PURE__*/ createElement(slots.root, slotProps.root);
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["renderInfoIconLabel.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { InfoIconLabelState, InfoIconLabelSlots } from './InfoIconLabel.types';\n\n/**\n * Render the final JSX of InfoIconLabel\n */\nexport const renderInfoIconLabel_unstable = (state: InfoIconLabelState) => {\n const { slots, slotProps } = getSlotsNext<InfoIconLabelSlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"names":["createElement","getSlotsNext","renderInfoIconLabel_unstable","state","slots","slotProps","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,YAAY,QAAQ,4BAA4B;AAGzD;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAACC,QAA8B;IACzE,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,aAAiCE;IAE9D,qDAAqD;IACrD,qBAAO,AAbT,cAaUC,MAAME,IAAI,EAAKD,UAAUC,IAAI;AACvC,EAAE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { getNativeElementProps } from '@fluentui/react-utilities';
|
|
3
|
+
/**
|
|
4
|
+
* Create the state required to render InfoIconLabel.
|
|
5
|
+
*
|
|
6
|
+
* The returned state can be modified with hooks such as useInfoIconLabelStyles_unstable,
|
|
7
|
+
* before being passed to renderInfoIconLabel_unstable.
|
|
8
|
+
*
|
|
9
|
+
* @param props - props from this instance of InfoIconLabel
|
|
10
|
+
* @param ref - reference to root HTMLElement of InfoIconLabel
|
|
11
|
+
*/ export const useInfoIconLabel_unstable = (props, ref)=>{
|
|
12
|
+
return {
|
|
13
|
+
// TODO add appropriate props/defaults
|
|
14
|
+
components: {
|
|
15
|
+
// TODO add each slot's element type or component
|
|
16
|
+
root: 'div'
|
|
17
|
+
},
|
|
18
|
+
// TODO add appropriate slots, for example:
|
|
19
|
+
// mySlot: resolveShorthand(props.mySlot),
|
|
20
|
+
root: getNativeElementProps('div', {
|
|
21
|
+
ref,
|
|
22
|
+
...props
|
|
23
|
+
})
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useInfoIconLabel.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { InfoIconLabelProps, InfoIconLabelState } from './InfoIconLabel.types';\n\n/**\n * Create the state required to render InfoIconLabel.\n *\n * The returned state can be modified with hooks such as useInfoIconLabelStyles_unstable,\n * before being passed to renderInfoIconLabel_unstable.\n *\n * @param props - props from this instance of InfoIconLabel\n * @param ref - reference to root HTMLElement of InfoIconLabel\n */\nexport const useInfoIconLabel_unstable = (\n props: InfoIconLabelProps,\n ref: React.Ref<HTMLElement>,\n): InfoIconLabelState => {\n return {\n // TODO add appropriate props/defaults\n components: {\n // TODO add each slot's element type or component\n root: 'div',\n },\n // TODO add appropriate slots, for example:\n // mySlot: resolveShorthand(props.mySlot),\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n };\n};\n"],"names":["React","getNativeElementProps","useInfoIconLabel_unstable","props","ref","components","root"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAGlE;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC,MACuB;IACvB,OAAO;QACL,sCAAsC;QACtCC,YAAY;YACV,iDAAiD;YACjDC,MAAM;QACR;QACA,2CAA2C;QAC3C,0CAA0C;QAC1CA,MAAML,sBAAsB,OAAO;YACjCG;YACA,GAAGD,KAAK;QACV;IACF;AACF,EAAE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { __styles, mergeClasses } from '@griffel/react';
|
|
2
|
+
export const infoIconLabelClassNames = {
|
|
3
|
+
root: 'fui-InfoIconLabel'
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Styles for the root slot
|
|
7
|
+
*/
|
|
8
|
+
const useStyles = /*#__PURE__*/__styles({
|
|
9
|
+
root: {}
|
|
10
|
+
}, {});
|
|
11
|
+
/**
|
|
12
|
+
* Apply styling to the InfoIconLabel slots based on the state
|
|
13
|
+
*/
|
|
14
|
+
export const useInfoIconLabelStyles_unstable = state => {
|
|
15
|
+
const styles = useStyles();
|
|
16
|
+
state.root.className = mergeClasses(infoIconLabelClassNames.root, styles.root, state.root.className);
|
|
17
|
+
// TODO Add class names to slots, for example:
|
|
18
|
+
// state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);
|
|
19
|
+
return state;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=useInfoIconLabelStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","infoIconLabelClassNames","root","useStyles","useInfoIconLabelStyles_unstable","state","styles","className"],"sources":["useInfoIconLabelStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nexport const infoIconLabelClassNames = {\n root: 'fui-InfoIconLabel'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n }\n});\n/**\n * Apply styling to the InfoIconLabel slots based on the state\n */ export const useInfoIconLabelStyles_unstable = (state)=>{\n const styles = useStyles();\n state.root.className = mergeClasses(infoIconLabelClassNames.root, styles.root, state.root.className);\n // TODO Add class names to slots, for example:\n // state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,OAAO,MAAMC,uBAAuB,GAAG;EACnCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGJ,QAAA;EAAAG,IAAA;AAAA,KAGrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAME,+BAA+B,GAAIC,KAAK,IAAG;EACxD,MAAMC,MAAM,GAAGH,SAAS,CAAC,CAAC;EAC1BE,KAAK,CAACH,IAAI,CAACK,SAAS,GAAGP,YAAY,CAACC,uBAAuB,CAACC,IAAI,EAAEI,MAAM,CAACJ,IAAI,EAAEG,KAAK,CAACH,IAAI,CAACK,SAAS,CAAC;EACpG;EACA;EACA,OAAOF,KAAK;AAChB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { renderInfoLabel_unstable } from './renderInfoLabel';
|
|
3
|
+
import { useInfoLabel_unstable } from './useInfoLabel';
|
|
4
|
+
import { useInfoLabelStyles_unstable } from './useInfoLabelStyles.styles';
|
|
5
|
+
/**
|
|
6
|
+
* InfoLabel component
|
|
7
|
+
*/ export const InfoLabel = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
8
|
+
const state = useInfoLabel_unstable(props, ref);
|
|
9
|
+
useInfoLabelStyles_unstable(state);
|
|
10
|
+
return renderInfoLabel_unstable(state);
|
|
11
|
+
});
|
|
12
|
+
InfoLabel.displayName = 'InfoLabel';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["InfoLabel.tsx"],"sourcesContent":["import * 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 */\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,YAAYA,WAAW,QAAQ;AAI/B,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,2BAA2B,QAAQ,8BAA8B;AAE1E;;CAEC,GACD,OAAO,MAAMC,0BAAiDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC,MAAQ;IAC7F,MAAMC,QAAQN,sBAAsBI,OAAOC;IAE3CJ,4BAA4BK;IAC5B,OAAOP,yBAAyBO;AAClC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["InfoLabel.types.ts"],"sourcesContent":["import { Label } from '@fluentui/react-label';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { InfoButton } from '../InfoButton';\nimport type { InfoButtonProps } from '../InfoButton';\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 */\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 */\nexport type InfoLabelState = ComponentState<InfoLabelSlots> & Pick<InfoLabelProps, 'size'>;\n"],"names":[],"mappings":"AAAA,WAwC2F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './InfoLabel';\nexport * from './InfoLabel.types';\nexport * from './renderInfoLabel';\nexport * from './useInfoLabel';\nexport * from './useInfoLabelStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,iBAAiB;AAC/B,cAAc,8BAA8B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
|
|
2
|
+
import { getSlotsNext } from '@fluentui/react-utilities';
|
|
3
|
+
/**
|
|
4
|
+
* Render the final JSX of InfoLabel
|
|
5
|
+
*/ export const renderInfoLabel_unstable = (state)=>{
|
|
6
|
+
const { slots , slotProps } = getSlotsNext(state);
|
|
7
|
+
return /*#__PURE__*/ createElement(slots.root, slotProps.root, /*#__PURE__*/ createElement(slots.label, slotProps.label), slots.infoButton && /*#__PURE__*/ createElement(slots.infoButton, slotProps.infoButton));
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["renderInfoLabel.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { InfoLabelSlots, InfoLabelState } from './InfoLabel.types';\n\n/**\n * Render the final JSX of InfoLabel\n */\nexport const renderInfoLabel_unstable = (state: InfoLabelState) => {\n const { slots, slotProps } = getSlotsNext<InfoLabelSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <slots.label {...slotProps.label} />\n {slots.infoButton && <slots.infoButton {...slotProps.infoButton} />}\n </slots.root>\n );\n};\n"],"names":["createElement","getSlotsNext","renderInfoLabel_unstable","state","slots","slotProps","root","label","infoButton"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,YAAY,QAAQ,4BAA4B;AAGzD;;CAEC,GACD,OAAO,MAAMC,2BAA2B,CAACC,QAA0B;IACjE,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,aAA6BE;IAE1D,qBACE,AAdJ,cAcKC,MAAME,IAAI,EAAKD,UAAUC,IAAI,gBAC5B,AAfN,cAeOF,MAAMG,KAAK,EAAKF,UAAUE,KAAK,GAC/BH,MAAMI,UAAU,kBAAI,AAhB3B,cAgB4BJ,MAAMI,UAAU,EAAKH,UAAUG,UAAU;AAGrE,EAAE"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var _infoButton, _arialabelledby, _root, _ariaowns;
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Label } from '@fluentui/react-label';
|
|
4
|
+
import { resolveShorthand, useId } from '@fluentui/react-utilities';
|
|
5
|
+
import { InfoButton } from '../InfoButton/InfoButton';
|
|
6
|
+
/**
|
|
7
|
+
* Create the state required to render InfoLabel.
|
|
8
|
+
*
|
|
9
|
+
* The returned state can be modified with hooks such as useInfoLabelStyles_unstable,
|
|
10
|
+
* before being passed to renderInfoLabel_unstable.
|
|
11
|
+
*
|
|
12
|
+
* @param props - props from this instance of InfoLabel
|
|
13
|
+
* @param ref - reference to label element of InfoLabel
|
|
14
|
+
*/ export const useInfoLabel_unstable = (props, ref)=>{
|
|
15
|
+
const { root: rootShorthand , label: labelShorthand , infoButton: infoButtonShorthand , info , size , className , style , ...labelProps } = props;
|
|
16
|
+
const baseId = useId('infolabel-');
|
|
17
|
+
const root = resolveShorthand(rootShorthand, {
|
|
18
|
+
required: true,
|
|
19
|
+
defaultProps: {
|
|
20
|
+
className,
|
|
21
|
+
style
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
const label = resolveShorthand(labelShorthand, {
|
|
25
|
+
required: true,
|
|
26
|
+
defaultProps: {
|
|
27
|
+
id: baseId + '__label',
|
|
28
|
+
ref,
|
|
29
|
+
size,
|
|
30
|
+
...labelProps
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
const infoButton = resolveShorthand(infoButtonShorthand, {
|
|
34
|
+
required: !!info,
|
|
35
|
+
defaultProps: {
|
|
36
|
+
id: baseId + '__infoButton',
|
|
37
|
+
size,
|
|
38
|
+
info
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
if (infoButton) {
|
|
42
|
+
var _infoButton_info;
|
|
43
|
+
infoButton.info = resolveShorthand(infoButton === null || infoButton === void 0 ? void 0 : infoButton.info, {
|
|
44
|
+
defaultProps: {
|
|
45
|
+
id: baseId + '__info'
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
var _;
|
|
49
|
+
(_ = (_infoButton = infoButton)[_arialabelledby = 'aria-labelledby']) !== null && _ !== void 0 ? _ : _infoButton[_arialabelledby] = `${label.id} ${infoButton.id}`;
|
|
50
|
+
var _1;
|
|
51
|
+
(_1 = (_root = root)[_ariaowns = 'aria-owns']) !== null && _1 !== void 0 ? _1 : _root[_ariaowns] = (_infoButton_info = infoButton.info) === null || _infoButton_info === void 0 ? void 0 : _infoButton_info.id;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
size,
|
|
55
|
+
components: {
|
|
56
|
+
root: 'span',
|
|
57
|
+
label: Label,
|
|
58
|
+
infoButton: InfoButton
|
|
59
|
+
},
|
|
60
|
+
root,
|
|
61
|
+
label,
|
|
62
|
+
infoButton
|
|
63
|
+
};
|
|
64
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useInfoLabel.ts"],"sourcesContent":["import * as React from 'react';\n\nimport { Label } from '@fluentui/react-label';\nimport { resolveShorthand, useId } 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 */\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\n const root = resolveShorthand(rootShorthand, {\n required: true,\n defaultProps: {\n className,\n style,\n },\n });\n\n const label = resolveShorthand(labelShorthand, {\n required: true,\n defaultProps: {\n id: baseId + '__label',\n ref,\n size,\n ...labelProps,\n },\n });\n\n const infoButton = resolveShorthand(infoButtonShorthand, {\n required: !!info,\n defaultProps: {\n id: baseId + '__infoButton',\n size,\n info,\n },\n });\n\n if (infoButton) {\n infoButton.info = resolveShorthand(infoButton?.info, {\n defaultProps: {\n id: baseId + '__info',\n },\n });\n\n infoButton['aria-labelledby'] ??= `${label.id} ${infoButton.id}`;\n root['aria-owns'] ??= infoButton.info?.id;\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":["infoButton","root","React","Label","resolveShorthand","useId","InfoButton","useInfoLabel_unstable","props","ref","rootShorthand","label","labelShorthand","infoButtonShorthand","info","size","className","style","labelProps","baseId","required","defaultProps","id","components"],"mappings":"IA+DIA,aAAW,iBACXC,OAAK;AAhET,YAAYC,WAAW,QAAQ;AAE/B,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,gBAAgB,EAAEC,KAAK,QAAQ,4BAA4B;AACpE,SAASC,UAAU,QAAQ,2BAA2B;AAGtD;;;;;;;;CAQC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAuBC,MAAqD;IAChH,MAAM,EACJR,MAAMS,cAAa,EACnBC,OAAOC,eAAc,EACrBZ,YAAYa,oBAAmB,EAC/BC,KAAI,EACJC,KAAI,EACJC,UAAS,EACTC,MAAK,EACL,GAAGC,YACJ,GAAGV;IACJ,MAAMW,SAASd,MAAM;IAErB,MAAMJ,OAAOG,iBAAiBM,eAAe;QAC3CU,UAAU,IAAI;QACdC,cAAc;YACZL;YACAC;QACF;IACF;IAEA,MAAMN,QAAQP,iBAAiBQ,gBAAgB;QAC7CQ,UAAU,IAAI;QACdC,cAAc;YACZC,IAAIH,SAAS;YACbV;YACAM;YACA,GAAGG,UAAU;QACf;IACF;IAEA,MAAMlB,aAAaI,iBAAiBS,qBAAqB;QACvDO,UAAU,CAAC,CAACN;QACZO,cAAc;YACZC,IAAIH,SAAS;YACbJ;YACAD;QACF;IACF;IAEA,IAAId,YAAY;YAQQA;QAPtBA,WAAWc,IAAI,GAAGV,iBAAiBJ,uBAAAA,wBAAAA,KAAAA,IAAAA,WAAYc,IAAI,EAAE;YACnDO,cAAc;gBACZC,IAAIH,SAAS;YACf;QACF;;QAEAnB,MAAAA,cAAAA,WAAU,CAAC,kBAAA,kBAAkB,iCAA7BA,WAAU,CAAC,gBAAkB,GAAK,CAAC,EAAEW,MAAMW,EAAE,CAAC,CAAC,EAAEtB,WAAWsB,EAAE,CAAC,CAAC;;QAChErB,OAAAA,QAAAA,KAAI,CAAC,YAAA,YAAY,mCAAjBA,KAAI,CAAC,UAAY,GAAKD,CAAAA,mBAAAA,WAAWc,IAAI,cAAfd,8BAAAA,KAAAA,IAAAA,iBAAiBsB,EAAE;IAC3C,CAAC;IAED,OAAO;QACLP;QACAQ,YAAY;YACVtB,MAAM;YACNU,OAAOR;YACPH,YAAYM;QACd;QACAL;QACAU;QACAX;IACF;AACF,EAAE"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { tokens } from '@fluentui/react-theme';
|
|
2
|
+
import { __styles, mergeClasses } from '@griffel/react';
|
|
3
|
+
export const infoLabelClassNames = {
|
|
4
|
+
root: 'fui-InfoLabel',
|
|
5
|
+
label: 'fui-InfoLabel__label',
|
|
6
|
+
infoButton: 'fui-InfoLabel__infoButton'
|
|
7
|
+
};
|
|
8
|
+
const useLabelStyles = /*#__PURE__*/__styles({
|
|
9
|
+
base: {
|
|
10
|
+
ha4doy: "f12kltsn",
|
|
11
|
+
Bceei9c: "fpo1scq",
|
|
12
|
+
sj55zd: "f1ym3bx4"
|
|
13
|
+
}
|
|
14
|
+
}, {
|
|
15
|
+
d: [".f12kltsn{vertical-align:top;}", ".fpo1scq{cursor:inherit;}", ".f1ym3bx4{color:inherit;}"]
|
|
16
|
+
});
|
|
17
|
+
const useInfoButtonStyles = /*#__PURE__*/__styles({
|
|
18
|
+
base: {
|
|
19
|
+
ha4doy: "f12kltsn",
|
|
20
|
+
B6of3ja: "f1bmzb36",
|
|
21
|
+
jrapky: "f1nyzk09"
|
|
22
|
+
},
|
|
23
|
+
large: {
|
|
24
|
+
B6of3ja: "fkrn0sh",
|
|
25
|
+
jrapky: "fmxx68s"
|
|
26
|
+
}
|
|
27
|
+
}, {
|
|
28
|
+
d: [".f12kltsn{vertical-align:top;}", ".f1bmzb36{margin-top:calc(0px - var(--spacingVerticalXXS));}", ".f1nyzk09{margin-bottom:calc(0px - var(--spacingVerticalXXS));}", ".fkrn0sh{margin-top:-1px;}", ".fmxx68s{margin-bottom:-1px;}"]
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* Apply styling to the InfoLabel slots based on the state
|
|
32
|
+
*/
|
|
33
|
+
export const useInfoLabelStyles_unstable = state => {
|
|
34
|
+
state.root.className = mergeClasses(infoLabelClassNames.root, state.root.className);
|
|
35
|
+
const labelStyles = useLabelStyles();
|
|
36
|
+
state.label.className = mergeClasses(infoLabelClassNames.label, labelStyles.base, state.label.className);
|
|
37
|
+
const infoButtonStyles = useInfoButtonStyles();
|
|
38
|
+
if (state.infoButton) {
|
|
39
|
+
state.infoButton.className = mergeClasses(infoLabelClassNames.infoButton, infoButtonStyles.base, state.size === 'large' && infoButtonStyles.large, state.infoButton.className);
|
|
40
|
+
}
|
|
41
|
+
return state;
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=useInfoLabelStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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"],"sources":["useInfoLabelStyles.styles.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nexport 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 */ export const useInfoLabelStyles_unstable = (state)=>{\n state.root.className = mergeClasses(infoLabelClassNames.root, state.root.className);\n const labelStyles = useLabelStyles();\n state.label.className = mergeClasses(infoLabelClassNames.label, labelStyles.base, state.label.className);\n const infoButtonStyles = useInfoButtonStyles();\n if (state.infoButton) {\n state.infoButton.className = mergeClasses(infoLabelClassNames.infoButton, infoButtonStyles.base, state.size === 'large' && infoButtonStyles.large, state.infoButton.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,uBAAuB;AAC9C,SAAAC,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,OAAO,MAAMC,mBAAmB,GAAG;EAC/BC,IAAI,EAAE,eAAe;EACrBC,KAAK,EAAE,sBAAsB;EAC7BC,UAAU,EAAE;AAChB,CAAC;AACD,MAAMC,cAAc,gBAAGN,QAAA;EAAAO,IAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAMtB,CAAC;AACF,MAAMC,mBAAmB,gBAAGZ,QAAA;EAAAO,IAAA;IAAAC,MAAA;IAAAK,OAAA;IAAAC,MAAA;EAAA;EAAAC,KAAA;IAAAF,OAAA;IAAAC,MAAA;EAAA;AAAA;EAAAH,CAAA;AAAA,CAY3B,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMK,2BAA2B,GAAIC,KAAK,IAAG;EACpDA,KAAK,CAACd,IAAI,CAACe,SAAS,GAAGjB,YAAY,CAACC,mBAAmB,CAACC,IAAI,EAAEc,KAAK,CAACd,IAAI,CAACe,SAAS,CAAC;EACnF,MAAMC,WAAW,GAAGb,cAAc,CAAC,CAAC;EACpCW,KAAK,CAACb,KAAK,CAACc,SAAS,GAAGjB,YAAY,CAACC,mBAAmB,CAACE,KAAK,EAAEe,WAAW,CAACZ,IAAI,EAAEU,KAAK,CAACb,KAAK,CAACc,SAAS,CAAC;EACxG,MAAME,gBAAgB,GAAGR,mBAAmB,CAAC,CAAC;EAC9C,IAAIK,KAAK,CAACZ,UAAU,EAAE;IAClBY,KAAK,CAACZ,UAAU,CAACa,SAAS,GAAGjB,YAAY,CAACC,mBAAmB,CAACG,UAAU,EAAEe,gBAAgB,CAACb,IAAI,EAAEU,KAAK,CAACI,IAAI,KAAK,OAAO,IAAID,gBAAgB,CAACL,KAAK,EAAEE,KAAK,CAACZ,UAAU,CAACa,SAAS,CAAC;EAClL;EACA,OAAOD,KAAK;AAChB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { InfoButton, infoButtonClassNames, renderInfoButton_unstable, useInfoButtonStyles_unstable, useInfoButton_unstable } from './InfoButton';
|
|
2
|
-
|
|
2
|
+
export { InfoLabel, infoLabelClassNames, renderInfoLabel_unstable, useInfoLabelStyles_unstable, useInfoLabel_unstable } from './InfoLabel';
|
|
3
|
+
export { InfoIcon, infoIconClassNames, renderInfoIcon_unstable, useInfoIconStyles_unstable, useInfoIcon_unstable } from './InfoIcon';
|
|
4
|
+
export { InfoIconLabel, infoIconLabelClassNames, renderInfoIconLabel_unstable, useInfoIconLabelStyles_unstable, useInfoIconLabel_unstable } from './InfoIconLabel';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export {\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';\nexport {\n InfoIcon,\n infoIconClassNames,\n renderInfoIcon_unstable,\n useInfoIconStyles_unstable,\n useInfoIcon_unstable,\n} from './InfoIcon';\nexport type { InfoIconProps, InfoIconSlots, InfoIconState } from './InfoIcon';\nexport {\n InfoIconLabel,\n infoIconLabelClassNames,\n renderInfoIconLabel_unstable,\n useInfoIconLabelStyles_unstable,\n useInfoIconLabel_unstable,\n} from './InfoIconLabel';\nexport type { InfoIconLabelProps, InfoIconLabelSlots, InfoIconLabelState } from './InfoIconLabel';\n"],"names":["InfoButton","infoButtonClassNames","renderInfoButton_unstable","useInfoButtonStyles_unstable","useInfoButton_unstable","InfoLabel","infoLabelClassNames","renderInfoLabel_unstable","useInfoLabelStyles_unstable","useInfoLabel_unstable","InfoIcon","infoIconClassNames","renderInfoIcon_unstable","useInfoIconStyles_unstable","useInfoIcon_unstable","InfoIconLabel","infoIconLabelClassNames","renderInfoIconLabel_unstable","useInfoIconLabelStyles_unstable","useInfoIconLabel_unstable"],"mappings":"AAAA,SACEA,UAAU,EACVC,oBAAoB,EACpBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,sBAAsB,QACjB,eAAe;AAEtB,SACEC,SAAS,EACTC,mBAAmB,EACnBC,wBAAwB,EACxBC,2BAA2B,EAC3BC,qBAAqB,QAChB,cAAc;AAErB,SACEC,QAAQ,EACRC,kBAAkB,EAClBC,uBAAuB,EACvBC,0BAA0B,EAC1BC,oBAAoB,QACf,aAAa;AAEpB,SACEC,aAAa,EACbC,uBAAuB,EACvBC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,yBAAyB,QACpB,kBAAkB"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
|
|
3
|
+
value: true
|
|
5
4
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
tslib_1.__exportStar(require("./components/InfoButton/index"), exports);
|
|
10
|
-
//# sourceMappingURL=InfoButton.js.map
|
|
5
|
+
const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
|
|
6
|
+
_exportStar(require("./components/InfoButton/index"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["InfoButton.js"],"sourcesContent":["export * from './components/InfoButton/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["InfoIcon.js"],"sourcesContent":["export * from './components/InfoIcon/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["InfoIconLabel.js"],"sourcesContent":["export * from './components/InfoIconLabel/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["InfoLabel.js"],"sourcesContent":["export * from './components/InfoLabel/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
|
|
3
|
+
value: true
|
|
5
4
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports
|
|
13
|
-
|
|
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
|
+
DefaultInfoButtonIcon12: ()=>DefaultInfoButtonIcon12,
|
|
13
|
+
DefaultInfoButtonIcon16: ()=>DefaultInfoButtonIcon16,
|
|
14
|
+
DefaultInfoButtonIcon20: ()=>DefaultInfoButtonIcon20
|
|
15
|
+
});
|
|
16
|
+
const _reactIcons = require("@fluentui/react-icons");
|
|
17
|
+
const DefaultInfoButtonIcon12 = (0, _reactIcons.bundleIcon)(_reactIcons.Info12Filled, _reactIcons.Info12Regular);
|
|
18
|
+
const DefaultInfoButtonIcon16 = (0, _reactIcons.bundleIcon)(_reactIcons.Info16Filled, _reactIcons.Info16Regular);
|
|
19
|
+
const DefaultInfoButtonIcon20 = (0, _reactIcons.bundleIcon)(_reactIcons.Info20Filled, _reactIcons.Info20Regular);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
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,MAAvBA;IACAC,uBAAuB,MAAvBA;IACAC,uBAAuB,MAAvBA;;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,26 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
|
|
3
|
+
value: true
|
|
5
4
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const renderInfoButton_1 = /*#__PURE__*/require("./renderInfoButton");
|
|
11
|
-
|
|
12
|
-
const useInfoButton_1 = /*#__PURE__*/require("./useInfoButton");
|
|
13
|
-
|
|
14
|
-
const useInfoButtonStyles_1 = /*#__PURE__*/require("./useInfoButtonStyles");
|
|
15
|
-
/**
|
|
16
|
-
* InfoButtons provide a way to display additional information about a form field or an area in the UI.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
exports.InfoButton = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
21
|
-
const state = useInfoButton_1.useInfoButton_unstable(props, ref);
|
|
22
|
-
useInfoButtonStyles_1.useInfoButtonStyles_unstable(state);
|
|
23
|
-
return renderInfoButton_1.renderInfoButton_unstable(state);
|
|
5
|
+
Object.defineProperty(exports, "InfoButton", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>InfoButton
|
|
24
8
|
});
|
|
25
|
-
|
|
26
|
-
|
|
9
|
+
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
|
10
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
11
|
+
const _renderInfoButton = require("./renderInfoButton");
|
|
12
|
+
const _useInfoButton = require("./useInfoButton");
|
|
13
|
+
const _useInfoButtonStylesStyles = require("./useInfoButtonStyles.styles");
|
|
14
|
+
const InfoButton = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
15
|
+
const state = (0, _useInfoButton.useInfoButton_unstable)(props, ref);
|
|
16
|
+
(0, _useInfoButtonStylesStyles.useInfoButtonStyles_unstable)(state);
|
|
17
|
+
return (0, _renderInfoButton.renderInfoButton_unstable)(state);
|
|
18
|
+
});
|
|
19
|
+
InfoButton.displayName = 'InfoButton';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["InfoButton.js"],"sourcesContent":["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 */ 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":";;;;+BAMiBA;;aAAAA;;;6DANM;kCACmB;+BACH;2CACM;AAGlC,MAAMA,aAAa,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IACvE,MAAMC,QAAQC,IAAAA,qCAAsB,EAACH,OAAOC;IAC5CG,IAAAA,uDAA4B,EAACF;IAC7B,OAAOG,IAAAA,2CAAyB,EAACH;AACrC;AACAL,WAAWS,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
|
|
3
|
+
value: true
|
|
5
4
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
tslib_1.__exportStar(require("./renderInfoButton"), exports);
|
|
14
|
-
|
|
15
|
-
tslib_1.__exportStar(require("./useInfoButton"), exports);
|
|
16
|
-
|
|
17
|
-
tslib_1.__exportStar(require("./useInfoButtonStyles"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
5
|
+
const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
|
|
6
|
+
_exportStar(require("./InfoButton"), exports);
|
|
7
|
+
_exportStar(require("./InfoButton.types"), exports);
|
|
8
|
+
_exportStar(require("./renderInfoButton"), exports);
|
|
9
|
+
_exportStar(require("./useInfoButton"), exports);
|
|
10
|
+
_exportStar(require("./useInfoButtonStyles.styles"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
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":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA"}
|
|
@@ -1,30 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
|
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
|
|
3
|
+
value: true
|
|
5
4
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const renderInfoButton_unstable = state => {
|
|
19
|
-
const {
|
|
20
|
-
slots,
|
|
21
|
-
slotProps
|
|
22
|
-
} = react_utilities_1.getSlots(state);
|
|
23
|
-
return React.createElement(slots.popover, { ...slotProps.popover
|
|
24
|
-
}, React.createElement(react_popover_1.PopoverTrigger, null, React.createElement(slots.root, { ...slotProps.root
|
|
25
|
-
})), React.createElement(slots.content, { ...slotProps.content
|
|
26
|
-
}));
|
|
5
|
+
Object.defineProperty(exports, "renderInfoButton_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>renderInfoButton_unstable
|
|
8
|
+
});
|
|
9
|
+
const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
|
|
10
|
+
const _reactUtilities = require("@fluentui/react-utilities");
|
|
11
|
+
const _reactPopover = require("@fluentui/react-popover");
|
|
12
|
+
const renderInfoButton_unstable = (state)=>{
|
|
13
|
+
const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
|
|
14
|
+
return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.popover, slotProps.popover, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_reactPopover.PopoverTrigger, null, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root)), /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.info, slotProps.info));
|
|
27
15
|
};
|
|
28
|
-
|
|
29
|
-
exports.renderInfoButton_unstable = renderInfoButton_unstable;
|
|
30
|
-
//# sourceMappingURL=renderInfoButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["renderInfoButton.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport { PopoverTrigger } from '@fluentui/react-popover';\n/**\n * Render the final JSX of InfoButton\n */ export const renderInfoButton_unstable = (state)=>{\n const { slots , slotProps } = getSlotsNext(state);\n return /*#__PURE__*/ createElement(slots.popover, slotProps.popover, /*#__PURE__*/ createElement(PopoverTrigger, null, /*#__PURE__*/ createElement(slots.root, slotProps.root)), /*#__PURE__*/ createElement(slots.info, slotProps.info));\n};\n"],"names":["renderInfoButton_unstable","state","slots","slotProps","getSlotsNext","createElement","popover","PopoverTrigger","root","info"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKjCA;;aAAAA;;iCALkE;gCACtD;8BACE;AAGpB,MAAMA,4BAA4B,CAACC,QAAQ;IAClD,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACH;IAC5C,OAAO,WAAW,GAAGI,IAAAA,8BAAa,EAACH,MAAMI,OAAO,EAAEH,UAAUG,OAAO,EAAE,WAAW,GAAGD,IAAAA,8BAAa,EAACE,4BAAc,EAAE,IAAI,EAAE,WAAW,GAAGF,IAAAA,8BAAa,EAACH,MAAMM,IAAI,EAAEL,UAAUK,IAAI,IAAI,WAAW,GAAGH,IAAAA,8BAAa,EAACH,MAAMO,IAAI,EAAEN,UAAUM,IAAI;AAC3O"}
|