groovinads-ui 1.2.20 → 1.2.22
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/.yarn/install-state.gz +0 -0
- package/README.md +82 -0
- package/dist/index.es.js +8 -3
- package/dist/index.js +8 -3
- package/package.json +4 -1
- package/src/components/Dropdowns/DropdownComponent.jsx +10 -7
- package/src/components/Dropdowns/DropdownFilter.jsx +1 -1
- package/src/components/Dropdowns/DropdownsDatePicker/DropdownDatePicker copy.jsx +306 -0
- package/src/components/Dropdowns/DropdownsDatePicker/DropdownDatePicker.jsx +316 -0
- package/src/components/Dropdowns/DropdownsDatePicker/PeriodAndDetailDropdowns.tsx +351 -0
- package/src/components/Dropdowns/DropdownsDatePicker/index.js +3 -0
- package/src/components/Dropdowns/index.js +2 -1
- package/src/components/Navigation/Tabnav.jsx +45 -32
- package/src/hooks/useTextFormatter.jsx +3 -1
- package/src/index.js +30 -1
- package/src/stories/DropdownDatePicker.stories.jsx +51 -0
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/README.md
CHANGED
|
@@ -77,6 +77,7 @@ import { Button } from 'groovinads-ui';
|
|
|
77
77
|
| ```className``` | String | n/a | n/a | Additional CSS class names that can be applied to the button. Defaults to an empty string. |
|
|
78
78
|
| ```style``` | String | ```default``` ```success``` ```danger``` ```warning``` ```link```| ```default``` | Specifies the style variant of the button, which can change its color and visual appearance. It's optional. |
|
|
79
79
|
| ```processing``` | Boolean | ```true``` ```false``` | ```false``` | If true, displays a spinner animation and appends '...' to the button label to indicate processing status. It's optional. |
|
|
80
|
+
| ```children``` | ```Node``` | n/a | n/a | The content rendered inside the button component. It can include text, icons, or other components. |
|
|
80
81
|
|
|
81
82
|
## Inputs
|
|
82
83
|
|
|
@@ -133,6 +134,10 @@ import { Input } from 'groovinads-ui';
|
|
|
133
134
|
| ```setShowError``` | Function | n/a | n/a | Function to set the visibility of the error message. |
|
|
134
135
|
| ```type``` | String | n/a | n/a | Text or characters to display at the end of the input, e.g., 'USD' for currency. |
|
|
135
136
|
| ```value``` | String or Number| n/a | n/a | The value of the input. |
|
|
137
|
+
| ```autoFocus ``` | Boolean | ```true``` ```false``` | ```false``` | If true, automatically focuses the input when the component mounts. |
|
|
138
|
+
| ```customRef ``` | React.RefObject, Function, null | n/a | ```null``` | Custom ref object or callback ref to access the input element. |
|
|
139
|
+
| ```suffix ``` | string | n/a | n/a / Optional suffix text to display inside the input field. |
|
|
140
|
+
|
|
136
141
|
|
|
137
142
|
### Radio
|
|
138
143
|
```jsx
|
|
@@ -234,6 +239,7 @@ import { PillComponent } from 'groovinads-ui';
|
|
|
234
239
|
| ```color``` | String | ```blue``` ```danger``` ```dark``` ```green``` ```light``` ```midtone``` ```neutral``` ```red``` ```yellow``` | ```neutral``` | Specifies the background color of the pill. This helps to differentiate pills by context or severity. |
|
|
235
240
|
| ```closeButton``` | Boolean | ```true``` ```false``` | ```false``` | If true, a close button is displayed on the pill, allowing it to be dismissed.|
|
|
236
241
|
| ```onClick``` | Function | n/a | n/a | Function to handle the click event on the close button. This property is only relevant if ```closeButton``` is ```true```. |
|
|
242
|
+
| ```children``` | Node | n/a | n/a | Content to be displayed inside the pill component. |
|
|
237
243
|
|
|
238
244
|
### StatusIcon
|
|
239
245
|
```jsx
|
|
@@ -246,6 +252,82 @@ import { StatusIcon } from 'groovinads-ui';
|
|
|
246
252
|
| ```animated``` | Boolean | ```true``` ```false``` | ```false``` | If true, the icon will include animation effects on active status. Defaults to false, indicating no animation. |
|
|
247
253
|
| ```className``` | String | n/a | n/a | Additional CSS class names that can be applied to the status icon. Defaults to an empty string. |
|
|
248
254
|
| ```status``` | Number | ```0``` ```1``` ```3``` | ```0``` | Specifies the visual state of the icon: ```0``` for inactive, ```1``` for active, and ```3``` for active with a warning. |
|
|
255
|
+
### DropdownComponent
|
|
256
|
+
```jsx
|
|
257
|
+
import { DropdownComponent } from 'groovinads-ui';
|
|
258
|
+
|
|
259
|
+
<DropdownComponent autoClose={false} className="custom-class" drop="down">
|
|
260
|
+
{/* Child components go here */}
|
|
261
|
+
</DropdownComponent>
|
|
262
|
+
```
|
|
263
|
+
| Property | Type | Options | Default | Description |
|
|
264
|
+
|--------------|--------------|--------------|--------------|--------------|
|
|
265
|
+
| ```autoClose``` | ```Boolean``` ```String``` |```true``` ```false``` ```outside``` ```inside``` | false | Determines the auto-close behavior of the dropdown. |
|
|
266
|
+
| ```children``` | Node | n/a | n/a | Child components to be rendered inside the dropdown. |
|
|
267
|
+
| ```className``` | String | n/a | string | Additional CSS class names. |
|
|
268
|
+
| ```drop``` | String | ```up``` ```down``` | n/a | Specifies the direction in which the dropdown should open. |
|
|
269
|
+
| ```fullWidth``` | Boolean| n/a | n/a | Function to handle toggle state changes. |
|
|
270
|
+
| ```overflow``` | Boolean | ```true``` ```false``` | false | Whether to enable overflow strategy for the dropdown.|
|
|
271
|
+
| ```aling``` | String | ```start``` ```end``` | ```star``` | Alignment of the dropdown menu. |
|
|
272
|
+
| ```show``` | Boolean | ```true``` ```false``` | n/a | Controls the visibility of the dropdown. |
|
|
273
|
+
### DropdownFilter
|
|
274
|
+
```jsx
|
|
275
|
+
import { DropdownFilter } from 'groovinads-ui';
|
|
276
|
+
|
|
277
|
+
<DropdownFilter
|
|
278
|
+
title="Filter"
|
|
279
|
+
valuesSelected={['Value1', 'Value2']}
|
|
280
|
+
setValuesSelected={(newValues) => console.log(newValues)}
|
|
281
|
+
values={['Value1', 'Value2', 'Value3']}
|
|
282
|
+
menuType="simple"
|
|
283
|
+
locked={false}
|
|
284
|
+
onRemoveFilter={() => console.log('Filter removed')}
|
|
285
|
+
show={true}
|
|
286
|
+
onToggle={(isOpen) => console.log(isOpen)}
|
|
287
|
+
overflow={false}
|
|
288
|
+
className="custom-class"
|
|
289
|
+
/>
|
|
290
|
+
```
|
|
291
|
+
| Property | Type | Options | Default | Description |
|
|
292
|
+
|--------------|--------------|--------------|--------------|--------------|
|
|
293
|
+
| ```title``` | String | n/a | n/a | Title of the dropdown filter. |
|
|
294
|
+
| ```valuesSelected```| Array | n/a | [] | Available values for selection. |
|
|
295
|
+
| ```setValuesSelected``` | Function | n/a | n/a | AFunction to set the selected values. |
|
|
296
|
+
| ```values``` | Array | n/a | [] | Available values for selection. |
|
|
297
|
+
| ```menuType``` | String | ```simple``` ```selecion``` | simple | Type of dropdown menu. |
|
|
298
|
+
| ```locked``` | Boolean| ```true``` ```false```| false | If true, the filter cannot be removed. |
|
|
299
|
+
| ```onRemoveFilter``` | Function | n/a | n/a | Function to handle filter removal. |
|
|
300
|
+
| ```show``` | Boolean | ```true``` ```false``` | n/a | Controls the visibility of the dropdown. |
|
|
301
|
+
| ```onToggle``` | Funtion | n/a | n/a | Function to handle toggle state changes. |
|
|
302
|
+
| ``` overflow``` | Boolean | ```true``` ```false``` | false | Whether to enable overflow strategy for the dropdown. |
|
|
303
|
+
| ```className``` | String | n/a | '' | Additional CSS class names. |
|
|
304
|
+
### DropdownMultiSelect
|
|
305
|
+
```jsx
|
|
306
|
+
import { DropdownMultiSelect } from 'groovinads-ui';
|
|
307
|
+
|
|
308
|
+
<DropdownMultiSelect
|
|
309
|
+
autoClose={false}
|
|
310
|
+
className="custom-class"
|
|
311
|
+
drop="down"
|
|
312
|
+
inputLabel="Select items"
|
|
313
|
+
object={false}
|
|
314
|
+
nameKey="name"
|
|
315
|
+
idKey="id"
|
|
316
|
+
searchLabel="Search"
|
|
317
|
+
onToggle={(isOpen) => console.log(isOpen)}
|
|
318
|
+
overflow={false}
|
|
319
|
+
valuesSelected={[]}
|
|
320
|
+
setValuesSelected={(newValues) => console.log(newValues)}
|
|
321
|
+
values={['Item1', 'Item2', 'Item3']}
|
|
322
|
+
show={true}
|
|
323
|
+
idInPill={false}
|
|
324
|
+
showStatus=""
|
|
325
|
+
focus={false}
|
|
326
|
+
/>
|
|
327
|
+
```
|
|
328
|
+
| Property | Type | Options | Default | Description |
|
|
329
|
+
|--------------|--------------|--------------|--------------|--------------|
|
|
330
|
+
| ```autoClose``` | ```Boolean``` ```String``` | ```true``` ```false```` ```outside``` ```inside``` | false | Determines the auto-close behavior of the dropdown. |
|
|
249
331
|
|
|
250
332
|
|
|
251
333
|
|