@fluentui/react-divider 0.0.0-nightly-20230316-0427.1 → 0.0.0-nightly-20230317-1454.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/.swcrc +39 -0
- package/CHANGELOG.json +26 -11
- package/CHANGELOG.md +17 -8
- package/lib/Divider.js +1 -1
- package/lib/Divider.js.map +1 -1
- package/lib/components/Divider/Divider.js +6 -6
- package/lib/components/Divider/Divider.js.map +1 -1
- package/lib/components/Divider/Divider.types.js.map +1 -1
- package/lib/components/Divider/index.js +5 -5
- package/lib/components/Divider/index.js.map +1 -1
- package/lib/components/Divider/renderDivider.js +3 -7
- package/lib/components/Divider/renderDivider.js.map +1 -1
- package/lib/components/Divider/useDivider.js +11 -10
- package/lib/components/Divider/useDivider.js.map +1 -1
- package/lib/components/Divider/useDividerStyles.js +8 -8
- package/lib/components/Divider/useDividerStyles.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Divider.js +5 -4
- package/lib-commonjs/Divider.js.map +1 -1
- package/lib-commonjs/components/Divider/Divider.js +19 -20
- package/lib-commonjs/components/Divider/Divider.js.map +1 -1
- package/lib-commonjs/components/Divider/Divider.types.js +3 -2
- package/lib-commonjs/components/Divider/Divider.types.js.map +1 -1
- package/lib-commonjs/components/Divider/index.js +9 -8
- package/lib-commonjs/components/Divider/index.js.map +1 -1
- package/lib-commonjs/components/Divider/renderDivider.js +13 -20
- package/lib-commonjs/components/Divider/renderDivider.js.map +1 -1
- package/lib-commonjs/components/Divider/useDivider.js +39 -46
- package/lib-commonjs/components/Divider/useDivider.js.map +1 -1
- package/lib-commonjs/components/Divider/useDividerStyles.js +373 -186
- package/lib-commonjs/components/Divider/useDividerStyles.js.map +1 -1
- package/lib-commonjs/index.js +16 -33
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +7 -7
@@ -1,50 +1,43 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
Object.defineProperty(exports, "useDivider_unstable", {
|
6
|
+
enumerable: true,
|
7
|
+
get: ()=>useDivider_unstable
|
5
8
|
});
|
6
|
-
|
7
|
-
const
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
wrapper: react_utilities_1.resolveShorthand(wrapper, {
|
41
|
-
required: true,
|
42
|
-
defaultProps: {
|
43
|
-
id: dividerId,
|
44
|
-
children: props.children
|
45
|
-
}
|
46
|
-
})
|
47
|
-
};
|
48
|
-
};
|
49
|
-
exports.useDivider_unstable = useDivider_unstable;
|
9
|
+
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
10
|
+
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
11
|
+
const _reactUtilities = require("@fluentui/react-utilities");
|
12
|
+
const useDivider_unstable = (props, ref)=>{
|
13
|
+
const { alignContent ="center" , appearance ="default" , inset =false , vertical =false , wrapper } = props;
|
14
|
+
const dividerId = (0, _reactUtilities.useId)("divider-");
|
15
|
+
return {
|
16
|
+
// Props passed at the top-level
|
17
|
+
alignContent,
|
18
|
+
appearance,
|
19
|
+
inset,
|
20
|
+
vertical,
|
21
|
+
// Slots definition
|
22
|
+
components: {
|
23
|
+
root: "div",
|
24
|
+
wrapper: "div"
|
25
|
+
},
|
26
|
+
root: (0, _reactUtilities.getNativeElementProps)("div", {
|
27
|
+
role: "separator",
|
28
|
+
"aria-orientation": vertical ? "vertical" : "horizontal",
|
29
|
+
"aria-labelledby": props.children ? dividerId : undefined,
|
30
|
+
...props,
|
31
|
+
ref
|
32
|
+
}),
|
33
|
+
wrapper: (0, _reactUtilities.resolveShorthand)(wrapper, {
|
34
|
+
required: true,
|
35
|
+
defaultProps: {
|
36
|
+
id: dividerId,
|
37
|
+
children: props.children
|
38
|
+
}
|
39
|
+
})
|
40
|
+
};
|
41
|
+
}; //# sourceMappingURL=useDivider.js.map
|
42
|
+
|
50
43
|
//# sourceMappingURL=useDivider.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../../lib/components/Divider/useDivider.js"],"sourcesContent":["import * as React from \"react\";\nimport { getNativeElementProps, resolveShorthand, useId } from \"@fluentui/react-utilities\";\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, ref) => {\n const {\n alignContent = \"center\",\n appearance = \"default\",\n inset = false,\n vertical = false,\n wrapper\n } = props;\n const dividerId = useId(\"divider-\");\n return {\n // Props passed at the top-level\n alignContent,\n appearance,\n inset,\n vertical,\n // Slots definition\n components: {\n root: \"div\",\n wrapper: \"div\"\n },\n root: getNativeElementProps(\"div\", {\n role: \"separator\",\n \"aria-orientation\": vertical ? \"vertical\" : \"horizontal\",\n \"aria-labelledby\": props.children ? dividerId : undefined,\n ...props,\n ref\n }),\n wrapper: resolveShorthand(wrapper, {\n required: true,\n defaultProps: {\n id: dividerId,\n children: props.children\n }\n })\n };\n};\n//# sourceMappingURL=useDivider.js.map"],"names":["useDivider_unstable","props","ref","alignContent","appearance","inset","vertical","wrapper","dividerId","useId","components","root","getNativeElementProps","role","children","undefined","resolveShorthand","required","defaultProps","id"],"mappings":";;;;+BAOaA;;aAAAA;;;6DAPU;gCACwC;AAMxD,MAAMA,sBAAsB,CAACC,OAAOC,MAAQ;IACjD,MAAM,EACJC,cAAe,SAAQ,EACvBC,YAAa,UAAS,EACtBC,OAAQ,KAAK,CAAA,EACbC,UAAW,KAAK,CAAA,EAChBC,QAAO,EACR,GAAGN;IACJ,MAAMO,YAAYC,IAAAA,qBAAK,EAAC;IACxB,OAAO;QACL,gCAAgC;QAChCN;QACAC;QACAC;QACAC;QACA,mBAAmB;QACnBI,YAAY;YACVC,MAAM;YACNJ,SAAS;QACX;QACAI,MAAMC,IAAAA,qCAAqB,EAAC,OAAO;YACjCC,MAAM;YACN,oBAAoBP,WAAW,aAAa,YAAY;YACxD,mBAAmBL,MAAMa,QAAQ,GAAGN,YAAYO,SAAS;YACzD,GAAGd,KAAK;YACRC;QACF;QACAK,SAASS,IAAAA,gCAAgB,EAACT,SAAS;YACjCU,UAAU,IAAI;YACdC,cAAc;gBACZC,IAAIX;gBACJM,UAAUb,MAAMa,QAAQ;YAC1B;QACF;IACF;AACF,GACA,sCAAsC"}
|