diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml
index 0b41db2..65519a2 100644
--- a/.github/workflows/sonarcloud.yml
+++ b/.github/workflows/sonarcloud.yml
@@ -13,13 +13,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- - name: Analyze with SonarCloud
+ - name: Checkout code
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Set up JDK 17
+ uses: actions/setup-java@v3
+ with:
+ distribution: 'zulu'
+ java-version: '17'
- uses: SonarSource/sonarcloud-github-action@de2e56b42aa84d0b1c5b622644ac17e505c9a049
+ - name: Cache SonarCloud packages
+ uses: actions/cache@v3
+ with:
+ path: ~/.sonar/cache
+ key: ${{ runner.os }}-sonar
+ restore-keys: ${{ runner.os }}-sonar
+
+ - name: Analyze with SonarCloud
+ uses: SonarSource/sonarcloud-github-action@master
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information
- SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret)
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
- args:
+ args: >
-Dsonar.projectKey=dd3tech_dd360-components-docs
- -Dsonar.organization=dd3tech-1
+ -Dsonar.organization=dd3tech-1 -Dsonar.sourceEncoding=UTF-8
+ -Dsonar.sources=.
diff --git a/docs/components/badge.mdx b/docs/components/badge.mdx
index f755eb9..8cf79f5 100644
--- a/docs/components/badge.mdx
+++ b/docs/components/badge.mdx
@@ -9,9 +9,9 @@ components: Badge
-#
+#
-The Badge component in React provides a convenient way to display a small piece of information, such as a status, in a visually appealing and attention-grabbing manner.
+The Badge component is used to display small numeric values or status indicators. It’s ideal for showing counts or notifications, typically in a rounded visual container.
@@ -21,105 +21,56 @@ The Badge component in React provides a convenient way to display a small piece
##### Usage
-To use the Badge component, you could start by adding the properties text, classNameIcon and className.
-
-Use the Badge component as shown below:
+To use the Badge component, provide a `value` (number) and optionally a `variant` to indicate the type of status.
-
+
The code snippet below shows how to use the Badge component:
-`}/>
+
+`}
+/>
-##### Variant
+ ##### Variants
-With the prop variant you can customize the appearance of the Badge component. Available options are: warning, infoPrimary, infoSecondary, success, primary, secondary, and error. Default uses: "infoPrimary".
+The `variant` prop allows you to customize the appearance of the Badge. Available options are: `default`, `success`, `warning`, and `error`. The default value is `"default"`.
-
-
-
-
-
-
-
-
+
+
+
+
+
-The code snippet below shows how to set a Badge component variant:
-
-
-
-
-
-
-
-`}/>
-
-
+ codeString={`import { Badge } from 'dd360-ds'
-##### Icon
-
-With the prop icon you can customize the icon of the Badge component. Available options are: tag, clock, warning, check, success, exclamation, clipboard-copy, HomeIcon, RefreshIcon, and none. Default uses: "HomeIcon".
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-The code snippet below shows how to set a Badge component icon:
-
-
-
-
-
-
-
-
-
-
-
-`}/>
+
+
+
+
+`}
+/>
-
+
##### API Reference
-Note: This documentation assumes that the audience has basic knowledge of React
-and how to use components in React applications.
+Note: This documentation assumes that the audience has basic knowledge of React and how to use components in React applications.
-
\ No newline at end of file
+
diff --git a/docs/components/chip.mdx b/docs/components/chip.mdx
new file mode 100644
index 0000000..4de72ba
--- /dev/null
+++ b/docs/components/chip.mdx
@@ -0,0 +1,125 @@
+---
+product: dd360-ds
+title: React Chip component
+components: Chip
+---
+
+
+
+
+
+
+#
+
+The Chip component in React provides a convenient way to display a small piece of information, such as a status, in a visually appealing and attention-grabbing manner.
+
+
+
+##### Imports
+
+
+
+##### Usage
+
+To use the Chip component, you could start by adding the properties text, classNameIcon and className.
+
+Use the Chip component as shown below:
+
+
+
+
+
+The code snippet below shows how to use the Chip component:
+
+
+`}/>
+
+
+
+##### Variant
+
+With the prop variant you can customize the appearance of the Chip component. Available options are: warning, infoPrimary, infoSecondary, success, primary, secondary, and error. Default uses: "infoPrimary".
+
+
+
+
+
+
+
+
+
+
+
+The code snippet below shows how to set a Chip component variant:
+
+
+
+
+
+
+
+
+`}/>
+
+
+
+##### Icon
+
+With the prop icon you can customize the icon of the Chip component. Available options are: tag, clock, warning, check, success, exclamation, clipboard-copy, HomeIcon, RefreshIcon, and none. Default uses: "HomeIcon".
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+The code snippet below shows how to set a Chip component icon:
+
+
+
+
+
+
+
+
+
+
+
+`}/>
+
+
+
+
+##### API Reference
+
+
+
+Note: This documentation assumes that the audience has basic knowledge of React
+and how to use components in React applications.
+
+
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 80b105f..6588291 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -11,7 +11,7 @@
"@algolia/autocomplete-core": "^1.8.3",
"@docsearch/react": "^3.5.1",
"@vercel/analytics": "^1.0.1",
- "dd360-ds": "6.39.1",
+ "dd360-ds": "6.39.5",
"dd360-utils": "18.1.0",
"gray-matter": "^4.0.3",
"i18next": "^22.4.9",
@@ -1526,9 +1526,9 @@
"dev": true
},
"node_modules/dd360-ds": {
- "version": "6.39.1",
- "resolved": "https://registry.npmjs.org/dd360-ds/-/dd360-ds-6.39.1.tgz",
- "integrity": "sha512-vKKwo3f4x5i+bLrHjFX+ZXWNrska7jdPTFbdi3WDpoOJ39GsjXl7ncG7OGZwcWDuLqubaSDcSNcqrcE3nKKcUQ==",
+ "version": "6.39.5",
+ "resolved": "https://registry.npmjs.org/dd360-ds/-/dd360-ds-6.39.5.tgz",
+ "integrity": "sha512-KNzXDDv2+ICgYz7WguUW+05mocVmg0JWCKKWg4A+b0GxFfyNGjYHf82gn5og1V43r6cWfMZCE5hPuEEjgxSFYA==",
"license": "MIT",
"dependencies": {
"@heroicons/react": "^1.0.6",
@@ -8009,9 +8009,9 @@
"dev": true
},
"dd360-ds": {
- "version": "6.39.1",
- "resolved": "https://registry.npmjs.org/dd360-ds/-/dd360-ds-6.39.1.tgz",
- "integrity": "sha512-vKKwo3f4x5i+bLrHjFX+ZXWNrska7jdPTFbdi3WDpoOJ39GsjXl7ncG7OGZwcWDuLqubaSDcSNcqrcE3nKKcUQ==",
+ "version": "6.39.5",
+ "resolved": "https://registry.npmjs.org/dd360-ds/-/dd360-ds-6.39.5.tgz",
+ "integrity": "sha512-KNzXDDv2+ICgYz7WguUW+05mocVmg0JWCKKWg4A+b0GxFfyNGjYHf82gn5og1V43r6cWfMZCE5hPuEEjgxSFYA==",
"requires": {
"@heroicons/react": "^1.0.6",
"@popperjs/core": "2.11.8",
diff --git a/package.json b/package.json
index 61718bc..5736042 100644
--- a/package.json
+++ b/package.json
@@ -19,7 +19,7 @@
"@algolia/autocomplete-core": "^1.8.3",
"@docsearch/react": "^3.5.1",
"@vercel/analytics": "^1.0.1",
- "dd360-ds": "6.39.1",
+ "dd360-ds": "6.39.5",
"dd360-utils": "18.1.0",
"gray-matter": "^4.0.3",
"i18next": "^22.4.9",
diff --git a/src/components/Layout/SideBarDocs.tsx b/src/components/Layout/SideBarDocs.tsx
index 843890f..4cc5f68 100644
--- a/src/components/Layout/SideBarDocs.tsx
+++ b/src/components/Layout/SideBarDocs.tsx
@@ -315,6 +315,10 @@ export const components: ComponentObjectProps = {
label: 'Circle',
pathname: 'circle'
},
+ {
+ label: 'Chip',
+ pathname: 'chip'
+ },
{
label: 'Confirm Dialog',
pathname: 'confirm-dialog'