@manifoldco/react-select-zero
Advanced tools
Comparing version 0.0.1-2 to 0.0.1-3
@@ -54,2 +54,3 @@ 'use strict'; | ||
KEY["HOME"] = "Home"; | ||
KEY["TAB"] = "Tab"; | ||
KEY["UP"] = "ArrowUp"; | ||
@@ -176,3 +177,3 @@ })(KEY || (KEY = {})); | ||
} | ||
// close | ||
// close on Escape | ||
@@ -182,3 +183,9 @@ case KEY.ESC: | ||
break; | ||
// close if tabbing away | ||
case KEY.TAB: | ||
setIsOpen(false); | ||
break; | ||
// prevent typing if search hidden | ||
default: | ||
@@ -185,0 +192,0 @@ if (noSearch) { |
@@ -1,1 +0,1 @@ | ||
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var KEY,React=require("react"),React__default=_interopDefault(React);function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var a,l,r={},n=Object.keys(e);for(l=0;l<n.length;l++)a=n[l],t.indexOf(a)>=0||(r[a]=e[a]);return r}function _objectWithoutProperties(e,t){if(null==e)return{};var a,l,r=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(l=0;l<n.length;l++)a=n[l],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}!function(e){e.DOWN="ArrowDown",e.END="End",e.ENTER="Enter",e.ESC="Escape",e.HOME="Home",e.UP="ArrowUp"}(KEY||(KEY={}));const SelectZero=e=>{let{allowCreate:t=!1,className:a="rsz",max:l=1/0,multi:r=!1,name:n,noSearch:c=!1,onChange:s,options:o,placeholder:i="Select",value:u=[]}=e,_=_objectWithoutProperties(e,["allowCreate","className","max","multi","name","noSearch","onChange","options","placeholder","value"]);const d=React.useRef(null),f=React.useRef(null),m=React.useRef(null),[p,E]=React.useState(0),[h,R]=React.useState(""),[b,N]=React.useState(!1),g=[],v=[];o.forEach((e,t)=>{new RegExp(h,"i").test(e)&&(v.push(e),g.push(t))});const y=!0!==c&&o.length>4,z=!0===t&&h.length>0&&-1===o.findIndex(e=>e===h),O=u.length===l;function x(e){return`rsz-${n}-${e}`}function k(e){return x(`option-${e}`)}function w(e,t){if(e){const a=e.querySelector(t);a&&a.scrollIntoView(!1)}}function S(e){if(!0===r){let t=[...u];const a=t.indexOf(e);return-1!==a?t.splice(a,1):t.length<l&&t.push(e),-1!==o.indexOf(e)&&(t=o.filter(e=>-1!==t.indexOf(e))),void s(t)}s([e]),N(!1)}return React.useEffect(()=>{f.current&&b&&f.current.focus()}),React.useEffect(()=>{-1===g.indexOf(p)&&E(g[0])},[p,g]),React__default.createElement("div",Object.assign({"aria-expanded":!0===b,"aria-multiselectable":!0===r||void 0,className:a,role:"listbox"},_),React__default.createElement("div",{className:"rsz__trigger"},React__default.createElement("button",{"aria-controls":x("menu"),"aria-haspopup":"listbox",className:"rsz__trigger-button",onClick:()=>N(!0),onKeyDown:e=>{e.key===KEY.DOWN&&N(!0)},ref:m,type:"button"},!0===r?`Select options for ${n}`:`Select an option for ${n}`,React__default.createElement("span",{"aria-hidden":!0,className:"rsz__arrow"},"↓")),u.length>0?React__default.createElement("ul",{className:"rsz__selection"},u.map(e=>React__default.createElement("li",{key:e,className:"rsz__selected"},React__default.createElement("span",{className:"rsz__selected-text"},e),React__default.createElement("button",{"aria-label":`remove ${e}`,className:"rsz__selected-action",onClick:()=>S(e),type:"button"},"✕")))):React__default.createElement("div",{className:"rsz__selection rsz__placeholder"},i)),React__default.createElement("div",{"aria-label":"Close dropdown",className:"rsz__overlay",onClick:()=>N(!1)}),React__default.createElement("menu",{id:x("menu"),className:"rsz__dropdown-wrapper"},React__default.createElement("div",{className:"rsz__dropdown"},React__default.createElement("input",{"aria-activedescendant":k(p),"aria-hidden":!1===y||void 0,"aria-label":"Filter options",className:"rsz__search",onChange:e=>R(e.target.value),onKeyDown:function(e){const t=g[0],a=g[g.length-1];switch(e.key){case KEY.ENTER:e.preventDefault(),S(o[p]);break;case KEY.DOWN:case KEY.UP:{e.preventDefault();const l=e.key===KEY.UP?-1:1,r=e.key===KEY.UP?a:t,n=g.indexOf(p)+l,c=void 0!==g[n]?g[n]:r;E(c),w(d.current,`#${k(c)}`);break}case KEY.END:case KEY.HOME:{const l=e.key===KEY.HOME?t:a;E(l),w(d.current,`#${k(l)}`);break}case KEY.ESC:N(!1);break;default:c&&e.preventDefault()}},ref:f,type:"search",value:h}),React__default.createElement("div",{className:"rsz__search-icon"}),React__default.createElement("ul",{className:"rsz__option-list",ref:d},v.map((e,t)=>{const a=-1!==u.indexOf(e);let l=a;return!1===l&&!0===O&&(l=void 0),React__default.createElement("li",{className:"rsz__option",key:e},React__default.createElement("button",{"aria-selected":l,"data-highlighted":p===g[t]||void 0,disabled:O&&!a,id:k(g[t]),onClick:()=>S(e),role:"option",type:"button"},e))}),o.length>0&&0===v.length&&React__default.createElement("span",{className:"rsz__no-results"},"No results for “",h,"”"),z&&React__default.createElement("li",{className:"rsz__option"},React__default.createElement("button",{className:"rsz__create","data-highlighted":p===o.length||void 0,disabled:O,id:k(o.length),onClick:()=>S(h),type:"button"},"Create ",React__default.createElement("span",{className:"rsz__search-term"},h))),!0===t&&""===h&&React__default.createElement("li",{className:"rsz__option"},React__default.createElement("span",{className:"rsz__create"},"Start typing to create an item"))))),React__default.createElement("input",{type:"hidden",name:n,value:u.join(",")}))};exports.default=SelectZero; | ||
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var KEY,React=require("react"),React__default=_interopDefault(React);function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var a,l,r={},n=Object.keys(e);for(l=0;l<n.length;l++)a=n[l],t.indexOf(a)>=0||(r[a]=e[a]);return r}function _objectWithoutProperties(e,t){if(null==e)return{};var a,l,r=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(l=0;l<n.length;l++)a=n[l],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}!function(e){e.DOWN="ArrowDown",e.END="End",e.ENTER="Enter",e.ESC="Escape",e.HOME="Home",e.TAB="Tab",e.UP="ArrowUp"}(KEY||(KEY={}));const SelectZero=e=>{let{allowCreate:t=!1,className:a="rsz",max:l=1/0,multi:r=!1,name:n,noSearch:c=!1,onChange:s,options:o,placeholder:i="Select",value:u=[]}=e,_=_objectWithoutProperties(e,["allowCreate","className","max","multi","name","noSearch","onChange","options","placeholder","value"]);const d=React.useRef(null),f=React.useRef(null),m=React.useRef(null),[p,E]=React.useState(0),[h,R]=React.useState(""),[b,N]=React.useState(!1),g=[],v=[];o.forEach((e,t)=>{new RegExp(h,"i").test(e)&&(v.push(e),g.push(t))});const y=!0!==c&&o.length>4,z=!0===t&&h.length>0&&-1===o.findIndex(e=>e===h),O=u.length===l;function x(e){return`rsz-${n}-${e}`}function k(e){return x(`option-${e}`)}function w(e,t){if(e){const a=e.querySelector(t);a&&a.scrollIntoView(!1)}}function K(e){if(!0===r){let t=[...u];const a=t.indexOf(e);return-1!==a?t.splice(a,1):t.length<l&&t.push(e),-1!==o.indexOf(e)&&(t=o.filter(e=>-1!==t.indexOf(e))),void s(t)}s([e]),N(!1)}return React.useEffect(()=>{f.current&&b&&f.current.focus()}),React.useEffect(()=>{-1===g.indexOf(p)&&E(g[0])},[p,g]),React__default.createElement("div",Object.assign({"aria-expanded":!0===b,"aria-multiselectable":!0===r||void 0,className:a,role:"listbox"},_),React__default.createElement("div",{className:"rsz__trigger"},React__default.createElement("button",{"aria-controls":x("menu"),"aria-haspopup":"listbox",className:"rsz__trigger-button",onClick:()=>N(!0),onKeyDown:e=>{e.key===KEY.DOWN&&N(!0)},ref:m,type:"button"},!0===r?`Select options for ${n}`:`Select an option for ${n}`,React__default.createElement("span",{"aria-hidden":!0,className:"rsz__arrow"},"↓")),u.length>0?React__default.createElement("ul",{className:"rsz__selection"},u.map(e=>React__default.createElement("li",{key:e,className:"rsz__selected"},React__default.createElement("span",{className:"rsz__selected-text"},e),React__default.createElement("button",{"aria-label":`remove ${e}`,className:"rsz__selected-action",onClick:()=>K(e),type:"button"},"✕")))):React__default.createElement("div",{className:"rsz__selection rsz__placeholder"},i)),React__default.createElement("div",{"aria-label":"Close dropdown",className:"rsz__overlay",onClick:()=>N(!1)}),React__default.createElement("menu",{id:x("menu"),className:"rsz__dropdown-wrapper"},React__default.createElement("div",{className:"rsz__dropdown"},React__default.createElement("input",{"aria-activedescendant":k(p),"aria-hidden":!1===y||void 0,"aria-label":"Filter options",className:"rsz__search",onChange:e=>R(e.target.value),onKeyDown:function(e){const t=g[0],a=g[g.length-1];switch(e.key){case KEY.ENTER:e.preventDefault(),K(o[p]);break;case KEY.DOWN:case KEY.UP:{e.preventDefault();const l=e.key===KEY.UP?-1:1,r=e.key===KEY.UP?a:t,n=g.indexOf(p)+l,c=void 0!==g[n]?g[n]:r;E(c),w(d.current,`#${k(c)}`);break}case KEY.END:case KEY.HOME:{const l=e.key===KEY.HOME?t:a;E(l),w(d.current,`#${k(l)}`);break}case KEY.ESC:case KEY.TAB:N(!1);break;default:c&&e.preventDefault()}},ref:f,type:"search",value:h}),React__default.createElement("div",{className:"rsz__search-icon"}),React__default.createElement("ul",{className:"rsz__option-list",ref:d},v.map((e,t)=>{const a=-1!==u.indexOf(e);let l=a;return!1===l&&!0===O&&(l=void 0),React__default.createElement("li",{className:"rsz__option",key:e},React__default.createElement("button",{"aria-selected":l,"data-highlighted":p===g[t]||void 0,disabled:O&&!a,id:k(g[t]),onClick:()=>K(e),role:"option",type:"button"},e))}),o.length>0&&0===v.length&&React__default.createElement("span",{className:"rsz__no-results"},"No results for “",h,"”"),z&&React__default.createElement("li",{className:"rsz__option"},React__default.createElement("button",{className:"rsz__create","data-highlighted":p===o.length||void 0,disabled:O,id:k(o.length),onClick:()=>K(h),type:"button"},"Create ",React__default.createElement("span",{className:"rsz__search-term"},h))),!0===t&&""===h&&React__default.createElement("li",{className:"rsz__option"},React__default.createElement("span",{className:"rsz__create"},"Start typing to create an item"))))),React__default.createElement("input",{type:"hidden",name:n,value:u.join(",")}))};exports.default=SelectZero; |
@@ -9,2 +9,3 @@ import React, { useState, useRef, useEffect } from 'react'; | ||
KEY["HOME"] = "Home"; | ||
KEY["TAB"] = "Tab"; | ||
KEY["UP"] = "ArrowUp"; | ||
@@ -101,6 +102,11 @@ })(KEY || (KEY = {})); | ||
} | ||
// close | ||
// close on Escape | ||
case KEY.ESC: | ||
setIsOpen(false); | ||
break; | ||
// close if tabbing away | ||
case KEY.TAB: | ||
setIsOpen(false); | ||
break; | ||
// prevent typing if search hidden | ||
default: | ||
@@ -107,0 +113,0 @@ if (noSearch) { |
@@ -47,2 +47,3 @@ import React, { useRef, useState, useEffect } from 'react'; | ||
KEY["HOME"] = "Home"; | ||
KEY["TAB"] = "Tab"; | ||
KEY["UP"] = "ArrowUp"; | ||
@@ -169,3 +170,3 @@ })(KEY || (KEY = {})); | ||
} | ||
// close | ||
// close on Escape | ||
@@ -175,3 +176,9 @@ case KEY.ESC: | ||
break; | ||
// close if tabbing away | ||
case KEY.TAB: | ||
setIsOpen(false); | ||
break; | ||
// prevent typing if search hidden | ||
default: | ||
@@ -178,0 +185,0 @@ if (noSearch) { |
@@ -1,1 +0,1 @@ | ||
import React,{useRef,useState,useEffect}from"react";function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var a,n,r={},c=Object.keys(e);for(n=0;n<c.length;n++)a=c[n],t.indexOf(a)>=0||(r[a]=e[a]);return r}function _objectWithoutProperties(e,t){if(null==e)return{};var a,n,r=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)a=c[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var KEY;!function(e){e.DOWN="ArrowDown",e.END="End",e.ENTER="Enter",e.ESC="Escape",e.HOME="Home",e.UP="ArrowUp"}(KEY||(KEY={}));const SelectZero=e=>{let{allowCreate:t=!1,className:a="rsz",max:n=1/0,multi:r=!1,name:c,noSearch:s=!1,onChange:l,options:o,placeholder:i="Select",value:u=[]}=e,m=_objectWithoutProperties(e,["allowCreate","className","max","multi","name","noSearch","onChange","options","placeholder","value"]);const p=useRef(null),d=useRef(null),E=useRef(null),[f,_]=useState(0),[h,b]=useState(""),[N,R]=useState(!1),g=[],v=[];o.forEach((e,t)=>{new RegExp(h,"i").test(e)&&(v.push(e),g.push(t))});const y=!0!==s&&o.length>4,z=!0===t&&h.length>0&&-1===o.findIndex(e=>e===h),O=u.length===n;function k(e){return"rsz-".concat(c,"-").concat(e)}function w(e){return k("option-".concat(e))}function x(e,t){if(e){const a=e.querySelector(t);a&&a.scrollIntoView(!1)}}function S(e){if(!0===r){let t=[...u];const a=t.indexOf(e);return-1!==a?t.splice(a,1):t.length<n&&t.push(e),-1!==o.indexOf(e)&&(t=o.filter(e=>-1!==t.indexOf(e))),void l(t)}l([e]),R(!1)}return useEffect(()=>{d.current&&N&&d.current.focus()}),useEffect(()=>{-1===g.indexOf(f)&&_(g[0])},[f,g]),React.createElement("div",Object.assign({"aria-expanded":!0===N,"aria-multiselectable":!0===r||void 0,className:a,role:"listbox"},m),React.createElement("div",{className:"rsz__trigger"},React.createElement("button",{"aria-controls":k("menu"),"aria-haspopup":"listbox",className:"rsz__trigger-button",onClick:()=>R(!0),onKeyDown:e=>{e.key===KEY.DOWN&&R(!0)},ref:E,type:"button"},!0===r?"Select options for ".concat(c):"Select an option for ".concat(c),React.createElement("span",{"aria-hidden":!0,className:"rsz__arrow"},"↓")),u.length>0?React.createElement("ul",{className:"rsz__selection"},u.map(e=>React.createElement("li",{key:e,className:"rsz__selected"},React.createElement("span",{className:"rsz__selected-text"},e),React.createElement("button",{"aria-label":"remove ".concat(e),className:"rsz__selected-action",onClick:()=>S(e),type:"button"},"✕")))):React.createElement("div",{className:"rsz__selection rsz__placeholder"},i)),React.createElement("div",{"aria-label":"Close dropdown",className:"rsz__overlay",onClick:()=>R(!1)}),React.createElement("menu",{id:k("menu"),className:"rsz__dropdown-wrapper"},React.createElement("div",{className:"rsz__dropdown"},React.createElement("input",{"aria-activedescendant":w(f),"aria-hidden":!1===y||void 0,"aria-label":"Filter options",className:"rsz__search",onChange:e=>b(e.target.value),onKeyDown:function(e){const t=g[0],a=g[g.length-1];switch(e.key){case KEY.ENTER:e.preventDefault(),S(o[f]);break;case KEY.DOWN:case KEY.UP:{e.preventDefault();const n=e.key===KEY.UP?-1:1,r=e.key===KEY.UP?a:t,c=g.indexOf(f)+n,s=void 0!==g[c]?g[c]:r;_(s),x(p.current,"#".concat(w(s)));break}case KEY.END:case KEY.HOME:{const n=e.key===KEY.HOME?t:a;_(n),x(p.current,"#".concat(w(n)));break}case KEY.ESC:R(!1);break;default:s&&e.preventDefault()}},ref:d,type:"search",value:h}),React.createElement("div",{className:"rsz__search-icon"}),React.createElement("ul",{className:"rsz__option-list",ref:p},v.map((e,t)=>{const a=-1!==u.indexOf(e);let n=a;return!1===n&&!0===O&&(n=void 0),React.createElement("li",{className:"rsz__option",key:e},React.createElement("button",{"aria-selected":n,"data-highlighted":f===g[t]||void 0,disabled:O&&!a,id:w(g[t]),onClick:()=>S(e),role:"option",type:"button"},e))}),o.length>0&&0===v.length&&React.createElement("span",{className:"rsz__no-results"},"No results for “",h,"”"),z&&React.createElement("li",{className:"rsz__option"},React.createElement("button",{className:"rsz__create","data-highlighted":f===o.length||void 0,disabled:O,id:w(o.length),onClick:()=>S(h),type:"button"},"Create ",React.createElement("span",{className:"rsz__search-term"},h))),!0===t&&""===h&&React.createElement("li",{className:"rsz__option"},React.createElement("span",{className:"rsz__create"},"Start typing to create an item"))))),React.createElement("input",{type:"hidden",name:c,value:u.join(",")}))};export default SelectZero; | ||
import React,{useRef,useState,useEffect}from"react";function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var a,n,r={},c=Object.keys(e);for(n=0;n<c.length;n++)a=c[n],t.indexOf(a)>=0||(r[a]=e[a]);return r}function _objectWithoutProperties(e,t){if(null==e)return{};var a,n,r=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)a=c[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var KEY;!function(e){e.DOWN="ArrowDown",e.END="End",e.ENTER="Enter",e.ESC="Escape",e.HOME="Home",e.TAB="Tab",e.UP="ArrowUp"}(KEY||(KEY={}));const SelectZero=e=>{let{allowCreate:t=!1,className:a="rsz",max:n=1/0,multi:r=!1,name:c,noSearch:s=!1,onChange:l,options:o,placeholder:i="Select",value:u=[]}=e,m=_objectWithoutProperties(e,["allowCreate","className","max","multi","name","noSearch","onChange","options","placeholder","value"]);const p=useRef(null),d=useRef(null),E=useRef(null),[f,_]=useState(0),[h,b]=useState(""),[N,R]=useState(!1),g=[],v=[];o.forEach((e,t)=>{new RegExp(h,"i").test(e)&&(v.push(e),g.push(t))});const y=!0!==s&&o.length>4,z=!0===t&&h.length>0&&-1===o.findIndex(e=>e===h),O=u.length===n;function k(e){return"rsz-".concat(c,"-").concat(e)}function w(e){return k("option-".concat(e))}function x(e,t){if(e){const a=e.querySelector(t);a&&a.scrollIntoView(!1)}}function S(e){if(!0===r){let t=[...u];const a=t.indexOf(e);return-1!==a?t.splice(a,1):t.length<n&&t.push(e),-1!==o.indexOf(e)&&(t=o.filter(e=>-1!==t.indexOf(e))),void l(t)}l([e]),R(!1)}return useEffect(()=>{d.current&&N&&d.current.focus()}),useEffect(()=>{-1===g.indexOf(f)&&_(g[0])},[f,g]),React.createElement("div",Object.assign({"aria-expanded":!0===N,"aria-multiselectable":!0===r||void 0,className:a,role:"listbox"},m),React.createElement("div",{className:"rsz__trigger"},React.createElement("button",{"aria-controls":k("menu"),"aria-haspopup":"listbox",className:"rsz__trigger-button",onClick:()=>R(!0),onKeyDown:e=>{e.key===KEY.DOWN&&R(!0)},ref:E,type:"button"},!0===r?"Select options for ".concat(c):"Select an option for ".concat(c),React.createElement("span",{"aria-hidden":!0,className:"rsz__arrow"},"↓")),u.length>0?React.createElement("ul",{className:"rsz__selection"},u.map(e=>React.createElement("li",{key:e,className:"rsz__selected"},React.createElement("span",{className:"rsz__selected-text"},e),React.createElement("button",{"aria-label":"remove ".concat(e),className:"rsz__selected-action",onClick:()=>S(e),type:"button"},"✕")))):React.createElement("div",{className:"rsz__selection rsz__placeholder"},i)),React.createElement("div",{"aria-label":"Close dropdown",className:"rsz__overlay",onClick:()=>R(!1)}),React.createElement("menu",{id:k("menu"),className:"rsz__dropdown-wrapper"},React.createElement("div",{className:"rsz__dropdown"},React.createElement("input",{"aria-activedescendant":w(f),"aria-hidden":!1===y||void 0,"aria-label":"Filter options",className:"rsz__search",onChange:e=>b(e.target.value),onKeyDown:function(e){const t=g[0],a=g[g.length-1];switch(e.key){case KEY.ENTER:e.preventDefault(),S(o[f]);break;case KEY.DOWN:case KEY.UP:{e.preventDefault();const n=e.key===KEY.UP?-1:1,r=e.key===KEY.UP?a:t,c=g.indexOf(f)+n,s=void 0!==g[c]?g[c]:r;_(s),x(p.current,"#".concat(w(s)));break}case KEY.END:case KEY.HOME:{const n=e.key===KEY.HOME?t:a;_(n),x(p.current,"#".concat(w(n)));break}case KEY.ESC:case KEY.TAB:R(!1);break;default:s&&e.preventDefault()}},ref:d,type:"search",value:h}),React.createElement("div",{className:"rsz__search-icon"}),React.createElement("ul",{className:"rsz__option-list",ref:p},v.map((e,t)=>{const a=-1!==u.indexOf(e);let n=a;return!1===n&&!0===O&&(n=void 0),React.createElement("li",{className:"rsz__option",key:e},React.createElement("button",{"aria-selected":n,"data-highlighted":f===g[t]||void 0,disabled:O&&!a,id:w(g[t]),onClick:()=>S(e),role:"option",type:"button"},e))}),o.length>0&&0===v.length&&React.createElement("span",{className:"rsz__no-results"},"No results for “",h,"”"),z&&React.createElement("li",{className:"rsz__option"},React.createElement("button",{className:"rsz__create","data-highlighted":f===o.length||void 0,disabled:O,id:w(o.length),onClick:()=>S(h),type:"button"},"Create ",React.createElement("span",{className:"rsz__search-term"},h))),!0===t&&""===h&&React.createElement("li",{className:"rsz__option"},React.createElement("span",{className:"rsz__create"},"Start typing to create an item"))))),React.createElement("input",{type:"hidden",name:c,value:u.join(",")}))};export default SelectZero; |
{ | ||
"name": "@manifoldco/react-select-zero", | ||
"description": "Zero-dependency, a11y multiselect React component", | ||
"version": "0.0.1-2", | ||
"version": "0.0.1-3", | ||
"license": "ISC", | ||
@@ -6,0 +6,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59173
721