@fvc/chip 1.0.0-rc.0 → 1.0.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/CHANGELOG.md +54 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,59 @@
|
|
|
1
1
|
# @fvc/chip
|
|
2
2
|
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- f8551e4: Add `@fvc/chip` component package
|
|
8
|
+
|
|
9
|
+
### What
|
|
10
|
+
|
|
11
|
+
Initial release of the `@fvc/chip` package — a compact label / badge component
|
|
12
|
+
built on top of Ant Design's `Tag`. Chips are used to represent discrete values,
|
|
13
|
+
filter criteria, or removable selections inside forms and data-display surfaces.
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
- **Two sizes** via the `size` prop: `"m"` (default) and `"s"`.
|
|
17
|
+
- **Closable / dismissible** — set `closable` and handle removal via `onClose`.
|
|
18
|
+
The component is consumer-controlled: it does not auto-unmount on close.
|
|
19
|
+
- **Disabled state** — `disabled` blocks all interactions and hides the close
|
|
20
|
+
button.
|
|
21
|
+
- **Keyboard accessible** — when `onClick` is provided the chip responds to
|
|
22
|
+
`Enter` and `Space`, meeting WCAG interactive-element expectations.
|
|
23
|
+
|
|
24
|
+
### Usage
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
import { Chip } from '@fvc/chip';
|
|
28
|
+
|
|
29
|
+
// Basic
|
|
30
|
+
<Chip>Label</Chip>
|
|
31
|
+
|
|
32
|
+
// Small, closable
|
|
33
|
+
<Chip size="s" closable onClose={() => removeTag(id)}>
|
|
34
|
+
Removable
|
|
35
|
+
</Chip>
|
|
36
|
+
|
|
37
|
+
// Disabled
|
|
38
|
+
<Chip disabled>Read-only</Chip>
|
|
39
|
+
|
|
40
|
+
// Interactive
|
|
41
|
+
<Chip onClick={() => toggleFilter(id)}>Clickable</Chip>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Install
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install @fvc/chip
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Peer dependencies: `react ^18.0.0`, `antd ^5.0.0`.
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- Updated dependencies
|
|
55
|
+
- @fvc/icons@1.1.6
|
|
56
|
+
|
|
3
57
|
## 1.0.0-rc.0
|
|
4
58
|
|
|
5
59
|
### Major Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fvc/chip",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"main": "./dist/lib/index.js",
|
|
5
5
|
"types": "./dist/lib/chip/src/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"antd"
|
|
40
40
|
],
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@fvc/icons": "^1.1.6
|
|
42
|
+
"@fvc/icons": "^1.1.6",
|
|
43
43
|
"antd": "^5.0.0",
|
|
44
44
|
"react": "^18.0.0"
|
|
45
45
|
}
|