Remove nanoid dependency

Replace × with \u00d7
This commit is contained in:
Tom Southall
2022-02-20 00:19:20 +00:00
parent d7db51adc2
commit 837d16a44c
4 changed files with 6 additions and 8 deletions

5
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "turnstone",
"version": "0.3.0",
"version": "0.4.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "turnstone",
"version": "0.3.0",
"version": "0.4.0",
"dependencies": {
"first-of-type": "^1.0.0",
"prop-types": "^15.8.1",
@@ -26,7 +26,6 @@
"eslint-plugin-react": "^7.28.0",
"jsdom": "^19.0.0",
"msw": "^0.36.8",
"nanoid": "^3.3.1",
"node-fetch": "^2.6.7",
"react": "^17.0.2",
"react-dom": "^17.0.2",

View File

@@ -43,7 +43,6 @@
"eslint-plugin-react": "^7.28.0",
"jsdom": "^19.0.0",
"msw": "^0.36.8",
"nanoid": "^3.3.1",
"node-fetch": "^2.6.7",
"react": "^17.0.2",
"react-dom": "^17.0.2",

View File

@@ -16,7 +16,6 @@ const App = () => {
data={fruits}
dataSearchType={'startswith'}
debounceWait={0}
id={'autocomplete'}
itemGroupsAreImmutable={true}
maxItems={10}
name={'search'}

View File

@@ -2,20 +2,21 @@
import React from 'react'
import PropTypes from 'prop-types'
import { nanoid } from 'nanoid'
import { StateContextProvider } from './context/state'
import isUndefined from './utils/isUndefined'
import Container from './components/container'
const randomId = () => `turnstone-${(0|Math.random()*6.04e7).toString(36)}`
// Set prop defaults before passing them on to components
const propDefaults = {
autoFocus: false,
clearButton: false,
clearButtonAriaLabel: 'Clear contents',
clearButtonText: '×',
clearButtonText: '\u00d7',
debounceWait: 250,
defaultItemGroupsAreImmutable: true,
id: nanoid(),
id: randomId(),
isDisabled: false,
itemGroupsAreImmutable: true,
maxItems: 10,