@dataloop-ai/components 0.16.5 → 0.16.6
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/.eslintrc.js +2 -2
- package/CONTRIBUTING.md +53 -0
- package/SECURITY.md +15 -0
- package/package.json +3 -2
- package/src/components/basic/DlChip/DlChip.vue +5 -2
- package/src/demo/DlChipDemo.vue +10 -0
package/.eslintrc.js
CHANGED
|
@@ -95,7 +95,7 @@ module.exports = {
|
|
|
95
95
|
hoist: 'all'
|
|
96
96
|
}
|
|
97
97
|
],
|
|
98
|
-
'@typescript-eslint/no-unused-expressions': '
|
|
98
|
+
'@typescript-eslint/no-unused-expressions': 'off',
|
|
99
99
|
'@typescript-eslint/no-unused-vars': 'off',
|
|
100
100
|
'@typescript-eslint/no-use-before-define': 'off',
|
|
101
101
|
'@typescript-eslint/no-var-requires': 'off',
|
|
@@ -120,7 +120,7 @@ module.exports = {
|
|
|
120
120
|
'no-trailing-spaces': 'warn',
|
|
121
121
|
'no-undef-init': 'warn',
|
|
122
122
|
'no-unsafe-finally': 'off',
|
|
123
|
-
'no-unused-expressions': '
|
|
123
|
+
'no-unused-expressions': 'off',
|
|
124
124
|
'no-unused-labels': 'error',
|
|
125
125
|
'no-use-before-define': 'off',
|
|
126
126
|
'no-var': 'warn',
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Contributing Guidelines
|
|
2
|
+
Thank you for your interest in contributing to our project! We welcome contributions from everyone. Please take a moment to review these guidelines before submitting a pull request or issue.
|
|
3
|
+
|
|
4
|
+
## Code of Conduct
|
|
5
|
+
Our project has a [Code of Conduct](./CODE_OF_CONDUCT.md) that we expect all contributors to follow. Please read it before making any contribution.
|
|
6
|
+
|
|
7
|
+
## Issues
|
|
8
|
+
If you find any issues or bugs, please search the existing issues to see if the issue has already been reported. If it hasn't, please create a new issue with a clear and concise title and description. Be sure to include any relevant information, such as error messages or steps to reproduce the issue.
|
|
9
|
+
|
|
10
|
+
The repository provides base templates for create a bug/feature request type of issues. please fill the relevant information there.
|
|
11
|
+
|
|
12
|
+
If the issue is related to a specific component then please have in the title of the issue the name of the component and then a short description of the issue. Example: ``` DlButton > 'description of issue' ```
|
|
13
|
+
|
|
14
|
+
## Pull Requests
|
|
15
|
+
We welcome contributions in the form of pull requests. Before submitting a pull request, please make sure that your code:
|
|
16
|
+
|
|
17
|
+
- Is well-tested
|
|
18
|
+
- Conforms to our coding style guidelines (see below)
|
|
19
|
+
- Includes any necessary documentation
|
|
20
|
+
|
|
21
|
+
### Naming Convention
|
|
22
|
+
Each pull request should reflect the issue it is trying to close or have a short descriptive title.
|
|
23
|
+
|
|
24
|
+
If the pull request is working on a specific component please start the pull request title with the components name. Example: ``` DlButton > 'description of issue' ```
|
|
25
|
+
|
|
26
|
+
If a component / module or type that is being developed or introduced will not be exported it should not have the ```Dl``` prefix.
|
|
27
|
+
If it is being exported it is required for it to have the ```Dl``` prefix.
|
|
28
|
+
|
|
29
|
+
### Coding Style Guidelines
|
|
30
|
+
Please follow these coding style guidelines when submitting a pull request:
|
|
31
|
+
- Use consistent indentation
|
|
32
|
+
- Use descriptive variable names
|
|
33
|
+
- Use comments to explain non-obvious code behavior
|
|
34
|
+
- Follow the provided linter configuration
|
|
35
|
+
- Please note that any build that does not pass the linter will fail. as part of our CI/CD
|
|
36
|
+
- When developing a component it should be assigned to the correct scope and have its own aligned code structure
|
|
37
|
+
- if the component has inner components they should be in the components directory under ```/components```
|
|
38
|
+
- every component should export index.ts and types.ts
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
Steps to submit a pull request:
|
|
42
|
+
1. Fork the repository
|
|
43
|
+
2. Clone the forked repository to your local machine
|
|
44
|
+
3. Create a new branch for your changes
|
|
45
|
+
4. Make your changes and commit them
|
|
46
|
+
5. Push the changes to your forked repository
|
|
47
|
+
6. Submit a pull request to the original repository
|
|
48
|
+
7. Please make sure that your pull request clearly explains the problem you are trying to solve, the solution you have implemented, and any potential side effects of your changes.
|
|
49
|
+
|
|
50
|
+
## License
|
|
51
|
+
By contributing to our project, you agree that your contributions will be licensed under the [project's license](./LICENSE.md).
|
|
52
|
+
|
|
53
|
+
Thank you for your contributions!
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
We release patches for security vulnerabilities. Every new version of our project contains the latest security fixes and we will always push versions with the latest security fixes.
|
|
6
|
+
|
|
7
|
+
## Reporting a Vulnerability
|
|
8
|
+
|
|
9
|
+
If you discover a security vulnerability within our project, please open an issue with the `security` tag. All security vulnerabilities will be promptly addressed.
|
|
10
|
+
|
|
11
|
+
## Security Fixes and Resolutions
|
|
12
|
+
|
|
13
|
+
We take the security of our project seriously and strive to ensure that every version released includes the latest security fixes and resolutions. We regularly monitor and update our dependencies to ensure that they are up-to-date and secure.
|
|
14
|
+
|
|
15
|
+
If you have any questions or concerns about the security of our project, please do not hesitate to contact us.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dataloop-ai/components",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.6",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": "./index.ts",
|
|
6
6
|
"./models": "./models.ts",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"lint:fix": "eslint ./src --ext .ts,.vue --fix",
|
|
18
18
|
"format": "prettier --write ./src",
|
|
19
19
|
"lint-staged": "lint-staged",
|
|
20
|
-
"test": "vitest
|
|
20
|
+
"test": "vitest",
|
|
21
|
+
"test:coverage": "vitest run --coverage",
|
|
21
22
|
"check-only": "if grep -E -H -r --exclude-dir=.git --exclude-dir=node_modules --exclude=*.json --exclude=*.yml '^(describe|it).only' .; then echo 'Found only in test files' && exit 1; fi"
|
|
22
23
|
},
|
|
23
24
|
"dependencies": {
|
|
@@ -100,7 +100,8 @@ export default defineComponent({
|
|
|
100
100
|
validator: (value: string): boolean =>
|
|
101
101
|
transformOptions.includes(value)
|
|
102
102
|
},
|
|
103
|
-
overflow: { type: Boolean, default: false }
|
|
103
|
+
overflow: { type: Boolean, default: false },
|
|
104
|
+
fit: { type: Boolean, default: false }
|
|
104
105
|
},
|
|
105
106
|
emits: ['remove'],
|
|
106
107
|
setup() {
|
|
@@ -142,7 +143,9 @@ export default defineComponent({
|
|
|
142
143
|
},
|
|
143
144
|
cssChipVars(): Record<string, string | number> {
|
|
144
145
|
return {
|
|
145
|
-
'--dl-chip-max-width':
|
|
146
|
+
'--dl-chip-max-width': this.fit
|
|
147
|
+
? 'fit-content'
|
|
148
|
+
: setMaxWidth(this.maxWidth),
|
|
146
149
|
'--dl-chip-remove-icon-width': setRemoveIconWidth({
|
|
147
150
|
hasLabel: this.hasLabel,
|
|
148
151
|
removable: this.removable,
|
package/src/demo/DlChipDemo.vue
CHANGED
|
@@ -165,6 +165,16 @@
|
|
|
165
165
|
overflow
|
|
166
166
|
/>
|
|
167
167
|
</div>
|
|
168
|
+
<h4>Chips with Fit</h4>
|
|
169
|
+
<div
|
|
170
|
+
class="col"
|
|
171
|
+
style="margin-bottom: 30px"
|
|
172
|
+
>
|
|
173
|
+
<DlChip
|
|
174
|
+
label="Long Chip Label With Alot Of Text"
|
|
175
|
+
fit
|
|
176
|
+
/>
|
|
177
|
+
</div>
|
|
168
178
|
</div>
|
|
169
179
|
</template>
|
|
170
180
|
|