@mirai/ui 1.0.266 → 1.0.268
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 +2 -0
- package/build/components/Progress/Progress.js +1 -0
- package/build/components/Progress/Progress.js.map +1 -1
- package/build/components/Slider/Slider.js +27 -15
- package/build/components/Slider/Slider.js.map +1 -1
- package/build/components/Slider/Slider.module.css +13 -0
- package/build/components/Slider/Slider.stories.js +4 -2
- package/build/components/Slider/Slider.stories.js.map +1 -1
- package/build/components/Slider/__tests__/__snapshots__/Slider.test.js.snap +282 -48
- package/build/primitives/Checkbox/Checkbox.module.css +4 -0
- package/build/primitives/Icon/Icon.constants.js +2 -0
- package/build/primitives/Icon/Icon.constants.js.map +1 -1
- package/build/primitives/Icon/__tests__/__snapshots__/Icon.test.js.snap +35 -0
- package/build/primitives/Radio/Radio.module.css +10 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1066,6 +1066,8 @@ A Slider component receiving the following props:
|
|
|
1066
1066
|
- `height:number` Height of component (required).
|
|
1067
1067
|
- `images:arrayOf:string` images to show (required).
|
|
1068
1068
|
- `index:number` If you want show a determinate image at atart.
|
|
1069
|
+
- `indicator:boolean` if true shows the amount of pictures viewed using a progress component.
|
|
1070
|
+
- `replay:boolean` restart slider when we go forwards after the last image
|
|
1069
1071
|
- `thumbnails:arrayOf:string` if you want use thumbnails of images in fullScreen mode.
|
|
1070
1072
|
- `width:number` width of component (required).
|
|
1071
1073
|
- `onChange:function` executed when image (index) is visible
|
|
@@ -26,6 +26,7 @@ var Progress = function Progress(_ref) {
|
|
|
26
26
|
role: others.role || 'progress',
|
|
27
27
|
className: (0, _helpers.styles)(_ProgressModule.default.progress, visible && _ProgressModule.default.visible, others.className)
|
|
28
28
|
}), /*#__PURE__*/_react.default.createElement(_primitives.View, {
|
|
29
|
+
role: "progress-value",
|
|
29
30
|
className: (0, _helpers.styles)(_ProgressModule.default.value, indeterminate && _ProgressModule.default.indeterminate),
|
|
30
31
|
style: !indeterminate ? {
|
|
31
32
|
width: "".concat(value, "%")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.js","names":["Progress","indeterminate","value","visible","others","role","styles","style","progress","className","width","undefined","displayName","propTypes","PropTypes","bool","number"],"sources":["../../../src/components/Progress/Progress.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { View } from '../../primitives';\nimport style from './Progress.module.css';\n\nconst Progress = ({ indeterminate = false, value = 0, visible = false, ...others }) => (\n <View\n {...others}\n role={others.role || 'progress'}\n className={styles(style.progress, visible && style.visible, others.className)}\n >\n <View\n className={styles(style.value, indeterminate && style.indeterminate)}\n style={!indeterminate ? { width: `${value}%` } : undefined}\n />\n </View>\n);\n\nProgress.displayName = 'Component:Progress';\n\nProgress.propTypes = {\n indeterminate: PropTypes.bool,\n value: PropTypes.number,\n visible: PropTypes.bool,\n};\n\nexport { Progress };\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AACA;AAA0C;AAAA;AAAA;AAAA;AAAA;AAE1C,IAAMA,QAAQ,GAAG,SAAXA,QAAQ;EAAA,8BAAMC,aAAa;IAAbA,aAAa,mCAAG,KAAK;IAAA,kBAAEC,KAAK;IAALA,KAAK,2BAAG,CAAC;IAAA,oBAAEC,OAAO;IAAPA,OAAO,6BAAG,KAAK;IAAKC,MAAM;EAAA,oBAC9E,6BAAC,gBAAI,eACCA,MAAM;IACV,IAAI,EAAEA,MAAM,CAACC,IAAI,IAAI,UAAW;IAChC,SAAS,EAAE,IAAAC,eAAM,EAACC,uBAAK,CAACC,QAAQ,EAAEL,OAAO,IAAII,uBAAK,CAACJ,OAAO,EAAEC,MAAM,CAACK,SAAS;EAAE,iBAE9E,6BAAC,gBAAI;IACH,SAAS,EAAE,IAAAH,eAAM,EAACC,uBAAK,CAACL,KAAK,EAAED,aAAa,IAAIM,uBAAK,CAACN,aAAa,CAAE;IACrE,KAAK,EAAE,CAACA,aAAa,GAAG;MAAES,KAAK,YAAKR,KAAK;IAAI,CAAC,GAAGS;EAAU,EAC3D,CACG;AAAA,CACR;AAAC;AAEFX,QAAQ,CAACY,WAAW,GAAG,oBAAoB;AAE3CZ,QAAQ,CAACa,SAAS,GAAG;EACnBZ,aAAa,EAAEa,kBAAS,CAACC,IAAI;EAC7Bb,KAAK,EAAEY,kBAAS,CAACE,MAAM;EACvBb,OAAO,EAAEW,kBAAS,CAACC;AACrB,CAAC"}
|
|
1
|
+
{"version":3,"file":"Progress.js","names":["Progress","indeterminate","value","visible","others","role","styles","style","progress","className","width","undefined","displayName","propTypes","PropTypes","bool","number"],"sources":["../../../src/components/Progress/Progress.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { View } from '../../primitives';\nimport style from './Progress.module.css';\n\nconst Progress = ({ indeterminate = false, value = 0, visible = false, ...others }) => (\n <View\n {...others}\n role={others.role || 'progress'}\n className={styles(style.progress, visible && style.visible, others.className)}\n >\n <View\n role=\"progress-value\"\n className={styles(style.value, indeterminate && style.indeterminate)}\n style={!indeterminate ? { width: `${value}%` } : undefined}\n />\n </View>\n);\n\nProgress.displayName = 'Component:Progress';\n\nProgress.propTypes = {\n indeterminate: PropTypes.bool,\n value: PropTypes.number,\n visible: PropTypes.bool,\n};\n\nexport { Progress };\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AACA;AAA0C;AAAA;AAAA;AAAA;AAAA;AAE1C,IAAMA,QAAQ,GAAG,SAAXA,QAAQ;EAAA,8BAAMC,aAAa;IAAbA,aAAa,mCAAG,KAAK;IAAA,kBAAEC,KAAK;IAALA,KAAK,2BAAG,CAAC;IAAA,oBAAEC,OAAO;IAAPA,OAAO,6BAAG,KAAK;IAAKC,MAAM;EAAA,oBAC9E,6BAAC,gBAAI,eACCA,MAAM;IACV,IAAI,EAAEA,MAAM,CAACC,IAAI,IAAI,UAAW;IAChC,SAAS,EAAE,IAAAC,eAAM,EAACC,uBAAK,CAACC,QAAQ,EAAEL,OAAO,IAAII,uBAAK,CAACJ,OAAO,EAAEC,MAAM,CAACK,SAAS;EAAE,iBAE9E,6BAAC,gBAAI;IACH,IAAI,EAAC,gBAAgB;IACrB,SAAS,EAAE,IAAAH,eAAM,EAACC,uBAAK,CAACL,KAAK,EAAED,aAAa,IAAIM,uBAAK,CAACN,aAAa,CAAE;IACrE,KAAK,EAAE,CAACA,aAAa,GAAG;MAAES,KAAK,YAAKR,KAAK;IAAI,CAAC,GAAGS;EAAU,EAC3D,CACG;AAAA,CACR;AAAC;AAEFX,QAAQ,CAACY,WAAW,GAAG,oBAAoB;AAE3CZ,QAAQ,CAACa,SAAS,GAAG;EACnBZ,aAAa,EAAEa,kBAAS,CAACC,IAAI;EAC7Bb,KAAK,EAAEY,kBAAS,CAACE,MAAM;EACvBb,OAAO,EAAEW,kBAAS,CAACC;AACrB,CAAC"}
|
|
@@ -11,9 +11,10 @@ var _helpers = require("../../helpers");
|
|
|
11
11
|
var _hooks = require("../../hooks");
|
|
12
12
|
var _primitives = require("../../primitives");
|
|
13
13
|
var _theme = require("../../theme");
|
|
14
|
+
var _Progress = require("../Progress");
|
|
14
15
|
var _Slider = require("./Slider.constants");
|
|
15
16
|
var _SliderModule = _interopRequireDefault(require("./Slider.module.css"));
|
|
16
|
-
var _excluded = ["auto", "behavior", "captions", "height", "images", "index", "width", "onChange", "onCounter"];
|
|
17
|
+
var _excluded = ["auto", "behavior", "captions", "height", "images", "index", "indicator", "replay", "width", "onChange", "onCounter"];
|
|
17
18
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
19
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -46,6 +47,10 @@ var Slider = function Slider(_ref) {
|
|
|
46
47
|
images = _ref$images === void 0 ? [] : _ref$images,
|
|
47
48
|
_ref$index = _ref.index,
|
|
48
49
|
propIndex = _ref$index === void 0 ? 0 : _ref$index,
|
|
50
|
+
_ref$indicator = _ref.indicator,
|
|
51
|
+
indicator = _ref$indicator === void 0 ? false : _ref$indicator,
|
|
52
|
+
_ref$replay = _ref.replay,
|
|
53
|
+
replay = _ref$replay === void 0 ? true : _ref$replay,
|
|
49
54
|
_ref$width = _ref.width,
|
|
50
55
|
propWidth = _ref$width === void 0 ? 320 : _ref$width,
|
|
51
56
|
_ref$onChange = _ref.onChange,
|
|
@@ -89,7 +94,7 @@ var Slider = function Slider(_ref) {
|
|
|
89
94
|
var width = propWidth;
|
|
90
95
|
var handleIndex = function handleIndex(nextIndex) {
|
|
91
96
|
setDisabledScroll(true);
|
|
92
|
-
setIndex(Math.abs(nextIndex) * (defaultDirection ? 1 : -1));
|
|
97
|
+
setIndex(Math.abs(nextIndex) === images.length ? 0 : Math.abs(nextIndex) * (defaultDirection ? 1 : -1));
|
|
93
98
|
};
|
|
94
99
|
var handleScroll = function handleScroll() {
|
|
95
100
|
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
@@ -98,6 +103,8 @@ var Slider = function Slider(_ref) {
|
|
|
98
103
|
if (nextIndex !== index) setIndex(nextIndex);
|
|
99
104
|
};
|
|
100
105
|
var defaultDirection = _theme.Theme.getDirection() === _theme.DIRECTION_TYPE.LEFT;
|
|
106
|
+
var hasImages = images.length > 1;
|
|
107
|
+
var isEnd = Math.abs(index) >= images.length - 1;
|
|
101
108
|
return /*#__PURE__*/_react.default.createElement(_primitives.View, _extends({}, others, {
|
|
102
109
|
role: "slider",
|
|
103
110
|
onMouseEnter: isDesktop ? function () {
|
|
@@ -110,13 +117,13 @@ var Slider = function Slider(_ref) {
|
|
|
110
117
|
style: _objectSpread(_objectSpread({}, others.style), {}, {
|
|
111
118
|
width: width
|
|
112
119
|
})
|
|
113
|
-
}), /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
|
|
120
|
+
}), hasImages && /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
|
|
114
121
|
onPress: function onPress() {
|
|
115
122
|
return handleIndex(index - 1);
|
|
116
123
|
},
|
|
117
|
-
className: (0, _helpers.styles)(_SliderModule.default.button, ((defaultDirection ? index <= 0 :
|
|
124
|
+
className: (0, _helpers.styles)(_SliderModule.default.button, ((defaultDirection ? index <= 0 : replay ? false : isEnd) || isDesktop && !focus) && _SliderModule.default.hide, _SliderModule.default.first)
|
|
118
125
|
}, /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
|
|
119
|
-
value: _primitives.ICON.LEFT
|
|
126
|
+
value: replay && !defaultDirection && isEnd ? _primitives.ICON.REPLAY : _primitives.ICON.LEFT
|
|
120
127
|
})), /*#__PURE__*/_react.default.createElement(_primitives.ScrollView, {
|
|
121
128
|
behavior: behavior,
|
|
122
129
|
horizontal: true,
|
|
@@ -134,7 +141,7 @@ var Slider = function Slider(_ref) {
|
|
|
134
141
|
role: "image",
|
|
135
142
|
className: _SliderModule.default.image,
|
|
136
143
|
style: {
|
|
137
|
-
backgroundImage: imageIndex >= Math.abs(index) - _Slider.PRELOAD_IMAGES && imageIndex <= Math.abs(index) + _Slider.PRELOAD_IMAGES ? "url(".concat(image, ")") : undefined,
|
|
144
|
+
backgroundImage: replay || imageIndex >= Math.abs(index) - _Slider.PRELOAD_IMAGES && imageIndex <= Math.abs(index) + _Slider.PRELOAD_IMAGES ? "url(".concat(image, ")") : undefined,
|
|
138
145
|
height: height,
|
|
139
146
|
width: width
|
|
140
147
|
}
|
|
@@ -145,7 +152,14 @@ var Slider = function Slider(_ref) {
|
|
|
145
152
|
small: true,
|
|
146
153
|
className: [_SliderModule.default.overlay, _SliderModule.default.text]
|
|
147
154
|
}, captions[imageIndex])));
|
|
148
|
-
}),
|
|
155
|
+
})), hasImages && /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
|
|
156
|
+
onPress: function onPress() {
|
|
157
|
+
return handleIndex(index + 1);
|
|
158
|
+
},
|
|
159
|
+
className: (0, _helpers.styles)(_SliderModule.default.button, ((defaultDirection ? replay ? false : isEnd : index === 0) || isDesktop && !focus) && _SliderModule.default.hide, _SliderModule.default.second)
|
|
160
|
+
}, /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
|
|
161
|
+
value: replay && defaultDirection && index === images.length - 1 ? _primitives.ICON.REPLAY : _primitives.ICON.RIGHT
|
|
162
|
+
})), hasImages && onCounter && /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
|
|
149
163
|
onPress: onCounter,
|
|
150
164
|
className: (0, _helpers.styles)(_SliderModule.default.overlay, _SliderModule.default.counter, !defaultDirection && _SliderModule.default.reverse)
|
|
151
165
|
}, /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
|
|
@@ -154,14 +168,10 @@ var Slider = function Slider(_ref) {
|
|
|
154
168
|
}), /*#__PURE__*/_react.default.createElement(_primitives.Text, {
|
|
155
169
|
bold: true,
|
|
156
170
|
small: true
|
|
157
|
-
}, images.length))
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
className: (0, _helpers.styles)(_SliderModule.default.button, ((defaultDirection ? index >= images.length - 1 : index === 0) || isDesktop && !focus) && _SliderModule.default.hide, _SliderModule.default.second)
|
|
162
|
-
}, /*#__PURE__*/_react.default.createElement(_primitives.Icon, {
|
|
163
|
-
value: _primitives.ICON.RIGHT
|
|
164
|
-
})));
|
|
171
|
+
}, images.length)), indicator && /*#__PURE__*/_react.default.createElement(_Progress.Progress, {
|
|
172
|
+
value: index * 100 / (images.length - 1),
|
|
173
|
+
className: (0, _helpers.styles)(_SliderModule.default.progress, index > 0 && _SliderModule.default.visible)
|
|
174
|
+
}));
|
|
165
175
|
};
|
|
166
176
|
exports.Slider = Slider;
|
|
167
177
|
Slider.displayName = 'Component:Slider';
|
|
@@ -172,6 +182,8 @@ Slider.propTypes = {
|
|
|
172
182
|
height: _propTypes.default.number.isRequired,
|
|
173
183
|
images: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
174
184
|
index: _propTypes.default.number,
|
|
185
|
+
indicator: _propTypes.default.bool,
|
|
186
|
+
replay: _propTypes.default.bool,
|
|
175
187
|
width: _propTypes.default.number.isRequired,
|
|
176
188
|
onChange: _propTypes.default.func,
|
|
177
189
|
onCounter: _propTypes.default.func
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","names":["interval","timeout","Slider","auto","behavior","captions","height","propHeight","images","index","propIndex","width","propWidth","onChange","onCounter","others","useDevice","isDesktop","useState","disabledScroll","setDisabledScroll","focus","setFocus","setIndex","useEffect","setInterval","length","clearInterval","clearTimeout","setTimeout","SCROLL_DELAY","handleIndex","nextIndex","Math","abs","defaultDirection","handleScroll","x","round","Theme","getDirection","DIRECTION_TYPE","LEFT","undefined","styles","style","container","className","button","hide","first","ICON","floor","scrollView","map","image","imageIndex","item","backgroundImage","PRELOAD_IMAGES","caption","overlay","text","counter","reverse","PHOTO_LIBRARY","second","RIGHT","displayName","propTypes","PropTypes","bool","string","arrayOf","number","isRequired","func"],"sources":["../../../src/components/Slider/Slider.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useEffect, useState } from 'react';\n\nimport { styles } from '../../helpers';\nimport { useDevice } from '../../hooks';\nimport { Icon, ICON, ScrollView, Pressable, Text, View } from '../../primitives';\nimport { DIRECTION_TYPE, Theme } from '../../theme';\nimport { PRELOAD_IMAGES, SCROLL_DELAY } from './Slider.constants';\nimport style from './Slider.module.css';\n\nlet interval;\nlet timeout;\n\nconst Slider = ({\n auto = false,\n behavior = 'smooth',\n captions = [],\n height: propHeight = 240,\n images = [],\n index: propIndex = 0,\n width: propWidth = 320,\n onChange = () => {},\n onCounter,\n ...others\n}) => {\n const { isDesktop } = useDevice();\n\n const [disabledScroll, setDisabledScroll] = useState(true);\n const [focus, setFocus] = useState(false);\n const [index, setIndex] = useState(propIndex);\n\n useEffect(() => {\n if (auto) interval = setInterval(() => setIndex(index < images.length - 1 ? index + 1 : 0), 2000);\n return () => clearInterval(interval);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [auto, index]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n clearTimeout(timeout);\n timeout = setTimeout(() => setDisabledScroll(false), SCROLL_DELAY);\n\n onChange(index);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [index]);\n\n const height = propHeight;\n\n const width = propWidth;\n\n const handleIndex = (nextIndex) => {\n setDisabledScroll(true);\n setIndex(Math.abs(nextIndex) * (defaultDirection ? 1 : -1));\n };\n\n const handleScroll = ({ x } = {}) => {\n const nextIndex = x < width ? 0 : Math.round(x / width);\n\n if (nextIndex !== index) setIndex(nextIndex);\n };\n\n const defaultDirection = Theme.getDirection() === DIRECTION_TYPE.LEFT;\n\n return (\n <View\n {...others}\n role=\"slider\"\n onMouseEnter={isDesktop ? () => setFocus(true) : undefined}\n onMouseLeave={isDesktop ? () => setFocus(false) : undefined}\n className={styles(style.container, others.className)}\n style={{ ...others.style, width }}\n >\n <Pressable\n onPress={() => handleIndex(index - 1)}\n className={styles(\n style.button,\n ((defaultDirection ? index <= 0 : index >= images.length - 1) || (isDesktop && !focus)) && style.hide,\n style.first,\n )}\n >\n <Icon value={ICON.LEFT} />\n </Pressable>\n\n <ScrollView\n behavior={behavior}\n horizontal\n scrollEventThrottle={SCROLL_DELAY}\n scrollTo={index * Math.floor(width)}\n snap\n width={width}\n onScroll={disabledScroll ? undefined : handleScroll}\n className={style.scrollView}\n >\n {images.map((image, imageIndex) => (\n <View key={imageIndex} className={style.item}>\n <View\n role=\"image\"\n className={style.image}\n style={{\n backgroundImage:\n imageIndex >= Math.abs(index) - PRELOAD_IMAGES && imageIndex <= Math.abs(index) + PRELOAD_IMAGES\n ? `url(${image})`\n : undefined,\n height,\n width,\n }}\n />\n {captions[imageIndex] && (\n <View className={style.caption}>\n <Text bold small className={[style.overlay, style.text]}>\n {captions[imageIndex]}\n </Text>\n </View>\n )}\n </View>\n ))}\n\n {images.length > 1 && onCounter && (\n <Pressable\n onPress={onCounter}\n className={styles(style.overlay, style.counter, !defaultDirection && style.reverse)}\n >\n <Icon action value={ICON.PHOTO_LIBRARY} />\n <Text bold small>\n {images.length}\n </Text>\n </Pressable>\n )}\n </ScrollView>\n\n <Pressable\n onPress={() => handleIndex(index + 1)}\n className={styles(\n style.button,\n ((defaultDirection ? index >= images.length - 1 : index === 0) || (isDesktop && !focus)) && style.hide,\n style.second,\n )}\n >\n <Icon value={ICON.RIGHT} />\n </Pressable>\n </View>\n );\n};\n\nSlider.displayName = 'Component:Slider';\n\nSlider.propTypes = {\n auto: PropTypes.bool,\n behavior: PropTypes.string,\n captions: PropTypes.arrayOf(PropTypes.string),\n height: PropTypes.number.isRequired,\n images: PropTypes.arrayOf(PropTypes.string).isRequired,\n index: PropTypes.number,\n width: PropTypes.number.isRequired,\n onChange: PropTypes.func,\n onCounter: PropTypes.func,\n};\n\nexport { Slider };\n"],"mappings":";;;;;;;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAwC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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AAC;AAAC;AAEFjE,MAAM,CAACkE,WAAW,GAAG,kBAAkB;AAEvClE,MAAM,CAACmE,SAAS,GAAG;EACjBlE,IAAI,EAAEmE,kBAAS,CAACC,IAAI;EACpBnE,QAAQ,EAAEkE,kBAAS,CAACE,MAAM;EAC1BnE,QAAQ,EAAEiE,kBAAS,CAACG,OAAO,CAACH,kBAAS,CAACE,MAAM,CAAC;EAC7ClE,MAAM,EAAEgE,kBAAS,CAACI,MAAM,CAACC,UAAU;EACnCnE,MAAM,EAAE8D,kBAAS,CAACG,OAAO,CAACH,kBAAS,CAACE,MAAM,CAAC,CAACG,UAAU;EACtDlE,KAAK,EAAE6D,kBAAS,CAACI,MAAM;EACvB/D,KAAK,EAAE2D,kBAAS,CAACI,MAAM,CAACC,UAAU;EAClC9D,QAAQ,EAAEyD,kBAAS,CAACM,IAAI;EACxB9D,SAAS,EAAEwD,kBAAS,CAACM;AACvB,CAAC"}
|
|
1
|
+
{"version":3,"file":"Slider.js","names":["interval","timeout","Slider","auto","behavior","captions","height","propHeight","images","index","propIndex","indicator","replay","width","propWidth","onChange","onCounter","others","useDevice","isDesktop","useState","disabledScroll","setDisabledScroll","focus","setFocus","setIndex","useEffect","setInterval","length","clearInterval","clearTimeout","setTimeout","SCROLL_DELAY","handleIndex","nextIndex","Math","abs","defaultDirection","handleScroll","x","round","Theme","getDirection","DIRECTION_TYPE","LEFT","hasImages","isEnd","undefined","styles","style","container","className","button","hide","first","ICON","REPLAY","floor","scrollView","map","image","imageIndex","item","backgroundImage","PRELOAD_IMAGES","caption","overlay","text","second","RIGHT","counter","reverse","PHOTO_LIBRARY","progress","visible","displayName","propTypes","PropTypes","bool","string","arrayOf","number","isRequired","func"],"sources":["../../../src/components/Slider/Slider.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useEffect, useState } from 'react';\n\nimport { styles } from '../../helpers';\nimport { useDevice } from '../../hooks';\nimport { Icon, ICON, ScrollView, Pressable, Text, View } from '../../primitives';\nimport { DIRECTION_TYPE, Theme } from '../../theme';\nimport { Progress } from '../Progress';\nimport { PRELOAD_IMAGES, SCROLL_DELAY } from './Slider.constants';\nimport style from './Slider.module.css';\n\nlet interval;\nlet timeout;\n\nconst Slider = ({\n auto = false,\n behavior = 'smooth',\n captions = [],\n height: propHeight = 240,\n images = [],\n index: propIndex = 0,\n indicator = false,\n replay = true,\n width: propWidth = 320,\n onChange = () => {},\n onCounter,\n ...others\n}) => {\n const { isDesktop } = useDevice();\n\n const [disabledScroll, setDisabledScroll] = useState(true);\n const [focus, setFocus] = useState(false);\n const [index, setIndex] = useState(propIndex);\n\n useEffect(() => {\n if (auto) interval = setInterval(() => setIndex(index < images.length - 1 ? index + 1 : 0), 2000);\n return () => clearInterval(interval);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [auto, index]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n clearTimeout(timeout);\n timeout = setTimeout(() => setDisabledScroll(false), SCROLL_DELAY);\n\n onChange(index);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [index]);\n\n const height = propHeight;\n\n const width = propWidth;\n\n const handleIndex = (nextIndex) => {\n setDisabledScroll(true);\n setIndex(Math.abs(nextIndex) === images.length ? 0 : Math.abs(nextIndex) * (defaultDirection ? 1 : -1));\n };\n\n const handleScroll = ({ x } = {}) => {\n const nextIndex = x < width ? 0 : Math.round(x / width);\n\n if (nextIndex !== index) setIndex(nextIndex);\n };\n\n const defaultDirection = Theme.getDirection() === DIRECTION_TYPE.LEFT;\n const hasImages = images.length > 1;\n const isEnd = Math.abs(index) >= images.length - 1;\n\n return (\n <View\n {...others}\n role=\"slider\"\n onMouseEnter={isDesktop ? () => setFocus(true) : undefined}\n onMouseLeave={isDesktop ? () => setFocus(false) : undefined}\n className={styles(style.container, others.className)}\n style={{ ...others.style, width }}\n >\n {hasImages && (\n <Pressable\n onPress={() => handleIndex(index - 1)}\n className={styles(\n style.button,\n ((defaultDirection ? index <= 0 : replay ? false : isEnd) || (isDesktop && !focus)) && style.hide,\n style.first,\n )}\n >\n <Icon value={replay && !defaultDirection && isEnd ? ICON.REPLAY : ICON.LEFT} />\n </Pressable>\n )}\n\n <ScrollView\n behavior={behavior}\n horizontal\n scrollEventThrottle={SCROLL_DELAY}\n scrollTo={index * Math.floor(width)}\n snap\n width={width}\n onScroll={disabledScroll ? undefined : handleScroll}\n className={style.scrollView}\n >\n {images.map((image, imageIndex) => (\n <View key={imageIndex} className={style.item}>\n <View\n role=\"image\"\n className={style.image}\n style={{\n backgroundImage:\n replay ||\n (imageIndex >= Math.abs(index) - PRELOAD_IMAGES && imageIndex <= Math.abs(index) + PRELOAD_IMAGES)\n ? `url(${image})`\n : undefined,\n height,\n width,\n }}\n />\n {captions[imageIndex] && (\n <View className={style.caption}>\n <Text bold small className={[style.overlay, style.text]}>\n {captions[imageIndex]}\n </Text>\n </View>\n )}\n </View>\n ))}\n </ScrollView>\n\n {hasImages && (\n <Pressable\n onPress={() => handleIndex(index + 1)}\n className={styles(\n style.button,\n ((defaultDirection ? (replay ? false : isEnd) : index === 0) || (isDesktop && !focus)) && style.hide,\n style.second,\n )}\n >\n <Icon value={replay && defaultDirection && index === images.length - 1 ? ICON.REPLAY : ICON.RIGHT} />\n </Pressable>\n )}\n\n {hasImages && onCounter && (\n <Pressable\n onPress={onCounter}\n className={styles(style.overlay, style.counter, !defaultDirection && style.reverse)}\n >\n <Icon action value={ICON.PHOTO_LIBRARY} />\n <Text bold small>\n {images.length}\n </Text>\n </Pressable>\n )}\n\n {indicator && (\n <Progress\n value={(index * 100) / (images.length - 1)}\n className={styles(style.progress, index > 0 && style.visible)}\n />\n )}\n </View>\n );\n};\n\nSlider.displayName = 'Component:Slider';\n\nSlider.propTypes = {\n auto: PropTypes.bool,\n behavior: PropTypes.string,\n captions: PropTypes.arrayOf(PropTypes.string),\n height: PropTypes.number.isRequired,\n images: PropTypes.arrayOf(PropTypes.string).isRequired,\n index: PropTypes.number,\n indicator: PropTypes.b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M,EAAEuE,kBAAS,CAACI,MAAM,CAACC,UAAU;EACnC1E,MAAM,EAAEqE,kBAAS,CAACG,OAAO,CAACH,kBAAS,CAACE,MAAM,CAAC,CAACG,UAAU;EACtDzE,KAAK,EAAEoE,kBAAS,CAACI,MAAM;EACvBtE,SAAS,EAAEkE,kBAAS,CAACC,IAAI;EACzBlE,MAAM,EAAEiE,kBAAS,CAACC,IAAI;EACtBjE,KAAK,EAAEgE,kBAAS,CAACI,MAAM,CAACC,UAAU;EAClCnE,QAAQ,EAAE8D,kBAAS,CAACM,IAAI;EACxBnE,SAAS,EAAE6D,kBAAS,CAACM;AACvB,CAAC"}
|
|
@@ -91,6 +91,19 @@
|
|
|
91
91
|
color: var(--mirai-ui-slider-overlay-color);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
.progress {
|
|
95
|
+
background-color: var(--mirai-ui-slider-overlay);
|
|
96
|
+
bottom: 0;
|
|
97
|
+
height: 0;
|
|
98
|
+
left: 0;
|
|
99
|
+
position: absolute;
|
|
100
|
+
right: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.progress.visible {
|
|
104
|
+
height: calc(var(--mirai-ui-space-XS) / 1);
|
|
105
|
+
}
|
|
106
|
+
|
|
94
107
|
/* S */
|
|
95
108
|
@media only screen and (max-width: 430px) {
|
|
96
109
|
}
|
|
@@ -38,15 +38,17 @@ Story.args = {
|
|
|
38
38
|
behavior: 'smooth',
|
|
39
39
|
captions: ['javi', 'jose', undefined, 'victor', 'svet', 'mario2'],
|
|
40
40
|
height: 208,
|
|
41
|
-
index: 0,
|
|
42
41
|
images: ['https://picsum.photos/seed/@soyjavi/1024/768', 'https://picsum.photos/seed/@jose/1024/768', 'https://picsum.photos/seed/@mario1/1024/768', 'https://picsum.photos/seed/@victor/1024/768', 'https://picsum.photos/seed/@svet/1024/768', 'https://picsum.photos/seed/@mario2/1024/768', 'https://picsum.photos/seed/1/1024/768', 'https://picsum.photos/seed/2/1024/768', 'https://picsum.photos/seed/3/1024/768', 'https://picsum.photos/seed/4/1024/768', 'https://picsum.photos/seed/5/1024/768', 'https://picsum.photos/seed/6/1024/768', 'https://picsum.photos/seed/7/1024/768', 'https://picsum.photos/seed/8/1024/768', 'https://picsum.photos/seed/9/1024/768', 'https://picsum.photos/seed/10/1024/768', 'https://picsum.photos/seed/11/1024/768', 'https://picsum.photos/seed/12/1024/768'],
|
|
43
42
|
fullScreen: false,
|
|
44
43
|
thumbnails: ['https://picsum.photos/seed/@soyjavi/128/128', 'https://picsum.photos/seed/@jose/128/128', 'https://picsum.photos/seed/@mario1/128/128', 'https://picsum.photos/seed/@victor/128/128', 'https://picsum.photos/seed/@svet/128/128', 'https://picsum.photos/seed/@mario2/128/128', 'https://picsum.photos/seed/1/128/128', 'https://picsum.photos/seed/2/128/128', 'https://picsum.photos/seed/3/128/128', 'https://picsum.photos/seed/4/128/128', 'https://picsum.photos/seed/5/128/128', 'https://picsum.photos/seed/6/128/128', 'https://picsum.photos/seed/7/128/128', 'https://picsum.photos/seed/8/128/128', 'https://picsum.photos/seed/9/128/128', 'https://picsum.photos/seed/10/128/128', 'https://picsum.photos/seed/11/128/128', 'https://picsum.photos/seed/12/128/128'],
|
|
44
|
+
index: 0,
|
|
45
|
+
indicator: true,
|
|
46
|
+
replay: true,
|
|
45
47
|
width: 408,
|
|
46
48
|
// inherited properties
|
|
47
49
|
testId: 'test-story',
|
|
48
50
|
style: {
|
|
49
|
-
borderRadius:
|
|
51
|
+
borderRadius: 2
|
|
50
52
|
}
|
|
51
53
|
};
|
|
52
54
|
Story.argTypes = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.stories.js","names":["title","Story","props","params","console","log","storyName","args","auto","behavior","captions","undefined","height","
|
|
1
|
+
{"version":3,"file":"Slider.stories.js","names":["title","Story","props","params","console","log","storyName","args","auto","behavior","captions","undefined","height","images","fullScreen","thumbnails","index","indicator","replay","width","testId","style","borderRadius","argTypes"],"sources":["../../../src/components/Slider/Slider.stories.jsx"],"sourcesContent":["import React from 'react';\n\nimport { Slider } from './Slider';\nimport { Icon, ICON } from '../../primitives/Icon';\n\nexport default { title: 'Components' };\n\nexport const Story = (props) => (\n <Slider\n {...props}\n onChange={(...params) => console.log('onChange', ...params)}\n onCounter={(...params) => console.log('onCounter', ...params)}\n />\n);\n\nStory.storyName = 'Slider';\n\nStory.args = {\n auto: false,\n behavior: 'smooth',\n captions: ['javi', 'jose', undefined, 'victor', 'svet', 'mario2'],\n height: 208,\n images: [\n 'https://picsum.photos/seed/@soyjavi/1024/768',\n 'https://picsum.photos/seed/@jose/1024/768',\n 'https://picsum.photos/seed/@mario1/1024/768',\n 'https://picsum.photos/seed/@victor/1024/768',\n 'https://picsum.photos/seed/@svet/1024/768',\n 'https://picsum.photos/seed/@mario2/1024/768',\n 'https://picsum.photos/seed/1/1024/768',\n 'https://picsum.photos/seed/2/1024/768',\n 'https://picsum.photos/seed/3/1024/768',\n 'https://picsum.photos/seed/4/1024/768',\n 'https://picsum.photos/seed/5/1024/768',\n 'https://picsum.photos/seed/6/1024/768',\n 'https://picsum.photos/seed/7/1024/768',\n 'https://picsum.photos/seed/8/1024/768',\n 'https://picsum.photos/seed/9/1024/768',\n 'https://picsum.photos/seed/10/1024/768',\n 'https://picsum.photos/seed/11/1024/768',\n 'https://picsum.photos/seed/12/1024/768',\n ],\n fullScreen: false,\n thumbnails: [\n 'https://picsum.photos/seed/@soyjavi/128/128',\n 'https://picsum.photos/seed/@jose/128/128',\n 'https://picsum.photos/seed/@mario1/128/128',\n 'https://picsum.photos/seed/@victor/128/128',\n 'https://picsum.photos/seed/@svet/128/128',\n 'https://picsum.photos/seed/@mario2/128/128',\n 'https://picsum.photos/seed/1/128/128',\n 'https://picsum.photos/seed/2/128/128',\n 'https://picsum.photos/seed/3/128/128',\n 'https://picsum.photos/seed/4/128/128',\n 'https://picsum.photos/seed/5/128/128',\n 'https://picsum.photos/seed/6/128/128',\n 'https://picsum.photos/seed/7/128/128',\n 'https://picsum.photos/seed/8/128/128',\n 'https://picsum.photos/seed/9/128/128',\n 'https://picsum.photos/seed/10/128/128',\n 'https://picsum.photos/seed/11/128/128',\n 'https://picsum.photos/seed/12/128/128',\n ],\n index: 0,\n indicator: true,\n replay: true,\n width: 408,\n // inherited properties\n testId: 'test-story',\n style: { borderRadius: 2 },\n};\n\nStory.argTypes = {};\n"],"mappings":";;;;;;AAAA;AAEA;AACA;AAAmD;AAAA;AAAA,eAEpC;EAAEA,KAAK,EAAE;AAAa,CAAC;AAAA;AAE/B,IAAMC,KAAK,GAAG,SAARA,KAAK,CAAIC,KAAK;EAAA,oBACzB,6BAAC,cAAM,eACDA,KAAK;IACT,QAAQ,EAAE;MAAA;MAAA,kCAAIC,MAAM;QAANA,MAAM;MAAA;MAAA,OAAK,YAAAC,OAAO,EAACC,GAAG,kBAAC,UAAU,SAAKF,MAAM,EAAC;IAAA,CAAC;IAC5D,SAAS,EAAE;MAAA;MAAA,mCAAIA,MAAM;QAANA,MAAM;MAAA;MAAA,OAAK,aAAAC,OAAO,EAACC,GAAG,mBAAC,WAAW,SAAKF,MAAM,EAAC;IAAA;EAAC,GAC9D;AAAA,CACH;AAAC;AAEFF,KAAK,CAACK,SAAS,GAAG,QAAQ;AAE1BL,KAAK,CAACM,IAAI,GAAG;EACXC,IAAI,EAAE,KAAK;EACXC,QAAQ,EAAE,QAAQ;EAClBC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAEC,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;EACjEC,MAAM,EAAE,GAAG;EACXC,MAAM,EAAE,CACN,8CAA8C,EAC9C,2CAA2C,EAC3C,6CAA6C,EAC7C,6CAA6C,EAC7C,2CAA2C,EAC3C,6CAA6C,EAC7C,uCAAuC,EACvC,uCAAuC,EACvC,uCAAuC,EACvC,uCAAuC,EACvC,uCAAuC,EACvC,uCAAuC,EACvC,uCAAuC,EACvC,uCAAuC,EACvC,uCAAuC,EACvC,wCAAwC,EACxC,wCAAwC,EACxC,wCAAwC,CACzC;EACDC,UAAU,EAAE,KAAK;EACjBC,UAAU,EAAE,CACV,6CAA6C,EAC7C,0CAA0C,EAC1C,4CAA4C,EAC5C,4CAA4C,EAC5C,0CAA0C,EAC1C,4CAA4C,EAC5C,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,sCAAsC,EACtC,uCAAuC,EACvC,uCAAuC,EACvC,uCAAuC,CACxC;EACDC,KAAK,EAAE,CAAC;EACRC,SAAS,EAAE,IAAI;EACfC,MAAM,EAAE,IAAI;EACZC,KAAK,EAAE,GAAG;EACV;EACAC,MAAM,EAAE,YAAY;EACpBC,KAAK,EAAE;IAAEC,YAAY,EAAE;EAAE;AAC3B,CAAC;AAEDrB,KAAK,CAACsB,QAAQ,GAAG,CAAC,CAAC"}
|
|
@@ -64,7 +64,7 @@ exports[`component:<Slider> inherit:className 1`] = `
|
|
|
64
64
|
>
|
|
65
65
|
<div
|
|
66
66
|
class="view image"
|
|
67
|
-
style="height: 230px; width: 360px;"
|
|
67
|
+
style="background-image: url(https://picsum.photos/seed/@victor/1024/768); height: 230px; width: 360px;"
|
|
68
68
|
/>
|
|
69
69
|
</div>
|
|
70
70
|
<div
|
|
@@ -72,7 +72,7 @@ exports[`component:<Slider> inherit:className 1`] = `
|
|
|
72
72
|
>
|
|
73
73
|
<div
|
|
74
74
|
class="view image"
|
|
75
|
-
style="height: 230px; width: 360px;"
|
|
75
|
+
style="background-image: url(https://picsum.photos/seed/@svet/1024/768); height: 230px; width: 360px;"
|
|
76
76
|
/>
|
|
77
77
|
</div>
|
|
78
78
|
<div
|
|
@@ -80,7 +80,7 @@ exports[`component:<Slider> inherit:className 1`] = `
|
|
|
80
80
|
>
|
|
81
81
|
<div
|
|
82
82
|
class="view image"
|
|
83
|
-
style="height: 230px; width: 360px;"
|
|
83
|
+
style="background-image: url(https://picsum.photos/seed/@mario2/1024/768); height: 230px; width: 360px;"
|
|
84
84
|
/>
|
|
85
85
|
</div>
|
|
86
86
|
</div>
|
|
@@ -177,7 +177,7 @@ exports[`component:<Slider> prop:auto 1`] = `
|
|
|
177
177
|
>
|
|
178
178
|
<div
|
|
179
179
|
class="view image"
|
|
180
|
-
style="height: 230px; width: 360px;"
|
|
180
|
+
style="background-image: url(https://picsum.photos/seed/@victor/1024/768); height: 230px; width: 360px;"
|
|
181
181
|
/>
|
|
182
182
|
</div>
|
|
183
183
|
<div
|
|
@@ -185,7 +185,7 @@ exports[`component:<Slider> prop:auto 1`] = `
|
|
|
185
185
|
>
|
|
186
186
|
<div
|
|
187
187
|
class="view image"
|
|
188
|
-
style="height: 230px; width: 360px;"
|
|
188
|
+
style="background-image: url(https://picsum.photos/seed/@svet/1024/768); height: 230px; width: 360px;"
|
|
189
189
|
/>
|
|
190
190
|
</div>
|
|
191
191
|
<div
|
|
@@ -193,7 +193,7 @@ exports[`component:<Slider> prop:auto 1`] = `
|
|
|
193
193
|
>
|
|
194
194
|
<div
|
|
195
195
|
class="view image"
|
|
196
|
-
style="height: 230px; width: 360px;"
|
|
196
|
+
style="background-image: url(https://picsum.photos/seed/@mario2/1024/768); height: 230px; width: 360px;"
|
|
197
197
|
/>
|
|
198
198
|
</div>
|
|
199
199
|
</div>
|
|
@@ -290,7 +290,7 @@ exports[`component:<Slider> prop:behavior 1`] = `
|
|
|
290
290
|
>
|
|
291
291
|
<div
|
|
292
292
|
class="view image"
|
|
293
|
-
style="height: 230px; width: 360px;"
|
|
293
|
+
style="background-image: url(https://picsum.photos/seed/@victor/1024/768); height: 230px; width: 360px;"
|
|
294
294
|
/>
|
|
295
295
|
</div>
|
|
296
296
|
<div
|
|
@@ -298,7 +298,7 @@ exports[`component:<Slider> prop:behavior 1`] = `
|
|
|
298
298
|
>
|
|
299
299
|
<div
|
|
300
300
|
class="view image"
|
|
301
|
-
style="height: 230px; width: 360px;"
|
|
301
|
+
style="background-image: url(https://picsum.photos/seed/@svet/1024/768); height: 230px; width: 360px;"
|
|
302
302
|
/>
|
|
303
303
|
</div>
|
|
304
304
|
<div
|
|
@@ -306,7 +306,7 @@ exports[`component:<Slider> prop:behavior 1`] = `
|
|
|
306
306
|
>
|
|
307
307
|
<div
|
|
308
308
|
class="view image"
|
|
309
|
-
style="height: 230px; width: 360px;"
|
|
309
|
+
style="background-image: url(https://picsum.photos/seed/@mario2/1024/768); height: 230px; width: 360px;"
|
|
310
310
|
/>
|
|
311
311
|
</div>
|
|
312
312
|
</div>
|
|
@@ -421,7 +421,7 @@ exports[`component:<Slider> prop:captions 1`] = `
|
|
|
421
421
|
>
|
|
422
422
|
<div
|
|
423
423
|
class="view image"
|
|
424
|
-
style="height: 230px; width: 360px;"
|
|
424
|
+
style="background-image: url(https://picsum.photos/seed/@victor/1024/768); height: 230px; width: 360px;"
|
|
425
425
|
/>
|
|
426
426
|
<div
|
|
427
427
|
class="view caption"
|
|
@@ -438,7 +438,7 @@ exports[`component:<Slider> prop:captions 1`] = `
|
|
|
438
438
|
>
|
|
439
439
|
<div
|
|
440
440
|
class="view image"
|
|
441
|
-
style="height: 230px; width: 360px;"
|
|
441
|
+
style="background-image: url(https://picsum.photos/seed/@svet/1024/768); height: 230px; width: 360px;"
|
|
442
442
|
/>
|
|
443
443
|
<div
|
|
444
444
|
class="view caption"
|
|
@@ -455,7 +455,7 @@ exports[`component:<Slider> prop:captions 1`] = `
|
|
|
455
455
|
>
|
|
456
456
|
<div
|
|
457
457
|
class="view image"
|
|
458
|
-
style="height: 230px; width: 360px;"
|
|
458
|
+
style="background-image: url(https://picsum.photos/seed/@mario2/1024/768); height: 230px; width: 360px;"
|
|
459
459
|
/>
|
|
460
460
|
<div
|
|
461
461
|
class="view caption"
|
|
@@ -537,7 +537,7 @@ exports[`component:<Slider> prop:index 1`] = `
|
|
|
537
537
|
>
|
|
538
538
|
<div
|
|
539
539
|
class="view image"
|
|
540
|
-
style="height: 230px; width: 360px;"
|
|
540
|
+
style="background-image: url(https://picsum.photos/seed/@soyjavi/1024/768); height: 230px; width: 360px;"
|
|
541
541
|
/>
|
|
542
542
|
</div>
|
|
543
543
|
<div
|
|
@@ -545,7 +545,7 @@ exports[`component:<Slider> prop:index 1`] = `
|
|
|
545
545
|
>
|
|
546
546
|
<div
|
|
547
547
|
class="view image"
|
|
548
|
-
style="height: 230px; width: 360px;"
|
|
548
|
+
style="background-image: url(https://picsum.photos/seed/@jose/1024/768); height: 230px; width: 360px;"
|
|
549
549
|
/>
|
|
550
550
|
</div>
|
|
551
551
|
<div
|
|
@@ -610,7 +610,7 @@ exports[`component:<Slider> prop:index 1`] = `
|
|
|
610
610
|
</DocumentFragment>
|
|
611
611
|
`;
|
|
612
612
|
|
|
613
|
-
exports[`component:<Slider> prop:
|
|
613
|
+
exports[`component:<Slider> prop:indicator 1`] = `
|
|
614
614
|
<DocumentFragment>
|
|
615
615
|
<div
|
|
616
616
|
class="view container"
|
|
@@ -674,7 +674,7 @@ exports[`component:<Slider> prop:onCounter 1`] = `
|
|
|
674
674
|
>
|
|
675
675
|
<div
|
|
676
676
|
class="view image"
|
|
677
|
-
style="height: 230px; width: 360px;"
|
|
677
|
+
style="background-image: url(https://picsum.photos/seed/@victor/1024/768); height: 230px; width: 360px;"
|
|
678
678
|
/>
|
|
679
679
|
</div>
|
|
680
680
|
<div
|
|
@@ -682,7 +682,7 @@ exports[`component:<Slider> prop:onCounter 1`] = `
|
|
|
682
682
|
>
|
|
683
683
|
<div
|
|
684
684
|
class="view image"
|
|
685
|
-
style="height: 230px; width: 360px;"
|
|
685
|
+
style="background-image: url(https://picsum.photos/seed/@svet/1024/768); height: 230px; width: 360px;"
|
|
686
686
|
/>
|
|
687
687
|
</div>
|
|
688
688
|
<div
|
|
@@ -690,38 +690,129 @@ exports[`component:<Slider> prop:onCounter 1`] = `
|
|
|
690
690
|
>
|
|
691
691
|
<div
|
|
692
692
|
class="view image"
|
|
693
|
-
style="height: 230px; width: 360px;"
|
|
693
|
+
style="background-image: url(https://picsum.photos/seed/@mario2/1024/768); height: 230px; width: 360px;"
|
|
694
694
|
/>
|
|
695
695
|
</div>
|
|
696
|
-
|
|
697
|
-
|
|
696
|
+
</div>
|
|
697
|
+
<div
|
|
698
|
+
class="pressable button hide second"
|
|
699
|
+
>
|
|
700
|
+
<span
|
|
701
|
+
class="icon headline-3"
|
|
698
702
|
>
|
|
699
|
-
<
|
|
700
|
-
|
|
703
|
+
<svg
|
|
704
|
+
fill="currentColor"
|
|
705
|
+
height="1em"
|
|
706
|
+
stroke="currentColor"
|
|
707
|
+
stroke-width="0"
|
|
708
|
+
viewBox="0 0 24 24"
|
|
709
|
+
width="1em"
|
|
710
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
701
711
|
>
|
|
702
|
-
<
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
712
|
+
<path
|
|
713
|
+
d="M0 0h24v24H0V0z"
|
|
714
|
+
fill="none"
|
|
715
|
+
/>
|
|
716
|
+
<path
|
|
717
|
+
d="m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"
|
|
718
|
+
/>
|
|
719
|
+
</svg>
|
|
720
|
+
</span>
|
|
721
|
+
</div>
|
|
722
|
+
<div
|
|
723
|
+
class="view progress progress"
|
|
724
|
+
>
|
|
725
|
+
<div
|
|
726
|
+
class="view value"
|
|
727
|
+
style="width: 0%;"
|
|
728
|
+
/>
|
|
729
|
+
</div>
|
|
730
|
+
</div>
|
|
731
|
+
</DocumentFragment>
|
|
732
|
+
`;
|
|
733
|
+
|
|
734
|
+
exports[`component:<Slider> prop:onCounter 1`] = `
|
|
735
|
+
<DocumentFragment>
|
|
736
|
+
<div
|
|
737
|
+
class="view container"
|
|
738
|
+
style="width: 360px;"
|
|
739
|
+
>
|
|
740
|
+
<div
|
|
741
|
+
class="pressable button hide first"
|
|
742
|
+
>
|
|
743
|
+
<span
|
|
744
|
+
class="icon headline-3"
|
|
745
|
+
>
|
|
746
|
+
<svg
|
|
747
|
+
fill="currentColor"
|
|
748
|
+
height="1em"
|
|
749
|
+
stroke="currentColor"
|
|
750
|
+
stroke-width="0"
|
|
751
|
+
viewBox="0 0 24 24"
|
|
752
|
+
width="1em"
|
|
753
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
722
754
|
>
|
|
723
|
-
|
|
724
|
-
|
|
755
|
+
<path
|
|
756
|
+
d="M0 0h24v24H0V0z"
|
|
757
|
+
fill="none"
|
|
758
|
+
/>
|
|
759
|
+
<path
|
|
760
|
+
d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"
|
|
761
|
+
/>
|
|
762
|
+
</svg>
|
|
763
|
+
</span>
|
|
764
|
+
</div>
|
|
765
|
+
<div
|
|
766
|
+
class="scrollview snap horizontal notIndicator scrollView"
|
|
767
|
+
style="width: 360px;"
|
|
768
|
+
>
|
|
769
|
+
<div
|
|
770
|
+
class="view item"
|
|
771
|
+
>
|
|
772
|
+
<div
|
|
773
|
+
class="view image"
|
|
774
|
+
style="background-image: url(https://picsum.photos/seed/@soyjavi/1024/768); height: 230px; width: 360px;"
|
|
775
|
+
/>
|
|
776
|
+
</div>
|
|
777
|
+
<div
|
|
778
|
+
class="view item"
|
|
779
|
+
>
|
|
780
|
+
<div
|
|
781
|
+
class="view image"
|
|
782
|
+
style="background-image: url(https://picsum.photos/seed/@jose/1024/768); height: 230px; width: 360px;"
|
|
783
|
+
/>
|
|
784
|
+
</div>
|
|
785
|
+
<div
|
|
786
|
+
class="view item"
|
|
787
|
+
>
|
|
788
|
+
<div
|
|
789
|
+
class="view image"
|
|
790
|
+
style="background-image: url(https://picsum.photos/seed/@mario1/1024/768); height: 230px; width: 360px;"
|
|
791
|
+
/>
|
|
792
|
+
</div>
|
|
793
|
+
<div
|
|
794
|
+
class="view item"
|
|
795
|
+
>
|
|
796
|
+
<div
|
|
797
|
+
class="view image"
|
|
798
|
+
style="background-image: url(https://picsum.photos/seed/@victor/1024/768); height: 230px; width: 360px;"
|
|
799
|
+
/>
|
|
800
|
+
</div>
|
|
801
|
+
<div
|
|
802
|
+
class="view item"
|
|
803
|
+
>
|
|
804
|
+
<div
|
|
805
|
+
class="view image"
|
|
806
|
+
style="background-image: url(https://picsum.photos/seed/@svet/1024/768); height: 230px; width: 360px;"
|
|
807
|
+
/>
|
|
808
|
+
</div>
|
|
809
|
+
<div
|
|
810
|
+
class="view item"
|
|
811
|
+
>
|
|
812
|
+
<div
|
|
813
|
+
class="view image"
|
|
814
|
+
style="background-image: url(https://picsum.photos/seed/@mario2/1024/768); height: 230px; width: 360px;"
|
|
815
|
+
/>
|
|
725
816
|
</div>
|
|
726
817
|
</div>
|
|
727
818
|
<div
|
|
@@ -749,11 +840,41 @@ exports[`component:<Slider> prop:onCounter 1`] = `
|
|
|
749
840
|
</svg>
|
|
750
841
|
</span>
|
|
751
842
|
</div>
|
|
843
|
+
<div
|
|
844
|
+
class="pressable overlay counter"
|
|
845
|
+
>
|
|
846
|
+
<span
|
|
847
|
+
class="icon action"
|
|
848
|
+
>
|
|
849
|
+
<svg
|
|
850
|
+
fill="currentColor"
|
|
851
|
+
height="1em"
|
|
852
|
+
stroke="currentColor"
|
|
853
|
+
stroke-width="0"
|
|
854
|
+
viewBox="0 0 24 24"
|
|
855
|
+
width="1em"
|
|
856
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
857
|
+
>
|
|
858
|
+
<path
|
|
859
|
+
d="M0 0h24v24H0V0z"
|
|
860
|
+
fill="none"
|
|
861
|
+
/>
|
|
862
|
+
<path
|
|
863
|
+
d="M20 4v12H8V4h12m0-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 9.67 1.69 2.26 2.48-3.1L19 15H9zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"
|
|
864
|
+
/>
|
|
865
|
+
</svg>
|
|
866
|
+
</span>
|
|
867
|
+
<span
|
|
868
|
+
class="text bold small"
|
|
869
|
+
>
|
|
870
|
+
6
|
|
871
|
+
</span>
|
|
872
|
+
</div>
|
|
752
873
|
</div>
|
|
753
874
|
</DocumentFragment>
|
|
754
875
|
`;
|
|
755
876
|
|
|
756
|
-
exports[`component:<Slider>
|
|
877
|
+
exports[`component:<Slider> prop:replay (false) 1`] = `
|
|
757
878
|
<DocumentFragment>
|
|
758
879
|
<div
|
|
759
880
|
class="view container"
|
|
@@ -866,6 +987,119 @@ exports[`component:<Slider> renders 1`] = `
|
|
|
866
987
|
</DocumentFragment>
|
|
867
988
|
`;
|
|
868
989
|
|
|
990
|
+
exports[`component:<Slider> renders 1`] = `
|
|
991
|
+
<DocumentFragment>
|
|
992
|
+
<div
|
|
993
|
+
class="view container"
|
|
994
|
+
style="width: 360px;"
|
|
995
|
+
>
|
|
996
|
+
<div
|
|
997
|
+
class="pressable button hide first"
|
|
998
|
+
>
|
|
999
|
+
<span
|
|
1000
|
+
class="icon headline-3"
|
|
1001
|
+
>
|
|
1002
|
+
<svg
|
|
1003
|
+
fill="currentColor"
|
|
1004
|
+
height="1em"
|
|
1005
|
+
stroke="currentColor"
|
|
1006
|
+
stroke-width="0"
|
|
1007
|
+
viewBox="0 0 24 24"
|
|
1008
|
+
width="1em"
|
|
1009
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1010
|
+
>
|
|
1011
|
+
<path
|
|
1012
|
+
d="M0 0h24v24H0V0z"
|
|
1013
|
+
fill="none"
|
|
1014
|
+
/>
|
|
1015
|
+
<path
|
|
1016
|
+
d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"
|
|
1017
|
+
/>
|
|
1018
|
+
</svg>
|
|
1019
|
+
</span>
|
|
1020
|
+
</div>
|
|
1021
|
+
<div
|
|
1022
|
+
class="scrollview snap horizontal notIndicator scrollView"
|
|
1023
|
+
style="width: 360px;"
|
|
1024
|
+
>
|
|
1025
|
+
<div
|
|
1026
|
+
class="view item"
|
|
1027
|
+
>
|
|
1028
|
+
<div
|
|
1029
|
+
class="view image"
|
|
1030
|
+
style="background-image: url(https://picsum.photos/seed/@soyjavi/1024/768); height: 230px; width: 360px;"
|
|
1031
|
+
/>
|
|
1032
|
+
</div>
|
|
1033
|
+
<div
|
|
1034
|
+
class="view item"
|
|
1035
|
+
>
|
|
1036
|
+
<div
|
|
1037
|
+
class="view image"
|
|
1038
|
+
style="background-image: url(https://picsum.photos/seed/@jose/1024/768); height: 230px; width: 360px;"
|
|
1039
|
+
/>
|
|
1040
|
+
</div>
|
|
1041
|
+
<div
|
|
1042
|
+
class="view item"
|
|
1043
|
+
>
|
|
1044
|
+
<div
|
|
1045
|
+
class="view image"
|
|
1046
|
+
style="background-image: url(https://picsum.photos/seed/@mario1/1024/768); height: 230px; width: 360px;"
|
|
1047
|
+
/>
|
|
1048
|
+
</div>
|
|
1049
|
+
<div
|
|
1050
|
+
class="view item"
|
|
1051
|
+
>
|
|
1052
|
+
<div
|
|
1053
|
+
class="view image"
|
|
1054
|
+
style="background-image: url(https://picsum.photos/seed/@victor/1024/768); height: 230px; width: 360px;"
|
|
1055
|
+
/>
|
|
1056
|
+
</div>
|
|
1057
|
+
<div
|
|
1058
|
+
class="view item"
|
|
1059
|
+
>
|
|
1060
|
+
<div
|
|
1061
|
+
class="view image"
|
|
1062
|
+
style="background-image: url(https://picsum.photos/seed/@svet/1024/768); height: 230px; width: 360px;"
|
|
1063
|
+
/>
|
|
1064
|
+
</div>
|
|
1065
|
+
<div
|
|
1066
|
+
class="view item"
|
|
1067
|
+
>
|
|
1068
|
+
<div
|
|
1069
|
+
class="view image"
|
|
1070
|
+
style="background-image: url(https://picsum.photos/seed/@mario2/1024/768); height: 230px; width: 360px;"
|
|
1071
|
+
/>
|
|
1072
|
+
</div>
|
|
1073
|
+
</div>
|
|
1074
|
+
<div
|
|
1075
|
+
class="pressable button hide second"
|
|
1076
|
+
>
|
|
1077
|
+
<span
|
|
1078
|
+
class="icon headline-3"
|
|
1079
|
+
>
|
|
1080
|
+
<svg
|
|
1081
|
+
fill="currentColor"
|
|
1082
|
+
height="1em"
|
|
1083
|
+
stroke="currentColor"
|
|
1084
|
+
stroke-width="0"
|
|
1085
|
+
viewBox="0 0 24 24"
|
|
1086
|
+
width="1em"
|
|
1087
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1088
|
+
>
|
|
1089
|
+
<path
|
|
1090
|
+
d="M0 0h24v24H0V0z"
|
|
1091
|
+
fill="none"
|
|
1092
|
+
/>
|
|
1093
|
+
<path
|
|
1094
|
+
d="m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"
|
|
1095
|
+
/>
|
|
1096
|
+
</svg>
|
|
1097
|
+
</span>
|
|
1098
|
+
</div>
|
|
1099
|
+
</div>
|
|
1100
|
+
</DocumentFragment>
|
|
1101
|
+
`;
|
|
1102
|
+
|
|
869
1103
|
exports[`component:<Slider> testId 1`] = `
|
|
870
1104
|
<DocumentFragment>
|
|
871
1105
|
<div
|
|
@@ -931,7 +1165,7 @@ exports[`component:<Slider> testId 1`] = `
|
|
|
931
1165
|
>
|
|
932
1166
|
<div
|
|
933
1167
|
class="view image"
|
|
934
|
-
style="height: 230px; width: 360px;"
|
|
1168
|
+
style="background-image: url(https://picsum.photos/seed/@victor/1024/768); height: 230px; width: 360px;"
|
|
935
1169
|
/>
|
|
936
1170
|
</div>
|
|
937
1171
|
<div
|
|
@@ -939,7 +1173,7 @@ exports[`component:<Slider> testId 1`] = `
|
|
|
939
1173
|
>
|
|
940
1174
|
<div
|
|
941
1175
|
class="view image"
|
|
942
|
-
style="height: 230px; width: 360px;"
|
|
1176
|
+
style="background-image: url(https://picsum.photos/seed/@svet/1024/768); height: 230px; width: 360px;"
|
|
943
1177
|
/>
|
|
944
1178
|
</div>
|
|
945
1179
|
<div
|
|
@@ -947,7 +1181,7 @@ exports[`component:<Slider> testId 1`] = `
|
|
|
947
1181
|
>
|
|
948
1182
|
<div
|
|
949
1183
|
class="view image"
|
|
950
|
-
style="height: 230px; width: 360px;"
|
|
1184
|
+
style="background-image: url(https://picsum.photos/seed/@mario2/1024/768); height: 230px; width: 360px;"
|
|
951
1185
|
/>
|
|
952
1186
|
</div>
|
|
953
1187
|
</div>
|
|
@@ -41,6 +41,10 @@
|
|
|
41
41
|
border-width: calc(var(--mirai-ui-border-width) * 2);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
.checkbox input:not(:disabled):not(:checked):focus {
|
|
45
|
+
border-color: var(--mirai-ui-input-text-focus);
|
|
46
|
+
}
|
|
47
|
+
|
|
44
48
|
/* -- reset defaults -------------------------------------------------------- */
|
|
45
49
|
.checkbox input.input {
|
|
46
50
|
margin-right: 0;
|
|
@@ -20,6 +20,7 @@ var _MdOutlineFilterList = require("@react-icons/all-files/md/MdOutlineFilterLis
|
|
|
20
20
|
var _MdOutlineInfo = require("@react-icons/all-files/md/MdOutlineInfo");
|
|
21
21
|
var _MdOutlinePhotoLibrary = require("@react-icons/all-files/md/MdOutlinePhotoLibrary");
|
|
22
22
|
var _MdOutlineRemove = require("@react-icons/all-files/md/MdOutlineRemove");
|
|
23
|
+
var _MdOutlineReplay = require("@react-icons/all-files/md/MdOutlineReplay");
|
|
23
24
|
var _MdOutlineSearch = require("@react-icons/all-files/md/MdOutlineSearch");
|
|
24
25
|
var _MdOutlineVisibility = require("@react-icons/all-files/md/MdOutlineVisibility");
|
|
25
26
|
var _MdOutlineVisibilityOff = require("@react-icons/all-files/md/MdOutlineVisibilityOff");
|
|
@@ -51,6 +52,7 @@ var ICON = {
|
|
|
51
52
|
WARNING: _MdOutlineWarningAmber.MdOutlineWarningAmber,
|
|
52
53
|
// <Slider>
|
|
53
54
|
PHOTO_LIBRARY: _MdOutlinePhotoLibrary.MdOutlinePhotoLibrary,
|
|
55
|
+
REPLAY: _MdOutlineReplay.MdOutlineReplay,
|
|
54
56
|
// <Table>
|
|
55
57
|
FILTER: _MdOutlineFilterList.MdOutlineFilterList,
|
|
56
58
|
// Filetype
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.constants.js","names":["ICON","LEFT","RIGHT","UP","DOWN","CHECK","ADD","REMOVE","EXPAND_LESS","EXPAND_MORE","SEARCH","EYE_OPEN","EYE_CLOSE","CLOSE","ERROR","INFO","SUCCESS","WARNING","PHOTO_LIBRARY","FILTER","MARKDOWN"],"sources":["../../../src/primitives/Icon/Icon.constants.js"],"sourcesContent":["import { LiaMarkdown as MARKDOWN } from '@react-icons/all-files/lia/LiaMarkdown';\nimport { MdCheckCircleOutline as SUCCESS } from '@react-icons/all-files/md/MdCheckCircleOutline';\nimport { MdErrorOutline as ERROR } from '@react-icons/all-files/md/MdErrorOutline';\nimport { MdOutlineAdd as ADD } from '@react-icons/all-files/md/MdOutlineAdd';\nimport { MdOutlineArrowBack as LEFT } from '@react-icons/all-files/md/MdOutlineArrowBack';\nimport { MdOutlineArrowDownward as DOWN } from '@react-icons/all-files/md/MdOutlineArrowDownward';\nimport { MdOutlineArrowForward as RIGHT } from '@react-icons/all-files/md/MdOutlineArrowForward';\nimport { MdOutlineArrowUpward as UP } from '@react-icons/all-files/md/MdOutlineArrowUpward';\nimport { MdOutlineCheck as CHECK } from '@react-icons/all-files/md/MdOutlineCheck';\nimport { MdOutlineClose as CLOSE } from '@react-icons/all-files/md/MdOutlineClose';\nimport { MdOutlineExpandLess as EXPAND_LESS } from '@react-icons/all-files/md/MdOutlineExpandLess';\nimport { MdOutlineExpandMore as EXPAND_MORE } from '@react-icons/all-files/md/MdOutlineExpandMore';\nimport { MdOutlineFilterList as FILTER } from '@react-icons/all-files/md/MdOutlineFilterList';\nimport { MdOutlineInfo as INFO } from '@react-icons/all-files/md/MdOutlineInfo';\nimport { MdOutlinePhotoLibrary as PHOTO_LIBRARY } from '@react-icons/all-files/md/MdOutlinePhotoLibrary';\nimport { MdOutlineRemove as REMOVE } from '@react-icons/all-files/md/MdOutlineRemove';\nimport { MdOutlineSearch as SEARCH } from '@react-icons/all-files/md/MdOutlineSearch';\nimport { MdOutlineVisibility as EYE_OPEN } from '@react-icons/all-files/md/MdOutlineVisibility';\nimport { MdOutlineVisibilityOff as EYE_CLOSE } from '@react-icons/all-files/md/MdOutlineVisibilityOff';\nimport { MdOutlineWarningAmber as WARNING } from '@react-icons/all-files/md/MdOutlineWarningAmber';\n\nexport const ICON = {\n // <Calendar>\n LEFT,\n RIGHT,\n UP,\n DOWN,\n // <Check>\n CHECK,\n // <InputOption>\n ADD,\n REMOVE,\n // <InputSelect>\n EXPAND_LESS,\n EXPAND_MORE,\n // <InputText>\n SEARCH,\n EYE_OPEN,\n EYE_CLOSE,\n // <Modal>\n CLOSE,\n // <Notification> & <InputText>\n ERROR,\n INFO,\n SUCCESS,\n WARNING,\n // <Slider>\n PHOTO_LIBRARY,\n // <Table>\n FILTER,\n // Filetype\n MARKDOWN,\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEO,IAAMA,IAAI,GAAG;EAClB;EACAC,IAAI,EAAJA,sCAAI;EACJC,KAAK,EAALA,4CAAK;EACLC,EAAE,EAAFA,0CAAE;EACFC,IAAI,EAAJA,8CAAI;EACJ;EACAC,KAAK,EAALA,8BAAK;EACL;EACAC,GAAG,EAAHA,0BAAG;EACHC,MAAM,EAANA,gCAAM;EACN;EACAC,WAAW,EAAXA,wCAAW;EACXC,WAAW,EAAXA,wCAAW;EACX;EACAC,MAAM,EAANA,gCAAM;EACNC,QAAQ,EAARA,wCAAQ;EACRC,SAAS,EAATA,8CAAS;EACT;EACAC,KAAK,EAALA,8BAAK;EACL;EACAC,KAAK,EAALA,8BAAK;EACLC,IAAI,EAAJA,4BAAI;EACJC,OAAO,EAAPA,0CAAO;EACPC,OAAO,EAAPA,4CAAO;EACP;EACAC,aAAa,EAAbA,4CAAa;
|
|
1
|
+
{"version":3,"file":"Icon.constants.js","names":["ICON","LEFT","RIGHT","UP","DOWN","CHECK","ADD","REMOVE","EXPAND_LESS","EXPAND_MORE","SEARCH","EYE_OPEN","EYE_CLOSE","CLOSE","ERROR","INFO","SUCCESS","WARNING","PHOTO_LIBRARY","REPLAY","FILTER","MARKDOWN"],"sources":["../../../src/primitives/Icon/Icon.constants.js"],"sourcesContent":["import { LiaMarkdown as MARKDOWN } from '@react-icons/all-files/lia/LiaMarkdown';\nimport { MdCheckCircleOutline as SUCCESS } from '@react-icons/all-files/md/MdCheckCircleOutline';\nimport { MdErrorOutline as ERROR } from '@react-icons/all-files/md/MdErrorOutline';\nimport { MdOutlineAdd as ADD } from '@react-icons/all-files/md/MdOutlineAdd';\nimport { MdOutlineArrowBack as LEFT } from '@react-icons/all-files/md/MdOutlineArrowBack';\nimport { MdOutlineArrowDownward as DOWN } from '@react-icons/all-files/md/MdOutlineArrowDownward';\nimport { MdOutlineArrowForward as RIGHT } from '@react-icons/all-files/md/MdOutlineArrowForward';\nimport { MdOutlineArrowUpward as UP } from '@react-icons/all-files/md/MdOutlineArrowUpward';\nimport { MdOutlineCheck as CHECK } from '@react-icons/all-files/md/MdOutlineCheck';\nimport { MdOutlineClose as CLOSE } from '@react-icons/all-files/md/MdOutlineClose';\nimport { MdOutlineExpandLess as EXPAND_LESS } from '@react-icons/all-files/md/MdOutlineExpandLess';\nimport { MdOutlineExpandMore as EXPAND_MORE } from '@react-icons/all-files/md/MdOutlineExpandMore';\nimport { MdOutlineFilterList as FILTER } from '@react-icons/all-files/md/MdOutlineFilterList';\nimport { MdOutlineInfo as INFO } from '@react-icons/all-files/md/MdOutlineInfo';\nimport { MdOutlinePhotoLibrary as PHOTO_LIBRARY } from '@react-icons/all-files/md/MdOutlinePhotoLibrary';\nimport { MdOutlineRemove as REMOVE } from '@react-icons/all-files/md/MdOutlineRemove';\nimport { MdOutlineReplay as REPLAY } from '@react-icons/all-files/md/MdOutlineReplay';\nimport { MdOutlineSearch as SEARCH } from '@react-icons/all-files/md/MdOutlineSearch';\nimport { MdOutlineVisibility as EYE_OPEN } from '@react-icons/all-files/md/MdOutlineVisibility';\nimport { MdOutlineVisibilityOff as EYE_CLOSE } from '@react-icons/all-files/md/MdOutlineVisibilityOff';\nimport { MdOutlineWarningAmber as WARNING } from '@react-icons/all-files/md/MdOutlineWarningAmber';\n\nexport const ICON = {\n // <Calendar>\n LEFT,\n RIGHT,\n UP,\n DOWN,\n // <Check>\n CHECK,\n // <InputOption>\n ADD,\n REMOVE,\n // <InputSelect>\n EXPAND_LESS,\n EXPAND_MORE,\n // <InputText>\n SEARCH,\n EYE_OPEN,\n EYE_CLOSE,\n // <Modal>\n CLOSE,\n // <Notification> & <InputText>\n ERROR,\n INFO,\n SUCCESS,\n WARNING,\n // <Slider>\n PHOTO_LIBRARY,\n REPLAY,\n // <Table>\n FILTER,\n // Filetype\n MARKDOWN,\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEO,IAAMA,IAAI,GAAG;EAClB;EACAC,IAAI,EAAJA,sCAAI;EACJC,KAAK,EAALA,4CAAK;EACLC,EAAE,EAAFA,0CAAE;EACFC,IAAI,EAAJA,8CAAI;EACJ;EACAC,KAAK,EAALA,8BAAK;EACL;EACAC,GAAG,EAAHA,0BAAG;EACHC,MAAM,EAANA,gCAAM;EACN;EACAC,WAAW,EAAXA,wCAAW;EACXC,WAAW,EAAXA,wCAAW;EACX;EACAC,MAAM,EAANA,gCAAM;EACNC,QAAQ,EAARA,wCAAQ;EACRC,SAAS,EAATA,8CAAS;EACT;EACAC,KAAK,EAALA,8BAAK;EACL;EACAC,KAAK,EAALA,8BAAK;EACLC,IAAI,EAAJA,4BAAI;EACJC,OAAO,EAAPA,0CAAO;EACPC,OAAO,EAAPA,4CAAO;EACP;EACAC,aAAa,EAAbA,4CAAa;EACbC,MAAM,EAANA,gCAAM;EACN;EACAC,MAAM,EAANA,wCAAM;EACN;EACAC,QAAQ,EAARA;AACF,CAAC;AAAC"}
|
|
@@ -725,6 +725,41 @@ exports[`primitive:<Icon> prop:value prop:value (REMOVE) 1`] = `
|
|
|
725
725
|
</DocumentFragment>
|
|
726
726
|
`;
|
|
727
727
|
|
|
728
|
+
exports[`primitive:<Icon> prop:value prop:value (REPLAY) 1`] = `
|
|
729
|
+
<DocumentFragment>
|
|
730
|
+
<span
|
|
731
|
+
class="icon headline-3"
|
|
732
|
+
>
|
|
733
|
+
<svg
|
|
734
|
+
fill="currentColor"
|
|
735
|
+
height="1em"
|
|
736
|
+
stroke="currentColor"
|
|
737
|
+
stroke-width="0"
|
|
738
|
+
viewBox="0 0 24 24"
|
|
739
|
+
width="1em"
|
|
740
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
741
|
+
>
|
|
742
|
+
<g
|
|
743
|
+
fill="none"
|
|
744
|
+
>
|
|
745
|
+
<path
|
|
746
|
+
d="M0 0h24v24H0z"
|
|
747
|
+
/>
|
|
748
|
+
<path
|
|
749
|
+
d="M0 0h24v24H0z"
|
|
750
|
+
/>
|
|
751
|
+
<path
|
|
752
|
+
d="M0 0h24v24H0z"
|
|
753
|
+
/>
|
|
754
|
+
</g>
|
|
755
|
+
<path
|
|
756
|
+
d="M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"
|
|
757
|
+
/>
|
|
758
|
+
</svg>
|
|
759
|
+
</span>
|
|
760
|
+
</DocumentFragment>
|
|
761
|
+
`;
|
|
762
|
+
|
|
728
763
|
exports[`primitive:<Icon> prop:value prop:value (RIGHT) 1`] = `
|
|
729
764
|
<DocumentFragment>
|
|
730
765
|
<span
|
|
@@ -51,8 +51,17 @@
|
|
|
51
51
|
background-color: var(--mirai-ui-radio-base);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
.radio input:not(:disabled).error {
|
|
55
|
+
border-color: var(--mirai-ui-error);
|
|
56
|
+
border-width: calc(var(--mirai-ui-border-width) * 2);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.radio input:not(:disabled):not(:checked):focus {
|
|
60
|
+
border-color: var(--mirai-ui-input-text-focus);
|
|
61
|
+
}
|
|
62
|
+
|
|
54
63
|
/* -- reset defaults -------------------------------------------------------- */
|
|
55
64
|
.radio input.input {
|
|
56
65
|
margin-right: 0;
|
|
57
66
|
top: 0;
|
|
58
|
-
}
|
|
67
|
+
}
|