Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
cenfun committed Mar 4, 2024
1 parent f470f86 commit 3566fb1
Show file tree
Hide file tree
Showing 28 changed files with 259 additions and 226 deletions.
15 changes: 3 additions & 12 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
module.exports = {
extends: ["stylelint-config-recommended", "stylelint-config-standard"],
overrides: [{
customSyntax: "postcss-scss",
files: ["**/*.scss"]
}, {
customSyntax: "postcss-html",
files: ["**/*.html", "**/*.vue"]
}],
extends: ["stylelint-config-plus"],
rules: {
"at-rule-no-unknown": null,
"font-family-no-missing-generic-family-keyword": null,
"indentation": 4

}
};
};
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
},
"css.validate": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
"source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": "explicit"
},
"editor.formatOnSave": true,
"eslint.format.enable": true,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Rosa UI
- Lightweight UI components based on [React](https://github.com/facebook/react/)
- Dist size (js minified: true): 26.6KB / gzip: 8.1KB
- Dist size (js minified: true): 26.5KB / gzip: 8.1KB

## Preview Online
[https://cenfun.github.io/rosa-ui/](https://cenfun.github.io/rosa-ui/)
Expand Down
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"name": "rosa-ui-components",
"description": "Lightweight UI components based on React",
"version": "1.0.0",
"main": "",
"description": "Lightweight UI components based on React",
"private": true,
"keywords": [
"rosa-ui"
],
"main": "",
"scripts": {
"build": "sf lint && sf b -p",
"patch": "npm run build && sf publish patch",
Expand All @@ -15,22 +12,25 @@
"workspaces": [
"packages/*"
],
"keywords": [
"rosa-ui"
],
"license": "MIT",
"dependencies": {
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"eslint": "^8.21.0",
"eslint-config-plus": "^1.0.3",
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-react": "^7.30.1",
"eslint": "^8.57.0",
"eslint-config-plus": "^1.0.6",
"eslint-plugin-html": "^8.0.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"postcss": "^8.4.16",
"postcss-html": "^1.5.0",
"postcss-scss": "^4.0.4",
"stylelint": "^14.9.1",
"stylelint-config-recommended": "^8.0.0",
"stylelint-config-standard": "^26.0.0"
"postcss": "^8.4.35",
"postcss-html": "^1.6.0",
"postcss-scss": "^4.0.9",
"stylelint": "^16.2.1",
"stylelint-config-plus": "^1.1.0"
}
}
}
1 change: 1 addition & 0 deletions packages/app-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"files": [
"dist"
],
"license": "MIT",
"dependencies": {},
"devDependencies": {}
}
File renamed without changes.
3 changes: 2 additions & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
"files": [
"dist"
],
"license": "MIT",
"dependencies": {
"rosa-ui": ""
"rosa-ui": "~1.0.0"
},
"devDependencies": {}
}
6 changes: 3 additions & 3 deletions packages/app/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

<body>
<!--inject:start-->
<script src="../../../node_modules/prop-types/prop-types.js"></script>
<script src="../../../node_modules/react/umd/react.development.js"></script>
<script src="../../../node_modules/react-dom/umd/react-dom.development.js"></script>
<script src="../../../node_modules/prop-types/prop-types.min.js"></script>
<script src="../../../node_modules/react/umd/react.production.min.js"></script>
<script src="../../../node_modules/react-dom/umd/react-dom.production.min.js"></script>
<script src="../../../node_modules/rosa-ui/dist/rosa-ui.js"></script>
<script src="../dist/rosa-ui-app.js"></script>
<!--inject:end-->
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React, {
import ReactDOM from 'react-dom';
import './app.scss';

//console.log(React, ReactDOM);
// console.log(React, ReactDOM);

console.log('components', RosaUI);

Expand All @@ -29,7 +29,7 @@ const context = require.context('./demo', true, /\.js$/);
const demos = [];
const paths = context.keys();
paths.forEach((path) => {
//console.log(path);
// console.log(path);
const fileName = path.split('/').pop();
const demoName = fileName.split('.').shift();
const N = kebabToPascalCase(demoName);
Expand Down
34 changes: 17 additions & 17 deletions packages/app/src/app.scss
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
html,
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
font-family: Helvetica, Arial, sans-serif;
font-size: 14px;
margin: 0;
padding: 0;
color: #333;
font-size: 14px;
font-family: Helvetica, Arial, sans-serif;
}

.rui-app {
position: relative;
width: 100%;
height: 100%;
position: relative;
}

.rui-header {
padding: 5px 10px;
background: #f5f5f5;
border-bottom: 1px solid #ccc;
box-sizing: border-box;
border-bottom: 1px solid #ccc;
background: #f5f5f5;
}

.rui-title {
height: 30px;
line-height: 30px;
font-size: 16px;
font-weight: bold;
font-size: 16px;
line-height: 30px;
}

.rui-sub {
color: #666;
flex: 1;
height: 30px;
color: #666;
line-height: 30px;
flex: 1;
}

.icon-github {
display: block;
margin-right: 5px;
width: 26px;
height: 26px;
margin-right: 5px;
background-image: url("images/github.svg");
background-repeat: no-repeat;
background-position: center center;
background-size: 26px 26px;
background-image: url("images/github.svg");
opacity: 0.6;
}

Expand All @@ -53,25 +53,25 @@ body {
}

.rui-body {
overflow-y: auto;
padding: 10px;
overflow-y: auto;
}

.rui-item {
border-bottom: 1px dotted #ccc;
padding: 5px;
border-bottom: 1px dotted #ccc;
}

.rui-item-name {
width: 99px;
padding: 5px 5px 5px 0;
overflow: hidden;
color: #000;
overflow: hidden;
}

.rui-item-example {
border-left: 1px solid #ccc;
padding: 5px 5px 5px 10px;
border-left: 1px solid #ccc;
}

.rui-demo-flex-item {
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/demo/flyover.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ const DemeFlyover = () => {
const [closed, setClosed] = useState(true);

const showFlyover = (e) => {
//console.log('showFlyover');
// console.log('showFlyover');
if (closed) {
setClosed(false);
}
setVisible(true);
};

const hideFlyover = (e) => {
//console.log('hideFlyover');
// console.log('hideFlyover');
setVisible(false);
};

Expand Down
9 changes: 4 additions & 5 deletions packages/app/src/demo/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const DemoSelect = () => {

const onSelectSearch = (e) => {

//console.log(e);
// console.log(e);
const value = e.target.value;
if (!value) {
return;
Expand All @@ -48,23 +48,23 @@ const DemoSelect = () => {
ls.length = Math.ceil(12 * Math.random());
const str = ls.join(' Text');
results.push({
//only label
// only label
label: `${i + 1}, ${str}`,
removable: true
});
i++;
}
setSelectResults(results);

//console.log(v);
// console.log(v);
};

const onSelectRemove = (item) => {
console.log('onSelectRemove', item);
const v = item.value;
setSelectResults((results) => {
return results.filter((it) => {
//no value here
// no value here
if (it.label === v) {
return false;
}
Expand Down Expand Up @@ -94,7 +94,6 @@ const DemoSelect = () => {
<option
label="attr removable"
value="attr"
removable
/>
<option>text</option>
<option>One</option>
Expand Down
2 changes: 1 addition & 1 deletion packages/rosa-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Rosa UI
- Lightweight UI components based on [React](https://github.com/facebook/react/)
- Dist size (js minified: true): 26.6KB / gzip: 8.1KB
- Dist size (js minified: true): 26.5KB / gzip: 8.1KB

## Preview Online
[https://cenfun.github.io/rosa-ui/](https://cenfun.github.io/rosa-ui/)
Expand Down
1 change: 1 addition & 0 deletions packages/rosa-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"files": [
"dist"
],
"license": "MIT",
"dependencies": {
"prop-types": "^15.8.1",
"react": "^18.2.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/rosa-ui/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

<body>
<!--inject:start-->
<script src="../../../node_modules/prop-types/prop-types.js"></script>
<script src="../../../node_modules/react/umd/react.development.js"></script>
<script src="../../../node_modules/react-dom/umd/react-dom.development.js"></script>
<script src="../../../node_modules/prop-types/prop-types.min.js"></script>
<script src="../../../node_modules/react/umd/react.production.min.js"></script>
<script src="../../../node_modules/react-dom/umd/react-dom.production.min.js"></script>
<script src="../dist/rosa-ui.js"></script>
<!--inject:end-->
<script>
Expand Down
6 changes: 3 additions & 3 deletions packages/rosa-ui/src/base/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ let _uid = 1;

export const useBase = function(name) {

//unique id
// unique id
const [uid] = useState(`${_uid++}`);
//component id, instance id, rui-name-uid
// component id, instance id, rui-name-uid
const [cid] = useState(`${pascalToKebabCase(name)}-${uid}`);

//console.log(cid, name);
// console.log(cid, name);

return {
uid,
Expand Down
2 changes: 1 addition & 1 deletion packages/rosa-ui/src/base/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
}

.rui {
font-family: Helvetica, Arial, sans-serif;
font-size: 14px;
font-family: Helvetica, Arial, sans-serif;

button,
input,
Expand Down
Loading

0 comments on commit 3566fb1

Please sign in to comment.