@mirai/ui 2.0.40 → 2.0.42
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 +1 -1
- package/build/primitives/Layer/helpers/getScrollParent.js +1 -1
- package/build/primitives/Layer/helpers/getScrollParent.js.map +1 -1
- package/build/primitives/Radio/Radio.stories.js +5 -2
- package/build/primitives/Radio/Radio.stories.js.map +1 -1
- package/build/theme/default.theme.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ const MyComponent = () => (
|
|
|
47
47
|
--mirai-ui-checkbox-border-radius: var(--mirai-ui-border-radius);
|
|
48
48
|
--mirai-ui-checkbox-checked: var(--mirai-ui-accent);
|
|
49
49
|
--mirai-ui-checkbox-disabled: var(--mirai-ui-content-border);
|
|
50
|
-
--mirai-ui-checkbox-size: calc(var(--mirai-ui-space-M) +
|
|
50
|
+
--mirai-ui-checkbox-size: calc(var(--mirai-ui-space-M) + var(--mirai-ui-space-XXS));
|
|
51
51
|
--mirai-ui-checkbox-size-mobile: var(--mirai-ui-space-L);
|
|
52
52
|
```
|
|
53
53
|
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getScrollParent = void 0;
|
|
7
7
|
var getScrollParent = function getScrollParent(node) {
|
|
8
|
-
var _ref = node && getComputedStyle(node),
|
|
8
|
+
var _ref = node && (getComputedStyle(node) || {}),
|
|
9
9
|
position = _ref.position;
|
|
10
10
|
if (!node || node.tagName === 'HTML' || ['fixed', 'sticky'].includes(position)) return;
|
|
11
11
|
return node.scrollTop > 0 ? node : getScrollParent(node.parentNode);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getScrollParent.js","names":["getScrollParent","node","getComputedStyle","position","tagName","includes","scrollTop","parentNode"],"sources":["../../../../src/primitives/Layer/helpers/getScrollParent.js"],"sourcesContent":["export const getScrollParent = (node) => {\n const { position } = node && getComputedStyle(node);\n if (!node || node.tagName === 'HTML' || ['fixed', 'sticky'].includes(position)) return;\n\n return node.scrollTop > 0 ? node : getScrollParent(node.parentNode);\n};\n"],"mappings":";;;;;;AAAO,IAAMA,eAAe,GAAG,SAAlBA,eAAe,CAAIC,IAAI,EAAK;EACvC,WAAqBA,IAAI,
|
|
1
|
+
{"version":3,"file":"getScrollParent.js","names":["getScrollParent","node","getComputedStyle","position","tagName","includes","scrollTop","parentNode"],"sources":["../../../../src/primitives/Layer/helpers/getScrollParent.js"],"sourcesContent":["export const getScrollParent = (node) => {\n const { position } = node && (getComputedStyle(node) || {});\n if (!node || node.tagName === 'HTML' || ['fixed', 'sticky'].includes(position)) return;\n\n return node.scrollTop > 0 ? node : getScrollParent(node.parentNode);\n};\n"],"mappings":";;;;;;AAAO,IAAMA,eAAe,GAAG,SAAlBA,eAAe,CAAIC,IAAI,EAAK;EACvC,WAAqBA,IAAI,KAAKC,gBAAgB,CAACD,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAAnDE,QAAQ,QAARA,QAAQ;EAChB,IAAI,CAACF,IAAI,IAAIA,IAAI,CAACG,OAAO,KAAK,MAAM,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAACC,QAAQ,CAACF,QAAQ,CAAC,EAAE;EAEhF,OAAOF,IAAI,CAACK,SAAS,GAAG,CAAC,GAAGL,IAAI,GAAGD,eAAe,CAACC,IAAI,CAACM,UAAU,CAAC;AACrE,CAAC;AAAC"}
|
|
@@ -33,10 +33,13 @@ var Story = function Story(props) {
|
|
|
33
33
|
(_console = console).log.apply(_console, ['<Radio>::onChange', next].concat(others));
|
|
34
34
|
setChecked(!checked);
|
|
35
35
|
};
|
|
36
|
-
return /*#__PURE__*/_react.default.createElement(_Radio.Radio, _extends({}, props, {
|
|
36
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Radio.Radio, _extends({}, props, {
|
|
37
37
|
checked: checked,
|
|
38
38
|
onChange: handleChange
|
|
39
|
-
}))
|
|
39
|
+
})), /*#__PURE__*/_react.default.createElement(_Radio.Radio, _extends({}, props, {
|
|
40
|
+
checked: !checked,
|
|
41
|
+
onChange: handleChange
|
|
42
|
+
})));
|
|
40
43
|
};
|
|
41
44
|
exports.Story = Story;
|
|
42
45
|
Story.storyName = 'Radio';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.stories.js","names":["title","Story","props","useState","checked","setChecked","handleChange","next","others","console","log","storyName","args","children","disabled","name","value","testId","style","argTypes"],"sources":["../../../src/primitives/Radio/Radio.stories.jsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport { Radio } from './Radio';\n\nexport default { title: 'Primitives' };\n\nexport const Story = (props) => {\n const [checked, setChecked] = useState(false);\n\n const handleChange = (next, ...others) => {\n console.log('<Radio>::onChange', next, ...others);\n setChecked(!checked);\n };\n\n return <Radio {...props} checked={checked} onChange={handleChange}
|
|
1
|
+
{"version":3,"file":"Radio.stories.js","names":["title","Story","props","useState","checked","setChecked","handleChange","next","others","console","log","storyName","args","children","disabled","name","value","testId","style","argTypes"],"sources":["../../../src/primitives/Radio/Radio.stories.jsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport { Radio } from './Radio';\n\nexport default { title: 'Primitives' };\n\nexport const Story = (props) => {\n const [checked, setChecked] = useState(false);\n\n const handleChange = (next, ...others) => {\n console.log('<Radio>::onChange', next, ...others);\n setChecked(!checked);\n };\n\n return (\n <>\n <Radio {...props} checked={checked} onChange={handleChange} />\n <Radio {...props} checked={!checked} onChange={handleChange} />\n </>\n );\n};\n\nStory.storyName = 'Radio';\n\nStory.args = {\n children: 'children',\n disabled: false,\n name: 'Radio',\n value: 'value',\n // inherited properties\n testId: 'test-story',\n style: {},\n};\n\nStory.argTypes = {};\n"],"mappings":";;;;;;;AAAA;AAEA;AAAgC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAEjB;EAAEA,KAAK,EAAE;AAAa,CAAC;AAAA;AAE/B,IAAMC,KAAK,GAAG,SAARA,KAAK,CAAIC,KAAK,EAAK;EAC9B,gBAA8B,IAAAC,eAAQ,EAAC,KAAK,CAAC;IAAA;IAAtCC,OAAO;IAAEC,UAAU;EAE1B,IAAMC,YAAY,GAAG,SAAfA,YAAY,CAAIC,IAAI,EAAgB;IAAA;IAAA,kCAAXC,MAAM;MAANA,MAAM;IAAA;IACnC,YAAAC,OAAO,EAACC,GAAG,kBAAC,mBAAmB,EAAEH,IAAI,SAAKC,MAAM,EAAC;IACjDH,UAAU,CAAC,CAACD,OAAO,CAAC;EACtB,CAAC;EAED,oBACE,yEACE,6BAAC,YAAK,eAAKF,KAAK;IAAE,OAAO,EAAEE,OAAQ;IAAC,QAAQ,EAAEE;EAAa,GAAG,eAC9D,6BAAC,YAAK,eAAKJ,KAAK;IAAE,OAAO,EAAE,CAACE,OAAQ;IAAC,QAAQ,EAAEE;EAAa,GAAG,CAC9D;AAEP,CAAC;AAAC;AAEFL,KAAK,CAACU,SAAS,GAAG,OAAO;AAEzBV,KAAK,CAACW,IAAI,GAAG;EACXC,QAAQ,EAAE,UAAU;EACpBC,QAAQ,EAAE,KAAK;EACfC,IAAI,EAAE,OAAO;EACbC,KAAK,EAAE,OAAO;EACd;EACAC,MAAM,EAAE,YAAY;EACpBC,KAAK,EAAE,CAAC;AACV,CAAC;AAEDjB,KAAK,CAACkB,QAAQ,GAAG,CAAC,CAAC"}
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
--mirai-ui-checkbox-border-radius: var(--mirai-ui-border-radius);
|
|
119
119
|
--mirai-ui-checkbox-checked: var(--mirai-ui-accent);
|
|
120
120
|
--mirai-ui-checkbox-disabled: var(--mirai-ui-content-border);
|
|
121
|
-
--mirai-ui-checkbox-size: calc(var(--mirai-ui-space-M) +
|
|
121
|
+
--mirai-ui-checkbox-size: calc(var(--mirai-ui-space-M) + var(--mirai-ui-space-XXS));
|
|
122
122
|
--mirai-ui-checkbox-size-mobile: var(--mirai-ui-space-L);
|
|
123
123
|
|
|
124
124
|
/* Icon */
|