@fluentui/react-divider 0.0.0-nightlyf8be6a7c6520220106.1 → 0.0.0-nightlyff78d1e27a20220217.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 +98 -17
- package/CHANGELOG.md +28 -10
- package/dist/react-divider.d.ts +8 -8
- 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.d.ts +6 -5
- package/lib/components/Divider/Divider.types.js.map +1 -1
- package/lib/components/Divider/index.js.map +1 -1
- package/lib/components/Divider/renderDivider.d.ts +1 -1
- package/lib/components/Divider/renderDivider.js +2 -2
- package/lib/components/Divider/renderDivider.js.map +1 -1
- package/lib/components/Divider/useDivider.d.ts +1 -1
- package/lib/components/Divider/useDivider.js +2 -1
- package/lib/components/Divider/useDivider.js.map +1 -1
- package/lib/components/Divider/useDividerStyles.d.ts +1 -1
- package/lib/components/Divider/useDividerStyles.js +15 -8
- package/lib/components/Divider/useDividerStyles.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Divider.js.map +1 -1
- package/lib-commonjs/components/Divider/Divider.js +3 -3
- package/lib-commonjs/components/Divider/Divider.js.map +1 -1
- package/lib-commonjs/components/Divider/Divider.types.d.ts +6 -5
- package/lib-commonjs/components/Divider/Divider.types.js.map +1 -1
- package/lib-commonjs/components/Divider/index.js.map +1 -1
- package/lib-commonjs/components/Divider/renderDivider.d.ts +1 -1
- package/lib-commonjs/components/Divider/renderDivider.js +4 -4
- package/lib-commonjs/components/Divider/renderDivider.js.map +1 -1
- package/lib-commonjs/components/Divider/useDivider.d.ts +1 -1
- package/lib-commonjs/components/Divider/useDivider.js +4 -3
- package/lib-commonjs/components/Divider/useDivider.js.map +1 -1
- package/lib-commonjs/components/Divider/useDividerStyles.d.ts +1 -1
- package/lib-commonjs/components/Divider/useDividerStyles.js +22 -14
- package/lib-commonjs/components/Divider/useDividerStyles.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +5 -7
package/CHANGELOG.json
CHANGED
@@ -2,23 +2,86 @@
|
|
2
2
|
"name": "@fluentui/react-divider",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "Thu,
|
6
|
-
"tag": "@fluentui/react-divider_v0.0.0-
|
7
|
-
"version": "0.0.0-
|
5
|
+
"date": "Thu, 17 Feb 2022 11:41:18 GMT",
|
6
|
+
"tag": "@fluentui/react-divider_v0.0.0-nightlyff78d1e27a20220217.1",
|
7
|
+
"version": "0.0.0-nightlyff78d1e27a20220217.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
11
11
|
"author": "email not defined",
|
12
12
|
"package": "@fluentui/react-divider",
|
13
|
-
"commit": "
|
13
|
+
"commit": "966e16625ca79f990ad8ca408ba47857adc522b3",
|
14
14
|
"comment": "Release nightly v9"
|
15
15
|
},
|
16
|
+
{
|
17
|
+
"author": "beachball",
|
18
|
+
"package": "@fluentui/react-divider",
|
19
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightlyff78d1e27a20220217.1",
|
20
|
+
"commit": "966e16625ca79f990ad8ca408ba47857adc522b3"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"author": "beachball",
|
24
|
+
"package": "@fluentui/react-divider",
|
25
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightlyff78d1e27a20220217.1",
|
26
|
+
"commit": "966e16625ca79f990ad8ca408ba47857adc522b3"
|
27
|
+
}
|
28
|
+
]
|
29
|
+
}
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"date": "Thu, 10 Feb 2022 08:51:10 GMT",
|
33
|
+
"tag": "@fluentui/react-divider_v9.0.0-rc.1",
|
34
|
+
"version": "9.0.0-rc.1",
|
35
|
+
"comments": {
|
36
|
+
"prerelease": [
|
37
|
+
{
|
38
|
+
"author": "gcox@microsoft.com",
|
39
|
+
"package": "@fluentui/react-divider",
|
40
|
+
"commit": "f6116328d6599342eef231f81d3c0724478a3d47",
|
41
|
+
"comment": "set minimum line length based on a11y review"
|
42
|
+
},
|
16
43
|
{
|
17
44
|
"author": "olfedias@microsoft.com",
|
18
45
|
"package": "@fluentui/react-divider",
|
19
46
|
"commit": "203cf1b61b1238c81ebe502678fe4714722cb435",
|
20
47
|
"comment": "update styles to not use CSS shorthands"
|
21
48
|
},
|
49
|
+
{
|
50
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
51
|
+
"package": "@fluentui/react-divider",
|
52
|
+
"commit": "e0b8e1fa6980077e7b311fd1c72c28d3e4305db0",
|
53
|
+
"comment": "Updating based on changes to composition types."
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
57
|
+
"package": "@fluentui/react-divider",
|
58
|
+
"commit": "034044d59be68915df76c57a84edc8299d3ca175",
|
59
|
+
"comment": "react-divider: Replacing use of functions in makeStyles with direct use of tokens."
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"author": "behowell@microsoft.com",
|
63
|
+
"package": "@fluentui/react-divider",
|
64
|
+
"commit": "7cc28ed8320b00f42d91c63882f10316db2205c5",
|
65
|
+
"comment": "Remove component's shorthandProps array"
|
66
|
+
},
|
67
|
+
{
|
68
|
+
"author": "mgodbolt@microsoft.com",
|
69
|
+
"package": "@fluentui/react-divider",
|
70
|
+
"commit": "839ec14849e112b85aa321d034739ec421199141",
|
71
|
+
"comment": "remove export of commons types"
|
72
|
+
},
|
73
|
+
{
|
74
|
+
"author": "lingfangao@hotmail.com",
|
75
|
+
"package": "@fluentui/react-divider",
|
76
|
+
"commit": "c00913d50e2dd15bbfbb0757cefe43b192ff1d7f",
|
77
|
+
"comment": "Bump Fluent UI packages to 9.0.0-rc"
|
78
|
+
},
|
79
|
+
{
|
80
|
+
"author": "gcox@microsoft.com",
|
81
|
+
"package": "@fluentui/react-divider",
|
82
|
+
"commit": "ae269d1c40fce9dcfb41d9dafa4678d025576201",
|
83
|
+
"comment": "Added aria-orientation to divider"
|
84
|
+
},
|
22
85
|
{
|
23
86
|
"author": "gcox@microsoft.com",
|
24
87
|
"package": "@fluentui/react-divider",
|
@@ -26,34 +89,40 @@
|
|
26
89
|
"comment": "Added missing descriptions to divider stories"
|
27
90
|
},
|
28
91
|
{
|
29
|
-
"author": "
|
92
|
+
"author": "behowell@microsoft.com",
|
30
93
|
"package": "@fluentui/react-divider",
|
31
|
-
"
|
32
|
-
"
|
94
|
+
"commit": "53b01d71e335715fda91b33e3d7bbd9d471d5ed3",
|
95
|
+
"comment": "Refactor component Slot typings"
|
33
96
|
},
|
34
97
|
{
|
35
|
-
"author": "
|
98
|
+
"author": "behowell@microsoft.com",
|
36
99
|
"package": "@fluentui/react-divider",
|
37
|
-
"
|
38
|
-
"
|
100
|
+
"commit": "317209bb5cd57c40f35bc42060acb7e3cce5ec95",
|
101
|
+
"comment": "BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet"
|
39
102
|
},
|
40
103
|
{
|
41
|
-
"author": "
|
104
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
105
|
+
"package": "@fluentui/react-divider",
|
106
|
+
"commit": "00a5d945904c896a0664de6ba72c145a255f0848",
|
107
|
+
"comment": "Updating use of tokens.fontWeight now that we don't need to use casting."
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"author": "olfedias@microsoft.com",
|
42
111
|
"package": "@fluentui/react-divider",
|
43
|
-
"
|
44
|
-
"
|
112
|
+
"commit": "7f2bb0ceb2a4d079c34fb58ebc9a5e15245a2cbe",
|
113
|
+
"comment": "Replace make-styles packages with griffel equivalents."
|
45
114
|
},
|
46
115
|
{
|
47
116
|
"author": "beachball",
|
48
117
|
"package": "@fluentui/react-divider",
|
49
|
-
"comment": "Bump @fluentui/
|
50
|
-
"commit": "
|
118
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-rc.1",
|
119
|
+
"commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
|
51
120
|
},
|
52
121
|
{
|
53
122
|
"author": "beachball",
|
54
123
|
"package": "@fluentui/react-divider",
|
55
|
-
"comment": "Bump @fluentui/react-conformance-
|
56
|
-
"commit": "
|
124
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.1",
|
125
|
+
"commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
|
57
126
|
}
|
58
127
|
],
|
59
128
|
"none": [
|
@@ -62,6 +131,18 @@
|
|
62
131
|
"package": "@fluentui/react-divider",
|
63
132
|
"commit": "57677496452840365886d4f12a98b62739e65286",
|
64
133
|
"comment": "Migration to ts config solution"
|
134
|
+
},
|
135
|
+
{
|
136
|
+
"author": "olfedias@microsoft.com",
|
137
|
+
"package": "@fluentui/react-divider",
|
138
|
+
"commit": "c061e98be4b4a718c72a144a1f60bb5515824612",
|
139
|
+
"comment": "remove inline-style-expand-shorthand from tsconfigs"
|
140
|
+
},
|
141
|
+
{
|
142
|
+
"author": "martinhochel@microsoft.com",
|
143
|
+
"package": "@fluentui/react-divider",
|
144
|
+
"commit": "8dfa712156b70414205b87b5b6d099367b0c297d",
|
145
|
+
"comment": "chore: use storybook runner for all vNext packages"
|
65
146
|
}
|
66
147
|
]
|
67
148
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,24 +1,42 @@
|
|
1
1
|
# Change Log - @fluentui/react-divider
|
2
2
|
|
3
|
-
This log was last generated on Thu,
|
3
|
+
This log was last generated on Thu, 17 Feb 2022 11:41:18 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-
|
7
|
+
## [0.0.0-nightlyff78d1e27a20220217.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-divider_v0.0.0-nightlyff78d1e27a20220217.1)
|
8
8
|
|
9
|
-
Thu,
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-divider_v9.0.0-
|
9
|
+
Thu, 17 Feb 2022 11:41:18 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-divider_v9.0.0-rc.1..@fluentui/react-divider_v0.0.0-nightlyff78d1e27a20220217.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
|
-
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/
|
14
|
+
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/966e16625ca79f990ad8ca408ba47857adc522b3) by email not defined)
|
15
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightlyff78d1e27a20220217.1 ([commit](https://github.com/microsoft/fluentui/commit/966e16625ca79f990ad8ca408ba47857adc522b3) by beachball)
|
16
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightlyff78d1e27a20220217.1 ([commit](https://github.com/microsoft/fluentui/commit/966e16625ca79f990ad8ca408ba47857adc522b3) by beachball)
|
17
|
+
|
18
|
+
## [9.0.0-rc.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-divider_v9.0.0-rc.1)
|
19
|
+
|
20
|
+
Thu, 10 Feb 2022 08:51:10 GMT
|
21
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-divider_v9.0.0-beta.4..@fluentui/react-divider_v9.0.0-rc.1)
|
22
|
+
|
23
|
+
### Changes
|
24
|
+
|
25
|
+
- set minimum line length based on a11y review ([PR #21362](https://github.com/microsoft/fluentui/pull/21362) by gcox@microsoft.com)
|
15
26
|
- update styles to not use CSS shorthands ([PR #20817](https://github.com/microsoft/fluentui/pull/20817) by olfedias@microsoft.com)
|
27
|
+
- Updating based on changes to composition types. ([PR #20891](https://github.com/microsoft/fluentui/pull/20891) by Humberto.Morimoto@microsoft.com)
|
28
|
+
- react-divider: Replacing use of functions in makeStyles with direct use of tokens. ([PR #21043](https://github.com/microsoft/fluentui/pull/21043) by Humberto.Morimoto@microsoft.com)
|
29
|
+
- Remove component's shorthandProps array ([PR #21134](https://github.com/microsoft/fluentui/pull/21134) by behowell@microsoft.com)
|
30
|
+
- remove export of commons types ([PR #21660](https://github.com/microsoft/fluentui/pull/21660) by mgodbolt@microsoft.com)
|
31
|
+
- Bump Fluent UI packages to 9.0.0-rc ([PR #21623](https://github.com/microsoft/fluentui/pull/21623) by lingfangao@hotmail.com)
|
32
|
+
- Added aria-orientation to divider ([PR #21292](https://github.com/microsoft/fluentui/pull/21292) by gcox@microsoft.com)
|
16
33
|
- Added missing descriptions to divider stories ([PR #21067](https://github.com/microsoft/fluentui/pull/21067) by gcox@microsoft.com)
|
17
|
-
-
|
18
|
-
-
|
19
|
-
-
|
20
|
-
-
|
21
|
-
- Bump @fluentui/react-
|
34
|
+
- Refactor component Slot typings ([PR #21518](https://github.com/microsoft/fluentui/pull/21518) by behowell@microsoft.com)
|
35
|
+
- BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet ([PR #21365](https://github.com/microsoft/fluentui/pull/21365) by behowell@microsoft.com)
|
36
|
+
- Updating use of tokens.fontWeight now that we don't need to use casting. ([PR #21217](https://github.com/microsoft/fluentui/pull/21217) by Humberto.Morimoto@microsoft.com)
|
37
|
+
- Replace make-styles packages with griffel equivalents. ([PR #21433](https://github.com/microsoft/fluentui/pull/21433) by olfedias@microsoft.com)
|
38
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
|
39
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
|
22
40
|
|
23
41
|
## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-divider_v9.0.0-beta.4)
|
24
42
|
|
package/dist/react-divider.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import type { ComponentProps } from '@fluentui/react-utilities';
|
2
2
|
import type { ComponentState } from '@fluentui/react-utilities';
|
3
3
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
4
|
-
import type { IntrinsicShorthandProps } from '@fluentui/react-utilities';
|
5
4
|
import * as React_2 from 'react';
|
5
|
+
import type { Slot } from '@fluentui/react-utilities';
|
6
6
|
|
7
7
|
/**
|
8
8
|
* A divider visually segments content into groups.
|
@@ -11,7 +11,7 @@ export declare const Divider: ForwardRefComponent<DividerProps>;
|
|
11
11
|
|
12
12
|
export declare const dividerClassName = "fui-Divider";
|
13
13
|
|
14
|
-
|
14
|
+
declare type DividerCommons = {
|
15
15
|
/**
|
16
16
|
* Determines the alignment of the content within the divider.
|
17
17
|
* @defaultvalue 'center'
|
@@ -34,17 +34,17 @@ export declare type DividerCommons = {
|
|
34
34
|
vertical: boolean;
|
35
35
|
};
|
36
36
|
|
37
|
-
export declare type DividerProps = ComponentProps<DividerSlots
|
37
|
+
export declare type DividerProps = ComponentProps<Partial<DividerSlots>> & Partial<DividerCommons>;
|
38
38
|
|
39
39
|
export declare type DividerSlots = {
|
40
40
|
/**
|
41
41
|
* Root of the component that renders as a `<div>` tag.
|
42
42
|
*/
|
43
|
-
root:
|
43
|
+
root: Slot<'div'>;
|
44
44
|
/**
|
45
45
|
* Accessibility wrapper for content when presented.
|
46
46
|
*/
|
47
|
-
wrapper:
|
47
|
+
wrapper: Slot<'div'>;
|
48
48
|
};
|
49
49
|
|
50
50
|
export declare type DividerState = ComponentState<DividerSlots> & DividerCommons;
|
@@ -52,15 +52,15 @@ export declare type DividerState = ComponentState<DividerSlots> & DividerCommons
|
|
52
52
|
/**
|
53
53
|
* Renders a Divider component by passing the slot props (defined in `state`) to the appropriate slots.
|
54
54
|
*/
|
55
|
-
export declare const
|
55
|
+
export declare const renderDivider_unstable: (state: DividerState) => JSX.Element;
|
56
56
|
|
57
57
|
/**
|
58
58
|
* Returns the props and state required to render the component
|
59
59
|
* @param props - User-provided props to the Divider component.
|
60
60
|
* @param ref - User-provided ref to be passed to the Divider component.
|
61
61
|
*/
|
62
|
-
export declare const
|
62
|
+
export declare const useDivider_unstable: (props: DividerProps, ref: React_2.Ref<HTMLElement>) => DividerState;
|
63
63
|
|
64
|
-
export declare const
|
64
|
+
export declare const useDividerStyles_unstable: (state: DividerState) => DividerState;
|
65
65
|
|
66
66
|
export { }
|
package/lib/Divider.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Divider.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"Divider.js","sourceRoot":"../src/","sources":["Divider.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC","sourcesContent":["export * from './components/Divider/index';\n"]}
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
2
|
+
import { renderDivider_unstable } from './renderDivider';
|
3
|
+
import { useDivider_unstable } from './useDivider';
|
4
|
+
import { useDividerStyles_unstable } from './useDividerStyles';
|
5
5
|
/**
|
6
6
|
* A divider visually segments content into groups.
|
7
7
|
*/
|
8
8
|
|
9
9
|
export const Divider = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
|
-
const state =
|
11
|
-
|
12
|
-
return
|
10
|
+
const state = useDivider_unstable(props, ref);
|
11
|
+
useDividerStyles_unstable(state);
|
12
|
+
return renderDivider_unstable(state);
|
13
13
|
});
|
14
14
|
Divider.displayName = 'Divider';
|
15
15
|
//# sourceMappingURL=Divider.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/Divider/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,sBAAT,QAAuC,iBAAvC;AACA,SAAS,mBAAT,QAAoC,cAApC;AACA,SAAS,yBAAT,QAA0C,oBAA1C;AAIA;;AAEG;;AACH,OAAO,MAAM,OAAO,gBAAsC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACxF,QAAM,KAAK,GAAG,mBAAmB,CAAC,KAAD,EAAQ,GAAR,CAAjC;AAEA,EAAA,yBAAyB,CAAC,KAAD,CAAzB;AAEA,SAAO,sBAAsB,CAAC,KAAD,CAA7B;AACD,CANyD,CAAnD;AAQP,OAAO,CAAC,WAAR,GAAsB,SAAtB","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';\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 return renderDivider_unstable(state);\n});\n\nDivider.displayName = 'Divider';\n"],"sourceRoot":"../src/"}
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import type { ComponentProps, ComponentState,
|
1
|
+
import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
|
2
2
|
export declare type DividerSlots = {
|
3
3
|
/**
|
4
4
|
* Root of the component that renders as a `<div>` tag.
|
5
5
|
*/
|
6
|
-
root:
|
6
|
+
root: Slot<'div'>;
|
7
7
|
/**
|
8
8
|
* Accessibility wrapper for content when presented.
|
9
9
|
*/
|
10
|
-
wrapper:
|
10
|
+
wrapper: Slot<'div'>;
|
11
11
|
};
|
12
|
-
|
12
|
+
declare type DividerCommons = {
|
13
13
|
/**
|
14
14
|
* Determines the alignment of the content within the divider.
|
15
15
|
* @defaultvalue 'center'
|
@@ -31,5 +31,6 @@ export declare type DividerCommons = {
|
|
31
31
|
*/
|
32
32
|
vertical: boolean;
|
33
33
|
};
|
34
|
-
export declare type DividerProps = ComponentProps<DividerSlots
|
34
|
+
export declare type DividerProps = ComponentProps<Partial<DividerSlots>> & Partial<DividerCommons>;
|
35
35
|
export declare type DividerState = ComponentState<DividerSlots> & DividerCommons;
|
36
|
+
export {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Divider.types.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"Divider.types.js","sourceRoot":"../src/","sources":["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\ntype DividerCommons = {\n /**\n * Determines the alignment of the content within the divider.\n * @defaultvalue '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 appearance?: 'brand' | 'strong' | 'subtle';\n\n /**\n * Adds padding to the beginning and end of the divider.\n * @default false\n */\n inset: boolean;\n\n /**\n * A divider can be horizontal (default) or vertical.\n * @default false\n */\n vertical: boolean;\n};\n\nexport type DividerProps = ComponentProps<Partial<DividerSlots>> & Partial<DividerCommons>;\n\nexport type DividerState = ComponentState<DividerSlots> & DividerCommons;\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["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"]}
|
@@ -2,4 +2,4 @@ import { DividerState } from './Divider.types';
|
|
2
2
|
/**
|
3
3
|
* Renders a Divider component by passing the slot props (defined in `state`) to the appropriate slots.
|
4
4
|
*/
|
5
|
-
export declare const
|
5
|
+
export declare const renderDivider_unstable: (state: DividerState) => JSX.Element;
|
@@ -4,11 +4,11 @@ import { getSlots } from '@fluentui/react-utilities';
|
|
4
4
|
* Renders a Divider component by passing the slot props (defined in `state`) to the appropriate slots.
|
5
5
|
*/
|
6
6
|
|
7
|
-
export const
|
7
|
+
export const renderDivider_unstable = state => {
|
8
8
|
const {
|
9
9
|
slots,
|
10
10
|
slotProps
|
11
|
-
} = getSlots(state
|
11
|
+
} = getSlots(state);
|
12
12
|
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
13
13
|
}, slotProps.root.children !== undefined && /*#__PURE__*/React.createElement(slots.wrapper, { ...slotProps.wrapper
|
14
14
|
}, slotProps.root.children));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/Divider/renderDivider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,sBAAsB,GAAI,KAAD,IAAwB;AAC5D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAe,KAAf,CAArC;AACA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,SAAS,CAAC,IAAV,CAAe,QAAf,KAA4B,SAA5B,iBACC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;AAAf,GAAd,EAAuC,SAAS,CAAC,IAAV,CAAe,QAAtD,CAFJ,CADF;AAOD,CATM","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"],"sourceRoot":"../src/"}
|
@@ -5,4 +5,4 @@ import type { DividerProps, DividerState } from './Divider.types';
|
|
5
5
|
* @param props - User-provided props to the Divider component.
|
6
6
|
* @param ref - User-provided ref to be passed to the Divider component.
|
7
7
|
*/
|
8
|
-
export declare const
|
8
|
+
export declare const useDivider_unstable: (props: DividerProps, ref: React.Ref<HTMLElement>) => DividerState;
|
@@ -5,7 +5,7 @@ import { getNativeElementProps, resolveShorthand, useId } from '@fluentui/react-
|
|
5
5
|
* @param ref - User-provided ref to be passed to the Divider component.
|
6
6
|
*/
|
7
7
|
|
8
|
-
export const
|
8
|
+
export const useDivider_unstable = (props, ref) => {
|
9
9
|
const {
|
10
10
|
alignContent = 'center',
|
11
11
|
appearance,
|
@@ -28,6 +28,7 @@ export const useDivider = (props, ref) => {
|
|
28
28
|
root: getNativeElementProps('div', { ...props,
|
29
29
|
ref,
|
30
30
|
role: 'separator',
|
31
|
+
'aria-orientation': vertical ? 'vertical' : 'horizontal',
|
31
32
|
'aria-labelledby': props.children ? dividerId : undefined
|
32
33
|
}),
|
33
34
|
wrapper: resolveShorthand(wrapper, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/Divider/useDivider.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,gBAAhC,EAAkD,KAAlD,QAA+D,2BAA/D;AAGA;;;;AAIG;;AACH,OAAO,MAAM,mBAAmB,GAAG,CAAC,KAAD,EAAsB,GAAtB,KAAmE;AACpG,QAAM;AAAE,IAAA,YAAY,GAAG,QAAjB;AAA2B,IAAA,UAA3B;AAAuC,IAAA,KAAK,GAAG,KAA/C;AAAsD,IAAA,QAAQ,GAAG,KAAjE;AAAwE,IAAA;AAAxE,MAAoF,KAA1F;AACA,QAAM,SAAS,GAAG,KAAK,CAAC,UAAD,CAAvB;AAEA,SAAO;AACL;AACA,IAAA,YAFK;AAGL,IAAA,UAHK;AAIL,IAAA,KAJK;AAKL,IAAA,QALK;AAOL;AACA,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,OAAO,EAAE;AAFC,KARP;AAaL,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ,EACjC,GAAG,KAD8B;AAEjC,MAAA,GAFiC;AAGjC,MAAA,IAAI,EAAE,WAH2B;AAIjC,0BAAoB,QAAQ,GAAG,UAAH,GAAgB,YAJX;AAKjC,yBAAmB,KAAK,CAAC,QAAN,GAAiB,SAAjB,GAA6B;AALf,KAAR,CAbtB;AAoBL,IAAA,OAAO,EAAE,gBAAgB,CAAC,OAAD,EAAU;AACjC,MAAA,QAAQ,EAAE,IADuB;AAEjC,MAAA,YAAY,EAAE;AACZ,QAAA,EAAE,EAAE,SADQ;AAEZ,QAAA,QAAQ,EAAE,KAAK,CAAC;AAFJ;AAFmB,KAAV;AApBpB,GAAP;AA4BD,CAhCM","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, 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 ...props,\n ref,\n role: 'separator',\n 'aria-orientation': vertical ? 'vertical' : 'horizontal',\n 'aria-labelledby': props.children ? dividerId : undefined,\n }),\n wrapper: resolveShorthand(wrapper, {\n required: true,\n defaultProps: {\n id: dividerId,\n children: props.children,\n },\n }),\n };\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,8 +1,10 @@
|
|
1
|
-
import { mergeClasses, shorthands, __styles } from '@
|
1
|
+
import { mergeClasses, shorthands, __styles } from '@griffel/react';
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
2
3
|
export const dividerClassName = 'fui-Divider';
|
3
4
|
const contentSpacing = '12px';
|
4
5
|
const insetSpacing = '12px';
|
5
|
-
const
|
6
|
+
const maxStartEndLength = '8px';
|
7
|
+
const minStartEndLength = '8px;';
|
6
8
|
|
7
9
|
const useBaseStyles = /*#__PURE__*/__styles({
|
8
10
|
"base": {
|
@@ -16,6 +18,7 @@ const useBaseStyles = /*#__PURE__*/__styles({
|
|
16
18
|
"Be2twd7": "fy9rknc",
|
17
19
|
"Bhrd7zp": "figsok6",
|
18
20
|
"Bg96gwp": "fwrc4pm",
|
21
|
+
"fsow6f": "f17mccla",
|
19
22
|
"sj55zd": "fkfq4zb",
|
20
23
|
"Bmqnesq": "f170vdtw",
|
21
24
|
"pmf9yy": "fkmkm9e",
|
@@ -80,7 +83,7 @@ const useBaseStyles = /*#__PURE__*/__styles({
|
|
80
83
|
"Bpbi4o9": ["f10n3jjp", "f4wmtn9"]
|
81
84
|
}
|
82
85
|
}, {
|
83
|
-
"d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f1ewtqcl{box-sizing:border-box;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f10pi13n{position:relative;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".f170vdtw:before{box-sizing:border-box;}", ".fkmkm9e:before{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fbxxcv3:before{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1vdjgj:before{border-top-color:var(--colorNeutralStroke2);}", ".fz0g6r7:before{border-right-color:var(--colorNeutralStroke2);}", ".f1h60vep:before{border-left-color:var(--colorNeutralStroke2);}", ".fn9f2qq:before{border-bottom-color:var(--colorNeutralStroke2);}", ".ffdc0f3:after{box-sizing:border-box;}", ".fsnc50s:after{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fjrry2l:after{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".fii7hsz:after{border-top-color:var(--colorNeutralStroke2);}", ".fp9yzmz:after{border-right-color:var(--colorNeutralStroke2);}", ".f1n0fcl2:after{border-left-color:var(--colorNeutralStroke2);}", ".f13jg1wd:after{border-bottom-color:var(--colorNeutralStroke2);}", ".fc3uzr1:before{margin-bottom:0;}", ".fhlqc5k:before{margin-right:0;}", ".flnsm0g:before{margin-left:0;}", ".f1957mjw:after{margin-left:0;}", ".fxrad5j:after{margin-right:0;}", ".f1hmx8el:after{margin-top:0;}", ".fqc6z8f:after{content:\"\";}", ".fuzzvh5:before{content:\"\";}", ".f16muhyy{color:var(--colorBrandForeground1);}", ".fob59v2:before{border-top-color:var(--colorBrandStroke1);}", ".f2pevzt:before{border-right-color:var(--colorBrandStroke1);}", ".fuyeql9:before{border-left-color:var(--colorBrandStroke1);}", ".f14lh9hz:before{border-bottom-color:var(--colorBrandStroke1);}", ".fd73d1p:after{border-top-color:var(--colorBrandStroke1);}", ".f11ucet6:after{border-right-color:var(--colorBrandStroke1);}", ".f1yegzx5:after{border-left-color:var(--colorBrandStroke1);}", ".f1tupb0d:after{border-bottom-color:var(--colorBrandStroke1);}", ".f8mhi1x:before{border-top-color:var(--colorNeutralStroke3);}", ".f18m2ouc:before{border-right-color:var(--colorNeutralStroke3);}", ".fddukvx:before{border-left-color:var(--colorNeutralStroke3);}", ".f9zmk3m:before{border-bottom-color:var(--colorNeutralStroke3);}", ".fxli1ey:after{border-top-color:var(--colorNeutralStroke3);}", ".f1qvt1bb:after{border-right-color:var(--colorNeutralStroke3);}", ".f5ob950:after{border-left-color:var(--colorNeutralStroke3);}", ".f1nn0kgk:after{border-bottom-color:var(--colorNeutralStroke3);}", ".fkxqtrn:before{border-top-color:var(--colorNeutralStroke1);}", ".f1yx8xct:before{border-right-color:var(--colorNeutralStroke1);}", ".f2jll41:before{border-left-color:var(--colorNeutralStroke1);}", ".f1k9rjtw:before{border-bottom-color:var(--colorNeutralStroke1);}", ".f1i58boq:after{border-top-color:var(--colorNeutralStroke1);}", ".f4wmtn9:after{border-right-color:var(--colorNeutralStroke1);}", ".f10n3jjp:after{border-left-color:var(--colorNeutralStroke1);}", ".ft17it6:after{border-bottom-color:var(--colorNeutralStroke1);}"]
|
86
|
+
"d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f1ewtqcl{box-sizing:border-box;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f10pi13n{position:relative;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".f17mccla{text-align:center;}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".f170vdtw:before{box-sizing:border-box;}", ".fkmkm9e:before{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fbxxcv3:before{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1vdjgj:before{border-top-color:var(--colorNeutralStroke2);}", ".fz0g6r7:before{border-right-color:var(--colorNeutralStroke2);}", ".f1h60vep:before{border-left-color:var(--colorNeutralStroke2);}", ".fn9f2qq:before{border-bottom-color:var(--colorNeutralStroke2);}", ".ffdc0f3:after{box-sizing:border-box;}", ".fsnc50s:after{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fjrry2l:after{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".fii7hsz:after{border-top-color:var(--colorNeutralStroke2);}", ".fp9yzmz:after{border-right-color:var(--colorNeutralStroke2);}", ".f1n0fcl2:after{border-left-color:var(--colorNeutralStroke2);}", ".f13jg1wd:after{border-bottom-color:var(--colorNeutralStroke2);}", ".fc3uzr1:before{margin-bottom:0;}", ".fhlqc5k:before{margin-right:0;}", ".flnsm0g:before{margin-left:0;}", ".f1957mjw:after{margin-left:0;}", ".fxrad5j:after{margin-right:0;}", ".f1hmx8el:after{margin-top:0;}", ".fqc6z8f:after{content:\"\";}", ".fuzzvh5:before{content:\"\";}", ".f16muhyy{color:var(--colorBrandForeground1);}", ".fob59v2:before{border-top-color:var(--colorBrandStroke1);}", ".f2pevzt:before{border-right-color:var(--colorBrandStroke1);}", ".fuyeql9:before{border-left-color:var(--colorBrandStroke1);}", ".f14lh9hz:before{border-bottom-color:var(--colorBrandStroke1);}", ".fd73d1p:after{border-top-color:var(--colorBrandStroke1);}", ".f11ucet6:after{border-right-color:var(--colorBrandStroke1);}", ".f1yegzx5:after{border-left-color:var(--colorBrandStroke1);}", ".f1tupb0d:after{border-bottom-color:var(--colorBrandStroke1);}", ".f8mhi1x:before{border-top-color:var(--colorNeutralStroke3);}", ".f18m2ouc:before{border-right-color:var(--colorNeutralStroke3);}", ".fddukvx:before{border-left-color:var(--colorNeutralStroke3);}", ".f9zmk3m:before{border-bottom-color:var(--colorNeutralStroke3);}", ".fxli1ey:after{border-top-color:var(--colorNeutralStroke3);}", ".f1qvt1bb:after{border-right-color:var(--colorNeutralStroke3);}", ".f5ob950:after{border-left-color:var(--colorNeutralStroke3);}", ".f1nn0kgk:after{border-bottom-color:var(--colorNeutralStroke3);}", ".fkxqtrn:before{border-top-color:var(--colorNeutralStroke1);}", ".f1yx8xct:before{border-right-color:var(--colorNeutralStroke1);}", ".f2jll41:before{border-left-color:var(--colorNeutralStroke1);}", ".f1k9rjtw:before{border-bottom-color:var(--colorNeutralStroke1);}", ".f1i58boq:after{border-top-color:var(--colorNeutralStroke1);}", ".f4wmtn9:after{border-right-color:var(--colorNeutralStroke1);}", ".f10n3jjp:after{border-left-color:var(--colorNeutralStroke1);}", ".ft17it6:after{border-bottom-color:var(--colorNeutralStroke1);}"]
|
84
87
|
});
|
85
88
|
|
86
89
|
const useHorizontalStyles = /*#__PURE__*/__styles({
|
@@ -88,8 +91,10 @@ const useHorizontalStyles = /*#__PURE__*/__styles({
|
|
88
91
|
"a9b677": "fly5x3f",
|
89
92
|
"Bdixowu": "f1bwkb58",
|
90
93
|
"dj0dih": "fn88edj",
|
94
|
+
"Bxms0xd": "f1lo4gz5",
|
91
95
|
"rskduk": "f1iq3fds",
|
92
|
-
"Bouo9z4": "f1oiuz89"
|
96
|
+
"Bouo9z4": "f1oiuz89",
|
97
|
+
"Bcqngy1": "f108ofon"
|
93
98
|
},
|
94
99
|
"inset": {
|
95
100
|
"uwmqm3": ["fjlbh76", "f11qrl6u"],
|
@@ -112,7 +117,7 @@ const useHorizontalStyles = /*#__PURE__*/__styles({
|
|
112
117
|
"B79fe3b": "f3tzpys"
|
113
118
|
}
|
114
119
|
}, {
|
115
|
-
"d": [".fly5x3f{width:100%;}", ".f1bwkb58:before{border-top-style:solid;}", ".fn88edj:before{border-top-width:var(--strokeWidthThin);}", ".f1iq3fds:after{border-top-style:solid;}", ".f1oiuz89:after{border-top-width:var(--strokeWidthThin);}", ".fjlbh76{padding-left:12px;}", ".f11qrl6u{padding-right:12px;}", ".fuzzvh5:before{content:\"\";}", ".fncq426:before{margin-right:12px;}", ".f12b5w6c:before{margin-left:12px;}", ".f19fn84r:before{max-width:8px;}", ".f1io6r2y:after{margin-left:12px;}", ".fn6j208:after{margin-right:12px;}", ".fqc6z8f:after{content:\"\";}", ".f3tzpys:after{max-width:8px;}"]
|
120
|
+
"d": [".fly5x3f{width:100%;}", ".f1bwkb58:before{border-top-style:solid;}", ".fn88edj:before{border-top-width:var(--strokeWidthThin);}", ".f1lo4gz5:before{min-width:8px;}", ".f1iq3fds:after{border-top-style:solid;}", ".f1oiuz89:after{border-top-width:var(--strokeWidthThin);}", ".f108ofon:after{min-width:8px;}", ".fjlbh76{padding-left:12px;}", ".f11qrl6u{padding-right:12px;}", ".fuzzvh5:before{content:\"\";}", ".fncq426:before{margin-right:12px;}", ".f12b5w6c:before{margin-left:12px;}", ".f19fn84r:before{max-width:8px;}", ".f1io6r2y:after{margin-left:12px;}", ".fn6j208:after{margin-right:12px;}", ".fqc6z8f:after{content:\"\";}", ".f3tzpys:after{max-width:8px;}"]
|
116
121
|
});
|
117
122
|
|
118
123
|
const useVerticalStyles = /*#__PURE__*/__styles({
|
@@ -121,8 +126,10 @@ const useVerticalStyles = /*#__PURE__*/__styles({
|
|
121
126
|
"sshi5w": "f16gbxbe",
|
122
127
|
"cqycoz": ["fiio4mc", "fc8z0qo"],
|
123
128
|
"D4ky5z": ["f54lnp5", "f5hao24"],
|
129
|
+
"Bxq2otu": "f11zhyjz",
|
124
130
|
"Dctjco": ["f1r2jemi", "f11olovk"],
|
125
|
-
"Bjz4wo8": ["f1o2ol1z", "f20720x"]
|
131
|
+
"Bjz4wo8": ["f1o2ol1z", "f20720x"],
|
132
|
+
"B5p8dqe": "f14bbtgr"
|
126
133
|
},
|
127
134
|
"inset": {
|
128
135
|
"B6of3ja": "f1xdg43u",
|
@@ -148,10 +155,10 @@ const useVerticalStyles = /*#__PURE__*/__styles({
|
|
148
155
|
"iiodbw": "fp342oa"
|
149
156
|
}
|
150
157
|
}, {
|
151
|
-
"d": [".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f16gbxbe{min-height:20px;}", ".fiio4mc:before{border-right-style:solid;}", ".fc8z0qo:before{border-left-style:solid;}", ".f54lnp5:before{border-right-width:var(--strokeWidthThin);}", ".f5hao24:before{border-left-width:var(--strokeWidthThin);}", ".f1r2jemi:after{border-right-style:solid;}", ".f11olovk:after{border-left-style:solid;}", ".f1o2ol1z:after{border-right-width:var(--strokeWidthThin);}", ".f20720x:after{border-left-width:var(--strokeWidthThin);}", ".f1xdg43u{margin-top:12px;}", ".f1jlhsmd{margin-bottom:12px;}", ".f1tjaq3g{min-height:84px;}", ".fuzzvh5:before{content:\"\";}", ".f1xy8239:before{margin-bottom:12px;}", ".f1hheky8:before{max-height:8px;}", ".f1mz1b17:after{margin-top:12px;}", ".fqc6z8f:after{content:\"\";}", ".fp342oa:after{max-height:8px;}"]
|
158
|
+
"d": [".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f16gbxbe{min-height:20px;}", ".fiio4mc:before{border-right-style:solid;}", ".fc8z0qo:before{border-left-style:solid;}", ".f54lnp5:before{border-right-width:var(--strokeWidthThin);}", ".f5hao24:before{border-left-width:var(--strokeWidthThin);}", ".f11zhyjz:before{min-height:8px;}", ".f1r2jemi:after{border-right-style:solid;}", ".f11olovk:after{border-left-style:solid;}", ".f1o2ol1z:after{border-right-width:var(--strokeWidthThin);}", ".f20720x:after{border-left-width:var(--strokeWidthThin);}", ".f14bbtgr:after{min-height:8px;}", ".f1xdg43u{margin-top:12px;}", ".f1jlhsmd{margin-bottom:12px;}", ".f1tjaq3g{min-height:84px;}", ".fuzzvh5:before{content:\"\";}", ".f1xy8239:before{margin-bottom:12px;}", ".f1hheky8:before{max-height:8px;}", ".f1mz1b17:after{margin-top:12px;}", ".fqc6z8f:after{content:\"\";}", ".fp342oa:after{max-height:8px;}"]
|
152
159
|
});
|
153
160
|
|
154
|
-
export const
|
161
|
+
export const useDividerStyles_unstable = state => {
|
155
162
|
const baseStyles = useBaseStyles();
|
156
163
|
const horizontalStyles = useHorizontalStyles();
|
157
164
|
const verticalStyles = useVerticalStyles();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/Divider/useDividerStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,EAAuB,UAAvB,kBAAqD,gBAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,OAAO,MAAM,gBAAgB,GAAG,aAAzB;AAEP,MAAM,cAAc,GAAG,MAAvB;AACA,MAAM,YAAY,GAAG,MAArB;AACA,MAAM,iBAAiB,GAAG,KAA1B;AACA,MAAM,iBAAiB,GAAG,MAA1B;;AAEA,MAAM,aAAa,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAtB;;AAkGA,MAAM,mBAAmB,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAA5B;;AAwDA,MAAM,iBAAiB,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAA1B;;AA8DA,OAAO,MAAM,yBAAyB,GAAI,KAAD,IAAsC;AAC7E,QAAM,UAAU,GAAG,aAAa,EAAhC;AACA,QAAM,gBAAgB,GAAG,mBAAmB,EAA5C;AACA,QAAM,cAAc,GAAG,iBAAiB,EAAxC;AAEA,QAAM;AAAE,IAAA,YAAF;AAAgB,IAAA,UAAhB;AAA4B,IAAA,KAA5B;AAAmC,IAAA;AAAnC,MAAgD,KAAtD;AAEA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,gBADiC,EAGjC;AACA,EAAA,UAAU,CAAC,IAJsB,EAKjC,UAAU,CAAC,YAAD,CALuB,EAMjC,UAAU,IAAI,UAAU,CAAC,UAAD,CANS,EAQjC;AACA,GAAC,QAAD,IAAa,gBAAgB,CAAC,IATG,EAUjC,CAAC,QAAD,IAAa,KAAb,IAAsB,gBAAgB,CAAC,KAVN,EAWjC,CAAC,QAAD,IAAa,gBAAgB,CAAC,YAAD,CAXI,EAajC;AACA,EAAA,QAAQ,IAAI,cAAc,CAAC,IAdM,EAejC,QAAQ,IAAI,KAAZ,IAAqB,cAAc,CAAC,KAfH,EAgBjC,QAAQ,IAAI,cAAc,CAAC,YAAD,CAhBO,EAiBjC,QAAQ,IAAI,KAAK,CAAC,IAAN,CAAW,QAAX,KAAwB,SAApC,IAAiD,cAAc,CAAC,YAjB/B,EAmBjC;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,QAAX,KAAwB,SAAxB,IAAqC,UAAU,CAAC,SApBf,EAsBjC;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAvBsB,CAAnC;AA0BA,SAAO,KAAP;AACD,CAlCM","sourcesContent":["import { mergeClasses, shorthands, makeStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { DividerState } from './Divider.types';\n\nexport const dividerClassName = 'fui-Divider';\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 color: tokens.colorNeutralForeground2,\n\n ':before': {\n boxSizing: 'border-box',\n display: 'flex',\n flexGrow: 1,\n ...shorthands.borderColor(tokens.colorNeutralStroke2),\n },\n\n ':after': {\n boxSizing: 'border-box',\n display: 'flex',\n flexGrow: 1,\n ...shorthands.borderColor(tokens.colorNeutralStroke2),\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 subtle: {\n ':before': {\n ...shorthands.borderColor(tokens.colorNeutralStroke3),\n },\n\n ':after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke3),\n },\n },\n strong: {\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 dividerClassName,\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 return state;\n};\n"],"sourceRoot":"../src/"}
|
package/lib/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC","sourcesContent":["export * from './Divider';\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["Divider.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,4BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/Divider/index';\n"],"sourceRoot":"../src/"}
|
@@ -18,9 +18,9 @@ const useDividerStyles_1 = /*#__PURE__*/require("./useDividerStyles");
|
|
18
18
|
|
19
19
|
|
20
20
|
exports.Divider = /*#__PURE__*/React.forwardRef((props, ref) => {
|
21
|
-
const state = useDivider_1.
|
22
|
-
useDividerStyles_1.
|
23
|
-
return renderDivider_1.
|
21
|
+
const state = useDivider_1.useDivider_unstable(props, ref);
|
22
|
+
useDividerStyles_1.useDividerStyles_unstable(state);
|
23
|
+
return renderDivider_1.renderDivider_unstable(state);
|
24
24
|
});
|
25
25
|
exports.Divider.displayName = 'Divider';
|
26
26
|
//# sourceMappingURL=Divider.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/Divider/Divider.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AACA,MAAA,YAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;;AACA,MAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,OAAA,gBAA6C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACxF,QAAM,KAAK,GAAG,YAAA,CAAA,mBAAA,CAAoB,KAApB,EAA2B,GAA3B,CAAd;AAEA,EAAA,kBAAA,CAAA,yBAAA,CAA0B,KAA1B;AAEA,SAAO,eAAA,CAAA,sBAAA,CAAuB,KAAvB,CAAP;AACD,CANyD,CAA7C;AAQb,OAAA,CAAA,OAAA,CAAQ,WAAR,GAAsB,SAAtB","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';\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 return renderDivider_unstable(state);\n});\n\nDivider.displayName = 'Divider';\n"],"sourceRoot":"../src/"}
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import type { ComponentProps, ComponentState,
|
1
|
+
import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
|
2
2
|
export declare type DividerSlots = {
|
3
3
|
/**
|
4
4
|
* Root of the component that renders as a `<div>` tag.
|
5
5
|
*/
|
6
|
-
root:
|
6
|
+
root: Slot<'div'>;
|
7
7
|
/**
|
8
8
|
* Accessibility wrapper for content when presented.
|
9
9
|
*/
|
10
|
-
wrapper:
|
10
|
+
wrapper: Slot<'div'>;
|
11
11
|
};
|
12
|
-
|
12
|
+
declare type DividerCommons = {
|
13
13
|
/**
|
14
14
|
* Determines the alignment of the content within the divider.
|
15
15
|
* @defaultvalue 'center'
|
@@ -31,5 +31,6 @@ export declare type DividerCommons = {
|
|
31
31
|
*/
|
32
32
|
vertical: boolean;
|
33
33
|
};
|
34
|
-
export declare type DividerProps = ComponentProps<DividerSlots
|
34
|
+
export declare type DividerProps = ComponentProps<Partial<DividerSlots>> & Partial<DividerCommons>;
|
35
35
|
export declare type DividerState = ComponentState<DividerSlots> & DividerCommons;
|
36
|
+
export {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/Divider/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,WAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,cAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Divider';\nexport * from './Divider.types';\nexport * from './renderDivider';\nexport * from './useDivider';\nexport * from './useDividerStyles';\n"],"sourceRoot":"../src/"}
|
@@ -2,4 +2,4 @@ import { DividerState } from './Divider.types';
|
|
2
2
|
/**
|
3
3
|
* Renders a Divider component by passing the slot props (defined in `state`) to the appropriate slots.
|
4
4
|
*/
|
5
|
-
export declare const
|
5
|
+
export declare const renderDivider_unstable: (state: DividerState) => JSX.Element;
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.renderDivider_unstable = void 0;
|
7
7
|
|
8
8
|
const React = /*#__PURE__*/require("react");
|
9
9
|
|
@@ -13,15 +13,15 @@ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
13
13
|
*/
|
14
14
|
|
15
15
|
|
16
|
-
const
|
16
|
+
const renderDivider_unstable = state => {
|
17
17
|
const {
|
18
18
|
slots,
|
19
19
|
slotProps
|
20
|
-
} = react_utilities_1.getSlots(state
|
20
|
+
} = react_utilities_1.getSlots(state);
|
21
21
|
return React.createElement(slots.root, { ...slotProps.root
|
22
22
|
}, slotProps.root.children !== undefined && React.createElement(slots.wrapper, { ...slotProps.wrapper
|
23
23
|
}, slotProps.root.children));
|
24
24
|
};
|
25
25
|
|
26
|
-
exports.
|
26
|
+
exports.renderDivider_unstable = renderDivider_unstable;
|
27
27
|
//# sourceMappingURL=renderDivider.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/Divider/renderDivider.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,sBAAsB,GAAI,KAAD,IAAwB;AAC5D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAAuB,KAAvB,CAA7B;AACA,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,SAAS,CAAC,IAAV,CAAe,QAAf,KAA4B,SAA5B,IACC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;AAAf,GAAd,EAAuC,SAAS,CAAC,IAAV,CAAe,QAAtD,CAFJ,CADF;AAOD,CATM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","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"],"sourceRoot":"../src/"}
|
@@ -5,4 +5,4 @@ import type { DividerProps, DividerState } from './Divider.types';
|
|
5
5
|
* @param props - User-provided props to the Divider component.
|
6
6
|
* @param ref - User-provided ref to be passed to the Divider component.
|
7
7
|
*/
|
8
|
-
export declare const
|
8
|
+
export declare const useDivider_unstable: (props: DividerProps, ref: React.Ref<HTMLElement>) => DividerState;
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useDivider_unstable = void 0;
|
7
7
|
|
8
8
|
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
9
9
|
/**
|
@@ -13,7 +13,7 @@ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
13
13
|
*/
|
14
14
|
|
15
15
|
|
16
|
-
const
|
16
|
+
const useDivider_unstable = (props, ref) => {
|
17
17
|
const {
|
18
18
|
alignContent = 'center',
|
19
19
|
appearance,
|
@@ -36,6 +36,7 @@ const useDivider = (props, ref) => {
|
|
36
36
|
root: react_utilities_1.getNativeElementProps('div', { ...props,
|
37
37
|
ref,
|
38
38
|
role: 'separator',
|
39
|
+
'aria-orientation': vertical ? 'vertical' : 'horizontal',
|
39
40
|
'aria-labelledby': props.children ? dividerId : undefined
|
40
41
|
}),
|
41
42
|
wrapper: react_utilities_1.resolveShorthand(wrapper, {
|
@@ -48,5 +49,5 @@ const useDivider = (props, ref) => {
|
|
48
49
|
};
|
49
50
|
};
|
50
51
|
|
51
|
-
exports.
|
52
|
+
exports.useDivider_unstable = useDivider_unstable;
|
52
53
|
//# sourceMappingURL=useDivider.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/Divider/useDivider.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;;AAIG;;;AACI,MAAM,mBAAmB,GAAG,CAAC,KAAD,EAAsB,GAAtB,KAAmE;AACpG,QAAM;AAAE,IAAA,YAAY,GAAG,QAAjB;AAA2B,IAAA,UAA3B;AAAuC,IAAA,KAAK,GAAG,KAA/C;AAAsD,IAAA,QAAQ,GAAG,KAAjE;AAAwE,IAAA;AAAxE,MAAoF,KAA1F;AACA,QAAM,SAAS,GAAG,iBAAA,CAAA,KAAA,CAAM,UAAN,CAAlB;AAEA,SAAO;AACL;AACA,IAAA,YAFK;AAGL,IAAA,UAHK;AAIL,IAAA,KAJK;AAKL,IAAA,QALK;AAOL;AACA,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,OAAO,EAAE;AAFC,KARP;AAaL,IAAA,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B,EACjC,GAAG,KAD8B;AAEjC,MAAA,GAFiC;AAGjC,MAAA,IAAI,EAAE,WAH2B;AAIjC,0BAAoB,QAAQ,GAAG,UAAH,GAAgB,YAJX;AAKjC,yBAAmB,KAAK,CAAC,QAAN,GAAiB,SAAjB,GAA6B;AALf,KAA7B,CAbD;AAoBL,IAAA,OAAO,EAAE,iBAAA,CAAA,gBAAA,CAAiB,OAAjB,EAA0B;AACjC,MAAA,QAAQ,EAAE,IADuB;AAEjC,MAAA,YAAY,EAAE;AACZ,QAAA,EAAE,EAAE,SADQ;AAEZ,QAAA,QAAQ,EAAE,KAAK,CAAC;AAFJ;AAFmB,KAA1B;AApBJ,GAAP;AA4BD,CAhCM;;AAAM,OAAA,CAAA,mBAAA,GAAmB,mBAAnB","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, 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 ...props,\n ref,\n role: 'separator',\n 'aria-orientation': vertical ? 'vertical' : 'horizontal',\n 'aria-labelledby': props.children ? dividerId : undefined,\n }),\n wrapper: resolveShorthand(wrapper, {\n required: true,\n defaultProps: {\n id: dividerId,\n children: props.children,\n },\n }),\n };\n};\n"],"sourceRoot":"../src/"}
|
@@ -3,16 +3,19 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useDividerStyles_unstable = exports.dividerClassName = void 0;
|
7
7
|
|
8
|
-
const
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
|
+
|
10
|
+
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
9
11
|
|
10
12
|
exports.dividerClassName = 'fui-Divider';
|
11
13
|
const contentSpacing = '12px';
|
12
14
|
const insetSpacing = '12px';
|
13
|
-
const
|
15
|
+
const maxStartEndLength = '8px';
|
16
|
+
const minStartEndLength = '8px;';
|
14
17
|
|
15
|
-
const useBaseStyles = /*#__PURE__*/
|
18
|
+
const useBaseStyles = /*#__PURE__*/react_1.__styles({
|
16
19
|
"base": {
|
17
20
|
"Bt984gj": "f122n59",
|
18
21
|
"B7ck84d": "f1ewtqcl",
|
@@ -24,6 +27,7 @@ const useBaseStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
24
27
|
"Be2twd7": "fy9rknc",
|
25
28
|
"Bhrd7zp": "figsok6",
|
26
29
|
"Bg96gwp": "fwrc4pm",
|
30
|
+
"fsow6f": "f17mccla",
|
27
31
|
"sj55zd": "fkfq4zb",
|
28
32
|
"Bmqnesq": "f170vdtw",
|
29
33
|
"pmf9yy": "fkmkm9e",
|
@@ -88,16 +92,18 @@ const useBaseStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
88
92
|
"Bpbi4o9": ["f10n3jjp", "f4wmtn9"]
|
89
93
|
}
|
90
94
|
}, {
|
91
|
-
"d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f1ewtqcl{box-sizing:border-box;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f10pi13n{position:relative;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".f170vdtw:before{box-sizing:border-box;}", ".fkmkm9e:before{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fbxxcv3:before{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1vdjgj:before{border-top-color:var(--colorNeutralStroke2);}", ".fz0g6r7:before{border-right-color:var(--colorNeutralStroke2);}", ".f1h60vep:before{border-left-color:var(--colorNeutralStroke2);}", ".fn9f2qq:before{border-bottom-color:var(--colorNeutralStroke2);}", ".ffdc0f3:after{box-sizing:border-box;}", ".fsnc50s:after{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fjrry2l:after{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".fii7hsz:after{border-top-color:var(--colorNeutralStroke2);}", ".fp9yzmz:after{border-right-color:var(--colorNeutralStroke2);}", ".f1n0fcl2:after{border-left-color:var(--colorNeutralStroke2);}", ".f13jg1wd:after{border-bottom-color:var(--colorNeutralStroke2);}", ".fc3uzr1:before{margin-bottom:0;}", ".fhlqc5k:before{margin-right:0;}", ".flnsm0g:before{margin-left:0;}", ".f1957mjw:after{margin-left:0;}", ".fxrad5j:after{margin-right:0;}", ".f1hmx8el:after{margin-top:0;}", ".fqc6z8f:after{content:\"\";}", ".fuzzvh5:before{content:\"\";}", ".f16muhyy{color:var(--colorBrandForeground1);}", ".fob59v2:before{border-top-color:var(--colorBrandStroke1);}", ".f2pevzt:before{border-right-color:var(--colorBrandStroke1);}", ".fuyeql9:before{border-left-color:var(--colorBrandStroke1);}", ".f14lh9hz:before{border-bottom-color:var(--colorBrandStroke1);}", ".fd73d1p:after{border-top-color:var(--colorBrandStroke1);}", ".f11ucet6:after{border-right-color:var(--colorBrandStroke1);}", ".f1yegzx5:after{border-left-color:var(--colorBrandStroke1);}", ".f1tupb0d:after{border-bottom-color:var(--colorBrandStroke1);}", ".f8mhi1x:before{border-top-color:var(--colorNeutralStroke3);}", ".f18m2ouc:before{border-right-color:var(--colorNeutralStroke3);}", ".fddukvx:before{border-left-color:var(--colorNeutralStroke3);}", ".f9zmk3m:before{border-bottom-color:var(--colorNeutralStroke3);}", ".fxli1ey:after{border-top-color:var(--colorNeutralStroke3);}", ".f1qvt1bb:after{border-right-color:var(--colorNeutralStroke3);}", ".f5ob950:after{border-left-color:var(--colorNeutralStroke3);}", ".f1nn0kgk:after{border-bottom-color:var(--colorNeutralStroke3);}", ".fkxqtrn:before{border-top-color:var(--colorNeutralStroke1);}", ".f1yx8xct:before{border-right-color:var(--colorNeutralStroke1);}", ".f2jll41:before{border-left-color:var(--colorNeutralStroke1);}", ".f1k9rjtw:before{border-bottom-color:var(--colorNeutralStroke1);}", ".f1i58boq:after{border-top-color:var(--colorNeutralStroke1);}", ".f4wmtn9:after{border-right-color:var(--colorNeutralStroke1);}", ".f10n3jjp:after{border-left-color:var(--colorNeutralStroke1);}", ".ft17it6:after{border-bottom-color:var(--colorNeutralStroke1);}"]
|
95
|
+
"d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f1ewtqcl{box-sizing:border-box;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f10pi13n{position:relative;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".f17mccla{text-align:center;}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".f170vdtw:before{box-sizing:border-box;}", ".fkmkm9e:before{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fbxxcv3:before{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1vdjgj:before{border-top-color:var(--colorNeutralStroke2);}", ".fz0g6r7:before{border-right-color:var(--colorNeutralStroke2);}", ".f1h60vep:before{border-left-color:var(--colorNeutralStroke2);}", ".fn9f2qq:before{border-bottom-color:var(--colorNeutralStroke2);}", ".ffdc0f3:after{box-sizing:border-box;}", ".fsnc50s:after{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fjrry2l:after{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".fii7hsz:after{border-top-color:var(--colorNeutralStroke2);}", ".fp9yzmz:after{border-right-color:var(--colorNeutralStroke2);}", ".f1n0fcl2:after{border-left-color:var(--colorNeutralStroke2);}", ".f13jg1wd:after{border-bottom-color:var(--colorNeutralStroke2);}", ".fc3uzr1:before{margin-bottom:0;}", ".fhlqc5k:before{margin-right:0;}", ".flnsm0g:before{margin-left:0;}", ".f1957mjw:after{margin-left:0;}", ".fxrad5j:after{margin-right:0;}", ".f1hmx8el:after{margin-top:0;}", ".fqc6z8f:after{content:\"\";}", ".fuzzvh5:before{content:\"\";}", ".f16muhyy{color:var(--colorBrandForeground1);}", ".fob59v2:before{border-top-color:var(--colorBrandStroke1);}", ".f2pevzt:before{border-right-color:var(--colorBrandStroke1);}", ".fuyeql9:before{border-left-color:var(--colorBrandStroke1);}", ".f14lh9hz:before{border-bottom-color:var(--colorBrandStroke1);}", ".fd73d1p:after{border-top-color:var(--colorBrandStroke1);}", ".f11ucet6:after{border-right-color:var(--colorBrandStroke1);}", ".f1yegzx5:after{border-left-color:var(--colorBrandStroke1);}", ".f1tupb0d:after{border-bottom-color:var(--colorBrandStroke1);}", ".f8mhi1x:before{border-top-color:var(--colorNeutralStroke3);}", ".f18m2ouc:before{border-right-color:var(--colorNeutralStroke3);}", ".fddukvx:before{border-left-color:var(--colorNeutralStroke3);}", ".f9zmk3m:before{border-bottom-color:var(--colorNeutralStroke3);}", ".fxli1ey:after{border-top-color:var(--colorNeutralStroke3);}", ".f1qvt1bb:after{border-right-color:var(--colorNeutralStroke3);}", ".f5ob950:after{border-left-color:var(--colorNeutralStroke3);}", ".f1nn0kgk:after{border-bottom-color:var(--colorNeutralStroke3);}", ".fkxqtrn:before{border-top-color:var(--colorNeutralStroke1);}", ".f1yx8xct:before{border-right-color:var(--colorNeutralStroke1);}", ".f2jll41:before{border-left-color:var(--colorNeutralStroke1);}", ".f1k9rjtw:before{border-bottom-color:var(--colorNeutralStroke1);}", ".f1i58boq:after{border-top-color:var(--colorNeutralStroke1);}", ".f4wmtn9:after{border-right-color:var(--colorNeutralStroke1);}", ".f10n3jjp:after{border-left-color:var(--colorNeutralStroke1);}", ".ft17it6:after{border-bottom-color:var(--colorNeutralStroke1);}"]
|
92
96
|
});
|
93
97
|
|
94
|
-
const useHorizontalStyles = /*#__PURE__*/
|
98
|
+
const useHorizontalStyles = /*#__PURE__*/react_1.__styles({
|
95
99
|
"base": {
|
96
100
|
"a9b677": "fly5x3f",
|
97
101
|
"Bdixowu": "f1bwkb58",
|
98
102
|
"dj0dih": "fn88edj",
|
103
|
+
"Bxms0xd": "f1lo4gz5",
|
99
104
|
"rskduk": "f1iq3fds",
|
100
|
-
"Bouo9z4": "f1oiuz89"
|
105
|
+
"Bouo9z4": "f1oiuz89",
|
106
|
+
"Bcqngy1": "f108ofon"
|
101
107
|
},
|
102
108
|
"inset": {
|
103
109
|
"uwmqm3": ["fjlbh76", "f11qrl6u"],
|
@@ -120,17 +126,19 @@ const useHorizontalStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
120
126
|
"B79fe3b": "f3tzpys"
|
121
127
|
}
|
122
128
|
}, {
|
123
|
-
"d": [".fly5x3f{width:100%;}", ".f1bwkb58:before{border-top-style:solid;}", ".fn88edj:before{border-top-width:var(--strokeWidthThin);}", ".f1iq3fds:after{border-top-style:solid;}", ".f1oiuz89:after{border-top-width:var(--strokeWidthThin);}", ".fjlbh76{padding-left:12px;}", ".f11qrl6u{padding-right:12px;}", ".fuzzvh5:before{content:\"\";}", ".fncq426:before{margin-right:12px;}", ".f12b5w6c:before{margin-left:12px;}", ".f19fn84r:before{max-width:8px;}", ".f1io6r2y:after{margin-left:12px;}", ".fn6j208:after{margin-right:12px;}", ".fqc6z8f:after{content:\"\";}", ".f3tzpys:after{max-width:8px;}"]
|
129
|
+
"d": [".fly5x3f{width:100%;}", ".f1bwkb58:before{border-top-style:solid;}", ".fn88edj:before{border-top-width:var(--strokeWidthThin);}", ".f1lo4gz5:before{min-width:8px;}", ".f1iq3fds:after{border-top-style:solid;}", ".f1oiuz89:after{border-top-width:var(--strokeWidthThin);}", ".f108ofon:after{min-width:8px;}", ".fjlbh76{padding-left:12px;}", ".f11qrl6u{padding-right:12px;}", ".fuzzvh5:before{content:\"\";}", ".fncq426:before{margin-right:12px;}", ".f12b5w6c:before{margin-left:12px;}", ".f19fn84r:before{max-width:8px;}", ".f1io6r2y:after{margin-left:12px;}", ".fn6j208:after{margin-right:12px;}", ".fqc6z8f:after{content:\"\";}", ".f3tzpys:after{max-width:8px;}"]
|
124
130
|
});
|
125
131
|
|
126
|
-
const useVerticalStyles = /*#__PURE__*/
|
132
|
+
const useVerticalStyles = /*#__PURE__*/react_1.__styles({
|
127
133
|
"base": {
|
128
134
|
"Beiy3e4": "f1vx9l62",
|
129
135
|
"sshi5w": "f16gbxbe",
|
130
136
|
"cqycoz": ["fiio4mc", "fc8z0qo"],
|
131
137
|
"D4ky5z": ["f54lnp5", "f5hao24"],
|
138
|
+
"Bxq2otu": "f11zhyjz",
|
132
139
|
"Dctjco": ["f1r2jemi", "f11olovk"],
|
133
|
-
"Bjz4wo8": ["f1o2ol1z", "f20720x"]
|
140
|
+
"Bjz4wo8": ["f1o2ol1z", "f20720x"],
|
141
|
+
"B5p8dqe": "f14bbtgr"
|
134
142
|
},
|
135
143
|
"inset": {
|
136
144
|
"B6of3ja": "f1xdg43u",
|
@@ -156,10 +164,10 @@ const useVerticalStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
156
164
|
"iiodbw": "fp342oa"
|
157
165
|
}
|
158
166
|
}, {
|
159
|
-
"d": [".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f16gbxbe{min-height:20px;}", ".fiio4mc:before{border-right-style:solid;}", ".fc8z0qo:before{border-left-style:solid;}", ".f54lnp5:before{border-right-width:var(--strokeWidthThin);}", ".f5hao24:before{border-left-width:var(--strokeWidthThin);}", ".f1r2jemi:after{border-right-style:solid;}", ".f11olovk:after{border-left-style:solid;}", ".f1o2ol1z:after{border-right-width:var(--strokeWidthThin);}", ".f20720x:after{border-left-width:var(--strokeWidthThin);}", ".f1xdg43u{margin-top:12px;}", ".f1jlhsmd{margin-bottom:12px;}", ".f1tjaq3g{min-height:84px;}", ".fuzzvh5:before{content:\"\";}", ".f1xy8239:before{margin-bottom:12px;}", ".f1hheky8:before{max-height:8px;}", ".f1mz1b17:after{margin-top:12px;}", ".fqc6z8f:after{content:\"\";}", ".fp342oa:after{max-height:8px;}"]
|
167
|
+
"d": [".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f16gbxbe{min-height:20px;}", ".fiio4mc:before{border-right-style:solid;}", ".fc8z0qo:before{border-left-style:solid;}", ".f54lnp5:before{border-right-width:var(--strokeWidthThin);}", ".f5hao24:before{border-left-width:var(--strokeWidthThin);}", ".f11zhyjz:before{min-height:8px;}", ".f1r2jemi:after{border-right-style:solid;}", ".f11olovk:after{border-left-style:solid;}", ".f1o2ol1z:after{border-right-width:var(--strokeWidthThin);}", ".f20720x:after{border-left-width:var(--strokeWidthThin);}", ".f14bbtgr:after{min-height:8px;}", ".f1xdg43u{margin-top:12px;}", ".f1jlhsmd{margin-bottom:12px;}", ".f1tjaq3g{min-height:84px;}", ".fuzzvh5:before{content:\"\";}", ".f1xy8239:before{margin-bottom:12px;}", ".f1hheky8:before{max-height:8px;}", ".f1mz1b17:after{margin-top:12px;}", ".fqc6z8f:after{content:\"\";}", ".fp342oa:after{max-height:8px;}"]
|
160
168
|
});
|
161
169
|
|
162
|
-
const
|
170
|
+
const useDividerStyles_unstable = state => {
|
163
171
|
const baseStyles = useBaseStyles();
|
164
172
|
const horizontalStyles = useHorizontalStyles();
|
165
173
|
const verticalStyles = useVerticalStyles();
|
@@ -169,7 +177,7 @@ const useDividerStyles = state => {
|
|
169
177
|
inset,
|
170
178
|
vertical
|
171
179
|
} = state;
|
172
|
-
state.root.className =
|
180
|
+
state.root.className = react_1.mergeClasses(exports.dividerClassName, // Base styles
|
173
181
|
baseStyles.base, baseStyles[alignContent], appearance && baseStyles[appearance], // Horizontal styles
|
174
182
|
!vertical && horizontalStyles.base, !vertical && inset && horizontalStyles.inset, !vertical && horizontalStyles[alignContent], // Vertical styles
|
175
183
|
vertical && verticalStyles.base, vertical && inset && verticalStyles.inset, vertical && verticalStyles[alignContent], vertical && state.root.children !== undefined && verticalStyles.withChildren, // Childless styles
|
@@ -178,5 +186,5 @@ const useDividerStyles = state => {
|
|
178
186
|
return state;
|
179
187
|
};
|
180
188
|
|
181
|
-
exports.
|
189
|
+
exports.useDividerStyles_unstable = useDividerStyles_unstable;
|
182
190
|
//# sourceMappingURL=useDividerStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/Divider/useDividerStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAGa,OAAA,CAAA,gBAAA,GAAmB,aAAnB;AAEb,MAAM,cAAc,GAAG,MAAvB;AACA,MAAM,YAAY,GAAG,MAArB;AACA,MAAM,iBAAiB,GAAG,KAA1B;AACA,MAAM,iBAAiB,GAAG,MAA1B;;AAEA,MAAM,aAAa,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAtB;;AAkGA,MAAM,mBAAmB,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAA5B;;AAwDA,MAAM,iBAAiB,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAA1B;;AA8DO,MAAM,yBAAyB,GAAI,KAAD,IAAsC;AAC7E,QAAM,UAAU,GAAG,aAAa,EAAhC;AACA,QAAM,gBAAgB,GAAG,mBAAmB,EAA5C;AACA,QAAM,cAAc,GAAG,iBAAiB,EAAxC;AAEA,QAAM;AAAE,IAAA,YAAF;AAAgB,IAAA,UAAhB;AAA4B,IAAA,KAA5B;AAAmC,IAAA;AAAnC,MAAgD,KAAtD;AAEA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,gBADqB,EAGrB;AACA,EAAA,UAAU,CAAC,IAJU,EAKrB,UAAU,CAAC,YAAD,CALW,EAMrB,UAAU,IAAI,UAAU,CAAC,UAAD,CANH,EAQrB;AACA,GAAC,QAAD,IAAa,gBAAgB,CAAC,IATT,EAUrB,CAAC,QAAD,IAAa,KAAb,IAAsB,gBAAgB,CAAC,KAVlB,EAWrB,CAAC,QAAD,IAAa,gBAAgB,CAAC,YAAD,CAXR,EAarB;AACA,EAAA,QAAQ,IAAI,cAAc,CAAC,IAdN,EAerB,QAAQ,IAAI,KAAZ,IAAqB,cAAc,CAAC,KAff,EAgBrB,QAAQ,IAAI,cAAc,CAAC,YAAD,CAhBL,EAiBrB,QAAQ,IAAI,KAAK,CAAC,IAAN,CAAW,QAAX,KAAwB,SAApC,IAAiD,cAAc,CAAC,YAjB3C,EAmBrB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,QAAX,KAAwB,SAAxB,IAAqC,UAAU,CAAC,SApB3B,EAsBrB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAvBU,CAAvB;AA0BA,SAAO,KAAP;AACD,CAlCM;;AAAM,OAAA,CAAA,yBAAA,GAAyB,yBAAzB","sourcesContent":["import { mergeClasses, shorthands, makeStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { DividerState } from './Divider.types';\n\nexport const dividerClassName = 'fui-Divider';\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 color: tokens.colorNeutralForeground2,\n\n ':before': {\n boxSizing: 'border-box',\n display: 'flex',\n flexGrow: 1,\n ...shorthands.borderColor(tokens.colorNeutralStroke2),\n },\n\n ':after': {\n boxSizing: 'border-box',\n display: 'flex',\n flexGrow: 1,\n ...shorthands.borderColor(tokens.colorNeutralStroke2),\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 subtle: {\n ':before': {\n ...shorthands.borderColor(tokens.colorNeutralStroke3),\n },\n\n ':after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke3),\n },\n },\n strong: {\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 dividerClassName,\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 return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,WAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Divider';\n"],"sourceRoot":"../src/"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-divider",
|
3
|
-
"version": "0.0.0-
|
3
|
+
"version": "0.0.0-nightlyff78d1e27a20220217.1",
|
4
4
|
"description": "Fluent UI component to visually separate content.",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -22,15 +22,13 @@
|
|
22
22
|
"test": "jest --passWithNoTests",
|
23
23
|
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
|
24
24
|
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-divider/src && yarn docs",
|
25
|
-
"storybook": "
|
25
|
+
"storybook": "node ../../scripts/storybook/runner",
|
26
26
|
"type-check": "tsc -b tsconfig.json"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
|
-
"@fluentui/babel-make-styles": "0.0.0-nightlyf8be6a7c6520220106.1",
|
30
29
|
"@fluentui/eslint-plugin": "*",
|
31
|
-
"@fluentui/jest-serializer-make-styles": "0.0.0-nightlyf8be6a7c6520220106.1",
|
32
30
|
"@fluentui/react-conformance": "*",
|
33
|
-
"@fluentui/react-conformance-
|
31
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightlyff78d1e27a20220217.1",
|
34
32
|
"@fluentui/scripts": "^1.0.0",
|
35
33
|
"@types/enzyme": "3.10.3",
|
36
34
|
"@types/enzyme-adapter-react-16": "1.0.3",
|
@@ -44,8 +42,8 @@
|
|
44
42
|
"react-test-renderer": "^16.3.0"
|
45
43
|
},
|
46
44
|
"dependencies": {
|
47
|
-
"@
|
48
|
-
"@fluentui/react-utilities": "0.0.0-
|
45
|
+
"@griffel/react": "1.0.0",
|
46
|
+
"@fluentui/react-utilities": "0.0.0-nightlyff78d1e27a20220217.1",
|
49
47
|
"tslib": "^2.1.0"
|
50
48
|
},
|
51
49
|
"peerDependencies": {
|