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.
- package/dist/cjs/Data-50d47740.js +589 -0
- package/dist/cjs/Data-50d47740.js.map +1 -0
- package/dist/cjs/Observers-6450f075.js +25 -0
- package/dist/cjs/Observers-6450f075.js.map +1 -0
- package/dist/cjs/TimeZone-016ac7b0.js +6181 -0
- package/dist/cjs/TimeZone-016ac7b0.js.map +1 -0
- package/dist/cjs/{getLanguage-7e53766b.js → getLanguage-49a534df.js} +1 -5993
- package/dist/cjs/getLanguage-49a534df.js.map +1 -0
- package/dist/cjs/{index-6ae370b4.js → index-43af753b.js} +1 -4
- package/dist/cjs/index-43af753b.js.map +1 -0
- package/dist/cjs/index.cjs.js +3 -14
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/smoothly-accordion-item.cjs.entry.js +61 -0
- package/dist/cjs/smoothly-accordion-item.cjs.entry.js.map +1 -0
- package/dist/cjs/smoothly-accordion.cjs.entry.js +58 -0
- package/dist/cjs/smoothly-accordion.cjs.entry.js.map +1 -0
- package/dist/cjs/smoothly-address-display.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-address.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-addresses.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-app_80.cjs.entry.js +11148 -0
- package/dist/cjs/smoothly-app_80.cjs.entry.js.map +1 -0
- package/dist/cjs/smoothly-checkbox.cjs.entry.js +102 -0
- package/dist/cjs/smoothly-checkbox.cjs.entry.js.map +1 -0
- package/dist/cjs/smoothly-color.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-country.cjs.entry.js +56 -55
- package/dist/cjs/smoothly-country.cjs.entry.js.map +1 -1
- package/dist/cjs/smoothly-display-date-time.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-google-font.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-reorder.cjs.entry.js +4 -4
- package/dist/cjs/smoothly-reorder.cjs.entry.js.map +1 -1
- package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-trigger-source.cjs.entry.js +2 -2
- package/dist/cjs/smoothly.cjs.js +4 -3
- package/dist/cjs/smoothly.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +24 -7
- package/dist/collection/components/Button.js +16 -2
- package/dist/collection/components/Button.js.map +1 -1
- package/dist/collection/components/app/index.js +53 -1
- package/dist/collection/components/app/index.js.map +1 -1
- package/dist/collection/components/app/room/index.js +45 -2
- package/dist/collection/components/app/room/index.js.map +1 -1
- package/dist/collection/components/app/room/style.css +23 -9
- package/dist/collection/components/app/style.css +57 -32
- package/dist/collection/components/app-demo/index.js +1 -2
- package/dist/collection/components/app-demo/index.js.map +1 -1
- package/dist/collection/components/burger/index.js +9 -9
- package/dist/collection/components/burger/index.js.map +1 -1
- package/dist/collection/components/button/index.js +9 -22
- package/dist/collection/components/button/index.js.map +1 -1
- package/dist/collection/components/button/style.css +23 -20
- package/dist/collection/components/button-demo/index.js +3 -1
- package/dist/collection/components/button-demo/index.js.map +1 -1
- package/dist/collection/components/button-demo/style.css +1 -0
- package/dist/collection/components/calendar/generate.js +1 -1
- package/dist/collection/components/calendar/generate.js.map +1 -1
- package/dist/collection/components/calendar/index.js +16 -16
- package/dist/collection/components/calendar/index.js.map +1 -1
- package/dist/collection/components/checkbox/index.js +60 -29
- package/dist/collection/components/checkbox/index.js.map +1 -1
- package/dist/collection/components/checkbox/style.css +39 -42
- package/dist/collection/components/confirm/index.js +261 -0
- package/dist/collection/components/confirm/index.js.map +1 -0
- package/dist/collection/components/confirm/style.css +15 -0
- package/dist/collection/components/display/index.js +4 -1
- package/dist/collection/components/display/index.js.map +1 -1
- package/dist/collection/components/display-demo/index.js +16 -1
- package/dist/collection/components/display-demo/index.js.map +1 -1
- package/dist/collection/components/filter/Filter.js +17 -0
- package/dist/collection/components/filter/Filter.js.map +1 -0
- package/dist/collection/components/filter/field/index.js +105 -0
- package/dist/collection/components/filter/field/index.js.map +1 -0
- package/dist/collection/components/filter/field/style.css +4 -0
- package/dist/collection/components/filter/index.js +55 -132
- package/dist/collection/components/filter/index.js.map +1 -1
- package/dist/collection/components/filter/input/index.js +84 -301
- package/dist/collection/components/filter/input/index.js.map +1 -1
- package/dist/collection/components/filter/picker/index.js +229 -0
- package/dist/collection/components/filter/picker/index.js.map +1 -0
- package/dist/collection/components/filter/picker/style.css +8 -0
- package/dist/collection/components/filter/style.css +56 -71
- package/dist/collection/components/filter/toggle/index.js +248 -0
- package/dist/collection/components/filter/toggle/index.js.map +1 -0
- package/dist/collection/components/filter/toggle/style.css +8 -0
- package/dist/collection/components/form/index.js +234 -66
- package/dist/collection/components/form/index.js.map +1 -1
- package/dist/collection/components/form/style.css +3 -1
- package/dist/collection/components/icon/index.js +60 -32
- package/dist/collection/components/icon/index.js.map +1 -1
- package/dist/collection/components/icon/style.css +15 -0
- package/dist/collection/components/icon-demo/index.js +3 -1
- package/dist/collection/components/icon-demo/index.js.map +1 -1
- package/dist/collection/components/icon-demo/style.css +5 -6
- package/dist/collection/components/input/Editable.js +19 -0
- package/dist/collection/components/input/Editable.js.map +1 -0
- package/dist/collection/components/input/Input.js +22 -1
- package/dist/collection/components/input/Input.js.map +1 -1
- package/dist/collection/components/input/Looks.js +7 -1
- package/dist/collection/components/input/Looks.js.map +1 -1
- package/dist/collection/components/input/Submittable.js.map +1 -1
- package/dist/collection/components/input/checkbox/index.js +382 -0
- package/dist/collection/components/input/checkbox/index.js.map +1 -0
- package/dist/collection/components/input/checkbox/style.css +75 -0
- package/dist/collection/components/input/clear/index.js +12 -7
- package/dist/collection/components/input/clear/index.js.map +1 -1
- package/dist/collection/components/input/clear/style.css +23 -20
- package/dist/collection/components/input/color/index.js +226 -0
- package/dist/collection/components/input/color/index.js.map +1 -0
- package/dist/collection/components/input/color/style.css +15 -0
- package/dist/collection/components/input/date/index.js +8 -8
- package/dist/collection/components/input/date/index.js.map +1 -1
- package/dist/collection/components/input/date/range/index.js +13 -17
- package/dist/collection/components/input/date/range/index.js.map +1 -1
- package/dist/collection/components/input/date/range/style.css +25 -0
- package/dist/collection/components/input/date/style.css +25 -0
- package/dist/collection/components/input/demo/index.js +28 -72
- package/dist/collection/components/input/demo/index.js.map +1 -1
- package/dist/collection/components/input/demo/style.css +15 -0
- package/dist/collection/components/input/edit/index.js +249 -0
- package/dist/collection/components/input/edit/index.js.map +1 -0
- package/dist/collection/components/input/edit/style.css +238 -0
- package/dist/collection/components/input/file/index.js +3 -3
- package/dist/collection/components/input/file/index.js.map +1 -1
- package/dist/collection/components/input/file/style.css +22 -0
- package/dist/collection/components/input/index.js +245 -110
- package/dist/collection/components/input/index.js.map +1 -1
- package/dist/collection/components/input/month/index.js +5 -5
- package/dist/collection/components/input/month/index.js.map +1 -1
- package/dist/collection/components/input/radio/Selected.js +11 -0
- package/dist/collection/components/input/radio/Selected.js.map +1 -0
- package/dist/collection/components/input/radio/index.js +426 -0
- package/dist/collection/components/input/radio/index.js.map +1 -0
- package/dist/collection/components/{radio-button → input/radio/item}/index.js +60 -72
- package/dist/collection/components/input/radio/item/index.js.map +1 -0
- package/dist/collection/components/input/radio/item/style.css +28 -0
- package/dist/collection/components/input/radio/style.css +66 -0
- package/dist/collection/components/input/range/index.js +440 -0
- package/dist/collection/components/input/range/index.js.map +1 -0
- package/dist/collection/components/input/range/style.css +154 -0
- package/dist/collection/components/input/reset/index.js +260 -0
- package/dist/collection/components/input/reset/index.js.map +1 -0
- package/dist/collection/components/input/reset/style.css +255 -0
- package/dist/collection/components/input/select/index.js +443 -95
- package/dist/collection/components/input/select/index.js.map +1 -1
- package/dist/collection/components/input/select/style.css +111 -23
- package/dist/collection/components/input/style.css +24 -2
- package/dist/collection/components/input/submit/index.js +269 -0
- package/dist/collection/components/input/submit/index.js.map +1 -0
- package/dist/collection/components/input/submit/style.css +11 -0
- package/dist/collection/components/item/Item.js +11 -0
- package/dist/collection/components/item/Item.js.map +1 -0
- package/dist/collection/components/item/index.js +69 -29
- package/dist/collection/components/item/index.js.map +1 -1
- package/dist/collection/components/item/style.css +1 -3
- package/dist/collection/components/label/index.js +81 -0
- package/dist/collection/components/label/index.js.map +1 -0
- package/dist/collection/components/label/style.css +15 -0
- package/dist/collection/components/lazy/index.js +73 -0
- package/dist/collection/components/lazy/index.js.map +1 -0
- package/dist/collection/components/{radio → load-more}/index.js +35 -46
- package/dist/collection/components/load-more/index.js.map +1 -0
- package/dist/collection/components/load-more/style.css +5 -0
- package/dist/collection/components/notification/index.js.map +1 -1
- package/dist/collection/components/picker/demo/index.js +17 -15
- package/dist/collection/components/picker/demo/index.js.map +1 -1
- package/dist/collection/components/picker/demo/style.css +24 -1
- package/dist/collection/components/picker/index.js +172 -7
- package/dist/collection/components/picker/index.js.map +1 -1
- package/dist/collection/components/picker/menu/index.js +74 -3
- package/dist/collection/components/picker/menu/index.js.map +1 -1
- package/dist/collection/components/picker/menu/style.css +16 -6
- package/dist/collection/components/picker/option/index.js +51 -3
- package/dist/collection/components/picker/option/index.js.map +1 -1
- package/dist/collection/components/picker/option/style.css +9 -4
- package/dist/collection/components/picker/style.css +28 -3
- package/dist/collection/components/popup/index.js +5 -5
- package/dist/collection/components/popup/index.js.map +1 -1
- package/dist/collection/components/popup/style.css +4 -4
- package/dist/collection/components/submit/index.js +0 -15
- package/dist/collection/components/submit/index.js.map +1 -1
- package/dist/collection/components/submit/style.css +23 -20
- package/dist/collection/components/summary/index.js +2 -3
- package/dist/collection/components/summary/index.js.map +1 -1
- package/dist/collection/components/summary/style.css +25 -16
- package/dist/collection/components/table/cell/style.css +3 -3
- package/dist/collection/components/table/demo/filtered/Root.js.map +1 -1
- package/dist/collection/components/table/demo/filtered/index.js +30 -15
- package/dist/collection/components/table/demo/filtered/index.js.map +1 -1
- package/dist/collection/components/table/demo/filtered/style.css +9 -0
- package/dist/collection/components/table/demo/index.js +2 -14
- package/dist/collection/components/table/demo/index.js.map +1 -1
- package/dist/collection/components/table/demo/style.css +5 -0
- package/dist/collection/components/table/demo/testing/data.js.map +1 -0
- package/dist/collection/components/table/demo/testing/index.js +28 -0
- package/dist/collection/components/table/demo/testing/index.js.map +1 -0
- package/dist/collection/components/table/demo/testing/style.css +32 -0
- package/dist/collection/components/table/expandable/cell/index.js +1 -20
- package/dist/collection/components/table/expandable/cell/index.js.map +1 -1
- package/dist/collection/components/table/expandable/cell/style.css +13 -13
- package/dist/collection/components/table/expandable/row/index.js +1 -20
- package/dist/collection/components/table/expandable/row/index.js.map +1 -1
- package/dist/collection/components/table/expandable/row/style.css +11 -11
- package/dist/collection/components/table/footer/index.js +19 -0
- package/dist/collection/components/table/footer/index.js.map +1 -0
- package/dist/collection/components/table/footer/style.css +10 -0
- package/dist/collection/components/table/header/style.css +2 -3
- package/dist/collection/components/table/index.js +24 -1
- package/dist/collection/components/table/index.js.map +1 -1
- package/dist/collection/components/theme/color/index.js +48 -0
- package/dist/collection/components/theme/color/index.js.map +1 -0
- package/dist/collection/components/theme/color/style.css +8 -0
- package/dist/collection/components/theme/color/variant/index.js +66 -0
- package/dist/collection/components/theme/color/variant/index.js.map +1 -0
- package/dist/collection/components/theme/color/variant/style.css +18 -0
- package/dist/collection/components/theme/colors/index.js +30 -0
- package/dist/collection/components/theme/colors/index.js.map +1 -0
- package/dist/collection/components/theme/colors/style.css +7 -0
- package/dist/collection/components/theme/picker/index.js +48 -0
- package/dist/collection/components/theme/picker/index.js.map +1 -0
- package/dist/collection/components/theme/picker/style.css +0 -0
- package/dist/collection/components/toggle-switch/index.js +69 -17
- package/dist/collection/components/toggle-switch/index.js.map +1 -1
- package/dist/collection/components/toggle-switch/style.css +19 -12
- package/dist/collection/global/Observers.js +22 -0
- package/dist/collection/global/Observers.js.map +1 -0
- package/dist/collection/global/index.js +5 -0
- package/dist/collection/global/index.js.map +1 -0
- package/dist/collection/model/Color.js +18 -1
- package/dist/collection/model/Color.js.map +1 -1
- package/dist/collection/model/Data.js +8 -1
- package/dist/collection/model/Data.js.map +1 -1
- package/dist/collection/model/Icon.js +23 -0
- package/dist/collection/model/Icon.js.map +1 -0
- package/dist/collection/model/Listenable.js +16 -3
- package/dist/collection/model/Listenable.js.map +1 -1
- package/dist/collection/model/Option.js.map +1 -1
- package/dist/collection/model/index.js +2 -1
- package/dist/collection/model/index.js.map +1 -1
- package/dist/collection/smoothly.js +1 -1
- package/dist/collection/smoothly.js.map +1 -1
- package/dist/custom-elements/index.d.ts +120 -24
- package/dist/custom-elements/index.js +15445 -33845
- package/dist/custom-elements/index.js.map +1 -1
- package/dist/esm/Data-c8093b5a.js +579 -0
- package/dist/esm/Data-c8093b5a.js.map +1 -0
- package/dist/esm/Observers-5f08e828.js +25 -0
- package/dist/esm/Observers-5f08e828.js.map +1 -0
- package/dist/esm/TimeZone-c8df4905.js +6181 -0
- package/dist/esm/TimeZone-c8df4905.js.map +1 -0
- package/dist/esm/{getLanguage-9c833eef.js → getLanguage-1e9ec036.js} +2 -5994
- package/dist/esm/getLanguage-1e9ec036.js.map +1 -0
- package/dist/esm/{index-c196715a.js → index-258984d3.js} +2 -4
- package/dist/esm/index-258984d3.js.map +1 -0
- package/dist/esm/index.js +3 -14
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +5 -4
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/smoothly-accordion-item.entry.js +57 -0
- package/dist/esm/smoothly-accordion-item.entry.js.map +1 -0
- package/dist/esm/smoothly-accordion.entry.js +54 -0
- package/dist/esm/smoothly-accordion.entry.js.map +1 -0
- package/dist/esm/smoothly-address-display.entry.js +1 -1
- package/dist/esm/smoothly-address.entry.js +1 -1
- package/dist/esm/smoothly-addresses.entry.js +1 -1
- package/dist/esm/smoothly-app_80.entry.js +11065 -0
- package/dist/esm/smoothly-app_80.entry.js.map +1 -0
- package/dist/esm/smoothly-checkbox.entry.js +98 -0
- package/dist/esm/smoothly-checkbox.entry.js.map +1 -0
- package/dist/esm/smoothly-color.entry.js +1 -1
- package/dist/esm/smoothly-country.entry.js +10 -9
- package/dist/esm/smoothly-country.entry.js.map +1 -1
- package/dist/esm/smoothly-display-date-time.entry.js +1 -1
- package/dist/esm/smoothly-google-font.entry.js +1 -1
- package/dist/esm/smoothly-reorder.entry.js +2 -2
- package/dist/esm/smoothly-reorder.entry.js.map +1 -1
- package/dist/esm/smoothly-trigger-sink.entry.js +2 -2
- package/dist/esm/smoothly-trigger-source.entry.js +2 -2
- package/dist/esm/smoothly.js +5 -4
- package/dist/esm/smoothly.js.map +1 -1
- package/dist/smoothly/index.esm.js +1 -1
- package/dist/smoothly/index.esm.js.map +1 -1
- package/dist/smoothly/{p-663ccbd0.entry.js → p-12182a73.entry.js} +2 -2
- package/dist/smoothly/p-21905b32.entry.js +2 -0
- package/dist/smoothly/p-21905b32.entry.js.map +1 -0
- package/dist/smoothly/p-2e986022.js +2 -0
- package/dist/smoothly/p-2e986022.js.map +1 -0
- package/dist/smoothly/p-303520d1.entry.js +2 -0
- package/dist/smoothly/p-303520d1.entry.js.map +1 -0
- package/dist/smoothly/p-312ef066.js +2 -0
- package/dist/smoothly/p-312ef066.js.map +1 -0
- package/dist/smoothly/{p-9992c8c4.entry.js → p-47151a53.entry.js} +2 -2
- package/dist/smoothly/{p-d0b8061e.js → p-5e387578.js} +3 -3
- package/dist/smoothly/p-5e387578.js.map +1 -0
- package/dist/smoothly/{p-b82ef190.entry.js → p-635c813e.entry.js} +2 -2
- package/dist/smoothly/{p-dbd1afa9.entry.js → p-6aebb818.entry.js} +2 -2
- package/dist/smoothly/p-6e9aca2e.entry.js +2 -0
- package/dist/smoothly/p-6e9aca2e.entry.js.map +1 -0
- package/dist/smoothly/{p-c4ffc15d.entry.js → p-7a69b43f.entry.js} +2 -2
- package/dist/smoothly/{p-4d743f07.entry.js → p-7bf147bf.entry.js} +2 -2
- package/dist/smoothly/p-823e02b0.entry.js +2 -0
- package/dist/smoothly/p-823e02b0.entry.js.map +1 -0
- package/dist/smoothly/p-b3eac6af.entry.js +2 -0
- package/dist/smoothly/{p-4ff439dd.entry.js.map → p-b3eac6af.entry.js.map} +1 -1
- package/dist/smoothly/{p-f96e41aa.entry.js → p-cb493516.entry.js} +2 -2
- package/dist/smoothly/p-ede93d69.js +2 -0
- package/dist/smoothly/p-ede93d69.js.map +1 -0
- package/dist/smoothly/{p-ce4e6f44.entry.js → p-eef1c80b.entry.js} +2 -2
- package/dist/smoothly/p-f125610c.entry.js +2 -0
- package/dist/smoothly/p-f125610c.entry.js.map +1 -0
- package/dist/smoothly/p-fa664317.js +2 -0
- package/dist/smoothly/p-fa664317.js.map +1 -0
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/smoothly/smoothly.esm.js.map +1 -1
- package/dist/types/components/Button.d.ts +1 -2
- package/dist/types/components/app/index.d.ts +3 -0
- package/dist/types/components/app/room/index.d.ts +4 -2
- package/dist/types/components/app-demo/index.d.ts +1 -0
- package/dist/types/components/burger/index.d.ts +2 -2
- package/dist/types/components/button/index.d.ts +2 -2
- package/dist/types/components/calendar/index.d.ts +5 -5
- package/dist/types/components/checkbox/index.d.ts +4 -2
- package/dist/types/components/confirm/index.d.ts +19 -0
- package/dist/types/components/filter/Filter.d.ts +21 -0
- package/dist/types/components/filter/field/index.d.ts +10 -0
- package/dist/types/components/filter/index.d.ts +13 -12
- package/dist/types/components/filter/input/index.d.ts +17 -23
- package/dist/types/components/filter/picker/index.d.ts +25 -0
- package/dist/types/components/filter/toggle/index.d.ts +22 -0
- package/dist/types/components/form/index.d.ts +22 -15
- package/dist/types/components/icon/index.d.ts +4 -6
- package/dist/types/components/input/Editable.d.ts +21 -0
- package/dist/types/components/input/Input.d.ts +19 -7
- package/dist/types/components/input/Looks.d.ts +7 -1
- package/dist/types/components/input/Submittable.d.ts +1 -1
- package/dist/types/components/input/checkbox/index.d.ts +30 -0
- package/dist/types/components/input/color/index.d.ts +24 -0
- package/dist/types/components/input/date/index.d.ts +1 -1
- package/dist/types/components/input/date/range/index.d.ts +2 -2
- package/dist/types/components/input/demo/index.d.ts +3 -6
- package/dist/types/components/input/edit/index.d.ts +18 -0
- package/dist/types/components/input/index.d.ts +30 -21
- package/dist/types/components/input/month/index.d.ts +1 -1
- package/dist/types/components/input/radio/Selected.d.ts +10 -0
- package/dist/types/components/input/radio/index.d.ts +36 -0
- package/dist/types/components/input/radio/item/index.d.ts +15 -0
- package/dist/types/components/input/range/index.d.ts +33 -0
- package/dist/types/components/input/reset/index.d.ts +19 -0
- package/dist/types/components/input/select/index.d.ts +41 -18
- package/dist/types/components/input/submit/index.d.ts +19 -0
- package/dist/types/components/item/Item.d.ts +10 -0
- package/dist/types/components/item/index.d.ts +8 -5
- package/dist/types/components/label/index.d.ts +6 -0
- package/dist/types/components/lazy/index.d.ts +7 -0
- package/dist/types/components/load-more/index.d.ts +11 -0
- package/dist/types/components/picker/demo/index.d.ts +7 -2
- package/dist/types/components/picker/index.d.ts +20 -6
- package/dist/types/components/picker/menu/index.d.ts +8 -0
- package/dist/types/components/picker/option/index.d.ts +2 -0
- package/dist/types/components/popup/index.d.ts +1 -1
- package/dist/types/components/submit/index.d.ts +0 -1
- package/dist/types/components/table/demo/filtered/Root.d.ts +2 -0
- package/dist/types/components/table/demo/filtered/index.d.ts +6 -6
- package/dist/types/components/table/demo/index.d.ts +1 -1
- package/dist/types/components/table/expandable/cell/index.d.ts +0 -1
- package/dist/types/components/table/expandable/row/index.d.ts +0 -1
- package/dist/types/components/table/footer/index.d.ts +3 -0
- package/dist/types/components/table/index.d.ts +2 -0
- package/dist/types/components/theme/color/index.d.ts +5 -0
- package/dist/types/components/theme/color/variant/index.d.ts +6 -0
- package/dist/types/components/theme/colors/index.d.ts +3 -0
- package/dist/types/components/theme/picker/index.d.ts +4 -0
- package/dist/types/components/toggle-switch/index.d.ts +7 -2
- package/dist/types/components.d.ts +658 -182
- package/dist/types/global/Observers.d.ts +8 -0
- package/dist/types/global/index.d.ts +4 -0
- package/dist/types/model/Color.d.ts +7 -1
- package/dist/types/model/Data.d.ts +4 -0
- package/dist/types/model/Icon.d.ts +8 -0
- package/dist/types/model/Listenable.d.ts +10 -1
- package/dist/types/model/Option.d.ts +2 -0
- package/dist/types/model/index.d.ts +1 -1
- package/dist/types/smoothly.d.ts +1 -1
- package/package.json +7 -11
- package/dist/cjs/Data-afbe461d.js +0 -807
- package/dist/cjs/Data-afbe461d.js.map +0 -1
- package/dist/cjs/getLanguage-7e53766b.js.map +0 -1
- package/dist/cjs/index-6ae370b4.js.map +0 -1
- package/dist/cjs/smoothly-accordion_66.cjs.entry.js +0 -29732
- package/dist/cjs/smoothly-accordion_66.cjs.entry.js.map +0 -1
- package/dist/cjs/smoothly-radio-group.cjs.entry.js +0 -22
- package/dist/cjs/smoothly-radio-group.cjs.entry.js.map +0 -1
- package/dist/collection/components/filter/Clearable.js +0 -8
- package/dist/collection/components/filter/Clearable.js.map +0 -1
- package/dist/collection/components/icon/Icon.js +0 -2
- package/dist/collection/components/icon/Icon.js.map +0 -1
- package/dist/collection/components/input/Changeable.js +0 -8
- package/dist/collection/components/input/Changeable.js.map +0 -1
- package/dist/collection/components/radio/index.js.map +0 -1
- package/dist/collection/components/radio/style.css +0 -31
- package/dist/collection/components/radio-button/Selected.js +0 -2
- package/dist/collection/components/radio-button/Selected.js.map +0 -1
- package/dist/collection/components/radio-button/index.js.map +0 -1
- package/dist/collection/components/radio-button/item/index.js +0 -117
- package/dist/collection/components/radio-button/item/index.js.map +0 -1
- package/dist/collection/components/radio-button/item/style.css +0 -85
- package/dist/collection/components/radio-group/index.js +0 -43
- package/dist/collection/components/radio-group/index.js.map +0 -1
- package/dist/collection/components/radio-group/style.css +0 -36
- package/dist/collection/components/table/testing/data.js.map +0 -1
- package/dist/collection/components/table/testing/index.js +0 -28
- package/dist/collection/components/table/testing/index.js.map +0 -1
- package/dist/collection/components/table/testing/style.css +0 -8
- package/dist/collection/model/ClientIdentifier.js +0 -13
- package/dist/collection/model/ClientIdentifier.js.map +0 -1
- package/dist/esm/Data-77d2bdbe.js +0 -803
- package/dist/esm/Data-77d2bdbe.js.map +0 -1
- package/dist/esm/getLanguage-9c833eef.js.map +0 -1
- package/dist/esm/index-c196715a.js.map +0 -1
- package/dist/esm/smoothly-accordion_66.entry.js +0 -29663
- package/dist/esm/smoothly-accordion_66.entry.js.map +0 -1
- package/dist/esm/smoothly-radio-group.entry.js +0 -18
- package/dist/esm/smoothly-radio-group.entry.js.map +0 -1
- package/dist/smoothly/p-1b714a63.js +0 -2
- package/dist/smoothly/p-1b714a63.js.map +0 -1
- package/dist/smoothly/p-1efa3261.entry.js +0 -2
- package/dist/smoothly/p-1efa3261.entry.js.map +0 -1
- package/dist/smoothly/p-4ff439dd.entry.js +0 -2
- package/dist/smoothly/p-74a3586c.js +0 -2
- package/dist/smoothly/p-74a3586c.js.map +0 -1
- package/dist/smoothly/p-8a45ae84.entry.js +0 -2
- package/dist/smoothly/p-8a45ae84.entry.js.map +0 -1
- package/dist/smoothly/p-90b340b4.entry.js +0 -2
- package/dist/smoothly/p-90b340b4.entry.js.map +0 -1
- package/dist/smoothly/p-d0b8061e.js.map +0 -1
- package/dist/types/components/filter/Clearable.d.ts +0 -6
- package/dist/types/components/icon/Icon.d.ts +0 -4
- package/dist/types/components/input/Changeable.d.ts +0 -7
- package/dist/types/components/radio/index.d.ts +0 -13
- package/dist/types/components/radio-button/Selected.d.ts +0 -5
- package/dist/types/components/radio-button/index.d.ts +0 -13
- package/dist/types/components/radio-button/item/index.d.ts +0 -12
- package/dist/types/components/radio-group/index.d.ts +0 -4
- package/dist/types/model/ClientIdentifier.d.ts +0 -5
- /package/dist/collection/components/{radio-button → lazy}/style.css +0 -0
- /package/dist/collection/components/table/{testing → demo/testing}/data.js +0 -0
- /package/dist/smoothly/{p-663ccbd0.entry.js.map → p-12182a73.entry.js.map} +0 -0
- /package/dist/smoothly/{p-9992c8c4.entry.js.map → p-47151a53.entry.js.map} +0 -0
- /package/dist/smoothly/{p-b82ef190.entry.js.map → p-635c813e.entry.js.map} +0 -0
- /package/dist/smoothly/{p-dbd1afa9.entry.js.map → p-6aebb818.entry.js.map} +0 -0
- /package/dist/smoothly/{p-c4ffc15d.entry.js.map → p-7a69b43f.entry.js.map} +0 -0
- /package/dist/smoothly/{p-4d743f07.entry.js.map → p-7bf147bf.entry.js.map} +0 -0
- /package/dist/smoothly/{p-f96e41aa.entry.js.map → p-cb493516.entry.js.map} +0 -0
- /package/dist/smoothly/{p-ce4e6f44.entry.js.map → p-eef1c80b.entry.js.map} +0 -0
- /package/dist/types/components/table/{testing → demo/testing}/data.d.ts +0 -0
- /package/dist/types/components/table/{testing → demo/testing}/index.d.ts +0 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { selectively } from "selectively";
|
|
3
|
+
import { isly } from "isly";
|
|
4
|
+
export class SmoothlyFilterPicker {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.updating = false;
|
|
7
|
+
this.options = new Map();
|
|
8
|
+
this.label = undefined;
|
|
9
|
+
this.property = undefined;
|
|
10
|
+
this.multiple = false;
|
|
11
|
+
this.type = "string";
|
|
12
|
+
}
|
|
13
|
+
componentDidLoad() {
|
|
14
|
+
this.smoothlyFilterUpdate.emit(this.update.bind(this));
|
|
15
|
+
}
|
|
16
|
+
optionChangeHandler(event) {
|
|
17
|
+
event.stopPropagation();
|
|
18
|
+
this.options.set(event.detail.value, {
|
|
19
|
+
state: this.property.split(".").reduceRight((r, e) => ({ [e]: r }), event.detail.value),
|
|
20
|
+
selected: event.detail.set.selected,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
update(expression) {
|
|
24
|
+
this.updating = true;
|
|
25
|
+
if (expression instanceof selectively.And && expression.rules.length > 0)
|
|
26
|
+
for (const option of this.options.values()) {
|
|
27
|
+
option.selected(expression.rules.some(r => this.isCriteria(r, this.property, option.state) &&
|
|
28
|
+
(this.type == "array" ? this.findInstanceOf(r, this.property) : r.is(option.state))));
|
|
29
|
+
}
|
|
30
|
+
else
|
|
31
|
+
this.options.forEach(o => o.selected(false));
|
|
32
|
+
this.updating = false;
|
|
33
|
+
}
|
|
34
|
+
isCriteria(criteria, key, value) {
|
|
35
|
+
const [property, ...rest] = key.split(".");
|
|
36
|
+
return criteria instanceof selectively.Property && criteria.name == property
|
|
37
|
+
? this.isCriteria(criteria.criteria, rest.join("."), value[property])
|
|
38
|
+
: this.multiple
|
|
39
|
+
? (criteria instanceof selectively.Within && criteria.value.some(e => e == value)) ||
|
|
40
|
+
(this.type == "array" && criteria instanceof selectively.Contains && criteria.criteria.some(e => e == value))
|
|
41
|
+
: criteria instanceof selectively.Is && criteria.value == value;
|
|
42
|
+
}
|
|
43
|
+
pickerHandler(event) {
|
|
44
|
+
event.stopPropagation();
|
|
45
|
+
if (!this.updating) {
|
|
46
|
+
const argument = event.detail[this.property];
|
|
47
|
+
const manipulate = (criteria) => {
|
|
48
|
+
let result = criteria;
|
|
49
|
+
const newCriteria = this.getCriteria(argument);
|
|
50
|
+
if (!(result instanceof selectively.Rule))
|
|
51
|
+
result = newCriteria ? selectively.and(result, newCriteria) : result;
|
|
52
|
+
else if (result instanceof selectively.And) {
|
|
53
|
+
const index = result.rules.findIndex(r => this.findInstanceOf(r, this.property));
|
|
54
|
+
!newCriteria && index >= 0
|
|
55
|
+
? result.rules.splice(index, 1)
|
|
56
|
+
: !newCriteria
|
|
57
|
+
? undefined
|
|
58
|
+
: index == -1
|
|
59
|
+
? result.rules.push(newCriteria)
|
|
60
|
+
: (result.rules[index] = newCriteria);
|
|
61
|
+
result = selectively.and(...result.rules);
|
|
62
|
+
}
|
|
63
|
+
return result;
|
|
64
|
+
};
|
|
65
|
+
this.smoothlyFilterManipulate.emit(manipulate.bind(this));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
findInstanceOf(criteria, key) {
|
|
69
|
+
const [property, ...rest] = key.split(".");
|
|
70
|
+
return (criteria instanceof selectively.Property &&
|
|
71
|
+
criteria.name == property &&
|
|
72
|
+
(criteria.criteria instanceof selectively.Within ||
|
|
73
|
+
criteria.criteria instanceof selectively.Is ||
|
|
74
|
+
criteria.criteria instanceof selectively.Contains ||
|
|
75
|
+
(criteria.criteria instanceof selectively.Property && this.findInstanceOf(criteria.criteria, rest.join(".")))));
|
|
76
|
+
}
|
|
77
|
+
getCriteria(detail) {
|
|
78
|
+
let result;
|
|
79
|
+
if (this.multiple && isly.string().array({ criteria: "minLength", value: 1 }).is(detail))
|
|
80
|
+
result = this.type == "array" ? selectively.contains(detail) : selectively.within(detail);
|
|
81
|
+
else if (typeof detail == "string")
|
|
82
|
+
result = selectively.is(detail);
|
|
83
|
+
else
|
|
84
|
+
result = undefined;
|
|
85
|
+
return result && this.property.split(".").reduceRight((r, e) => selectively.property(e, r), result);
|
|
86
|
+
}
|
|
87
|
+
render() {
|
|
88
|
+
return (h("smoothly-picker", { name: this.property, looks: "border", multiple: this.multiple, onSmoothlyInputLooks: e => e.stopPropagation(), onSmoothlyChange: e => e.stopPropagation(), onSmoothlyPickerLoaded: e => e.stopPropagation(), onSmoothlyInput: e => this.pickerHandler(e) }, this.label && (h("span", { slot: "label" }, [this.label.slice(0, 1).toUpperCase(), this.label.slice(1, this.label.length)].join(""))), h("span", { slot: "search" }, "Search"), h("slot", null)));
|
|
89
|
+
}
|
|
90
|
+
static get is() { return "smoothly-filter-picker"; }
|
|
91
|
+
static get encapsulation() { return "scoped"; }
|
|
92
|
+
static get originalStyleUrls() {
|
|
93
|
+
return {
|
|
94
|
+
"$": ["style.css"]
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
static get styleUrls() {
|
|
98
|
+
return {
|
|
99
|
+
"$": ["style.css"]
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
static get properties() {
|
|
103
|
+
return {
|
|
104
|
+
"label": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"mutable": false,
|
|
107
|
+
"complexType": {
|
|
108
|
+
"original": "string",
|
|
109
|
+
"resolved": "string",
|
|
110
|
+
"references": {}
|
|
111
|
+
},
|
|
112
|
+
"required": false,
|
|
113
|
+
"optional": false,
|
|
114
|
+
"docs": {
|
|
115
|
+
"tags": [],
|
|
116
|
+
"text": ""
|
|
117
|
+
},
|
|
118
|
+
"attribute": "label",
|
|
119
|
+
"reflect": false
|
|
120
|
+
},
|
|
121
|
+
"property": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"mutable": false,
|
|
124
|
+
"complexType": {
|
|
125
|
+
"original": "string",
|
|
126
|
+
"resolved": "string",
|
|
127
|
+
"references": {}
|
|
128
|
+
},
|
|
129
|
+
"required": false,
|
|
130
|
+
"optional": false,
|
|
131
|
+
"docs": {
|
|
132
|
+
"tags": [],
|
|
133
|
+
"text": ""
|
|
134
|
+
},
|
|
135
|
+
"attribute": "property",
|
|
136
|
+
"reflect": false
|
|
137
|
+
},
|
|
138
|
+
"multiple": {
|
|
139
|
+
"type": "boolean",
|
|
140
|
+
"mutable": false,
|
|
141
|
+
"complexType": {
|
|
142
|
+
"original": "boolean",
|
|
143
|
+
"resolved": "boolean",
|
|
144
|
+
"references": {}
|
|
145
|
+
},
|
|
146
|
+
"required": false,
|
|
147
|
+
"optional": false,
|
|
148
|
+
"docs": {
|
|
149
|
+
"tags": [],
|
|
150
|
+
"text": ""
|
|
151
|
+
},
|
|
152
|
+
"attribute": "multiple",
|
|
153
|
+
"reflect": false,
|
|
154
|
+
"defaultValue": "false"
|
|
155
|
+
},
|
|
156
|
+
"type": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"mutable": false,
|
|
159
|
+
"complexType": {
|
|
160
|
+
"original": "\"array\" | \"string\"",
|
|
161
|
+
"resolved": "\"array\" | \"string\"",
|
|
162
|
+
"references": {}
|
|
163
|
+
},
|
|
164
|
+
"required": false,
|
|
165
|
+
"optional": false,
|
|
166
|
+
"docs": {
|
|
167
|
+
"tags": [],
|
|
168
|
+
"text": ""
|
|
169
|
+
},
|
|
170
|
+
"attribute": "type",
|
|
171
|
+
"reflect": false,
|
|
172
|
+
"defaultValue": "\"string\""
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
static get events() {
|
|
177
|
+
return [{
|
|
178
|
+
"method": "smoothlyFilterUpdate",
|
|
179
|
+
"name": "smoothlyFilterUpdate",
|
|
180
|
+
"bubbles": true,
|
|
181
|
+
"cancelable": true,
|
|
182
|
+
"composed": true,
|
|
183
|
+
"docs": {
|
|
184
|
+
"tags": [],
|
|
185
|
+
"text": ""
|
|
186
|
+
},
|
|
187
|
+
"complexType": {
|
|
188
|
+
"original": "Filter.Update",
|
|
189
|
+
"resolved": "(expression: Criteria) => void",
|
|
190
|
+
"references": {
|
|
191
|
+
"Filter": {
|
|
192
|
+
"location": "import",
|
|
193
|
+
"path": "../Filter"
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}, {
|
|
198
|
+
"method": "smoothlyFilterManipulate",
|
|
199
|
+
"name": "smoothlyFilterManipulate",
|
|
200
|
+
"bubbles": true,
|
|
201
|
+
"cancelable": true,
|
|
202
|
+
"composed": true,
|
|
203
|
+
"docs": {
|
|
204
|
+
"tags": [],
|
|
205
|
+
"text": ""
|
|
206
|
+
},
|
|
207
|
+
"complexType": {
|
|
208
|
+
"original": "Filter.Manipulate",
|
|
209
|
+
"resolved": "(criteria: Criteria) => Criteria",
|
|
210
|
+
"references": {
|
|
211
|
+
"Filter": {
|
|
212
|
+
"location": "import",
|
|
213
|
+
"path": "../Filter"
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}];
|
|
218
|
+
}
|
|
219
|
+
static get listeners() {
|
|
220
|
+
return [{
|
|
221
|
+
"name": "smoothlyPickerOptionChange",
|
|
222
|
+
"method": "optionChangeHandler",
|
|
223
|
+
"target": undefined,
|
|
224
|
+
"capture": false,
|
|
225
|
+
"passive": false
|
|
226
|
+
}];
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/filter/picker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAS3B,MAAM,OAAO,oBAAoB;;IAChC,aAAQ,GAAG,KAAK,CAAA;IAChB,YAAO,GAAuF,IAAI,GAAG,EAGlG,CAAA;;;oBAGgB,KAAK;gBACW,QAAQ;;EAG3C,gBAAgB;IACf,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;EACvD,CAAC;EAED,mBAAmB,CAAC,KAA0B;IAC7C,KAAK,CAAC,eAAe,EAAE,CAAA;IACvB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE;MACpC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;MACvF,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ;KACnC,CAAC,CAAA;EACH,CAAC;EACD,MAAM,CAAC,UAAgC;IACtC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;IACpB,IAAI,UAAU,YAAY,WAAW,CAAC,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;MACvE,KAAK,MAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Event, EventEmitter, h, Listen, Prop } from \"@stencil/core\"\nimport { selectively } from \"selectively\"\nimport { isly } from \"isly\"\nimport { Option } from \"../../../model\"\nimport { Filter } from \"../Filter\"\n\n@Component({\n\ttag: \"smoothly-filter-picker\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyFilterPicker implements Filter {\n\tupdating = false\n\toptions: Map<string, { state: Record<string, any>; selected: (selected: boolean) => void }> = new Map<\n\t\tstring,\n\t\t{ state: Record<string, any>; selected: (selected: boolean) => void }\n\t>()\n\t@Prop() label: string\n\t@Prop() property: string\n\t@Prop() multiple = false\n\t@Prop() type: \"array\" | \"string\" = \"string\"\n\t@Event() smoothlyFilterUpdate: EventEmitter<Filter.Update>\n\t@Event() smoothlyFilterManipulate: EventEmitter<Filter.Manipulate>\n\tcomponentDidLoad() {\n\t\tthis.smoothlyFilterUpdate.emit(this.update.bind(this))\n\t}\n\t@Listen(\"smoothlyPickerOptionChange\")\n\toptionChangeHandler(event: CustomEvent<Option>) {\n\t\tevent.stopPropagation()\n\t\tthis.options.set(event.detail.value, {\n\t\t\tstate: this.property.split(\".\").reduceRight((r, e) => ({ [e]: r }), event.detail.value),\n\t\t\tselected: event.detail.set.selected,\n\t\t})\n\t}\n\tupdate(expression: selectively.Criteria): void {\n\t\tthis.updating = true\n\t\tif (expression instanceof selectively.And && expression.rules.length > 0)\n\t\t\tfor (const option of this.options.values()) {\n\t\t\t\toption.selected(\n\t\t\t\t\texpression.rules.some(\n\t\t\t\t\t\tr =>\n\t\t\t\t\t\t\tthis.isCriteria(r, this.property, option.state) &&\n\t\t\t\t\t\t\t(this.type == \"array\" ? this.findInstanceOf(r, this.property) : r.is(option.state))\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t}\n\t\telse\n\t\t\tthis.options.forEach(o => o.selected(false))\n\t\tthis.updating = false\n\t}\n\tprivate isCriteria(criteria: selectively.Rule | undefined, key: string, value: Record<string, any> | any): boolean {\n\t\tconst [property, ...rest] = key.split(\".\")\n\t\treturn criteria instanceof selectively.Property && criteria.name == property\n\t\t\t? this.isCriteria(criteria.criteria, rest.join(\".\"), value[property])\n\t\t\t: this.multiple\n\t\t\t? (criteria instanceof selectively.Within && criteria.value.some(e => e == value)) ||\n\t\t\t (this.type == \"array\" && criteria instanceof selectively.Contains && criteria.criteria.some(e => e == value))\n\t\t\t: criteria instanceof selectively.Is && criteria.value == value\n\t}\n\tpickerHandler(event: CustomEvent<Record<string, unknown>>) {\n\t\tevent.stopPropagation()\n\t\tif (!this.updating) {\n\t\t\tconst argument = event.detail[this.property]\n\t\t\tconst manipulate = (criteria: selectively.Criteria): selectively.Criteria => {\n\t\t\t\tlet result: selectively.Criteria = criteria\n\t\t\t\tconst newCriteria = this.getCriteria(argument)\n\t\t\t\tif (!(result instanceof selectively.Rule))\n\t\t\t\t\tresult = newCriteria ? selectively.and(result, newCriteria) : result\n\t\t\t\telse if (result instanceof selectively.And) {\n\t\t\t\t\tconst index = result.rules.findIndex(r => this.findInstanceOf(r, this.property))\n\t\t\t\t\t!newCriteria && index >= 0\n\t\t\t\t\t\t? result.rules.splice(index, 1)\n\t\t\t\t\t\t: !newCriteria\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: index == -1\n\t\t\t\t\t\t? result.rules.push(newCriteria)\n\t\t\t\t\t\t: (result.rules[index] = newCriteria)\n\t\t\t\t\tresult = selectively.and(...result.rules)\n\t\t\t\t}\n\t\t\t\treturn result\n\t\t\t}\n\t\t\tthis.smoothlyFilterManipulate.emit(manipulate.bind(this))\n\t\t}\n\t}\n\tfindInstanceOf(criteria: selectively.Criteria, key: string): boolean {\n\t\tconst [property, ...rest] = key.split(\".\")\n\t\treturn (\n\t\t\tcriteria instanceof selectively.Property &&\n\t\t\tcriteria.name == property &&\n\t\t\t(criteria.criteria instanceof selectively.Within ||\n\t\t\t\tcriteria.criteria instanceof selectively.Is ||\n\t\t\t\tcriteria.criteria instanceof selectively.Contains ||\n\t\t\t\t(criteria.criteria instanceof selectively.Property && this.findInstanceOf(criteria.criteria, rest.join(\".\"))))\n\t\t)\n\t}\n\tprivate getCriteria(detail: unknown): selectively.Rule | undefined {\n\t\tlet result: selectively.Criteria | undefined\n\t\tif (this.multiple && isly.string().array({ criteria: \"minLength\", value: 1 }).is(detail))\n\t\t\tresult = this.type == \"array\" ? selectively.contains(detail) : selectively.within(detail)\n\t\telse if (typeof detail == \"string\")\n\t\t\tresult = selectively.is(detail)\n\t\telse\n\t\t\tresult = undefined\n\t\treturn result && this.property.split(\".\").reduceRight((r, e) => selectively.property(e, r), result)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<smoothly-picker\n\t\t\t\tname={this.property}\n\t\t\t\tlooks=\"border\"\n\t\t\t\tmultiple={this.multiple}\n\t\t\t\tonSmoothlyInputLooks={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyChange={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyPickerLoaded={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyInput={e => this.pickerHandler(e)}>\n\t\t\t\t{this.label && (\n\t\t\t\t\t<span slot=\"label\">\n\t\t\t\t\t\t{[this.label.slice(0, 1).toUpperCase(), this.label.slice(1, this.label.length)].join(\"\")}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<span slot=\"search\">Search</span>\n\t\t\t\t<slot />\n\t\t\t</smoothly-picker>\n\t\t)\n\t}\n}\n"]}
|
|
@@ -1,103 +1,88 @@
|
|
|
1
|
-
* {
|
|
2
|
-
box-sizing: border-box;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
:host {
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
align-items: center;
|
|
10
2
|
position: relative;
|
|
11
|
-
|
|
12
|
-
margin-
|
|
3
|
+
border: 1px solid rgb(var(--smoothly-medium-tint));
|
|
4
|
+
margin-left: 1rem;
|
|
5
|
+
margin-right: 1rem;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: row;
|
|
8
|
+
align-items: center;
|
|
13
9
|
}
|
|
14
10
|
|
|
15
|
-
:host
|
|
16
|
-
|
|
11
|
+
:host>div::slotted([slot=detail]) {
|
|
12
|
+
z-index: 5;
|
|
17
13
|
}
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
:host::slotted([slot=bar]) {
|
|
16
|
+
pointer-events: auto;
|
|
17
|
+
margin-left: 0.3em;
|
|
18
|
+
margin-right: 0.3em;
|
|
23
19
|
}
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
display:
|
|
27
|
-
width: 0px;
|
|
28
|
-
opacity: 0;
|
|
21
|
+
:host>div:empty+smoothly-icon {
|
|
22
|
+
display: none;
|
|
29
23
|
}
|
|
30
24
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
opacity: 1;
|
|
37
|
-
transition: opacity 100ms ease-in-out;
|
|
25
|
+
:host>smoothly-icon {
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
margin-left: 0.3em;
|
|
28
|
+
margin-right: 0.3em;
|
|
29
|
+
flex-shrink: 0;
|
|
38
30
|
}
|
|
39
31
|
|
|
40
|
-
.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
width: 100%;
|
|
44
|
-
border: 1px solid rgb(var(--smoothly-color-contrast));
|
|
45
|
-
border-radius: 0.25em;
|
|
46
|
-
position: absolute;
|
|
32
|
+
.close {
|
|
33
|
+
position: fixed;
|
|
34
|
+
z-index: 3;
|
|
47
35
|
top: 0;
|
|
48
36
|
left: 0;
|
|
37
|
+
width: 100dvw;
|
|
38
|
+
height: 100dvh;
|
|
39
|
+
background: transparent;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.hidden {
|
|
43
|
+
display: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host>.container {
|
|
47
|
+
padding: 2em;
|
|
48
|
+
position: absolute;
|
|
49
|
+
right: 0.35em;
|
|
50
|
+
width: fit-content;
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
top: 100%;
|
|
54
|
+
width: fit-content;
|
|
55
|
+
z-index: 4;
|
|
56
|
+
background-color: rgb(var(--smoothly-color));
|
|
57
|
+
margin: 0.8em -2em;
|
|
49
58
|
}
|
|
50
59
|
|
|
51
60
|
/* arrow */
|
|
52
61
|
.container:before {
|
|
53
|
-
content:"";
|
|
62
|
+
content: "";
|
|
54
63
|
width: 0.6em;
|
|
55
64
|
height: 0.6em;
|
|
56
65
|
transform: rotate(45deg);
|
|
57
|
-
border-top: 1px solid rgb(var(--smoothly-
|
|
58
|
-
border-left: 1px solid rgb(var(--smoothly-
|
|
59
|
-
background-color: rgb(var(--smoothly-
|
|
66
|
+
border-top: 1px solid rgb(var(--smoothly-medium-tint));
|
|
67
|
+
border-left: 1px solid rgb(var(--smoothly-medium-tint));
|
|
68
|
+
background-color: rgb(var(--smoothly-color));
|
|
60
69
|
position: absolute;
|
|
61
70
|
z-index: 3;
|
|
62
71
|
}
|
|
63
72
|
|
|
64
73
|
/* arrow placement */
|
|
65
74
|
.container.arrow-top:before {
|
|
66
|
-
left: calc(
|
|
75
|
+
left: calc(91%);
|
|
67
76
|
top: -5px;
|
|
68
77
|
}
|
|
69
78
|
|
|
70
|
-
|
|
71
|
-
|
|
79
|
+
.container:after {
|
|
80
|
+
content: "";
|
|
81
|
+
height: 100%;
|
|
72
82
|
width: 100%;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
margin-right: 0.25em;
|
|
79
|
-
opacity: 0;
|
|
80
|
-
cursor:text
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.btn.clear {
|
|
84
|
-
margin-right: 0.25em;
|
|
85
|
-
opacity: 0.3;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
::slotted(div[slot=filter]) {
|
|
89
|
-
display: grid;
|
|
90
|
-
grid-template-columns: 1fr;
|
|
91
|
-
justify-content: center;
|
|
92
|
-
align-items: center;
|
|
93
|
-
gap: 0.5em;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
:host > smoothly-fom > smoothly-input > section[slot=end] > smoothly-button {
|
|
97
|
-
font-size: 100%;
|
|
98
|
-
min-width: min-content;
|
|
99
|
-
padding: 0;
|
|
100
|
-
margin: 0;
|
|
101
|
-
border: none !important;
|
|
83
|
+
border: 1px solid rgb(var(--smoothly-medium-tint));
|
|
84
|
+
border-radius: 0.25em;
|
|
85
|
+
position: absolute;
|
|
86
|
+
top: 0;
|
|
87
|
+
left: 0;
|
|
102
88
|
}
|
|
103
|
-
|