diff --git a/pull/2158/1440-f49ceddb4143bbcbdfd0.css b/pull/2158/1440-9f901811f495954f7b4e.css similarity index 100% rename from pull/2158/1440-f49ceddb4143bbcbdfd0.css rename to pull/2158/1440-9f901811f495954f7b4e.css diff --git a/pull/2158/1440-f49ceddb4143bbcbdfd0.js b/pull/2158/1440-9f901811f495954f7b4e.js similarity index 73% rename from pull/2158/1440-f49ceddb4143bbcbdfd0.js rename to pull/2158/1440-9f901811f495954f7b4e.js index 102e55e1671..ac14be8021e 100644 --- a/pull/2158/1440-f49ceddb4143bbcbdfd0.js +++ b/pull/2158/1440-9f901811f495954f7b4e.js @@ -1 +1 @@ -"use strict";(self.webpackChunkterra_framework=self.webpackChunkterra_framework||[]).push([[1440],{1440:function(e,t,l){var a=l(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(l(96540)),i=a(l(67967)),o=a(l(93089)),n=a(l(51866)),u=a(l(51680)),d=i.default.bind(o.default);t.default=function(){return r.default.createElement(n.default,{data:u.default.slice(0,3),ariaLabel:"Example of selectable and removable Filter Pills",className:d(["show-border","width-10"])})}},51680:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=[{label:"asthma",labelCategory:"respiratory",id:"terra-filter-pills-asthma"},{label:"bronchitis",labelCategory:"respiratory",id:"terra-filter-pills-bronchitis"},{label:"fibro",labelCategory:"respiratory",id:"terra-filter-pills-fibro"},{label:"allergies",labelCategory:"skin",id:"terra-filter-pills-allergies"},{label:"hypertension",labelCategory:"cardio",id:"terra-filter-pills-hypertension"},{label:"cardiac",labelCategory:"cardio",id:"terra-filter-pills-cardiac"}]},51866:function(e,t,l){var a=l(24994),r=l(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(l(41132)),o=a(l(85715)),n=f(l(96540)),u=a(l(5556)),d=f(l(90180));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,l=new WeakMap;return(s=function(e){return e?l:t})(e)}function f(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var l=s(t);if(l&&l.has(e))return l.get(e);var a={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var n=i?Object.getOwnPropertyDescriptor(e,o):null;n&&(n.get||n.set)?Object.defineProperty(a,o,n):a[o]=e[o]}return a.default=e,l&&l.set(e,a),a}var c={ariaLabel:u.default.string,className:u.default.string,data:u.default.array,isCollapsible:u.default.bool},p=function(e){var t=e.data,l=e.ariaLabel,a=e.className,r=e.isCollapsible,u=(0,n.useState)(t),s=(0,o.default)(u,2),f=s[0],c=s[1],p=(0,n.useState)(0),b=(0,o.default)(p,2),_=b[0],m=b[1];return n.default.createElement(n.default.Fragment,null,n.default.createElement(d.default,{ariaLabel:l,onRemove:function(e,t){var l=f;l.splice(t.index,1),c((0,i.default)(l))},className:a,isCollapsible:r},f.map((function(e,t){return n.default.createElement(d.Pill,{label:e.label,labelCategory:e.labelCategory,id:e.id,key:e.id,metaData:{index:t}})}))),f.length<=0&&n.default.createElement("button",{type:"button",onClick:function(){return c(t)}},"Show Pills"),r&&n.default.createElement("button",{type:"button",onClick:function(){var e=f,t={label:"test-pill- ".concat(_),id:"test-filter-pills-test-".concat(_)};m((function(e){return e+1})),e.push(t),c(e)}}," Add more pills"))};p.propTypes=c,p.defaultProps={isCollapsible:!1};t.default=p},93089:function(e,t,l){l.r(t),t.default={"spacing-wrapper":"FilterPillsTestCommon-module__spacing-wrapper___VtTUh",container:"FilterPillsTestCommon-module__container___kHV-K","show-border":"FilterPillsTestCommon-module__show-border___zbvfC","width-50":"FilterPillsTestCommon-module__width-50___+OPfT","width-10":"FilterPillsTestCommon-module__width-10___mO70v",hidden:"FilterPillsTestCommon-module__hidden___+-b03"}}}]); \ No newline at end of file +"use strict";(self.webpackChunkterra_framework=self.webpackChunkterra_framework||[]).push([[1440],{1440:function(e,t,l){var a=l(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(l(96540)),i=a(l(67967)),o=a(l(93089)),n=a(l(51866)),u=a(l(51680)),d=i.default.bind(o.default);t.default=function(){return r.default.createElement(n.default,{data:u.default.slice(0,3),ariaLabel:"Example of selectable and removable Filter Pills",className:d(["show-border","width-10"])})}},51680:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=[{label:"asthma",labelCategory:"respiratory",id:"terra-filter-pills-asthma"},{label:"bronchitis",labelCategory:"respiratory",id:"terra-filter-pills-bronchitis"},{label:"fibro",labelCategory:"respiratory",id:"terra-filter-pills-fibro"},{label:"allergies",labelCategory:"skin",id:"terra-filter-pills-allergies"},{label:"hypertension",labelCategory:"cardio",id:"terra-filter-pills-hypertension"},{label:"cardiac",labelCategory:"cardio",id:"terra-filter-pills-cardiac"}]},51866:function(e,t,l){var a=l(24994),r=l(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(l(41132)),o=a(l(85715)),n=f(l(96540)),u=a(l(5556)),d=f(l(90180));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,l=new WeakMap;return(s=function(e){return e?l:t})(e)}function f(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var l=s(t);if(l&&l.has(e))return l.get(e);var a={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var n=i?Object.getOwnPropertyDescriptor(e,o):null;n&&(n.get||n.set)?Object.defineProperty(a,o,n):a[o]=e[o]}return a.default=e,l&&l.set(e,a),a}var c={ariaLabel:u.default.string,className:u.default.string,data:u.default.array,isCollapsible:u.default.bool},p=function(e){var t=e.data,l=e.ariaLabel,a=e.className,r=e.isCollapsible,u=(0,n.useState)(t),s=(0,o.default)(u,2),f=s[0],c=s[1],p=(0,n.useState)(0),b=(0,o.default)(p,2),_=b[0],m=b[1];return n.default.createElement(n.default.Fragment,null,n.default.createElement(d.default,{ariaLabel:l,onRemove:function(e,t){var l=f;l.splice(t.index,1),c((0,i.default)(l))},className:a,isCollapsible:r},f.map((function(e,t){return n.default.createElement(d.Pill,{label:e.label,labelCategory:e.labelCategory,id:e.id,key:e.id,metaData:{index:t},isPopupHeaderDisabled:!1})}))),f.length<=0&&n.default.createElement("button",{type:"button",onClick:function(){return c(t)}},"Show Pills"),r&&n.default.createElement("button",{type:"button",onClick:function(){var e=f,t={label:"test-pill- ".concat(_),id:"test-filter-pills-test-".concat(_)};m((function(e){return e+1})),e.push(t),c(e)}}," Add more pills"))};p.propTypes=c,p.defaultProps={isCollapsible:!1};t.default=p},93089:function(e,t,l){l.r(t),t.default={"spacing-wrapper":"FilterPillsTestCommon-module__spacing-wrapper___VtTUh",container:"FilterPillsTestCommon-module__container___kHV-K","show-border":"FilterPillsTestCommon-module__show-border___zbvfC","width-50":"FilterPillsTestCommon-module__width-50___+OPfT","width-10":"FilterPillsTestCommon-module__width-10___mO70v",hidden:"FilterPillsTestCommon-module__hidden___+-b03"}}}]); \ No newline at end of file diff --git a/pull/2158/43121-4a97654d55b2388e3080.css b/pull/2158/43121-d48b42e992407bdc8d61.css similarity index 100% rename from pull/2158/43121-4a97654d55b2388e3080.css rename to pull/2158/43121-d48b42e992407bdc8d61.css diff --git a/pull/2158/43121-4a97654d55b2388e3080.js b/pull/2158/43121-d48b42e992407bdc8d61.js similarity index 53% rename from pull/2158/43121-4a97654d55b2388e3080.js rename to pull/2158/43121-d48b42e992407bdc8d61.js index 365ed24bf54..de250002d79 100644 --- a/pull/2158/43121-4a97654d55b2388e3080.js +++ b/pull/2158/43121-d48b42e992407bdc8d61.js @@ -1 +1 @@ -"use strict";(self.webpackChunkterra_framework=self.webpackChunkterra_framework||[]).push([[43121],{43121:function(e,t,l){var a=l(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(l(96540)),i=a(l(67967)),n=a(l(93089)),o=a(l(51866)),u=a(l(51680)),d=i.default.bind(n.default);t.default=function(){return r.default.createElement(r.default.Fragment,null,r.default.createElement(o.default,{data:u.default,ariaLabel:"Example of collapsed filter pills",isCollapsible:!0,className:d(["container","show-border","width-50"])}))}},51680:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=[{label:"asthma",labelCategory:"respiratory",id:"terra-filter-pills-asthma"},{label:"bronchitis",labelCategory:"respiratory",id:"terra-filter-pills-bronchitis"},{label:"fibro",labelCategory:"respiratory",id:"terra-filter-pills-fibro"},{label:"allergies",labelCategory:"skin",id:"terra-filter-pills-allergies"},{label:"hypertension",labelCategory:"cardio",id:"terra-filter-pills-hypertension"},{label:"cardiac",labelCategory:"cardio",id:"terra-filter-pills-cardiac"}]},51866:function(e,t,l){var a=l(24994),r=l(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(l(41132)),n=a(l(85715)),o=f(l(96540)),u=a(l(5556)),d=f(l(90180));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,l=new WeakMap;return(s=function(e){return e?l:t})(e)}function f(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var l=s(t);if(l&&l.has(e))return l.get(e);var a={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&{}.hasOwnProperty.call(e,n)){var o=i?Object.getOwnPropertyDescriptor(e,n):null;o&&(o.get||o.set)?Object.defineProperty(a,n,o):a[n]=e[n]}return a.default=e,l&&l.set(e,a),a}var c={ariaLabel:u.default.string,className:u.default.string,data:u.default.array,isCollapsible:u.default.bool},p=function(e){var t=e.data,l=e.ariaLabel,a=e.className,r=e.isCollapsible,u=(0,o.useState)(t),s=(0,n.default)(u,2),f=s[0],c=s[1],p=(0,o.useState)(0),b=(0,n.default)(p,2),_=b[0],m=b[1];return o.default.createElement(o.default.Fragment,null,o.default.createElement(d.default,{ariaLabel:l,onRemove:function(e,t){var l=f;l.splice(t.index,1),c((0,i.default)(l))},className:a,isCollapsible:r},f.map((function(e,t){return o.default.createElement(d.Pill,{label:e.label,labelCategory:e.labelCategory,id:e.id,key:e.id,metaData:{index:t}})}))),f.length<=0&&o.default.createElement("button",{type:"button",onClick:function(){return c(t)}},"Show Pills"),r&&o.default.createElement("button",{type:"button",onClick:function(){var e=f,t={label:"test-pill- ".concat(_),id:"test-filter-pills-test-".concat(_)};m((function(e){return e+1})),e.push(t),c(e)}}," Add more pills"))};p.propTypes=c,p.defaultProps={isCollapsible:!1};t.default=p},93089:function(e,t,l){l.r(t),t.default={"spacing-wrapper":"FilterPillsTestCommon-module__spacing-wrapper___VtTUh",container:"FilterPillsTestCommon-module__container___kHV-K","show-border":"FilterPillsTestCommon-module__show-border___zbvfC","width-50":"FilterPillsTestCommon-module__width-50___+OPfT","width-10":"FilterPillsTestCommon-module__width-10___mO70v",hidden:"FilterPillsTestCommon-module__hidden___+-b03"}}}]); \ No newline at end of file +"use strict";(self.webpackChunkterra_framework=self.webpackChunkterra_framework||[]).push([[43121],{43121:function(e,t,l){var a=l(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(l(96540)),i=a(l(67967)),o=a(l(93089)),n=a(l(51866)),u=a(l(51680)),d=i.default.bind(o.default);t.default=function(){return r.default.createElement(r.default.Fragment,null,r.default.createElement(n.default,{data:u.default,ariaLabel:"Example of collapsed filter pills",isCollapsible:!0,className:d(["container","show-border","width-50"])}))}},51680:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=[{label:"asthma",labelCategory:"respiratory",id:"terra-filter-pills-asthma"},{label:"bronchitis",labelCategory:"respiratory",id:"terra-filter-pills-bronchitis"},{label:"fibro",labelCategory:"respiratory",id:"terra-filter-pills-fibro"},{label:"allergies",labelCategory:"skin",id:"terra-filter-pills-allergies"},{label:"hypertension",labelCategory:"cardio",id:"terra-filter-pills-hypertension"},{label:"cardiac",labelCategory:"cardio",id:"terra-filter-pills-cardiac"}]},51866:function(e,t,l){var a=l(24994),r=l(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(l(41132)),o=a(l(85715)),n=f(l(96540)),u=a(l(5556)),d=f(l(90180));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,l=new WeakMap;return(s=function(e){return e?l:t})(e)}function f(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var l=s(t);if(l&&l.has(e))return l.get(e);var a={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var n=i?Object.getOwnPropertyDescriptor(e,o):null;n&&(n.get||n.set)?Object.defineProperty(a,o,n):a[o]=e[o]}return a.default=e,l&&l.set(e,a),a}var c={ariaLabel:u.default.string,className:u.default.string,data:u.default.array,isCollapsible:u.default.bool},p=function(e){var t=e.data,l=e.ariaLabel,a=e.className,r=e.isCollapsible,u=(0,n.useState)(t),s=(0,o.default)(u,2),f=s[0],c=s[1],p=(0,n.useState)(0),b=(0,o.default)(p,2),_=b[0],m=b[1];return n.default.createElement(n.default.Fragment,null,n.default.createElement(d.default,{ariaLabel:l,onRemove:function(e,t){var l=f;l.splice(t.index,1),c((0,i.default)(l))},className:a,isCollapsible:r},f.map((function(e,t){return n.default.createElement(d.Pill,{label:e.label,labelCategory:e.labelCategory,id:e.id,key:e.id,metaData:{index:t},isPopupHeaderDisabled:!1})}))),f.length<=0&&n.default.createElement("button",{type:"button",onClick:function(){return c(t)}},"Show Pills"),r&&n.default.createElement("button",{type:"button",onClick:function(){var e=f,t={label:"test-pill- ".concat(_),id:"test-filter-pills-test-".concat(_)};m((function(e){return e+1})),e.push(t),c(e)}}," Add more pills"))};p.propTypes=c,p.defaultProps={isCollapsible:!1};t.default=p},93089:function(e,t,l){l.r(t),t.default={"spacing-wrapper":"FilterPillsTestCommon-module__spacing-wrapper___VtTUh",container:"FilterPillsTestCommon-module__container___kHV-K","show-border":"FilterPillsTestCommon-module__show-border___zbvfC","width-50":"FilterPillsTestCommon-module__width-50___+OPfT","width-10":"FilterPillsTestCommon-module__width-10___mO70v",hidden:"FilterPillsTestCommon-module__hidden___+-b03"}}}]); \ No newline at end of file diff --git a/pull/2158/53476-6702a7fa7bbc9e0ab838.css b/pull/2158/53476-8827384f7b1dc96a3351.css similarity index 100% rename from pull/2158/53476-6702a7fa7bbc9e0ab838.css rename to pull/2158/53476-8827384f7b1dc96a3351.css diff --git a/pull/2158/53476-6702a7fa7bbc9e0ab838.js b/pull/2158/53476-8827384f7b1dc96a3351.js similarity index 72% rename from pull/2158/53476-6702a7fa7bbc9e0ab838.js rename to pull/2158/53476-8827384f7b1dc96a3351.js index 612c86389d8..8c07bd5ef1c 100644 --- a/pull/2158/53476-6702a7fa7bbc9e0ab838.js +++ b/pull/2158/53476-8827384f7b1dc96a3351.js @@ -1 +1 @@ -"use strict";(self.webpackChunkterra_framework=self.webpackChunkterra_framework||[]).push([[53476],{53476:function(e,t,l){var a=l(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(l(96540)),i=a(l(67967)),o=a(l(51866)),n=a(l(51680)),u=a(l(93089)),s=i.default.bind(u.default);t.default=function(){return r.default.createElement(o.default,{data:n.default.slice(0,3),ariaLabel:"Example of removable Pills",className:s(["show-border"])})}},51680:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=[{label:"asthma",labelCategory:"respiratory",id:"terra-filter-pills-asthma"},{label:"bronchitis",labelCategory:"respiratory",id:"terra-filter-pills-bronchitis"},{label:"fibro",labelCategory:"respiratory",id:"terra-filter-pills-fibro"},{label:"allergies",labelCategory:"skin",id:"terra-filter-pills-allergies"},{label:"hypertension",labelCategory:"cardio",id:"terra-filter-pills-hypertension"},{label:"cardiac",labelCategory:"cardio",id:"terra-filter-pills-cardiac"}]},51866:function(e,t,l){var a=l(24994),r=l(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(l(41132)),o=a(l(85715)),n=f(l(96540)),u=a(l(5556)),s=f(l(90180));function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,l=new WeakMap;return(d=function(e){return e?l:t})(e)}function f(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var l=d(t);if(l&&l.has(e))return l.get(e);var a={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var n=i?Object.getOwnPropertyDescriptor(e,o):null;n&&(n.get||n.set)?Object.defineProperty(a,o,n):a[o]=e[o]}return a.default=e,l&&l.set(e,a),a}var c={ariaLabel:u.default.string,className:u.default.string,data:u.default.array,isCollapsible:u.default.bool},p=function(e){var t=e.data,l=e.ariaLabel,a=e.className,r=e.isCollapsible,u=(0,n.useState)(t),d=(0,o.default)(u,2),f=d[0],c=d[1],p=(0,n.useState)(0),b=(0,o.default)(p,2),_=b[0],m=b[1];return n.default.createElement(n.default.Fragment,null,n.default.createElement(s.default,{ariaLabel:l,onRemove:function(e,t){var l=f;l.splice(t.index,1),c((0,i.default)(l))},className:a,isCollapsible:r},f.map((function(e,t){return n.default.createElement(s.Pill,{label:e.label,labelCategory:e.labelCategory,id:e.id,key:e.id,metaData:{index:t}})}))),f.length<=0&&n.default.createElement("button",{type:"button",onClick:function(){return c(t)}},"Show Pills"),r&&n.default.createElement("button",{type:"button",onClick:function(){var e=f,t={label:"test-pill- ".concat(_),id:"test-filter-pills-test-".concat(_)};m((function(e){return e+1})),e.push(t),c(e)}}," Add more pills"))};p.propTypes=c,p.defaultProps={isCollapsible:!1};t.default=p},93089:function(e,t,l){l.r(t),t.default={"spacing-wrapper":"FilterPillsTestCommon-module__spacing-wrapper___VtTUh",container:"FilterPillsTestCommon-module__container___kHV-K","show-border":"FilterPillsTestCommon-module__show-border___zbvfC","width-50":"FilterPillsTestCommon-module__width-50___+OPfT","width-10":"FilterPillsTestCommon-module__width-10___mO70v",hidden:"FilterPillsTestCommon-module__hidden___+-b03"}}}]); \ No newline at end of file +"use strict";(self.webpackChunkterra_framework=self.webpackChunkterra_framework||[]).push([[53476],{53476:function(e,t,l){var a=l(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(l(96540)),i=a(l(67967)),o=a(l(51866)),n=a(l(51680)),u=a(l(93089)),s=i.default.bind(u.default);t.default=function(){return r.default.createElement(o.default,{data:n.default.slice(0,3),ariaLabel:"Example of removable Pills",className:s(["show-border"])})}},51680:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=[{label:"asthma",labelCategory:"respiratory",id:"terra-filter-pills-asthma"},{label:"bronchitis",labelCategory:"respiratory",id:"terra-filter-pills-bronchitis"},{label:"fibro",labelCategory:"respiratory",id:"terra-filter-pills-fibro"},{label:"allergies",labelCategory:"skin",id:"terra-filter-pills-allergies"},{label:"hypertension",labelCategory:"cardio",id:"terra-filter-pills-hypertension"},{label:"cardiac",labelCategory:"cardio",id:"terra-filter-pills-cardiac"}]},51866:function(e,t,l){var a=l(24994),r=l(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(l(41132)),o=a(l(85715)),n=f(l(96540)),u=a(l(5556)),s=f(l(90180));function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,l=new WeakMap;return(d=function(e){return e?l:t})(e)}function f(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var l=d(t);if(l&&l.has(e))return l.get(e);var a={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var n=i?Object.getOwnPropertyDescriptor(e,o):null;n&&(n.get||n.set)?Object.defineProperty(a,o,n):a[o]=e[o]}return a.default=e,l&&l.set(e,a),a}var c={ariaLabel:u.default.string,className:u.default.string,data:u.default.array,isCollapsible:u.default.bool},p=function(e){var t=e.data,l=e.ariaLabel,a=e.className,r=e.isCollapsible,u=(0,n.useState)(t),d=(0,o.default)(u,2),f=d[0],c=d[1],p=(0,n.useState)(0),b=(0,o.default)(p,2),_=b[0],m=b[1];return n.default.createElement(n.default.Fragment,null,n.default.createElement(s.default,{ariaLabel:l,onRemove:function(e,t){var l=f;l.splice(t.index,1),c((0,i.default)(l))},className:a,isCollapsible:r},f.map((function(e,t){return n.default.createElement(s.Pill,{label:e.label,labelCategory:e.labelCategory,id:e.id,key:e.id,metaData:{index:t},isPopupHeaderDisabled:!1})}))),f.length<=0&&n.default.createElement("button",{type:"button",onClick:function(){return c(t)}},"Show Pills"),r&&n.default.createElement("button",{type:"button",onClick:function(){var e=f,t={label:"test-pill- ".concat(_),id:"test-filter-pills-test-".concat(_)};m((function(e){return e+1})),e.push(t),c(e)}}," Add more pills"))};p.propTypes=c,p.defaultProps={isCollapsible:!1};t.default=p},93089:function(e,t,l){l.r(t),t.default={"spacing-wrapper":"FilterPillsTestCommon-module__spacing-wrapper___VtTUh",container:"FilterPillsTestCommon-module__container___kHV-K","show-border":"FilterPillsTestCommon-module__show-border___zbvfC","width-50":"FilterPillsTestCommon-module__width-50___+OPfT","width-10":"FilterPillsTestCommon-module__width-10___mO70v",hidden:"FilterPillsTestCommon-module__hidden___+-b03"}}}]); \ No newline at end of file diff --git a/pull/2158/76497-8e5da46e0871b2ce2af4.css b/pull/2158/76497-03df7d989bff42d21702.css similarity index 100% rename from pull/2158/76497-8e5da46e0871b2ce2af4.css rename to pull/2158/76497-03df7d989bff42d21702.css diff --git a/pull/2158/76497-8e5da46e0871b2ce2af4.js b/pull/2158/76497-03df7d989bff42d21702.js similarity index 50% rename from pull/2158/76497-8e5da46e0871b2ce2af4.js rename to pull/2158/76497-03df7d989bff42d21702.js index 8d39f7bdc74..96d87675f7e 100644 --- a/pull/2158/76497-8e5da46e0871b2ce2af4.js +++ b/pull/2158/76497-03df7d989bff42d21702.js @@ -1 +1 @@ -"use strict";(self.webpackChunkterra_framework=self.webpackChunkterra_framework||[]).push([[76497],{76497:function(e,l,t){t.r(l),t.d(l,{default:function(){return K}});var a=t(58168),n=t(53986),r=t(96540),i=t(36665),o=t(70514),s=t(74647),d=t(47849),m=t(50548),p=["components"],c={};function u(e){var l=e.components,t=(0,n.A)(e,p);return(0,i.mdx)("wrapper",(0,a.A)({},c,t,{components:l,mdxType:"MDXLayout"}),(0,i.mdx)("pre",null,(0,i.mdx)("code",{parentName:"pre",className:"language-jsx"},"import React, { useState } from 'react';\nimport classNamesBind from 'classnames/bind';\nimport { Button as DocsButton, Placeholder } from '@cerner/terra-docs';\nimport Button from 'terra-button';\nimport FilterPills, { Pill } from '@cerner/terra-pills';\nimport Text from 'terra-text';\nimport ThemeContext from 'terra-theme-context';\nimport Toolbar from 'terra-toolbar';\nimport styles from './FilterPillsCommon.module.scss';\n\nconst cx = classNamesBind.bind(styles);\n\nconst AppliedFiltersExample = () => {\n const theme = React.useContext(ThemeContext);\n\n const pillsData = [];\n for (let pillCount = 1; pillCount < 11; pillCount += 1) {\n const pillData = {\n label: `Selection ${pillCount}`,\n labelCategory: 'Category',\n id: `terra-filter-pills-category-selection-${pillCount}`,\n };\n pillsData.push(pillData);\n }\n const [pills, setPills] = useState(pillsData);\n\n const handleOnRemove = (id, metaData) => {\n const pillsArray = pills;\n pillsArray.splice(metaData.index, 1);\n setPills([...pillsArray]);\n };\n\n const handleResetClick = () => {\n setPills(pillsData);\n };\n\n const appliedFiltersLabel = 'Applied Filters:';\n\n return (\n <>\n