smoothly 1.0.0-alpha.21 → 1.0.0-alpha.211
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/{Listenable-63ea2d90.js → Data-ae713814.js} +523 -6
- package/dist/cjs/Data-ae713814.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-49a534df.js +6118 -0
- package/dist/cjs/getLanguage-49a534df.js.map +1 -0
- package/dist/cjs/{index-8adc5c1b.js → index-43af753b.js} +55 -2
- package/dist/cjs/index-43af753b.js.map +1 -0
- package/dist/cjs/index.cjs.js +22 -17
- 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/{Notice-88ba4c70.js → redirect-2e5d4524.js} +11 -2
- package/dist/cjs/redirect-2e5d4524.js.map +1 -0
- 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 +10897 -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 +26 -0
- package/dist/cjs/smoothly-display-date-time.cjs.entry.js.map +1 -0
- package/dist/cjs/smoothly-google-font.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-reorder.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +4 -4
- package/dist/cjs/smoothly-trigger-sink.cjs.entry.js.map +1 -1
- package/dist/cjs/smoothly-trigger-source.cjs.entry.js +6 -6
- package/dist/cjs/smoothly-trigger-source.cjs.entry.js.map +1 -1
- package/dist/cjs/smoothly.cjs.js +4 -3
- package/dist/cjs/smoothly.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +37 -15
- package/dist/collection/components/Button.js +16 -2
- package/dist/collection/components/Button.js.map +1 -1
- package/dist/collection/components/accordion/index.js +32 -12
- package/dist/collection/components/accordion/index.js.map +1 -1
- package/dist/collection/components/accordion-item/index.js +18 -25
- package/dist/collection/components/accordion-item/index.js.map +1 -1
- package/dist/collection/components/app/index.js +99 -29
- package/dist/collection/components/app/index.js.map +1 -1
- package/dist/collection/components/app/room/index.js +134 -25
- package/dist/collection/components/app/room/index.js.map +1 -1
- package/dist/collection/components/app/room/style.css +39 -10
- package/dist/collection/components/app/style.css +104 -39
- package/dist/collection/components/app-demo/index.js +1 -1
- package/dist/collection/components/app-demo/index.js.map +1 -1
- package/dist/collection/components/backtotop/index.js +3 -3
- package/dist/collection/components/backtotop/index.js.map +1 -1
- package/dist/collection/components/burger/index.js +60 -14
- package/dist/collection/components/burger/index.js.map +1 -1
- package/dist/collection/components/burger/style.css +2 -2
- package/dist/collection/components/button/index.js +10 -23
- package/dist/collection/components/button/index.js.map +1 -1
- package/dist/collection/components/button/style.css +33 -35
- package/dist/collection/components/button-demo/index.js +4 -2
- 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 +82 -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/country/index.js +1 -1
- package/dist/collection/components/display/index.js +6 -3
- package/dist/collection/components/display/index.js.map +1 -1
- package/dist/collection/components/display-amount/index.js +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 +64 -302
- package/dist/collection/components/filter/input/index.js.map +1 -1
- package/dist/collection/components/filter/picker/index.js +209 -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 +302 -35
- package/dist/collection/components/form/index.js.map +1 -1
- package/dist/collection/components/form/style.css +11 -17
- package/dist/collection/components/icon/index.js +29 -38
- package/dist/collection/components/icon/index.js.map +1 -1
- package/dist/collection/components/icon-demo/index.js +1 -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/Clearable.js.map +1 -0
- package/dist/collection/components/input/Editable.js +18 -0
- package/dist/collection/components/input/Editable.js.map +1 -0
- package/dist/collection/components/input/Input.js +23 -0
- package/dist/collection/components/input/Input.js.map +1 -0
- package/dist/collection/components/input/Looks.js +8 -0
- package/dist/collection/components/input/Looks.js.map +1 -0
- package/dist/collection/components/input/Submittable.js +8 -0
- package/dist/collection/components/input/Submittable.js.map +1 -0
- package/dist/collection/components/input/checkbox/index.js +235 -0
- package/dist/collection/components/input/checkbox/index.js.map +1 -0
- package/dist/collection/components/input/checkbox/style.css +31 -0
- package/dist/collection/components/input/clear/index.js +242 -0
- package/dist/collection/components/input/clear/index.js.map +1 -0
- package/dist/collection/components/input/clear/style.css +256 -0
- 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-range → input/date}/index.js +153 -99
- package/dist/collection/components/input/date/index.js.map +1 -0
- package/dist/collection/components/input/date/range/index.js +443 -0
- package/dist/collection/components/input/date/range/index.js.map +1 -0
- package/dist/collection/components/input/date/range/style.css +94 -0
- package/dist/collection/components/input/date/style.css +83 -0
- package/dist/collection/components/input/demo/index.js +47 -0
- package/dist/collection/components/input/demo/index.js.map +1 -0
- package/dist/collection/components/input/demo/style.css +15 -0
- package/dist/collection/components/input/edit/index.js +231 -0
- package/dist/collection/components/input/edit/index.js.map +1 -0
- package/dist/collection/components/input/edit/style.css +239 -0
- package/dist/collection/components/input/file/index.js +305 -0
- package/dist/collection/components/input/file/index.js.map +1 -0
- package/dist/collection/components/input/file/style.css +107 -0
- package/dist/collection/components/input/index.js +329 -104
- package/dist/collection/components/input/index.js.map +1 -1
- package/dist/collection/components/{input-month → input/month}/index.js +8 -8
- package/dist/collection/components/input/month/index.js.map +1 -0
- 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 +404 -0
- package/dist/collection/components/input/radio/index.js.map +1 -0
- package/dist/collection/components/input/radio/item/index.js +150 -0
- 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 +305 -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 +241 -0
- package/dist/collection/components/input/reset/index.js.map +1 -0
- package/dist/collection/components/input/reset/style.css +259 -0
- package/dist/collection/components/input/select/index.js +452 -0
- package/dist/collection/components/input/select/index.js.map +1 -0
- package/dist/collection/components/input/select/style.css +104 -0
- package/dist/collection/components/input/style.css +47 -10
- package/dist/collection/components/input/submit/index.js +232 -0
- package/dist/collection/components/input/submit/index.js.map +1 -0
- package/dist/collection/components/input/submit/style.css +236 -0
- package/dist/collection/components/item/index.js +5 -5
- package/dist/collection/components/item/index.js.map +1 -1
- 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 +45 -8
- package/dist/collection/components/notification/index.js.map +1 -1
- package/dist/collection/components/notification/style.css +25 -1
- package/dist/collection/components/notifier/style.css +1 -3
- package/dist/collection/components/picker/demo/index.js +91 -0
- package/dist/collection/components/picker/demo/index.js.map +1 -0
- package/dist/collection/components/picker/demo/style.css +30 -0
- package/dist/collection/components/picker/index.js +197 -396
- package/dist/collection/components/picker/index.js.map +1 -1
- package/dist/collection/components/picker/menu/index.js +429 -0
- package/dist/collection/components/picker/menu/index.js.map +1 -0
- package/dist/collection/components/picker/menu/style.css +44 -0
- package/dist/collection/components/picker/option/index.js +298 -0
- package/dist/collection/components/picker/option/index.js.map +1 -0
- package/dist/collection/components/picker/option/style.css +30 -0
- package/dist/collection/components/picker/slot-elements/index.js +109 -0
- package/dist/collection/components/picker/slot-elements/index.js.map +1 -0
- package/dist/collection/components/picker/slot-elements/style.css +3 -0
- package/dist/collection/components/picker/slotted-elements/index.js +84 -0
- package/dist/collection/components/picker/slotted-elements/index.js.map +1 -0
- package/dist/collection/components/picker/slotted-elements/style.css +3 -0
- package/dist/collection/components/picker/style.css +76 -136
- 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/select-demo/index.js +0 -87
- package/dist/collection/components/select-demo/index.js.map +1 -1
- package/dist/collection/components/spinner/style.css +1 -0
- package/dist/collection/components/submit/index.js +64 -5
- package/dist/collection/components/submit/index.js.map +1 -1
- package/dist/collection/components/submit/style.css +226 -0
- package/dist/collection/components/summary/index.js +46 -4
- package/dist/collection/components/summary/index.js.map +1 -1
- package/dist/collection/components/summary/style.css +25 -16
- package/dist/collection/components/svg/style.css +2 -2
- package/dist/collection/components/table/cell/index.js +1 -1
- package/dist/collection/components/table/cell/index.js.map +1 -1
- package/dist/collection/components/table/cell/style.css +18 -11
- package/dist/collection/components/table/demo/filtered/Root.js.map +1 -1
- package/dist/collection/components/table/demo/filtered/index.js +25 -18
- 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 -9
- package/dist/collection/components/table/demo/index.js.map +1 -1
- package/dist/collection/components/table/demo/style.css +7 -0
- package/dist/collection/components/table/demo/testing/data.js +28 -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 +14 -33
- package/dist/collection/components/table/expandable/cell/index.js.map +1 -1
- package/dist/collection/components/table/expandable/cell/style.css +32 -25
- package/dist/collection/components/table/expandable/row/index.js +9 -51
- package/dist/collection/components/table/expandable/row/index.js.map +1 -1
- package/dist/collection/components/table/expandable/row/style.css +32 -29
- 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 +55 -12
- package/dist/collection/components/table/index.js.map +1 -1
- package/dist/collection/components/table/row/index.js +37 -5
- package/dist/collection/components/table/row/index.js.map +1 -1
- package/dist/collection/components/table/row/style.css +4 -1
- package/dist/collection/components/table/style.css +0 -2
- 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/components/trigger-source/index.js +3 -3
- package/dist/collection/components/trigger-source/index.js.map +1 -1
- 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/index.js +2 -2
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/model/Color.js +18 -1
- package/dist/collection/model/Color.js.map +1 -1
- package/dist/collection/{components/form → model}/Data.js +8 -1
- package/dist/collection/model/Data.js.map +1 -0
- package/dist/collection/model/Icon.js +23 -0
- package/dist/collection/model/Icon.js.map +1 -0
- package/dist/collection/model/Listenable.js +17 -4
- package/dist/collection/model/Listenable.js.map +1 -1
- package/dist/collection/model/Notice.js +1 -1
- package/dist/collection/model/Notice.js.map +1 -1
- package/dist/collection/model/Option.js.map +1 -1
- package/dist/collection/model/index.js +4 -0
- package/dist/collection/model/index.js.map +1 -1
- package/dist/collection/model/redirect.js +8 -0
- package/dist/collection/model/redirect.js.map +1 -0
- package/dist/collection/smoothly.js +3 -0
- package/dist/collection/smoothly.js.map +1 -0
- package/dist/custom-elements/index.d.ts +176 -50
- package/dist/custom-elements/index.js +13394 -29834
- package/dist/custom-elements/index.js.map +1 -1
- package/dist/esm/{Listenable-fb6f4723.js → Data-0390d600.js} +518 -7
- package/dist/esm/Data-0390d600.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-1e9ec036.js +6116 -0
- package/dist/esm/getLanguage-1e9ec036.js.map +1 -0
- package/dist/esm/{index-6ac4212d.js → index-258984d3.js} +55 -2
- package/dist/esm/index-258984d3.js.map +1 -0
- package/dist/esm/index.js +20 -5
- 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/{Notice-1fa17794.js → redirect-b0f87e88.js} +11 -3
- package/dist/esm/redirect-b0f87e88.js.map +1 -0
- 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 +10814 -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 +22 -0
- package/dist/esm/smoothly-display-date-time.entry.js.map +1 -0
- package/dist/esm/smoothly-google-font.entry.js +1 -1
- package/dist/esm/smoothly-reorder.entry.js +1 -1
- package/dist/esm/smoothly-trigger-sink.entry.js +2 -2
- package/dist/esm/smoothly-trigger-source.entry.js +4 -4
- package/dist/esm/smoothly-trigger-source.entry.js.map +1 -1
- 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-04fb45e1.entry.js → p-12182a73.entry.js} +2 -2
- package/dist/smoothly/{p-5629e452.entry.js → p-127dcc56.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-312ef066.js +2 -0
- package/dist/smoothly/p-312ef066.js.map +1 -0
- package/dist/smoothly/p-47151a53.entry.js +2 -0
- package/dist/smoothly/p-5e387578.js +3 -0
- package/dist/smoothly/p-5e387578.js.map +1 -0
- package/dist/smoothly/{p-0fec28cc.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-ae467192.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-9b828bde.js +2 -0
- package/dist/smoothly/p-9b828bde.js.map +1 -0
- package/dist/smoothly/p-a0ebd646.entry.js +2 -0
- package/dist/smoothly/p-a0ebd646.entry.js.map +1 -0
- package/dist/smoothly/{p-b3eef141.entry.js → p-b3eac6af.entry.js} +2 -2
- package/dist/smoothly/p-b9165e1d.entry.js +2 -0
- package/dist/smoothly/p-b9165e1d.entry.js.map +1 -0
- package/dist/smoothly/p-c833c402.js +2 -0
- package/dist/smoothly/p-c833c402.js.map +1 -0
- package/dist/smoothly/{p-3a6873ed.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-eef1c80b.entry.js +2 -0
- package/dist/smoothly/p-eef1c80b.entry.js.map +1 -0
- 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/accordion/index.d.ts +1 -1
- package/dist/types/components/accordion-item/index.d.ts +5 -4
- package/dist/types/components/app/index.d.ts +23 -10
- package/dist/types/components/app/room/index.d.ts +21 -7
- package/dist/types/components/app-demo/index.d.ts +1 -0
- package/dist/types/components/backtotop/index.d.ts +1 -1
- package/dist/types/components/burger/index.d.ts +7 -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 +7 -3
- 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 +15 -23
- package/dist/types/components/filter/picker/index.d.ts +24 -0
- package/dist/types/components/filter/toggle/index.d.ts +22 -0
- package/dist/types/components/form/index.d.ts +23 -7
- package/dist/types/components/icon/index.d.ts +3 -9
- package/dist/types/components/input/Editable.d.ts +20 -0
- package/dist/types/components/input/Input.d.ts +22 -0
- package/dist/types/components/input/Looks.d.ts +7 -0
- package/dist/types/components/input/Submittable.d.ts +6 -0
- package/dist/types/components/input/checkbox/index.d.ts +20 -0
- package/dist/types/components/input/clear/index.d.ts +17 -0
- package/dist/types/components/input/color/index.d.ts +24 -0
- package/dist/types/components/input/date/index.d.ts +28 -0
- package/dist/types/components/input/date/range/index.d.ts +33 -0
- package/dist/types/components/input/demo/index.d.ts +6 -0
- package/dist/types/components/input/edit/index.d.ts +17 -0
- package/dist/types/components/input/file/index.d.ts +24 -0
- package/dist/types/components/input/index.d.ts +30 -11
- package/dist/types/components/{input-month → input/month}/index.d.ts +2 -2
- package/dist/types/components/input/radio/Selected.d.ts +10 -0
- package/dist/types/components/input/radio/index.d.ts +35 -0
- package/dist/types/components/input/radio/item/index.d.ts +15 -0
- package/dist/types/components/input/range/index.d.ts +24 -0
- package/dist/types/components/input/reset/index.d.ts +18 -0
- package/dist/types/components/input/select/index.d.ts +36 -0
- package/dist/types/components/input/submit/index.d.ts +17 -0
- package/dist/types/components/item/index.d.ts +1 -1
- 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/notification/index.d.ts +3 -1
- package/dist/types/components/picker/demo/index.d.ts +22 -0
- package/dist/types/components/picker/index.d.ts +33 -45
- package/dist/types/components/picker/menu/index.d.ts +54 -0
- package/dist/types/components/picker/option/index.d.ts +23 -0
- package/dist/types/components/picker/slot-elements/index.d.ts +15 -0
- package/dist/types/components/picker/slotted-elements/index.d.ts +8 -0
- package/dist/types/components/popup/index.d.ts +1 -1
- package/dist/types/components/select-demo/index.d.ts +0 -9
- package/dist/types/components/submit/index.d.ts +6 -1
- package/dist/types/components/summary/index.d.ts +4 -0
- package/dist/types/components/table/demo/filtered/Root.d.ts +2 -0
- package/dist/types/components/table/demo/filtered/index.d.ts +7 -7
- package/dist/types/components/table/demo/index.d.ts +1 -1
- package/dist/types/components/table/demo/testing/data.d.ts +5 -0
- package/dist/types/components/table/demo/testing/index.d.ts +4 -0
- package/dist/types/components/table/expandable/cell/index.d.ts +4 -5
- package/dist/types/components/table/expandable/row/index.d.ts +3 -8
- package/dist/types/components/table/footer/index.d.ts +3 -0
- package/dist/types/components/table/index.d.ts +6 -3
- package/dist/types/components/table/row/index.d.ts +3 -1
- 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/trigger-source/index.d.ts +1 -1
- package/dist/types/components.d.ts +914 -347
- package/dist/types/global/Observers.d.ts +8 -0
- package/dist/types/global/index.d.ts +4 -0
- package/dist/types/index.d.ts +1 -3
- package/dist/types/model/Color.d.ts +7 -1
- package/dist/types/{components/form → 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/Notice.d.ts +1 -1
- package/dist/types/model/Option.d.ts +24 -6
- package/dist/types/model/index.d.ts +3 -0
- package/dist/types/model/redirect.d.ts +1 -0
- package/dist/types/smoothly.d.ts +3 -0
- package/package.json +7 -6
- package/dist/cjs/Listenable-63ea2d90.js.map +0 -1
- package/dist/cjs/Notice-88ba4c70.js.map +0 -1
- package/dist/cjs/getLanguage-4f0a45d5.js +0 -12227
- package/dist/cjs/getLanguage-4f0a45d5.js.map +0 -1
- package/dist/cjs/index-8adc5c1b.js.map +0 -1
- package/dist/cjs/index-d16d46f4.js +0 -1224
- package/dist/cjs/index-d16d46f4.js.map +0 -1
- package/dist/cjs/smoothly-accordion_62.cjs.entry.js +0 -28199
- package/dist/cjs/smoothly-accordion_62.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.map +0 -1
- package/dist/collection/components/form/Clearable.js +0 -8
- package/dist/collection/components/form/Clearable.js.map +0 -1
- package/dist/collection/components/form/Data.js.map +0 -1
- package/dist/collection/components/input-date/index.js +0 -206
- package/dist/collection/components/input-date/index.js.map +0 -1
- package/dist/collection/components/input-date/style.css +0 -40
- package/dist/collection/components/input-date-range/index.js.map +0 -1
- package/dist/collection/components/input-date-range/style.css +0 -51
- package/dist/collection/components/input-demo/index.js +0 -45
- package/dist/collection/components/input-demo/index.js.map +0 -1
- package/dist/collection/components/input-demo/style.css +0 -4
- package/dist/collection/components/input-month/index.js.map +0 -1
- package/dist/collection/components/menu-options/index.js +0 -413
- package/dist/collection/components/menu-options/index.js.map +0 -1
- package/dist/collection/components/menu-options/style.css +0 -18
- package/dist/collection/components/option/index.js +0 -270
- package/dist/collection/components/option/index.js.map +0 -1
- package/dist/collection/components/option/style.css +0 -42
- 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 +0 -137
- 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/select/index.js +0 -108
- package/dist/collection/components/select/index.js.map +0 -1
- package/dist/collection/components/select/style.css +0 -20
- package/dist/collection/components/selector/index.js +0 -234
- package/dist/collection/components/selector/index.js.map +0 -1
- package/dist/collection/components/selector/style.css +0 -46
- package/dist/custom-elements/index2.js +0 -1222
- package/dist/custom-elements/index2.js.map +0 -1
- package/dist/esm/Listenable-fb6f4723.js.map +0 -1
- package/dist/esm/Notice-1fa17794.js.map +0 -1
- package/dist/esm/getLanguage-ffacd7b7.js +0 -12225
- package/dist/esm/getLanguage-ffacd7b7.js.map +0 -1
- package/dist/esm/index-6ac4212d.js.map +0 -1
- package/dist/esm/index-d5330059.js +0 -1222
- package/dist/esm/index-d5330059.js.map +0 -1
- package/dist/esm/smoothly-accordion_62.entry.js +0 -28134
- package/dist/esm/smoothly-accordion_62.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-06337b89.js +0 -2
- package/dist/smoothly/p-06337b89.js.map +0 -1
- package/dist/smoothly/p-16cba662.entry.js +0 -2
- package/dist/smoothly/p-16cba662.entry.js.map +0 -1
- package/dist/smoothly/p-3ad51805.entry.js +0 -2
- package/dist/smoothly/p-3ad51805.entry.js.map +0 -1
- package/dist/smoothly/p-5e34795b.js +0 -2
- package/dist/smoothly/p-5e34795b.js.map +0 -1
- package/dist/smoothly/p-75373584.js +0 -2
- package/dist/smoothly/p-75373584.js.map +0 -1
- package/dist/smoothly/p-75452eb8.js +0 -2
- package/dist/smoothly/p-75452eb8.js.map +0 -1
- package/dist/smoothly/p-ae33d7e1.entry.js +0 -2
- package/dist/smoothly/p-ae33d7e1.entry.js.map +0 -1
- package/dist/smoothly/p-b98cd447.js +0 -3
- package/dist/smoothly/p-b98cd447.js.map +0 -1
- package/dist/smoothly/p-c109fc66.entry.js +0 -2
- package/dist/smoothly/p-c109fc66.entry.js.map +0 -1
- package/dist/smoothly/p-f29cc9ff.entry.js +0 -2
- package/dist/types/components/form/Clearable.d.ts +0 -6
- package/dist/types/components/input-date/index.d.ts +0 -14
- package/dist/types/components/input-date-range/index.d.ts +0 -23
- package/dist/types/components/input-demo/index.d.ts +0 -3
- package/dist/types/components/menu-options/index.d.ts +0 -35
- package/dist/types/components/option/index.d.ts +0 -32
- 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 -15
- 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/components/select/index.d.ts +0 -14
- package/dist/types/components/selector/index.d.ts +0 -23
- /package/dist/collection/components/{filter → input}/Clearable.js +0 -0
- /package/dist/collection/components/{input-month → input/month}/style.css +0 -0
- /package/dist/collection/components/{radio-button → lazy}/style.css +0 -0
- /package/dist/smoothly/{p-04fb45e1.entry.js.map → p-12182a73.entry.js.map} +0 -0
- /package/dist/smoothly/{p-5629e452.entry.js.map → p-127dcc56.entry.js.map} +0 -0
- /package/dist/smoothly/{p-f29cc9ff.entry.js.map → p-47151a53.entry.js.map} +0 -0
- /package/dist/smoothly/{p-0fec28cc.entry.js.map → p-6aebb818.entry.js.map} +0 -0
- /package/dist/smoothly/{p-ae467192.entry.js.map → p-7bf147bf.entry.js.map} +0 -0
- /package/dist/smoothly/{p-b3eef141.entry.js.map → p-b3eac6af.entry.js.map} +0 -0
- /package/dist/smoothly/{p-3a6873ed.entry.js.map → p-cb493516.entry.js.map} +0 -0
- /package/dist/types/components/{filter → input}/Clearable.d.ts +0 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
[color=default] {
|
|
2
|
+
--smoothly-color: var(--smoothly-default-color);
|
|
3
|
+
--smoothly-color-contrast: var(--smoothly-default-contrast);
|
|
4
|
+
--smoothly-color-shade: var(--smoothly-default-shade);
|
|
5
|
+
--smoothly-color-tint: var(--smoothly-default-tint);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
[color=primary] {
|
|
9
|
+
--smoothly-color: var(--smoothly-primary-color);
|
|
10
|
+
--smoothly-color-contrast: var(--smoothly-primary-contrast);
|
|
11
|
+
--smoothly-color-shade: var(--smoothly-primary-shade);
|
|
12
|
+
--smoothly-color-tint: var(--smoothly-primary-tint);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
[color=secondary] {
|
|
16
|
+
--smoothly-color: var(--smoothly-secondary-color);
|
|
17
|
+
--smoothly-color-contrast: var(--smoothly-secondary-contrast);
|
|
18
|
+
--smoothly-color-shade: var(--smoothly-secondary-shade);
|
|
19
|
+
--smoothly-color-tint: var(--smoothly-secondary-tint);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
[color=tertiary] {
|
|
23
|
+
--smoothly-color: var(--smoothly-tertiary-color);
|
|
24
|
+
--smoothly-color-contrast: var(--smoothly-tertiary-contrast);
|
|
25
|
+
--smoothly-color-shade: var(--smoothly-tertiary-shade);
|
|
26
|
+
--smoothly-color-tint: var(--smoothly-tertiary-tint);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
[color=success] {
|
|
30
|
+
--smoothly-color: var(--smoothly-success-color);
|
|
31
|
+
--smoothly-color-contrast: var(--smoothly-success-color);
|
|
32
|
+
--smoothly-color-shade: var(--smoothly-success-shade);
|
|
33
|
+
--smoothly-color-tint: var(--smoothly-success-tint);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[color=warning] {
|
|
37
|
+
--smoothly-color: var(--smoothly-warning-color);
|
|
38
|
+
--smoothly-color-contrast: var(--smoothly-warning-contrast);
|
|
39
|
+
--smoothly-color-shade: var(--smoothly-warning-shade);
|
|
40
|
+
--smoothly-color-tint: var(--smoothly-warning-tint);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[color=danger] {
|
|
44
|
+
--smoothly-color: var(--smoothly-danger-color);
|
|
45
|
+
--smoothly-color-contrast: var(--smoothly-danger-contrast);
|
|
46
|
+
--smoothly-color-shade: var(--smoothly-danger-shade);
|
|
47
|
+
--smoothly-color-tint: var(--smoothly-danger-tint);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
[color=light] {
|
|
51
|
+
--smoothly-color: var(--smoothly-light-color);
|
|
52
|
+
--smoothly-color-contrast: var(--smoothly-light-contrast);
|
|
53
|
+
--smoothly-color-shade: var(--smoothly-light-shade);
|
|
54
|
+
--smoothly-color-tint: var(--smoothly-light-tint);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
[color=medium] {
|
|
58
|
+
--smoothly-color: var(--smoothly-medium-color);
|
|
59
|
+
--smoothly-color-contrast: var(--smoothly-medium-contrast);
|
|
60
|
+
--smoothly-color-shade: var(--smoothly-medium-shade);
|
|
61
|
+
--smoothly-color-tint: var(--smoothly-medium-tint);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
[color=dark] {
|
|
65
|
+
--smoothly-color: var(--smoothly-dark-color);
|
|
66
|
+
--smoothly-color-contrast: var(--smoothly-dark-contrast);
|
|
67
|
+
--smoothly-color-shade: var(--smoothly-dark-shade);
|
|
68
|
+
--smoothly-color-tint: var(--smoothly-dark-tint);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
:host{
|
|
73
|
+
display: inline-block;
|
|
74
|
+
box-sizing: border-box;
|
|
75
|
+
border-radius: 0.5rem;
|
|
76
|
+
border: solid 1px;
|
|
77
|
+
transition: background 150ms ease-in-out;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
}
|
|
80
|
+
:host([type=link]) {
|
|
81
|
+
display: inline;
|
|
82
|
+
border: none;
|
|
83
|
+
}
|
|
84
|
+
:host([disabled]) {
|
|
85
|
+
opacity: 0.5;
|
|
86
|
+
pointer-events: none;
|
|
87
|
+
}
|
|
88
|
+
a,
|
|
89
|
+
button {
|
|
90
|
+
font-size: 110%;
|
|
91
|
+
font-weight: 400;
|
|
92
|
+
border: none;
|
|
93
|
+
background-color: transparent;
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
display: inline-flex;
|
|
96
|
+
gap: 0.5rem;
|
|
97
|
+
}
|
|
98
|
+
button {
|
|
99
|
+
justify-content: center;
|
|
100
|
+
height: 100%;
|
|
101
|
+
width: 100%;
|
|
102
|
+
border-radius: 0.5rem;
|
|
103
|
+
align-items: center;
|
|
104
|
+
}
|
|
105
|
+
:host(:not([size=icon]):not([size=flexible])) > button {
|
|
106
|
+
padding: 0.8em;
|
|
107
|
+
min-width: 8em;
|
|
108
|
+
}
|
|
109
|
+
:host(:not([size=icon]):not([size=flexible])):has(smoothly-icon) > button {
|
|
110
|
+
padding: 0.6em;
|
|
111
|
+
}
|
|
112
|
+
:host([size=icon]) > button {
|
|
113
|
+
padding: 0.5em;
|
|
114
|
+
}
|
|
115
|
+
:host([shape=rounded]) > button,
|
|
116
|
+
:host([shape=rounded]) {
|
|
117
|
+
border-radius: 2rem;
|
|
118
|
+
}
|
|
119
|
+
:host([type=button]) > a {
|
|
120
|
+
text-align: center;
|
|
121
|
+
text-decoration: inherit;
|
|
122
|
+
width: calc(100% - 0.6em);
|
|
123
|
+
}
|
|
124
|
+
:host([size=small]) > button {
|
|
125
|
+
font-size: 100%;
|
|
126
|
+
}
|
|
127
|
+
:host([size=large]) > button {
|
|
128
|
+
font-size: 130%;
|
|
129
|
+
}
|
|
130
|
+
:host(:not([size=icon])) {
|
|
131
|
+
min-width: 8em;
|
|
132
|
+
}
|
|
133
|
+
:host([size=flexible]) {
|
|
134
|
+
min-width: unset;
|
|
135
|
+
padding: 0;
|
|
136
|
+
margin: 0;
|
|
137
|
+
display: flex;
|
|
138
|
+
justify-content: center;
|
|
139
|
+
align-items: center;
|
|
140
|
+
border: none;
|
|
141
|
+
}
|
|
142
|
+
:host([size=flexible]) > button {
|
|
143
|
+
min-width: unset;
|
|
144
|
+
padding: 0;
|
|
145
|
+
margin: 0 !important;
|
|
146
|
+
}
|
|
147
|
+
:host([expand]) {
|
|
148
|
+
width: 100%;
|
|
149
|
+
}
|
|
150
|
+
:host([expand=full]) {
|
|
151
|
+
border-left: none;
|
|
152
|
+
border-right: none;
|
|
153
|
+
border-radius: 0;
|
|
154
|
+
}
|
|
155
|
+
:host([shape=rounded]) > button,
|
|
156
|
+
:host([shape=rounded]) {
|
|
157
|
+
border-radius: 2rem;
|
|
158
|
+
}
|
|
159
|
+
:host(:not([fill=clear]):hover),
|
|
160
|
+
:host(:not([fill=clear]):focus),
|
|
161
|
+
:host(:not([fill=clear]):active) {
|
|
162
|
+
border-color: rgb(var(--smoothly-color-tint)) !important;
|
|
163
|
+
background: rgb(var(--smoothly-color-tint)) !important;
|
|
164
|
+
}
|
|
165
|
+
:host(:not([fill=clear]):hover) > button,
|
|
166
|
+
:host(:not([fill=clear]):focus) > button,
|
|
167
|
+
:host(:not([fill=clear]):active) > button,
|
|
168
|
+
:host(:not([fill=clear]):hover) ::slotted(smoothly-icon),
|
|
169
|
+
:host(:not([fill=clear]):focus) ::slotted(smoothly-icon),
|
|
170
|
+
:host(:not([fill=clear]):active) ::slotted(smoothly-icon) {
|
|
171
|
+
color: rgb(var(--smoothly-color-contrast)) !important;
|
|
172
|
+
stroke: rgb(var(--smoothly-color-contrast)) !important;
|
|
173
|
+
fill: rgb(var(--smoothly-color-contrast)) !important;
|
|
174
|
+
}
|
|
175
|
+
:host([fill=clear]:hover) > button,
|
|
176
|
+
:host([fill=clear]:focus) > button,
|
|
177
|
+
:host([fill=clear]:active) > button {
|
|
178
|
+
color: rgb(var(--smoothly-color-tint)) !important;
|
|
179
|
+
stroke: rgb(var(--smoothly-color-tint)) !important;
|
|
180
|
+
fill: rgb(var(--smoothly-color-tint)) !important;
|
|
181
|
+
}
|
|
182
|
+
:host([disabled]) {
|
|
183
|
+
opacity: 0.5;
|
|
184
|
+
pointer-events: none;
|
|
185
|
+
}
|
|
186
|
+
:host(:not([fill])),
|
|
187
|
+
:host([fill=default]) {
|
|
188
|
+
background: rgb(var(--smoothly-color));
|
|
189
|
+
border-color: transparent;
|
|
190
|
+
}
|
|
191
|
+
:host([fill=solid]) {
|
|
192
|
+
background: rgb(var(--smoothly-color));
|
|
193
|
+
border-color: rgb(var(--smoothly-color));
|
|
194
|
+
}
|
|
195
|
+
:host([fill=solid]) > button,
|
|
196
|
+
:host([fill=default]) > button {
|
|
197
|
+
stroke: rgb(var(--smoothly-color-contrast));
|
|
198
|
+
fill: rgb(var(--smoothly-color-contrast));
|
|
199
|
+
color: rgb(var(--smoothly-color-contrast));
|
|
200
|
+
}
|
|
201
|
+
:host([fill=outline]) > button,
|
|
202
|
+
:host([fill=clear]) > button {
|
|
203
|
+
stroke: rgb(var(--smoothly-color));
|
|
204
|
+
fill: rgb(var(--smoothly-color));
|
|
205
|
+
color: rgb(var(--smoothly-color));
|
|
206
|
+
}
|
|
207
|
+
:host([fill=outline]) {
|
|
208
|
+
background: transparent;
|
|
209
|
+
border-color: rgb(var(--smoothly-color));
|
|
210
|
+
}
|
|
211
|
+
:host([fill=clear]) {
|
|
212
|
+
background: transparent;
|
|
213
|
+
border-color: transparent;
|
|
214
|
+
}
|
|
215
|
+
::slotted(smoothly-icon[slot=start]),
|
|
216
|
+
::slotted(smoothly-icon[slot=end]) {
|
|
217
|
+
font-size: 0.65em;
|
|
218
|
+
}
|
|
219
|
+
:host([hidden]) {
|
|
220
|
+
display: none;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
:host(:not([display])) {
|
|
225
|
+
display: none;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
:host([type="button"]) {
|
|
229
|
+
margin: 1em 0em;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
:host([editable]){
|
|
233
|
+
opacity: 0.5;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
:host button::slotted(smoothly-icon){
|
|
237
|
+
transform: translate(.1em, -.1em);
|
|
238
|
+
}
|
|
239
|
+
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class SmoothlyInputFile {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.transfer = new DataTransfer();
|
|
5
|
+
this.dragging = false;
|
|
6
|
+
this.accept = undefined;
|
|
7
|
+
this.color = undefined;
|
|
8
|
+
this.looks = "plain";
|
|
9
|
+
this.camera = undefined;
|
|
10
|
+
this.name = undefined;
|
|
11
|
+
this.showLabel = true;
|
|
12
|
+
this.value = undefined;
|
|
13
|
+
this.placeholder = undefined;
|
|
14
|
+
}
|
|
15
|
+
componentWillLoad() {
|
|
16
|
+
this.smoothlyInputLooks.emit((looks, color) => ((this.looks = looks), !this.color && (this.color = color)));
|
|
17
|
+
}
|
|
18
|
+
async clear() {
|
|
19
|
+
this.value = undefined;
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
var _a, _b, _c;
|
|
23
|
+
return (h(Host, { class: { dragging: this.dragging }, tabindex: 0, onClick: () => { var _a; return (_a = this.input) === null || _a === void 0 ? void 0 : _a.click(); }, onDragOver: (event) => (event.preventDefault(), event.stopPropagation()), onDragEnter: () => (this.dragging = true) }, h("label", null, h("slot", { name: "label" })), h("div", { class: "input" }, h("smoothly-button", { color: this.color, fill: "clear", size: "flexible", onClick: event => { var _a; return (event.stopPropagation(), (_a = this.input) === null || _a === void 0 ? void 0 : _a.click()); } }, h("slot", { name: "button" })), h("span", { onClick: event => { var _a; return (event.stopPropagation(), (_a = this.input) === null || _a === void 0 ? void 0 : _a.click()); } }, (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : this.placeholder), h("div", { class: "mask", onDrop: event => {
|
|
24
|
+
var _a;
|
|
25
|
+
return (event.preventDefault(),
|
|
26
|
+
event.stopPropagation(),
|
|
27
|
+
(this.dragging = false),
|
|
28
|
+
((_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.files.length) &&
|
|
29
|
+
(this.smoothlyInput.emit({ [this.name]: (this.value = event.dataTransfer.files[0]) }),
|
|
30
|
+
this.smoothlyChange.emit({ [this.name]: (this.value = event.dataTransfer.files[0]) })));
|
|
31
|
+
}, onDragLeave: event => (event.stopPropagation(), (this.dragging = false)) }), h("input", { ref: element => (this.input = element), type: "file", capture: this.camera == "back" ? "environment" : "user", accept: (_c = this.accept) !== null && _c !== void 0 ? _c : (!this.camera ? undefined : "image/jpeg"), files: (this.transfer.items.clear(), this.value && this.transfer.items.add(this.value), this.transfer.files), onInput: event => {
|
|
32
|
+
var _a, _b, _c;
|
|
33
|
+
return (event.stopPropagation(),
|
|
34
|
+
((_b = (_a = this.input) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b.length) && this.smoothlyInput.emit({ [this.name]: (this.value = (_c = this.input) === null || _c === void 0 ? void 0 : _c.files[0]) }));
|
|
35
|
+
}, onChange: event => {
|
|
36
|
+
var _a, _b, _c;
|
|
37
|
+
return (event.stopPropagation(),
|
|
38
|
+
((_b = (_a = this.input) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b.length) &&
|
|
39
|
+
this.smoothlyChange.emit({ [this.name]: (this.value = (_c = this.input) === null || _c === void 0 ? void 0 : _c.files[0]) }));
|
|
40
|
+
} })), h("slot", null)));
|
|
41
|
+
}
|
|
42
|
+
static get is() { return "smoothly-input-file"; }
|
|
43
|
+
static get encapsulation() { return "scoped"; }
|
|
44
|
+
static get originalStyleUrls() {
|
|
45
|
+
return {
|
|
46
|
+
"$": ["style.css"]
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
static get styleUrls() {
|
|
50
|
+
return {
|
|
51
|
+
"$": ["style.css"]
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
static get properties() {
|
|
55
|
+
return {
|
|
56
|
+
"accept": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"mutable": false,
|
|
59
|
+
"complexType": {
|
|
60
|
+
"original": "string",
|
|
61
|
+
"resolved": "string | undefined",
|
|
62
|
+
"references": {}
|
|
63
|
+
},
|
|
64
|
+
"required": false,
|
|
65
|
+
"optional": true,
|
|
66
|
+
"docs": {
|
|
67
|
+
"tags": [],
|
|
68
|
+
"text": ""
|
|
69
|
+
},
|
|
70
|
+
"attribute": "accept",
|
|
71
|
+
"reflect": false
|
|
72
|
+
},
|
|
73
|
+
"color": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"mutable": true,
|
|
76
|
+
"complexType": {
|
|
77
|
+
"original": "Color",
|
|
78
|
+
"resolved": "\"danger\" | \"dark\" | \"default\" | \"light\" | \"medium\" | \"primary\" | \"secondary\" | \"success\" | \"tertiary\" | \"warning\" | undefined",
|
|
79
|
+
"references": {
|
|
80
|
+
"Color": {
|
|
81
|
+
"location": "import",
|
|
82
|
+
"path": "../../../model"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"required": false,
|
|
87
|
+
"optional": true,
|
|
88
|
+
"docs": {
|
|
89
|
+
"tags": [],
|
|
90
|
+
"text": ""
|
|
91
|
+
},
|
|
92
|
+
"attribute": "color",
|
|
93
|
+
"reflect": true
|
|
94
|
+
},
|
|
95
|
+
"looks": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"mutable": true,
|
|
98
|
+
"complexType": {
|
|
99
|
+
"original": "Looks",
|
|
100
|
+
"resolved": "\"border\" | \"grid\" | \"line\" | \"plain\" | \"transparent\"",
|
|
101
|
+
"references": {
|
|
102
|
+
"Looks": {
|
|
103
|
+
"location": "import",
|
|
104
|
+
"path": "../Looks"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"required": false,
|
|
109
|
+
"optional": false,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [],
|
|
112
|
+
"text": ""
|
|
113
|
+
},
|
|
114
|
+
"attribute": "looks",
|
|
115
|
+
"reflect": true,
|
|
116
|
+
"defaultValue": "\"plain\""
|
|
117
|
+
},
|
|
118
|
+
"camera": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"mutable": false,
|
|
121
|
+
"complexType": {
|
|
122
|
+
"original": "\"front\" | \"back\"",
|
|
123
|
+
"resolved": "\"back\" | \"front\"",
|
|
124
|
+
"references": {}
|
|
125
|
+
},
|
|
126
|
+
"required": false,
|
|
127
|
+
"optional": false,
|
|
128
|
+
"docs": {
|
|
129
|
+
"tags": [],
|
|
130
|
+
"text": ""
|
|
131
|
+
},
|
|
132
|
+
"attribute": "camera",
|
|
133
|
+
"reflect": true
|
|
134
|
+
},
|
|
135
|
+
"name": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"mutable": false,
|
|
138
|
+
"complexType": {
|
|
139
|
+
"original": "string",
|
|
140
|
+
"resolved": "string",
|
|
141
|
+
"references": {}
|
|
142
|
+
},
|
|
143
|
+
"required": false,
|
|
144
|
+
"optional": false,
|
|
145
|
+
"docs": {
|
|
146
|
+
"tags": [],
|
|
147
|
+
"text": ""
|
|
148
|
+
},
|
|
149
|
+
"attribute": "name",
|
|
150
|
+
"reflect": true
|
|
151
|
+
},
|
|
152
|
+
"showLabel": {
|
|
153
|
+
"type": "boolean",
|
|
154
|
+
"mutable": false,
|
|
155
|
+
"complexType": {
|
|
156
|
+
"original": "boolean",
|
|
157
|
+
"resolved": "boolean",
|
|
158
|
+
"references": {}
|
|
159
|
+
},
|
|
160
|
+
"required": false,
|
|
161
|
+
"optional": false,
|
|
162
|
+
"docs": {
|
|
163
|
+
"tags": [],
|
|
164
|
+
"text": ""
|
|
165
|
+
},
|
|
166
|
+
"attribute": "show-label",
|
|
167
|
+
"reflect": true,
|
|
168
|
+
"defaultValue": "true"
|
|
169
|
+
},
|
|
170
|
+
"value": {
|
|
171
|
+
"type": "unknown",
|
|
172
|
+
"mutable": true,
|
|
173
|
+
"complexType": {
|
|
174
|
+
"original": "File",
|
|
175
|
+
"resolved": "File | undefined",
|
|
176
|
+
"references": {
|
|
177
|
+
"File": {
|
|
178
|
+
"location": "global"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"required": false,
|
|
183
|
+
"optional": true,
|
|
184
|
+
"docs": {
|
|
185
|
+
"tags": [],
|
|
186
|
+
"text": ""
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"placeholder": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"mutable": true,
|
|
192
|
+
"complexType": {
|
|
193
|
+
"original": "string | undefined",
|
|
194
|
+
"resolved": "string | undefined",
|
|
195
|
+
"references": {}
|
|
196
|
+
},
|
|
197
|
+
"required": false,
|
|
198
|
+
"optional": false,
|
|
199
|
+
"docs": {
|
|
200
|
+
"tags": [],
|
|
201
|
+
"text": ""
|
|
202
|
+
},
|
|
203
|
+
"attribute": "placeholder",
|
|
204
|
+
"reflect": true
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
static get states() {
|
|
209
|
+
return {
|
|
210
|
+
"dragging": {}
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
static get events() {
|
|
214
|
+
return [{
|
|
215
|
+
"method": "smoothlyInputLooks",
|
|
216
|
+
"name": "smoothlyInputLooks",
|
|
217
|
+
"bubbles": true,
|
|
218
|
+
"cancelable": true,
|
|
219
|
+
"composed": true,
|
|
220
|
+
"docs": {
|
|
221
|
+
"tags": [],
|
|
222
|
+
"text": ""
|
|
223
|
+
},
|
|
224
|
+
"complexType": {
|
|
225
|
+
"original": "(looks: Looks, color: Color) => void",
|
|
226
|
+
"resolved": "(looks: \"line\" | \"grid\" | \"plain\" | \"border\" | \"transparent\", color: \"success\" | \"default\" | \"primary\" | \"secondary\" | \"tertiary\" | \"warning\" | \"danger\" | \"light\" | \"medium\" | \"dark\") => void",
|
|
227
|
+
"references": {
|
|
228
|
+
"Looks": {
|
|
229
|
+
"location": "import",
|
|
230
|
+
"path": "../Looks"
|
|
231
|
+
},
|
|
232
|
+
"Color": {
|
|
233
|
+
"location": "import",
|
|
234
|
+
"path": "../../../model"
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}, {
|
|
239
|
+
"method": "smoothlyInput",
|
|
240
|
+
"name": "smoothlyInput",
|
|
241
|
+
"bubbles": true,
|
|
242
|
+
"cancelable": true,
|
|
243
|
+
"composed": true,
|
|
244
|
+
"docs": {
|
|
245
|
+
"tags": [],
|
|
246
|
+
"text": ""
|
|
247
|
+
},
|
|
248
|
+
"complexType": {
|
|
249
|
+
"original": "Record<string, File>",
|
|
250
|
+
"resolved": "{ [x: string]: File; }",
|
|
251
|
+
"references": {
|
|
252
|
+
"Record": {
|
|
253
|
+
"location": "global"
|
|
254
|
+
},
|
|
255
|
+
"File": {
|
|
256
|
+
"location": "global"
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}, {
|
|
261
|
+
"method": "smoothlyChange",
|
|
262
|
+
"name": "smoothlyChange",
|
|
263
|
+
"bubbles": true,
|
|
264
|
+
"cancelable": true,
|
|
265
|
+
"composed": true,
|
|
266
|
+
"docs": {
|
|
267
|
+
"tags": [],
|
|
268
|
+
"text": ""
|
|
269
|
+
},
|
|
270
|
+
"complexType": {
|
|
271
|
+
"original": "Record<string, File>",
|
|
272
|
+
"resolved": "{ [x: string]: File; }",
|
|
273
|
+
"references": {
|
|
274
|
+
"Record": {
|
|
275
|
+
"location": "global"
|
|
276
|
+
},
|
|
277
|
+
"File": {
|
|
278
|
+
"location": "global"
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}];
|
|
283
|
+
}
|
|
284
|
+
static get methods() {
|
|
285
|
+
return {
|
|
286
|
+
"clear": {
|
|
287
|
+
"complexType": {
|
|
288
|
+
"signature": "() => Promise<void>",
|
|
289
|
+
"parameters": [],
|
|
290
|
+
"references": {
|
|
291
|
+
"Promise": {
|
|
292
|
+
"location": "global"
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
"return": "Promise<void>"
|
|
296
|
+
},
|
|
297
|
+
"docs": {
|
|
298
|
+
"text": "",
|
|
299
|
+
"tags": []
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/input/file/index.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, Event, EventEmitter, h, Host, Method, Prop, State } from \"@stencil/core\"\nimport { Color } from \"../../../model\"\nimport { Clearable } from \"../Clearable\"\nimport { Input } from \"../Input\"\nimport { Looks } from \"../Looks\"\n\n@Component({\n\ttag: \"smoothly-input-file\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyInputFile implements Clearable, Input {\n\tprivate transfer: DataTransfer = new DataTransfer()\n\tprivate input?: HTMLInputElement\n\t@State() dragging = false\n\t@Prop() accept?: string\n\t@Prop({ reflect: true, mutable: true }) color?: Color\n\t@Prop({ reflect: true, mutable: true }) looks: Looks = \"plain\"\n\t@Prop({ reflect: true }) camera: \"front\" | \"back\"\n\t@Prop({ reflect: true }) name: string\n\t@Prop({ reflect: true }) showLabel = true\n\t@Prop({ mutable: true }) value?: File\n\t@Prop({ mutable: true, reflect: true }) placeholder: string | undefined\n\t@Event() smoothlyInputLooks: EventEmitter<(looks: Looks, color: Color) => void>\n\t@Event() smoothlyInput: EventEmitter<Record<string, File>>\n\t@Event() smoothlyChange: EventEmitter<Record<string, File>>\n\n\tcomponentWillLoad() {\n\t\tthis.smoothlyInputLooks.emit((looks, color) => ((this.looks = looks), !this.color && (this.color = color)))\n\t}\n\n\t@Method()\n\tasync clear(): Promise<void> {\n\t\tthis.value = undefined\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={{ dragging: this.dragging }}\n\t\t\t\ttabindex={0}\n\t\t\t\tonClick={() => this.input?.click()}\n\t\t\t\tonDragOver={(event: Event) => (event.preventDefault(), event.stopPropagation())}\n\t\t\t\tonDragEnter={() => (this.dragging = true)}>\n\t\t\t\t<label>\n\t\t\t\t\t<slot name={\"label\"} />\n\t\t\t\t</label>\n\t\t\t\t<div class=\"input\">\n\t\t\t\t\t<smoothly-button\n\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\tfill={\"clear\"}\n\t\t\t\t\t\tsize=\"flexible\"\n\t\t\t\t\t\tonClick={event => (event.stopPropagation(), this.input?.click())}>\n\t\t\t\t\t\t<slot name={\"button\"} />\n\t\t\t\t\t</smoothly-button>\n\t\t\t\t\t<span onClick={event => (event.stopPropagation(), this.input?.click())}>\n\t\t\t\t\t\t{this.value?.name ?? this.placeholder}\n\t\t\t\t\t</span>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={\"mask\"}\n\t\t\t\t\t\tonDrop={event => (\n\t\t\t\t\t\t\tevent.preventDefault(),\n\t\t\t\t\t\t\tevent.stopPropagation(),\n\t\t\t\t\t\t\t(this.dragging = false),\n\t\t\t\t\t\t\tevent.dataTransfer?.files.length &&\n\t\t\t\t\t\t\t\t(this.smoothlyInput.emit({ [this.name]: (this.value = event.dataTransfer.files[0]) }),\n\t\t\t\t\t\t\t\tthis.smoothlyChange.emit({ [this.name]: (this.value = event.dataTransfer.files[0]) }))\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tonDragLeave={event => (event.stopPropagation(), (this.dragging = false))}\n\t\t\t\t\t/>\n\t\t\t\t\t<input\n\t\t\t\t\t\tref={element => (this.input = element)}\n\t\t\t\t\t\ttype={\"file\"}\n\t\t\t\t\t\tcapture={this.camera == \"back\" ? \"environment\" : \"user\"}\n\t\t\t\t\t\taccept={this.accept ?? (!this.camera ? undefined : \"image/jpeg\")}\n\t\t\t\t\t\tfiles={\n\t\t\t\t\t\t\t(this.transfer.items.clear(), this.value && this.transfer.items.add(this.value), this.transfer.files)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonInput={event => (\n\t\t\t\t\t\t\tevent.stopPropagation(),\n\t\t\t\t\t\t\tthis.input?.files?.length && this.smoothlyInput.emit({ [this.name]: (this.value = this.input?.files[0]) })\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tonChange={event => (\n\t\t\t\t\t\t\tevent.stopPropagation(),\n\t\t\t\t\t\t\tthis.input?.files?.length &&\n\t\t\t\t\t\t\t\tthis.smoothlyChange.emit({ [this.name]: (this.value = this.input?.files[0]) })\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
}
|
|
4
|
+
:host[looks="border"]::slotted(smoothly-picker-menu smoothly-input),
|
|
5
|
+
:host[looks="border"] {
|
|
6
|
+
border: rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px;
|
|
7
|
+
}
|
|
8
|
+
:host[looks="border"][readonly]{
|
|
9
|
+
border: rgba(var(--text-color, var(--smoothly-color-contrast)), .1) solid 1px;
|
|
10
|
+
}
|
|
11
|
+
:host[looks="line"]::slotted(smoothly-picker-menu smoothly-input),
|
|
12
|
+
:host[looks="line"] {
|
|
13
|
+
border-bottom: rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px;
|
|
14
|
+
}
|
|
15
|
+
:host[looks="line"][readonly]{
|
|
16
|
+
border-bottom: rgba(var(--text-color, var(--smoothly-color-contrast)), .1) solid 1px;
|
|
17
|
+
}
|
|
18
|
+
:host[looks="grid"]::slotted(smoothly-picker-menu smoothly-input),
|
|
19
|
+
:host[looks="grid"] {
|
|
20
|
+
border: rgba(var(--text-color, var(--smoothly-color-contrast)), .5) solid .5px;
|
|
21
|
+
}
|
|
22
|
+
:host[looks="grid"][readonly]{
|
|
23
|
+
border: rgba(var(--text-color, var(--smoothly-color-contrast)), .2) solid .5px;
|
|
24
|
+
}
|
|
25
|
+
:host[looks="transparent"] {
|
|
26
|
+
border: none;
|
|
27
|
+
}
|
|
28
|
+
:host[looks="transparent"]:not(:focus-within) {
|
|
29
|
+
background-color: transparent;
|
|
30
|
+
}
|
|
31
|
+
:host[looks="transparent"]:not(:focus-within) input {
|
|
32
|
+
background: transparent;
|
|
33
|
+
}
|
|
34
|
+
:host[looks="transparent"]:focus-within {
|
|
35
|
+
outline: 1px solid rgb(var(--smoothly-color-contrast));
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
:host {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
flex-wrap: wrap;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
position: relative;
|
|
46
|
+
width: 100%;
|
|
47
|
+
padding-left: 0.4rem;
|
|
48
|
+
background-color: rgb(var(--background-color,var(--smoothly-color-shade)))
|
|
49
|
+
}
|
|
50
|
+
.mask {
|
|
51
|
+
position: absolute;
|
|
52
|
+
top: 0;
|
|
53
|
+
bottom: 0;
|
|
54
|
+
left: 0;
|
|
55
|
+
right: 0;
|
|
56
|
+
background-color: rgb(var(--text-color ,var(--smoothly-color-contrast)), 0.3);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host:not(.dragging) .mask {
|
|
60
|
+
display: none;
|
|
61
|
+
}
|
|
62
|
+
input {
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
height: 0;
|
|
65
|
+
width: 0;
|
|
66
|
+
padding:0
|
|
67
|
+
}
|
|
68
|
+
.input {
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items:center;
|
|
71
|
+
padding-left: 0.4rem;
|
|
72
|
+
padding-bottom: 0.2rem;
|
|
73
|
+
}
|
|
74
|
+
smoothly-button {
|
|
75
|
+
margin: 0;
|
|
76
|
+
border: none;
|
|
77
|
+
}
|
|
78
|
+
label {
|
|
79
|
+
padding-left: 0.4rem;
|
|
80
|
+
padding-top: 0.4rem;
|
|
81
|
+
display: flex;
|
|
82
|
+
width: 100%;
|
|
83
|
+
align-items: baseline;
|
|
84
|
+
justify-content: flex-start;
|
|
85
|
+
color: rgb(var(--text-color, var(--smoothly-color-contrast)));
|
|
86
|
+
cursor: inherit;
|
|
87
|
+
|
|
88
|
+
}
|
|
89
|
+
label::slotted(*) {
|
|
90
|
+
display: block;
|
|
91
|
+
width: 100%;
|
|
92
|
+
font-size: 0.65em;
|
|
93
|
+
opacity: 0.8;
|
|
94
|
+
}
|
|
95
|
+
:host:not([show-label]) label {
|
|
96
|
+
display: none;
|
|
97
|
+
}
|
|
98
|
+
smoothly-icon {
|
|
99
|
+
display: none;
|
|
100
|
+
position: absolute;
|
|
101
|
+
right: 0.2em;
|
|
102
|
+
top: 0.6em;
|
|
103
|
+
}
|
|
104
|
+
span {
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
padding-left: 0.5rem;
|
|
107
|
+
}
|