smoothly 0.1.102 → 0.1.105
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/{App-ffc56e72.js → App-08e717a8.js} +2 -2
- package/dist/cjs/{Notice-9120d311.js → Notice-2496bc28.js} +2 -2
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/smoothly-accordion_48.cjs.entry.js +34 -22
- package/dist/cjs/smoothly-app-demo.cjs.entry.js +3 -3
- package/dist/cjs/smoothly-app.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-display-demo.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-menu-options.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-option.cjs.entry.js +3 -2
- package/dist/cjs/smoothly-picker.cjs.entry.js +17 -11
- package/dist/cjs/smoothly-spinner.cjs.entry.js +7 -2
- package/dist/cjs/smoothly.cjs.js +1 -1
- package/dist/collection/components/App.js +2 -2
- package/dist/collection/components/app/style.css +111 -41
- package/dist/collection/components/app-demo/index.js +17 -17
- package/dist/collection/components/display-demo/index.js +10 -1
- package/dist/collection/components/menu-options/index.js +1 -1
- package/dist/collection/components/menu-options/style.css +10 -2
- package/dist/collection/components/option/index.js +23 -2
- package/dist/collection/components/option/style.css +33 -10
- package/dist/collection/components/picker/index.js +40 -12
- package/dist/collection/components/picker/style.css +46 -15
- package/dist/collection/components/spinner/index.js +30 -3
- package/dist/collection/components/spinner/style.css +48 -60
- package/dist/custom-elements/index.js +38 -26
- package/dist/{smoothly/App-c5f6000f.js → esm/App-33847333.js} +2 -2
- package/dist/esm/{Notice-d87d90f7.js → Notice-819c6f49.js} +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/smoothly-accordion_48.entry.js +34 -22
- package/dist/esm/smoothly-app-demo.entry.js +3 -3
- package/dist/esm/smoothly-app.entry.js +1 -1
- package/dist/esm/smoothly-display-demo.entry.js +1 -1
- package/dist/esm/smoothly-menu-options.entry.js +2 -2
- package/dist/esm/smoothly-option.entry.js +3 -2
- package/dist/esm/smoothly-picker.entry.js +17 -11
- package/dist/esm/smoothly-spinner.entry.js +8 -3
- package/dist/esm/smoothly.js +1 -1
- package/dist/{esm/App-c5f6000f.js → smoothly/App-33847333.js} +2 -2
- package/dist/smoothly/index.esm.js +1 -1
- package/dist/smoothly/{p-1e768876.js → p-14c6de14.js} +1 -1
- package/dist/smoothly/p-e14898a9.entry.js +1 -0
- package/dist/smoothly/smoothly-app-demo.entry.js +3 -3
- package/dist/smoothly/smoothly-app.entry.js +1 -1
- package/dist/smoothly/smoothly-display-demo.entry.js +1 -1
- package/dist/smoothly/smoothly-menu-options.entry.js +2 -2
- package/dist/smoothly/smoothly-option.entry.js +3 -2
- package/dist/smoothly/smoothly-picker.entry.js +17 -11
- package/dist/smoothly/smoothly-spinner.entry.js +8 -3
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/components/option/index.d.ts +1 -0
- package/dist/types/components/picker/index.d.ts +3 -2
- package/dist/types/components/spinner/index.d.ts +1 -0
- package/dist/types/components.d.ts +6 -0
- package/dist/types/model/OptionType.d.ts +1 -0
- package/package.json +1 -1
- package/dist/smoothly/p-d4139486.entry.js +0 -1
|
@@ -593,7 +593,6 @@ const App = (attributes, nodes, utils) => {
|
|
|
593
593
|
index.h("header", null,
|
|
594
594
|
index.h("h1", null,
|
|
595
595
|
index.h("a", Object.assign({}, href((_a = resolve("")) !== null && _a !== void 0 ? _a : "/")), attributes.label)),
|
|
596
|
-
children.filter(child => { var _a; return ((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.slot) == "header"; }).map(child => child.node),
|
|
597
596
|
index.h("nav", null,
|
|
598
597
|
index.h("ul", null, utils
|
|
599
598
|
.map([
|
|
@@ -626,7 +625,8 @@ const App = (attributes, nodes, utils) => {
|
|
|
626
625
|
const child = nodeToChild(node);
|
|
627
626
|
return child.vtag == "a" && !((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.target) ? (index.h("a", Object.assign({}, child.vattrs, href((_b = child.vattrs) === null || _b === void 0 ? void 0 : _b.href)), child.vchildren)) : (node);
|
|
628
627
|
})
|
|
629
|
-
.map(child => (index.h("li", null, child)))))
|
|
628
|
+
.map(child => (index.h("li", null, child))))),
|
|
629
|
+
children.filter(child => { var _a; return ((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.slot) == "header"; }).map(child => child.node)),
|
|
630
630
|
index.h("content", null,
|
|
631
631
|
index.h(Router.Switch, null, children
|
|
632
632
|
.filter(child => { var _a; return ((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.path) != undefined; })
|
|
@@ -334,7 +334,6 @@ const App = (attributes, nodes, utils) => {
|
|
|
334
334
|
index.h("header", null,
|
|
335
335
|
index.h("h1", null,
|
|
336
336
|
index.h("a", Object.assign({}, href((_a = resolve("")) !== null && _a !== void 0 ? _a : "/")), attributes.label)),
|
|
337
|
-
children.filter(child => { var _a; return ((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.slot) == "header"; }).map(child => child.node),
|
|
338
337
|
index.h("nav", null,
|
|
339
338
|
index.h("ul", null, utils
|
|
340
339
|
.map([
|
|
@@ -367,7 +366,8 @@ const App = (attributes, nodes, utils) => {
|
|
|
367
366
|
const child = nodeToChild(node);
|
|
368
367
|
return child.vtag == "a" && !((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.target) ? (index.h("a", Object.assign({}, child.vattrs, href((_b = child.vattrs) === null || _b === void 0 ? void 0 : _b.href)), child.vchildren)) : (node);
|
|
369
368
|
})
|
|
370
|
-
.map(child => (index.h("li", null, child)))))
|
|
369
|
+
.map(child => (index.h("li", null, child))))),
|
|
370
|
+
children.filter(child => { var _a; return ((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.slot) == "header"; }).map(child => child.node)),
|
|
371
371
|
index.h("content", null,
|
|
372
372
|
index.h(Router.Switch, null, children
|
|
373
373
|
.filter(child => { var _a; return ((_a = child.vattrs) === null || _a === void 0 ? void 0 : _a.path) != undefined; })
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const App = require('./App-
|
|
5
|
+
const App = require('./App-08e717a8.js');
|
|
6
6
|
const index = require('./index-40d009d5.js');
|
|
7
7
|
const GoogleFont = require('./GoogleFont-6c4f0da1.js');
|
|
8
8
|
require('./index-138c41c2.js');
|
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-
|
|
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-display-demo.cjs",[[0,"smoothly-display-demo"]]],["smoothly-table-demo.cjs",[[2,"smoothly-table-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"],"selectionName":[1025,"selection-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-tuple.cjs",[[0,"smoothly-tuple",{"tuple":[16]}]]],["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-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-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-option.cjs",[[1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537],"divider":[1540]}]]],["smoothly-spinner.cjs",[[2,"smoothly-spinner",{"active":[516],"size":[513]}]]],["smoothly-selector.cjs",[[6,"smoothly-selector",{"opened":[32],"selectedElement":[32],"missing":[32],"filter":[32]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]]]],["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
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-41a36ce2.js');
|
|
6
|
-
const Notice = require('./Notice-
|
|
6
|
+
const Notice = require('./Notice-2496bc28.js');
|
|
7
7
|
const Trigger = require('./Trigger-74bd1ee8.js');
|
|
8
8
|
require('./GoogleFont-6c4f0da1.js');
|
|
9
9
|
|
|
@@ -102,7 +102,7 @@ let SmoothlyAccordionItem = class {
|
|
|
102
102
|
};
|
|
103
103
|
SmoothlyAccordionItem.style = styleCss$D;
|
|
104
104
|
|
|
105
|
-
const styleCss$C = "smoothly-app{display:block;scrollbar-width:none}smoothly-app[hidden]{display:none}smoothly-app[color=default],smoothly-app:not([color]){--smoothly-app-background:var(--smoothly-default-
|
|
105
|
+
const styleCss$C = "smoothly-app{display:block;scrollbar-width:none}smoothly-app[hidden]{display:none}smoothly-app[color=default],smoothly-app:not([color]){--smoothly-app-background:var(--smoothly-default-color);--smoothly-app-color:var(--smoothly-default-contrast);--smoothly-app-hover-background:var(--smoothly-primary-color);--smoothly-app-hover-color:var(--smoothly-primary-contrast);--smoothly-app-shadow:var(--smoothly-default-shadow)}smoothly-app[color=primary]{--smoothly-app-background:var(--smoothly-primary-shade);--smoothly-app-color:var(--smoothly-primary-contrast);--smoothly-app-hover-background:var(--smoothly-secondary-color);--smoothly-app-hover-color:var(--smoothly-secondary-contrast);--smoothly-app-shadow:var(--smoothly-primary-shadow)}smoothly-app[color=secondary]{--smoothly-app-background:var(--smoothly-secondary-shade);--smoothly-app-color:var(--smoothly-secondary-contrast);--smoothly-app-hover-background:var(--smoothly-primary-color);--smoothly-app-hover-color:var(--smoothly-primary-contrast);--smoothly-app-shadow:var(--smoothly-secondary-shadow)}smoothly-app[color=tertiary],smoothly-app[color=success],smoothly-app[color=warning],smoothly-app[color=danger]{--smoothly-app-background:var(--smoothly-color-shade);--smoothly-app-color:var(--smoothly-color-contrast);--smoothly-app-hover-background:var(--smoothly-default-shade);--smoothly-app-hover-color:var(--smoothly-default-contrast);--smoothly-app-shadow:var(--smoothly-color-shadow)}smoothly-app>smoothly-notifier>header{position:fixed;top:0;left:0;width:100%;z-index:5;height:90px;background-color:rgb(var(--smoothly-app-background));color:rgba(var(--smoothly-medium-color));fill:rgb(var(--smoothly-medium-color));stroke:rgb(var(--smoothly-medium-color));display:flex;font-size:18px;justify-content:space-between;align-items:center;box-shadow:0 2px 5px 0 rgba(var(--smoothly-app-shadow));border-bottom:1px solid rgba(var(--smoothly-dark-color))}smoothly-app>smoothly-notifier>header a{color:inherit;text-decoration:inherit}smoothly-app>smoothly-notifier>header>nav{flex-shrink:0;width:100%;flex-shrink:2}smoothly-app>smoothly-notifier>header>h1,smoothly-app>smoothly-notifier>header>nav,smoothly-app>smoothly-notifier>header>nav>ul,smoothly-app>smoothly-notifier>header>nav>ul>li,smoothly-app>smoothly-notifier>header>nav>ul>li>*:not(a){display:flex;height:100%;margin:0}smoothly-app>smoothly-notifier>header>h1{margin-left:60px}smoothly-app>smoothly-notifier>header>h1>a{overflow:hidden;user-select:none;height:200%;display:flex;align-self:center;size:100%;background-position-y:center}smoothly-app>smoothly-notifier>header>nav>ul>li a{line-height:1.6cm}smoothly-app>smoothly-notifier>header>nav>ul{width:100%}smoothly-app>smoothly-notifier>header>[slot=\"header\"]{display:flex;margin-right:34.25px;justify-content:flex-end;border:0}smoothly-app>smoothly-notifier>header>[slot=\"header\"]>a{display:flex;align-self:center;border-width:0;align-items:center;margin-right:62.25px}smoothly-app>smoothly-notifier>header>[slot=\"header\"]>a>smoothly-icon{fill:rgb(var(--smoothly-primary-shade));stroke:rgb(var(--smoothly-primary-shade));color:rgb(var(--smoothly-primary-shade))}smoothly-app>smoothly-notifier>header>nav>ul>li a{display:flex;height:36px;margin:0 0.4cm;text-decoration:none}smoothly-app>smoothly-notifier>header>nav>ul>li>a{display:flex;align-items:center;align-self:center;margin-bottom:2px}smoothly-app>smoothly-notifier>header>nav>ul>li smoothly-trigger.sc-smoothly-trigger-h{border:0}smoothly-app>smoothly-notifier>header>nav>ul>li>a>smoothly-icon>svg{fill:rgb(var(--smoothly-medium-color));stroke:rgb(var(--smoothly-medium-color));color:rgb(var(--smoothly-medium-color));align-items:center;display:flex}smoothly-app>smoothly-notifier>header>nav>ul>li>a:hover>smoothly-icon>svg,smoothly-app>smoothly-notifier>header>nav>ul>li>a.active>smoothly-icon>svg{color:rgb(var(--smoothly-app-color));stroke:rgb(var(--smoothly-app-color));fill:rgb(var(--smoothly-app-color))}smoothly-app>smoothly-notifier>header>nav>ul>li>smoothly-trigger.active a>smoothly-icon,smoothly-app>smoothly-notifier>header>nav>ul>li>smoothly-trigger:hover a>smoothly-icon,smoothly-app>smoothly-notifier>header>nav>ul>li a:hover,smoothly-app>smoothly-notifier>header>nav>ul>li a.active{border-bottom:2px solid rgb(var(--smoothly-app-color));margin-bottom:0px;border-bottom-width:2px;color:rgb(var(--smoothly-app-color));stroke:rgb(var(--smoothly-app-color));fill:rgb(var(--smoothly-app-color))}smoothly-app>smoothly-notifier>content{position:relative;top:90px}";
|
|
106
106
|
|
|
107
107
|
let SmoothlyApp = class {
|
|
108
108
|
constructor(hostRef) {
|
|
@@ -119,7 +119,7 @@ let SmoothlyAppDemo = class {
|
|
|
119
119
|
index.registerInstance(this, hostRef);
|
|
120
120
|
}
|
|
121
121
|
render() {
|
|
122
|
-
return (index.h(Notice.App, { label: "Smoothly Demo" }, index.h("a", { slot: "nav-start", href: "display" }, "Display"), index.h("a", { slot: "nav-start", href: "https://google.com" }, "External"), index.h("span", { slot: "header", style: { width: "100%", maxWidth: "500px" } }, index.h("smoothly-picker", { label: "All Animals Selected", style: { minWidth: "100px" }, labelSetting: "hide", "empty-menu-label": "Sorry, we're out of options.", "max-height": "58px", multiple: true, "select-none-name": "Select All", options: [
|
|
122
|
+
return (index.h(Notice.App, { label: "Smoothly Demo" }, index.h("a", { slot: "nav-start", href: "display" }, "Display"), index.h("a", { slot: "nav-start", href: "https://google.com" }, "External"), index.h("smoothly-room", { path: "" }, index.h("smoothly-input", { type: "text" }, "Default")), index.h("smoothly-room", { path: "input", label: "Input" }, index.h("smoothly-input-demo", null)), index.h("smoothly-room", { path: "dialog", label: "Dialog" }, index.h("smoothly-dialog-demo", null)), index.h("smoothly-room", { path: "display", label: "Display", icon: "eye-outline" }, index.h("smoothly-display-demo", null)), index.h("smoothly-room", { path: "table", label: "Table" }, index.h("smoothly-table-demo", null)), index.h("smoothly-room", { path: "select", label: "Select" }, index.h("smoothly-select-demo", null)), index.h("smoothly-room", { path: "icon", label: "Icon" }, index.h("smoothly-icon-demo", null)), index.h("smoothly-room", { path: "old", label: "Old", to: "select" }), index.h("span", { slot: "header", style: { width: "100%", maxWidth: "500px" } }, index.h("smoothly-picker", { label: "All Animals Selected", style: { minWidth: "100px" }, labelSetting: "hide", "empty-menu-label": "Sorry, we're out of options.", "max-height": "58px", multiple: true, "select-none-name": "Select All", options: [
|
|
123
123
|
{ name: "Big Dog", value: "dog", aliases: ["WOFF"] },
|
|
124
124
|
{ name: "Cat Stevens", value: "cat", aliases: ["moew"] },
|
|
125
125
|
{ name: "Noble Pig", value: "pig" },
|
|
@@ -131,7 +131,7 @@ let SmoothlyAppDemo = class {
|
|
|
131
131
|
{ name: "Talking Parrot Parrot", value: "parrot" },
|
|
132
132
|
{ name: "Hidden Dragon", value: "dragon" },
|
|
133
133
|
{ name: "Scary Kraken", value: "kraken" },
|
|
134
|
-
] })), index.h("smoothly-trigger", { slot: "
|
|
134
|
+
] })), index.h("smoothly-trigger", { slot: "header", type: "link", name: "logout" }, index.h("smoothly-icon", { toolTip: "Log out", name: "log-out", size: "medium" }))));
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
137
|
|
|
@@ -39100,7 +39100,7 @@ let SmoothlyDisplayDemo = class {
|
|
|
39100
39100
|
}
|
|
39101
39101
|
render() {
|
|
39102
39102
|
return [
|
|
39103
|
-
index.h("main", null, index.h("smoothly-popup", null, index.h("div", null, "Popup, click me"), index.h("div", { color: "dark", slot: "popup" }, "1 line popup")), index.h("smoothly-display-date-time", { datetime: "2019-08-15T08:08:17.65Z" }), index.h("dl", null, index.h("dt", null, "text"), index.h("dd", null, index.h("smoothly-display", { type: "text", value: "text" })), index.h("dt", null, "postal code"), index.h("dd", null, index.h("smoothly-display", { type: "postal-code", value: "752 31" })), index.h("dt", null, "password"), index.h("dd", null, index.h("smoothly-display", { type: "password", value: "password" })), index.h("dt", null, "email"), index.h("dd", null, index.h("smoothly-display", { type: "email", value: "test@example.com" })), index.h("dt", null, "price"), index.h("dd", null, index.h("smoothly-display", { type: "price", value: "13.37", currency: "SEK" })), index.h("dt", null, "percent"), index.h("dd", null, index.h("smoothly-display", { type: "percent", value: "42" })), index.h("dt", null, "phone"), index.h("dd", null, index.h("smoothly-display", { type: "phone", value: "0101881108" })), index.h("dt", null, "card number"), index.h("dd", null, index.h("smoothly-display", { type: "card-number", value: "4111111111111111" })), index.h("dt", null, "card expires"), index.h("dd", null, index.h("smoothly-display", { type: "card-expires", value: "7/22" })), index.h("dt", null, "card csc"), index.h("dd", null, index.h("smoothly-display", { type: "card-csc", value: "987" })), index.h("dt", null, "Quiet"), index.h("dd", null, index.h("smoothly-quiet", { color: "dark" }, "-"))), index.h("smoothly-urlencoded", { data: "hej=hopp&tjena=moss" }), index.h("div", { style: { display: "flex", justifyContent: "space-between" } }, index.h("smoothly-popup", { direction: "down" }, "Click for popup", index.h("span", { slot: "popup", color: "dark", style: { whiteSpace: "nowrap" } }, "Some popup stuff that has a lot of text")), index.h("smoothly-popup", { direction: "down" }, "Click for popup", index.h("span", { slot: "popup", color: "dark", style: { whiteSpace: "nowrap" } }, "Some popup with a bunch of text."))), index.h("p", null, "Test of diffrent kinds of notifier:"), index.h("button", { onClick: () => this.noticeWarning(Notice.Notice.warn("This is a test warning notice.")) }, "warning"), index.h("button", { onClick: () => this.noticeWarning(Notice.Notice.succeded("This is a test success notice.")) }, "success"), index.h("button", { onClick: () => this.noticeWarning(Notice.Notice.failed("This is a test danger notice.")) }, "danger"), index.h("button", { onClick: () => this.noticeWarning(Notice.Notice.execute("This is a test execute notice.", () => new Promise(resolve => window.setTimeout(() => resolve([true, "This went great"]), 3000)))) }, "execute"), index.h("button", { onClick: () => this.noticeWarning(Notice.Notice.delay("This is a test delay notice.", () => new Promise(resolve => window.setTimeout(() => resolve([true, "This went great"]), 3000)))) }, "delay")),
|
|
39103
|
+
index.h("main", null, index.h("smoothly-popup", null, index.h("div", null, "Popup, click me"), index.h("div", { color: "dark", slot: "popup" }, "1 line popup")), index.h("smoothly-display-date-time", { datetime: "2019-08-15T08:08:17.65Z" }), index.h("dl", null, index.h("dt", null, "text"), index.h("dd", null, index.h("smoothly-display", { type: "text", value: "text" })), index.h("dt", null, "postal code"), index.h("dd", null, index.h("smoothly-display", { type: "postal-code", value: "752 31" })), index.h("dt", null, "password"), index.h("dd", null, index.h("smoothly-display", { type: "password", value: "password" })), index.h("dt", null, "email"), index.h("dd", null, index.h("smoothly-display", { type: "email", value: "test@example.com" })), index.h("dt", null, "price"), index.h("dd", null, index.h("smoothly-display", { type: "price", value: "13.37", currency: "SEK" })), index.h("dt", null, "percent"), index.h("dd", null, index.h("smoothly-display", { type: "percent", value: "42" })), index.h("dt", null, "phone"), index.h("dd", null, index.h("smoothly-display", { type: "phone", value: "0101881108" })), index.h("dt", null, "card number"), index.h("dd", null, index.h("smoothly-display", { type: "card-number", value: "4111111111111111" })), index.h("dt", null, "card expires"), index.h("dd", null, index.h("smoothly-display", { type: "card-expires", value: "7/22" })), index.h("dt", null, "card csc"), index.h("dd", null, index.h("smoothly-display", { type: "card-csc", value: "987" })), index.h("dt", null, "Quiet"), index.h("dd", null, index.h("smoothly-quiet", { color: "dark" }, "-"))), index.h("smoothly-urlencoded", { data: "hej=hopp&tjena=moss" }), index.h("div", { style: { display: "flex", justifyContent: "space-between" } }, index.h("smoothly-popup", { direction: "down" }, "Click for popup", index.h("span", { slot: "popup", color: "dark", style: { whiteSpace: "nowrap" } }, "Some popup stuff that has a lot of text")), index.h("smoothly-popup", { direction: "down" }, "Click for popup", index.h("span", { slot: "popup", color: "dark", style: { whiteSpace: "nowrap" } }, "Some popup with a bunch of text."))), index.h("p", null, "Test of diffrent kinds of notifier:"), index.h("button", { onClick: () => this.noticeWarning(Notice.Notice.warn("This is a test warning notice.")) }, "warning"), index.h("button", { onClick: () => this.noticeWarning(Notice.Notice.succeded("This is a test success notice.")) }, "success"), index.h("button", { onClick: () => this.noticeWarning(Notice.Notice.failed("This is a test danger notice.")) }, "danger"), index.h("button", { onClick: () => this.noticeWarning(Notice.Notice.execute("This is a test execute notice.", () => new Promise(resolve => window.setTimeout(() => resolve([true, "This went great"]), 3000)))) }, "execute"), index.h("button", { onClick: () => this.noticeWarning(Notice.Notice.delay("This is a test delay notice.", () => new Promise(resolve => window.setTimeout(() => resolve([true, "This went great"]), 3000)))) }, "delay"), index.h("div", { style: { position: "relative", height: "10em" } }, "Large Spinner", index.h("smoothly-spinner", { active: true, size: "large", style: { "--background-color": "255,255,255", "--background-opacity": "0.2", "--spinner-color": "0,130,0", } })), index.h("div", { style: { position: "relative", height: "10em" } }, "Medium Spinner", index.h("smoothly-spinner", { active: true, size: "medium" })), index.h("div", { style: { position: "relative", height: "10em" } }, "Small Spinner", index.h("smoothly-spinner", { active: true, size: "small" }))),
|
|
39104
39104
|
];
|
|
39105
39105
|
}
|
|
39106
39106
|
};
|
|
@@ -40018,7 +40018,7 @@ let Item = class {
|
|
|
40018
40018
|
};
|
|
40019
40019
|
Item.style = styleCss$n;
|
|
40020
40020
|
|
|
40021
|
-
const styleCss$m = ":host{max-height:300px;width:85%;max-height:var(--max-menu-height);
|
|
40021
|
+
const styleCss$m = ":host{max-height:300px;width:85%;max-height:var(--max-menu-height);box-sizing:border-box;background-color:rgb(var(--smoothly-default-color));border-radius:0.25em;color:rgb(var(--smoothly-primary-color));stroke:rgb(var(--smoothly-primary-color));fill:rgb(var(--smoothly-primary-color));box-shadow:0px 2px 24px rgba(64, 60, 57, 0.08), inset 0px 0px 1px rgba(64, 60, 57, 0.4);overflow-y:auto;cursor:pointer}div:last-child:not(:empty){padding:0.5em 1em;font-style:italic}:host:first-child{margin:10em}";
|
|
40022
40022
|
|
|
40023
40023
|
let SmoothlyMenuOptions = class {
|
|
40024
40024
|
constructor(hostRef) {
|
|
@@ -40110,7 +40110,7 @@ let SmoothlyMenuOptions = class {
|
|
|
40110
40110
|
}
|
|
40111
40111
|
}
|
|
40112
40112
|
render() {
|
|
40113
|
-
return (index.h(index.Host, { style: { "--max-menu-height": this.maxMenuHeight } }, this.filteredOptions.length > 0 ? (this.filteredOptions.map((option, index$1) => (index.h("smoothly-option", { style: this.optionStyle, ref: el => index$1 == 0 && (this.firstOptionsElement = el !== null && el !== void 0 ? el : this.firstOptionsElement), value: option.value, name: option.name, "data-highlight": this.highlightIndex == index$1 }, option.description)))) : (index.h("div", null, this.emptyMenuLabel))));
|
|
40113
|
+
return (index.h(index.Host, { style: { "--max-menu-height": this.maxMenuHeight } }, this.filteredOptions.length > 0 ? (this.filteredOptions.map((option, index$1) => (index.h("smoothly-option", { style: this.optionStyle, ref: el => index$1 == 0 && (this.firstOptionsElement = el !== null && el !== void 0 ? el : this.firstOptionsElement), value: option.value, name: option.name, divider: option.divider, "data-highlight": this.highlightIndex == index$1 }, option.description)))) : (index.h("div", null, this.emptyMenuLabel))));
|
|
40114
40114
|
}
|
|
40115
40115
|
get element() { return index.getElement(this); }
|
|
40116
40116
|
static get watchers() { return {
|
|
@@ -40201,7 +40201,7 @@ let Notifier = class {
|
|
|
40201
40201
|
};
|
|
40202
40202
|
Notifier.style = styleCss$k;
|
|
40203
40203
|
|
|
40204
|
-
const styleCss$j = ":host{display:flex;flex-direction:row;align-items:center;justify-content:
|
|
40204
|
+
const styleCss$j = ":host{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:0.7em 1em;margin-left:1px;margin-right:1px;background-color:transparent;position:relative}:host([data-highlight]){background-color:rgb(var(--smoothly-default-shade))}:host>div.middle{padding-left:0.5em;flex-shrink:1;width:100%}:host div:last-child :host div:first-child{color:rgba(var(--smoothly-primary-color), 0.8);font-style:italic}:host([divider]){margin-bottom:0.5em}:host>div[slot=right]{margin-right:100%;color:rgba(var(--smoothly-primary-color), 0.8)}:host([divider])::after{position:absolute;height:1px;width:100%;left:0;bottom:-0.25em;content:\"\";background-color:rgba(var(--smoothly-dark-color))}";
|
|
40205
40205
|
|
|
40206
40206
|
let SmoothlyOption = class {
|
|
40207
40207
|
constructor(hostRef) {
|
|
@@ -40209,6 +40209,7 @@ let SmoothlyOption = class {
|
|
|
40209
40209
|
this.optionHover = index.createEvent(this, "optionHover", 7);
|
|
40210
40210
|
this.optionSelect = index.createEvent(this, "optionSelect", 7);
|
|
40211
40211
|
this.dataHighlight = false;
|
|
40212
|
+
this.divider = false;
|
|
40212
40213
|
}
|
|
40213
40214
|
onHover(event) {
|
|
40214
40215
|
this.optionHover.emit({ name: this.name, value: this.value });
|
|
@@ -40220,13 +40221,13 @@ let SmoothlyOption = class {
|
|
|
40220
40221
|
throw `smoothly-option ${this.element.innerHTML} lacks value-property and can therefore not be selected`;
|
|
40221
40222
|
}
|
|
40222
40223
|
render() {
|
|
40223
|
-
return (index.h(index.Host, { onMouseDown: (e) => this.onSelect(e), onMouseOver: (e) => this.onHover(e) }, index.h("div", null, this.name), index.h("div", null, index.h("slot",
|
|
40224
|
+
return (index.h(index.Host, { onMouseDown: (e) => this.onSelect(e), onMouseOver: (e) => this.onHover(e) }, index.h("div", null, index.h("slot", { name: "left" })), index.h("div", { class: "middle" }, this.name), index.h("div", null, index.h("slot", { name: "right" }))));
|
|
40224
40225
|
}
|
|
40225
40226
|
get element() { return index.getElement(this); }
|
|
40226
40227
|
};
|
|
40227
40228
|
SmoothlyOption.style = styleCss$j;
|
|
40228
40229
|
|
|
40229
|
-
const styleCss$i = ":host{--background-color:var(--smoothly-
|
|
40230
|
+
const styleCss$i = ":host{--background-color:var(--smoothly-default-color), 1;--color:var(--smoothly-secondary-contrast);--border-color:var(--smoothly-default-shade), 1;--border-highlight-color:var(--smoothly-secondary-contrast), 1;--label-color:var(--smoothly-secondary-contrast), 0.8;--selected-item-border-radius:0.25rem;--selected-item-background-color:var(--smoothly-secondary-color), 1;--selected-item-color:255, 255, 255, 1}:host{display:block;position:relative;background-color:rgba(var(--background-color));width:100%;cursor:pointer;--intergiro-transition:border-color 200ms cubic-bezier(0.645, 0.045, 0.355, 1);transition:var(--intergiro-transition);border:1px solid rgb(var(--border-color));margin:1px;height:40px;border-radius:0.25rem}:host(:focus-within){border-color:rgb(var(--smoothly-primary-shade));border-width:2px;margin:0px}:host>div{display:flex;background-color:transparent;min-height:40px;align-items:center;align-self:center;border:none;max-height:var(--max-height)}:host>div .icons>smoothly-icon{flex-shrink:0;padding-left:0.6em;stroke:rgba(var(--color), 0.4);fill:rgba(var(--color), 0.4);width:1.5em !important;height:1.5em !important}:host>div .icons>smoothly-icon:hover{fill:rgba(var(--color), 1)}:host>div input{width:100%;background-color:transparent;outline:none;border:none;cursor:pointer;color:rgb(var(--color));padding:0 0.6em;font-family:var(--smoothly-font-family);font-size:1.05em}:host>div input::placeholder{opacity:1;text-overflow:ellipsis}:host([is-open])>div input{color:rgb(var(--smoothly-medium-color))}:host(:not(:focus-within)[multiple]) ul>li:last-child{position:absolute;pointer-events:none}:host([label=\"\"]) ul,:host:not([label]) ul,:host([label-setting=hide]) ul{padding-top:0.1em;padding-bottom:0.1em}label{padding-left:0.6em;white-space:nowrap;color:rgba(var(--label-color));transition:var(--intergiro-transition);font-family:var(--smoothly-font-family);pointer-events:none;transform-origin:left}:host([has-selection]) label{display:var(--label-display)}:host([has-selection]) label,:host(:focus-within) label{display:none}:host(:hover) smoothly-icon[data-arrow],:host(:focus-within) smoothly-icon[data-arrow]{stroke:rgba(var(--color), 1)}:host smoothly-icon[data-arrow]{pointer-events:none}:host smoothly-icon{flex-shrink:0;width:1em;height:1em}:host(:not([is-open])) smoothly-icon.up,:host([is-open]) smoothly-icon.down{display:none}smoothly-icon.search{display:flex;align-self:center;padding-left:0.8em}smoothly-icon.up,smoothly-icon.down{display:flex;align-self:center;padding-right:0.8em;stroke:rgb(var(--smoothly-primary-shade))}:host smoothly-menu-options{margin-top:0.5em;padding-top:0.5em;padding-bottom:0.5em;position:absolute;z-index:1}:host(:not([is-open]))>smoothly-menu-options{display:none}";
|
|
40230
40231
|
|
|
40231
40232
|
let SmoothlyPicker = class {
|
|
40232
40233
|
constructor(hostRef) {
|
|
@@ -40235,8 +40236,10 @@ let SmoothlyPicker = class {
|
|
|
40235
40236
|
this.keepFocusOnReRender = false;
|
|
40236
40237
|
this.emptyMenuLabel = "No Options";
|
|
40237
40238
|
this.multiple = false;
|
|
40239
|
+
this.options = [];
|
|
40238
40240
|
this.selections = [];
|
|
40239
40241
|
this.selectNoneName = "Select None";
|
|
40242
|
+
this.selectionName = "items selected";
|
|
40240
40243
|
}
|
|
40241
40244
|
isOpenChangeHander() {
|
|
40242
40245
|
if (this.isOpen == false) {
|
|
@@ -40256,13 +40259,14 @@ let SmoothlyPicker = class {
|
|
|
40256
40259
|
}
|
|
40257
40260
|
toggle(option) {
|
|
40258
40261
|
option.value == "select-none"
|
|
40259
|
-
? this.
|
|
40262
|
+
? this.toggleAll()
|
|
40260
40263
|
: this.selections.map(s => s.value).includes(option.value)
|
|
40261
40264
|
? this.unselect(option)
|
|
40262
40265
|
: this.select(option);
|
|
40263
40266
|
}
|
|
40264
|
-
|
|
40265
|
-
|
|
40267
|
+
toggleAll() {
|
|
40268
|
+
var _a;
|
|
40269
|
+
this.selections = this.selections.length == ((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) ? [] : this.options;
|
|
40266
40270
|
this.inputElement.focus();
|
|
40267
40271
|
this.keepFocusOnReRender = true;
|
|
40268
40272
|
}
|
|
@@ -40334,27 +40338,30 @@ let SmoothlyPicker = class {
|
|
|
40334
40338
|
this.isOpen = false;
|
|
40335
40339
|
this.filterOptions();
|
|
40336
40340
|
}
|
|
40337
|
-
getCheckHtml() {
|
|
40338
|
-
return index.h("smoothly-icon", { name: "
|
|
40341
|
+
getCheckHtml(checked) {
|
|
40342
|
+
return checked ? (index.h("smoothly-icon", { slot: "left", name: "checkbox", size: "small" })) : (index.h("smoothly-icon", { slot: "left", name: "square-outline", size: "small" }));
|
|
40339
40343
|
}
|
|
40340
40344
|
render() {
|
|
40341
|
-
var _a, _b, _c;
|
|
40345
|
+
var _a, _b, _c, _d;
|
|
40342
40346
|
const cssVariables = {
|
|
40343
40347
|
"--max-height": (_a = this.maxHeight) !== null && _a !== void 0 ? _a : "inherit",
|
|
40344
40348
|
"--label-display": this.labelSetting == "hide" ? "none" : "absolute",
|
|
40345
40349
|
};
|
|
40346
40350
|
(_b = this.options) === null || _b === void 0 ? void 0 : _b.forEach(o => {
|
|
40347
|
-
o.description = this.selections.map(s => s.value).includes(o.value)
|
|
40351
|
+
o.description = this.getCheckHtml(this.selections.map(s => s.value).includes(o.value));
|
|
40348
40352
|
});
|
|
40349
40353
|
const options = [
|
|
40350
40354
|
{
|
|
40351
40355
|
value: "select-none",
|
|
40352
40356
|
name: this.selectNoneName,
|
|
40353
|
-
description: this.selections.length ==
|
|
40357
|
+
description: this.getCheckHtml(this.selections.length == ((_c = this.options) === null || _c === void 0 ? void 0 : _c.length)),
|
|
40358
|
+
divider: true,
|
|
40354
40359
|
},
|
|
40355
|
-
...((
|
|
40360
|
+
...((_d = this.options) !== null && _d !== void 0 ? _d : []),
|
|
40356
40361
|
];
|
|
40357
|
-
return (index.h(index.Host, { style: cssVariables, "has-selection": this.selections.length > 0, "is-open": this.isOpen ? "" : undefined, onMouseDown: (e) => e.preventDefault(), onClick: () => this.onClick() }, index.h("div", null, index.h("label", null, this.label), index.h("input", { type: "text", ref: (el) => (this.inputElement = el ? el : this.inputElement), onFocus: () => this.highlightDefault(), onBlur: () => this.onBlur(), placeholder: this.selections.
|
|
40362
|
+
return (index.h(index.Host, { style: cssVariables, "has-selection": this.selections.length > 0, "is-open": this.isOpen ? "" : undefined, onMouseDown: (e) => e.preventDefault(), onClick: () => this.onClick() }, index.h("div", null, index.h("smoothly-icon", { class: "search", name: "search-outline", size: "tiny" }), index.h("label", null, this.label), index.h("input", { type: "text", ref: (el) => (this.inputElement = el ? el : this.inputElement), onFocus: () => this.highlightDefault(), onBlur: () => this.onBlur(), placeholder: this.selections.length > 3
|
|
40363
|
+
? this.selections.length.toString() + " " + this.selectionName
|
|
40364
|
+
: this.selections.map(selection => selection.name).join(", "), onKeyDown: e => this.onKeyDown(e), onInput: (e) => this.onInput(e) }), index.h("smoothly-icon", { class: "down", name: "chevron-down", size: "tiny" }), index.h("smoothly-icon", { class: "up", name: "chevron-up", size: "tiny" })), index.h("smoothly-menu-options", { style: { width: "100%" }, optionStyle: Object.assign({}, this.optionStyle), order: false, emptyMenuLabel: this.emptyMenuLabel, "max-menu-height": this.maxMenuHeight, ref: (el) => (this.menuElement = el !== null && el !== void 0 ? el : this.menuElement), onClick: e => e.stopPropagation(), resetHighlightOnOptionsChange: false, options: options })));
|
|
40358
40365
|
}
|
|
40359
40366
|
get element() { return index.getElement(this); }
|
|
40360
40367
|
static get watchers() { return {
|
|
@@ -40652,14 +40659,19 @@ function isItem(value) {
|
|
|
40652
40659
|
}
|
|
40653
40660
|
Selector.style = styleCss$c;
|
|
40654
40661
|
|
|
40655
|
-
const styleCss$b = ".sc-smoothly-spinner-h{display:
|
|
40662
|
+
const styleCss$b = ".sc-smoothly-spinner-h:not([active]){display:none}[hidden].sc-smoothly-spinner-h{display:none}.sc-smoothly-spinner-h{display:block;stroke:rgb(var(--spinner-color, var(--smoothly-primary-tint)));position:absolute;inset:0;width:100%;height:100%;background-color:rgba(var(--background-color, var(--smoothly-default-color)), var(--background-opacity, var(--smoothly-semitransparent, 0.8)))}.sc-smoothly-spinner-h svg.sc-smoothly-spinner{position:absolute;left:calc(50% - var(--size) / 2);top:calc(50% - var(--size) / 2);width:var(--size);animation:SPIN-SVG 1.4s linear infinite}.sc-smoothly-spinner-h svg.sc-smoothly-spinner circle.sc-smoothly-spinner{transform-origin:center;animation:SPIN-CIRCLE 1.4s ease-in-out infinite;stroke-dasharray:187;stroke-dashoffset:0}@keyframes SPIN-SVG{0%{transform:rotate(0deg)}100%{transform:rotate(270deg)}}@keyframes SPIN-CIRCLE{0%{stroke-dashoffset:187}50%{stroke-dashoffset:46.75;transform:rotate(135deg)}100%{stroke-dashoffset:187;transform:rotate(450deg)}}";
|
|
40656
40663
|
|
|
40657
40664
|
let SmoothlySpinner = class {
|
|
40658
40665
|
constructor(hostRef) {
|
|
40659
40666
|
index.registerInstance(this, hostRef);
|
|
40667
|
+
this.size = "large";
|
|
40660
40668
|
}
|
|
40661
40669
|
render() {
|
|
40662
|
-
|
|
40670
|
+
const strokeWidth = this.size == "large" ? 6 : this.size == "medium" ? 8 : 12;
|
|
40671
|
+
return (index.h(index.Host, { style: {
|
|
40672
|
+
"--color": `var(--spinner-color)`,
|
|
40673
|
+
"--size": this.size == "large" ? "5em" : this.size == "medium" ? "3em" : "1.2em",
|
|
40674
|
+
} }, index.h("svg", { class: "spinner", viewBox: `0 0 ${60 + strokeWidth} ${60 + strokeWidth}`, xmlns: "http://www.w3.org/2000/svg" }, index.h("circle", { class: "path", fill: "none", "stroke-width": strokeWidth, "stroke-linecap": "round", cx: `${30 + strokeWidth / 2}`, cy: `${30 + strokeWidth / 2}`, r: "30" }))));
|
|
40663
40675
|
}
|
|
40664
40676
|
};
|
|
40665
40677
|
SmoothlySpinner.style = styleCss$b;
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-138c41c2.js');
|
|
6
|
-
const App = require('./App-
|
|
6
|
+
const App = require('./App-08e717a8.js');
|
|
7
7
|
|
|
8
8
|
let SmoothlyAppDemo = class {
|
|
9
9
|
constructor(hostRef) {
|
|
10
10
|
index.registerInstance(this, hostRef);
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (index.h(App.App, { label: "Smoothly Demo" }, index.h("a", { slot: "nav-start", href: "display" }, "Display"), index.h("a", { slot: "nav-start", href: "https://google.com" }, "External"), index.h("span", { slot: "header", style: { width: "100%", maxWidth: "500px" } }, index.h("smoothly-picker", { label: "All Animals Selected", style: { minWidth: "100px" }, labelSetting: "hide", "empty-menu-label": "Sorry, we're out of options.", "max-height": "58px", multiple: true, "select-none-name": "Select All", options: [
|
|
13
|
+
return (index.h(App.App, { label: "Smoothly Demo" }, index.h("a", { slot: "nav-start", href: "display" }, "Display"), index.h("a", { slot: "nav-start", href: "https://google.com" }, "External"), index.h("smoothly-room", { path: "" }, index.h("smoothly-input", { type: "text" }, "Default")), index.h("smoothly-room", { path: "input", label: "Input" }, index.h("smoothly-input-demo", null)), index.h("smoothly-room", { path: "dialog", label: "Dialog" }, index.h("smoothly-dialog-demo", null)), index.h("smoothly-room", { path: "display", label: "Display", icon: "eye-outline" }, index.h("smoothly-display-demo", null)), index.h("smoothly-room", { path: "table", label: "Table" }, index.h("smoothly-table-demo", null)), index.h("smoothly-room", { path: "select", label: "Select" }, index.h("smoothly-select-demo", null)), index.h("smoothly-room", { path: "icon", label: "Icon" }, index.h("smoothly-icon-demo", null)), index.h("smoothly-room", { path: "old", label: "Old", to: "select" }), index.h("span", { slot: "header", style: { width: "100%", maxWidth: "500px" } }, index.h("smoothly-picker", { label: "All Animals Selected", style: { minWidth: "100px" }, labelSetting: "hide", "empty-menu-label": "Sorry, we're out of options.", "max-height": "58px", multiple: true, "select-none-name": "Select All", options: [
|
|
14
14
|
{ name: "Big Dog", value: "dog", aliases: ["WOFF"] },
|
|
15
15
|
{ name: "Cat Stevens", value: "cat", aliases: ["moew"] },
|
|
16
16
|
{ name: "Noble Pig", value: "pig" },
|
|
@@ -22,7 +22,7 @@ let SmoothlyAppDemo = class {
|
|
|
22
22
|
{ name: "Talking Parrot Parrot", value: "parrot" },
|
|
23
23
|
{ name: "Hidden Dragon", value: "dragon" },
|
|
24
24
|
{ name: "Scary Kraken", value: "kraken" },
|
|
25
|
-
] })), index.h("smoothly-trigger", { slot: "
|
|
25
|
+
] })), index.h("smoothly-trigger", { slot: "header", type: "link", name: "logout" }, index.h("smoothly-icon", { toolTip: "Log out", name: "log-out", size: "medium" }))));
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
|
|
@@ -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 = "smoothly-app{display:block;scrollbar-width:none}smoothly-app[hidden]{display:none}smoothly-app[color=default],smoothly-app:not([color]){--smoothly-app-background:var(--smoothly-default-
|
|
7
|
+
const styleCss = "smoothly-app{display:block;scrollbar-width:none}smoothly-app[hidden]{display:none}smoothly-app[color=default],smoothly-app:not([color]){--smoothly-app-background:var(--smoothly-default-color);--smoothly-app-color:var(--smoothly-default-contrast);--smoothly-app-hover-background:var(--smoothly-primary-color);--smoothly-app-hover-color:var(--smoothly-primary-contrast);--smoothly-app-shadow:var(--smoothly-default-shadow)}smoothly-app[color=primary]{--smoothly-app-background:var(--smoothly-primary-shade);--smoothly-app-color:var(--smoothly-primary-contrast);--smoothly-app-hover-background:var(--smoothly-secondary-color);--smoothly-app-hover-color:var(--smoothly-secondary-contrast);--smoothly-app-shadow:var(--smoothly-primary-shadow)}smoothly-app[color=secondary]{--smoothly-app-background:var(--smoothly-secondary-shade);--smoothly-app-color:var(--smoothly-secondary-contrast);--smoothly-app-hover-background:var(--smoothly-primary-color);--smoothly-app-hover-color:var(--smoothly-primary-contrast);--smoothly-app-shadow:var(--smoothly-secondary-shadow)}smoothly-app[color=tertiary],smoothly-app[color=success],smoothly-app[color=warning],smoothly-app[color=danger]{--smoothly-app-background:var(--smoothly-color-shade);--smoothly-app-color:var(--smoothly-color-contrast);--smoothly-app-hover-background:var(--smoothly-default-shade);--smoothly-app-hover-color:var(--smoothly-default-contrast);--smoothly-app-shadow:var(--smoothly-color-shadow)}smoothly-app>smoothly-notifier>header{position:fixed;top:0;left:0;width:100%;z-index:5;height:90px;background-color:rgb(var(--smoothly-app-background));color:rgba(var(--smoothly-medium-color));fill:rgb(var(--smoothly-medium-color));stroke:rgb(var(--smoothly-medium-color));display:flex;font-size:18px;justify-content:space-between;align-items:center;box-shadow:0 2px 5px 0 rgba(var(--smoothly-app-shadow));border-bottom:1px solid rgba(var(--smoothly-dark-color))}smoothly-app>smoothly-notifier>header a{color:inherit;text-decoration:inherit}smoothly-app>smoothly-notifier>header>nav{flex-shrink:0;width:100%;flex-shrink:2}smoothly-app>smoothly-notifier>header>h1,smoothly-app>smoothly-notifier>header>nav,smoothly-app>smoothly-notifier>header>nav>ul,smoothly-app>smoothly-notifier>header>nav>ul>li,smoothly-app>smoothly-notifier>header>nav>ul>li>*:not(a){display:flex;height:100%;margin:0}smoothly-app>smoothly-notifier>header>h1{margin-left:60px}smoothly-app>smoothly-notifier>header>h1>a{overflow:hidden;user-select:none;height:200%;display:flex;align-self:center;size:100%;background-position-y:center}smoothly-app>smoothly-notifier>header>nav>ul>li a{line-height:1.6cm}smoothly-app>smoothly-notifier>header>nav>ul{width:100%}smoothly-app>smoothly-notifier>header>[slot=\"header\"]{display:flex;margin-right:34.25px;justify-content:flex-end;border:0}smoothly-app>smoothly-notifier>header>[slot=\"header\"]>a{display:flex;align-self:center;border-width:0;align-items:center;margin-right:62.25px}smoothly-app>smoothly-notifier>header>[slot=\"header\"]>a>smoothly-icon{fill:rgb(var(--smoothly-primary-shade));stroke:rgb(var(--smoothly-primary-shade));color:rgb(var(--smoothly-primary-shade))}smoothly-app>smoothly-notifier>header>nav>ul>li a{display:flex;height:36px;margin:0 0.4cm;text-decoration:none}smoothly-app>smoothly-notifier>header>nav>ul>li>a{display:flex;align-items:center;align-self:center;margin-bottom:2px}smoothly-app>smoothly-notifier>header>nav>ul>li smoothly-trigger.sc-smoothly-trigger-h{border:0}smoothly-app>smoothly-notifier>header>nav>ul>li>a>smoothly-icon>svg{fill:rgb(var(--smoothly-medium-color));stroke:rgb(var(--smoothly-medium-color));color:rgb(var(--smoothly-medium-color));align-items:center;display:flex}smoothly-app>smoothly-notifier>header>nav>ul>li>a:hover>smoothly-icon>svg,smoothly-app>smoothly-notifier>header>nav>ul>li>a.active>smoothly-icon>svg{color:rgb(var(--smoothly-app-color));stroke:rgb(var(--smoothly-app-color));fill:rgb(var(--smoothly-app-color))}smoothly-app>smoothly-notifier>header>nav>ul>li>smoothly-trigger.active a>smoothly-icon,smoothly-app>smoothly-notifier>header>nav>ul>li>smoothly-trigger:hover a>smoothly-icon,smoothly-app>smoothly-notifier>header>nav>ul>li a:hover,smoothly-app>smoothly-notifier>header>nav>ul>li a.active{border-bottom:2px solid rgb(var(--smoothly-app-color));margin-bottom:0px;border-bottom-width:2px;color:rgb(var(--smoothly-app-color));stroke:rgb(var(--smoothly-app-color));fill:rgb(var(--smoothly-app-color))}smoothly-app>smoothly-notifier>content{position:relative;top:90px}";
|
|
8
8
|
|
|
9
9
|
let SmoothlyApp = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -17,7 +17,7 @@ let SmoothlyDisplayDemo = class {
|
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
19
|
return [
|
|
20
|
-
index.h("main", null, index.h("smoothly-popup", null, index.h("div", null, "Popup, click me"), index.h("div", { color: "dark", slot: "popup" }, "1 line popup")), index.h("smoothly-display-date-time", { datetime: "2019-08-15T08:08:17.65Z" }), index.h("dl", null, index.h("dt", null, "text"), index.h("dd", null, index.h("smoothly-display", { type: "text", value: "text" })), index.h("dt", null, "postal code"), index.h("dd", null, index.h("smoothly-display", { type: "postal-code", value: "752 31" })), index.h("dt", null, "password"), index.h("dd", null, index.h("smoothly-display", { type: "password", value: "password" })), index.h("dt", null, "email"), index.h("dd", null, index.h("smoothly-display", { type: "email", value: "test@example.com" })), index.h("dt", null, "price"), index.h("dd", null, index.h("smoothly-display", { type: "price", value: "13.37", currency: "SEK" })), index.h("dt", null, "percent"), index.h("dd", null, index.h("smoothly-display", { type: "percent", value: "42" })), index.h("dt", null, "phone"), index.h("dd", null, index.h("smoothly-display", { type: "phone", value: "0101881108" })), index.h("dt", null, "card number"), index.h("dd", null, index.h("smoothly-display", { type: "card-number", value: "4111111111111111" })), index.h("dt", null, "card expires"), index.h("dd", null, index.h("smoothly-display", { type: "card-expires", value: "7/22" })), index.h("dt", null, "card csc"), index.h("dd", null, index.h("smoothly-display", { type: "card-csc", value: "987" })), index.h("dt", null, "Quiet"), index.h("dd", null, index.h("smoothly-quiet", { color: "dark" }, "-"))), index.h("smoothly-urlencoded", { data: "hej=hopp&tjena=moss" }), index.h("div", { style: { display: "flex", justifyContent: "space-between" } }, index.h("smoothly-popup", { direction: "down" }, "Click for popup", index.h("span", { slot: "popup", color: "dark", style: { whiteSpace: "nowrap" } }, "Some popup stuff that has a lot of text")), index.h("smoothly-popup", { direction: "down" }, "Click for popup", index.h("span", { slot: "popup", color: "dark", style: { whiteSpace: "nowrap" } }, "Some popup with a bunch of text."))), index.h("p", null, "Test of diffrent kinds of notifier:"), index.h("button", { onClick: () => this.noticeWarning(index$1.Notice.warn("This is a test warning notice.")) }, "warning"), index.h("button", { onClick: () => this.noticeWarning(index$1.Notice.succeded("This is a test success notice.")) }, "success"), index.h("button", { onClick: () => this.noticeWarning(index$1.Notice.failed("This is a test danger notice.")) }, "danger"), index.h("button", { onClick: () => this.noticeWarning(index$1.Notice.execute("This is a test execute notice.", () => new Promise(resolve => window.setTimeout(() => resolve([true, "This went great"]), 3000)))) }, "execute"), index.h("button", { onClick: () => this.noticeWarning(index$1.Notice.delay("This is a test delay notice.", () => new Promise(resolve => window.setTimeout(() => resolve([true, "This went great"]), 3000)))) }, "delay")),
|
|
20
|
+
index.h("main", null, index.h("smoothly-popup", null, index.h("div", null, "Popup, click me"), index.h("div", { color: "dark", slot: "popup" }, "1 line popup")), index.h("smoothly-display-date-time", { datetime: "2019-08-15T08:08:17.65Z" }), index.h("dl", null, index.h("dt", null, "text"), index.h("dd", null, index.h("smoothly-display", { type: "text", value: "text" })), index.h("dt", null, "postal code"), index.h("dd", null, index.h("smoothly-display", { type: "postal-code", value: "752 31" })), index.h("dt", null, "password"), index.h("dd", null, index.h("smoothly-display", { type: "password", value: "password" })), index.h("dt", null, "email"), index.h("dd", null, index.h("smoothly-display", { type: "email", value: "test@example.com" })), index.h("dt", null, "price"), index.h("dd", null, index.h("smoothly-display", { type: "price", value: "13.37", currency: "SEK" })), index.h("dt", null, "percent"), index.h("dd", null, index.h("smoothly-display", { type: "percent", value: "42" })), index.h("dt", null, "phone"), index.h("dd", null, index.h("smoothly-display", { type: "phone", value: "0101881108" })), index.h("dt", null, "card number"), index.h("dd", null, index.h("smoothly-display", { type: "card-number", value: "4111111111111111" })), index.h("dt", null, "card expires"), index.h("dd", null, index.h("smoothly-display", { type: "card-expires", value: "7/22" })), index.h("dt", null, "card csc"), index.h("dd", null, index.h("smoothly-display", { type: "card-csc", value: "987" })), index.h("dt", null, "Quiet"), index.h("dd", null, index.h("smoothly-quiet", { color: "dark" }, "-"))), index.h("smoothly-urlencoded", { data: "hej=hopp&tjena=moss" }), index.h("div", { style: { display: "flex", justifyContent: "space-between" } }, index.h("smoothly-popup", { direction: "down" }, "Click for popup", index.h("span", { slot: "popup", color: "dark", style: { whiteSpace: "nowrap" } }, "Some popup stuff that has a lot of text")), index.h("smoothly-popup", { direction: "down" }, "Click for popup", index.h("span", { slot: "popup", color: "dark", style: { whiteSpace: "nowrap" } }, "Some popup with a bunch of text."))), index.h("p", null, "Test of diffrent kinds of notifier:"), index.h("button", { onClick: () => this.noticeWarning(index$1.Notice.warn("This is a test warning notice.")) }, "warning"), index.h("button", { onClick: () => this.noticeWarning(index$1.Notice.succeded("This is a test success notice.")) }, "success"), index.h("button", { onClick: () => this.noticeWarning(index$1.Notice.failed("This is a test danger notice.")) }, "danger"), index.h("button", { onClick: () => this.noticeWarning(index$1.Notice.execute("This is a test execute notice.", () => new Promise(resolve => window.setTimeout(() => resolve([true, "This went great"]), 3000)))) }, "execute"), index.h("button", { onClick: () => this.noticeWarning(index$1.Notice.delay("This is a test delay notice.", () => new Promise(resolve => window.setTimeout(() => resolve([true, "This went great"]), 3000)))) }, "delay"), index.h("div", { style: { position: "relative", height: "10em" } }, "Large Spinner", index.h("smoothly-spinner", { active: true, size: "large", style: { "--background-color": "255,255,255", "--background-opacity": "0.2", "--spinner-color": "0,130,0", } })), index.h("div", { style: { position: "relative", height: "10em" } }, "Medium Spinner", index.h("smoothly-spinner", { active: true, size: "medium" })), index.h("div", { style: { position: "relative", height: "10em" } }, "Small Spinner", index.h("smoothly-spinner", { active: true, size: "small" }))),
|
|
21
21
|
];
|
|
22
22
|
}
|
|
23
23
|
};
|
|
@@ -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 = ":host{max-height:300px;width:85%;max-height:var(--max-menu-height);
|
|
7
|
+
const styleCss = ":host{max-height:300px;width:85%;max-height:var(--max-menu-height);box-sizing:border-box;background-color:rgb(var(--smoothly-default-color));border-radius:0.25em;color:rgb(var(--smoothly-primary-color));stroke:rgb(var(--smoothly-primary-color));fill:rgb(var(--smoothly-primary-color));box-shadow:0px 2px 24px rgba(64, 60, 57, 0.08), inset 0px 0px 1px rgba(64, 60, 57, 0.4);overflow-y:auto;cursor:pointer}div:last-child:not(:empty){padding:0.5em 1em;font-style:italic}:host:first-child{margin:10em}";
|
|
8
8
|
|
|
9
9
|
let SmoothlyMenuOptions = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -96,7 +96,7 @@ let SmoothlyMenuOptions = class {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
render() {
|
|
99
|
-
return (index.h(index.Host, { style: { "--max-menu-height": this.maxMenuHeight } }, this.filteredOptions.length > 0 ? (this.filteredOptions.map((option, index$1) => (index.h("smoothly-option", { style: this.optionStyle, ref: el => index$1 == 0 && (this.firstOptionsElement = el !== null && el !== void 0 ? el : this.firstOptionsElement), value: option.value, name: option.name, "data-highlight": this.highlightIndex == index$1 }, option.description)))) : (index.h("div", null, this.emptyMenuLabel))));
|
|
99
|
+
return (index.h(index.Host, { style: { "--max-menu-height": this.maxMenuHeight } }, this.filteredOptions.length > 0 ? (this.filteredOptions.map((option, index$1) => (index.h("smoothly-option", { style: this.optionStyle, ref: el => index$1 == 0 && (this.firstOptionsElement = el !== null && el !== void 0 ? el : this.firstOptionsElement), value: option.value, name: option.name, divider: option.divider, "data-highlight": this.highlightIndex == index$1 }, option.description)))) : (index.h("div", null, this.emptyMenuLabel))));
|
|
100
100
|
}
|
|
101
101
|
get element() { return index.getElement(this); }
|
|
102
102
|
static get watchers() { return {
|
|
@@ -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 = ":host{display:flex;flex-direction:row;align-items:center;justify-content:
|
|
7
|
+
const styleCss = ":host{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;padding:0.7em 1em;margin-left:1px;margin-right:1px;background-color:transparent;position:relative}:host([data-highlight]){background-color:rgb(var(--smoothly-default-shade))}:host>div.middle{padding-left:0.5em;flex-shrink:1;width:100%}:host div:last-child :host div:first-child{color:rgba(var(--smoothly-primary-color), 0.8);font-style:italic}:host([divider]){margin-bottom:0.5em}:host>div[slot=right]{margin-right:100%;color:rgba(var(--smoothly-primary-color), 0.8)}:host([divider])::after{position:absolute;height:1px;width:100%;left:0;bottom:-0.25em;content:\"\";background-color:rgba(var(--smoothly-dark-color))}";
|
|
8
8
|
|
|
9
9
|
let SmoothlyOption = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -12,6 +12,7 @@ let SmoothlyOption = class {
|
|
|
12
12
|
this.optionHover = index.createEvent(this, "optionHover", 7);
|
|
13
13
|
this.optionSelect = index.createEvent(this, "optionSelect", 7);
|
|
14
14
|
this.dataHighlight = false;
|
|
15
|
+
this.divider = false;
|
|
15
16
|
}
|
|
16
17
|
onHover(event) {
|
|
17
18
|
this.optionHover.emit({ name: this.name, value: this.value });
|
|
@@ -23,7 +24,7 @@ let SmoothlyOption = class {
|
|
|
23
24
|
throw `smoothly-option ${this.element.innerHTML} lacks value-property and can therefore not be selected`;
|
|
24
25
|
}
|
|
25
26
|
render() {
|
|
26
|
-
return (index.h(index.Host, { onMouseDown: (e) => this.onSelect(e), onMouseOver: (e) => this.onHover(e) }, index.h("div", null, this.name), index.h("div", null, index.h("slot",
|
|
27
|
+
return (index.h(index.Host, { onMouseDown: (e) => this.onSelect(e), onMouseOver: (e) => this.onHover(e) }, index.h("div", null, index.h("slot", { name: "left" })), index.h("div", { class: "middle" }, this.name), index.h("div", null, index.h("slot", { name: "right" }))));
|
|
27
28
|
}
|
|
28
29
|
get element() { return index.getElement(this); }
|
|
29
30
|
};
|
|
@@ -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 = ":host{--background-color:var(--smoothly-
|
|
7
|
+
const styleCss = ":host{--background-color:var(--smoothly-default-color), 1;--color:var(--smoothly-secondary-contrast);--border-color:var(--smoothly-default-shade), 1;--border-highlight-color:var(--smoothly-secondary-contrast), 1;--label-color:var(--smoothly-secondary-contrast), 0.8;--selected-item-border-radius:0.25rem;--selected-item-background-color:var(--smoothly-secondary-color), 1;--selected-item-color:255, 255, 255, 1}:host{display:block;position:relative;background-color:rgba(var(--background-color));width:100%;cursor:pointer;--intergiro-transition:border-color 200ms cubic-bezier(0.645, 0.045, 0.355, 1);transition:var(--intergiro-transition);border:1px solid rgb(var(--border-color));margin:1px;height:40px;border-radius:0.25rem}:host(:focus-within){border-color:rgb(var(--smoothly-primary-shade));border-width:2px;margin:0px}:host>div{display:flex;background-color:transparent;min-height:40px;align-items:center;align-self:center;border:none;max-height:var(--max-height)}:host>div .icons>smoothly-icon{flex-shrink:0;padding-left:0.6em;stroke:rgba(var(--color), 0.4);fill:rgba(var(--color), 0.4);width:1.5em !important;height:1.5em !important}:host>div .icons>smoothly-icon:hover{fill:rgba(var(--color), 1)}:host>div input{width:100%;background-color:transparent;outline:none;border:none;cursor:pointer;color:rgb(var(--color));padding:0 0.6em;font-family:var(--smoothly-font-family);font-size:1.05em}:host>div input::placeholder{opacity:1;text-overflow:ellipsis}:host([is-open])>div input{color:rgb(var(--smoothly-medium-color))}:host(:not(:focus-within)[multiple]) ul>li:last-child{position:absolute;pointer-events:none}:host([label=\"\"]) ul,:host:not([label]) ul,:host([label-setting=hide]) ul{padding-top:0.1em;padding-bottom:0.1em}label{padding-left:0.6em;white-space:nowrap;color:rgba(var(--label-color));transition:var(--intergiro-transition);font-family:var(--smoothly-font-family);pointer-events:none;transform-origin:left}:host([has-selection]) label{display:var(--label-display)}:host([has-selection]) label,:host(:focus-within) label{display:none}:host(:hover) smoothly-icon[data-arrow],:host(:focus-within) smoothly-icon[data-arrow]{stroke:rgba(var(--color), 1)}:host smoothly-icon[data-arrow]{pointer-events:none}:host smoothly-icon{flex-shrink:0;width:1em;height:1em}:host(:not([is-open])) smoothly-icon.up,:host([is-open]) smoothly-icon.down{display:none}smoothly-icon.search{display:flex;align-self:center;padding-left:0.8em}smoothly-icon.up,smoothly-icon.down{display:flex;align-self:center;padding-right:0.8em;stroke:rgb(var(--smoothly-primary-shade))}:host smoothly-menu-options{margin-top:0.5em;padding-top:0.5em;padding-bottom:0.5em;position:absolute;z-index:1}:host(:not([is-open]))>smoothly-menu-options{display:none}";
|
|
8
8
|
|
|
9
9
|
let SmoothlyPicker = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -13,8 +13,10 @@ let SmoothlyPicker = class {
|
|
|
13
13
|
this.keepFocusOnReRender = false;
|
|
14
14
|
this.emptyMenuLabel = "No Options";
|
|
15
15
|
this.multiple = false;
|
|
16
|
+
this.options = [];
|
|
16
17
|
this.selections = [];
|
|
17
18
|
this.selectNoneName = "Select None";
|
|
19
|
+
this.selectionName = "items selected";
|
|
18
20
|
}
|
|
19
21
|
isOpenChangeHander() {
|
|
20
22
|
if (this.isOpen == false) {
|
|
@@ -34,13 +36,14 @@ let SmoothlyPicker = class {
|
|
|
34
36
|
}
|
|
35
37
|
toggle(option) {
|
|
36
38
|
option.value == "select-none"
|
|
37
|
-
? this.
|
|
39
|
+
? this.toggleAll()
|
|
38
40
|
: this.selections.map(s => s.value).includes(option.value)
|
|
39
41
|
? this.unselect(option)
|
|
40
42
|
: this.select(option);
|
|
41
43
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
toggleAll() {
|
|
45
|
+
var _a;
|
|
46
|
+
this.selections = this.selections.length == ((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) ? [] : this.options;
|
|
44
47
|
this.inputElement.focus();
|
|
45
48
|
this.keepFocusOnReRender = true;
|
|
46
49
|
}
|
|
@@ -112,27 +115,30 @@ let SmoothlyPicker = class {
|
|
|
112
115
|
this.isOpen = false;
|
|
113
116
|
this.filterOptions();
|
|
114
117
|
}
|
|
115
|
-
getCheckHtml() {
|
|
116
|
-
return index.h("smoothly-icon", { name: "
|
|
118
|
+
getCheckHtml(checked) {
|
|
119
|
+
return checked ? (index.h("smoothly-icon", { slot: "left", name: "checkbox", size: "small" })) : (index.h("smoothly-icon", { slot: "left", name: "square-outline", size: "small" }));
|
|
117
120
|
}
|
|
118
121
|
render() {
|
|
119
|
-
var _a, _b, _c;
|
|
122
|
+
var _a, _b, _c, _d;
|
|
120
123
|
const cssVariables = {
|
|
121
124
|
"--max-height": (_a = this.maxHeight) !== null && _a !== void 0 ? _a : "inherit",
|
|
122
125
|
"--label-display": this.labelSetting == "hide" ? "none" : "absolute",
|
|
123
126
|
};
|
|
124
127
|
(_b = this.options) === null || _b === void 0 ? void 0 : _b.forEach(o => {
|
|
125
|
-
o.description = this.selections.map(s => s.value).includes(o.value)
|
|
128
|
+
o.description = this.getCheckHtml(this.selections.map(s => s.value).includes(o.value));
|
|
126
129
|
});
|
|
127
130
|
const options = [
|
|
128
131
|
{
|
|
129
132
|
value: "select-none",
|
|
130
133
|
name: this.selectNoneName,
|
|
131
|
-
description: this.selections.length ==
|
|
134
|
+
description: this.getCheckHtml(this.selections.length == ((_c = this.options) === null || _c === void 0 ? void 0 : _c.length)),
|
|
135
|
+
divider: true,
|
|
132
136
|
},
|
|
133
|
-
...((
|
|
137
|
+
...((_d = this.options) !== null && _d !== void 0 ? _d : []),
|
|
134
138
|
];
|
|
135
|
-
return (index.h(index.Host, { style: cssVariables, "has-selection": this.selections.length > 0, "is-open": this.isOpen ? "" : undefined, onMouseDown: (e) => e.preventDefault(), onClick: () => this.onClick() }, index.h("div", null, index.h("label", null, this.label), index.h("input", { type: "text", ref: (el) => (this.inputElement = el ? el : this.inputElement), onFocus: () => this.highlightDefault(), onBlur: () => this.onBlur(), placeholder: this.selections.
|
|
139
|
+
return (index.h(index.Host, { style: cssVariables, "has-selection": this.selections.length > 0, "is-open": this.isOpen ? "" : undefined, onMouseDown: (e) => e.preventDefault(), onClick: () => this.onClick() }, index.h("div", null, index.h("smoothly-icon", { class: "search", name: "search-outline", size: "tiny" }), index.h("label", null, this.label), index.h("input", { type: "text", ref: (el) => (this.inputElement = el ? el : this.inputElement), onFocus: () => this.highlightDefault(), onBlur: () => this.onBlur(), placeholder: this.selections.length > 3
|
|
140
|
+
? this.selections.length.toString() + " " + this.selectionName
|
|
141
|
+
: this.selections.map(selection => selection.name).join(", "), onKeyDown: e => this.onKeyDown(e), onInput: (e) => this.onInput(e) }), index.h("smoothly-icon", { class: "down", name: "chevron-down", size: "tiny" }), index.h("smoothly-icon", { class: "up", name: "chevron-up", size: "tiny" })), index.h("smoothly-menu-options", { style: { width: "100%" }, optionStyle: Object.assign({}, this.optionStyle), order: false, emptyMenuLabel: this.emptyMenuLabel, "max-menu-height": this.maxMenuHeight, ref: (el) => (this.menuElement = el !== null && el !== void 0 ? el : this.menuElement), onClick: e => e.stopPropagation(), resetHighlightOnOptionsChange: false, options: options })));
|
|
136
142
|
}
|
|
137
143
|
get element() { return index.getElement(this); }
|
|
138
144
|
static get watchers() { return {
|