@mirai/ui 1.0.5 → 1.0.9
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 +103 -1
- package/build/components/Button/Button.js.map +1 -1
- package/build/components/Button/index.js.map +1 -1
- package/build/components/Calendar/Calendar.Month.js.map +1 -1
- package/build/components/Calendar/Calendar.Week.js.map +1 -1
- package/build/components/Calendar/Calendar.Weekdays.js.map +1 -1
- package/build/components/Calendar/Calendar.constants.js.map +1 -1
- package/build/components/Calendar/Calendar.js.map +1 -1
- package/build/components/Calendar/helpers/getFirstDateOfMonth.js.map +1 -1
- package/build/components/Calendar/helpers/getFirstDateOfWeek.js.map +1 -1
- package/build/components/Calendar/helpers/getHeader.js.map +1 -1
- package/build/components/Calendar/helpers/getToday.js.map +1 -1
- package/build/components/Calendar/helpers/getWeekNumber.js.map +1 -1
- package/build/components/Calendar/helpers/getWeekdays.js.map +1 -1
- package/build/components/Calendar/helpers/index.js.map +1 -1
- package/build/components/Calendar/helpers/isJest.js.map +1 -1
- package/build/components/Calendar/index.js.map +1 -1
- package/build/components/Form/Form.js.map +1 -1
- package/build/components/Form/helpers/getChildrenErrors.js.map +1 -1
- package/build/components/Form/helpers/getChildrenValues.js.map +1 -1
- package/build/components/Form/helpers/getField.js.map +1 -1
- package/build/components/Form/helpers/groupState.js.map +1 -1
- package/build/components/Form/helpers/index.js.map +1 -1
- package/build/components/Form/index.js.map +1 -1
- package/build/components/InputNumber/InputNumber.js.map +1 -1
- package/build/components/InputNumber/__tests__/__snapshots__/InputNumber.test.js.snap +5 -5
- package/build/components/InputNumber/index.js.map +1 -1
- package/build/components/InputOption/InputOption.constants.js +13 -0
- package/build/components/InputOption/InputOption.constants.js.map +1 -0
- package/build/components/InputOption/InputOption.js +63 -0
- package/build/components/InputOption/InputOption.js.map +1 -0
- package/build/components/InputOption/InputOption.module.css +38 -0
- package/build/components/InputOption/__tests__/__snapshots__/InputOption.test.js.snap +232 -0
- package/build/components/InputOption/index.js +19 -0
- package/build/components/InputOption/index.js.map +1 -0
- package/build/components/InputSelect/InputSelect.js.map +1 -1
- package/build/components/InputSelect/index.js.map +1 -1
- package/build/components/InputText/InputText.js.map +1 -1
- package/build/components/InputText/index.js.map +1 -1
- package/build/components/Modal/Modal.js.map +1 -1
- package/build/components/Modal/index.js.map +1 -1
- package/build/components/Table/Table.Row.js +76 -0
- package/build/components/Table/Table.Row.js.map +1 -0
- package/build/components/Table/Table.js +92 -0
- package/build/components/Table/Table.js.map +1 -0
- package/build/components/Table/Table.module.css +76 -0
- package/build/components/Table/__tests__/__snapshots__/Table.test.js.snap +2285 -0
- package/build/components/Table/helpers/index.js +19 -0
- package/build/components/Table/helpers/index.js.map +1 -0
- package/build/components/Table/helpers/select.js +29 -0
- package/build/components/Table/helpers/select.js.map +1 -0
- package/build/components/Table/index.js +19 -0
- package/build/components/Table/index.js.map +1 -0
- package/build/components/index.js +26 -0
- package/build/components/index.js.map +1 -1
- package/build/helpers/getInputErrors.js.map +1 -1
- package/build/helpers/index.js.map +1 -1
- package/build/helpers/isValidDate.js.map +1 -1
- package/build/helpers/isValidEmail.js.map +1 -1
- package/build/helpers/isValidPhone.js.map +1 -1
- package/build/helpers/styles.js.map +1 -1
- package/build/hooks/helpers/getNavigator.js.map +1 -1
- package/build/hooks/helpers/getResolution.js.map +1 -1
- package/build/hooks/helpers/index.js.map +1 -1
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/useDevice.js.map +1 -1
- package/build/index.js.map +1 -1
- package/build/primitives/Checkbox/Checkbox.js +52 -0
- package/build/primitives/Checkbox/Checkbox.js.map +1 -0
- package/build/primitives/Checkbox/Checkbox.module.css +45 -0
- package/build/primitives/Checkbox/__tests__/__snapshots__/Checkbox.test.js.snap +127 -0
- package/build/primitives/Checkbox/index.js +19 -0
- package/build/primitives/Checkbox/index.js.map +1 -0
- package/build/primitives/Icon/Icon.constants.js +3 -1
- package/build/primitives/Icon/Icon.constants.js.map +1 -1
- package/build/primitives/Icon/Icon.js.map +1 -1
- package/build/primitives/Icon/index.js.map +1 -1
- package/build/primitives/Input/Input.js.map +1 -1
- package/build/primitives/Input/Input.module.css +4 -0
- package/build/primitives/Input/helpers/index.js.map +1 -1
- package/build/primitives/Input/helpers/parseValue.js.map +1 -1
- package/build/primitives/Input/index.js.map +1 -1
- package/build/primitives/Pressable/Pressable.constants.js.map +1 -1
- package/build/primitives/Pressable/Pressable.js.map +1 -1
- package/build/primitives/Pressable/index.js.map +1 -1
- package/build/primitives/Radio/Radio.js +49 -0
- package/build/primitives/Radio/Radio.js.map +1 -0
- package/build/primitives/Radio/Radio.module.css +59 -0
- package/build/primitives/Radio/__tests__/__snapshots__/Radio.test.js.snap +126 -0
- package/build/primitives/Radio/index.js +19 -0
- package/build/primitives/Radio/index.js.map +1 -0
- package/build/primitives/ScrollView/ScrollView.js.map +1 -1
- package/build/primitives/ScrollView/index.js.map +1 -1
- package/build/primitives/Select/Select.js.map +1 -1
- package/build/primitives/Select/Select.module.css +1 -0
- package/build/primitives/Select/index.js.map +1 -1
- package/build/primitives/Switch/Switch.js +50 -0
- package/build/primitives/Switch/Switch.js.map +1 -0
- package/build/primitives/Switch/Switch.module.css +57 -0
- package/build/primitives/Switch/__tests__/__snapshots__/Switch.test.js.snap +109 -0
- package/build/primitives/Switch/index.js +19 -0
- package/build/primitives/Switch/index.js.map +1 -0
- package/build/primitives/Text/Text.js.map +1 -1
- package/build/primitives/Text/index.js.map +1 -1
- package/build/primitives/View/View.js.map +1 -1
- package/build/primitives/View/index.js.map +1 -1
- package/build/primitives/index.js +39 -0
- package/build/primitives/index.js.map +1 -1
- package/build/theme/default.theme.css +1 -0
- package/build/theme/helpers/camelcase.js.map +1 -1
- package/build/theme/helpers/index.js.map +1 -1
- package/build/theme/index.js.map +1 -1
- package/build/theme/theme.js.map +1 -1
- package/package.json +12 -5
|
@@ -4,6 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
+
var _Checkbox = require("./Checkbox");
|
|
8
|
+
|
|
9
|
+
Object.keys(_Checkbox).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _Checkbox[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _Checkbox[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
7
20
|
var _Icon = require("./Icon");
|
|
8
21
|
|
|
9
22
|
Object.keys(_Icon).forEach(function (key) {
|
|
@@ -43,6 +56,19 @@ Object.keys(_Pressable).forEach(function (key) {
|
|
|
43
56
|
});
|
|
44
57
|
});
|
|
45
58
|
|
|
59
|
+
var _Radio = require("./Radio");
|
|
60
|
+
|
|
61
|
+
Object.keys(_Radio).forEach(function (key) {
|
|
62
|
+
if (key === "default" || key === "__esModule") return;
|
|
63
|
+
if (key in exports && exports[key] === _Radio[key]) return;
|
|
64
|
+
Object.defineProperty(exports, key, {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function get() {
|
|
67
|
+
return _Radio[key];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
46
72
|
var _Select = require("./Select");
|
|
47
73
|
|
|
48
74
|
Object.keys(_Select).forEach(function (key) {
|
|
@@ -82,6 +108,19 @@ Object.keys(_ScrollView).forEach(function (key) {
|
|
|
82
108
|
});
|
|
83
109
|
});
|
|
84
110
|
|
|
111
|
+
var _Switch = require("./Switch");
|
|
112
|
+
|
|
113
|
+
Object.keys(_Switch).forEach(function (key) {
|
|
114
|
+
if (key === "default" || key === "__esModule") return;
|
|
115
|
+
if (key in exports && exports[key] === _Switch[key]) return;
|
|
116
|
+
Object.defineProperty(exports, key, {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function get() {
|
|
119
|
+
return _Switch[key];
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
|
|
85
124
|
var _Text = require("./Text");
|
|
86
125
|
|
|
87
126
|
Object.keys(_Text).forEach(function (key) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/primitives/index.js"],"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/primitives/index.js"],"sourcesContent":["export * from './Checkbox';\nexport * from './Icon';\nexport * from './Input';\nexport * from './Pressable';\nexport * from './Radio';\nexport * from './Select';\nexport * from './View';\nexport * from './ScrollView';\nexport * from './Switch';\nexport * from './Text';\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"camelcase.js","names":["camelcase","value","replace","match","index","toLowerCase","toUpperCase","undefined"],"sources":["../../../src/theme/helpers/camelcase.js"],"sourcesContent":["export const camelcase = (value = '') =>\n typeof value === 'string'\n ? value\n .replace(/-/g, ' ')\n .replace(/(?:^\\w|[A-Z]|\\b\\w|\\s+)/g, (match, index) =>\n +match === 0 ? '' : index === 0 ? match.toLowerCase() : match.toUpperCase(),\n )\n : undefined;\n"],"mappings":";;;;;;;AAAO,IAAMA,SAAS,GAAG,SAAZA,SAAY;EAAA,IAACC,KAAD,uEAAS,EAAT;EAAA,OACvB,OAAOA,KAAP,KAAiB,QAAjB,GACIA,KAAK,CACFC,OADH,CACW,IADX,EACiB,GADjB,EAEGA,OAFH,CAEW,yBAFX,EAEsC,UAACC,KAAD,EAAQC,KAAR;IAAA,OAClC,CAACD,KAAD,KAAW,CAAX,GAAe,EAAf,GAAoBC,KAAK,KAAK,CAAV,GAAcD,KAAK,CAACE,WAAN,EAAd,GAAoCF,KAAK,CAACG,WAAN,EADtB;EAAA,CAFtC,CADJ,GAMIC,SAPmB;AAAA,CAAlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/theme/helpers/index.js"],"sourcesContent":["export * from './camelcase';\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
package/build/theme/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/theme/index.js"],"sourcesContent":["export * from './theme';\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
package/build/theme/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"theme.js","names":["VAR_DOMAIN","Theme","get","domain","style","getComputedStyle","document","querySelector","variables","styleSheets","forEach","stylesheet","cssRules","filter","rule","type","name","includes","replace","getPropertyValue","trim","setVariable","variable","value","setProperty"],"sources":["../../src/theme/theme.js"],"sourcesContent":["const VAR_DOMAIN = '--mirai-ui-';\n\nimport { camelcase } from './helpers';\n\nexport const Theme = {\n get: (domain = VAR_DOMAIN) => {\n const style = getComputedStyle(document.querySelector(':root'));\n\n const variables = {};\n [...document.styleSheets].forEach((stylesheet) => {\n [...stylesheet.cssRules]\n .filter((rule) => rule.type === 1)\n .forEach((rule) => {\n [...rule.style]\n .filter((name) => name.includes(domain))\n .forEach((name) => (variables[camelcase(name.replace(domain, ''))] = style.getPropertyValue(name).trim()));\n });\n });\n\n return variables;\n },\n\n setVariable: (variable, value, domain = VAR_DOMAIN) => {\n const { style } = document.querySelector(':root');\n\n style.setProperty(`${domain}${variable}`, value);\n },\n};\n"],"mappings":";;;;;;;;;;;AAEA;;AAFA,IAAMA,UAAU,GAAG,aAAnB;AAIO,IAAMC,KAAK,GAAG;EACnBC,GAAG,EAAE,eAAyB;IAAA,IAAxBC,MAAwB,uEAAfH,UAAe;IAC5B,IAAMI,KAAK,GAAGC,gBAAgB,CAACC,QAAQ,CAACC,aAAT,CAAuB,OAAvB,CAAD,CAA9B;IAEA,IAAMC,SAAS,GAAG,EAAlB;IACA,iCAAIF,QAAQ,CAACG,WAAb,EAA0BC,OAA1B,CAAkC,UAACC,UAAD,EAAgB;MAChD,iCAAIA,UAAU,CAACC,QAAf,EACGC,MADH,CACU,UAACC,IAAD;QAAA,OAAUA,IAAI,CAACC,IAAL,KAAc,CAAxB;MAAA,CADV,EAEGL,OAFH,CAEW,UAACI,IAAD,EAAU;QACjB,iCAAIA,IAAI,CAACV,KAAT,EACGS,MADH,CACU,UAACG,IAAD;UAAA,OAAUA,IAAI,CAACC,QAAL,CAAcd,MAAd,CAAV;QAAA,CADV,EAEGO,OAFH,CAEW,UAACM,IAAD;UAAA,OAAWR,SAAS,CAAC,wBAAUQ,IAAI,CAACE,OAAL,CAAaf,MAAb,EAAqB,EAArB,CAAV,CAAD,CAAT,GAAiDC,KAAK,CAACe,gBAAN,CAAuBH,IAAvB,EAA6BI,IAA7B,EAA5D;QAAA,CAFX;MAGD,CANH;IAOD,CARD;IAUA,OAAOZ,SAAP;EACD,CAhBkB;EAkBnBa,WAAW,EAAE,qBAACC,QAAD,EAAWC,KAAX,EAA0C;IAAA,IAAxBpB,MAAwB,uEAAfH,UAAe;;IACrD,4BAAkBM,QAAQ,CAACC,aAAT,CAAuB,OAAvB,CAAlB;IAAA,IAAQH,KAAR,yBAAQA,KAAR;;IAEAA,KAAK,CAACoB,WAAN,WAAqBrB,MAArB,SAA8BmB,QAA9B,GAA0CC,KAA1C;EACD;AAtBkB,CAAd"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirai/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"repository": "git@gitlab.com:miraicorp/dev/frontend/ui.git",
|
|
5
5
|
"author": "JΛVI <hello@soyjavi.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,9 +15,13 @@
|
|
|
15
15
|
"build:stats": "source-map-explorer 'build/**/*.js'",
|
|
16
16
|
"start": "parcel public/index.html --port 8080 --host local.mirai.com --open",
|
|
17
17
|
"lint": "eslint --cache --fix --format codeframe --ext .jsx,.js src",
|
|
18
|
-
"test": "
|
|
18
|
+
"test": "node scripts/test.js --watchAll=false",
|
|
19
|
+
"test:watch": "node scripts/test.js",
|
|
20
|
+
"pipeline": "yarn lint && yarn test && yarn build",
|
|
21
|
+
"release": "yarn version --patch && yarn publish --access public"
|
|
19
22
|
},
|
|
20
23
|
"dependencies": {
|
|
24
|
+
"@mirai/locale": "^0.2",
|
|
21
25
|
"react": "^17.0.2",
|
|
22
26
|
"react-dom": "^17.0.2",
|
|
23
27
|
"react-icons": "^4.3.1"
|
|
@@ -26,16 +30,19 @@
|
|
|
26
30
|
"@babel/cli": "^7",
|
|
27
31
|
"@babel/core": "^7.9.0",
|
|
28
32
|
"@mirai/eslint": "^0.1",
|
|
29
|
-
"@mirai/locale": "^0.1",
|
|
30
33
|
"@testing-library/react": "^12.1.4",
|
|
31
34
|
"@testing-library/react-hooks": "^7.0.2",
|
|
32
|
-
"
|
|
35
|
+
"babel-polyfill": "^6.26.0",
|
|
36
|
+
"parcel": "^2.5.0",
|
|
33
37
|
"postcss": "^8.0.0",
|
|
34
38
|
"postcss-modules": "^4.3.0",
|
|
35
39
|
"process": "^0.11.10",
|
|
36
|
-
"react-scripts": "5.0.
|
|
40
|
+
"react-scripts": "5.0.1",
|
|
37
41
|
"source-map-explorer": "^2.5.2"
|
|
38
42
|
},
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=16.15.0"
|
|
45
|
+
},
|
|
39
46
|
"browserslist": {
|
|
40
47
|
"production": [
|
|
41
48
|
">0.2%",
|