smoothly 0.1.117 → 0.1.120
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_51.cjs.entry.js +12 -32
- package/dist/cjs/smoothly.cjs.js +1 -1
- package/dist/collection/components/app/style.css +12 -12
- package/dist/collection/components/display/index.js +10 -1
- package/dist/collection/components/display-demo/index.js +3 -0
- package/dist/collection/components/table/header/index.js +2 -84
- package/dist/collection/components/table/header/style.css +1 -7
- package/dist/collection/components/table/index.js +1 -29
- package/dist/custom-elements/index.js +14 -34
- package/dist/esm/loader.js +1 -1
- package/dist/esm/smoothly-accordion_51.entry.js +12 -32
- package/dist/esm/smoothly.js +1 -1
- package/dist/smoothly/{p-4fa231df.entry.js → p-a6b05a3a.entry.js} +1 -1
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/components/display/index.d.ts +1 -1
- package/dist/types/components/table/header/index.d.ts +0 -9
- package/dist/types/components/table/index.d.ts +0 -7
- package/dist/types/components.d.ts +0 -6
- package/package.json +1 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["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-accordion_51.cjs",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}],[0,"smoothly-input-demo"],[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]],[0,"smoothly-display-demo"],[2,"smoothly-table-demo"],[4,"smoothly-app",{"color":[1]}],[0,"smoothly-dialog-demo"],[2,"smoothly-icon-demo"],[6,"smoothly-button",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"link":[1],"download":[4]}],[4,"smoothly-room",{"label":[1],"icon":[1],"path":[1],"to":[1]}],[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"]]],[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]],[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"]]],[6,"smoothly-dialog",{"color":[513],"open":[1540],"closable":[516],"header":[513]},[[0,"trigger","TriggerListener"]]],[2,"smoothly-backtotop",{"opacity":[1],"bottom":[1],"right":[1],"visible":[32]}],[2,"smoothly-checkbox",{"selectAll":[4,"select-all"],"size":[1],"intermediate":[1540],"selected":[1540],"disabled":[1540],"t":[32]}],[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]],[0,"smoothly-urlencoded",{"data":[1]}],[6,"smoothly-accordion",{"value":[1025]},[[0,"smoothlyOpen","handleOpenClose"],[0,"smoothlyClose","handleOpenClose"],[0,"smoothlyAccordionItemDidLoad","onAccordionItemDidLoad"],[0,"smoothlyAccordionItemDidUnload","onAccordionItemDidUnload"]]],[6,"smoothly-accordion-item",{"name":[1],"brand":[1],"open":[1540]}],[2,"smoothly-display-amount",{"amount":[8],"currency":[1]}],[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}],[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}],[6,"smoothly-quiet",{"color":[1]}],[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}],[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}],[2,"smoothly-skeleton",{"widths":[16],"width":[1],"color":[1],"period":[2],"distance":[1],"align":[513]}],[2,"smoothly-svg",{"url":[513],"size":[513],"color":[1]}],[6,"smoothly-tab",{"label":[1],"open":[1540]},[[0,"click","onClick"]]],[6,"smoothly-tab-switch",{"selectedElement":[32]},[[0,"expansionOpen","openChanged"]]],[6,"smoothly-table"
|
|
17
|
+
return index.bootstrapLazy([["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-accordion_51.cjs",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}],[0,"smoothly-input-demo"],[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]],[0,"smoothly-display-demo"],[2,"smoothly-table-demo"],[4,"smoothly-app",{"color":[1]}],[0,"smoothly-dialog-demo"],[2,"smoothly-icon-demo"],[6,"smoothly-button",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"link":[1],"download":[4]}],[4,"smoothly-room",{"label":[1],"icon":[1],"path":[1],"to":[1]}],[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"]]],[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]],[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"]]],[6,"smoothly-dialog",{"color":[513],"open":[1540],"closable":[516],"header":[513]},[[0,"trigger","TriggerListener"]]],[2,"smoothly-backtotop",{"opacity":[1],"bottom":[1],"right":[1],"visible":[32]}],[2,"smoothly-checkbox",{"selectAll":[4,"select-all"],"size":[1],"intermediate":[1540],"selected":[1540],"disabled":[1540],"t":[32]}],[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]],[0,"smoothly-urlencoded",{"data":[1]}],[6,"smoothly-accordion",{"value":[1025]},[[0,"smoothlyOpen","handleOpenClose"],[0,"smoothlyClose","handleOpenClose"],[0,"smoothlyAccordionItemDidLoad","onAccordionItemDidLoad"],[0,"smoothlyAccordionItemDidUnload","onAccordionItemDidUnload"]]],[6,"smoothly-accordion-item",{"name":[1],"brand":[1],"open":[1540]}],[2,"smoothly-display-amount",{"amount":[8],"currency":[1]}],[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}],[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}],[6,"smoothly-quiet",{"color":[1]}],[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}],[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}],[2,"smoothly-skeleton",{"widths":[16],"width":[1],"color":[1],"period":[2],"distance":[1],"align":[513]}],[2,"smoothly-svg",{"url":[513],"size":[513],"color":[1]}],[6,"smoothly-tab",{"label":[1],"open":[1540]},[[0,"click","onClick"]]],[6,"smoothly-tab-switch",{"selectedElement":[32]},[[0,"expansionOpen","openChanged"]]],[6,"smoothly-table"],[6,"smoothly-table-cell"],[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]],[6,"smoothly-table-expandable-row",null,[[0,"expansionLoaded","onExpansionLoaded"],[0,"expansionOpen","onDetailsLoaded"]]],[6,"smoothly-table-header"],[6,"smoothly-table-row",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]],[6,"smoothly-input-date",{"value":[1025],"open":[1028],"max":[1025],"min":[1025],"disabled":[1028]},[[0,"dateSet","dateSetHandler"]]],[2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]],[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"]]],[2,"smoothly-display",{"type":[1],"value":[8],"currency":[1],"country":[1]}],[2,"smoothly-display-date-time",{"datetime":[1]}],[0,"smoothly-tuple",{"tuple":[16]}],[1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537],"divider":[1540]}],[2,"smoothly-spinner",{"active":[516],"size":[513]}],[2,"smoothly-calendar",{"month":[1025],"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"doubleInput":[516,"double-input"],"firstSelected":[32]}],[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]}],[2,"smoothly-input-month",{"value":[1025]}],[6,"smoothly-selector",{"opened":[32],"selectedElement":[32],"missing":[32],"filter":[32]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]],[6,"smoothly-item",{"value":[8],"selected":[1540],"filter":[64]},[[0,"click","onClick"]]],[6,"smoothly-trigger",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"name":[1],"value":[8]},[[0,"click","onClick"]]],[2,"smoothly-icon",{"color":[513],"fill":[513],"name":[1],"size":[513],"toolTip":[1,"tool-tip"],"document":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -102,7 +102,7 @@ const SmoothlyAccordionItem = class {
|
|
|
102
102
|
};
|
|
103
103
|
SmoothlyAccordionItem.style = styleCss$G;
|
|
104
104
|
|
|
105
|
-
const styleCss$F = "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:5rem;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;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{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
|
|
105
|
+
const styleCss$F = "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:5rem;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;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{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:3.8rem}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:2.1rem;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:3.9rem}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:2.3rem;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>main{position:relative;top:5.6rem}";
|
|
106
106
|
|
|
107
107
|
const SmoothlyApp = class {
|
|
108
108
|
constructor(hostRef) {
|
|
@@ -45204,6 +45204,7 @@ const SmoothlyDisplay = class {
|
|
|
45204
45204
|
index.registerInstance(this, hostRef);
|
|
45205
45205
|
}
|
|
45206
45206
|
render() {
|
|
45207
|
+
var _a;
|
|
45207
45208
|
let result;
|
|
45208
45209
|
const type = this.type;
|
|
45209
45210
|
switch (type) {
|
|
@@ -45222,10 +45223,17 @@ const SmoothlyDisplay = class {
|
|
|
45222
45223
|
case "price":
|
|
45223
45224
|
result = dist.format(this.value, type, this.currency);
|
|
45224
45225
|
break;
|
|
45226
|
+
case "date":
|
|
45227
|
+
result = (_a = dist.get(this.type, getLocale$1())) === null || _a === void 0 ? void 0 : _a.toString(this.value);
|
|
45228
|
+
break;
|
|
45225
45229
|
}
|
|
45226
45230
|
return result;
|
|
45227
45231
|
}
|
|
45228
45232
|
};
|
|
45233
|
+
function getLocale$1() {
|
|
45234
|
+
const result = navigator.language;
|
|
45235
|
+
return dist$2.Locale.is(result) ? result : dist$2.Language.is(result) ? dist$2.Locale.toLocale(result) : undefined;
|
|
45236
|
+
}
|
|
45229
45237
|
SmoothlyDisplay.style = styleCss$z;
|
|
45230
45238
|
|
|
45231
45239
|
const styleCss$y = ".sc-smoothly-display-amount-h{display:block}[hidden].sc-smoothly-display-amount-h{display:none}";
|
|
@@ -45302,7 +45310,7 @@ const SmoothlyDisplayDemo = class {
|
|
|
45302
45310
|
}
|
|
45303
45311
|
render() {
|
|
45304
45312
|
return [
|
|
45305
|
-
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-skeleton", { period: 3, distance: "20rem", width: "20rem" }), index.h("smoothly-skeleton", { period: 3, distance: "20rem", color: "200,200,255" }), index.h("smoothly-skeleton", { period: 3, distance: "20rem", color: "var(--smoothly-warning-color)" }), index.h("smoothly-skeleton", { period: 3, distance: "20rem" }), index.h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem", width: "20rem" }), index.h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), index.h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), index.h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), index.h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem", width: "20rem" }), index.h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), index.h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), index.h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), 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" })), index.h("div", { style: { position: "absolute", left: "500px", top: "150px" } }, index.h("smoothly-svg", { url: "https://theme.payfunc.com/intergiro/animated-logo.svg" }))),
|
|
45313
|
+
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, "date"), index.h("dd", null, index.h("smoothly-display", { type: "date", value: "2022-07-07" })), index.h("dt", null, "Quiet"), index.h("dd", null, index.h("smoothly-quiet", { color: "dark" }, "-"))), index.h("smoothly-skeleton", { period: 3, distance: "20rem", width: "20rem" }), index.h("smoothly-skeleton", { period: 3, distance: "20rem", color: "200,200,255" }), index.h("smoothly-skeleton", { period: 3, distance: "20rem", color: "var(--smoothly-warning-color)" }), index.h("smoothly-skeleton", { period: 3, distance: "20rem" }), index.h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem", width: "20rem" }), index.h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), index.h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), index.h("smoothly-skeleton", { align: "center", period: 3, distance: "20rem" }), index.h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem", width: "20rem" }), index.h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), index.h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), index.h("smoothly-skeleton", { align: "right", period: 3, distance: "20rem" }), 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" })), index.h("div", { style: { position: "absolute", left: "500px", top: "150px" } }, index.h("smoothly-svg", { url: "https://theme.payfunc.com/intergiro/animated-logo.svg" }))),
|
|
45306
45314
|
];
|
|
45307
45315
|
}
|
|
45308
45316
|
};
|
|
@@ -47053,12 +47061,6 @@ const styleCss$7 = ".sc-smoothly-table-h{display:table;text-align:left;border-co
|
|
|
47053
47061
|
const Table = class {
|
|
47054
47062
|
constructor(hostRef) {
|
|
47055
47063
|
index.registerInstance(this, hostRef);
|
|
47056
|
-
this.loadMore = index.createEvent(this, "loadMore", 7);
|
|
47057
|
-
}
|
|
47058
|
-
onSort(event) {
|
|
47059
|
-
if (this.sortedOn && this.sortedOn != event.target)
|
|
47060
|
-
this.sortedOn.sortDirection = undefined;
|
|
47061
|
-
this.sortedOn = event.target;
|
|
47062
47064
|
}
|
|
47063
47065
|
render() {
|
|
47064
47066
|
return [index.h("slot", null)];
|
|
@@ -47157,36 +47159,14 @@ const TableExpandableRow = class {
|
|
|
47157
47159
|
};
|
|
47158
47160
|
TableExpandableRow.style = styleCss$3;
|
|
47159
47161
|
|
|
47160
|
-
const styleCss$2 = ".sc-smoothly-table-header-h{display:table-cell;padding
|
|
47162
|
+
const styleCss$2 = ".sc-smoothly-table-header-h{display:table-cell;padding:0.75rem 0.5rem;background-color:rgb(var(--smoothly-default-color));border:1px solid rgb(var(--smoothly-dark-color), 0.5);line-height:2.5rem}";
|
|
47161
47163
|
|
|
47162
47164
|
const TableHeader = class {
|
|
47163
47165
|
constructor(hostRef) {
|
|
47164
47166
|
index.registerInstance(this, hostRef);
|
|
47165
|
-
this.sort = index.createEvent(this, "sort", 7);
|
|
47166
|
-
}
|
|
47167
|
-
onClick(event) {
|
|
47168
|
-
this.sort.emit({
|
|
47169
|
-
property: this.name,
|
|
47170
|
-
direction: (this.sortDirection = this.sortDirection == "ascending" ? "descending" : "ascending"),
|
|
47171
|
-
});
|
|
47172
|
-
console.log("sort", this.name, this.sortDirection);
|
|
47173
|
-
event.preventDefault();
|
|
47174
|
-
event.stopPropagation();
|
|
47175
47167
|
}
|
|
47176
47168
|
render() {
|
|
47177
|
-
return
|
|
47178
|
-
}
|
|
47179
|
-
renderSortIcon() {
|
|
47180
|
-
let result;
|
|
47181
|
-
switch (this.sortDirection) {
|
|
47182
|
-
case "ascending":
|
|
47183
|
-
result = index.h("ion-icon", { name: "chevron-up-outline", class: "sort-icon" });
|
|
47184
|
-
break;
|
|
47185
|
-
case "descending":
|
|
47186
|
-
result = index.h("ion-icon", { name: "chevron-down-outline", class: "sort-icon" });
|
|
47187
|
-
break;
|
|
47188
|
-
}
|
|
47189
|
-
return result;
|
|
47169
|
+
return index.h("slot", null);
|
|
47190
47170
|
}
|
|
47191
47171
|
};
|
|
47192
47172
|
TableHeader.style = styleCss$2;
|
package/dist/cjs/smoothly.cjs.js
CHANGED
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["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-accordion_51.cjs",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}],[0,"smoothly-input-demo"],[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]],[0,"smoothly-display-demo"],[2,"smoothly-table-demo"],[4,"smoothly-app",{"color":[1]}],[0,"smoothly-dialog-demo"],[2,"smoothly-icon-demo"],[6,"smoothly-button",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"link":[1],"download":[4]}],[4,"smoothly-room",{"label":[1],"icon":[1],"path":[1],"to":[1]}],[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"]]],[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]],[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"]]],[6,"smoothly-dialog",{"color":[513],"open":[1540],"closable":[516],"header":[513]},[[0,"trigger","TriggerListener"]]],[2,"smoothly-backtotop",{"opacity":[1],"bottom":[1],"right":[1],"visible":[32]}],[2,"smoothly-checkbox",{"selectAll":[4,"select-all"],"size":[1],"intermediate":[1540],"selected":[1540],"disabled":[1540],"t":[32]}],[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]],[0,"smoothly-urlencoded",{"data":[1]}],[6,"smoothly-accordion",{"value":[1025]},[[0,"smoothlyOpen","handleOpenClose"],[0,"smoothlyClose","handleOpenClose"],[0,"smoothlyAccordionItemDidLoad","onAccordionItemDidLoad"],[0,"smoothlyAccordionItemDidUnload","onAccordionItemDidUnload"]]],[6,"smoothly-accordion-item",{"name":[1],"brand":[1],"open":[1540]}],[2,"smoothly-display-amount",{"amount":[8],"currency":[1]}],[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}],[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}],[6,"smoothly-quiet",{"color":[1]}],[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}],[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}],[2,"smoothly-skeleton",{"widths":[16],"width":[1],"color":[1],"period":[2],"distance":[1],"align":[513]}],[2,"smoothly-svg",{"url":[513],"size":[513],"color":[1]}],[6,"smoothly-tab",{"label":[1],"open":[1540]},[[0,"click","onClick"]]],[6,"smoothly-tab-switch",{"selectedElement":[32]},[[0,"expansionOpen","openChanged"]]],[6,"smoothly-table"
|
|
18
|
+
return index.bootstrapLazy([["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-accordion_51.cjs",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}],[0,"smoothly-input-demo"],[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]],[0,"smoothly-display-demo"],[2,"smoothly-table-demo"],[4,"smoothly-app",{"color":[1]}],[0,"smoothly-dialog-demo"],[2,"smoothly-icon-demo"],[6,"smoothly-button",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"link":[1],"download":[4]}],[4,"smoothly-room",{"label":[1],"icon":[1],"path":[1],"to":[1]}],[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"]]],[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]],[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"]]],[6,"smoothly-dialog",{"color":[513],"open":[1540],"closable":[516],"header":[513]},[[0,"trigger","TriggerListener"]]],[2,"smoothly-backtotop",{"opacity":[1],"bottom":[1],"right":[1],"visible":[32]}],[2,"smoothly-checkbox",{"selectAll":[4,"select-all"],"size":[1],"intermediate":[1540],"selected":[1540],"disabled":[1540],"t":[32]}],[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]],[0,"smoothly-urlencoded",{"data":[1]}],[6,"smoothly-accordion",{"value":[1025]},[[0,"smoothlyOpen","handleOpenClose"],[0,"smoothlyClose","handleOpenClose"],[0,"smoothlyAccordionItemDidLoad","onAccordionItemDidLoad"],[0,"smoothlyAccordionItemDidUnload","onAccordionItemDidUnload"]]],[6,"smoothly-accordion-item",{"name":[1],"brand":[1],"open":[1540]}],[2,"smoothly-display-amount",{"amount":[8],"currency":[1]}],[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}],[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}],[6,"smoothly-quiet",{"color":[1]}],[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}],[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}],[2,"smoothly-skeleton",{"widths":[16],"width":[1],"color":[1],"period":[2],"distance":[1],"align":[513]}],[2,"smoothly-svg",{"url":[513],"size":[513],"color":[1]}],[6,"smoothly-tab",{"label":[1],"open":[1540]},[[0,"click","onClick"]]],[6,"smoothly-tab-switch",{"selectedElement":[32]},[[0,"expansionOpen","openChanged"]]],[6,"smoothly-table"],[6,"smoothly-table-cell"],[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]],[6,"smoothly-table-expandable-row",null,[[0,"expansionLoaded","onExpansionLoaded"],[0,"expansionOpen","onDetailsLoaded"]]],[6,"smoothly-table-header"],[6,"smoothly-table-row",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]],[6,"smoothly-input-date",{"value":[1025],"open":[1028],"max":[1025],"min":[1025],"disabled":[1028]},[[0,"dateSet","dateSetHandler"]]],[2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]],[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"]]],[2,"smoothly-display",{"type":[1],"value":[8],"currency":[1],"country":[1]}],[2,"smoothly-display-date-time",{"datetime":[1]}],[0,"smoothly-tuple",{"tuple":[16]}],[1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537],"divider":[1540]}],[2,"smoothly-spinner",{"active":[516],"size":[513]}],[2,"smoothly-calendar",{"month":[1025],"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"doubleInput":[516,"double-input"],"firstSelected":[32]}],[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]}],[2,"smoothly-input-month",{"value":[1025]}],[6,"smoothly-selector",{"opened":[32],"selectedElement":[32],"missing":[32],"filter":[32]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]],[6,"smoothly-item",{"value":[8],"selected":[1540],"filter":[64]},[[0,"click","onClick"]]],[6,"smoothly-trigger",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"name":[1],"value":[8]},[[0,"click","onClick"]]],[2,"smoothly-icon",{"color":[513],"fill":[513],"name":[1],"size":[513],"toolTip":[1,"tool-tip"],"document":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -65,8 +65,8 @@ smoothly-app>smoothly-notifier>header>nav {
|
|
|
65
65
|
smoothly-app>smoothly-notifier>header>h1,
|
|
66
66
|
smoothly-app>smoothly-notifier>header>nav,
|
|
67
67
|
smoothly-app>smoothly-notifier>header>nav>ul,
|
|
68
|
-
smoothly-app>smoothly-notifier>header>nav>ul
|
|
69
|
-
smoothly-app>smoothly-notifier>header>nav>ul
|
|
68
|
+
smoothly-app>smoothly-notifier>header>nav>ul li,
|
|
69
|
+
smoothly-app>smoothly-notifier>header>nav>ul li>*:not(a) {
|
|
70
70
|
display: flex;
|
|
71
71
|
height: 100%;
|
|
72
72
|
margin: 0;
|
|
@@ -107,38 +107,38 @@ smoothly-app>smoothly-notifier>header>[slot=header]>a>smoothly-icon {
|
|
|
107
107
|
stroke: rgb(var(--smoothly-primary-shade));
|
|
108
108
|
color: rgb(var(--smoothly-primary-shade));
|
|
109
109
|
}
|
|
110
|
-
smoothly-app>smoothly-notifier>header>nav>ul
|
|
110
|
+
smoothly-app>smoothly-notifier>header>nav>ul li a {
|
|
111
111
|
display: flex;
|
|
112
112
|
height: 2.3rem;
|
|
113
113
|
margin: 0 0.4cm;
|
|
114
114
|
text-decoration: none;
|
|
115
115
|
}
|
|
116
|
-
smoothly-app>smoothly-notifier>header>nav>ul
|
|
116
|
+
smoothly-app>smoothly-notifier>header>nav>ul li>a {
|
|
117
117
|
display: flex;
|
|
118
118
|
align-items: center;
|
|
119
119
|
align-self: center;
|
|
120
120
|
margin-bottom: 2px;
|
|
121
121
|
}
|
|
122
|
-
smoothly-app>smoothly-notifier>header>nav>ul
|
|
122
|
+
smoothly-app>smoothly-notifier>header>nav>ul li smoothly-trigger.sc-smoothly-trigger-h {
|
|
123
123
|
border: 0;
|
|
124
124
|
}
|
|
125
|
-
smoothly-app>smoothly-notifier>header>nav>ul
|
|
125
|
+
smoothly-app>smoothly-notifier>header>nav>ul li>a>smoothly-icon>svg {
|
|
126
126
|
fill: rgb(var(--smoothly-medium-color));
|
|
127
127
|
stroke: rgb(var(--smoothly-medium-color));
|
|
128
128
|
color: rgb(var(--smoothly-medium-color));
|
|
129
129
|
align-items: center;
|
|
130
130
|
display: flex;
|
|
131
131
|
}
|
|
132
|
-
smoothly-app>smoothly-notifier>header>nav>ul
|
|
133
|
-
smoothly-app>smoothly-notifier>header>nav>ul
|
|
132
|
+
smoothly-app>smoothly-notifier>header>nav>ul li>a:hover>smoothly-icon>svg,
|
|
133
|
+
smoothly-app>smoothly-notifier>header>nav>ul li>a.active>smoothly-icon>svg {
|
|
134
134
|
color: rgb(var(--smoothly-app-color));
|
|
135
135
|
stroke: rgb(var(--smoothly-app-color));
|
|
136
136
|
fill: rgb(var(--smoothly-app-color));
|
|
137
137
|
}
|
|
138
|
-
smoothly-app>smoothly-notifier>header>nav>ul
|
|
139
|
-
smoothly-app>smoothly-notifier>header>nav>ul
|
|
140
|
-
smoothly-app>smoothly-notifier>header>nav>ul
|
|
141
|
-
smoothly-app>smoothly-notifier>header>nav>ul
|
|
138
|
+
smoothly-app>smoothly-notifier>header>nav>ul li>smoothly-trigger.active a>smoothly-icon,
|
|
139
|
+
smoothly-app>smoothly-notifier>header>nav>ul li>smoothly-trigger:hover a>smoothly-icon,
|
|
140
|
+
smoothly-app>smoothly-notifier>header>nav>ul li a:hover,
|
|
141
|
+
smoothly-app>smoothly-notifier>header>nav>ul li a.active {
|
|
142
142
|
border-bottom: 2px solid rgb(var(--smoothly-app-color));
|
|
143
143
|
margin-bottom: 0px;
|
|
144
144
|
border-bottom-width: 2px;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Component, h, Prop } from "@stencil/core";
|
|
2
|
-
import {
|
|
2
|
+
import { Language, Locale } from "isoly";
|
|
3
|
+
import { format, get } from "tidily";
|
|
3
4
|
export class SmoothlyDisplay {
|
|
4
5
|
render() {
|
|
6
|
+
var _a;
|
|
5
7
|
let result;
|
|
6
8
|
const type = this.type;
|
|
7
9
|
switch (type) {
|
|
@@ -20,6 +22,9 @@ export class SmoothlyDisplay {
|
|
|
20
22
|
case "price":
|
|
21
23
|
result = format(this.value, type, this.currency);
|
|
22
24
|
break;
|
|
25
|
+
case "date":
|
|
26
|
+
result = (_a = get(this.type, getLocale())) === null || _a === void 0 ? void 0 : _a.toString(this.value);
|
|
27
|
+
break;
|
|
23
28
|
}
|
|
24
29
|
return result;
|
|
25
30
|
}
|
|
@@ -117,3 +122,7 @@ export class SmoothlyDisplay {
|
|
|
117
122
|
}
|
|
118
123
|
}; }
|
|
119
124
|
}
|
|
125
|
+
function getLocale() {
|
|
126
|
+
const result = navigator.language;
|
|
127
|
+
return Locale.is(result) ? result : Language.is(result) ? Locale.toLocale(result) : undefined;
|
|
128
|
+
}
|
|
@@ -43,6 +43,9 @@ export class SmoothlyDisplayDemo {
|
|
|
43
43
|
h("dt", null, "card csc"),
|
|
44
44
|
h("dd", null,
|
|
45
45
|
h("smoothly-display", { type: "card-csc", value: "987" })),
|
|
46
|
+
h("dt", null, "date"),
|
|
47
|
+
h("dd", null,
|
|
48
|
+
h("smoothly-display", { type: "date", value: "2022-07-07" })),
|
|
46
49
|
h("dt", null, "Quiet"),
|
|
47
50
|
h("dd", null,
|
|
48
51
|
h("smoothly-quiet", { color: "dark" }, "-"))),
|
|
@@ -1,30 +1,7 @@
|
|
|
1
|
-
import { Component,
|
|
1
|
+
import { Component, h } from "@stencil/core";
|
|
2
2
|
export class TableHeader {
|
|
3
|
-
onClick(event) {
|
|
4
|
-
this.sort.emit({
|
|
5
|
-
property: this.name,
|
|
6
|
-
direction: (this.sortDirection = this.sortDirection == "ascending" ? "descending" : "ascending"),
|
|
7
|
-
});
|
|
8
|
-
console.log("sort", this.name, this.sortDirection);
|
|
9
|
-
event.preventDefault();
|
|
10
|
-
event.stopPropagation();
|
|
11
|
-
}
|
|
12
3
|
render() {
|
|
13
|
-
return
|
|
14
|
-
h("slot", null),
|
|
15
|
-
this.renderSortIcon()));
|
|
16
|
-
}
|
|
17
|
-
renderSortIcon() {
|
|
18
|
-
let result;
|
|
19
|
-
switch (this.sortDirection) {
|
|
20
|
-
case "ascending":
|
|
21
|
-
result = h("ion-icon", { name: "chevron-up-outline", class: "sort-icon" });
|
|
22
|
-
break;
|
|
23
|
-
case "descending":
|
|
24
|
-
result = h("ion-icon", { name: "chevron-down-outline", class: "sort-icon" });
|
|
25
|
-
break;
|
|
26
|
-
}
|
|
27
|
-
return result;
|
|
4
|
+
return h("slot", null);
|
|
28
5
|
}
|
|
29
6
|
static get is() { return "smoothly-table-header"; }
|
|
30
7
|
static get encapsulation() { return "scoped"; }
|
|
@@ -34,63 +11,4 @@ export class TableHeader {
|
|
|
34
11
|
static get styleUrls() { return {
|
|
35
12
|
"$": ["style.css"]
|
|
36
13
|
}; }
|
|
37
|
-
static get properties() { return {
|
|
38
|
-
"name": {
|
|
39
|
-
"type": "string",
|
|
40
|
-
"mutable": false,
|
|
41
|
-
"complexType": {
|
|
42
|
-
"original": "string",
|
|
43
|
-
"resolved": "string",
|
|
44
|
-
"references": {}
|
|
45
|
-
},
|
|
46
|
-
"required": false,
|
|
47
|
-
"optional": false,
|
|
48
|
-
"docs": {
|
|
49
|
-
"tags": [],
|
|
50
|
-
"text": ""
|
|
51
|
-
},
|
|
52
|
-
"attribute": "name",
|
|
53
|
-
"reflect": false
|
|
54
|
-
},
|
|
55
|
-
"sortDirection": {
|
|
56
|
-
"type": "string",
|
|
57
|
-
"mutable": true,
|
|
58
|
-
"complexType": {
|
|
59
|
-
"original": "\"ascending\" | \"descending\"",
|
|
60
|
-
"resolved": "\"ascending\" | \"descending\" | undefined",
|
|
61
|
-
"references": {}
|
|
62
|
-
},
|
|
63
|
-
"required": false,
|
|
64
|
-
"optional": true,
|
|
65
|
-
"docs": {
|
|
66
|
-
"tags": [],
|
|
67
|
-
"text": ""
|
|
68
|
-
},
|
|
69
|
-
"attribute": "sort-direction",
|
|
70
|
-
"reflect": false
|
|
71
|
-
}
|
|
72
|
-
}; }
|
|
73
|
-
static get events() { return [{
|
|
74
|
-
"method": "sort",
|
|
75
|
-
"name": "sort",
|
|
76
|
-
"bubbles": true,
|
|
77
|
-
"cancelable": true,
|
|
78
|
-
"composed": true,
|
|
79
|
-
"docs": {
|
|
80
|
-
"tags": [],
|
|
81
|
-
"text": ""
|
|
82
|
-
},
|
|
83
|
-
"complexType": {
|
|
84
|
-
"original": "{ property: string; direction: \"ascending\" | \"descending\" }",
|
|
85
|
-
"resolved": "{ property: string; direction: \"ascending\" | \"descending\"; }",
|
|
86
|
-
"references": {}
|
|
87
|
-
}
|
|
88
|
-
}]; }
|
|
89
|
-
static get listeners() { return [{
|
|
90
|
-
"name": "click",
|
|
91
|
-
"method": "onClick",
|
|
92
|
-
"target": undefined,
|
|
93
|
-
"capture": false,
|
|
94
|
-
"passive": false
|
|
95
|
-
}]; }
|
|
96
14
|
}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: table-cell;
|
|
3
|
-
padding
|
|
4
|
-
padding-bottom: 0.75rem;
|
|
3
|
+
padding: 0.75rem 0.5rem;
|
|
5
4
|
background-color: rgb(var(--smoothly-default-color));
|
|
6
5
|
border: 1px solid rgb(var(--smoothly-dark-color), 0.5);
|
|
7
|
-
padding: 0.5em;
|
|
8
6
|
line-height: 2.5rem;
|
|
9
7
|
}
|
|
10
|
-
:host > ion-icon {
|
|
11
|
-
height: 0.75rem;
|
|
12
|
-
margin-left: 1.25rem;
|
|
13
|
-
}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { Component, Element,
|
|
1
|
+
import { Component, Element, h } from "@stencil/core";
|
|
2
2
|
export class Table {
|
|
3
|
-
onSort(event) {
|
|
4
|
-
if (this.sortedOn && this.sortedOn != event.target)
|
|
5
|
-
this.sortedOn.sortDirection = undefined;
|
|
6
|
-
this.sortedOn = event.target;
|
|
7
|
-
}
|
|
8
3
|
render() {
|
|
9
4
|
return [h("slot", null)];
|
|
10
5
|
}
|
|
@@ -16,28 +11,5 @@ export class Table {
|
|
|
16
11
|
static get styleUrls() { return {
|
|
17
12
|
"$": ["style.css"]
|
|
18
13
|
}; }
|
|
19
|
-
static get events() { return [{
|
|
20
|
-
"method": "loadMore",
|
|
21
|
-
"name": "loadMore",
|
|
22
|
-
"bubbles": true,
|
|
23
|
-
"cancelable": true,
|
|
24
|
-
"composed": true,
|
|
25
|
-
"docs": {
|
|
26
|
-
"tags": [],
|
|
27
|
-
"text": ""
|
|
28
|
-
},
|
|
29
|
-
"complexType": {
|
|
30
|
-
"original": "void",
|
|
31
|
-
"resolved": "void",
|
|
32
|
-
"references": {}
|
|
33
|
-
}
|
|
34
|
-
}]; }
|
|
35
14
|
static get elementRef() { return "element"; }
|
|
36
|
-
static get listeners() { return [{
|
|
37
|
-
"name": "sort",
|
|
38
|
-
"method": "onSort",
|
|
39
|
-
"target": undefined,
|
|
40
|
-
"capture": false,
|
|
41
|
-
"passive": false
|
|
42
|
-
}]; }
|
|
43
15
|
}
|