smoothly 1.0.0-alpha.13 → 1.0.0-alpha.131
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-e345d3cd.js} +74 -4
- package/dist/cjs/Data-e345d3cd.js.map +1 -0
- package/dist/cjs/Observers-6450f075.js +25 -0
- package/dist/cjs/Observers-6450f075.js.map +1 -0
- package/dist/cjs/{getLanguage-430ecf04.js → getLanguage-28ce96e4.js} +1111 -890
- package/dist/cjs/getLanguage-28ce96e4.js.map +1 -0
- package/dist/cjs/{index-8352a4e0.js → index-6ae370b4.js} +12 -43
- package/dist/cjs/index-6ae370b4.js.map +1 -0
- package/dist/cjs/index.cjs.js +386 -22
- 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/redirect-2e5d4524.js +104 -0
- package/dist/cjs/redirect-2e5d4524.js.map +1 -0
- package/dist/cjs/smoothly-accordion_70.cjs.entry.js +17204 -0
- package/dist/cjs/smoothly-accordion_70.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-color.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-country.cjs.entry.js +9 -9
- 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-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-reorder.cjs.entry.js +4 -4
- package/dist/cjs/smoothly-reorder.cjs.entry.js.map +1 -1
- package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +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 +23 -12
- 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 +147 -1
- package/dist/collection/components/app/index.js.map +1 -1
- package/dist/collection/components/app/room/index.js +240 -0
- package/dist/collection/components/app/room/index.js.map +1 -0
- package/dist/collection/components/app/room/style.css +55 -0
- package/dist/collection/components/app/style.css +89 -101
- package/dist/collection/components/app-demo/index.js +5 -19
- 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 +174 -0
- package/dist/collection/components/burger/index.js.map +1 -0
- package/dist/collection/components/burger/style.css +22 -0
- 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 +13 -17
- package/dist/collection/components/button-demo/index.js +6 -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/checkbox/index.js +25 -3
- package/dist/collection/components/checkbox/index.js.map +1 -1
- package/dist/collection/components/country/index.js +1 -1
- package/dist/collection/components/display/index.js +24 -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 +1 -1
- package/dist/collection/components/display-demo/index.js.map +1 -1
- package/dist/collection/components/filter/index.js +1 -1
- package/dist/collection/components/filter/index.js.map +1 -1
- package/dist/collection/components/filter/input/index.js +16 -9
- package/dist/collection/components/filter/input/index.js.map +1 -1
- package/dist/collection/components/form/index.js +132 -9
- package/dist/collection/components/form/index.js.map +1 -1
- package/dist/collection/components/form/style.css +9 -16
- package/dist/collection/components/frame/index.js +1 -2
- package/dist/collection/components/frame/index.js.map +1 -1
- 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.map +1 -1
- package/dist/collection/components/icon-demo/style.css +1 -0
- package/dist/collection/components/input/Changeable.js +8 -0
- package/dist/collection/components/input/Changeable.js.map +1 -0
- package/dist/collection/components/input/Clearable.js.map +1 -0
- package/dist/collection/components/input/Input.js +2 -0
- package/dist/collection/components/input/Input.js.map +1 -0
- package/dist/collection/components/input/Looks.js +2 -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/clear/index.js +237 -0
- package/dist/collection/components/input/clear/index.js.map +1 -0
- package/dist/collection/components/input/clear/style.css +254 -0
- package/dist/collection/components/{input-date → input/date}/index.js +160 -3
- package/dist/collection/components/input/date/index.js.map +1 -0
- package/dist/collection/components/{input-date-range → input/date/range}/index.js +161 -23
- package/dist/collection/components/input/date/range/index.js.map +1 -0
- package/dist/collection/components/input/date/range/style.css +69 -0
- package/dist/collection/components/input/date/style.css +58 -0
- package/dist/collection/components/input/demo/index.js +95 -0
- package/dist/collection/components/input/demo/index.js.map +1 -0
- package/dist/collection/components/{input-demo → input/demo}/style.css +1 -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 +85 -0
- package/dist/collection/components/input/index.js +131 -8
- package/dist/collection/components/input/index.js.map +1 -1
- package/dist/collection/components/{input-month → input/month}/index.js +5 -5
- package/dist/collection/components/input/month/index.js.map +1 -0
- package/dist/collection/components/{selector → input/select}/index.js +176 -5
- package/dist/collection/components/input/select/index.js.map +1 -0
- package/dist/collection/components/input/select/style.css +80 -0
- package/dist/collection/components/input/style.css +23 -8
- 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 +26 -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 +422 -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 +60 -144
- package/dist/collection/components/radio/index.js +4 -4
- package/dist/collection/components/radio/index.js.map +1 -1
- package/dist/collection/components/radio-button/index.js +35 -10
- package/dist/collection/components/radio-button/index.js.map +1 -1
- 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 +224 -0
- package/dist/collection/components/summary/index.js +44 -1
- package/dist/collection/components/summary/index.js.map +1 -1
- 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 +19 -10
- package/dist/collection/components/table/demo/filtered/index.js +4 -3
- package/dist/collection/components/table/demo/filtered/index.js.map +1 -1
- package/dist/collection/components/table/demo/index.js +8 -2
- package/dist/collection/components/table/demo/index.js.map +1 -1
- package/dist/collection/components/table/demo/style.css +2 -0
- package/dist/collection/components/table/expandable/cell/index.js +14 -14
- package/dist/collection/components/table/expandable/cell/index.js.map +1 -1
- package/dist/collection/components/table/expandable/cell/style.css +32 -22
- package/dist/collection/components/table/expandable/row/index.js +9 -32
- 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 +13 -0
- package/dist/collection/components/table/header/style.css +2 -2
- 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/table/testing/data.js +28 -0
- package/dist/collection/components/table/testing/data.js.map +1 -0
- package/dist/collection/components/table/testing/index.js +28 -0
- package/dist/collection/components/table/testing/index.js.map +1 -0
- package/dist/collection/components/table/testing/style.css +22 -0
- 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/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 -3
- package/dist/collection/index.js.map +1 -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 +2 -2
- 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 +3 -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 +94 -34
- package/dist/custom-elements/index.js +5360 -16302
- package/dist/custom-elements/index.js.map +1 -1
- package/dist/esm/{Listenable-fb6f4723.js → Data-37e7c0b9.js} +75 -5
- package/dist/esm/Data-37e7c0b9.js.map +1 -0
- package/dist/esm/Observers-5f08e828.js +25 -0
- package/dist/esm/Observers-5f08e828.js.map +1 -0
- package/dist/esm/{getLanguage-cccb8418.js → getLanguage-5233a597.js} +1111 -890
- package/dist/esm/getLanguage-5233a597.js.map +1 -0
- package/dist/esm/{index-7b57a52c.js → index-c196715a.js} +12 -42
- package/dist/esm/index-c196715a.js.map +1 -0
- package/dist/esm/index.js +388 -6
- 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/redirect-b0f87e88.js +101 -0
- package/dist/esm/redirect-b0f87e88.js.map +1 -0
- package/dist/esm/smoothly-accordion_70.entry.js +17131 -0
- package/dist/esm/smoothly-accordion_70.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-color.entry.js +1 -1
- package/dist/esm/smoothly-country.entry.js +9 -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-radio-group.entry.js +1 -1
- package/dist/esm/smoothly-reorder.entry.js +2 -2
- package/dist/esm/smoothly-reorder.entry.js.map +1 -1
- package/dist/esm/smoothly-trigger-sink.entry.js +2 -2
- package/dist/esm/smoothly-trigger-source.entry.js +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-d4182274.entry.js → p-1efa3261.entry.js} +2 -2
- package/dist/smoothly/p-2a0c2387.js +2 -0
- package/dist/smoothly/p-2a0c2387.js.map +1 -0
- package/dist/smoothly/{p-e136b93e.entry.js → p-4d743f07.entry.js} +2 -2
- package/dist/smoothly/p-4ff439dd.entry.js +2 -0
- package/dist/smoothly/{p-5b28795c.entry.js.map → p-4ff439dd.entry.js.map} +1 -1
- package/dist/smoothly/{p-be2ff772.entry.js → p-5edb65c6.entry.js} +2 -2
- package/dist/smoothly/{p-c49d2094.entry.js → p-663ccbd0.entry.js} +2 -2
- package/dist/smoothly/p-73442332.entry.js +2 -0
- package/dist/smoothly/p-73442332.entry.js.map +1 -0
- package/dist/smoothly/{p-940af6d3.entry.js → p-9992c8c4.entry.js} +2 -2
- package/dist/smoothly/p-a6c4c2d4.entry.js +2 -0
- package/dist/smoothly/p-a6c4c2d4.entry.js.map +1 -0
- package/dist/smoothly/p-b9cb0514.js +2 -0
- package/dist/smoothly/p-b9cb0514.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-ce4e6f44.entry.js +2 -0
- package/dist/smoothly/p-ce4e6f44.entry.js.map +1 -0
- package/dist/smoothly/p-d0b8061e.js +3 -0
- package/dist/smoothly/p-d0b8061e.js.map +1 -0
- package/dist/smoothly/{p-79025273.entry.js → p-dbd1afa9.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-712b362e.entry.js → p-f96e41aa.entry.js} +2 -2
- package/dist/smoothly/p-ff8acb9b.entry.js +2 -0
- package/dist/smoothly/p-ff8acb9b.entry.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 +25 -0
- package/dist/types/components/app/room/index.d.ts +25 -0
- package/dist/types/components/app-demo/index.d.ts +2 -0
- package/dist/types/components/backtotop/index.d.ts +1 -1
- package/dist/types/components/burger/index.d.ts +15 -0
- package/dist/types/components/button/index.d.ts +2 -2
- package/dist/types/components/checkbox/index.d.ts +4 -2
- package/dist/types/components/display/index.d.ts +1 -0
- package/dist/types/components/filter/input/index.d.ts +1 -1
- package/dist/types/components/form/index.d.ts +16 -3
- package/dist/types/components/frame/index.d.ts +1 -1
- package/dist/types/components/icon/index.d.ts +3 -9
- package/dist/types/components/input/Changeable.d.ts +7 -0
- package/dist/types/components/input/Input.d.ts +10 -0
- package/dist/types/components/input/Looks.d.ts +1 -0
- package/dist/types/components/input/Submittable.d.ts +6 -0
- package/dist/types/components/input/clear/index.d.ts +17 -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 +8 -0
- package/dist/types/components/input/file/index.d.ts +24 -0
- package/dist/types/components/input/index.d.ts +17 -4
- package/dist/types/components/{input-month → input/month}/index.d.ts +1 -1
- package/dist/types/components/{selector → input/select}/index.d.ts +15 -3
- package/dist/types/components/notification/index.d.ts +3 -1
- package/dist/types/components/picker/demo/index.d.ts +18 -0
- package/dist/types/components/picker/index.d.ts +33 -45
- package/dist/types/components/picker/menu/index.d.ts +53 -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/radio/index.d.ts +1 -1
- package/dist/types/components/radio-button/index.d.ts +3 -5
- 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/index.d.ts +1 -1
- package/dist/types/components/table/expandable/cell/index.d.ts +4 -4
- package/dist/types/components/table/expandable/row/index.d.ts +3 -7
- 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/table/testing/data.d.ts +5 -0
- package/dist/types/components/table/testing/index.d.ts +4 -0
- package/dist/types/components/theme/color/index.d.ts +5 -0
- package/dist/types/components/theme/color/variant/index.d.ts +6 -0
- package/dist/types/components/theme/colors/index.d.ts +3 -0
- package/dist/types/components/toggle-switch/index.d.ts +7 -2
- package/dist/types/components/trigger-source/index.d.ts +1 -1
- package/dist/types/components.d.ts +490 -226
- 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 -4
- package/dist/types/model/Icon.d.ts +8 -0
- 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 +4 -1
- package/dist/types/model/redirect.d.ts +1 -0
- package/dist/types/smoothly.d.ts +3 -0
- package/package.json +16 -16
- package/dist/cjs/Listenable-63ea2d90.js.map +0 -1
- package/dist/cjs/getLanguage-430ecf04.js.map +0 -1
- package/dist/cjs/index-8352a4e0.js.map +0 -1
- package/dist/cjs/index-b282ee83.js +0 -865
- package/dist/cjs/index-b282ee83.js.map +0 -1
- package/dist/cjs/smoothly-accordion_61.cjs.entry.js +0 -28113
- package/dist/cjs/smoothly-accordion_61.cjs.entry.js.map +0 -1
- package/dist/collection/components/App.js +0 -71
- package/dist/collection/components/App.js.map +0 -1
- 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.map +0 -1
- package/dist/collection/components/input-date/style.css +0 -39
- 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-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/room/index.js +0 -90
- package/dist/collection/components/room/index.js.map +0 -1
- 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.map +0 -1
- package/dist/collection/components/selector/style.css +0 -46
- package/dist/esm/Listenable-fb6f4723.js.map +0 -1
- package/dist/esm/getLanguage-cccb8418.js.map +0 -1
- package/dist/esm/index-2e948fc3.js +0 -861
- package/dist/esm/index-2e948fc3.js.map +0 -1
- package/dist/esm/index-7b57a52c.js.map +0 -1
- package/dist/esm/smoothly-accordion_61.entry.js +0 -28049
- package/dist/esm/smoothly-accordion_61.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-21341e18.entry.js +0 -2
- package/dist/smoothly/p-21341e18.entry.js.map +0 -1
- package/dist/smoothly/p-5b28795c.entry.js +0 -2
- package/dist/smoothly/p-5b6351f6.js +0 -2
- package/dist/smoothly/p-5b6351f6.js.map +0 -1
- package/dist/smoothly/p-70280a11.js +0 -2
- package/dist/smoothly/p-70280a11.js.map +0 -1
- package/dist/smoothly/p-b49664d8.entry.js +0 -2
- package/dist/smoothly/p-b49664d8.entry.js.map +0 -1
- package/dist/smoothly/p-b82efb2e.entry.js +0 -2
- package/dist/smoothly/p-b82efb2e.entry.js.map +0 -1
- package/dist/smoothly/p-c88ae468.js +0 -3
- package/dist/smoothly/p-c88ae468.js.map +0 -1
- package/dist/types/components/App.d.ts +0 -5
- 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/room/index.d.ts +0 -7
- package/dist/types/components/select/index.d.ts +0 -14
- /package/dist/collection/components/{form → input}/Clearable.js +0 -0
- /package/dist/collection/components/{input-month → input/month}/style.css +0 -0
- /package/dist/collection/{components/form → model}/Data.js +0 -0
- /package/dist/smoothly/{p-d4182274.entry.js.map → p-1efa3261.entry.js.map} +0 -0
- /package/dist/smoothly/{p-e136b93e.entry.js.map → p-4d743f07.entry.js.map} +0 -0
- /package/dist/smoothly/{p-be2ff772.entry.js.map → p-5edb65c6.entry.js.map} +0 -0
- /package/dist/smoothly/{p-c49d2094.entry.js.map → p-663ccbd0.entry.js.map} +0 -0
- /package/dist/smoothly/{p-940af6d3.entry.js.map → p-9992c8c4.entry.js.map} +0 -0
- /package/dist/smoothly/{p-79025273.entry.js.map → p-dbd1afa9.entry.js.map} +0 -0
- /package/dist/smoothly/{p-712b362e.entry.js.map → p-f96e41aa.entry.js.map} +0 -0
- /package/dist/types/components/{form → input}/Clearable.d.ts +0 -0
- /package/dist/types/{components/form → model}/Data.d.ts +0 -0
|
@@ -14,8 +14,8 @@ export class SmoothlyAccordionItem {
|
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
const summary = this.
|
|
17
|
+
componentWillLoad() {
|
|
18
|
+
const summary = this.element.getElementsByTagName("summary");
|
|
19
19
|
if (summary.length > 0) {
|
|
20
20
|
const onClick = (e) => {
|
|
21
21
|
if (this.open)
|
|
@@ -27,10 +27,13 @@ export class SmoothlyAccordionItem {
|
|
|
27
27
|
summary[0].addEventListener("click", onClick);
|
|
28
28
|
summary[0].addEventListener("touch", onClick);
|
|
29
29
|
}
|
|
30
|
-
this.
|
|
30
|
+
this.smoothlyAccordionItemWillLoad.emit(parent => {
|
|
31
|
+
this.parent = parent;
|
|
32
|
+
});
|
|
31
33
|
}
|
|
32
34
|
disconnectedCallback() {
|
|
33
|
-
|
|
35
|
+
var _a;
|
|
36
|
+
(_a = this.parent) === null || _a === void 0 ? void 0 : _a.removeItem(this.element);
|
|
34
37
|
}
|
|
35
38
|
render() {
|
|
36
39
|
return (h("details", { open: this.open }, h("summary", null, this.open ? (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512" }, h("path", { d: "M256 48C141.6 48 48 141.6 48 256s93.6 208 208 208 208-93.6 208-208S370.4 48 256 48zm-42.7 318.9L106.7 260.3l29.9-29.9 76.8 76.8 162.1-162.1 29.9 29.9-192.1 191.9z" }))) : (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512" }, h("path", { d: "M256 48C141.601 48 48 141.601 48 256s93.601 208 208 208 208-93.601 208-208S370.399 48 256 48zm0 374.399c-91.518 0-166.399-74.882-166.399-166.399S164.482 89.6 256 89.6 422.4 164.482 422.4 256 347.518 422.399 256 422.399z" }))), this.name, typeof this.brand == "string" ? (h("span", { class: this.brand.toLowerCase() }, this.brand)) : Array.isArray(this.brand) ? (this.brand.map(b => h("span", { class: b.toLowerCase() }, b))) : ([])), h("fieldset", { disabled: !this.open, name: this.name }, h("slot", null))));
|
|
@@ -104,8 +107,8 @@ export class SmoothlyAccordionItem {
|
|
|
104
107
|
}
|
|
105
108
|
static get events() {
|
|
106
109
|
return [{
|
|
107
|
-
"method": "
|
|
108
|
-
"name": "
|
|
110
|
+
"method": "smoothlyAccordionItemWillLoad",
|
|
111
|
+
"name": "smoothlyAccordionItemWillLoad",
|
|
109
112
|
"bubbles": true,
|
|
110
113
|
"cancelable": true,
|
|
111
114
|
"composed": true,
|
|
@@ -114,24 +117,14 @@ export class SmoothlyAccordionItem {
|
|
|
114
117
|
"text": ""
|
|
115
118
|
},
|
|
116
119
|
"complexType": {
|
|
117
|
-
"original": "void",
|
|
118
|
-
"resolved": "void",
|
|
119
|
-
"references": {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
"cancelable": true,
|
|
126
|
-
"composed": true,
|
|
127
|
-
"docs": {
|
|
128
|
-
"tags": [],
|
|
129
|
-
"text": ""
|
|
130
|
-
},
|
|
131
|
-
"complexType": {
|
|
132
|
-
"original": "void",
|
|
133
|
-
"resolved": "void",
|
|
134
|
-
"references": {}
|
|
120
|
+
"original": "(parent: SmoothlyAccordion) => void",
|
|
121
|
+
"resolved": "(parent: SmoothlyAccordion) => void",
|
|
122
|
+
"references": {
|
|
123
|
+
"SmoothlyAccordion": {
|
|
124
|
+
"location": "import",
|
|
125
|
+
"path": "../accordion"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
135
128
|
}
|
|
136
129
|
}, {
|
|
137
130
|
"method": "smoothlyOpen",
|
|
@@ -165,7 +158,7 @@ export class SmoothlyAccordionItem {
|
|
|
165
158
|
}
|
|
166
159
|
}];
|
|
167
160
|
}
|
|
168
|
-
static get elementRef() { return "
|
|
161
|
+
static get elementRef() { return "element"; }
|
|
169
162
|
static get watchers() {
|
|
170
163
|
return [{
|
|
171
164
|
"propName": "open",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/accordion-item/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/accordion-item/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAQvF,MAAM,OAAO,qBAAqB;;;;;;EAUjC,WAAW,CAAC,SAAkB;IAC7B,IAAI,CAAC,IAAI,GAAG,SAAS,CAAA;IACrB,IAAI,SAAS,EAAE;MACd,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;QACtB,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,IAAI,CAAC,IAAI;OACf,CAAC,CAAA;KACF;EACF,CAAC;EACD,iBAAiB;IAChB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAA;IAC5D,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;MACvB,MAAM,OAAO,GAAG,CAAC,CAAU,EAAE,EAAE;QAC9B,IAAI,IAAI,CAAC,IAAI;UACZ,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IA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CAAC,WAAW,EAAE,IAAG,CAAC,CAAQ,CAAC,CAC7D,CAAC,CAAC,CAAC,CACH,EAAE,CACF,CACQ;MACV,gBAAU,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI;QAC9C,eAAQ,CACE,CACF,CACV,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Prop, Watch } from \"@stencil/core\"\nimport { SmoothlyAccordion } from \"../accordion\"\n\n@Component({\n\ttag: \"smoothly-accordion-item\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyAccordionItem {\n\t@Prop() name: string\n\t@Prop() brand?: string | string[]\n\t@Prop({ mutable: true, reflect: true }) open?: boolean\n\t@Element() element: HTMLSmoothlyAccordionItemElement\n\t@Event() smoothlyAccordionItemWillLoad!: EventEmitter<(parent: SmoothlyAccordion) => void>\n\t@Event() smoothlyOpen!: EventEmitter<{ name: string; open: boolean }>\n\t@Event() smoothlyClose!: EventEmitter<{ name: string; open: boolean }>\n\tprivate parent?: SmoothlyAccordion\n\t@Watch(\"open\")\n\topenChanged(isChecked: boolean) {\n\t\tthis.open = isChecked\n\t\tif (isChecked) {\n\t\t\tthis.smoothlyOpen.emit({\n\t\t\t\topen: true,\n\t\t\t\tname: this.name,\n\t\t\t})\n\t\t}\n\t}\n\tcomponentWillLoad() {\n\t\tconst summary = this.element.getElementsByTagName(\"summary\")\n\t\tif (summary.length > 0) {\n\t\t\tconst onClick = (e: UIEvent) => {\n\t\t\t\tif (this.open)\n\t\t\t\t\tthis.smoothlyClose.emit({ open: this.open, name: this.name })\n\t\t\t\telse\n\t\t\t\t\tthis.open = true\n\t\t\t\te.preventDefault()\n\t\t\t}\n\t\t\tsummary[0].addEventListener(\"click\", onClick)\n\t\t\tsummary[0].addEventListener(\"touch\", onClick)\n\t\t}\n\t\tthis.smoothlyAccordionItemWillLoad.emit(parent => {\n\t\t\tthis.parent = parent\n\t\t})\n\t}\n\tdisconnectedCallback() {\n\t\tthis.parent?.removeItem(this.element)\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<details open={this.open}>\n\t\t\t\t<summary>\n\t\t\t\t\t{this.open ? (\n\t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n\t\t\t\t\t\t\t<path d=\"M256 48C141.6 48 48 141.6 48 256s93.6 208 208 208 208-93.6 208-208S370.4 48 256 48zm-42.7 318.9L106.7 260.3l29.9-29.9 76.8 76.8 162.1-162.1 29.9 29.9-192.1 191.9z\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n\t\t\t\t\t\t\t<path d=\"M256 48C141.601 48 48 141.601 48 256s93.601 208 208 208 208-93.601 208-208S370.399 48 256 48zm0 374.399c-91.518 0-166.399-74.882-166.399-166.399S164.482 89.6 256 89.6 422.4 164.482 422.4 256 347.518 422.399 256 422.399z\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t)}\n\t\t\t\t\t{this.name}\n\t\t\t\t\t{typeof this.brand == \"string\" ? (\n\t\t\t\t\t\t<span class={this.brand.toLowerCase()}>{this.brand}</span>\n\t\t\t\t\t) : Array.isArray(this.brand) ? (\n\t\t\t\t\t\tthis.brand.map(b => <span class={b.toLowerCase()}>{b}</span>)\n\t\t\t\t\t) : (\n\t\t\t\t\t\t[]\n\t\t\t\t\t)}\n\t\t\t\t</summary>\n\t\t\t\t<fieldset disabled={!this.open} name={this.name}>\n\t\t\t\t\t<slot />\n\t\t\t\t</fieldset>\n\t\t\t</details>\n\t\t)\n\t}\n}\n"]}
|
|
@@ -1,10 +1,63 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export class SmoothlyApp {
|
|
3
3
|
constructor() {
|
|
4
|
+
this.rooms = {};
|
|
5
|
+
this.label = "App";
|
|
4
6
|
this.color = undefined;
|
|
7
|
+
this.menuOpen = false;
|
|
8
|
+
this.selected = undefined;
|
|
9
|
+
}
|
|
10
|
+
selectRoom(path) {
|
|
11
|
+
var _a;
|
|
12
|
+
(_a = this.rooms[path]) === null || _a === void 0 ? void 0 : _a.element.setSelected(true);
|
|
13
|
+
}
|
|
14
|
+
async selectedChanged() {
|
|
15
|
+
var _a;
|
|
16
|
+
Object.values(this.rooms).forEach(room => { var _a; return (room === null || room === void 0 ? void 0 : room.element.path) != ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.element.path) && (room === null || room === void 0 ? void 0 : room.element.setSelected(false)); });
|
|
17
|
+
const content = await ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.element.getContent());
|
|
18
|
+
if (this.mainElement && content) {
|
|
19
|
+
this.mainElement.innerHTML = "";
|
|
20
|
+
this.mainElement.appendChild(content);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
burgerVisibilityHandler(event) {
|
|
24
|
+
this.burgerVisibility = event.detail;
|
|
25
|
+
}
|
|
26
|
+
burgerStatusHandler(event) {
|
|
27
|
+
event.stopPropagation();
|
|
28
|
+
this.menuOpen = event.detail;
|
|
29
|
+
}
|
|
30
|
+
async locationChangeHandler(event) {
|
|
31
|
+
var _a;
|
|
32
|
+
(_a = this.rooms[event.state.smoothlyPath]) === null || _a === void 0 ? void 0 : _a.element.setSelected(true, { history: true });
|
|
33
|
+
}
|
|
34
|
+
roomSelectedHandler(event) {
|
|
35
|
+
this.selected = { element: event.target };
|
|
36
|
+
if (this.burgerVisibility)
|
|
37
|
+
this.menuOpen = false;
|
|
38
|
+
if (!event.detail.history) {
|
|
39
|
+
const path = this.selected.element.path.toString();
|
|
40
|
+
const location = new URL(window.location.pathname == path ? window.location.href : window.location.origin);
|
|
41
|
+
location.pathname = path;
|
|
42
|
+
window.history.pushState({ smoothlyPath: path }, "", location.href);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
roomLoadedHandler(event) {
|
|
46
|
+
const room = (this.rooms[event.target.path.toString()] = { element: event.target });
|
|
47
|
+
if (room.element.selected) {
|
|
48
|
+
this.selected = room;
|
|
49
|
+
window.history.replaceState({ smoothlyPath: room.element.path }, "", window.location.href);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
clickHandler(event) {
|
|
53
|
+
if (this.burgerVisibility)
|
|
54
|
+
if (event.composedPath().some(e => e == this.burgerElement || e == this.navElement))
|
|
55
|
+
!this.menuOpen;
|
|
56
|
+
else
|
|
57
|
+
this.menuOpen = false;
|
|
5
58
|
}
|
|
6
59
|
render() {
|
|
7
|
-
return (h("smoothly-notifier", null, h("slot", null)));
|
|
60
|
+
return (h("smoothly-notifier", null, h("header", { color: this.color }, h("h1", null, h("a", { href: "" }, this.label)), h("slot", { name: "header" }), h("nav", { ref: e => (this.navElement = e), class: { "menu-open": this.menuOpen } }, h("ul", null, h("div", { class: "nav-start-container" }, h("slot", { name: "nav-start" })), h("slot", null, " "), h("div", { class: "nav-end-container" }, h("slot", { name: "nav-end" })))), h("smoothly-burger", { ref: e => (this.burgerElement = e), open: this.menuOpen, onNavStatus: e => this.burgerStatusHandler(e), onVisibleStatus: e => this.burgerVisibilityHandler(e) })), h("main", { ref: e => (this.mainElement = e) })));
|
|
8
61
|
}
|
|
9
62
|
static get is() { return "smoothly-app"; }
|
|
10
63
|
static get originalStyleUrls() {
|
|
@@ -19,6 +72,24 @@ export class SmoothlyApp {
|
|
|
19
72
|
}
|
|
20
73
|
static get properties() {
|
|
21
74
|
return {
|
|
75
|
+
"label": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"mutable": false,
|
|
78
|
+
"complexType": {
|
|
79
|
+
"original": "string",
|
|
80
|
+
"resolved": "string",
|
|
81
|
+
"references": {}
|
|
82
|
+
},
|
|
83
|
+
"required": false,
|
|
84
|
+
"optional": false,
|
|
85
|
+
"docs": {
|
|
86
|
+
"tags": [],
|
|
87
|
+
"text": ""
|
|
88
|
+
},
|
|
89
|
+
"attribute": "label",
|
|
90
|
+
"reflect": false,
|
|
91
|
+
"defaultValue": "\"App\""
|
|
92
|
+
},
|
|
22
93
|
"color": {
|
|
23
94
|
"type": "string",
|
|
24
95
|
"mutable": false,
|
|
@@ -40,8 +111,83 @@ export class SmoothlyApp {
|
|
|
40
111
|
},
|
|
41
112
|
"attribute": "color",
|
|
42
113
|
"reflect": false
|
|
114
|
+
},
|
|
115
|
+
"menuOpen": {
|
|
116
|
+
"type": "boolean",
|
|
117
|
+
"mutable": true,
|
|
118
|
+
"complexType": {
|
|
119
|
+
"original": "boolean",
|
|
120
|
+
"resolved": "boolean",
|
|
121
|
+
"references": {}
|
|
122
|
+
},
|
|
123
|
+
"required": false,
|
|
124
|
+
"optional": false,
|
|
125
|
+
"docs": {
|
|
126
|
+
"tags": [],
|
|
127
|
+
"text": ""
|
|
128
|
+
},
|
|
129
|
+
"attribute": "menu-open",
|
|
130
|
+
"reflect": true,
|
|
131
|
+
"defaultValue": "false"
|
|
43
132
|
}
|
|
44
133
|
};
|
|
45
134
|
}
|
|
135
|
+
static get states() {
|
|
136
|
+
return {
|
|
137
|
+
"selected": {}
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
static get methods() {
|
|
141
|
+
return {
|
|
142
|
+
"selectRoom": {
|
|
143
|
+
"complexType": {
|
|
144
|
+
"signature": "(path: string) => Promise<void>",
|
|
145
|
+
"parameters": [{
|
|
146
|
+
"tags": [],
|
|
147
|
+
"text": ""
|
|
148
|
+
}],
|
|
149
|
+
"references": {},
|
|
150
|
+
"return": "Promise<void>"
|
|
151
|
+
},
|
|
152
|
+
"docs": {
|
|
153
|
+
"text": "",
|
|
154
|
+
"tags": []
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
static get watchers() {
|
|
160
|
+
return [{
|
|
161
|
+
"propName": "selected",
|
|
162
|
+
"methodName": "selectedChanged"
|
|
163
|
+
}];
|
|
164
|
+
}
|
|
165
|
+
static get listeners() {
|
|
166
|
+
return [{
|
|
167
|
+
"name": "popstate",
|
|
168
|
+
"method": "locationChangeHandler",
|
|
169
|
+
"target": "window",
|
|
170
|
+
"capture": false,
|
|
171
|
+
"passive": false
|
|
172
|
+
}, {
|
|
173
|
+
"name": "smoothlyRoomSelected",
|
|
174
|
+
"method": "roomSelectedHandler",
|
|
175
|
+
"target": undefined,
|
|
176
|
+
"capture": false,
|
|
177
|
+
"passive": false
|
|
178
|
+
}, {
|
|
179
|
+
"name": "smoothlyRoomLoaded",
|
|
180
|
+
"method": "roomLoadedHandler",
|
|
181
|
+
"target": undefined,
|
|
182
|
+
"capture": false,
|
|
183
|
+
"passive": false
|
|
184
|
+
}, {
|
|
185
|
+
"name": "click",
|
|
186
|
+
"method": "clickHandler",
|
|
187
|
+
"target": "window",
|
|
188
|
+
"capture": false,
|
|
189
|
+
"passive": false
|
|
190
|
+
}];
|
|
191
|
+
}
|
|
46
192
|
}
|
|
47
193
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/app/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/app/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAYhF,MAAM,OAAO,WAAW;;IASvB,UAAK,GAAqC,EAAE,CAAA;iBAR5B,KAAK;;oBAE8B,KAAK;;;EAQxD,UAAU,CAAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, h, Listen, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { SmoothlyAppRoomCustomEvent } from \"../../components\"\nimport { Color } from \"../../model\"\n\ntype Room = {\n\telement: HTMLSmoothlyAppRoomElement\n}\n@Component({\n\ttag: \"smoothly-app\",\n\tstyleUrl: \"style.css\",\n\tscoped: false,\n})\nexport class SmoothlyApp {\n\t@Prop() label = \"App\"\n\t@Prop() color: Color\n\t@Prop({ mutable: true, reflect: true }) menuOpen = false\n\t@State() selected?: Room\n\tprivate burgerVisibility: boolean\n\tprivate burgerElement?: HTMLElement\n\tprivate navElement?: HTMLElement\n\tmainElement?: HTMLElement\n\trooms: Record<string, Room | undefined> = {}\n\t@Method()\n\tselectRoom(path: string) {\n\t\tthis.rooms[path]?.element.setSelected(true)\n\t}\n\t@Watch(\"selected\")\n\tasync selectedChanged() {\n\t\tObject.values(this.rooms).forEach(\n\t\t\troom => room?.element.path != this.selected?.element.path && room?.element.setSelected(false)\n\t\t)\n\t\tconst content = await this.selected?.element.getContent()\n\t\tif (this.mainElement && content) {\n\t\t\tthis.mainElement.innerHTML = \"\"\n\t\t\tthis.mainElement.appendChild(content)\n\t\t}\n\t}\n\tburgerVisibilityHandler(event: CustomEvent<boolean>) {\n\t\tthis.burgerVisibility = event.detail\n\t}\n\tburgerStatusHandler(event: CustomEvent<boolean>) {\n\t\tevent.stopPropagation()\n\t\tthis.menuOpen = event.detail\n\t}\n\t@Listen(\"popstate\", { target: \"window\" })\n\tasync locationChangeHandler(event: PopStateEvent) {\n\t\tthis.rooms[event.state.smoothlyPath]?.element.setSelected(true, { history: true })\n\t}\n\t@Listen(\"smoothlyRoomSelected\")\n\troomSelectedHandler(event: SmoothlyAppRoomCustomEvent<{ history: boolean }>) {\n\t\tthis.selected = { element: event.target }\n\t\tif (this.burgerVisibility)\n\t\t\tthis.menuOpen = false\n\t\tif (!event.detail.history) {\n\t\t\tconst path = this.selected.element.path.toString()\n\t\t\tconst location = new URL(window.location.pathname == path ? window.location.href : window.location.origin)\n\t\t\tlocation.pathname = path\n\t\t\twindow.history.pushState({ smoothlyPath: path }, \"\", location.href)\n\t\t}\n\t}\n\t@Listen(\"smoothlyRoomLoaded\")\n\troomLoadedHandler(event: SmoothlyAppRoomCustomEvent<{ selected: boolean }>) {\n\t\tconst room = (this.rooms[event.target.path.toString()] = { element: event.target })\n\t\tif (room.element.selected) {\n\t\t\tthis.selected = room\n\t\t\twindow.history.replaceState({ smoothlyPath: room.element.path }, \"\", window.location.href)\n\t\t}\n\t}\n\t@Listen(\"click\", { target: \"window\" })\n\tclickHandler(event: MouseEvent) {\n\t\tif (this.burgerVisibility)\n\t\t\tif (event.composedPath().some(e => e == this.burgerElement || e == this.navElement))\n\t\t\t\t!this.menuOpen\n\t\t\telse\n\t\t\t\tthis.menuOpen = false\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<smoothly-notifier>\n\t\t\t\t<header color={this.color}>\n\t\t\t\t\t<h1>\n\t\t\t\t\t\t<a href={\"\"}>{this.label}</a>\n\t\t\t\t\t</h1>\n\t\t\t\t\t<slot name=\"header\"></slot>\n\t\t\t\t\t<nav ref={e => (this.navElement = e)} class={{ \"menu-open\": this.menuOpen }}>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<div class={\"nav-start-container\"}>\n\t\t\t\t\t\t\t\t<slot name=\"nav-start\"></slot>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<slot> </slot>\n\t\t\t\t\t\t\t<div class={\"nav-end-container\"}>\n\t\t\t\t\t\t\t\t<slot name=\"nav-end\"></slot>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</nav>\n\t\t\t\t\t<smoothly-burger\n\t\t\t\t\t\tref={e => (this.burgerElement = e)}\n\t\t\t\t\t\topen={this.menuOpen}\n\t\t\t\t\t\tonNavStatus={e => this.burgerStatusHandler(e)}\n\t\t\t\t\t\tonVisibleStatus={e => this.burgerVisibilityHandler(e)}\n\t\t\t\t\t/>\n\t\t\t\t</header>\n\t\t\t\t<main ref={e => (this.mainElement = e)}></main>\n\t\t\t</smoothly-notifier>\n\t\t)\n\t}\n}\n"]}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
export class SmoothlyAppRoom {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.label = undefined;
|
|
6
|
+
this.icon = undefined;
|
|
7
|
+
this.disabled = undefined;
|
|
8
|
+
this.path = "";
|
|
9
|
+
this.to = undefined;
|
|
10
|
+
this.selected = undefined;
|
|
11
|
+
}
|
|
12
|
+
componentWillLoad() {
|
|
13
|
+
this.selected = (typeof this.path == "string" ? new URLPattern({ pathname: this.path }) : this.path).test(window.location);
|
|
14
|
+
this.smoothlyRoomLoaded.emit({ selected: this.selected });
|
|
15
|
+
}
|
|
16
|
+
async getContent() {
|
|
17
|
+
return this.contentElement;
|
|
18
|
+
}
|
|
19
|
+
async setSelected(selected, options) {
|
|
20
|
+
this.selected = selected;
|
|
21
|
+
if (selected)
|
|
22
|
+
this.smoothlyRoomSelected.emit({ history: !!(options === null || options === void 0 ? void 0 : options.history) });
|
|
23
|
+
}
|
|
24
|
+
clickHandler(event) {
|
|
25
|
+
if (!event.metaKey && !event.ctrlKey && event.which != 2 && event.button != 1) {
|
|
26
|
+
event.preventDefault();
|
|
27
|
+
this.setSelected(true);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return (h(Host, null, h("li", null, h("a", { href: typeof this.path == "string" ? this.path : this.path.pathname, onClick: e => this.clickHandler(e) }, this.icon ? h("smoothly-icon", { name: this.icon, toolTip: this.label }) : this.label)), h("main", { ref: e => (this.contentElement = e) }, h("slot", null))));
|
|
32
|
+
}
|
|
33
|
+
static get is() { return "smoothly-app-room"; }
|
|
34
|
+
static get encapsulation() { return "scoped"; }
|
|
35
|
+
static get originalStyleUrls() {
|
|
36
|
+
return {
|
|
37
|
+
"$": ["style.css"]
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
static get styleUrls() {
|
|
41
|
+
return {
|
|
42
|
+
"$": ["style.css"]
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
static get properties() {
|
|
46
|
+
return {
|
|
47
|
+
"label": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"mutable": false,
|
|
50
|
+
"complexType": {
|
|
51
|
+
"original": "string",
|
|
52
|
+
"resolved": "string | undefined",
|
|
53
|
+
"references": {}
|
|
54
|
+
},
|
|
55
|
+
"required": false,
|
|
56
|
+
"optional": true,
|
|
57
|
+
"docs": {
|
|
58
|
+
"tags": [],
|
|
59
|
+
"text": ""
|
|
60
|
+
},
|
|
61
|
+
"attribute": "label",
|
|
62
|
+
"reflect": true
|
|
63
|
+
},
|
|
64
|
+
"icon": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"mutable": false,
|
|
67
|
+
"complexType": {
|
|
68
|
+
"original": "Icon",
|
|
69
|
+
"resolved": "Icon | undefined",
|
|
70
|
+
"references": {
|
|
71
|
+
"Icon": {
|
|
72
|
+
"location": "import",
|
|
73
|
+
"path": "../../../model"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"required": false,
|
|
78
|
+
"optional": true,
|
|
79
|
+
"docs": {
|
|
80
|
+
"tags": [],
|
|
81
|
+
"text": ""
|
|
82
|
+
},
|
|
83
|
+
"attribute": "icon",
|
|
84
|
+
"reflect": true
|
|
85
|
+
},
|
|
86
|
+
"disabled": {
|
|
87
|
+
"type": "boolean",
|
|
88
|
+
"mutable": false,
|
|
89
|
+
"complexType": {
|
|
90
|
+
"original": "boolean",
|
|
91
|
+
"resolved": "boolean",
|
|
92
|
+
"references": {}
|
|
93
|
+
},
|
|
94
|
+
"required": false,
|
|
95
|
+
"optional": false,
|
|
96
|
+
"docs": {
|
|
97
|
+
"tags": [],
|
|
98
|
+
"text": ""
|
|
99
|
+
},
|
|
100
|
+
"attribute": "disabled",
|
|
101
|
+
"reflect": true
|
|
102
|
+
},
|
|
103
|
+
"path": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"mutable": false,
|
|
106
|
+
"complexType": {
|
|
107
|
+
"original": "string | URLPattern",
|
|
108
|
+
"resolved": "URLPattern | string",
|
|
109
|
+
"references": {
|
|
110
|
+
"URLPattern": {
|
|
111
|
+
"location": "global"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"required": false,
|
|
116
|
+
"optional": false,
|
|
117
|
+
"docs": {
|
|
118
|
+
"tags": [],
|
|
119
|
+
"text": ""
|
|
120
|
+
},
|
|
121
|
+
"attribute": "path",
|
|
122
|
+
"reflect": false,
|
|
123
|
+
"defaultValue": "\"\""
|
|
124
|
+
},
|
|
125
|
+
"to": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"mutable": false,
|
|
128
|
+
"complexType": {
|
|
129
|
+
"original": "string",
|
|
130
|
+
"resolved": "string | undefined",
|
|
131
|
+
"references": {}
|
|
132
|
+
},
|
|
133
|
+
"required": false,
|
|
134
|
+
"optional": true,
|
|
135
|
+
"docs": {
|
|
136
|
+
"tags": [],
|
|
137
|
+
"text": ""
|
|
138
|
+
},
|
|
139
|
+
"attribute": "to",
|
|
140
|
+
"reflect": false
|
|
141
|
+
},
|
|
142
|
+
"selected": {
|
|
143
|
+
"type": "boolean",
|
|
144
|
+
"mutable": true,
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "boolean",
|
|
147
|
+
"resolved": "boolean | undefined",
|
|
148
|
+
"references": {}
|
|
149
|
+
},
|
|
150
|
+
"required": false,
|
|
151
|
+
"optional": true,
|
|
152
|
+
"docs": {
|
|
153
|
+
"tags": [],
|
|
154
|
+
"text": ""
|
|
155
|
+
},
|
|
156
|
+
"attribute": "selected",
|
|
157
|
+
"reflect": true
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
static get events() {
|
|
162
|
+
return [{
|
|
163
|
+
"method": "smoothlyRoomSelected",
|
|
164
|
+
"name": "smoothlyRoomSelected",
|
|
165
|
+
"bubbles": true,
|
|
166
|
+
"cancelable": true,
|
|
167
|
+
"composed": true,
|
|
168
|
+
"docs": {
|
|
169
|
+
"tags": [],
|
|
170
|
+
"text": ""
|
|
171
|
+
},
|
|
172
|
+
"complexType": {
|
|
173
|
+
"original": "{ history: boolean }",
|
|
174
|
+
"resolved": "{ history: boolean; }",
|
|
175
|
+
"references": {}
|
|
176
|
+
}
|
|
177
|
+
}, {
|
|
178
|
+
"method": "smoothlyRoomLoaded",
|
|
179
|
+
"name": "smoothlyRoomLoaded",
|
|
180
|
+
"bubbles": true,
|
|
181
|
+
"cancelable": true,
|
|
182
|
+
"composed": true,
|
|
183
|
+
"docs": {
|
|
184
|
+
"tags": [],
|
|
185
|
+
"text": ""
|
|
186
|
+
},
|
|
187
|
+
"complexType": {
|
|
188
|
+
"original": "{ selected: boolean }",
|
|
189
|
+
"resolved": "{ selected: boolean; }",
|
|
190
|
+
"references": {}
|
|
191
|
+
}
|
|
192
|
+
}];
|
|
193
|
+
}
|
|
194
|
+
static get methods() {
|
|
195
|
+
return {
|
|
196
|
+
"getContent": {
|
|
197
|
+
"complexType": {
|
|
198
|
+
"signature": "() => Promise<HTMLElement | undefined>",
|
|
199
|
+
"parameters": [],
|
|
200
|
+
"references": {
|
|
201
|
+
"Promise": {
|
|
202
|
+
"location": "global"
|
|
203
|
+
},
|
|
204
|
+
"HTMLElement": {
|
|
205
|
+
"location": "global"
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"return": "Promise<HTMLElement | undefined>"
|
|
209
|
+
},
|
|
210
|
+
"docs": {
|
|
211
|
+
"text": "",
|
|
212
|
+
"tags": []
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"setSelected": {
|
|
216
|
+
"complexType": {
|
|
217
|
+
"signature": "(selected: boolean, options?: { history?: boolean; }) => Promise<void>",
|
|
218
|
+
"parameters": [{
|
|
219
|
+
"tags": [],
|
|
220
|
+
"text": ""
|
|
221
|
+
}, {
|
|
222
|
+
"tags": [],
|
|
223
|
+
"text": ""
|
|
224
|
+
}],
|
|
225
|
+
"references": {
|
|
226
|
+
"Promise": {
|
|
227
|
+
"location": "global"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"return": "Promise<void>"
|
|
231
|
+
},
|
|
232
|
+
"docs": {
|
|
233
|
+
"text": "",
|
|
234
|
+
"tags": []
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/app/room/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACrF,OAAO,qBAAqB,CAAA;AAQ5B,MAAM,OAAO,eAAe;;;;;gBAIS,EAAE;;;;EAOtC,iBAAiB;IAChB,IAAI,CAAC,QAAQ,GAAG,CAAC,OAAO,IAAI,CAAC,IAAI,IAAI,QAAQ,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CACxG,MAAM,CAAC,QAAQ,CACf,CAAA;IACD,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAA;EAC1D,CAAC;EAGD,KAAK,CAAC,UAAU;IACf,OAAO,IAAI,CAAC,cAAc,CAAA;EAC3B,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Event, EventEmitter, h, Host, Method, Prop } from \"@stencil/core\"\nimport \"urlpattern-polyfill\"\nimport { Icon } from \"../../../model\"\n\n@Component({\n\ttag: \"smoothly-app-room\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyAppRoom {\n\t@Prop({ reflect: true }) label?: string\n\t@Prop({ reflect: true }) icon?: Icon\n\t@Prop({ reflect: true }) disabled: boolean\n\t@Prop() path: string | URLPattern = \"\"\n\t@Prop() to?: string\n\t@Prop({ reflect: true, mutable: true }) selected?: boolean\n\t@Event() smoothlyRoomSelected: EventEmitter<{ history: boolean }>\n\t@Event() smoothlyRoomLoaded: EventEmitter<{ selected: boolean }>\n\tprivate contentElement?: HTMLElement\n\n\tcomponentWillLoad() {\n\t\tthis.selected = (typeof this.path == \"string\" ? new URLPattern({ pathname: this.path }) : this.path).test(\n\t\t\twindow.location\n\t\t)\n\t\tthis.smoothlyRoomLoaded.emit({ selected: this.selected })\n\t}\n\n\t@Method()\n\tasync getContent(): Promise<HTMLElement | undefined> {\n\t\treturn this.contentElement\n\t}\n\t@Method()\n\tasync setSelected(selected: boolean, options?: { history?: boolean }): Promise<void> {\n\t\tthis.selected = selected\n\t\tif (selected)\n\t\t\tthis.smoothlyRoomSelected.emit({ history: !!options?.history })\n\t}\n\n\tclickHandler(event: MouseEvent) {\n\t\tif (!event.metaKey && !event.ctrlKey && event.which != 2 && event.button != 1) {\n\t\t\tevent.preventDefault()\n\t\t\tthis.setSelected(true)\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<li>\n\t\t\t\t\t<a href={typeof this.path == \"string\" ? this.path : this.path.pathname} onClick={e => this.clickHandler(e)}>\n\t\t\t\t\t\t{this.icon ? <smoothly-icon name={this.icon} toolTip={this.label}></smoothly-icon> : this.label}\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t\t<main ref={e => (this.contentElement = e)}>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</main>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
text-align: center;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:not(:host[label], :host[icon]),
|
|
9
|
+
:host[disabled] {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:host>main {
|
|
14
|
+
display: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:host>li {
|
|
18
|
+
height: 100%;
|
|
19
|
+
list-style: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:host>li>a {
|
|
23
|
+
padding: 0 1.5em;
|
|
24
|
+
height: 100%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host[selected]>li>a {
|
|
28
|
+
display: flex;
|
|
29
|
+
color: rgb(var(--smoothly-color-contrast));
|
|
30
|
+
background: rgb(var(--smoothly-color-shade));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:host:hover>li>a {
|
|
34
|
+
color: rgb(var(--smoothly-color-contrast));
|
|
35
|
+
background-color: rgb(var(--smoothly-color-tint));
|
|
36
|
+
transition: 0.2s;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host>li>a>smoothly-icon {
|
|
40
|
+
align-self: inherit;
|
|
41
|
+
margin-bottom: 1em;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@media screen and (max-width: 900px) {
|
|
45
|
+
:host>li>a {
|
|
46
|
+
padding: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:host>li>a {
|
|
50
|
+
margin-left: -1.5rem;
|
|
51
|
+
margin-right: -1.5rem;
|
|
52
|
+
padding-left: 1.5rem;
|
|
53
|
+
padding-right: 1.5rem;
|
|
54
|
+
}
|
|
55
|
+
}
|