diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml
index 393b14f..908aa3c 100644
--- a/.github/workflows/format.yml
+++ b/.github/workflows/format.yml
@@ -1,28 +1,28 @@
name: Format
on:
- push:
- branches:
- - main
- pull_request:
- branches: ['main']
+ push:
+ branches:
+ - main
+ pull_request:
+ branches: ['main']
jobs:
- format:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-node@v2
- with:
- node-version: '16'
- cache: npm
- - run: npm install
+ format:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-node@v3
+ with:
+ node-version: '16'
+ cache: npm
+ - run: npm install
- - name: Formatting code
- run: npm run format
+ - name: Formatting code
+ run: npm run format
- - name: Commit changes
- uses: stefanzweifel/git-auto-commit-action@v4
- with:
- commit_message: '[ci]: format code'
- branch: ${{ github.head_ref }}
+ - name: Commit changes
+ uses: stefanzweifel/git-auto-commit-action@v4
+ with:
+ commit_message: '[ci]: format code'
+ branch: ${{ github.head_ref }}
diff --git a/docs/buttons/filter-bar-button.mdx b/docs/buttons/filter-bar-button.mdx
new file mode 100644
index 0000000..b1224e7
--- /dev/null
+++ b/docs/buttons/filter-bar-button.mdx
@@ -0,0 +1,281 @@
+---
+product: dd360-ds
+title: React FilterBarButton component
+components: FilterBarButton
+---
+import { DynamicHeroIcon } from 'dd360-ds'
+
+
+
+
+
+
+
+#
+
+The FilterBarButton component allows you to create interactive filter buttons with a customizable popover, ideal for implementing filters and actions in web applications.
+
+
+
+##### Imports
+
+The first alternative is recommended as it can reduce the application bundle
+
+
+
+
+##### Usage
+
+The FilterBarButton component requires at least the `label` and `valueBadge` properties. The popover will be displayed when clicking the button.
+
+
+
+
+
+The following code snippet shows how to use the FilterBarButton component:
+
+
+`}/>
+
+
+
+##### IconLeft
+
+The prop allows you to add an icon to the left side of the filter button.
+
+
+ }
+ />
+
+
+The following code snippet shows how to use the FilterBarButton component:
+
+}
+/>
+`}/>
+
+
+
+##### IconRight
+
+The prop allows you to add an icon to the right side of the filter button.
+
+
+ }
+ />
+
+
+The following code snippet shows how to use the FilterBarButton component:
+
+}
+/>
+`}/>
+
+
+
+##### TitlePopover
+
+The prop allows you to customize the title displayed in the filter button's popover.
+
+
+
+
+
+The following code snippet shows how to use the FilterBarButton component:
+
+
+`}/>
+
+
+
+##### ChildrenPopover
+
+The prop allows you to add custom content inside the filter button's popover.
+
+
+ Children Popover}
+ />
+
+
+The following code snippet shows how to use the FilterBarButton component:
+
+Children Popover}
+/>
+`}/>
+
+
+
+##### ClassNamePopover
+
+The prop allows you to apply custom CSS classes to the filter button's popover.
+
+
+ Children Popover}
+ />
+
+
+The following code snippet shows how to use the FilterBarButton component:
+
+Children Popover}
+/>
+`}/>
+
+
+
+##### SecondaryButton
+
+The prop allows you to configure a secondary button in the popover with its label and click handler.
+
+
+ {alert('Cancel')}}}
+ />
+
+
+The following code snippet shows how to use the FilterBarButton component:
+
+{alert('Cancel')}}}
+/>
+`}/>
+
+
+
+##### PrimaryButton
+
+The prop allows you to configure a primary button in the popover with its label and click handler.
+
+
+ {alert('Submit')}}}
+ />
+
+
+The following code snippet shows how to use the FilterBarButton component:
+
+{alert('Submit')}}}
+/>
+`}/>
+
+
+
+##### PrincipalButton
+
+The prop allows you to configure the behavior of the main button that triggers the popover.
+
+
+ {alert('Active Popover')}}}
+ />
+
+
+The following code snippet shows how to use the FilterBarButton component:
+
+{alert('Active Popover')}}}
+/>
+`}/>
+
+
+
+
+##### API Reference
+
+
+
+Note: This documentation assumes that the user 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 7ac48c6..4f579a0 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.35.1",
+ "dd360-ds": "6.38.0",
"dd360-utils": "18.1.0",
"gray-matter": "^4.0.3",
"i18next": "^22.4.9",
@@ -616,9 +616,10 @@
}
},
"node_modules/@popperjs/core": {
- "version": "2.11.7",
- "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.7.tgz",
- "integrity": "sha512-Cr4OjIkipTtcXKjAsm8agyleBuDHvxzeBoa1v543lbv1YaIwQjESsVcmjiWiPEbC1FIeHOG/Op9kdCmAmiS3Kw==",
+ "version": "2.11.8",
+ "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
+ "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==",
+ "license": "MIT",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/popperjs"
@@ -1525,19 +1526,19 @@
"dev": true
},
"node_modules/dd360-ds": {
- "version": "6.35.1",
- "resolved": "https://registry.npmjs.org/dd360-ds/-/dd360-ds-6.35.1.tgz",
- "integrity": "sha512-tzo2gk3fLI1D44uCv3FM8KbBCGbLutdJWpKETxROPwD53EGzPJJVvAvk+ah/zpLi8fo/P9l1oI8LoqY102c4OQ==",
+ "version": "6.38.0",
+ "resolved": "https://registry.npmjs.org/dd360-ds/-/dd360-ds-6.38.0.tgz",
+ "integrity": "sha512-iFnUotZAaHR+zbKwXTrpL1Gt2rmOTD4yw8OB0Rej3PZ/O5BQlAMRVU5AS/ISur5bilR2XtFxPbv0wMcc//AcVQ==",
"license": "MIT",
"dependencies": {
- "@heroicons/react": "^1.0.5",
- "@popperjs/core": "2.11.7",
- "dd360-utils": "^1.0.12",
- "react-circular-progressbar": "^2.1.0",
- "react-currency-input-field": "^3.6.11"
+ "@heroicons/react": "^1.0.6",
+ "@popperjs/core": "2.11.8",
+ "dd360-utils": "^1.0.18",
+ "react-circular-progressbar": "^2.2.0",
+ "react-currency-input-field": "^3.10.0"
},
"engines": {
- "node": ">=16",
+ "node": ">=20",
"npm": ">=7"
},
"peerDependencies": {
@@ -5560,19 +5561,21 @@
}
},
"node_modules/react-circular-progressbar": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/react-circular-progressbar/-/react-circular-progressbar-2.1.0.tgz",
- "integrity": "sha512-xp4THTrod4aLpGy68FX/k1Q3nzrfHUjUe5v6FsdwXBl3YVMwgeXYQKDrku7n/D6qsJA9CuunarAboC2xCiKs1g==",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/react-circular-progressbar/-/react-circular-progressbar-2.2.0.tgz",
+ "integrity": "sha512-cgyqEHOzB0nWMZjKfWN3MfSa1LV3OatcDjPz68lchXQUEiBD5O1WsAtoVK4/DSL0B4USR//cTdok4zCBkq8X5g==",
+ "license": "MIT",
"peerDependencies": {
- "react": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0"
+ "react": ">=0.14.0"
}
},
"node_modules/react-currency-input-field": {
- "version": "3.6.14",
- "resolved": "https://registry.npmjs.org/react-currency-input-field/-/react-currency-input-field-3.6.14.tgz",
- "integrity": "sha512-pUM4oK1KkUjjcFH7t6GksbuYwGpNhX3We2l41V9PIyJjm1HVlJGbKNksr0PNXGsQZqXDIKBJxL3TAbTS4cbKgg==",
+ "version": "3.10.0",
+ "resolved": "https://registry.npmjs.org/react-currency-input-field/-/react-currency-input-field-3.10.0.tgz",
+ "integrity": "sha512-GRmZogHh1e1LrmgXg/fKHSuRLYUnj/c/AumfvfuDMA0UX1mDR6u2NR0fzDemRdq4tNHNLucJeJ2OKCr3ehqyDA==",
+ "license": "MIT",
"peerDependencies": {
- "react": "^16.9.0 || ^17.0.0 || ^18.0.0"
+ "react": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
}
},
"node_modules/react-dom": {
@@ -7354,9 +7357,9 @@
}
},
"@popperjs/core": {
- "version": "2.11.7",
- "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.7.tgz",
- "integrity": "sha512-Cr4OjIkipTtcXKjAsm8agyleBuDHvxzeBoa1v543lbv1YaIwQjESsVcmjiWiPEbC1FIeHOG/Op9kdCmAmiS3Kw=="
+ "version": "2.11.8",
+ "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
+ "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A=="
},
"@rushstack/eslint-patch": {
"version": "1.2.0",
@@ -8006,15 +8009,15 @@
"dev": true
},
"dd360-ds": {
- "version": "6.35.1",
- "resolved": "https://registry.npmjs.org/dd360-ds/-/dd360-ds-6.35.1.tgz",
- "integrity": "sha512-tzo2gk3fLI1D44uCv3FM8KbBCGbLutdJWpKETxROPwD53EGzPJJVvAvk+ah/zpLi8fo/P9l1oI8LoqY102c4OQ==",
+ "version": "6.38.0",
+ "resolved": "https://registry.npmjs.org/dd360-ds/-/dd360-ds-6.38.0.tgz",
+ "integrity": "sha512-iFnUotZAaHR+zbKwXTrpL1Gt2rmOTD4yw8OB0Rej3PZ/O5BQlAMRVU5AS/ISur5bilR2XtFxPbv0wMcc//AcVQ==",
"requires": {
- "@heroicons/react": "^1.0.5",
- "@popperjs/core": "2.11.7",
- "dd360-utils": "^1.0.12",
- "react-circular-progressbar": "^2.1.0",
- "react-currency-input-field": "^3.6.11"
+ "@heroicons/react": "^1.0.6",
+ "@popperjs/core": "2.11.8",
+ "dd360-utils": "^1.0.18",
+ "react-circular-progressbar": "^2.2.0",
+ "react-currency-input-field": "^3.10.0"
},
"dependencies": {
"dd360-utils": {
@@ -10718,15 +10721,15 @@
}
},
"react-circular-progressbar": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/react-circular-progressbar/-/react-circular-progressbar-2.1.0.tgz",
- "integrity": "sha512-xp4THTrod4aLpGy68FX/k1Q3nzrfHUjUe5v6FsdwXBl3YVMwgeXYQKDrku7n/D6qsJA9CuunarAboC2xCiKs1g==",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/react-circular-progressbar/-/react-circular-progressbar-2.2.0.tgz",
+ "integrity": "sha512-cgyqEHOzB0nWMZjKfWN3MfSa1LV3OatcDjPz68lchXQUEiBD5O1WsAtoVK4/DSL0B4USR//cTdok4zCBkq8X5g==",
"requires": {}
},
"react-currency-input-field": {
- "version": "3.6.14",
- "resolved": "https://registry.npmjs.org/react-currency-input-field/-/react-currency-input-field-3.6.14.tgz",
- "integrity": "sha512-pUM4oK1KkUjjcFH7t6GksbuYwGpNhX3We2l41V9PIyJjm1HVlJGbKNksr0PNXGsQZqXDIKBJxL3TAbTS4cbKgg==",
+ "version": "3.10.0",
+ "resolved": "https://registry.npmjs.org/react-currency-input-field/-/react-currency-input-field-3.10.0.tgz",
+ "integrity": "sha512-GRmZogHh1e1LrmgXg/fKHSuRLYUnj/c/AumfvfuDMA0UX1mDR6u2NR0fzDemRdq4tNHNLucJeJ2OKCr3ehqyDA==",
"requires": {}
},
"react-dom": {
diff --git a/package.json b/package.json
index 99354d9..9f5a292 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.35.1",
+ "dd360-ds": "6.38.0",
"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 8e97637..6e4447f 100644
--- a/src/components/Layout/SideBarDocs.tsx
+++ b/src/components/Layout/SideBarDocs.tsx
@@ -94,6 +94,10 @@ export const components: ComponentObjectProps = {
{
label: 'Radio Group',
pathname: 'button-radio-group'
+ },
+ {
+ label: 'Filter Bar Button',
+ pathname: 'filter-bar-button'
}
]
},