smoothly 0.1.97 → 0.1.100
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/loader.cjs.js +1 -1
- package/dist/cjs/smoothly-accordion_48.cjs.entry.js +19 -10
- package/dist/cjs/smoothly-checkbox.cjs.entry.js +5 -4
- package/dist/cjs/smoothly-icon.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-input-date-range.cjs.entry.js +3 -2
- package/dist/cjs/smoothly-input.cjs.entry.js +3 -2
- package/dist/cjs/smoothly-select-demo.cjs.entry.js +7 -1
- package/dist/cjs/smoothly.cjs.js +1 -1
- package/dist/collection/components/checkbox/index.js +22 -3
- package/dist/collection/components/checkbox/style.css +4 -0
- package/dist/collection/components/icon/index.js +2 -2
- package/dist/collection/components/icon/style.css +4 -0
- package/dist/collection/components/input/index.js +25 -5
- package/dist/collection/components/input/style.css +16 -6
- package/dist/collection/components/input-date-range/index.js +25 -3
- package/dist/collection/components/input-date-range/style.css +35 -27
- package/dist/collection/components/select-demo/index.js +7 -1
- package/dist/custom-elements/index.js +22 -13
- package/dist/esm/loader.js +1 -1
- package/dist/esm/smoothly-accordion_48.entry.js +19 -10
- package/dist/esm/smoothly-checkbox.entry.js +5 -4
- package/dist/esm/smoothly-icon.entry.js +1 -1
- package/dist/esm/smoothly-input-date-range.entry.js +3 -2
- package/dist/esm/smoothly-input.entry.js +3 -2
- package/dist/esm/smoothly-select-demo.entry.js +7 -1
- package/dist/esm/smoothly.js +1 -1
- package/dist/smoothly/{p-71fe63ea.entry.js → p-a8cd3a7b.entry.js} +1 -1
- package/dist/smoothly/smoothly-checkbox.entry.js +5 -4
- package/dist/smoothly/smoothly-icon.entry.js +1 -1
- package/dist/smoothly/smoothly-input-date-range.entry.js +3 -2
- package/dist/smoothly/smoothly-input.entry.js +3 -2
- package/dist/smoothly/smoothly-select-demo.entry.js +7 -1
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/components/checkbox/index.d.ts +1 -0
- package/dist/types/components/icon/index.d.ts +1 -1
- package/dist/types/components/input/index.d.ts +1 -0
- package/dist/types/components/input-date-range/index.d.ts +1 -0
- package/dist/types/components.d.ts +8 -2
- package/package.json +1 -1
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-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"],"intermediate":[1540],"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],"showLabel":[516,"show-label"]},[[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"],"size":[1],"intermediate":[1540],"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"],"showLabel":[516,"show-label"],"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
|
|
|
@@ -37353,13 +37353,14 @@ function create(language) {
|
|
|
37353
37353
|
}, language);
|
|
37354
37354
|
}
|
|
37355
37355
|
|
|
37356
|
-
const styleCss$z = ".sc-smoothly-checkbox-h{display:block}[hidden].sc-smoothly-checkbox-h{display:none}smoothly-icon.sc-smoothly-checkbox{cursor:pointer}[disabled].sc-smoothly-checkbox-h smoothly-icon.sc-smoothly-checkbox{stroke:rgba(var(--smoothly-color-contrast), 0.3)}";
|
|
37356
|
+
const styleCss$z = ".sc-smoothly-checkbox-h{display:block}[hidden].sc-smoothly-checkbox-h{display:none}smoothly-icon.sc-smoothly-checkbox{cursor:pointer}smoothly-icon.sc-smoothly-checkbox:nth-child(2){position:absolute;transform:scaleX(0.6)}[disabled].sc-smoothly-checkbox-h smoothly-icon.sc-smoothly-checkbox{stroke:rgba(var(--smoothly-color-contrast), 0.3)}";
|
|
37357
37357
|
|
|
37358
37358
|
let SmoothlyCheckbox = class {
|
|
37359
37359
|
constructor(hostRef) {
|
|
37360
37360
|
index.registerInstance(this, hostRef);
|
|
37361
37361
|
this.checked = index.createEvent(this, "checked", 7);
|
|
37362
37362
|
this.selectAll = false;
|
|
37363
|
+
this.size = "small";
|
|
37363
37364
|
}
|
|
37364
37365
|
componentWillLoad() {
|
|
37365
37366
|
this.t = create(this.element);
|
|
@@ -37372,9 +37373,9 @@ let SmoothlyCheckbox = class {
|
|
|
37372
37373
|
}
|
|
37373
37374
|
render() {
|
|
37374
37375
|
return [
|
|
37375
|
-
index.h("smoothly-icon", { toolTip: this.t(this.selectAll ? "Deselect all" : "Deselect"), onClick: () => this.toggle(), style: { display: this.selected ? "" : "none" }, name: "checkbox-outline" }),
|
|
37376
|
-
index.h("smoothly-icon", { toolTip: this.t(this.intermediate && !this.selected ? "Deselect all" : "Select all"), onClick: () => this.toggle(), style: { display: this.intermediate && !this.selected ? "" : "none"
|
|
37377
|
-
index.h("smoothly-icon", { toolTip: this.t(this.selectAll ? "Select all" : "Select"), onClick: () => this.toggle(), style: { display: !this.selected ? "" : "none" }, name: "square-outline" }),
|
|
37376
|
+
index.h("smoothly-icon", { toolTip: this.t(this.selectAll ? "Deselect all" : "Deselect"), onClick: () => this.toggle(), style: { display: this.selected ? "" : "none" }, size: this.size, name: "checkbox-outline" }),
|
|
37377
|
+
index.h("smoothly-icon", { toolTip: this.t(this.intermediate && !this.selected ? "Deselect all" : "Select all"), onClick: () => this.toggle(), style: { display: this.intermediate && !this.selected ? "" : "none" }, size: this.size, name: "remove-outline" }),
|
|
37378
|
+
index.h("smoothly-icon", { toolTip: this.t(this.selectAll ? "Select all" : "Select"), onClick: () => this.toggle(), style: { display: !this.selected ? "" : "none" }, size: this.size, name: "square-outline" }),
|
|
37378
37379
|
];
|
|
37379
37380
|
}
|
|
37380
37381
|
get element() { return index.getElement(this); }
|
|
@@ -39145,7 +39146,7 @@ let SmoothlyFrame = class {
|
|
|
39145
39146
|
};
|
|
39146
39147
|
SmoothlyFrame.style = styleCss$u;
|
|
39147
39148
|
|
|
39148
|
-
const styleCss$t = "[size].sc-smoothly-icon-h{background:none}.sc-smoothly-icon-h{display:block}[hidden].sc-smoothly-icon-h{display:none}[size=small].sc-smoothly-icon-h{width:1.4em;height:1.4em}[size=medium].sc-smoothly-icon-h{width:1.8em;height:1.8em}[size=large].sc-smoothly-icon-h{width:2.8em;height:2.8em}[size=xlarge].sc-smoothly-icon-h{width:4em;height:4em}";
|
|
39149
|
+
const styleCss$t = "[size].sc-smoothly-icon-h{background:none}.sc-smoothly-icon-h{display:block}[hidden].sc-smoothly-icon-h{display:none}[size=tiny].sc-smoothly-icon-h{width:1.2em;height:1.2em}[size=small].sc-smoothly-icon-h{width:1.4em;height:1.4em}[size=medium].sc-smoothly-icon-h{width:1.8em;height:1.8em}[size=large].sc-smoothly-icon-h{width:2.8em;height:2.8em}[size=xlarge].sc-smoothly-icon-h{width:4em;height:4em}";
|
|
39149
39150
|
|
|
39150
39151
|
let SmoothlyIcon = class {
|
|
39151
39152
|
constructor(hostRef) {
|
|
@@ -39674,7 +39675,7 @@ let SmoothlyIconDemo = class {
|
|
|
39674
39675
|
};
|
|
39675
39676
|
SmoothlyIconDemo.style = styleCss$s;
|
|
39676
39677
|
|
|
39677
|
-
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.
|
|
39678
|
+
const styleCss$r = ".sc-smoothly-input-h{display:block;position:relative;font-weight:var(--smoothly-font-weight);padding:var(--padding)}[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}.sc-smoothly-input-h:not([show-label]) label.sc-smoothly-input{display:none}.sc-smoothly-input-h:not([show-label]) input.sc-smoothly-input{padding:0.6em 0.2em 0.6em 0.2em}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}.sc-smoothly-input-h>div.sc-smoothly-input{position:relative}.sc-smoothly-input-h>div.sc-smoothly-input>label.sc-smoothly-input{z-index:1;pointer-events:none}.has-value.sc-smoothly-input-h>div.sc-smoothly-input>label.sc-smoothly-input{top:0.4em;font-size:60%}.sc-smoothly-input-h:focus-within>div.sc-smoothly-input>label.sc-smoothly-input{top:0.4em;font-size:60%}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}";
|
|
39678
39679
|
|
|
39679
39680
|
let SmoothlyInput = class {
|
|
39680
39681
|
constructor(hostRef) {
|
|
@@ -39684,6 +39685,7 @@ let SmoothlyInput = class {
|
|
|
39684
39685
|
this.type = "text";
|
|
39685
39686
|
this.required = false;
|
|
39686
39687
|
this.minLength = 0;
|
|
39688
|
+
this.showLabel = true;
|
|
39687
39689
|
this.maxLength = Number.POSITIVE_INFINITY;
|
|
39688
39690
|
this.autocomplete = true;
|
|
39689
39691
|
this.disabled = false;
|
|
@@ -39852,7 +39854,7 @@ let SmoothlyInput = class {
|
|
|
39852
39854
|
}
|
|
39853
39855
|
render() {
|
|
39854
39856
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
39855
|
-
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))));
|
|
39857
|
+
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) != "" }, onclick: () => { var _a; return (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.focus(); } }, index.h("div", null, 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)))));
|
|
39856
39858
|
}
|
|
39857
39859
|
static get watchers() { return {
|
|
39858
39860
|
"value": ["valueWatcher"],
|
|
@@ -39896,13 +39898,14 @@ let InputDate = class {
|
|
|
39896
39898
|
};
|
|
39897
39899
|
InputDate.style = styleCss$q;
|
|
39898
39900
|
|
|
39899
|
-
const styleCss$p = ".sc-smoothly-input-date-range-h{position:relative;display:block}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-default-shade));max-width:22em}.sc-smoothly-input-date-range-h>div.sc-smoothly-input-date-range{position:fixed;top:0px;left:0px;right:0px;bottom:0px;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range>.arrow.sc-smoothly-input-date-range{position:absolute;z-index:9;transform:translate(10em,
|
|
39901
|
+
const styleCss$p = ".sc-smoothly-input-date-range-h{position:relative;display:block}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-default-shade));max-width:22em}.sc-smoothly-input-date-range-h>div.sc-smoothly-input-date-range{position:fixed;top:0px;left:0px;right:0px;bottom:0px;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range>.arrow.sc-smoothly-input-date-range{position:absolute;z-index:9;transform:translate(10em, -0.55em) rotate(45deg);width:1em;height:1em;background-color:rgb(var(--smoothly-default-shade))}.sc-smoothly-input-date-range-h>section.sc-smoothly-input-date-range{display:flex}smoothly-input.sc-smoothly-input-date-range{border-radius:var(--border-radius, none);background-color:var(--background, transparent);width:var(--input-width)}span.sc-smoothly-input-date-range{padding:0.5em 0.2em 0.5em 0.2em;align-self:center}";
|
|
39900
39902
|
|
|
39901
39903
|
let InputDateRange = class {
|
|
39902
39904
|
constructor(hostRef) {
|
|
39903
39905
|
index.registerInstance(this, hostRef);
|
|
39904
39906
|
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
39905
39907
|
this.dateRangeSelected = index.createEvent(this, "dateRangeSelected", 7);
|
|
39908
|
+
this.showLabel = true;
|
|
39906
39909
|
}
|
|
39907
39910
|
onValue(next) {
|
|
39908
39911
|
this.valueChanged.emit(next);
|
|
@@ -39922,7 +39925,7 @@ let InputDateRange = class {
|
|
|
39922
39925
|
render() {
|
|
39923
39926
|
var _a;
|
|
39924
39927
|
return [
|
|
39925
|
-
index.h("section", null, index.h("smoothly-input", { onClick: () => (this.open = !this.open), type: "date", value: this.start, onSmoothlyChanged: e => (this.start = e.detail.value) }, "
|
|
39928
|
+
index.h("section", null, index.h("smoothly-input", { onClick: () => (this.open = !this.open), type: "date", value: this.start, showLabel: this.showLabel, onSmoothlyChanged: e => (this.start = e.detail.value) }, "from"), index.h("span", null, "\u2013"), index.h("smoothly-input", { onClick: () => (this.open = !this.open), type: "date", showLabel: this.showLabel, value: this.end, onSmoothlyChanged: e => (this.end = e.detail.value) }, "to")),
|
|
39926
39929
|
this.open ? index.h("div", { onClick: () => (this.open = false) }) : [],
|
|
39927
39930
|
this.open ? (index.h("nav", null, index.h("div", { class: "arrow" }), index.h("smoothly-calendar", { doubleInput: true, value: (_a = this.value) !== null && _a !== void 0 ? _a : dist$3.Date.now(), onValueChanged: event => {
|
|
39928
39931
|
this.value = event.detail;
|
|
@@ -40481,7 +40484,13 @@ let SmoothlySelectDemo = class {
|
|
|
40481
40484
|
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")),
|
|
40482
40485
|
index.h("smoothly-input-date", null, "Date"),
|
|
40483
40486
|
index.h("smoothly-input-date", { value: "2021-10-28", max: "2021-12-30", min: "2021-10-10" }, "Date"),
|
|
40484
|
-
index.h("smoothly-input-date-range", { start: "
|
|
40487
|
+
index.h("smoothly-input-date-range", { start: "2022-10-28", end: "2022-11-27", min: "2021-10-10", max: "2022-12-30" }),
|
|
40488
|
+
index.h("smoothly-input-date-range", { start: "2022-10-28", end: "2022-11-27", min: "2021-10-10", max: "2022-12-30", showLabel: false, style: {
|
|
40489
|
+
"--background": "rgb(var(--smoothly-dark-shade))",
|
|
40490
|
+
"--border-radius": "4px",
|
|
40491
|
+
"--padding": "0 0.75em",
|
|
40492
|
+
"--input-width": "6rem",
|
|
40493
|
+
} }),
|
|
40485
40494
|
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")),
|
|
40486
40495
|
index.h("button", { onClick: () => this.alertf() }, "press here"),
|
|
40487
40496
|
index.h("smoothly-picker", { label: "Filter", "empty-menu-label": "Sorry, we're out of options.", "max-height": "58px", multiple: true, options: [
|
|
@@ -18639,13 +18639,14 @@ function create(language) {
|
|
|
18639
18639
|
}, language);
|
|
18640
18640
|
}
|
|
18641
18641
|
|
|
18642
|
-
const styleCss = ".sc-smoothly-checkbox-h{display:block}[hidden].sc-smoothly-checkbox-h{display:none}smoothly-icon.sc-smoothly-checkbox{cursor:pointer}[disabled].sc-smoothly-checkbox-h smoothly-icon.sc-smoothly-checkbox{stroke:rgba(var(--smoothly-color-contrast), 0.3)}";
|
|
18642
|
+
const styleCss = ".sc-smoothly-checkbox-h{display:block}[hidden].sc-smoothly-checkbox-h{display:none}smoothly-icon.sc-smoothly-checkbox{cursor:pointer}smoothly-icon.sc-smoothly-checkbox:nth-child(2){position:absolute;transform:scaleX(0.6)}[disabled].sc-smoothly-checkbox-h smoothly-icon.sc-smoothly-checkbox{stroke:rgba(var(--smoothly-color-contrast), 0.3)}";
|
|
18643
18643
|
|
|
18644
18644
|
let SmoothlyCheckbox = class {
|
|
18645
18645
|
constructor(hostRef) {
|
|
18646
18646
|
index$5.registerInstance(this, hostRef);
|
|
18647
18647
|
this.checked = index$5.createEvent(this, "checked", 7);
|
|
18648
18648
|
this.selectAll = false;
|
|
18649
|
+
this.size = "small";
|
|
18649
18650
|
}
|
|
18650
18651
|
componentWillLoad() {
|
|
18651
18652
|
this.t = create(this.element);
|
|
@@ -18658,9 +18659,9 @@ let SmoothlyCheckbox = class {
|
|
|
18658
18659
|
}
|
|
18659
18660
|
render() {
|
|
18660
18661
|
return [
|
|
18661
|
-
index$5.h("smoothly-icon", { toolTip: this.t(this.selectAll ? "Deselect all" : "Deselect"), onClick: () => this.toggle(), style: { display: this.selected ? "" : "none" }, name: "checkbox-outline" }),
|
|
18662
|
-
index$5.h("smoothly-icon", { toolTip: this.t(this.intermediate && !this.selected ? "Deselect all" : "Select all"), onClick: () => this.toggle(), style: { display: this.intermediate && !this.selected ? "" : "none"
|
|
18663
|
-
index$5.h("smoothly-icon", { toolTip: this.t(this.selectAll ? "Select all" : "Select"), onClick: () => this.toggle(), style: { display: !this.selected ? "" : "none" }, name: "square-outline" }),
|
|
18662
|
+
index$5.h("smoothly-icon", { toolTip: this.t(this.selectAll ? "Deselect all" : "Deselect"), onClick: () => this.toggle(), style: { display: this.selected ? "" : "none" }, size: this.size, name: "checkbox-outline" }),
|
|
18663
|
+
index$5.h("smoothly-icon", { toolTip: this.t(this.intermediate && !this.selected ? "Deselect all" : "Select all"), onClick: () => this.toggle(), style: { display: this.intermediate && !this.selected ? "" : "none" }, size: this.size, name: "remove-outline" }),
|
|
18664
|
+
index$5.h("smoothly-icon", { toolTip: this.t(this.selectAll ? "Select all" : "Select"), onClick: () => this.toggle(), style: { display: !this.selected ? "" : "none" }, size: this.size, name: "square-outline" }),
|
|
18664
18665
|
];
|
|
18665
18666
|
}
|
|
18666
18667
|
get element() { return index$5.getElement(this); }
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-138c41c2.js');
|
|
6
6
|
|
|
7
|
-
const styleCss = "[size].sc-smoothly-icon-h{background:none}.sc-smoothly-icon-h{display:block}[hidden].sc-smoothly-icon-h{display:none}[size=small].sc-smoothly-icon-h{width:1.4em;height:1.4em}[size=medium].sc-smoothly-icon-h{width:1.8em;height:1.8em}[size=large].sc-smoothly-icon-h{width:2.8em;height:2.8em}[size=xlarge].sc-smoothly-icon-h{width:4em;height:4em}";
|
|
7
|
+
const styleCss = "[size].sc-smoothly-icon-h{background:none}.sc-smoothly-icon-h{display:block}[hidden].sc-smoothly-icon-h{display:none}[size=tiny].sc-smoothly-icon-h{width:1.2em;height:1.2em}[size=small].sc-smoothly-icon-h{width:1.4em;height:1.4em}[size=medium].sc-smoothly-icon-h{width:1.8em;height:1.8em}[size=large].sc-smoothly-icon-h{width:2.8em;height:2.8em}[size=xlarge].sc-smoothly-icon-h{width:4em;height:4em}";
|
|
8
8
|
|
|
9
9
|
let SmoothlyIcon = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -6,13 +6,14 @@ const index = require('./index-138c41c2.js');
|
|
|
6
6
|
const index$1 = require('./index-ac32385c.js');
|
|
7
7
|
require('./_commonjsHelpers-10109b76.js');
|
|
8
8
|
|
|
9
|
-
const styleCss = ".sc-smoothly-input-date-range-h{position:relative;display:block}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-default-shade));max-width:22em}.sc-smoothly-input-date-range-h>div.sc-smoothly-input-date-range{position:fixed;top:0px;left:0px;right:0px;bottom:0px;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range>.arrow.sc-smoothly-input-date-range{position:absolute;z-index:9;transform:translate(10em,
|
|
9
|
+
const styleCss = ".sc-smoothly-input-date-range-h{position:relative;display:block}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-default-shade));max-width:22em}.sc-smoothly-input-date-range-h>div.sc-smoothly-input-date-range{position:fixed;top:0px;left:0px;right:0px;bottom:0px;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range>.arrow.sc-smoothly-input-date-range{position:absolute;z-index:9;transform:translate(10em, -0.55em) rotate(45deg);width:1em;height:1em;background-color:rgb(var(--smoothly-default-shade))}.sc-smoothly-input-date-range-h>section.sc-smoothly-input-date-range{display:flex}smoothly-input.sc-smoothly-input-date-range{border-radius:var(--border-radius, none);background-color:var(--background, transparent);width:var(--input-width)}span.sc-smoothly-input-date-range{padding:0.5em 0.2em 0.5em 0.2em;align-self:center}";
|
|
10
10
|
|
|
11
11
|
let InputDateRange = class {
|
|
12
12
|
constructor(hostRef) {
|
|
13
13
|
index.registerInstance(this, hostRef);
|
|
14
14
|
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
15
15
|
this.dateRangeSelected = index.createEvent(this, "dateRangeSelected", 7);
|
|
16
|
+
this.showLabel = true;
|
|
16
17
|
}
|
|
17
18
|
onValue(next) {
|
|
18
19
|
this.valueChanged.emit(next);
|
|
@@ -32,7 +33,7 @@ let InputDateRange = class {
|
|
|
32
33
|
render() {
|
|
33
34
|
var _a;
|
|
34
35
|
return [
|
|
35
|
-
index.h("section", null, index.h("smoothly-input", { onClick: () => (this.open = !this.open), type: "date", value: this.start, onSmoothlyChanged: e => (this.start = e.detail.value) }, "
|
|
36
|
+
index.h("section", null, index.h("smoothly-input", { onClick: () => (this.open = !this.open), type: "date", value: this.start, showLabel: this.showLabel, onSmoothlyChanged: e => (this.start = e.detail.value) }, "from"), index.h("span", null, "\u2013"), index.h("smoothly-input", { onClick: () => (this.open = !this.open), type: "date", showLabel: this.showLabel, value: this.end, onSmoothlyChanged: e => (this.end = e.detail.value) }, "to")),
|
|
36
37
|
this.open ? index.h("div", { onClick: () => (this.open = false) }) : [],
|
|
37
38
|
this.open ? (index.h("nav", null, index.h("div", { class: "arrow" }), index.h("smoothly-calendar", { doubleInput: true, value: (_a = this.value) !== null && _a !== void 0 ? _a : index$1.dist.Date.now(), onValueChanged: event => {
|
|
38
39
|
this.value = event.detail;
|
|
@@ -7,7 +7,7 @@ const index$2 = require('./index-ac32385c.js');
|
|
|
7
7
|
const index$1 = require('./index-d66869d7.js');
|
|
8
8
|
require('./_commonjsHelpers-10109b76.js');
|
|
9
9
|
|
|
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.
|
|
10
|
+
const styleCss = ".sc-smoothly-input-h{display:block;position:relative;font-weight:var(--smoothly-font-weight);padding:var(--padding)}[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}.sc-smoothly-input-h:not([show-label]) label.sc-smoothly-input{display:none}.sc-smoothly-input-h:not([show-label]) input.sc-smoothly-input{padding:0.6em 0.2em 0.6em 0.2em}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}.sc-smoothly-input-h>div.sc-smoothly-input{position:relative}.sc-smoothly-input-h>div.sc-smoothly-input>label.sc-smoothly-input{z-index:1;pointer-events:none}.has-value.sc-smoothly-input-h>div.sc-smoothly-input>label.sc-smoothly-input{top:0.4em;font-size:60%}.sc-smoothly-input-h:focus-within>div.sc-smoothly-input>label.sc-smoothly-input{top:0.4em;font-size:60%}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) {
|
|
@@ -17,6 +17,7 @@ let SmoothlyInput = class {
|
|
|
17
17
|
this.type = "text";
|
|
18
18
|
this.required = false;
|
|
19
19
|
this.minLength = 0;
|
|
20
|
+
this.showLabel = true;
|
|
20
21
|
this.maxLength = Number.POSITIVE_INFINITY;
|
|
21
22
|
this.autocomplete = true;
|
|
22
23
|
this.disabled = false;
|
|
@@ -185,7 +186,7 @@ let SmoothlyInput = class {
|
|
|
185
186
|
}
|
|
186
187
|
render() {
|
|
187
188
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
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))));
|
|
189
|
+
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) != "" }, onclick: () => { var _a; return (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.focus(); } }, index.h("div", null, 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)))));
|
|
189
190
|
}
|
|
190
191
|
static get watchers() { return {
|
|
191
192
|
"value": ["valueWatcher"],
|
|
@@ -27,7 +27,13 @@ let SmoothlySelectDemo = class {
|
|
|
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
28
|
index.h("smoothly-input-date", null, "Date"),
|
|
29
29
|
index.h("smoothly-input-date", { value: "2021-10-28", max: "2021-12-30", min: "2021-10-10" }, "Date"),
|
|
30
|
-
index.h("smoothly-input-date-range", { start: "
|
|
30
|
+
index.h("smoothly-input-date-range", { start: "2022-10-28", end: "2022-11-27", min: "2021-10-10", max: "2022-12-30" }),
|
|
31
|
+
index.h("smoothly-input-date-range", { start: "2022-10-28", end: "2022-11-27", min: "2021-10-10", max: "2022-12-30", showLabel: false, style: {
|
|
32
|
+
"--background": "rgb(var(--smoothly-dark-shade))",
|
|
33
|
+
"--border-radius": "4px",
|
|
34
|
+
"--padding": "0 0.75em",
|
|
35
|
+
"--input-width": "6rem",
|
|
36
|
+
} }),
|
|
31
37
|
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")),
|
|
32
38
|
index.h("button", { onClick: () => this.alertf() }, "press here"),
|
|
33
39
|
index.h("smoothly-picker", { label: "Filter", "empty-menu-label": "Sorry, we're out of options.", "max-height": "58px", multiple: true, options: [
|
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-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"],"intermediate":[1540],"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],"showLabel":[516,"show-label"]},[[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"],"size":[1],"intermediate":[1540],"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"],"showLabel":[516,"show-label"],"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
|
});
|
|
@@ -3,6 +3,7 @@ import * as translation from "./translation";
|
|
|
3
3
|
export class SmoothlyCheckbox {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.selectAll = false;
|
|
6
|
+
this.size = "small";
|
|
6
7
|
}
|
|
7
8
|
componentWillLoad() {
|
|
8
9
|
this.t = translation.create(this.element);
|
|
@@ -15,9 +16,9 @@ export class SmoothlyCheckbox {
|
|
|
15
16
|
}
|
|
16
17
|
render() {
|
|
17
18
|
return [
|
|
18
|
-
h("smoothly-icon", { toolTip: this.t(this.selectAll ? "Deselect all" : "Deselect"), onClick: () => this.toggle(), style: { display: this.selected ? "" : "none" }, name: "checkbox-outline" }),
|
|
19
|
-
h("smoothly-icon", { toolTip: this.t(this.intermediate && !this.selected ? "Deselect all" : "Select all"), onClick: () => this.toggle(), style: { display: this.intermediate && !this.selected ? "" : "none"
|
|
20
|
-
h("smoothly-icon", { toolTip: this.t(this.selectAll ? "Select all" : "Select"), onClick: () => this.toggle(), style: { display: !this.selected ? "" : "none" }, name: "square-outline" }),
|
|
19
|
+
h("smoothly-icon", { toolTip: this.t(this.selectAll ? "Deselect all" : "Deselect"), onClick: () => this.toggle(), style: { display: this.selected ? "" : "none" }, size: this.size, name: "checkbox-outline" }),
|
|
20
|
+
h("smoothly-icon", { toolTip: this.t(this.intermediate && !this.selected ? "Deselect all" : "Select all"), onClick: () => this.toggle(), style: { display: this.intermediate && !this.selected ? "" : "none" }, size: this.size, name: "remove-outline" }),
|
|
21
|
+
h("smoothly-icon", { toolTip: this.t(this.selectAll ? "Select all" : "Select"), onClick: () => this.toggle(), style: { display: !this.selected ? "" : "none" }, size: this.size, name: "square-outline" }),
|
|
21
22
|
];
|
|
22
23
|
}
|
|
23
24
|
static get is() { return "smoothly-checkbox"; }
|
|
@@ -47,6 +48,24 @@ export class SmoothlyCheckbox {
|
|
|
47
48
|
"reflect": false,
|
|
48
49
|
"defaultValue": "false"
|
|
49
50
|
},
|
|
51
|
+
"size": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"mutable": false,
|
|
54
|
+
"complexType": {
|
|
55
|
+
"original": "\"tiny\" | \"small\" | \"medium\" | \"large\"",
|
|
56
|
+
"resolved": "\"large\" | \"medium\" | \"small\" | \"tiny\"",
|
|
57
|
+
"references": {}
|
|
58
|
+
},
|
|
59
|
+
"required": false,
|
|
60
|
+
"optional": false,
|
|
61
|
+
"docs": {
|
|
62
|
+
"tags": [],
|
|
63
|
+
"text": ""
|
|
64
|
+
},
|
|
65
|
+
"attribute": "size",
|
|
66
|
+
"reflect": false,
|
|
67
|
+
"defaultValue": "\"small\""
|
|
68
|
+
},
|
|
50
69
|
"intermediate": {
|
|
51
70
|
"type": "boolean",
|
|
52
71
|
"mutable": true,
|
|
@@ -108,8 +108,8 @@ export class SmoothlyIcon {
|
|
|
108
108
|
"type": "string",
|
|
109
109
|
"mutable": false,
|
|
110
110
|
"complexType": {
|
|
111
|
-
"original": "\"small\" | \"medium\" | \"large\"",
|
|
112
|
-
"resolved": "\"large\" | \"medium\" | \"small\"",
|
|
111
|
+
"original": "\"tiny\" | \"small\" | \"medium\" | \"large\"",
|
|
112
|
+
"resolved": "\"large\" | \"medium\" | \"small\" | \"tiny\"",
|
|
113
113
|
"references": {}
|
|
114
114
|
},
|
|
115
115
|
"required": false,
|
|
@@ -7,6 +7,7 @@ export class SmoothlyInput {
|
|
|
7
7
|
this.type = "text";
|
|
8
8
|
this.required = false;
|
|
9
9
|
this.minLength = 0;
|
|
10
|
+
this.showLabel = true;
|
|
10
11
|
this.maxLength = Number.POSITIVE_INFINITY;
|
|
11
12
|
this.autocomplete = true;
|
|
12
13
|
this.disabled = false;
|
|
@@ -175,11 +176,12 @@ export class SmoothlyInput {
|
|
|
175
176
|
}
|
|
176
177
|
render() {
|
|
177
178
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
178
|
-
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) != "" } },
|
|
179
|
-
h("
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
h("
|
|
179
|
+
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) != "" }, onclick: () => { var _a; return (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.focus(); } },
|
|
180
|
+
h("div", null,
|
|
181
|
+
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) }),
|
|
182
|
+
h("smoothly-icon", { name: "alert-circle", color: "danger", fill: "clear", size: "small" }),
|
|
183
|
+
h("label", { htmlFor: this.name },
|
|
184
|
+
h("slot", null)))));
|
|
183
185
|
}
|
|
184
186
|
static get is() { return "smoothly-input"; }
|
|
185
187
|
static get encapsulation() { return "scoped"; }
|
|
@@ -278,6 +280,24 @@ export class SmoothlyInput {
|
|
|
278
280
|
"reflect": false,
|
|
279
281
|
"defaultValue": "0"
|
|
280
282
|
},
|
|
283
|
+
"showLabel": {
|
|
284
|
+
"type": "boolean",
|
|
285
|
+
"mutable": false,
|
|
286
|
+
"complexType": {
|
|
287
|
+
"original": "boolean",
|
|
288
|
+
"resolved": "boolean",
|
|
289
|
+
"references": {}
|
|
290
|
+
},
|
|
291
|
+
"required": false,
|
|
292
|
+
"optional": false,
|
|
293
|
+
"docs": {
|
|
294
|
+
"tags": [],
|
|
295
|
+
"text": ""
|
|
296
|
+
},
|
|
297
|
+
"attribute": "show-label",
|
|
298
|
+
"reflect": true,
|
|
299
|
+
"defaultValue": "true"
|
|
300
|
+
},
|
|
281
301
|
"maxLength": {
|
|
282
302
|
"type": "number",
|
|
283
303
|
"mutable": true,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
display: block;
|
|
3
3
|
position: relative;
|
|
4
4
|
font-weight: var(--smoothly-font-weight);
|
|
5
|
+
padding: var(--padding);
|
|
5
6
|
}
|
|
6
7
|
:host[hidden] {
|
|
7
8
|
display: none;
|
|
@@ -17,6 +18,12 @@ label {
|
|
|
17
18
|
transition: font-size 0.1s;
|
|
18
19
|
transition-timing-function: ease;
|
|
19
20
|
}
|
|
21
|
+
:host:not([show-label]) label {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
:host:not([show-label]) input {
|
|
25
|
+
padding: 0.6em 0.2em 0.6em 0.2em;
|
|
26
|
+
}
|
|
20
27
|
input {
|
|
21
28
|
padding: 1em 0.2em 0.2em 0.2em;
|
|
22
29
|
width: calc(100% - 0.4em);
|
|
@@ -36,17 +43,20 @@ smoothly-icon {
|
|
|
36
43
|
input:invalid + smoothly-icon {
|
|
37
44
|
display: block;
|
|
38
45
|
}
|
|
39
|
-
:host
|
|
40
|
-
|
|
46
|
+
:host > div {
|
|
47
|
+
position: relative;
|
|
48
|
+
}
|
|
49
|
+
:host > div > label {
|
|
50
|
+
z-index: 1;
|
|
51
|
+
pointer-events: none;
|
|
52
|
+
}
|
|
53
|
+
:host.has-value > div > label {
|
|
41
54
|
top: 0.4em;
|
|
42
55
|
font-size: 60%;
|
|
43
|
-
z-index: 0;
|
|
44
56
|
}
|
|
45
|
-
:host:focus-within > label {
|
|
46
|
-
top: 0.3em;
|
|
57
|
+
:host:focus-within > div > label {
|
|
47
58
|
top: 0.4em;
|
|
48
59
|
font-size: 60%;
|
|
49
|
-
z-index: 0;
|
|
50
60
|
}
|
|
51
61
|
input:focus {
|
|
52
62
|
outline: none;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Component, Event, h, Listen, Prop, Watch } from "@stencil/core";
|
|
2
2
|
import { Date, DateRange } from "isoly";
|
|
3
3
|
export class InputDateRange {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.showLabel = true;
|
|
6
|
+
}
|
|
4
7
|
onValue(next) {
|
|
5
8
|
this.valueChanged.emit(next);
|
|
6
9
|
}
|
|
@@ -20,8 +23,9 @@ export class InputDateRange {
|
|
|
20
23
|
var _a;
|
|
21
24
|
return [
|
|
22
25
|
h("section", null,
|
|
23
|
-
h("smoothly-input", { onClick: () => (this.open = !this.open), type: "date", value: this.start, onSmoothlyChanged: e => (this.start = e.detail.value) }, "
|
|
24
|
-
h("
|
|
26
|
+
h("smoothly-input", { onClick: () => (this.open = !this.open), type: "date", value: this.start, showLabel: this.showLabel, onSmoothlyChanged: e => (this.start = e.detail.value) }, "from"),
|
|
27
|
+
h("span", null, "\u2013"),
|
|
28
|
+
h("smoothly-input", { onClick: () => (this.open = !this.open), type: "date", showLabel: this.showLabel, value: this.end, onSmoothlyChanged: e => (this.end = e.detail.value) }, "to")),
|
|
25
29
|
this.open ? h("div", { onClick: () => (this.open = false) }) : [],
|
|
26
30
|
this.open ? (h("nav", null,
|
|
27
31
|
h("div", { class: "arrow" }),
|
|
@@ -34,7 +38,7 @@ export class InputDateRange {
|
|
|
34
38
|
static get is() { return "smoothly-input-date-range"; }
|
|
35
39
|
static get encapsulation() { return "scoped"; }
|
|
36
40
|
static get originalStyleUrls() { return {
|
|
37
|
-
"$": ["style.
|
|
41
|
+
"$": ["style.scss"]
|
|
38
42
|
}; }
|
|
39
43
|
static get styleUrls() { return {
|
|
40
44
|
"$": ["style.css"]
|
|
@@ -166,6 +170,24 @@ export class InputDateRange {
|
|
|
166
170
|
},
|
|
167
171
|
"attribute": "open",
|
|
168
172
|
"reflect": false
|
|
173
|
+
},
|
|
174
|
+
"showLabel": {
|
|
175
|
+
"type": "boolean",
|
|
176
|
+
"mutable": false,
|
|
177
|
+
"complexType": {
|
|
178
|
+
"original": "boolean",
|
|
179
|
+
"resolved": "boolean",
|
|
180
|
+
"references": {}
|
|
181
|
+
},
|
|
182
|
+
"required": false,
|
|
183
|
+
"optional": false,
|
|
184
|
+
"docs": {
|
|
185
|
+
"tags": [],
|
|
186
|
+
"text": ""
|
|
187
|
+
},
|
|
188
|
+
"attribute": "show-label",
|
|
189
|
+
"reflect": true,
|
|
190
|
+
"defaultValue": "true"
|
|
169
191
|
}
|
|
170
192
|
}; }
|
|
171
193
|
static get events() { return [{
|