smoothly 0.1.88 → 0.1.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/GoogleFont-6c4f0da1.js +21 -0
- package/dist/cjs/{index-de5d1ee1.js → index-40d009d5.js} +2 -0
- package/dist/cjs/index.cjs.js +8 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/smoothly-accordion_47.cjs.entry.js +27 -3
- package/dist/cjs/smoothly-dialog.cjs.entry.js +2 -1
- package/dist/cjs/smoothly-display-demo.cjs.entry.js +2 -1
- package/dist/cjs/smoothly-frame.cjs.entry.js +2 -1
- package/dist/cjs/smoothly-google-font.cjs.entry.js +17 -0
- package/dist/cjs/smoothly-input.cjs.entry.js +25 -3
- package/dist/cjs/smoothly-select-demo.cjs.entry.js +1 -0
- package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +2 -1
- package/dist/cjs/smoothly-trigger-source.cjs.entry.js +2 -1
- package/dist/cjs/smoothly.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/google-font/index.js +33 -0
- package/dist/collection/components/input/index.js +47 -3
- package/dist/collection/components/input/style.css +1 -0
- package/dist/collection/components/select-demo/index.js +1 -0
- package/dist/collection/index.js +1 -1
- package/dist/collection/model/GoogleFont.js +19 -0
- package/dist/collection/model/index.js +1 -0
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +59 -4
- package/dist/esm/GoogleFont-8474516b.js +21 -0
- package/dist/esm/{index-68492ed9.js → index-c8b5d468.js} +2 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/smoothly-accordion_47.entry.js +27 -3
- package/dist/esm/smoothly-dialog.entry.js +2 -1
- package/dist/esm/smoothly-display-demo.entry.js +2 -1
- package/dist/esm/smoothly-frame.entry.js +2 -1
- package/dist/esm/smoothly-google-font.entry.js +13 -0
- package/dist/esm/smoothly-input.entry.js +25 -3
- package/dist/esm/smoothly-select-demo.entry.js +1 -0
- package/dist/esm/smoothly-trigger-sink.entry.js +2 -1
- package/dist/esm/smoothly-trigger-source.entry.js +2 -1
- package/dist/esm/smoothly.js +1 -1
- package/dist/smoothly/GoogleFont-8474516b.js +21 -0
- package/dist/smoothly/{index-68492ed9.js → index-c8b5d468.js} +2 -0
- package/dist/smoothly/index.esm.js +2 -1
- package/dist/smoothly/p-14232157.entry.js +1 -0
- package/dist/smoothly/p-22d4d5a7.entry.js +1 -0
- package/dist/smoothly/p-ad2b5e6e.entry.js +1 -0
- package/dist/smoothly/p-b8a3e273.entry.js +1 -0
- package/dist/smoothly/p-bd478a53.js +1 -0
- package/dist/smoothly/smoothly-dialog.entry.js +2 -1
- package/dist/smoothly/smoothly-display-demo.entry.js +2 -1
- package/dist/smoothly/smoothly-frame.entry.js +2 -1
- package/dist/smoothly/smoothly-google-font.entry.js +13 -0
- package/dist/smoothly/smoothly-input.entry.js +25 -3
- package/dist/smoothly/smoothly-select-demo.entry.js +1 -0
- package/dist/smoothly/smoothly-trigger-sink.entry.js +2 -1
- package/dist/smoothly/smoothly-trigger-source.entry.js +2 -1
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/components/google-font/index.d.ts +5 -0
- package/dist/types/components/input/index.d.ts +5 -0
- package/dist/types/components.d.ts +17 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/model/GoogleFont.d.ts +6 -0
- package/dist/types/model/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/smoothly/p-0286085b.entry.js +0 -1
- package/dist/smoothly/p-09d633f8.entry.js +0 -1
- package/dist/smoothly/p-1a81597b.entry.js +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.GoogleFont = void 0;
|
|
4
|
+
(function (GoogleFont) {
|
|
5
|
+
function is(value) {
|
|
6
|
+
return (typeof value == "string" &&
|
|
7
|
+
!/[</>"'`]/g.test(value) &&
|
|
8
|
+
/^([a-zA-ZäöüåßÄÖÜÅ+ ])+(:(ital(,)?)?((wght@(([01],\d{3})(;[01],\d{3})*|((\d{3})(;\d{3})*))))?)?$/g.test(value));
|
|
9
|
+
}
|
|
10
|
+
GoogleFont.is = is;
|
|
11
|
+
function getFont(value) {
|
|
12
|
+
return is(value) ? value.split(":")[0].replace(/\+/g, " ") : undefined;
|
|
13
|
+
}
|
|
14
|
+
GoogleFont.getFont = getFont;
|
|
15
|
+
function styleImportString(value) {
|
|
16
|
+
return is(value)
|
|
17
|
+
? `@import url('https://fonts.googleapis.com/css2?family=${value.replace(/ /g, "+")}&display=swap`
|
|
18
|
+
: undefined;
|
|
19
|
+
}
|
|
20
|
+
GoogleFont.styleImportString = styleImportString;
|
|
21
|
+
})(exports.GoogleFont || (exports.GoogleFont = {}));
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const App = require('./App-ffc56e72.js');
|
|
6
|
-
const index = require('./index-
|
|
6
|
+
const index = require('./index-40d009d5.js');
|
|
7
|
+
const GoogleFont = require('./GoogleFont-6c4f0da1.js');
|
|
7
8
|
require('./index-138c41c2.js');
|
|
8
9
|
|
|
9
10
|
var Hex;
|
|
@@ -381,3 +382,9 @@ exports.ClientIdentifier = index.ClientIdentifier;
|
|
|
381
382
|
exports.Message = index.Message;
|
|
382
383
|
exports.Notice = index.Notice;
|
|
383
384
|
exports.Trigger = index.Trigger;
|
|
385
|
+
Object.defineProperty(exports, 'GoogleFont', {
|
|
386
|
+
enumerable: true,
|
|
387
|
+
get: function () {
|
|
388
|
+
return GoogleFont.GoogleFont;
|
|
389
|
+
}
|
|
390
|
+
});
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -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-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-
|
|
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);
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
36
|
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-41a36ce2.js');
|
|
6
6
|
const Notice = require('./Notice-9120d311.js');
|
|
7
7
|
const Trigger = require('./Trigger-74bd1ee8.js');
|
|
8
|
+
require('./GoogleFont-6c4f0da1.js');
|
|
8
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
11
|
|
|
@@ -39640,7 +39641,7 @@ let SmoothlyIconDemo = class {
|
|
|
39640
39641
|
};
|
|
39641
39642
|
SmoothlyIconDemo.style = styleCss$s;
|
|
39642
39643
|
|
|
39643
|
-
const styleCss$r = ".sc-smoothly-input-h{display:block;position:relative}[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}";
|
|
39644
|
+
const styleCss$r = ".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}";
|
|
39644
39645
|
|
|
39645
39646
|
let SmoothlyInput = class {
|
|
39646
39647
|
constructor(hostRef) {
|
|
@@ -39692,6 +39693,28 @@ let SmoothlyInput = class {
|
|
|
39692
39693
|
this.keepFocusOnReRender = false;
|
|
39693
39694
|
}
|
|
39694
39695
|
}
|
|
39696
|
+
async getFormData(name) {
|
|
39697
|
+
const result = {};
|
|
39698
|
+
const form = document.forms.namedItem(name);
|
|
39699
|
+
if (form) {
|
|
39700
|
+
const elements = form.elements;
|
|
39701
|
+
for (let i = 0; i < elements.length; i++) {
|
|
39702
|
+
const element = elements.item(i);
|
|
39703
|
+
if (this.hasNameAndValue(element) && element.name)
|
|
39704
|
+
result[element.name] = element.value;
|
|
39705
|
+
}
|
|
39706
|
+
const smoothlyInputs = form.getElementsByTagName("smoothly-input");
|
|
39707
|
+
for (let i = 0; i < smoothlyInputs.length; i++) {
|
|
39708
|
+
const element = smoothlyInputs.item(i);
|
|
39709
|
+
if (this.hasNameAndValue(element) && element.name)
|
|
39710
|
+
result[element.name] = element.value;
|
|
39711
|
+
}
|
|
39712
|
+
}
|
|
39713
|
+
return result;
|
|
39714
|
+
}
|
|
39715
|
+
hasNameAndValue(element) {
|
|
39716
|
+
return (typeof element.name == "string" && typeof element.value == "string");
|
|
39717
|
+
}
|
|
39695
39718
|
async setKeepFocusOnReRender(keepFocus) {
|
|
39696
39719
|
this.keepFocusOnReRender = keepFocus;
|
|
39697
39720
|
}
|
|
@@ -39792,8 +39815,8 @@ let SmoothlyInput = class {
|
|
|
39792
39815
|
this.value = this.lastValue = this.formatter.fromString(this.formatter.unformat(dist.StateEditor.copy(Object.assign({}, this.state))).value);
|
|
39793
39816
|
}
|
|
39794
39817
|
render() {
|
|
39795
|
-
var _a;
|
|
39796
|
-
return (index.h(index.Host, { class: { "has-value": ((_a = this.state) === null || _a === void 0 ? void 0 : _a.value) != "" } }, index.h("input", { name: this.name, type: this.state.type, placeholder: this.placeholder, required: this.required, autocomplete: this.autocomplete ? this.state.autocomplete : "off", disabled: this.disabled, pattern: this.state.pattern && this.state.pattern.source, value: this.state.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))));
|
|
39818
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
39819
|
+
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))));
|
|
39797
39820
|
}
|
|
39798
39821
|
static get watchers() { return {
|
|
39799
39822
|
"value": ["valueWatcher"]
|
|
@@ -40416,6 +40439,7 @@ let SmoothlySelectDemo = class {
|
|
|
40416
40439
|
index.h("smoothly-select", { identifier: "currency" }, this.currencies.map(option => this.currency == option ? (index.h("option", { value: option, selected: true }, option)) : (index.h("option", { value: option }, option)))),
|
|
40417
40440
|
index.h("smoothly-select", { identifier: "language" }, index.h("optgroup", { label: "Nordic" }, index.h("option", { value: "sv" }, "Swedish"), index.h("option", { value: "da", selected: true }, "Danish"), index.h("option", { value: "no" }, "Norwegian")), index.h("optgroup", { label: "Other" }, index.h("option", { value: "en" }, "English"))),
|
|
40418
40441
|
index.h("smoothly-select", { identifier: "quantity", ref: e => (this.quantityElement = e) }, index.h("option", { value: "1" }, "1"), index.h("option", { value: "2" }, "2"), index.h("option", { value: "3" }, "3")),
|
|
40442
|
+
index.h("smoothly-input-date", null, "Date"),
|
|
40419
40443
|
index.h("smoothly-input-date", { value: "2021-10-28", max: "2021-12-30", min: "2021-10-10" }, "Date"),
|
|
40420
40444
|
index.h("smoothly-input-date-range", { start: "2021-10-28", end: "2021-11-27", min: "2021-10-10", max: "2021-12-30" }),
|
|
40421
40445
|
index.h("smoothly-selector", null, 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")),
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-138c41c2.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-40d009d5.js');
|
|
7
|
+
require('./GoogleFont-6c4f0da1.js');
|
|
7
8
|
|
|
8
9
|
const styleCss = ".sc-smoothly-dialog-h{display:block;position:fixed;left:0;top:0;width:100%;height:100%;z-index:1;background:rgba(var(--smoothly-default-color), var(--smoothly-semitransparent)) !important}[hidden].sc-smoothly-dialog-h{display:none}.sc-smoothly-dialog-h>header.sc-smoothly-dialog{border-top-left-radius:8px;border-top-right-radius:8px;margin-top:2em;color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-color));border-color:rgb(var(--smoothly-primary-color))}.sc-smoothly-dialog-h:not([header]) header.sc-smoothly-dialog{border:none}.sc-smoothly-dialog-h>*.sc-smoothly-dialog{position:relative;color:rgb(var(--smoothly-default-contrast));background-color:rgb(var(--smoothly-default-color));border-color:rgb(var(--smoothly-color));border-width:1px;border-style:solid;max-width:40em;width:calc(100vw - 4em - 2px);max-height:calc(100vh - 6em - 2px);height:auto;margin-left:auto;margin-right:auto;border-collapse:collapse}.sc-smoothly-dialog-h>main.sc-smoothly-dialog{border-bottom-left-radius:8px;border-bottom-right-radius:8px;margin-bottom:2em;border:1px solid rgb(var(--smoothly-default-contrast));box-sizing:border-box;overflow:hidden}.sc-smoothly-dialog-h:not([header]) main.sc-smoothly-dialog{border-radius:8px}.sc-smoothly-dialog-h>*.sc-smoothly-dialog>smoothly-trigger.sc-smoothly-dialog{position:absolute;right:-2em;top:-2em;z-index:1;border-color:transparent}.sc-smoothly-dialog-h>*.sc-smoothly-dialog>smoothly-trigger.sc-smoothly-dialog:hover{border-color:transparent}.sc-smoothly-dialog-h smoothly-icon.sc-smoothly-dialog{background-color:rgb(var(--smoothly-color));border-radius:50%}.sc-smoothly-dialog-h>*.sc-smoothly-dialog>*.sc-smoothly-dialog{margin:10px}";
|
|
9
10
|
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-138c41c2.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-40d009d5.js');
|
|
7
|
+
require('./GoogleFont-6c4f0da1.js');
|
|
7
8
|
|
|
8
9
|
let SmoothlyDisplayDemo = class {
|
|
9
10
|
constructor(hostRef) {
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-138c41c2.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-40d009d5.js');
|
|
7
|
+
require('./GoogleFont-6c4f0da1.js');
|
|
7
8
|
|
|
8
9
|
const styleCss = ".sc-smoothly-frame-h{display:block;width:100%;height:100%}[hidden].sc-smoothly-frame-h{display:none}.sc-smoothly-frame-h>iframe.sc-smoothly-frame{border:none;padding:none;margin:none}";
|
|
9
10
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-138c41c2.js');
|
|
6
|
+
const GoogleFont = require('./GoogleFont-6c4f0da1.js');
|
|
7
|
+
|
|
8
|
+
let SmoothlyGoogleFont = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
index.registerInstance(this, hostRef);
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return GoogleFont.GoogleFont.is(this.value) ? index.h("style", null, GoogleFont.GoogleFont.styleImportString(this.value)) : "";
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.smoothly_google_font = SmoothlyGoogleFont;
|
|
@@ -7,7 +7,7 @@ const index$2 = require('./index-ac32385c.js');
|
|
|
7
7
|
const index$1 = require('./index-bc3845e8.js');
|
|
8
8
|
require('./_commonjsHelpers-10109b76.js');
|
|
9
9
|
|
|
10
|
-
const styleCss = ".sc-smoothly-input-h{display:block;position:relative}[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}";
|
|
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}";
|
|
11
11
|
|
|
12
12
|
let SmoothlyInput = class {
|
|
13
13
|
constructor(hostRef) {
|
|
@@ -59,6 +59,28 @@ let SmoothlyInput = class {
|
|
|
59
59
|
this.keepFocusOnReRender = false;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
+
async getFormData(name) {
|
|
63
|
+
const result = {};
|
|
64
|
+
const form = document.forms.namedItem(name);
|
|
65
|
+
if (form) {
|
|
66
|
+
const elements = form.elements;
|
|
67
|
+
for (let i = 0; i < elements.length; i++) {
|
|
68
|
+
const element = elements.item(i);
|
|
69
|
+
if (this.hasNameAndValue(element) && element.name)
|
|
70
|
+
result[element.name] = element.value;
|
|
71
|
+
}
|
|
72
|
+
const smoothlyInputs = form.getElementsByTagName("smoothly-input");
|
|
73
|
+
for (let i = 0; i < smoothlyInputs.length; i++) {
|
|
74
|
+
const element = smoothlyInputs.item(i);
|
|
75
|
+
if (this.hasNameAndValue(element) && element.name)
|
|
76
|
+
result[element.name] = element.value;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return result;
|
|
80
|
+
}
|
|
81
|
+
hasNameAndValue(element) {
|
|
82
|
+
return (typeof element.name == "string" && typeof element.value == "string");
|
|
83
|
+
}
|
|
62
84
|
async setKeepFocusOnReRender(keepFocus) {
|
|
63
85
|
this.keepFocusOnReRender = keepFocus;
|
|
64
86
|
}
|
|
@@ -159,8 +181,8 @@ let SmoothlyInput = class {
|
|
|
159
181
|
this.value = this.lastValue = this.formatter.fromString(this.formatter.unformat(index$1.dist.StateEditor.copy(Object.assign({}, this.state))).value);
|
|
160
182
|
}
|
|
161
183
|
render() {
|
|
162
|
-
var _a;
|
|
163
|
-
return (index.h(index.Host, { class: { "has-value": ((_a = this.state) === null || _a === void 0 ? void 0 : _a.value) != "" } }, index.h("input", { name: this.name, type: this.state.type, placeholder: this.placeholder, required: this.required, autocomplete: this.autocomplete ? this.state.autocomplete : "off", disabled: this.disabled, pattern: this.state.pattern && this.state.pattern.source, value: this.state.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))));
|
|
184
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
185
|
+
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))));
|
|
164
186
|
}
|
|
165
187
|
static get watchers() { return {
|
|
166
188
|
"value": ["valueWatcher"]
|
|
@@ -25,6 +25,7 @@ let SmoothlySelectDemo = class {
|
|
|
25
25
|
index.h("smoothly-select", { identifier: "currency" }, this.currencies.map(option => this.currency == option ? (index.h("option", { value: option, selected: true }, option)) : (index.h("option", { value: option }, option)))),
|
|
26
26
|
index.h("smoothly-select", { identifier: "language" }, index.h("optgroup", { label: "Nordic" }, index.h("option", { value: "sv" }, "Swedish"), index.h("option", { value: "da", selected: true }, "Danish"), index.h("option", { value: "no" }, "Norwegian")), index.h("optgroup", { label: "Other" }, index.h("option", { value: "en" }, "English"))),
|
|
27
27
|
index.h("smoothly-select", { identifier: "quantity", ref: e => (this.quantityElement = e) }, index.h("option", { value: "1" }, "1"), index.h("option", { value: "2" }, "2"), index.h("option", { value: "3" }, "3")),
|
|
28
|
+
index.h("smoothly-input-date", null, "Date"),
|
|
28
29
|
index.h("smoothly-input-date", { value: "2021-10-28", max: "2021-12-30", min: "2021-10-10" }, "Date"),
|
|
29
30
|
index.h("smoothly-input-date-range", { start: "2021-10-28", end: "2021-11-27", min: "2021-10-10", max: "2021-12-30" }),
|
|
30
31
|
index.h("smoothly-selector", null, 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")),
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-138c41c2.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-40d009d5.js');
|
|
7
|
+
require('./GoogleFont-6c4f0da1.js');
|
|
7
8
|
|
|
8
9
|
const styleCss = ".sc-smoothly-trigger-sink-h{display:block}[hidden].sc-smoothly-trigger-sink-h{display:none}";
|
|
9
10
|
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-138c41c2.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-40d009d5.js');
|
|
7
|
+
require('./GoogleFont-6c4f0da1.js');
|
|
7
8
|
|
|
8
9
|
const styleCss = ".sc-smoothly-trigger-source-h{display:block}[hidden].sc-smoothly-trigger-source-h{display:none}";
|
|
9
10
|
|
package/dist/cjs/smoothly.cjs.js
CHANGED
|
@@ -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-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-
|
|
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);
|
|
127
127
|
});
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"./components/display-date-time/index.js",
|
|
14
14
|
"./components/display-demo/index.js",
|
|
15
15
|
"./components/frame/index.js",
|
|
16
|
+
"./components/google-font/index.js",
|
|
16
17
|
"./components/icon/index.js",
|
|
17
18
|
"./components/icon-demo/index.js",
|
|
18
19
|
"./components/input/index.js",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Component, h, Prop } from "@stencil/core";
|
|
2
|
+
import { GoogleFont } from "../../model/GoogleFont";
|
|
3
|
+
export class SmoothlyGoogleFont {
|
|
4
|
+
render() {
|
|
5
|
+
return GoogleFont.is(this.value) ? h("style", null, GoogleFont.styleImportString(this.value)) : "";
|
|
6
|
+
}
|
|
7
|
+
static get is() { return "smoothly-google-font"; }
|
|
8
|
+
static get encapsulation() { return "scoped"; }
|
|
9
|
+
static get properties() { return {
|
|
10
|
+
"value": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"mutable": false,
|
|
13
|
+
"complexType": {
|
|
14
|
+
"original": "GoogleFont",
|
|
15
|
+
"resolved": "string | undefined",
|
|
16
|
+
"references": {
|
|
17
|
+
"GoogleFont": {
|
|
18
|
+
"location": "import",
|
|
19
|
+
"path": "../../model/GoogleFont"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required": false,
|
|
24
|
+
"optional": true,
|
|
25
|
+
"docs": {
|
|
26
|
+
"tags": [],
|
|
27
|
+
"text": ""
|
|
28
|
+
},
|
|
29
|
+
"attribute": "value",
|
|
30
|
+
"reflect": false
|
|
31
|
+
}
|
|
32
|
+
}; }
|
|
33
|
+
}
|
|
@@ -49,6 +49,28 @@ export class SmoothlyInput {
|
|
|
49
49
|
this.keepFocusOnReRender = false;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
+
async getFormData(name) {
|
|
53
|
+
const result = {};
|
|
54
|
+
const form = document.forms.namedItem(name);
|
|
55
|
+
if (form) {
|
|
56
|
+
const elements = form.elements;
|
|
57
|
+
for (let i = 0; i < elements.length; i++) {
|
|
58
|
+
const element = elements.item(i);
|
|
59
|
+
if (this.hasNameAndValue(element) && element.name)
|
|
60
|
+
result[element.name] = element.value;
|
|
61
|
+
}
|
|
62
|
+
const smoothlyInputs = form.getElementsByTagName("smoothly-input");
|
|
63
|
+
for (let i = 0; i < smoothlyInputs.length; i++) {
|
|
64
|
+
const element = smoothlyInputs.item(i);
|
|
65
|
+
if (this.hasNameAndValue(element) && element.name)
|
|
66
|
+
result[element.name] = element.value;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return result;
|
|
70
|
+
}
|
|
71
|
+
hasNameAndValue(element) {
|
|
72
|
+
return (typeof element.name == "string" && typeof element.value == "string");
|
|
73
|
+
}
|
|
52
74
|
async setKeepFocusOnReRender(keepFocus) {
|
|
53
75
|
this.keepFocusOnReRender = keepFocus;
|
|
54
76
|
}
|
|
@@ -149,9 +171,9 @@ export class SmoothlyInput {
|
|
|
149
171
|
this.value = this.lastValue = this.formatter.fromString(this.formatter.unformat(StateEditor.copy(Object.assign({}, this.state))).value);
|
|
150
172
|
}
|
|
151
173
|
render() {
|
|
152
|
-
var _a;
|
|
153
|
-
return (h(Host, { class: { "has-value": ((_a = this.state) === null || _a === void 0 ? void 0 : _a.value) != "" } },
|
|
154
|
-
h("input", { name: this.name, type: this.state.type, placeholder: this.placeholder, required: this.required, autocomplete: this.autocomplete ? this.state.autocomplete : "off", disabled: this.disabled, pattern: this.state.pattern && this.state.pattern.source, value: this.state.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) }),
|
|
174
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
175
|
+
return (h(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) != "" } },
|
|
176
|
+
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) }),
|
|
155
177
|
h("smoothly-icon", { name: "alert-circle", color: "danger", fill: "clear", size: "small" }),
|
|
156
178
|
h("label", { htmlFor: this.name },
|
|
157
179
|
h("slot", null))));
|
|
@@ -383,6 +405,28 @@ export class SmoothlyInput {
|
|
|
383
405
|
}
|
|
384
406
|
}]; }
|
|
385
407
|
static get methods() { return {
|
|
408
|
+
"getFormData": {
|
|
409
|
+
"complexType": {
|
|
410
|
+
"signature": "(name: string) => Promise<Record<string, any>>",
|
|
411
|
+
"parameters": [{
|
|
412
|
+
"tags": [],
|
|
413
|
+
"text": ""
|
|
414
|
+
}],
|
|
415
|
+
"references": {
|
|
416
|
+
"Promise": {
|
|
417
|
+
"location": "global"
|
|
418
|
+
},
|
|
419
|
+
"Record": {
|
|
420
|
+
"location": "global"
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"return": "Promise<Record<string, any>>"
|
|
424
|
+
},
|
|
425
|
+
"docs": {
|
|
426
|
+
"text": "",
|
|
427
|
+
"tags": []
|
|
428
|
+
}
|
|
429
|
+
},
|
|
386
430
|
"setKeepFocusOnReRender": {
|
|
387
431
|
"complexType": {
|
|
388
432
|
"signature": "(keepFocus: boolean) => Promise<void>",
|
|
@@ -26,6 +26,7 @@ export class SmoothlySelectDemo {
|
|
|
26
26
|
h("option", { value: "1" }, "1"),
|
|
27
27
|
h("option", { value: "2" }, "2"),
|
|
28
28
|
h("option", { value: "3" }, "3")),
|
|
29
|
+
h("smoothly-input-date", null, "Date"),
|
|
29
30
|
h("smoothly-input-date", { value: "2021-10-28", max: "2021-12-30", min: "2021-10-10" }, "Date"),
|
|
30
31
|
h("smoothly-input-date-range", { start: "2021-10-28", end: "2021-11-27", min: "2021-10-10", max: "2021-12-30" }),
|
|
31
32
|
h("smoothly-selector", null,
|
package/dist/collection/index.js
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export var GoogleFont;
|
|
2
|
+
(function (GoogleFont) {
|
|
3
|
+
function is(value) {
|
|
4
|
+
return (typeof value == "string" &&
|
|
5
|
+
!/[</>"'`]/g.test(value) &&
|
|
6
|
+
/^([a-zA-ZäöüåßÄÖÜÅ+ ])+(:(ital(,)?)?((wght@(([01],\d{3})(;[01],\d{3})*|((\d{3})(;\d{3})*))))?)?$/g.test(value));
|
|
7
|
+
}
|
|
8
|
+
GoogleFont.is = is;
|
|
9
|
+
function getFont(value) {
|
|
10
|
+
return is(value) ? value.split(":")[0].replace(/\+/g, " ") : undefined;
|
|
11
|
+
}
|
|
12
|
+
GoogleFont.getFont = getFont;
|
|
13
|
+
function styleImportString(value) {
|
|
14
|
+
return is(value)
|
|
15
|
+
? `@import url('https://fonts.googleapis.com/css2?family=${value.replace(/ /g, "+")}&display=swap`
|
|
16
|
+
: undefined;
|
|
17
|
+
}
|
|
18
|
+
GoogleFont.styleImportString = styleImportString;
|
|
19
|
+
})(GoogleFont || (GoogleFont = {}));
|
|
@@ -80,6 +80,12 @@ export const SmoothlyFrame: {
|
|
|
80
80
|
new (): SmoothlyFrame;
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
+
interface SmoothlyGoogleFont extends Components.SmoothlyGoogleFont, HTMLElement {}
|
|
84
|
+
export const SmoothlyGoogleFont: {
|
|
85
|
+
prototype: SmoothlyGoogleFont;
|
|
86
|
+
new (): SmoothlyGoogleFont;
|
|
87
|
+
};
|
|
88
|
+
|
|
83
89
|
interface SmoothlyIcon extends Components.SmoothlyIcon, HTMLElement {}
|
|
84
90
|
export const SmoothlyIcon: {
|
|
85
91
|
prototype: SmoothlyIcon;
|