smoothly 0.1.92 → 0.1.96

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 (36) hide show
  1. package/dist/cjs/{index-bc3845e8.js → index-d66869d7.js} +7 -5
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/{smoothly-accordion_47.cjs.entry.js → smoothly-accordion_48.cjs.entry.js} +53 -13
  4. package/dist/cjs/smoothly-backtotop.cjs.entry.js +37 -0
  5. package/dist/cjs/smoothly-display.cjs.entry.js +1 -1
  6. package/dist/cjs/smoothly-input-demo.cjs.entry.js +4 -1
  7. package/dist/cjs/smoothly-input.cjs.entry.js +6 -2
  8. package/dist/cjs/smoothly.cjs.js +1 -1
  9. package/dist/collection/collection-manifest.json +1 -0
  10. package/dist/collection/components/backtotop/index.js +94 -0
  11. package/dist/collection/components/backtotop/style.css +19 -0
  12. package/dist/collection/components/input/index.js +6 -0
  13. package/dist/collection/components/input-demo/index.js +45 -42
  14. package/dist/custom-elements/index.d.ts +6 -0
  15. package/dist/custom-elements/index.js +56 -14
  16. package/dist/{smoothly/index-37a67c97.js → esm/index-401c6ce3.js} +7 -5
  17. package/dist/esm/loader.js +1 -1
  18. package/dist/esm/{smoothly-accordion_47.entry.js → smoothly-accordion_48.entry.js} +53 -14
  19. package/dist/esm/smoothly-backtotop.entry.js +33 -0
  20. package/dist/esm/smoothly-display.entry.js +1 -1
  21. package/dist/esm/smoothly-input-demo.entry.js +4 -1
  22. package/dist/esm/smoothly-input.entry.js +6 -2
  23. package/dist/esm/smoothly.js +1 -1
  24. package/dist/{esm/index-37a67c97.js → smoothly/index-401c6ce3.js} +7 -5
  25. package/dist/smoothly/p-c7500dad.entry.js +1 -0
  26. package/dist/smoothly/smoothly-backtotop.entry.js +33 -0
  27. package/dist/smoothly/smoothly-display.entry.js +1 -1
  28. package/dist/smoothly/smoothly-input-demo.entry.js +4 -1
  29. package/dist/smoothly/smoothly-input.entry.js +6 -2
  30. package/dist/smoothly/smoothly.esm.js +1 -1
  31. package/dist/types/components/backtotop/index.d.ts +8 -0
  32. package/dist/types/components/input/index.d.ts +1 -0
  33. package/dist/types/components/input-demo/index.d.ts +1 -1
  34. package/dist/types/components.d.ts +19 -0
  35. package/package.json +2 -2
  36. package/dist/smoothly/p-ad2b5e6e.entry.js +0 -1
@@ -212,6 +212,8 @@ var Action;
212
212
  function apply(formatter, state, action) {
213
213
  var _a, _b;
214
214
  let result = State_1.State.copy(formatter.unformat(StateEditor_1.StateEditor.copy(state)));
215
+ if (state.autocomplete == "cc-exp" && /^\d\d \/$/g.test(state.value))
216
+ (action === null || action === void 0 ? void 0 : action.key) && (action.key = "Backspace");
215
217
  if (action) {
216
218
  if (action.ctrlKey || action.metaKey) {
217
219
  if (action.key == "a")
@@ -343,7 +345,7 @@ class Handler {
343
345
  return typeof value == "string" ? value : undefined;
344
346
  }
345
347
  format(unformated) {
346
- return Object.assign(Object.assign({}, unformated), { type: "text", autocomplete: "cc-csc", length: [3, 3], pattern: /^\d{3}$/ });
348
+ return Object.assign(Object.assign({}, unformated), { type: "tel", autocomplete: "cc-csc", length: [3, 3], pattern: /^\d{3}$/ });
347
349
  }
348
350
  unformat(formated) {
349
351
  return formated;
@@ -379,7 +381,7 @@ class Handler {
379
381
  result = result.prepend("0");
380
382
  if (result.value.length > 1)
381
383
  result = result.insert(2, " / ");
382
- return Object.assign(Object.assign({}, result), { type: "text", autocomplete: "cc-exp", length: [7, 7], pattern: /^(0[1-9]|1[012]) \/ \d\d$/ });
384
+ return Object.assign(Object.assign({}, result), { type: "tel", autocomplete: "cc-exp", length: [7, 7], pattern: /^(0[1-9]|1[012]) \/ \d\d$/ });
383
385
  }
384
386
  unformat(formated) {
385
387
  return formated.delete(" / ");
@@ -407,8 +409,8 @@ class Handler {
407
409
  }
408
410
  format(unformated) {
409
411
  const issuer = getIssuer(unformated.value);
410
- const result = unformated.map((symbol, index) => symbol + (index % 4 == 3 && index + 1 < issuer.length[0] ? " " : ""));
411
- return Object.assign(Object.assign({}, result), { type: "text", autocomplete: "cc-number", length: issuer.length.slice(1), pattern: issuer.verification, classes: ["issuer-" + issuer.icon] });
412
+ const result = unformated.map((symbol, index) => (index != 0 && index % 4 == 0 && index + 1 < issuer.length[0] ? " " : "") + symbol);
413
+ return Object.assign(Object.assign({}, result), { type: "tel", autocomplete: "cc-number", length: issuer.length.slice(1), pattern: issuer.verification, classes: ["issuer-" + issuer.icon] });
412
414
  }
413
415
  unformat(formated) {
414
416
  return formated.delete(" ");
@@ -1537,7 +1539,7 @@ class Handler {
1537
1539
  }
1538
1540
  fromString(value) {
1539
1541
  const result = typeof value == "string" ? Number.parseFloat(value) : undefined;
1540
- return result && !isNaN(result) ? result : undefined;
1542
+ return result != undefined && !isNaN(result) ? result : undefined;
1541
1543
  }
1542
1544
  format(unformated) {
1543
1545
  var _a;
@@ -30,7 +30,7 @@ const defineCustomElements = (win, options) => {
30
30
  if (typeof window === 'undefined') return Promise.resolve();
31
31
  return patchEsm().then(() => {
32
32
  appGlobals.globalScripts();
33
- return index.bootstrapLazy([["smoothly-app-demo.cjs",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}]]],["smoothly-google-font.cjs",[[2,"smoothly-google-font",{"value":[1]}]]],["smoothly-radio-group.cjs",[[4,"smoothly-radio-group",{"orientation":[513]}]]],["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-input-demo.cjs",[[0,"smoothly-input-demo"]]],["smoothly-select-demo.cjs",[[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]]]],["smoothly-table-demo.cjs",[[2,"smoothly-table-demo"]]],["smoothly-display-demo.cjs",[[0,"smoothly-display-demo"]]],["smoothly-notifier.cjs",[[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]]]],["smoothly-app.cjs",[[4,"smoothly-app",{"color":[1]}]]],["smoothly-dialog-demo.cjs",[[0,"smoothly-dialog-demo"]]],["smoothly-icon-demo.cjs",[[2,"smoothly-icon-demo"]]],["smoothly-room.cjs",[[4,"smoothly-room",{"label":[1],"icon":[1],"path":[1],"to":[1]}]]],["smoothly-input-date-range.cjs",[[2,"smoothly-input-date-range",{"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"open":[1028]},[[0,"startChanged","onStartChanged"],[0,"endChanged","onEndChanged"],[0,"dateRangeSet","onDateRangeSet"]]]]],["smoothly-picker.cjs",[[1,"smoothly-picker",{"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"optionStyle":[8,"option-style"],"options":[16],"labelSetting":[513,"label-setting"],"label":[513],"selections":[1040],"selectNoneName":[1025,"select-none-name"],"isOpen":[32]},[[0,"optionSelect","optionSelectHander"]]]]],["smoothly-dialog.cjs",[[6,"smoothly-dialog",{"color":[513],"open":[1540],"closable":[516],"header":[513]},[[0,"trigger","TriggerListener"]]]]],["smoothly-checkbox.cjs",[[2,"smoothly-checkbox",{"selectAll":[4,"select-all"],"selected":[1540],"disabled":[1540],"t":[32]}]]],["smoothly-submit.cjs",[[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]]]],["smoothly-urlencoded.cjs",[[0,"smoothly-urlencoded",{"data":[1]}]]],["smoothly-accordion.cjs",[[6,"smoothly-accordion",{"value":[1025]},[[0,"smoothlyOpen","handleOpenClose"],[0,"smoothlyClose","handleOpenClose"],[0,"smoothlyAccordionItemDidLoad","onAccordionItemDidLoad"],[0,"smoothlyAccordionItemDidUnload","onAccordionItemDidUnload"]]]]],["smoothly-accordion-item.cjs",[[6,"smoothly-accordion-item",{"name":[1],"brand":[1],"open":[1540]}]]],["smoothly-display-amount.cjs",[[2,"smoothly-display-amount",{"amount":[8],"currency":[1]}]]],["smoothly-frame.cjs",[[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}]]],["smoothly-popup.cjs",[[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}]]],["smoothly-quiet.cjs",[[6,"smoothly-quiet",{"color":[1]}]]],["smoothly-radio.cjs",[[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}]]],["smoothly-select.cjs",[[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}]]],["smoothly-tab.cjs",[[6,"smoothly-tab",{"label":[1],"open":[1540]},[[0,"click","onClick"]]]]],["smoothly-tab-switch.cjs",[[6,"smoothly-tab-switch",{"selectedElement":[32]},[[0,"expansionOpen","openChanged"]]]]],["smoothly-table.cjs",[[6,"smoothly-table",null,[[0,"sort","onSort"]]]]],["smoothly-table-cell.cjs",[[6,"smoothly-table-cell"]]],["smoothly-table-expandable-cell.cjs",[[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]]]],["smoothly-table-expandable-row.cjs",[[6,"smoothly-table-expandable-row",null,[[0,"expansionLoaded","onExpansionLoaded"],[0,"expansionOpen","onDetailsLoaded"]]]]],["smoothly-table-header.cjs",[[6,"smoothly-table-header",{"name":[1],"sortDirection":[1025,"sort-direction"]},[[0,"click","onClick"]]]]],["smoothly-table-row.cjs",[[6,"smoothly-table-row",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]]]],["smoothly-icon.cjs",[[2,"smoothly-icon",{"color":[513],"fill":[513],"name":[1],"size":[513],"toolTip":[1,"tool-tip"],"document":[32]}]]],["smoothly-selector.cjs",[[6,"smoothly-selector",{"opened":[32],"selectedElement":[32],"missing":[32],"filter":[32]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]]]],["smoothly-input-date.cjs",[[6,"smoothly-input-date",{"value":[1025],"open":[1028],"max":[1025],"min":[1025]},[[0,"dateSet","dateSetHandler"]]]]],["smoothly-notification.cjs",[[2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]]]],["smoothly-option.cjs",[[1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537]}]]],["smoothly-menu-options.cjs",[[1,"smoothly-menu-options",{"emptyMenuLabel":[1025,"empty-menu-label"],"maxMenuHeight":[1,"max-menu-height"],"order":[4],"optionStyle":[8,"option-style"],"options":[1040],"resetHighlightOnOptionsChange":[1028,"reset-highlight-on-options-change"],"filteredOptions":[32],"highlightIndex":[32],"moveHighlight":[64],"setHighlight":[64],"getHighlighted":[64],"filterOptions":[64]},[[0,"optionHover","optionHoverHandler"]]]]],["smoothly-display.cjs",[[2,"smoothly-display",{"type":[1],"value":[8],"currency":[1],"country":[1]}]]],["smoothly-display-date-time.cjs",[[2,"smoothly-display-date-time",{"datetime":[1]}]]],["smoothly-spinner.cjs",[[2,"smoothly-spinner",{"active":[516]}]]],["smoothly-tuple.cjs",[[0,"smoothly-tuple",{"tuple":[16]}]]],["smoothly-item.cjs",[[6,"smoothly-item",{"value":[8],"selected":[1540],"filter":[64]},[[0,"click","onClick"]]]]],["smoothly-calendar.cjs",[[2,"smoothly-calendar",{"month":[1025],"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"doubleInput":[516,"double-input"],"firstSelected":[32]}]]],["smoothly-input.cjs",[[6,"smoothly-input",{"name":[513],"value":[1032],"type":[513],"required":[1540],"minLength":[1026,"min-length"],"maxLength":[1026,"max-length"],"autocomplete":[1028],"pattern":[1040],"placeholder":[1025],"disabled":[1028],"currency":[513],"getFormData":[64],"setKeepFocusOnReRender":[64],"setSelectionRange":[64]}]]],["smoothly-input-month.cjs",[[2,"smoothly-input-month",{"value":[1025]}]]],["smoothly-trigger.cjs",[[6,"smoothly-trigger",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"name":[1],"value":[8]},[[0,"click","onClick"]]]]]], options);
33
+ return index.bootstrapLazy([["smoothly-app-demo.cjs",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}]]],["smoothly-google-font.cjs",[[2,"smoothly-google-font",{"value":[1]}]]],["smoothly-radio-group.cjs",[[4,"smoothly-radio-group",{"orientation":[513]}]]],["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-input-demo.cjs",[[0,"smoothly-input-demo"]]],["smoothly-select-demo.cjs",[[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]]]],["smoothly-table-demo.cjs",[[2,"smoothly-table-demo"]]],["smoothly-display-demo.cjs",[[0,"smoothly-display-demo"]]],["smoothly-app.cjs",[[4,"smoothly-app",{"color":[1]}]]],["smoothly-dialog-demo.cjs",[[0,"smoothly-dialog-demo"]]],["smoothly-icon-demo.cjs",[[2,"smoothly-icon-demo"]]],["smoothly-room.cjs",[[4,"smoothly-room",{"label":[1],"icon":[1],"path":[1],"to":[1]}]]],["smoothly-input-date-range.cjs",[[2,"smoothly-input-date-range",{"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"open":[1028]},[[0,"startChanged","onStartChanged"],[0,"endChanged","onEndChanged"],[0,"dateRangeSet","onDateRangeSet"]]]]],["smoothly-notifier.cjs",[[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]]]],["smoothly-picker.cjs",[[1,"smoothly-picker",{"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"optionStyle":[8,"option-style"],"options":[16],"labelSetting":[513,"label-setting"],"label":[513],"selections":[1040],"selectNoneName":[1025,"select-none-name"],"isOpen":[32]},[[0,"optionSelect","optionSelectHander"]]]]],["smoothly-dialog.cjs",[[6,"smoothly-dialog",{"color":[513],"open":[1540],"closable":[516],"header":[513]},[[0,"trigger","TriggerListener"]]]]],["smoothly-backtotop.cjs",[[2,"smoothly-backtotop",{"opacity":[1],"bottom":[1],"right":[1],"visible":[32]}]]],["smoothly-checkbox.cjs",[[2,"smoothly-checkbox",{"selectAll":[4,"select-all"],"selected":[1540],"disabled":[1540],"t":[32]}]]],["smoothly-submit.cjs",[[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]]]],["smoothly-urlencoded.cjs",[[0,"smoothly-urlencoded",{"data":[1]}]]],["smoothly-accordion.cjs",[[6,"smoothly-accordion",{"value":[1025]},[[0,"smoothlyOpen","handleOpenClose"],[0,"smoothlyClose","handleOpenClose"],[0,"smoothlyAccordionItemDidLoad","onAccordionItemDidLoad"],[0,"smoothlyAccordionItemDidUnload","onAccordionItemDidUnload"]]]]],["smoothly-accordion-item.cjs",[[6,"smoothly-accordion-item",{"name":[1],"brand":[1],"open":[1540]}]]],["smoothly-display-amount.cjs",[[2,"smoothly-display-amount",{"amount":[8],"currency":[1]}]]],["smoothly-frame.cjs",[[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}]]],["smoothly-popup.cjs",[[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}]]],["smoothly-quiet.cjs",[[6,"smoothly-quiet",{"color":[1]}]]],["smoothly-radio.cjs",[[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}]]],["smoothly-select.cjs",[[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}]]],["smoothly-tab.cjs",[[6,"smoothly-tab",{"label":[1],"open":[1540]},[[0,"click","onClick"]]]]],["smoothly-tab-switch.cjs",[[6,"smoothly-tab-switch",{"selectedElement":[32]},[[0,"expansionOpen","openChanged"]]]]],["smoothly-table.cjs",[[6,"smoothly-table",null,[[0,"sort","onSort"]]]]],["smoothly-table-cell.cjs",[[6,"smoothly-table-cell"]]],["smoothly-table-expandable-cell.cjs",[[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]]]],["smoothly-table-expandable-row.cjs",[[6,"smoothly-table-expandable-row",null,[[0,"expansionLoaded","onExpansionLoaded"],[0,"expansionOpen","onDetailsLoaded"]]]]],["smoothly-table-header.cjs",[[6,"smoothly-table-header",{"name":[1],"sortDirection":[1025,"sort-direction"]},[[0,"click","onClick"]]]]],["smoothly-table-row.cjs",[[6,"smoothly-table-row",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]]]],["smoothly-icon.cjs",[[2,"smoothly-icon",{"color":[513],"fill":[513],"name":[1],"size":[513],"toolTip":[1,"tool-tip"],"document":[32]}]]],["smoothly-selector.cjs",[[6,"smoothly-selector",{"opened":[32],"selectedElement":[32],"missing":[32],"filter":[32]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]]]],["smoothly-input-date.cjs",[[6,"smoothly-input-date",{"value":[1025],"open":[1028],"max":[1025],"min":[1025]},[[0,"dateSet","dateSetHandler"]]]]],["smoothly-notification.cjs",[[2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]]]],["smoothly-option.cjs",[[1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537]}]]],["smoothly-menu-options.cjs",[[1,"smoothly-menu-options",{"emptyMenuLabel":[1025,"empty-menu-label"],"maxMenuHeight":[1,"max-menu-height"],"order":[4],"optionStyle":[8,"option-style"],"options":[1040],"resetHighlightOnOptionsChange":[1028,"reset-highlight-on-options-change"],"filteredOptions":[32],"highlightIndex":[32],"moveHighlight":[64],"setHighlight":[64],"getHighlighted":[64],"filterOptions":[64]},[[0,"optionHover","optionHoverHandler"]]]]],["smoothly-display.cjs",[[2,"smoothly-display",{"type":[1],"value":[8],"currency":[1],"country":[1]}]]],["smoothly-display-date-time.cjs",[[2,"smoothly-display-date-time",{"datetime":[1]}]]],["smoothly-spinner.cjs",[[2,"smoothly-spinner",{"active":[516]}]]],["smoothly-tuple.cjs",[[0,"smoothly-tuple",{"tuple":[16]}]]],["smoothly-item.cjs",[[6,"smoothly-item",{"value":[8],"selected":[1540],"filter":[64]},[[0,"click","onClick"]]]]],["smoothly-calendar.cjs",[[2,"smoothly-calendar",{"month":[1025],"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"doubleInput":[516,"double-input"],"firstSelected":[32]}]]],["smoothly-input.cjs",[[6,"smoothly-input",{"name":[513],"value":[1032],"type":[513],"required":[1540],"minLength":[1026,"min-length"],"maxLength":[1026,"max-length"],"autocomplete":[1028],"pattern":[1040],"placeholder":[1025],"disabled":[1028],"currency":[513],"getFormData":[64],"setKeepFocusOnReRender":[64],"setSelectionRange":[64]}]]],["smoothly-input-month.cjs",[[2,"smoothly-input-month",{"value":[1025]}]]],["smoothly-trigger.cjs",[[6,"smoothly-trigger",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"name":[1],"value":[8]},[[0,"click","onClick"]]]]]], options);
34
34
  });
35
35
  };
36
36
 
@@ -7,7 +7,7 @@ const Notice = require('./Notice-9120d311.js');
7
7
  const Trigger = require('./Trigger-74bd1ee8.js');
8
8
  require('./GoogleFont-6c4f0da1.js');
9
9
 
10
- const styleCss$D = "smoothly-accordion-item.sc-smoothly-accordion{border:1px solid rgb(var(--smoothly-dark-color));border-bottom:none}smoothly-accordion-item.sc-smoothly-accordion:first-of-type{border-top-left-radius:4px;border-top-right-radius:4px;margin-top:0.4em}smoothly-accordion-item.sc-smoothly-accordion:last-of-type{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:1px solid rgb(var(--smoothly-dark-color));margin-bottom:0.6em}smoothly-accordion-item[open].sc-smoothly-accordion{border-color:rgb(var(--smoothly-primary-color));border-bottom:1px solid rgb(var(--smoothly-primary-color))}smoothly-accordion-item[open].sc-smoothly-accordion+smoothly-accordion-item.sc-smoothly-accordion{border-top:none}";
10
+ const styleCss$E = "smoothly-accordion-item.sc-smoothly-accordion{border:1px solid rgb(var(--smoothly-dark-color));border-bottom:none}smoothly-accordion-item.sc-smoothly-accordion:first-of-type{border-top-left-radius:4px;border-top-right-radius:4px;margin-top:0.4em}smoothly-accordion-item.sc-smoothly-accordion:last-of-type{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:1px solid rgb(var(--smoothly-dark-color));margin-bottom:0.6em}smoothly-accordion-item[open].sc-smoothly-accordion{border-color:rgb(var(--smoothly-primary-color));border-bottom:1px solid rgb(var(--smoothly-primary-color))}smoothly-accordion-item[open].sc-smoothly-accordion+smoothly-accordion-item.sc-smoothly-accordion{border-top:none}";
11
11
 
12
12
  let SmoothlyAccordion = class {
13
13
  constructor(hostRef) {
@@ -53,9 +53,9 @@ let SmoothlyAccordion = class {
53
53
  "value": ["valueChanged"]
54
54
  }; }
55
55
  };
56
- SmoothlyAccordion.style = styleCss$D;
56
+ SmoothlyAccordion.style = styleCss$E;
57
57
 
58
- const styleCss$C = ".sc-smoothly-accordion-item-h{display:block}[hidden].sc-smoothly-accordion-item-h{display:none}details.sc-smoothly-accordion-item{padding:0}details.sc-smoothly-accordion-item>summary.sc-smoothly-accordion-item>span.sc-smoothly-accordion-item{float:right;margin:0.2em;font-size:60%}details.sc-smoothly-accordion-item>summary.sc-smoothly-accordion-item{font-size:120%;list-style-type:none;cursor:pointer;padding:0.4em;color:rgb(var(--smoothly-text-tint))}details.sc-smoothly-accordion-item>fieldset.sc-smoothly-accordion-item{border:none;margin:0;padding:0}[open].sc-smoothly-accordion-item-h>details.sc-smoothly-accordion-item>summary.sc-smoothly-accordion-item{color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-color))}details.sc-smoothly-accordion-item>summary.sc-smoothly-accordion-item::-webkit-details-marker{display:none}details.sc-smoothly-accordion-item>summary.sc-smoothly-accordion-item>svg.sc-smoothly-accordion-item{width:1em;height:auto;margin-bottom:-0.2em;margin-right:0.4em}[open].sc-smoothly-accordion-item-h>details.sc-smoothly-accordion-item>summary.sc-smoothly-accordion-item>svg.sc-smoothly-accordion-item{fill:rgb(var(--smoothly-primary-contrast))}.sc-smoothly-accordion-item-h:not([open])>details.sc-smoothly-accordion-item>summary.sc-smoothly-accordion-item>svg.sc-smoothly-accordion-item{fill:rgb(var(--smoothly-text-tint))}";
58
+ const styleCss$D = ".sc-smoothly-accordion-item-h{display:block}[hidden].sc-smoothly-accordion-item-h{display:none}details.sc-smoothly-accordion-item{padding:0}details.sc-smoothly-accordion-item>summary.sc-smoothly-accordion-item>span.sc-smoothly-accordion-item{float:right;margin:0.2em;font-size:60%}details.sc-smoothly-accordion-item>summary.sc-smoothly-accordion-item{font-size:120%;list-style-type:none;cursor:pointer;padding:0.4em;color:rgb(var(--smoothly-text-tint))}details.sc-smoothly-accordion-item>fieldset.sc-smoothly-accordion-item{border:none;margin:0;padding:0}[open].sc-smoothly-accordion-item-h>details.sc-smoothly-accordion-item>summary.sc-smoothly-accordion-item{color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-color))}details.sc-smoothly-accordion-item>summary.sc-smoothly-accordion-item::-webkit-details-marker{display:none}details.sc-smoothly-accordion-item>summary.sc-smoothly-accordion-item>svg.sc-smoothly-accordion-item{width:1em;height:auto;margin-bottom:-0.2em;margin-right:0.4em}[open].sc-smoothly-accordion-item-h>details.sc-smoothly-accordion-item>summary.sc-smoothly-accordion-item>svg.sc-smoothly-accordion-item{fill:rgb(var(--smoothly-primary-contrast))}.sc-smoothly-accordion-item-h:not([open])>details.sc-smoothly-accordion-item>summary.sc-smoothly-accordion-item>svg.sc-smoothly-accordion-item{fill:rgb(var(--smoothly-text-tint))}";
59
59
 
60
60
  let SmoothlyAccordionItem = class {
61
61
  constructor(hostRef) {
@@ -100,9 +100,9 @@ let SmoothlyAccordionItem = class {
100
100
  "open": ["openChanged"]
101
101
  }; }
102
102
  };
103
- SmoothlyAccordionItem.style = styleCss$C;
103
+ SmoothlyAccordionItem.style = styleCss$D;
104
104
 
105
- const styleCss$B = "smoothly-app{display:block;scrollbar-width:none}smoothly-app[hidden]{display:none}smoothly-app[color=default],smoothly-app:not([color]){--smoothly-app-background:var(--smoothly-default-shade);--smoothly-app-color:var(--smoothly-default-contrast);--smoothly-app-hover-background:var(--smoothly-primary-color);--smoothly-app-hover-color:var(--smoothly-primary-contrast);--smoothly-app-shadow:var(--smoothly-default-shadow)}smoothly-app[color=primary]{--smoothly-app-background:var(--smoothly-primary-shade);--smoothly-app-color:var(--smoothly-primary-contrast);--smoothly-app-hover-background:var(--smoothly-secondary-color);--smoothly-app-hover-color:var(--smoothly-secondary-contrast);--smoothly-app-shadow:var(--smoothly-primary-shadow)}smoothly-app[color=secondary]{--smoothly-app-background:var(--smoothly-secondary-shade);--smoothly-app-color:var(--smoothly-secondary-contrast);--smoothly-app-hover-background:var(--smoothly-primary-color);--smoothly-app-hover-color:var(--smoothly-primary-contrast);--smoothly-app-shadow:var(--smoothly-secondary-shadow)}smoothly-app[color=tertiary],smoothly-app[color=success],smoothly-app[color=warning],smoothly-app[color=danger]{--smoothly-app-background:var(--smoothly-color-shade);--smoothly-app-color:var(--smoothly-color-contrast);--smoothly-app-hover-background:var(--smoothly-default-shade);--smoothly-app-hover-color:var(--smoothly-default-contrast);--smoothly-app-shadow:var(--smoothly-color-shadow)}smoothly-app>smoothly-notifier>header{position:fixed;top:0;left:0;width:100%;z-index:5;height:1.6cm;background-color:rgb(var(--smoothly-app-background));color:rgb(var(--smoothly-app-color));fill:rgb(var(--smoothly-app-color));stroke:rgb(var(--smoothly-app-color));display:flex;justify-content:space-between;align-items:center;box-shadow:0 2px 5px 0 rgba(var(--smoothly-app-shadow))}smoothly-app>smoothly-notifier>header a{color:inherit;text-decoration:inherit}smoothly-app>smoothly-notifier>header>nav{flex-shrink:0}smoothly-app>smoothly-notifier>header>h1,smoothly-app>smoothly-notifier>header>nav,smoothly-app>smoothly-notifier>header>nav>ul,smoothly-app>smoothly-notifier>header>nav>ul>li,smoothly-app>smoothly-notifier>header>nav>ul>li>*:not(a){display:inline-block;height:100%;margin:0}smoothly-app>smoothly-notifier>header>h1 a{overflow:hidden;user-select:none}smoothly-app>smoothly-notifier>header>nav>ul>li a{line-height:1.6cm}smoothly-app>smoothly-notifier>header>h1 a,smoothly-app>smoothly-notifier>header>nav>ul>li a{display:inline-block;height:100%;padding:0 0.4cm;text-decoration:none;font-weight:bold}smoothly-app>smoothly-notifier>header>nav>ul>li smoothly-trigger.sc-smoothly-trigger-h{border:0}smoothly-app>smoothly-notifier>header>nav>ul>li a>smoothly-icon{position:relative;top:0.2cm}smoothly-app>smoothly-notifier>header>nav>ul>li>a:hover>smoothly-icon,smoothly-app>smoothly-notifier>header>nav>ul>li>a.active>smoothly-icon,smoothly-app>smoothly-notifier>header>nav>ul>li>smoothly-trigger.active a>smoothly-icon,smoothly-app>smoothly-notifier>header>nav>ul>li>smoothly-trigger:hover a>smoothly-icon,smoothly-app>smoothly-notifier>header>nav>ul>li a:hover,smoothly-app>smoothly-notifier>header>nav>ul>li a.active{background-color:rgb(var(--smoothly-app-hover-background));color:rgb(var(--smoothly-app-hover-color));stroke:rgb(var(--smoothly-app-hover-color));fill:rgb(var(--smoothly-app-hover-color))}smoothly-app>smoothly-notifier>content{position:relative;top:1.6cm}";
105
+ const styleCss$C = "smoothly-app{display:block;scrollbar-width:none}smoothly-app[hidden]{display:none}smoothly-app[color=default],smoothly-app:not([color]){--smoothly-app-background:var(--smoothly-default-shade);--smoothly-app-color:var(--smoothly-default-contrast);--smoothly-app-hover-background:var(--smoothly-primary-color);--smoothly-app-hover-color:var(--smoothly-primary-contrast);--smoothly-app-shadow:var(--smoothly-default-shadow)}smoothly-app[color=primary]{--smoothly-app-background:var(--smoothly-primary-shade);--smoothly-app-color:var(--smoothly-primary-contrast);--smoothly-app-hover-background:var(--smoothly-secondary-color);--smoothly-app-hover-color:var(--smoothly-secondary-contrast);--smoothly-app-shadow:var(--smoothly-primary-shadow)}smoothly-app[color=secondary]{--smoothly-app-background:var(--smoothly-secondary-shade);--smoothly-app-color:var(--smoothly-secondary-contrast);--smoothly-app-hover-background:var(--smoothly-primary-color);--smoothly-app-hover-color:var(--smoothly-primary-contrast);--smoothly-app-shadow:var(--smoothly-secondary-shadow)}smoothly-app[color=tertiary],smoothly-app[color=success],smoothly-app[color=warning],smoothly-app[color=danger]{--smoothly-app-background:var(--smoothly-color-shade);--smoothly-app-color:var(--smoothly-color-contrast);--smoothly-app-hover-background:var(--smoothly-default-shade);--smoothly-app-hover-color:var(--smoothly-default-contrast);--smoothly-app-shadow:var(--smoothly-color-shadow)}smoothly-app>smoothly-notifier>header{position:fixed;top:0;left:0;width:100%;z-index:5;height:1.6cm;background-color:rgb(var(--smoothly-app-background));color:rgb(var(--smoothly-app-color));fill:rgb(var(--smoothly-app-color));stroke:rgb(var(--smoothly-app-color));display:flex;justify-content:space-between;align-items:center;box-shadow:0 2px 5px 0 rgba(var(--smoothly-app-shadow))}smoothly-app>smoothly-notifier>header a{color:inherit;text-decoration:inherit}smoothly-app>smoothly-notifier>header>nav{flex-shrink:0}smoothly-app>smoothly-notifier>header>h1,smoothly-app>smoothly-notifier>header>nav,smoothly-app>smoothly-notifier>header>nav>ul,smoothly-app>smoothly-notifier>header>nav>ul>li,smoothly-app>smoothly-notifier>header>nav>ul>li>*:not(a){display:inline-block;height:100%;margin:0}smoothly-app>smoothly-notifier>header>h1 a{overflow:hidden;user-select:none}smoothly-app>smoothly-notifier>header>nav>ul>li a{line-height:1.6cm}smoothly-app>smoothly-notifier>header>h1 a,smoothly-app>smoothly-notifier>header>nav>ul>li a{display:inline-block;height:100%;padding:0 0.4cm;text-decoration:none;font-weight:bold}smoothly-app>smoothly-notifier>header>nav>ul>li smoothly-trigger.sc-smoothly-trigger-h{border:0}smoothly-app>smoothly-notifier>header>nav>ul>li a>smoothly-icon{position:relative;top:0.2cm}smoothly-app>smoothly-notifier>header>nav>ul>li>a:hover>smoothly-icon,smoothly-app>smoothly-notifier>header>nav>ul>li>a.active>smoothly-icon,smoothly-app>smoothly-notifier>header>nav>ul>li>smoothly-trigger.active a>smoothly-icon,smoothly-app>smoothly-notifier>header>nav>ul>li>smoothly-trigger:hover a>smoothly-icon,smoothly-app>smoothly-notifier>header>nav>ul>li a:hover,smoothly-app>smoothly-notifier>header>nav>ul>li a.active{background-color:rgb(var(--smoothly-app-hover-background));color:rgb(var(--smoothly-app-hover-color));stroke:rgb(var(--smoothly-app-hover-color));fill:rgb(var(--smoothly-app-hover-color))}smoothly-app>smoothly-notifier>content{position:relative;top:1.6cm}";
106
106
 
107
107
  let SmoothlyApp = class {
108
108
  constructor(hostRef) {
@@ -112,7 +112,7 @@ let SmoothlyApp = class {
112
112
  return (index.h("smoothly-notifier", null, index.h("slot", null)));
113
113
  }
114
114
  };
115
- SmoothlyApp.style = styleCss$B;
115
+ SmoothlyApp.style = styleCss$C;
116
116
 
117
117
  let SmoothlyAppDemo = class {
118
118
  constructor(hostRef) {
@@ -135,6 +135,36 @@ let SmoothlyAppDemo = class {
135
135
  }
136
136
  };
137
137
 
138
+ const styleCss$B = ".sc-smoothly-backtotop-h{background-color:rgba(var(--smoothly-default-color), 1);opacity:var(--opacity);pointer-events:var(--pointer-events);transition:opacity 400ms;z-index:3;border-radius:50%;box-shadow:var(--smoothly-shadow);height:3rem;width:3rem;position:fixed;bottom:var(--bottom);right:var(--right);outline:none;cursor:pointer;display:flex;justify-content:center;align-items:center}";
139
+
140
+ let SmoothlyBacktotop = class {
141
+ constructor(hostRef) {
142
+ index.registerInstance(this, hostRef);
143
+ this.opacity = "0.5";
144
+ this.bottom = "1rem";
145
+ this.right = "1rem";
146
+ }
147
+ componentWillLoad() {
148
+ window.addEventListener("scroll", () => {
149
+ this.visible = document.body.scrollTop > 20 || document.documentElement.scrollTop > 20;
150
+ });
151
+ }
152
+ render() {
153
+ const cssVariables = {
154
+ "--opacity": this.visible ? this.opacity : "0",
155
+ "--pointer-events": this.visible ? "auto" : "none",
156
+ "--bottom": this.bottom,
157
+ "--right": this.right,
158
+ };
159
+ return (index.h(index.Host, { style: cssVariables, onClick: () => window.scrollTo({
160
+ top: 0,
161
+ left: 0,
162
+ behavior: "smooth",
163
+ }) }, index.h("smoothly-icon", { name: "chevron-up-outline" })));
164
+ }
165
+ };
166
+ SmoothlyBacktotop.style = styleCss$B;
167
+
138
168
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
139
169
 
140
170
  function createCommonjsModule(fn, basedir, module) {
@@ -37577,6 +37607,8 @@ exports.Action = void 0;
37577
37607
  function apply(formatter, state, action) {
37578
37608
  var _a, _b;
37579
37609
  let result = State_1.State.copy(formatter.unformat(StateEditor_1.StateEditor.copy(state)));
37610
+ if (state.autocomplete == "cc-exp" && /^\d\d \/$/g.test(state.value))
37611
+ (action === null || action === void 0 ? void 0 : action.key) && (action.key = "Backspace");
37580
37612
  if (action) {
37581
37613
  if (action.ctrlKey || action.metaKey) {
37582
37614
  if (action.key == "a")
@@ -37702,7 +37734,7 @@ class Handler {
37702
37734
  return typeof value == "string" ? value : undefined;
37703
37735
  }
37704
37736
  format(unformated) {
37705
- return Object.assign(Object.assign({}, unformated), { type: "text", autocomplete: "cc-csc", length: [3, 3], pattern: /^\d{3}$/ });
37737
+ return Object.assign(Object.assign({}, unformated), { type: "tel", autocomplete: "cc-csc", length: [3, 3], pattern: /^\d{3}$/ });
37706
37738
  }
37707
37739
  unformat(formated) {
37708
37740
  return formated;
@@ -37735,7 +37767,7 @@ class Handler {
37735
37767
  result = result.prepend("0");
37736
37768
  if (result.value.length > 1)
37737
37769
  result = result.insert(2, " / ");
37738
- return Object.assign(Object.assign({}, result), { type: "text", autocomplete: "cc-exp", length: [7, 7], pattern: /^(0[1-9]|1[012]) \/ \d\d$/ });
37770
+ return Object.assign(Object.assign({}, result), { type: "tel", autocomplete: "cc-exp", length: [7, 7], pattern: /^(0[1-9]|1[012]) \/ \d\d$/ });
37739
37771
  }
37740
37772
  unformat(formated) {
37741
37773
  return formated.delete(" / ");
@@ -37760,8 +37792,8 @@ class Handler {
37760
37792
  }
37761
37793
  format(unformated) {
37762
37794
  const issuer = getIssuer(unformated.value);
37763
- const result = unformated.map((symbol, index) => symbol + (index % 4 == 3 && index + 1 < issuer.length[0] ? " " : ""));
37764
- return Object.assign(Object.assign({}, result), { type: "text", autocomplete: "cc-number", length: issuer.length.slice(1), pattern: issuer.verification, classes: ["issuer-" + issuer.icon] });
37795
+ const result = unformated.map((symbol, index) => (index != 0 && index % 4 == 0 && index + 1 < issuer.length[0] ? " " : "") + symbol);
37796
+ return Object.assign(Object.assign({}, result), { type: "tel", autocomplete: "cc-number", length: issuer.length.slice(1), pattern: issuer.verification, classes: ["issuer-" + issuer.icon] });
37765
37797
  }
37766
37798
  unformat(formated) {
37767
37799
  return formated.delete(" ");
@@ -38842,7 +38874,7 @@ class Handler {
38842
38874
  }
38843
38875
  fromString(value) {
38844
38876
  const result = typeof value == "string" ? Number.parseFloat(value) : undefined;
38845
- return result && !isNaN(result) ? result : undefined;
38877
+ return result != undefined && !isNaN(result) ? result : undefined;
38846
38878
  }
38847
38879
  format(unformated) {
38848
38880
  var _a;
@@ -39679,6 +39711,9 @@ let SmoothlyInput = class {
39679
39711
  if (value != before)
39680
39712
  this.smoothlyChanged.emit({ name: this.name, value });
39681
39713
  }
39714
+ onCurrency() {
39715
+ this.state = Object.assign(Object.assign({}, this.state), { value: this.newState({ value: this.formatter.toString(this.value), selection: this.state.selection }).value, pattern: this.newState({ value: this.formatter.toString(this.value), selection: this.state.selection }).pattern });
39716
+ }
39682
39717
  componentWillLoad() {
39683
39718
  const value = this.formatter.toString(this.value) || "";
39684
39719
  const start = value.length;
@@ -39819,7 +39854,8 @@ let SmoothlyInput = class {
39819
39854
  return (index.h(index.Host, { class: { "has-value": ((_a = this.state) === null || _a === void 0 ? void 0 : _a.value) != undefined && ((_b = this.state) === null || _b === void 0 ? void 0 : _b.value) != "" } }, index.h("input", { name: this.name, type: (_c = this.state) === null || _c === void 0 ? void 0 : _c.type, placeholder: this.placeholder, required: this.required, autocomplete: this.autocomplete ? (_d = this.state) === null || _d === void 0 ? void 0 : _d.autocomplete : "off", disabled: this.disabled, pattern: ((_e = this.state) === null || _e === void 0 ? void 0 : _e.pattern) && ((_f = this.state) === null || _f === void 0 ? void 0 : _f.pattern.source), value: (_g = this.state) === null || _g === void 0 ? void 0 : _g.value, onInput: (e) => this.onInput(e), onFocus: e => this.onFocus(e), onClick: e => this.onClick(e), onBlur: e => this.onBlur(e), onKeyDown: e => this.onKeyDown(e), ref: (el) => (this.inputElement = el), onPaste: e => this.onPaste(e) }), index.h("smoothly-icon", { name: "alert-circle", color: "danger", fill: "clear", size: "small" }), index.h("label", { htmlFor: this.name }, index.h("slot", null))));
39820
39855
  }
39821
39856
  static get watchers() { return {
39822
- "value": ["valueWatcher"]
39857
+ "value": ["valueWatcher"],
39858
+ "currency": ["onCurrency"]
39823
39859
  }; }
39824
39860
  };
39825
39861
  function getLocale() {
@@ -39904,7 +39940,10 @@ let SmoothlyInputDemo = class {
39904
39940
  index.registerInstance(this, hostRef);
39905
39941
  }
39906
39942
  render() {
39907
- return (index.h("form", { action: "done", style: { position: "relative" } }, index.h("header", null, index.h("h5", null, "Address")), index.h("main", null, index.h("smoothly-input", { type: "text", name: "name" }, "Name"), index.h("smoothly-input", { type: "date", name: "date" }, "Date"), index.h("smoothly-input", { type: "date-time", name: "date-time" }, "Date-Time"), index.h("smoothly-input", { type: "divisor", name: "divisor" }, "Divisor"), index.h("smoothly-input", { type: "text", name: "street", value: "street" }, "Street"), index.h("smoothly-input", { type: "card-number", name: "card" }, "Card #"), index.h("smoothly-input", { type: "card-expires", name: "card", style: { width: "calc(60% - 2px)" } }, "Expires"), index.h("smoothly-input", { type: "card-csc", name: "card", style: { width: "calc(40% - 1px)", borderLeft: "none" } }, "CVV/CVC"), index.h("smoothly-radio", { name: "option", value: "1" }, "option 1"), index.h("smoothly-radio", { name: "option", value: "2", checked: true }, "option 2"), index.h("smoothly-radio", { name: "option", value: "3" }, "option 3"), index.h("smoothly-accordion", null, index.h("smoothly-accordion-item", { name: "A", open: true }, index.h("smoothly-radio", { name: "a", value: "1" }, "a 1"), index.h("smoothly-radio", { name: "a", value: "2", checked: true }, "a 2"), index.h("smoothly-radio", { name: "a", value: "3" }, "a 3")), index.h("smoothly-accordion-item", { name: "B" }, index.h("smoothly-radio", { name: "b", value: "1" }, "b 1"), index.h("smoothly-radio", { name: "b", value: "2" }, "b 2"), index.h("smoothly-radio", { name: "b", value: "3" }, "b 3"))), index.h("smoothly-display-amount", { currency: "SEK", amount: "1289.5" }), index.h("smoothly-display-date-time", { datetime: "2019-01-31T20:01:34" }), index.h("smoothly-checkbox", null), index.h("smoothly-checkbox", { disabled: true }), index.h("smoothly-address-display", { value: '{ "countryCode": "SE", "street": "Korkstigen 2", "zipCode": "654 31", "city": "Fejksala" }' }), index.h("smoothly-address", { editable: false, value: '{ "countryCode": "SE", "street": "Stigv\u00E4gen 34", "zipCode": "123 45", "city": "Hobbiton" }' }), index.h("smoothly-addresses", { allowed: "billing delivery visit", editable: true, value: '{ "billing": { "countryCode": "SE", "street": "Rundslingan 3", "zipCode": "987 65", "city": "Klotby" }, "visit": { "countryCode": "SE", "street": "G\u00E5ngbanan 34", "zipCode": "543 21", "city": "Trasktr\u00E4sk" } }' }), index.h("smoothly-input", { type: "postal-code", name: "zip", style: { width: "calc(60% - 2px)" } }, "ZipCode"), index.h("smoothly-input", { type: "text", name: "testing" }, "Texttest"), index.h("smoothly-input", { type: "password", name: "password" }, "Password"), index.h("smoothly-input", { type: "email", name: "email" }, "Email"), index.h("smoothly-input", { type: "price", currency: "SEK", name: "price" }, "Price"), index.h("smoothly-input", { type: "percent", name: "percent" }, "Percent"), index.h("smoothly-input", { type: "phone", name: "phone" }, "Phone"), index.h("smoothly-input-date", null, "Date")), index.h("footer", null, index.h("smoothly-submit", { expand: "block", onSubmit: (e) => alert(e), color: "success" }, "Submit"), index.h("smoothly-trigger", { expand: "block", color: "success", onClick: (e) => console.log(e.detail) }, "Trigger"))));
39943
+ return [
39944
+ index.h("form", { action: "done", style: { position: "relative" } }, index.h("header", null, index.h("h5", null, "Address")), index.h("main", null, index.h("smoothly-input", { type: "text", name: "name" }, "Name"), index.h("smoothly-input", { type: "date", name: "date" }, "Date"), index.h("smoothly-input", { type: "date-time", name: "date-time" }, "Date-Time"), index.h("smoothly-input", { type: "divisor", name: "divisor" }, "Divisor"), index.h("smoothly-input", { type: "text", name: "street", value: "street" }, "Street"), index.h("smoothly-input", { type: "card-number", name: "card" }, "Card #"), index.h("smoothly-input", { type: "card-expires", name: "card", style: { width: "calc(60% - 2px)" } }, "Expires"), index.h("smoothly-input", { type: "card-csc", name: "card", style: { width: "calc(40% - 1px)", borderLeft: "none" } }, "CVV/CVC"), index.h("smoothly-radio", { name: "option", value: "1" }, "option 1"), index.h("smoothly-radio", { name: "option", value: "2", checked: true }, "option 2"), index.h("smoothly-radio", { name: "option", value: "3" }, "option 3"), index.h("smoothly-accordion", null, index.h("smoothly-accordion-item", { name: "A", open: true }, index.h("smoothly-radio", { name: "a", value: "1" }, "a 1"), index.h("smoothly-radio", { name: "a", value: "2", checked: true }, "a 2"), index.h("smoothly-radio", { name: "a", value: "3" }, "a 3")), index.h("smoothly-accordion-item", { name: "B" }, index.h("smoothly-radio", { name: "b", value: "1" }, "b 1"), index.h("smoothly-radio", { name: "b", value: "2" }, "b 2"), index.h("smoothly-radio", { name: "b", value: "3" }, "b 3"))), index.h("smoothly-display-amount", { currency: "SEK", amount: "1289.5" }), index.h("smoothly-display-date-time", { datetime: "2019-01-31T20:01:34" }), index.h("smoothly-checkbox", null), index.h("smoothly-checkbox", { disabled: true }), index.h("smoothly-address-display", { value: '{ "countryCode": "SE", "street": "Korkstigen 2", "zipCode": "654 31", "city": "Fejksala" }' }), index.h("smoothly-address", { editable: false, value: '{ "countryCode": "SE", "street": "Stigv\u00E4gen 34", "zipCode": "123 45", "city": "Hobbiton" }' }), index.h("smoothly-addresses", { allowed: "billing delivery visit", editable: true, value: '{ "billing": { "countryCode": "SE", "street": "Rundslingan 3", "zipCode": "987 65", "city": "Klotby" }, "visit": { "countryCode": "SE", "street": "G\u00E5ngbanan 34", "zipCode": "543 21", "city": "Trasktr\u00E4sk" } }' }), index.h("smoothly-input", { type: "postal-code", name: "zip", style: { width: "calc(60% - 2px)" } }, "ZipCode"), index.h("smoothly-input", { type: "text", name: "testing" }, "Texttest"), index.h("smoothly-input", { type: "password", name: "password" }, "Password"), index.h("smoothly-input", { type: "email", name: "email" }, "Email"), index.h("smoothly-input", { type: "price", currency: "SEK", name: "price" }, "Price"), index.h("smoothly-input", { type: "percent", name: "percent" }, "Percent"), index.h("smoothly-input", { type: "phone", name: "phone" }, "Phone"), index.h("smoothly-input-date", null, "Date")), index.h("footer", null, index.h("smoothly-submit", { expand: "block", onSubmit: (e) => alert(e), color: "success" }, "Submit"), index.h("smoothly-trigger", { expand: "block", color: "success", onClick: (e) => console.log(e.detail) }, "Trigger"))),
39945
+ index.h("smoothly-backtotop", null),
39946
+ ];
39908
39947
  }
39909
39948
  };
39910
39949
 
@@ -40952,6 +40991,7 @@ exports.smoothly_accordion = SmoothlyAccordion;
40952
40991
  exports.smoothly_accordion_item = SmoothlyAccordionItem;
40953
40992
  exports.smoothly_app = SmoothlyApp;
40954
40993
  exports.smoothly_app_demo = SmoothlyAppDemo;
40994
+ exports.smoothly_backtotop = SmoothlyBacktotop;
40955
40995
  exports.smoothly_calendar = Calendar;
40956
40996
  exports.smoothly_checkbox = SmoothlyCheckbox;
40957
40997
  exports.smoothly_dialog = SmoothlyDialog;
@@ -0,0 +1,37 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-138c41c2.js');
6
+
7
+ const styleCss = ".sc-smoothly-backtotop-h{background-color:rgba(var(--smoothly-default-color), 1);opacity:var(--opacity);pointer-events:var(--pointer-events);transition:opacity 400ms;z-index:3;border-radius:50%;box-shadow:var(--smoothly-shadow);height:3rem;width:3rem;position:fixed;bottom:var(--bottom);right:var(--right);outline:none;cursor:pointer;display:flex;justify-content:center;align-items:center}";
8
+
9
+ let SmoothlyBacktotop = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ this.opacity = "0.5";
13
+ this.bottom = "1rem";
14
+ this.right = "1rem";
15
+ }
16
+ componentWillLoad() {
17
+ window.addEventListener("scroll", () => {
18
+ this.visible = document.body.scrollTop > 20 || document.documentElement.scrollTop > 20;
19
+ });
20
+ }
21
+ render() {
22
+ const cssVariables = {
23
+ "--opacity": this.visible ? this.opacity : "0",
24
+ "--pointer-events": this.visible ? "auto" : "none",
25
+ "--bottom": this.bottom,
26
+ "--right": this.right,
27
+ };
28
+ return (index.h(index.Host, { style: cssVariables, onClick: () => window.scrollTo({
29
+ top: 0,
30
+ left: 0,
31
+ behavior: "smooth",
32
+ }) }, index.h("smoothly-icon", { name: "chevron-up-outline" })));
33
+ }
34
+ };
35
+ SmoothlyBacktotop.style = styleCss;
36
+
37
+ exports.smoothly_backtotop = SmoothlyBacktotop;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-138c41c2.js');
6
- const index$1 = require('./index-bc3845e8.js');
6
+ const index$1 = require('./index-d66869d7.js');
7
7
  require('./_commonjsHelpers-10109b76.js');
8
8
  require('./index-ac32385c.js');
9
9
 
@@ -9,7 +9,10 @@ let SmoothlyInputDemo = class {
9
9
  index.registerInstance(this, hostRef);
10
10
  }
11
11
  render() {
12
- return (index.h("form", { action: "done", style: { position: "relative" } }, index.h("header", null, index.h("h5", null, "Address")), index.h("main", null, index.h("smoothly-input", { type: "text", name: "name" }, "Name"), index.h("smoothly-input", { type: "date", name: "date" }, "Date"), index.h("smoothly-input", { type: "date-time", name: "date-time" }, "Date-Time"), index.h("smoothly-input", { type: "divisor", name: "divisor" }, "Divisor"), index.h("smoothly-input", { type: "text", name: "street", value: "street" }, "Street"), index.h("smoothly-input", { type: "card-number", name: "card" }, "Card #"), index.h("smoothly-input", { type: "card-expires", name: "card", style: { width: "calc(60% - 2px)" } }, "Expires"), index.h("smoothly-input", { type: "card-csc", name: "card", style: { width: "calc(40% - 1px)", borderLeft: "none" } }, "CVV/CVC"), index.h("smoothly-radio", { name: "option", value: "1" }, "option 1"), index.h("smoothly-radio", { name: "option", value: "2", checked: true }, "option 2"), index.h("smoothly-radio", { name: "option", value: "3" }, "option 3"), index.h("smoothly-accordion", null, index.h("smoothly-accordion-item", { name: "A", open: true }, index.h("smoothly-radio", { name: "a", value: "1" }, "a 1"), index.h("smoothly-radio", { name: "a", value: "2", checked: true }, "a 2"), index.h("smoothly-radio", { name: "a", value: "3" }, "a 3")), index.h("smoothly-accordion-item", { name: "B" }, index.h("smoothly-radio", { name: "b", value: "1" }, "b 1"), index.h("smoothly-radio", { name: "b", value: "2" }, "b 2"), index.h("smoothly-radio", { name: "b", value: "3" }, "b 3"))), index.h("smoothly-display-amount", { currency: "SEK", amount: "1289.5" }), index.h("smoothly-display-date-time", { datetime: "2019-01-31T20:01:34" }), index.h("smoothly-checkbox", null), index.h("smoothly-checkbox", { disabled: true }), index.h("smoothly-address-display", { value: '{ "countryCode": "SE", "street": "Korkstigen 2", "zipCode": "654 31", "city": "Fejksala" }' }), index.h("smoothly-address", { editable: false, value: '{ "countryCode": "SE", "street": "Stigv\u00E4gen 34", "zipCode": "123 45", "city": "Hobbiton" }' }), index.h("smoothly-addresses", { allowed: "billing delivery visit", editable: true, value: '{ "billing": { "countryCode": "SE", "street": "Rundslingan 3", "zipCode": "987 65", "city": "Klotby" }, "visit": { "countryCode": "SE", "street": "G\u00E5ngbanan 34", "zipCode": "543 21", "city": "Trasktr\u00E4sk" } }' }), index.h("smoothly-input", { type: "postal-code", name: "zip", style: { width: "calc(60% - 2px)" } }, "ZipCode"), index.h("smoothly-input", { type: "text", name: "testing" }, "Texttest"), index.h("smoothly-input", { type: "password", name: "password" }, "Password"), index.h("smoothly-input", { type: "email", name: "email" }, "Email"), index.h("smoothly-input", { type: "price", currency: "SEK", name: "price" }, "Price"), index.h("smoothly-input", { type: "percent", name: "percent" }, "Percent"), index.h("smoothly-input", { type: "phone", name: "phone" }, "Phone"), index.h("smoothly-input-date", null, "Date")), index.h("footer", null, index.h("smoothly-submit", { expand: "block", onSubmit: (e) => alert(e), color: "success" }, "Submit"), index.h("smoothly-trigger", { expand: "block", color: "success", onClick: (e) => console.log(e.detail) }, "Trigger"))));
12
+ return [
13
+ index.h("form", { action: "done", style: { position: "relative" } }, index.h("header", null, index.h("h5", null, "Address")), index.h("main", null, index.h("smoothly-input", { type: "text", name: "name" }, "Name"), index.h("smoothly-input", { type: "date", name: "date" }, "Date"), index.h("smoothly-input", { type: "date-time", name: "date-time" }, "Date-Time"), index.h("smoothly-input", { type: "divisor", name: "divisor" }, "Divisor"), index.h("smoothly-input", { type: "text", name: "street", value: "street" }, "Street"), index.h("smoothly-input", { type: "card-number", name: "card" }, "Card #"), index.h("smoothly-input", { type: "card-expires", name: "card", style: { width: "calc(60% - 2px)" } }, "Expires"), index.h("smoothly-input", { type: "card-csc", name: "card", style: { width: "calc(40% - 1px)", borderLeft: "none" } }, "CVV/CVC"), index.h("smoothly-radio", { name: "option", value: "1" }, "option 1"), index.h("smoothly-radio", { name: "option", value: "2", checked: true }, "option 2"), index.h("smoothly-radio", { name: "option", value: "3" }, "option 3"), index.h("smoothly-accordion", null, index.h("smoothly-accordion-item", { name: "A", open: true }, index.h("smoothly-radio", { name: "a", value: "1" }, "a 1"), index.h("smoothly-radio", { name: "a", value: "2", checked: true }, "a 2"), index.h("smoothly-radio", { name: "a", value: "3" }, "a 3")), index.h("smoothly-accordion-item", { name: "B" }, index.h("smoothly-radio", { name: "b", value: "1" }, "b 1"), index.h("smoothly-radio", { name: "b", value: "2" }, "b 2"), index.h("smoothly-radio", { name: "b", value: "3" }, "b 3"))), index.h("smoothly-display-amount", { currency: "SEK", amount: "1289.5" }), index.h("smoothly-display-date-time", { datetime: "2019-01-31T20:01:34" }), index.h("smoothly-checkbox", null), index.h("smoothly-checkbox", { disabled: true }), index.h("smoothly-address-display", { value: '{ "countryCode": "SE", "street": "Korkstigen 2", "zipCode": "654 31", "city": "Fejksala" }' }), index.h("smoothly-address", { editable: false, value: '{ "countryCode": "SE", "street": "Stigv\u00E4gen 34", "zipCode": "123 45", "city": "Hobbiton" }' }), index.h("smoothly-addresses", { allowed: "billing delivery visit", editable: true, value: '{ "billing": { "countryCode": "SE", "street": "Rundslingan 3", "zipCode": "987 65", "city": "Klotby" }, "visit": { "countryCode": "SE", "street": "G\u00E5ngbanan 34", "zipCode": "543 21", "city": "Trasktr\u00E4sk" } }' }), index.h("smoothly-input", { type: "postal-code", name: "zip", style: { width: "calc(60% - 2px)" } }, "ZipCode"), index.h("smoothly-input", { type: "text", name: "testing" }, "Texttest"), index.h("smoothly-input", { type: "password", name: "password" }, "Password"), index.h("smoothly-input", { type: "email", name: "email" }, "Email"), index.h("smoothly-input", { type: "price", currency: "SEK", name: "price" }, "Price"), index.h("smoothly-input", { type: "percent", name: "percent" }, "Percent"), index.h("smoothly-input", { type: "phone", name: "phone" }, "Phone"), index.h("smoothly-input-date", null, "Date")), index.h("footer", null, index.h("smoothly-submit", { expand: "block", onSubmit: (e) => alert(e), color: "success" }, "Submit"), index.h("smoothly-trigger", { expand: "block", color: "success", onClick: (e) => console.log(e.detail) }, "Trigger"))),
14
+ index.h("smoothly-backtotop", null),
15
+ ];
13
16
  }
14
17
  };
15
18
 
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-138c41c2.js');
6
6
  const index$2 = require('./index-ac32385c.js');
7
- const index$1 = require('./index-bc3845e8.js');
7
+ const index$1 = require('./index-d66869d7.js');
8
8
  require('./_commonjsHelpers-10109b76.js');
9
9
 
10
10
  const styleCss = ".sc-smoothly-input-h{display:block;position:relative;font-weight:var(--smoothly-font-weight)}[hidden].sc-smoothly-input-h{display:none}label.sc-smoothly-input{position:absolute;left:0.4em;top:0.6em;color:rgb(var(--smoothly-text-tint));opacity:0.8;user-select:none;cursor:inherit;transition:font-size 0.1s;transition-timing-function:ease}input.sc-smoothly-input{padding:1em 0.2em 0.2em 0.2em;width:calc(100% - 0.4em);background:none;border:0;z-index:1;position:relative;font-size:1rem;font-family:var(--smoothly-font-family)}smoothly-icon.sc-smoothly-input{display:none;position:absolute;right:0.2em;top:0.6em}input.sc-smoothly-input:invalid+smoothly-icon.sc-smoothly-input{display:block}.has-value.sc-smoothly-input-h>label.sc-smoothly-input{top:0.3em;top:0.4em;font-size:60%;z-index:0}.sc-smoothly-input-h:focus-within>label.sc-smoothly-input{top:0.3em;top:0.4em;font-size:60%;z-index:0}input.sc-smoothly-input:focus{outline:none}input.sc-smoothly-input:-webkit-autofill,input.sc-smoothly-input:-webkit-autofill:hover,input.sc-smoothly-input:-webkit-autofill:focus,input.sc-smoothly-input:-webkit-autofill:active{box-shadow:0 0 0 30px unset inset !important;-webkit-box-shadow:0 0 0 30px unset inset !important}input.sc-smoothly-input:-webkit-autofill{-webkit-text-fill-color:unset !important}input.sc-smoothly-input:-internal-autofill-previewed,input.sc-smoothly-input:-internal-autofill-selected,textarea.sc-smoothly-input:-internal-autofill-previewed,textarea.sc-smoothly-input:-internal-autofill-selected,select.sc-smoothly-input:-internal-autofill-previewed,select.sc-smoothly-input:-internal-autofill-selected{background-color:none !important;background-image:none !important;color:unset !important}";
@@ -45,6 +45,9 @@ let SmoothlyInput = class {
45
45
  if (value != before)
46
46
  this.smoothlyChanged.emit({ name: this.name, value });
47
47
  }
48
+ onCurrency() {
49
+ this.state = Object.assign(Object.assign({}, this.state), { value: this.newState({ value: this.formatter.toString(this.value), selection: this.state.selection }).value, pattern: this.newState({ value: this.formatter.toString(this.value), selection: this.state.selection }).pattern });
50
+ }
48
51
  componentWillLoad() {
49
52
  const value = this.formatter.toString(this.value) || "";
50
53
  const start = value.length;
@@ -185,7 +188,8 @@ let SmoothlyInput = class {
185
188
  return (index.h(index.Host, { class: { "has-value": ((_a = this.state) === null || _a === void 0 ? void 0 : _a.value) != undefined && ((_b = this.state) === null || _b === void 0 ? void 0 : _b.value) != "" } }, index.h("input", { name: this.name, type: (_c = this.state) === null || _c === void 0 ? void 0 : _c.type, placeholder: this.placeholder, required: this.required, autocomplete: this.autocomplete ? (_d = this.state) === null || _d === void 0 ? void 0 : _d.autocomplete : "off", disabled: this.disabled, pattern: ((_e = this.state) === null || _e === void 0 ? void 0 : _e.pattern) && ((_f = this.state) === null || _f === void 0 ? void 0 : _f.pattern.source), value: (_g = this.state) === null || _g === void 0 ? void 0 : _g.value, onInput: (e) => this.onInput(e), onFocus: e => this.onFocus(e), onClick: e => this.onClick(e), onBlur: e => this.onBlur(e), onKeyDown: e => this.onKeyDown(e), ref: (el) => (this.inputElement = el), onPaste: e => this.onPaste(e) }), index.h("smoothly-icon", { name: "alert-circle", color: "danger", fill: "clear", size: "small" }), index.h("label", { htmlFor: this.name }, index.h("slot", null))));
186
189
  }
187
190
  static get watchers() { return {
188
- "value": ["valueWatcher"]
191
+ "value": ["valueWatcher"],
192
+ "currency": ["onCurrency"]
189
193
  }; }
190
194
  };
191
195
  function getLocale() {
@@ -123,5 +123,5 @@ const patchCloneNodeFix = (HTMLElementPrototype) => {
123
123
 
124
124
  patchBrowser().then(options => {
125
125
  appGlobals.globalScripts();
126
- return index.bootstrapLazy([["smoothly-app-demo.cjs",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}]]],["smoothly-google-font.cjs",[[2,"smoothly-google-font",{"value":[1]}]]],["smoothly-radio-group.cjs",[[4,"smoothly-radio-group",{"orientation":[513]}]]],["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-input-demo.cjs",[[0,"smoothly-input-demo"]]],["smoothly-select-demo.cjs",[[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]]]],["smoothly-table-demo.cjs",[[2,"smoothly-table-demo"]]],["smoothly-display-demo.cjs",[[0,"smoothly-display-demo"]]],["smoothly-notifier.cjs",[[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]]]],["smoothly-app.cjs",[[4,"smoothly-app",{"color":[1]}]]],["smoothly-dialog-demo.cjs",[[0,"smoothly-dialog-demo"]]],["smoothly-icon-demo.cjs",[[2,"smoothly-icon-demo"]]],["smoothly-room.cjs",[[4,"smoothly-room",{"label":[1],"icon":[1],"path":[1],"to":[1]}]]],["smoothly-input-date-range.cjs",[[2,"smoothly-input-date-range",{"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"open":[1028]},[[0,"startChanged","onStartChanged"],[0,"endChanged","onEndChanged"],[0,"dateRangeSet","onDateRangeSet"]]]]],["smoothly-picker.cjs",[[1,"smoothly-picker",{"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"optionStyle":[8,"option-style"],"options":[16],"labelSetting":[513,"label-setting"],"label":[513],"selections":[1040],"selectNoneName":[1025,"select-none-name"],"isOpen":[32]},[[0,"optionSelect","optionSelectHander"]]]]],["smoothly-dialog.cjs",[[6,"smoothly-dialog",{"color":[513],"open":[1540],"closable":[516],"header":[513]},[[0,"trigger","TriggerListener"]]]]],["smoothly-checkbox.cjs",[[2,"smoothly-checkbox",{"selectAll":[4,"select-all"],"selected":[1540],"disabled":[1540],"t":[32]}]]],["smoothly-submit.cjs",[[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]]]],["smoothly-urlencoded.cjs",[[0,"smoothly-urlencoded",{"data":[1]}]]],["smoothly-accordion.cjs",[[6,"smoothly-accordion",{"value":[1025]},[[0,"smoothlyOpen","handleOpenClose"],[0,"smoothlyClose","handleOpenClose"],[0,"smoothlyAccordionItemDidLoad","onAccordionItemDidLoad"],[0,"smoothlyAccordionItemDidUnload","onAccordionItemDidUnload"]]]]],["smoothly-accordion-item.cjs",[[6,"smoothly-accordion-item",{"name":[1],"brand":[1],"open":[1540]}]]],["smoothly-display-amount.cjs",[[2,"smoothly-display-amount",{"amount":[8],"currency":[1]}]]],["smoothly-frame.cjs",[[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}]]],["smoothly-popup.cjs",[[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}]]],["smoothly-quiet.cjs",[[6,"smoothly-quiet",{"color":[1]}]]],["smoothly-radio.cjs",[[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}]]],["smoothly-select.cjs",[[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}]]],["smoothly-tab.cjs",[[6,"smoothly-tab",{"label":[1],"open":[1540]},[[0,"click","onClick"]]]]],["smoothly-tab-switch.cjs",[[6,"smoothly-tab-switch",{"selectedElement":[32]},[[0,"expansionOpen","openChanged"]]]]],["smoothly-table.cjs",[[6,"smoothly-table",null,[[0,"sort","onSort"]]]]],["smoothly-table-cell.cjs",[[6,"smoothly-table-cell"]]],["smoothly-table-expandable-cell.cjs",[[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]]]],["smoothly-table-expandable-row.cjs",[[6,"smoothly-table-expandable-row",null,[[0,"expansionLoaded","onExpansionLoaded"],[0,"expansionOpen","onDetailsLoaded"]]]]],["smoothly-table-header.cjs",[[6,"smoothly-table-header",{"name":[1],"sortDirection":[1025,"sort-direction"]},[[0,"click","onClick"]]]]],["smoothly-table-row.cjs",[[6,"smoothly-table-row",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]]]],["smoothly-icon.cjs",[[2,"smoothly-icon",{"color":[513],"fill":[513],"name":[1],"size":[513],"toolTip":[1,"tool-tip"],"document":[32]}]]],["smoothly-selector.cjs",[[6,"smoothly-selector",{"opened":[32],"selectedElement":[32],"missing":[32],"filter":[32]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]]]],["smoothly-input-date.cjs",[[6,"smoothly-input-date",{"value":[1025],"open":[1028],"max":[1025],"min":[1025]},[[0,"dateSet","dateSetHandler"]]]]],["smoothly-notification.cjs",[[2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]]]],["smoothly-option.cjs",[[1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537]}]]],["smoothly-menu-options.cjs",[[1,"smoothly-menu-options",{"emptyMenuLabel":[1025,"empty-menu-label"],"maxMenuHeight":[1,"max-menu-height"],"order":[4],"optionStyle":[8,"option-style"],"options":[1040],"resetHighlightOnOptionsChange":[1028,"reset-highlight-on-options-change"],"filteredOptions":[32],"highlightIndex":[32],"moveHighlight":[64],"setHighlight":[64],"getHighlighted":[64],"filterOptions":[64]},[[0,"optionHover","optionHoverHandler"]]]]],["smoothly-display.cjs",[[2,"smoothly-display",{"type":[1],"value":[8],"currency":[1],"country":[1]}]]],["smoothly-display-date-time.cjs",[[2,"smoothly-display-date-time",{"datetime":[1]}]]],["smoothly-spinner.cjs",[[2,"smoothly-spinner",{"active":[516]}]]],["smoothly-tuple.cjs",[[0,"smoothly-tuple",{"tuple":[16]}]]],["smoothly-item.cjs",[[6,"smoothly-item",{"value":[8],"selected":[1540],"filter":[64]},[[0,"click","onClick"]]]]],["smoothly-calendar.cjs",[[2,"smoothly-calendar",{"month":[1025],"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"doubleInput":[516,"double-input"],"firstSelected":[32]}]]],["smoothly-input.cjs",[[6,"smoothly-input",{"name":[513],"value":[1032],"type":[513],"required":[1540],"minLength":[1026,"min-length"],"maxLength":[1026,"max-length"],"autocomplete":[1028],"pattern":[1040],"placeholder":[1025],"disabled":[1028],"currency":[513],"getFormData":[64],"setKeepFocusOnReRender":[64],"setSelectionRange":[64]}]]],["smoothly-input-month.cjs",[[2,"smoothly-input-month",{"value":[1025]}]]],["smoothly-trigger.cjs",[[6,"smoothly-trigger",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"name":[1],"value":[8]},[[0,"click","onClick"]]]]]], options);
126
+ return index.bootstrapLazy([["smoothly-app-demo.cjs",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}]]],["smoothly-google-font.cjs",[[2,"smoothly-google-font",{"value":[1]}]]],["smoothly-radio-group.cjs",[[4,"smoothly-radio-group",{"orientation":[513]}]]],["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-input-demo.cjs",[[0,"smoothly-input-demo"]]],["smoothly-select-demo.cjs",[[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]]]],["smoothly-table-demo.cjs",[[2,"smoothly-table-demo"]]],["smoothly-display-demo.cjs",[[0,"smoothly-display-demo"]]],["smoothly-app.cjs",[[4,"smoothly-app",{"color":[1]}]]],["smoothly-dialog-demo.cjs",[[0,"smoothly-dialog-demo"]]],["smoothly-icon-demo.cjs",[[2,"smoothly-icon-demo"]]],["smoothly-room.cjs",[[4,"smoothly-room",{"label":[1],"icon":[1],"path":[1],"to":[1]}]]],["smoothly-input-date-range.cjs",[[2,"smoothly-input-date-range",{"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"open":[1028]},[[0,"startChanged","onStartChanged"],[0,"endChanged","onEndChanged"],[0,"dateRangeSet","onDateRangeSet"]]]]],["smoothly-notifier.cjs",[[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]]]],["smoothly-picker.cjs",[[1,"smoothly-picker",{"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"optionStyle":[8,"option-style"],"options":[16],"labelSetting":[513,"label-setting"],"label":[513],"selections":[1040],"selectNoneName":[1025,"select-none-name"],"isOpen":[32]},[[0,"optionSelect","optionSelectHander"]]]]],["smoothly-dialog.cjs",[[6,"smoothly-dialog",{"color":[513],"open":[1540],"closable":[516],"header":[513]},[[0,"trigger","TriggerListener"]]]]],["smoothly-backtotop.cjs",[[2,"smoothly-backtotop",{"opacity":[1],"bottom":[1],"right":[1],"visible":[32]}]]],["smoothly-checkbox.cjs",[[2,"smoothly-checkbox",{"selectAll":[4,"select-all"],"selected":[1540],"disabled":[1540],"t":[32]}]]],["smoothly-submit.cjs",[[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]]]],["smoothly-urlencoded.cjs",[[0,"smoothly-urlencoded",{"data":[1]}]]],["smoothly-accordion.cjs",[[6,"smoothly-accordion",{"value":[1025]},[[0,"smoothlyOpen","handleOpenClose"],[0,"smoothlyClose","handleOpenClose"],[0,"smoothlyAccordionItemDidLoad","onAccordionItemDidLoad"],[0,"smoothlyAccordionItemDidUnload","onAccordionItemDidUnload"]]]]],["smoothly-accordion-item.cjs",[[6,"smoothly-accordion-item",{"name":[1],"brand":[1],"open":[1540]}]]],["smoothly-display-amount.cjs",[[2,"smoothly-display-amount",{"amount":[8],"currency":[1]}]]],["smoothly-frame.cjs",[[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}]]],["smoothly-popup.cjs",[[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}]]],["smoothly-quiet.cjs",[[6,"smoothly-quiet",{"color":[1]}]]],["smoothly-radio.cjs",[[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}]]],["smoothly-select.cjs",[[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}]]],["smoothly-tab.cjs",[[6,"smoothly-tab",{"label":[1],"open":[1540]},[[0,"click","onClick"]]]]],["smoothly-tab-switch.cjs",[[6,"smoothly-tab-switch",{"selectedElement":[32]},[[0,"expansionOpen","openChanged"]]]]],["smoothly-table.cjs",[[6,"smoothly-table",null,[[0,"sort","onSort"]]]]],["smoothly-table-cell.cjs",[[6,"smoothly-table-cell"]]],["smoothly-table-expandable-cell.cjs",[[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]]]],["smoothly-table-expandable-row.cjs",[[6,"smoothly-table-expandable-row",null,[[0,"expansionLoaded","onExpansionLoaded"],[0,"expansionOpen","onDetailsLoaded"]]]]],["smoothly-table-header.cjs",[[6,"smoothly-table-header",{"name":[1],"sortDirection":[1025,"sort-direction"]},[[0,"click","onClick"]]]]],["smoothly-table-row.cjs",[[6,"smoothly-table-row",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]]]],["smoothly-icon.cjs",[[2,"smoothly-icon",{"color":[513],"fill":[513],"name":[1],"size":[513],"toolTip":[1,"tool-tip"],"document":[32]}]]],["smoothly-selector.cjs",[[6,"smoothly-selector",{"opened":[32],"selectedElement":[32],"missing":[32],"filter":[32]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]]]],["smoothly-input-date.cjs",[[6,"smoothly-input-date",{"value":[1025],"open":[1028],"max":[1025],"min":[1025]},[[0,"dateSet","dateSetHandler"]]]]],["smoothly-notification.cjs",[[2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]]]],["smoothly-option.cjs",[[1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537]}]]],["smoothly-menu-options.cjs",[[1,"smoothly-menu-options",{"emptyMenuLabel":[1025,"empty-menu-label"],"maxMenuHeight":[1,"max-menu-height"],"order":[4],"optionStyle":[8,"option-style"],"options":[1040],"resetHighlightOnOptionsChange":[1028,"reset-highlight-on-options-change"],"filteredOptions":[32],"highlightIndex":[32],"moveHighlight":[64],"setHighlight":[64],"getHighlighted":[64],"filterOptions":[64]},[[0,"optionHover","optionHoverHandler"]]]]],["smoothly-display.cjs",[[2,"smoothly-display",{"type":[1],"value":[8],"currency":[1],"country":[1]}]]],["smoothly-display-date-time.cjs",[[2,"smoothly-display-date-time",{"datetime":[1]}]]],["smoothly-spinner.cjs",[[2,"smoothly-spinner",{"active":[516]}]]],["smoothly-tuple.cjs",[[0,"smoothly-tuple",{"tuple":[16]}]]],["smoothly-item.cjs",[[6,"smoothly-item",{"value":[8],"selected":[1540],"filter":[64]},[[0,"click","onClick"]]]]],["smoothly-calendar.cjs",[[2,"smoothly-calendar",{"month":[1025],"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"doubleInput":[516,"double-input"],"firstSelected":[32]}]]],["smoothly-input.cjs",[[6,"smoothly-input",{"name":[513],"value":[1032],"type":[513],"required":[1540],"minLength":[1026,"min-length"],"maxLength":[1026,"max-length"],"autocomplete":[1028],"pattern":[1040],"placeholder":[1025],"disabled":[1028],"currency":[513],"getFormData":[64],"setKeepFocusOnReRender":[64],"setSelectionRange":[64]}]]],["smoothly-input-month.cjs",[[2,"smoothly-input-month",{"value":[1025]}]]],["smoothly-trigger.cjs",[[6,"smoothly-trigger",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"name":[1],"value":[8]},[[0,"click","onClick"]]]]]], options);
127
127
  });
@@ -4,6 +4,7 @@
4
4
  "./components/accordion-item/index.js",
5
5
  "./components/app/index.js",
6
6
  "./components/app-demo/index.js",
7
+ "./components/backtotop/index.js",
7
8
  "./components/calendar/index.js",
8
9
  "./components/checkbox/index.js",
9
10
  "./components/dialog/index.js",
@@ -0,0 +1,94 @@
1
+ import { Component, h, Host, Prop, State } from "@stencil/core";
2
+ export class SmoothlyBacktotop {
3
+ constructor() {
4
+ this.opacity = "0.5";
5
+ this.bottom = "1rem";
6
+ this.right = "1rem";
7
+ }
8
+ componentWillLoad() {
9
+ window.addEventListener("scroll", () => {
10
+ this.visible = document.body.scrollTop > 20 || document.documentElement.scrollTop > 20;
11
+ });
12
+ }
13
+ render() {
14
+ const cssVariables = {
15
+ "--opacity": this.visible ? this.opacity : "0",
16
+ "--pointer-events": this.visible ? "auto" : "none",
17
+ "--bottom": this.bottom,
18
+ "--right": this.right,
19
+ };
20
+ return (h(Host, { style: cssVariables, onClick: () => window.scrollTo({
21
+ top: 0,
22
+ left: 0,
23
+ behavior: "smooth",
24
+ }) },
25
+ h("smoothly-icon", { name: "chevron-up-outline" })));
26
+ }
27
+ static get is() { return "smoothly-backtotop"; }
28
+ static get encapsulation() { return "scoped"; }
29
+ static get originalStyleUrls() { return {
30
+ "$": ["style.scss"]
31
+ }; }
32
+ static get styleUrls() { return {
33
+ "$": ["style.css"]
34
+ }; }
35
+ static get properties() { return {
36
+ "opacity": {
37
+ "type": "string",
38
+ "mutable": false,
39
+ "complexType": {
40
+ "original": "string",
41
+ "resolved": "string",
42
+ "references": {}
43
+ },
44
+ "required": false,
45
+ "optional": false,
46
+ "docs": {
47
+ "tags": [],
48
+ "text": ""
49
+ },
50
+ "attribute": "opacity",
51
+ "reflect": false,
52
+ "defaultValue": "\"0.5\""
53
+ },
54
+ "bottom": {
55
+ "type": "string",
56
+ "mutable": false,
57
+ "complexType": {
58
+ "original": "string",
59
+ "resolved": "string",
60
+ "references": {}
61
+ },
62
+ "required": false,
63
+ "optional": false,
64
+ "docs": {
65
+ "tags": [],
66
+ "text": ""
67
+ },
68
+ "attribute": "bottom",
69
+ "reflect": false,
70
+ "defaultValue": "\"1rem\""
71
+ },
72
+ "right": {
73
+ "type": "string",
74
+ "mutable": false,
75
+ "complexType": {
76
+ "original": "string",
77
+ "resolved": "string",
78
+ "references": {}
79
+ },
80
+ "required": false,
81
+ "optional": false,
82
+ "docs": {
83
+ "tags": [],
84
+ "text": ""
85
+ },
86
+ "attribute": "right",
87
+ "reflect": false,
88
+ "defaultValue": "\"1rem\""
89
+ }
90
+ }; }
91
+ static get states() { return {
92
+ "visible": {}
93
+ }; }
94
+ }
@@ -0,0 +1,19 @@
1
+ :host {
2
+ background-color: rgba(var(--smoothly-default-color), 1);
3
+ opacity: var(--opacity);
4
+ pointer-events: var(--pointer-events);
5
+ transition: opacity 400ms;
6
+ z-index: 3;
7
+ border-radius: 50%;
8
+ box-shadow: var(--smoothly-shadow);
9
+ height: 3rem;
10
+ width: 3rem;
11
+ position: fixed;
12
+ bottom: var(--bottom);
13
+ right: var(--right);
14
+ outline: none;
15
+ cursor: pointer;
16
+ display: flex;
17
+ justify-content: center;
18
+ align-items: center;
19
+ }
@@ -35,6 +35,9 @@ export class SmoothlyInput {
35
35
  if (value != before)
36
36
  this.smoothlyChanged.emit({ name: this.name, value });
37
37
  }
38
+ onCurrency() {
39
+ this.state = Object.assign(Object.assign({}, this.state), { value: this.newState({ value: this.formatter.toString(this.value), selection: this.state.selection }).value, pattern: this.newState({ value: this.formatter.toString(this.value), selection: this.state.selection }).pattern });
40
+ }
38
41
  componentWillLoad() {
39
42
  const value = this.formatter.toString(this.value) || "";
40
43
  const start = value.length;
@@ -479,6 +482,9 @@ export class SmoothlyInput {
479
482
  static get watchers() { return [{
480
483
  "propName": "value",
481
484
  "methodName": "valueWatcher"
485
+ }, {
486
+ "propName": "currency",
487
+ "methodName": "onCurrency"
482
488
  }]; }
483
489
  }
484
490
  function getLocale() {