mirror of
https://github.com/fergalmoran/turnstone.git
synced 2025-12-22 09:49:56 +00:00
Remove nanoid dependency
Replace × with \u00d7
This commit is contained in:
5
package-lock.json
generated
5
package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -16,7 +16,6 @@ const App = () => {
|
||||
data={fruits}
|
||||
dataSearchType={'startswith'}
|
||||
debounceWait={0}
|
||||
id={'autocomplete'}
|
||||
itemGroupsAreImmutable={true}
|
||||
maxItems={10}
|
||||
name={'search'}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user