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,452 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class SmoothlyInputSelect {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.items = [];
|
|
5
|
+
this.name = "selected";
|
|
6
|
+
this.color = undefined;
|
|
7
|
+
this.looks = "plain";
|
|
8
|
+
this.type = undefined;
|
|
9
|
+
this.showSelected = true;
|
|
10
|
+
this.initialPrompt = undefined;
|
|
11
|
+
this.initialValue = undefined;
|
|
12
|
+
this.menuHeight = undefined;
|
|
13
|
+
this.opened = false;
|
|
14
|
+
this.selectedElement = undefined;
|
|
15
|
+
this.missing = false;
|
|
16
|
+
this.filter = "";
|
|
17
|
+
}
|
|
18
|
+
componentWillLoad() {
|
|
19
|
+
this.smoothlyInputLooks.emit((looks, color) => ((this.looks = looks), !this.color && (this.color = color)));
|
|
20
|
+
}
|
|
21
|
+
async reset() {
|
|
22
|
+
var _a;
|
|
23
|
+
this.selectedElement = undefined;
|
|
24
|
+
if (this.mainElement) {
|
|
25
|
+
this.mainElement.innerHTML = (_a = this.initialPrompt) !== null && _a !== void 0 ? _a : "(none)";
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
onSelectedChange(value, old) {
|
|
29
|
+
if (old)
|
|
30
|
+
old.selected = false;
|
|
31
|
+
this.smoothlySelect.emit(value === null || value === void 0 ? void 0 : value.value);
|
|
32
|
+
this.smoothlyInput.emit({ [this.name]: value === null || value === void 0 ? void 0 : value.value });
|
|
33
|
+
}
|
|
34
|
+
async onFilterChange(value) {
|
|
35
|
+
value = value.toLowerCase();
|
|
36
|
+
if (!(await Promise.all(this.items.map(item => item.filter(value)))).some(r => r)) {
|
|
37
|
+
this.missing = true;
|
|
38
|
+
this.items.forEach(el => el.filter(""));
|
|
39
|
+
}
|
|
40
|
+
else
|
|
41
|
+
this.missing = false;
|
|
42
|
+
}
|
|
43
|
+
onClick(event) {
|
|
44
|
+
event.stopPropagation();
|
|
45
|
+
this.opened = !this.opened;
|
|
46
|
+
}
|
|
47
|
+
onItemSelect(event) {
|
|
48
|
+
this.selectedElement && (this.selectedElement.hidden = false);
|
|
49
|
+
this.selectedElement = event.target;
|
|
50
|
+
!this.showSelected && (this.selectedElement.hidden = true);
|
|
51
|
+
if (this.mainElement)
|
|
52
|
+
this.mainElement.innerHTML = this.selectedElement.innerHTML;
|
|
53
|
+
}
|
|
54
|
+
onClosed() {
|
|
55
|
+
if (!this.opened) {
|
|
56
|
+
const marked = this.items.find(item => item.marked);
|
|
57
|
+
if (marked)
|
|
58
|
+
marked.marked = false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
onKeyDown(event) {
|
|
62
|
+
event.stopPropagation();
|
|
63
|
+
if (event.key != "Tab" && !event.ctrlKey && !event.metaKey)
|
|
64
|
+
event.preventDefault();
|
|
65
|
+
if (this.opened) {
|
|
66
|
+
switch (event.key) {
|
|
67
|
+
case "ArrowUp":
|
|
68
|
+
this.move(-1);
|
|
69
|
+
break;
|
|
70
|
+
case "ArrowDown":
|
|
71
|
+
this.move(1);
|
|
72
|
+
break;
|
|
73
|
+
case "Escape":
|
|
74
|
+
if (this.filter == "")
|
|
75
|
+
this.opened = false;
|
|
76
|
+
this.filter = "";
|
|
77
|
+
break;
|
|
78
|
+
case "Backspace":
|
|
79
|
+
this.filter = this.filter.slice(0, -1);
|
|
80
|
+
break;
|
|
81
|
+
case "Enter":
|
|
82
|
+
const result = this.items.find(item => item.marked);
|
|
83
|
+
if (result === null || result === void 0 ? void 0 : result.value)
|
|
84
|
+
result.selected = true;
|
|
85
|
+
this.opened = false;
|
|
86
|
+
this.filter = "";
|
|
87
|
+
break;
|
|
88
|
+
case "Tab":
|
|
89
|
+
this.opened = false;
|
|
90
|
+
break;
|
|
91
|
+
default:
|
|
92
|
+
if (event.key.length == 1)
|
|
93
|
+
this.filter += event.key;
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
switch (event.key) {
|
|
99
|
+
case "Enter":
|
|
100
|
+
case " ":
|
|
101
|
+
this.opened = true;
|
|
102
|
+
break;
|
|
103
|
+
case "ArrowDown":
|
|
104
|
+
this.opened = true;
|
|
105
|
+
this.move(0);
|
|
106
|
+
break;
|
|
107
|
+
case "ArrowUp":
|
|
108
|
+
this.opened = true;
|
|
109
|
+
this.move(-1);
|
|
110
|
+
break;
|
|
111
|
+
case "Tab":
|
|
112
|
+
break;
|
|
113
|
+
default:
|
|
114
|
+
this.opened = true;
|
|
115
|
+
if (event.key.length == 1)
|
|
116
|
+
this.filter += event.key;
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
move(direction) {
|
|
122
|
+
let markedIndex = this.items.findIndex(item => item.marked);
|
|
123
|
+
if (markedIndex == -1)
|
|
124
|
+
markedIndex = this.items.findIndex(item => item.selected);
|
|
125
|
+
if (this.items[markedIndex])
|
|
126
|
+
this.items[markedIndex].marked = false;
|
|
127
|
+
if (markedIndex == -1)
|
|
128
|
+
markedIndex = 0;
|
|
129
|
+
do {
|
|
130
|
+
markedIndex = (markedIndex + direction + this.items.length) % this.items.length;
|
|
131
|
+
} while (this.items[markedIndex].hidden);
|
|
132
|
+
this.items[markedIndex].marked = true;
|
|
133
|
+
this.items[markedIndex].focus();
|
|
134
|
+
}
|
|
135
|
+
render() {
|
|
136
|
+
var _a, _b;
|
|
137
|
+
return (h(Host, { tabIndex: 0, class: (_a = (this.missing ? "missing" : this.type)) !== null && _a !== void 0 ? _a : "" }, h("main", { ref: element => (this.mainElement = element) }, (_b = this.initialPrompt) !== null && _b !== void 0 ? _b : "(none)"), this.filter.length != 0 ? (h("aside", { ref: element => (this.aside = element) }, this.filter, h("button", { onClick: e => {
|
|
138
|
+
e.stopPropagation();
|
|
139
|
+
this.filter = "";
|
|
140
|
+
} }, h("smoothly-icon", { name: "close", size: "small" })))) : undefined, this.opened ? h("section", { onClick: () => (this.opened = true) }) : [], h("div", { class: this.opened ? "" : "hidden" }, h("nav", null, h("slot", null)))));
|
|
141
|
+
}
|
|
142
|
+
componentDidRender() {
|
|
143
|
+
var _a, _b, _c;
|
|
144
|
+
const items = [];
|
|
145
|
+
const children = this.element.querySelectorAll("div > nav > smoothly-item");
|
|
146
|
+
for (let i = 0; i < children.length; i++) {
|
|
147
|
+
const node = children.item(i);
|
|
148
|
+
if (isItem(node)) {
|
|
149
|
+
items.push(node);
|
|
150
|
+
node.value == this.initialValue && this.mainElement && !this.selectedElement && (node.selected = true);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
this.items = items;
|
|
154
|
+
if (this.menuHeight)
|
|
155
|
+
(_a = this.element) === null || _a === void 0 ? void 0 : _a.style.setProperty("--menu-height", !this.menuHeight.endsWith("items") || !this.items.length
|
|
156
|
+
? this.menuHeight
|
|
157
|
+
: `${this.items[0].clientHeight * +((_c = (_b = this.menuHeight.match(/^(\d+(\.\d+)?|\.\d+)/g)) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : "10")}px`);
|
|
158
|
+
}
|
|
159
|
+
static get is() { return "smoothly-input-select"; }
|
|
160
|
+
static get encapsulation() { return "scoped"; }
|
|
161
|
+
static get originalStyleUrls() {
|
|
162
|
+
return {
|
|
163
|
+
"$": ["style.css"]
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
static get styleUrls() {
|
|
167
|
+
return {
|
|
168
|
+
"$": ["style.css"]
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
static get properties() {
|
|
172
|
+
return {
|
|
173
|
+
"name": {
|
|
174
|
+
"type": "string",
|
|
175
|
+
"mutable": false,
|
|
176
|
+
"complexType": {
|
|
177
|
+
"original": "string",
|
|
178
|
+
"resolved": "string",
|
|
179
|
+
"references": {}
|
|
180
|
+
},
|
|
181
|
+
"required": false,
|
|
182
|
+
"optional": false,
|
|
183
|
+
"docs": {
|
|
184
|
+
"tags": [],
|
|
185
|
+
"text": ""
|
|
186
|
+
},
|
|
187
|
+
"attribute": "name",
|
|
188
|
+
"reflect": false,
|
|
189
|
+
"defaultValue": "\"selected\""
|
|
190
|
+
},
|
|
191
|
+
"color": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"mutable": true,
|
|
194
|
+
"complexType": {
|
|
195
|
+
"original": "Color",
|
|
196
|
+
"resolved": "\"danger\" | \"dark\" | \"default\" | \"light\" | \"medium\" | \"primary\" | \"secondary\" | \"success\" | \"tertiary\" | \"warning\" | undefined",
|
|
197
|
+
"references": {
|
|
198
|
+
"Color": {
|
|
199
|
+
"location": "import",
|
|
200
|
+
"path": "../../../model"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"required": false,
|
|
205
|
+
"optional": true,
|
|
206
|
+
"docs": {
|
|
207
|
+
"tags": [],
|
|
208
|
+
"text": ""
|
|
209
|
+
},
|
|
210
|
+
"attribute": "color",
|
|
211
|
+
"reflect": true
|
|
212
|
+
},
|
|
213
|
+
"looks": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"mutable": true,
|
|
216
|
+
"complexType": {
|
|
217
|
+
"original": "Looks",
|
|
218
|
+
"resolved": "\"border\" | \"grid\" | \"line\" | \"plain\" | \"transparent\"",
|
|
219
|
+
"references": {
|
|
220
|
+
"Looks": {
|
|
221
|
+
"location": "import",
|
|
222
|
+
"path": "../Looks"
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"required": false,
|
|
227
|
+
"optional": false,
|
|
228
|
+
"docs": {
|
|
229
|
+
"tags": [],
|
|
230
|
+
"text": ""
|
|
231
|
+
},
|
|
232
|
+
"attribute": "looks",
|
|
233
|
+
"reflect": true,
|
|
234
|
+
"defaultValue": "\"plain\""
|
|
235
|
+
},
|
|
236
|
+
"type": {
|
|
237
|
+
"type": "string",
|
|
238
|
+
"mutable": true,
|
|
239
|
+
"complexType": {
|
|
240
|
+
"original": "\"icon\"",
|
|
241
|
+
"resolved": "\"icon\" | undefined",
|
|
242
|
+
"references": {}
|
|
243
|
+
},
|
|
244
|
+
"required": false,
|
|
245
|
+
"optional": true,
|
|
246
|
+
"docs": {
|
|
247
|
+
"tags": [],
|
|
248
|
+
"text": ""
|
|
249
|
+
},
|
|
250
|
+
"attribute": "type",
|
|
251
|
+
"reflect": true
|
|
252
|
+
},
|
|
253
|
+
"showSelected": {
|
|
254
|
+
"type": "boolean",
|
|
255
|
+
"mutable": true,
|
|
256
|
+
"complexType": {
|
|
257
|
+
"original": "boolean",
|
|
258
|
+
"resolved": "boolean | undefined",
|
|
259
|
+
"references": {}
|
|
260
|
+
},
|
|
261
|
+
"required": false,
|
|
262
|
+
"optional": true,
|
|
263
|
+
"docs": {
|
|
264
|
+
"tags": [],
|
|
265
|
+
"text": ""
|
|
266
|
+
},
|
|
267
|
+
"attribute": "show-selected",
|
|
268
|
+
"reflect": true,
|
|
269
|
+
"defaultValue": "true"
|
|
270
|
+
},
|
|
271
|
+
"initialPrompt": {
|
|
272
|
+
"type": "string",
|
|
273
|
+
"mutable": false,
|
|
274
|
+
"complexType": {
|
|
275
|
+
"original": "string",
|
|
276
|
+
"resolved": "string | undefined",
|
|
277
|
+
"references": {}
|
|
278
|
+
},
|
|
279
|
+
"required": false,
|
|
280
|
+
"optional": true,
|
|
281
|
+
"docs": {
|
|
282
|
+
"tags": [],
|
|
283
|
+
"text": ""
|
|
284
|
+
},
|
|
285
|
+
"attribute": "initial-prompt",
|
|
286
|
+
"reflect": false
|
|
287
|
+
},
|
|
288
|
+
"initialValue": {
|
|
289
|
+
"type": "unknown",
|
|
290
|
+
"mutable": false,
|
|
291
|
+
"complexType": {
|
|
292
|
+
"original": "unknown",
|
|
293
|
+
"resolved": "unknown",
|
|
294
|
+
"references": {}
|
|
295
|
+
},
|
|
296
|
+
"required": false,
|
|
297
|
+
"optional": true,
|
|
298
|
+
"docs": {
|
|
299
|
+
"tags": [],
|
|
300
|
+
"text": ""
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"menuHeight": {
|
|
304
|
+
"type": "string",
|
|
305
|
+
"mutable": false,
|
|
306
|
+
"complexType": {
|
|
307
|
+
"original": "`${number}${\"items\" | \"rem\" | \"px\" | \"vh\"}`",
|
|
308
|
+
"resolved": "`${number}items` | `${number}px` | `${number}rem` | `${number}vh` | undefined",
|
|
309
|
+
"references": {}
|
|
310
|
+
},
|
|
311
|
+
"required": false,
|
|
312
|
+
"optional": true,
|
|
313
|
+
"docs": {
|
|
314
|
+
"tags": [],
|
|
315
|
+
"text": ""
|
|
316
|
+
},
|
|
317
|
+
"attribute": "menu-height",
|
|
318
|
+
"reflect": false
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
static get states() {
|
|
323
|
+
return {
|
|
324
|
+
"opened": {},
|
|
325
|
+
"selectedElement": {},
|
|
326
|
+
"missing": {},
|
|
327
|
+
"filter": {}
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
static get events() {
|
|
331
|
+
return [{
|
|
332
|
+
"method": "smoothlySelect",
|
|
333
|
+
"name": "smoothlySelect",
|
|
334
|
+
"bubbles": true,
|
|
335
|
+
"cancelable": true,
|
|
336
|
+
"composed": true,
|
|
337
|
+
"docs": {
|
|
338
|
+
"tags": [],
|
|
339
|
+
"text": ""
|
|
340
|
+
},
|
|
341
|
+
"complexType": {
|
|
342
|
+
"original": "unknown",
|
|
343
|
+
"resolved": "unknown",
|
|
344
|
+
"references": {}
|
|
345
|
+
}
|
|
346
|
+
}, {
|
|
347
|
+
"method": "smoothlyInput",
|
|
348
|
+
"name": "smoothlyInput",
|
|
349
|
+
"bubbles": true,
|
|
350
|
+
"cancelable": true,
|
|
351
|
+
"composed": true,
|
|
352
|
+
"docs": {
|
|
353
|
+
"tags": [],
|
|
354
|
+
"text": ""
|
|
355
|
+
},
|
|
356
|
+
"complexType": {
|
|
357
|
+
"original": "Data",
|
|
358
|
+
"resolved": "{ [name: string]: Value | Data; }",
|
|
359
|
+
"references": {
|
|
360
|
+
"Data": {
|
|
361
|
+
"location": "import",
|
|
362
|
+
"path": "../../../model"
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}, {
|
|
367
|
+
"method": "smoothlyInputLooks",
|
|
368
|
+
"name": "smoothlyInputLooks",
|
|
369
|
+
"bubbles": true,
|
|
370
|
+
"cancelable": true,
|
|
371
|
+
"composed": true,
|
|
372
|
+
"docs": {
|
|
373
|
+
"tags": [],
|
|
374
|
+
"text": ""
|
|
375
|
+
},
|
|
376
|
+
"complexType": {
|
|
377
|
+
"original": "(looks: Looks, color: Color) => void",
|
|
378
|
+
"resolved": "(looks: \"line\" | \"grid\" | \"plain\" | \"border\" | \"transparent\", color: \"success\" | \"default\" | \"primary\" | \"secondary\" | \"tertiary\" | \"warning\" | \"danger\" | \"light\" | \"medium\" | \"dark\") => void",
|
|
379
|
+
"references": {
|
|
380
|
+
"Looks": {
|
|
381
|
+
"location": "import",
|
|
382
|
+
"path": "../Looks"
|
|
383
|
+
},
|
|
384
|
+
"Color": {
|
|
385
|
+
"location": "import",
|
|
386
|
+
"path": "../../../model"
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}];
|
|
391
|
+
}
|
|
392
|
+
static get methods() {
|
|
393
|
+
return {
|
|
394
|
+
"reset": {
|
|
395
|
+
"complexType": {
|
|
396
|
+
"signature": "() => Promise<void>",
|
|
397
|
+
"parameters": [],
|
|
398
|
+
"references": {
|
|
399
|
+
"Promise": {
|
|
400
|
+
"location": "global"
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
"return": "Promise<void>"
|
|
404
|
+
},
|
|
405
|
+
"docs": {
|
|
406
|
+
"text": "",
|
|
407
|
+
"tags": []
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
static get elementRef() { return "element"; }
|
|
413
|
+
static get watchers() {
|
|
414
|
+
return [{
|
|
415
|
+
"propName": "selectedElement",
|
|
416
|
+
"methodName": "onSelectedChange"
|
|
417
|
+
}, {
|
|
418
|
+
"propName": "filter",
|
|
419
|
+
"methodName": "onFilterChange"
|
|
420
|
+
}, {
|
|
421
|
+
"propName": "opened",
|
|
422
|
+
"methodName": "onClosed"
|
|
423
|
+
}];
|
|
424
|
+
}
|
|
425
|
+
static get listeners() {
|
|
426
|
+
return [{
|
|
427
|
+
"name": "click",
|
|
428
|
+
"method": "onClick",
|
|
429
|
+
"target": undefined,
|
|
430
|
+
"capture": false,
|
|
431
|
+
"passive": false
|
|
432
|
+
}, {
|
|
433
|
+
"name": "smoothlyItemSelect",
|
|
434
|
+
"method": "onItemSelect",
|
|
435
|
+
"target": undefined,
|
|
436
|
+
"capture": false,
|
|
437
|
+
"passive": false
|
|
438
|
+
}, {
|
|
439
|
+
"name": "keydown",
|
|
440
|
+
"method": "onKeyDown",
|
|
441
|
+
"target": undefined,
|
|
442
|
+
"capture": false,
|
|
443
|
+
"passive": false
|
|
444
|
+
}];
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
function isItem(value) {
|
|
448
|
+
return (typeof value == "object" &&
|
|
449
|
+
(typeof value.selected == "boolean" || value.selected == undefined) &&
|
|
450
|
+
typeof value.filter == "function");
|
|
451
|
+
}
|
|
452
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/input/select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AASpH,MAAM,OAAO,mBAAmB;;IAW/B,UAAK,GAA8B,EAAE,CAAA;gBATtB,UAAU;;iBAE8B,OAAO;;wBAEG,IAAI;;;;kBAInD,KAAK;;mBAGJ,KAAK;kBAEN,EAAE;;EAMpB,iBAAiB;IAChB,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;EAC5G,CAAC;EAGD,KAAK,CAAC,KAAK;;IACV,IAAI,CAAC,eAAe,GAAG,SAAS,CAAA;IAChC,IAAI,IAAI,CAAC,WAAW,EAAE;MAErB,IAAI,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,EACf,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM;QACvD,CAAC,CAAC,IAAI,CAAC,UAAU;QACjB,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,MAAA,MAAA,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,uBAAuB,CAAC,0CAAG,CAAC,CAAC,mCAAI,IAAI,CAAC,IAAI,CACrG,CAAA;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD;AACD,SAAS,MAAM,CAAC,KAAoC;EACnD,OAAO,CACN,OAAO,KAAK,IAAI,QAAQ;IACxB,CAAC,OAAO,KAAK,CAAC,QAAQ,IAAI,SAAS,IAAI,KAAK,CAAC,QAAQ,IAAI,SAAS,CAAC;IACnE,OAAO,KAAK,CAAC,MAAM,IAAI,UAAU,CACjC,CAAA;AACF,CAAC","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Listen, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { Color, Data } from \"../../../model\"\nimport { Input } from \"../Input\"\nimport { Looks } from \"../Looks\"\n@Component({\n\ttag: \"smoothly-input-select\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyInputSelect implements Input {\n\t@Element() element: HTMLSmoothlyInputSelectElement\n\t@Prop() name = \"selected\"\n\t@Prop({ reflect: true, mutable: true }) color?: Color\n\t@Prop({ reflect: true, mutable: true }) looks: Looks = \"plain\"\n\t@Prop({ reflect: true, mutable: true }) type?: \"icon\"\n\t@Prop({ reflect: true, mutable: true }) showSelected?: boolean = true\n\t@Prop() initialPrompt?: string\n\t@Prop() initialValue?: unknown\n\t@Prop() menuHeight?: `${number}${\"items\" | \"rem\" | \"px\" | \"vh\"}`\n\t@State() opened = false\n\titems: HTMLSmoothlyItemElement[] = []\n\t@State() selectedElement?: HTMLSmoothlyItemElement\n\t@State() missing = false\n\tmainElement?: HTMLElement\n\t@State() filter = \"\"\n\t@Event() smoothlySelect: EventEmitter<unknown>\n\t@Event() smoothlyInput: EventEmitter<Data>\n\taside?: HTMLElement\n\t@Event() smoothlyInputLooks: EventEmitter<(looks: Looks, color: Color) => void>\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 reset() {\n\t\tthis.selectedElement = undefined\n\t\tif (this.mainElement) {\n\t\t\t//reset to the same value as it started with\n\t\t\tthis.mainElement.innerHTML = this.initialPrompt ?? \"(none)\"\n\t\t}\n\t}\n\n\t@Watch(\"selectedElement\")\n\tonSelectedChange(value: HTMLSmoothlyItemElement | undefined, old: HTMLSmoothlyItemElement | undefined) {\n\t\tif (old)\n\t\t\told.selected = false\n\t\tthis.smoothlySelect.emit(value?.value)\n\t\tthis.smoothlyInput.emit({ [this.name]: value?.value })\n\t}\n\t@Watch(\"filter\")\n\tasync onFilterChange(value: string) {\n\t\tvalue = value.toLowerCase()\n\t\tif (!(await Promise.all(this.items.map(item => item.filter(value)))).some(r => r)) {\n\t\t\tthis.missing = true\n\t\t\tthis.items.forEach(el => el.filter(\"\"))\n\t\t} else\n\t\t\tthis.missing = false\n\t}\n\t@Listen(\"click\")\n\tonClick(event: UIEvent) {\n\t\tevent.stopPropagation()\n\t\tthis.opened = !this.opened\n\t}\n\t@Listen(\"smoothlyItemSelect\")\n\tonItemSelect(event: Event) {\n\t\tthis.selectedElement && (this.selectedElement.hidden = false)\n\t\tthis.selectedElement = event.target as HTMLSmoothlyItemElement\n\t\t!this.showSelected && (this.selectedElement.hidden = true)\n\t\tif (this.mainElement)\n\t\t\tthis.mainElement.innerHTML = this.selectedElement.innerHTML\n\t}\n\t@Watch(\"opened\")\n\tonClosed() {\n\t\tif (!this.opened) {\n\t\t\tconst marked = this.items.find(item => item.marked)\n\t\t\tif (marked)\n\t\t\t\tmarked.marked = false\n\t\t}\n\t}\n\n\t@Listen(\"keydown\")\n\tonKeyDown(event: KeyboardEvent) {\n\t\tevent.stopPropagation()\n\t\tif (event.key != \"Tab\" && !event.ctrlKey && !event.metaKey)\n\t\t\tevent.preventDefault()\n\t\tif (this.opened) {\n\t\t\tswitch (event.key) {\n\t\t\t\tcase \"ArrowUp\":\n\t\t\t\t\tthis.move(-1)\n\t\t\t\t\tbreak\n\t\t\t\tcase \"ArrowDown\":\n\t\t\t\t\tthis.move(1)\n\t\t\t\t\tbreak\n\t\t\t\tcase \"Escape\":\n\t\t\t\t\tif (this.filter == \"\")\n\t\t\t\t\t\tthis.opened = false\n\t\t\t\t\tthis.filter = \"\"\n\t\t\t\t\tbreak\n\t\t\t\tcase \"Backspace\":\n\t\t\t\t\tthis.filter = this.filter.slice(0, -1)\n\t\t\t\t\tbreak\n\t\t\t\tcase \"Enter\":\n\t\t\t\t\tconst result = this.items.find(item => item.marked)\n\t\t\t\t\tif (result?.value)\n\t\t\t\t\t\tresult.selected = true\n\t\t\t\t\tthis.opened = false\n\t\t\t\t\tthis.filter = \"\"\n\t\t\t\t\tbreak\n\t\t\t\tcase \"Tab\":\n\t\t\t\t\tthis.opened = false\n\t\t\t\t\tbreak\n\t\t\t\tdefault:\n\t\t\t\t\tif (event.key.length == 1)\n\t\t\t\t\t\tthis.filter += event.key\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t} else {\n\t\t\tswitch (event.key) {\n\t\t\t\tcase \"Enter\":\n\t\t\t\tcase \" \":\n\t\t\t\t\tthis.opened = true\n\t\t\t\t\tbreak\n\t\t\t\tcase \"ArrowDown\":\n\t\t\t\t\tthis.opened = true\n\t\t\t\t\tthis.move(0)\n\t\t\t\t\tbreak\n\t\t\t\tcase \"ArrowUp\":\n\t\t\t\t\tthis.opened = true\n\t\t\t\t\tthis.move(-1)\n\t\t\t\t\tbreak\n\t\t\t\tcase \"Tab\":\n\t\t\t\t\tbreak\n\t\t\t\tdefault:\n\t\t\t\t\tthis.opened = true\n\t\t\t\t\tif (event.key.length == 1)\n\t\t\t\t\t\tthis.filter += event.key\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\tprivate move(direction: -1 | 0 | 1): void {\n\t\tlet markedIndex = this.items.findIndex(item => item.marked)\n\t\tif (markedIndex == -1)\n\t\t\tmarkedIndex = this.items.findIndex(item => item.selected)\n\t\tif (this.items[markedIndex])\n\t\t\tthis.items[markedIndex].marked = false\n\t\tif (markedIndex == -1)\n\t\t\tmarkedIndex = 0\n\t\tdo {\n\t\t\tmarkedIndex = (markedIndex + direction + this.items.length) % this.items.length\n\t\t} while (this.items[markedIndex].hidden)\n\t\tthis.items[markedIndex].marked = true\n\t\tthis.items[markedIndex].focus()\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<Host tabIndex={0} class={(this.missing ? \"missing\" : this.type) ?? \"\"}>\n\t\t\t\t<main ref={element => (this.mainElement = element)}>{this.initialPrompt ?? \"(none)\"}</main>\n\t\t\t\t{this.filter.length != 0 ? (\n\t\t\t\t\t<aside ref={element => (this.aside = element)}>\n\t\t\t\t\t\t{this.filter}\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tonClick={e => {\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\tthis.filter = \"\"\n\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t<smoothly-icon name=\"close\" size=\"small\"></smoothly-icon>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</aside>\n\t\t\t\t) : undefined}\n\t\t\t\t{this.opened ? <section onClick={() => (this.opened = true)}></section> : []}\n\t\t\t\t<div class={this.opened ? \"\" : \"hidden\"}>\n\t\t\t\t\t<nav>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</nav>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\tcomponentDidRender() {\n\t\tconst items: HTMLSmoothlyItemElement[] = []\n\t\tconst children = this.element.querySelectorAll(\"div > nav > smoothly-item\")\n\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\tconst node = children.item(i)\n\t\t\tif (isItem(node)) {\n\t\t\t\titems.push(node)\n\t\t\t\tnode.value == this.initialValue && this.mainElement && !this.selectedElement && (node.selected = true)\n\t\t\t}\n\t\t}\n\t\tthis.items = items\n\t\tif (this.menuHeight)\n\t\t\tthis.element?.style.setProperty(\n\t\t\t\t\"--menu-height\",\n\t\t\t\t!this.menuHeight.endsWith(\"items\") || !this.items.length\n\t\t\t\t\t? this.menuHeight\n\t\t\t\t\t: `${this.items[0].clientHeight * +(this.menuHeight.match(/^(\\d+(\\.\\d+)?|\\.\\d+)/g)?.[0] ?? \"10\")}px`\n\t\t\t)\n\t}\n}\nfunction isItem(value: HTMLSmoothlyItemElement | any): value is HTMLSmoothlyItemElement {\n\treturn (\n\t\ttypeof value == \"object\" &&\n\t\t(typeof value.selected == \"boolean\" || value.selected == undefined) &&\n\t\ttypeof value.filter == \"function\"\n\t)\n}\n"]}
|
|
@@ -0,0 +1,104 @@
|
|
|
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
|
+
flex-direction: column;
|
|
43
|
+
position: relative;
|
|
44
|
+
background-color: rgb(var(--background-color, var(--smoothly-color-shade)));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:host.icon {
|
|
48
|
+
width: fit-content;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:host>main,
|
|
53
|
+
:host>main>* {
|
|
54
|
+
height: 100%;
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
cursor: default;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host.icon>main,
|
|
61
|
+
:host.icon>main>* {
|
|
62
|
+
padding: 0.5em;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
:host>div>nav {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
position: absolute;
|
|
69
|
+
z-index: 10;
|
|
70
|
+
height: var(--menu-height, unset);
|
|
71
|
+
overflow-y: scroll;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:host>aside {
|
|
75
|
+
position: absolute;
|
|
76
|
+
top: 0;
|
|
77
|
+
left: 5em;
|
|
78
|
+
z-index: 10;
|
|
79
|
+
background-color: rgb(var(--smoothly-tertiary-color));
|
|
80
|
+
color: rgb(var(--smoothly-tertiary-contrast));
|
|
81
|
+
height: 1.25rem;
|
|
82
|
+
border-radius: 0.3rem;
|
|
83
|
+
padding: 0.3rem;
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:host().missing>aside {
|
|
89
|
+
background-color: rgb(var(--smoothly-warning-color));
|
|
90
|
+
color: rgb(var(--smoothly-warning-contrast));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.hidden {
|
|
94
|
+
display: none;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
:host>section {
|
|
98
|
+
position: fixed;
|
|
99
|
+
top: 0px;
|
|
100
|
+
left: 0px;
|
|
101
|
+
width: 100vw;
|
|
102
|
+
height: 100vh;
|
|
103
|
+
z-index: 10;
|
|
104
|
+
}
|
|
@@ -1,3 +1,42 @@
|
|
|
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
|
+
|
|
1
40
|
:host {
|
|
2
41
|
display: flex;
|
|
3
42
|
align-items: center;
|
|
@@ -5,8 +44,8 @@
|
|
|
5
44
|
font-weight: var(--smoothly-font-weight);
|
|
6
45
|
padding: 0 0.4em;
|
|
7
46
|
overflow: hidden;
|
|
8
|
-
background-color: rgb(var(--background-color));
|
|
9
|
-
color: rgb(var(--text-color, var(--smoothly-
|
|
47
|
+
background-color: rgb(var(--background-color, var(--smoothly-color-shade)));
|
|
48
|
+
color: rgb(var(--text-color, var(--smoothly-color-contrast)));
|
|
10
49
|
}
|
|
11
50
|
:host[hidden] {
|
|
12
51
|
display: none;
|
|
@@ -23,7 +62,6 @@ label {
|
|
|
23
62
|
position: absolute;
|
|
24
63
|
left: 0;
|
|
25
64
|
top: 0.6em;
|
|
26
|
-
color: rgb(var(--text-color, var(--smoothly-default-contrast)));
|
|
27
65
|
opacity: 0.8;
|
|
28
66
|
user-select: none;
|
|
29
67
|
cursor: inherit;
|
|
@@ -41,13 +79,12 @@ input {
|
|
|
41
79
|
box-sizing: border-box;
|
|
42
80
|
width: 100%;
|
|
43
81
|
height: 100%;
|
|
44
|
-
background: none;
|
|
45
82
|
border: 0;
|
|
46
83
|
z-index: 1;
|
|
47
84
|
position: relative;
|
|
48
85
|
font-size: 1rem;
|
|
49
86
|
font-family: var(--smoothly-font-family);
|
|
50
|
-
background-color: rgb(var(--background-color));
|
|
87
|
+
background-color: rgb(var(--background-color, var(--smoothly-color-shade)));
|
|
51
88
|
}
|
|
52
89
|
smoothly-icon {
|
|
53
90
|
display: none;
|
|
@@ -63,9 +100,9 @@ input:invalid + label + smoothly-icon {
|
|
|
63
100
|
z-index: 1;
|
|
64
101
|
pointer-events: none;
|
|
65
102
|
}
|
|
66
|
-
:host[placeholder] > div > label,
|
|
103
|
+
:host:not([readonly]):not(.has-value)[placeholder] > div > label,
|
|
67
104
|
:host.has-value > div > label,
|
|
68
|
-
:host:focus-within > div > label {
|
|
105
|
+
:host:not([readonly]):not(.has-value):focus-within > div > label {
|
|
69
106
|
top: 0.4em;
|
|
70
107
|
transform: scale(0.6);
|
|
71
108
|
}
|
|
@@ -76,10 +113,10 @@ input:-webkit-autofill,
|
|
|
76
113
|
input:-webkit-autofill:hover,
|
|
77
114
|
input:-webkit-autofill:focus,
|
|
78
115
|
input:-webkit-autofill:active {
|
|
79
|
-
box-shadow: 0 0 0 40em rgb(var(--background-color)) inset;
|
|
80
|
-
-webkit-box-shadow: 0 0 0 40em rgb(var(--background-color)) inset;
|
|
116
|
+
box-shadow: 0 0 0 40em rgb(var(--background-color, var(--smoothly-color-shade))) inset;
|
|
117
|
+
-webkit-box-shadow: 0 0 0 40em rgb(var(--background-color, var(--smoothly-color-shade))) inset;
|
|
81
118
|
}
|
|
82
119
|
input:-webkit-autofill,
|
|
83
120
|
input:-webkit-autofill + label {
|
|
84
|
-
-webkit-text-fill-color: rgb(var(--text-color, var(--smoothly-
|
|
121
|
+
-webkit-text-fill-color: rgb(var(--text-color, var(--smoothly-color-contrast)));
|
|
85
122
|
}
|