groovinads-ui 1.2.40 → 1.2.42
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 +12 -10
- package/dist/index.es.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/src/components/Dropdowns/DropdownFilter.jsx +90 -59
- package/src/components/Navigation/Dropdowns/DeckDropdown.jsx +0 -47
- package/src/components/Navigation/Dropdowns/UserDropdown.jsx +9 -3
- package/src/services/components.services.js +2 -0
- package/src/services/helpers.js +2 -0
- package/src/services/url.path.js +2 -0
package/README.md
CHANGED
|
@@ -136,7 +136,7 @@ const DropdownComponentExample = () => {
|
|
|
136
136
|
show={show}
|
|
137
137
|
setShow={setShow}
|
|
138
138
|
onToggle={handleToggle}
|
|
139
|
-
align=
|
|
139
|
+
align='start'
|
|
140
140
|
fullWidth={true}
|
|
141
141
|
>
|
|
142
142
|
<Button
|
|
@@ -163,7 +163,7 @@ export default DropdownComponentExample;
|
|
|
163
163
|
|
|
164
164
|
| Property | Type | Required | Options | Default | Description |
|
|
165
165
|
| ----------- | ------------------ | -------- | --------------------------------- | ------- | -------------------------------------------------------------------------------------------------- |
|
|
166
|
-
| `
|
|
166
|
+
| `align` | String | No | `start` `end` | `start` | Determines the alignment of the dropdown menu relative to the toggle. If `start`, the dropdown menu will align with the start of the toggle. If `end`, the dropdown menu will align with the end of the toggle. |
|
|
167
167
|
| `autoClose` | `Boolean` `String` | No | `true` `false` `outside` `inside` | false | Determines when the dropdown should auto-close. If `true` or `inside`, it closes on inside click. If `outside`, it closes on the outside click. |
|
|
168
168
|
| `children` | Node | Yes | n/a | n/a | Child components to be rendered inside the dropdown. |
|
|
169
169
|
| `className` | String | No | n/a | string | Adds a custom CSS class to the component.names. |
|
|
@@ -219,14 +219,14 @@ export default ExampleUsage;
|
|
|
219
219
|
| ----------------- | -------- | -------- | --------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|
220
220
|
| `className` | String | No | n/a | n/a | Adds a custom CSS class to the component. |
|
|
221
221
|
| `dateFrom` | String | No | n/a | `null` | Start date. |
|
|
222
|
-
| `dateTo` | String | No | n/a | `null` |
|
|
223
|
-
| `inputLabel` | String | No | n/a | `period`|
|
|
224
|
-
| `
|
|
225
|
-
| `onToggle` | Function | No | n/a | n/a |
|
|
222
|
+
| `dateTo` | String | No | n/a | `null` | End date. |
|
|
223
|
+
| `inputLabel` | String | No | n/a | `period`| Label to display on the dropdown toggle button. |
|
|
224
|
+
| `locked` | Boolean | No | `true` `false` | `false` | Determines if the dropdown is locked. If true, it is not interactive. If false, it is interactive. |
|
|
225
|
+
| `onToggle` | Function | No | n/a | n/a | Function that is called when the dropdown is toggled. |
|
|
226
226
|
| `onRemoveFilter` | Function | No | n/a | n/a | Remove the filter when the remove filter button is clicked. |
|
|
227
227
|
| `overflow` | Boolean | No | `true` `false` | `false` | Adjusts the dropdown's position to handle overflow situations. |
|
|
228
228
|
| `setDateFrom` | Function | No | n/a | n/a | Allows updating the start date of the date range. Function to update the start date of the range to be selected. |
|
|
229
|
-
| `setDateTo` | Function | No | n/a | n/a |
|
|
229
|
+
| `setDateTo` | Function | No | n/a | n/a | Allows you to update the end date of the selection range. |
|
|
230
230
|
| `setShow` | Function | No | n/a | n/a | Function to update the visibility state of the dropdown. |
|
|
231
231
|
| `show` | Boolean | No | `true` `false` | `false` | Controls the visibility of the dropdown. If true, the dropdown is displayed; if false, it is hidden. |
|
|
232
232
|
| `variant` | String | No | `input` `filter`| `input` | Determines the type of dropdown. If 'input', it will be displayed as a button. If 'filter', it will be displayed as a filter dropdown. |
|
|
@@ -256,7 +256,7 @@ import { DropdownFilter } from 'groovinads-ui';
|
|
|
256
256
|
| ------------------- | -------- | -------- | ------------------- | ------- | ------------------------------------------------------- |
|
|
257
257
|
| `className` | String | No | n/a | n/a | Additional CSS class names. |
|
|
258
258
|
| `locked` | Boolean | No | `true` `false` | `false` | If true, the filter cannot be removed. |
|
|
259
|
-
| `menuType` | String | No | `simple` `
|
|
259
|
+
| `menuType` | String | No | `simple` `selection`| `simple`| Type of dropdown menu. |
|
|
260
260
|
| `onRemoveFilter` | Function | No | n/a | n/a | Function to handle filter removal. |
|
|
261
261
|
| `onToggle` | Funtion | No | n/a | n/a | Function to handle toggle state changes. |
|
|
262
262
|
| `overflow` | Boolean | No | `true` `false` | `false` | Whether to enable overflow strategy for the dropdown. |
|
|
@@ -606,7 +606,7 @@ const PillComponentExample = () => {
|
|
|
606
606
|
<div>
|
|
607
607
|
<PillComponent
|
|
608
608
|
className='mt-3'
|
|
609
|
-
color=
|
|
609
|
+
color='blue'
|
|
610
610
|
>
|
|
611
611
|
Blue normal Pill
|
|
612
612
|
</PillComponent>
|
|
@@ -762,7 +762,8 @@ const SidebarComponent = () => {
|
|
|
762
762
|
]}
|
|
763
763
|
defaultOpened={false}
|
|
764
764
|
show={show}
|
|
765
|
-
|
|
765
|
+
setShow={setShow}
|
|
766
|
+
onNavigate={handleNavigation}
|
|
766
767
|
/>
|
|
767
768
|
</div>
|
|
768
769
|
);
|
|
@@ -777,6 +778,7 @@ export default SidebarComponent;
|
|
|
777
778
|
| `customLinks` | Array | Yes | n/a | n/a | Creates the sections of the component based on the array of objects it receives. `title` names each section, and `links` is a section link item, that can optionally, contain an array of children for nested links. To use external data obtained from the `api` property, the object must contain the property `backData={true}`. |
|
|
778
779
|
| `defaultOpened` | Boolean | No | `true` `false` | `false` | Determines whether the sidebar is initially opened or closed. |
|
|
779
780
|
| `onNavigate` | Function | Yes | n/a | n/a | Allows handling navigation to the url of the link when an item in the sidebar is clicked. You should provide a function to define how the navigation should be handled (handleNavigation). In our environment, use React Router DOM for navigation. |
|
|
781
|
+
| `setShow` | Function | No | n/a | n/a | Function to toggle the visibility state between visible and hidden. |
|
|
780
782
|
| `show` | Boolean | No | `true` `false` | `false` | Controls the visibility of the sidebar from an external state. If true, the sidebar is displayed; if false, it is hidden. |
|
|
781
783
|
|
|
782
784
|
### Stepper
|