smoothly 1.0.1-alpha.8 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/smoothly-app_81.cjs.entry.js +94 -23
  3. package/dist/cjs/smoothly-app_81.cjs.entry.js.map +1 -1
  4. package/dist/cjs/smoothly.cjs.js +1 -1
  5. package/dist/collection/components/form/index.js +27 -2
  6. package/dist/collection/components/form/index.js.map +1 -1
  7. package/dist/collection/components/input/Editable.js +4 -0
  8. package/dist/collection/components/input/Editable.js.map +1 -1
  9. package/dist/collection/components/input/Input.js +2 -0
  10. package/dist/collection/components/input/Input.js.map +1 -1
  11. package/dist/collection/components/input/date/index.js +21 -1
  12. package/dist/collection/components/input/date/index.js.map +1 -1
  13. package/dist/collection/components/input/date/range/index.js +21 -1
  14. package/dist/collection/components/input/date/range/index.js.map +1 -1
  15. package/dist/collection/components/input/demo/index.js +1 -1
  16. package/dist/collection/components/input/demo/index.js.map +1 -1
  17. package/dist/collection/components/input/file/index.js +223 -33
  18. package/dist/collection/components/input/file/index.js.map +1 -1
  19. package/dist/collection/components/input/file/style.css +10 -15
  20. package/dist/collection/model/index.js.map +1 -1
  21. package/dist/collection/smoothly.js.map +1 -1
  22. package/dist/custom-elements/index.js +95 -24
  23. package/dist/custom-elements/index.js.map +1 -1
  24. package/dist/esm/loader.js +1 -1
  25. package/dist/esm/smoothly-app_81.entry.js +94 -23
  26. package/dist/esm/smoothly-app_81.entry.js.map +1 -1
  27. package/dist/esm/smoothly.js +1 -1
  28. package/dist/smoothly/p-7f49e208.entry.js +2 -0
  29. package/dist/smoothly/p-7f49e208.entry.js.map +1 -0
  30. package/dist/smoothly/smoothly.esm.js +1 -1
  31. package/dist/smoothly/smoothly.esm.js.map +1 -1
  32. package/dist/types/components/form/index.d.ts +5 -2
  33. package/dist/types/components/input/Editable.d.ts +4 -0
  34. package/dist/types/components/input/Input.d.ts +3 -0
  35. package/dist/types/components/input/date/index.d.ts +3 -2
  36. package/dist/types/components/input/date/range/index.d.ts +3 -2
  37. package/dist/types/components/input/file/index.d.ts +27 -8
  38. package/dist/types/components.d.ts +15 -2
  39. package/dist/types/model/index.d.ts +1 -1
  40. package/dist/types/smoothly.d.ts +1 -1
  41. package/package.json +1 -1
  42. package/dist/smoothly/p-22644183.entry.js +0 -2
  43. package/dist/smoothly/p-22644183.entry.js.map +0 -1
@@ -15,7 +15,7 @@ const patchEsm = () => {
15
15
  const defineCustomElements = (win, options) => {
16
16
  if (typeof window === 'undefined') return Promise.resolve();
17
17
  return patchEsm().then(() => {
18
- return index.bootstrapLazy(JSON.parse("[[\"smoothly-addresses.cjs\",[[2,\"smoothly-addresses\",{\"value\":[16],\"editable\":[16]}]]],[\"smoothly-checkbox.cjs\",[[6,\"smoothly-checkbox\",{\"size\":[1],\"checked\":[1540],\"intermediate\":[1540],\"unavailable\":[516],\"disabled\":[516],\"name\":[1],\"value\":[8],\"t\":[32],\"toggle\":[64],\"clear\":[64]}]]],[\"smoothly-accordion.cjs\",[[6,\"smoothly-accordion\",{\"value\":[1025],\"removeItem\":[64]},[[0,\"smoothlyOpen\",\"handleOpenClose\"],[0,\"smoothlyClose\",\"handleOpenClose\"],[0,\"smoothlyAccordionItemWillLoad\",\"onAccordionItemDidLoad\"]]]]],[\"smoothly-accordion-item.cjs\",[[6,\"smoothly-accordion-item\",{\"name\":[1],\"brand\":[1],\"open\":[1540]}]]],[\"smoothly-color.cjs\",[[6,\"smoothly-color\",{\"color\":[513]}]]],[\"smoothly-country.cjs\",[[2,\"smoothly-country\",{\"value\":[1],\"text\":[1],\"language\":[32]}]]],[\"smoothly-display-date-time.cjs\",[[2,\"smoothly-display-date-time\",{\"datetime\":[1]}]]],[\"smoothly-google-font.cjs\",[[2,\"smoothly-google-font\",{\"value\":[1]}]]],[\"smoothly-reorder.cjs\",[[0,\"smoothly-reorder\"]]],[\"smoothly-trigger-sink.cjs\",[[6,\"smoothly-trigger-sink\",{\"context\":[16],\"destination\":[1],\"filter\":[1]},[[0,\"trigger\",\"TriggerListener\"]]]]],[\"smoothly-trigger-source.cjs\",[[6,\"smoothly-trigger-source\",{\"listen\":[1]}]]],[\"smoothly-app_81.cjs\",[[0,\"smoothly-app-demo\",{\"baseUrl\":[1,\"base-url\"]}],[0,\"smoothly-input-demo\",{\"duration\":[32]}],[2,\"smoothly-table-demo\"],[0,\"smoothly-display-demo\"],[0,\"smoothly-button-demo\"],[4,\"smoothly-app\",{\"label\":[1],\"color\":[1],\"home\":[1],\"menuOpen\":[1540,\"menu-open\"],\"selected\":[32],\"selectRoom\":[64]},[[8,\"popstate\",\"locationChangeHandler\"],[0,\"smoothlyRoomSelected\",\"roomSelectedHandler\"],[0,\"smoothlyRoomLoaded\",\"roomLoadedHandler\"],[8,\"click\",\"clickHandler\"]]],[0,\"smoothly-dialog-demo\"],[6,\"smoothly-app-room\",{\"label\":[513],\"icon\":[513],\"disabled\":[516],\"path\":[1],\"to\":[1],\"selected\":[1540],\"content\":[16],\"getContent\":[64],\"setSelected\":[64]}],[6,\"smoothly-theme-picker\",{\"element\":[1]}],[2,\"smoothly-select-demo\"],[2,\"smoothly-theme-colors\"],[2,\"smoothly-icon-demo\"],[2,\"smoothly-table-demo-filtered\",{\"criteria\":[32],\"cats\":[32],\"selector\":[32]},[[0,\"smoothlyFilter\",\"onFilterUpdate\"],[0,\"smoothlyInput\",\"smoothlyInputHandler\"]]],[2,\"smoothly-table-testing\",{\"counter\":[32]}],[2,\"smoothly-picker-demo\",{\"counter\":[32],\"data\":[32],\"change\":[32]},[[0,\"smoothlyFormSubmit\",\"submitHandler\"]]],[2,\"smoothly-input-demo-controlled-form\",{\"name\":[32]}],[6,\"smoothly-input-date\",{\"color\":[1537],\"looks\":[1537],\"name\":[513],\"value\":[1025],\"open\":[1028],\"max\":[1025],\"min\":[1025],\"showLabel\":[516,\"show-label\"],\"disabled\":[1028],\"clear\":[64]},[[0,\"smoothlyInput\",\"smoothlyInputHandler\"],[0,\"smoothlyInputLooks\",\"smoothlyInputLooksHandler\"],[0,\"smoothlyDateSet\",\"dateSetHandler\"]]],[2,\"smoothly-input-date-range\",{\"color\":[1537],\"looks\":[1537],\"name\":[513],\"value\":[1025],\"start\":[1025],\"end\":[1025],\"max\":[1025],\"min\":[1025],\"open\":[1028],\"showLabel\":[516,\"show-label\"],\"labelStart\":[1,\"label-start\"],\"labelEnd\":[1,\"label-end\"],\"clear\":[64]},[[0,\"smoothlyInput\",\"smoothlyInputHandler\"],[0,\"smoothlyInputLooks\",\"smoothlyInputLooksHandler\"],[0,\"smoothlyStartChange\",\"onStartChanged\"],[0,\"smoothlyEndChange\",\"onEndChanged\"],[0,\"smoothlyDateRangeSet\",\"onDateRangeSet\"]]],[6,\"smoothly-notifier\",{\"notices\":[32]},[[0,\"notice\",\"onNotice\"],[0,\"remove\",\"onRemove\"]]],[6,\"smoothly-dialog\",{\"color\":[513],\"open\":[1540],\"closable\":[516],\"header\":[513]},[[0,\"trigger\",\"TriggerListener\"]]],[2,\"smoothly-input-color\",{\"value\":[1025],\"looks\":[1537],\"name\":[1],\"clear\":[64]},[[0,\"smoothlyInput\",\"smoothlyInputHandler\"],[0,\"smoothlyInputLooks\",\"smoothlyInputLooksHandler\"],[0,\"smoothlyInputLoad\",\"smoothlyInputLoadHandler\"]]],[2,\"smoothly-burger\",{\"visible\":[1540],\"open\":[1540],\"mediaQuery\":[513,\"media-query\"],\"history\":[32]},[[0,\"click\",\"clickHandler\"],[9,\"resize\",\"resizeHandler\"]]],[6,\"smoothly-input-checkbox\",{\"name\":[1],\"changed\":[1028],\"readonly\":[1540],\"checked\":[1028],\"value\":[4],\"looks\":[1537],\"disabled\":[516],\"clear\":[64],\"listen\":[64],\"edit\":[64],\"reset\":[64],\"setInitialValue\":[64]}],[6,\"smoothly-input-file\",{\"accept\":[1],\"color\":[1537],\"looks\":[1537],\"camera\":[513],\"name\":[513],\"showLabel\":[516,\"show-label\"],\"value\":[1040],\"placeholder\":[1537],\"dragging\":[32],\"clear\":[64]}],[6,\"smoothly-input-radio-item\",{\"value\":[1032],\"selected\":[1028],\"looks\":[1537],\"name\":[1025]}],[6,\"smoothly-summary\",{\"open\":[1540],\"color\":[1],\"fill\":[1],\"size\":[1]}],[2,\"smoothly-theme-color\",{\"color\":[1]}],[1,\"smoothly-toggle-switch\",{\"checkmark\":[516],\"selected\":[1540],\"disabled\":[516],\"size\":[513],\"color\":[513],\"fill\":[513]}],[0,\"smoothly-urlencoded\",{\"data\":[1]}],[2,\"smoothly-display-amount\",{\"amount\":[8],\"currency\":[1],\"toInteger\":[4,\"to-integer\"]}],[2,\"smoothly-frame\",{\"url\":[1],\"name\":[1],\"origin\":[1],\"send\":[64]}],[6,\"smoothly-input-radio\",{\"changed\":[1028],\"value\":[1032],\"looks\":[1537],\"clearable\":[4],\"readonly\":[1540],\"name\":[1],\"listen\":[64],\"clear\":[64],\"edit\":[64],\"reset\":[64],\"setInitialValue\":[64]},[[0,\"smoothlyRadioButtonRegister\",\"handleRegister\"],[0,\"smoothlyInputLoad\",\"SmoothlyInputLoadHandler\"],[0,\"smoothlySelect\",\"smoothlyRadioInputHandler\"]]],[6,\"smoothly-input-range\",{\"value\":[1026],\"looks\":[1537],\"changed\":[1028],\"readonly\":[1540],\"min\":[2],\"max\":[2],\"name\":[1],\"labelText\":[1,\"label-text\"],\"step\":[8],\"outputSide\":[1,\"output-side\"],\"clear\":[64],\"listen\":[64],\"edit\":[64],\"reset\":[64],\"setInitialValue\":[64]}],[6,\"smoothly-label\",{\"hue\":[2],\"description\":[1],\"shape\":[513]}],[6,\"smoothly-popup\",{\"visible\":[1540],\"direction\":[1537],\"cssVariables\":[32]}],[6,\"smoothly-quiet\",{\"color\":[1]}],[2,\"smoothly-skeleton\",{\"widths\":[16],\"width\":[1025],\"color\":[1],\"period\":[2],\"distance\":[1],\"align\":[513]}],[2,\"smoothly-svg\",{\"url\":[513],\"size\":[513],\"color\":[1]}],[6,\"smoothly-toggle\",{\"selected\":[1540],\"shape\":[513],\"disabled\":[516],\"name\":[1],\"value\":[8]},[[0,\"click\",\"onClick\"]]],[6,\"smoothly-filter-picker\",{\"label\":[1],\"property\":[1],\"multiple\":[4],\"type\":[1]},[[0,\"smoothlyPickerOptionChange\",\"optionChangeHandler\"]]],[6,\"smoothly-filter\",{\"detailChildren\":[32],\"criteria\":[32],\"expanded\":[32]},[[0,\"smoothlyFilterUpdate\",\"updateHandler\"],[0,\"smoothlyFilterManipulate\",\"manipulateHandler\"],[0,\"smoothlyFilterField\",\"filterFieldHandler\"]]],[6,\"smoothly-input-submit\",{\"delete\":[516],\"color\":[1],\"expand\":[513],\"fill\":[513],\"disabled\":[1540],\"display\":[1540],\"shape\":[513],\"type\":[513],\"size\":[513],\"toolTip\":[1,\"tool-tip\"]}],[6,\"smoothly-filter-input\",{\"property\":[1],\"placeholder\":[1],\"needle\":[32]}],[2,\"smoothly-notification\",{\"notice\":[16],\"closable\":[4],\"icon\":[4],\"tick\":[32]},[[0,\"trigger\",\"onTrigger\"]]],[2,\"smoothly-back-to-top\",{\"opacity\":[1],\"bottom\":[1],\"right\":[1],\"visible\":[32]}],[2,\"smoothly-filter-toggle\",{\"icon\":[1],\"properties\":[16],\"toolTip\":[1,\"tool-tip\"],\"not\":[4],\"flip\":[516],\"active\":[1028]}],[6,\"smoothly-input-edit\",{\"color\":[513],\"expand\":[513],\"fill\":[513],\"disabled\":[1540],\"display\":[1540],\"shape\":[513],\"type\":[513],\"size\":[513],\"toolTip\":[1,\"tool-tip\"]},[[0,\"click\",\"clickHandler\"]]],[6,\"smoothly-input-reset\",{\"color\":[513],\"expand\":[513],\"fill\":[513],\"disabled\":[1540],\"size\":[513],\"shape\":[513],\"display\":[1540],\"type\":[513],\"tooltip\":[1]},[[0,\"click\",\"clickHandler\"]]],[6,\"smoothly-lazy\",{\"show\":[1028],\"content\":[16]}],[6,\"smoothly-input-clear\",{\"color\":[513],\"expand\":[513],\"fill\":[513],\"disabled\":[1540],\"size\":[513],\"shape\":[513],\"display\":[1540],\"type\":[513]},[[0,\"click\",\"clickHandler\"]]],[6,\"smoothly-tab\",{\"label\":[1],\"open\":[1540]},[[0,\"click\",\"onClick\"]]],[6,\"smoothly-tab-switch\",{\"selectedElement\":[32]},[[0,\"expansionOpen\",\"openChanged\"]]],[6,\"smoothly-table-expandable-row\",{\"open\":[1540],\"allowSpotlight\":[32],\"spotlight\":[32]},[[0,\"smoothlyTableLoad\",\"handleTableLoaded\"]]],[2,\"smoothly-theme-color-variant\",{\"color\":[513],\"variant\":[513]}],[0,\"smoothly-tuple\",{\"tuple\":[16]}],[2,\"smoothly-calendar\",{\"month\":[1025],\"value\":[1025],\"start\":[1025],\"end\":[1025],\"max\":[1025],\"min\":[1025],\"doubleInput\":[516,\"double-input\"],\"firstSelected\":[32]}],[2,\"smoothly-filter-field\",{\"criteria\":[8],\"clear\":[64]}],[6,\"smoothly-table-cell\"],[6,\"smoothly-table-expandable-cell\",{\"open\":[1540],\"allowSpotlight\":[32],\"spotlight\":[32]},[[0,\"click\",\"onClick\"],[0,\"smoothlyTableLoad\",\"handleTableLoaded\"]]],[2,\"smoothly-load-more\",{\"offset\":[1],\"name\":[1],\"multiple\":[4]}],[6,\"smoothly-table\",{\"root\":[1540],\"color\":[1537],\"align\":[513],\"open\":[1540]},[[0,\"smoothlyExpandableLoad\",\"handleExpandableLoaded\"],[0,\"smoothlyExpandableChange\",\"handleExpandableState\"],[0,\"smoothlySpotlightChange\",\"handleSpotlightState\"],[0,\"smoothlyNestedTable\",\"handleNestedTable\"],[0,\"smoothlyExpansionLoad\",\"handleEvents\"],[0,\"smoothlyExpansionOpen\",\"handleEvents\"]]],[6,\"smoothly-table-footer\"],[6,\"smoothly-table-header\",{\"name\":[1]}],[6,\"smoothly-table-row\",{\"open\":[1540]},[[0,\"smoothlyExpansionLoad\",\"onExpansionLoad\"],[0,\"smoothlyExpandableChange\",\"onExpansionChange\"],[0,\"smoothlyExpansionOpen\",\"onExpansionOpen\"]]],[2,\"smoothly-input-month\",{\"value\":[1025]}],[6,\"smoothly-button-confirm\",{\"color\":[1],\"name\":[513],\"doubleClickTime\":[2,\"double-click-time\"],\"expand\":[513],\"fill\":[1],\"disabled\":[516],\"shape\":[1],\"type\":[1],\"size\":[1],\"clickTimeStamp\":[32]}],[2,\"smoothly-display\",{\"type\":[1],\"value\":[8],\"currency\":[1],\"country\":[1],\"format\":[16]}],[6,\"smoothly-submit\",{\"color\":[513],\"expand\":[513],\"fill\":[513],\"disabled\":[516],\"type\":[513],\"size\":[513],\"shape\":[513],\"prevent\":[4]},[[0,\"click\",\"clickHandler\"]]],[6,\"smoothly-picker\",{\"looks\":[1537],\"name\":[513],\"changed\":[1028],\"open\":[1540],\"mutable\":[516],\"multiple\":[516],\"readonly\":[1540],\"validator\":[16],\"selected\":[32],\"display\":[32],\"clear\":[64],\"listen\":[64],\"edit\":[64],\"reset\":[64],\"setInitialValue\":[64]},[[0,\"smoothlyInputLooks\",\"smoothlyInputLooksHandler\"],[0,\"smoothlyPickerMenuLoaded\",\"menuLoadedHandler\"],[0,\"smoothlyPickerOptionLoaded\",\"optionLoadedHandler\"],[0,\"smoothlyPickerOptionChange\",\"optionChangeHandler\"],[8,\"click\",\"clickHandler\"],[8,\"focusin\",\"focusHandler\"]]],[6,\"smoothly-trigger\",{\"color\":[513],\"fill\":[513],\"disabled\":[516],\"type\":[513],\"name\":[1],\"value\":[8]},[[0,\"click\",\"onClick\"]]],[6,\"smoothly-picker-menu\",{\"looks\":[1],\"open\":[516],\"multiple\":[516],\"mutable\":[516],\"readonly\":[516],\"validator\":[16],\"backend\":[32],\"options\":[32],\"created\":[32],\"search\":[32],\"valid\":[32],\"display\":[32],\"flip\":[32],\"flipChecked\":[32]},[[9,\"scroll\",\"scrollHandler\"],[0,\"smoothlyPickerOptionLoad\",\"optionLoadHandler\"],[0,\"smoothlyPickerOptionLoaded\",\"optionLoadedHandler\"],[0,\"smoothlyPickerOptionChange\",\"optionChangeHandler\"],[0,\"smoothlySlotEmpty\",\"emptyDisplayHandler\"]]],[6,\"smoothly-input-select\",{\"name\":[1],\"color\":[1537],\"looks\":[1537],\"showSelected\":[1540,\"show-selected\"],\"readonly\":[1540],\"multiple\":[4],\"clearable\":[4],\"changed\":[1028],\"placeholder\":[520],\"menuHeight\":[1,\"menu-height\"],\"open\":[32],\"selected\":[32],\"filter\":[32],\"listen\":[64],\"reset\":[64],\"clear\":[64],\"edit\":[64],\"setInitialValue\":[64]},[[0,\"smoothlyInputLoad\",\"smoothlyInputLoadHandler\"],[8,\"click\",\"onWindowClick\"],[0,\"smoothlyItemSelect\",\"onItemSelect\"],[0,\"keydown\",\"onKeyDown\"]]],[4,\"smoothly-form\",{\"color\":[1537],\"value\":[1040],\"action\":[1],\"type\":[1],\"readonly\":[1028],\"looks\":[513],\"name\":[1],\"prevent\":[4],\"changed\":[1028],\"processing\":[32],\"listen\":[64],\"submit\":[64],\"clear\":[64],\"edit\":[64],\"reset\":[64],\"setInitialValue\":[64]},[[0,\"smoothlyInputLooks\",\"smoothlyInputLooksHandler\"],[0,\"smoothlyInput\",\"smoothlyInputHandler\"],[8,\"smoothlyFormSubmit\",\"windowSubmitHandler\"],[0,\"smoothlyFormSubmit\",\"submitHandler\"],[0,\"smoothlyInputLoad\",\"smoothlyInputLoadHandler\"],[0,\"smoothlyFormDisable\",\"smoothlyFormDisableHandler\"]]],[1,\"smoothly-picker-option\",{\"selected\":[1540],\"visible\":[1540],\"value\":[1032],\"search\":[1040],\"position\":[514],\"required\":[516],\"readonly\":[32],\"slotted\":[32],\"clickHandler\":[64]}],[6,\"smoothly-button\",{\"color\":[513],\"expand\":[513],\"fill\":[513],\"disabled\":[516],\"type\":[513],\"size\":[513],\"shape\":[513],\"link\":[1]}],[6,\"smoothly-item\",{\"value\":[8],\"selected\":[1540],\"marked\":[1540],\"selectable\":[4],\"filter\":[64]},[[0,\"click\",\"onClick\"]]],[6,\"smoothly-slot-elements\",{\"clone\":[4],\"nodes\":[1040]}],[6,\"smoothly-slotted-elements\",{\"clone\":[4]}],[2,\"smoothly-spinner\",{\"active\":[516],\"size\":[513]}],[6,\"smoothly-input\",{\"color\":[1537],\"delay\":[2],\"looks\":[1537],\"name\":[513],\"value\":[1032],\"type\":[513],\"required\":[516],\"showLabel\":[516,\"show-label\"],\"autocomplete\":[4],\"placeholder\":[513],\"disabled\":[4],\"readonly\":[1540],\"currency\":[513],\"changed\":[1028],\"formatter\":[32],\"initialValue\":[32],\"listen\":[64],\"clear\":[64],\"edit\":[64],\"reset\":[64],\"setInitialValue\":[64],\"getFormData\":[64],\"setKeepFocusOnReRender\":[64],\"setSelectionRange\":[64]},[[0,\"smoothlyInputLoad\",\"SmoothlyInputLoadHandler\"]]],[2,\"smoothly-icon\",{\"color\":[513],\"fill\":[513],\"name\":[513],\"size\":[513],\"rotate\":[514],\"flip\":[513],\"toolTip\":[1,\"tool-tip\"],\"latestPromise\":[32],\"document\":[32]}]]],[\"smoothly-address-display.cjs\",[[2,\"smoothly-address-display\",{\"value\":[16],\"editable\":[4]}]]],[\"smoothly-address.cjs\",[[2,\"smoothly-address\",{\"value\":[16],\"editable\":[4]}]]]]"), options);
18
+ return index.bootstrapLazy(JSON.parse("[[\"smoothly-addresses.cjs\",[[2,\"smoothly-addresses\",{\"value\":[16],\"editable\":[16]}]]],[\"smoothly-checkbox.cjs\",[[6,\"smoothly-checkbox\",{\"size\":[1],\"checked\":[1540],\"intermediate\":[1540],\"unavailable\":[516],\"disabled\":[516],\"name\":[1],\"value\":[8],\"t\":[32],\"toggle\":[64],\"clear\":[64]}]]],[\"smoothly-accordion.cjs\",[[6,\"smoothly-accordion\",{\"value\":[1025],\"removeItem\":[64]},[[0,\"smoothlyOpen\",\"handleOpenClose\"],[0,\"smoothlyClose\",\"handleOpenClose\"],[0,\"smoothlyAccordionItemWillLoad\",\"onAccordionItemDidLoad\"]]]]],[\"smoothly-accordion-item.cjs\",[[6,\"smoothly-accordion-item\",{\"name\":[1],\"brand\":[1],\"open\":[1540]}]]],[\"smoothly-color.cjs\",[[6,\"smoothly-color\",{\"color\":[513]}]]],[\"smoothly-country.cjs\",[[2,\"smoothly-country\",{\"value\":[1],\"text\":[1],\"language\":[32]}]]],[\"smoothly-display-date-time.cjs\",[[2,\"smoothly-display-date-time\",{\"datetime\":[1]}]]],[\"smoothly-google-font.cjs\",[[2,\"smoothly-google-font\",{\"value\":[1]}]]],[\"smoothly-reorder.cjs\",[[0,\"smoothly-reorder\"]]],[\"smoothly-trigger-sink.cjs\",[[6,\"smoothly-trigger-sink\",{\"context\":[16],\"destination\":[1],\"filter\":[1]},[[0,\"trigger\",\"TriggerListener\"]]]]],[\"smoothly-trigger-source.cjs\",[[6,\"smoothly-trigger-source\",{\"listen\":[1]}]]],[\"smoothly-app_81.cjs\",[[0,\"smoothly-app-demo\",{\"baseUrl\":[1,\"base-url\"]}],[0,\"smoothly-input-demo\",{\"duration\":[32]}],[2,\"smoothly-table-demo\"],[0,\"smoothly-display-demo\"],[0,\"smoothly-button-demo\"],[4,\"smoothly-app\",{\"label\":[1],\"color\":[1],\"home\":[1],\"menuOpen\":[1540,\"menu-open\"],\"selected\":[32],\"selectRoom\":[64]},[[8,\"popstate\",\"locationChangeHandler\"],[0,\"smoothlyRoomSelected\",\"roomSelectedHandler\"],[0,\"smoothlyRoomLoaded\",\"roomLoadedHandler\"],[8,\"click\",\"clickHandler\"]]],[0,\"smoothly-dialog-demo\"],[6,\"smoothly-app-room\",{\"label\":[513],\"icon\":[513],\"disabled\":[516],\"path\":[1],\"to\":[1],\"selected\":[1540],\"content\":[16],\"getContent\":[64],\"setSelected\":[64]}],[6,\"smoothly-theme-picker\",{\"element\":[1]}],[2,\"smoothly-select-demo\"],[2,\"smoothly-theme-colors\"],[2,\"smoothly-icon-demo\"],[2,\"smoothly-table-demo-filtered\",{\"criteria\":[32],\"cats\":[32],\"selector\":[32]},[[0,\"smoothlyFilter\",\"onFilterUpdate\"],[0,\"smoothlyInput\",\"smoothlyInputHandler\"]]],[2,\"smoothly-table-testing\",{\"counter\":[32]}],[2,\"smoothly-picker-demo\",{\"counter\":[32],\"data\":[32],\"change\":[32]},[[0,\"smoothlyFormSubmit\",\"submitHandler\"]]],[2,\"smoothly-input-demo-controlled-form\",{\"name\":[32]}],[6,\"smoothly-input-date\",{\"color\":[1537],\"looks\":[1537],\"name\":[513],\"value\":[1025],\"open\":[1028],\"max\":[1025],\"min\":[1025],\"showLabel\":[516,\"show-label\"],\"disabled\":[1028],\"clear\":[64]},[[0,\"smoothlyInput\",\"smoothlyInputHandler\"],[0,\"smoothlyInputLooks\",\"smoothlyInputLooksHandler\"],[0,\"smoothlyDateSet\",\"dateSetHandler\"]]],[2,\"smoothly-input-date-range\",{\"color\":[1537],\"looks\":[1537],\"name\":[513],\"value\":[1025],\"start\":[1025],\"end\":[1025],\"max\":[1025],\"min\":[1025],\"open\":[1028],\"showLabel\":[516,\"show-label\"],\"labelStart\":[1,\"label-start\"],\"labelEnd\":[1,\"label-end\"],\"clear\":[64]},[[0,\"smoothlyInput\",\"smoothlyInputHandler\"],[0,\"smoothlyInputLooks\",\"smoothlyInputLooksHandler\"],[0,\"smoothlyStartChange\",\"onStartChanged\"],[0,\"smoothlyEndChange\",\"onEndChanged\"],[0,\"smoothlyDateRangeSet\",\"onDateRangeSet\"]]],[6,\"smoothly-notifier\",{\"notices\":[32]},[[0,\"notice\",\"onNotice\"],[0,\"remove\",\"onRemove\"]]],[6,\"smoothly-dialog\",{\"color\":[513],\"open\":[1540],\"closable\":[516],\"header\":[513]},[[0,\"trigger\",\"TriggerListener\"]]],[2,\"smoothly-input-color\",{\"value\":[1025],\"looks\":[1537],\"name\":[1],\"clear\":[64]},[[0,\"smoothlyInput\",\"smoothlyInputHandler\"],[0,\"smoothlyInputLooks\",\"smoothlyInputLooksHandler\"],[0,\"smoothlyInputLoad\",\"smoothlyInputLoadHandler\"]]],[2,\"smoothly-burger\",{\"visible\":[1540],\"open\":[1540],\"mediaQuery\":[513,\"media-query\"],\"history\":[32]},[[0,\"click\",\"clickHandler\"],[9,\"resize\",\"resizeHandler\"]]],[6,\"smoothly-input-checkbox\",{\"name\":[1],\"changed\":[1028],\"readonly\":[1540],\"checked\":[1028],\"value\":[4],\"looks\":[1537],\"disabled\":[516],\"clear\":[64],\"listen\":[64],\"edit\":[64],\"reset\":[64],\"setInitialValue\":[64]}],[6,\"smoothly-input-file\",{\"changed\":[1028],\"readonly\":[1540],\"accept\":[1],\"color\":[1537],\"looks\":[1537],\"camera\":[513],\"name\":[513],\"showLabel\":[516,\"show-label\"],\"value\":[1040],\"placeholder\":[1537],\"dragging\":[32],\"clear\":[64],\"listen\":[64],\"edit\":[64],\"reset\":[64],\"setInitialValue\":[64],\"binary\":[64]}],[6,\"smoothly-input-radio-item\",{\"value\":[1032],\"selected\":[1028],\"looks\":[1537],\"name\":[1025]}],[6,\"smoothly-summary\",{\"open\":[1540],\"color\":[1],\"fill\":[1],\"size\":[1]}],[2,\"smoothly-theme-color\",{\"color\":[1]}],[1,\"smoothly-toggle-switch\",{\"checkmark\":[516],\"selected\":[1540],\"disabled\":[516],\"size\":[513],\"color\":[513],\"fill\":[513]}],[0,\"smoothly-urlencoded\",{\"data\":[1]}],[2,\"smoothly-display-amount\",{\"amount\":[8],\"currency\":[1],\"toInteger\":[4,\"to-integer\"]}],[2,\"smoothly-frame\",{\"url\":[1],\"name\":[1],\"origin\":[1],\"send\":[64]}],[6,\"smoothly-input-radio\",{\"changed\":[1028],\"value\":[1032],\"looks\":[1537],\"clearable\":[4],\"readonly\":[1540],\"name\":[1],\"listen\":[64],\"clear\":[64],\"edit\":[64],\"reset\":[64],\"setInitialValue\":[64]},[[0,\"smoothlyRadioButtonRegister\",\"handleRegister\"],[0,\"smoothlyInputLoad\",\"SmoothlyInputLoadHandler\"],[0,\"smoothlySelect\",\"smoothlyRadioInputHandler\"]]],[6,\"smoothly-input-range\",{\"value\":[1026],\"looks\":[1537],\"changed\":[1028],\"readonly\":[1540],\"min\":[2],\"max\":[2],\"name\":[1],\"labelText\":[1,\"label-text\"],\"step\":[8],\"outputSide\":[1,\"output-side\"],\"clear\":[64],\"listen\":[64],\"edit\":[64],\"reset\":[64],\"setInitialValue\":[64]}],[6,\"smoothly-label\",{\"hue\":[2],\"description\":[1],\"shape\":[513]}],[6,\"smoothly-popup\",{\"visible\":[1540],\"direction\":[1537],\"cssVariables\":[32]}],[6,\"smoothly-quiet\",{\"color\":[1]}],[2,\"smoothly-skeleton\",{\"widths\":[16],\"width\":[1025],\"color\":[1],\"period\":[2],\"distance\":[1],\"align\":[513]}],[2,\"smoothly-svg\",{\"url\":[513],\"size\":[513],\"color\":[1]}],[6,\"smoothly-toggle\",{\"selected\":[1540],\"shape\":[513],\"disabled\":[516],\"name\":[1],\"value\":[8]},[[0,\"click\",\"onClick\"]]],[6,\"smoothly-filter-picker\",{\"label\":[1],\"property\":[1],\"multiple\":[4],\"type\":[1]},[[0,\"smoothlyPickerOptionChange\",\"optionChangeHandler\"]]],[6,\"smoothly-filter\",{\"detailChildren\":[32],\"criteria\":[32],\"expanded\":[32]},[[0,\"smoothlyFilterUpdate\",\"updateHandler\"],[0,\"smoothlyFilterManipulate\",\"manipulateHandler\"],[0,\"smoothlyFilterField\",\"filterFieldHandler\"]]],[6,\"smoothly-input-submit\",{\"delete\":[516],\"color\":[1],\"expand\":[513],\"fill\":[513],\"disabled\":[1540],\"display\":[1540],\"shape\":[513],\"type\":[513],\"size\":[513],\"toolTip\":[1,\"tool-tip\"]}],[6,\"smoothly-filter-input\",{\"property\":[1],\"placeholder\":[1],\"needle\":[32]}],[2,\"smoothly-notification\",{\"notice\":[16],\"closable\":[4],\"icon\":[4],\"tick\":[32]},[[0,\"trigger\",\"onTrigger\"]]],[2,\"smoothly-back-to-top\",{\"opacity\":[1],\"bottom\":[1],\"right\":[1],\"visible\":[32]}],[2,\"smoothly-filter-toggle\",{\"icon\":[1],\"properties\":[16],\"toolTip\":[1,\"tool-tip\"],\"not\":[4],\"flip\":[516],\"active\":[1028]}],[6,\"smoothly-input-edit\",{\"color\":[513],\"expand\":[513],\"fill\":[513],\"disabled\":[1540],\"display\":[1540],\"shape\":[513],\"type\":[513],\"size\":[513],\"toolTip\":[1,\"tool-tip\"]},[[0,\"click\",\"clickHandler\"]]],[6,\"smoothly-input-reset\",{\"color\":[513],\"expand\":[513],\"fill\":[513],\"disabled\":[1540],\"size\":[513],\"shape\":[513],\"display\":[1540],\"type\":[513],\"tooltip\":[1]},[[0,\"click\",\"clickHandler\"]]],[6,\"smoothly-lazy\",{\"show\":[1028],\"content\":[16]}],[6,\"smoothly-input-clear\",{\"color\":[513],\"expand\":[513],\"fill\":[513],\"disabled\":[1540],\"size\":[513],\"shape\":[513],\"display\":[1540],\"type\":[513]},[[0,\"click\",\"clickHandler\"]]],[6,\"smoothly-tab\",{\"label\":[1],\"open\":[1540]},[[0,\"click\",\"onClick\"]]],[6,\"smoothly-tab-switch\",{\"selectedElement\":[32]},[[0,\"expansionOpen\",\"openChanged\"]]],[6,\"smoothly-table-expandable-row\",{\"open\":[1540],\"allowSpotlight\":[32],\"spotlight\":[32]},[[0,\"smoothlyTableLoad\",\"handleTableLoaded\"]]],[2,\"smoothly-theme-color-variant\",{\"color\":[513],\"variant\":[513]}],[0,\"smoothly-tuple\",{\"tuple\":[16]}],[2,\"smoothly-calendar\",{\"month\":[1025],\"value\":[1025],\"start\":[1025],\"end\":[1025],\"max\":[1025],\"min\":[1025],\"doubleInput\":[516,\"double-input\"],\"firstSelected\":[32]}],[2,\"smoothly-filter-field\",{\"criteria\":[8],\"clear\":[64]}],[6,\"smoothly-table-cell\"],[6,\"smoothly-table-expandable-cell\",{\"open\":[1540],\"allowSpotlight\":[32],\"spotlight\":[32]},[[0,\"click\",\"onClick\"],[0,\"smoothlyTableLoad\",\"handleTableLoaded\"]]],[2,\"smoothly-load-more\",{\"offset\":[1],\"name\":[1],\"multiple\":[4]}],[6,\"smoothly-table\",{\"root\":[1540],\"color\":[1537],\"align\":[513],\"open\":[1540]},[[0,\"smoothlyExpandableLoad\",\"handleExpandableLoaded\"],[0,\"smoothlyExpandableChange\",\"handleExpandableState\"],[0,\"smoothlySpotlightChange\",\"handleSpotlightState\"],[0,\"smoothlyNestedTable\",\"handleNestedTable\"],[0,\"smoothlyExpansionLoad\",\"handleEvents\"],[0,\"smoothlyExpansionOpen\",\"handleEvents\"]]],[6,\"smoothly-table-footer\"],[6,\"smoothly-table-header\",{\"name\":[1]}],[6,\"smoothly-table-row\",{\"open\":[1540]},[[0,\"smoothlyExpansionLoad\",\"onExpansionLoad\"],[0,\"smoothlyExpandableChange\",\"onExpansionChange\"],[0,\"smoothlyExpansionOpen\",\"onExpansionOpen\"]]],[2,\"smoothly-input-month\",{\"value\":[1025]}],[6,\"smoothly-button-confirm\",{\"color\":[1],\"name\":[513],\"doubleClickTime\":[2,\"double-click-time\"],\"expand\":[513],\"fill\":[1],\"disabled\":[516],\"shape\":[1],\"type\":[1],\"size\":[1],\"clickTimeStamp\":[32]}],[2,\"smoothly-display\",{\"type\":[1],\"value\":[8],\"currency\":[1],\"country\":[1],\"format\":[16]}],[6,\"smoothly-submit\",{\"color\":[513],\"expand\":[513],\"fill\":[513],\"disabled\":[516],\"type\":[513],\"size\":[513],\"shape\":[513],\"prevent\":[4]},[[0,\"click\",\"clickHandler\"]]],[6,\"smoothly-picker\",{\"looks\":[1537],\"name\":[513],\"changed\":[1028],\"open\":[1540],\"mutable\":[516],\"multiple\":[516],\"readonly\":[1540],\"validator\":[16],\"selected\":[32],\"display\":[32],\"clear\":[64],\"listen\":[64],\"edit\":[64],\"reset\":[64],\"setInitialValue\":[64]},[[0,\"smoothlyInputLooks\",\"smoothlyInputLooksHandler\"],[0,\"smoothlyPickerMenuLoaded\",\"menuLoadedHandler\"],[0,\"smoothlyPickerOptionLoaded\",\"optionLoadedHandler\"],[0,\"smoothlyPickerOptionChange\",\"optionChangeHandler\"],[8,\"click\",\"clickHandler\"],[8,\"focusin\",\"focusHandler\"]]],[6,\"smoothly-trigger\",{\"color\":[513],\"fill\":[513],\"disabled\":[516],\"type\":[513],\"name\":[1],\"value\":[8]},[[0,\"click\",\"onClick\"]]],[6,\"smoothly-picker-menu\",{\"looks\":[1],\"open\":[516],\"multiple\":[516],\"mutable\":[516],\"readonly\":[516],\"validator\":[16],\"backend\":[32],\"options\":[32],\"created\":[32],\"search\":[32],\"valid\":[32],\"display\":[32],\"flip\":[32],\"flipChecked\":[32]},[[9,\"scroll\",\"scrollHandler\"],[0,\"smoothlyPickerOptionLoad\",\"optionLoadHandler\"],[0,\"smoothlyPickerOptionLoaded\",\"optionLoadedHandler\"],[0,\"smoothlyPickerOptionChange\",\"optionChangeHandler\"],[0,\"smoothlySlotEmpty\",\"emptyDisplayHandler\"]]],[6,\"smoothly-input-select\",{\"name\":[1],\"color\":[1537],\"looks\":[1537],\"showSelected\":[1540,\"show-selected\"],\"readonly\":[1540],\"multiple\":[4],\"clearable\":[4],\"changed\":[1028],\"placeholder\":[520],\"menuHeight\":[1,\"menu-height\"],\"open\":[32],\"selected\":[32],\"filter\":[32],\"listen\":[64],\"reset\":[64],\"clear\":[64],\"edit\":[64],\"setInitialValue\":[64]},[[0,\"smoothlyInputLoad\",\"smoothlyInputLoadHandler\"],[8,\"click\",\"onWindowClick\"],[0,\"smoothlyItemSelect\",\"onItemSelect\"],[0,\"keydown\",\"onKeyDown\"]]],[4,\"smoothly-form\",{\"color\":[1537],\"value\":[1040],\"action\":[1],\"type\":[1],\"readonly\":[1028],\"looks\":[513],\"name\":[1],\"prevent\":[4],\"changed\":[1028],\"processing\":[32],\"listen\":[64],\"submit\":[64],\"clear\":[64],\"edit\":[64],\"reset\":[64],\"setInitialValue\":[64]},[[0,\"smoothlyInputLooks\",\"smoothlyInputLooksHandler\"],[0,\"smoothlyInput\",\"smoothlyInputHandler\"],[8,\"smoothlyFormSubmit\",\"windowSubmitHandler\"],[0,\"smoothlyFormSubmit\",\"submitHandler\"],[0,\"smoothlyInputLoad\",\"smoothlyInputLoadHandler\"],[0,\"smoothlyFormDisable\",\"smoothlyFormDisableHandler\"]]],[1,\"smoothly-picker-option\",{\"selected\":[1540],\"visible\":[1540],\"value\":[1032],\"search\":[1040],\"position\":[514],\"required\":[516],\"readonly\":[32],\"slotted\":[32],\"clickHandler\":[64]}],[6,\"smoothly-button\",{\"color\":[513],\"expand\":[513],\"fill\":[513],\"disabled\":[516],\"type\":[513],\"size\":[513],\"shape\":[513],\"link\":[1]}],[6,\"smoothly-item\",{\"value\":[8],\"selected\":[1540],\"marked\":[1540],\"selectable\":[4],\"filter\":[64]},[[0,\"click\",\"onClick\"]]],[6,\"smoothly-slot-elements\",{\"clone\":[4],\"nodes\":[1040]}],[6,\"smoothly-slotted-elements\",{\"clone\":[4]}],[2,\"smoothly-spinner\",{\"active\":[516],\"size\":[513]}],[6,\"smoothly-input\",{\"color\":[1537],\"delay\":[2],\"looks\":[1537],\"name\":[513],\"value\":[1032],\"type\":[513],\"required\":[516],\"showLabel\":[516,\"show-label\"],\"autocomplete\":[4],\"placeholder\":[513],\"disabled\":[4],\"readonly\":[1540],\"currency\":[513],\"changed\":[1028],\"formatter\":[32],\"initialValue\":[32],\"listen\":[64],\"clear\":[64],\"edit\":[64],\"reset\":[64],\"setInitialValue\":[64],\"getFormData\":[64],\"setKeepFocusOnReRender\":[64],\"setSelectionRange\":[64]},[[0,\"smoothlyInputLoad\",\"SmoothlyInputLoadHandler\"]]],[2,\"smoothly-icon\",{\"color\":[513],\"fill\":[513],\"name\":[513],\"size\":[513],\"rotate\":[514],\"flip\":[513],\"toolTip\":[1,\"tool-tip\"],\"latestPromise\":[32],\"document\":[32]}]]],[\"smoothly-address-display.cjs\",[[2,\"smoothly-address-display\",{\"value\":[16],\"editable\":[4]}]]],[\"smoothly-address.cjs\",[[2,\"smoothly-address\",{\"value\":[16],\"editable\":[4]}]]]]"), options);
19
19
  });
20
20
  };
21
21
 
@@ -7770,11 +7770,15 @@ var Editable;
7770
7770
  reset: Submit.islyFunction(),
7771
7771
  setInitialValue: Submit.islyFunction(),
7772
7772
  });
7773
+ Element.is = Element.type.is;
7773
7774
  })(Element = Editable.Element || (Editable.Element = {}));
7775
+ const EventEmitter = Submit.object({ emit: Submit.islyFunction() });
7774
7776
  Editable.type = Element.type.extend({
7775
7777
  changed: Submit.boolean(),
7776
7778
  value: any().optional(),
7779
+ smoothlyFormDisable: EventEmitter,
7777
7780
  });
7781
+ Editable.is = Editable.type.is;
7778
7782
  })(Editable || (Editable = {}));
7779
7783
 
7780
7784
  var Looks;
@@ -7793,11 +7797,13 @@ var Input;
7793
7797
  color: Submit.Color.type.optional(),
7794
7798
  name: Submit.string(),
7795
7799
  looks: Looks.type,
7800
+ binary: Submit.islyFunction().optional(),
7796
7801
  });
7797
7802
  Element.is = Element.type.is;
7798
7803
  })(Element = Input.Element || (Input.Element = {}));
7799
7804
  const EventEmitter = Submit.object({ emit: Submit.islyFunction() });
7800
7805
  Input.type = Element.type.extend({
7806
+ smoothlyInputLoad: EventEmitter,
7801
7807
  smoothlyInput: EventEmitter,
7802
7808
  smoothlyInputForm: EventEmitter.optional(),
7803
7809
  });
@@ -7809,12 +7815,14 @@ const styleCss$X = "smoothly-form{display:block;position:relative;--background-c
7809
7815
  const SmoothlyForm = class {
7810
7816
  constructor(hostRef) {
7811
7817
  index.registerInstance(this, hostRef);
7818
+ this.smoothlyFormDisable = index.createEvent(this, "smoothlyFormDisable", 7);
7812
7819
  this.smoothlyFormInput = index.createEvent(this, "smoothlyFormInput", 7);
7813
7820
  this.smoothlyFormSubmit = index.createEvent(this, "smoothlyFormSubmit", 7);
7814
7821
  this.smoothlyFormReset = index.createEvent(this, "smoothlyFormReset", 7);
7815
7822
  this.smoothlyFormEdit = index.createEvent(this, "smoothlyFormEdit", 7);
7816
7823
  this.smoothlyFormClear = index.createEvent(this, "smoothlyFormClear", 7);
7817
7824
  this.notice = index.createEvent(this, "notice", 7);
7825
+ this.contentType = "json";
7818
7826
  this.inputs = new Map();
7819
7827
  this.readonlyAtLoad = this.readonly;
7820
7828
  this.listeners = {};
@@ -7829,6 +7837,9 @@ const SmoothlyForm = class {
7829
7837
  this.changed = false;
7830
7838
  this.processing = undefined;
7831
7839
  }
7840
+ componentWillLoad() {
7841
+ !this.readonly && this.smoothlyFormDisable.emit(readonly => (this.readonly = readonly));
7842
+ }
7832
7843
  async listen(property, listener) {
7833
7844
  var _a;
7834
7845
  var _b;
@@ -7858,9 +7869,12 @@ const SmoothlyForm = class {
7858
7869
  this.action && event.stopPropagation();
7859
7870
  }
7860
7871
  async smoothlyInputLoadHandler(event) {
7872
+ var _a, _b;
7861
7873
  event.stopPropagation();
7862
7874
  event.detail(this);
7863
7875
  if (Input.Element.is(event.target)) {
7876
+ if (await ((_b = (_a = event.target).binary) === null || _b === void 0 ? void 0 : _b.call(_a)))
7877
+ this.contentType = "form-data";
7864
7878
  this.value = Submit.Data.merge(this.value, { [event.target.name]: event.target.value });
7865
7879
  this.inputs.set(event.target.name, event.target);
7866
7880
  }
@@ -7886,7 +7900,10 @@ const SmoothlyForm = class {
7886
7900
  : "GET";
7887
7901
  const response = await fetch(Request.create(method == "GET"
7888
7902
  ? { method, url: `${action}?${stringify(this.value)}` }
7889
- : Object.assign({ method, url: action }, (this.value && { header: { contentType: "application/json" }, body: this.value }))))
7903
+ : Object.assign({ method, url: action }, (this.value && {
7904
+ header: { contentType: this.contentType ? "multipart/form-data" : "application/json" },
7905
+ body: this.value,
7906
+ }))))
7890
7907
  .catch(() => undefined);
7891
7908
  const result = !response || (response === null || response === void 0 ? void 0 : response.status) < 200 || response.status >= 300
7892
7909
  ? [false, "Failed to submit form."]
@@ -8972,6 +8989,7 @@ const styleCss$P = ".sc-smoothly-input-date-h{box-sizing:border-box}.sc-smoothly
8972
8989
  const InputDate = class {
8973
8990
  constructor(hostRef) {
8974
8991
  index.registerInstance(this, hostRef);
8992
+ this.smoothlyInputLoad = index.createEvent(this, "smoothlyInputLoad", 7);
8975
8993
  this.smoothlyValueChange = index.createEvent(this, "smoothlyValueChange", 7);
8976
8994
  this.smoothlyInput = index.createEvent(this, "smoothlyInput", 7);
8977
8995
  this.smoothlyInputLooks = index.createEvent(this, "smoothlyInputLooks", 7);
@@ -8986,6 +9004,7 @@ const InputDate = class {
8986
9004
  this.disabled = undefined;
8987
9005
  }
8988
9006
  componentWillLoad() {
9007
+ this.smoothlyInputLoad.emit(() => { });
8989
9008
  this.smoothlyInputLooks.emit((looks, color) => ((this.looks = looks), !this.color && (this.color = color)));
8990
9009
  }
8991
9010
  async clear() {
@@ -9034,6 +9053,7 @@ const styleCss$O = ".sc-smoothly-input-date-range-h{box-sizing:border-box}.sc-sm
9034
9053
  const InputDateRange = class {
9035
9054
  constructor(hostRef) {
9036
9055
  index.registerInstance(this, hostRef);
9056
+ this.smoothlyInputLoad = index.createEvent(this, "smoothlyInputLoad", 7);
9037
9057
  this.smoothlyValueChange = index.createEvent(this, "smoothlyValueChange", 7);
9038
9058
  this.smoothlyInput = index.createEvent(this, "smoothlyInput", 7);
9039
9059
  this.smoothlyInputLooks = index.createEvent(this, "smoothlyInputLooks", 7);
@@ -9055,6 +9075,7 @@ const InputDateRange = class {
9055
9075
  this.end = undefined;
9056
9076
  }
9057
9077
  componentWillLoad() {
9078
+ this.smoothlyInputLoad.emit(() => { });
9058
9079
  this.smoothlyInputLooks.emit((looks, color) => ((this.looks = looks), !this.color && (this.color = color)));
9059
9080
  if (this.start && this.end)
9060
9081
  this.smoothlyInput.emit({ [this.name]: { start: this.start, end: this.end } });
@@ -9103,7 +9124,7 @@ const SmoothlyInputDemo = class {
9103
9124
  this.duration = { hours: 8 };
9104
9125
  }
9105
9126
  render() {
9106
- return (index.h(index.Host, null, index.h("h2", null, "Controlled form"), index.h("smoothly-input-demo-controlled-form", null), index.h("h2", null, "Create form defaulting type"), index.h("smoothly-form", { looks: "line", action: "https://api.toiletapi.com/6b12fd2f-e896-46f9-b38f-25cf42cee4b4" }, index.h("smoothly-input", { type: "text", name: "name" }, "Name"), index.h("smoothly-input-reset", { slot: "reset", type: "form", size: "icon", color: "warning", fill: "default" }), index.h("smoothly-input-submit", { slot: "submit", size: "icon", color: "success" })), index.h("h2", null, "Select"), index.h("div", { class: "select-div" }, index.h("smoothly-input-select", { name: "select-dessert", looks: "border", onSmoothlyInput: e => console.log(e.detail) }, index.h("label", { slot: "label" }, "Select with clear button"), index.h("smoothly-item", { value: "1" }, "Ice cream"), index.h("smoothly-item", { value: "2" }, "Sponge cake"), index.h("smoothly-item", { value: "3" }, "Cookie"), index.h("smoothly-item", { value: "4" }, "Croissant"), index.h("smoothly-item", { value: "5" }, "Chocolate fondue"), index.h("smoothly-input-clear", { size: "icon", slot: "end" }, index.h("smoothly-icon", { name: "close" }))), index.h("smoothly-input-select", { multiple: true, name: "select-dessert-multiple", looks: "border", onSmoothlyInput: e => console.log(e.detail) }, index.h("label", { slot: "label" }, "Select multiple with reset button"), index.h("smoothly-item", { value: "ice cream" }, "Ice cream"), index.h("smoothly-item", { value: "sponge cake" }, "Sponge cake"), index.h("smoothly-item", { selected: true, value: "cookie" }, "Cookie"), index.h("smoothly-item", { value: "croissant" }, "Croissant"), index.h("smoothly-item", { selected: true, value: "chocolate fondue" }, "Chocolate fondue"), index.h("smoothly-input-reset", { size: "icon", slot: "end" }, index.h("smoothly-icon", { name: "refresh-outline" }))), index.h("smoothly-input-select", { name: "select-icon", clearable: false, showSelected: false, onSmoothlyInput: e => console.log("Form Readonly", e.detail) }, index.h("smoothly-item", { value: "folder", selected: true }, index.h("smoothly-icon", { size: "small", name: "folder-outline" })), index.h("smoothly-item", { value: "camera" }, index.h("smoothly-icon", { size: "small", name: "camera-outline" })))), index.h("h2", null, "Delayed"), index.h("smoothly-input", { name: "Delayed", delay: 2 }, "Delayed"), index.h("h2", null, "Editable form and Input with Clear and Reset - Readonly"), index.h("smoothly-form", { looks: "grid", readonly: true, action: "https://api.toiletapi.com/6b12fd2f-e896-46f9-b38f-25cf42cee4b4" }, index.h("smoothly-input", { readonly: true, name: "First Name", value: "John" }, "First name"), index.h("smoothly-input", { name: "Last name", value: "Doe" }, "Last name", index.h("smoothly-input-clear", { size: "icon", slot: "end" }, index.h("smoothly-icon", { name: "close" }))), index.h("smoothly-input", { type: "phone", name: "Phone", value: "777888999" }, "Phone", index.h("smoothly-input-reset", { size: "icon", slot: "end" }, index.h("smoothly-icon", { name: "refresh-outline" }))), index.h("smoothly-input-radio", { clearable: true, name: "radioFirstInput" }, index.h("p", { slot: "label" }, "Clearable"), index.h("smoothly-input-radio-item", { slot: "options", value: "first" }, "Label 1"), index.h("smoothly-input-radio-item", { selected: true, slot: "options", value: "second" }, "Label 2"), index.h("smoothly-input-radio-item", { slot: "options", value: "third" }, "Label 3")), index.h("smoothly-input-select", { menuHeight: "7.5items", placeholder: "Select...", multiple: true, name: "select-month" }, index.h("label", { slot: "label" }, "Month"), index.h("smoothly-item", { value: "1" }, "January"), index.h("smoothly-item", { value: "2" }, "February"), index.h("smoothly-item", { value: "3" }, "March"), index.h("smoothly-item", { value: "4" }, "April"), index.h("smoothly-item", { value: "5" }, "May"), index.h("smoothly-item", { value: "6" }, "June"), index.h("smoothly-item", { value: "7" }, "July"), index.h("smoothly-item", { value: "8" }, "August"), index.h("smoothly-item", { value: "9" }, "September"), index.h("smoothly-item", { value: "10" }, "October"), index.h("smoothly-item", { value: "11" }, "November"), index.h("smoothly-item", { value: "12" }, "December"), index.h("smoothly-input-clear", { size: "icon", slot: "end" }, index.h("smoothly-icon", { name: "close" }))), index.h("smoothly-input-select", { name: "select-icon", clearable: false, showSelected: false }, index.h("smoothly-item", { value: "folder", selected: true }, index.h("smoothly-icon", { size: "small", name: "folder-outline" })), index.h("smoothly-item", { value: "camera" }, index.h("smoothly-icon", { size: "small", name: "camera-outline" }))), index.h("smoothly-input-checkbox", { name: "checkbox" }, "Check the box"), index.h("smoothly-input-checkbox", { name: "checkbox2", checked: true }, "Check the box 2"), index.h("smoothly-input-range", { step: 1, name: "range3", value: 20000 }, "Select"), index.h("smoothly-picker", { multiple: true, name: "animals" }, index.h("span", { slot: "label" }, "Animals"), index.h("span", { slot: "search" }, "Search"), index.h("smoothly-picker-option", { selected: true, value: "cat" }, "Cat"), index.h("smoothly-picker-option", { value: "dog" }, "Dog"), index.h("smoothly-picker-option", { value: "fish" }, "Fish")), index.h("smoothly-input-edit", { fill: "default", type: "button", color: "tertiary", slot: "edit", size: "icon", shape: "rounded" }), index.h("smoothly-input-reset", { fill: "default", type: "form", color: "warning", slot: "reset", size: "icon", shape: "rounded" }), index.h("smoothly-input-submit", { delete: true, slot: "clear", color: "danger", size: "icon", shape: "rounded" }), index.h("smoothly-input-submit", { fill: "default", type: "button", color: "success", slot: "submit", size: "icon", shape: "rounded" }, index.h("smoothly-icon", { name: "checkmark-outline", fill: "solid", size: "tiny" }))), index.h("h2", null, "Editable form and Input with Clear and Reset - Editable"), index.h("smoothly-form", { looks: "grid", type: "create", action: "https://api.toiletapi.com/upload/6b12fd2f-e896-46f9-b38f-25cf42cee4b4" }, index.h("smoothly-input", { readonly: true, name: "First Name", value: "John" }, "First name"), index.h("smoothly-input", { name: "Last name", value: "Doe" }, "Last name", index.h("smoothly-input-clear", { size: "icon", slot: "end" }, index.h("smoothly-icon", { name: "close" }))), index.h("smoothly-input", { type: "phone", name: "Phone", value: "777888999" }, "Phone", index.h("smoothly-input-reset", { size: "icon", slot: "end" }, index.h("smoothly-icon", { name: "refresh-outline" }))), index.h("smoothly-input-radio", { clearable: true, name: "radioFirstInput" }, index.h("p", { slot: "label" }, "Clearable"), index.h("smoothly-input-radio-item", { slot: "options", value: "first" }, "Label 1"), index.h("smoothly-input-radio-item", { selected: true, slot: "options", value: "second" }, "Label 2"), index.h("smoothly-input-radio-item", { slot: "options", value: "third" }, "Label 3")), index.h("smoothly-input-select", { multiple: true, menuHeight: "7.5items", placeholder: "Select...", name: "select-month" }, index.h("label", { slot: "label" }, "Month multiple select"), index.h("smoothly-item", { value: "1" }, "January"), index.h("smoothly-item", { value: "2" }, "February"), index.h("smoothly-item", { value: "3" }, "March"), index.h("smoothly-item", { value: "4" }, "April"), index.h("smoothly-item", { value: "5" }, "May"), index.h("smoothly-item", { value: "6" }, "June"), index.h("smoothly-item", { value: "7" }, "July"), index.h("smoothly-item", { value: "8" }, "August"), index.h("smoothly-item", { value: "9" }, "September"), index.h("smoothly-item", { value: "10" }, "October"), index.h("smoothly-item", { value: "11" }, "November"), index.h("smoothly-item", { value: "12" }, "December")), index.h("smoothly-input-select", { name: "select-icon", clearable: false, showSelected: false }, index.h("smoothly-item", { value: "folder", selected: true }, index.h("smoothly-icon", { size: "small", name: "folder-outline" })), index.h("smoothly-item", { value: "camera" }, index.h("smoothly-icon", { size: "small", name: "camera-outline" }))), index.h("smoothly-input-checkbox", { name: "checkbox" }, "Check the box"), index.h("smoothly-input-checkbox", { name: "checkbox2", checked: true }, "Check the box 2"), index.h("smoothly-input-range", { step: 1, name: "range3", value: 20000 }, "Select"), index.h("smoothly-picker", { multiple: true, name: "animals" }, index.h("span", { slot: "label" }, "Animals"), index.h("span", { slot: "search" }, "Search"), index.h("smoothly-picker-option", { selected: true, value: "cat" }, "Cat"), index.h("smoothly-picker-option", { value: "dog" }, "Dog"), index.h("smoothly-picker-option", { value: "fish" }, "Fish")), index.h("smoothly-input-edit", { fill: "default", type: "button", color: "tertiary", slot: "edit", size: "icon", shape: "rounded" }), index.h("smoothly-input-reset", { fill: "default", type: "form", color: "warning", slot: "reset", size: "icon", shape: "rounded" }), index.h("smoothly-input-submit", { delete: true, slot: "clear", color: "danger", size: "icon", shape: "rounded" }), index.h("smoothly-input-submit", { fill: "default", type: "button", color: "success", slot: "submit", size: "icon", shape: "rounded" }, index.h("smoothly-icon", { name: "checkmark-outline", fill: "solid", size: "tiny" }))), index.h("h2", null, "Color"), index.h("smoothly-form", { looks: "border" }, index.h("smoothly-input-color", { name: "color" })), index.h("h2", null, "Range"), index.h("smoothly-form", { looks: "border" }, index.h("smoothly-input-range", { step: 1, name: "range", outputSide: "right" }, "Select and so"), index.h("smoothly-input-range", { step: 1, name: "range2" }, "Select with really really long label", index.h("smoothly-icon", { name: "checkmark-circle", slot: "start" }), index.h("smoothly-input-clear", { size: "icon", slot: "end" }, index.h("smoothly-icon", { name: "close" }))), index.h("smoothly-input-range", { step: 1, name: "range3" }, "Select")), index.h("h2", null, "Duration"), index.h("smoothly-form", { looks: "border" }, index.h("smoothly-input", { name: "duration", type: "duration", placeholder: "hh:mm", value: this.duration, onSmoothlyInput: e => {
9127
+ return (index.h(index.Host, null, index.h("h2", null, "Controlled form"), index.h("smoothly-input-demo-controlled-form", null), index.h("h2", null, "Create form defaulting type"), index.h("smoothly-form", { looks: "line", action: "https://api.toiletapi.com/6b12fd2f-e896-46f9-b38f-25cf42cee4b4" }, index.h("smoothly-input", { type: "text", name: "name" }, "Name"), index.h("smoothly-input-reset", { slot: "reset", type: "form", size: "icon", color: "warning", fill: "default" }), index.h("smoothly-input-submit", { slot: "submit", size: "icon", color: "success" })), index.h("h2", null, "Select"), index.h("div", { class: "select-div" }, index.h("smoothly-input-select", { name: "select-dessert", looks: "border", onSmoothlyInput: e => console.log(e.detail) }, index.h("label", { slot: "label" }, "Select with clear button"), index.h("smoothly-item", { value: "1" }, "Ice cream"), index.h("smoothly-item", { value: "2" }, "Sponge cake"), index.h("smoothly-item", { value: "3" }, "Cookie"), index.h("smoothly-item", { value: "4" }, "Croissant"), index.h("smoothly-item", { value: "5" }, "Chocolate fondue"), index.h("smoothly-input-clear", { size: "icon", slot: "end" }, index.h("smoothly-icon", { name: "close" }))), index.h("smoothly-input-select", { multiple: true, name: "select-dessert-multiple", looks: "border", onSmoothlyInput: e => console.log(e.detail) }, index.h("label", { slot: "label" }, "Select multiple with reset button"), index.h("smoothly-item", { value: "ice cream" }, "Ice cream"), index.h("smoothly-item", { value: "sponge cake" }, "Sponge cake"), index.h("smoothly-item", { selected: true, value: "cookie" }, "Cookie"), index.h("smoothly-item", { value: "croissant" }, "Croissant"), index.h("smoothly-item", { selected: true, value: "chocolate fondue" }, "Chocolate fondue"), index.h("smoothly-input-reset", { size: "icon", slot: "end" }, index.h("smoothly-icon", { name: "refresh-outline" }))), index.h("smoothly-input-select", { name: "select-icon", clearable: false, showSelected: false, onSmoothlyInput: e => console.log("Form Readonly", e.detail) }, index.h("smoothly-item", { value: "folder", selected: true }, index.h("smoothly-icon", { size: "small", name: "folder-outline" })), index.h("smoothly-item", { value: "camera" }, index.h("smoothly-icon", { size: "small", name: "camera-outline" })))), index.h("h2", null, "Delayed"), index.h("smoothly-input", { name: "Delayed", delay: 2 }, "Delayed"), index.h("h2", null, "Editable form and Input with Clear and Reset - Readonly"), index.h("smoothly-form", { looks: "grid", readonly: true, action: "https://api.toiletapi.com/6b12fd2f-e896-46f9-b38f-25cf42cee4b4" }, index.h("smoothly-input", { readonly: true, name: "First Name", value: "John" }, "First name"), index.h("smoothly-input", { name: "Last name", value: "Doe" }, "Last name", index.h("smoothly-input-clear", { size: "icon", slot: "end" }, index.h("smoothly-icon", { name: "close" }))), index.h("smoothly-input", { type: "phone", name: "Phone", value: "777888999" }, "Phone", index.h("smoothly-input-reset", { size: "icon", slot: "end" }, index.h("smoothly-icon", { name: "refresh-outline" }))), index.h("smoothly-input-radio", { clearable: true, name: "radioFirstInput" }, index.h("p", { slot: "label" }, "Clearable"), index.h("smoothly-input-radio-item", { slot: "options", value: "first" }, "Label 1"), index.h("smoothly-input-radio-item", { selected: true, slot: "options", value: "second" }, "Label 2"), index.h("smoothly-input-radio-item", { slot: "options", value: "third" }, "Label 3")), index.h("smoothly-input-select", { menuHeight: "7.5items", placeholder: "Select...", multiple: true, name: "select-month" }, index.h("label", { slot: "label" }, "Month"), index.h("smoothly-item", { value: "1" }, "January"), index.h("smoothly-item", { value: "2" }, "February"), index.h("smoothly-item", { value: "3" }, "March"), index.h("smoothly-item", { value: "4" }, "April"), index.h("smoothly-item", { value: "5" }, "May"), index.h("smoothly-item", { value: "6" }, "June"), index.h("smoothly-item", { value: "7" }, "July"), index.h("smoothly-item", { value: "8" }, "August"), index.h("smoothly-item", { value: "9" }, "September"), index.h("smoothly-item", { value: "10" }, "October"), index.h("smoothly-item", { value: "11" }, "November"), index.h("smoothly-item", { value: "12" }, "December"), index.h("smoothly-input-clear", { size: "icon", slot: "end" }, index.h("smoothly-icon", { name: "close" }))), index.h("smoothly-input-select", { name: "select-icon", clearable: false, showSelected: false }, index.h("smoothly-item", { value: "folder", selected: true }, index.h("smoothly-icon", { size: "small", name: "folder-outline" })), index.h("smoothly-item", { value: "camera" }, index.h("smoothly-icon", { size: "small", name: "camera-outline" }))), index.h("smoothly-input-checkbox", { name: "checkbox" }, "Check the box"), index.h("smoothly-input-checkbox", { name: "checkbox2", checked: true }, "Check the box 2"), index.h("smoothly-input-range", { step: 1, name: "range3", value: 20000 }, "Select"), index.h("smoothly-picker", { multiple: true, name: "animals" }, index.h("span", { slot: "label" }, "Animals"), index.h("span", { slot: "search" }, "Search"), index.h("smoothly-picker-option", { selected: true, value: "cat" }, "Cat"), index.h("smoothly-picker-option", { value: "dog" }, "Dog"), index.h("smoothly-picker-option", { value: "fish" }, "Fish")), index.h("smoothly-input-file", { name: "profile", placeholder: "Click or drag your profile picture here..." }, index.h("span", { slot: "label" }, "Profile"), index.h("smoothly-icon", { slot: "button", name: "person-circle-outline", size: "tiny", fill: "default" })), index.h("smoothly-input-edit", { fill: "default", type: "button", color: "tertiary", slot: "edit", size: "icon", shape: "rounded" }), index.h("smoothly-input-reset", { fill: "default", type: "form", color: "warning", slot: "reset", size: "icon", shape: "rounded" }), index.h("smoothly-input-submit", { delete: true, slot: "clear", color: "danger", size: "icon", shape: "rounded" }), index.h("smoothly-input-submit", { fill: "default", type: "button", color: "success", slot: "submit", size: "icon", shape: "rounded" }, index.h("smoothly-icon", { name: "checkmark-outline", fill: "solid", size: "tiny" }))), index.h("h2", null, "Editable form and Input with Clear and Reset - Editable"), index.h("smoothly-form", { looks: "grid", type: "create", action: "https://api.toiletapi.com/upload/6b12fd2f-e896-46f9-b38f-25cf42cee4b4" }, index.h("smoothly-input", { readonly: true, name: "First Name", value: "John" }, "First name"), index.h("smoothly-input", { name: "Last name", value: "Doe" }, "Last name", index.h("smoothly-input-clear", { size: "icon", slot: "end" }, index.h("smoothly-icon", { name: "close" }))), index.h("smoothly-input", { type: "phone", name: "Phone", value: "777888999" }, "Phone", index.h("smoothly-input-reset", { size: "icon", slot: "end" }, index.h("smoothly-icon", { name: "refresh-outline" }))), index.h("smoothly-input-radio", { clearable: true, name: "radioFirstInput" }, index.h("p", { slot: "label" }, "Clearable"), index.h("smoothly-input-radio-item", { slot: "options", value: "first" }, "Label 1"), index.h("smoothly-input-radio-item", { selected: true, slot: "options", value: "second" }, "Label 2"), index.h("smoothly-input-radio-item", { slot: "options", value: "third" }, "Label 3")), index.h("smoothly-input-select", { multiple: true, menuHeight: "7.5items", placeholder: "Select...", name: "select-month" }, index.h("label", { slot: "label" }, "Month multiple select"), index.h("smoothly-item", { value: "1" }, "January"), index.h("smoothly-item", { value: "2" }, "February"), index.h("smoothly-item", { value: "3" }, "March"), index.h("smoothly-item", { value: "4" }, "April"), index.h("smoothly-item", { value: "5" }, "May"), index.h("smoothly-item", { value: "6" }, "June"), index.h("smoothly-item", { value: "7" }, "July"), index.h("smoothly-item", { value: "8" }, "August"), index.h("smoothly-item", { value: "9" }, "September"), index.h("smoothly-item", { value: "10" }, "October"), index.h("smoothly-item", { value: "11" }, "November"), index.h("smoothly-item", { value: "12" }, "December")), index.h("smoothly-input-select", { name: "select-icon", clearable: false, showSelected: false }, index.h("smoothly-item", { value: "folder", selected: true }, index.h("smoothly-icon", { size: "small", name: "folder-outline" })), index.h("smoothly-item", { value: "camera" }, index.h("smoothly-icon", { size: "small", name: "camera-outline" }))), index.h("smoothly-input-checkbox", { name: "checkbox" }, "Check the box"), index.h("smoothly-input-checkbox", { name: "checkbox2", checked: true }, "Check the box 2"), index.h("smoothly-input-range", { step: 1, name: "range3", value: 20000 }, "Select"), index.h("smoothly-picker", { multiple: true, name: "animals" }, index.h("span", { slot: "label" }, "Animals"), index.h("span", { slot: "search" }, "Search"), index.h("smoothly-picker-option", { selected: true, value: "cat" }, "Cat"), index.h("smoothly-picker-option", { value: "dog" }, "Dog"), index.h("smoothly-picker-option", { value: "fish" }, "Fish")), index.h("smoothly-input-edit", { fill: "default", type: "button", color: "tertiary", slot: "edit", size: "icon", shape: "rounded" }), index.h("smoothly-input-reset", { fill: "default", type: "form", color: "warning", slot: "reset", size: "icon", shape: "rounded" }), index.h("smoothly-input-submit", { delete: true, slot: "clear", color: "danger", size: "icon", shape: "rounded" }), index.h("smoothly-input-submit", { fill: "default", type: "button", color: "success", slot: "submit", size: "icon", shape: "rounded" }, index.h("smoothly-icon", { name: "checkmark-outline", fill: "solid", size: "tiny" }))), index.h("h2", null, "Color"), index.h("smoothly-form", { looks: "border" }, index.h("smoothly-input-color", { name: "color" })), index.h("h2", null, "Range"), index.h("smoothly-form", { looks: "border" }, index.h("smoothly-input-range", { step: 1, name: "range", outputSide: "right" }, "Select and so"), index.h("smoothly-input-range", { step: 1, name: "range2" }, "Select with really really long label", index.h("smoothly-icon", { name: "checkmark-circle", slot: "start" }), index.h("smoothly-input-clear", { size: "icon", slot: "end" }, index.h("smoothly-icon", { name: "close" }))), index.h("smoothly-input-range", { step: 1, name: "range3" }, "Select")), index.h("h2", null, "Duration"), index.h("smoothly-form", { looks: "border" }, index.h("smoothly-input", { name: "duration", type: "duration", placeholder: "hh:mm", value: this.duration, onSmoothlyInput: e => {
9107
9128
  const duration = e.detail.duration;
9108
9129
  console.log("event duration", duration);
9109
9130
  this.duration = duration;
@@ -9197,16 +9218,18 @@ const SmoothlyInputEdit = class {
9197
9218
  };
9198
9219
  SmoothlyInputEdit.style = styleCss$L;
9199
9220
 
9200
- const styleCss$K = ".sc-smoothly-input-file-h{box-sizing:border-box}.sc-smoothly-input-file-h[looks=\"border\"].sc-smoothly-input-file-s>smoothly-picker-menu smoothly-input,[looks=\"border\"].sc-smoothly-input-file-h{border:rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px}[looks=\"border\"][readonly].sc-smoothly-input-file-h{border:rgba(var(--text-color, var(--smoothly-color-contrast)), .1) solid 1px}.sc-smoothly-input-file-h[looks=\"line\"].sc-smoothly-input-file-s>smoothly-picker-menu smoothly-input,[looks=\"line\"].sc-smoothly-input-file-h{border-bottom:rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px}[looks=\"line\"][readonly].sc-smoothly-input-file-h{border-bottom:rgba(var(--text-color, var(--smoothly-color-contrast)), .1) solid 1px}.sc-smoothly-input-file-h[looks=\"grid\"].sc-smoothly-input-file-s>smoothly-picker-menu smoothly-input,[looks=\"grid\"].sc-smoothly-input-file-h{border:rgba(var(--text-color, var(--smoothly-color-contrast)), .5) solid .5px}[looks=\"grid\"][readonly].sc-smoothly-input-file-h{border:rgba(var(--text-color, var(--smoothly-color-contrast)), .2) solid .5px}[looks=\"transparent\"].sc-smoothly-input-file-h{border:none}[looks=\"transparent\"].sc-smoothly-input-file-h:not(:focus-within){background-color:transparent}[looks=\"transparent\"].sc-smoothly-input-file-h:not(:focus-within) input.sc-smoothly-input-file{background:transparent}[looks=\"transparent\"].sc-smoothly-input-file-h:focus-within{outline:1px solid rgb(var(--smoothly-color-contrast))}.sc-smoothly-input-file-h{display:flex;align-items:center;flex-wrap:wrap;overflow:hidden;position:relative;width:100%;padding-left:0.4rem;background-color:rgb(var(--background-color,var(--smoothly-color-shade)))}.mask.sc-smoothly-input-file{position:absolute;top:0;bottom:0;left:0;right:0;background-color:rgb(var(--text-color ,var(--smoothly-color-contrast)), 0.3)}.sc-smoothly-input-file-h:not(.dragging) .mask.sc-smoothly-input-file{display:none}input.sc-smoothly-input-file{overflow:hidden;height:0;width:0;padding:0}.input.sc-smoothly-input-file{display:flex;align-items:center;padding-left:0.4rem;padding-bottom:0.2rem}smoothly-button.sc-smoothly-input-file{margin:0;border:none}label.sc-smoothly-input-file{padding-left:0.4rem;padding-top:0.4rem;display:flex;width:100%;align-items:baseline;justify-content:flex-start;color:rgb(var(--text-color, var(--smoothly-color-contrast)));cursor:inherit}label.sc-smoothly-input-file-s>*{display:block;width:100%;font-size:0.65em;opacity:0.8}.sc-smoothly-input-file-h:not([show-label]) label.sc-smoothly-input-file{display:none}smoothly-icon.sc-smoothly-input-file{display:none;position:absolute;right:0.2em;top:0.6em}span.sc-smoothly-input-file{cursor:pointer;padding-left:0.5rem}";
9221
+ const styleCss$K = ".sc-smoothly-input-file-h{box-sizing:border-box}.sc-smoothly-input-file-h[looks=\"border\"].sc-smoothly-input-file-s>smoothly-picker-menu smoothly-input,[looks=\"border\"].sc-smoothly-input-file-h{border:rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px}[looks=\"border\"][readonly].sc-smoothly-input-file-h{border:rgba(var(--text-color, var(--smoothly-color-contrast)), .1) solid 1px}.sc-smoothly-input-file-h[looks=\"line\"].sc-smoothly-input-file-s>smoothly-picker-menu smoothly-input,[looks=\"line\"].sc-smoothly-input-file-h{border-bottom:rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px}[looks=\"line\"][readonly].sc-smoothly-input-file-h{border-bottom:rgba(var(--text-color, var(--smoothly-color-contrast)), .1) solid 1px}.sc-smoothly-input-file-h[looks=\"grid\"].sc-smoothly-input-file-s>smoothly-picker-menu smoothly-input,[looks=\"grid\"].sc-smoothly-input-file-h{border:rgba(var(--text-color, var(--smoothly-color-contrast)), .5) solid .5px}[looks=\"grid\"][readonly].sc-smoothly-input-file-h{border:rgba(var(--text-color, var(--smoothly-color-contrast)), .2) solid .5px}[looks=\"transparent\"].sc-smoothly-input-file-h{border:none}[looks=\"transparent\"].sc-smoothly-input-file-h:not(:focus-within){background-color:transparent}[looks=\"transparent\"].sc-smoothly-input-file-h:not(:focus-within) input.sc-smoothly-input-file{background:transparent}[looks=\"transparent\"].sc-smoothly-input-file-h:focus-within{outline:1px solid rgb(var(--smoothly-color-contrast))}.sc-smoothly-input-file-h{display:flex;align-items:center;flex-wrap:wrap;overflow:hidden;position:relative;width:100%;padding-left:0.4rem;background-color:rgb(var(--background-color,var(--smoothly-color-shade)))}.mask.sc-smoothly-input-file{position:absolute;inset:0;background-color:rgb(var(--text-color ,var(--smoothly-color-contrast)), 0.3)}.sc-smoothly-input-file-h:not(.dragging) .mask.sc-smoothly-input-file{display:none}input.sc-smoothly-input-file{overflow:hidden;height:0;width:0;padding:0}div.input.sc-smoothly-input-file{display:flex;align-items:center;padding-bottom:0.2rem;column-gap:1ch}smoothly-button.sc-smoothly-input-file{margin:0;border:none}label.sc-smoothly-input-file{padding-top:0.4rem;display:flex;width:100%;align-items:baseline;justify-content:flex-start;color:rgb(var(--text-color, var(--smoothly-color-contrast)));cursor:inherit}label.sc-smoothly-input-file-s>*{display:block;width:100%;font-size:0.65em;opacity:0.8}.sc-smoothly-input-file-h:not([show-label]) label.sc-smoothly-input-file{display:none}smoothly-icon.sc-smoothly-input-file{display:none;position:absolute;right:0.2em;top:0.6em}span.sc-smoothly-input-file{cursor:pointer}";
9201
9222
 
9202
9223
  const SmoothlyInputFile = class {
9203
9224
  constructor(hostRef) {
9204
9225
  index.registerInstance(this, hostRef);
9205
9226
  this.smoothlyInputLooks = index.createEvent(this, "smoothlyInputLooks", 7);
9206
9227
  this.smoothlyInput = index.createEvent(this, "smoothlyInput", 7);
9207
- this.smoothlyChange = index.createEvent(this, "smoothlyChange", 7);
9228
+ this.smoothlyInputLoad = index.createEvent(this, "smoothlyInputLoad", 7);
9229
+ this.smoothlyFormDisable = index.createEvent(this, "smoothlyFormDisable", 7);
9208
9230
  this.transfer = new DataTransfer();
9209
- this.dragging = false;
9231
+ this.changed = false;
9232
+ this.readonly = false;
9210
9233
  this.accept = undefined;
9211
9234
  this.color = undefined;
9212
9235
  this.looks = "plain";
@@ -9215,34 +9238,82 @@ const SmoothlyInputFile = class {
9215
9238
  this.showLabel = true;
9216
9239
  this.value = undefined;
9217
9240
  this.placeholder = undefined;
9241
+ this.dragging = false;
9242
+ }
9243
+ get files() {
9244
+ this.transfer.items.clear();
9245
+ this.value && this.transfer.items.add(this.value);
9246
+ return this.transfer.files;
9218
9247
  }
9219
9248
  componentWillLoad() {
9220
9249
  this.smoothlyInputLooks.emit((looks, color) => ((this.looks = looks), !this.color && (this.color = color)));
9250
+ this.smoothlyInput.emit({ [this.name]: this.value });
9251
+ this.smoothlyInputLoad.emit(() => { });
9252
+ !this.readonly && this.smoothlyFormDisable.emit(readonly => (this.readonly = readonly));
9221
9253
  }
9222
9254
  async clear() {
9223
9255
  this.value = undefined;
9224
9256
  }
9257
+ async listen(property, listener) {
9258
+ this.listener[property] = listener;
9259
+ listener(this);
9260
+ }
9261
+ async edit(editable) {
9262
+ this.readonly = !editable;
9263
+ }
9264
+ async reset() {
9265
+ this.value = this.initialValue;
9266
+ }
9267
+ async setInitialValue() {
9268
+ this.initialValue = this.value;
9269
+ this.valueChanged();
9270
+ }
9271
+ async binary() {
9272
+ return true;
9273
+ }
9274
+ valueChanged() {
9275
+ this.changed = this.initialValue !== this.value;
9276
+ this.smoothlyInput.emit({ [this.name]: this.value });
9277
+ }
9278
+ inputHandler(event) {
9279
+ var _a, _b, _c;
9280
+ event.stopPropagation();
9281
+ if ((_b = (_a = this.input) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b.length)
9282
+ this.value = (_c = this.input) === null || _c === void 0 ? void 0 : _c.files[0];
9283
+ }
9284
+ dropHandler(event) {
9285
+ var _a;
9286
+ event.preventDefault();
9287
+ event.stopPropagation();
9288
+ this.dragging = false;
9289
+ if ((_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.files.length)
9290
+ this.value = event.dataTransfer.files[0];
9291
+ }
9292
+ clickHandler(event) {
9293
+ var _a;
9294
+ if (!this.readonly && !event.composedPath().find(target => target == this.input)) {
9295
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.click();
9296
+ }
9297
+ }
9298
+ dragOverHandler(event) {
9299
+ event.preventDefault();
9300
+ event.stopPropagation();
9301
+ }
9302
+ dragEnterHandler(event) {
9303
+ event.preventDefault();
9304
+ !this.readonly && (this.dragging = true);
9305
+ }
9306
+ dragLeaveHandler(event) {
9307
+ event.stopPropagation();
9308
+ this.dragging = false;
9309
+ }
9225
9310
  render() {
9226
9311
  var _a, _b, _c;
9227
- return (index.h(index.Host, { class: { dragging: this.dragging }, tabindex: 0, onClick: () => { var _a; return (_a = this.input) === null || _a === void 0 ? void 0 : _a.click(); }, onDragOver: (event) => (event.preventDefault(), event.stopPropagation()), onDragEnter: () => (this.dragging = true) }, index.h("label", null, index.h("slot", { name: "label" })), index.h("div", { class: "input" }, index.h("smoothly-button", { color: this.color, fill: "clear", size: "flexible", onClick: event => { var _a; return (event.stopPropagation(), (_a = this.input) === null || _a === void 0 ? void 0 : _a.click()); } }, index.h("slot", { name: "button" })), index.h("span", { onClick: event => { var _a; return (event.stopPropagation(), (_a = this.input) === null || _a === void 0 ? void 0 : _a.click()); } }, (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : this.placeholder), index.h("div", { class: "mask", onDrop: event => {
9228
- var _a;
9229
- return (event.preventDefault(),
9230
- event.stopPropagation(),
9231
- (this.dragging = false),
9232
- ((_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.files.length) &&
9233
- (this.smoothlyInput.emit({ [this.name]: (this.value = event.dataTransfer.files[0]) }),
9234
- this.smoothlyChange.emit({ [this.name]: (this.value = event.dataTransfer.files[0]) })));
9235
- }, onDragLeave: event => (event.stopPropagation(), (this.dragging = false)) }), index.h("input", { ref: element => (this.input = element), type: "file", capture: this.camera == "back" ? "environment" : "user", accept: (_c = this.accept) !== null && _c !== void 0 ? _c : (!this.camera ? undefined : "image/jpeg"), files: (this.transfer.items.clear(), this.value && this.transfer.items.add(this.value), this.transfer.files), onInput: event => {
9236
- var _a, _b, _c;
9237
- return (event.stopPropagation(),
9238
- ((_b = (_a = this.input) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b.length) && this.smoothlyInput.emit({ [this.name]: (this.value = (_c = this.input) === null || _c === void 0 ? void 0 : _c.files[0]) }));
9239
- }, onChange: event => {
9240
- var _a, _b, _c;
9241
- return (event.stopPropagation(),
9242
- ((_b = (_a = this.input) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b.length) &&
9243
- this.smoothlyChange.emit({ [this.name]: (this.value = (_c = this.input) === null || _c === void 0 ? void 0 : _c.files[0]) }));
9244
- } })), index.h("slot", null)));
9312
+ return (index.h(index.Host, { class: { dragging: this.dragging }, tabindex: 0, onClick: (e) => this.clickHandler(e), onDragOver: (e) => this.dragOverHandler(e), onDragEnter: (e) => this.dragEnterHandler(e) }, index.h("label", null, index.h("slot", { name: "label" })), index.h("div", { class: "input" }, index.h("smoothly-button", { color: this.color, fill: "clear", size: "flexible" }, index.h("slot", { name: "button" })), index.h("span", null, (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : this.placeholder), index.h("div", { class: "mask", onDrop: e => this.dropHandler(e), onDragLeave: e => this.dragLeaveHandler(e) }), index.h("input", { ref: element => (this.input = element), type: "file", capture: this.camera == "back" ? "environment" : "user", accept: (_c = this.accept) !== null && _c !== void 0 ? _c : (!this.camera ? undefined : "image/jpeg"), files: this.files, onInput: e => this.inputHandler(e) })), index.h("slot", null)));
9245
9313
  }
9314
+ static get watchers() { return {
9315
+ "value": ["valueChanged"]
9316
+ }; }
9246
9317
  };
9247
9318
  SmoothlyInputFile.style = styleCss$K;
9248
9319