@xanui/ui 1.1.12 → 1.1.14
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/Stack/index.js +1 -1
- package/Stack/index.js.map +1 -1
- package/Stack/index.mjs +1 -1
- package/Stack/index.mjs.map +1 -1
- package/Text/index.js +6 -1
- package/Text/index.js.map +1 -1
- package/Text/index.mjs +6 -1
- package/Text/index.mjs.map +1 -1
- package/package.json +1 -1
package/Stack/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var tslib=require('tslib'),jsxRuntime=require('react/jsx-runtime'),React=require('react'),core=require('@xanui/core');const Stack = React.forwardRef((_a, ref) => {
|
|
2
|
-
var { children
|
|
2
|
+
var { children } = _a, props = tslib.__rest(_a, ["children"]);
|
|
3
3
|
return (jsxRuntime.jsx(core.Tag, Object.assign({}, props, { sxr: {
|
|
4
4
|
display: "flex",
|
|
5
5
|
flexDirection: "column",
|
package/Stack/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/Stack/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType } from '@xanui/core';\n\nexport type StackProps<T extends TagComponentType = \"div\"> = TagProps<T>\n\nconst Stack = React.forwardRef(<T extends TagComponentType = \"div\">({ children,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/Stack/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType } from '@xanui/core';\n\nexport type StackProps<T extends TagComponentType = \"div\"> = TagProps<T>\n\nconst Stack = React.forwardRef(<T extends TagComponentType = \"div\">({ children, ...props }: StackProps<T>, ref?: React.Ref<any>) => {\n return (\n <Tag\n {...props}\n sxr={{\n display: \"flex\",\n flexDirection: \"column\",\n }}\n baseClass='stack'\n ref={ref}\n >{children}</Tag>\n )\n})\n\nexport default Stack\n"],"names":["__rest","_jsx","Tag"],"mappings":"4LAMA,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,CAAqC,EAAqC,EAAE,GAAoB,KAAI;AAA/D,IAAA,IAAA,EAAE,QAAQ,EAAA,GAAA,EAA2B,EAAtB,KAAK,GAAAA,YAAA,CAAA,EAAA,EAApB,YAAsB,CAAF;AACpF,IAAA,QACIC,cAAA,CAACC,QAAG,oBACI,KAAK,EAAA,EACT,GAAG,EAAE;AACD,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,aAAa,EAAE,QAAQ;SAC1B,EACD,SAAS,EAAC,OAAO,EACjB,GAAG,EAAE,GAAG,EAAA,QAAA,EACV,QAAQ,EAAA,CAAA,CAAO;AAEzB,CAAC"}
|
package/Stack/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {__rest}from'tslib';import {jsx}from'react/jsx-runtime';import React from'react';import {Tag}from'@xanui/core';const Stack = React.forwardRef((_a, ref) => {
|
|
2
|
-
var { children
|
|
2
|
+
var { children } = _a, props = __rest(_a, ["children"]);
|
|
3
3
|
return (jsx(Tag, Object.assign({}, props, { sxr: {
|
|
4
4
|
display: "flex",
|
|
5
5
|
flexDirection: "column",
|
package/Stack/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/Stack/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType } from '@xanui/core';\n\nexport type StackProps<T extends TagComponentType = \"div\"> = TagProps<T>\n\nconst Stack = React.forwardRef(<T extends TagComponentType = \"div\">({ children,
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/Stack/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType } from '@xanui/core';\n\nexport type StackProps<T extends TagComponentType = \"div\"> = TagProps<T>\n\nconst Stack = React.forwardRef(<T extends TagComponentType = \"div\">({ children, ...props }: StackProps<T>, ref?: React.Ref<any>) => {\n return (\n <Tag\n {...props}\n sxr={{\n display: \"flex\",\n flexDirection: \"column\",\n }}\n baseClass='stack'\n ref={ref}\n >{children}</Tag>\n )\n})\n\nexport default Stack\n"],"names":["_jsx"],"mappings":"sHAMA,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,CAAqC,EAAqC,EAAE,GAAoB,KAAI;AAA/D,IAAA,IAAA,EAAE,QAAQ,EAAA,GAAA,EAA2B,EAAtB,KAAK,GAAA,MAAA,CAAA,EAAA,EAApB,YAAsB,CAAF;AACpF,IAAA,QACIA,GAAA,CAAC,GAAG,oBACI,KAAK,EAAA,EACT,GAAG,EAAE;AACD,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,aAAa,EAAE,QAAQ;SAC1B,EACD,SAAS,EAAC,OAAO,EACjB,GAAG,EAAE,GAAG,EAAA,QAAA,EACV,QAAQ,EAAA,CAAA,CAAO;AAEzB,CAAC"}
|
package/Text/index.js
CHANGED
|
@@ -6,5 +6,10 @@
|
|
|
6
6
|
_p.variant = variant;
|
|
7
7
|
const p = core.useBreakpointProps(_p);
|
|
8
8
|
variant = (_b = p.variant) !== null && _b !== void 0 ? _b : 'text';
|
|
9
|
-
return (jsxRuntime.jsx(core.Tag, Object.assign({ component: (
|
|
9
|
+
return (jsxRuntime.jsx(core.Tag, Object.assign({ component: variant.startsWith('h') ? variant : "p" }, props, { sxr: {
|
|
10
|
+
fontSize: variant,
|
|
11
|
+
lineHeight: variant,
|
|
12
|
+
fontWeight: variant,
|
|
13
|
+
color: "text.primary",
|
|
14
|
+
}, baseClass: 'text', ref: ref, children: children })));
|
|
10
15
|
});exports.default=Text;//# sourceMappingURL=index.js.map
|
package/Text/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/Text/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType, useBreakpointProps, useBreakpointPropsType } from '@xanui/core';\n\n\nexport type TextProps<T extends TagComponentType = \"p\"> = TagProps<T> & {\n variant?: useBreakpointPropsType<\"text\" | \"button\" | \"small\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\">\n}\n\nconst Text = React.forwardRef(<T extends TagComponentType = \"p\">({ children, variant, ...props }: TextProps<T>, ref?: React.Ref<any>) => {\n const _p: any = {}\n if (variant) _p.variant = variant\n const p: any = useBreakpointProps(_p)\n variant = p.variant ?? 'text'\n\n return (\n <Tag\n component={(variant
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/Text/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType, useBreakpointProps, useBreakpointPropsType } from '@xanui/core';\n\n\nexport type TextProps<T extends TagComponentType = \"p\"> = TagProps<T> & {\n variant?: useBreakpointPropsType<\"text\" | \"button\" | \"small\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\">\n}\n\nconst Text = React.forwardRef(<T extends TagComponentType = \"p\">({ children, variant, ...props }: TextProps<T>, ref?: React.Ref<any>) => {\n const _p: any = {}\n if (variant) _p.variant = variant\n const p: any = useBreakpointProps(_p)\n variant = p.variant ?? 'text'\n\n return (\n <Tag\n component={(variant as string).startsWith('h') ? variant as any : \"p\"}\n {...props}\n sxr={{\n fontSize: variant,\n lineHeight: variant,\n fontWeight: variant,\n color: \"text.primary\",\n }}\n baseClass='text'\n ref={ref}\n >{children}</Tag>\n )\n})\n\nexport default Text\n"],"names":["__rest","useBreakpointProps","_jsx","Tag"],"mappings":"4LASA,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,CAAmC,EAA6C,EAAE,GAAoB,KAAI;;QAAvE,EAAE,QAAQ,EAAE,OAAO,EAAA,GAAA,EAA0B,EAArB,KAAK,GAAAA,YAAA,CAAA,EAAA,EAA7B,uBAA+B,CAAF;IAC1F,MAAM,EAAE,GAAQ,EAAE;AAClB,IAAA,IAAI,OAAO;AAAE,QAAA,EAAE,CAAC,OAAO,GAAG,OAAO;AACjC,IAAA,MAAM,CAAC,GAAQC,uBAAkB,CAAC,EAAE,CAAC;AACrC,IAAA,OAAO,GAAG,CAAA,EAAA,GAAA,CAAC,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAI,MAAM;IAE7B,QACIC,cAAA,CAACC,QAAG,EAAA,MAAA,CAAA,MAAA,CAAA,EACA,SAAS,EAAG,OAAkB,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,OAAc,GAAG,GAAG,EAAA,EACjE,KAAK,EAAA,EACT,GAAG,EAAE;AACD,YAAA,QAAQ,EAAE,OAAO;AACjB,YAAA,UAAU,EAAE,OAAO;AACnB,YAAA,UAAU,EAAE,OAAO;AACnB,YAAA,KAAK,EAAE,cAAc;SACxB,EACD,SAAS,EAAC,MAAM,EAChB,GAAG,EAAE,GAAG,EAAA,QAAA,EACV,QAAQ,EAAA,CAAA,CAAO;AAEzB,CAAC"}
|
package/Text/index.mjs
CHANGED
|
@@ -6,5 +6,10 @@ import {__rest}from'tslib';import {jsx}from'react/jsx-runtime';import React from
|
|
|
6
6
|
_p.variant = variant;
|
|
7
7
|
const p = useBreakpointProps(_p);
|
|
8
8
|
variant = (_b = p.variant) !== null && _b !== void 0 ? _b : 'text';
|
|
9
|
-
return (jsx(Tag, Object.assign({ component: (
|
|
9
|
+
return (jsx(Tag, Object.assign({ component: variant.startsWith('h') ? variant : "p" }, props, { sxr: {
|
|
10
|
+
fontSize: variant,
|
|
11
|
+
lineHeight: variant,
|
|
12
|
+
fontWeight: variant,
|
|
13
|
+
color: "text.primary",
|
|
14
|
+
}, baseClass: 'text', ref: ref, children: children })));
|
|
10
15
|
});export{Text as default};//# sourceMappingURL=index.mjs.map
|
package/Text/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/Text/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType, useBreakpointProps, useBreakpointPropsType } from '@xanui/core';\n\n\nexport type TextProps<T extends TagComponentType = \"p\"> = TagProps<T> & {\n variant?: useBreakpointPropsType<\"text\" | \"button\" | \"small\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\">\n}\n\nconst Text = React.forwardRef(<T extends TagComponentType = \"p\">({ children, variant, ...props }: TextProps<T>, ref?: React.Ref<any>) => {\n const _p: any = {}\n if (variant) _p.variant = variant\n const p: any = useBreakpointProps(_p)\n variant = p.variant ?? 'text'\n\n return (\n <Tag\n component={(variant
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/Text/index.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Tag, TagProps, TagComponentType, useBreakpointProps, useBreakpointPropsType } from '@xanui/core';\n\n\nexport type TextProps<T extends TagComponentType = \"p\"> = TagProps<T> & {\n variant?: useBreakpointPropsType<\"text\" | \"button\" | \"small\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\">\n}\n\nconst Text = React.forwardRef(<T extends TagComponentType = \"p\">({ children, variant, ...props }: TextProps<T>, ref?: React.Ref<any>) => {\n const _p: any = {}\n if (variant) _p.variant = variant\n const p: any = useBreakpointProps(_p)\n variant = p.variant ?? 'text'\n\n return (\n <Tag\n component={(variant as string).startsWith('h') ? variant as any : \"p\"}\n {...props}\n sxr={{\n fontSize: variant,\n lineHeight: variant,\n fontWeight: variant,\n color: \"text.primary\",\n }}\n baseClass='text'\n ref={ref}\n >{children}</Tag>\n )\n})\n\nexport default Text\n"],"names":["_jsx"],"mappings":"yIASA,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,CAAmC,EAA6C,EAAE,GAAoB,KAAI;;QAAvE,EAAE,QAAQ,EAAE,OAAO,EAAA,GAAA,EAA0B,EAArB,KAAK,GAAA,MAAA,CAAA,EAAA,EAA7B,uBAA+B,CAAF;IAC1F,MAAM,EAAE,GAAQ,EAAE;AAClB,IAAA,IAAI,OAAO;AAAE,QAAA,EAAE,CAAC,OAAO,GAAG,OAAO;AACjC,IAAA,MAAM,CAAC,GAAQ,kBAAkB,CAAC,EAAE,CAAC;AACrC,IAAA,OAAO,GAAG,CAAA,EAAA,GAAA,CAAC,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAI,MAAM;IAE7B,QACIA,GAAA,CAAC,GAAG,EAAA,MAAA,CAAA,MAAA,CAAA,EACA,SAAS,EAAG,OAAkB,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,OAAc,GAAG,GAAG,EAAA,EACjE,KAAK,EAAA,EACT,GAAG,EAAE;AACD,YAAA,QAAQ,EAAE,OAAO;AACjB,YAAA,UAAU,EAAE,OAAO;AACnB,YAAA,UAAU,EAAE,OAAO;AACnB,YAAA,KAAK,EAAE,cAAc;SACxB,EACD,SAAS,EAAC,MAAM,EAChB,GAAG,EAAE,GAAG,EAAA,QAAA,EACV,QAAQ,EAAA,CAAA,CAAO;AAEzB,CAAC"}
|