@fluentui/react-divider 0.0.0-nightly-20220302-0405.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.
Files changed (57) hide show
  1. package/CHANGELOG.json +2384 -0
  2. package/CHANGELOG.md +913 -0
  3. package/LICENSE +15 -0
  4. package/MIGRATION.md +60 -0
  5. package/README.md +23 -0
  6. package/Spec.md +90 -0
  7. package/dist/react-divider.d.ts +66 -0
  8. package/lib/Divider.d.ts +1 -0
  9. package/lib/Divider.js +2 -0
  10. package/lib/Divider.js.map +1 -0
  11. package/lib/components/Divider/Divider.d.ts +6 -0
  12. package/lib/components/Divider/Divider.js +15 -0
  13. package/lib/components/Divider/Divider.js.map +1 -0
  14. package/lib/components/Divider/Divider.types.d.ts +36 -0
  15. package/lib/components/Divider/Divider.types.js +2 -0
  16. package/lib/components/Divider/Divider.types.js.map +1 -0
  17. package/lib/components/Divider/index.d.ts +5 -0
  18. package/lib/components/Divider/index.js +6 -0
  19. package/lib/components/Divider/index.js.map +1 -0
  20. package/lib/components/Divider/renderDivider.d.ts +5 -0
  21. package/lib/components/Divider/renderDivider.js +16 -0
  22. package/lib/components/Divider/renderDivider.js.map +1 -0
  23. package/lib/components/Divider/useDivider.d.ts +8 -0
  24. package/lib/components/Divider/useDivider.js +43 -0
  25. package/lib/components/Divider/useDivider.js.map +1 -0
  26. package/lib/components/Divider/useDividerStyles.d.ts +3 -0
  27. package/lib/components/Divider/useDividerStyles.js +179 -0
  28. package/lib/components/Divider/useDividerStyles.js.map +1 -0
  29. package/lib/index.d.ts +1 -0
  30. package/lib/index.js +2 -0
  31. package/lib/index.js.map +1 -0
  32. package/lib/tsdoc-metadata.json +11 -0
  33. package/lib-commonjs/Divider.d.ts +1 -0
  34. package/lib-commonjs/Divider.js +10 -0
  35. package/lib-commonjs/Divider.js.map +1 -0
  36. package/lib-commonjs/components/Divider/Divider.d.ts +6 -0
  37. package/lib-commonjs/components/Divider/Divider.js +26 -0
  38. package/lib-commonjs/components/Divider/Divider.js.map +1 -0
  39. package/lib-commonjs/components/Divider/Divider.types.d.ts +36 -0
  40. package/lib-commonjs/components/Divider/Divider.types.js +6 -0
  41. package/lib-commonjs/components/Divider/Divider.types.js.map +1 -0
  42. package/lib-commonjs/components/Divider/index.d.ts +5 -0
  43. package/lib-commonjs/components/Divider/index.js +18 -0
  44. package/lib-commonjs/components/Divider/index.js.map +1 -0
  45. package/lib-commonjs/components/Divider/renderDivider.d.ts +5 -0
  46. package/lib-commonjs/components/Divider/renderDivider.js +27 -0
  47. package/lib-commonjs/components/Divider/renderDivider.js.map +1 -0
  48. package/lib-commonjs/components/Divider/useDivider.d.ts +8 -0
  49. package/lib-commonjs/components/Divider/useDivider.js +53 -0
  50. package/lib-commonjs/components/Divider/useDivider.js.map +1 -0
  51. package/lib-commonjs/components/Divider/useDividerStyles.d.ts +3 -0
  52. package/lib-commonjs/components/Divider/useDividerStyles.js +190 -0
  53. package/lib-commonjs/components/Divider/useDividerStyles.js.map +1 -0
  54. package/lib-commonjs/index.d.ts +1 -0
  55. package/lib-commonjs/index.js +10 -0
  56. package/lib-commonjs/index.js.map +1 -0
  57. package/package.json +63 -0
@@ -0,0 +1 @@
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.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './Divider';
package/lib/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './Divider';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC","sourcesContent":["export * from './Divider';\n"]}
@@ -0,0 +1,11 @@
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "7.18.1"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1 @@
1
+ export * from './components/Divider/index';
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./components/Divider/index"), exports);
10
+ //# sourceMappingURL=Divider.js.map
@@ -0,0 +1 @@
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/"}
@@ -0,0 +1,6 @@
1
+ import type { ForwardRefComponent } from '@fluentui/react-utilities';
2
+ import type { DividerProps } from './Divider.types';
3
+ /**
4
+ * A divider visually segments content into groups.
5
+ */
6
+ export declare const Divider: ForwardRefComponent<DividerProps>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Divider = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const renderDivider_1 = /*#__PURE__*/require("./renderDivider");
11
+
12
+ const useDivider_1 = /*#__PURE__*/require("./useDivider");
13
+
14
+ const useDividerStyles_1 = /*#__PURE__*/require("./useDividerStyles");
15
+ /**
16
+ * A divider visually segments content into groups.
17
+ */
18
+
19
+
20
+ exports.Divider = /*#__PURE__*/React.forwardRef((props, ref) => {
21
+ const state = useDivider_1.useDivider_unstable(props, ref);
22
+ useDividerStyles_1.useDividerStyles_unstable(state);
23
+ return renderDivider_1.renderDivider_unstable(state);
24
+ });
25
+ exports.Divider.displayName = 'Divider';
26
+ //# sourceMappingURL=Divider.js.map
@@ -0,0 +1 @@
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/"}
@@ -0,0 +1,36 @@
1
+ import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
+ export declare type DividerSlots = {
3
+ /**
4
+ * Root of the component that renders as a `<div>` tag.
5
+ */
6
+ root: Slot<'div'>;
7
+ /**
8
+ * Accessibility wrapper for content when presented.
9
+ */
10
+ wrapper: Slot<'div'>;
11
+ };
12
+ declare type DividerCommons = {
13
+ /**
14
+ * Determines the alignment of the content within the divider.
15
+ * @defaultvalue 'center'
16
+ */
17
+ alignContent: 'start' | 'center' | 'end';
18
+ /**
19
+ * A divider can have one of the preset appearances.
20
+ * When not specified, the divider has its default appearance.
21
+ */
22
+ appearance?: 'brand' | 'strong' | 'subtle';
23
+ /**
24
+ * Adds padding to the beginning and end of the divider.
25
+ * @default false
26
+ */
27
+ inset: boolean;
28
+ /**
29
+ * A divider can be horizontal (default) or vertical.
30
+ * @default false
31
+ */
32
+ vertical: boolean;
33
+ };
34
+ export declare type DividerProps = ComponentProps<Partial<DividerSlots>> & Partial<DividerCommons>;
35
+ export declare type DividerState = ComponentState<DividerSlots> & DividerCommons;
36
+ export {};
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=Divider.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
@@ -0,0 +1,5 @@
1
+ export * from './Divider';
2
+ export * from './Divider.types';
3
+ export * from './renderDivider';
4
+ export * from './useDivider';
5
+ export * from './useDividerStyles';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./Divider"), exports);
10
+
11
+ tslib_1.__exportStar(require("./Divider.types"), exports);
12
+
13
+ tslib_1.__exportStar(require("./renderDivider"), exports);
14
+
15
+ tslib_1.__exportStar(require("./useDivider"), exports);
16
+
17
+ tslib_1.__exportStar(require("./useDividerStyles"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
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/"}
@@ -0,0 +1,5 @@
1
+ import { DividerState } from './Divider.types';
2
+ /**
3
+ * Renders a Divider component by passing the slot props (defined in `state`) to the appropriate slots.
4
+ */
5
+ export declare const renderDivider_unstable: (state: DividerState) => JSX.Element;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.renderDivider_unstable = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
+ /**
12
+ * Renders a Divider component by passing the slot props (defined in `state`) to the appropriate slots.
13
+ */
14
+
15
+
16
+ const renderDivider_unstable = state => {
17
+ const {
18
+ slots,
19
+ slotProps
20
+ } = react_utilities_1.getSlots(state);
21
+ return React.createElement(slots.root, { ...slotProps.root
22
+ }, slotProps.root.children !== undefined && React.createElement(slots.wrapper, { ...slotProps.wrapper
23
+ }, slotProps.root.children));
24
+ };
25
+
26
+ exports.renderDivider_unstable = renderDivider_unstable;
27
+ //# sourceMappingURL=renderDivider.js.map
@@ -0,0 +1 @@
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/"}
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import type { DividerProps, DividerState } from './Divider.types';
3
+ /**
4
+ * Returns the props and state required to render the component
5
+ * @param props - User-provided props to the Divider component.
6
+ * @param ref - User-provided ref to be passed to the Divider component.
7
+ */
8
+ export declare const useDivider_unstable: (props: DividerProps, ref: React.Ref<HTMLElement>) => DividerState;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useDivider_unstable = void 0;
7
+
8
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
+ /**
10
+ * Returns the props and state required to render the component
11
+ * @param props - User-provided props to the Divider component.
12
+ * @param ref - User-provided ref to be passed to the Divider component.
13
+ */
14
+
15
+
16
+ const useDivider_unstable = (props, ref) => {
17
+ const {
18
+ alignContent = 'center',
19
+ appearance,
20
+ inset = false,
21
+ vertical = false,
22
+ wrapper
23
+ } = props;
24
+ const dividerId = react_utilities_1.useId('divider-');
25
+ return {
26
+ // Props passed at the top-level
27
+ alignContent,
28
+ appearance,
29
+ inset,
30
+ vertical,
31
+ // Slots definition
32
+ components: {
33
+ root: 'div',
34
+ wrapper: 'div'
35
+ },
36
+ root: react_utilities_1.getNativeElementProps('div', { ...props,
37
+ ref,
38
+ role: 'separator',
39
+ 'aria-orientation': vertical ? 'vertical' : 'horizontal',
40
+ 'aria-labelledby': props.children ? dividerId : undefined
41
+ }),
42
+ wrapper: react_utilities_1.resolveShorthand(wrapper, {
43
+ required: true,
44
+ defaultProps: {
45
+ id: dividerId,
46
+ children: props.children
47
+ }
48
+ })
49
+ };
50
+ };
51
+
52
+ exports.useDivider_unstable = useDivider_unstable;
53
+ //# sourceMappingURL=useDivider.js.map
@@ -0,0 +1 @@
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/"}
@@ -0,0 +1,3 @@
1
+ import { DividerState } from './Divider.types';
2
+ export declare const dividerClassName = "fui-Divider";
3
+ export declare const useDividerStyles_unstable: (state: DividerState) => DividerState;
@@ -0,0 +1,190 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useDividerStyles_unstable = exports.dividerClassName = void 0;
7
+
8
+ const react_1 = /*#__PURE__*/require("@griffel/react");
9
+
10
+ const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
11
+
12
+ exports.dividerClassName = 'fui-Divider';
13
+ const contentSpacing = '12px';
14
+ const insetSpacing = '12px';
15
+ const maxStartEndLength = '8px';
16
+ const minStartEndLength = '8px;';
17
+
18
+ const useBaseStyles = /*#__PURE__*/react_1.__styles({
19
+ "base": {
20
+ "Bt984gj": "f122n59",
21
+ "B7ck84d": "f1ewtqcl",
22
+ "mc9l5x": "f22iagw",
23
+ "Beiy3e4": "f1063pyq",
24
+ "Bh6795r": "fqerorx",
25
+ "qhf8xq": "f10pi13n",
26
+ "Bahqtrf": "fk6fouc",
27
+ "Be2twd7": "fy9rknc",
28
+ "Bhrd7zp": "figsok6",
29
+ "Bg96gwp": "fwrc4pm",
30
+ "fsow6f": "f17mccla",
31
+ "sj55zd": "fkfq4zb",
32
+ "Bmqnesq": "f170vdtw",
33
+ "pmf9yy": "fkmkm9e",
34
+ "B438e65": "fbxxcv3",
35
+ "ijj6k": "f1vdjgj",
36
+ "I89eb": ["fz0g6r7", "f1h60vep"],
37
+ "Bp1vogq": "fn9f2qq",
38
+ "Bohd3ja": ["f1h60vep", "fz0g6r7"],
39
+ "oqd9ik": "ffdc0f3",
40
+ "Fdvyjd": "fsnc50s",
41
+ "keybh5": "fjrry2l",
42
+ "F7kzw7": "fii7hsz",
43
+ "B13j16c": ["fp9yzmz", "f1n0fcl2"],
44
+ "Bk8j60v": "f13jg1wd",
45
+ "Bpbi4o9": ["f1n0fcl2", "fp9yzmz"]
46
+ },
47
+ "childless": {
48
+ "z1nrnc": "fc3uzr1",
49
+ "vrnxjr": ["fhlqc5k", "flnsm0g"],
50
+ "Bsz71t5": ["f1957mjw", "fxrad5j"],
51
+ "Brd3o3m": "f1hmx8el"
52
+ },
53
+ "start": {
54
+ "Bs6t6z0": "fqc6z8f"
55
+ },
56
+ "center": {
57
+ "rurcny": "fuzzvh5",
58
+ "Bs6t6z0": "fqc6z8f"
59
+ },
60
+ "end": {
61
+ "rurcny": "fuzzvh5"
62
+ },
63
+ "brand": {
64
+ "sj55zd": "f16muhyy",
65
+ "ijj6k": "fob59v2",
66
+ "I89eb": ["f2pevzt", "fuyeql9"],
67
+ "Bp1vogq": "f14lh9hz",
68
+ "Bohd3ja": ["fuyeql9", "f2pevzt"],
69
+ "F7kzw7": "fd73d1p",
70
+ "B13j16c": ["f11ucet6", "f1yegzx5"],
71
+ "Bk8j60v": "f1tupb0d",
72
+ "Bpbi4o9": ["f1yegzx5", "f11ucet6"]
73
+ },
74
+ "subtle": {
75
+ "ijj6k": "f8mhi1x",
76
+ "I89eb": ["f18m2ouc", "fddukvx"],
77
+ "Bp1vogq": "f9zmk3m",
78
+ "Bohd3ja": ["fddukvx", "f18m2ouc"],
79
+ "F7kzw7": "fxli1ey",
80
+ "B13j16c": ["f1qvt1bb", "f5ob950"],
81
+ "Bk8j60v": "f1nn0kgk",
82
+ "Bpbi4o9": ["f5ob950", "f1qvt1bb"]
83
+ },
84
+ "strong": {
85
+ "ijj6k": "fkxqtrn",
86
+ "I89eb": ["f1yx8xct", "f2jll41"],
87
+ "Bp1vogq": "f1k9rjtw",
88
+ "Bohd3ja": ["f2jll41", "f1yx8xct"],
89
+ "F7kzw7": "f1i58boq",
90
+ "B13j16c": ["f4wmtn9", "f10n3jjp"],
91
+ "Bk8j60v": "ft17it6",
92
+ "Bpbi4o9": ["f10n3jjp", "f4wmtn9"]
93
+ }
94
+ }, {
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);}"]
96
+ });
97
+
98
+ const useHorizontalStyles = /*#__PURE__*/react_1.__styles({
99
+ "base": {
100
+ "a9b677": "fly5x3f",
101
+ "Bdixowu": "f1bwkb58",
102
+ "dj0dih": "fn88edj",
103
+ "Bxms0xd": "f1lo4gz5",
104
+ "rskduk": "f1iq3fds",
105
+ "Bouo9z4": "f1oiuz89",
106
+ "Bcqngy1": "f108ofon"
107
+ },
108
+ "inset": {
109
+ "uwmqm3": ["fjlbh76", "f11qrl6u"],
110
+ "z189sj": ["f11qrl6u", "fjlbh76"]
111
+ },
112
+ "start": {
113
+ "rurcny": "fuzzvh5",
114
+ "vrnxjr": ["fncq426", "f12b5w6c"],
115
+ "B24asle": "f19fn84r",
116
+ "Bsz71t5": ["f1io6r2y", "fn6j208"]
117
+ },
118
+ "center": {
119
+ "vrnxjr": ["fncq426", "f12b5w6c"],
120
+ "Bsz71t5": ["f1io6r2y", "fn6j208"]
121
+ },
122
+ "end": {
123
+ "vrnxjr": ["fncq426", "f12b5w6c"],
124
+ "Bs6t6z0": "fqc6z8f",
125
+ "Bsz71t5": ["f1io6r2y", "fn6j208"],
126
+ "B79fe3b": "f3tzpys"
127
+ }
128
+ }, {
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;}"]
130
+ });
131
+
132
+ const useVerticalStyles = /*#__PURE__*/react_1.__styles({
133
+ "base": {
134
+ "Beiy3e4": "f1vx9l62",
135
+ "sshi5w": "f16gbxbe",
136
+ "cqycoz": ["fiio4mc", "fc8z0qo"],
137
+ "D4ky5z": ["f54lnp5", "f5hao24"],
138
+ "Bxq2otu": "f11zhyjz",
139
+ "Dctjco": ["f1r2jemi", "f11olovk"],
140
+ "Bjz4wo8": ["f1o2ol1z", "f20720x"],
141
+ "B5p8dqe": "f14bbtgr"
142
+ },
143
+ "inset": {
144
+ "B6of3ja": "f1xdg43u",
145
+ "jrapky": "f1jlhsmd"
146
+ },
147
+ "withChildren": {
148
+ "sshi5w": "f1tjaq3g"
149
+ },
150
+ "start": {
151
+ "rurcny": "fuzzvh5",
152
+ "z1nrnc": "f1xy8239",
153
+ "B5kj21": "f1hheky8",
154
+ "Brd3o3m": "f1mz1b17"
155
+ },
156
+ "center": {
157
+ "z1nrnc": "f1xy8239",
158
+ "Brd3o3m": "f1mz1b17"
159
+ },
160
+ "end": {
161
+ "z1nrnc": "f1xy8239",
162
+ "Bs6t6z0": "fqc6z8f",
163
+ "Brd3o3m": "f1mz1b17",
164
+ "iiodbw": "fp342oa"
165
+ }
166
+ }, {
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;}"]
168
+ });
169
+
170
+ const useDividerStyles_unstable = state => {
171
+ const baseStyles = useBaseStyles();
172
+ const horizontalStyles = useHorizontalStyles();
173
+ const verticalStyles = useVerticalStyles();
174
+ const {
175
+ alignContent,
176
+ appearance,
177
+ inset,
178
+ vertical
179
+ } = state;
180
+ state.root.className = react_1.mergeClasses(exports.dividerClassName, // Base styles
181
+ baseStyles.base, baseStyles[alignContent], appearance && baseStyles[appearance], // Horizontal styles
182
+ !vertical && horizontalStyles.base, !vertical && inset && horizontalStyles.inset, !vertical && horizontalStyles[alignContent], // Vertical styles
183
+ vertical && verticalStyles.base, vertical && inset && verticalStyles.inset, vertical && verticalStyles[alignContent], vertical && state.root.children !== undefined && verticalStyles.withChildren, // Childless styles
184
+ state.root.children === undefined && baseStyles.childless, // User provided class name
185
+ state.root.className);
186
+ return state;
187
+ };
188
+
189
+ exports.useDividerStyles_unstable = useDividerStyles_unstable;
190
+ //# sourceMappingURL=useDividerStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/Divider/useDividerStyles.ts"],"names":[],"mappings":"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","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/"}
@@ -0,0 +1 @@
1
+ export * from './Divider';
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./Divider"), exports);
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
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 ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@fluentui/react-divider",
3
+ "version": "0.0.0-nightly-20220302-0405.1",
4
+ "description": "Fluent UI component to visually separate content.",
5
+ "main": "lib-commonjs/index.js",
6
+ "module": "lib/index.js",
7
+ "typings": "lib/index.d.ts",
8
+ "sideEffects": false,
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/microsoft/fluentui"
12
+ },
13
+ "license": "MIT",
14
+ "scripts": {
15
+ "build": "just-scripts build",
16
+ "bundle-size": "bundle-size measure",
17
+ "clean": "just-scripts clean",
18
+ "code-style": "just-scripts code-style",
19
+ "just": "just-scripts",
20
+ "lint": "just-scripts lint",
21
+ "start": "yarn storybook",
22
+ "test": "jest --passWithNoTests",
23
+ "docs": "api-extractor run --config=config/api-extractor.local.json --local",
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": "node ../../scripts/storybook/runner",
26
+ "type-check": "tsc -b tsconfig.json"
27
+ },
28
+ "devDependencies": {
29
+ "@fluentui/eslint-plugin": "*",
30
+ "@fluentui/react-conformance": "*",
31
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20220302-0405.1",
32
+ "@fluentui/scripts": "^1.0.0",
33
+ "@types/enzyme": "3.10.3",
34
+ "@types/enzyme-adapter-react-16": "1.0.3",
35
+ "@types/react": "16.9.42",
36
+ "@types/react-dom": "16.9.10",
37
+ "@types/react-test-renderer": "^16.0.0",
38
+ "enzyme": "~3.10.0",
39
+ "enzyme-adapter-react-16": "^1.15.0",
40
+ "react": "16.8.6",
41
+ "react-dom": "16.8.6",
42
+ "react-test-renderer": "^16.3.0"
43
+ },
44
+ "dependencies": {
45
+ "@griffel/react": "1.0.0",
46
+ "@fluentui/react-theme": "0.0.0-nightly-20220302-0405.1",
47
+ "@fluentui/react-utilities": "0.0.0-nightly-20220302-0405.1",
48
+ "tslib": "^2.1.0"
49
+ },
50
+ "peerDependencies": {
51
+ "@types/react": ">=16.8.0 <18.0.0",
52
+ "@types/react-dom": ">=16.8.0 <18.0.0",
53
+ "react": ">=16.8.0 <18.0.0",
54
+ "react-dom": ">=16.8.0 <18.0.0"
55
+ },
56
+ "beachball": {
57
+ "disallowedChangeTypes": [
58
+ "major",
59
+ "minor",
60
+ "patch"
61
+ ]
62
+ }
63
+ }