@bfrs/agentic-components 0.4.9 → 0.5.0

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.
@@ -49,6 +49,7 @@ import {
49
49
  NumberStepper,
50
50
  SuggestInput,
51
51
  TagInput,
52
+ TagsInput,
52
53
  FileDropzone,
53
54
  RevealField,
54
55
  RevealAndCopy,
@@ -693,17 +694,18 @@ Angular custom element:
693
694
 
694
695
  ---
695
696
 
696
- #### `TagInput`
697
+ #### `TagInput` / `TagsInput`
697
698
 
698
- Controlled chip input for free-form tags. Type and press Enter or comma to add, press Backspace on an empty input to remove the last tag, or remove individual chips with the chip close action. Pass `suggestions` to show an autocomplete list filtered by the current input.
699
+ Controlled chip input for free-form tags. This is intentionally separate from `MultiSelect`: `MultiSelect` selects bounded options, while `TagInput` / `TagsInput` can create arbitrary values and still autocomplete existing tags. Type and press Enter or comma to add, press Backspace on an empty input to remove the last tag, or remove individual chips with the chip close action. Pass `suggestions` to show an autocomplete list filtered by the current input. `creatable` defaults to `true`; set it to `false` to only commit suggestions.
699
700
 
700
701
  ```tsx
701
702
  const [tags, setTags] = useState<string[]>([]);
702
703
 
703
- <TagInput
704
+ <TagsInput
704
705
  value={tags}
705
706
  onChange={setTags}
706
707
  suggestions={existingTags}
708
+ creatable
707
709
  placeholder="Add Tag"
708
710
  />
709
711
  ```
@@ -715,7 +717,7 @@ React Hook Form:
715
717
  name="order_tag"
716
718
  control={control}
717
719
  render={({ field }) => (
718
- <TagInput
720
+ <TagsInput
719
721
  value={field.value ?? []}
720
722
  onChange={field.onChange}
721
723
  suggestions={allTags}
@@ -730,7 +732,7 @@ Angular custom element:
730
732
  ```html
731
733
  <bfrs-tag-input
732
734
  placeholder="Add Tag"
733
- [props]="{ values: orderTags, suggestions: allTags }"
735
+ [props]="{ values: orderTags, suggestions: allTags, creatable: true }"
734
736
  (value-change)="orderTags = $event.detail.values">
735
737
  </bfrs-tag-input>
736
738
  ```
@@ -740,6 +742,7 @@ Angular custom element:
740
742
  | `value` | `string[]` | **required** |
741
743
  | `onChange` | `(value: string[]) => void` | **required** |
742
744
  | `suggestions` | `string[]` | `[]` |
745
+ | `creatable` | `boolean` | `true` |
743
746
  | `placeholder` | `string` | `"Add tag"` |
744
747
  | `maxSuggestions` | `number` | `8` |
745
748
  | `size` | `"sm" \| "md"` | `"md"` |
@@ -914,10 +917,11 @@ Use `FormField` around controls that do not own a label. This keeps Quantity and
914
917
  </FormField>
915
918
 
916
919
  <FormField label="Order tags">
917
- <TagInput
920
+ <TagsInput
918
921
  value={orderTags}
919
922
  onChange={setOrderTags}
920
923
  suggestions={allTags}
924
+ creatable
921
925
  placeholder="Add Tag"
922
926
  />
923
927
  </FormField>
@@ -958,7 +962,7 @@ Angular / Custom Elements:
958
962
 
959
963
  <bfrs-form-field label="Order tags">
960
964
  <bfrs-tag-input
961
- [props]="{ values: orderTags, suggestions: allTags }"
965
+ [props]="{ values: orderTags, suggestions: allTags, creatable: true }"
962
966
  (value-change)="orderTags = $event.detail.values">
963
967
  </bfrs-tag-input>
964
968
  </bfrs-form-field>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bfrs/agentic-components",
3
- "version": "0.4.9",
3
+ "version": "0.5.0",
4
4
  "private": false,
5
5
  "description": "Shiprocket agentic component library and documentation showcase.",
6
6
  "keywords": [