@mirai/ui 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/README.md +349 -0
- package/build/components/Button/Button.js +44 -0
- package/build/components/Button/Button.js.map +1 -0
- package/build/components/Button/Button.module.css +79 -0
- package/build/components/Button/__tests__/__snapshots__/Button.test.js.snap +113 -0
- package/build/components/Button/index.js +19 -0
- package/build/components/Button/index.js.map +1 -0
- package/build/components/Calendar/Calendar.Month.js +101 -0
- package/build/components/Calendar/Calendar.Month.js.map +1 -0
- package/build/components/Calendar/Calendar.Week.js +144 -0
- package/build/components/Calendar/Calendar.Week.js.map +1 -0
- package/build/components/Calendar/Calendar.constants.js +11 -0
- package/build/components/Calendar/Calendar.constants.js.map +1 -0
- package/build/components/Calendar/Calendar.js +146 -0
- package/build/components/Calendar/Calendar.js.map +1 -0
- package/build/components/Calendar/Calendar.module.css +96 -0
- package/build/components/Calendar/__tests__/__snapshots__/Calendar.test.jsx.snap +17853 -0
- package/build/components/Calendar/helpers/getFirstDateOfMonth.js +16 -0
- package/build/components/Calendar/helpers/getFirstDateOfMonth.js.map +1 -0
- package/build/components/Calendar/helpers/getFirstDateOfWeek.js +20 -0
- package/build/components/Calendar/helpers/getFirstDateOfWeek.js.map +1 -0
- package/build/components/Calendar/helpers/getHeader.js +23 -0
- package/build/components/Calendar/helpers/getHeader.js.map +1 -0
- package/build/components/Calendar/helpers/getToday.js +15 -0
- package/build/components/Calendar/helpers/getToday.js.map +1 -0
- package/build/components/Calendar/helpers/getWeekNumber.js +17 -0
- package/build/components/Calendar/helpers/getWeekNumber.js.map +1 -0
- package/build/components/Calendar/helpers/getWeekdays.js +27 -0
- package/build/components/Calendar/helpers/getWeekdays.js.map +1 -0
- package/build/components/Calendar/helpers/index.js +97 -0
- package/build/components/Calendar/helpers/index.js.map +1 -0
- package/build/components/Calendar/helpers/isJest.js +9 -0
- package/build/components/Calendar/helpers/isJest.js.map +1 -0
- package/build/components/Calendar/index.js +19 -0
- package/build/components/Calendar/index.js.map +1 -0
- package/build/components/Form/Form.js +184 -0
- package/build/components/Form/Form.js.map +1 -0
- package/build/components/Form/__tests__/__snapshots__/Form.test.jsx.snap +47 -0
- package/build/components/Form/helpers/getChildrenErrors.js +47 -0
- package/build/components/Form/helpers/getChildrenErrors.js.map +1 -0
- package/build/components/Form/helpers/getChildrenValues.js +46 -0
- package/build/components/Form/helpers/getChildrenValues.js.map +1 -0
- package/build/components/Form/helpers/getField.js +17 -0
- package/build/components/Form/helpers/getField.js.map +1 -0
- package/build/components/Form/helpers/groupState.js +29 -0
- package/build/components/Form/helpers/groupState.js.map +1 -0
- package/build/components/Form/helpers/index.js +58 -0
- package/build/components/Form/helpers/index.js.map +1 -0
- package/build/components/Form/index.js +19 -0
- package/build/components/Form/index.js.map +1 -0
- package/build/components/InputNumber/InputNumber.js +71 -0
- package/build/components/InputNumber/InputNumber.js.map +1 -0
- package/build/components/InputNumber/InputNumber.module.css +13 -0
- package/build/components/InputNumber/__tests__/__snapshots__/InputNumber.test.js.snap +616 -0
- package/build/components/InputNumber/index.js +19 -0
- package/build/components/InputNumber/index.js.map +1 -0
- package/build/components/InputText/InputText.js +100 -0
- package/build/components/InputText/InputText.js.map +1 -0
- package/build/components/InputText/InputText.module.css +68 -0
- package/build/components/InputText/__tests__/__snapshots__/InputText.test.js.snap +212 -0
- package/build/components/InputText/index.js +19 -0
- package/build/components/InputText/index.js.map +1 -0
- package/build/components/Modal/Modal.js +50 -0
- package/build/components/Modal/Modal.js.map +1 -0
- package/build/components/Modal/Modal.module.css +70 -0
- package/build/components/Modal/__tests__/__snapshots__/Modal.test.js.snap +150 -0
- package/build/components/Modal/index.js +19 -0
- package/build/components/Modal/index.js.map +1 -0
- package/build/components/index.js +84 -0
- package/build/components/index.js.map +1 -0
- package/build/helpers/getInputErrors.js +45 -0
- package/build/helpers/getInputErrors.js.map +1 -0
- package/build/helpers/index.js +32 -0
- package/build/helpers/index.js.map +1 -0
- package/build/helpers/isValidDate.js +58 -0
- package/build/helpers/isValidDate.js.map +1 -0
- package/build/helpers/isValidEmail.js +15 -0
- package/build/helpers/isValidEmail.js.map +1 -0
- package/build/helpers/isValidPhone.js +25 -0
- package/build/helpers/isValidPhone.js.map +1 -0
- package/build/helpers/styles.js +21 -0
- package/build/helpers/styles.js.map +1 -0
- package/build/hooks/helpers/getNavigator.js +33 -0
- package/build/hooks/helpers/getNavigator.js.map +1 -0
- package/build/hooks/helpers/getResolution.js +22 -0
- package/build/hooks/helpers/getResolution.js.map +1 -0
- package/build/hooks/helpers/index.js +32 -0
- package/build/hooks/helpers/index.js.map +1 -0
- package/build/hooks/index.js +19 -0
- package/build/hooks/index.js.map +1 -0
- package/build/hooks/useDevice.js +48 -0
- package/build/hooks/useDevice.js.map +1 -0
- package/build/index.js +71 -0
- package/build/index.js.map +1 -0
- package/build/primitives/Icon/Icon.constants.js +27 -0
- package/build/primitives/Icon/Icon.constants.js.map +1 -0
- package/build/primitives/Icon/Icon.js +34 -0
- package/build/primitives/Icon/Icon.js.map +1 -0
- package/build/primitives/Icon/Icon.module.css +11 -0
- package/build/primitives/Icon/__tests__/__snapshots__/Icon.test.js.snap +133 -0
- package/build/primitives/Icon/index.js +31 -0
- package/build/primitives/Icon/index.js.map +1 -0
- package/build/primitives/Input/Input.js +66 -0
- package/build/primitives/Input/Input.js.map +1 -0
- package/build/primitives/Input/Input.module.css +25 -0
- package/build/primitives/Input/__tests__/__snapshots__/Input.test.js.snap +74 -0
- package/build/primitives/Input/helpers/index.js +19 -0
- package/build/primitives/Input/helpers/index.js.map +1 -0
- package/build/primitives/Input/helpers/parseValue.js +17 -0
- package/build/primitives/Input/helpers/parseValue.js.map +1 -0
- package/build/primitives/Input/index.js +19 -0
- package/build/primitives/Input/index.js.map +1 -0
- package/build/primitives/Pressable/Pressable.constants.js +9 -0
- package/build/primitives/Pressable/Pressable.constants.js.map +1 -0
- package/build/primitives/Pressable/Pressable.js +50 -0
- package/build/primitives/Pressable/Pressable.js.map +1 -0
- package/build/primitives/Pressable/Pressable.module.css +18 -0
- package/build/primitives/Pressable/__tests__/__snapshots__/Pressable.test.js.snap +53 -0
- package/build/primitives/Pressable/index.js +19 -0
- package/build/primitives/Pressable/index.js.map +1 -0
- package/build/primitives/ScrollView/ScrollView.js +89 -0
- package/build/primitives/ScrollView/ScrollView.js.map +1 -0
- package/build/primitives/ScrollView/ScrollView.module.css +35 -0
- package/build/primitives/ScrollView/__tests__/__snapshots__/ScrollView.test.js.snap +535 -0
- package/build/primitives/ScrollView/index.js +19 -0
- package/build/primitives/ScrollView/index.js.map +1 -0
- package/build/primitives/Text/Text.js +40 -0
- package/build/primitives/Text/Text.js.map +1 -0
- package/build/primitives/Text/Text.module.css +36 -0
- package/build/primitives/Text/__tests__/__snapshots__/Text.test.js.snap +102 -0
- package/build/primitives/Text/index.js +19 -0
- package/build/primitives/Text/index.js.map +1 -0
- package/build/primitives/View/View.js +36 -0
- package/build/primitives/View/View.js.map +1 -0
- package/build/primitives/View/View.module.css +16 -0
- package/build/primitives/View/__tests__/__snapshots__/View.test.js.snap +62 -0
- package/build/primitives/View/index.js +19 -0
- package/build/primitives/View/index.js.map +1 -0
- package/build/primitives/index.js +84 -0
- package/build/primitives/index.js.map +1 -0
- package/build/theme/default.theme.css +37 -0
- package/build/theme/helpers/camelcase.js +16 -0
- package/build/theme/helpers/camelcase.js.map +1 -0
- package/build/theme/helpers/index.js +19 -0
- package/build/theme/helpers/index.js.map +1 -0
- package/build/theme/index.js +19 -0
- package/build/theme/index.js.map +1 -0
- package/build/theme/theme.js +43 -0
- package/build/theme/theme.js.map +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.ScrollView = void 0;
|
|
11
|
+
|
|
12
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
13
|
+
|
|
14
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
15
|
+
|
|
16
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
17
|
+
|
|
18
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
+
|
|
20
|
+
var _helpers = require("../../helpers");
|
|
21
|
+
|
|
22
|
+
var _ScrollViewModule = _interopRequireDefault(require("./ScrollView.module.css"));
|
|
23
|
+
|
|
24
|
+
var _excluded = ["behavior", "children", "height", "horizontal", "scrollEventThrottle", "scrollIndicator", "scrollTo", "tag", "width", "onScroll"];
|
|
25
|
+
|
|
26
|
+
var ScrollView = function ScrollView(_ref) {
|
|
27
|
+
var _ref$behavior = _ref.behavior,
|
|
28
|
+
behavior = _ref$behavior === void 0 ? 'smooth' : _ref$behavior,
|
|
29
|
+
children = _ref.children,
|
|
30
|
+
height = _ref.height,
|
|
31
|
+
horizontal = _ref.horizontal,
|
|
32
|
+
_ref$scrollEventThrot = _ref.scrollEventThrottle,
|
|
33
|
+
scrollEventThrottle = _ref$scrollEventThrot === void 0 ? 16 : _ref$scrollEventThrot,
|
|
34
|
+
scrollIndicator = _ref.scrollIndicator,
|
|
35
|
+
scrollTo = _ref.scrollTo,
|
|
36
|
+
_ref$tag = _ref.tag,
|
|
37
|
+
tag = _ref$tag === void 0 ? 'div' : _ref$tag,
|
|
38
|
+
width = _ref.width,
|
|
39
|
+
onScroll = _ref.onScroll,
|
|
40
|
+
others = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
41
|
+
var ref = (0, _react.useRef)();
|
|
42
|
+
var timeout = null;
|
|
43
|
+
(0, _react.useEffect)(function () {
|
|
44
|
+
var _current$scrollTo;
|
|
45
|
+
|
|
46
|
+
var _ref2 = ref || {},
|
|
47
|
+
_ref2$current = _ref2.current,
|
|
48
|
+
current = _ref2$current === void 0 ? {} : _ref2$current;
|
|
49
|
+
|
|
50
|
+
if (!current.scrollTo || !scrollTo) return;
|
|
51
|
+
current.scrollTo((_current$scrollTo = {}, (0, _defineProperty2.default)(_current$scrollTo, horizontal ? 'left' : 'top', scrollTo), (0, _defineProperty2.default)(_current$scrollTo, "behavior", behavior), _current$scrollTo)); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
52
|
+
}, [scrollTo]);
|
|
53
|
+
|
|
54
|
+
var handleScroll = function handleScroll(_ref3) {
|
|
55
|
+
var _ref3$target = _ref3.target;
|
|
56
|
+
_ref3$target = _ref3$target === void 0 ? {} : _ref3$target;
|
|
57
|
+
var clientHeight = _ref3$target.clientHeight,
|
|
58
|
+
clientWidth = _ref3$target.clientWidth,
|
|
59
|
+
scrollHeight = _ref3$target.scrollHeight,
|
|
60
|
+
scrollWidth = _ref3$target.scrollWidth,
|
|
61
|
+
scrollTop = _ref3$target.scrollTop,
|
|
62
|
+
scrollLeft = _ref3$target.scrollLeft;
|
|
63
|
+
var x = parseInt(scrollLeft, 10);
|
|
64
|
+
var y = parseInt(scrollTop, 10);
|
|
65
|
+
clearTimeout(timeout);
|
|
66
|
+
timeout = setTimeout(function () {
|
|
67
|
+
onScroll({
|
|
68
|
+
x: x,
|
|
69
|
+
y: y,
|
|
70
|
+
percentX: parseInt(x * 100 / (scrollWidth - clientWidth), 10),
|
|
71
|
+
percentY: parseInt(y * 100 / (scrollHeight - clientHeight), 10)
|
|
72
|
+
});
|
|
73
|
+
}, scrollEventThrottle);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
return /*#__PURE__*/_react.default.createElement(tag, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, others), {}, {
|
|
77
|
+
ref: ref,
|
|
78
|
+
className: (0, _helpers.styles)(_ScrollViewModule.default.scrollview, horizontal && _ScrollViewModule.default.horizontal, scrollIndicator && _ScrollViewModule.default.indicator, others.className),
|
|
79
|
+
style: {
|
|
80
|
+
height: height,
|
|
81
|
+
width: width
|
|
82
|
+
},
|
|
83
|
+
onScroll: onScroll ? handleScroll : undefined
|
|
84
|
+
}), children);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
exports.ScrollView = ScrollView;
|
|
88
|
+
ScrollView.displayName = 'Primitive:ScrollView';
|
|
89
|
+
//# sourceMappingURL=ScrollView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/primitives/ScrollView/ScrollView.jsx"],"names":["ScrollView","behavior","children","height","horizontal","scrollEventThrottle","scrollIndicator","scrollTo","tag","width","onScroll","others","ref","timeout","current","handleScroll","target","clientHeight","clientWidth","scrollHeight","scrollWidth","scrollTop","scrollLeft","x","parseInt","y","clearTimeout","setTimeout","percentX","percentY","React","createElement","className","style","scrollview","indicator","undefined","displayName"],"mappings":";;;;;;;;;;;;;;;;;AACA;;AAEA;;AACA;;;;AAEA,IAAMA,UAAU,GAAG,SAAbA,UAAa,OAYb;AAAA,2BAXJC,QAWI;AAAA,MAXJA,QAWI,8BAXO,QAWP;AAAA,MAVJC,QAUI,QAVJA,QAUI;AAAA,MATJC,MASI,QATJA,MASI;AAAA,MARJC,UAQI,QARJA,UAQI;AAAA,mCAPJC,mBAOI;AAAA,MAPJA,mBAOI,sCAPkB,EAOlB;AAAA,MANJC,eAMI,QANJA,eAMI;AAAA,MALJC,QAKI,QALJA,QAKI;AAAA,sBAJJC,GAII;AAAA,MAJJA,GAII,yBAJE,KAIF;AAAA,MAHJC,KAGI,QAHJA,KAGI;AAAA,MAFJC,QAEI,QAFJA,QAEI;AAAA,MADDC,MACC;AACJ,MAAMC,GAAG,GAAG,oBAAZ;AAEA,MAAIC,OAAO,GAAG,IAAd;AAEA,wBAAU,YAAM;AAAA;;AACd,gBAAyBD,GAAG,IAAI,EAAhC;AAAA,8BAAQE,OAAR;AAAA,QAAQA,OAAR,8BAAkB,EAAlB;;AACA,QAAI,CAACA,OAAO,CAACP,QAAT,IAAqB,CAACA,QAA1B,EAAoC;AAEpCO,IAAAA,OAAO,CAACP,QAAR,2EAAoBH,UAAU,GAAG,MAAH,GAAY,KAA1C,EAAkDG,QAAlD,gEAA4DN,QAA5D,uBAJc,CAKd;AACD,GAND,EAMG,CAACM,QAAD,CANH;;AAQA,MAAMQ,YAAY,GAAG,SAAfA,YAAe,QAEf;AAAA,6BADJC,MACI;AAAA,6CADsF,EACtF;AAAA,QADMC,YACN,gBADMA,YACN;AAAA,QADoBC,WACpB,gBADoBA,WACpB;AAAA,QADiCC,YACjC,gBADiCA,YACjC;AAAA,QAD+CC,WAC/C,gBAD+CA,WAC/C;AAAA,QAD4DC,SAC5D,gBAD4DA,SAC5D;AAAA,QADuEC,UACvE,gBADuEA,UACvE;AACJ,QAAMC,CAAC,GAAGC,QAAQ,CAACF,UAAD,EAAa,EAAb,CAAlB;AACA,QAAMG,CAAC,GAAGD,QAAQ,CAACH,SAAD,EAAY,EAAZ,CAAlB;AAEAK,IAAAA,YAAY,CAACb,OAAD,CAAZ;AACAA,IAAAA,OAAO,GAAGc,UAAU,CAAC,YAAM;AACzBjB,MAAAA,QAAQ,CAAC;AACPa,QAAAA,CAAC,EAADA,CADO;AAEPE,QAAAA,CAAC,EAADA,CAFO;AAGPG,QAAAA,QAAQ,EAAEJ,QAAQ,CAAED,CAAC,GAAG,GAAL,IAAaH,WAAW,GAAGF,WAA3B,CAAD,EAA0C,EAA1C,CAHX;AAIPW,QAAAA,QAAQ,EAAEL,QAAQ,CAAEC,CAAC,GAAG,GAAL,IAAaN,YAAY,GAAGF,YAA5B,CAAD,EAA4C,EAA5C;AAJX,OAAD,CAAR;AAMD,KAPmB,EAOjBZ,mBAPiB,CAApB;AAQD,GAfD;;AAiBA,sBAAOyB,eAAMC,aAAN,CACLvB,GADK,8DAGAG,MAHA;AAIHC,IAAAA,GAAG,EAAHA,GAJG;AAKHoB,IAAAA,SAAS,EAAE,qBACTC,0BAAMC,UADG,EAET9B,UAAU,IAAI6B,0BAAM7B,UAFX,EAGTE,eAAe,IAAI2B,0BAAME,SAHhB,EAITxB,MAAM,CAACqB,SAJE,CALR;AAWHC,IAAAA,KAAK,EAAE;AAAE9B,MAAAA,MAAM,EAANA,MAAF;AAAUM,MAAAA,KAAK,EAALA;AAAV,KAXJ;AAYHC,IAAAA,QAAQ,EAAEA,QAAQ,GAAGK,YAAH,GAAkBqB;AAZjC,MAcLlC,QAdK,CAAP;AAgBD,CA1DD;;;AA4DAF,UAAU,CAACqC,WAAX,GAAyB,sBAAzB","sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useEffect, useRef } from 'react';\n\nimport { styles } from '../../helpers';\nimport style from './ScrollView.module.css';\n\nconst ScrollView = ({\n behavior = 'smooth',\n children,\n height,\n horizontal,\n scrollEventThrottle = 16, // * 60fps\n scrollIndicator,\n scrollTo,\n tag = 'div',\n width,\n onScroll,\n ...others\n}) => {\n const ref = useRef();\n\n let timeout = null;\n\n useEffect(() => {\n const { current = {} } = ref || {};\n if (!current.scrollTo || !scrollTo) return;\n\n current.scrollTo({ [horizontal ? 'left' : 'top']: scrollTo, behavior });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [scrollTo]);\n\n const handleScroll = ({\n target: { clientHeight, clientWidth, scrollHeight, scrollWidth, scrollTop, scrollLeft } = {},\n }) => {\n const x = parseInt(scrollLeft, 10);\n const y = parseInt(scrollTop, 10);\n\n clearTimeout(timeout);\n timeout = setTimeout(() => {\n onScroll({\n x,\n y,\n percentX: parseInt((x * 100) / (scrollWidth - clientWidth), 10),\n percentY: parseInt((y * 100) / (scrollHeight - clientHeight), 10),\n });\n }, scrollEventThrottle);\n };\n\n return React.createElement(\n tag,\n {\n ...others,\n ref,\n className: styles(\n style.scrollview,\n horizontal && style.horizontal,\n scrollIndicator && style.indicator,\n others.className,\n ),\n style: { height, width },\n onScroll: onScroll ? handleScroll : undefined,\n },\n children,\n );\n};\n\nScrollView.displayName = 'Primitive:ScrollView';\n\nScrollView.propTypes = {\n behavior: PropTypes.string,\n children: PropTypes.node.isRequired,\n height: PropTypes.number,\n horizontal: PropTypes.bool,\n scrollEventThrottle: PropTypes.number,\n scrollIndicator: PropTypes.bool,\n scrollTo: PropTypes.number,\n tag: PropTypes.string,\n width: PropTypes.number,\n onScroll: PropTypes.func,\n};\n\nexport { ScrollView };\n"],"file":"ScrollView.js"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.scrollview {
|
|
2
|
+
align-items: flex-start;
|
|
3
|
+
display: flex;
|
|
4
|
+
height: fit-content;
|
|
5
|
+
width: fit-content;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.scrollview:not(.horizontal) {
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
scroll-snap-type: y mandatory;
|
|
11
|
+
overflow-y: scroll;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.scrollview.horizontal {
|
|
15
|
+
flex-direction: row;
|
|
16
|
+
scroll-snap-type: x mandatory;
|
|
17
|
+
overflow-x: scroll;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.indicator {
|
|
21
|
+
/* */
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.scrollview:not(.indicator) {
|
|
25
|
+
scrollbar-width: none;
|
|
26
|
+
-ms-overflow-style: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.scrollview:not(.indicator)::-webkit-scrollbar {
|
|
30
|
+
display: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.scrollview > * {
|
|
34
|
+
scroll-snap-align: start;
|
|
35
|
+
}
|
|
@@ -0,0 +1,535 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`primitive:<ScrollView> inherit:className 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
class="scrollview mirai"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
style="height: 128px; width: 128px;"
|
|
10
|
+
>
|
|
11
|
+
1
|
|
12
|
+
</div>
|
|
13
|
+
<div
|
|
14
|
+
style="height: 128px; width: 128px;"
|
|
15
|
+
>
|
|
16
|
+
2
|
|
17
|
+
</div>
|
|
18
|
+
<div
|
|
19
|
+
style="height: 128px; width: 128px;"
|
|
20
|
+
>
|
|
21
|
+
3
|
|
22
|
+
</div>
|
|
23
|
+
<div
|
|
24
|
+
style="height: 128px; width: 128px;"
|
|
25
|
+
>
|
|
26
|
+
4
|
|
27
|
+
</div>
|
|
28
|
+
<div
|
|
29
|
+
style="height: 128px; width: 128px;"
|
|
30
|
+
>
|
|
31
|
+
5
|
|
32
|
+
</div>
|
|
33
|
+
<div
|
|
34
|
+
style="height: 128px; width: 128px;"
|
|
35
|
+
>
|
|
36
|
+
6
|
|
37
|
+
</div>
|
|
38
|
+
<div
|
|
39
|
+
style="height: 128px; width: 128px;"
|
|
40
|
+
>
|
|
41
|
+
7
|
|
42
|
+
</div>
|
|
43
|
+
<div
|
|
44
|
+
style="height: 128px; width: 128px;"
|
|
45
|
+
>
|
|
46
|
+
8
|
|
47
|
+
</div>
|
|
48
|
+
<div
|
|
49
|
+
style="height: 128px; width: 128px;"
|
|
50
|
+
>
|
|
51
|
+
9
|
|
52
|
+
</div>
|
|
53
|
+
<div
|
|
54
|
+
style="height: 128px; width: 128px;"
|
|
55
|
+
>
|
|
56
|
+
10
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</DocumentFragment>
|
|
60
|
+
`;
|
|
61
|
+
|
|
62
|
+
exports[`primitive:<ScrollView> prop:height 1`] = `
|
|
63
|
+
<DocumentFragment>
|
|
64
|
+
<div
|
|
65
|
+
class="scrollview"
|
|
66
|
+
style="height: 256px;"
|
|
67
|
+
>
|
|
68
|
+
<div
|
|
69
|
+
style="height: 128px; width: 128px;"
|
|
70
|
+
>
|
|
71
|
+
1
|
|
72
|
+
</div>
|
|
73
|
+
<div
|
|
74
|
+
style="height: 128px; width: 128px;"
|
|
75
|
+
>
|
|
76
|
+
2
|
|
77
|
+
</div>
|
|
78
|
+
<div
|
|
79
|
+
style="height: 128px; width: 128px;"
|
|
80
|
+
>
|
|
81
|
+
3
|
|
82
|
+
</div>
|
|
83
|
+
<div
|
|
84
|
+
style="height: 128px; width: 128px;"
|
|
85
|
+
>
|
|
86
|
+
4
|
|
87
|
+
</div>
|
|
88
|
+
<div
|
|
89
|
+
style="height: 128px; width: 128px;"
|
|
90
|
+
>
|
|
91
|
+
5
|
|
92
|
+
</div>
|
|
93
|
+
<div
|
|
94
|
+
style="height: 128px; width: 128px;"
|
|
95
|
+
>
|
|
96
|
+
6
|
|
97
|
+
</div>
|
|
98
|
+
<div
|
|
99
|
+
style="height: 128px; width: 128px;"
|
|
100
|
+
>
|
|
101
|
+
7
|
|
102
|
+
</div>
|
|
103
|
+
<div
|
|
104
|
+
style="height: 128px; width: 128px;"
|
|
105
|
+
>
|
|
106
|
+
8
|
|
107
|
+
</div>
|
|
108
|
+
<div
|
|
109
|
+
style="height: 128px; width: 128px;"
|
|
110
|
+
>
|
|
111
|
+
9
|
|
112
|
+
</div>
|
|
113
|
+
<div
|
|
114
|
+
style="height: 128px; width: 128px;"
|
|
115
|
+
>
|
|
116
|
+
10
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
</DocumentFragment>
|
|
120
|
+
`;
|
|
121
|
+
|
|
122
|
+
exports[`primitive:<ScrollView> prop:horizontal 1`] = `
|
|
123
|
+
<DocumentFragment>
|
|
124
|
+
<div
|
|
125
|
+
class="scrollview horizontal"
|
|
126
|
+
>
|
|
127
|
+
<div
|
|
128
|
+
style="height: 128px; width: 128px;"
|
|
129
|
+
>
|
|
130
|
+
1
|
|
131
|
+
</div>
|
|
132
|
+
<div
|
|
133
|
+
style="height: 128px; width: 128px;"
|
|
134
|
+
>
|
|
135
|
+
2
|
|
136
|
+
</div>
|
|
137
|
+
<div
|
|
138
|
+
style="height: 128px; width: 128px;"
|
|
139
|
+
>
|
|
140
|
+
3
|
|
141
|
+
</div>
|
|
142
|
+
<div
|
|
143
|
+
style="height: 128px; width: 128px;"
|
|
144
|
+
>
|
|
145
|
+
4
|
|
146
|
+
</div>
|
|
147
|
+
<div
|
|
148
|
+
style="height: 128px; width: 128px;"
|
|
149
|
+
>
|
|
150
|
+
5
|
|
151
|
+
</div>
|
|
152
|
+
<div
|
|
153
|
+
style="height: 128px; width: 128px;"
|
|
154
|
+
>
|
|
155
|
+
6
|
|
156
|
+
</div>
|
|
157
|
+
<div
|
|
158
|
+
style="height: 128px; width: 128px;"
|
|
159
|
+
>
|
|
160
|
+
7
|
|
161
|
+
</div>
|
|
162
|
+
<div
|
|
163
|
+
style="height: 128px; width: 128px;"
|
|
164
|
+
>
|
|
165
|
+
8
|
|
166
|
+
</div>
|
|
167
|
+
<div
|
|
168
|
+
style="height: 128px; width: 128px;"
|
|
169
|
+
>
|
|
170
|
+
9
|
|
171
|
+
</div>
|
|
172
|
+
<div
|
|
173
|
+
style="height: 128px; width: 128px;"
|
|
174
|
+
>
|
|
175
|
+
10
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
</DocumentFragment>
|
|
179
|
+
`;
|
|
180
|
+
|
|
181
|
+
exports[`primitive:<ScrollView> prop:scrollIndicator 1`] = `
|
|
182
|
+
<DocumentFragment>
|
|
183
|
+
<div
|
|
184
|
+
class="scrollview indicator"
|
|
185
|
+
>
|
|
186
|
+
<div
|
|
187
|
+
style="height: 128px; width: 128px;"
|
|
188
|
+
>
|
|
189
|
+
1
|
|
190
|
+
</div>
|
|
191
|
+
<div
|
|
192
|
+
style="height: 128px; width: 128px;"
|
|
193
|
+
>
|
|
194
|
+
2
|
|
195
|
+
</div>
|
|
196
|
+
<div
|
|
197
|
+
style="height: 128px; width: 128px;"
|
|
198
|
+
>
|
|
199
|
+
3
|
|
200
|
+
</div>
|
|
201
|
+
<div
|
|
202
|
+
style="height: 128px; width: 128px;"
|
|
203
|
+
>
|
|
204
|
+
4
|
|
205
|
+
</div>
|
|
206
|
+
<div
|
|
207
|
+
style="height: 128px; width: 128px;"
|
|
208
|
+
>
|
|
209
|
+
5
|
|
210
|
+
</div>
|
|
211
|
+
<div
|
|
212
|
+
style="height: 128px; width: 128px;"
|
|
213
|
+
>
|
|
214
|
+
6
|
|
215
|
+
</div>
|
|
216
|
+
<div
|
|
217
|
+
style="height: 128px; width: 128px;"
|
|
218
|
+
>
|
|
219
|
+
7
|
|
220
|
+
</div>
|
|
221
|
+
<div
|
|
222
|
+
style="height: 128px; width: 128px;"
|
|
223
|
+
>
|
|
224
|
+
8
|
|
225
|
+
</div>
|
|
226
|
+
<div
|
|
227
|
+
style="height: 128px; width: 128px;"
|
|
228
|
+
>
|
|
229
|
+
9
|
|
230
|
+
</div>
|
|
231
|
+
<div
|
|
232
|
+
style="height: 128px; width: 128px;"
|
|
233
|
+
>
|
|
234
|
+
10
|
|
235
|
+
</div>
|
|
236
|
+
</div>
|
|
237
|
+
</DocumentFragment>
|
|
238
|
+
`;
|
|
239
|
+
|
|
240
|
+
exports[`primitive:<ScrollView> prop:scrollto 1`] = `
|
|
241
|
+
<DocumentFragment>
|
|
242
|
+
<div
|
|
243
|
+
class="scrollview"
|
|
244
|
+
>
|
|
245
|
+
<div
|
|
246
|
+
style="height: 128px; width: 128px;"
|
|
247
|
+
>
|
|
248
|
+
1
|
|
249
|
+
</div>
|
|
250
|
+
<div
|
|
251
|
+
style="height: 128px; width: 128px;"
|
|
252
|
+
>
|
|
253
|
+
2
|
|
254
|
+
</div>
|
|
255
|
+
<div
|
|
256
|
+
style="height: 128px; width: 128px;"
|
|
257
|
+
>
|
|
258
|
+
3
|
|
259
|
+
</div>
|
|
260
|
+
<div
|
|
261
|
+
style="height: 128px; width: 128px;"
|
|
262
|
+
>
|
|
263
|
+
4
|
|
264
|
+
</div>
|
|
265
|
+
<div
|
|
266
|
+
style="height: 128px; width: 128px;"
|
|
267
|
+
>
|
|
268
|
+
5
|
|
269
|
+
</div>
|
|
270
|
+
<div
|
|
271
|
+
style="height: 128px; width: 128px;"
|
|
272
|
+
>
|
|
273
|
+
6
|
|
274
|
+
</div>
|
|
275
|
+
<div
|
|
276
|
+
style="height: 128px; width: 128px;"
|
|
277
|
+
>
|
|
278
|
+
7
|
|
279
|
+
</div>
|
|
280
|
+
<div
|
|
281
|
+
style="height: 128px; width: 128px;"
|
|
282
|
+
>
|
|
283
|
+
8
|
|
284
|
+
</div>
|
|
285
|
+
<div
|
|
286
|
+
style="height: 128px; width: 128px;"
|
|
287
|
+
>
|
|
288
|
+
9
|
|
289
|
+
</div>
|
|
290
|
+
<div
|
|
291
|
+
style="height: 128px; width: 128px;"
|
|
292
|
+
>
|
|
293
|
+
10
|
|
294
|
+
</div>
|
|
295
|
+
</div>
|
|
296
|
+
</DocumentFragment>
|
|
297
|
+
`;
|
|
298
|
+
|
|
299
|
+
exports[`primitive:<ScrollView> prop:tag 1`] = `
|
|
300
|
+
<DocumentFragment>
|
|
301
|
+
<section
|
|
302
|
+
class="scrollview"
|
|
303
|
+
>
|
|
304
|
+
<div
|
|
305
|
+
style="height: 128px; width: 128px;"
|
|
306
|
+
>
|
|
307
|
+
1
|
|
308
|
+
</div>
|
|
309
|
+
<div
|
|
310
|
+
style="height: 128px; width: 128px;"
|
|
311
|
+
>
|
|
312
|
+
2
|
|
313
|
+
</div>
|
|
314
|
+
<div
|
|
315
|
+
style="height: 128px; width: 128px;"
|
|
316
|
+
>
|
|
317
|
+
3
|
|
318
|
+
</div>
|
|
319
|
+
<div
|
|
320
|
+
style="height: 128px; width: 128px;"
|
|
321
|
+
>
|
|
322
|
+
4
|
|
323
|
+
</div>
|
|
324
|
+
<div
|
|
325
|
+
style="height: 128px; width: 128px;"
|
|
326
|
+
>
|
|
327
|
+
5
|
|
328
|
+
</div>
|
|
329
|
+
<div
|
|
330
|
+
style="height: 128px; width: 128px;"
|
|
331
|
+
>
|
|
332
|
+
6
|
|
333
|
+
</div>
|
|
334
|
+
<div
|
|
335
|
+
style="height: 128px; width: 128px;"
|
|
336
|
+
>
|
|
337
|
+
7
|
|
338
|
+
</div>
|
|
339
|
+
<div
|
|
340
|
+
style="height: 128px; width: 128px;"
|
|
341
|
+
>
|
|
342
|
+
8
|
|
343
|
+
</div>
|
|
344
|
+
<div
|
|
345
|
+
style="height: 128px; width: 128px;"
|
|
346
|
+
>
|
|
347
|
+
9
|
|
348
|
+
</div>
|
|
349
|
+
<div
|
|
350
|
+
style="height: 128px; width: 128px;"
|
|
351
|
+
>
|
|
352
|
+
10
|
|
353
|
+
</div>
|
|
354
|
+
</section>
|
|
355
|
+
</DocumentFragment>
|
|
356
|
+
`;
|
|
357
|
+
|
|
358
|
+
exports[`primitive:<ScrollView> prop:width 1`] = `
|
|
359
|
+
<DocumentFragment>
|
|
360
|
+
<div
|
|
361
|
+
class="scrollview"
|
|
362
|
+
style="width: 256px;"
|
|
363
|
+
>
|
|
364
|
+
<div
|
|
365
|
+
style="height: 128px; width: 128px;"
|
|
366
|
+
>
|
|
367
|
+
1
|
|
368
|
+
</div>
|
|
369
|
+
<div
|
|
370
|
+
style="height: 128px; width: 128px;"
|
|
371
|
+
>
|
|
372
|
+
2
|
|
373
|
+
</div>
|
|
374
|
+
<div
|
|
375
|
+
style="height: 128px; width: 128px;"
|
|
376
|
+
>
|
|
377
|
+
3
|
|
378
|
+
</div>
|
|
379
|
+
<div
|
|
380
|
+
style="height: 128px; width: 128px;"
|
|
381
|
+
>
|
|
382
|
+
4
|
|
383
|
+
</div>
|
|
384
|
+
<div
|
|
385
|
+
style="height: 128px; width: 128px;"
|
|
386
|
+
>
|
|
387
|
+
5
|
|
388
|
+
</div>
|
|
389
|
+
<div
|
|
390
|
+
style="height: 128px; width: 128px;"
|
|
391
|
+
>
|
|
392
|
+
6
|
|
393
|
+
</div>
|
|
394
|
+
<div
|
|
395
|
+
style="height: 128px; width: 128px;"
|
|
396
|
+
>
|
|
397
|
+
7
|
|
398
|
+
</div>
|
|
399
|
+
<div
|
|
400
|
+
style="height: 128px; width: 128px;"
|
|
401
|
+
>
|
|
402
|
+
8
|
|
403
|
+
</div>
|
|
404
|
+
<div
|
|
405
|
+
style="height: 128px; width: 128px;"
|
|
406
|
+
>
|
|
407
|
+
9
|
|
408
|
+
</div>
|
|
409
|
+
<div
|
|
410
|
+
style="height: 128px; width: 128px;"
|
|
411
|
+
>
|
|
412
|
+
10
|
|
413
|
+
</div>
|
|
414
|
+
</div>
|
|
415
|
+
</DocumentFragment>
|
|
416
|
+
`;
|
|
417
|
+
|
|
418
|
+
exports[`primitive:<ScrollView> renders 1`] = `
|
|
419
|
+
<DocumentFragment>
|
|
420
|
+
<div
|
|
421
|
+
class="scrollview"
|
|
422
|
+
>
|
|
423
|
+
<div
|
|
424
|
+
style="height: 128px; width: 128px;"
|
|
425
|
+
>
|
|
426
|
+
1
|
|
427
|
+
</div>
|
|
428
|
+
<div
|
|
429
|
+
style="height: 128px; width: 128px;"
|
|
430
|
+
>
|
|
431
|
+
2
|
|
432
|
+
</div>
|
|
433
|
+
<div
|
|
434
|
+
style="height: 128px; width: 128px;"
|
|
435
|
+
>
|
|
436
|
+
3
|
|
437
|
+
</div>
|
|
438
|
+
<div
|
|
439
|
+
style="height: 128px; width: 128px;"
|
|
440
|
+
>
|
|
441
|
+
4
|
|
442
|
+
</div>
|
|
443
|
+
<div
|
|
444
|
+
style="height: 128px; width: 128px;"
|
|
445
|
+
>
|
|
446
|
+
5
|
|
447
|
+
</div>
|
|
448
|
+
<div
|
|
449
|
+
style="height: 128px; width: 128px;"
|
|
450
|
+
>
|
|
451
|
+
6
|
|
452
|
+
</div>
|
|
453
|
+
<div
|
|
454
|
+
style="height: 128px; width: 128px;"
|
|
455
|
+
>
|
|
456
|
+
7
|
|
457
|
+
</div>
|
|
458
|
+
<div
|
|
459
|
+
style="height: 128px; width: 128px;"
|
|
460
|
+
>
|
|
461
|
+
8
|
|
462
|
+
</div>
|
|
463
|
+
<div
|
|
464
|
+
style="height: 128px; width: 128px;"
|
|
465
|
+
>
|
|
466
|
+
9
|
|
467
|
+
</div>
|
|
468
|
+
<div
|
|
469
|
+
style="height: 128px; width: 128px;"
|
|
470
|
+
>
|
|
471
|
+
10
|
|
472
|
+
</div>
|
|
473
|
+
</div>
|
|
474
|
+
</DocumentFragment>
|
|
475
|
+
`;
|
|
476
|
+
|
|
477
|
+
exports[`primitive:<ScrollView> testID 1`] = `
|
|
478
|
+
<DocumentFragment>
|
|
479
|
+
<div
|
|
480
|
+
class="scrollview"
|
|
481
|
+
data-testid="mirai"
|
|
482
|
+
>
|
|
483
|
+
<div
|
|
484
|
+
style="height: 128px; width: 128px;"
|
|
485
|
+
>
|
|
486
|
+
1
|
|
487
|
+
</div>
|
|
488
|
+
<div
|
|
489
|
+
style="height: 128px; width: 128px;"
|
|
490
|
+
>
|
|
491
|
+
2
|
|
492
|
+
</div>
|
|
493
|
+
<div
|
|
494
|
+
style="height: 128px; width: 128px;"
|
|
495
|
+
>
|
|
496
|
+
3
|
|
497
|
+
</div>
|
|
498
|
+
<div
|
|
499
|
+
style="height: 128px; width: 128px;"
|
|
500
|
+
>
|
|
501
|
+
4
|
|
502
|
+
</div>
|
|
503
|
+
<div
|
|
504
|
+
style="height: 128px; width: 128px;"
|
|
505
|
+
>
|
|
506
|
+
5
|
|
507
|
+
</div>
|
|
508
|
+
<div
|
|
509
|
+
style="height: 128px; width: 128px;"
|
|
510
|
+
>
|
|
511
|
+
6
|
|
512
|
+
</div>
|
|
513
|
+
<div
|
|
514
|
+
style="height: 128px; width: 128px;"
|
|
515
|
+
>
|
|
516
|
+
7
|
|
517
|
+
</div>
|
|
518
|
+
<div
|
|
519
|
+
style="height: 128px; width: 128px;"
|
|
520
|
+
>
|
|
521
|
+
8
|
|
522
|
+
</div>
|
|
523
|
+
<div
|
|
524
|
+
style="height: 128px; width: 128px;"
|
|
525
|
+
>
|
|
526
|
+
9
|
|
527
|
+
</div>
|
|
528
|
+
<div
|
|
529
|
+
style="height: 128px; width: 128px;"
|
|
530
|
+
>
|
|
531
|
+
10
|
|
532
|
+
</div>
|
|
533
|
+
</div>
|
|
534
|
+
</DocumentFragment>
|
|
535
|
+
`;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _ScrollView = require("./ScrollView");
|
|
8
|
+
|
|
9
|
+
Object.keys(_ScrollView).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _ScrollView[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _ScrollView[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/primitives/ScrollView/index.js"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from './ScrollView';\n"],"file":"index.js"}
|