smoothly 0.3.38 → 1.0.0-alpha.10
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/GoogleFont-6c4f0da1.js +2 -0
- package/dist/cjs/GoogleFont-6c4f0da1.js.map +1 -0
- package/dist/cjs/Listenable-c8d2f8ef.js +2 -0
- package/dist/cjs/Listenable-c8d2f8ef.js.map +1 -0
- package/dist/cjs/getLanguage-430ecf04.js +2 -0
- package/dist/cjs/getLanguage-430ecf04.js.map +1 -0
- package/dist/cjs/{index-de46f836.js → index-8352a4e0.js} +106 -1
- package/dist/cjs/index-8352a4e0.js.map +1 -0
- package/dist/cjs/{index-879bbabb.js → index-b282ee83.js} +3 -1
- package/dist/cjs/index-b282ee83.js.map +1 -0
- package/dist/cjs/index.cjs.js +4 -2
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +6 -3
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/{smoothly-accordion_53.cjs.entry.js → smoothly-accordion_60.cjs.entry.js} +5430 -460
- package/dist/cjs/smoothly-accordion_60.cjs.entry.js.map +1 -0
- package/dist/cjs/smoothly-address-display.cjs.entry.js +32 -0
- package/dist/cjs/smoothly-address-display.cjs.entry.js.map +1 -0
- package/dist/cjs/smoothly-address.cjs.entry.js +23 -0
- package/dist/cjs/smoothly-address.cjs.entry.js.map +1 -0
- package/dist/cjs/smoothly-addresses.cjs.entry.js +23 -0
- package/dist/cjs/smoothly-addresses.cjs.entry.js.map +1 -0
- package/dist/cjs/smoothly-color.cjs.entry.js +22 -0
- package/dist/cjs/smoothly-color.cjs.entry.js.map +1 -0
- package/dist/cjs/smoothly-country.cjs.entry.js +3 -1
- package/dist/cjs/smoothly-country.cjs.entry.js.map +1 -0
- package/dist/cjs/smoothly-google-font.cjs.entry.js +3 -1
- package/dist/cjs/smoothly-google-font.cjs.entry.js.map +1 -0
- package/dist/cjs/smoothly-radio-group.cjs.entry.js +3 -1
- package/dist/cjs/smoothly-radio-group.cjs.entry.js.map +1 -0
- package/dist/cjs/smoothly-reorder.cjs.entry.js +3 -1
- package/dist/cjs/smoothly-reorder.cjs.entry.js.map +1 -0
- package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +3 -1
- package/dist/cjs/smoothly-trigger-sink.cjs.entry.js.map +1 -0
- package/dist/cjs/smoothly-trigger-source.cjs.entry.js +3 -1
- package/dist/cjs/smoothly-trigger-source.cjs.entry.js.map +1 -0
- package/dist/cjs/smoothly.cjs.js +9 -3
- package/dist/cjs/smoothly.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +12 -1
- package/dist/collection/components/App.js +1 -0
- package/dist/collection/components/App.js.map +1 -0
- package/dist/collection/components/Button.js +5 -0
- package/dist/collection/components/Button.js.map +1 -0
- package/dist/collection/components/accordion/index.js +1 -0
- package/dist/collection/components/accordion/index.js.map +1 -0
- package/dist/collection/components/accordion-item/index.js +1 -0
- package/dist/collection/components/accordion-item/index.js.map +1 -0
- package/dist/collection/components/address/index.js +65 -0
- package/dist/collection/components/address/index.js.map +1 -0
- package/dist/collection/components/address/style.css +4 -0
- package/dist/collection/components/address-display/index.js +72 -0
- package/dist/collection/components/address-display/index.js.map +1 -0
- package/dist/collection/components/address-display/style.css +4 -0
- package/dist/collection/components/addresses/index.js +62 -0
- package/dist/collection/components/addresses/index.js.map +1 -0
- package/dist/collection/components/addresses/style.css +4 -0
- package/dist/collection/components/app/index.js +1 -0
- package/dist/collection/components/app/index.js.map +1 -0
- package/dist/collection/components/app-demo/index.js +1 -0
- package/dist/collection/components/app-demo/index.js.map +1 -0
- package/dist/collection/components/backtotop/index.js +1 -0
- package/dist/collection/components/backtotop/index.js.map +1 -0
- package/dist/collection/components/button/index.js +50 -26
- package/dist/collection/components/button/index.js.map +1 -0
- package/dist/collection/components/button/style.css +184 -31
- package/dist/collection/components/calendar/generate.js +1 -0
- package/dist/collection/components/calendar/generate.js.map +1 -0
- package/dist/collection/components/calendar/index.js +25 -46
- package/dist/collection/components/calendar/index.js.map +1 -0
- package/dist/collection/components/calendar/style.css +8 -12
- package/dist/collection/components/checkbox/index.js +90 -41
- package/dist/collection/components/checkbox/index.js.map +1 -0
- package/dist/collection/components/checkbox/style.css +56 -9
- package/dist/collection/components/checkbox/translation/index.js +1 -0
- package/dist/collection/components/checkbox/translation/index.js.map +1 -0
- package/dist/collection/components/checkbox/translation/sv.js +1 -0
- package/dist/collection/components/checkbox/translation/sv.js.map +1 -0
- package/dist/collection/components/color/index.js +48 -0
- package/dist/collection/components/color/index.js.map +1 -0
- package/dist/collection/components/color/style.css +69 -0
- package/dist/collection/components/country/index.js +1 -0
- package/dist/collection/components/country/index.js.map +1 -0
- package/dist/collection/components/dialog/index.js +1 -0
- package/dist/collection/components/dialog/index.js.map +1 -0
- package/dist/collection/components/dialog-demo/index.js +1 -0
- package/dist/collection/components/dialog-demo/index.js.map +1 -0
- package/dist/collection/components/display/index.js +1 -0
- package/dist/collection/components/display/index.js.map +1 -0
- package/dist/collection/components/display-amount/index.js +1 -0
- package/dist/collection/components/display-amount/index.js.map +1 -0
- package/dist/collection/components/display-date-time/index.js +1 -0
- package/dist/collection/components/display-date-time/index.js.map +1 -0
- package/dist/collection/components/display-demo/index.js +2 -1
- package/dist/collection/components/display-demo/index.js.map +1 -0
- package/dist/collection/components/filter/Clearable.js +8 -0
- package/dist/collection/components/filter/Clearable.js.map +1 -0
- package/dist/collection/components/filter/index.js +186 -0
- package/dist/collection/components/filter/index.js.map +1 -0
- package/dist/collection/components/filter/input/index.js +376 -0
- package/dist/collection/components/filter/input/index.js.map +1 -0
- package/dist/collection/components/filter/input/style.css +5 -0
- package/dist/collection/components/filter/style.css +106 -0
- package/dist/collection/components/form/Clearable.js +8 -0
- package/dist/collection/components/form/Clearable.js.map +1 -0
- package/dist/collection/components/form/Data.js +15 -0
- package/dist/collection/components/form/Data.js.map +1 -0
- package/dist/collection/components/form/index.js +251 -0
- package/dist/collection/components/form/index.js.map +1 -0
- package/dist/collection/components/form/style.css +50 -0
- package/dist/collection/components/frame/index.js +13 -9
- package/dist/collection/components/frame/index.js.map +1 -0
- package/dist/collection/components/google-font/index.js +1 -0
- package/dist/collection/components/google-font/index.js.map +1 -0
- package/dist/collection/components/icon/index.js +7 -1
- package/dist/collection/components/icon/index.js.map +1 -0
- package/dist/collection/components/icon-demo/index.js +1 -0
- package/dist/collection/components/icon-demo/index.js.map +1 -0
- package/dist/collection/components/input/index.js +38 -10
- package/dist/collection/components/input/index.js.map +1 -0
- package/dist/collection/components/input/style.css +11 -6
- package/dist/collection/components/input-date/index.js +3 -26
- package/dist/collection/components/input-date/index.js.map +1 -0
- package/dist/collection/components/input-date/style.css +4 -4
- package/dist/collection/components/input-date-range/index.js +1 -0
- package/dist/collection/components/input-date-range/index.js.map +1 -0
- package/dist/collection/components/input-demo/index.js +38 -1
- package/dist/collection/components/input-demo/index.js.map +1 -0
- package/dist/collection/components/input-demo/style.css +4 -0
- package/dist/collection/components/input-month/index.js +1 -0
- package/dist/collection/components/input-month/index.js.map +1 -0
- package/dist/collection/components/item/index.js +1 -0
- package/dist/collection/components/item/index.js.map +1 -0
- package/dist/collection/components/menu-options/index.js +1 -0
- package/dist/collection/components/menu-options/index.js.map +1 -0
- package/dist/collection/components/notification/index.js +1 -0
- package/dist/collection/components/notification/index.js.map +1 -0
- package/dist/collection/components/notifier/index.js +1 -0
- package/dist/collection/components/notifier/index.js.map +1 -0
- package/dist/collection/components/option/index.js +1 -0
- package/dist/collection/components/option/index.js.map +1 -0
- package/dist/collection/components/picker/index.js +1 -0
- package/dist/collection/components/picker/index.js.map +1 -0
- package/dist/collection/components/popup/index.js +1 -0
- package/dist/collection/components/popup/index.js.map +1 -0
- package/dist/collection/components/quiet/index.js +1 -0
- package/dist/collection/components/quiet/index.js.map +1 -0
- package/dist/collection/components/radio/index.js +1 -0
- package/dist/collection/components/radio/index.js.map +1 -0
- package/dist/collection/components/radio/style.css +1 -1
- package/dist/collection/components/radio-button/Selected.js +1 -0
- package/dist/collection/components/radio-button/Selected.js.map +1 -0
- package/dist/collection/components/radio-button/index.js +1 -0
- package/dist/collection/components/radio-button/index.js.map +1 -0
- package/dist/collection/components/radio-button/item/index.js +6 -6
- package/dist/collection/components/radio-button/item/index.js.map +1 -0
- package/dist/collection/components/radio-button/item/style.css +4 -19
- package/dist/collection/components/radio-group/index.js +1 -0
- package/dist/collection/components/radio-group/index.js.map +1 -0
- package/dist/collection/components/reorder/Draggable.js +1 -0
- package/dist/collection/components/reorder/Draggable.js.map +1 -0
- package/dist/collection/components/reorder/Dragged.js +1 -0
- package/dist/collection/components/reorder/Dragged.js.map +1 -0
- package/dist/collection/components/reorder/index.js +1 -0
- package/dist/collection/components/reorder/index.js.map +1 -0
- package/dist/collection/components/room/index.js +1 -0
- package/dist/collection/components/room/index.js.map +1 -0
- package/dist/collection/components/select/index.js +1 -0
- package/dist/collection/components/select/index.js.map +1 -0
- package/dist/collection/components/select-demo/index.js +1 -1
- package/dist/collection/components/select-demo/index.js.map +1 -0
- package/dist/collection/components/selector/index.js +1 -0
- package/dist/collection/components/selector/index.js.map +1 -0
- package/dist/collection/components/skeleton/index.js +1 -0
- package/dist/collection/components/skeleton/index.js.map +1 -0
- package/dist/collection/components/spinner/index.js +1 -0
- package/dist/collection/components/spinner/index.js.map +1 -0
- package/dist/collection/components/submit/index.js +59 -116
- package/dist/collection/components/submit/index.js.map +1 -0
- package/dist/collection/components/summary/index.js +92 -0
- package/dist/collection/components/summary/index.js.map +1 -0
- package/dist/collection/components/summary/style.css +31 -0
- package/dist/collection/components/svg/index.js +1 -0
- package/dist/collection/components/svg/index.js.map +1 -0
- package/dist/collection/components/tab/index.js +1 -0
- package/dist/collection/components/tab/index.js.map +1 -0
- package/dist/collection/components/tab-switch/index.js +1 -0
- package/dist/collection/components/tab-switch/index.js.map +1 -0
- package/dist/collection/components/table/Selector.js +44 -0
- package/dist/collection/components/table/Selector.js.map +1 -0
- package/dist/collection/components/table/cell/index.js +1 -0
- package/dist/collection/components/table/cell/index.js.map +1 -0
- package/dist/collection/components/table/cell/style.css +10 -0
- package/dist/collection/components/table/demo/filtered/Root.js +2 -0
- package/dist/collection/components/table/demo/filtered/Root.js.map +1 -0
- package/dist/collection/components/table/demo/filtered/index.js +66 -0
- package/dist/collection/components/table/demo/filtered/index.js.map +1 -0
- package/dist/collection/components/table/demo/filtered/style.css +3 -0
- package/dist/collection/components/table/demo/index.js +4 -1
- package/dist/collection/components/table/demo/index.js.map +1 -0
- package/dist/collection/components/table/expandable/cell/index.js +1 -5
- package/dist/collection/components/table/expandable/cell/index.js.map +1 -0
- package/dist/collection/components/table/expandable/cell/style.css +10 -0
- package/dist/collection/components/table/expandable/row/index.js +1 -0
- package/dist/collection/components/table/expandable/row/index.js.map +1 -0
- package/dist/collection/components/table/header/index.js +1 -0
- package/dist/collection/components/table/header/index.js.map +1 -0
- package/dist/collection/components/table/header/style.css +11 -0
- package/dist/collection/components/table/index.js +20 -0
- package/dist/collection/components/table/index.js.map +1 -0
- package/dist/collection/components/table/row/index.js +1 -0
- package/dist/collection/components/table/row/index.js.map +1 -0
- package/dist/collection/components/toggle/style.css +36 -0
- package/dist/collection/components/toggle/toggle.js +129 -0
- package/dist/collection/components/toggle/toggle.js.map +1 -0
- package/dist/collection/components/toggle-switch/index.js +118 -0
- package/dist/collection/components/toggle-switch/index.js.map +1 -0
- package/dist/collection/components/toggle-switch/style.css +56 -0
- package/dist/collection/components/trigger/index.js +1 -23
- package/dist/collection/components/trigger/index.js.map +1 -0
- package/dist/collection/components/trigger/style.css +2 -2
- package/dist/collection/components/trigger-sink/index.js +1 -0
- package/dist/collection/components/trigger-sink/index.js.map +1 -0
- package/dist/collection/components/trigger-source/index.js +1 -0
- package/dist/collection/components/trigger-source/index.js.map +1 -0
- package/dist/collection/components/tuple/index.js +1 -0
- package/dist/collection/components/tuple/index.js.map +1 -0
- package/dist/collection/components/urlencoded/index.js +1 -0
- package/dist/collection/components/urlencoded/index.js.map +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/model/Autocomplete.js +1 -0
- package/dist/collection/model/Autocomplete.js.map +1 -0
- package/dist/collection/model/ClientIdentifier.js +1 -0
- package/dist/collection/model/ClientIdentifier.js.map +1 -0
- package/dist/collection/model/Color.js +1 -0
- package/dist/collection/model/Color.js.map +1 -0
- package/dist/collection/model/Fill.js +1 -0
- package/dist/collection/model/Fill.js.map +1 -0
- package/dist/collection/model/GoogleFont.js +1 -0
- package/dist/collection/model/GoogleFont.js.map +1 -0
- package/dist/collection/model/Listenable.js +1 -0
- package/dist/collection/model/Listenable.js.map +1 -0
- package/dist/collection/model/Message.js +1 -0
- package/dist/collection/model/Message.js.map +1 -0
- package/dist/collection/model/Notice.js +1 -0
- package/dist/collection/model/Notice.js.map +1 -0
- package/dist/collection/model/Option.js +1 -0
- package/dist/collection/model/Option.js.map +1 -0
- package/dist/collection/model/Trigger.js +1 -0
- package/dist/collection/model/Trigger.js.map +1 -0
- package/dist/collection/model/index.js +1 -0
- package/dist/collection/model/index.js.map +1 -0
- package/dist/collection/utilities/Cosmetic/Color/CommaRgb.js +1 -0
- package/dist/collection/utilities/Cosmetic/Color/CommaRgb.js.map +1 -0
- package/dist/collection/utilities/Cosmetic/Color/Hex.js +1 -0
- package/dist/collection/utilities/Cosmetic/Color/Hex.js.map +1 -0
- package/dist/collection/utilities/Cosmetic/Color/Hsl.js +1 -0
- package/dist/collection/utilities/Cosmetic/Color/Hsl.js.map +1 -0
- package/dist/collection/utilities/Cosmetic/Color/Name.js +1 -0
- package/dist/collection/utilities/Cosmetic/Color/Name.js.map +1 -0
- package/dist/collection/utilities/Cosmetic/Color/Rgb.js +1 -0
- package/dist/collection/utilities/Cosmetic/Color/Rgb.js.map +1 -0
- package/dist/collection/utilities/Cosmetic/Color/index.js +1 -0
- package/dist/collection/utilities/Cosmetic/Color/index.js.map +1 -0
- package/dist/collection/utilities/Cosmetic/index.js +1 -0
- package/dist/collection/utilities/Cosmetic/index.js.map +1 -0
- package/dist/collection/utilities/index.js +1 -0
- package/dist/collection/utilities/index.js.map +1 -0
- package/dist/custom-elements/index.d.ts +66 -0
- package/dist/custom-elements/index.js +5708 -644
- package/dist/custom-elements/index.js.map +1 -0
- package/dist/esm/GoogleFont-8474516b.js +2 -0
- package/dist/esm/GoogleFont-8474516b.js.map +1 -0
- package/dist/esm/Listenable-55a1f6af.js +2 -0
- package/dist/esm/Listenable-55a1f6af.js.map +1 -0
- package/dist/esm/getLanguage-cccb8418.js +2 -0
- package/dist/esm/getLanguage-cccb8418.js.map +1 -0
- package/dist/esm/{index-d7a4e405.js → index-2e948fc3.js} +3 -1
- package/dist/esm/index-2e948fc3.js.map +1 -0
- package/dist/esm/{index-d3421c35.js → index-7b57a52c.js} +106 -2
- package/dist/esm/index-7b57a52c.js.map +1 -0
- package/dist/esm/index.js +4 -2
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +6 -3
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/{smoothly-accordion_53.entry.js → smoothly-accordion_60.entry.js} +5423 -460
- package/dist/esm/smoothly-accordion_60.entry.js.map +1 -0
- package/dist/esm/smoothly-address-display.entry.js +28 -0
- package/dist/esm/smoothly-address-display.entry.js.map +1 -0
- package/dist/esm/smoothly-address.entry.js +19 -0
- package/dist/esm/smoothly-address.entry.js.map +1 -0
- package/dist/esm/smoothly-addresses.entry.js +19 -0
- package/dist/esm/smoothly-addresses.entry.js.map +1 -0
- package/dist/esm/smoothly-color.entry.js +18 -0
- package/dist/esm/smoothly-color.entry.js.map +1 -0
- package/dist/esm/smoothly-country.entry.js +3 -1
- package/dist/esm/smoothly-country.entry.js.map +1 -0
- package/dist/esm/smoothly-google-font.entry.js +3 -1
- package/dist/esm/smoothly-google-font.entry.js.map +1 -0
- package/dist/esm/smoothly-radio-group.entry.js +3 -1
- package/dist/esm/smoothly-radio-group.entry.js.map +1 -0
- package/dist/esm/smoothly-reorder.entry.js +3 -1
- package/dist/esm/smoothly-reorder.entry.js.map +1 -0
- package/dist/esm/smoothly-trigger-sink.entry.js +3 -1
- package/dist/esm/smoothly-trigger-sink.entry.js.map +1 -0
- package/dist/esm/smoothly-trigger-source.entry.js +3 -1
- package/dist/esm/smoothly-trigger-source.entry.js.map +1 -0
- package/dist/esm/smoothly.js +6 -3
- package/dist/esm/smoothly.js.map +1 -0
- package/dist/smoothly/index.esm.js +2 -1
- package/dist/smoothly/index.esm.js.map +1 -0
- package/dist/smoothly/p-156763cd.js +2 -1
- package/dist/smoothly/p-156763cd.js.map +1 -0
- package/dist/smoothly/p-5200d31c.entry.js +2 -0
- package/dist/smoothly/p-5200d31c.entry.js.map +1 -0
- package/dist/smoothly/p-5b28795c.entry.js +2 -0
- package/dist/smoothly/p-5b28795c.entry.js.map +1 -0
- package/dist/smoothly/p-5b6351f6.js +2 -1
- package/dist/smoothly/p-5b6351f6.js.map +1 -0
- package/dist/smoothly/p-70280a11.js +2 -0
- package/dist/smoothly/p-70280a11.js.map +1 -0
- package/dist/smoothly/p-712b362e.entry.js +2 -0
- package/dist/smoothly/p-712b362e.entry.js.map +1 -0
- package/dist/smoothly/p-79025273.entry.js +2 -0
- package/dist/smoothly/p-79025273.entry.js.map +1 -0
- package/dist/smoothly/p-940af6d3.entry.js +2 -0
- package/dist/smoothly/p-940af6d3.entry.js.map +1 -0
- package/dist/smoothly/{p-6630d923.entry.js → p-b49664d8.entry.js} +2 -1
- package/dist/smoothly/p-b49664d8.entry.js.map +1 -0
- package/dist/smoothly/p-bd478a53.js +2 -1
- package/dist/smoothly/p-bd478a53.js.map +1 -0
- package/dist/smoothly/p-c49d2094.entry.js +2 -0
- package/dist/smoothly/p-c49d2094.entry.js.map +1 -0
- package/dist/smoothly/p-c88ae468.js +3 -0
- package/dist/smoothly/p-c88ae468.js.map +1 -0
- package/dist/smoothly/p-c9a64fb5.entry.js +2 -0
- package/dist/smoothly/p-c9a64fb5.entry.js.map +1 -0
- package/dist/smoothly/p-d4182274.entry.js +2 -0
- package/dist/smoothly/p-d4182274.entry.js.map +1 -0
- package/dist/smoothly/p-d4d04558.entry.js +2 -0
- package/dist/smoothly/p-d4d04558.entry.js.map +1 -0
- package/dist/smoothly/p-e136b93e.entry.js +2 -0
- package/dist/smoothly/p-e136b93e.entry.js.map +1 -0
- package/dist/smoothly/smoothly.esm.js +2 -1
- package/dist/smoothly/smoothly.esm.js.map +1 -0
- package/dist/types/components/Button.d.ts +10 -0
- package/dist/types/components/address/index.d.ts +6 -0
- package/dist/types/components/address-display/index.d.ts +13 -0
- package/dist/types/components/addresses/index.d.ts +6 -0
- package/dist/types/components/button/index.d.ts +7 -5
- package/dist/types/components/calendar/index.d.ts +1 -3
- package/dist/types/components/checkbox/index.d.ts +6 -7
- package/dist/types/components/color/index.d.ts +5 -0
- package/dist/types/components/filter/Clearable.d.ts +6 -0
- package/dist/types/components/filter/index.d.ts +16 -0
- package/dist/types/components/filter/input/index.d.ts +25 -0
- package/dist/types/components/form/Clearable.d.ts +6 -0
- package/dist/types/components/form/Data.d.ts +9 -0
- package/dist/types/components/form/index.d.ts +20 -0
- package/dist/types/components/frame/index.d.ts +2 -2
- package/dist/types/components/input/index.d.ts +3 -8
- package/dist/types/components/input-date/index.d.ts +0 -2
- package/dist/types/components/radio-button/item/index.d.ts +1 -1
- package/dist/types/components/submit/index.d.ts +7 -11
- package/dist/types/components/summary/index.d.ts +7 -0
- package/dist/types/components/table/Selector.d.ts +10 -0
- package/dist/types/components/table/demo/filtered/Root.d.ts +27 -0
- package/dist/types/components/table/demo/filtered/index.d.ts +13 -0
- package/dist/types/components/table/expandable/cell/index.d.ts +0 -1
- package/dist/types/components/table/index.d.ts +1 -0
- package/dist/types/components/toggle/toggle.d.ts +9 -0
- package/dist/types/components/toggle-switch/index.d.ts +8 -0
- package/dist/types/components/trigger/index.d.ts +1 -2
- package/dist/types/components.d.ts +286 -31
- package/dist/types/index.d.ts +1 -1
- package/dist/types/model/index.d.ts +0 -1
- package/dist/types/stencil-public-runtime.d.ts +20 -0
- package/loader/index.d.ts +9 -0
- package/package.json +6 -3
- package/dist/collection/components/submit/Data.js +0 -12
- package/dist/collection/components/submit/style.css +0 -37
- package/dist/collection/model/Expand.js +0 -1
- package/dist/smoothly/p-4a0b35b7.js +0 -2
- package/dist/smoothly/p-4fecfc5d.entry.js +0 -1
- package/dist/smoothly/p-5d41e3ca.entry.js +0 -1
- package/dist/smoothly/p-7d95afef.entry.js +0 -1
- package/dist/smoothly/p-7db49a38.entry.js +0 -1
- package/dist/smoothly/p-94e08cee.js +0 -1
- package/dist/smoothly/p-96e8781a.entry.js +0 -1
- package/dist/smoothly/p-e0f4957d.entry.js +0 -1
- package/dist/types/components/submit/Data.d.ts +0 -7
- package/dist/types/model/Expand.d.ts +0 -1
|
@@ -1,84 +1,32 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import {
|
|
2
|
+
import { Button } from "../Button";
|
|
3
3
|
export class SmoothlySubmit {
|
|
4
4
|
constructor() {
|
|
5
|
-
this.
|
|
6
|
-
this.color = undefined;
|
|
5
|
+
this.color = "success";
|
|
7
6
|
this.expand = undefined;
|
|
8
7
|
this.fill = undefined;
|
|
9
8
|
this.disabled = false;
|
|
10
|
-
this.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return (this.button && this.button.form) || undefined;
|
|
14
|
-
}
|
|
15
|
-
async handleSubmit(event) {
|
|
16
|
-
if (!this.processing) {
|
|
17
|
-
this.processing = true;
|
|
18
|
-
if (this.prevent)
|
|
19
|
-
event.preventDefault();
|
|
20
|
-
const result = {};
|
|
21
|
-
if (this.form) {
|
|
22
|
-
const elements = this.form.elements;
|
|
23
|
-
for (let i = 0; i < elements.length; i++) {
|
|
24
|
-
const element = elements.item(i);
|
|
25
|
-
if (hasNameAndValue(element) && element.name)
|
|
26
|
-
result[element.name] = element.value;
|
|
27
|
-
}
|
|
28
|
-
const smoothlyInputs = this.form.getElementsByTagName("smoothly-input");
|
|
29
|
-
for (let i = 0; i < smoothlyInputs.length; i++) {
|
|
30
|
-
const element = smoothlyInputs.item(i);
|
|
31
|
-
if (hasNameAndValue(element) && element.name)
|
|
32
|
-
result[element.name] = element.value;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
this.submitEvent.emit(Data.deepen(result));
|
|
36
|
-
this.processing = false;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
async submit() {
|
|
40
|
-
let result;
|
|
41
|
-
if ((result = !!this.form))
|
|
42
|
-
this.form.submit();
|
|
43
|
-
return result;
|
|
9
|
+
this.type = "button";
|
|
10
|
+
this.size = undefined;
|
|
11
|
+
this.shape = undefined;
|
|
44
12
|
}
|
|
45
13
|
render() {
|
|
46
|
-
return
|
|
47
|
-
h("smoothly-spinner", { active: this.processing }),
|
|
48
|
-
h("button", { type: "submit", disabled: this.disabled || this.processing, ref: (element) => (this.button = element) }, h("slot", null)),
|
|
49
|
-
];
|
|
14
|
+
return h(Button, { disabled: this.disabled, type: this.type });
|
|
50
15
|
}
|
|
51
16
|
static get is() { return "smoothly-submit"; }
|
|
52
17
|
static get encapsulation() { return "scoped"; }
|
|
53
18
|
static get originalStyleUrls() {
|
|
54
19
|
return {
|
|
55
|
-
"$": ["style.css"]
|
|
20
|
+
"$": ["../button/style.css"]
|
|
56
21
|
};
|
|
57
22
|
}
|
|
58
23
|
static get styleUrls() {
|
|
59
24
|
return {
|
|
60
|
-
"$": ["style.css"]
|
|
25
|
+
"$": ["../button/style.css"]
|
|
61
26
|
};
|
|
62
27
|
}
|
|
63
28
|
static get properties() {
|
|
64
29
|
return {
|
|
65
|
-
"processing": {
|
|
66
|
-
"type": "boolean",
|
|
67
|
-
"mutable": true,
|
|
68
|
-
"complexType": {
|
|
69
|
-
"original": "boolean",
|
|
70
|
-
"resolved": "boolean",
|
|
71
|
-
"references": {}
|
|
72
|
-
},
|
|
73
|
-
"required": false,
|
|
74
|
-
"optional": false,
|
|
75
|
-
"docs": {
|
|
76
|
-
"tags": [],
|
|
77
|
-
"text": ""
|
|
78
|
-
},
|
|
79
|
-
"attribute": "processing",
|
|
80
|
-
"reflect": true
|
|
81
|
-
},
|
|
82
30
|
"color": {
|
|
83
31
|
"type": "string",
|
|
84
32
|
"mutable": false,
|
|
@@ -99,20 +47,16 @@ export class SmoothlySubmit {
|
|
|
99
47
|
"text": ""
|
|
100
48
|
},
|
|
101
49
|
"attribute": "color",
|
|
102
|
-
"reflect": true
|
|
50
|
+
"reflect": true,
|
|
51
|
+
"defaultValue": "\"success\""
|
|
103
52
|
},
|
|
104
53
|
"expand": {
|
|
105
54
|
"type": "string",
|
|
106
55
|
"mutable": false,
|
|
107
56
|
"complexType": {
|
|
108
|
-
"original": "
|
|
57
|
+
"original": "\"block\" | \"full\"",
|
|
109
58
|
"resolved": "\"block\" | \"full\" | undefined",
|
|
110
|
-
"references": {
|
|
111
|
-
"Expand": {
|
|
112
|
-
"location": "import",
|
|
113
|
-
"path": "../../model"
|
|
114
|
-
}
|
|
115
|
-
}
|
|
59
|
+
"references": {}
|
|
116
60
|
},
|
|
117
61
|
"required": false,
|
|
118
62
|
"optional": true,
|
|
@@ -163,12 +107,47 @@ export class SmoothlySubmit {
|
|
|
163
107
|
"reflect": true,
|
|
164
108
|
"defaultValue": "false"
|
|
165
109
|
},
|
|
166
|
-
"
|
|
167
|
-
"type": "
|
|
110
|
+
"type": {
|
|
111
|
+
"type": "string",
|
|
168
112
|
"mutable": false,
|
|
169
113
|
"complexType": {
|
|
170
|
-
"original": "
|
|
171
|
-
"resolved": "
|
|
114
|
+
"original": "\"link\" | \"button\"",
|
|
115
|
+
"resolved": "\"button\" | \"link\"",
|
|
116
|
+
"references": {}
|
|
117
|
+
},
|
|
118
|
+
"required": false,
|
|
119
|
+
"optional": false,
|
|
120
|
+
"docs": {
|
|
121
|
+
"tags": [],
|
|
122
|
+
"text": ""
|
|
123
|
+
},
|
|
124
|
+
"attribute": "type",
|
|
125
|
+
"reflect": true,
|
|
126
|
+
"defaultValue": "\"button\""
|
|
127
|
+
},
|
|
128
|
+
"size": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"mutable": false,
|
|
131
|
+
"complexType": {
|
|
132
|
+
"original": "\"small\" | \"large\" | \"icon\"",
|
|
133
|
+
"resolved": "\"icon\" | \"large\" | \"small\"",
|
|
134
|
+
"references": {}
|
|
135
|
+
},
|
|
136
|
+
"required": false,
|
|
137
|
+
"optional": false,
|
|
138
|
+
"docs": {
|
|
139
|
+
"tags": [],
|
|
140
|
+
"text": ""
|
|
141
|
+
},
|
|
142
|
+
"attribute": "size",
|
|
143
|
+
"reflect": true
|
|
144
|
+
},
|
|
145
|
+
"shape": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"mutable": false,
|
|
148
|
+
"complexType": {
|
|
149
|
+
"original": "\"rounded\"",
|
|
150
|
+
"resolved": "\"rounded\" | undefined",
|
|
172
151
|
"references": {}
|
|
173
152
|
},
|
|
174
153
|
"required": false,
|
|
@@ -177,15 +156,15 @@ export class SmoothlySubmit {
|
|
|
177
156
|
"tags": [],
|
|
178
157
|
"text": ""
|
|
179
158
|
},
|
|
180
|
-
"attribute": "
|
|
181
|
-
"reflect":
|
|
159
|
+
"attribute": "shape",
|
|
160
|
+
"reflect": true
|
|
182
161
|
}
|
|
183
162
|
};
|
|
184
163
|
}
|
|
185
164
|
static get events() {
|
|
186
165
|
return [{
|
|
187
|
-
"method": "
|
|
188
|
-
"name": "
|
|
166
|
+
"method": "smoothlySubmit",
|
|
167
|
+
"name": "smoothlySubmit",
|
|
189
168
|
"bubbles": true,
|
|
190
169
|
"cancelable": true,
|
|
191
170
|
"composed": true,
|
|
@@ -194,47 +173,11 @@ export class SmoothlySubmit {
|
|
|
194
173
|
"text": ""
|
|
195
174
|
},
|
|
196
175
|
"complexType": {
|
|
197
|
-
"original": "
|
|
198
|
-
"resolved": "
|
|
199
|
-
"references": {
|
|
200
|
-
"Data": {
|
|
201
|
-
"location": "import",
|
|
202
|
-
"path": "./Data"
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}];
|
|
207
|
-
}
|
|
208
|
-
static get methods() {
|
|
209
|
-
return {
|
|
210
|
-
"submit": {
|
|
211
|
-
"complexType": {
|
|
212
|
-
"signature": "() => Promise<boolean>",
|
|
213
|
-
"parameters": [],
|
|
214
|
-
"references": {
|
|
215
|
-
"Promise": {
|
|
216
|
-
"location": "global"
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
"return": "Promise<boolean>"
|
|
220
|
-
},
|
|
221
|
-
"docs": {
|
|
222
|
-
"text": "",
|
|
223
|
-
"tags": []
|
|
176
|
+
"original": "any",
|
|
177
|
+
"resolved": "any",
|
|
178
|
+
"references": {}
|
|
224
179
|
}
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
static get listeners() {
|
|
229
|
-
return [{
|
|
230
|
-
"name": "click",
|
|
231
|
-
"method": "handleSubmit",
|
|
232
|
-
"target": undefined,
|
|
233
|
-
"capture": false,
|
|
234
|
-
"passive": false
|
|
235
180
|
}];
|
|
236
181
|
}
|
|
237
182
|
}
|
|
238
|
-
|
|
239
|
-
return (typeof element.name == "string" && typeof element.value == "string");
|
|
240
|
-
}
|
|
183
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/submit/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAEvE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAOlC,MAAM,OAAO,cAAc;;iBACe,SAAS;;;oBAGd,KAAK;gBACU,QAAQ;;;;EAI3D,MAAM;IACL,OAAO,EAAC,MAAM,IAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAW,CAAA;EACnE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Event, EventEmitter, h, Prop } from \"@stencil/core\"\nimport { Color, Fill } from \"../../model\"\nimport { Button } from \"../Button\"\n\n@Component({\n\ttag: \"smoothly-submit\",\n\tstyleUrl: \"../button/style.css\",\n\tscoped: true,\n})\nexport class SmoothlySubmit {\n\t@Prop({ reflect: true }) color?: Color = \"success\"\n\t@Prop({ reflect: true }) expand?: \"block\" | \"full\"\n\t@Prop({ reflect: true }) fill?: Fill\n\t@Prop({ reflect: true }) disabled = false\n\t@Prop({ reflect: true }) type: \"link\" | \"button\" = \"button\"\n\t@Prop({ reflect: true }) size: \"small\" | \"large\" | \"icon\"\n\t@Prop({ reflect: true }) shape?: \"rounded\"\n\t@Event() smoothlySubmit: EventEmitter\n\trender() {\n\t\treturn <Button disabled={this.disabled} type={this.type}></Button>\n\t}\n}\n"]}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class SmoothlySummary {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.color = "primary";
|
|
5
|
+
this.fill = "solid";
|
|
6
|
+
this.size = "tiny";
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return (h("details", null, h("summary", null, h("smoothly-icon", { name: "chevron-forward", color: this.color, fill: this.fill, size: this.size }), h("slot", { name: "summary" })), h("slot", { name: "content" })));
|
|
10
|
+
}
|
|
11
|
+
static get is() { return "smoothly-summary"; }
|
|
12
|
+
static get encapsulation() { return "scoped"; }
|
|
13
|
+
static get originalStyleUrls() {
|
|
14
|
+
return {
|
|
15
|
+
"$": ["style.css"]
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
static get styleUrls() {
|
|
19
|
+
return {
|
|
20
|
+
"$": ["style.css"]
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
static get properties() {
|
|
24
|
+
return {
|
|
25
|
+
"color": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"mutable": false,
|
|
28
|
+
"complexType": {
|
|
29
|
+
"original": "Color",
|
|
30
|
+
"resolved": "\"danger\" | \"dark\" | \"default\" | \"light\" | \"medium\" | \"primary\" | \"secondary\" | \"success\" | \"tertiary\" | \"warning\"",
|
|
31
|
+
"references": {
|
|
32
|
+
"Color": {
|
|
33
|
+
"location": "import",
|
|
34
|
+
"path": "../../model"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"required": false,
|
|
39
|
+
"optional": false,
|
|
40
|
+
"docs": {
|
|
41
|
+
"tags": [],
|
|
42
|
+
"text": ""
|
|
43
|
+
},
|
|
44
|
+
"attribute": "color",
|
|
45
|
+
"reflect": false,
|
|
46
|
+
"defaultValue": "\"primary\""
|
|
47
|
+
},
|
|
48
|
+
"fill": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"mutable": false,
|
|
51
|
+
"complexType": {
|
|
52
|
+
"original": "Fill",
|
|
53
|
+
"resolved": "\"clear\" | \"default\" | \"outline\" | \"solid\"",
|
|
54
|
+
"references": {
|
|
55
|
+
"Fill": {
|
|
56
|
+
"location": "import",
|
|
57
|
+
"path": "../../model"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"required": false,
|
|
62
|
+
"optional": false,
|
|
63
|
+
"docs": {
|
|
64
|
+
"tags": [],
|
|
65
|
+
"text": ""
|
|
66
|
+
},
|
|
67
|
+
"attribute": "fill",
|
|
68
|
+
"reflect": false,
|
|
69
|
+
"defaultValue": "\"solid\""
|
|
70
|
+
},
|
|
71
|
+
"size": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"mutable": false,
|
|
74
|
+
"complexType": {
|
|
75
|
+
"original": "\"tiny\" | \"small\" | \"medium\" | \"large\"",
|
|
76
|
+
"resolved": "\"large\" | \"medium\" | \"small\" | \"tiny\"",
|
|
77
|
+
"references": {}
|
|
78
|
+
},
|
|
79
|
+
"required": false,
|
|
80
|
+
"optional": false,
|
|
81
|
+
"docs": {
|
|
82
|
+
"tags": [],
|
|
83
|
+
"text": ""
|
|
84
|
+
},
|
|
85
|
+
"attribute": "size",
|
|
86
|
+
"reflect": false,
|
|
87
|
+
"defaultValue": "\"tiny\""
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/summary/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAOlD,MAAM,OAAO,eAAe;;iBACJ,SAAS;gBACX,OAAO;gBAC0B,MAAM;;EAE5D,MAAM;IACL,OAAO,CACN;MACC;QACC,qBAAe,IAAI,EAAC,iBAAiB,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAkB;QAC3G,YAAM,IAAI,EAAC,SAAS,GAAQ,CACnB;MACV,YAAM,IAAI,EAAC,SAAS,GAAQ,CACnB,CACV,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, h, Prop } from \"@stencil/core\"\nimport { Color, Fill } from \"../../model\"\n@Component({\n\ttag: \"smoothly-summary\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlySummary {\n\t@Prop() color: Color = \"primary\"\n\t@Prop() fill: Fill = \"solid\"\n\t@Prop() size: \"tiny\" | \"small\" | \"medium\" | \"large\" = \"tiny\"\n\n\trender() {\n\t\treturn (\n\t\t\t<details>\n\t\t\t\t<summary>\n\t\t\t\t\t<smoothly-icon name=\"chevron-forward\" color={this.color} fill={this.fill} size={this.size}></smoothly-icon>\n\t\t\t\t\t<slot name=\"summary\"></slot>\n\t\t\t\t</summary>\n\t\t\t\t<slot name=\"content\"></slot>\n\t\t\t</details>\n\t\t)\n\t}\n}\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
:host > details > summary {
|
|
2
|
+
list-style: none;
|
|
3
|
+
display: flex;
|
|
4
|
+
gap: 0.5rem;
|
|
5
|
+
align-items: center;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:host > details > summary > smoothly-icon {
|
|
9
|
+
transition: 0.2s;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:host > details[open] > summary > smoothly-icon {
|
|
13
|
+
transform: rotate(90deg);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:host > details > summary::slotted([slot=summary]){
|
|
17
|
+
display: inline-block;
|
|
18
|
+
margin: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host > details::slotted([slot=content]){
|
|
22
|
+
display: inline-block;
|
|
23
|
+
margin: 0;
|
|
24
|
+
padding: 0.5rem 1.75rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@media screen and (min-width: 900px){
|
|
28
|
+
:host > details > summary:hover {
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/svg/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAOxD,MAAM,OAAO,WAAW;;IAIN,iBAAY,GAAqF;MACjH,KAAK,EAAE,EAAE,MAAM,EAAE,OAA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/core\"\n\n@Component({\n\ttag: \"smoothly-svg\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlySvg {\n\t@Prop({ reflect: true }) url!: string\n\t@Prop({ reflect: true }) size?: \"large\" | \"medium\" | \"small\" | \"tiny\" | { height: string; width: string }\n\t@Prop() color: string\n\tprivate readonly defaultSizes: Record<\"large\" | \"medium\" | \"small\" | \"tiny\", { height: string; width: string }> = {\n\t\tlarge: { height: \"50rem\", width: \"50rem\" },\n\t\tmedium: { height: \"30rem\", width: \"30rem\" },\n\t\tsmall: { height: \"10rem\", width: \"10rem\" },\n\t\ttiny: { height: \"5rem\", width: \"5rem\" },\n\t}\n\trender() {\n\t\tconst height = this.size\n\t\t\t? typeof this.size == \"object\"\n\t\t\t\t? this.size.height\n\t\t\t\t: this.defaultSizes[this.size].height\n\t\t\t: \"10rem\"\n\t\tconst width = this.size\n\t\t\t? typeof this.size == \"object\"\n\t\t\t\t? this.size.width\n\t\t\t\t: this.defaultSizes[this.size].width\n\t\t\t: \"10rem\"\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tstyle={{\n\t\t\t\t\t\"min-height\": height,\n\t\t\t\t\t\"min-width\": width,\n\t\t\t\t\t\"--size-height\": height,\n\t\t\t\t\t\"--size-width\": width,\n\t\t\t\t\t\"--color\": this.color,\n\t\t\t\t}}>\n\t\t\t\t<object height={height} width={width} type=\"image/svg+xml\" data={this.url} />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/tab/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAO5F,MAAM,OAAO,WAAW;;;;;EAMvB,WAAW;IACV,IAAI,IAAI,CAAC,gBAAgB,EAAE;MAC1B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;KAC9C;EACF,CAAC;EAED,OAAO,CAAC,CAAU;IACjB,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAA;IACtB,CAAC,CAAC,eAAe,EAAE,CAAA;EACpB,CAAC;EACD,gBAAgB;IACf,IAAI,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,IAAI,EAAE;MACvC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;KAC9C;EACF,CAAC;EACD,MAAM;IACL,OAAO,CACN,EAAC,IAAI;MACJ,iBAAQ,IAAI,CAAC,KAAK,CAAS;MAC3B,WAAK,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;QAC1E,eAAa,CACR,CACA,CACP,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Event, EventEmitter, h, Host, Listen, Prop, Watch } from \"@stencil/core\"\n\n@Component({\n\ttag: \"smoothly-tab\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyTab {\n\texpansionElement?: HTMLDivElement\n\t@Event() expansionOpen: EventEmitter<HTMLElement>\n\t@Prop() label: string\n\t@Prop({ mutable: true, reflect: true }) open: boolean\n\t@Watch(\"open\")\n\topenChanged() {\n\t\tif (this.expansionElement) {\n\t\t\tthis.expansionOpen.emit(this.expansionElement)\n\t\t}\n\t}\n\t@Listen(\"click\")\n\tonClick(e: UIEvent) {\n\t\tthis.open = !this.open\n\t\te.stopPropagation()\n\t}\n\tcomponentDidLoad(): void {\n\t\tif (this.expansionElement && this.open) {\n\t\t\tthis.expansionOpen.emit(this.expansionElement)\n\t\t}\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<label>{this.label}</label>\n\t\t\t\t<div ref={e => (this.expansionElement = e)} class={!this.open ? \"hide\" : \"\"}>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/tab-switch/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAOjF,MAAM,OAAO,iBAAiB;;;;EAI7B,WAAW,CAAC,KAAkB;IAC7B,KAAK,CAAC,eAAe,EAAE,CAAA;IACvB,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,MAAgC,CAAA;IAC7D,IAAI,CAAC,eAAe,CAAC,IAAI,GAAG,IAAI,CAAA;IAChC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;EACjC,CAAC;EAED,gBAAgB,CAAC,KAA6B,EAAE,GAA2B;IAC1E,IAAI,GAAG;MACN,GAAG,CAAC,IAAI,GAAG,KAAK,CAAA;EAClB,CAAC;EAED,MAAM;IACL,OAAO,CACN,EAAC,IAAI;MACJ,eAAa,CACP,CACP,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Element, h, Host, Listen, State, Watch } from \"@stencil/core\"\n\n@Component({\n\ttag: \"smoothly-tab-switch\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyTabSwitch {\n\t@Element() element: HTMLSmoothlyTabSwitchElement\n\t@State() selectedElement: HTMLSmoothlyTabElement\n\t@Listen(\"expansionOpen\")\n\topenChanged(event: CustomEvent) {\n\t\tevent.stopPropagation()\n\t\tthis.selectedElement = event.target as HTMLSmoothlyTabElement\n\t\tthis.selectedElement.open = true\n\t\tthis.element.after(event.detail)\n\t}\n\t@Watch(\"selectedElement\")\n\tonSelectedChange(value: HTMLSmoothlyTabElement, old: HTMLSmoothlyTabElement) {\n\t\tif (old)\n\t\t\told.open = false\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f)
|
|
3
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
5
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
6
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
9
|
+
if (kind === "m")
|
|
10
|
+
throw new TypeError("Private method is not writable");
|
|
11
|
+
if (kind === "a" && !f)
|
|
12
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
14
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
16
|
+
};
|
|
17
|
+
var _Selector_selected;
|
|
18
|
+
import { h } from "@stencil/core";
|
|
19
|
+
export class Selector {
|
|
20
|
+
get selected() {
|
|
21
|
+
var _a;
|
|
22
|
+
return (__classPrivateFieldSet(this, _Selector_selected, (_a = __classPrivateFieldGet(this, _Selector_selected, "f")) !== null && _a !== void 0 ? _a : Object.values(this.data), "f"));
|
|
23
|
+
}
|
|
24
|
+
constructor(key, data = {}) {
|
|
25
|
+
this.key = key;
|
|
26
|
+
this.data = data;
|
|
27
|
+
_Selector_selected.set(this, void 0);
|
|
28
|
+
}
|
|
29
|
+
handle(data) {
|
|
30
|
+
var _a;
|
|
31
|
+
return new Selector(this.key, "check-all" in data
|
|
32
|
+
? (_a = data["check-all"]) !== null && _a !== void 0 ? _a : {}
|
|
33
|
+
: Object.fromEntries(Object.entries(Object.assign(Object.assign({}, this.data), data)).filter(([_, value]) => value != undefined)));
|
|
34
|
+
}
|
|
35
|
+
render(item) {
|
|
36
|
+
var _a, _b, _c;
|
|
37
|
+
return Array.isArray(item) ? (h("smoothly-checkbox", { name: "check-all", value: Object.fromEntries(item.map(i => [i[this.key], i])), intermediate: this.selected.length > 0 && this.selected.length < item.length, checked: this.selected.length == item.length ? true : this.selected.length == 0 && false })) : (h("smoothly-checkbox", { name: (_a = item[this.key]) === null || _a === void 0 ? void 0 : _a.toString(), value: item, checked: !!this.data[(_c = (_b = item[this.key]) === null || _b === void 0 ? void 0 : _b.toString()) !== null && _c !== void 0 ? _c : ""] }));
|
|
38
|
+
}
|
|
39
|
+
static create(key) {
|
|
40
|
+
return new Selector(key);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
_Selector_selected = new WeakMap();
|
|
44
|
+
//# sourceMappingURL=Selector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Selector.js","sourceRoot":"","sources":["../../../src/components/table/Selector.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAA;AAEjC,MAAM,OAAO,QAAQ;EAEpB,IAAI,QAAQ;;IACX,OAAO,CAAC,+IAAmB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAA,CAAC,CAAA;EACrD,CAAC;EACD,YAAqC,GA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O,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAA,MAAA,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,0CAAE,QAAQ,EAAE,mCAAI,EAAE,CAAC,GACrD,CACF,CAAA;EACF,CAAC;EACD,MAAM,CAAC,MAAM,CAAI,GAAY;IAC5B,OAAO,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAA;EACzB,CAAC;CACD","sourcesContent":["import { h } from \"@stencil/core\"\n\nexport class Selector<T> {\n\t#selected?: T[]\n\tget selected(): T[] {\n\t\treturn (this.#selected ??= Object.values(this.data))\n\t}\n\tprivate constructor(private readonly key: keyof T, private data: Readonly<Record<string, T>> = {}) {}\n\thandle(data: Record<string, T>): Selector<T> {\n\t\treturn new Selector(\n\t\t\tthis.key,\n\t\t\t\"check-all\" in data\n\t\t\t\t? data[\"check-all\"] ?? {}\n\t\t\t\t: Object.fromEntries(Object.entries({ ...this.data, ...data }).filter(([_, value]) => value != undefined))\n\t\t)\n\t}\n\trender(item: T | T[]): HTMLSmoothlyCheckboxElement {\n\t\treturn Array.isArray(item) ? (\n\t\t\t<smoothly-checkbox\n\t\t\t\tname=\"check-all\"\n\t\t\t\tvalue={Object.fromEntries(item.map(i => [i[this.key], i]))}\n\t\t\t\tintermediate={this.selected.length > 0 && this.selected.length < item.length}\n\t\t\t\tchecked={this.selected.length == item.length ? true : this.selected.length == 0 && false}\n\t\t\t/>\n\t\t) : (\n\t\t\t<smoothly-checkbox\n\t\t\t\tname={item[this.key]?.toString()}\n\t\t\t\tvalue={item}\n\t\t\t\tchecked={!!this.data[item[this.key]?.toString() ?? \"\"]}\n\t\t\t/>\n\t\t)\n\t}\n\tstatic create<T>(key: keyof T): Selector<T> {\n\t\treturn new Selector(key)\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/table/cell/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAOlD,MAAM,OAAO,SAAS;EACrB,MAAM;IACL,OAAO,CACN,EAAC,IAAI;MACJ;QACC;UACC,eAAa,CACR;QACN,qBAAe,IAAI,EAAC,iBAAiB,EAAC,IAAI,EAAC,MAAM,GAAG,CAC/C,CACA,CACP,CAAA;EACF,CAAC;;;;;;;;;CACD","sourcesContent":["import { Component, h, Host } from \"@stencil/core\"\n\n@Component({\n\ttag: \"smoothly-table-cell\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class TableCell {\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</div>\n\t\t\t\t\t<smoothly-icon name=\"chevron-forward\" size=\"tiny\" />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
|
|
@@ -23,3 +23,13 @@
|
|
|
23
23
|
margin: 0 0.3rem;
|
|
24
24
|
transition: transform 0.2s;
|
|
25
25
|
}
|
|
26
|
+
smoothly-table[align=bottom] :host {
|
|
27
|
+
vertical-align: bottom;
|
|
28
|
+
}
|
|
29
|
+
smoothly-table[align=middle] :host {
|
|
30
|
+
vertical-align: middle;
|
|
31
|
+
text-align: left;
|
|
32
|
+
}
|
|
33
|
+
smoothly-table[align=top] :host {
|
|
34
|
+
vertical-align: top;
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Root.js","sourceRoot":"","sources":["../../../../../src/components/table/demo/filtered/Root.ts"],"names":[],"mappings":"","sourcesContent":["export interface Root {\n\tcurrent_page: number\n\tdata: Cat[]\n\tfirst_page_url: string\n\tfrom: number\n\tlast_page: number\n\tlast_page_url: string\n\tlinks: Link[]\n\tnext_page_url: string\n\tpath: string\n\tper_page: string\n\tprev_page_url: any\n\tto: number\n\ttotal: number\n}\n\nexport interface Cat {\n\tbreed: string\n\tcountry: string\n\torigin: string\n\tcoat: string\n\tpattern: string\n}\n\nexport interface Link {\n\turl?: string\n\tlabel: string\n\tactive: boolean\n}\n"]}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import * as selectively from "selectively";
|
|
3
|
+
import * as http from "cloudly-http";
|
|
4
|
+
import { Selector } from "../../Selector";
|
|
5
|
+
export class TableDemoFiltered {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.criteria = {};
|
|
8
|
+
this.data = undefined;
|
|
9
|
+
this.selector = Selector.create("breed");
|
|
10
|
+
}
|
|
11
|
+
onFilterUpdate(event) {
|
|
12
|
+
event.stopPropagation();
|
|
13
|
+
this.criteria = event.detail;
|
|
14
|
+
}
|
|
15
|
+
smoothlyCheckedHandler(event) {
|
|
16
|
+
this.selector = this.selector.handle(event.detail);
|
|
17
|
+
}
|
|
18
|
+
async componentWillLoad() {
|
|
19
|
+
const response = await http.fetch("https://catfact.ninja/breeds?limit=10");
|
|
20
|
+
this.data = response.status == 200 && (await response.body);
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
const data = this.data && selectively.filter(this.criteria, this.data.data);
|
|
24
|
+
return !data
|
|
25
|
+
? "Failed to load data."
|
|
26
|
+
: [
|
|
27
|
+
h("smoothly-filter", null, h("smoothly-icon", { slot: "start", name: "search-outline", size: "small" }), "Readonly", h("div", { slot: "filter" }, h("smoothly-form", { looks: "border" }, h("smoothly-filter-input", { name: "breed", placeholder: "ex. Abyssinian" }, "Breed", h("smoothly-icon", { slot: "start", name: "search-outline", size: "small" }))), h("smoothly-form", { looks: "border" }, h("smoothly-filter-input", { name: "country", placeholder: "ex. Ethiopia" }, "Country", h("smoothly-icon", { slot: "start", name: "search-outline", size: "small" }))), h("smoothly-form", { looks: "border" }, h("smoothly-filter-input", { name: "coat", placeholder: "ex. Short" }, "Coat", h("smoothly-icon", { slot: "start", name: "search-outline", size: "small" }))), h("smoothly-form", { looks: "border" }, h("smoothly-filter-input", { name: "pattern", placeholder: "ex. Ticked" }, "Pattern", h("smoothly-icon", { slot: "start", name: "search-outline", size: "small" }))))),
|
|
28
|
+
h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, this.selector.render(data)), h("smoothly-table-header", null, "Breed"), h("smoothly-table-header", null, "Coat")), data.map(cat => (h("smoothly-table-row", null, h("smoothly-table-cell", null, this.selector.render(cat)), h("smoothly-table-expandable-cell", null, cat.breed, h("div", { slot: "detail" }, "Country: ", cat.country)), h("smoothly-table-expandable-cell", null, cat.coat, h("div", { slot: "detail" }, "Pattern: ", cat.pattern)))))),
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
static get is() { return "smoothly-table-demo-filtered"; }
|
|
32
|
+
static get encapsulation() { return "scoped"; }
|
|
33
|
+
static get originalStyleUrls() {
|
|
34
|
+
return {
|
|
35
|
+
"$": ["style.css"]
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
static get styleUrls() {
|
|
39
|
+
return {
|
|
40
|
+
"$": ["style.css"]
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
static get states() {
|
|
44
|
+
return {
|
|
45
|
+
"criteria": {},
|
|
46
|
+
"data": {},
|
|
47
|
+
"selector": {}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
static get listeners() {
|
|
51
|
+
return [{
|
|
52
|
+
"name": "filters",
|
|
53
|
+
"method": "onFilterUpdate",
|
|
54
|
+
"target": undefined,
|
|
55
|
+
"capture": false,
|
|
56
|
+
"passive": false
|
|
57
|
+
}, {
|
|
58
|
+
"name": "smoothlyChecked",
|
|
59
|
+
"method": "smoothlyCheckedHandler",
|
|
60
|
+
"target": undefined,
|
|
61
|
+
"capture": true,
|
|
62
|
+
"passive": false
|
|
63
|
+
}];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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;OAChB,CAAA;EACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, ComponentWillLoad, h, Listen, State } from \"@stencil/core\"\nimport * as selectively from \"selectively\"\nimport { Criteria } from \"selectively\"\nimport * as http from \"cloudly-http\"\nimport { Selector } from \"../../Selector\"\nimport { Cat, Root } from \"./Root\"\n\n@Component({\n\ttag: \"smoothly-table-demo-filtered\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class TableDemoFiltered implements ComponentWillLoad {\n\t@State() criteria: Criteria = {}\n\t@State() data?: Root | false\n\t@State() selector: Selector<Cat> = Selector.create(\"breed\")\n\n\t@Listen(\"filters\")\n\tonFilterUpdate(event: CustomEvent<Record<string, Criteria>>) {\n\t\tevent.stopPropagation()\n\t\tthis.criteria = event.detail\n\t}\n\n\t@Listen(\"smoothlyChecked\", { capture: true })\n\tsmoothlyCheckedHandler(event: CustomEvent<Record<string, any>>) {\n\t\tthis.selector = this.selector.handle(event.detail)\n\t}\n\n\tasync componentWillLoad(): Promise<void> {\n\t\tconst response = await http.fetch(\"https://catfact.ninja/breeds?limit=10\")\n\t\tthis.data = response.status == 200 && (await response.body)\n\t}\n\n\trender() {\n\t\tconst data = this.data && selectively.filter(this.criteria, this.data.data)\n\t\treturn !data\n\t\t\t? \"Failed to load data.\"\n\t\t\t: [\n\t\t\t\t\t<smoothly-filter>\n\t\t\t\t\t\t<smoothly-icon slot=\"start\" name=\"search-outline\" size=\"small\" />\n\t\t\t\t\t\tReadonly\n\t\t\t\t\t\t<div slot=\"filter\">\n\t\t\t\t\t\t\t<smoothly-form looks=\"border\">\n\t\t\t\t\t\t\t\t<smoothly-filter-input name=\"breed\" placeholder=\"ex. Abyssinian\">\n\t\t\t\t\t\t\t\t\tBreed\n\t\t\t\t\t\t\t\t\t<smoothly-icon slot=\"start\" name=\"search-outline\" size=\"small\" />\n\t\t\t\t\t\t\t\t</smoothly-filter-input>\n\t\t\t\t\t\t\t</smoothly-form>\n\t\t\t\t\t\t\t<smoothly-form looks=\"border\">\n\t\t\t\t\t\t\t\t<smoothly-filter-input name=\"country\" placeholder=\"ex. Ethiopia\">\n\t\t\t\t\t\t\t\t\tCountry\n\t\t\t\t\t\t\t\t\t<smoothly-icon slot=\"start\" name=\"search-outline\" size=\"small\" />\n\t\t\t\t\t\t\t\t</smoothly-filter-input>\n\t\t\t\t\t\t\t</smoothly-form>\n\t\t\t\t\t\t\t<smoothly-form looks=\"border\">\n\t\t\t\t\t\t\t\t<smoothly-filter-input name=\"coat\" placeholder=\"ex. Short\">\n\t\t\t\t\t\t\t\t\tCoat\n\t\t\t\t\t\t\t\t\t<smoothly-icon slot=\"start\" name=\"search-outline\" size=\"small\" />\n\t\t\t\t\t\t\t\t</smoothly-filter-input>\n\t\t\t\t\t\t\t</smoothly-form>\n\t\t\t\t\t\t\t<smoothly-form looks=\"border\">\n\t\t\t\t\t\t\t\t<smoothly-filter-input name=\"pattern\" placeholder=\"ex. Ticked\">\n\t\t\t\t\t\t\t\t\tPattern\n\t\t\t\t\t\t\t\t\t<smoothly-icon slot=\"start\" name=\"search-outline\" size=\"small\" />\n\t\t\t\t\t\t\t\t</smoothly-filter-input>\n\t\t\t\t\t\t\t</smoothly-form>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</smoothly-filter>,\n\n\t\t\t\t\t<smoothly-table>\n\t\t\t\t\t\t<smoothly-table-row>\n\t\t\t\t\t\t\t<smoothly-table-header>{this.selector.render(data)}</smoothly-table-header>\n\t\t\t\t\t\t\t<smoothly-table-header>Breed</smoothly-table-header>\n\t\t\t\t\t\t\t<smoothly-table-header>Coat</smoothly-table-header>\n\t\t\t\t\t\t</smoothly-table-row>\n\t\t\t\t\t\t{data.map(cat => (\n\t\t\t\t\t\t\t<smoothly-table-row>\n\t\t\t\t\t\t\t\t<smoothly-table-cell>{this.selector.render(cat)}</smoothly-table-cell>\n\t\t\t\t\t\t\t\t<smoothly-table-expandable-cell>\n\t\t\t\t\t\t\t\t\t{cat.breed}\n\t\t\t\t\t\t\t\t\t<div slot=\"detail\">Country: {cat.country}</div>\n\t\t\t\t\t\t\t\t</smoothly-table-expandable-cell>\n\t\t\t\t\t\t\t\t<smoothly-table-expandable-cell>\n\t\t\t\t\t\t\t\t\t{cat.coat}\n\t\t\t\t\t\t\t\t\t<div slot=\"detail\">Pattern: {cat.pattern}</div>\n\t\t\t\t\t\t\t\t</smoothly-table-expandable-cell>\n\t\t\t\t\t\t\t</smoothly-table-row>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</smoothly-table>,\n\t\t\t ]\n\t}\n}\n"]}
|
|
@@ -2,7 +2,9 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
export class TableDemo {
|
|
3
3
|
render() {
|
|
4
4
|
return [
|
|
5
|
-
h("
|
|
5
|
+
h("h4", null, "Filtered & Checked Table"),
|
|
6
|
+
h("smoothly-table-demo-filtered", null),
|
|
7
|
+
h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "Header A"), h("smoothly-table-header", null, "Header B"), h("smoothly-table-header", null, "Header C"), h("smoothly-table-header", null, "Header D")), h("smoothly-table-row", null, h("smoothly-table-expandable-cell", null, "normal row (exp.cell)", h("div", { slot: "detail" }, "expandable cell 1 content")), h("smoothly-table-expandable-cell", null, "expandable cell", h("div", { slot: "detail" }, "expandable cell 2 content")), h("smoothly-table-expandable-cell", null, "expandable cell", h("div", { slot: "detail" }, "expandable cell 3 content")), h("smoothly-table-expandable-cell", null, "expandable cell", h("div", { slot: "detail" }, "expandable cell 4 content"))), h("smoothly-table-row", null, h("smoothly-table-cell", null, "normal row (nor.cell)\""), h("smoothly-table-cell", null, "normal cell"), h("smoothly-table-expandable-cell", null, "expandable cell", h("div", { slot: "detail" }, "expandable cell details.")), h("smoothly-table-expandable-cell", null, "expandable cell", h("div", { slot: "detail" }, "expandable cell details."))), h("smoothly-table-expandable-row", null, h("smoothly-table-cell", null, "expandable row (nor.cell)"), h("smoothly-table-cell", null, "Normal cell"), h("smoothly-table-cell", null, "normal cell"), h("smoothly-table-cell", null, "Normal cell"), h("div", { slot: "detail" }, "expandable row content"))),
|
|
6
8
|
h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "Header A")), h("smoothly-table-expandable-row", null, h("smoothly-table-cell", null, "A Content"), h("div", { slot: "detail" }, h("smoothly-tab-switch", null, h("smoothly-tab", { label: "innertable 1", open: true }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "Header B")), h("smoothly-table-expandable-row", null, "B Content"))), h("smoothly-tab", { label: "innertable 2" }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "Header C")), h("smoothly-table-expandable-row", null, h("smoothly-table-cell", null, "C Content")))))))),
|
|
7
9
|
h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "A"), h("smoothly-table-header", null, "B")), h("smoothly-table-expandable-row", null, h("smoothly-table-cell", null, "a row"), h("smoothly-table-cell", null, "b row"), h("div", { slot: "detail" }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "C"), h("smoothly-table-header", null, "D")), h("smoothly-table-expandable-row", null, h("smoothly-table-cell", null, "c"), h("smoothly-table-cell", null, "d"), h("div", { slot: "detail" }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "E"), h("smoothly-table-header", null, "F")), h("smoothly-table-expandable-row", null, h("smoothly-table-cell", null, "e row"), h("smoothly-table-cell", null, "f row"), h("div", { slot: "detail" }, "nested expandable row expansion e f")))))))), h("smoothly-table-expandable-row", null, h("smoothly-table-cell", null, h("span", null, "one"), h("span", null, "two"), h("span", null, "three")), h("smoothly-table-cell", null, "five", h("smoothly-icon", { name: "paper-plane-sharp", size: "small" })), h("div", { slot: "detail" }, "four")), h("smoothly-table-row", null, h("smoothly-table-expandable-cell", null, "a cell", h("div", { slot: "detail" }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "E"), h("smoothly-table-header", null, "F")), h("smoothly-table-row", null, h("smoothly-table-expandable-cell", null, "e cell", h("div", { slot: "detail" }, "nested expandable cell expansion e")), h("smoothly-table-expandable-cell", null, "f cell", h("div", { slot: "detail" }, "nested expandable cell expansion f")))))), h("smoothly-table-expandable-cell", null, "b cell", h("div", { slot: "detail" }, h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "C"), h("smoothly-table-header", null, "D")), h("smoothly-table-row", null, h("smoothly-table-expandable-cell", null, "c cell", h("div", { slot: "detail" }, "nested expandable cell expansion c")), h("smoothly-table-expandable-cell", null, "d cell", h("div", { slot: "detail" }, "nested expandable cell expansion d")))))))),
|
|
8
10
|
h("smoothly-table", null, h("smoothly-table-row", null, h("smoothly-table-header", null, "display"), h("smoothly-table-header", null, "contents")), h("smoothly-table-expandable-row", null, h("div", { class: "content" }, h("smoothly-table-cell", null, "A"), h("smoothly-table-cell", null, "B")), h("div", { slot: "detail" }, "expansion"))),
|
|
@@ -21,3 +23,4 @@ export class TableDemo {
|
|
|
21
23
|
};
|
|
22
24
|
}
|
|
23
25
|
}
|
|
26
|
+
//# sourceMappingURL=index.js.map
|