🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@gcforms/tag-input

Package Overview
Dependencies
Maintainers
6
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gcforms/tag-input - npm Package Compare versions

Comparing version
1.0.0
to
1.0.2
+16
-0
CHANGELOG.md

@@ -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",

@@ -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;

@@ -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 @@