@algolia/autocomplete-plugin-tags 1.19.1 → 1.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/theme.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @algolia/autocomplete-plugin-tags 1.19.
|
|
1
|
+
/*! @algolia/autocomplete-plugin-tags 1.19.2 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
|
|
2
2
|
[data-autocomplete-source-id=tagsPlugin] {
|
|
3
3
|
margin-bottom: var(--aa-spacing-half);
|
|
4
4
|
}
|
package/dist/theme.min.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @algolia/autocomplete-plugin-tags 1.19.
|
|
1
|
+
/*! @algolia/autocomplete-plugin-tags 1.19.2 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
|
|
2
2
|
[data-autocomplete-source-id=tagsPlugin]{margin-bottom:var(--aa-spacing-half)}[data-autocomplete-source-id=tagsPlugin] .aa-List{display:flex;flex-wrap:wrap;margin:calc(var(--aa-spacing-half)/2*-1)}[data-autocomplete-source-id=tagsPlugin] .aa-Item{background-color:rgba(var(--aa-selected-color-rgb),var(--aa-selected-color-alpha));margin:calc(var(--aa-spacing-half)/2);min-height:auto}[data-autocomplete-source-id=tagsPlugin] .aa-Item[aria-selected=true]{background-color:rgba(var(--aa-selected-color-rgb),.55)}.aa-TagsPlugin-Tag{align-items:center;display:flex;padding-left:var(--aa-spacing-half)}.aa-TagsPlugin-TagLabel{font-size:.8em}.aa-TagsPlugin-RemoveButton{cursor:pointer}.aa-TagsPlugin-RemoveButton svg{color:rgba(var(--aa-muted-color-rgb),var(--aa-muted-color-alpha));margin:calc(var(--aa-spacing)/3);stroke-width:var(--aa-icon-stroke-width);width:calc(var(--aa-action-icon-size)/1.5)}.aa-TagsPlugin-RemoveButton:focus svg,.aa-TagsPlugin-RemoveButton:hover svg{color:rgba(var(--aa-text-color-rgb),var(--aa-text-color-alpha))}@media (hover:none) and (pointer:coarse){.aa-TagsPlugin-RemoveButton:focus,.aa-TagsPlugin-RemoveButton:hover{color:inherit}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @algolia/autocomplete-plugin-tags 1.19.
|
|
1
|
+
/*! @algolia/autocomplete-plugin-tags 1.19.2 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! @algolia/autocomplete-plugin-tags 1.19.
|
|
1
|
+
/*! @algolia/autocomplete-plugin-tags 1.19.2 | MIT License | © Algolia, Inc. and contributors | https://github.com/algolia/autocomplete */
|
|
2
2
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@algolia/autocomplete-plugin-tags"]={})}(this,(function(t){"use strict";function e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function r(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?e(Object(o),!0).forEach((function(e){n(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function n(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var u=function(){};function a(t){var e=t.initialTags,n={current:u(void 0===e?[]:e)},i=[];function u(t){return t.map((function(t){var e=r(r({},t),{},{remove:function(){var t=n.current.slice();n.current=n.current.filter((function(t){return e!==t})),i.forEach((function(e){return e({prevTags:t,tags:n.current})}))}});return e}))}return{get:function(){return n.current},set:function(t){var e=n.current.slice();n.current=u(t),i.forEach((function(t){return t({prevTags:e,tags:n.current})}))},add:function(t){var e,r=n.current.slice();(e=n.current).push.apply(e,o(u(t))),i.forEach((function(t){return t({prevTags:r,tags:n.current})}))},onChange:function(t){i.push(t)}}}function c(t){return r({initialTags:[],getTagsSubscribers:function(){return[]},transformSource:function(t){return t.source},onChange:u},t)}t.createTagsPlugin=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=c(t),n=e.initialTags,o=e.getTagsSubscribers,i=e.transformSource,u=e.onChange,s=a({initialTags:n}),f={setTags:s.set,addTags:s.add};return{name:"aa.tagsPlugin",subscribe:function(t){var e=t.setContext,n=t.onSelect,i=t.setIsOpen,a=t.refresh,c=o();e({tagsPlugin:r(r({},f),{},{tags:s.get()})}),n((function(t){var e=t.source,r=t.item,n=c.find((function(t){return t.sourceId===e.sourceId}));n&&s.add([n.getTag({item:r})])})),s.onChange((function(n){var o=n.prevTags;e({tagsPlugin:r(r({},f),{},{tags:s.get()})}),i(!0),u(r(r({},t),{},{prevTags:o,tags:s.get()})),a()}))},getSources:function(t){var e=t.state;return[i({source:{sourceId:"tagsPlugin",getItems:function(){return s.get()},onSelect:function(t){t.item.remove()},templates:{item:function(t){var e=t.item,r=t.createElement;return r("div",{className:"aa-TagsPlugin-Tag"},r("span",{className:"aa-TagsPlugin-TagLabel"},e.label),r("button",{type:"button",className:"aa-TagsPlugin-RemoveButton",title:"Remove this tag"},r("svg",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24"},r("path",{d:"M18 6L6 18"}),r("path",{d:"M6 6L18 18"}))))}}},state:e})]},data:r(r({},f),{},{get tags(){return s.get()}}),__autocomplete_pluginOptions:t}},Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
3
3
|
//# sourceMappingURL=index.production.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@algolia/autocomplete-plugin-tags",
|
|
3
3
|
"description": "A plugin to manage and display a list of tags in Algolia Autocomplete.",
|
|
4
|
-
"version": "1.19.
|
|
4
|
+
"version": "1.19.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/algolia/autocomplete",
|
|
7
7
|
"repository": "algolia/autocomplete",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"watch": "watch \"yarn on:change\" --ignoreDirectoryPattern \"/dist/\""
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@algolia/autocomplete-core": "1.19.
|
|
40
|
-
"@algolia/autocomplete-js": "1.19.
|
|
41
|
-
"@algolia/autocomplete-shared": "1.19.
|
|
39
|
+
"@algolia/autocomplete-core": "1.19.2",
|
|
40
|
+
"@algolia/autocomplete-js": "1.19.2",
|
|
41
|
+
"@algolia/autocomplete-shared": "1.19.2"
|
|
42
42
|
}
|
|
43
43
|
}
|