@codeleap/web 1.0.0
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/.eslintignore +2 -0
- package/.eslintrc.js +3 -0
- package/.turbo/turbo-build.log +1 -0
- package/dist/components/ActivityIndicator/index.d.ts +12 -0
- package/dist/components/ActivityIndicator/index.js +60 -0
- package/dist/components/ActivityIndicator/index.js.map +1 -0
- package/dist/components/ActivityIndicator/styles.d.ts +42 -0
- package/dist/components/ActivityIndicator/styles.js +22 -0
- package/dist/components/ActivityIndicator/styles.js.map +1 -0
- package/dist/components/Button.d.ts +15 -0
- package/dist/components/Button.js +48 -0
- package/dist/components/Button.js.map +1 -0
- package/dist/components/CenterWrapper.d.ts +7 -0
- package/dist/components/CenterWrapper.js +28 -0
- package/dist/components/CenterWrapper.js.map +1 -0
- package/dist/components/Checkbox.d.ts +11 -0
- package/dist/components/Checkbox.js +46 -0
- package/dist/components/Checkbox.js.map +1 -0
- package/dist/components/ContentView.d.ts +10 -0
- package/dist/components/ContentView.js +52 -0
- package/dist/components/ContentView.js.map +1 -0
- package/dist/components/Drawer.d.ts +23 -0
- package/dist/components/Drawer.js +66 -0
- package/dist/components/Drawer.js.map +1 -0
- package/dist/components/FileInput.d.ts +8 -0
- package/dist/components/FileInput.js +69 -0
- package/dist/components/FileInput.js.map +1 -0
- package/dist/components/FlatList.d.ts +18 -0
- package/dist/components/FlatList.js +52 -0
- package/dist/components/FlatList.js.map +1 -0
- package/dist/components/HorizontalScroll.d.ts +3 -0
- package/dist/components/HorizontalScroll.js +42 -0
- package/dist/components/HorizontalScroll.js.map +1 -0
- package/dist/components/Icon.d.ts +12 -0
- package/dist/components/Icon.js +21 -0
- package/dist/components/Icon.js.map +1 -0
- package/dist/components/Link.d.ts +6 -0
- package/dist/components/Link.js +66 -0
- package/dist/components/Link.js.map +1 -0
- package/dist/components/Modal/index.d.ts +19 -0
- package/dist/components/Modal/index.js +111 -0
- package/dist/components/Modal/index.js.map +1 -0
- package/dist/components/Modal/styles.d.ts +44 -0
- package/dist/components/Modal/styles.js +33 -0
- package/dist/components/Modal/styles.js.map +1 -0
- package/dist/components/Overlay.d.ts +10 -0
- package/dist/components/Overlay.js +41 -0
- package/dist/components/Overlay.js.map +1 -0
- package/dist/components/PageRouter/Menu.d.ts +10 -0
- package/dist/components/PageRouter/Menu.js +36 -0
- package/dist/components/PageRouter/Menu.js.map +1 -0
- package/dist/components/PageRouter/MenuItem.d.ts +11 -0
- package/dist/components/PageRouter/MenuItem.js +42 -0
- package/dist/components/PageRouter/MenuItem.js.map +1 -0
- package/dist/components/PageRouter/Router.d.ts +8 -0
- package/dist/components/PageRouter/Router.js +27 -0
- package/dist/components/PageRouter/Router.js.map +1 -0
- package/dist/components/PageRouter/index.d.ts +15 -0
- package/dist/components/PageRouter/index.js +76 -0
- package/dist/components/PageRouter/index.js.map +1 -0
- package/dist/components/RadioInput/index.d.ts +62 -0
- package/dist/components/RadioInput/index.js +53 -0
- package/dist/components/RadioInput/index.js.map +1 -0
- package/dist/components/RadioInput/styles.d.ts +43 -0
- package/dist/components/RadioInput/styles.js +44 -0
- package/dist/components/RadioInput/styles.js.map +1 -0
- package/dist/components/Select.d.ts +17 -0
- package/dist/components/Select.js +44 -0
- package/dist/components/Select.js.map +1 -0
- package/dist/components/Slider.d.ts +5 -0
- package/dist/components/Slider.js +36 -0
- package/dist/components/Slider.js.map +1 -0
- package/dist/components/Text.d.ts +9 -0
- package/dist/components/Text.js +39 -0
- package/dist/components/Text.js.map +1 -0
- package/dist/components/TextInput.d.ts +122 -0
- package/dist/components/TextInput.js +125 -0
- package/dist/components/TextInput.js.map +1 -0
- package/dist/components/Tooltip-old.d.ts +11 -0
- package/dist/components/Tooltip-old.js +151 -0
- package/dist/components/Tooltip-old.js.map +1 -0
- package/dist/components/Tooltip.d.ts +12 -0
- package/dist/components/Tooltip.js +124 -0
- package/dist/components/Tooltip.js.map +1 -0
- package/dist/components/Touchable.d.ts +12 -0
- package/dist/components/Touchable.js +48 -0
- package/dist/components/Touchable.js.map +1 -0
- package/dist/components/View.d.ts +9 -0
- package/dist/components/View.js +47 -0
- package/dist/components/View.js.map +1 -0
- package/dist/components/index.d.ts +22 -0
- package/dist/components/index.js +35 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/router/Menu.d.ts +10 -0
- package/dist/components/router/Menu.js +39 -0
- package/dist/components/router/Menu.js.map +1 -0
- package/dist/components/router/MenuItem.d.ts +11 -0
- package/dist/components/router/MenuItem.js +42 -0
- package/dist/components/router/MenuItem.js.map +1 -0
- package/dist/components/router/Router.d.ts +8 -0
- package/dist/components/router/Router.js +28 -0
- package/dist/components/router/Router.js.map +1 -0
- package/dist/components/router/index.d.ts +14 -0
- package/dist/components/router/index.js +69 -0
- package/dist/components/router/index.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/hooks.d.ts +8 -0
- package/dist/lib/hooks.js +49 -0
- package/dist/lib/hooks.js.map +1 -0
- package/dist/lib/logger.d.ts +2 -0
- package/dist/lib/logger.js +16 -0
- package/dist/lib/logger.js.map +1 -0
- package/dist/lib/utils/cookies.d.ts +6 -0
- package/dist/lib/utils/cookies.js +15 -0
- package/dist/lib/utils/cookies.js.map +1 -0
- package/dist/lib/utils/index.d.ts +4 -0
- package/dist/lib/utils/index.js +23 -0
- package/dist/lib/utils/index.js.map +1 -0
- package/dist/lib/utils/pollyfils/scroll.d.ts +1 -0
- package/dist/lib/utils/pollyfils/scroll.js +58 -0
- package/dist/lib/utils/pollyfils/scroll.js.map +1 -0
- package/dist/lib/utils/stopPropagation.d.ts +1 -0
- package/dist/lib/utils/stopPropagation.js +21 -0
- package/dist/lib/utils/stopPropagation.js.map +1 -0
- package/dist/types/utility.d.ts +2 -0
- package/dist/types/utility.js +3 -0
- package/dist/types/utility.js.map +1 -0
- package/package.json +38 -0
- package/src/components/ActivityIndicator/index.tsx +55 -0
- package/src/components/ActivityIndicator/styles.ts +18 -0
- package/src/components/Button.tsx +67 -0
- package/src/components/CenterWrapper.tsx +24 -0
- package/src/components/Checkbox.tsx +46 -0
- package/src/components/ContentView.tsx +48 -0
- package/src/components/Drawer.tsx +114 -0
- package/src/components/FileInput.tsx +48 -0
- package/src/components/FlatList.tsx +77 -0
- package/src/components/HorizontalScroll.tsx +24 -0
- package/src/components/Icon.tsx +26 -0
- package/src/components/Link.tsx +51 -0
- package/src/components/Modal/index.tsx +150 -0
- package/src/components/Modal/styles.ts +49 -0
- package/src/components/Overlay.tsx +25 -0
- package/src/components/PageRouter/Menu.tsx +49 -0
- package/src/components/PageRouter/MenuItem.tsx +55 -0
- package/src/components/PageRouter/Router.tsx +23 -0
- package/src/components/PageRouter/index.tsx +81 -0
- package/src/components/RadioInput/index.tsx +72 -0
- package/src/components/RadioInput/styles.ts +57 -0
- package/src/components/Select.tsx +60 -0
- package/src/components/Slider.tsx +14 -0
- package/src/components/Text.tsx +27 -0
- package/src/components/TextInput.tsx +219 -0
- package/src/components/Tooltip.tsx +138 -0
- package/src/components/Touchable.tsx +47 -0
- package/src/components/View.tsx +54 -0
- package/src/components/index.ts +23 -0
- package/src/index.ts +4 -0
- package/src/lib/hooks.ts +42 -0
- package/src/lib/logger.ts +15 -0
- package/src/lib/utils/cookies.ts +19 -0
- package/src/lib/utils/index.ts +4 -0
- package/src/lib/utils/pollyfils/scroll.ts +59 -0
- package/src/lib/utils/stopPropagation.ts +17 -0
- package/src/types/utility.ts +4 -0
- package/tsconfig.json +42 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuItem.js","sourceRoot":"","sources":["../../../src/components/PageRouter/MenuItem.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gCAA8B;AAC9B,gCAA8B;AAC9B,gCAAyC;AACzC,2CAAwF;AACxF,yCAAsC;AACtC,yDAAmD;AAEnD,IAAM,UAAU,GAAwC,UAAC,KAAK,IAAK,OAAA,uBAAC,WAAI,aAAC,SAAS,EAAE,yBAAQ,IAAM,KAAK,UAAG,EAAvC,CAAuC,CAAA;AAWnG,IAAM,QAAQ,GAA2B,UAAC,KAAK;IAC5C,IAAA,MAAM,GAAI,KAAK,OAAT,CAAS;IACjB,IAAA,KAAwB,KAAK,CAAC,IAAI,EAAhC,KAAK,WAAA,EAAE,IAAI,UAAA,EAAE,IAAI,UAAe,CAAC;IAEjC,IAAA,QAAQ,GAAK,IAAA,WAAG,GAAE,SAAV,CAAW;IAE3B,IAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjC,IAAA,KAAK,GAAK,IAAA,iBAAQ,GAAE,MAAf,CAAe;IAC5B,IAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAE1C,IAAI,QAAQ,EAAC;QACX,OAAS,wBAAC,UAAU,aAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,iBAC9D,uBAAC,WAAI,IACH,OAAO,EAAE,IAAI,EACb,GAAG,EAAE;wBACH,MAAM,CAAC,sBAAsB,CAAC;wBAC9B,QAAQ,IAAI,MAAM,CAAC,wBAAwB,CAAC;qBAC7C,EACD,GAAG,EAAE,KAAK,WACV,EACF,uBAAC,WAAI,IAAC,IAAI,EAAE,IAAI,WAAI,aACT,CAAA;KACd;IAED,OAAO,CAAC,wBAAC,UAAU,aAAC,EAAE,EAAE,IAAI,iBAC1B,uBAAC,WAAI,IAAC,IAAI,EAAE,IAAI,WAAI,EACpB,uBAAC,WAAI,IACH,OAAO,EAAE,IAAI,EACb,GAAG,EAAE;oBACH,MAAM,CAAC,eAAe,CAAC;oBACvB,QAAQ,IAAI,MAAM,CAAC,wBAAwB,CAAC;iBAC7C,EACD,GAAG,EAAE,KAAK,WACV,aACS,CACZ,CAAC;AACJ,CAAC,CAAA;AApCY,QAAA,QAAQ,YAoCpB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Router = void 0;
|
|
18
|
+
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
19
|
+
var react_1 = __importDefault(require("react"));
|
|
20
|
+
var router_1 = require("@reach/router");
|
|
21
|
+
var Router = function (props) {
|
|
22
|
+
var children = props.children, style = props.style, basePath = props.basePath, defaultPath = props.defaultPath;
|
|
23
|
+
var base = "/:language".concat(basePath);
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsx)(router_1.Router, __assign({ basepath: base }, { children: children }), void 0) }, void 0));
|
|
25
|
+
};
|
|
26
|
+
exports.Router = Router;
|
|
27
|
+
//# sourceMappingURL=Router.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Router.js","sourceRoot":"","sources":["../../../src/components/PageRouter/Router.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,wCAAsD;AAQ/C,IAAM,MAAM,GAA0B,UAAC,KAAK;IACzC,IAAA,QAAQ,GAAmC,KAAK,SAAxC,EAAE,KAAK,GAA4B,KAAK,MAAjC,EAAE,QAAQ,GAAkB,KAAK,SAAvB,EAAE,WAAW,GAAK,KAAK,YAAV,CAAW;IACzD,IAAM,IAAI,GAAG,oBAAa,QAAQ,CAAE,CAAC;IAGrC,OAAO,CACL,uBAAC,eAAK,CAAC,QAAQ,cAEb,uBAAC,eAAW,aAAC,QAAQ,EAAE,IAAI,gBACxB,QAAQ,YACG,WACC,CAClB,CAAC;AACJ,CAAC,CAAC;AAbW,QAAA,MAAM,UAajB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentVariants, IconPlaceholder, PageRouterComposition, PageRouterStyles } from '@codeleap/common';
|
|
3
|
+
import { StylesOf } from '../../types/utility';
|
|
4
|
+
export declare type RouteProps = {
|
|
5
|
+
title?: string;
|
|
6
|
+
path?: string;
|
|
7
|
+
menuIcon?: IconPlaceholder;
|
|
8
|
+
};
|
|
9
|
+
export * from './Router';
|
|
10
|
+
declare type RouterPageProps = {
|
|
11
|
+
basePath: string;
|
|
12
|
+
styles?: StylesOf<PageRouterComposition>;
|
|
13
|
+
title?: string;
|
|
14
|
+
} & ComponentVariants<typeof PageRouterStyles>;
|
|
15
|
+
export declare const RouterPage: React.FC<RouterPageProps>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
33
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
34
|
+
};
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.RouterPage = void 0;
|
|
37
|
+
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
38
|
+
var View_1 = require("../View");
|
|
39
|
+
var react_1 = __importStar(require("react"));
|
|
40
|
+
var Menu_1 = require("./Menu");
|
|
41
|
+
var Router_1 = require("./Router");
|
|
42
|
+
var common_1 = require("@codeleap/common");
|
|
43
|
+
var react_helmet_1 = require("react-helmet");
|
|
44
|
+
var utils_1 = require("../../lib/utils");
|
|
45
|
+
__exportStar(require("./Router"), exports);
|
|
46
|
+
var RouterPage = function (props) {
|
|
47
|
+
var children = props.children, basePath = props.basePath, variants = props.variants, pageGroupTitle = props.title, responsiveVariants = props.responsiveVariants, styles = props.styles;
|
|
48
|
+
var pathName = (0, utils_1.url)().pathname;
|
|
49
|
+
var _a = (0, react_1.useMemo)(function () {
|
|
50
|
+
var items = [];
|
|
51
|
+
var defaultPath = '';
|
|
52
|
+
react_1.default.Children.forEach(children, function (c) {
|
|
53
|
+
if (react_1.default.isValidElement(c) && c.props) {
|
|
54
|
+
var _a = c.props, title = _a.title, path = _a.path, menuIcon = _a.menuIcon;
|
|
55
|
+
if ([title, path, menuIcon].some(function (i) { return !i; })) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (c.props.default)
|
|
59
|
+
defaultPath = path;
|
|
60
|
+
items.push(__assign(__assign({}, c.props), { title: title, path: "".concat(basePath).concat(path), icon: menuIcon }));
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
return {
|
|
64
|
+
menuItems: items,
|
|
65
|
+
defaultPath: defaultPath,
|
|
66
|
+
};
|
|
67
|
+
}, [children]), menuItems = _a.menuItems, defaultPath = _a.defaultPath;
|
|
68
|
+
var variantStyles = (0, common_1.useComponentStyle)('PageRouter', { variants: variants, responsiveVariants: responsiveVariants, styles: styles });
|
|
69
|
+
var currentPage = menuItems.find(function (_a) {
|
|
70
|
+
var path = _a.path;
|
|
71
|
+
return pathName.includes(path);
|
|
72
|
+
});
|
|
73
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_helmet_1.Helmet, { children: (0, jsx_runtime_1.jsx)("title", { children: (pageGroupTitle ? "".concat(pageGroupTitle, " | ") : '') + (currentPage ? currentPage === null || currentPage === void 0 ? void 0 : currentPage.title : '') }, void 0) }, void 0), (0, jsx_runtime_1.jsx)(Menu_1.Menu, { items: menuItems, styles: variantStyles }, void 0), (0, jsx_runtime_1.jsx)(View_1.View, __assign({ css: variantStyles.content }, { children: (0, jsx_runtime_1.jsx)(Router_1.Router, __assign({ defaultPath: defaultPath, basePath: basePath }, { children: children }), void 0) }), void 0)] }, void 0);
|
|
74
|
+
};
|
|
75
|
+
exports.RouterPage = RouterPage;
|
|
76
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/PageRouter/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gCAA8B;AAC9B,6CAAsC;AAEtC,+BAA6B;AAC7B,mCAAiC;AACjC,2CAAiI;AAEjI,6CAAqC;AACrC,yCAAqC;AASrC,2CAAwB;AAQjB,IAAM,UAAU,GAA6B,UAAC,KAAK;IACjD,IAAA,QAAQ,GAA6E,KAAK,SAAlF,EAAG,QAAQ,GAAkE,KAAK,SAAvE,EAAG,QAAQ,GAAuD,KAAK,SAA5D,EAAS,cAAc,GAAgC,KAAK,MAArC,EAAE,kBAAkB,GAAY,KAAK,mBAAjB,EAAE,MAAM,GAAI,KAAK,OAAT,CAAS;IACjG,IAAM,QAAQ,GAAG,IAAA,WAAG,GAAE,CAAC,QAAQ,CAAA;IAEzB,IAAA,KAA2B,IAAA,eAAO,EAAC;QACvC,IAAM,KAAK,GAAG,EAAE,CAAA;QAEhB,IAAI,WAAW,GAAG,EAAE,CAAA;QAEpB,eAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAC,CAAC;YACjC,IAAI,eAAK,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAC;gBAC/B,IAAA,KAA0B,CAAC,CAAC,KAAK,EAAhC,KAAK,WAAA,EAAE,IAAI,UAAA,EAAE,QAAQ,cAAW,CAAA;gBACvC,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,EAAF,CAAE,CAAC,EAAC;oBAC1C,OAAM;iBACP;gBACD,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO;oBAAE,WAAW,GAAG,IAAI,CAAA;gBACvC,KAAK,CAAC,IAAI,uBACL,CAAC,CAAC,KAAK,KACV,KAAK,OAAA,EACL,IAAI,EAAE,UAAG,QAAQ,SAAG,IAAI,CAAE,EAC1B,IAAI,EAAE,QAAQ,IACd,CAAA;aACH;QACH,CAAC,CAAC,CAAA;QAEF,OAAO;YACL,SAAS,EAAE,KAAK;YAChB,WAAW,aAAA;SACZ,CAAA;IAEH,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,EA1BP,SAAS,eAAA,EAAE,WAAW,iBA0Bf,CAAA;IAEd,IAAM,aAAa,GAAG,IAAA,0BAAiB,EAAC,YAAY,EAAE,EAAC,QAAQ,UAAA,EAAE,kBAAkB,oBAAA,EAAE,MAAM,QAAA,EAAC,CAAC,CAAA;IAE7F,IAAM,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,UAAC,EAAM;YAAL,IAAI,UAAA;QAAM,OAAA,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;IAAvB,CAAuB,CAAC,CAAA;IACvE,OAAO,6DACL,uBAAC,qBAAM,cACL,4CACG,CAAC,cAAc,CAAC,CAAC,CAAC,UAAG,cAAc,QAAK,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,WACnF,WACD,EACT,uBAAC,WAAI,IACH,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,aAAa,WACrB,EACF,uBAAC,WAAI,aAAC,GAAG,EAAE,aAAa,CAAC,OAAO,gBAC9B,uBAAC,eAAM,aACL,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,gBAEjB,QAAQ,YACF,YACJ,YACN,CAAA;AAEL,CAAC,CAAA;AAvDY,QAAA,UAAU,cAuDtB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { ComponentVariants, RadioInputComposition, RadioInputStyles, StylesOf } from '@codeleap/common';
|
|
3
|
+
export { WebRadioInputStyles } from './styles';
|
|
4
|
+
declare type RadioItem<T extends unknown = any> = {
|
|
5
|
+
value: T;
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
declare const getRadioStyle: (props: any) => Record<import("@codeleap/common").NestedKeys<import("@codeleap/common").FromVariantsBuilder<import("react").CSSProperties, {
|
|
9
|
+
default: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
10
|
+
fixed: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
11
|
+
hidden: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
12
|
+
block: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
13
|
+
flex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
14
|
+
absolute: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
15
|
+
sticky: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
16
|
+
row: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
17
|
+
center: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
18
|
+
column: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
19
|
+
wrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
20
|
+
inline: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
21
|
+
inlineFlex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
22
|
+
full: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
23
|
+
noWrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
24
|
+
fullWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
25
|
+
fullHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
26
|
+
fullView: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
27
|
+
fullViewWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
28
|
+
fullViewHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
29
|
+
whole: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
30
|
+
centerRow: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
31
|
+
listStyles: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
32
|
+
alignStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
33
|
+
alignEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
34
|
+
alignCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
35
|
+
justifyStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
36
|
+
justifyEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
37
|
+
justifyCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
38
|
+
justifySpaceBetween: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
39
|
+
textRight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
40
|
+
textLeft: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
41
|
+
textCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
42
|
+
blur: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
43
|
+
elevated: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
44
|
+
neumorphism: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
45
|
+
scrollX: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
46
|
+
scrollY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
47
|
+
scrollXY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
48
|
+
}>>, any>;
|
|
49
|
+
export declare type RadioButtonProps = Omit<ComponentPropsWithoutRef<'input'>, 'style'> & {
|
|
50
|
+
item: RadioItem;
|
|
51
|
+
select: () => void;
|
|
52
|
+
style: ReturnType<typeof getRadioStyle>;
|
|
53
|
+
};
|
|
54
|
+
export declare type RadioGroupProps<T> = {
|
|
55
|
+
options: RadioItem<T>[];
|
|
56
|
+
value: T;
|
|
57
|
+
onValueChange(value: T): void;
|
|
58
|
+
label: ReactNode;
|
|
59
|
+
styles?: StylesOf<RadioInputComposition>;
|
|
60
|
+
} & ComponentVariants<typeof RadioInputStyles>;
|
|
61
|
+
export declare const RadioButton: React.FC<RadioButtonProps>;
|
|
62
|
+
export declare const RadioGroup: <T extends unknown>(radioGroupProps: RadioGroupProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.RadioGroup = exports.RadioButton = exports.WebRadioInputStyles = void 0;
|
|
26
|
+
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
27
|
+
var react_1 = require("react");
|
|
28
|
+
var uuid_1 = require("uuid");
|
|
29
|
+
var Text_1 = require("../Text");
|
|
30
|
+
var Touchable_1 = require("../Touchable");
|
|
31
|
+
var common_1 = require("@codeleap/common");
|
|
32
|
+
var View_1 = require("../View");
|
|
33
|
+
var styles_1 = require("./styles");
|
|
34
|
+
Object.defineProperty(exports, "WebRadioInputStyles", { enumerable: true, get: function () { return styles_1.WebRadioInputStyles; } });
|
|
35
|
+
var getRadioStyle = function (props) { return (0, common_1.useComponentStyle)('RadioInput', props); };
|
|
36
|
+
var RadioButton = function (_a) {
|
|
37
|
+
var item = _a.item, select = _a.select, style = _a.style, checked = _a.checked, props = __rest(_a, ["item", "select", "style", "checked"]);
|
|
38
|
+
var styleByState = checked ? style['button:checked'] : style['button:unchecked'];
|
|
39
|
+
return (0, jsx_runtime_1.jsxs)(Touchable_1.Touchable, __assign({ onPress: select, css: style.itemWrapper }, { children: [(0, jsx_runtime_1.jsx)(View_1.View, { css: __assign(__assign(__assign({}, style.button), styleByState), { '&:after': __assign(__assign({}, style['button:mark']), styleByState === null || styleByState === void 0 ? void 0 : styleByState['&:after']) }) }, void 0), typeof item.label === 'string' ? (0, jsx_runtime_1.jsx)(Text_1.Text, { text: item.label, css: style.itemText }, void 0) : item.label] }), void 0);
|
|
40
|
+
};
|
|
41
|
+
exports.RadioButton = RadioButton;
|
|
42
|
+
var RadioGroup = function (radioGroupProps) {
|
|
43
|
+
var options = radioGroupProps.options, value = radioGroupProps.value, onValueChange = radioGroupProps.onValueChange, label = radioGroupProps.label, responsiveVariants = radioGroupProps.responsiveVariants, variants = radioGroupProps.variants, styles = radioGroupProps.styles;
|
|
44
|
+
var radioName = (0, react_1.useRef)((0, uuid_1.v4)()).current;
|
|
45
|
+
var radioStyle = getRadioStyle({
|
|
46
|
+
responsiveVariants: responsiveVariants,
|
|
47
|
+
variants: variants,
|
|
48
|
+
styles: styles,
|
|
49
|
+
});
|
|
50
|
+
return (0, jsx_runtime_1.jsxs)(View_1.View, __assign({ css: radioStyle.wrapper }, { children: [typeof label === 'string' ? (0, jsx_runtime_1.jsx)(Text_1.Text, { text: label }, void 0) : label, (0, jsx_runtime_1.jsx)(View_1.View, __assign({ css: radioStyle.listWrapper }, { children: options === null || options === void 0 ? void 0 : options.map(function (item, idx) { return (0, jsx_runtime_1.jsx)(exports.RadioButton, { item: item, style: radioStyle, name: radioName, checked: value === item.value, select: function () { return onValueChange(item.value); } }, idx); }) }), void 0)] }), void 0);
|
|
51
|
+
};
|
|
52
|
+
exports.RadioGroup = RadioGroup;
|
|
53
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/RadioInput/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAmE;AACnE,6BAAuB;AAEvB,gCAA6B;AAC7B,0CAAwC;AACxC,2CAA0H;AAC1H,gCAA8B;AAC9B,mCAA8C;AAArC,6GAAA,mBAAmB,OAAA;AAO5B,IAAM,aAAa,GAAG,UAAC,KAAK,IAAK,OAAA,IAAA,0BAAiB,EAAC,YAAY,EAAE,KAAK,CAAC,EAAtC,CAAsC,CAAA;AAiBhE,IAAM,WAAW,GAA8B,UAAC,EAAwC;IAAvC,IAAA,IAAI,UAAA,EAAE,MAAM,YAAA,EAAE,KAAK,WAAA,EAAE,OAAO,aAAA,EAAK,KAAK,cAAvC,sCAAwC,CAAD;IAC5F,IAAM,YAAY,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAA;IAClF,OAAO,wBAAC,qBAAS,aAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,WAAW,iBACxD,uBAAC,WAAI,IAAE,GAAG,iCACL,KAAK,CAAC,MAAM,GACZ,YAAY,KACf,SAAS,wBACJ,KAAK,CAAC,aAAa,CAAC,GACpB,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAG,SAAS,CAAC,eAE5B,EACH,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,uBAAC,WAAI,IAAC,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,QAAQ,WAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,aACnF,CAAA;AACd,CAAC,CAAA;AAbY,QAAA,WAAW,eAavB;AAGM,IAAM,UAAU,GAAI,UAAoB,eAAkC;IACxE,IAAA,OAAO,GAAuE,eAAe,QAAtF,EAAE,KAAK,GAAgE,eAAe,MAA/E,EAAE,aAAa,GAAiD,eAAe,cAAhE,EAAE,KAAK,GAA0C,eAAe,MAAzD,EAAE,kBAAkB,GAAsB,eAAe,mBAArC,EAAE,QAAQ,GAAY,eAAe,SAA3B,EAAE,MAAM,GAAI,eAAe,OAAnB,CAAmB;IACpG,IAAM,SAAS,GAAG,IAAA,cAAM,EAAC,IAAA,SAAE,GAAE,CAAC,CAAC,OAAO,CAAA;IAEtC,IAAM,UAAU,GAAG,aAAa,CAAC;QAC/B,kBAAkB,oBAAA;QAClB,QAAQ,UAAA;QACR,MAAM,QAAA;KACP,CAAC,CAAA;IACF,OAAO,wBAAC,WAAI,aAAC,GAAG,EAAE,UAAU,CAAC,OAAO,iBACjC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,uBAAC,WAAI,IAAC,IAAI,EAAE,KAAK,WAAG,CAAC,CAAC,CAAC,KAAK,EACzD,uBAAC,WAAI,aAAC,GAAG,EAAE,UAAU,CAAC,WAAW,gBAE7B,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,CAAC,UAAC,IAAI,EAAE,GAAG,IAAM,OAAA,uBAAC,mBAAW,IACvC,IAAI,EAAE,IAAI,EAEV,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,KAAK,KAAK,IAAI,CAAC,KAAK,EAC7B,MAAM,EAAE,cAAM,OAAA,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EAAzB,CAAyB,IAJlC,GAAG,CAKR,EAP2B,CAO3B,CAAC,YAEA,aACF,CAAA;AACT,CAAC,CAAA;AAxBY,QAAA,UAAU,cAwBtB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { RadioInputComposition } from '@codeleap/common';
|
|
2
|
+
export declare const WebRadioInputStyles: {
|
|
3
|
+
default: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
4
|
+
square: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
5
|
+
fixed: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
6
|
+
hidden: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
7
|
+
block: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
8
|
+
flex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
9
|
+
absolute: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
10
|
+
sticky: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
11
|
+
row: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
12
|
+
center: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
13
|
+
column: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
14
|
+
wrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
15
|
+
inline: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
16
|
+
inlineFlex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
17
|
+
full: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
18
|
+
noWrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
19
|
+
fullWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
20
|
+
fullHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
21
|
+
fullView: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
22
|
+
fullViewWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
23
|
+
fullViewHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
24
|
+
whole: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
25
|
+
centerRow: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
26
|
+
listStyles: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
27
|
+
alignStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
28
|
+
alignEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
29
|
+
alignCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
30
|
+
justifyStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
31
|
+
justifyEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
32
|
+
justifyCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
33
|
+
justifySpaceBetween: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
34
|
+
textRight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
35
|
+
textLeft: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
36
|
+
textCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
37
|
+
blur: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
38
|
+
elevated: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
39
|
+
neumorphism: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
40
|
+
scrollX: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
41
|
+
scrollY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
42
|
+
scrollXY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<RadioInputComposition, any>>;
|
|
43
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.WebRadioInputStyles = void 0;
|
|
15
|
+
var common_1 = require("@codeleap/common");
|
|
16
|
+
var createRadioStyle = (0, common_1.createDefaultVariantFactory)();
|
|
17
|
+
var defaultStyles = common_1.RadioInputStyles.default;
|
|
18
|
+
exports.WebRadioInputStyles = __assign(__assign({}, common_1.RadioInputStyles), { default: createRadioStyle(function (theme) {
|
|
19
|
+
var style = defaultStyles(theme);
|
|
20
|
+
return __assign(__assign({}, style), { itemWrapper: __assign(__assign({}, style.itemWrapper), { cursor: 'pointer' }), button: __assign({ height: '1em', width: '1em', borderRadius: theme.borderRadius.large, border: theme.border.primary(1), position: 'relative' }, theme.spacing.marginRight(1)), 'button:mark': {
|
|
21
|
+
background: theme.colors.primary,
|
|
22
|
+
content: '""',
|
|
23
|
+
position: 'absolute',
|
|
24
|
+
left: '50%',
|
|
25
|
+
top: '50%',
|
|
26
|
+
transform: 'translate(-50%,-50%)',
|
|
27
|
+
borderRadius: theme.borderRadius.large,
|
|
28
|
+
height: '50%',
|
|
29
|
+
width: '50%',
|
|
30
|
+
visibility: 'hidden',
|
|
31
|
+
}, 'button:checked': {
|
|
32
|
+
'&:after': {
|
|
33
|
+
visibility: 'visible',
|
|
34
|
+
},
|
|
35
|
+
} });
|
|
36
|
+
}), square: createRadioStyle(function () { return ({
|
|
37
|
+
'button:mark': {
|
|
38
|
+
borderRadius: '1px',
|
|
39
|
+
},
|
|
40
|
+
button: {
|
|
41
|
+
borderRadius: '1px',
|
|
42
|
+
},
|
|
43
|
+
}); }) });
|
|
44
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/RadioInput/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAAwG;AAExG,IAAM,gBAAgB,GAAG,IAAA,oCAA2B,GAAyB,CAAA;AAE7E,IAAM,aAAa,GAAG,yBAAgB,CAAC,OAAO,CAAA;AAEjC,QAAA,mBAAmB,yBAC3B,yBAAgB,KACnB,OAAO,EAAE,gBAAgB,CAAC,UAAC,KAAK;QAC9B,IAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,CAAA;QAClC,6BACK,KAAK,KACR,WAAW,wBACN,KAAK,CAAC,WAAW,KACpB,MAAM,EAAE,SAAS,KAEnB,MAAM,aACJ,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK,EACtC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAE/B,QAAQ,EAAE,UAAU,IACjB,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,GAGjC,aAAa,EAAE;gBACb,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO;gBAChC,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,UAAU;gBACpB,IAAI,EAAE,KAAK;gBACX,GAAG,EAAE,KAAK;gBAEV,SAAS,EAAE,sBAAsB;gBACjC,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK;gBACtC,MAAM,EAAE,KAAK;gBACb,KAAK,EAAE,KAAK;gBACZ,UAAU,EAAE,QAAQ;aACrB,EACD,gBAAgB,EAAE;gBAChB,SAAS,EAAE;oBACT,UAAU,EAAE,SAAS;iBAEtB;aACF,IACF;IACH,CAAC,CAAC,EACF,MAAM,EAAE,gBAAgB,CAAC,cAAM,OAAA,CAAC;QAC9B,aAAa,EAAE;YACb,YAAY,EAAE,KAAK;SACpB;QACD,MAAM,EAAE;YACN,YAAY,EAAE,KAAK;SAEpB;KACF,CAAC,EAR6B,CAQ7B,CAAC,IACJ"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SelectStyles, ComponentVariants, StylesOf, SelectComposition } from '@codeleap/common';
|
|
2
|
+
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
3
|
+
import { ViewProps } from './View';
|
|
4
|
+
declare type NativeSelectProps = ComponentPropsWithRef<'select'>;
|
|
5
|
+
declare type Option = {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string | number;
|
|
8
|
+
};
|
|
9
|
+
export declare type SelectProps = NativeSelectProps & {
|
|
10
|
+
options: Array<Option>;
|
|
11
|
+
styles?: StylesOf<SelectComposition>;
|
|
12
|
+
label?: string | ReactNode;
|
|
13
|
+
wrapperProps?: ViewProps<'div'>;
|
|
14
|
+
onValueChange?: (value: string | number) => void;
|
|
15
|
+
} & ComponentVariants<typeof SelectStyles>;
|
|
16
|
+
export declare const Select: (selectProps: SelectProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.Select = void 0;
|
|
26
|
+
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
27
|
+
var common_1 = require("@codeleap/common");
|
|
28
|
+
var View_1 = require("./View");
|
|
29
|
+
var Text_1 = require("./Text");
|
|
30
|
+
var Select = function (selectProps) {
|
|
31
|
+
var _a = selectProps.variants, variants = _a === void 0 ? [] : _a, _b = selectProps.responsiveVariants, responsiveVariants = _b === void 0 ? {} : _b, options = selectProps.options, styles = selectProps.styles, label = selectProps.label, onValueChange = selectProps.onValueChange, wrapperProps = selectProps.wrapperProps, value = selectProps.value, props = __rest(selectProps, ["variants", "responsiveVariants", "options", "styles", "label", "onValueChange", "wrapperProps", "value"]);
|
|
32
|
+
var variantStyles = (0, common_1.useComponentStyle)('Select', {
|
|
33
|
+
responsiveVariants: responsiveVariants,
|
|
34
|
+
variants: variants,
|
|
35
|
+
styles: styles,
|
|
36
|
+
});
|
|
37
|
+
function handleChange(e) {
|
|
38
|
+
props.onChange && props.onChange(e);
|
|
39
|
+
onValueChange && onValueChange(e.target.value);
|
|
40
|
+
}
|
|
41
|
+
return ((0, jsx_runtime_1.jsxs)(View_1.View, __assign({ css: variantStyles.wrapper }, wrapperProps, { children: [label ? (typeof label === 'string' ? (0, jsx_runtime_1.jsx)(Text_1.Text, { css: variantStyles.label, text: label }, void 0) : label) : null, (0, jsx_runtime_1.jsx)(View_1.View, __assign({ component: 'select', css: variantStyles.select }, props, { onChange: handleChange }, { children: options.map(function (option, index) { return ((0, jsx_runtime_1.jsx)("option", __assign({ value: option.value, selected: value == option.value }, { children: option.label }), index)); }) }), void 0)] }), void 0));
|
|
42
|
+
};
|
|
43
|
+
exports.Select = Select;
|
|
44
|
+
//# sourceMappingURL=Select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../src/components/Select.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,2CAAmH;AAEnH,+BAAyC;AACzC,+BAA8B;AAiBvB,IAAM,MAAM,GAAG,UAAC,WAAuB;IAE1C,IAAA,KASE,WAAW,SATA,EAAb,QAAQ,mBAAG,EAAE,KAAA,EACb,KAQE,WAAW,mBARU,EAAvB,kBAAkB,mBAAG,EAAE,KAAA,EACvB,OAAO,GAOL,WAAW,QAPN,EACP,MAAM,GAMJ,WAAW,OANP,EACN,KAAK,GAKH,WAAW,MALR,EACL,aAAa,GAIX,WAAW,cAJA,EACb,YAAY,GAGV,WAAW,aAHD,EACZ,KAAK,GAEH,WAAW,MAFR,EACF,KAAK,UACN,WAAW,EAVT,0GAUL,CADS,CACM;IAEhB,IAAM,aAAa,GAAG,IAAA,0BAAiB,EAAC,QAAQ,EAAE;QAChD,kBAAkB,oBAAA;QAClB,QAAQ,UAAA;QACR,MAAM,QAAA;KACP,CAAC,CAAA;IACF,SAAS,YAAY,CAAC,CAAC;QACrB,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;QACnC,aAAa,IAAI,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAEhD,CAAC;IACD,OAAO,CACL,wBAAC,WAAI,aAAC,GAAG,EAAE,aAAa,CAAC,OAAO,IAAM,YAAY,eAC/C,KAAK,CAAC,CAAC,CAAC,CACP,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,uBAAC,WAAI,IAAC,GAAG,EAAE,aAAa,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,WAAG,CAAC,CAAC,CAAC,KAAK,CACnF,CAAC,CAAC,CAAC,IAAI,EACR,uBAAC,WAAI,aAAC,SAAS,EAAC,QAAQ,EAAC,GAAG,EAAE,aAAa,CAAC,MAAM,IAAO,KAAK,IAAE,QAAQ,EAAE,YAAY,gBACnF,OAAO,CAAC,GAAG,CAAC,UAAC,MAAM,EAAE,KAAK,IAAK,OAAA,CAC9B,4CAAQ,KAAK,EAAE,MAAM,CAAC,KAAK,EAAc,QAAQ,EAAE,KAAK,IAAI,MAAM,CAAC,KAAK,gBACrE,MAAM,CAAC,KAAK,KADmB,KAAK,CAE9B,CACV,EAJ+B,CAI/B,CAAC,YACG,aACF,CACR,CAAA;AACH,CAAC,CAAA;AArCY,QAAA,MAAM,UAqClB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.Slider = void 0;
|
|
29
|
+
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
30
|
+
var rc_slider_1 = __importDefault(require("rc-slider"));
|
|
31
|
+
var Slider = function (sliderProps) {
|
|
32
|
+
var props = __rest(sliderProps, []);
|
|
33
|
+
return (0, jsx_runtime_1.jsx)(rc_slider_1.default, __assign({}, props), void 0);
|
|
34
|
+
};
|
|
35
|
+
exports.Slider = Slider;
|
|
36
|
+
//# sourceMappingURL=Slider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Slider.js","sourceRoot":"","sources":["../../src/components/Slider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAAgE;AAMzD,IAAM,MAAM,GAAyB,UAAC,WAAW;IACtD,IAEK,KAAK,UACN,WAAW,EAHT,EAGL,CAAc,CAAA;IAEf,OAAO,uBAAC,mBAAQ,eAAK,KAAK,UAAI,CAAA;AAChC,CAAC,CAAA;AAPY,QAAA,MAAM,UAOlB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentVariants, TextComposition, TextStyles } from '@codeleap/common';
|
|
2
|
+
import { ComponentPropsWithoutRef, ElementType } from 'react';
|
|
3
|
+
import { StylesOf } from '../types/utility';
|
|
4
|
+
export declare type TextProps<T extends ElementType> = {
|
|
5
|
+
component?: T;
|
|
6
|
+
text?: string;
|
|
7
|
+
styles?: StylesOf<TextComposition>;
|
|
8
|
+
} & ComponentPropsWithoutRef<T> & ComponentVariants<typeof TextStyles>;
|
|
9
|
+
export declare const Text: <T extends ElementType<any>>(textProps: TextProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.Text = void 0;
|
|
26
|
+
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
27
|
+
var common_1 = require("@codeleap/common");
|
|
28
|
+
var Text = function (textProps) {
|
|
29
|
+
var _a = textProps.variants, variants = _a === void 0 ? [] : _a, _b = textProps.responsiveVariants, responsiveVariants = _b === void 0 ? {} : _b, text = textProps.text, children = textProps.children, _c = textProps.component, component = _c === void 0 ? 'p' : _c, styles = textProps.styles, props = __rest(textProps, ["variants", "responsiveVariants", "text", "children", "component", "styles"]);
|
|
30
|
+
var variantStyles = (0, common_1.useComponentStyle)('Text', {
|
|
31
|
+
rootElement: 'text',
|
|
32
|
+
responsiveVariants: responsiveVariants,
|
|
33
|
+
variants: variants,
|
|
34
|
+
});
|
|
35
|
+
var Component = component;
|
|
36
|
+
return (0, jsx_runtime_1.jsx)(Component, __assign({}, props, { css: __assign(__assign(__assign({}, variantStyles.text), props.style), styles === null || styles === void 0 ? void 0 : styles.text) }, { children: text || children }), void 0);
|
|
37
|
+
};
|
|
38
|
+
exports.Text = Text;
|
|
39
|
+
//# sourceMappingURL=Text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../src/components/Text.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,2CAAsG;AAU/F,IAAM,IAAI,GAAG,UAAyB,SAAsB;IAC1D,IAAA,KAA8F,SAAS,SAA1F,EAAb,QAAQ,mBAAG,EAAE,KAAA,EAAE,KAA+E,SAAS,mBAAhE,EAAxB,kBAAkB,mBAAI,EAAE,KAAA,EAAE,IAAI,GAAiD,SAAS,KAA1D,EAAE,QAAQ,GAAuC,SAAS,SAAhD,EAAE,KAAqC,SAAS,UAA/B,EAAf,SAAS,mBAAG,GAAG,KAAA,EAAE,MAAM,GAAc,SAAS,OAAvB,EAAK,KAAK,UAAI,SAAS,EAAxG,6EAA4F,CAAD,CAAa;IAC9G,IAAM,aAAa,GAAG,IAAA,0BAAiB,EAAC,MAAM,EAAE;QAC9C,WAAW,EAAE,MAAM;QACnB,kBAAkB,oBAAA;QAClB,QAAQ,UAAA;KACT,CAAC,CAAA;IAEF,IAAM,SAAS,GAAG,SAAS,CAAA;IAG3B,OAAO,uBAAC,SAAS,eAAK,KAAK,IAAE,GAAG,iCAAM,aAAa,CAAC,IAAI,GAAK,KAAK,CAAC,KAAK,GAAK,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,iBACtF,IAAI,IAAI,QAAQ,YACP,CAAA;AACd,CAAC,CAAA;AAdY,QAAA,IAAI,QAchB"}
|