groovinads-ui 1.2.68 → 1.2.69

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 CHANGED
@@ -99,7 +99,7 @@ import { Button } from 'groovinads-ui';
99
99
  <Button
100
100
  variant={'outline'}
101
101
  size={'xs'}
102
- onClick={() => {
102
+ oonClick={() => {
103
103
  console.log('Button clicked');
104
104
  }}
105
105
  icon={'plus'}
@@ -337,6 +337,10 @@ const MultiSelectComponent = () => {
337
337
  focus={show}
338
338
  buttonVariant='primary'
339
339
  nowrap={true}
340
+ errorRequired={errorRequired}
341
+ setErrorRequiered={setErrorRequired}
342
+ validate={true}
343
+ requiredText='customizable text'
340
344
  />
341
345
  );
342
346
  };
@@ -346,25 +350,30 @@ export default MultiSelectComponent;
346
350
 
347
351
  | Property | Type | Required | Options | Default | Description |
348
352
  | ---------------- | ---------------- | -------- | --------------------------------- | ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
349
- | `autoClose` | Boolean / String | No | `true` `false` `inside` `outside` | `false` | Controls when the dropdown menu closes. If `false`, the menu does not close on click. If `true`, it closes when clicking an item in the list or outside the menu. If inside, it closes when clicking an item in the list but not when clicking outside the menu. If outside, it closes when clicking outside the menu but not when clicking an item in the list. |
350
- | `buttonVariant` | String | No | `input` | `primary` `secondary` `terciary` `outline` | Defines the visual style of the button, used to toggle the dropdown menu. |
351
- | `className` | String | No | n/a | n/a | Adds custom CSS properties to style the component. |
352
- | `drop` | String | No | `up` `down` | n/a | Specifies the direction in which the dropdown should open. |
353
- | `focus` | Boolean | No | `true` `false` | `false` | If true, the search input will be focused when the dropdown is shown. |
354
- | `idInPill` | Boolean | No | `true` `false` | `false` | If true, ID will be shown in the pill component. |
355
- | `idKey` | String | No | n/a | n/a | Defines the key used in the object to find the item’s ID, allowing for the identification and handling of selected items and other operations within the component. |
356
- | `inputLabel` | String | No | n/a | '' | Allows customizing the label for the input field within the dropdown menu. |
357
- | `nameKey` | String | No | n/a | n/a | Defines the key that will be used in the object to display the item's name. |
358
- | `nowrap` | Boolean | No | `true` `false` | `false` | If `true`, the content will be displayed on a single line. If it exceeds the width, a scroll will be shown. If `false`, it will fit the width of the button. If it exceeds, the content will be displayed on multiple lines. |
359
- | `object` | Boolean | No | `true` `false` | `false` | `object` determines whether the values in values are objects (with properties `nameKey` and `idKey`) or simple values (strings or numbers). |
360
- | `onToggle` | Function | No | n/a | n/a | Contains the handleToggle function which handles changing the show state between true and false, toggling the visibility of the menu. |
361
- | `overflow` | Boolean | No | `true` `false` | `false` | Whether to enable overflow strategy for the dropdown. |
362
- | `searchLabel` | String | No | n/a | 'Search' | Label for the search input field. |
363
- | `show` | Boolean | No | `true` `false` | n/a | Controls the visibility of the dropdown. |
364
- | `showStatus` | String | No | n/a | String | Filter items by status if applicable. |
365
- | `values` | Array | No | n/a | [ ] | Available values for selection. |
366
- | `valuesSelected` | Array / Object | No | n/a | [ ] | Represents the state of the values that are currently selected. |
367
- | `hasId` | Boolean | No | `true` `false` | `true` | Controls wether the hashtag and id shows or not in the dropdown options |
353
+ | `autoClose` | Boolean / String | No | `true` `false` `inside` `outside` | `false` | Controls when the dropdown menu closes. If `false`, the menu does not close on click. If `true`, it closes when clicking an item in the list or outside the menu. If inside, it closes when clicking an item in the list but not when clicking outside the menu. If outside, it closes when clicking outside the menu but not when clicking an item in the list. |
354
+ | `buttonVariant` | String | No | `input` | `primary` `secondary` `terciary` `outline` | Defines the visual style of the button, used to toggle the dropdown menu. |
355
+ | `className` | String | No | n/a | n/a | Adds custom CSS properties to style the component. |
356
+ | `drop` | String | No | `up` `down` | n/a | Specifies the direction in which the dropdown should open. |
357
+ | `focus` | Boolean | No | `true` `false` | `false` | If true, the search input will be focused when the dropdown is shown. |
358
+ | `idInPill` | Boolean | No | `true` `false` | `false` | If true, ID will be shown in the pill component. |
359
+ | `idKey` | String | No | n/a | n/a | Defines the key used in the object to find the item’s ID, allowing for the identification and handling of selected items and other operations within the component. |
360
+ | `inputLabel` | String | No | n/a | '' | Allows customizing the label for the input field within the dropdown menu. |
361
+ | `nameKey` | String | No | n/a | n/a | Defines the key that will be used in the object to display the item's name. |
362
+ | `nowrap` | Boolean | No | `true` `false` | `false` | If `true`, the content will be displayed on a single line. If it exceeds the width, a scroll will be shown. If `false`, it will fit the width of the button. If it exceeds, the content will be displayed on multiple lines. |
363
+ | `object` | Boolean | No | `true` `false` | `false` | `object` determines whether the values in values are objects (with properties `nameKey` and `idKey`) or simple values (strings or numbers). |
364
+ | `onToggle` | Function | No | n/a | n/a | Contains the handleToggle function which handles changing the show state between true and false, toggling the visibility of the menu. |
365
+ | `overflow` | Boolean | No | `true` `false` | `false` | Whether to enable overflow strategy for the dropdown. |
366
+ | `searchLabel` | String | No | n/a | 'Search' | Label for the search input field. |
367
+ | `show` | Boolean | No | `true` `false` | n/a | Controls the visibility of the dropdown. |
368
+ | `showStatus` | String | No | n/a | String | Filter items by status if applicable. |
369
+ | `values` | Array | No | n/a | [ ] | Available values for selection. |
370
+ | `valuesSelected` | Array / Object | No | n/a | [ ] | Represents the state of the values that are currently selected. |
371
+ | `hasId` | Boolean | No | `true` `false` | `true` | Controls wether the hashtag and id shows or not in the dropdown options |
372
+ | `validate` | Boolean | No | `true` `false` | `false` | Enables validation (error). If true, it checks whether items have been selected from the dropdown. If false, no validation is performed. |
373
+ | `requiredText` | String | No | n/a | `'requiered'` | Text displayed when the field is required and triggers an error (`validate`). It can be customized. |
374
+ | `errorRequired` | Boolean | No | `false` `true` | `false` | Determines when the error message is displayed. Defaults to false. |
375
+ | `setErrorRequired ` | Function | No | n/a | n/a | Allows users to control when the error is displayed and update its state (`errorRequired`). |
376
+
368
377
 
369
378
  ### DropdownSimpleDatePicker
370
379