@coorpacademy/components 11.40.4 → 11.40.6-alpha.5

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.
Files changed (309) hide show
  1. package/es/atom/button-link/index.d.ts +15 -8
  2. package/es/atom/button-link/index.d.ts.map +1 -1
  3. package/es/atom/button-link/index.js +75 -37
  4. package/es/atom/button-link/index.js.map +1 -1
  5. package/es/atom/button-link/types.d.ts +20 -14
  6. package/es/atom/button-link/types.d.ts.map +1 -1
  7. package/es/atom/button-link/types.js +4 -3
  8. package/es/atom/button-link/types.js.map +1 -1
  9. package/es/atom/button-menu/index.d.ts +1 -3
  10. package/es/atom/button-menu/index.d.ts.map +1 -1
  11. package/es/atom/button-menu/index.js +1 -7
  12. package/es/atom/button-menu/index.js.map +1 -1
  13. package/es/atom/button-menu/types.d.ts +2 -6
  14. package/es/atom/button-menu/types.d.ts.map +1 -1
  15. package/es/atom/chip/index.d.ts +4 -0
  16. package/es/atom/chip/index.d.ts.map +1 -1
  17. package/es/atom/chip/index.js +12 -6
  18. package/es/atom/chip/index.js.map +1 -1
  19. package/es/atom/input-switch/index.d.ts.map +1 -1
  20. package/es/atom/input-switch/index.js +2 -1
  21. package/es/atom/input-switch/index.js.map +1 -1
  22. package/es/atom/input-switch/style.css +4 -1
  23. package/es/atom/radio-with-title/index.d.ts +16 -8
  24. package/es/atom/radio-with-title/index.d.ts.map +1 -1
  25. package/es/atom/radio-with-title/types.d.ts +16 -8
  26. package/es/atom/radio-with-title/types.d.ts.map +1 -1
  27. package/es/atom/title/index.d.ts +16 -8
  28. package/es/atom/title/index.d.ts.map +1 -1
  29. package/es/atom/title/index.js +5 -2
  30. package/es/atom/title/index.js.map +1 -1
  31. package/es/molecule/base-modal/index.d.ts +1 -0
  32. package/es/molecule/base-modal/index.d.ts.map +1 -1
  33. package/es/molecule/base-modal/index.js +6 -2
  34. package/es/molecule/base-modal/index.js.map +1 -1
  35. package/es/molecule/base-modal/style.css +5 -0
  36. package/es/molecule/bullet-point-menu-button/index.d.ts +1 -3
  37. package/es/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
  38. package/es/molecule/bullet-point-menu-button/types.d.ts +1 -3
  39. package/es/molecule/bullet-point-menu-button/types.d.ts.map +1 -1
  40. package/es/molecule/button-menu-action/index.d.ts +19 -11
  41. package/es/molecule/button-menu-action/index.d.ts.map +1 -1
  42. package/es/molecule/button-menu-action/index.js +27 -3
  43. package/es/molecule/button-menu-action/index.js.map +1 -1
  44. package/es/molecule/button-menu-action/types.d.ts +22 -12
  45. package/es/molecule/button-menu-action/types.d.ts.map +1 -1
  46. package/es/molecule/button-menu-action/types.js +7 -2
  47. package/es/molecule/button-menu-action/types.js.map +1 -1
  48. package/es/molecule/cm-popin/types.d.ts +135 -85
  49. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  50. package/es/molecule/expandible-actionable-table/index.d.ts +17 -14
  51. package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -1
  52. package/es/molecule/expandible-actionable-table/types.d.ts +17 -14
  53. package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -1
  54. package/es/molecule/icon-picker-modal/index.d.ts +1 -2
  55. package/es/molecule/icon-picker-modal/index.d.ts.map +1 -1
  56. package/es/molecule/icon-picker-modal/index.js +16 -43
  57. package/es/molecule/icon-picker-modal/index.js.map +1 -1
  58. package/es/molecule/multi-filter-panel/index.d.ts +19 -0
  59. package/es/molecule/multi-filter-panel/index.d.ts.map +1 -1
  60. package/es/molecule/multi-filter-panel/index.js +39 -10
  61. package/es/molecule/multi-filter-panel/index.js.map +1 -1
  62. package/es/molecule/multi-filter-panel/prop-types.d.ts +26 -1
  63. package/es/molecule/multi-filter-panel/prop-types.d.ts.map +1 -1
  64. package/es/molecule/multi-filter-panel/prop-types.js +5 -0
  65. package/es/molecule/multi-filter-panel/prop-types.js.map +1 -1
  66. package/es/molecule/multi-filter-panel/style.css +8 -0
  67. package/es/molecule/quick-filters/index.d.ts +15 -8
  68. package/es/molecule/quick-filters/index.d.ts.map +1 -1
  69. package/es/molecule/quick-filters/types.d.ts +15 -8
  70. package/es/molecule/quick-filters/types.d.ts.map +1 -1
  71. package/es/molecule/title-and-checkbox-wrapper/index.d.ts +16 -8
  72. package/es/molecule/title-radio-wrapper/index.d.ts +16 -8
  73. package/es/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  74. package/es/molecule/title-radio-wrapper/types.d.ts +16 -8
  75. package/es/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  76. package/es/organism/content-skill-modal/index.d.ts +135 -68
  77. package/es/organism/content-skill-modal/index.d.ts.map +1 -1
  78. package/es/organism/content-skill-modal/types.d.ts +135 -68
  79. package/es/organism/content-skill-modal/types.d.ts.map +1 -1
  80. package/es/organism/filter-checkbox-and-search/index.d.ts +1 -0
  81. package/es/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
  82. package/es/organism/filter-checkbox-and-search/index.js +5 -2
  83. package/es/organism/filter-checkbox-and-search/index.js.map +1 -1
  84. package/es/organism/filter-checkbox-and-search/props-types.d.ts +2 -0
  85. package/es/organism/filter-checkbox-and-search/props-types.d.ts.map +1 -1
  86. package/es/organism/filter-checkbox-and-search/props-types.js +1 -0
  87. package/es/organism/filter-checkbox-and-search/props-types.js.map +1 -1
  88. package/es/organism/filter-checkbox-and-search/style.css +2 -0
  89. package/es/organism/filter-chip/index.d.ts +3 -0
  90. package/es/organism/filter-chip/index.d.ts.map +1 -1
  91. package/es/organism/filter-chip/index.js +12 -4
  92. package/es/organism/filter-chip/index.js.map +1 -1
  93. package/es/organism/filter-chip/prop-types.d.ts +14 -7
  94. package/es/organism/filter-chip/prop-types.d.ts.map +1 -1
  95. package/es/organism/filter-chip/prop-types.js +3 -0
  96. package/es/organism/filter-chip/prop-types.js.map +1 -1
  97. package/es/organism/filter-switch/index.d.ts +23 -0
  98. package/es/organism/filter-switch/index.d.ts.map +1 -0
  99. package/es/organism/filter-switch/index.js +76 -0
  100. package/es/organism/filter-switch/index.js.map +1 -0
  101. package/es/organism/filter-switch/prop-types.d.ts +28 -0
  102. package/es/organism/filter-switch/prop-types.d.ts.map +1 -0
  103. package/es/organism/filter-switch/prop-types.js +15 -0
  104. package/es/organism/filter-switch/prop-types.js.map +1 -0
  105. package/es/organism/filter-switch/style.css +46 -0
  106. package/es/organism/icon-editor/index.d.ts +15 -8
  107. package/es/organism/icon-editor/index.d.ts.map +1 -1
  108. package/es/organism/icon-editor/types.d.ts +15 -8
  109. package/es/organism/icon-editor/types.d.ts.map +1 -1
  110. package/es/organism/list-items/index.d.ts +116 -68
  111. package/es/organism/rewards-form/index.d.ts +16 -8
  112. package/es/organism/select-opponents/index.d.ts +16 -8
  113. package/es/organism/select-opponents/index.d.ts.map +1 -1
  114. package/es/organism/select-opponents/types.d.ts +16 -8
  115. package/es/organism/select-opponents/types.d.ts.map +1 -1
  116. package/es/organism/setup-header/index.d.ts +60 -32
  117. package/es/organism/title-and-input/index.d.ts +47 -24
  118. package/es/organism/title-and-input/index.d.ts.map +1 -1
  119. package/es/organism/title-and-input/types.d.ts +47 -24
  120. package/es/organism/title-and-input/types.d.ts.map +1 -1
  121. package/es/organism/wizard-contents/index.d.ts +63 -38
  122. package/es/template/app-player/loading/index.d.ts +135 -85
  123. package/es/template/app-player/player/index.d.ts +278 -170
  124. package/es/template/app-player/player/slides/header/index.d.ts +8 -0
  125. package/es/template/app-player/player/slides/header/index.d.ts.map +1 -1
  126. package/es/template/app-player/player/slides/header/index.js +89 -3
  127. package/es/template/app-player/player/slides/header/index.js.map +1 -1
  128. package/es/template/app-player/player/slides/header/style.css +1 -1
  129. package/es/template/app-player/player/slides/index.d.ts +143 -85
  130. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  131. package/es/template/app-player/popin-correction/index.d.ts +135 -85
  132. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  133. package/es/template/app-player/popin-end/index.d.ts +143 -85
  134. package/es/template/app-review/index.d.ts +135 -85
  135. package/es/template/app-review/index.d.ts.map +1 -1
  136. package/es/template/app-review/player/prop-types.d.ts +135 -85
  137. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  138. package/es/template/app-review/prop-types.d.ts +135 -85
  139. package/es/template/app-review/prop-types.d.ts.map +1 -1
  140. package/es/template/back-office/brand-create/index.d.ts +60 -32
  141. package/es/template/back-office/brand-create/index.d.ts.map +1 -1
  142. package/es/template/back-office/brand-list/index.d.ts +60 -32
  143. package/es/template/back-office/brand-list/index.d.ts.map +1 -1
  144. package/es/template/back-office/brand-update/index.d.ts +599 -298
  145. package/es/template/back-office/dashboard-preview/index.d.ts +60 -32
  146. package/es/template/back-office/layout/index.d.ts +60 -32
  147. package/es/template/back-office/layout/index.d.ts.map +1 -1
  148. package/es/template/common/dashboard/index.d.ts +270 -170
  149. package/es/template/common/search-page/index.d.ts +135 -85
  150. package/es/template/external-course/index.d.ts +135 -85
  151. package/es/variables/colors.d.ts +1 -0
  152. package/es/variables/colors.d.ts.map +1 -1
  153. package/es/variables/colors.js +1 -0
  154. package/es/variables/colors.js.map +1 -1
  155. package/lib/atom/button-link/index.d.ts +15 -8
  156. package/lib/atom/button-link/index.d.ts.map +1 -1
  157. package/lib/atom/button-link/index.js +75 -37
  158. package/lib/atom/button-link/index.js.map +1 -1
  159. package/lib/atom/button-link/types.d.ts +20 -14
  160. package/lib/atom/button-link/types.d.ts.map +1 -1
  161. package/lib/atom/button-link/types.js +4 -3
  162. package/lib/atom/button-link/types.js.map +1 -1
  163. package/lib/atom/button-menu/index.d.ts +1 -3
  164. package/lib/atom/button-menu/index.d.ts.map +1 -1
  165. package/lib/atom/button-menu/index.js +1 -7
  166. package/lib/atom/button-menu/index.js.map +1 -1
  167. package/lib/atom/button-menu/types.d.ts +2 -6
  168. package/lib/atom/button-menu/types.d.ts.map +1 -1
  169. package/lib/atom/chip/index.d.ts +4 -0
  170. package/lib/atom/chip/index.d.ts.map +1 -1
  171. package/lib/atom/chip/index.js +12 -6
  172. package/lib/atom/chip/index.js.map +1 -1
  173. package/lib/atom/input-switch/index.d.ts.map +1 -1
  174. package/lib/atom/input-switch/index.js +2 -1
  175. package/lib/atom/input-switch/index.js.map +1 -1
  176. package/lib/atom/input-switch/style.css +4 -1
  177. package/lib/atom/radio-with-title/index.d.ts +16 -8
  178. package/lib/atom/radio-with-title/index.d.ts.map +1 -1
  179. package/lib/atom/radio-with-title/types.d.ts +16 -8
  180. package/lib/atom/radio-with-title/types.d.ts.map +1 -1
  181. package/lib/atom/title/index.d.ts +16 -8
  182. package/lib/atom/title/index.d.ts.map +1 -1
  183. package/lib/atom/title/index.js +5 -2
  184. package/lib/atom/title/index.js.map +1 -1
  185. package/lib/molecule/base-modal/index.d.ts +1 -0
  186. package/lib/molecule/base-modal/index.d.ts.map +1 -1
  187. package/lib/molecule/base-modal/index.js +6 -2
  188. package/lib/molecule/base-modal/index.js.map +1 -1
  189. package/lib/molecule/base-modal/style.css +5 -0
  190. package/lib/molecule/bullet-point-menu-button/index.d.ts +1 -3
  191. package/lib/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
  192. package/lib/molecule/bullet-point-menu-button/types.d.ts +1 -3
  193. package/lib/molecule/bullet-point-menu-button/types.d.ts.map +1 -1
  194. package/lib/molecule/button-menu-action/index.d.ts +19 -11
  195. package/lib/molecule/button-menu-action/index.d.ts.map +1 -1
  196. package/lib/molecule/button-menu-action/index.js +26 -2
  197. package/lib/molecule/button-menu-action/index.js.map +1 -1
  198. package/lib/molecule/button-menu-action/types.d.ts +22 -12
  199. package/lib/molecule/button-menu-action/types.d.ts.map +1 -1
  200. package/lib/molecule/button-menu-action/types.js +7 -2
  201. package/lib/molecule/button-menu-action/types.js.map +1 -1
  202. package/lib/molecule/cm-popin/types.d.ts +135 -85
  203. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  204. package/lib/molecule/expandible-actionable-table/index.d.ts +17 -14
  205. package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -1
  206. package/lib/molecule/expandible-actionable-table/types.d.ts +17 -14
  207. package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -1
  208. package/lib/molecule/icon-picker-modal/index.d.ts +1 -2
  209. package/lib/molecule/icon-picker-modal/index.d.ts.map +1 -1
  210. package/lib/molecule/icon-picker-modal/index.js +16 -43
  211. package/lib/molecule/icon-picker-modal/index.js.map +1 -1
  212. package/lib/molecule/multi-filter-panel/index.d.ts +19 -0
  213. package/lib/molecule/multi-filter-panel/index.d.ts.map +1 -1
  214. package/lib/molecule/multi-filter-panel/index.js +39 -9
  215. package/lib/molecule/multi-filter-panel/index.js.map +1 -1
  216. package/lib/molecule/multi-filter-panel/prop-types.d.ts +26 -1
  217. package/lib/molecule/multi-filter-panel/prop-types.d.ts.map +1 -1
  218. package/lib/molecule/multi-filter-panel/prop-types.js +5 -0
  219. package/lib/molecule/multi-filter-panel/prop-types.js.map +1 -1
  220. package/lib/molecule/multi-filter-panel/style.css +8 -0
  221. package/lib/molecule/quick-filters/index.d.ts +15 -8
  222. package/lib/molecule/quick-filters/index.d.ts.map +1 -1
  223. package/lib/molecule/quick-filters/types.d.ts +15 -8
  224. package/lib/molecule/quick-filters/types.d.ts.map +1 -1
  225. package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +16 -8
  226. package/lib/molecule/title-radio-wrapper/index.d.ts +16 -8
  227. package/lib/molecule/title-radio-wrapper/index.d.ts.map +1 -1
  228. package/lib/molecule/title-radio-wrapper/types.d.ts +16 -8
  229. package/lib/molecule/title-radio-wrapper/types.d.ts.map +1 -1
  230. package/lib/organism/content-skill-modal/index.d.ts +135 -68
  231. package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
  232. package/lib/organism/content-skill-modal/types.d.ts +135 -68
  233. package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
  234. package/lib/organism/filter-checkbox-and-search/index.d.ts +1 -0
  235. package/lib/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
  236. package/lib/organism/filter-checkbox-and-search/index.js +5 -2
  237. package/lib/organism/filter-checkbox-and-search/index.js.map +1 -1
  238. package/lib/organism/filter-checkbox-and-search/props-types.d.ts +2 -0
  239. package/lib/organism/filter-checkbox-and-search/props-types.d.ts.map +1 -1
  240. package/lib/organism/filter-checkbox-and-search/props-types.js +1 -0
  241. package/lib/organism/filter-checkbox-and-search/props-types.js.map +1 -1
  242. package/lib/organism/filter-checkbox-and-search/style.css +2 -0
  243. package/lib/organism/filter-chip/index.d.ts +3 -0
  244. package/lib/organism/filter-chip/index.d.ts.map +1 -1
  245. package/lib/organism/filter-chip/index.js +12 -4
  246. package/lib/organism/filter-chip/index.js.map +1 -1
  247. package/lib/organism/filter-chip/prop-types.d.ts +14 -7
  248. package/lib/organism/filter-chip/prop-types.d.ts.map +1 -1
  249. package/lib/organism/filter-chip/prop-types.js +3 -0
  250. package/lib/organism/filter-chip/prop-types.js.map +1 -1
  251. package/lib/organism/filter-switch/index.d.ts +23 -0
  252. package/lib/organism/filter-switch/index.d.ts.map +1 -0
  253. package/lib/organism/filter-switch/index.js +83 -0
  254. package/lib/organism/filter-switch/index.js.map +1 -0
  255. package/lib/organism/filter-switch/prop-types.d.ts +28 -0
  256. package/lib/organism/filter-switch/prop-types.d.ts.map +1 -0
  257. package/lib/organism/filter-switch/prop-types.js +20 -0
  258. package/lib/organism/filter-switch/prop-types.js.map +1 -0
  259. package/lib/organism/filter-switch/style.css +46 -0
  260. package/lib/organism/icon-editor/index.d.ts +15 -8
  261. package/lib/organism/icon-editor/index.d.ts.map +1 -1
  262. package/lib/organism/icon-editor/types.d.ts +15 -8
  263. package/lib/organism/icon-editor/types.d.ts.map +1 -1
  264. package/lib/organism/list-items/index.d.ts +116 -68
  265. package/lib/organism/rewards-form/index.d.ts +16 -8
  266. package/lib/organism/select-opponents/index.d.ts +16 -8
  267. package/lib/organism/select-opponents/index.d.ts.map +1 -1
  268. package/lib/organism/select-opponents/types.d.ts +16 -8
  269. package/lib/organism/select-opponents/types.d.ts.map +1 -1
  270. package/lib/organism/setup-header/index.d.ts +60 -32
  271. package/lib/organism/title-and-input/index.d.ts +47 -24
  272. package/lib/organism/title-and-input/index.d.ts.map +1 -1
  273. package/lib/organism/title-and-input/types.d.ts +47 -24
  274. package/lib/organism/title-and-input/types.d.ts.map +1 -1
  275. package/lib/organism/wizard-contents/index.d.ts +63 -38
  276. package/lib/template/app-player/loading/index.d.ts +135 -85
  277. package/lib/template/app-player/player/index.d.ts +278 -170
  278. package/lib/template/app-player/player/slides/header/index.d.ts +8 -0
  279. package/lib/template/app-player/player/slides/header/index.d.ts.map +1 -1
  280. package/lib/template/app-player/player/slides/header/index.js +89 -3
  281. package/lib/template/app-player/player/slides/header/index.js.map +1 -1
  282. package/lib/template/app-player/player/slides/header/style.css +1 -1
  283. package/lib/template/app-player/player/slides/index.d.ts +143 -85
  284. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  285. package/lib/template/app-player/popin-correction/index.d.ts +135 -85
  286. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  287. package/lib/template/app-player/popin-end/index.d.ts +143 -85
  288. package/lib/template/app-review/index.d.ts +135 -85
  289. package/lib/template/app-review/index.d.ts.map +1 -1
  290. package/lib/template/app-review/player/prop-types.d.ts +135 -85
  291. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  292. package/lib/template/app-review/prop-types.d.ts +135 -85
  293. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  294. package/lib/template/back-office/brand-create/index.d.ts +60 -32
  295. package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
  296. package/lib/template/back-office/brand-list/index.d.ts +60 -32
  297. package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
  298. package/lib/template/back-office/brand-update/index.d.ts +599 -298
  299. package/lib/template/back-office/dashboard-preview/index.d.ts +60 -32
  300. package/lib/template/back-office/layout/index.d.ts +60 -32
  301. package/lib/template/back-office/layout/index.d.ts.map +1 -1
  302. package/lib/template/common/dashboard/index.d.ts +270 -170
  303. package/lib/template/common/search-page/index.d.ts +135 -85
  304. package/lib/template/external-course/index.d.ts +135 -85
  305. package/lib/variables/colors.d.ts +1 -0
  306. package/lib/variables/colors.d.ts.map +1 -1
  307. package/lib/variables/colors.js +1 -0
  308. package/lib/variables/colors.js.map +1 -1
  309. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/filter-chip/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AACjE,OAAkB,EAAC,eAAe,EAAC,MAAM,cAAc,CAAC;AAGxD,QAAA,MAAM,UAAU;YAAW,eAAe,WAAW,gBAAgB;;;;;;;;;;;;;;;CA8CpE,CAAC;AAQF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/filter-chip/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAEjE,OAAkB,EAAC,eAAe,EAAC,MAAM,cAAc,CAAC;AAGxD,QAAA,MAAM,UAAU;YAAW,eAAe,WAAW,gBAAgB;;;;;;;;;;;;;;;;;;CAiDpE,CAAC;AAQF,eAAe,UAAU,CAAC"}
@@ -13,6 +13,7 @@ var _title = _interopRequireDefault(require("../../atom/title"));
13
13
  var _tag = _interopRequireDefault(require("../../atom/tag"));
14
14
  var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
15
15
  var _provider = _interopRequireWildcard(require("../../atom/provider"));
16
+ var _colors = require("../../variables/colors");
16
17
  var _propTypes = _interopRequireDefault(require("./prop-types"));
17
18
  var _style = _interopRequireDefault(require("./style.css"));
18
19
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
@@ -21,6 +22,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
21
22
  const FilterChip = (props, context) => {
22
23
  const {
23
24
  options,
25
+ titleAriaLabel,
24
26
  title,
25
27
  onClear
26
28
  } = props;
@@ -34,7 +36,8 @@ const FilterChip = (props, context) => {
34
36
  }, /*#__PURE__*/_react.default.createElement("div", {
35
37
  className: _style.default.titleContainer
36
38
  }, /*#__PURE__*/_react.default.createElement(_title.default, {
37
- title: title
39
+ title: title,
40
+ ariaLabel: titleAriaLabel
38
41
  }), hasSelectedFilters ? /*#__PURE__*/_react.default.createElement(_tag.default, {
39
42
  label: (0, _toString2.default)(selectedFiltersCount),
40
43
  type: "info",
@@ -50,15 +53,18 @@ const FilterChip = (props, context) => {
50
53
  type: "text",
51
54
  "data-name": "filter-chip-clear-button",
52
55
  "aria-label": "filter chip clear button",
53
- onClick: onClear
56
+ onClick: onClear,
57
+ hoverColor: _colors.COLORS.cm_grey_700
54
58
  })) : null), /*#__PURE__*/_react.default.createElement("div", {
55
59
  className: _style.default.optionsContainer
56
60
  }, (0, _map2.default)(({
57
61
  icon,
58
62
  label,
59
63
  onClick,
64
+ textColor,
60
65
  type,
61
- selected
66
+ selected,
67
+ customIcon
62
68
  }) => {
63
69
  function handleClick() {
64
70
  onClick(type);
@@ -66,9 +72,11 @@ const FilterChip = (props, context) => {
66
72
  return /*#__PURE__*/_react.default.createElement(_chip.default, {
67
73
  leftIcon: icon,
68
74
  text: label,
75
+ textColor: textColor,
69
76
  key: label,
70
77
  selected: selected,
71
- onClick: handleClick
78
+ onClick: handleClick,
79
+ customIcon: customIcon
72
80
  });
73
81
  }, options)));
74
82
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_chip","_title","_tag","_buttonLink","_provider","_interopRequireWildcard","_propTypes","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","FilterChip","props","context","options","title","onClear","selectedFiltersCount","_pipe2","_filter2","selected","_size2","hasSelectedFilters","translate","GetTranslateFromContext","createElement","Fragment","className","style","header","titleContainer","label","_toString2","type","size","buttonContainer","customStyle","fontWeight","padding","onClick","optionsContainer","_map2","icon","handleClick","leftIcon","text","key","propTypes","process","env","NODE_ENV","contextTypes","Provider","childContextTypes","_default","exports"],"sources":["../../../src/organism/filter-chip/index.tsx"],"sourcesContent":["import React from 'react';\nimport {filter, map, pipe, size, toString} from 'lodash/fp';\nimport Chip from '../../atom/chip';\nimport Title from '../../atom/title';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport Provider, {GetTranslateFromContext} from '../../atom/provider';\nimport {WebContextValues} from '../../atom/provider/web-context';\nimport propTypes, {FilterChipProps} from './prop-types';\nimport style from './style.css';\n\nconst FilterChip = (props: FilterChipProps, context: WebContextValues) => {\n const {options, title, onClear} = props;\n const selectedFiltersCount = pipe(filter({selected: true}), size)(options);\n const hasSelectedFilters = selectedFiltersCount > 0;\n const translate = GetTranslateFromContext(context);\n return (\n <>\n <div className={style.header}>\n <div className={style.titleContainer}>\n <Title title={title} />\n {hasSelectedFilters ? (\n <Tag label={toString(selectedFiltersCount)} type=\"info\" size=\"S\" />\n ) : null}\n </div>\n {hasSelectedFilters ? (\n <div className={style.buttonContainer}>\n <ButtonLink\n customStyle={{fontWeight: 'normal', padding: 0}}\n label={translate('clear')}\n type=\"text\"\n data-name=\"filter-chip-clear-button\"\n aria-label=\"filter chip clear button\"\n onClick={onClear}\n />\n </div>\n ) : null}\n </div>\n <div className={style.optionsContainer}>\n {map(({icon, label, onClick, type, selected}) => {\n function handleClick() {\n onClick(type);\n }\n\n return (\n <Chip\n leftIcon={icon}\n text={label}\n key={label}\n selected={selected}\n onClick={handleClick}\n />\n );\n }, options)}\n </div>\n </>\n );\n};\n\nFilterChip.propTypes = propTypes;\n\nFilterChip.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default FilterChip;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,KAAA,GA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,GAAAC,OAAA,CAAA1D,OAAA,GAEac,UAAU","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_chip","_title","_tag","_buttonLink","_provider","_interopRequireWildcard","_colors","_propTypes","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","FilterChip","props","context","options","titleAriaLabel","title","onClear","selectedFiltersCount","_pipe2","_filter2","selected","_size2","hasSelectedFilters","translate","GetTranslateFromContext","createElement","Fragment","className","style","header","titleContainer","ariaLabel","label","_toString2","type","size","buttonContainer","customStyle","fontWeight","padding","onClick","hoverColor","COLORS","cm_grey_700","optionsContainer","_map2","icon","textColor","customIcon","handleClick","leftIcon","text","key","propTypes","process","env","NODE_ENV","contextTypes","Provider","childContextTypes","_default","exports"],"sources":["../../../src/organism/filter-chip/index.tsx"],"sourcesContent":["import React from 'react';\nimport {filter, map, pipe, size, toString} from 'lodash/fp';\nimport Chip from '../../atom/chip';\nimport Title from '../../atom/title';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport Provider, {GetTranslateFromContext} from '../../atom/provider';\nimport {WebContextValues} from '../../atom/provider/web-context';\nimport {COLORS} from '../../variables/colors';\nimport propTypes, {FilterChipProps} from './prop-types';\nimport style from './style.css';\n\nconst FilterChip = (props: FilterChipProps, context: WebContextValues) => {\n const {options, titleAriaLabel, title, onClear} = props;\n const selectedFiltersCount = pipe(filter({selected: true}), size)(options);\n const hasSelectedFilters = selectedFiltersCount > 0;\n const translate = GetTranslateFromContext(context);\n return (\n <>\n <div className={style.header}>\n <div className={style.titleContainer}>\n <Title title={title} ariaLabel={titleAriaLabel} />\n {hasSelectedFilters ? (\n <Tag label={toString(selectedFiltersCount)} type=\"info\" size=\"S\" />\n ) : null}\n </div>\n {hasSelectedFilters ? (\n <div className={style.buttonContainer}>\n <ButtonLink\n customStyle={{fontWeight: 'normal', padding: 0}}\n label={translate('clear')}\n type=\"text\"\n data-name=\"filter-chip-clear-button\"\n aria-label=\"filter chip clear button\"\n onClick={onClear}\n hoverColor={COLORS.cm_grey_700}\n />\n </div>\n ) : null}\n </div>\n <div className={style.optionsContainer}>\n {map(({icon, label, onClick, textColor, type, selected, customIcon}) => {\n function handleClick() {\n onClick(type);\n }\n\n return (\n <Chip\n leftIcon={icon}\n text={label}\n textColor={textColor}\n key={label}\n selected={selected}\n onClick={handleClick}\n customIcon={customIcon}\n />\n );\n }, options)}\n </div>\n </>\n );\n};\n\nFilterChip.propTypes = propTypes;\n\nFilterChip.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default FilterChip;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,IAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,WAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,SAAA,GAAAC,uBAAA,CAAAN,OAAA;AAEA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,UAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,MAAA,GAAAV,sBAAA,CAAAC,OAAA;AAAgC,SAAAU,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAA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IAACkD,IAAI;IAAEd,KAAK;IAAEQ,OAAO;IAAEO,SAAS;IAAEb,IAAI;IAAEd,QAAQ;IAAE4B;EAAU,CAAC,KAAK;IACtE,SAASC,WAAWA,CAAA,EAAG;MACrBT,OAAO,CAACN,IAAI,CAAC;IACf;IAEA,oBACExD,MAAA,CAAAkB,OAAA,CAAA6B,aAAA,CAAC5C,KAAA,CAAAe,OAAI;MACHsD,QAAQ,EAAEJ,IAAK;MACfK,IAAI,EAAEnB,KAAM;MACZe,SAAS,EAAEA,SAAU;MACrBK,GAAG,EAAEpB,KAAM;MACXZ,QAAQ,EAAEA,QAAS;MACnBoB,OAAO,EAAES,WAAY;MACrBD,UAAU,EAAEA;IAAW,CACxB,CAAC;EAEN,CAAC,EAAEnC,OAAO,CACP,CACL,CAAC;AAEP,CAAC;AAEDH,UAAU,CAAC2C,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGH,kBAAS;AAEhC3C,UAAU,CAAC+C,YAAY,GAAG;EACxBlC,SAAS,EAAEmC,iBAAQ,CAACC,iBAAiB,CAACpC;AACxC,CAAC;AAAC,IAAAqC,QAAA,GAAAC,OAAA,CAAAjE,OAAA,GAEac,UAAU","ignoreList":[]}
@@ -1,25 +1,32 @@
1
1
  import PropTypes from 'prop-types';
2
2
  declare const propTypes: {
3
3
  title: PropTypes.Requireable<string>;
4
+ titleAriaLabel: PropTypes.Requireable<string>;
4
5
  onClear: PropTypes.Requireable<(...args: any[]) => any>;
5
6
  options: PropTypes.Requireable<(PropTypes.InferProps<{
6
7
  label: PropTypes.Requireable<string>;
7
8
  type: PropTypes.Requireable<string>;
9
+ textColor: PropTypes.Requireable<string>;
8
10
  selected: PropTypes.Requireable<boolean>;
9
11
  icon: PropTypes.Requireable<string>;
12
+ customIcon: PropTypes.Requireable<string>;
10
13
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
11
14
  }> | null | undefined)[]>;
12
15
  };
16
+ export declare type FilterChipOptionsProps = {
17
+ label: string;
18
+ type: string;
19
+ selected: boolean;
20
+ icon?: string;
21
+ textColor?: string;
22
+ customIcon?: string;
23
+ onClick: (type: string) => void;
24
+ };
13
25
  export declare type FilterChipProps = {
14
26
  title: string;
27
+ titleAriaLabel?: string;
15
28
  onClear: () => void;
16
- options: {
17
- label: string;
18
- type: string;
19
- selected: boolean;
20
- icon: string;
21
- onClick: (type: string) => void;
22
- }[];
29
+ options: FilterChipOptionsProps[];
23
30
  };
24
31
  export default propTypes;
25
32
  //# sourceMappingURL=prop-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/organism/filter-chip/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,QAAA,MAAM,SAAS;;;;;;;;;;CAYd,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,OAAO,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;KACjC,EAAE,CAAC;CACL,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/organism/filter-chip/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,QAAA,MAAM,SAAS;;;;;;;;;;;;;CAed,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,sBAAsB,EAAE,CAAC;CACnC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -6,12 +6,15 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
6
6
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
7
7
  const propTypes = {
8
8
  title: _propTypes.default.string,
9
+ titleAriaLabel: _propTypes.default.string,
9
10
  onClear: _propTypes.default.func,
10
11
  options: _propTypes.default.arrayOf(_propTypes.default.shape({
11
12
  label: _propTypes.default.string,
12
13
  type: _propTypes.default.string,
14
+ textColor: _propTypes.default.string,
13
15
  selected: _propTypes.default.bool,
14
16
  icon: _propTypes.default.string,
17
+ customIcon: _propTypes.default.string,
15
18
  onClick: _propTypes.default.func
16
19
  }))
17
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.js","names":["_propTypes","_interopRequireDefault","require","e","__esModule","default","propTypes","title","PropTypes","string","onClear","func","options","arrayOf","shape","label","type","selected","bool","icon","onClick","_default","exports"],"sources":["../../../src/organism/filter-chip/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst propTypes = {\n title: PropTypes.string,\n onClear: PropTypes.func,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.string,\n selected: PropTypes.bool,\n icon: PropTypes.string,\n onClick: PropTypes.func\n })\n )\n};\n\nexport type FilterChipProps = {\n title: string;\n onClear: () => void;\n options: {\n label: string;\n type: string;\n selected: boolean;\n icon: string;\n onClick: (type: string) => void;\n }[];\n};\n\nexport default propTypes;\n"],"mappings":";;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAmC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEnC,MAAMG,SAAS,GAAG;EAChBC,KAAK,EAAEC,kBAAS,CAACC,MAAM;EACvBC,OAAO,EAAEF,kBAAS,CAACG,IAAI;EACvBC,OAAO,EAAEJ,kBAAS,CAACK,OAAO,CACxBL,kBAAS,CAACM,KAAK,CAAC;IACdC,KAAK,EAAEP,kBAAS,CAACC,MAAM;IACvBO,IAAI,EAAER,kBAAS,CAACC,MAAM;IACtBQ,QAAQ,EAAET,kBAAS,CAACU,IAAI;IACxBC,IAAI,EAAEX,kBAAS,CAACC,MAAM;IACtBW,OAAO,EAAEZ,kBAAS,CAACG;EACrB,CAAC,CACH;AACF,CAAC;AAAC,IAAAU,QAAA,GAAAC,OAAA,CAAAjB,OAAA,GAcaC,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"prop-types.js","names":["_propTypes","_interopRequireDefault","require","e","__esModule","default","propTypes","title","PropTypes","string","titleAriaLabel","onClear","func","options","arrayOf","shape","label","type","textColor","selected","bool","icon","customIcon","onClick","_default","exports"],"sources":["../../../src/organism/filter-chip/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst propTypes = {\n title: PropTypes.string,\n titleAriaLabel: PropTypes.string,\n onClear: PropTypes.func,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n type: PropTypes.string,\n textColor: PropTypes.string,\n selected: PropTypes.bool,\n icon: PropTypes.string,\n customIcon: PropTypes.string,\n onClick: PropTypes.func\n })\n )\n};\n\nexport type FilterChipOptionsProps = {\n label: string;\n type: string;\n selected: boolean;\n icon?: string;\n textColor?: string;\n customIcon?: string;\n onClick: (type: string) => void;\n};\n\nexport type FilterChipProps = {\n title: string;\n titleAriaLabel?: string;\n onClear: () => void;\n options: FilterChipOptionsProps[];\n};\n\nexport default propTypes;\n"],"mappings":";;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAmC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEnC,MAAMG,SAAS,GAAG;EAChBC,KAAK,EAAEC,kBAAS,CAACC,MAAM;EACvBC,cAAc,EAAEF,kBAAS,CAACC,MAAM;EAChCE,OAAO,EAAEH,kBAAS,CAACI,IAAI;EACvBC,OAAO,EAAEL,kBAAS,CAACM,OAAO,CACxBN,kBAAS,CAACO,KAAK,CAAC;IACdC,KAAK,EAAER,kBAAS,CAACC,MAAM;IACvBQ,IAAI,EAAET,kBAAS,CAACC,MAAM;IACtBS,SAAS,EAAEV,kBAAS,CAACC,MAAM;IAC3BU,QAAQ,EAAEX,kBAAS,CAACY,IAAI;IACxBC,IAAI,EAAEb,kBAAS,CAACC,MAAM;IACtBa,UAAU,EAAEd,kBAAS,CAACC,MAAM;IAC5Bc,OAAO,EAAEf,kBAAS,CAACI;EACrB,CAAC,CACH;AACF,CAAC;AAAC,IAAAY,QAAA,GAAAC,OAAA,CAAApB,OAAA,GAmBaC,SAAS","ignoreList":[]}
@@ -0,0 +1,23 @@
1
+ /// <reference types="react" />
2
+ import { WebContextValues } from '../../atom/provider/web-context';
3
+ import { FilterSwitchProps } from './prop-types';
4
+ declare const FilterSwitch: {
5
+ (props: FilterSwitchProps, context: WebContextValues): JSX.Element;
6
+ propTypes: {
7
+ title: import("prop-types").Validator<string>;
8
+ titleAriaLabel: import("prop-types").Requireable<string>;
9
+ onClear: import("prop-types").Validator<(...args: any[]) => any>;
10
+ options: import("prop-types").Requireable<(import("prop-types").InferProps<{
11
+ label: import("prop-types").Validator<string>;
12
+ value: import("prop-types").Validator<boolean>;
13
+ onChange: import("prop-types").Validator<(...args: any[]) => any>;
14
+ theme: import("prop-types").Validator<string>;
15
+ ariaLabel: import("prop-types").Validator<string>;
16
+ }> | null | undefined)[]>;
17
+ };
18
+ contextTypes: {
19
+ translate: import("prop-types").Requireable<(...args: any[]) => any>;
20
+ };
21
+ };
22
+ export default FilterSwitch;
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/filter-switch/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAEjE,OAAkB,EAAC,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAG1D,QAAA,MAAM,YAAY;YAAW,iBAAiB,WAAW,gBAAgB;;;;;;;;;;;;;;;;CA+CxE,CAAC;AAQF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+ var _toString2 = _interopRequireDefault(require("lodash/fp/toString"));
6
+ var _size2 = _interopRequireDefault(require("lodash/fp/size"));
7
+ var _pipe2 = _interopRequireDefault(require("lodash/fp/pipe"));
8
+ var _filter2 = _interopRequireDefault(require("lodash/fp/filter"));
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _title = _interopRequireDefault(require("../../atom/title"));
11
+ var _inputSwitch = _interopRequireDefault(require("../../atom/input-switch"));
12
+ var _tag = _interopRequireDefault(require("../../atom/tag"));
13
+ var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
14
+ var _provider = _interopRequireWildcard(require("../../atom/provider"));
15
+ var _colors = require("../../variables/colors");
16
+ var _propTypes = _interopRequireDefault(require("./prop-types"));
17
+ var _style = _interopRequireDefault(require("./style.css"));
18
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
19
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
20
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
21
+ const FilterSwitch = (props, context) => {
22
+ const {
23
+ title,
24
+ titleAriaLabel,
25
+ onClear,
26
+ options
27
+ } = props;
28
+ const selectedFiltersCount = (0, _pipe2.default)((0, _filter2.default)({
29
+ value: true
30
+ }), _size2.default)(options);
31
+ const hasSelectedFilters = selectedFiltersCount > 0;
32
+ const translate = (0, _provider.GetTranslateFromContext)(context);
33
+ return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
34
+ className: _style.default.header
35
+ }, /*#__PURE__*/_react.default.createElement("div", {
36
+ className: _style.default.titleContainer
37
+ }, /*#__PURE__*/_react.default.createElement(_title.default, {
38
+ title: title,
39
+ ariaLabel: titleAriaLabel
40
+ }), hasSelectedFilters ? /*#__PURE__*/_react.default.createElement(_tag.default, {
41
+ label: (0, _toString2.default)(selectedFiltersCount),
42
+ type: "info",
43
+ size: "S"
44
+ }) : null), hasSelectedFilters ? /*#__PURE__*/_react.default.createElement("div", {
45
+ className: _style.default.buttonContainer
46
+ }, /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
47
+ customStyle: {
48
+ fontWeight: 'normal',
49
+ padding: 0
50
+ },
51
+ label: translate('clear'),
52
+ type: "text",
53
+ "data-name": "filter-chip-clear-button",
54
+ "aria-label": "filter chip clear button",
55
+ onClick: onClear,
56
+ hoverColor: _colors.COLORS.cm_grey_700
57
+ })) : null), /*#__PURE__*/_react.default.createElement("div", {
58
+ className: _style.default.optionsContainer
59
+ }, options.map(optionItem => {
60
+ const {
61
+ label,
62
+ value,
63
+ onChange,
64
+ ariaLabel
65
+ } = optionItem;
66
+ return /*#__PURE__*/_react.default.createElement("div", {
67
+ key: label,
68
+ className: _style.default.switchOption
69
+ }, /*#__PURE__*/_react.default.createElement(_inputSwitch.default, {
70
+ title: label,
71
+ value: value,
72
+ theme: 'newMooc',
73
+ onChange: onChange,
74
+ "aria-label": ariaLabel
75
+ }));
76
+ })));
77
+ };
78
+ FilterSwitch.propTypes = process.env.NODE_ENV !== "production" ? _propTypes.default : {};
79
+ FilterSwitch.contextTypes = {
80
+ translate: _provider.default.childContextTypes.translate
81
+ };
82
+ var _default = exports.default = FilterSwitch;
83
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_title","_inputSwitch","_tag","_buttonLink","_provider","_interopRequireWildcard","_colors","_propTypes","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","FilterSwitch","props","context","title","titleAriaLabel","onClear","options","selectedFiltersCount","_pipe2","_filter2","value","_size2","hasSelectedFilters","translate","GetTranslateFromContext","createElement","className","style","header","titleContainer","ariaLabel","label","_toString2","type","size","buttonContainer","customStyle","fontWeight","padding","onClick","hoverColor","COLORS","cm_grey_700","optionsContainer","map","optionItem","onChange","key","switchOption","theme","propTypes","process","env","NODE_ENV","contextTypes","Provider","childContextTypes","_default","exports"],"sources":["../../../src/organism/filter-switch/index.tsx"],"sourcesContent":["import React from 'react';\nimport {filter, pipe, size, toString} from 'lodash/fp';\nimport Title from '../../atom/title';\nimport InputSwitch from '../../atom/input-switch';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport Provider, {GetTranslateFromContext} from '../../atom/provider';\nimport {WebContextValues} from '../../atom/provider/web-context';\nimport {COLORS} from '../../variables/colors';\nimport propTypes, {FilterSwitchProps} from './prop-types';\nimport style from './style.css';\n\nconst FilterSwitch = (props: FilterSwitchProps, context: WebContextValues) => {\n const {title, titleAriaLabel, onClear, options} = props;\n const selectedFiltersCount = pipe(filter({value: true}), size)(options);\n const hasSelectedFilters = selectedFiltersCount > 0;\n const translate = GetTranslateFromContext(context);\n\n return (\n <div>\n <div className={style.header}>\n <div className={style.titleContainer}>\n <Title title={title} ariaLabel={titleAriaLabel} />\n {hasSelectedFilters ? (\n <Tag label={toString(selectedFiltersCount)} type=\"info\" size=\"S\" />\n ) : null}\n </div>\n {hasSelectedFilters ? (\n <div className={style.buttonContainer}>\n <ButtonLink\n customStyle={{fontWeight: 'normal', padding: 0}}\n label={translate('clear')}\n type=\"text\"\n data-name=\"filter-chip-clear-button\"\n aria-label=\"filter chip clear button\"\n onClick={onClear}\n hoverColor={COLORS.cm_grey_700}\n />\n </div>\n ) : null}\n </div>\n <div className={style.optionsContainer}>\n {options.map(optionItem => {\n const {label, value, onChange, ariaLabel} = optionItem;\n return (\n <div key={label} className={style.switchOption}>\n <InputSwitch\n title={label}\n value={value}\n theme={'newMooc'}\n onChange={onChange}\n aria-label={ariaLabel}\n />\n </div>\n );\n })}\n </div>\n </div>\n );\n};\n\nFilterSwitch.propTypes = propTypes;\n\nFilterSwitch.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default FilterSwitch;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,IAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,WAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,SAAA,GAAAC,uBAAA,CAAAN,OAAA;AAEA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,UAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,MAAA,GAAAV,sBAAA,CAAAC,OAAA;AAAgC,SAAAU,yB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SAAS,CAAC,OAAO,CAAE;IAC1BU,IAAI,EAAC,MAAM;IACX,aAAU,0BAA0B;IACpC,cAAW,0BAA0B;IACrCM,OAAO,EAAExB,OAAQ;IACjByB,UAAU,EAAEC,cAAM,CAACC;EAAY,CAChC,CACE,CAAC,GACJ,IACD,CAAC,eACNhE,MAAA,CAAAkB,OAAA,CAAA6B,aAAA;IAAKC,SAAS,EAAEC,cAAK,CAACgB;EAAiB,GACpC3B,OAAO,CAAC4B,GAAG,CAACC,UAAU,IAAI;IACzB,MAAM;MAACd,KAAK;MAAEX,KAAK;MAAE0B,QAAQ;MAAEhB;IAAS,CAAC,GAAGe,UAAU;IACtD,oBACEnE,MAAA,CAAAkB,OAAA,CAAA6B,aAAA;MAAKsB,GAAG,EAAEhB,KAAM;MAACL,SAAS,EAAEC,cAAK,CAACqB;IAAa,gBAC7CtE,MAAA,CAAAkB,OAAA,CAAA6B,aAAA,CAAC3C,YAAA,CAAAc,OAAW;MACViB,KAAK,EAAEkB,KAAM;MACbX,KAAK,EAAEA,KAAM;MACb6B,KAAK,EAAE,SAAU;MACjBH,QAAQ,EAAEA,QAAS;MACnB,cAAYhB;IAAU,CACvB,CACE,CAAC;EAEV,CAAC,CACE,CACF,CAAC;AAEV,CAAC;AAEDpB,YAAY,CAACwC,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGH,kBAAS;AAElCxC,YAAY,CAAC4C,YAAY,GAAG;EAC1B/B,SAAS,EAAEgC,iBAAQ,CAACC,iBAAiB,CAACjC;AACxC,CAAC;AAAC,IAAAkC,QAAA,GAAAC,OAAA,CAAA9D,OAAA,GAEac,YAAY","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ import PropTypes from 'prop-types';
2
+ declare const propTypes: {
3
+ title: PropTypes.Validator<string>;
4
+ titleAriaLabel: PropTypes.Requireable<string>;
5
+ onClear: PropTypes.Validator<(...args: any[]) => any>;
6
+ options: PropTypes.Requireable<(PropTypes.InferProps<{
7
+ label: PropTypes.Validator<string>;
8
+ value: PropTypes.Validator<boolean>;
9
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
10
+ theme: PropTypes.Validator<string>;
11
+ ariaLabel: PropTypes.Validator<string>;
12
+ }> | null | undefined)[]>;
13
+ };
14
+ export declare type FilterSwitchOptionsProps = {
15
+ label: string;
16
+ value: boolean;
17
+ onChange: (value: string) => void;
18
+ theme: string;
19
+ ariaLabel: string;
20
+ };
21
+ export declare type FilterSwitchProps = {
22
+ title: string;
23
+ titleAriaLabel?: string;
24
+ onClear: () => void;
25
+ options: FilterSwitchOptionsProps[];
26
+ };
27
+ export default propTypes;
28
+ //# sourceMappingURL=prop-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/organism/filter-switch/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,QAAA,MAAM,SAAS;;;;;;;;;;;CAad,CAAC;AAEF,oBAAY,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,wBAAwB,EAAE,CAAC;CACrC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+ var _propTypes = _interopRequireDefault(require("prop-types"));
6
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
7
+ const propTypes = {
8
+ title: _propTypes.default.string.isRequired,
9
+ titleAriaLabel: _propTypes.default.string,
10
+ onClear: _propTypes.default.func.isRequired,
11
+ options: _propTypes.default.arrayOf(_propTypes.default.shape({
12
+ label: _propTypes.default.string.isRequired,
13
+ value: _propTypes.default.bool.isRequired,
14
+ onChange: _propTypes.default.func.isRequired,
15
+ theme: _propTypes.default.string.isRequired,
16
+ ariaLabel: _propTypes.default.string.isRequired
17
+ }))
18
+ };
19
+ var _default = exports.default = propTypes;
20
+ //# sourceMappingURL=prop-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prop-types.js","names":["_propTypes","_interopRequireDefault","require","e","__esModule","default","propTypes","title","PropTypes","string","isRequired","titleAriaLabel","onClear","func","options","arrayOf","shape","label","value","bool","onChange","theme","ariaLabel","_default","exports"],"sources":["../../../src/organism/filter-switch/prop-types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst propTypes = {\n title: PropTypes.string.isRequired,\n titleAriaLabel: PropTypes.string,\n onClear: PropTypes.func.isRequired,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string.isRequired,\n value: PropTypes.bool.isRequired,\n onChange: PropTypes.func.isRequired,\n theme: PropTypes.string.isRequired,\n ariaLabel: PropTypes.string.isRequired\n })\n )\n};\n\nexport type FilterSwitchOptionsProps = {\n label: string;\n value: boolean;\n onChange: (value: string) => void;\n theme: string;\n ariaLabel: string;\n};\n\nexport type FilterSwitchProps = {\n title: string;\n titleAriaLabel?: string;\n onClear: () => void;\n options: FilterSwitchOptionsProps[];\n};\n\nexport default propTypes;\n"],"mappings":";;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAmC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEnC,MAAMG,SAAS,GAAG;EAChBC,KAAK,EAAEC,kBAAS,CAACC,MAAM,CAACC,UAAU;EAClCC,cAAc,EAAEH,kBAAS,CAACC,MAAM;EAChCG,OAAO,EAAEJ,kBAAS,CAACK,IAAI,CAACH,UAAU;EAClCI,OAAO,EAAEN,kBAAS,CAACO,OAAO,CACxBP,kBAAS,CAACQ,KAAK,CAAC;IACdC,KAAK,EAAET,kBAAS,CAACC,MAAM,CAACC,UAAU;IAClCQ,KAAK,EAAEV,kBAAS,CAACW,IAAI,CAACT,UAAU;IAChCU,QAAQ,EAAEZ,kBAAS,CAACK,IAAI,CAACH,UAAU;IACnCW,KAAK,EAAEb,kBAAS,CAACC,MAAM,CAACC,UAAU;IAClCY,SAAS,EAAEd,kBAAS,CAACC,MAAM,CAACC;EAC9B,CAAC,CACH;AACF,CAAC;AAAC,IAAAa,QAAA,GAAAC,OAAA,CAAAnB,OAAA,GAiBaC,SAAS","ignoreList":[]}
@@ -0,0 +1,46 @@
1
+ @value colors: "../../variables/colors.css";
2
+ @value cm_grey_500 from colors;
3
+ @value cm_grey_700 from colors;
4
+
5
+ .header {
6
+ display: flex;
7
+ justify-content: space-between;
8
+ margin-bottom: 16px;
9
+ }
10
+
11
+ .titleContainer {
12
+ color: cm_grey_700;
13
+ font-family: Gilroy;
14
+ font-size: 14px;
15
+ font-style: normal;
16
+ font-weight: 600;
17
+ display: flex;
18
+ gap: 8px;
19
+ align-items: center;
20
+ flex: 10;
21
+ }
22
+
23
+ .buttonContainer {
24
+ font-weight: normal;
25
+ color: cm_grey_500;
26
+ }
27
+
28
+ .optionsContainer {
29
+ display: flex;
30
+ flex-wrap: wrap;
31
+ flex-direction: column;
32
+ gap: 8px;
33
+ width: 100%;
34
+ }
35
+
36
+ .switchOption {
37
+ cursor: pointer;
38
+ }
39
+
40
+ .switchOption label {
41
+ margin: 0;
42
+ }
43
+
44
+ .switchOption span {
45
+ color: cm_grey_500;
46
+ }
@@ -44,7 +44,7 @@ declare const IconEditor: {
44
44
  tooltipPlacement: import("prop-types").Requireable<string>;
45
45
  'data-name': import("prop-types").Requireable<string>;
46
46
  'data-testid': import("prop-types").Requireable<string>;
47
- icon: import("prop-types").Requireable<import("prop-types").InferProps<{
47
+ icon: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
48
48
  position: import("prop-types").Requireable<string>;
49
49
  type: import("prop-types").Requireable<string>;
50
50
  faIcon: import("prop-types").Requireable<import("prop-types").InferProps<{
@@ -52,11 +52,19 @@ declare const IconEditor: {
52
52
  color: import("prop-types").Requireable<string>;
53
53
  backgroundColor: import("prop-types").Requireable<string>;
54
54
  size: import("prop-types").Requireable<number>;
55
- customStyle: import("prop-types").Requireable<{
56
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
57
- }>;
55
+ customStyle: import("prop-types").Requireable<object>;
58
56
  }>>;
59
- }>>;
57
+ }> | (import("prop-types").InferProps<{
58
+ position: import("prop-types").Requireable<string>;
59
+ type: import("prop-types").Requireable<string>;
60
+ faIcon: import("prop-types").Requireable<import("prop-types").InferProps<{
61
+ name: import("prop-types").Validator<string>;
62
+ color: import("prop-types").Requireable<string>;
63
+ backgroundColor: import("prop-types").Requireable<string>;
64
+ size: import("prop-types").Requireable<number>;
65
+ customStyle: import("prop-types").Requireable<object>;
66
+ }>>;
67
+ }> | null | undefined)[] | null | undefined>>;
60
68
  onClick: import("prop-types").Requireable<(...args: any[]) => any>;
61
69
  link: import("prop-types").Requireable<import("prop-types").InferProps<{
62
70
  href: import("prop-types").Requireable<string>;
@@ -67,9 +75,8 @@ declare const IconEditor: {
67
75
  hoverColor: import("prop-types").Requireable<string>;
68
76
  disabled: import("prop-types").Requireable<boolean>;
69
77
  className: import("prop-types").Requireable<string>;
70
- customStyle: import("prop-types").Requireable<{
71
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
72
- }>;
78
+ customStyle: import("prop-types").Requireable<object>;
79
+ contentCustomStyle: import("prop-types").Requireable<object>;
73
80
  useTitle: import("prop-types").Requireable<boolean>;
74
81
  customLabelClassName: import("prop-types").Requireable<string>;
75
82
  }>>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/icon-editor/index.tsx"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAGtE,OAAkB,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAEnD,QAAA,MAAM,UAAU;YAAW,eAAe,iBAAiB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyB1E,CAAC;AAQF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/icon-editor/index.tsx"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAGtE,OAAkB,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAEnD,QAAA,MAAM,UAAU;YAAW,eAAe,iBAAiB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyB1E,CAAC;AAQF,eAAe,UAAU,CAAC"}
@@ -41,7 +41,7 @@ declare const IconEditorPropTypes: {
41
41
  tooltipPlacement: PropTypes.Requireable<string>;
42
42
  'data-name': PropTypes.Requireable<string>;
43
43
  'data-testid': PropTypes.Requireable<string>;
44
- icon: PropTypes.Requireable<PropTypes.InferProps<{
44
+ icon: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
45
45
  position: PropTypes.Requireable<string>;
46
46
  type: PropTypes.Requireable<string>;
47
47
  faIcon: PropTypes.Requireable<PropTypes.InferProps<{
@@ -49,11 +49,19 @@ declare const IconEditorPropTypes: {
49
49
  color: PropTypes.Requireable<string>;
50
50
  backgroundColor: PropTypes.Requireable<string>;
51
51
  size: PropTypes.Requireable<number>;
52
- customStyle: PropTypes.Requireable<{
53
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
54
- }>;
52
+ customStyle: PropTypes.Requireable<object>;
55
53
  }>>;
56
- }>>;
54
+ }> | (PropTypes.InferProps<{
55
+ position: PropTypes.Requireable<string>;
56
+ type: PropTypes.Requireable<string>;
57
+ faIcon: PropTypes.Requireable<PropTypes.InferProps<{
58
+ name: PropTypes.Validator<string>;
59
+ color: PropTypes.Requireable<string>;
60
+ backgroundColor: PropTypes.Requireable<string>;
61
+ size: PropTypes.Requireable<number>;
62
+ customStyle: PropTypes.Requireable<object>;
63
+ }>>;
64
+ }> | null | undefined)[] | null | undefined>>;
57
65
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
58
66
  link: PropTypes.Requireable<PropTypes.InferProps<{
59
67
  href: PropTypes.Requireable<string>;
@@ -64,9 +72,8 @@ declare const IconEditorPropTypes: {
64
72
  hoverColor: PropTypes.Requireable<string>;
65
73
  disabled: PropTypes.Requireable<boolean>;
66
74
  className: PropTypes.Requireable<string>;
67
- customStyle: PropTypes.Requireable<{
68
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
69
- }>;
75
+ customStyle: PropTypes.Requireable<object>;
76
+ contentCustomStyle: PropTypes.Requireable<object>;
70
77
  useTitle: PropTypes.Requireable<boolean>;
71
78
  customLabelClassName: PropTypes.Requireable<string>;
72
79
  }>>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/icon-editor/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAC;AAEnE,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE7D,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIxB,CAAC;AAEF,eAAe,mBAAmB,CAAC;AAEnC,oBAAY,eAAe,GAAG;IAC5B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,SAAS,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;IAClD,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/icon-editor/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAC;AAEnE,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE7D,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIxB,CAAC;AAEF,eAAe,mBAAmB,CAAC;AAEnC,oBAAY,eAAe,GAAG;IAC5B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,SAAS,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;IAClD,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B,CAAC"}