smoothly 0.3.11 → 0.3.13
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/getLanguage-aa9af88b.js +12003 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/smoothly-accordion_53.cjs.entry.js +155 -12154
- package/dist/cjs/smoothly-country.cjs.entry.js +11948 -0
- package/dist/cjs/smoothly.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/calendar/style.css +5 -0
- package/dist/collection/components/country/index.js +70 -0
- package/dist/collection/components/input-date/index.js +1 -1
- package/dist/collection/components/input-date/style.css +15 -5
- package/dist/collection/components/input-demo/index.js +1 -1
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +11948 -5
- package/dist/esm/getLanguage-3dbe8ccd.js +12001 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/smoothly-accordion_53.entry.js +153 -12152
- package/dist/esm/smoothly-country.entry.js +11944 -0
- package/dist/esm/smoothly.js +1 -1
- package/dist/smoothly/p-41e29ef7.js +1 -0
- package/dist/smoothly/p-6acd7162.entry.js +1 -0
- package/dist/smoothly/p-f2285df4.entry.js +1 -0
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/components/country/index.d.ts +9 -0
- package/dist/types/components.d.ts +17 -0
- package/package.json +1 -1
- package/dist/smoothly/p-d3323ddc.entry.js +0 -1
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_53.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"]]],[1,"smoothly-picker",{"disabled":[516],"readonly":[516],"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"mutable":[4],"optionStyle":[8,"option-style"],"options":[1040],"labelSetting":[513,"label-setting"],"label":[513],"selections":[1040],"selectNoneName":[1025,"select-none-name"],"selectAllName":[1025,"select-all-name"],"selectionName":[1025,"selection-name"],"newOptionLabel":[1025,"new-option-label"],"valueValidator":[16],"isOpen":[32],"empty":[32]},[[0,"optionSelect","optionSelectHandler"],[0,"optionUnselect","optionSelectHandler"],[0,"optionAdd","optionAddHandler"],[0,"menuEmpty","emptyHandler"]]],[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]],[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-radio-button-item",{"value":[8],"selected":[1540],"color":[513]}],[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]],[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540]},[[0,"click","onClick"]]],[6,"smoothly-table-expandable-row",{"align":[1],"open":[1540]},[[0,"click","onClick"]]],[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",{"type":[1],"value":[8],"currency":[1],"country":[1],"format":[16]}],[2,"smoothly-display-amount",{"amount":[8],"currency":[1],"toInteger":[4,"to-integer"]}],[2,"smoothly-display-date-time",{"datetime":[1]}],[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}],[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}],[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}],[6,"smoothly-radio-button",{"name":[1],"value":[1032],"deselectable":[516],"decoration":[513]},[[2,"radioItemSelectInternal","radioSelectHandler"]]],[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}],[2,"smoothly-skeleton",{"widths":[16],"width":[1025],"color":[1],"period":[2],"distance":[1],"align":[513]}],[2,"smoothly-svg",{"url":[513],"size":[513],"color":[1]}],[6,"smoothly-table",null,[[0,"expansionLoad","handleEvents"],[0,"expansionOpen","handleEvents"]]],[6,"smoothly-table-cell"],[6,"smoothly-table-header",{"name":[1]}],[6,"smoothly-table-row",null,[[0,"expansionLoad","onExpansionLoad"],[0,"expansionOpen","onExpansionOpen"]]],[6,"smoothly-input-date",{"name":[513],"value":[1025],"open":[1028],"max":[1025],"min":[1025],"disabled":[1028]},[[0,"dateSet","dateSetHandler"]]],[1,"smoothly-menu-options",{"toggle":[4],"emptyMenuLabel":[1025,"empty-menu-label"],"newOptionLabel":[1,"new-option-label"],"maxMenuHeight":[1,"max-menu-height"],"order":[4],"optionStyle":[8,"option-style"],"options":[1040],"resetHighlightOnOptionsChange":[1028,"reset-highlight-on-options-change"],"mutable":[4],"filteredOptions":[32],"highlightIndex":[32],"keyword":[32],"moveHighlight":[64],"setHighlight":[64],"getHighlighted":[64],"filterOptions":[64]},[[0,"optionHover","optionHoverHandler"]]],[2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]],[6,"smoothly-tab",{"label":[1],"open":[1540]},[[0,"click","onClick"]]],[6,"smoothly-tab-switch",{"selectedElement":[32]},[[0,"expansionOpen","openChanged"]]],[0,"smoothly-tuple",{"tuple":[16]}],[1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537],"divider":[1540],"checkbox":[4],"new":[4],"toggle":[4],"checked":[1028]}],[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],"readonly":[1028],"currency":[513],"initialValue":[32],"getFormData":[64],"setKeepFocusOnReRender":[64],"setSelectionRange":[64]}],[2,"smoothly-input-month",{"value":[1025]}],[6,"smoothly-quiet",{"color":[1]}],[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
|
+
return index.bootstrapLazy([["smoothly-country.cjs",[[2,"smoothly-country",{"value":[1],"text":[1],"language":[32]}]]],["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_53.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"]]],[1,"smoothly-picker",{"disabled":[516],"readonly":[516],"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"mutable":[4],"optionStyle":[8,"option-style"],"options":[1040],"labelSetting":[513,"label-setting"],"label":[513],"selections":[1040],"selectNoneName":[1025,"select-none-name"],"selectAllName":[1025,"select-all-name"],"selectionName":[1025,"selection-name"],"newOptionLabel":[1025,"new-option-label"],"valueValidator":[16],"isOpen":[32],"empty":[32]},[[0,"optionSelect","optionSelectHandler"],[0,"optionUnselect","optionSelectHandler"],[0,"optionAdd","optionAddHandler"],[0,"menuEmpty","emptyHandler"]]],[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]],[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-radio-button-item",{"value":[8],"selected":[1540],"color":[513]}],[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]],[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540]},[[0,"click","onClick"]]],[6,"smoothly-table-expandable-row",{"align":[1],"open":[1540]},[[0,"click","onClick"]]],[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",{"type":[1],"value":[8],"currency":[1],"country":[1],"format":[16]}],[2,"smoothly-display-amount",{"amount":[8],"currency":[1],"toInteger":[4,"to-integer"]}],[2,"smoothly-display-date-time",{"datetime":[1]}],[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}],[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}],[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}],[6,"smoothly-radio-button",{"name":[1],"value":[1032],"deselectable":[516],"decoration":[513]},[[2,"radioItemSelectInternal","radioSelectHandler"]]],[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}],[2,"smoothly-skeleton",{"widths":[16],"width":[1025],"color":[1],"period":[2],"distance":[1],"align":[513]}],[2,"smoothly-svg",{"url":[513],"size":[513],"color":[1]}],[6,"smoothly-table",null,[[0,"expansionLoad","handleEvents"],[0,"expansionOpen","handleEvents"]]],[6,"smoothly-table-cell"],[6,"smoothly-table-header",{"name":[1]}],[6,"smoothly-table-row",null,[[0,"expansionLoad","onExpansionLoad"],[0,"expansionOpen","onExpansionOpen"]]],[6,"smoothly-input-date",{"name":[513],"value":[1025],"open":[1028],"max":[1025],"min":[1025],"disabled":[1028]},[[0,"dateSet","dateSetHandler"]]],[1,"smoothly-menu-options",{"toggle":[4],"emptyMenuLabel":[1025,"empty-menu-label"],"newOptionLabel":[1,"new-option-label"],"maxMenuHeight":[1,"max-menu-height"],"order":[4],"optionStyle":[8,"option-style"],"options":[1040],"resetHighlightOnOptionsChange":[1028,"reset-highlight-on-options-change"],"mutable":[4],"filteredOptions":[32],"highlightIndex":[32],"keyword":[32],"moveHighlight":[64],"setHighlight":[64],"getHighlighted":[64],"filterOptions":[64]},[[0,"optionHover","optionHoverHandler"]]],[2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]],[6,"smoothly-tab",{"label":[1],"open":[1540]},[[0,"click","onClick"]]],[6,"smoothly-tab-switch",{"selectedElement":[32]},[[0,"expansionOpen","openChanged"]]],[0,"smoothly-tuple",{"tuple":[16]}],[1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537],"divider":[1540],"checkbox":[4],"new":[4],"toggle":[4],"checked":[1028]}],[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],"readonly":[1028],"currency":[513],"initialValue":[32],"getFormData":[64],"setKeepFocusOnReRender":[64],"setSelectionRange":[64]}],[2,"smoothly-input-month",{"value":[1025]}],[6,"smoothly-quiet",{"color":[1]}],[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
|
});
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: block;
|
|
3
3
|
--other-month-opacity: 0.5;
|
|
4
|
+
margin-bottom: 1rem;
|
|
4
5
|
}
|
|
5
6
|
:host > smoothly-input-month {
|
|
6
7
|
width: calc(100% - 1em);
|
|
7
8
|
padding: 0.5em 0.5em 0 0.5em;
|
|
8
9
|
}
|
|
10
|
+
:host > table {
|
|
11
|
+
table-layout: fixed;
|
|
12
|
+
width: 100%;
|
|
13
|
+
}
|
|
9
14
|
th,
|
|
10
15
|
td {
|
|
11
16
|
text-align: center;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { CountryCode } from "isoly";
|
|
3
|
+
import { getLanguage } from "langly";
|
|
4
|
+
export class SmoothlyCountry {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.text = "alpha2";
|
|
7
|
+
}
|
|
8
|
+
componentWillLoad() {
|
|
9
|
+
this.language = getLanguage(this.element);
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
var _a;
|
|
13
|
+
const name = this.language && this.value ? CountryCode.Name.from(this.language, this.value) : undefined;
|
|
14
|
+
return (h(Host, { title: this.text == "alpha2" && name ? name : this.value }, ((_a = this.value) === null || _a === void 0 ? void 0 : _a.toUpperCase().replace(/./g, char => String.fromCodePoint(char.charCodeAt(0) + 127397))) +
|
|
15
|
+
" " +
|
|
16
|
+
(this.text == "alpha2" ? this.value : this.text == "name" ? name : "")));
|
|
17
|
+
}
|
|
18
|
+
static get is() { return "smoothly-country"; }
|
|
19
|
+
static get encapsulation() { return "scoped"; }
|
|
20
|
+
static get properties() {
|
|
21
|
+
return {
|
|
22
|
+
"value": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"mutable": false,
|
|
25
|
+
"complexType": {
|
|
26
|
+
"original": "CountryCode.Alpha2",
|
|
27
|
+
"resolved": "\"AF\" | \"AX\" | \"AL\" | \"DZ\" | \"AS\" | \"AD\" | \"AO\" | \"AI\" | \"AQ\" | \"AG\" | \"AR\" | \"AM\" | \"AW\" | \"AU\" | \"AT\" | \"AZ\" | \"BS\" | \"BH\" | \"BD\" | \"BB\" | \"BY\" | \"BE\" | \"BZ\" | \"BJ\" | \"BM\" | \"BT\" | \"BO\" | \"BQ\" | \"BA\" | \"BW\" | \"BV\" | \"BR\" | \"IO\" | \"BN\" | \"BG\" | \"BF\" | \"BI\" | \"CV\" | \"KH\" | \"CM\" | \"CA\" | \"KY\" | \"CF\" | \"TD\" | \"CL\" | \"CN\" | \"CX\" | \"CC\" | \"CO\" | \"KM\" | \"CG\" | \"CD\" | \"CK\" | \"CR\" | \"CI\" | \"HR\" | \"CU\" | \"CW\" | \"CY\" | \"CZ\" | \"DK\" | \"DJ\" | \"DM\" | \"DO\" | \"EC\" | \"EG\" | \"SV\" | \"GQ\" | \"ER\" | \"EE\" | \"SZ\" | \"ET\" | \"FK\" | \"FO\" | \"FJ\" | \"FI\" | \"FR\" | \"GF\" | \"PF\" | \"TF\" | \"GA\" | \"GM\" | \"GE\" | \"DE\" | \"GH\" | \"GI\" | \"GR\" | \"GL\" | \"GD\" | \"GP\" | \"GU\" | \"GT\" | \"GG\" | \"GN\" | \"GW\" | \"GY\" | \"HT\" | \"HM\" | \"VA\" | \"HN\" | \"HK\" | \"HU\" | \"IS\" | \"IN\" | \"ID\" | \"IR\" | \"IQ\" | \"IE\" | \"IM\" | \"IL\" | \"IT\" | \"JM\" | \"JP\" | \"JE\" | \"JO\" | \"KZ\" | \"KE\" | \"KI\" | \"KP\" | \"KR\" | \"KW\" | \"KG\" | \"LA\" | \"LV\" | \"LB\" | \"LS\" | \"LR\" | \"LY\" | \"LI\" | \"LT\" | \"LU\" | \"MO\" | \"MG\" | \"MW\" | \"MY\" | \"MV\" | \"ML\" | \"MT\" | \"MH\" | \"MQ\" | \"MR\" | \"MU\" | \"YT\" | \"MX\" | \"FM\" | \"MD\" | \"MC\" | \"MN\" | \"ME\" | \"MS\" | \"MA\" | \"MZ\" | \"MM\" | \"NA\" | \"NR\" | \"NP\" | \"NL\" | \"NC\" | \"NZ\" | \"NI\" | \"NE\" | \"NG\" | \"NU\" | \"NF\" | \"MK\" | \"MP\" | \"NO\" | \"OM\" | \"PK\" | \"PW\" | \"PS\" | \"PA\" | \"PG\" | \"PY\" | \"PE\" | \"PH\" | \"PN\" | \"PL\" | \"PT\" | \"PR\" | \"QA\" | \"RE\" | \"RO\" | \"RU\" | \"RW\" | \"BL\" | \"SH\" | \"KN\" | \"LC\" | \"MF\" | \"PM\" | \"VC\" | \"WS\" | \"SM\" | \"ST\" | \"SA\" | \"SN\" | \"RS\" | \"SC\" | \"SL\" | \"SG\" | \"SX\" | \"SK\" | \"SI\" | \"SB\" | \"SO\" | \"ZA\" | \"GS\" | \"SS\" | \"ES\" | \"LK\" | \"SD\" | \"SR\" | \"SJ\" | \"SE\" | \"CH\" | \"SY\" | \"TW\" | \"TJ\" | \"TZ\" | \"TH\" | \"TL\" | \"TG\" | \"TK\" | \"TO\" | \"TT\" | \"TN\" | \"TR\" | \"TM\" | \"TC\" | \"TV\" | \"UG\" | \"UA\" | \"AE\" | \"GB\" | \"US\" | \"UM\" | \"UY\" | \"UZ\" | \"VU\" | \"VE\" | \"VN\" | \"VG\" | \"VI\" | \"WF\" | \"EH\" | \"YE\" | \"ZM\" | \"ZW\"",
|
|
28
|
+
"references": {
|
|
29
|
+
"CountryCode": {
|
|
30
|
+
"location": "import",
|
|
31
|
+
"path": "isoly"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"required": false,
|
|
36
|
+
"optional": false,
|
|
37
|
+
"docs": {
|
|
38
|
+
"tags": [],
|
|
39
|
+
"text": ""
|
|
40
|
+
},
|
|
41
|
+
"attribute": "value",
|
|
42
|
+
"reflect": false
|
|
43
|
+
},
|
|
44
|
+
"text": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"mutable": false,
|
|
47
|
+
"complexType": {
|
|
48
|
+
"original": "\"alpha2\" | \"name\" | \"none\"",
|
|
49
|
+
"resolved": "\"alpha2\" | \"name\" | \"none\"",
|
|
50
|
+
"references": {}
|
|
51
|
+
},
|
|
52
|
+
"required": false,
|
|
53
|
+
"optional": false,
|
|
54
|
+
"docs": {
|
|
55
|
+
"tags": [],
|
|
56
|
+
"text": ""
|
|
57
|
+
},
|
|
58
|
+
"attribute": "text",
|
|
59
|
+
"reflect": false,
|
|
60
|
+
"defaultValue": "\"alpha2\""
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
static get states() {
|
|
65
|
+
return {
|
|
66
|
+
"language": {}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
static get elementRef() { return "element"; }
|
|
70
|
+
}
|
|
@@ -11,7 +11,7 @@ export class InputDate {
|
|
|
11
11
|
render() {
|
|
12
12
|
var _a;
|
|
13
13
|
return [
|
|
14
|
-
h("smoothly-input", { name: this.name, onClick: () => (this.open = !this.open), disabled: this.disabled, type: "date", value: this.value, onSmoothlyInput: e => (this.value = e.detail.value) }, h("slot", null)),
|
|
14
|
+
h("smoothly-input", { name: this.name, onFocus: () => (this.open = !this.open), onClick: () => (this.open = !this.open), disabled: this.disabled, type: "date", value: this.value, onSmoothlyInput: e => (this.value = e.detail.value) }, h("slot", null)),
|
|
15
15
|
this.open && !this.disabled
|
|
16
16
|
? [
|
|
17
17
|
h("div", { onClick: () => (this.open = false) }),
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
position: relative;
|
|
3
|
+
max-width: 100vw;
|
|
3
4
|
}
|
|
4
5
|
nav {
|
|
5
6
|
position: absolute;
|
|
6
7
|
z-index: 10;
|
|
7
8
|
top: 3.5em;
|
|
8
9
|
background-color: rgb(var(--smoothly-default-shade));
|
|
9
|
-
max-width: 22em;
|
|
10
10
|
}
|
|
11
11
|
:host > div {
|
|
12
12
|
position: fixed;
|
|
13
|
-
top:
|
|
14
|
-
left:
|
|
15
|
-
right:
|
|
16
|
-
bottom:
|
|
13
|
+
top: 0;
|
|
14
|
+
left: 0;
|
|
15
|
+
right: 0;
|
|
16
|
+
bottom: 0;
|
|
17
17
|
width: 100vw;
|
|
18
18
|
height: 100vh;
|
|
19
19
|
z-index: 2;
|
|
@@ -26,3 +26,13 @@ nav {
|
|
|
26
26
|
height: 1em;
|
|
27
27
|
background-color: rgb(var(--smoothly-default-shade));
|
|
28
28
|
}
|
|
29
|
+
|
|
30
|
+
@media screen and (min-width: 400px){
|
|
31
|
+
nav {
|
|
32
|
+
position: absolute;
|
|
33
|
+
z-index: 10;
|
|
34
|
+
top: 3.5em;
|
|
35
|
+
background-color: rgb(var(--smoothly-default-shade));
|
|
36
|
+
max-width: 22em;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -2,7 +2,7 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
export class SmoothlyInputDemo {
|
|
3
3
|
render() {
|
|
4
4
|
return [
|
|
5
|
-
h("form", { action: "done", style: { position: "relative" } }, h("header", null, h("h5", null, "Form")), h("main", null, h("fieldset", null, h("h2", null, "Smoothly
|
|
5
|
+
h("form", { action: "done", style: { position: "relative" } }, h("header", null, h("h5", null, "Form")), h("main", null, h("fieldset", null, h("h2", null, "Smoothly Input"), h("h3", null, "Card"), h("smoothly-input", { type: "text", name: "name", readonly: true, value: "Readonly", onSmoothlyBlur: () => console.log("smoothly blur") }, "Readonly"), h("smoothly-input", { type: "text", name: "name.last", onSmoothlyChange: e => console.log("smoothly change event") }, "Name"), h("smoothly-input", { type: "text", name: "name.first", onSmoothlyChange: e => console.log("smoothly change event") }, "Name"), h("smoothly-input-date", null), h("smoothly-input", { type: "date", name: "date" }, "Date"), h("smoothly-input", { type: "date-time", name: "date-time" }, "Date-Time"), h("smoothly-input", { type: "divisor", name: "divisor" }, "Divisor"), h("smoothly-input", { type: "text", name: "street", value: "street" }, "Street"), h("smoothly-input", { type: "card-number", name: "card" }, "Card #"), h("smoothly-input", { type: "card-expires", name: "card", style: { width: "calc(60% - 2px)" } }, "Expires"), h("smoothly-input", { type: "card-csc", name: "card", style: { width: "calc(40% - 1px)", borderLeft: "none" } }, "CVV/CVC"), h("h3", null, "Contact"), h("smoothly-input", { type: "postal-code", name: "zip", style: { width: "calc(60% - 2px)" } }, "ZipCode"), h("smoothly-input", { type: "text", name: "testing" }, "Texttest"), h("smoothly-input", { type: "password", name: "password" }, "Password"), h("smoothly-input", { type: "email", name: "email" }, "Email"), h("smoothly-input", { type: "price", currency: "SEK", name: "price" }, "Price"), h("smoothly-input", { type: "percent", name: "percent" }, "Percent"), h("smoothly-input", { type: "phone", name: "phone" }, "Phone"), h("smoothly-input-date", { name: "some-date" }, "Calendar")), h("fieldset", null, h("h2", null, "Smoothly Radio"), h("h3", null, "Deselectable Radio List with button"), h("smoothly-radio-button", { deselectable: true, decoration: "button" }, h("smoothly-radio-button-item", { value: { some: "content", yes: "sir" } }, h("span", null, "Option 1"), h("span", { slot: "expansion" }, "Some description.")), h("smoothly-radio-button-item", { value: { some: "thing", yes: "miss" } }, h("span", null, "Option 2"), h("span", { slot: "expansion" }, "Some other description.")), h("smoothly-radio-button-item", { value: { some: "one", yes: "kid" } }, h("span", null, "Option 3"))), h("h3", null, "Radio List with button"), h("smoothly-radio-button", { decoration: "button" }, h("smoothly-radio-button-item", { value: { some: "content", yes: "sir" } }, h("span", null, "Option 1"), h("span", { slot: "expansion" }, "Some description.")), h("smoothly-radio-button-item", { value: { some: "thing", yes: "miss" } }, h("span", null, "Option 2"), h("span", { slot: "expansion" }, "Some other description.")), h("smoothly-radio-button-item", { value: { some: "one", yes: "kid" } }, h("span", null, "Option 3"))), h("h3", null, "Radio List ", h("b", null, "without button")), h("smoothly-radio-button", null, h("smoothly-radio-button-item", { value: { some: "content", yes: "sir" }, selected: true, color: "light" }, h("span", null, "Option 1"), h("span", { slot: "expansion" }, "Some description.")), h("smoothly-radio-button-item", { value: { some: "thing", yes: "miss" }, color: "light" }, h("span", null, "Option 2"), h("span", { slot: "expansion" }, "Some other description.")), h("smoothly-radio-button-item", { value: { some: "one", yes: "kid" }, color: "light" }, h("span", null, "Option 3"))), h("smoothly-radio", { name: "option", value: "1" }, "option 1"), h("smoothly-radio", { name: "option", value: "2", checked: true }, "option 2"), h("smoothly-radio", { name: "option", value: "3" }, "option 3")), h("fieldset", null, h("h2", null, "Smoothly Accordion"), h("smoothly-accordion", null, h("smoothly-accordion-item", { name: "A", open: true }, h("smoothly-radio", { name: "a", value: "1" }, "a 1"), h("smoothly-radio", { name: "a", value: "2", checked: true }, "a 2"), h("smoothly-radio", { name: "a", value: "3" }, "a 3")), h("smoothly-accordion-item", { name: "B" }, h("smoothly-radio", { name: "b", value: "1" }, "b 1"), h("smoothly-radio", { name: "b", value: "2" }, "b 2"), h("smoothly-radio", { name: "b", value: "3" }, "b 3")))), h("fieldset", null, h("h2", null, "Smoothly checkbox"), h("smoothly-checkbox", { selectAll: true, intermediate: true }), h("smoothly-checkbox", null), h("smoothly-checkbox", { disabled: true })), h("fieldset", null, h("h2", null, "Smoothly addresses"), h("smoothly-address-display", { value: '{ "countryCode": "SE", "street": "Korkstigen 2", "zipCode": "654 31", "city": "Fejksala" }' }), h("smoothly-address", { editable: false, value: '{ "countryCode": "SE", "street": "Stigv\u00E4gen 34", "zipCode": "123 45", "city": "Hobbiton" }' }), h("smoothly-addresses", { allowed: "billing delivery visit", editable: true, value: '{ "billing": { "countryCode": "SE", "street": "Rundslingan 3", "zipCode": "987 65", "city": "Klotby" }, "visit": { "countryCode": "SE", "street": "G\u00E5ngbanan 34", "zipCode": "543 21", "city": "Trasktr\u00E4sk" } }' }))), h("footer", null, h("smoothly-submit", { expand: "block", onSubmit: (e) => alert(e), color: "success" }, "Submit"), h("smoothly-trigger", { expand: "block", color: "success", onClick: (e) => console.log(e.detail) }, "Trigger"))),
|
|
6
6
|
h("smoothly-backtotop", null),
|
|
7
7
|
];
|
|
8
8
|
}
|
|
@@ -50,6 +50,12 @@ export const SmoothlyCheckbox: {
|
|
|
50
50
|
new (): SmoothlyCheckbox;
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
+
interface SmoothlyCountry extends Components.SmoothlyCountry, HTMLElement {}
|
|
54
|
+
export const SmoothlyCountry: {
|
|
55
|
+
prototype: SmoothlyCountry;
|
|
56
|
+
new (): SmoothlyCountry;
|
|
57
|
+
};
|
|
58
|
+
|
|
53
59
|
interface SmoothlyDialog extends Components.SmoothlyDialog, HTMLElement {}
|
|
54
60
|
export const SmoothlyDialog: {
|
|
55
61
|
prototype: SmoothlyDialog;
|