@gcforms/tag-input
Advanced tools
+16
-0
@@ -8,2 +8,18 @@ # Changelog | ||
| ## [1.0.2] - 2025-06-23 | ||
| ### Changed | ||
| - Update Yarn to version 4.9.2 | ||
| ## [1.0.1] - 2025-06-12 | ||
| ### Added | ||
| - Add allowSpacesInTags prop. When false, enable space to close tags. | ||
| ### Fixed | ||
| - Improved styling on tag input element | ||
| ## [1.0.0] - 2025-05-14 | ||
@@ -10,0 +26,0 @@ |
+2
-2
| { | ||
| "name": "@gcforms/tag-input", | ||
| "version": "1.0.0", | ||
| "version": "1.0.2", | ||
| "author": "Canadian Digital Service", | ||
@@ -9,3 +9,3 @@ "license": "MIT", | ||
| }, | ||
| "packageManager": "yarn@4.6.0", | ||
| "packageManager": "yarn@4.9.2", | ||
| "peerDependencies": { | ||
@@ -12,0 +12,0 @@ "react": "^19.1.0", |
+3
-1
@@ -58,3 +58,5 @@ :root { | ||
| input { | ||
| display: inline-block; | ||
| display: flex; | ||
| flex: 1 1 0%; | ||
| min-width: 120px; | ||
| padding-top: 0.25rem; | ||
@@ -61,0 +63,0 @@ padding-bottom: 0.25rem; |
+8
-1
@@ -29,2 +29,3 @@ import { useRef, useState } from "react"; | ||
| restrictDuplicates = true, | ||
| allowSpacesInTags = true, | ||
| maxTags, | ||
@@ -43,2 +44,3 @@ onTagAdd, | ||
| restrictDuplicates?: boolean; | ||
| allowSpacesInTags?: boolean; | ||
| maxTags?: number; | ||
@@ -141,3 +143,8 @@ onTagAdd?: (tag: string) => void; | ||
| const { key } = event; | ||
| const acceptKeys = [keys.ENTER, keys.TAB, keys.COMMA]; | ||
| const acceptKeys = [ | ||
| keys.ENTER, | ||
| keys.TAB, | ||
| keys.COMMA, | ||
| ...(allowSpacesInTags ? [] : [keys.SPACE]), | ||
| ]; | ||
| const navigateKeys = [keys.ARROW_LEFT, keys.ARROW_RIGHT]; | ||
@@ -144,0 +151,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
21851
1.84%629
1.45%0
-100%