groovinads-ui 1.2.70 → 1.2.72
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 +13 -12
- package/dist/index.es.js +3 -3
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/src/components/Inputs/InputChip.jsx +24 -5
- package/src/index.js +2 -1
- package/src/stories/InputChip.stories.jsx +2 -4
package/README.md
CHANGED
|
@@ -582,7 +582,7 @@ const ExampleIputChip = () => (
|
|
|
582
582
|
placeholder={'Add keywords…'}
|
|
583
583
|
keywordsList={keywordsList}
|
|
584
584
|
setKeywordsList={setKeywordsList}
|
|
585
|
-
|
|
585
|
+
pillColor={'green'}
|
|
586
586
|
counter={true}
|
|
587
587
|
maxKeywordLength={10}
|
|
588
588
|
recomendedKeywords={5}
|
|
@@ -595,7 +595,7 @@ const ExampleIputChip = () => (
|
|
|
595
595
|
placeholder={'Add keywords…'}
|
|
596
596
|
keywordsList={keywordList2}
|
|
597
597
|
setKeywordsList={setKeywordsList2}
|
|
598
|
-
|
|
598
|
+
pillColor={'red'}
|
|
599
599
|
maxKeywordLength={10}
|
|
600
600
|
maxKeywords={15}
|
|
601
601
|
requiredText='You can only add up to 15 keywords.'
|
|
@@ -608,17 +608,18 @@ export default ExampleInputChip;
|
|
|
608
608
|
|
|
609
609
|
```
|
|
610
610
|
|
|
611
|
-
| Property
|
|
611
|
+
| Property | Type | Required | Options | Default | Description |
|
|
612
612
|
| ----------------------- | ------- | -------- | ------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
613
|
-
| `className`
|
|
614
|
-
| `placeholder`
|
|
615
|
-
| `keywordsList`
|
|
616
|
-
| `setKeywordsList`
|
|
617
|
-
| `counter`
|
|
618
|
-
| `
|
|
619
|
-
| `recomendedKeywords`
|
|
620
|
-
| `maxKeywords`
|
|
621
|
-
| `requiredText`
|
|
613
|
+
| `className` | String | No | n/a | n/a | Additional CSS class names that can be applied to the inputChip. |
|
|
614
|
+
| `placeholder` | String | Yes | n/a | n/a | Displays a suggested or descriptive text inside the input field before the user types. |
|
|
615
|
+
| `keywordsList` | Array | Yes | n/a | n/a | This property expects an array of keywords. You can initialize it as an empty array or with keywords, and it will be updated when new keywords are added or removed from the input field. |
|
|
616
|
+
| `setKeywordsList` | String | Yes | n/a | n/a | Dynamically updates the list of keywords. It is called when a new keyword is added or removed from the list. The updated array will be passed to the `keywordsList` prop. |
|
|
617
|
+
| `counter` | Boolean | No | n/a | false | If true, it will display a progressive and numeric counter of keywords. If false, it will not display it. |
|
|
618
|
+
| `pillColor` | String | No | `blue` `danger` `dark` `green` `light` `midtone` `neutral` `red` `yellow` | `neutral` | Define the color of the keyword. |
|
|
619
|
+
| `recomendedKeywords` | Number | No | n/a | n/a | Specifies the recommended number of keywords. When the keywords list (`keywordsList`) reaches the recommended number, the counter's status will change to the 'warning' color. |
|
|
620
|
+
| `maxKeywords` | Number | Yes | n/a | n/a | Indicates the maximum number of allowed keywords. When the keywordsList reaches this limit, an error message defined in requiredText will be displayed. Additionally, if the counter is enabled, its status will change to the 'danger' color. |
|
|
621
|
+
| `requiredText` | String | Yes | n/a | n/a | Texto que se mostrará como error cuando la lista de keywords (keywordsList) alcance el límite máximo definido en maxKeywords. |
|
|
622
|
+
|`duplicateKeywordErrorText`| String | No | n/a | n/a | Allows you to add a custom message when trying to add a keyword that already exists. |
|
|
622
623
|
|
|
623
624
|
### InputEmail
|
|
624
625
|
|