@fluentui/react-divider 0.0.0-nightly-20230317-1454.1 → 0.0.0-nightly-20230321-0440.1
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 +11 -11
- package/CHANGELOG.md +8 -8
- package/lib/Divider.js +1 -1
- package/lib/Divider.js.map +1 -1
- package/lib/components/Divider/Divider.js +6 -6
- package/lib/components/Divider/Divider.js.map +1 -1
- package/lib/components/Divider/Divider.types.js.map +1 -1
- package/lib/components/Divider/index.js +5 -5
- package/lib/components/Divider/index.js.map +1 -1
- package/lib/components/Divider/renderDivider.js +7 -3
- package/lib/components/Divider/renderDivider.js.map +1 -1
- package/lib/components/Divider/useDivider.js +10 -11
- package/lib/components/Divider/useDivider.js.map +1 -1
- package/lib/components/Divider/useDividerStyles.js +8 -8
- package/lib/components/Divider/useDividerStyles.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Divider.js +4 -5
- package/lib-commonjs/Divider.js.map +1 -1
- package/lib-commonjs/components/Divider/Divider.js +20 -19
- package/lib-commonjs/components/Divider/Divider.js.map +1 -1
- package/lib-commonjs/components/Divider/Divider.types.js +2 -3
- package/lib-commonjs/components/Divider/Divider.types.js.map +1 -1
- package/lib-commonjs/components/Divider/index.js +8 -9
- package/lib-commonjs/components/Divider/index.js.map +1 -1
- package/lib-commonjs/components/Divider/renderDivider.js +20 -13
- package/lib-commonjs/components/Divider/renderDivider.js.map +1 -1
- package/lib-commonjs/components/Divider/useDivider.js +46 -39
- package/lib-commonjs/components/Divider/useDivider.js.map +1 -1
- package/lib-commonjs/components/Divider/useDividerStyles.js +186 -373
- package/lib-commonjs/components/Divider/useDividerStyles.js.map +1 -1
- package/lib-commonjs/index.js +33 -16
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +8 -7
- package/.swcrc +0 -39
package/CHANGELOG.json
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
"name": "@fluentui/react-divider",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-divider_v0.0.0-nightly-
|
7
|
-
"version": "0.0.0-nightly-
|
5
|
+
"date": "Tue, 21 Mar 2023 04:49:56 GMT",
|
6
|
+
"tag": "@fluentui/react-divider_v0.0.0-nightly-20230321-0440.1",
|
7
|
+
"version": "0.0.0-nightly-20230321-0440.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
@@ -16,26 +16,26 @@
|
|
16
16
|
{
|
17
17
|
"author": "beachball",
|
18
18
|
"package": "@fluentui/react-divider",
|
19
|
-
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
20
|
-
"commit": "
|
19
|
+
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230321-0440.1",
|
20
|
+
"commit": "e913db5700c77cb74564f4422c775d52ef302e91"
|
21
21
|
},
|
22
22
|
{
|
23
23
|
"author": "beachball",
|
24
24
|
"package": "@fluentui/react-divider",
|
25
|
-
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-
|
26
|
-
"commit": "
|
25
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230321-0440.1",
|
26
|
+
"commit": "e913db5700c77cb74564f4422c775d52ef302e91"
|
27
27
|
},
|
28
28
|
{
|
29
29
|
"author": "beachball",
|
30
30
|
"package": "@fluentui/react-divider",
|
31
|
-
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-
|
32
|
-
"commit": "
|
31
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230321-0440.1",
|
32
|
+
"commit": "e913db5700c77cb74564f4422c775d52ef302e91"
|
33
33
|
},
|
34
34
|
{
|
35
35
|
"author": "beachball",
|
36
36
|
"package": "@fluentui/react-divider",
|
37
|
-
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
38
|
-
"commit": "
|
37
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230321-0440.1",
|
38
|
+
"commit": "e913db5700c77cb74564f4422c775d52ef302e91"
|
39
39
|
}
|
40
40
|
]
|
41
41
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
# Change Log - @fluentui/react-divider
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Tue, 21 Mar 2023 04:49:56 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-nightly-
|
7
|
+
## [0.0.0-nightly-20230321-0440.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-divider_v0.0.0-nightly-20230321-0440.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-divider_v9.2.4..@fluentui/react-divider_v0.0.0-nightly-
|
9
|
+
Tue, 21 Mar 2023 04:49:56 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-divider_v9.2.4..@fluentui/react-divider_v0.0.0-nightly-20230321-0440.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
15
|
-
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
16
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
17
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
18
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
15
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230321-0440.1 ([commit](https://github.com/microsoft/fluentui/commit/e913db5700c77cb74564f4422c775d52ef302e91) by beachball)
|
16
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20230321-0440.1 ([commit](https://github.com/microsoft/fluentui/commit/e913db5700c77cb74564f4422c775d52ef302e91) by beachball)
|
17
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20230321-0440.1 ([commit](https://github.com/microsoft/fluentui/commit/e913db5700c77cb74564f4422c775d52ef302e91) by beachball)
|
18
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230321-0440.1 ([commit](https://github.com/microsoft/fluentui/commit/e913db5700c77cb74564f4422c775d52ef302e91) by beachball)
|
19
19
|
|
20
20
|
## [9.2.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-divider_v9.2.4)
|
21
21
|
|
package/lib/Divider.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from
|
1
|
+
export * from './components/Divider/index';
|
2
2
|
//# sourceMappingURL=Divider.js.map
|
package/lib/Divider.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"file":"Divider.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-divider/src/Divider.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC","sourcesContent":["export * from './components/Divider/index';\n"]}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import * as React from
|
2
|
-
import { renderDivider_unstable } from
|
3
|
-
import { useDivider_unstable } from
|
4
|
-
import { useDividerStyles_unstable } from
|
5
|
-
import { useCustomStyleHooks_unstable } from
|
1
|
+
import * as React from 'react';
|
2
|
+
import { renderDivider_unstable } from './renderDivider';
|
3
|
+
import { useDivider_unstable } from './useDivider';
|
4
|
+
import { useDividerStyles_unstable } from './useDividerStyles';
|
5
|
+
import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
|
6
6
|
/**
|
7
7
|
* A divider visually segments content into groups.
|
8
8
|
*/
|
@@ -15,5 +15,5 @@ export const Divider = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
15
15
|
useCustomStyles(state);
|
16
16
|
return renderDivider_unstable(state);
|
17
17
|
});
|
18
|
-
Divider.displayName =
|
18
|
+
Divider.displayName = 'Divider';
|
19
19
|
//# sourceMappingURL=Divider.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","renderDivider_unstable","useDivider_unstable","useDividerStyles_unstable","useCustomStyleHooks_unstable","Divider","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["
|
1
|
+
{"version":3,"names":["React","renderDivider_unstable","useDivider_unstable","useDividerStyles_unstable","useCustomStyleHooks_unstable","Divider","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../../../../../../../../../packages/react-components/react-divider/src/components/Divider/Divider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderDivider_unstable } from './renderDivider';\nimport { useDivider_unstable } from './useDivider';\nimport { useDividerStyles_unstable } from './useDividerStyles';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { DividerProps } from './Divider.types';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A divider visually segments content into groups.\n */\nexport const Divider: ForwardRefComponent<DividerProps> = React.forwardRef((props, ref) => {\n const state = useDivider_unstable(props, ref);\n\n useDividerStyles_unstable(state);\n\n const { useDividerStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDivider_unstable(state);\n});\n\nDivider.displayName = 'Divider';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,sBAAsB,QAAQ,iBAAiB;AACxD,SAASC,mBAAmB,QAAQ,cAAc;AAClD,SAASC,yBAAyB,QAAQ,oBAAoB;AAG9D,SAASC,4BAA4B,QAAQ,iCAAiC;AAE9E;;;AAGA,OAAO,MAAMC,OAAO,gBAAsCL,KAAK,CAACM,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACxF,MAAMC,KAAK,GAAGP,mBAAmB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAE7CL,yBAAyB,CAACM,KAAK,CAAC;EAEhC,MAAM;IAAEN,yBAAyB,EAAEO;EAAe,CAAE,GAAGN,4BAA4B,EAAE;EACrFM,eAAe,CAACD,KAAK,CAAC;EAEtB,OAAOR,sBAAsB,CAACQ,KAAK,CAAC;AACtC,CAAC,CAAC;AAEFJ,OAAO,CAACM,WAAW,GAAG,SAAS"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"file":"Divider.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-divider/src/components/Divider/Divider.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DividerSlots = {\n /**\n * Root of the component that renders as a `<div>` tag.\n */\n root: Slot<'div'>;\n\n /**\n * Accessibility wrapper for content when presented.\n */\n wrapper: Slot<'div'>;\n};\n\nexport type DividerProps = ComponentProps<Partial<DividerSlots>> & {\n /**\n * Determines the alignment of the content within the divider.\n *\n * @default 'center'\n */\n alignContent?: 'start' | 'center' | 'end';\n\n /**\n * A divider can have one of the preset appearances.\n * When not specified, the divider has its default appearance.\n *\n * @default 'default'\n */\n appearance?: 'brand' | 'default' | 'strong' | 'subtle';\n\n /**\n * Adds padding to the beginning and end of the divider.\n *\n * @default false\n */\n inset?: boolean;\n\n /**\n * A divider can be horizontal (default) or vertical.\n *\n * @default false\n */\n vertical?: boolean;\n};\n\nexport type DividerState = ComponentState<DividerSlots> &\n Required<Pick<DividerProps, 'alignContent' | 'appearance' | 'inset' | 'vertical'>>;\n"]}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
export * from
|
2
|
-
export * from
|
3
|
-
export * from
|
4
|
-
export * from
|
5
|
-
export * from
|
1
|
+
export * from './Divider';
|
2
|
+
export * from './Divider.types';
|
3
|
+
export * from './renderDivider';
|
4
|
+
export * from './useDivider';
|
5
|
+
export * from './useDividerStyles';
|
6
6
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-divider/src/components/Divider/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC","sourcesContent":["export * from './Divider';\nexport * from './Divider.types';\nexport * from './renderDivider';\nexport * from './useDivider';\nexport * from './useDividerStyles';\n"]}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as React from
|
2
|
-
import { getSlots } from
|
1
|
+
import * as React from 'react';
|
2
|
+
import { getSlots } from '@fluentui/react-utilities';
|
3
3
|
/**
|
4
4
|
* Renders a Divider component by passing the slot props (defined in `state`) to the appropriate slots.
|
5
5
|
*/
|
@@ -8,6 +8,10 @@ export const renderDivider_unstable = state => {
|
|
8
8
|
slots,
|
9
9
|
slotProps
|
10
10
|
} = getSlots(state);
|
11
|
-
return /*#__PURE__*/React.createElement(slots.root,
|
11
|
+
return /*#__PURE__*/React.createElement(slots.root, {
|
12
|
+
...slotProps.root
|
13
|
+
}, slotProps.root.children !== undefined && /*#__PURE__*/React.createElement(slots.wrapper, {
|
14
|
+
...slotProps.wrapper
|
15
|
+
}, slotProps.root.children));
|
12
16
|
};
|
13
17
|
//# sourceMappingURL=renderDivider.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","getSlots","renderDivider_unstable","state","slots","slotProps","createElement","root","children","undefined","wrapper"],"sources":["
|
1
|
+
{"version":3,"names":["React","getSlots","renderDivider_unstable","state","slots","slotProps","createElement","root","children","undefined","wrapper"],"sources":["../../../../../../../../../packages/react-components/react-divider/src/components/Divider/renderDivider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { DividerSlots, DividerState } from './Divider.types';\n\n/**\n * Renders a Divider component by passing the slot props (defined in `state`) to the appropriate slots.\n */\nexport const renderDivider_unstable = (state: DividerState) => {\n const { slots, slotProps } = getSlots<DividerSlots>(state);\n return (\n <slots.root {...slotProps.root}>\n {slotProps.root.children !== undefined && (\n <slots.wrapper {...slotProps.wrapper}>{slotProps.root.children}</slots.wrapper>\n )}\n </slots.root>\n );\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,sBAAsB,GAAIC,KAAmB,IAAI;EAC5D,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAeE,KAAK,CAAC;EAC1D,oBACEH,KAAA,CAAAM,aAAA,CAACF,KAAK,CAACG,IAAI;IAAA,GAAKF,SAAS,CAACE;EAAI,GAC3BF,SAAS,CAACE,IAAI,CAACC,QAAQ,KAAKC,SAAS,iBACpCT,KAAA,CAAAM,aAAA,CAACF,KAAK,CAACM,OAAO;IAAA,GAAKL,SAAS,CAACK;EAAO,GAAGL,SAAS,CAACE,IAAI,CAACC,QAAQ,CAC/D,CACU;AAEjB,CAAC"}
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import { getNativeElementProps, resolveShorthand, useId } from "@fluentui/react-utilities";
|
1
|
+
import { getNativeElementProps, resolveShorthand, useId } from '@fluentui/react-utilities';
|
3
2
|
/**
|
4
3
|
* Returns the props and state required to render the component
|
5
4
|
* @param props - User-provided props to the Divider component.
|
@@ -7,13 +6,13 @@ import { getNativeElementProps, resolveShorthand, useId } from "@fluentui/react-
|
|
7
6
|
*/
|
8
7
|
export const useDivider_unstable = (props, ref) => {
|
9
8
|
const {
|
10
|
-
alignContent =
|
11
|
-
appearance =
|
9
|
+
alignContent = 'center',
|
10
|
+
appearance = 'default',
|
12
11
|
inset = false,
|
13
12
|
vertical = false,
|
14
13
|
wrapper
|
15
14
|
} = props;
|
16
|
-
const dividerId = useId(
|
15
|
+
const dividerId = useId('divider-');
|
17
16
|
return {
|
18
17
|
// Props passed at the top-level
|
19
18
|
alignContent,
|
@@ -22,13 +21,13 @@ export const useDivider_unstable = (props, ref) => {
|
|
22
21
|
vertical,
|
23
22
|
// Slots definition
|
24
23
|
components: {
|
25
|
-
root:
|
26
|
-
wrapper:
|
24
|
+
root: 'div',
|
25
|
+
wrapper: 'div'
|
27
26
|
},
|
28
|
-
root: getNativeElementProps(
|
29
|
-
role:
|
30
|
-
|
31
|
-
|
27
|
+
root: getNativeElementProps('div', {
|
28
|
+
role: 'separator',
|
29
|
+
'aria-orientation': vertical ? 'vertical' : 'horizontal',
|
30
|
+
'aria-labelledby': props.children ? dividerId : undefined,
|
32
31
|
...props,
|
33
32
|
ref
|
34
33
|
}),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["getNativeElementProps","resolveShorthand","useId","useDivider_unstable","props","ref","alignContent","appearance","inset","vertical","wrapper","dividerId","components","root","role","children","undefined","required","defaultProps","id"],"sources":["../../../../../../../../../packages/react-components/react-divider/src/components/Divider/useDivider.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useId } from '@fluentui/react-utilities';\nimport type { DividerProps, DividerState } from './Divider.types';\n\n/**\n * Returns the props and state required to render the component\n * @param props - User-provided props to the Divider component.\n * @param ref - User-provided ref to be passed to the Divider component.\n */\nexport const useDivider_unstable = (props: DividerProps, ref: React.Ref<HTMLElement>): DividerState => {\n const { alignContent = 'center', appearance = 'default', inset = false, vertical = false, wrapper } = props;\n const dividerId = useId('divider-');\n\n return {\n // Props passed at the top-level\n alignContent,\n appearance,\n inset,\n vertical,\n\n // Slots definition\n components: {\n root: 'div',\n wrapper: 'div',\n },\n\n root: getNativeElementProps('div', {\n role: 'separator',\n 'aria-orientation': vertical ? 'vertical' : 'horizontal',\n 'aria-labelledby': props.children ? dividerId : undefined,\n ...props,\n ref,\n }),\n wrapper: resolveShorthand(wrapper, {\n required: true,\n defaultProps: {\n id: dividerId,\n children: props.children,\n },\n }),\n };\n};\n"],"mappings":"AACA,SAASA,qBAAqB,EAAEC,gBAAgB,EAAEC,KAAK,QAAQ,2BAA2B;AAG1F;;;;;AAKA,OAAO,MAAMC,mBAAmB,GAAGA,CAACC,KAAmB,EAAEC,GAA2B,KAAkB;EACpG,MAAM;IAAEC,YAAY,GAAG,QAAQ;IAAEC,UAAU,GAAG,SAAS;IAAEC,KAAK,GAAG,KAAK;IAAEC,QAAQ,GAAG,KAAK;IAAEC;EAAO,CAAE,GAAGN,KAAK;EAC3G,MAAMO,SAAS,GAAGT,KAAK,CAAC,UAAU,CAAC;EAEnC,OAAO;IACL;IACAI,YAAY;IACZC,UAAU;IACVC,KAAK;IACLC,QAAQ;IAER;IACAG,UAAU,EAAE;MACVC,IAAI,EAAE,KAAK;MACXH,OAAO,EAAE;KACV;IAEDG,IAAI,EAAEb,qBAAqB,CAAC,KAAK,EAAE;MACjCc,IAAI,EAAE,WAAW;MACjB,kBAAkB,EAAEL,QAAQ,GAAG,UAAU,GAAG,YAAY;MACxD,iBAAiB,EAAEL,KAAK,CAACW,QAAQ,GAAGJ,SAAS,GAAGK,SAAS;MACzD,GAAGZ,KAAK;MACRC;KACD,CAAC;IACFK,OAAO,EAAET,gBAAgB,CAACS,OAAO,EAAE;MACjCO,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZC,EAAE,EAAER,SAAS;QACbI,QAAQ,EAAEX,KAAK,CAACW;;KAEnB;GACF;AACH,CAAC"}
|
@@ -1,13 +1,13 @@
|
|
1
|
-
import { mergeClasses, shorthands, __styles } from
|
2
|
-
import { tokens } from
|
1
|
+
import { mergeClasses, shorthands, __styles } from '@griffel/react';
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
3
3
|
export const dividerClassNames = {
|
4
|
-
root:
|
5
|
-
wrapper:
|
4
|
+
root: 'fui-Divider',
|
5
|
+
wrapper: 'fui-Divider__wrapper'
|
6
6
|
};
|
7
|
-
const contentSpacing =
|
8
|
-
const insetSpacing =
|
9
|
-
const maxStartEndLength =
|
10
|
-
const minStartEndLength =
|
7
|
+
const contentSpacing = '12px';
|
8
|
+
const insetSpacing = '12px';
|
9
|
+
const maxStartEndLength = '8px';
|
10
|
+
const minStartEndLength = '8px;';
|
11
11
|
const useBaseStyles = /*#__PURE__*/__styles({
|
12
12
|
base: {
|
13
13
|
Bt984gj: "f122n59",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["mergeClasses","shorthands","__styles","tokens","dividerClassNames","root","wrapper","contentSpacing","insetSpacing","maxStartEndLength","minStartEndLength","useBaseStyles","base","Bt984gj","B7ck84d","mc9l5x","Beiy3e4","Bh6795r","qhf8xq","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","fsow6f","Bcvre1j","Br0sdwz","Bn78ew0","li1rpt","ap17g6","B771hl4","childless","susq4k","Bicfajf","jwcpgy","B4rk6o","start","Bsft5z2","center","Ftih45","end","brand","sj55zd","Bq4z7u6","Bk5zm6e","Bqjgrrk","Bm6vgfq","B0n5ga8","s924m2","B1q35kw","Gp14am","subtle","strong","d","useHorizontalStyles","a9b677","Bdkvgpv","B0qfbqy","pbipgd","Bm2nyyq","xrcqlc","i5u598","inset","uwmqm3","z189sj","Bxwl2t9","Iy66sp","useVerticalStyles","sshi5w","m598lv","B4f6apu","zkzzav","Barhvk9","Ihftqj","Bde111x","B6of3ja","jrapky","withChildren","Bbdr6tz","gn64ia","useDividerStyles_unstable","state","baseStyles","horizontalStyles","verticalStyles","alignContent","appearance","vertical","className","children","undefined"],"sources":["../../../src/components/Divider/useDividerStyles.ts"],"sourcesContent":["import { mergeClasses, shorthands, makeStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { DividerSlots, DividerState } from './Divider.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const dividerClassNames: SlotClassNames<DividerSlots> = {\n root: 'fui-Divider',\n wrapper: 'fui-Divider__wrapper',\n};\n\nconst contentSpacing = '12px';\nconst insetSpacing = '12px';\nconst maxStartEndLength = '8px';\nconst minStartEndLength = '8px;';\n\nconst useBaseStyles = makeStyles({\n // Base styles\n base: {\n alignItems: 'center',\n boxSizing: 'border-box',\n display: 'flex',\n flexDirection: 'row',\n flexGrow: 1,\n position: 'relative',\n\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n lineHeight: tokens.lineHeightBase200,\n textAlign: 'center',\n\n '::before': {\n boxSizing: 'border-box',\n display: 'flex',\n flexGrow: 1,\n },\n\n '::after': {\n boxSizing: 'border-box',\n display: 'flex',\n flexGrow: 1,\n },\n },\n\n // Childless styles\n childless: {\n '::before': {\n marginBottom: 0,\n marginRight: 0,\n },\n\n '::after': {\n marginLeft: 0,\n marginTop: 0,\n },\n },\n\n // Alignment variations\n start: {\n '::after': {\n content: '\"\"',\n },\n },\n center: {\n '::before': {\n content: '\"\"',\n },\n '::after': {\n content: '\"\"',\n },\n },\n end: {\n '::before': {\n content: '\"\"',\n },\n },\n\n // Appearance variations\n brand: {\n color: tokens.colorBrandForeground1,\n\n '::before': {\n ...shorthands.borderColor(tokens.colorBrandStroke1),\n },\n\n '::after': {\n ...shorthands.borderColor(tokens.colorBrandStroke1),\n },\n },\n default: {\n color: tokens.colorNeutralForeground2,\n\n '::before': {\n ...shorthands.borderColor(tokens.colorNeutralStroke2),\n },\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke2),\n },\n },\n subtle: {\n color: tokens.colorNeutralForeground2,\n\n '::before': {\n ...shorthands.borderColor(tokens.colorNeutralStroke3),\n },\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke3),\n },\n },\n strong: {\n color: tokens.colorNeutralForeground2,\n\n '::before': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n },\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n },\n },\n});\n\nconst useHorizontalStyles = makeStyles({\n // Base styles\n base: {\n width: '100%',\n\n '::before': {\n borderTopStyle: 'solid',\n borderTopWidth: tokens.strokeWidthThin,\n minWidth: minStartEndLength,\n },\n\n '::after': {\n borderTopStyle: 'solid',\n borderTopWidth: tokens.strokeWidthThin,\n minWidth: minStartEndLength,\n },\n },\n\n // Inset styles\n inset: {\n paddingLeft: insetSpacing,\n paddingRight: insetSpacing,\n },\n\n // Alignment variations\n start: {\n '::before': {\n content: '\"\"',\n marginRight: contentSpacing,\n maxWidth: maxStartEndLength,\n },\n\n '::after': {\n marginLeft: contentSpacing,\n },\n },\n center: {\n '::before': {\n marginRight: contentSpacing,\n },\n '::after': {\n marginLeft: contentSpacing,\n },\n },\n end: {\n '::before': {\n marginRight: contentSpacing,\n },\n '::after': {\n content: '\"\"',\n marginLeft: contentSpacing,\n maxWidth: maxStartEndLength,\n },\n },\n});\n\nconst useVerticalStyles = makeStyles({\n // Base styles\n base: {\n flexDirection: 'column',\n minHeight: '20px',\n\n '::before': {\n borderRightStyle: 'solid',\n borderRightWidth: tokens.strokeWidthThin,\n minHeight: minStartEndLength,\n },\n\n '::after': {\n borderRightStyle: 'solid',\n borderRightWidth: tokens.strokeWidthThin,\n minHeight: minStartEndLength,\n },\n },\n\n // Inset styles\n inset: {\n marginTop: insetSpacing,\n marginBottom: insetSpacing,\n },\n\n // With children styles\n withChildren: {\n minHeight: '84px',\n },\n\n // Alignment variations\n start: {\n '::before': {\n content: '\"\"',\n marginBottom: contentSpacing,\n maxHeight: maxStartEndLength,\n },\n\n '::after': {\n marginTop: contentSpacing,\n },\n },\n center: {\n '::before': {\n marginBottom: contentSpacing,\n },\n '::after': {\n marginTop: contentSpacing,\n },\n },\n end: {\n '::before': {\n marginBottom: contentSpacing,\n },\n '::after': {\n content: '\"\"',\n marginTop: contentSpacing,\n maxHeight: maxStartEndLength,\n },\n },\n});\n\nexport const useDividerStyles_unstable = (state: DividerState): DividerState => {\n const baseStyles = useBaseStyles();\n const horizontalStyles = useHorizontalStyles();\n const verticalStyles = useVerticalStyles();\n\n const { alignContent, appearance, inset, vertical } = state;\n\n state.root.className = mergeClasses(\n dividerClassNames.root,\n\n // Base styles\n baseStyles.base,\n baseStyles[alignContent],\n appearance && baseStyles[appearance],\n\n // Horizontal styles\n !vertical && horizontalStyles.base,\n !vertical && inset && horizontalStyles.inset,\n !vertical && horizontalStyles[alignContent],\n\n // Vertical styles\n vertical && verticalStyles.base,\n vertical && inset && verticalStyles.inset,\n vertical && verticalStyles[alignContent],\n vertical && state.root.children !== undefined && verticalStyles.withChildren,\n\n // Childless styles\n state.root.children === undefined && baseStyles.childless,\n\n // User provided class name\n state.root.className,\n );\n\n if (state.wrapper) {\n state.wrapper.className = mergeClasses(dividerClassNames.wrapper, state.wrapper.className);\n }\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,UAAU,EAAAC,QAAA,QAAoB;AACrD,SAASC,MAAM,QAAQ;AAIvB,OAAO,MAAMC,iBAAA,GAAkD;EAC7DC,IAAA,EAAM;EACNC,OAAA,EAAS;AACX;AAEA,MAAMC,cAAA,GAAiB;AACvB,MAAMC,YAAA,GAAe;AACrB,MAAMC,iBAAA,GAAoB;AAC1B,MAAMC,iBAAA,GAAoB;AAE1B,MAAMC,aAAA,gBAAgBT,QAAA;EAAAU,IAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,SAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,KAAA;IAAAC,OAAA;EAAA;EAAAC,MAAA;IAAAC,MAAA;IAAAF,OAAA;EAAA;EAAAG,GAAA;IAAAD,MAAA;EAAA;EAAAE,KAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;I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iBAAA,CAAkBE,OAAO,EAAE0E,KAAA,CAAM1E,OAAO,CAACiF,SAAS;EAC3F;EAEA,OAAOP,KAAA;AACT"}
|
1
|
+
{"version":3,"names":["mergeClasses","shorthands","__styles","tokens","dividerClassNames","root","wrapper","contentSpacing","insetSpacing","maxStartEndLength","minStartEndLength","useBaseStyles","base","Bt984gj","B7ck84d","mc9l5x","Beiy3e4","Bh6795r","qhf8xq","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","fsow6f","Bcvre1j","Br0sdwz","Bn78ew0","li1rpt","ap17g6","B771hl4","childless","susq4k","Bicfajf","jwcpgy","B4rk6o","start","Bsft5z2","center","Ftih45","end","brand","sj55zd","Bq4z7u6","Bk5zm6e","Bqjgrrk","Bm6vgfq","B0n5ga8","s924m2","B1q35kw","Gp14am","subtle","strong","d","useHorizontalStyles","a9b677","Bdkvgpv","B0qfbqy","pbipgd","Bm2nyyq","xrcqlc","i5u598","inset","uwmqm3","z189sj","Bxwl2t9","Iy66sp","useVerticalStyles","sshi5w","m598lv","B4f6apu","zkzzav","Barhvk9","Ihftqj","Bde111x","B6of3ja","jrapky","withChildren","Bbdr6tz","gn64ia","useDividerStyles_unstable","state","baseStyles","horizontalStyles","verticalStyles","alignContent","appearance","vertical","className","children","undefined"],"sources":["../../../../../../../../../packages/react-components/react-divider/src/components/Divider/useDividerStyles.ts"],"sourcesContent":["import { mergeClasses, shorthands, makeStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { DividerSlots, DividerState } from './Divider.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const dividerClassNames: SlotClassNames<DividerSlots> = {\n root: 'fui-Divider',\n wrapper: 'fui-Divider__wrapper',\n};\n\nconst contentSpacing = '12px';\nconst insetSpacing = '12px';\nconst maxStartEndLength = '8px';\nconst minStartEndLength = '8px;';\n\nconst useBaseStyles = makeStyles({\n // Base styles\n base: {\n alignItems: 'center',\n boxSizing: 'border-box',\n display: 'flex',\n flexDirection: 'row',\n flexGrow: 1,\n position: 'relative',\n\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n lineHeight: tokens.lineHeightBase200,\n textAlign: 'center',\n\n '::before': {\n boxSizing: 'border-box',\n display: 'flex',\n flexGrow: 1,\n },\n\n '::after': {\n boxSizing: 'border-box',\n display: 'flex',\n flexGrow: 1,\n },\n },\n\n // Childless styles\n childless: {\n '::before': {\n marginBottom: 0,\n marginRight: 0,\n },\n\n '::after': {\n marginLeft: 0,\n marginTop: 0,\n },\n },\n\n // Alignment variations\n start: {\n '::after': {\n content: '\"\"',\n },\n },\n center: {\n '::before': {\n content: '\"\"',\n },\n '::after': {\n content: '\"\"',\n },\n },\n end: {\n '::before': {\n content: '\"\"',\n },\n },\n\n // Appearance variations\n brand: {\n color: tokens.colorBrandForeground1,\n\n '::before': {\n ...shorthands.borderColor(tokens.colorBrandStroke1),\n },\n\n '::after': {\n ...shorthands.borderColor(tokens.colorBrandStroke1),\n },\n },\n default: {\n color: tokens.colorNeutralForeground2,\n\n '::before': {\n ...shorthands.borderColor(tokens.colorNeutralStroke2),\n },\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke2),\n },\n },\n subtle: {\n color: tokens.colorNeutralForeground2,\n\n '::before': {\n ...shorthands.borderColor(tokens.colorNeutralStroke3),\n },\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke3),\n },\n },\n strong: {\n color: tokens.colorNeutralForeground2,\n\n '::before': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n },\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n },\n },\n});\n\nconst useHorizontalStyles = makeStyles({\n // Base styles\n base: {\n width: '100%',\n\n '::before': {\n borderTopStyle: 'solid',\n borderTopWidth: tokens.strokeWidthThin,\n minWidth: minStartEndLength,\n },\n\n '::after': {\n borderTopStyle: 'solid',\n borderTopWidth: tokens.strokeWidthThin,\n minWidth: minStartEndLength,\n },\n },\n\n // Inset styles\n inset: {\n paddingLeft: insetSpacing,\n paddingRight: insetSpacing,\n },\n\n // Alignment variations\n start: {\n '::before': {\n content: '\"\"',\n marginRight: contentSpacing,\n maxWidth: maxStartEndLength,\n },\n\n '::after': {\n marginLeft: contentSpacing,\n },\n },\n center: {\n '::before': {\n marginRight: contentSpacing,\n },\n '::after': {\n marginLeft: contentSpacing,\n },\n },\n end: {\n '::before': {\n marginRight: contentSpacing,\n },\n '::after': {\n content: '\"\"',\n marginLeft: contentSpacing,\n maxWidth: maxStartEndLength,\n },\n },\n});\n\nconst useVerticalStyles = makeStyles({\n // Base styles\n base: {\n flexDirection: 'column',\n minHeight: '20px',\n\n '::before': {\n borderRightStyle: 'solid',\n borderRightWidth: tokens.strokeWidthThin,\n minHeight: minStartEndLength,\n },\n\n '::after': {\n borderRightStyle: 'solid',\n borderRightWidth: tokens.strokeWidthThin,\n minHeight: minStartEndLength,\n },\n },\n\n // Inset styles\n inset: {\n marginTop: insetSpacing,\n marginBottom: insetSpacing,\n },\n\n // With children styles\n withChildren: {\n minHeight: '84px',\n },\n\n // Alignment variations\n start: {\n '::before': {\n content: '\"\"',\n marginBottom: contentSpacing,\n maxHeight: maxStartEndLength,\n },\n\n '::after': {\n marginTop: contentSpacing,\n },\n },\n center: {\n '::before': {\n marginBottom: contentSpacing,\n },\n '::after': {\n marginTop: contentSpacing,\n },\n },\n end: {\n '::before': {\n marginBottom: contentSpacing,\n },\n '::after': {\n content: '\"\"',\n marginTop: contentSpacing,\n maxHeight: maxStartEndLength,\n },\n },\n});\n\nexport const useDividerStyles_unstable = (state: DividerState): DividerState => {\n const baseStyles = useBaseStyles();\n const horizontalStyles = useHorizontalStyles();\n const verticalStyles = useVerticalStyles();\n\n const { alignContent, appearance, inset, vertical } = state;\n\n state.root.className = mergeClasses(\n dividerClassNames.root,\n\n // Base styles\n baseStyles.base,\n baseStyles[alignContent],\n appearance && baseStyles[appearance],\n\n // Horizontal styles\n !vertical && horizontalStyles.base,\n !vertical && inset && horizontalStyles.inset,\n !vertical && horizontalStyles[alignContent],\n\n // Vertical styles\n vertical && verticalStyles.base,\n vertical && inset && verticalStyles.inset,\n vertical && verticalStyles[alignContent],\n vertical && state.root.children !== undefined && verticalStyles.withChildren,\n\n // Childless styles\n state.root.children === undefined && baseStyles.childless,\n\n // User provided class name\n state.root.className,\n );\n\n if (state.wrapper) {\n state.wrapper.className = mergeClasses(dividerClassNames.wrapper, state.wrapper.className);\n }\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,UAAU,EAAAC,QAAA,QAAoB,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAI9C,OAAO,MAAMC,iBAAiB,GAAiC;EAC7DC,IAAI,EAAE,aAAa;EACnBC,OAAO,EAAE;CACV;AAED,MAAMC,cAAc,GAAG,MAAM;AAC7B,MAAMC,YAAY,GAAG,MAAM;AAC3B,MAAMC,iBAAiB,GAAG,KAAK;AAC/B,MAAMC,iBAAiB,GAAG,MAAM;AAEhC,MAAMC,aAAa,gBAAGT,QAAA;EAAAU,IAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,SAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,KAAA;IAAAC,OAAA;EAAA;EAAAC,MAAA;IAAAC,MAAA;IAAAF,OAAA;EAAA;EAAAG,GAAA;IAAAD,MAAA;EAAA;EAAAE,KAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAA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AS,GAAGvF,YAAY,CAACI,iBAAiB,CAACE,OAAO,EAAE0E,KAAK,CAAC1E,OAAO,CAACiF,SAAS,CAAC;;EAG5F,OAAOP,KAAK;AACd,CAAC"}
|
package/lib/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export { Divider, dividerClassNames, renderDivider_unstable, useDividerStyles_unstable, useDivider_unstable } from
|
1
|
+
export { Divider, dividerClassNames, renderDivider_unstable, useDividerStyles_unstable, useDivider_unstable } from './Divider';
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Divider","dividerClassNames","renderDivider_unstable","useDividerStyles_unstable","useDivider_unstable"],"sources":["
|
1
|
+
{"version":3,"names":["Divider","dividerClassNames","renderDivider_unstable","useDividerStyles_unstable","useDivider_unstable"],"sources":["../../../../../../../packages/react-components/react-divider/src/index.ts"],"sourcesContent":["export {\n Divider,\n dividerClassNames,\n renderDivider_unstable,\n useDividerStyles_unstable,\n useDivider_unstable,\n} from './Divider';\nexport type { DividerProps, DividerSlots, DividerState } from './Divider';\n"],"mappings":"AAAA,SACEA,OAAO,EACPC,iBAAiB,EACjBC,sBAAsB,EACtBC,yBAAyB,EACzBC,mBAAmB,QACd,WAAW"}
|
package/lib-commonjs/Divider.js
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
+
value: true
|
4
5
|
});
|
5
|
-
const
|
6
|
-
|
7
|
-
//# sourceMappingURL=Divider.js.map
|
8
|
-
|
6
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
7
|
+
tslib_1.__exportStar(require("./components/Divider/index"), exports);
|
9
8
|
//# sourceMappingURL=Divider.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../../../../../../../packages/react-components/react-divider/src/Divider.ts"],"sourcesContent":["export * from './components/Divider/index';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,gCAAAC,OAAA"}
|
@@ -1,24 +1,25 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
-
});
|
5
|
-
Object.defineProperty(exports, "Divider", {
|
6
|
-
enumerable: true,
|
7
|
-
get: ()=>Divider
|
4
|
+
value: true
|
8
5
|
});
|
9
|
-
|
10
|
-
const
|
11
|
-
const
|
12
|
-
const
|
13
|
-
const
|
14
|
-
const
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
6
|
+
exports.Divider = void 0;
|
7
|
+
const React = /*#__PURE__*/require("react");
|
8
|
+
const renderDivider_1 = /*#__PURE__*/require("./renderDivider");
|
9
|
+
const useDivider_1 = /*#__PURE__*/require("./useDivider");
|
10
|
+
const useDividerStyles_1 = /*#__PURE__*/require("./useDividerStyles");
|
11
|
+
const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
|
12
|
+
/**
|
13
|
+
* A divider visually segments content into groups.
|
14
|
+
*/
|
15
|
+
exports.Divider = /*#__PURE__*/React.forwardRef((props, ref) => {
|
16
|
+
const state = useDivider_1.useDivider_unstable(props, ref);
|
17
|
+
useDividerStyles_1.useDividerStyles_unstable(state);
|
18
|
+
const {
|
19
|
+
useDividerStyles_unstable: useCustomStyles
|
20
|
+
} = react_shared_contexts_1.useCustomStyleHooks_unstable();
|
21
|
+
useCustomStyles(state);
|
22
|
+
return renderDivider_1.renderDivider_unstable(state);
|
21
23
|
});
|
22
|
-
Divider.displayName =
|
23
|
-
|
24
|
+
exports.Divider.displayName = 'Divider';
|
24
25
|
//# sourceMappingURL=Divider.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"names":["React","require","renderDivider_1","useDivider_1","useDividerStyles_1","react_shared_contexts_1","exports","Divider","forwardRef","props","ref","state","useDivider_unstable","useDividerStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderDivider_unstable","displayName"],"sources":["../../../../../../../../../packages/react-components/react-divider/src/components/Divider/Divider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderDivider_unstable } from './renderDivider';\nimport { useDivider_unstable } from './useDivider';\nimport { useDividerStyles_unstable } from './useDividerStyles';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { DividerProps } from './Divider.types';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A divider visually segments content into groups.\n */\nexport const Divider: ForwardRefComponent<DividerProps> = React.forwardRef((props, ref) => {\n const state = useDivider_unstable(props, ref);\n\n useDividerStyles_unstable(state);\n\n const { useDividerStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderDivider_unstable(state);\n});\n\nDivider.displayName = 'Divider';\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,eAAA,gBAAAD,OAAA;AACA,MAAAE,YAAA,gBAAAF,OAAA;AACA,MAAAG,kBAAA,gBAAAH,OAAA;AAGA,MAAAI,uBAAA,gBAAAJ,OAAA;AAEA;;;AAGaK,OAAA,CAAAC,OAAO,gBAAsCP,KAAK,CAACQ,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACxF,MAAMC,KAAK,GAAGR,YAAA,CAAAS,mBAAmB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAE7CN,kBAAA,CAAAS,yBAAyB,CAACF,KAAK,CAAC;EAEhC,MAAM;IAAEE,yBAAyB,EAAEC;EAAe,CAAE,GAAGT,uBAAA,CAAAU,4BAA4B,EAAE;EACrFD,eAAe,CAACH,KAAK,CAAC;EAEtB,OAAOT,eAAA,CAAAc,sBAAsB,CAACL,KAAK,CAAC;AACtC,CAAC,CAAC;AAEFL,OAAA,CAAAC,OAAO,CAACU,WAAW,GAAG,SAAS"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"names":[],"sources":["../../../../../../../../../packages/react-components/react-divider/src/components/Divider/Divider.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type DividerSlots = {\n /**\n * Root of the component that renders as a `<div>` tag.\n */\n root: Slot<'div'>;\n\n /**\n * Accessibility wrapper for content when presented.\n */\n wrapper: Slot<'div'>;\n};\n\nexport type DividerProps = ComponentProps<Partial<DividerSlots>> & {\n /**\n * Determines the alignment of the content within the divider.\n *\n * @default 'center'\n */\n alignContent?: 'start' | 'center' | 'end';\n\n /**\n * A divider can have one of the preset appearances.\n * When not specified, the divider has its default appearance.\n *\n * @default 'default'\n */\n appearance?: 'brand' | 'default' | 'strong' | 'subtle';\n\n /**\n * Adds padding to the beginning and end of the divider.\n *\n * @default false\n */\n inset?: boolean;\n\n /**\n * A divider can be horizontal (default) or vertical.\n *\n * @default false\n */\n vertical?: boolean;\n};\n\nexport type DividerState = ComponentState<DividerSlots> &\n Required<Pick<DividerProps, 'alignContent' | 'appearance' | 'inset' | 'vertical'>>;\n"],"mappings":""}
|
@@ -1,13 +1,12 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
+
value: true
|
4
5
|
});
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
//# sourceMappingURL=index.js.map
|
12
|
-
|
6
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
7
|
+
tslib_1.__exportStar(require("./Divider"), exports);
|
8
|
+
tslib_1.__exportStar(require("./Divider.types"), exports);
|
9
|
+
tslib_1.__exportStar(require("./renderDivider"), exports);
|
10
|
+
tslib_1.__exportStar(require("./useDivider"), exports);
|
11
|
+
tslib_1.__exportStar(require("./useDividerStyles"), exports);
|
13
12
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../../../../../../../../../packages/react-components/react-divider/src/components/Divider/index.ts"],"sourcesContent":["export * from './Divider';\nexport * from './Divider.types';\nexport * from './renderDivider';\nexport * from './useDivider';\nexport * from './useDividerStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,eAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,qBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,qBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,kBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,wBAAAC,OAAA"}
|
@@ -1,17 +1,24 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
-
});
|
5
|
-
Object.defineProperty(exports, "renderDivider_unstable", {
|
6
|
-
enumerable: true,
|
7
|
-
get: ()=>renderDivider_unstable
|
4
|
+
value: true
|
8
5
|
});
|
9
|
-
|
10
|
-
const
|
11
|
-
const
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
6
|
+
exports.renderDivider_unstable = void 0;
|
7
|
+
const React = /*#__PURE__*/require("react");
|
8
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
9
|
+
/**
|
10
|
+
* Renders a Divider component by passing the slot props (defined in `state`) to the appropriate slots.
|
11
|
+
*/
|
12
|
+
const renderDivider_unstable = state => {
|
13
|
+
const {
|
14
|
+
slots,
|
15
|
+
slotProps
|
16
|
+
} = react_utilities_1.getSlots(state);
|
17
|
+
return React.createElement(slots.root, {
|
18
|
+
...slotProps.root
|
19
|
+
}, slotProps.root.children !== undefined && React.createElement(slots.wrapper, {
|
20
|
+
...slotProps.wrapper
|
21
|
+
}, slotProps.root.children));
|
22
|
+
};
|
23
|
+
exports.renderDivider_unstable = renderDivider_unstable;
|
17
24
|
//# sourceMappingURL=renderDivider.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"names":["React","require","react_utilities_1","renderDivider_unstable","state","slots","slotProps","getSlots","createElement","root","children","undefined","wrapper","exports"],"sources":["../../../../../../../../../packages/react-components/react-divider/src/components/Divider/renderDivider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { DividerSlots, DividerState } from './Divider.types';\n\n/**\n * Renders a Divider component by passing the slot props (defined in `state`) to the appropriate slots.\n */\nexport const renderDivider_unstable = (state: DividerState) => {\n const { slots, slotProps } = getSlots<DividerSlots>(state);\n return (\n <slots.root {...slotProps.root}>\n {slotProps.root.children !== undefined && (\n <slots.wrapper {...slotProps.wrapper}>{slotProps.root.children}</slots.wrapper>\n )}\n </slots.root>\n );\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAGA;;;AAGO,MAAME,sBAAsB,GAAIC,KAAmB,IAAI;EAC5D,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,iBAAA,CAAAK,QAAQ,CAAeH,KAAK,CAAC;EAC1D,OACEJ,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,GAC3BH,SAAS,CAACG,IAAI,CAACC,QAAQ,KAAKC,SAAS,IACpCX,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACO,OAAO;IAAA,GAAKN,SAAS,CAACM;EAAO,GAAGN,SAAS,CAACG,IAAI,CAACC,QAAQ,CAC/D,CACU;AAEjB,CAAC;AATYG,OAAA,CAAAV,sBAAsB,GAAAA,sBAAA"}
|