@bfrs/agentic-components 0.4.8 → 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.
- package/BFRS_AGENTIC_COMPONENTS.md +77 -1
- package/README.md +1 -1
- package/package.json +1 -1
|
@@ -48,6 +48,8 @@ import {
|
|
|
48
48
|
SelectableChipGroup,
|
|
49
49
|
NumberStepper,
|
|
50
50
|
SuggestInput,
|
|
51
|
+
TagInput,
|
|
52
|
+
TagsInput,
|
|
51
53
|
FileDropzone,
|
|
52
54
|
RevealField,
|
|
53
55
|
RevealAndCopy,
|
|
@@ -437,7 +439,7 @@ Icon-only buttons inherit the same compact control scale: `xs` is 26px, `sm` is
|
|
|
437
439
|
|
|
438
440
|
Wraps any form control with label, helper, and error text. Connects them via `aria-describedby`.
|
|
439
441
|
|
|
440
|
-
The label always renders on its own block row with a `6px` vertical gap before the control. This applies consistently to full-width controls such as `Input` and inline controls such as `NumberStepper`; do not add manual margins between the label and control.
|
|
442
|
+
The label always renders on its own block row with a `6px` vertical gap before the control. This applies consistently to full-width controls such as `Input` and inline controls such as `NumberStepper`; do not add manual margins between the label and control. Form labels use the primary text token, which resolves to `rgb(41, 52, 61)`.
|
|
441
443
|
|
|
442
444
|
```tsx
|
|
443
445
|
<FormField
|
|
@@ -692,6 +694,63 @@ Angular custom element:
|
|
|
692
694
|
|
|
693
695
|
---
|
|
694
696
|
|
|
697
|
+
#### `TagInput` / `TagsInput`
|
|
698
|
+
|
|
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.
|
|
700
|
+
|
|
701
|
+
```tsx
|
|
702
|
+
const [tags, setTags] = useState<string[]>([]);
|
|
703
|
+
|
|
704
|
+
<TagsInput
|
|
705
|
+
value={tags}
|
|
706
|
+
onChange={setTags}
|
|
707
|
+
suggestions={existingTags}
|
|
708
|
+
creatable
|
|
709
|
+
placeholder="Add Tag"
|
|
710
|
+
/>
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
React Hook Form:
|
|
714
|
+
|
|
715
|
+
```tsx
|
|
716
|
+
<Controller
|
|
717
|
+
name="order_tag"
|
|
718
|
+
control={control}
|
|
719
|
+
render={({ field }) => (
|
|
720
|
+
<TagsInput
|
|
721
|
+
value={field.value ?? []}
|
|
722
|
+
onChange={field.onChange}
|
|
723
|
+
suggestions={allTags}
|
|
724
|
+
placeholder="Add Tag"
|
|
725
|
+
/>
|
|
726
|
+
)}
|
|
727
|
+
/>
|
|
728
|
+
```
|
|
729
|
+
|
|
730
|
+
Angular custom element:
|
|
731
|
+
|
|
732
|
+
```html
|
|
733
|
+
<bfrs-tag-input
|
|
734
|
+
placeholder="Add Tag"
|
|
735
|
+
[props]="{ values: orderTags, suggestions: allTags, creatable: true }"
|
|
736
|
+
(value-change)="orderTags = $event.detail.values">
|
|
737
|
+
</bfrs-tag-input>
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
| Prop | Type | Default |
|
|
741
|
+
|------|------|---------|
|
|
742
|
+
| `value` | `string[]` | **required** |
|
|
743
|
+
| `onChange` | `(value: string[]) => void` | **required** |
|
|
744
|
+
| `suggestions` | `string[]` | `[]` |
|
|
745
|
+
| `creatable` | `boolean` | `true` |
|
|
746
|
+
| `placeholder` | `string` | `"Add tag"` |
|
|
747
|
+
| `maxSuggestions` | `number` | `8` |
|
|
748
|
+
| `size` | `"sm" \| "md"` | `"md"` |
|
|
749
|
+
| `disabled` | `boolean` | `false` |
|
|
750
|
+
| `error` | `boolean` | `false` |
|
|
751
|
+
|
|
752
|
+
---
|
|
753
|
+
|
|
695
754
|
#### `OptionCardGroup`
|
|
696
755
|
|
|
697
756
|
Bordered selectable option cards for radio-style choices. Supports optional description, icon, disabled state, and help tooltip text.
|
|
@@ -856,6 +915,16 @@ Use `FormField` around controls that do not own a label. This keeps Quantity and
|
|
|
856
915
|
onValueChange={setCity}
|
|
857
916
|
/>
|
|
858
917
|
</FormField>
|
|
918
|
+
|
|
919
|
+
<FormField label="Order tags">
|
|
920
|
+
<TagsInput
|
|
921
|
+
value={orderTags}
|
|
922
|
+
onChange={setOrderTags}
|
|
923
|
+
suggestions={allTags}
|
|
924
|
+
creatable
|
|
925
|
+
placeholder="Add Tag"
|
|
926
|
+
/>
|
|
927
|
+
</FormField>
|
|
859
928
|
</Grid>
|
|
860
929
|
|
|
861
930
|
<FileDropzone
|
|
@@ -890,6 +959,13 @@ Angular / Custom Elements:
|
|
|
890
959
|
(value-change)="city = $event.detail.value">
|
|
891
960
|
</bfrs-suggest-input>
|
|
892
961
|
</bfrs-form-field>
|
|
962
|
+
|
|
963
|
+
<bfrs-form-field label="Order tags">
|
|
964
|
+
<bfrs-tag-input
|
|
965
|
+
[props]="{ values: orderTags, suggestions: allTags, creatable: true }"
|
|
966
|
+
(value-change)="orderTags = $event.detail.values">
|
|
967
|
+
</bfrs-tag-input>
|
|
968
|
+
</bfrs-form-field>
|
|
893
969
|
</bfrs-grid>
|
|
894
970
|
```
|
|
895
971
|
|
package/README.md
CHANGED
|
@@ -266,7 +266,7 @@ For custom Angular table layouts where `bfrs-data-table` is too prescriptive,
|
|
|
266
266
|
use the primitive table tags: `bfrs-table`, `bfrs-thead`, `bfrs-tbody`,
|
|
267
267
|
`bfrs-tfoot`, `bfrs-tr`, `bfrs-th`, and `bfrs-td`.
|
|
268
268
|
|
|
269
|
-
Registered tags include `bfrs-box`, `bfrs-container`, `bfrs-paper`, `bfrs-stack`, `bfrs-grid`, `bfrs-text`, `bfrs-icon`, `bfrs-button`, `bfrs-button-group`, `bfrs-icon-button`, `bfrs-form-field`, `bfrs-label`, `bfrs-input`, `bfrs-slider`, `bfrs-color-picker`, `bfrs-color-swatch-group`, `bfrs-textarea`, `bfrs-select`, `bfrs-date-range-picker`, `bfrs-searchable-select`, `bfrs-multi-select`, `bfrs-suggest-input`, `bfrs-option-card-group`, `bfrs-selectable-chip-group`, `bfrs-number-stepper`, `bfrs-file-dropzone`, `bfrs-reveal-field`, `bfrs-checkbox`, `bfrs-radio`, `bfrs-switch`, `bfrs-badge`, `bfrs-chip`, `bfrs-alert`, `bfrs-info-card`, `bfrs-tip`, `bfrs-toast-manager`, `bfrs-toast-provider`, `bfrs-spinner`, `bfrs-skeleton`, `bfrs-empty-state`, `bfrs-error-state`, `bfrs-loading-state`, `bfrs-modal`, `bfrs-drawer`, `bfrs-confirm-dialog`, `bfrs-dropdown`, `bfrs-tooltip`, `bfrs-popover`, `bfrs-avatar`, `bfrs-metric-card`, `bfrs-table-pagination`, `bfrs-table-toolbar`, `bfrs-table-empty-state`, `bfrs-table-error-state`, `bfrs-table-skeleton`, `bfrs-table-row-actions`, `bfrs-table-bulk-actions`, `bfrs-table-column-visibility`, `bfrs-table-save-view`, `bfrs-data-table`, `bfrs-table`, `bfrs-thead`, `bfrs-tbody`, `bfrs-tfoot`, `bfrs-tr`, `bfrs-th`, `bfrs-td`, `bfrs-tabs`, `bfrs-tabs-list`, `bfrs-tabs-trigger`, `bfrs-tabs-content`, `bfrs-breadcrumbs`, `bfrs-action-menu`, `bfrs-page-header`, `bfrs-section-header`, `bfrs-layout-shell`, `bfrs-form-section`, `bfrs-filter-bar`, `bfrs-filter-drawer`, `bfrs-chat-bubble`, `bfrs-chat-composer`, `bfrs-full-page-loader`, `bfrs-business-info-display-card`, `bfrs-collapsible`, `bfrs-accordion`, `bfrs-summary-bar`, `bfrs-entity-display-card`, `bfrs-reveal-and-copy`, `bfrs-horizontal-stepper`, and `bfrs-step-progress-card`.
|
|
269
|
+
Registered tags include `bfrs-box`, `bfrs-container`, `bfrs-paper`, `bfrs-stack`, `bfrs-grid`, `bfrs-text`, `bfrs-icon`, `bfrs-button`, `bfrs-button-group`, `bfrs-icon-button`, `bfrs-form-field`, `bfrs-label`, `bfrs-input`, `bfrs-slider`, `bfrs-color-picker`, `bfrs-color-swatch-group`, `bfrs-textarea`, `bfrs-select`, `bfrs-date-range-picker`, `bfrs-searchable-select`, `bfrs-multi-select`, `bfrs-tag-input`, `bfrs-suggest-input`, `bfrs-option-card-group`, `bfrs-selectable-chip-group`, `bfrs-number-stepper`, `bfrs-file-dropzone`, `bfrs-reveal-field`, `bfrs-checkbox`, `bfrs-radio`, `bfrs-switch`, `bfrs-badge`, `bfrs-chip`, `bfrs-alert`, `bfrs-info-card`, `bfrs-tip`, `bfrs-toast-manager`, `bfrs-toast-provider`, `bfrs-spinner`, `bfrs-skeleton`, `bfrs-empty-state`, `bfrs-error-state`, `bfrs-loading-state`, `bfrs-modal`, `bfrs-drawer`, `bfrs-confirm-dialog`, `bfrs-dropdown`, `bfrs-tooltip`, `bfrs-popover`, `bfrs-avatar`, `bfrs-metric-card`, `bfrs-table-pagination`, `bfrs-table-toolbar`, `bfrs-table-empty-state`, `bfrs-table-error-state`, `bfrs-table-skeleton`, `bfrs-table-row-actions`, `bfrs-table-bulk-actions`, `bfrs-table-column-visibility`, `bfrs-table-save-view`, `bfrs-data-table`, `bfrs-table`, `bfrs-thead`, `bfrs-tbody`, `bfrs-tfoot`, `bfrs-tr`, `bfrs-th`, `bfrs-td`, `bfrs-tabs`, `bfrs-tabs-list`, `bfrs-tabs-trigger`, `bfrs-tabs-content`, `bfrs-breadcrumbs`, `bfrs-action-menu`, `bfrs-page-header`, `bfrs-section-header`, `bfrs-layout-shell`, `bfrs-form-section`, `bfrs-filter-bar`, `bfrs-filter-drawer`, `bfrs-chat-bubble`, `bfrs-chat-composer`, `bfrs-full-page-loader`, `bfrs-business-info-display-card`, `bfrs-collapsible`, `bfrs-accordion`, `bfrs-summary-bar`, `bfrs-entity-display-card`, `bfrs-reveal-and-copy`, `bfrs-horizontal-stepper`, and `bfrs-step-progress-card`.
|
|
270
270
|
|
|
271
271
|
`HorizontalStepper` provides the compact horizontal flow layout with an optional announcement banner and parent-owned `onClose` / `onStepSelect` behavior:
|
|
272
272
|
|