smoothly 1.0.0-alpha.99 → 1.0.0

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 (456) hide show
  1. package/dist/cjs/Data-50d47740.js +589 -0
  2. package/dist/cjs/Data-50d47740.js.map +1 -0
  3. package/dist/cjs/Observers-6450f075.js +25 -0
  4. package/dist/cjs/Observers-6450f075.js.map +1 -0
  5. package/dist/cjs/TimeZone-016ac7b0.js +6181 -0
  6. package/dist/cjs/TimeZone-016ac7b0.js.map +1 -0
  7. package/dist/cjs/{getLanguage-7e53766b.js → getLanguage-49a534df.js} +1 -5993
  8. package/dist/cjs/getLanguage-49a534df.js.map +1 -0
  9. package/dist/cjs/{index-6ae370b4.js → index-43af753b.js} +1 -4
  10. package/dist/cjs/index-43af753b.js.map +1 -0
  11. package/dist/cjs/index.cjs.js +3 -14
  12. package/dist/cjs/index.cjs.js.map +1 -1
  13. package/dist/cjs/loader.cjs.js +4 -3
  14. package/dist/cjs/loader.cjs.js.map +1 -1
  15. package/dist/cjs/smoothly-accordion-item.cjs.entry.js +61 -0
  16. package/dist/cjs/smoothly-accordion-item.cjs.entry.js.map +1 -0
  17. package/dist/cjs/smoothly-accordion.cjs.entry.js +58 -0
  18. package/dist/cjs/smoothly-accordion.cjs.entry.js.map +1 -0
  19. package/dist/cjs/smoothly-address-display.cjs.entry.js +1 -1
  20. package/dist/cjs/smoothly-address.cjs.entry.js +1 -1
  21. package/dist/cjs/smoothly-addresses.cjs.entry.js +1 -1
  22. package/dist/cjs/smoothly-app_80.cjs.entry.js +11148 -0
  23. package/dist/cjs/smoothly-app_80.cjs.entry.js.map +1 -0
  24. package/dist/cjs/smoothly-checkbox.cjs.entry.js +102 -0
  25. package/dist/cjs/smoothly-checkbox.cjs.entry.js.map +1 -0
  26. package/dist/cjs/smoothly-color.cjs.entry.js +1 -1
  27. package/dist/cjs/smoothly-country.cjs.entry.js +56 -55
  28. package/dist/cjs/smoothly-country.cjs.entry.js.map +1 -1
  29. package/dist/cjs/smoothly-display-date-time.cjs.entry.js +1 -1
  30. package/dist/cjs/smoothly-google-font.cjs.entry.js +1 -1
  31. package/dist/cjs/smoothly-reorder.cjs.entry.js +4 -4
  32. package/dist/cjs/smoothly-reorder.cjs.entry.js.map +1 -1
  33. package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +2 -2
  34. package/dist/cjs/smoothly-trigger-source.cjs.entry.js +2 -2
  35. package/dist/cjs/smoothly.cjs.js +4 -3
  36. package/dist/cjs/smoothly.cjs.js.map +1 -1
  37. package/dist/collection/collection-manifest.json +24 -7
  38. package/dist/collection/components/Button.js +16 -2
  39. package/dist/collection/components/Button.js.map +1 -1
  40. package/dist/collection/components/app/index.js +53 -1
  41. package/dist/collection/components/app/index.js.map +1 -1
  42. package/dist/collection/components/app/room/index.js +45 -2
  43. package/dist/collection/components/app/room/index.js.map +1 -1
  44. package/dist/collection/components/app/room/style.css +23 -9
  45. package/dist/collection/components/app/style.css +57 -32
  46. package/dist/collection/components/app-demo/index.js +1 -2
  47. package/dist/collection/components/app-demo/index.js.map +1 -1
  48. package/dist/collection/components/burger/index.js +9 -9
  49. package/dist/collection/components/burger/index.js.map +1 -1
  50. package/dist/collection/components/button/index.js +9 -22
  51. package/dist/collection/components/button/index.js.map +1 -1
  52. package/dist/collection/components/button/style.css +23 -20
  53. package/dist/collection/components/button-demo/index.js +3 -1
  54. package/dist/collection/components/button-demo/index.js.map +1 -1
  55. package/dist/collection/components/button-demo/style.css +1 -0
  56. package/dist/collection/components/calendar/generate.js +1 -1
  57. package/dist/collection/components/calendar/generate.js.map +1 -1
  58. package/dist/collection/components/calendar/index.js +16 -16
  59. package/dist/collection/components/calendar/index.js.map +1 -1
  60. package/dist/collection/components/checkbox/index.js +60 -29
  61. package/dist/collection/components/checkbox/index.js.map +1 -1
  62. package/dist/collection/components/checkbox/style.css +39 -42
  63. package/dist/collection/components/confirm/index.js +261 -0
  64. package/dist/collection/components/confirm/index.js.map +1 -0
  65. package/dist/collection/components/confirm/style.css +15 -0
  66. package/dist/collection/components/display/index.js +4 -1
  67. package/dist/collection/components/display/index.js.map +1 -1
  68. package/dist/collection/components/display-demo/index.js +16 -1
  69. package/dist/collection/components/display-demo/index.js.map +1 -1
  70. package/dist/collection/components/filter/Filter.js +17 -0
  71. package/dist/collection/components/filter/Filter.js.map +1 -0
  72. package/dist/collection/components/filter/field/index.js +105 -0
  73. package/dist/collection/components/filter/field/index.js.map +1 -0
  74. package/dist/collection/components/filter/field/style.css +4 -0
  75. package/dist/collection/components/filter/index.js +55 -132
  76. package/dist/collection/components/filter/index.js.map +1 -1
  77. package/dist/collection/components/filter/input/index.js +84 -301
  78. package/dist/collection/components/filter/input/index.js.map +1 -1
  79. package/dist/collection/components/filter/picker/index.js +229 -0
  80. package/dist/collection/components/filter/picker/index.js.map +1 -0
  81. package/dist/collection/components/filter/picker/style.css +8 -0
  82. package/dist/collection/components/filter/style.css +56 -71
  83. package/dist/collection/components/filter/toggle/index.js +248 -0
  84. package/dist/collection/components/filter/toggle/index.js.map +1 -0
  85. package/dist/collection/components/filter/toggle/style.css +8 -0
  86. package/dist/collection/components/form/index.js +234 -66
  87. package/dist/collection/components/form/index.js.map +1 -1
  88. package/dist/collection/components/form/style.css +3 -1
  89. package/dist/collection/components/icon/index.js +60 -32
  90. package/dist/collection/components/icon/index.js.map +1 -1
  91. package/dist/collection/components/icon/style.css +15 -0
  92. package/dist/collection/components/icon-demo/index.js +3 -1
  93. package/dist/collection/components/icon-demo/index.js.map +1 -1
  94. package/dist/collection/components/icon-demo/style.css +5 -6
  95. package/dist/collection/components/input/Editable.js +19 -0
  96. package/dist/collection/components/input/Editable.js.map +1 -0
  97. package/dist/collection/components/input/Input.js +22 -1
  98. package/dist/collection/components/input/Input.js.map +1 -1
  99. package/dist/collection/components/input/Looks.js +7 -1
  100. package/dist/collection/components/input/Looks.js.map +1 -1
  101. package/dist/collection/components/input/Submittable.js.map +1 -1
  102. package/dist/collection/components/input/checkbox/index.js +382 -0
  103. package/dist/collection/components/input/checkbox/index.js.map +1 -0
  104. package/dist/collection/components/input/checkbox/style.css +75 -0
  105. package/dist/collection/components/input/clear/index.js +12 -7
  106. package/dist/collection/components/input/clear/index.js.map +1 -1
  107. package/dist/collection/components/input/clear/style.css +23 -20
  108. package/dist/collection/components/input/color/index.js +226 -0
  109. package/dist/collection/components/input/color/index.js.map +1 -0
  110. package/dist/collection/components/input/color/style.css +15 -0
  111. package/dist/collection/components/input/date/index.js +8 -8
  112. package/dist/collection/components/input/date/index.js.map +1 -1
  113. package/dist/collection/components/input/date/range/index.js +13 -17
  114. package/dist/collection/components/input/date/range/index.js.map +1 -1
  115. package/dist/collection/components/input/date/range/style.css +25 -0
  116. package/dist/collection/components/input/date/style.css +25 -0
  117. package/dist/collection/components/input/demo/index.js +28 -72
  118. package/dist/collection/components/input/demo/index.js.map +1 -1
  119. package/dist/collection/components/input/demo/style.css +15 -0
  120. package/dist/collection/components/input/edit/index.js +249 -0
  121. package/dist/collection/components/input/edit/index.js.map +1 -0
  122. package/dist/collection/components/input/edit/style.css +238 -0
  123. package/dist/collection/components/input/file/index.js +3 -3
  124. package/dist/collection/components/input/file/index.js.map +1 -1
  125. package/dist/collection/components/input/file/style.css +22 -0
  126. package/dist/collection/components/input/index.js +245 -110
  127. package/dist/collection/components/input/index.js.map +1 -1
  128. package/dist/collection/components/input/month/index.js +5 -5
  129. package/dist/collection/components/input/month/index.js.map +1 -1
  130. package/dist/collection/components/input/radio/Selected.js +11 -0
  131. package/dist/collection/components/input/radio/Selected.js.map +1 -0
  132. package/dist/collection/components/input/radio/index.js +426 -0
  133. package/dist/collection/components/input/radio/index.js.map +1 -0
  134. package/dist/collection/components/{radio-button → input/radio/item}/index.js +60 -72
  135. package/dist/collection/components/input/radio/item/index.js.map +1 -0
  136. package/dist/collection/components/input/radio/item/style.css +28 -0
  137. package/dist/collection/components/input/radio/style.css +66 -0
  138. package/dist/collection/components/input/range/index.js +440 -0
  139. package/dist/collection/components/input/range/index.js.map +1 -0
  140. package/dist/collection/components/input/range/style.css +154 -0
  141. package/dist/collection/components/input/reset/index.js +260 -0
  142. package/dist/collection/components/input/reset/index.js.map +1 -0
  143. package/dist/collection/components/input/reset/style.css +255 -0
  144. package/dist/collection/components/input/select/index.js +443 -95
  145. package/dist/collection/components/input/select/index.js.map +1 -1
  146. package/dist/collection/components/input/select/style.css +111 -23
  147. package/dist/collection/components/input/style.css +24 -2
  148. package/dist/collection/components/input/submit/index.js +269 -0
  149. package/dist/collection/components/input/submit/index.js.map +1 -0
  150. package/dist/collection/components/input/submit/style.css +11 -0
  151. package/dist/collection/components/item/Item.js +11 -0
  152. package/dist/collection/components/item/Item.js.map +1 -0
  153. package/dist/collection/components/item/index.js +69 -29
  154. package/dist/collection/components/item/index.js.map +1 -1
  155. package/dist/collection/components/item/style.css +1 -3
  156. package/dist/collection/components/label/index.js +81 -0
  157. package/dist/collection/components/label/index.js.map +1 -0
  158. package/dist/collection/components/label/style.css +15 -0
  159. package/dist/collection/components/lazy/index.js +73 -0
  160. package/dist/collection/components/lazy/index.js.map +1 -0
  161. package/dist/collection/components/{radio → load-more}/index.js +35 -46
  162. package/dist/collection/components/load-more/index.js.map +1 -0
  163. package/dist/collection/components/load-more/style.css +5 -0
  164. package/dist/collection/components/notification/index.js.map +1 -1
  165. package/dist/collection/components/picker/demo/index.js +17 -15
  166. package/dist/collection/components/picker/demo/index.js.map +1 -1
  167. package/dist/collection/components/picker/demo/style.css +24 -1
  168. package/dist/collection/components/picker/index.js +172 -7
  169. package/dist/collection/components/picker/index.js.map +1 -1
  170. package/dist/collection/components/picker/menu/index.js +74 -3
  171. package/dist/collection/components/picker/menu/index.js.map +1 -1
  172. package/dist/collection/components/picker/menu/style.css +16 -6
  173. package/dist/collection/components/picker/option/index.js +51 -3
  174. package/dist/collection/components/picker/option/index.js.map +1 -1
  175. package/dist/collection/components/picker/option/style.css +9 -4
  176. package/dist/collection/components/picker/style.css +28 -3
  177. package/dist/collection/components/popup/index.js +5 -5
  178. package/dist/collection/components/popup/index.js.map +1 -1
  179. package/dist/collection/components/popup/style.css +4 -4
  180. package/dist/collection/components/submit/index.js +0 -15
  181. package/dist/collection/components/submit/index.js.map +1 -1
  182. package/dist/collection/components/submit/style.css +23 -20
  183. package/dist/collection/components/summary/index.js +2 -3
  184. package/dist/collection/components/summary/index.js.map +1 -1
  185. package/dist/collection/components/summary/style.css +25 -16
  186. package/dist/collection/components/table/cell/style.css +3 -3
  187. package/dist/collection/components/table/demo/filtered/Root.js.map +1 -1
  188. package/dist/collection/components/table/demo/filtered/index.js +30 -15
  189. package/dist/collection/components/table/demo/filtered/index.js.map +1 -1
  190. package/dist/collection/components/table/demo/filtered/style.css +9 -0
  191. package/dist/collection/components/table/demo/index.js +2 -14
  192. package/dist/collection/components/table/demo/index.js.map +1 -1
  193. package/dist/collection/components/table/demo/style.css +5 -0
  194. package/dist/collection/components/table/demo/testing/data.js.map +1 -0
  195. package/dist/collection/components/table/demo/testing/index.js +28 -0
  196. package/dist/collection/components/table/demo/testing/index.js.map +1 -0
  197. package/dist/collection/components/table/demo/testing/style.css +32 -0
  198. package/dist/collection/components/table/expandable/cell/index.js +1 -20
  199. package/dist/collection/components/table/expandable/cell/index.js.map +1 -1
  200. package/dist/collection/components/table/expandable/cell/style.css +13 -13
  201. package/dist/collection/components/table/expandable/row/index.js +1 -20
  202. package/dist/collection/components/table/expandable/row/index.js.map +1 -1
  203. package/dist/collection/components/table/expandable/row/style.css +11 -11
  204. package/dist/collection/components/table/footer/index.js +19 -0
  205. package/dist/collection/components/table/footer/index.js.map +1 -0
  206. package/dist/collection/components/table/footer/style.css +10 -0
  207. package/dist/collection/components/table/header/style.css +2 -3
  208. package/dist/collection/components/table/index.js +24 -1
  209. package/dist/collection/components/table/index.js.map +1 -1
  210. package/dist/collection/components/theme/color/index.js +48 -0
  211. package/dist/collection/components/theme/color/index.js.map +1 -0
  212. package/dist/collection/components/theme/color/style.css +8 -0
  213. package/dist/collection/components/theme/color/variant/index.js +66 -0
  214. package/dist/collection/components/theme/color/variant/index.js.map +1 -0
  215. package/dist/collection/components/theme/color/variant/style.css +18 -0
  216. package/dist/collection/components/theme/colors/index.js +30 -0
  217. package/dist/collection/components/theme/colors/index.js.map +1 -0
  218. package/dist/collection/components/theme/colors/style.css +7 -0
  219. package/dist/collection/components/theme/picker/index.js +48 -0
  220. package/dist/collection/components/theme/picker/index.js.map +1 -0
  221. package/dist/collection/components/theme/picker/style.css +0 -0
  222. package/dist/collection/components/toggle-switch/index.js +69 -17
  223. package/dist/collection/components/toggle-switch/index.js.map +1 -1
  224. package/dist/collection/components/toggle-switch/style.css +19 -12
  225. package/dist/collection/global/Observers.js +22 -0
  226. package/dist/collection/global/Observers.js.map +1 -0
  227. package/dist/collection/global/index.js +5 -0
  228. package/dist/collection/global/index.js.map +1 -0
  229. package/dist/collection/model/Color.js +18 -1
  230. package/dist/collection/model/Color.js.map +1 -1
  231. package/dist/collection/model/Data.js +8 -1
  232. package/dist/collection/model/Data.js.map +1 -1
  233. package/dist/collection/model/Icon.js +23 -0
  234. package/dist/collection/model/Icon.js.map +1 -0
  235. package/dist/collection/model/Listenable.js +16 -3
  236. package/dist/collection/model/Listenable.js.map +1 -1
  237. package/dist/collection/model/Option.js.map +1 -1
  238. package/dist/collection/model/index.js +2 -1
  239. package/dist/collection/model/index.js.map +1 -1
  240. package/dist/collection/smoothly.js +1 -1
  241. package/dist/collection/smoothly.js.map +1 -1
  242. package/dist/custom-elements/index.d.ts +120 -24
  243. package/dist/custom-elements/index.js +15445 -33845
  244. package/dist/custom-elements/index.js.map +1 -1
  245. package/dist/esm/Data-c8093b5a.js +579 -0
  246. package/dist/esm/Data-c8093b5a.js.map +1 -0
  247. package/dist/esm/Observers-5f08e828.js +25 -0
  248. package/dist/esm/Observers-5f08e828.js.map +1 -0
  249. package/dist/esm/TimeZone-c8df4905.js +6181 -0
  250. package/dist/esm/TimeZone-c8df4905.js.map +1 -0
  251. package/dist/esm/{getLanguage-9c833eef.js → getLanguage-1e9ec036.js} +2 -5994
  252. package/dist/esm/getLanguage-1e9ec036.js.map +1 -0
  253. package/dist/esm/{index-c196715a.js → index-258984d3.js} +2 -4
  254. package/dist/esm/index-258984d3.js.map +1 -0
  255. package/dist/esm/index.js +3 -14
  256. package/dist/esm/index.js.map +1 -1
  257. package/dist/esm/loader.js +5 -4
  258. package/dist/esm/loader.js.map +1 -1
  259. package/dist/esm/smoothly-accordion-item.entry.js +57 -0
  260. package/dist/esm/smoothly-accordion-item.entry.js.map +1 -0
  261. package/dist/esm/smoothly-accordion.entry.js +54 -0
  262. package/dist/esm/smoothly-accordion.entry.js.map +1 -0
  263. package/dist/esm/smoothly-address-display.entry.js +1 -1
  264. package/dist/esm/smoothly-address.entry.js +1 -1
  265. package/dist/esm/smoothly-addresses.entry.js +1 -1
  266. package/dist/esm/smoothly-app_80.entry.js +11065 -0
  267. package/dist/esm/smoothly-app_80.entry.js.map +1 -0
  268. package/dist/esm/smoothly-checkbox.entry.js +98 -0
  269. package/dist/esm/smoothly-checkbox.entry.js.map +1 -0
  270. package/dist/esm/smoothly-color.entry.js +1 -1
  271. package/dist/esm/smoothly-country.entry.js +10 -9
  272. package/dist/esm/smoothly-country.entry.js.map +1 -1
  273. package/dist/esm/smoothly-display-date-time.entry.js +1 -1
  274. package/dist/esm/smoothly-google-font.entry.js +1 -1
  275. package/dist/esm/smoothly-reorder.entry.js +2 -2
  276. package/dist/esm/smoothly-reorder.entry.js.map +1 -1
  277. package/dist/esm/smoothly-trigger-sink.entry.js +2 -2
  278. package/dist/esm/smoothly-trigger-source.entry.js +2 -2
  279. package/dist/esm/smoothly.js +5 -4
  280. package/dist/esm/smoothly.js.map +1 -1
  281. package/dist/smoothly/index.esm.js +1 -1
  282. package/dist/smoothly/index.esm.js.map +1 -1
  283. package/dist/smoothly/{p-663ccbd0.entry.js → p-12182a73.entry.js} +2 -2
  284. package/dist/smoothly/p-21905b32.entry.js +2 -0
  285. package/dist/smoothly/p-21905b32.entry.js.map +1 -0
  286. package/dist/smoothly/p-2e986022.js +2 -0
  287. package/dist/smoothly/p-2e986022.js.map +1 -0
  288. package/dist/smoothly/p-303520d1.entry.js +2 -0
  289. package/dist/smoothly/p-303520d1.entry.js.map +1 -0
  290. package/dist/smoothly/p-312ef066.js +2 -0
  291. package/dist/smoothly/p-312ef066.js.map +1 -0
  292. package/dist/smoothly/{p-9992c8c4.entry.js → p-47151a53.entry.js} +2 -2
  293. package/dist/smoothly/{p-d0b8061e.js → p-5e387578.js} +3 -3
  294. package/dist/smoothly/p-5e387578.js.map +1 -0
  295. package/dist/smoothly/{p-b82ef190.entry.js → p-635c813e.entry.js} +2 -2
  296. package/dist/smoothly/{p-dbd1afa9.entry.js → p-6aebb818.entry.js} +2 -2
  297. package/dist/smoothly/p-6e9aca2e.entry.js +2 -0
  298. package/dist/smoothly/p-6e9aca2e.entry.js.map +1 -0
  299. package/dist/smoothly/{p-c4ffc15d.entry.js → p-7a69b43f.entry.js} +2 -2
  300. package/dist/smoothly/{p-4d743f07.entry.js → p-7bf147bf.entry.js} +2 -2
  301. package/dist/smoothly/p-823e02b0.entry.js +2 -0
  302. package/dist/smoothly/p-823e02b0.entry.js.map +1 -0
  303. package/dist/smoothly/p-b3eac6af.entry.js +2 -0
  304. package/dist/smoothly/{p-4ff439dd.entry.js.map → p-b3eac6af.entry.js.map} +1 -1
  305. package/dist/smoothly/{p-f96e41aa.entry.js → p-cb493516.entry.js} +2 -2
  306. package/dist/smoothly/p-ede93d69.js +2 -0
  307. package/dist/smoothly/p-ede93d69.js.map +1 -0
  308. package/dist/smoothly/{p-ce4e6f44.entry.js → p-eef1c80b.entry.js} +2 -2
  309. package/dist/smoothly/p-f125610c.entry.js +2 -0
  310. package/dist/smoothly/p-f125610c.entry.js.map +1 -0
  311. package/dist/smoothly/p-fa664317.js +2 -0
  312. package/dist/smoothly/p-fa664317.js.map +1 -0
  313. package/dist/smoothly/smoothly.esm.js +1 -1
  314. package/dist/smoothly/smoothly.esm.js.map +1 -1
  315. package/dist/types/components/Button.d.ts +1 -2
  316. package/dist/types/components/app/index.d.ts +3 -0
  317. package/dist/types/components/app/room/index.d.ts +4 -2
  318. package/dist/types/components/app-demo/index.d.ts +1 -0
  319. package/dist/types/components/burger/index.d.ts +2 -2
  320. package/dist/types/components/button/index.d.ts +2 -2
  321. package/dist/types/components/calendar/index.d.ts +5 -5
  322. package/dist/types/components/checkbox/index.d.ts +4 -2
  323. package/dist/types/components/confirm/index.d.ts +19 -0
  324. package/dist/types/components/filter/Filter.d.ts +21 -0
  325. package/dist/types/components/filter/field/index.d.ts +10 -0
  326. package/dist/types/components/filter/index.d.ts +13 -12
  327. package/dist/types/components/filter/input/index.d.ts +17 -23
  328. package/dist/types/components/filter/picker/index.d.ts +25 -0
  329. package/dist/types/components/filter/toggle/index.d.ts +22 -0
  330. package/dist/types/components/form/index.d.ts +22 -15
  331. package/dist/types/components/icon/index.d.ts +4 -6
  332. package/dist/types/components/input/Editable.d.ts +21 -0
  333. package/dist/types/components/input/Input.d.ts +19 -7
  334. package/dist/types/components/input/Looks.d.ts +7 -1
  335. package/dist/types/components/input/Submittable.d.ts +1 -1
  336. package/dist/types/components/input/checkbox/index.d.ts +30 -0
  337. package/dist/types/components/input/color/index.d.ts +24 -0
  338. package/dist/types/components/input/date/index.d.ts +1 -1
  339. package/dist/types/components/input/date/range/index.d.ts +2 -2
  340. package/dist/types/components/input/demo/index.d.ts +3 -6
  341. package/dist/types/components/input/edit/index.d.ts +18 -0
  342. package/dist/types/components/input/index.d.ts +30 -21
  343. package/dist/types/components/input/month/index.d.ts +1 -1
  344. package/dist/types/components/input/radio/Selected.d.ts +10 -0
  345. package/dist/types/components/input/radio/index.d.ts +36 -0
  346. package/dist/types/components/input/radio/item/index.d.ts +15 -0
  347. package/dist/types/components/input/range/index.d.ts +33 -0
  348. package/dist/types/components/input/reset/index.d.ts +19 -0
  349. package/dist/types/components/input/select/index.d.ts +41 -18
  350. package/dist/types/components/input/submit/index.d.ts +19 -0
  351. package/dist/types/components/item/Item.d.ts +10 -0
  352. package/dist/types/components/item/index.d.ts +8 -5
  353. package/dist/types/components/label/index.d.ts +6 -0
  354. package/dist/types/components/lazy/index.d.ts +7 -0
  355. package/dist/types/components/load-more/index.d.ts +11 -0
  356. package/dist/types/components/picker/demo/index.d.ts +7 -2
  357. package/dist/types/components/picker/index.d.ts +20 -6
  358. package/dist/types/components/picker/menu/index.d.ts +8 -0
  359. package/dist/types/components/picker/option/index.d.ts +2 -0
  360. package/dist/types/components/popup/index.d.ts +1 -1
  361. package/dist/types/components/submit/index.d.ts +0 -1
  362. package/dist/types/components/table/demo/filtered/Root.d.ts +2 -0
  363. package/dist/types/components/table/demo/filtered/index.d.ts +6 -6
  364. package/dist/types/components/table/demo/index.d.ts +1 -1
  365. package/dist/types/components/table/expandable/cell/index.d.ts +0 -1
  366. package/dist/types/components/table/expandable/row/index.d.ts +0 -1
  367. package/dist/types/components/table/footer/index.d.ts +3 -0
  368. package/dist/types/components/table/index.d.ts +2 -0
  369. package/dist/types/components/theme/color/index.d.ts +5 -0
  370. package/dist/types/components/theme/color/variant/index.d.ts +6 -0
  371. package/dist/types/components/theme/colors/index.d.ts +3 -0
  372. package/dist/types/components/theme/picker/index.d.ts +4 -0
  373. package/dist/types/components/toggle-switch/index.d.ts +7 -2
  374. package/dist/types/components.d.ts +658 -182
  375. package/dist/types/global/Observers.d.ts +8 -0
  376. package/dist/types/global/index.d.ts +4 -0
  377. package/dist/types/model/Color.d.ts +7 -1
  378. package/dist/types/model/Data.d.ts +4 -0
  379. package/dist/types/model/Icon.d.ts +8 -0
  380. package/dist/types/model/Listenable.d.ts +10 -1
  381. package/dist/types/model/Option.d.ts +2 -0
  382. package/dist/types/model/index.d.ts +1 -1
  383. package/dist/types/smoothly.d.ts +1 -1
  384. package/package.json +7 -11
  385. package/dist/cjs/Data-afbe461d.js +0 -807
  386. package/dist/cjs/Data-afbe461d.js.map +0 -1
  387. package/dist/cjs/getLanguage-7e53766b.js.map +0 -1
  388. package/dist/cjs/index-6ae370b4.js.map +0 -1
  389. package/dist/cjs/smoothly-accordion_66.cjs.entry.js +0 -29732
  390. package/dist/cjs/smoothly-accordion_66.cjs.entry.js.map +0 -1
  391. package/dist/cjs/smoothly-radio-group.cjs.entry.js +0 -22
  392. package/dist/cjs/smoothly-radio-group.cjs.entry.js.map +0 -1
  393. package/dist/collection/components/filter/Clearable.js +0 -8
  394. package/dist/collection/components/filter/Clearable.js.map +0 -1
  395. package/dist/collection/components/icon/Icon.js +0 -2
  396. package/dist/collection/components/icon/Icon.js.map +0 -1
  397. package/dist/collection/components/input/Changeable.js +0 -8
  398. package/dist/collection/components/input/Changeable.js.map +0 -1
  399. package/dist/collection/components/radio/index.js.map +0 -1
  400. package/dist/collection/components/radio/style.css +0 -31
  401. package/dist/collection/components/radio-button/Selected.js +0 -2
  402. package/dist/collection/components/radio-button/Selected.js.map +0 -1
  403. package/dist/collection/components/radio-button/index.js.map +0 -1
  404. package/dist/collection/components/radio-button/item/index.js +0 -117
  405. package/dist/collection/components/radio-button/item/index.js.map +0 -1
  406. package/dist/collection/components/radio-button/item/style.css +0 -85
  407. package/dist/collection/components/radio-group/index.js +0 -43
  408. package/dist/collection/components/radio-group/index.js.map +0 -1
  409. package/dist/collection/components/radio-group/style.css +0 -36
  410. package/dist/collection/components/table/testing/data.js.map +0 -1
  411. package/dist/collection/components/table/testing/index.js +0 -28
  412. package/dist/collection/components/table/testing/index.js.map +0 -1
  413. package/dist/collection/components/table/testing/style.css +0 -8
  414. package/dist/collection/model/ClientIdentifier.js +0 -13
  415. package/dist/collection/model/ClientIdentifier.js.map +0 -1
  416. package/dist/esm/Data-77d2bdbe.js +0 -803
  417. package/dist/esm/Data-77d2bdbe.js.map +0 -1
  418. package/dist/esm/getLanguage-9c833eef.js.map +0 -1
  419. package/dist/esm/index-c196715a.js.map +0 -1
  420. package/dist/esm/smoothly-accordion_66.entry.js +0 -29663
  421. package/dist/esm/smoothly-accordion_66.entry.js.map +0 -1
  422. package/dist/esm/smoothly-radio-group.entry.js +0 -18
  423. package/dist/esm/smoothly-radio-group.entry.js.map +0 -1
  424. package/dist/smoothly/p-1b714a63.js +0 -2
  425. package/dist/smoothly/p-1b714a63.js.map +0 -1
  426. package/dist/smoothly/p-1efa3261.entry.js +0 -2
  427. package/dist/smoothly/p-1efa3261.entry.js.map +0 -1
  428. package/dist/smoothly/p-4ff439dd.entry.js +0 -2
  429. package/dist/smoothly/p-74a3586c.js +0 -2
  430. package/dist/smoothly/p-74a3586c.js.map +0 -1
  431. package/dist/smoothly/p-8a45ae84.entry.js +0 -2
  432. package/dist/smoothly/p-8a45ae84.entry.js.map +0 -1
  433. package/dist/smoothly/p-90b340b4.entry.js +0 -2
  434. package/dist/smoothly/p-90b340b4.entry.js.map +0 -1
  435. package/dist/smoothly/p-d0b8061e.js.map +0 -1
  436. package/dist/types/components/filter/Clearable.d.ts +0 -6
  437. package/dist/types/components/icon/Icon.d.ts +0 -4
  438. package/dist/types/components/input/Changeable.d.ts +0 -7
  439. package/dist/types/components/radio/index.d.ts +0 -13
  440. package/dist/types/components/radio-button/Selected.d.ts +0 -5
  441. package/dist/types/components/radio-button/index.d.ts +0 -13
  442. package/dist/types/components/radio-button/item/index.d.ts +0 -12
  443. package/dist/types/components/radio-group/index.d.ts +0 -4
  444. package/dist/types/model/ClientIdentifier.d.ts +0 -5
  445. /package/dist/collection/components/{radio-button → lazy}/style.css +0 -0
  446. /package/dist/collection/components/table/{testing → demo/testing}/data.js +0 -0
  447. /package/dist/smoothly/{p-663ccbd0.entry.js.map → p-12182a73.entry.js.map} +0 -0
  448. /package/dist/smoothly/{p-9992c8c4.entry.js.map → p-47151a53.entry.js.map} +0 -0
  449. /package/dist/smoothly/{p-b82ef190.entry.js.map → p-635c813e.entry.js.map} +0 -0
  450. /package/dist/smoothly/{p-dbd1afa9.entry.js.map → p-6aebb818.entry.js.map} +0 -0
  451. /package/dist/smoothly/{p-c4ffc15d.entry.js.map → p-7a69b43f.entry.js.map} +0 -0
  452. /package/dist/smoothly/{p-4d743f07.entry.js.map → p-7bf147bf.entry.js.map} +0 -0
  453. /package/dist/smoothly/{p-f96e41aa.entry.js.map → p-cb493516.entry.js.map} +0 -0
  454. /package/dist/smoothly/{p-ce4e6f44.entry.js.map → p-eef1c80b.entry.js.map} +0 -0
  455. /package/dist/types/components/table/{testing → demo/testing}/data.d.ts +0 -0
  456. /package/dist/types/components/table/{testing → demo/testing}/index.d.ts +0 -0
@@ -3,7 +3,9 @@ export class SmoothlyButtonDemo {
3
3
  render() {
4
4
  return [
5
5
  h("h2", null, "Buttons"),
6
- h("section", null, h("h4", null, "Toggle button"), h("smoothly-toggle", null, h("smoothly-icon", { name: "card", fill: "solid", slot: "icon-slot" })), h("smoothly-toggle", null, h("smoothly-icon", { name: "briefcase", slot: "icon-slot" })), h("smoothly-toggle", null, h("smoothly-icon", { name: "airplane", slot: "icon-slot" })), h("h4", null, "Toggle switches"), h("smoothly-toggle-switch", { disabled: false, size: "small" }), h("smoothly-toggle-switch", { disabled: false }), h("smoothly-toggle-switch", { disabled: false, size: "large" }), h("h4", null, "Links with icons"), h("smoothly-button", { type: "link" }, h("smoothly-icon", { name: "checkmark-circle", slot: "start" }), "type link"), h("smoothly-button", { type: "button", color: "warning", fill: "default" }, h("smoothly-icon", { name: "call", slot: "start" }), h("a", { href: "https://google.com" }, "link")), h("smoothly-button", { link: "https://google.com", type: "link" }, h("smoothly-icon", { name: "arrow-forward", slot: "end" }), "link + type link"), h("h4", null, "Size and Color test"), h("smoothly-button", { color: "primary", fill: "solid", size: "small", shape: "rounded" }, "Color Primary + Small"), h("smoothly-button", { color: "secondary", fill: "solid", shape: "rounded" }, "Color Secondary + Default"), h("smoothly-button", { color: "warning", fill: "solid", size: "large" }, "Color Warning + Large"), h("smoothly-button", { color: "danger", fill: "solid", size: "small", shape: "rounded" }, "Color Danger + Small"), h("smoothly-button", { color: "success", fill: "solid", size: "small", shape: "rounded" }, "Color Success + Small"), h("smoothly-button", { color: "tertiary", fill: "solid", size: "small", shape: "rounded" }, "Color Tertiary + Small"), h("smoothly-button", { color: "dark", fill: "solid", size: "small", shape: "rounded" }, "Color Dark + Small"), h("smoothly-button", { color: "medium", fill: "solid", size: "small", shape: "rounded" }, "Color Medium + Small"), h("smoothly-button", { color: "light", fill: "solid", size: "small", shape: "rounded" }, "Color Light + Small"), h("h4", null, "Expand examples"), h("smoothly-button", { color: "secondary", fill: "solid", expand: "full" }, "Color Secondary + Default"), h("smoothly-button", { color: "warning", fill: "solid", expand: "block" }, "Color Warning + Large"), h("h4", null, "Fill examples"), h("div", null, h("smoothly-button", { shape: "rounded", color: "primary", fill: "solid" }, h("smoothly-icon", { name: "checkmark-circle", slot: "start" }), "Fill Solid"), h("smoothly-button", { shape: "rounded", color: "secondary", fill: "outline" }, h("smoothly-icon", { name: "checkmark-circle", slot: "start", fill: "clear" }), "Fill Outline"), h("smoothly-button", { shape: "rounded", color: "tertiary", fill: "clear" }, h("smoothly-icon", { name: "checkmark-circle", slot: "start", fill: "clear" }), "Fill Clear"), h("smoothly-button", { size: "icon", shape: "rounded", color: "success", fill: "solid" }, h("smoothly-icon", { name: "basketball", fill: "solid" }))), h("h4", null, "Buttons with Icon in \"start\""), h("div", null, h("smoothly-button", { shape: "rounded", fill: "solid", color: "warning" }, h("smoothly-icon", { name: "checkmark-circle", slot: "start" }), "Check"), h("smoothly-button", { shape: "rounded", fill: "solid", color: "secondary" }, h("smoothly-icon", { name: "basketball", slot: "start" }), "Check"), h("smoothly-button", { shape: "rounded", fill: "solid", color: "success" }, h("smoothly-icon", { name: "call", slot: "start" }), "Check"), h("smoothly-button", { size: "icon", fill: "solid", shape: "rounded", color: "success" }, h("smoothly-icon", { name: "call" }))), h("h4", null, "Buttons with Icon in \"end\""), h("smoothly-button", { fill: "solid", color: "light" }, "Go Forward", h("smoothly-icon", { name: "arrow-forward", slot: "end" })), h("h4", null, "Test for icon button"), h("div", null, h("smoothly-button", { size: "icon", fill: "solid", shape: "rounded", color: "success" }, h("smoothly-icon", { name: "call" })), h("smoothly-button", { size: "icon", shape: "rounded", color: "warning", fill: "solid" }, h("smoothly-icon", { name: "search-outline" })), h("smoothly-button", { size: "icon", shape: "rounded", color: "secondary" }, h("smoothly-icon", { name: "checkmark-circle" }))), h("h4", null, "Link examples"), h("div", null, h("smoothly-button", { type: "link" }, "type link"), h("smoothly-button", { type: "button", fill: "clear" }, h("a", { href: "https://google.com" }, "link")), h("smoothly-button", { link: "https://google.com", type: "link" }, "link + type link")), h("h4", null, "Disabled buttons"), h("div", null, h("smoothly-button", { disabled: true, fill: "solid", color: "secondary" }, "Disabled"), h("smoothly-button", { type: "link", link: "https://google.com", disabled: true }, "Disabled link"))),
6
+ h("section", null, h("h4", null, "Confirm button (two clicks)"), h("div", null, h("smoothly-button-confirm", { name: "confirm", type: "button", shape: "rounded", color: "danger", size: "large" }, "Delete"), h("smoothly-button-confirm", { name: "confirm-icon", type: "button", shape: "rounded", color: "success", size: "icon" }, h("smoothly-icon", { name: "checkmark-outline", size: "small" }))), h("h4", null, "Toggle button"), h("smoothly-toggle", null, h("smoothly-icon", { name: "card", fill: "solid", slot: "icon-slot" })), h("smoothly-toggle", null, h("smoothly-icon", { name: "briefcase", slot: "icon-slot" })), h("smoothly-toggle", null, h("smoothly-icon", { name: "airplane", slot: "icon-slot" })), h("h4", null, "Toggle switches"), h("smoothly-toggle-switch", { checkmark: false, color: "primary", disabled: false, size: "small", onSmoothlyToggleSwitchChange: e => {
7
+ console.log("toggleSwitch ", e.detail);
8
+ } }), h("smoothly-toggle-switch", { disabled: false }), h("smoothly-toggle-switch", { disabled: false, size: "large" }), h("h4", null, "Links with icons"), h("smoothly-button", { type: "link" }, h("smoothly-icon", { name: "checkmark-circle", slot: "start" }), "type link"), h("smoothly-button", { type: "button", color: "warning", fill: "default" }, h("smoothly-icon", { name: "call", slot: "start" }), h("a", { href: "https://google.com" }, "link")), h("smoothly-button", { link: "https://google.com", type: "link" }, h("smoothly-icon", { name: "arrow-forward", slot: "end" }), "link + type link"), h("h4", null, "Size and Color test"), h("smoothly-button", { color: "primary", fill: "solid", size: "small", shape: "rounded" }, "Color Primary + Small"), h("smoothly-button", { color: "secondary", fill: "solid", shape: "rounded" }, "Color Secondary + Default"), h("smoothly-button", { color: "warning", fill: "solid", size: "large" }, "Color Warning + Large"), h("smoothly-button", { color: "danger", fill: "solid", size: "small", shape: "rounded" }, "Color Danger + Small"), h("smoothly-button", { color: "success", fill: "solid", size: "small", shape: "rounded" }, "Color Success + Small"), h("smoothly-button", { color: "tertiary", fill: "solid", size: "small", shape: "rounded" }, "Color Tertiary + Small"), h("smoothly-button", { color: "dark", fill: "solid", size: "small", shape: "rounded" }, "Color Dark + Small"), h("smoothly-button", { color: "medium", fill: "solid", size: "small", shape: "rounded" }, "Color Medium + Small"), h("smoothly-button", { color: "light", fill: "solid", size: "small", shape: "rounded" }, "Color Light + Small"), h("h4", null, "Expand examples"), h("smoothly-button", { color: "secondary", fill: "solid", expand: "full" }, "Color Secondary + Default"), h("smoothly-button", { color: "warning", fill: "solid", expand: "block" }, "Color Warning + Large"), h("h4", null, "Fill examples"), h("div", null, h("smoothly-button", { shape: "rounded", color: "primary", fill: "solid" }, h("smoothly-icon", { name: "checkmark-circle", slot: "start" }), "Fill Solid"), h("smoothly-button", { shape: "rounded", color: "secondary", fill: "outline" }, h("smoothly-icon", { name: "checkmark-circle", slot: "start", fill: "clear" }), "Fill Outline"), h("smoothly-button", { shape: "rounded", color: "tertiary", fill: "clear" }, h("smoothly-icon", { name: "checkmark-circle", slot: "start", fill: "clear" }), "Fill Clear"), h("smoothly-button", { size: "icon", shape: "rounded", color: "success", fill: "solid" }, h("smoothly-icon", { name: "basketball", fill: "solid" }))), h("h4", null, "Buttons with Icon in \"start\""), h("div", null, h("smoothly-button", { shape: "rounded", fill: "solid", color: "warning" }, h("smoothly-icon", { name: "checkmark-circle", slot: "start" }), "Check"), h("smoothly-button", { shape: "rounded", fill: "solid", color: "secondary" }, h("smoothly-icon", { name: "basketball", slot: "start" }), "Check"), h("smoothly-button", { shape: "rounded", fill: "solid", color: "success" }, h("smoothly-icon", { name: "call", slot: "start" }), "Check"), h("smoothly-button", { size: "icon", fill: "solid", shape: "rounded", color: "success" }, h("smoothly-icon", { name: "call" })), h("smoothly-button", { size: "flexible", fill: "solid", color: "success" }, h("smoothly-icon", { name: "airplane" }))), h("h4", null, "Buttons with Icon in \"end\""), h("smoothly-button", { fill: "solid", color: "light" }, "Go Forward", h("smoothly-icon", { name: "arrow-forward", slot: "end" })), h("h4", null, "Test for icon button"), h("div", null, h("smoothly-button", { size: "icon", fill: "solid", shape: "rounded", color: "success" }, h("smoothly-icon", { name: "call" })), h("smoothly-button", { size: "icon", shape: "rounded", color: "warning", fill: "solid" }, h("smoothly-icon", { name: "search-outline" })), h("smoothly-button", { size: "icon", shape: "rounded", color: "secondary" }, h("smoothly-icon", { name: "checkmark-circle" }))), h("h4", null, "Link examples"), h("div", null, h("smoothly-button", { type: "link" }, "type link"), h("smoothly-button", { type: "button", fill: "clear" }, h("a", { href: "https://google.com" }, "link")), h("smoothly-button", { link: "https://google.com", type: "link" }, "link + type link")), h("h4", null, "Disabled buttons"), h("div", null, h("smoothly-button", { disabled: true, fill: "solid", color: "secondary" }, "Disabled"), h("smoothly-button", { type: "link", link: "https://google.com", disabled: true }, "Disabled link"))),
7
9
  h("smoothly-back-to-top", null),
8
10
  ];
9
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/button-demo/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAA;AAK5C,MAAM,OAAO,kBAAkB;EAC9B,MAAM;IACL,OAAO;MACN,wBAAgB;MAChB;QACC,8BAAsB;QACtB;UACC,qBAAe,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,WAAW,GAAiB,CACxD;QAClB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I,EAAC,OAAO;YACxE,qBAAe,IAAI,EAAC,gBAAgB,GAAiB,CACpC;UAClB,uBAAiB,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,SAAS,EAAC,KAAK,EAAC,WAAW;YAC7D,qBAAe,IAAI,EAAC,kBAAkB,GAAiB,CACtC,CACb;QACN,8BAAsB;QACtB;UACC,uBAAiB,IAAI,EAAC,MAAM,gBAA4B;UACxD,uBAAiB,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO;YAC1C,SAAG,IAAI,EAAC,oBAAoB,WAAS,CACpB;UAClB,uBAAiB,IAAI,EAAC,oBAAoB,EAAC,IAAI,EAAC,MAAM,uBAEpC,CACb;QACN,iCAAyB;QACzB;UACC,uBAAiB,QAAQ,QAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,WAAW,eAEtC;UAClB,uBAAiB,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,oBAAoB,EAAC,QAAQ,0BAE7C,CACb,CACG;MACV,+BAAwB;KACxB,CAAA;EACF,CAAC;;;;;;;;CACD","sourcesContent":["import { Component, h } from \"@stencil/core\"\n@Component({\n\ttag: \"smoothly-button-demo\",\n\tstyleUrl: \"style.css\",\n})\nexport class SmoothlyButtonDemo {\n\trender() {\n\t\treturn [\n\t\t\t<h2>Buttons</h2>,\n\t\t\t<section>\n\t\t\t\t<h4>Toggle button</h4>\n\t\t\t\t<smoothly-toggle>\n\t\t\t\t\t<smoothly-icon name=\"card\" fill=\"solid\" slot=\"icon-slot\"></smoothly-icon>\n\t\t\t\t</smoothly-toggle>\n\t\t\t\t<smoothly-toggle>\n\t\t\t\t\t<smoothly-icon name=\"briefcase\" slot=\"icon-slot\"></smoothly-icon>\n\t\t\t\t</smoothly-toggle>\n\t\t\t\t<smoothly-toggle>\n\t\t\t\t\t<smoothly-icon name=\"airplane\" slot=\"icon-slot\"></smoothly-icon>\n\t\t\t\t</smoothly-toggle>\n\t\t\t\t<h4>Toggle switches</h4>\n\t\t\t\t<smoothly-toggle-switch disabled={false} size=\"small\"></smoothly-toggle-switch>\n\t\t\t\t<smoothly-toggle-switch disabled={false}></smoothly-toggle-switch>\n\t\t\t\t<smoothly-toggle-switch disabled={false} size=\"large\"></smoothly-toggle-switch>\n\t\t\t\t<h4>Links with icons</h4>\n\t\t\t\t<smoothly-button type=\"link\">\n\t\t\t\t\t<smoothly-icon name=\"checkmark-circle\" slot=\"start\"></smoothly-icon>\n\t\t\t\t\ttype link\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button type=\"button\" color=\"warning\" fill=\"default\">\n\t\t\t\t\t<smoothly-icon name=\"call\" slot=\"start\"></smoothly-icon>\n\t\t\t\t\t<a href=\"https://google.com\">link</a>\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button link=\"https://google.com\" type=\"link\">\n\t\t\t\t\t<smoothly-icon name=\"arrow-forward\" slot=\"end\"></smoothly-icon>\n\t\t\t\t\tlink + type link\n\t\t\t\t</smoothly-button>\n\t\t\t\t<h4>Size and Color test</h4>\n\t\t\t\t<smoothly-button color=\"primary\" fill=\"solid\" size=\"small\" shape=\"rounded\">\n\t\t\t\t\tColor Primary + Small\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button color=\"secondary\" fill=\"solid\" shape=\"rounded\">\n\t\t\t\t\tColor Secondary + Default\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button color=\"warning\" fill=\"solid\" size=\"large\">\n\t\t\t\t\tColor Warning + Large\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button color=\"danger\" fill=\"solid\" size=\"small\" shape=\"rounded\">\n\t\t\t\t\tColor Danger + Small\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button color=\"success\" fill=\"solid\" size=\"small\" shape=\"rounded\">\n\t\t\t\t\tColor Success + Small\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button color=\"tertiary\" fill=\"solid\" size=\"small\" shape=\"rounded\">\n\t\t\t\t\tColor Tertiary + Small\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button color=\"dark\" fill=\"solid\" size=\"small\" shape=\"rounded\">\n\t\t\t\t\tColor Dark + Small\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button color=\"medium\" fill=\"solid\" size=\"small\" shape=\"rounded\">\n\t\t\t\t\tColor Medium + Small\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button color=\"light\" fill=\"solid\" size=\"small\" shape=\"rounded\">\n\t\t\t\t\tColor Light + Small\n\t\t\t\t</smoothly-button>\n\t\t\t\t<h4>Expand examples</h4>\n\t\t\t\t<smoothly-button color=\"secondary\" fill=\"solid\" expand=\"full\">\n\t\t\t\t\tColor Secondary + Default\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button color=\"warning\" fill=\"solid\" expand=\"block\">\n\t\t\t\t\tColor Warning + Large\n\t\t\t\t</smoothly-button>\n\t\t\t\t<h4>Fill examples</h4>\n\t\t\t\t<div>\n\t\t\t\t\t<smoothly-button shape=\"rounded\" color=\"primary\" fill=\"solid\">\n\t\t\t\t\t\t<smoothly-icon name=\"checkmark-circle\" slot=\"start\"></smoothly-icon>\n\t\t\t\t\t\tFill Solid\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button shape=\"rounded\" color=\"secondary\" fill=\"outline\">\n\t\t\t\t\t\t<smoothly-icon name=\"checkmark-circle\" slot=\"start\" fill=\"clear\"></smoothly-icon>\n\t\t\t\t\t\tFill Outline\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button shape=\"rounded\" color=\"tertiary\" fill=\"clear\">\n\t\t\t\t\t\t<smoothly-icon name=\"checkmark-circle\" slot=\"start\" fill=\"clear\"></smoothly-icon>\n\t\t\t\t\t\tFill Clear\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button size=\"icon\" shape=\"rounded\" color=\"success\" fill=\"solid\">\n\t\t\t\t\t\t<smoothly-icon name=\"basketball\" fill=\"solid\"></smoothly-icon>\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t</div>\n\t\t\t\t<h4>Buttons with Icon in \"start\"</h4>\n\t\t\t\t<div>\n\t\t\t\t\t<smoothly-button shape=\"rounded\" fill=\"solid\" color=\"warning\">\n\t\t\t\t\t\t<smoothly-icon name=\"checkmark-circle\" slot=\"start\"></smoothly-icon>\n\t\t\t\t\t\tCheck\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button shape=\"rounded\" fill=\"solid\" color=\"secondary\">\n\t\t\t\t\t\t<smoothly-icon name=\"basketball\" slot=\"start\"></smoothly-icon>\n\t\t\t\t\t\tCheck\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button shape=\"rounded\" fill=\"solid\" color=\"success\">\n\t\t\t\t\t\t<smoothly-icon name=\"call\" slot=\"start\"></smoothly-icon>\n\t\t\t\t\t\tCheck\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button size=\"icon\" fill=\"solid\" shape=\"rounded\" color=\"success\">\n\t\t\t\t\t\t<smoothly-icon name=\"call\"></smoothly-icon>\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t</div>\n\t\t\t\t<h4>Buttons with Icon in \"end\"</h4>\n\t\t\t\t<smoothly-button fill=\"solid\" color=\"light\">\n\t\t\t\t\tGo Forward\n\t\t\t\t\t<smoothly-icon name=\"arrow-forward\" slot=\"end\"></smoothly-icon>\n\t\t\t\t</smoothly-button>\n\t\t\t\t<h4>Test for icon button</h4>\n\t\t\t\t<div>\n\t\t\t\t\t<smoothly-button size=\"icon\" fill=\"solid\" shape=\"rounded\" color=\"success\">\n\t\t\t\t\t\t<smoothly-icon name=\"call\"></smoothly-icon>\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button size=\"icon\" shape=\"rounded\" color=\"warning\" fill=\"solid\">\n\t\t\t\t\t\t<smoothly-icon name=\"search-outline\"></smoothly-icon>\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button size=\"icon\" shape=\"rounded\" color=\"secondary\">\n\t\t\t\t\t\t<smoothly-icon name=\"checkmark-circle\"></smoothly-icon>\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t</div>\n\t\t\t\t<h4>Link examples</h4>\n\t\t\t\t<div>\n\t\t\t\t\t<smoothly-button type=\"link\">type link</smoothly-button>\n\t\t\t\t\t<smoothly-button type=\"button\" fill=\"clear\">\n\t\t\t\t\t\t<a href=\"https://google.com\">link</a>\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button link=\"https://google.com\" type=\"link\">\n\t\t\t\t\t\tlink + type link\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t</div>\n\t\t\t\t<h4>Disabled buttons</h4>\n\t\t\t\t<div>\n\t\t\t\t\t<smoothly-button disabled fill=\"solid\" color=\"secondary\">\n\t\t\t\t\t\tDisabled\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button type=\"link\" link=\"https://google.com\" disabled>\n\t\t\t\t\t\tDisabled link\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t</div>\n\t\t\t</section>,\n\t\t\t<smoothly-back-to-top />,\n\t\t]\n\t}\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/button-demo/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAA;AAK5C,MAAM,OAAO,kBAAkB;EAC9B,MAAM;IACL,OAAO;MACN,wBAAgB;MAChB;QACC,4CAAoC;QACpC;UACC,+BAAyB,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,SAAS,EAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,aAEvE;UAC1B,+BAAyB,IAAI,EAAC,cAAc,EAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,SAAS,EAAC,KAAK,EA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"smoothly-button-demo\",\n\tstyleUrl: \"style.css\",\n})\nexport class SmoothlyButtonDemo {\n\trender() {\n\t\treturn [\n\t\t\t<h2>Buttons</h2>,\n\t\t\t<section>\n\t\t\t\t<h4>Confirm button (two clicks)</h4>\n\t\t\t\t<div>\n\t\t\t\t\t<smoothly-button-confirm name=\"confirm\" type=\"button\" shape=\"rounded\" color=\"danger\" size=\"large\">\n\t\t\t\t\t\tDelete\n\t\t\t\t\t</smoothly-button-confirm>\n\t\t\t\t\t<smoothly-button-confirm name=\"confirm-icon\" type=\"button\" shape=\"rounded\" color=\"success\" size=\"icon\">\n\t\t\t\t\t\t<smoothly-icon name=\"checkmark-outline\" size=\"small\" />\n\t\t\t\t\t</smoothly-button-confirm>\n\t\t\t\t</div>\n\t\t\t\t<h4>Toggle button</h4>\n\t\t\t\t<smoothly-toggle>\n\t\t\t\t\t<smoothly-icon name=\"card\" fill=\"solid\" slot=\"icon-slot\"></smoothly-icon>\n\t\t\t\t</smoothly-toggle>\n\t\t\t\t<smoothly-toggle>\n\t\t\t\t\t<smoothly-icon name=\"briefcase\" slot=\"icon-slot\"></smoothly-icon>\n\t\t\t\t</smoothly-toggle>\n\t\t\t\t<smoothly-toggle>\n\t\t\t\t\t<smoothly-icon name=\"airplane\" slot=\"icon-slot\"></smoothly-icon>\n\t\t\t\t</smoothly-toggle>\n\t\t\t\t<h4>Toggle switches</h4>\n\t\t\t\t<smoothly-toggle-switch\n\t\t\t\t\tcheckmark={false}\n\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\tdisabled={false}\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\tonSmoothlyToggleSwitchChange={e => {\n\t\t\t\t\t\tconsole.log(\"toggleSwitch \", e.detail)\n\t\t\t\t\t}}></smoothly-toggle-switch>\n\t\t\t\t<smoothly-toggle-switch disabled={false}></smoothly-toggle-switch>\n\t\t\t\t<smoothly-toggle-switch disabled={false} size=\"large\"></smoothly-toggle-switch>\n\t\t\t\t<h4>Links with icons</h4>\n\t\t\t\t<smoothly-button type=\"link\">\n\t\t\t\t\t<smoothly-icon name=\"checkmark-circle\" slot=\"start\"></smoothly-icon>\n\t\t\t\t\ttype link\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button type=\"button\" color=\"warning\" fill=\"default\">\n\t\t\t\t\t<smoothly-icon name=\"call\" slot=\"start\"></smoothly-icon>\n\t\t\t\t\t<a href=\"https://google.com\">link</a>\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button link=\"https://google.com\" type=\"link\">\n\t\t\t\t\t<smoothly-icon name=\"arrow-forward\" slot=\"end\"></smoothly-icon>\n\t\t\t\t\tlink + type link\n\t\t\t\t</smoothly-button>\n\t\t\t\t<h4>Size and Color test</h4>\n\t\t\t\t<smoothly-button color=\"primary\" fill=\"solid\" size=\"small\" shape=\"rounded\">\n\t\t\t\t\tColor Primary + Small\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button color=\"secondary\" fill=\"solid\" shape=\"rounded\">\n\t\t\t\t\tColor Secondary + Default\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button color=\"warning\" fill=\"solid\" size=\"large\">\n\t\t\t\t\tColor Warning + Large\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button color=\"danger\" fill=\"solid\" size=\"small\" shape=\"rounded\">\n\t\t\t\t\tColor Danger + Small\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button color=\"success\" fill=\"solid\" size=\"small\" shape=\"rounded\">\n\t\t\t\t\tColor Success + Small\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button color=\"tertiary\" fill=\"solid\" size=\"small\" shape=\"rounded\">\n\t\t\t\t\tColor Tertiary + Small\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button color=\"dark\" fill=\"solid\" size=\"small\" shape=\"rounded\">\n\t\t\t\t\tColor Dark + Small\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button color=\"medium\" fill=\"solid\" size=\"small\" shape=\"rounded\">\n\t\t\t\t\tColor Medium + Small\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button color=\"light\" fill=\"solid\" size=\"small\" shape=\"rounded\">\n\t\t\t\t\tColor Light + Small\n\t\t\t\t</smoothly-button>\n\t\t\t\t<h4>Expand examples</h4>\n\t\t\t\t<smoothly-button color=\"secondary\" fill=\"solid\" expand=\"full\">\n\t\t\t\t\tColor Secondary + Default\n\t\t\t\t</smoothly-button>\n\t\t\t\t<smoothly-button color=\"warning\" fill=\"solid\" expand=\"block\">\n\t\t\t\t\tColor Warning + Large\n\t\t\t\t</smoothly-button>\n\t\t\t\t<h4>Fill examples</h4>\n\t\t\t\t<div>\n\t\t\t\t\t<smoothly-button shape=\"rounded\" color=\"primary\" fill=\"solid\">\n\t\t\t\t\t\t<smoothly-icon name=\"checkmark-circle\" slot=\"start\"></smoothly-icon>\n\t\t\t\t\t\tFill Solid\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button shape=\"rounded\" color=\"secondary\" fill=\"outline\">\n\t\t\t\t\t\t<smoothly-icon name=\"checkmark-circle\" slot=\"start\" fill=\"clear\"></smoothly-icon>\n\t\t\t\t\t\tFill Outline\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button shape=\"rounded\" color=\"tertiary\" fill=\"clear\">\n\t\t\t\t\t\t<smoothly-icon name=\"checkmark-circle\" slot=\"start\" fill=\"clear\"></smoothly-icon>\n\t\t\t\t\t\tFill Clear\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button size=\"icon\" shape=\"rounded\" color=\"success\" fill=\"solid\">\n\t\t\t\t\t\t<smoothly-icon name=\"basketball\" fill=\"solid\"></smoothly-icon>\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t</div>\n\t\t\t\t<h4>Buttons with Icon in \"start\"</h4>\n\t\t\t\t<div>\n\t\t\t\t\t<smoothly-button shape=\"rounded\" fill=\"solid\" color=\"warning\">\n\t\t\t\t\t\t<smoothly-icon name=\"checkmark-circle\" slot=\"start\"></smoothly-icon>\n\t\t\t\t\t\tCheck\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button shape=\"rounded\" fill=\"solid\" color=\"secondary\">\n\t\t\t\t\t\t<smoothly-icon name=\"basketball\" slot=\"start\"></smoothly-icon>\n\t\t\t\t\t\tCheck\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button shape=\"rounded\" fill=\"solid\" color=\"success\">\n\t\t\t\t\t\t<smoothly-icon name=\"call\" slot=\"start\"></smoothly-icon>\n\t\t\t\t\t\tCheck\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button size=\"icon\" fill=\"solid\" shape=\"rounded\" color=\"success\">\n\t\t\t\t\t\t<smoothly-icon name=\"call\"></smoothly-icon>\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button size=\"flexible\" fill=\"solid\" color=\"success\">\n\t\t\t\t\t\t<smoothly-icon name=\"airplane\"></smoothly-icon>\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t</div>\n\t\t\t\t<h4>Buttons with Icon in \"end\"</h4>\n\t\t\t\t<smoothly-button fill=\"solid\" color=\"light\">\n\t\t\t\t\tGo Forward\n\t\t\t\t\t<smoothly-icon name=\"arrow-forward\" slot=\"end\"></smoothly-icon>\n\t\t\t\t</smoothly-button>\n\t\t\t\t<h4>Test for icon button</h4>\n\t\t\t\t<div>\n\t\t\t\t\t<smoothly-button size=\"icon\" fill=\"solid\" shape=\"rounded\" color=\"success\">\n\t\t\t\t\t\t<smoothly-icon name=\"call\"></smoothly-icon>\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button size=\"icon\" shape=\"rounded\" color=\"warning\" fill=\"solid\">\n\t\t\t\t\t\t<smoothly-icon name=\"search-outline\"></smoothly-icon>\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button size=\"icon\" shape=\"rounded\" color=\"secondary\">\n\t\t\t\t\t\t<smoothly-icon name=\"checkmark-circle\"></smoothly-icon>\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t</div>\n\t\t\t\t<h4>Link examples</h4>\n\t\t\t\t<div>\n\t\t\t\t\t<smoothly-button type=\"link\">type link</smoothly-button>\n\t\t\t\t\t<smoothly-button type=\"button\" fill=\"clear\">\n\t\t\t\t\t\t<a href=\"https://google.com\">link</a>\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button link=\"https://google.com\" type=\"link\">\n\t\t\t\t\t\tlink + type link\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t</div>\n\t\t\t\t<h4>Disabled buttons</h4>\n\t\t\t\t<div>\n\t\t\t\t\t<smoothly-button disabled fill=\"solid\" color=\"secondary\">\n\t\t\t\t\t\tDisabled\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<smoothly-button type=\"link\" link=\"https://google.com\" disabled>\n\t\t\t\t\t\tDisabled link\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t</div>\n\t\t\t</section>,\n\t\t\t<smoothly-back-to-top />,\n\t\t]\n\t}\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  smoothly-button-demo {
2
2
  display: block;
3
+ margin: 1rem;
3
4
  }
4
5
 
5
6
  smoothly-button-demo > section > div {
@@ -8,7 +8,7 @@ export function month(date) {
8
8
  const r = [];
9
9
  for (let column = 0; column < 7; column++) {
10
10
  const d = new Date(date);
11
- d.setDate(day++);
11
+ d.setUTCDate(day++);
12
12
  r.push(isoly.Date.create(d));
13
13
  }
14
14
  if (row < 5 || isoly.Date.firstOfMonth(r[0]) == isoly.Date.firstOfMonth(date))
@@ -1 +1 @@
1
- {"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/components/calendar/generate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,MAAM,UAAU,KAAK,CAAC,IAAgB;EACrC,MAAM,CAAC,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AC,GAAG,KAAK,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,EAAE;IAClC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;IAClB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IACnC,MAAM,CAAC,IAAI,CAAC;MACX,IAAI;MACJ,IAAI,EAAE,GAAG,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;MACxD,QAAQ,EAAE,IAAI,IAAI,OAAO;KACzB,CAAC,CAAA;GACF;EACD,OAAO,MAAM,CAAA;AACd,CAAC","sourcesContent":["import * as isoly from \"isoly\"\n\nexport function month(date: isoly.Date): isoly.Date[][] {\n\tconst d = new Date(date)\n\td.setDate(1)\n\tlet day = -((d.getDay() + 6) % 7) + 1\n\tconst result: string[][] = []\n\tfor (let row = 0; row < 6; row++) {\n\t\tconst r = []\n\t\tfor (let column = 0; column < 7; column++) {\n\t\t\tconst d = new Date(date)\n\t\t\td.setDate(day++)\n\t\t\tr.push(isoly.Date.create(d))\n\t\t}\n\t\tif (row < 5 || isoly.Date.firstOfMonth(r[0]) == isoly.Date.firstOfMonth(date))\n\t\t\tresult.push(r)\n\t}\n\treturn result\n}\n\nexport function weekdays(): string[] {\n\tconst day = new globalThis.Date()\n\tday.setDate(day.getDate() - day.getDay() + 1)\n\tconst result: string[] = []\n\tfor (let i = 0; i < 7; i++) {\n\t\tresult.push(day.toLocaleString(undefined, { weekday: \"short\" }))\n\t\tday.setDate(day.getDate() + 1)\n\t}\n\treturn result\n}\n\nexport function months(current: isoly.Date): { date: isoly.Date; name: string; selected?: boolean }[] {\n\tconst day = new globalThis.Date(current)\n\tconst result: { date: isoly.Date; name: string; selected?: boolean }[] = []\n\tfor (let i = 0; i < 12; i++) {\n\t\tday.setMonth(i, 28)\n\t\tconst date = isoly.Date.create(day)\n\t\tresult.push({\n\t\t\tdate,\n\t\t\tname: day.toLocaleString(undefined, { month: \"long\" }),\n\t\t\tselected: date.substr(0, 7) == current.substr(0, 7),\n\t\t})\n\t}\n\treturn result\n}\nexport function years(current: isoly.Date): { date: isoly.Date; name: string; selected?: boolean }[] {\n\tconst day = new globalThis.Date(current)\n\tconst start = new Date().getFullYear() - 10\n\tconst end = new Date().getFullYear() + 10\n\tconst result: { date: isoly.Date; name: string; selected?: boolean }[] = []\n\tfor (let i = start; i <= end; i++) {\n\t\tday.setFullYear(i)\n\t\tconst date = isoly.Date.create(day)\n\t\tresult.push({\n\t\t\tdate,\n\t\t\tname: day.toLocaleString(undefined, { year: \"numeric\" }),\n\t\t\tselected: date == current,\n\t\t})\n\t}\n\treturn result\n}\n"]}
1
+ {"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/components/calendar/generate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,MAAM,UAAU,KAAK,CAAC,IAAgB;EACrC,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAA;EACxB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;EACZ,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA;EACrC,MAAM,MAAM,GAAe,EAAE,CAAA;EAC7B,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE;IACjC,MAAM,CAAC,GAAG,EAAE,CAAA;IACZ,KAAK,IAAI,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,MAAM,EAAE,EAAE;MAC1C,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAA;MACxB,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAA;MACnB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,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IAAI,CAAC;MACX,IAAI;MACJ,IAAI,EAAE,GAAG,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;MACtD,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;KACnD,CAAC,CAAA;GACF;EACD,OAAO,MAAM,CAAA;AACd,CAAC;AACD,MAAM,UAAU,KAAK,CAAC,OAAmB;EACxC,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;EACxC,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE,CAAA;EAC3C,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE,CAAA;EACzC,MAAM,MAAM,GAA6D,EAAE,CAAA;EAC3E,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,EAAE;IAClC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;IAClB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IACnC,MAAM,CAAC,IAAI,CAAC;MACX,IAAI;MACJ,IAAI,EAAE,GAAG,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;MACxD,QAAQ,EAAE,IAAI,IAAI,OAAO;KACzB,CAAC,CAAA;GACF;EACD,OAAO,MAAM,CAAA;AACd,CAAC","sourcesContent":["import * as isoly from \"isoly\"\n\nexport function month(date: isoly.Date): isoly.Date[][] {\n\tconst d = new Date(date)\n\td.setDate(1)\n\tlet day = -((d.getDay() + 6) % 7) + 1\n\tconst result: string[][] = []\n\tfor (let row = 0; row < 6; row++) {\n\t\tconst r = []\n\t\tfor (let column = 0; column < 7; column++) {\n\t\t\tconst d = new Date(date)\n\t\t\td.setUTCDate(day++)\n\t\t\tr.push(isoly.Date.create(d))\n\t\t}\n\t\tif (row < 5 || isoly.Date.firstOfMonth(r[0]) == isoly.Date.firstOfMonth(date))\n\t\t\tresult.push(r)\n\t}\n\treturn result\n}\n\nexport function weekdays(): string[] {\n\tconst day = new globalThis.Date()\n\tday.setDate(day.getDate() - day.getDay() + 1)\n\tconst result: string[] = []\n\tfor (let i = 0; i < 7; i++) {\n\t\tresult.push(day.toLocaleString(undefined, { weekday: \"short\" }))\n\t\tday.setDate(day.getDate() + 1)\n\t}\n\treturn result\n}\n\nexport function months(current: isoly.Date): { date: isoly.Date; name: string; selected?: boolean }[] {\n\tconst day = new globalThis.Date(current)\n\tconst result: { date: isoly.Date; name: string; selected?: boolean }[] = []\n\tfor (let i = 0; i < 12; i++) {\n\t\tday.setMonth(i, 28)\n\t\tconst date = isoly.Date.create(day)\n\t\tresult.push({\n\t\t\tdate,\n\t\t\tname: day.toLocaleString(undefined, { month: \"long\" }),\n\t\t\tselected: date.substr(0, 7) == current.substr(0, 7),\n\t\t})\n\t}\n\treturn result\n}\nexport function years(current: isoly.Date): { date: isoly.Date; name: string; selected?: boolean }[] {\n\tconst day = new globalThis.Date(current)\n\tconst start = new Date().getFullYear() - 10\n\tconst end = new Date().getFullYear() + 10\n\tconst result: { date: isoly.Date; name: string; selected?: boolean }[] = []\n\tfor (let i = start; i <= end; i++) {\n\t\tday.setFullYear(i)\n\t\tconst date = isoly.Date.create(day)\n\t\tresult.push({\n\t\t\tdate,\n\t\t\tname: day.toLocaleString(undefined, { year: \"numeric\" }),\n\t\t\tselected: date == current,\n\t\t})\n\t}\n\treturn result\n}\n"]}
@@ -14,13 +14,13 @@ export class Calendar {
14
14
  this.firstSelected = undefined;
15
15
  }
16
16
  onStart(next) {
17
- this.startChanged.emit(next);
17
+ this.smoothlyStartChange.emit(next);
18
18
  }
19
19
  onEnd(next) {
20
- this.endChanged.emit(next);
20
+ this.smoothlyEndChange.emit(next);
21
21
  }
22
22
  onClick(date) {
23
- this.valueChanged.emit((this.value = date));
23
+ this.smoothlyValueChange.emit((this.value = date));
24
24
  this.clickCounter += 1;
25
25
  if (this.doubleInput) {
26
26
  if (this.clickCounter % 2 == 1)
@@ -32,12 +32,12 @@ export class Calendar {
32
32
  this.start = date;
33
33
  }
34
34
  }
35
- !this.doubleInput && this.dateSet.emit(this.value);
35
+ !this.doubleInput && this.smoothlyDateSet.emit(this.value);
36
36
  this.doubleInput &&
37
37
  this.clickCounter % 2 == 0 &&
38
38
  this.start &&
39
39
  this.end &&
40
- this.dateRangeSet.emit({ start: this.start, end: this.end });
40
+ this.smoothlyDateRangeSet.emit({ start: this.start, end: this.end });
41
41
  }
42
42
  onHover(date) {
43
43
  if (this.doubleInput && this.clickCounter % 2 == 1) {
@@ -54,7 +54,7 @@ export class Calendar {
54
54
  render() {
55
55
  var _a, _b;
56
56
  return [
57
- h("smoothly-input-month", { value: (_a = this.month) !== null && _a !== void 0 ? _a : this.value, onValueChanged: event => {
57
+ h("smoothly-input-month", { value: (_a = this.month) !== null && _a !== void 0 ? _a : this.value, onSmoothlyValueChange: event => {
58
58
  this.month = event.detail;
59
59
  event.stopPropagation();
60
60
  } }),
@@ -250,8 +250,8 @@ export class Calendar {
250
250
  }
251
251
  static get events() {
252
252
  return [{
253
- "method": "valueChanged",
254
- "name": "valueChanged",
253
+ "method": "smoothlyValueChange",
254
+ "name": "smoothlyValueChange",
255
255
  "bubbles": true,
256
256
  "cancelable": true,
257
257
  "composed": true,
@@ -270,8 +270,8 @@ export class Calendar {
270
270
  }
271
271
  }
272
272
  }, {
273
- "method": "startChanged",
274
- "name": "startChanged",
273
+ "method": "smoothlyStartChange",
274
+ "name": "smoothlyStartChange",
275
275
  "bubbles": true,
276
276
  "cancelable": true,
277
277
  "composed": true,
@@ -290,8 +290,8 @@ export class Calendar {
290
290
  }
291
291
  }
292
292
  }, {
293
- "method": "endChanged",
294
- "name": "endChanged",
293
+ "method": "smoothlyEndChange",
294
+ "name": "smoothlyEndChange",
295
295
  "bubbles": true,
296
296
  "cancelable": true,
297
297
  "composed": true,
@@ -310,8 +310,8 @@ export class Calendar {
310
310
  }
311
311
  }
312
312
  }, {
313
- "method": "dateSet",
314
- "name": "dateSet",
313
+ "method": "smoothlyDateSet",
314
+ "name": "smoothlyDateSet",
315
315
  "bubbles": true,
316
316
  "cancelable": true,
317
317
  "composed": true,
@@ -330,8 +330,8 @@ export class Calendar {
330
330
  }
331
331
  }
332
332
  }, {
333
- "method": "dateRangeSet",
334
- "name": "dateRangeSet",
333
+ "method": "smoothlyDateRangeSet",
334
+ "name": "smoothlyDateRangeSet",
335
335
  "bubbles": true,
336
336
  "cancelable": true,
337
337
  "composed": true,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/calendar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC9F,OAAO,EAAE,IAAI,EAAa,MAAM,OAAO,CAAA;AACvC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAA;AAOtC,MAAM,OAAO,QAAQ;;IAwBZ,iBAAY,GAAG,CAAC,CAAA;;iBArBe,IAAI,CAAC,GAAG,EAAE;;;;;;;;EAcjD,OAAO,CAAC,IAAU;IACjB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;EAC7B,CAAC;EAED,KAAK,CAAC,IAAU;IACf,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;EAC3B,CAAC;EAEO,OAAO,CAAC,IAAU;IACzB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAA;IAC3C,IAAI,CAAC,YAAY,IAAI,CAAC,CAAA;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Prop, State, Watch } from \"@stencil/core\"\nimport { Date, DateRange } from \"isoly\"\nimport * as generate from \"./generate\"\n\n@Component({\n\ttag: \"smoothly-calendar\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class Calendar {\n\t@Element() element: HTMLTableRowElement\n\t@Prop({ mutable: true }) month?: Date\n\t@Prop({ mutable: true }) value: Date = Date.now()\n\t@Prop({ mutable: true }) start?: Date\n\t@Prop({ mutable: true }) end?: Date\n\t@Prop({ mutable: true }) max: Date\n\t@Prop({ mutable: true }) min: Date\n\t@Prop({ reflect: true }) doubleInput: boolean\n\t@Event() valueChanged: EventEmitter<Date>\n\t@Event() startChanged: EventEmitter<Date>\n\t@Event() endChanged: EventEmitter<Date>\n\t@Event() dateSet: EventEmitter<Date>\n\t@Event() dateRangeSet: EventEmitter<DateRange>\n\tprivate frozenDate: Date\n\t@State() firstSelected: boolean\n\t@Watch(\"start\")\n\tonStart(next: Date) {\n\t\tthis.startChanged.emit(next)\n\t}\n\t@Watch(\"end\")\n\tonEnd(next: Date) {\n\t\tthis.endChanged.emit(next)\n\t}\n\tprivate clickCounter = 0\n\tprivate onClick(date: Date) {\n\t\tthis.valueChanged.emit((this.value = date))\n\t\tthis.clickCounter += 1\n\t\tif (this.doubleInput) {\n\t\t\tif (this.clickCounter % 2 == 1)\n\t\t\t\tthis.start = this.end = this.frozenDate = date\n\t\t\telse {\n\t\t\t\tif (this.start && date > this.start)\n\t\t\t\t\tthis.end = date\n\t\t\t\telse\n\t\t\t\t\tthis.start = date\n\t\t\t}\n\t\t}\n\t\t!this.doubleInput && this.dateSet.emit(this.value)\n\t\tthis.doubleInput &&\n\t\t\tthis.clickCounter % 2 == 0 &&\n\t\t\tthis.start &&\n\t\t\tthis.end &&\n\t\t\tthis.dateRangeSet.emit({ start: this.start, end: this.end })\n\t}\n\tprivate onHover(date: Date) {\n\t\tif (this.doubleInput && this.clickCounter % 2 == 1) {\n\t\t\tif (date < this.frozenDate) {\n\t\t\t\tthis.start = date\n\t\t\t\tthis.end = this.frozenDate\n\t\t\t} else {\n\t\t\t\tthis.start = this.frozenDate\n\t\t\t\tthis.end = date\n\t\t\t}\n\t\t}\n\t}\n\trender() {\n\t\treturn [\n\t\t\t<smoothly-input-month\n\t\t\t\tvalue={this.month ?? this.value}\n\t\t\t\tonValueChanged={event => {\n\t\t\t\t\tthis.month = event.detail\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}}></smoothly-input-month>,\n\t\t\t<table>\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t{generate.weekdays().map(day => (\n\t\t\t\t\t\t\t<th>{day}</th>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t{generate.month(this.month ?? this.value).map(week => (\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t{week.map(date => (\n\t\t\t\t\t\t\t<td\n\t\t\t\t\t\t\t\ttabindex={1}\n\t\t\t\t\t\t\t\tonMouseOver={() => {\n\t\t\t\t\t\t\t\t\t!this.doubleInput && (this.min || this.max) && (date < this.min || date > this.max)\n\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t: this.onHover(date)\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\t\t(this.min || this.max) && (date < this.min || date > this.max) ? undefined : () => this.onClick(date)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tclass={(date == this.value ? [\"selected\"] : [])\n\t\t\t\t\t\t\t\t\t.concat(\n\t\t\t\t\t\t\t\t\t\t...(date == Date.now() ? [\"today\"] : []),\n\t\t\t\t\t\t\t\t\t\tDate.firstOfMonth(this.month ?? this.value) == Date.firstOfMonth(date) ? [\"currentMonth\"] : [],\n\t\t\t\t\t\t\t\t\t\tthis.doubleInput\n\t\t\t\t\t\t\t\t\t\t\t? this.start == date || this.end == date\n\t\t\t\t\t\t\t\t\t\t\t\t? [\"selected\"]\n\t\t\t\t\t\t\t\t\t\t\t\t: date >= (this.start ?? \"\") && date <= (this.end ?? \"\")\n\t\t\t\t\t\t\t\t\t\t\t\t? [\"dateRange\"]\n\t\t\t\t\t\t\t\t\t\t\t\t: []\n\t\t\t\t\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t.concat(...(this.min || this.max ? (date < this.min || date > this.max ? [\"disable\"] : []) : \"\"))\n\t\t\t\t\t\t\t\t\t.join(\" \")}>\n\t\t\t\t\t\t\t\t{date.substring(8, 10)}\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</tr>\n\t\t\t\t))}\n\t\t\t</table>,\n\t\t]\n\t}\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/calendar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC9F,OAAO,EAAE,IAAI,EAAa,MAAM,OAAO,CAAA;AACvC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAA;AAOtC,MAAM,OAAO,QAAQ;;IAwBZ,iBAAY,GAAG,CAAC,CAAA;;iBArBe,IAAI,CAAC,GAAG,EAAE;;;;;;;;EAcjD,OAAO,CAAC,IAAU;IACjB,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;EACpC,CAAC;EAED,KAAK,CAAC,IAAU;IACf,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;EAClC,CAAC;EAEO,OAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Prop, State, Watch } from \"@stencil/core\"\nimport { Date, DateRange } from \"isoly\"\nimport * as generate from \"./generate\"\n\n@Component({\n\ttag: \"smoothly-calendar\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class Calendar {\n\t@Element() element: HTMLTableRowElement\n\t@Prop({ mutable: true }) month?: Date\n\t@Prop({ mutable: true }) value: Date = Date.now()\n\t@Prop({ mutable: true }) start?: Date\n\t@Prop({ mutable: true }) end?: Date\n\t@Prop({ mutable: true }) max: Date\n\t@Prop({ mutable: true }) min: Date\n\t@Prop({ reflect: true }) doubleInput: boolean\n\t@Event() smoothlyValueChange: EventEmitter<Date>\n\t@Event() smoothlyStartChange: EventEmitter<Date>\n\t@Event() smoothlyEndChange: EventEmitter<Date>\n\t@Event() smoothlyDateSet: EventEmitter<Date>\n\t@Event() smoothlyDateRangeSet: EventEmitter<DateRange>\n\tprivate frozenDate: Date\n\t@State() firstSelected: boolean\n\t@Watch(\"start\")\n\tonStart(next: Date) {\n\t\tthis.smoothlyStartChange.emit(next)\n\t}\n\t@Watch(\"end\")\n\tonEnd(next: Date) {\n\t\tthis.smoothlyEndChange.emit(next)\n\t}\n\tprivate clickCounter = 0\n\tprivate onClick(date: Date) {\n\t\tthis.smoothlyValueChange.emit((this.value = date))\n\t\tthis.clickCounter += 1\n\t\tif (this.doubleInput) {\n\t\t\tif (this.clickCounter % 2 == 1)\n\t\t\t\tthis.start = this.end = this.frozenDate = date\n\t\t\telse {\n\t\t\t\tif (this.start && date > this.start)\n\t\t\t\t\tthis.end = date\n\t\t\t\telse\n\t\t\t\t\tthis.start = date\n\t\t\t}\n\t\t}\n\t\t!this.doubleInput && this.smoothlyDateSet.emit(this.value)\n\t\tthis.doubleInput &&\n\t\t\tthis.clickCounter % 2 == 0 &&\n\t\t\tthis.start &&\n\t\t\tthis.end &&\n\t\t\tthis.smoothlyDateRangeSet.emit({ start: this.start, end: this.end })\n\t}\n\tprivate onHover(date: Date) {\n\t\tif (this.doubleInput && this.clickCounter % 2 == 1) {\n\t\t\tif (date < this.frozenDate) {\n\t\t\t\tthis.start = date\n\t\t\t\tthis.end = this.frozenDate\n\t\t\t} else {\n\t\t\t\tthis.start = this.frozenDate\n\t\t\t\tthis.end = date\n\t\t\t}\n\t\t}\n\t}\n\trender() {\n\t\treturn [\n\t\t\t<smoothly-input-month\n\t\t\t\tvalue={this.month ?? this.value}\n\t\t\t\tonSmoothlyValueChange={event => {\n\t\t\t\t\tthis.month = event.detail\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}}></smoothly-input-month>,\n\t\t\t<table>\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t{generate.weekdays().map(day => (\n\t\t\t\t\t\t\t<th>{day}</th>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t{generate.month(this.month ?? this.value).map(week => (\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t{week.map(date => (\n\t\t\t\t\t\t\t<td\n\t\t\t\t\t\t\t\ttabindex={1}\n\t\t\t\t\t\t\t\tonMouseOver={() => {\n\t\t\t\t\t\t\t\t\t!this.doubleInput && (this.min || this.max) && (date < this.min || date > this.max)\n\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t: this.onHover(date)\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\t\t(this.min || this.max) && (date < this.min || date > this.max) ? undefined : () => this.onClick(date)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tclass={(date == this.value ? [\"selected\"] : [])\n\t\t\t\t\t\t\t\t\t.concat(\n\t\t\t\t\t\t\t\t\t\t...(date == Date.now() ? [\"today\"] : []),\n\t\t\t\t\t\t\t\t\t\tDate.firstOfMonth(this.month ?? this.value) == Date.firstOfMonth(date) ? [\"currentMonth\"] : [],\n\t\t\t\t\t\t\t\t\t\tthis.doubleInput\n\t\t\t\t\t\t\t\t\t\t\t? this.start == date || this.end == date\n\t\t\t\t\t\t\t\t\t\t\t\t? [\"selected\"]\n\t\t\t\t\t\t\t\t\t\t\t\t: date >= (this.start ?? \"\") && date <= (this.end ?? \"\")\n\t\t\t\t\t\t\t\t\t\t\t\t? [\"dateRange\"]\n\t\t\t\t\t\t\t\t\t\t\t\t: []\n\t\t\t\t\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t.concat(...(this.min || this.max ? (date < this.min || date > this.max ? [\"disable\"] : []) : \"\"))\n\t\t\t\t\t\t\t\t\t.join(\" \")}>\n\t\t\t\t\t\t\t\t{date.substring(8, 10)}\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</tr>\n\t\t\t\t))}\n\t\t\t</table>,\n\t\t]\n\t}\n}\n"]}
@@ -5,16 +5,21 @@ export class SmoothlyCheckbox {
5
5
  this.size = "tiny";
6
6
  this.checked = false;
7
7
  this.intermediate = false;
8
+ this.unavailable = false;
9
+ this.disabled = false;
8
10
  this.name = undefined;
9
11
  this.value = undefined;
10
- this.disabled = undefined;
11
12
  this.t = undefined;
12
13
  }
13
14
  componentWillLoad() {
14
15
  this.t = translation.create(this.element);
15
16
  }
17
+ unavailableChanged() {
18
+ if (this.unavailable && this.checked)
19
+ this.smoothlyInput.emit({ [this.name]: undefined });
20
+ }
16
21
  async toggle() {
17
- if (!this.disabled) {
22
+ if (!this.disabled && !this.unavailable) {
18
23
  const checked = this.intermediate || this.checked == false;
19
24
  this.smoothlyInput.emit({
20
25
  [this.name]: checked ? this.value : undefined,
@@ -24,18 +29,16 @@ export class SmoothlyCheckbox {
24
29
  }
25
30
  async clear() {
26
31
  this.checked = false;
27
- this.smoothlyInput.emit({
28
- [this.name]: undefined,
29
- });
32
+ this.smoothlyInput.emit({ [this.name]: undefined });
30
33
  }
31
34
  render() {
32
- return (h(Host, null, h("main", null, h("div", null, h("smoothly-icon", { toolTip: this.t(!this.checked ? "Select" : "De-select"), onClick: e => {
33
- this.toggle();
34
- }, size: this.size, name: this.intermediate && !this.checked
35
- ? "remove-outline"
36
- : this.checked && !this.intermediate
37
- ? "checkmark-outline"
38
- : "empty" })), h("label", { htmlFor: this.name }, h("slot", null))), h("slot", { name: "expansion" })));
35
+ return (h(Host, null, h("smoothly-icon", { toolTip: this.t(!this.checked ? "Select" : "De-select"), onClick: () => this.toggle(), size: this.size, name: this.unavailable
36
+ ? "close-outline"
37
+ : this.intermediate && !this.checked
38
+ ? "remove-outline"
39
+ : this.checked && !this.intermediate
40
+ ? "checkmark-outline"
41
+ : "empty" }), h("label", { htmlFor: this.name }, h("slot", null)), h("div", { class: "expansion" }, h("slot", { name: "expansion" }))));
39
42
  }
40
43
  static get is() { return "smoothly-checkbox"; }
41
44
  static get encapsulation() { return "scoped"; }
@@ -105,12 +108,12 @@ export class SmoothlyCheckbox {
105
108
  "reflect": true,
106
109
  "defaultValue": "false"
107
110
  },
108
- "name": {
109
- "type": "string",
111
+ "unavailable": {
112
+ "type": "boolean",
110
113
  "mutable": false,
111
114
  "complexType": {
112
- "original": "string",
113
- "resolved": "string",
115
+ "original": "boolean",
116
+ "resolved": "boolean",
114
117
  "references": {}
115
118
  },
116
119
  "required": false,
@@ -119,15 +122,16 @@ export class SmoothlyCheckbox {
119
122
  "tags": [],
120
123
  "text": ""
121
124
  },
122
- "attribute": "name",
123
- "reflect": false
125
+ "attribute": "unavailable",
126
+ "reflect": true,
127
+ "defaultValue": "false"
124
128
  },
125
- "value": {
126
- "type": "any",
129
+ "disabled": {
130
+ "type": "boolean",
127
131
  "mutable": false,
128
132
  "complexType": {
129
- "original": "any",
130
- "resolved": "any",
133
+ "original": "boolean",
134
+ "resolved": "boolean",
131
135
  "references": {}
132
136
  },
133
137
  "required": false,
@@ -136,15 +140,33 @@ export class SmoothlyCheckbox {
136
140
  "tags": [],
137
141
  "text": ""
138
142
  },
139
- "attribute": "value",
143
+ "attribute": "disabled",
144
+ "reflect": true,
145
+ "defaultValue": "false"
146
+ },
147
+ "name": {
148
+ "type": "string",
149
+ "mutable": false,
150
+ "complexType": {
151
+ "original": "string",
152
+ "resolved": "string",
153
+ "references": {}
154
+ },
155
+ "required": false,
156
+ "optional": false,
157
+ "docs": {
158
+ "tags": [],
159
+ "text": ""
160
+ },
161
+ "attribute": "name",
140
162
  "reflect": false
141
163
  },
142
- "disabled": {
143
- "type": "boolean",
164
+ "value": {
165
+ "type": "any",
144
166
  "mutable": false,
145
167
  "complexType": {
146
- "original": "boolean",
147
- "resolved": "boolean",
168
+ "original": "any",
169
+ "resolved": "any",
148
170
  "references": {}
149
171
  },
150
172
  "required": false,
@@ -153,8 +175,8 @@ export class SmoothlyCheckbox {
153
175
  "tags": [],
154
176
  "text": ""
155
177
  },
156
- "attribute": "disabled",
157
- "reflect": true
178
+ "attribute": "value",
179
+ "reflect": false
158
180
  }
159
181
  };
160
182
  }
@@ -222,5 +244,14 @@ export class SmoothlyCheckbox {
222
244
  };
223
245
  }
224
246
  static get elementRef() { return "element"; }
247
+ static get watchers() {
248
+ return [{
249
+ "propName": "checked",
250
+ "methodName": "unavailableChanged"
251
+ }, {
252
+ "propName": "unavailable",
253
+ "methodName": "unavailableChanged"
254
+ }];
255
+ }
225
256
  }
226
257
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/checkbox/index.tsx"],"names":[],"mappings":"AAAA,OA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CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,OAAO;cACjC,CAAC,CAAC,gBAAgB;cAClB,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY;gBACpC,CAAC,CAAC,mBAAmB;gBACrB,CAAC,CAAC,OAAO,GACO,CACd;QACN,aAAO,OAAO,EAAE,IAAI,CAAC,IAAI;UACxB,eAAa,CACN,CACF;MACP,YAAM,IAAI,EAAC,WAAW,GAAG,CACnB,CACP,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State } from \"@stencil/core\"\nimport * as langly from \"langly\"\nimport { Clearable } from \"../filter/Clearable\"\nimport * as translation from \"./translation\"\n@Component({\n\ttag: \"smoothly-checkbox\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyCheckbox implements Clearable {\n\t@Element() element: HTMLElement\n\t@Prop() size: \"tiny\" | \"small\" | \"medium\" | \"large\" = \"tiny\"\n\t@Prop({ mutable: true, reflect: true }) checked = false\n\t@Prop({ mutable: true, reflect: true }) intermediate = false\n\t@Prop() name: string\n\t@Prop() value: any\n\t@Prop({ reflect: true }) disabled: boolean\n\t@Event() smoothlyInput: EventEmitter<Record<string, any>>\n\t@State() t: langly.Translate\n\n\tcomponentWillLoad() {\n\t\tthis.t = translation.create(this.element)\n\t}\n\n\t@Method()\n\tasync toggle(): Promise<void> {\n\t\tif (!this.disabled) {\n\t\t\tconst checked = this.intermediate || this.checked == false\n\t\t\tthis.smoothlyInput.emit({\n\t\t\t\t[this.name]: checked ? this.value : undefined,\n\t\t\t})\n\t\t\tthis.checked = checked\n\t\t}\n\t}\n\t@Method()\n\tasync clear() {\n\t\tthis.checked = false\n\t\tthis.smoothlyInput.emit({\n\t\t\t[this.name]: undefined,\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<main>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<smoothly-icon\n\t\t\t\t\t\t\ttoolTip={this.t(!this.checked ? \"Select\" : \"De-select\")}\n\t\t\t\t\t\t\tonClick={e => {\n\t\t\t\t\t\t\t\tthis.toggle()\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\tname={\n\t\t\t\t\t\t\t\tthis.intermediate && !this.checked\n\t\t\t\t\t\t\t\t\t? \"remove-outline\"\n\t\t\t\t\t\t\t\t\t: this.checked && !this.intermediate\n\t\t\t\t\t\t\t\t\t? \"checkmark-outline\"\n\t\t\t\t\t\t\t\t\t: \"empty\"\n\t\t\t\t\t\t\t}></smoothly-icon>\n\t\t\t\t\t</div>\n\t\t\t\t\t<label htmlFor={this.name}>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</label>\n\t\t\t\t</main>\n\t\t\t\t<slot name=\"expansion\" />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/checkbox/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAG5G,OAAO,KAAK,WAAW,MAAM,eAAe,CAAA;AAM5C,MAAM,OAAO,gBAAgB;;gBAE0B,MAAM;mBACV,KAAK;wBACA,KAAK;uBACrB,KAAK;oBACR,KAAK;;;;;EAMzC,iBAAiB;IAChB,IAAI,CAAC,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,O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AC,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY;cACpC,CAAC,CAAC,mBAAmB;cACrB,CAAC,CAAC,OAAO,GAEV;MACF,aAAO,OAAO,EAAE,IAAI,CAAC,IAAI;QACxB,eAAa,CACN;MACR,WAAK,KAAK,EAAE,WAAW;QACtB,YAAM,IAAI,EAAC,WAAW,GAAG,CACpB,CACA,CACP,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from \"@stencil/core\"\nimport * as langly from \"langly\"\nimport { Clearable } from \"../input/Clearable\"\nimport * as translation from \"./translation\"\n@Component({\n\ttag: \"smoothly-checkbox\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyCheckbox implements Clearable {\n\t@Element() element: HTMLElement\n\t@Prop() size: \"tiny\" | \"small\" | \"medium\" | \"large\" = \"tiny\"\n\t@Prop({ mutable: true, reflect: true }) checked = false\n\t@Prop({ mutable: true, reflect: true }) intermediate = false\n\t@Prop({ reflect: true }) unavailable = false\n\t@Prop({ reflect: true }) disabled = false\n\t@Prop() name: string\n\t@Prop() value: any\n\t@Event() smoothlyInput: EventEmitter<Record<string, any>>\n\t@State() t: langly.Translate\n\n\tcomponentWillLoad() {\n\t\tthis.t = translation.create(this.element)\n\t}\n\n\t@Watch(\"checked\")\n\t@Watch(\"unavailable\")\n\tunavailableChanged(): void {\n\t\tif (this.unavailable && this.checked)\n\t\t\tthis.smoothlyInput.emit({ [this.name]: undefined })\n\t}\n\n\t@Method()\n\tasync toggle(): Promise<void> {\n\t\tif (!this.disabled && !this.unavailable) {\n\t\t\tconst checked = this.intermediate || this.checked == false\n\t\t\tthis.smoothlyInput.emit({\n\t\t\t\t[this.name]: checked ? this.value : undefined,\n\t\t\t})\n\t\t\tthis.checked = checked\n\t\t}\n\t}\n\t@Method()\n\tasync clear() {\n\t\tthis.checked = false\n\t\tthis.smoothlyInput.emit({ [this.name]: undefined })\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<smoothly-icon\n\t\t\t\t\ttoolTip={this.t(!this.checked ? \"Select\" : \"De-select\")}\n\t\t\t\t\tonClick={() => this.toggle()}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\tname={\n\t\t\t\t\t\tthis.unavailable\n\t\t\t\t\t\t\t? \"close-outline\"\n\t\t\t\t\t\t\t: this.intermediate && !this.checked\n\t\t\t\t\t\t\t? \"remove-outline\"\n\t\t\t\t\t\t\t: this.checked && !this.intermediate\n\t\t\t\t\t\t\t? \"checkmark-outline\"\n\t\t\t\t\t\t\t: \"empty\"\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<label htmlFor={this.name}>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</label>\n\t\t\t\t<div class={\"expansion\"}>\n\t\t\t\t\t<slot name=\"expansion\" />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
@@ -1,63 +1,60 @@
1
1
  * {
2
2
  box-sizing: border-box;
3
3
  }
4
-
5
4
  :host {
6
- display: block;
7
- }
8
-
9
- :host > main {
10
- display: flex;
11
- align-items: center;
5
+ display: grid;
12
6
  width: fit-content;
13
- height: max-content;
14
- margin: 0.3rem 0;
15
- line-height: 0;
16
- }
17
-
18
- :host > main > label {
19
- display:flex;
20
- justify-content: center;
7
+ grid-template-columns: auto 1fr;
8
+ row-gap: 0.5rem;
21
9
  align-items: center;
22
- margin: 0 0.2em;
10
+ }
11
+ :host label:empty {
12
+ display: none;
13
+ }
14
+ :host label {
15
+ grid-column: 2;
16
+ margin-left: 0.2rem;
23
17
  }
24
18
 
25
- :host > main > div {
19
+ :host smoothly-icon {
20
+ grid-column: 1;
21
+ line-height: 0;
26
22
  border: 1px solid rgb(var(--smoothly-color-contrast));
27
23
  }
28
-
29
- :host > main > div > smoothly-icon {
30
- display: flex;
31
- justify-content: center;
32
- align-items: center;
24
+ :host:not([disabled]):not([unavailable]) smoothly-icon {
25
+ cursor: pointer;
33
26
  }
34
-
35
- :host:not([checked]) > main > div > smoothly-icon,
36
- :host:not([intermediate]) > main > div > smoothly-icon {
37
- stroke: rgb(var(--smoothly-color-contrast));
27
+ :host[disabled] smoothly-icon,
28
+ :host[unavailable] smoothly-icon {
29
+ border-color: rgb(var(--smoothly-color-contrast), 0.3);
38
30
  }
39
-
40
- :host[disabled] > main > div {
41
- border: 1px solid rgb(var(--smoothly-color-contrast), 0.3);
31
+ :host[disabled] smoothly-icon,
32
+ :host[unavailable] smoothly-icon {
33
+ opacity: 0.7;
34
+ }
35
+ :host:not([checked]) smoothly-icon,
36
+ :host:not([intermediate]) smoothly-icon
37
+ :host:not([unavailable]) {
38
+ stroke: rgb(var(--smoothly-color-contrast));
42
39
  }
43
40
 
44
- ::slotted([slot=expansion]) {
45
- display: none;
41
+ :host div.expansion {
42
+ position: relative;
43
+ grid-column-start: 2;
46
44
  background-color: rgb(var(--smoothly-secondary-color));
47
45
  color: rgb(var(--smoothly-secondary-contrast));
48
- }
49
-
50
- [checked]::slotted([slot=expansion]) {
51
- display: block;
52
- padding: 0.5em;
46
+ padding: 0.5rem;
53
47
  border-radius: 5px;
54
- margin: 0.5rem 0;
55
48
  }
56
-
57
- [checked]::slotted([slot=expansion])::before {
49
+ :host:not([checked]) div.expansion,
50
+ :host div.expansion:empty {
51
+ display: none;
52
+ }
53
+ :host div.expansion::before {
58
54
  content: "\25B2";
59
- position: relative;
60
- top: -1.35em;
61
- left: 2rem;
55
+ position: absolute;
56
+ bottom: calc(100% + 0.5rem /* <-- alignment */ - 0.3rem /* <-- adjustment*/);
57
+ line-height: 0;
58
+ left: 0.5rem;
62
59
  color: rgb(var(--smoothly-secondary-color))
63
60
  }